From dda003c4fa90e68bc7a4a500a49dd240b684539d Mon Sep 17 00:00:00 2001 From: "roi.ezra" Date: Fri, 12 Jul 2024 16:37:54 +0300 Subject: [PATCH] added --- Mundialito/Client/css/angular-busy.css | 285 +++ Mundialito/Client/css/angular-busy.min.css | 1 - Mundialito/Client/lib/angular-busy.js | 354 +++- Mundialito/Client/lib/ng-google-chart.js | 1237 ++++++++++--- Mundialito/Client/src/Bets/BetsCenter.html | 2 +- Mundialito/Client/src/Bets/BetsCenterCtrl.js | 12 +- Mundialito/Client/src/Constants.js | 2 +- .../Client/src/Dashboard/Dashboard.html | 8 +- .../Client/src/Dashboard/DashboardCtrl.js | 4 +- Mundialito/Client/src/Games/Game.html | 14 +- Mundialito/Client/src/Games/GameCtrl.js | 12 +- Mundialito/Client/src/Games/Games.html | 6 +- Mundialito/Client/src/Games/GamesCtrl.js | 4 +- Mundialito/Client/src/Stadiums/Stadium.html | 4 +- Mundialito/Client/src/Stadiums/StadiumCtrl.js | 4 +- Mundialito/Client/src/Stadiums/Stadiums.html | 2 +- .../Client/src/Stadiums/StadiumsCtrl.js | 10 +- Mundialito/Client/src/Teams/Team.html | 4 +- Mundialito/Client/src/Teams/TeamCtrl.js | 2 +- Mundialito/Client/src/Teams/Teams.html | 2 +- Mundialito/Client/src/Users/ManageApp.html | 6 +- Mundialito/Client/src/Users/ManageAppCtrl.js | 10 +- Mundialito/Client/src/Users/UserProfile.html | 18 +- .../Client/src/Users/UserProfileCtrl.js | 71 +- Mundialito/Client/src/Users/UsersManager.js | 16 + Mundialito/Controllers/GamesController.cs | 2 +- Mundialito/Controllers/StatsController.cs | 2 +- Mundialito/Controllers/UsersController.cs | 69 +- Mundialito/Logic/BetValidator.cs | 3 +- Mundialito/Logic/TableBuilder.cs | 5 +- Mundialito/Models/UserModel.cs | 70 +- Mundialito/gulpfile.js | 2 +- Mundialito/wwwroot/App/Bets/BetsCenter.html | 2 +- .../wwwroot/App/Dashboard/Dashboard.html | 8 +- Mundialito/wwwroot/App/Games/Game.html | 14 +- Mundialito/wwwroot/App/Games/Games.html | 6 +- Mundialito/wwwroot/App/Stadiums/Stadium.html | 4 +- Mundialito/wwwroot/App/Stadiums/Stadiums.html | 2 +- Mundialito/wwwroot/App/Teams/Team.html | 4 +- Mundialito/wwwroot/App/Teams/Teams.html | 2 +- Mundialito/wwwroot/App/Users/ManageApp.html | 6 +- Mundialito/wwwroot/App/Users/UserProfile.html | 18 +- Mundialito/wwwroot/css/app-cerulean.css | 2 +- Mundialito/wwwroot/css/app-space-lab.css | 2 +- Mundialito/wwwroot/js/app-min.js | 2 +- Mundialito/wwwroot/js/app.js | 147 +- Mundialito/wwwroot/lib/lib-min.js | 2 +- Mundialito/wwwroot/lib/lib.js | 1580 ++++++++++++++--- 48 files changed, 3295 insertions(+), 749 deletions(-) create mode 100644 Mundialito/Client/css/angular-busy.css delete mode 100644 Mundialito/Client/css/angular-busy.min.css diff --git a/Mundialito/Client/css/angular-busy.css b/Mundialito/Client/css/angular-busy.css new file mode 100644 index 0000000..2ca4ea6 --- /dev/null +++ b/Mundialito/Client/css/angular-busy.css @@ -0,0 +1,285 @@ +.cg-busy{ + position:absolute; + top:0px; + left:0px; + right:0px; + bottom:0px; + z-index:1001; +} + +.cg-busy-animation.ng-hide-add, +.cg-busy-animation.ng-hide-remove { + -webkit-transition:all .3s ease; + -moz-transition:all .3s ease; + -o-transition:all .3s ease; + transition:all .3s ease; + display:block !important; +} +.cg-busy-animation.ng-hide-remove { + opacity:0; + -webkit-transform:translate(0px,-40px); + -moz-transform:translate(0px,-40px); + -ms-transform:translate(0px,-40px); + -o-transform:translate(0px,-40px); + transform:translate(0px,-40px); +} +.cg-busy-animation.ng-hide-remove.ng-hide-remove-active { + opacity:1; + -webkit-transform:translate(0px,0px); + -moz-transform:translate(0px,0px); + -ms-transform:translate(0px,0px); + -o-transform:translate(0px,0px); + transform:translate(0px,0px); +} +.cg-busy-animation.ng-hide-add { + opacity:1; + -webkit-transform:translate(0px,0px); + -moz-transform:translate(0px,0px); + -ms-transform:translate(0px,0px); + -o-transform:translate(0px,0px); + transform:translate(0px,0px); +} +.cg-busy-animation.ng-hide-add.ng-hide-add-active { + opacity:0; + -webkit-transform:translate(0px,-40px); + -moz-transform:translate(0px,-40px); + -ms-transform:translate(0px,-40px); + -o-transform:translate(0px,-40px); + transform:translate(0px,-40px); +} + +.cg-busy-backdrop { + background-color:white; + opacity:.7; +} + +.cg-busy-backdrop-animation.ng-hide-add, +.cg-busy-backdrop-animation.ng-hide-remove { + -webkit-transition:opacity .3s ease; + -moz-transition:opacity .3s ease; + -o-transition:opacity .3s ease; + transition:opacity .3s ease; + display:block !important; +} + +.cg-busy-backdrop-animation.ng-hide { + opacity:0; +} + +/* All styles below are for the default template. */ + +.cg-busy-default-wrapper { + text-align:center; +} + +.cg-busy-default-sign{ + display: inline-block; + position:relative; + z-index:1002; + padding-bottom: 6px; + color:#333333; + text-shadow:0 1px 1px rgba(255, 255, 255, 0.75); + background-color:#e9eeee; + border:1px solid #dddddd; + border-top-width:0; + -webkit-border-radius:7px; + -moz-border-radius:7px; + border-radius:7px; + border-top-left-radius:0; + border-top-right-radius:0; + -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.cg-busy-default-text{ + margin:13px 12px 6px 49px; + font-size:16px; + color:#555; + text-align: left; + max-width: 400px; +} +.cg-busy-default-spinner{ + position:absolute; + width:25px; + height:25px; + display:inline-block; + top:12px; + left:14px; +} +.cg-busy-default-spinner div{ + width:12%; + height:26%; + background:#000; + position:absolute; + left:44.5%; + top:37%; + opacity:0; + -webkit-animation:cg-busy-spinner-anim 1s linear infinite; + -moz-animation:cg-busy-spinner-anim 1s linear infinite; + -ms-animation:cg-busy-spinner-anim 1s linear infinite; + -o-animation:cg-busy-spinner-anim 1s linear infinite; + animation:cg-busy-spinner-anim 1s linear infinite; + -webkit-border-radius:50px; + -moz-border-radius:50px; + border-radius:50px; + -webkit-box-shadow:0 0 3px rgba(0,0,0,0.2); + -moz-box-shadow:0 0 3px rgba(0,0,0,0.2); + box-shadow:0 0 3px rgba(0,0,0,0.2); +} +.cg-busy-default-spinner div.bar1{ + -webkit-transform:rotate(0deg) translate(0, -142%); + -moz-transform:rotate(0deg) translate(0, -142%); + -ms-transform:rotate(0deg) translate(0, -142%); + -o-transform:rotate(0deg) translate(0, -142%); + transform:rotate(0deg) translate(0, -142%); + -webkit-animation-delay:0s; + -moz-animation-delay:0s; + -ms-animation-delay:0s; + -o-animation-delay:0s; + animation-delay:0s; +} +.cg-busy-default-spinner div.bar2{ + -webkit-transform:rotate(30deg) translate(0, -142%); + -moz-transform:rotate(30deg) translate(0, -142%); + -ms-transform:rotate(30deg) translate(0, -142%); + -o-transform:rotate(30deg) translate(0, -142%); + transform:rotate(30deg) translate(0, -142%); + -webkit-animation-delay:-0.9167s; + -moz-animation-delay:-0.9167s; + -ms-animation-delay:-0.9167s; + -o-animation-delay:-0.9167s; + animation-delay:-0.9167s; +} +.cg-busy-default-spinner div.bar3{ + -webkit-transform:rotate(60deg) translate(0, -142%); + -moz-transform:rotate(60deg) translate(0, -142%); + -ms-transform:rotate(60deg) translate(0, -142%); + -o-transform:rotate(60deg) translate(0, -142%); + transform:rotate(60deg) translate(0, -142%); + -webkit-animation-delay:-0.833s; + -moz-animation-delay:-0.833s; + -ms-animation-delay:-0.833s; + -o-animation-delay:-0.833s; + animation-delay:-0.833s; +} +.cg-busy-default-spinner div.bar4{ + -webkit-transform:rotate(90deg) translate(0, -142%); + -moz-transform:rotate(90deg) translate(0, -142%); + -ms-transform:rotate(90deg) translate(0, -142%); + -o-transform:rotate(90deg) translate(0, -142%); + transform:rotate(90deg) translate(0, -142%); + -webkit-animation-delay:-0.75s; + -moz-animation-delay:-0.75s; + -ms-animation-delay:-0.75s; + -o-animation-delay:-0.75s; + animation-delay:-0.75s; +} +.cg-busy-default-spinner div.bar5{ + -webkit-transform:rotate(120deg) translate(0, -142%); + -moz-transform:rotate(120deg) translate(0, -142%); + -ms-transform:rotate(120deg) translate(0, -142%); + -o-transform:rotate(120deg) translate(0, -142%); + transform:rotate(120deg) translate(0, -142%); + -webkit-animation-delay:-0.667s; + -moz-animation-delay:-0.667s; + -ms-animation-delay:-0.667s; + -o-animation-delay:-0.667s; + animation-delay:-0.667s; +} +.cg-busy-default-spinner div.bar6{ + -webkit-transform:rotate(150deg) translate(0, -142%); + -moz-transform:rotate(150deg) translate(0, -142%); + -ms-transform:rotate(150deg) translate(0, -142%); + -o-transform:rotate(150deg) translate(0, -142%); + transform:rotate(150deg) translate(0, -142%); + -webkit-animation-delay:-0.5833s; + -moz-animation-delay:-0.5833s; + -ms-animation-delay:-0.5833s; + -o-animation-delay:-0.5833s; + animation-delay:-0.5833s; +} +.cg-busy-default-spinner div.bar7{ + -webkit-transform:rotate(180deg) translate(0, -142%); + -moz-transform:rotate(180deg) translate(0, -142%); + -ms-transform:rotate(180deg) translate(0, -142%); + -o-transform:rotate(180deg) translate(0, -142%); + transform:rotate(180deg) translate(0, -142%); + -webkit-animation-delay:-0.5s; + -moz-animation-delay:-0.5s; + -ms-animation-delay:-0.5s; + -o-animation-delay:-0.5s; + animation-delay:-0.5s; +} +.cg-busy-default-spinner div.bar8{ + -webkit-transform:rotate(210deg) translate(0, -142%); + -moz-transform:rotate(210deg) translate(0, -142%); + -ms-transform:rotate(210deg) translate(0, -142%); + -o-transform:rotate(210deg) translate(0, -142%); + transform:rotate(210deg) translate(0, -142%); + -webkit-animation-delay:-0.41667s; + -moz-animation-delay:-0.41667s; + -ms-animation-delay:-0.41667s; + -o-animation-delay:-0.41667s; + animation-delay:-0.41667s; +} +.cg-busy-default-spinner div.bar9{ + -webkit-transform:rotate(240deg) translate(0, -142%); + -moz-transform:rotate(240deg) translate(0, -142%); + -ms-transform:rotate(240deg) translate(0, -142%); + -o-transform:rotate(240deg) translate(0, -142%); + transform:rotate(240deg) translate(0, -142%); + -webkit-animation-delay:-0.333s; + -moz-animation-delay:-0.333s; + -ms-animation-delay:-0.333s; + -o-animation-delay:-0.333s; + animation-delay:-0.333s; +} +.cg-busy-default-spinner div.bar10{ + -webkit-transform:rotate(270deg) translate(0, -142%); + -moz-transform:rotate(270deg) translate(0, -142%); + -ms-transform:rotate(270deg) translate(0, -142%); + -o-transform:rotate(270deg) translate(0, -142%); + transform:rotate(270deg) translate(0, -142%); + -webkit-animation-delay:-0.25s; + -moz-animation-delay:-0.25s; + -ms-animation-delay:-0.25s; + -o-animation-delay:-0.25s; + animation-delay:-0.25s; +} +.cg-busy-default-spinner div.bar11{ + -webkit-transform:rotate(300deg) translate(0, -142%); + -moz-transform:rotate(300deg) translate(0, -142%); + -ms-transform:rotate(300deg) translate(0, -142%); + -o-transform:rotate(300deg) translate(0, -142%); + transform:rotate(300deg) translate(0, -142%); + -webkit-animation-delay:-0.1667s; + -moz-animation-delay:-0.1667s; + -ms-animation-delay:-0.1667s; + -o-animation-delay:-0.1667s; + animation-delay:-0.1667s; +} +.cg-busy-default-spinner div.bar12{ + -webkit-transform:rotate(330deg) translate(0, -142%); + -moz-transform:rotate(330deg) translate(0, -142%); + -ms-transform:rotate(330deg) translate(0, -142%); + -o-transform:rotate(330deg) translate(0, -142%); + transform:rotate(330deg) translate(0, -142%); + -webkit-animation-delay:-0.0833s; + -moz-animation-delay:-0.0833s; + -ms-animation-delay:-0.0833s; + -o-animation-delay:-0.0833s; + animation-delay:-0.0833s; +} + +@-webkit-keyframes cg-busy-spinner-anim{ + from {opacity: 1;} + to {opacity: 0.25;} +} +@-moz-keyframes cg-busy-spinner-anim{ + from {opacity: 1;} + to {opacity: 0.25;} +} +@keyframes cg-busy-spinner-anim{ + from {opacity: 1;} + to {opacity: 0.25;} +} \ No newline at end of file diff --git a/Mundialito/Client/css/angular-busy.min.css b/Mundialito/Client/css/angular-busy.min.css deleted file mode 100644 index 13c648d..0000000 --- a/Mundialito/Client/css/angular-busy.min.css +++ /dev/null @@ -1 +0,0 @@ -.cg-busy{position:absolute;top:0;left:0;right:0;bottom:0}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;display:block!important}.cg-busy-animation.ng-hide-remove{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-animation.ng-hide-remove.ng-hide-remove-active{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add.ng-hide-add-active{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-backdrop{background-color:#fff;opacity:.7}.cg-busy-default-sign{position:absolute;top:0;left:50%;margin-left:-100px;width:170px;height:50px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#e9eeee;border:1px solid #ddd;border-top-width:0;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;border-top-left-radius:0;border-top-right-radius:0;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.cg-busy-default-text{position:absolute;left:49px;top:15px;font-size:16px;color:#555}.cg-busy-default-spinner{position:absolute;width:25px;height:25px;display:inline-block;top:12px;left:14px}.cg-busy-default-spinner div{width:12%;height:26%;background:#000;position:absolute;left:44.5%;top:37%;opacity:0;-webkit-animation:cg-busy-spinner-anim 1s linear infinite;-moz-animation:cg-busy-spinner-anim 1s linear infinite;-ms-animation:cg-busy-spinner-anim 1s linear infinite;-o-animation:cg-busy-spinner-anim 1s linear infinite;animation:cg-busy-spinner-anim 1s linear infinite;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);-moz-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.cg-busy-default-spinner div.bar1{-webkit-transform:rotate(0deg) translate(0,-142%);-moz-transform:rotate(0deg) translate(0,-142%);-ms-transform:rotate(0deg) translate(0,-142%);-o-transform:rotate(0deg) translate(0,-142%);transform:rotate(0deg) translate(0,-142%);-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.cg-busy-default-spinner div.bar2{-webkit-transform:rotate(30deg) translate(0,-142%);-moz-transform:rotate(30deg) translate(0,-142%);-ms-transform:rotate(30deg) translate(0,-142%);-o-transform:rotate(30deg) translate(0,-142%);transform:rotate(30deg) translate(0,-142%);-webkit-animation-delay:-.9167s;-moz-animation-delay:-.9167s;-ms-animation-delay:-.9167s;-o-animation-delay:-.9167s;animation-delay:-.9167s}.cg-busy-default-spinner div.bar3{-webkit-transform:rotate(60deg) translate(0,-142%);-moz-transform:rotate(60deg) translate(0,-142%);-ms-transform:rotate(60deg) translate(0,-142%);-o-transform:rotate(60deg) translate(0,-142%);transform:rotate(60deg) translate(0,-142%);-webkit-animation-delay:-.833s;-moz-animation-delay:-.833s;-ms-animation-delay:-.833s;-o-animation-delay:-.833s;animation-delay:-.833s}.cg-busy-default-spinner div.bar4{-webkit-transform:rotate(90deg) translate(0,-142%);-moz-transform:rotate(90deg) translate(0,-142%);-ms-transform:rotate(90deg) translate(0,-142%);-o-transform:rotate(90deg) translate(0,-142%);transform:rotate(90deg) translate(0,-142%);-webkit-animation-delay:-.75s;-moz-animation-delay:-.75s;-ms-animation-delay:-.75s;-o-animation-delay:-.75s;animation-delay:-.75s}.cg-busy-default-spinner div.bar5{-webkit-transform:rotate(120deg) translate(0,-142%);-moz-transform:rotate(120deg) translate(0,-142%);-ms-transform:rotate(120deg) translate(0,-142%);-o-transform:rotate(120deg) translate(0,-142%);transform:rotate(120deg) translate(0,-142%);-webkit-animation-delay:-.667s;-moz-animation-delay:-.667s;-ms-animation-delay:-.667s;-o-animation-delay:-.667s;animation-delay:-.667s}.cg-busy-default-spinner div.bar6{-webkit-transform:rotate(150deg) translate(0,-142%);-moz-transform:rotate(150deg) translate(0,-142%);-ms-transform:rotate(150deg) translate(0,-142%);-o-transform:rotate(150deg) translate(0,-142%);transform:rotate(150deg) translate(0,-142%);-webkit-animation-delay:-.5833s;-moz-animation-delay:-.5833s;-ms-animation-delay:-.5833s;-o-animation-delay:-.5833s;animation-delay:-.5833s}.cg-busy-default-spinner div.bar7{-webkit-transform:rotate(180deg) translate(0,-142%);-moz-transform:rotate(180deg) translate(0,-142%);-ms-transform:rotate(180deg) translate(0,-142%);-o-transform:rotate(180deg) translate(0,-142%);transform:rotate(180deg) translate(0,-142%);-webkit-animation-delay:-.5s;-moz-animation-delay:-.5s;-ms-animation-delay:-.5s;-o-animation-delay:-.5s;animation-delay:-.5s}.cg-busy-default-spinner div.bar8{-webkit-transform:rotate(210deg) translate(0,-142%);-moz-transform:rotate(210deg) translate(0,-142%);-ms-transform:rotate(210deg) translate(0,-142%);-o-transform:rotate(210deg) translate(0,-142%);transform:rotate(210deg) translate(0,-142%);-webkit-animation-delay:-.41667s;-moz-animation-delay:-.41667s;-ms-animation-delay:-.41667s;-o-animation-delay:-.41667s;animation-delay:-.41667s}.cg-busy-default-spinner div.bar9{-webkit-transform:rotate(240deg) translate(0,-142%);-moz-transform:rotate(240deg) translate(0,-142%);-ms-transform:rotate(240deg) translate(0,-142%);-o-transform:rotate(240deg) translate(0,-142%);transform:rotate(240deg) translate(0,-142%);-webkit-animation-delay:-.333s;-moz-animation-delay:-.333s;-ms-animation-delay:-.333s;-o-animation-delay:-.333s;animation-delay:-.333s}.cg-busy-default-spinner div.bar10{-webkit-transform:rotate(270deg) translate(0,-142%);-moz-transform:rotate(270deg) translate(0,-142%);-ms-transform:rotate(270deg) translate(0,-142%);-o-transform:rotate(270deg) translate(0,-142%);transform:rotate(270deg) translate(0,-142%);-webkit-animation-delay:-.25s;-moz-animation-delay:-.25s;-ms-animation-delay:-.25s;-o-animation-delay:-.25s;animation-delay:-.25s}.cg-busy-default-spinner div.bar11{-webkit-transform:rotate(300deg) translate(0,-142%);-moz-transform:rotate(300deg) translate(0,-142%);-ms-transform:rotate(300deg) translate(0,-142%);-o-transform:rotate(300deg) translate(0,-142%);transform:rotate(300deg) translate(0,-142%);-webkit-animation-delay:-.1667s;-moz-animation-delay:-.1667s;-ms-animation-delay:-.1667s;-o-animation-delay:-.1667s;animation-delay:-.1667s}.cg-busy-default-spinner div.bar12{-webkit-transform:rotate(330deg) translate(0,-142%);-moz-transform:rotate(330deg) translate(0,-142%);-ms-transform:rotate(330deg) translate(0,-142%);-o-transform:rotate(330deg) translate(0,-142%);transform:rotate(330deg) translate(0,-142%);-webkit-animation-delay:-.0833s;-moz-animation-delay:-.0833s;-ms-animation-delay:-.0833s;-o-animation-delay:-.0833s;animation-delay:-.0833s}@-webkit-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@-moz-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}} \ No newline at end of file diff --git a/Mundialito/Client/lib/angular-busy.js b/Mundialito/Client/lib/angular-busy.js index fabf203..c6d7f06 100644 --- a/Mundialito/Client/lib/angular-busy.js +++ b/Mundialito/Client/lib/angular-busy.js @@ -1,80 +1,276 @@ -angular.module('cgBusy', ['ajoslin.promise-tracker']); - -angular.module('cgBusy').value('cgBusyTemplateName', 'angular-busy.html'); - -angular.module('cgBusy').directive('cgBusy', ['promiseTracker', '$compile', '$templateCache', 'cgBusyTemplateName', '$http', '$animate', - function (promiseTracker, $compile, $templateCache, cgBusyTemplateName, $http, $animate) { - return { - restrict: 'A', - link: function (scope, element, attrs, fn) { - - var options = scope.$eval(attrs.cgBusy); - - if (angular.isString(options) || angular.isArray(options)) { - options = { tracker: options }; - } - - if (angular.isUndefined(options) || angular.isUndefined(options.tracker)) { - throw new Error('Options for cgBusy directive must be provided (tracker option is required).'); - } - - options.tracker = angular.isArray(options.tracker) ? options.tracker : [options.tracker]; - - if (!scope.$cgBusyTracker) { - scope.$cgBusyTracker = {}; - } - - angular.forEach(options.tracker, function (tracker) { - // Checking for a non-existent tracker throws an exception, - // so we check for one first, then register it if it doesn't exist yet - try { - scope.$cgBusyTracker[tracker] = promiseTracker(tracker); - } catch (error) { - scope.$cgBusyTracker[tracker] = promiseTracker.register(tracker); - } - }); - - //multiple cg-busy's can be active in the same scope so we have to be careful not to overwrite the - //same isActive function. So lets name it uniquely by the trackers its watching. - var isActiveFnName = 'isActive_' + options.tracker.join('_'); - - scope[isActiveFnName] = function () { - var active = false; - angular.forEach(options.tracker, function (tracker) { - if (scope.$cgBusyTracker[tracker].active()) { - active = true; - } - }); - return active; - }; - - var position = element.css('position'); - if (position === 'static' || position === '' || typeof position === 'undefined') { - element.css('position', 'relative'); - } - - var indicatorTemplateName = options.template ? options.template : cgBusyTemplateName; - - $http.get(indicatorTemplateName, { cache: $templateCache }).then(function (indicatorTemplate) { - - options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop; - var backdrop = options.backdrop ? '
' : ''; - - var template = '
' + backdrop + indicatorTemplate + '
'; - var templateElement = $compile(template)(scope); - - angular.element(templateElement.children()[options.backdrop ? 1 : 0]) - .css('position', 'absolute') - .css('top', 0) - .css('left', 0) - .css('right', 0) - .css('bottom', 0); - element.append(templateElement); - - }).catch(function (data) { - throw new Error('Template specified for cgBusy (' + options.template + ') could not be loaded. ' + data); - }); - } - }; - } +angular.module('cgBusy',[]); + +//loosely modeled after angular-promise-tracker +angular.module('cgBusy').factory('_cgBusyTrackerFactory',['$timeout','$q',function($timeout,$q){ + + return function(){ + + var tracker = {}; + tracker.promises = []; + tracker.delayPromise = null; + tracker.durationPromise = null; + tracker.delayJustFinished = false; + + tracker.reset = function(options){ + tracker.minDuration = options.minDuration; + + tracker.promises = []; + angular.forEach(options.promises,function(p){ + if (!p || p.$cgBusyFulfilled) { + return; + } + addPromiseLikeThing(p); + }); + + if (tracker.promises.length === 0) { + //if we have no promises then dont do the delay or duration stuff + return; + } + + tracker.delayJustFinished = false; + if (options.delay) { + tracker.delayPromise = $timeout(function(){ + tracker.delayPromise = null; + tracker.delayJustFinished = true; + },parseInt(options.delay,10)); + } + if (options.minDuration) { + tracker.durationPromise = $timeout(function(){ + tracker.durationPromise = null; + },parseInt(options.minDuration,10) + (options.delay ? parseInt(options.delay,10) : 0)); + } + }; + + tracker.isPromise = function(promiseThing){ + var then = promiseThing && (promiseThing.then || promiseThing.$then || + (promiseThing.$promise && promiseThing.$promise.then)); + + return typeof then !== 'undefined'; + }; + + tracker.callThen = function(promiseThing,success,error){ + var promise; + if (promiseThing.then || promiseThing.$then){ + promise = promiseThing; + } else if (promiseThing.$promise){ + promise = promiseThing.$promise; + } else if (promiseThing.denodeify){ + promise = $q.when(promiseThing); + } + + var then = (promise.then || promise.$then); + + then.call(promise,success,error); + }; + + var addPromiseLikeThing = function(promise){ + + if (!tracker.isPromise(promise)) { + throw new Error('cgBusy expects a promise (or something that has a .promise or .$promise'); + } + + if (tracker.promises.indexOf(promise) !== -1){ + return; + } + tracker.promises.push(promise); + + tracker.callThen(promise, function(){ + promise.$cgBusyFulfilled = true; + if (tracker.promises.indexOf(promise) === -1) { + return; + } + tracker.promises.splice(tracker.promises.indexOf(promise),1); + },function(){ + promise.$cgBusyFulfilled = true; + if (tracker.promises.indexOf(promise) === -1) { + return; + } + tracker.promises.splice(tracker.promises.indexOf(promise),1); + }); + }; + + tracker.active = function(){ + if (tracker.delayPromise){ + return false; + } + + if (!tracker.delayJustFinished){ + if (tracker.durationPromise){ + return true; + } + return tracker.promises.length > 0; + } else { + //if both delay and min duration are set, + //we don't want to initiate the min duration if the + //promise finished before the delay was complete + tracker.delayJustFinished = false; + if (tracker.promises.length === 0) { + tracker.durationPromise = null; + } + return tracker.promises.length > 0; + } + }; + + return tracker; + + }; +}]); + +angular.module('cgBusy').value('cgBusyDefaults',{}); + +angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusyDefaults','$http','_cgBusyTrackerFactory', + function($compile,$templateCache,cgBusyDefaults,$http,_cgBusyTrackerFactory){ + return { + restrict: 'A', + link: function(scope, element, attrs, fn) { + + //Apply position:relative to parent element if necessary + var position = element.css('position'); + if (position === 'static' || position === '' || typeof position === 'undefined'){ + element.css('position','relative'); + } + + var templateElement; + var backdropElement; + var currentTemplate; + var templateScope; + var backdrop; + var tracker = _cgBusyTrackerFactory(); + + var defaults = { + templateUrl: 'angular-busy.html', + delay:0, + minDuration:0, + backdrop: true, + message:'Please Wait...', + wrapperClass: 'cg-busy cg-busy-animation' + }; + + angular.extend(defaults,cgBusyDefaults); + + scope.$watchCollection(attrs.cgBusy,function(options){ + + if (!options) { + options = {promise:null}; + } + + if (angular.isString(options)) { + throw new Error('Invalid value for cg-busy. cgBusy no longer accepts string ids to represent promises/trackers.'); + } + + //is it an array (of promises) or one promise + if (angular.isArray(options) || tracker.isPromise(options)) { + options = {promise:options}; + } + + options = angular.extend(angular.copy(defaults),options); + + if (!options.templateUrl){ + options.templateUrl = defaults.templateUrl; + } + + if (!angular.isArray(options.promise)){ + options.promise = [options.promise]; + } + + // options.promise = angular.isArray(options.promise) ? options.promise : [options.promise]; + // options.message = options.message ? options.message : 'Please Wait...'; + // options.template = options.template ? options.template : cgBusyTemplateName; + // options.minDuration = options.minDuration ? options.minDuration : 0; + // options.delay = options.delay ? options.delay : 0; + + if (!templateScope) { + templateScope = scope.$new(); + } + + templateScope.$message = options.message; + + if (!angular.equals(tracker.promises,options.promise)) { + tracker.reset({ + promises:options.promise, + delay:options.delay, + minDuration: options.minDuration + }); + } + + templateScope.$cgBusyIsActive = function() { + return tracker.active(); + }; + + + if (!templateElement || currentTemplate !== options.templateUrl || backdrop !== options.backdrop) { + + if (templateElement) { + templateElement.remove(); + } + if (backdropElement){ + backdropElement.remove(); + } + + currentTemplate = options.templateUrl; + backdrop = options.backdrop; + + $http.get(currentTemplate,{cache: $templateCache}).then(function(indicatorTemplate){ + + options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop; + + if (options.backdrop){ + var backdrop = '
'; + backdropElement = $compile(backdrop)(templateScope); + element.append(backdropElement); + } + + var template = '
' + indicatorTemplate.data + '
'; + templateElement = $compile(template)(templateScope); + + angular.element(templateElement.children()[0]) + .css('position','absolute') + .css('top',0) + .css('left',0) + .css('right',0) + .css('bottom',0); + element.append(templateElement); + + }, function(data){ + throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data); + }); + } + + },true); + } + }; + } ]); + + +angular.module('cgBusy').run(['$templateCache', function($templateCache) { + 'use strict'; + + $templateCache.put('angular-busy.html', + "
\n" + + "\n" + + "
\n" + + "\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "\n" + + "
{{$message}}
\n" + + "\n" + + "
\n" + + "\n" + + "
" + ); + +}]); \ No newline at end of file diff --git a/Mundialito/Client/lib/ng-google-chart.js b/Mundialito/Client/lib/ng-google-chart.js index e502ece..2dd9ff1 100644 --- a/Mundialito/Client/lib/ng-google-chart.js +++ b/Mundialito/Client/lib/ng-google-chart.js @@ -1,235 +1,1072 @@ -/** - * @description Google Chart Api Directive Module for AngularJS - * @version 0.0.9 - * @author Nicolas Bouillon - * @author GitHub contributors - * @license MIT - * @year 2013 - */ -(function (document, window, angular) { - 'use strict'; - +/*! angular-google-chart 2017-04-16 */ +/* +* @description Google Chart Api Directive Module for AngularJS +* @version 1.0.0-beta.1 +* @author GitHub Contributors +* @license MIT +* @year 2013 +*/ +/* global angular */ +(function(){ angular.module('googlechart', []) + .run(registerResizeEvent); + + registerResizeEvent.$inject = ['$rootScope', '$window']; + + function registerResizeEvent($rootScope, $window){ + angular.element($window).on('resize', function () { + $rootScope.$emit('resizeMsg'); + }); + } +})(); +/* global angular, google */ +(function(){ + angular.module('googlechart') + .factory('FormatManager', formatManagerFactory); + + function formatManagerFactory(){ + // Handles the processing of Google Charts API Formats + function FormatManager($google){ + var self = this; + var oldFormatTemplates = {}; + self.iFormats = {}; // Holds instances of formats (ie. self.iFormats.date[0] = new $google.visualization.DateFormat(params)) + self.applyFormats = applyFormats; + + // apply formats of type to datatable + function apply(tFormats, dataTable){ + var i, formatType; + for (formatType in tFormats){ + if (tFormats.hasOwnProperty(formatType)){ + for (i = 0; i < self.iFormats[formatType].length; i++) { + if (tFormats[formatType][i].columnNum < dataTable.getNumberOfColumns()) { + self.iFormats[formatType][i].format(dataTable, tFormats[formatType][i].columnNum); + } + } + } + } + } + + function applyFormat(formatType, FormatClass, tFormats){ + var i; + if (angular.isArray(tFormats[formatType])) { + // basic change detection; no need to run if no changes + if (!angular.equals(tFormats[formatType], oldFormatTemplates[formatType])) { + oldFormatTemplates[formatType] = tFormats[formatType]; + self.iFormats[formatType] = []; + + if (formatType === 'color') { + instantiateColorFormatters(tFormats); + } else { + for (i = 0; i < tFormats[formatType].length; i++) { + self.iFormats[formatType].push(new FormatClass( + tFormats[formatType][i]) + ); + } + } + } + } + } + + function applyFormats(dataTable, tFormats, customFormatters) { + var formatType, FormatClass, requiresHtml = false; + if (!angular.isDefined(tFormats) || !angular.isDefined(dataTable)){ + return { requiresHtml: false }; + } + for (formatType in tFormats){ + if (tFormats.hasOwnProperty(formatType)){ + FormatClass = getFormatClass(formatType, customFormatters); + if (!angular.isFunction(FormatClass)){ + // if no class constructor was returned, + // there's no point in completing cycle + continue; + } + applyFormat(formatType, FormatClass, tFormats); + + //Many formatters require HTML tags to display special formatting + if (formatType === 'arrow' || formatType === 'bar' || formatType === 'color') { + requiresHtml = true; + } + } + } + apply(tFormats, dataTable); + return { requiresHtml: requiresHtml }; + } + + function instantiateColorFormatters(tFormats){ + var t, colorFormat, i, data, formatType = 'color'; + for (t = 0; t < tFormats[formatType].length; t++) { + colorFormat = new $google.visualization.ColorFormat(); - .constant('googleChartApiConfig', { - version: '1', - optionalSettings: { - packages: ['corechart'] - } - }) - - .provider('googleJsapiUrl', function () { - var protocol = 'https:'; - var url = '//www.google.com/jsapi'; - - this.setProtocol = function (newProtocol) { - protocol = newProtocol; - }; - - this.setUrl = function (newUrl) { - url = newUrl; - }; - - this.$get = function () { - return (protocol ? protocol : '') + url; - }; - }) - .factory('googleChartApiPromise', ['$rootScope', '$q', 'googleChartApiConfig', 'googleJsapiUrl', function ($rootScope, $q, apiConfig, googleJsapiUrl) { - var apiReady = $q.defer(); - var onLoad = function () { - // override callback function - var settings = { - callback: function () { - var oldCb = apiConfig.optionalSettings.callback; - $rootScope.$apply(function () { - apiReady.resolve(); - }); - - if (angular.isFunction(oldCb)) { - oldCb.call(this); + for (i = 0; i < tFormats[formatType][t].formats.length; i++) { + data = tFormats[formatType][t].formats[i]; + + if (typeof (data.fromBgColor) !== 'undefined' && typeof (data.toBgColor) !== 'undefined') { + colorFormat.addGradientRange(data.from, data.to, data.color, data.fromBgColor, data.toBgColor); + } else { + colorFormat.addRange(data.from, data.to, data.color, data.bgcolor); + } } + + self.iFormats[formatType].push(colorFormat); } - }; + } + + function getFormatClass(formatType, customFormatters){ + var className = formatType.charAt(0).toUpperCase() + formatType.slice(1).toLowerCase() + "Format"; + if ($google.visualization.hasOwnProperty(className)){ + return google.visualization[className]; + } else if (angular.isDefined(customFormatters) && customFormatters.hasOwnProperty(formatType)) { + return customFormatters[formatType]; + } + return; + } + } + + return FormatManager; + } +})(); +/* global angular, google */ - settings = angular.extend({}, apiConfig.optionalSettings, settings); +(function() { - window.google.load('visualization', apiConfig.version, settings); - }; - var head = document.getElementsByTagName('head')[0]; - var script = document.createElement('script'); + angular.module('googlechart') + .controller('GoogleChartController', GoogleChartController); - script.setAttribute('type', 'text/javascript'); - script.src = googleJsapiUrl; + GoogleChartController.$inject = ['$scope', '$element', '$attrs', '$injector', '$timeout', '$window', '$rootScope', 'GoogleChartService']; - if (script.addEventListener) { // Standard browsers (including IE9+) - script.addEventListener('load', onLoad, false); - } else { // IE8 and below - script.onreadystatechange = function () { - if (script.readyState === 'loaded' || script.readyState === 'complete') { - script.onreadystatechange = null; - onLoad(); - } + function GoogleChartController($scope, $element, $attrs, $injector, $timeout, $window, $rootScope, GoogleChartService) { + var self = this; + var resizeHandler; + var googleChartService; + + init(); + + function cleanup() { + resizeHandler(); + } + + function draw() { + if (!draw.triggered && (self.chart !== undefined)) { + draw.triggered = true; + $timeout(setupAndDraw, 0, true); + } + else if (self.chart !== undefined) { + $timeout.cancel(draw.recallTimeout); + draw.recallTimeout = $timeout(draw, 10); + } + } + + // Watch function calls this. + function drawAsync() { + googleChartService.getReadyPromise() + .then(draw); + } + + //setupAndDraw() calls this. + function drawChartWrapper() { + googleChartService.draw(); + draw.triggered = false; + } + + function init() { + // Instantiate service + googleChartService = new GoogleChartService(); + + self.registerChartListener = googleChartService.registerChartListener; + self.registerWrapperListener = googleChartService.registerWrapperListener; + self.registerServiceListener = googleChartService.registerServiceListener; + + /* Watches, to refresh the chart when its data, formatters, options, view, + or type change. All other values intentionally disregarded to avoid double + calls to the draw function. Please avoid making changes to these objects + directly from this directive.*/ + $scope.$watch(watchValue, watchHandler, true); // true is for deep object equality checking + + // Redraw the chart if the window is resized + resizeHandler = $rootScope.$on('resizeMsg', drawAsync); + + //Cleanup resize handler. + $scope.$on('$destroy', cleanup); + } + + function setupAndDraw() { + googleChartService.setup($element, + self.chart.type, + self.chart.data, + self.chart.view, + self.chart.options, + self.chart.formatters, + self.chart.customFormatters); + + $timeout(drawChartWrapper); + } + + function watchHandler() { + self.chart = $scope.$eval($attrs.chart); + drawAsync(); + } + + function watchValue() { + var chartObject = $scope.$eval($attrs.chart); + if (angular.isDefined(chartObject) && angular.isObject(chartObject)) { + return { + customFormatters: chartObject.customFormatters, + data: chartObject.data, + formatters: chartObject.formatters, + options: chartObject.options, + type: chartObject.type, + view: chartObject.view }; } + } + } +})(); +/* global angular */ +(function(){ + angular.module('googlechart') + .directive('agcBeforeDraw', beforeDrawDirective); + + function beforeDrawDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject=['chartWrapper']; + function callback(chartWrapper){ + scope.$apply(function (){ + scope.$eval(attrs.agcBeforeDraw, {chartWrapper: chartWrapper}); + }); + } + googleChartController.registerServiceListener('beforeDraw', callback, this); + } + }; + } +})(); - head.appendChild(script); - - return apiReady.promise; - }]) - .directive('googleChart', ['$timeout', '$window', '$rootScope', 'googleChartApiPromise', function ($timeout, $window, $rootScope, googleChartApiPromise) { - return { - restrict: 'A', - scope: { - chartOrig: '=chart', - onReady: '&', - select: '&' - }, - link: function ($scope, $elm) { - // Watches, to refresh the chart when its data, title or dimensions change - $scope.$watch('chartOrig', function () { - $scope.chart = angular.copy($scope.chartOrig); - drawAsync(); - }, true); // true is for deep object equality checking - - // Redraw the chart if the window is resized - $rootScope.$on('resizeMsg', function () { - $timeout(function () { - // Not always defined yet in IE so check - if ($scope.chartWrapper) { - drawAsync(); - } - }); +/* global angular */ +(function() { + angular.module('googlechart') + .provider('agcGstaticLoader', agcGstaticLoaderProvider); + + function agcGstaticLoaderProvider(){ + var useBothLoaders = false; + var version = "current"; + var options = { + packages: ["corechart"] + }; + + /** Add Google Visualization API package to loader configuration. */ + this.addPackage = function(packageName){ + options.packages = options.packages || []; + options.packages.push(packageName); + + if (needsBothLoaders()) + useBothLoaders = true; + return this; + }; + + /** Delete key from underlying loader configuration. */ + this.clearOption = function(key){ + delete this._options[key]; + return this; + }; + + /** Remove Google Visualization API package from loader configuration. */ + this.removePackage = function(packageName){ + options.packages = this._options.packages || []; + var index = options.packages.indexOf(packageName); + if (index > -1) + options.packages.splice(index, 1); + return this; + }; + + /** Set option to value. See developers.google.com/chart/ for information about loader options. */ + this.setOption = function(key, value){ + options[key] = value; + return this; + }; + + /** Sets underlying loader options object to value provided. Replaces everything, included packages. */ + this.setOptions = function(value){ + options = value; + return this; + }; + + /** Set Google Visualization API frozen version to load. Default: 'current' */ + this.setVersion = function(value){ + version = value; + if (needsBothLoaders()) + useBothLoaders = true; + return this; + }; + + /** Override for internal setting to add both loader scripts. Required under certain conditions. */ + this.useBothLoaders = function(value){ + if (typeof value === 'undefined') + value = true; + + useBothLoaders = !!value; + return this; + }; + + /** Check if conditions are correct to need both JSAPI and gstatic loader scripts. */ + function needsBothLoaders(){ + var versionCheck, packageCheck; + + versionCheck = !isNaN(+version) && +version < 45; + packageCheck = options.packages.indexOf("geochart") > -1 || + options.packages.indexOf("map") > -1; + + return versionCheck && packageCheck; + } + + this.$get = function($rootScope, $q, agcScriptTagHelper){ + + function scriptLoadCallback(){ + if (!google || + !google.charts || + typeof google.charts.setOnLoadCallback !== 'function'){ + return $q.reject("Google charts library loader not present."); + } + + var deferred = $q.defer(); + + google.charts.load(version, options); + + google.charts.setOnLoadCallback(function(){ + $rootScope.$apply(function(){ + deferred.resolve(google); }); + }); - // Keeps old formatter configuration to compare against - $scope.oldChartFormatters = {}; + return deferred.promise; + } - function applyFormat(formatType, formatClass, dataTable) { - var i, cIdx; + var tagPromise = agcScriptTagHelper("https://www.gstatic.com/charts/loader.js"); + if (useBothLoaders) + tagPromise = tagPromise.then(function(){ return agcScriptTagHelper("https://www.google.com/jsapi");}); + var libraryPromise = tagPromise.then(scriptLoadCallback); - if (typeof ($scope.chart.formatters[formatType]) != 'undefined') { - if (!angular.equals($scope.chart.formatters[formatType], $scope.oldChartFormatters[formatType])) { - $scope.oldChartFormatters[formatType] = $scope.chart.formatters[formatType]; - $scope.formatters[formatType] = []; + return libraryPromise; + }; + this.$get.$inject = ["$rootScope", "$q", "agcScriptTagHelper"]; + } +})(); - if (formatType === 'color') { - for (cIdx = 0; cIdx < $scope.chart.formatters[formatType].length; cIdx++) { - var colorFormat = new formatClass(); +/* global angular */ +(function() { + angular.module("googlechart") + .factory("agcJsapiLoader", agcJsapiLoaderFactory); - for (i = 0; i < $scope.chart.formatters[formatType][cIdx].formats.length; i++) { - var data = $scope.chart.formatters[formatType][cIdx].formats[i]; + agcJsapiLoaderFactory.$inject = ["$log", "$rootScope", "$q", "agcScriptTagHelper", "googleChartApiConfig"]; + function agcJsapiLoaderFactory($log, $rootScope, $q, agcScriptTagHelper, googleChartApiConfig){ + $log.debug("[AGC] jsapi loader invoked."); + var apiReady = $q.defer(); + // Massage configuration as needed. + googleChartApiConfig.optionalSettings = googleChartApiConfig.optionalSettings || {}; - if (typeof (data.fromBgColor) != 'undefined' && typeof (data.toBgColor) != 'undefined') - colorFormat.addGradientRange(data.from, data.to, data.color, data.fromBgColor, data.toBgColor); - else - colorFormat.addRange(data.from, data.to, data.color, data.bgcolor); - } + var userDefinedCallback = googleChartApiConfig.optionalSettings.callback; - $scope.formatters[formatType].push(colorFormat) - } - } else { + var settings = { + callback: function() { + if (angular.isFunction(userDefinedCallback)) + userDefinedCallback.call(this); - for (i = 0; i < $scope.chart.formatters[formatType].length; i++) { - $scope.formatters[formatType].push(new formatClass( - $scope.chart.formatters[formatType][i]) - ); - } - } - } + $rootScope.$apply(function(){ + apiReady.resolve(google); + }); + } + }; + settings = angular.extend({}, googleChartApiConfig.optionalSettings, settings); - //apply formats to dataTable - for (i = 0; i < $scope.formatters[formatType].length; i++) { - if ($scope.chart.formatters[formatType][i].columnNum < dataTable.getNumberOfColumns()) - $scope.formatters[formatType][i].format(dataTable, $scope.chart.formatters[formatType][i].columnNum); - } + $log.debug("[AGC] Calling tag helper..."); + agcScriptTagHelper("//www.google.com/jsapi") + .then(function(){ + $log.debug("[AGC] Tag helper returned success."); + window.google.load('visualization', googleChartApiConfig.version || '1', settings); + }) + .catch(function(){ + $log.error("[AGC] Tag helper returned error. Script may have failed to load."); + apiReady.reject(); + }); + return apiReady.promise; + } +})(); - //Many formatters require HTML tags to display special formatting - if (formatType === 'arrow' || formatType === 'bar' || formatType === 'color') - $scope.chart.options.allowHtml = true; - } +/* global angular */ +(function(){ + angular.module("googlechart") + .provider("agcLibraryLoader", AgcLibraryLoaderProvider); + + AgcLibraryLoaderProvider.$inject = ["$injector"]; + + function AgcLibraryLoaderProvider($injector){ + + var DEFAULT_LOADER = "Jsapi"; + + this.$get = function(loader){ + return loader; + }; + + this.setLoader = function(loaderName){ + if ($injector.has(this.getProviderName(loaderName))) + this.$get.$inject = [this.getProviderName(loaderName)]; + else { + console.warn("[Angular-GoogleChart] Loader type \"" + loaderName + "\" doesn't exist. Defaulting to JSAPI loader."); + this.$get.$inject = [this.getProviderName(DEFAULT_LOADER)]; + } + }; + + this.getProviderName = function(loaderName){ + loaderName = loaderName.charAt(0).toUpperCase() + loaderName.slice(1); + return "agc" + loaderName + "Loader"; + }; + + this.setLoader(DEFAULT_LOADER); + } +})(); + +/* global angular */ +(function(){ + angular.module("googlechart") + .provider("agcNullLoader", AgcNullLoaderProvider); + + /** Fake loader strategy. Use this if you're loading the google charts library + * in some non-standard way. + */ + + function AgcNullLoaderProvider(){ + this._hasTrigger = false; + this._libraryOverride = null; + this._triggerFunction = (function(){ + // If the trigger function is called before $get, + // just act as if it was never fetched. + if (this._deferred) + this._deferred.resolve(this._libraryOverride || google); + else + this._hasTrigger = false; + }).bind(this); + this._deferred = null; + } + + AgcNullLoaderProvider.prototype.$get = function($q){ + this._deferred = $q.defer(); + + if (!this._hasTrigger) + this._deferred.resolve(this._libraryOverride || google); + + return this._deferred.promise; + }; + AgcNullLoaderProvider.prototype.$get.$inject = ["$q"]; + + AgcNullLoaderProvider.prototype.getTriggerFunction = function(){ + // Records that the trigger function was fetched. + // Will wait for it to be called to resolve. + // This is useful for manual, but deferred, loading of + // the google charts library. + this._hasTrigger = true; + return this._triggerFunction; + }; + + /** Forces angular-google-chart to load this object as the google library. + * Makes no checks to ensure that the object passed is compatible. Use + * at own risk. + */ + AgcNullLoaderProvider.prototype.overrideLibrary = function(library){ + this._libraryOverride = library; + }; +})(); + +(function(){ + angular.module('googlechart') + .directive('agcOnClick', onClickDirective); + + function onClickDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['args', 'chart', 'chartWrapper']; + function callback(args, chart, chartWrapper){ + scope.$apply(function (){ + scope.$eval(attrs.agcOnClick, {args: args, chart: chart, chartWrapper: chartWrapper}); + }); + } + googleChartController.registerChartListener('click', callback, this); + } + }; + } +})(); + +/* global angular */ +(function(){ + angular.module('googlechart') + .directive('agcOnError', onErrorDirective); + function onErrorDirective(){ + return{ + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['chartWrapper', 'chart', 'args']; + function callback(chartWrapper, chart, args){ + var returnValues = { + chartWrapper: chartWrapper, + chart: chart, + args: args, + error: args[0], + err: args[0], + id: args[0].id, + message: args[0].message + }; + scope.$apply(function(){ + scope.$eval(attrs.agcOnError, returnValues); + }); + } + googleChartController.registerWrapperListener('error', callback, this); + } + }; + } +})(); +/* global angular */ + +(function(){ + angular.module('googlechart') + .directive('agcOnMouseout', agcOnMouseoutDirective); + + function agcOnMouseoutDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['args', 'chart', 'chartWrapper']; + function callback(args, chart, chartWrapper){ + var returnParams = { + chartWrapper: chartWrapper, + chart: chart, + args: args, + column: args[0].column, + row: args[0].row + }; + scope.$apply(function () { + scope.$eval(attrs.agcOnMouseout, returnParams); + }); + } + googleChartController.registerChartListener('onmouseout', callback, this); + } + }; + } +})(); +/* global angular */ + +(function(){ + angular.module('googlechart') + .directive('agcOnMouseover', agcOnMouseoverDirective); + + function agcOnMouseoverDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['args', 'chart', 'chartWrapper']; + function callback(args, chart, chartWrapper){ + var returnParams = { + chartWrapper: chartWrapper, + chart: chart, + args: args, + column: args[0].column, + row: args[0].row + }; + scope.$apply(function () { + scope.$eval(attrs.agcOnMouseover, returnParams); + }); + } + googleChartController.registerChartListener('onmouseover', callback, this); + } + }; + } +})(); +/* global angular */ + +(function(){ + angular.module('googlechart') + .directive('agcOnRangeChange', agcOnRangeChangeDirective); + + function agcOnRangeChangeDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['args', 'chart', 'chartWrapper']; + function callback(args, chart, chartWrapper){ + var returnParams = { + chartWrapper: chartWrapper, + chart: chart, + args: args, + start: args[0].start, + end: args[0].end + }; + scope.$apply(function () { + scope.$eval(attrs.agcOnRangeChange, returnParams); + }); + } + googleChartController.registerChartListener('rangechange', callback, this); + } + }; + } +})(); + +/* global angular */ +(function(){ + angular.module('googlechart') + .directive('agcOnReady', onReadyDirective); + + function onReadyDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject=['chartWrapper']; + function callback(chartWrapper){ + scope.$apply(function (){ + scope.$eval(attrs.agcOnReady, {chartWrapper: chartWrapper}); + }); + } + googleChartController.registerWrapperListener('ready', callback, this); + } + }; + } +})(); +/* global angular */ +(function(){ + angular.module('googlechart') + .directive('agcOnSelect', onSelectDirective); + + function onSelectDirective(){ + return { + restrict: 'A', + scope: false, + require: 'googleChart', + link: function(scope, element, attrs, googleChartController){ + callback.$inject = ['chartWrapper', 'chart']; + function callback(chartWrapper, chart){ + var selectEventRetParams = { selectedItems: chart.getSelection() }; + // This is for backwards compatibility for people using 'selectedItem' that only wanted the first selection. + selectEventRetParams.selectedItem = selectEventRetParams.selectedItems[0]; + selectEventRetParams.chartWrapper = chartWrapper; + selectEventRetParams.chart = chart; + scope.$apply(function () { + scope.$eval(attrs.agcOnSelect, selectEventRetParams); + }); + } + googleChartController.registerWrapperListener('select', callback, this); + } + }; + } +})(); +/* global angular */ +(function() { + angular.module("googlechart") + .factory("agcScriptTagHelper", agcScriptTagHelperFactory); + + agcScriptTagHelperFactory.$inject = ["$q", "$document"]; + function agcScriptTagHelperFactory($q, $document) + { + /** Add a script tag to the document's head section and return an angular + * promise that resolves when the script has loaded. + */ + function agcScriptTagHelper(url) + { + var deferred = $q.defer(); + var head = $document.find('head'); + var script = angular.element(''); + + script.attr('type', 'text/javascript'); + + script.on('load', onLoad); + script.on('error', onError); + + script.attr('src', url); + + // This: head.append(script); + // Adds the tag, but event handles don't work. + // Workaround is to add element with native appendChild(). + head[0].appendChild(script[0]); + + function onLoad() { + deferred.resolve(); + } + + function onError() { + deferred.reject(); + } + + return deferred.promise; + } + + return agcScriptTagHelper; + } +})(); + +/* global angular, google */ +/* jshint -W072 */ +(function(){ + angular.module('googlechart') + .directive('googleChart', googleChartDirective); + + googleChartDirective.$inject = []; + + function googleChartDirective() { + + return { + restrict: 'A', + scope: false, + controller: 'GoogleChartController' + }; + } +})(); + +/* global angular */ +(function(){ + angular.module('googlechart') + .value('googleChartApiConfig', { + version: '1', + optionalSettings: { + packages: ['corechart'] + } + }); +})(); +/* global angular */ +(function(){ + angular.module('googlechart') + .factory('googleChartApiPromise', googleChartApiPromiseFactory); + + googleChartApiPromiseFactory.$inject = ['agcLibraryLoader']; + + /** Here for backward-compatibility only. */ + function googleChartApiPromiseFactory(agcLibraryLoader) { + return agcLibraryLoader; + } +})(); + +/* global angular */ +(function() { + angular.module('googlechart') + .factory('GoogleChartService', GoogleChartServiceFactory); + + GoogleChartServiceFactory.$inject = ['agcLibraryLoader', '$injector', '$q', 'FormatManager']; + + function GoogleChartServiceFactory(agcLibraryLoader, $injector, $q, FormatManager) { + function GoogleChartService() { + var self = this; + self.draw = draw; + self.getChartWrapper = getChartWrapper; + self.getData = getData; + self.getElement = getElement; + self.getOption = getOption; + self.getOptions = getOptions; + self.getView = getView; + self.getReadyPromise = getReadyPromise; + self.isApiReady = isApiReady; + self.registerChartListener = registerChartListener; + self.registerServiceListener = registerServiceListener; + self.registerWrapperListener = registerWrapperListener; + self.setData = setData; + self.setElement = setElement; + self.setOption = setOption; + self.setOptions = setOptions; + self.setup = setup; + self.setView = setView; + + var $google, + _libraryPromise, + _apiReady, + _chartWrapper, + _element, + _chartType, + _data, + _view, + _options, + _formatters, + _innerVisualization, + _formatManager, + _needsUpdate = true, + _customFormatters, + _serviceDeferred, + serviceListeners = {}, + wrapperListeners = {}, + chartListeners = {}; + + _init(); + + function _activateServiceEvent(eventName) { + var i; + if (angular.isArray(serviceListeners[eventName])) { + for (i = 0; i < serviceListeners[eventName].length; i++) { + serviceListeners[eventName][i](); } + } + } - function draw() { - if (!draw.triggered && ($scope.chart != undefined)) { - draw.triggered = true; - $timeout(function () { - if (typeof ($scope.formatters) === 'undefined') - $scope.formatters = {}; - - var dataTable; - if ($scope.chart.data instanceof google.visualization.DataTable) - dataTable = $scope.chart.data; - else if (angular.isArray($scope.chart.data)) - dataTable = google.visualization.arrayToDataTable($scope.chart.data); - else - dataTable = new google.visualization.DataTable($scope.chart.data, 0.5); - - if (typeof ($scope.chart.formatters) != 'undefined') { - applyFormat("number", google.visualization.NumberFormat, dataTable); - applyFormat("arrow", google.visualization.ArrowFormat, dataTable); - applyFormat("date", google.visualization.DateFormat, dataTable); - applyFormat("bar", google.visualization.BarFormat, dataTable); - applyFormat("color", google.visualization.ColorFormat, dataTable); - } + function _apiLoadFail(reason) { + // Not sure what to do if this does happen. + // Post your suggestions in the issues tracker at + // https://github.com/angular-google-chart/angular-google-chart/ + return reason; + } - var customFormatters = $scope.chart.customFormatters; - if (typeof (customFormatters) != 'undefined') { - for (var name in customFormatters) { - applyFormat(name, customFormatters[name], dataTable); - } - } + function _apiLoadSuccess(g) { + $google = g; + _apiReady = true; + _serviceDeferred.resolve(); + return g; + } + + + function _continueSetup() { + if (!angular.isDefined(_chartWrapper)) { + _chartWrapper = new $google.visualization.ChartWrapper({ + chartType: _chartType, + dataTable: _data, + view: _view, + options: _options, + containerId: _element[0] + }); + _registerListenersWithGoogle(_chartWrapper, wrapperListeners); + } + else { + _chartWrapper.setChartType(_chartType); + _chartWrapper.setDataTable(_data); + _chartWrapper.setView(_view); + _chartWrapper.setOptions(_options); + } + + if (!_formatManager) { + _formatManager = new FormatManager($google); + } + + if (_formatManager.applyFormats(_chartWrapper.getDataTable(), + _formatters, _customFormatters).requiresHtml) { + _chartWrapper.setOption('allowHtml', true); + } + + _needsUpdate = false; + } + + // Credit for this solution: + // http://stackoverflow.com/a/20125572/3771976 + function _getSetDescendantProp(obj, desc, value) { + var arr = desc ? desc.split(".") : []; + + while (arr.length && obj) { + var comp = arr.shift(); + var match = new RegExp("(.+)\\[([0-9]*)\\]").exec(comp); + + if (value) { + if (obj[comp] === undefined) { + obj[comp] = {}; + } - var chartWrapperArgs = { - chartType: $scope.chart.type, - dataTable: dataTable, - view: $scope.chart.view, - options: $scope.chart.options, - containerId: $elm[0] - }; - - $scope.chartWrapper = new google.visualization.ChartWrapper(chartWrapperArgs); - google.visualization.events.addListener($scope.chartWrapper, 'ready', function () { - $scope.chart.displayed = true; - $scope.$apply(function (scope) { - scope.onReady({ chartWrapper: scope.chartWrapper }); - }); - }); - google.visualization.events.addListener($scope.chartWrapper, 'error', function (err) { - console.log("Chart not displayed due to error: " + err.message + ". Full error object follows."); - console.log(err); - }); - google.visualization.events.addListener($scope.chartWrapper, 'select', function () { - var selectedItem = $scope.chartWrapper.getChart().getSelection()[0]; - $scope.$apply(function () { - $scope.select({ selectedItem: selectedItem }); - }); - }); - - - $timeout(function () { - $elm.empty(); - $scope.chartWrapper.draw(); - draw.triggered = false; - }); - }, 0, true); + if (arr.length === 0) { + obj[comp] = value; } } - function drawAsync() { - googleChartApiPromise.then(function () { - draw(); - }) + obj = obj[comp]; + } + + return obj; + } + + function _handleReady() { + // When the chartWrapper is ready, check to see if the inner chart + // has changed. If it has, re-register listeners onto that chart. + if (_innerVisualization !== _chartWrapper.getChart()) { + _innerVisualization = _chartWrapper.getChart(); + _registerListenersWithGoogle(_innerVisualization, chartListeners); + } + } + + function _init() { + _apiReady = false; + _serviceDeferred = $q.defer(); + //keeps the resulting promise to chain on other actions + _libraryPromise = agcLibraryLoader + .then(_apiLoadSuccess) + .catch(_apiLoadFail); + + registerWrapperListener('ready', _handleReady, self); + } + + function _registerListener(listenerCollection, eventName, listenerFn, listenerObject) { + // This is the function that will be invoked by the charts API. + // Passing the wrapper function allows the use of DI for + // for the called function. + var listenerWrapper = function() { + var locals = { + chartWrapper: _chartWrapper, + chart: _chartWrapper.getChart(), + args: arguments + }; + $injector.invoke(listenerFn, listenerObject || this, locals); + }; + + if (angular.isDefined(listenerCollection) && angular.isObject(listenerCollection)) { + if (!angular.isArray(listenerCollection[eventName])) { + listenerCollection[eventName] = []; + } + listenerCollection[eventName].push(listenerWrapper); + return function() { + if (angular.isDefined(listenerWrapper.googleListenerHandle)) { + $google.visualization.events.removeListener(listenerWrapper.googleListenerHandle); + } + var fnIndex = listenerCollection[eventName].indexOf(listenerWrapper); + listenerCollection[eventName].splice(fnIndex, 1); + if (listenerCollection[eventName].length === 0) { + listenerCollection[eventName] = undefined; + } + }; + } + } + + function _registerListenersWithGoogle(eventSource, listenerCollection) { + for (var eventName in listenerCollection) { + if (listenerCollection.hasOwnProperty(eventName) && angular.isArray(listenerCollection[eventName])) { + for (var fnIterator = 0; fnIterator < listenerCollection[eventName].length; fnIterator++) { + if (angular.isFunction(listenerCollection[eventName][fnIterator])) { + listenerCollection[eventName][fnIterator].googleListenerHandle = + $google.visualization.events.addListener(eventSource, eventName, listenerCollection[eventName][fnIterator]); + } + } } } - }; - }]) + } - .run(['$rootScope', '$window', function ($rootScope, $window) { - angular.element($window).bind('resize', function () { - $rootScope.$emit('resizeMsg'); - }); - }]); + function _runDrawCycle() { + _activateServiceEvent('beforeDraw'); + _chartWrapper.draw(); + } + + /* + This function does this: + - waits for API to load, if not already loaded + - sets up ChartWrapper object (create or update) + - schedules timeout event to draw chart + */ + function draw() { + if (_needsUpdate) { + _libraryPromise = _libraryPromise.then(_continueSetup); + } + _libraryPromise = _libraryPromise.then(_runDrawCycle()); + } + + function getChartWrapper() { + // Most get functions on this interface return copies, + // this one should return reference so as to expose the + //chart api to users + return _chartWrapper; + } -})(document, window, window.angular); \ No newline at end of file + function getData() { + var data = _data || {}; + return angular.copy(data); + } + + function getElement() { + return _element; + } + + function getOption(name) { + var options = _options || {}; + return _getSetDescendantProp(options, name); + } + + function getOptions() { + var options = _options || {}; + return angular.copy(options); + } + + function getReadyPromise() { + return _serviceDeferred.promise; + } + + function getView() { + var view = _view || {}; + return angular.copy(view); + } + + function isApiReady() { + return _apiReady; + } + + function registerChartListener(eventName, listenerFn, listenerObject) { + return _registerListener(chartListeners, eventName, listenerFn, listenerObject); + } + + function registerServiceListener(eventName, listenerFn, listenerObject) { + return _registerListener(serviceListeners, eventName, listenerFn, listenerObject); + } + + function registerWrapperListener(eventName, listenerFn, listenerObject) { + return _registerListener(wrapperListeners, eventName, listenerFn, listenerObject); + } + + function setData(data) { + if (angular.isDefined(data)) { + _data = angular.copy(data); + _needsUpdate = true; + } + } + + function setElement(element) { + if (angular.isElement(element) && _element !== element) { + _element = element; + // clear out the chartWrapper because we're going to need a new one + _chartWrapper = null; + _needsUpdate = true; + } + } + + function setOption(name, value) { + _options = _options || {}; + _getSetDescendantProp(_options, name, angular.copy(value)); + _needsUpdate = true; + } + + function setOptions(options) { + if (angular.isDefined(options)) { + _options = angular.copy(options); + _needsUpdate = true; + } + } + + function setup(element, chartType, data, view, options, formatters, customFormatters) { + // Keep values if already set, + // can call setup() with nulls to keep + // existing values + _element = element || _element; + _chartType = chartType || _chartType; + _data = data || _data; + _view = view || _view; + _options = options || _options; + _formatters = formatters || _formatters; + _customFormatters = customFormatters || _customFormatters; + + _libraryPromise = _libraryPromise.then(_continueSetup); + } + + function setView(view) { + _view = angular.copy(view); + } + } + return GoogleChartService; + } +})(); \ No newline at end of file diff --git a/Mundialito/Client/src/Bets/BetsCenter.html b/Mundialito/Client/src/Bets/BetsCenter.html index 6a0151c..86a817f 100644 --- a/Mundialito/Client/src/Bets/BetsCenter.html +++ b/Mundialito/Client/src/Bets/BetsCenter.html @@ -2,7 +2,7 @@
- +
diff --git a/Mundialito/Client/src/Bets/BetsCenterCtrl.js b/Mundialito/Client/src/Bets/BetsCenterCtrl.js index 7419fab..4a3ca3c 100644 --- a/Mundialito/Client/src/Bets/BetsCenterCtrl.js +++ b/Mundialito/Client/src/Bets/BetsCenterCtrl.js @@ -11,16 +11,16 @@ angular.module('mundialitoApp').controller('BetsCenterCtrl', ['$scope', '$log', $timeout(loadUserBets,1000); } else { - BetsManager.getUserBets($scope.security.user.Username).then(function (bets) { - for(var i=0; i < bets.length; i++) { + $scope.getUserBetsPromise = BetsManager.getUserBets($scope.security.user.Username).then((bets) => { + for (var i = 0; i < bets.length; i++) { $scope.bets[bets[i].Game.GameId] = bets[i]; - $scope.bets[bets[i].Game.GameId].GameId = bets[i].Game.GameId + $scope.bets[bets[i].Game.GameId].GameId = bets[i].Game.GameId; } - for(var j=0; j < games.length; j++) { + for (var j = 0; j < games.length; j++) { if (!angular.isDefined($scope.bets[games[j].GameId])) { - $log.debug('BetsCenterCtrl: game ' + games[j].GameId + ' has not bet') - $scope.bets[games[j].GameId] = { BetId : -1, GameId : games[j].GameId}; + $log.debug('BetsCenterCtrl: game ' + games[j].GameId + ' has not bet'); + $scope.bets[games[j].GameId] = { BetId: -1, GameId: games[j].GameId }; } else { $scope.bets[$scope.bets[games[j].GameId]] = bets[i]; diff --git a/Mundialito/Client/src/Constants.js b/Mundialito/Client/src/Constants.js index 3545723..10ebbba 100644 --- a/Mundialito/Client/src/Constants.js +++ b/Mundialito/Client/src/Constants.js @@ -16,7 +16,7 @@ angular.module('mundialitoApp').constant('Constants', { field: 'Points', displayName: 'Points', resizable: true, minWidth: 45, maxWidth: 75}, { field: 'GeneralBet.WinningTeam', displayName: 'Team', resizable: false, maxWidth: 45, cellTemplate: '
' }, { field: 'GeneralBet.GoldenBootPlayer', displayName: 'Player', resizable: false, minWidth: 50, maxWidth: 50 }, - { field: 'TotalMarks', displayName: 'Total Marks', resizable: true }, + { field: 'Marks', displayName: 'Marks', resizable: true }, { field: 'Results', displayName: 'Results', resizable: true }, { field: 'YellowCards', displayName: 'Yellow Cards Marks', maxWidth: 55, resizable: false, headerCellTemplate: '
' }, { field: 'Corners', displayName: 'Corners Marks', maxWidth: 55, resizable: false, headerCellTemplate: '
' },, diff --git a/Mundialito/Client/src/Dashboard/Dashboard.html b/Mundialito/Client/src/Dashboard/Dashboard.html index ce3090b..a5cf189 100644 --- a/Mundialito/Client/src/Dashboard/Dashboard.html +++ b/Mundialito/Client/src/Dashboard/Dashboard.html @@ -21,7 +21,7 @@
Pending Update Games
-
+
@@ -110,7 +110,7 @@
Open Games for Betting {{(games | filter:isOpenForBetting).length }}
-
+
-
+
@@ -174,7 +174,7 @@
diff --git a/Mundialito/Client/src/Dashboard/DashboardCtrl.js b/Mundialito/Client/src/Dashboard/DashboardCtrl.js index 6ed7e06..9934ea4 100644 --- a/Mundialito/Client/src/Dashboard/DashboardCtrl.js +++ b/Mundialito/Client/src/Dashboard/DashboardCtrl.js @@ -29,7 +29,7 @@ angular.module('mundialitoApp').controller('DashboardCtrl', ['$scope', '$log', ' $scope.playersDic[players[i].PlayerId] = players[i]; } - GamesManager.loadAllGames().then((games) => { + $scope.getGamesPromise = GamesManager.loadAllGames().then((games) => { $scope.games = games; $scope.resultsDic = {}; $scope.marksDic = {}; @@ -136,7 +136,7 @@ angular.module('mundialitoApp').controller('DashboardCtrl', ['$scope', '$log', ' }); } }); - UsersManager.loadAllUsers().then((users) => { + $scope.getUsersPromise = UsersManager.loadAllUsers().then((users) => { $scope.users = users; $scope.users.forEach((user) => { if (angular.isDefined(user.GeneralBet)) { diff --git a/Mundialito/Client/src/Games/Game.html b/Mundialito/Client/src/Games/Game.html index 777de1f..bc7341f 100644 --- a/Mundialito/Client/src/Games/Game.html +++ b/Mundialito/Client/src/Games/Game.html @@ -42,7 +42,7 @@
+
Edit Game Details
@@ -130,7 +130,7 @@
-
+
Teams Form
-
+
You haven't placed a bet on this game and it is already closed for betting @@ -249,7 +249,7 @@
-
+
Bets HighLights
@@ -362,7 +362,7 @@
-
+
Other Users Bets
@@ -410,7 +410,7 @@
-
+
Simulate Game
diff --git a/Mundialito/Client/src/Games/GameCtrl.js b/Mundialito/Client/src/Games/GameCtrl.js index 1bd2744..3e38a76 100644 --- a/Mundialito/Client/src/Games/GameCtrl.js +++ b/Mundialito/Client/src/Games/GameCtrl.js @@ -25,7 +25,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const }); if (!$scope.game.IsOpen) { - BetsManager.getGameBets($scope.game.GameId).then((data) => { + $scope.getGameBetsPromsie = BetsManager.getGameBets($scope.game.GameId).then((data) => { $log.debug("GameCtrl: get game bets" + angular.toJson(data)); $scope.gameBets = data; var chart1 = {}; @@ -47,7 +47,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const ['2', mark2] ]; $scope.chart = chart1; - UsersManager.loadAllUsers().then((users) => { + $scope.getUsersPromise = UsersManager.loadAllUsers().then((users) => { $scope.usersMap = new Map(); users.forEach((obj) => { $scope.usersMap.set(obj.Username, obj); @@ -76,7 +76,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const delete game.Stadium.Games; } $scope.game.IntegrationsData = keyValueEditorUtils.mapEntries(keyValueEditorUtils.compactEntries($scope.integrationsData)); - $scope.game.update().then((res) => { + $scope.updateGamePromise = $scope.game.update().then((res) => { Alert.success('Game was updated successfully'); GamesManager.setGame(res.data); }).catch((err) => { @@ -87,7 +87,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.updateBet = () => { if ($scope.userBet.BetId !== -1) { - $scope.userBet.update().then((data) => { + $scope.updateBetPromise = $scope.userBet.update().then((data) => { Alert.success('Bet was updated successfully'); BetsManager.setBet(data); }).catch((err) => { @@ -109,7 +109,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.simulateGame = () => { $log.debug('GameCtrl: simulating game'); - GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => { + $scope.simulateGamePromise = GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => { $scope.users = data; $scope.users.forEach((user) => { if (angular.isDefined(user.GeneralBet)) { @@ -170,7 +170,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.$watch('simulatedGame', () => { $scope.users = undefined }, true); $scope.loadTeamsForm = () => { $scope.teamsForm = {}; - GamesManager.getTeamGames($scope.game.HomeTeam.TeamId).then((res) => { + $scope.getTeamGamesPromise = GamesManager.getTeamGames($scope.game.HomeTeam.TeamId).then((res) => { storeTeamForm(res, $scope.game.HomeTeam.TeamId); }).catch((err) => { Alert.error('Failed to get teams form'); diff --git a/Mundialito/Client/src/Games/Games.html b/Mundialito/Client/src/Games/Games.html index 6487884..7c75ce1 100644 --- a/Mundialito/Client/src/Games/Games.html +++ b/Mundialito/Client/src/Games/Games.html @@ -1,6 +1,6 @@ 
-
+
@@ -18,7 +18,7 @@
-
+
Add New Game
@@ -71,7 +71,7 @@
-
+
Pending Update Games
diff --git a/Mundialito/Client/src/Games/GamesCtrl.js b/Mundialito/Client/src/Games/GamesCtrl.js index df14b14..0082a85 100644 --- a/Mundialito/Client/src/Games/GamesCtrl.js +++ b/Mundialito/Client/src/Games/GamesCtrl.js @@ -16,7 +16,7 @@ angular.module('mundialitoApp').controller('GamesCtrl', ['$scope','$log','GamesM }; $scope.saveNewGame = function() { - GamesManager.addGame($scope.newGame).then(function(data) { + $scope.addGamePromise = GamesManager.addGame($scope.newGame).then(function(data) { Alert.success('Game was added successfully'); $scope.newGame = GamesManager.getEmptyGameObject(); $scope.games.push(data); @@ -31,7 +31,7 @@ angular.module('mundialitoApp').controller('GamesCtrl', ['$scope','$log','GamesM if ((angular.isDefined(game.Stadium.Games)) && (game.Stadium.Games != null)) { delete game.Stadium.Games; } - game.update().then((data) => { + $scope.editGamePromise = game.update().then((data) => { Alert.success('Game was updated successfully'); GamesManager.setGame(data); }); diff --git a/Mundialito/Client/src/Stadiums/Stadium.html b/Mundialito/Client/src/Stadiums/Stadium.html index 23ba1e9..7baff96 100644 --- a/Mundialito/Client/src/Stadiums/Stadium.html +++ b/Mundialito/Client/src/Stadiums/Stadium.html @@ -10,7 +10,7 @@



-
+
Edit Stadium Details
@@ -25,7 +25,7 @@

-
+
Games in {{stadium.Name}}
diff --git a/Mundialito/Client/src/Stadiums/StadiumCtrl.js b/Mundialito/Client/src/Stadiums/StadiumCtrl.js index 68122ce..1f31072 100644 --- a/Mundialito/Client/src/Stadiums/StadiumCtrl.js +++ b/Mundialito/Client/src/Stadiums/StadiumCtrl.js @@ -3,13 +3,13 @@ angular.module('mundialitoApp').controller('StadiumCtrl', ['$scope', '$log', 'St $scope.stadium = stadium; $scope.showEditForm = false; - GamesManager.getStadiumGames($scope.stadium.StadiumId).then((data) => { + $scope.getStadiumGamesPromise = GamesManager.getStadiumGames($scope.stadium.StadiumId).then((data) => { $log.debug('StadiumCtrl: Got games of stadium'); $scope.games = data; }); $scope.updateStadium = () => { - $scope.stadium.update().then(() => { + $scope.editStadiumPromise = $scope.stadium.update().then(() => { Alert.success('Stadium was updated successfully'); }); }; diff --git a/Mundialito/Client/src/Stadiums/Stadiums.html b/Mundialito/Client/src/Stadiums/Stadiums.html index ceda82d..844d027 100644 --- a/Mundialito/Client/src/Stadiums/Stadiums.html +++ b/Mundialito/Client/src/Stadiums/Stadiums.html @@ -1,6 +1,6 @@
-
+
{{stadium.Name}}, {{stadium.City}} (Capacity: {{stadium.Capacity | number }}) diff --git a/Mundialito/Client/src/Stadiums/StadiumsCtrl.js b/Mundialito/Client/src/Stadiums/StadiumsCtrl.js index b2bd2c6..f65b6cb 100644 --- a/Mundialito/Client/src/Stadiums/StadiumsCtrl.js +++ b/Mundialito/Client/src/Stadiums/StadiumsCtrl.js @@ -4,11 +4,11 @@ angular.module('mundialitoApp').controller('StadiumsCtrl', ['$scope', '$log', 'S $scope.showNewStadium = false; $scope.newStadium = null; - $scope.addNewStadium = function () { + $scope.addNewStadium = () => { $scope.newStadium = StadiumsManager.getEmptyStadiumObject(); }; - $scope.saveNewStadium = function() { + $scope.saveNewStadium = () => { StadiumsManager.addStadium($scope.newStadium).then((data) => { Alert.success('Stadium was added successfully'); $scope.newStadium = null; @@ -16,13 +16,13 @@ angular.module('mundialitoApp').controller('StadiumsCtrl', ['$scope', '$log', 'S }); }; - $scope.deleteStadium = function(stadium) { + $scope.deleteStadium = (stadium) => { var scope = stadium; stadium.delete().then(() => { Alert.success('Stadium was deleted successfully'); $scope.stadiums.splice($scope.stadiums.indexOf(scope), 1); - }) + }); }; - $scope.schema = StadiumsManager.getStaidumSchema(); + $scope.schema = StadiumsManager.getStaidumSchema(); }]); \ No newline at end of file diff --git a/Mundialito/Client/src/Teams/Team.html b/Mundialito/Client/src/Teams/Team.html index 62b3002..63acaa0 100644 --- a/Mundialito/Client/src/Teams/Team.html +++ b/Mundialito/Client/src/Teams/Team.html @@ -16,7 +16,7 @@
+
Game Home Score
+
@@ -32,7 +32,7 @@
-
+
Users General Bets
@@ -79,7 +79,7 @@
-
+
Private Key Generator
diff --git a/Mundialito/Client/src/Users/ManageAppCtrl.js b/Mundialito/Client/src/Users/ManageAppCtrl.js index 50f3cab..75eb8bb 100644 --- a/Mundialito/Client/src/Users/ManageAppCtrl.js +++ b/Mundialito/Client/src/Users/ManageAppCtrl.js @@ -14,23 +14,23 @@ angular.module('mundialitoApp').controller('ManageAppCtrl', ['$scope', '$log', ' $scope.playersDic[players[i].PlayerId] = players[i]; } - $scope.deleteUser = function(user) { + $scope.deleteUser = (user) => { var scope = user; - user.delete().then(() => { + $scope.deleteUserPromise = user.delete().then(() => { Alert.success('User was deleted successfully'); $scope.users.splice($scope.users.indexOf(scope), 1); - }) + }); }; $scope.resolveBet = function(bet) { - bet.resolve().then(() => { + $scope.resolveGeneralBetPromise = bet.resolve().then(() => { Alert.success('General bet was resolved successfully'); }); }; $scope.generateKey = function() { $scope.privateKey.key = ''; - UsersManager.generatePrivateKey($scope.privateKey.email).then(function(data) { + $scope.generatePrivateKeyPromisd = UsersManager.generatePrivateKey($scope.privateKey.email).then(function(data) { $log.debug('ManageAppCtrl: got private key ' + data); $scope.privateKey.key = data; }); diff --git a/Mundialito/Client/src/Users/UserProfile.html b/Mundialito/Client/src/Users/UserProfile.html index 42f36d4..5018a28 100644 --- a/Mundialito/Client/src/Users/UserProfile.html +++ b/Mundialito/Client/src/Users/UserProfile.html @@ -17,7 +17,7 @@

{{profileUser.Name}} Profile

-
+
Social
@@ -60,10 +60,10 @@

{{profileUser.Name}} Profile

-
+
Statistics
-
+
Performance (Without General Bets)
@@ -123,6 +123,16 @@

{{profileUser.Name}} Profile

+
+
+
+
Progress
+
+
+
+
+
+
@@ -195,7 +205,7 @@

{{profileUser.Name}} Profile

{{generalBet.Points}} Points
-
+
diff --git a/Mundialito/Client/src/Users/UserProfileCtrl.js b/Mundialito/Client/src/Users/UserProfileCtrl.js index 8122b51..79feddb 100644 --- a/Mundialito/Client/src/Users/UserProfileCtrl.js +++ b/Mundialito/Client/src/Users/UserProfileCtrl.js @@ -34,7 +34,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } if ($scope.shoudLoadGeneralBet()) { - GeneralBetsManager.hasGeneralBet($scope.profileUser.Username).then((answer) => { + $scope.generalBetsPromise = GeneralBetsManager.hasGeneralBet($scope.profileUser.Username).then((answer) => { $log.debug('UserProfileCtrl: hasGeneralBet = ' + answer); if (answer === true) { GeneralBetsManager.getUserGeneralBet($scope.profileUser.Username).then((generalBet) => { @@ -58,7 +58,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', $scope.saveGeneralBet = () => { if (angular.isDefined($scope.generalBet.GeneralBetId)) { - $scope.generalBet.update().then(() => { + $scope.generalBetsPromise = $scope.generalBet.update().then(() => { Alert.success('General Bet was updated successfully'); }, () => { Alert.error('Failed to update General Bet, please try again'); @@ -66,7 +66,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } else { - GeneralBetsManager.addGeneralBet($scope.generalBet).then((data) => { + $scope.generalBetsPromise = GeneralBetsManager.addGeneralBet($scope.generalBet).then((data) => { $log.log('UserProfileCtrl: General Bet ' + data.GeneralBetId + ' was added'); $scope.generalBet = data; Alert.success('General Bet was added successfully'); @@ -97,26 +97,81 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } }; - UsersManager.getSocial($scope.profileUser.Username).then((data) => { + $scope.getSocialPromise = UsersManager.getSocial($scope.profileUser.Username).then((data) => { $log.log('UserProfileCtrl: Got social response'); $scope.followers = data['followers']; $scope.followees = data['followees']; }); if ($scope.isLoggedUserProfile()) { - UsersManager.getMyStats().then((data) => { + $scope.getStatsPromise = UsersManager.getMyStats().then((data) => { $scope.performance = data; }).catch((err) => { $log.error('Failed to get user slef statistics', err); Alert.error('Failed to fetch user statistics: ' + err); }); } else { - UsersManager.getStats($scope.profileUser.Username).then((data) => { + $scope.getStatsPromise = UsersManager.getStats($scope.profileUser.Username).then((data) => { $scope.performance = data; }).catch((err) => { $log.error('Failed to get user statistics', err); Alert.error('Failed to fetch user statistics: ' + err); - }); + }); + } + if ($scope.security.user.Username === $scope.profileUser.Username) { + $scope.compareUsersPromise = UsersManager.getUserProgess($scope.security.user.Username); + } else { + $scope.compareUsersPromise = UsersManager.compareUsers($scope.security.user.Username, $scope.profileUser.Username); } - + $scope.compareUsersPromise.then((res) => { + if (res.length > 0) { + let users = _.map(res[0].Entries, (entry) => { return entry.Name }); + var cols = _.map(users, (user) => { + return { + id: user, + label: user, + type: "number" + } + }); + cols.unshift({ + id: "date", + label: "Date", + type: "date" + }); + let rows = _.map(res, (entry) => { + var res = { c: [{ + v: new Date(entry.Date), + }]}; + _.each(entry.Entries, (entry) => { + res.c.push({ + v: entry.Place, + }); + }); + return res; + }); + $scope.chart = { + type: "LineChart", + data: { + "cols": cols, + "rows": rows + }, + options: { + colors: ['#0000FF', '#009900', '#CC0000', '#DD9900'], + defaultColors: ['#0000FF', '#009900', '#CC0000', '#DD9900'], + displayExactValues: true, + is3D: true, + backgroundColor: { fill: 'transparent' }, + vAxis: { + title: "Place", + }, + hAxis: { + title: "Date" + } + } + }; + } + }).catch((err) => { + $log.error('Failed to compare users', err); + Alert.error('Failed to compare users: ' + err); + }); }]); diff --git a/Mundialito/Client/src/Users/UsersManager.js b/Mundialito/Client/src/Users/UsersManager.js index 4616dda..38bc4cd 100644 --- a/Mundialito/Client/src/Users/UsersManager.js +++ b/Mundialito/Client/src/Users/UsersManager.js @@ -81,6 +81,22 @@ angular.module('mundialitoApp').factory('UsersManager', ['$http', '$q', 'User', }); }, + compareUsers: (usera, userb) => { + $log.debug('UsersManager: will compare users: ' + usera + ' and ' + userb); + return $http.get('api/users/compare/' + usera + '/' + userb) + .then((res) => { + return res.data; + }); + }, + + getUserProgess: () => { + $log.debug('UsersManager: will get user progress'); + return $http.get('api/users/me/progress') + .then((res) => { + return res.data; + }); + }, + getMyStats: () => { $log.debug('UsersManager: will the stats of logged user'); return $http.get('api/stats/me', { tracker: 'getStats' }) diff --git a/Mundialito/Controllers/GamesController.cs b/Mundialito/Controllers/GamesController.cs index 8877261..e5ab8ab 100644 --- a/Mundialito/Controllers/GamesController.cs +++ b/Mundialito/Controllers/GamesController.cs @@ -96,7 +96,7 @@ public ActionResult> SimulateGame(int id, SimulateGameMod item.CardsMark = simulateGameModel.CardsMark; item.CornersMark = simulateGameModel.CornersMark; betsResolver.ResolveBets(item, betsRepository.GetGameBets(id)); - return Ok(tableBuilder.GetTable(userManager.Users, bets, generalBetsRepository.GetGeneralBets())); + return Ok(tableBuilder.GetTable(userManager.Users.Select((user) => new UserWithPointsModel(user)), bets, generalBetsRepository.GetGeneralBets())); } [HttpGet("{id}/Bets")] diff --git a/Mundialito/Controllers/StatsController.cs b/Mundialito/Controllers/StatsController.cs index 7803dbd..aa0260a 100644 --- a/Mundialito/Controllers/StatsController.cs +++ b/Mundialito/Controllers/StatsController.cs @@ -67,7 +67,7 @@ private async Task> CalcStats(MundialitoUser requestedU var games = (float)gamesRepository.GetGames().Count(); var users = (float)userManager.Users.Count(); var bets = betsRepository.GetBets().Where((bet) => bet.IsResolved()).ToList(); - var table = tableBuilder.GetTable(userManager.Users.ToList(), bets, generalBetsRepository.GetGeneralBets()); + var table = tableBuilder.GetTable(userManager.Users.Select((user) => new UserWithPointsModel(user)), bets, generalBetsRepository.GetGeneralBets()); var leader = await userManager.FindByNameAsync(table.First().Username); if (leader == null) return StatusCode(500); diff --git a/Mundialito/Controllers/UsersController.cs b/Mundialito/Controllers/UsersController.cs index 5a6c3be..c15f676 100644 --- a/Mundialito/Controllers/UsersController.cs +++ b/Mundialito/Controllers/UsersController.cs @@ -28,7 +28,7 @@ public class UsersController : ControllerBase private readonly TableBuilder tableBuilder; private readonly MundialitoDbContext mundialitoDbContext; private readonly ILogger logger; - + public UsersController(ILogger logger, IActionLogsRepository actionLogsRepository, IHttpContextAccessor httpContextAccessor, UserManager userManager, IBetsRepository betsRepository, IDateTimeProvider dateTimeProvider, TournamentTimesUtils tournamentTimesUtils, IGeneralBetsRepository generalBetsRepository, TableBuilder tableBuilder, MundialitoDbContext mundialitoDbContext) { this.actionLogsRepository = actionLogsRepository; @@ -152,6 +152,15 @@ public async Task> GetMe() return await GetUserByUsername(httpContextAccessor.HttpContext?.User.Identity.Name); } + [HttpGet("me/progress")] + public async Task>> Progress() + { + var user = await userManager.FindByNameAsync(httpContextAccessor.HttpContext?.User.Identity.Name); + if (user == null) + return Unauthorized(new ErrorMessage { Message = "User not found" }); + return Ok(CompareUsers(new List { user })); + } + [HttpGet("GeneratePrivateKey/{email}")] [Authorize(Roles = "Admin")] public IActionResult GeneratePrivateKey(string email) @@ -199,6 +208,62 @@ public async Task DeleteUser(string id) return Ok(); } + [HttpGet("compare/{usera}/{userb}")] + public async Task>> CompareUsers(string usera, string userb) + { + var userA = await userManager.FindByNameAsync(usera); + var userB = await userManager.FindByNameAsync(userb); + if (userA == null || userB == null) + return NotFound(new ErrorMessage { Message = "User not found" }); + return Ok(CompareUsers(new List { userA, userB })); + } + + private IEnumerable CompareUsers(List users) + { + var allUsers = userManager.Users.Select((user) => new UserWithPointsModel(user)).ToList(); + var allBets = betsRepository.GetBets().Where(bet => bet.IsResolved()).ToList(); + var betsByDate = allBets.GroupBy(bet => bet.Game.Date.DayOfYear).ToDictionary(group => group.Key, group => group.ToList()).OrderBy(bet => bet.Key); + var resEntries = new List(); + foreach (var bets in betsByDate) + { + allUsers = tableBuilder.GetTable(allUsers, bets.Value, []).ToList(); + var userEntries = users.Select(user => allUsers.FirstOrDefault(tableUser => tableUser.Id == user.Id)).Where(entry => entry != null).ToList(); + if (userEntries.Count > 0) + { + logger.LogInformation("Adding compare entry for date {} with date {}", bets.Key, new DateTime(DateTime.Now.Year, 1, 1).AddDays(bets.Key - 1)); + var compareModel = new UserCompareModel() + { + Date = new DateTime(DateTime.Now.Year, 1, 1).AddDays(bets.Key - 1), + Entries = userEntries.Select(userEntry => new CompareEntry() + { + Name = userEntry.Name, + Place = int.Parse(userEntry.Place) + }).ToList() + }; + resEntries.Add(compareModel); + } + } + var generalBets = generalBetsRepository.GetGeneralBets(); + allUsers = tableBuilder.GetTable(allUsers, [], generalBets.Where(bet => users.Select(user => user.Id).Contains(bet.User.Id)).ToList()).ToList(); + var finalTable = tableBuilder.GetTable(allUsers, [], generalBets); + var finalUserEntries = users.Select(user => finalTable.FirstOrDefault(tableUser => tableUser.Id == user.Id)).Where(entry => entry != null).ToList(); + if (finalUserEntries.Count > 0) + { + var finalCompareModel = new UserCompareModel() + { + Date = new DateTime(DateTime.Now.Year, 1, 1).AddDays(betsByDate.Last().Key), + Entries = finalUserEntries.Select(userEntry => new CompareEntry() + { + Name = userEntry.Name, + Place = int.Parse(userEntry.Place) + }).ToList() + }; + resEntries.Add(finalCompareModel); + } + + return resEntries; + } + private async Task> IsAdmin(UserModel param) { var user = await userManager.FindByIdAsync(param.Id); @@ -223,7 +288,7 @@ private void AddLog(ActionType actionType, string message) private IEnumerable GetTableDetails(IEnumerable users) { - return tableBuilder.GetTable(users, betsRepository.GetBets().ToList(), generalBetsRepository.GetGeneralBets().Where(bet => users.Select(user => user.Id).Contains(bet.User.Id)).ToList()); + return tableBuilder.GetTable(users.Select((user) => new UserWithPointsModel(user)), betsRepository.GetBets().ToList(), generalBetsRepository.GetGeneralBets().Where(bet => users.Select(user => user.Id).Contains(bet.User.Id)).ToList()); } } diff --git a/Mundialito/Logic/BetValidator.cs b/Mundialito/Logic/BetValidator.cs index 0c33e1f..da5f93c 100644 --- a/Mundialito/Logic/BetValidator.cs +++ b/Mundialito/Logic/BetValidator.cs @@ -1,7 +1,6 @@ using Mundialito.DAL.ActionLogs; using Mundialito.DAL.Bets; using Mundialito.DAL.Games; -using System.Diagnostics; namespace Mundialito.Logic; @@ -98,7 +97,7 @@ public void ValidateDeleteBet(int betId, string userId) } } - private void AddLog(ActionType actionType, String message) + private void AddLog(ActionType actionType, string message) { try { diff --git a/Mundialito/Logic/TableBuilder.cs b/Mundialito/Logic/TableBuilder.cs index 1e225f4..b428ccd 100644 --- a/Mundialito/Logic/TableBuilder.cs +++ b/Mundialito/Logic/TableBuilder.cs @@ -18,9 +18,9 @@ public TableBuilder(IDateTimeProvider dateTimeProvider, TournamentTimesUtils tou _tournamentTimesUtils = tournamentTimesUtils; } - public IEnumerable GetTable(IEnumerable allUsers, IEnumerable bets, IEnumerable generalBets) + public IEnumerable GetTable(IEnumerable allUsers, IEnumerable bets, IEnumerable generalBets) { - var users = allUsers.ToDictionary(user => user.Id, user => new UserWithPointsModel(user)); + var users = allUsers.ToDictionary(user => user.Id, user => user); var yesterdayPlaces = new Dictionary(users.Count); bets.Where(bet => users.ContainsKey(bet.User.Id)).Where(bet => !bet.IsOpenForBetting(_dateTimeProvider.UTCNow)).ToList().ForEach(bet => users[bet.User.Id].AddBet(new BetViewModel(bet, _dateTimeProvider.UTCNow))); bets.Where(bet => users.ContainsKey(bet.User.Id)).Where(bet => !bet.IsOpenForBetting(_dateTimeProvider.UTCNow)).Where(bet => bet.Game.Date < _dateTimeProvider.UTCNow.Subtract(TimeSpan.FromDays(1))).ToList().ForEach(bet => users[bet.User.Id].YesterdayPoints += bet.Points.HasValue ? bet.Points.Value : 0); @@ -42,7 +42,6 @@ public IEnumerable GetTable(IEnumerable all res[i].Place = (i + 1).ToString(); var diff = yesterdayPlaces[res[i].Id] - (i + 1); res[i].PlaceDiff = string.Format("{0}{1}", diff > 0 ? "+" : string.Empty, diff); - res[i].TotalMarks = res[i].Marks + res[i].Results; } return res; } diff --git a/Mundialito/Models/UserModel.cs b/Mundialito/Models/UserModel.cs index cace0f6..4e1477d 100644 --- a/Mundialito/Models/UserModel.cs +++ b/Mundialito/Models/UserModel.cs @@ -1,3 +1,4 @@ +using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using Mundialito.DAL.Accounts; @@ -41,9 +42,6 @@ public UserModel(MundialitoUser user) [JsonPropertyName("Marks")] public int Marks { get; private set; } - [JsonPropertyName("TotalMarks")] - public int TotalMarks { get; set; } - [JsonPropertyName("Corners")] public int Corners { get; private set; } @@ -67,6 +65,7 @@ public void AddBet(BetViewModel bet) if (bet.ResultWin) { Results++; + Marks++; } else if (bet.GameMarkWin) { @@ -94,57 +93,30 @@ public UserWithPointsModel(MundialitoUser user) : base(user) [JsonPropertyName("PlaceDiff")] public string PlaceDiff { get; set; } - - [JsonPropertyName("Points")] - public int Points { get; set; } - + [JsonPropertyName("YesterdayPoints")] public int YesterdayPoints { get; set; } +} - [JsonPropertyName("Results")] - public int Results { get; private set; } - - [JsonPropertyName("Marks")] - public int Marks { get; private set; } - - [JsonPropertyName("TotalMarks")] - public int TotalMarks { get; set; } - - [JsonPropertyName("Corners")] - public int Corners { get; private set; } - [JsonPropertyName("GeneralBet")] - public GeneralBetViewModel? GeneralBet { get; set; } +public class UserCompareModel +{ + [Required] + [JsonPropertyName("Date")] + public required DateTime Date { get; set; } - [JsonPropertyName("YellowCards")] - public int YellowCards { get; private set; } + [Required] + [JsonPropertyName("Entries")] + public required List Entries { get; set; } +} - public void SetGeneralBet(GeneralBetViewModel generalBet) - { - GeneralBet = generalBet; - if (generalBet.IsResolved) - { - Points += generalBet.Points; - } - } +public class CompareEntry +{ + [Required] + [JsonPropertyName("Name")] + public required string Name { get; set; } - public void AddBet(BetViewModel bet) - { - if (bet.IsResolved) - { - Points += bet.Points; - if (bet.ResultWin) - { - Results++; - } - else if (bet.GameMarkWin) - { - Marks++; - } - if (bet.CardsWin) - YellowCards++; - if (bet.CornersWin) - Corners++; - } - } + [Required] + [JsonPropertyName("Place")] + public required int Place { get; set; } } \ No newline at end of file diff --git a/Mundialito/gulpfile.js b/Mundialito/gulpfile.js index 3117106..e9b509d 100644 --- a/Mundialito/gulpfile.js +++ b/Mundialito/gulpfile.js @@ -4,7 +4,7 @@ const cleanCss = require('gulp-minify-css'); const minify = require('gulp-minify'); const allCss = [ - "Client/css/angular-busy.min.css", + "Client/css/angular-busy.css", "Client/css/angular-key-value-editor.css", "Client/css/bootstrap.css", "Client/css/bootstrap-theme.css", diff --git a/Mundialito/wwwroot/App/Bets/BetsCenter.html b/Mundialito/wwwroot/App/Bets/BetsCenter.html index a0dd03f..a298491 100644 --- a/Mundialito/wwwroot/App/Bets/BetsCenter.html +++ b/Mundialito/wwwroot/App/Bets/BetsCenter.html @@ -2,7 +2,7 @@
-
Name Email
+
diff --git a/Mundialito/wwwroot/App/Dashboard/Dashboard.html b/Mundialito/wwwroot/App/Dashboard/Dashboard.html index ce3090b..a5cf189 100644 --- a/Mundialito/wwwroot/App/Dashboard/Dashboard.html +++ b/Mundialito/wwwroot/App/Dashboard/Dashboard.html @@ -21,7 +21,7 @@
Pending Update Games
-
+
@@ -110,7 +110,7 @@
Open Games for Betting {{(games | filter:isOpenForBetting).length }}
-
+
-
+
@@ -174,7 +174,7 @@
diff --git a/Mundialito/wwwroot/App/Games/Game.html b/Mundialito/wwwroot/App/Games/Game.html index c582fee..915ad1d 100644 --- a/Mundialito/wwwroot/App/Games/Game.html +++ b/Mundialito/wwwroot/App/Games/Game.html @@ -42,7 +42,7 @@
+
Edit Game Details
@@ -130,7 +130,7 @@
-
+
Teams Form
-
+
You haven't placed a bet on this game and it is already closed for betting @@ -249,7 +249,7 @@
-
+
Bets HighLights
@@ -362,7 +362,7 @@
-
+
Other Users Bets
@@ -410,7 +410,7 @@
-
+
Simulate Game
diff --git a/Mundialito/wwwroot/App/Games/Games.html b/Mundialito/wwwroot/App/Games/Games.html index 92cb6fd..2dadd29 100644 --- a/Mundialito/wwwroot/App/Games/Games.html +++ b/Mundialito/wwwroot/App/Games/Games.html @@ -1,6 +1,6 @@
-
+
@@ -18,7 +18,7 @@
-
+
Add New Game
@@ -71,7 +71,7 @@
-
+
Pending Update Games
diff --git a/Mundialito/wwwroot/App/Stadiums/Stadium.html b/Mundialito/wwwroot/App/Stadiums/Stadium.html index 23ba1e9..7baff96 100644 --- a/Mundialito/wwwroot/App/Stadiums/Stadium.html +++ b/Mundialito/wwwroot/App/Stadiums/Stadium.html @@ -10,7 +10,7 @@



-
Game Home Score
+
@@ -32,7 +32,7 @@
-
+
Users General Bets
@@ -79,7 +79,7 @@
-
+
Private Key Generator
diff --git a/Mundialito/wwwroot/App/Users/UserProfile.html b/Mundialito/wwwroot/App/Users/UserProfile.html index 70eaace..ef3c571 100644 --- a/Mundialito/wwwroot/App/Users/UserProfile.html +++ b/Mundialito/wwwroot/App/Users/UserProfile.html @@ -17,7 +17,7 @@

{{profileUser.Name}} Profile

-
+
Social
@@ -60,10 +60,10 @@

{{profileUser.Name}} Profile

-
+
Statistics
-
+
Performance (Without General Bets)
@@ -123,6 +123,16 @@

{{profileUser.Name}} Profile

+
+
+
+
Progress
+
+
+
+
+
+
@@ -195,7 +205,7 @@

{{profileUser.Name}} Profile

{{generalBet.Points}} Points
-
+
diff --git a/Mundialito/wwwroot/css/app-cerulean.css b/Mundialito/wwwroot/css/app-cerulean.css index d21ae8f..d7c73ce 100644 --- a/Mundialito/wwwroot/css/app-cerulean.css +++ b/Mundialito/wwwroot/css/app-cerulean.css @@ -1,4 +1,4 @@ -.cg-busy{position:absolute;top:0;left:0;right:0;bottom:0}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;display:block!important}.cg-busy-animation.ng-hide-remove{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove.ng-hide-remove-active{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add.ng-hide-add-active{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-backdrop{background-color:#fff;opacity:.7}.cg-busy-default-sign{position:absolute;top:0;left:50%;margin-left:-100px;width:170px;height:50px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#e9eeee;border:1px solid #ddd;border-top-width:0;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:0 0 7px 7px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.cg-busy-default-text{position:absolute;left:49px;top:15px;font-size:16px;color:#555}.cg-busy-default-spinner{position:absolute;width:25px;height:25px;display:inline-block;top:12px;left:14px}.cg-busy-default-spinner div{width:12%;height:26%;background:#000;position:absolute;left:44.5%;top:37%;opacity:0;-webkit-animation:cg-busy-spinner-anim 1s linear infinite;-moz-animation:cg-busy-spinner-anim 1s linear infinite;-ms-animation:cg-busy-spinner-anim 1s linear infinite;-o-animation:cg-busy-spinner-anim 1s linear infinite;animation:cg-busy-spinner-anim 1s linear infinite;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);-moz-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.cg-busy-default-spinner div.bar1{-webkit-transform:rotate(0) translate(0,-142%);-moz-transform:rotate(0) translate(0,-142%);-ms-transform:rotate(0) translate(0,-142%);-o-transform:rotate(0) translate(0,-142%);transform:rotate(0) translate(0,-142%);-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.cg-busy-default-spinner div.bar2{-webkit-transform:rotate(30deg) translate(0,-142%);-moz-transform:rotate(30deg) translate(0,-142%);-ms-transform:rotate(30deg) translate(0,-142%);-o-transform:rotate(30deg) translate(0,-142%);transform:rotate(30deg) translate(0,-142%);-webkit-animation-delay:-.9167s;-moz-animation-delay:-.9167s;-ms-animation-delay:-.9167s;-o-animation-delay:-.9167s;animation-delay:-.9167s}.cg-busy-default-spinner div.bar3{-webkit-transform:rotate(60deg) translate(0,-142%);-moz-transform:rotate(60deg) translate(0,-142%);-ms-transform:rotate(60deg) translate(0,-142%);-o-transform:rotate(60deg) translate(0,-142%);transform:rotate(60deg) translate(0,-142%);-webkit-animation-delay:-.833s;-moz-animation-delay:-.833s;-ms-animation-delay:-.833s;-o-animation-delay:-.833s;animation-delay:-.833s}.cg-busy-default-spinner div.bar4{-webkit-transform:rotate(90deg) translate(0,-142%);-moz-transform:rotate(90deg) translate(0,-142%);-ms-transform:rotate(90deg) translate(0,-142%);-o-transform:rotate(90deg) translate(0,-142%);transform:rotate(90deg) translate(0,-142%);-webkit-animation-delay:-.75s;-moz-animation-delay:-.75s;-ms-animation-delay:-.75s;-o-animation-delay:-.75s;animation-delay:-.75s}.cg-busy-default-spinner div.bar5{-webkit-transform:rotate(120deg) translate(0,-142%);-moz-transform:rotate(120deg) translate(0,-142%);-ms-transform:rotate(120deg) translate(0,-142%);-o-transform:rotate(120deg) translate(0,-142%);transform:rotate(120deg) translate(0,-142%);-webkit-animation-delay:-.667s;-moz-animation-delay:-.667s;-ms-animation-delay:-.667s;-o-animation-delay:-.667s;animation-delay:-.667s}.cg-busy-default-spinner div.bar6{-webkit-transform:rotate(150deg) translate(0,-142%);-moz-transform:rotate(150deg) translate(0,-142%);-ms-transform:rotate(150deg) translate(0,-142%);-o-transform:rotate(150deg) translate(0,-142%);transform:rotate(150deg) translate(0,-142%);-webkit-animation-delay:-.5833s;-moz-animation-delay:-.5833s;-ms-animation-delay:-.5833s;-o-animation-delay:-.5833s;animation-delay:-.5833s}.cg-busy-default-spinner div.bar7{-webkit-transform:rotate(180deg) translate(0,-142%);-moz-transform:rotate(180deg) translate(0,-142%);-ms-transform:rotate(180deg) translate(0,-142%);-o-transform:rotate(180deg) translate(0,-142%);transform:rotate(180deg) translate(0,-142%);-webkit-animation-delay:-.5s;-moz-animation-delay:-.5s;-ms-animation-delay:-.5s;-o-animation-delay:-.5s;animation-delay:-.5s}.cg-busy-default-spinner div.bar8{-webkit-transform:rotate(210deg) translate(0,-142%);-moz-transform:rotate(210deg) translate(0,-142%);-ms-transform:rotate(210deg) translate(0,-142%);-o-transform:rotate(210deg) translate(0,-142%);transform:rotate(210deg) translate(0,-142%);-webkit-animation-delay:-.41667s;-moz-animation-delay:-.41667s;-ms-animation-delay:-.41667s;-o-animation-delay:-.41667s;animation-delay:-.41667s}.cg-busy-default-spinner div.bar9{-webkit-transform:rotate(240deg) translate(0,-142%);-moz-transform:rotate(240deg) translate(0,-142%);-ms-transform:rotate(240deg) translate(0,-142%);-o-transform:rotate(240deg) translate(0,-142%);transform:rotate(240deg) translate(0,-142%);-webkit-animation-delay:-.333s;-moz-animation-delay:-.333s;-ms-animation-delay:-.333s;-o-animation-delay:-.333s;animation-delay:-.333s}.cg-busy-default-spinner div.bar10{-webkit-transform:rotate(270deg) translate(0,-142%);-moz-transform:rotate(270deg) translate(0,-142%);-ms-transform:rotate(270deg) translate(0,-142%);-o-transform:rotate(270deg) translate(0,-142%);transform:rotate(270deg) translate(0,-142%);-webkit-animation-delay:-.25s;-moz-animation-delay:-.25s;-ms-animation-delay:-.25s;-o-animation-delay:-.25s;animation-delay:-.25s}.cg-busy-default-spinner div.bar11{-webkit-transform:rotate(300deg) translate(0,-142%);-moz-transform:rotate(300deg) translate(0,-142%);-ms-transform:rotate(300deg) translate(0,-142%);-o-transform:rotate(300deg) translate(0,-142%);transform:rotate(300deg) translate(0,-142%);-webkit-animation-delay:-.1667s;-moz-animation-delay:-.1667s;-ms-animation-delay:-.1667s;-o-animation-delay:-.1667s;animation-delay:-.1667s}.cg-busy-default-spinner div.bar12{-webkit-transform:rotate(330deg) translate(0,-142%);-moz-transform:rotate(330deg) translate(0,-142%);-ms-transform:rotate(330deg) translate(0,-142%);-o-transform:rotate(330deg) translate(0,-142%);transform:rotate(330deg) translate(0,-142%);-webkit-animation-delay:-.0833s;-moz-animation-delay:-.0833s;-ms-animation-delay:-.0833s;-o-animation-delay:-.0833s;animation-delay:-.0833s}@-webkit-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@-moz-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}.key-value-editor.as-sortable-dragging .as-sortable-item-delete,.key-value-editor.as-sortable-dragging .input-group-addon,.key-value-editor.as-sortable-dragging input{opacity:.65}.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:hover,.key-value-editor .as-sortable-item-handle:hover,.key-value-editor.as-sortable-dragging .as-sortable-item-handle{opacity:1}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete,.key-value-editor .as-sortable-item-handle{display:inline-block;font-size:14px;opacity:.65;padding:6px;vertical-align:middle}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete{color:#333}.key-value-editor .as-sortable-DISABLED-item-delete:active,.key-value-editor .as-sortable-DISABLED-item-delete:focus,.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:active,.key-value-editor .as-sortable-item-delete:focus,.key-value-editor .as-sortable-item-delete:hover{text-decoration:none}.key-value-editor .as-sortable-item-handle{cursor:move}.key-value-editor .input-group-addon span[title]:not([data-original-title=""]),abbr[data-original-title],abbr[title]{cursor:help}.key-value-editor .as-sortable-placeholder{border-top:2px solid #0088ce;clear:left;width:100%!important}.key-value-editor .key-value-editor-buttons{position:absolute;right:0;top:0;width:50px}.key-value-editor .key-value-editor-entry{display:table;padding-right:50px;position:relative;width:100%}.key-value-editor .key-value-editor-header,.key-value-editor .key-value-editor-input{float:left;padding-right:5px;padding-bottom:5px;width:50%}/*! +.cg-busy{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1001}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;display:block!important}.cg-busy-animation.ng-hide-remove{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove.ng-hide-remove-active{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add.ng-hide-add-active{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-backdrop{background-color:#fff;opacity:.7}.cg-busy-backdrop-animation.ng-hide-add,.cg-busy-backdrop-animation.ng-hide-remove{-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;display:block!important}.cg-busy-backdrop-animation.ng-hide{opacity:0}.cg-busy-default-wrapper{text-align:center}.cg-busy-default-sign{display:inline-block;position:relative;z-index:1002;padding-bottom:6px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#e9eeee;border:1px solid #ddd;border-top-width:0;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:0 0 7px 7px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.cg-busy-default-text{margin:13px 12px 6px 49px;font-size:16px;color:#555;text-align:left;max-width:400px}.cg-busy-default-spinner{position:absolute;width:25px;height:25px;display:inline-block;top:12px;left:14px}.cg-busy-default-spinner div{width:12%;height:26%;background:#000;position:absolute;left:44.5%;top:37%;opacity:0;-webkit-animation:cg-busy-spinner-anim 1s linear infinite;-moz-animation:cg-busy-spinner-anim 1s linear infinite;-ms-animation:cg-busy-spinner-anim 1s linear infinite;-o-animation:cg-busy-spinner-anim 1s linear infinite;animation:cg-busy-spinner-anim 1s linear infinite;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);-moz-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.cg-busy-default-spinner div.bar1{-webkit-transform:rotate(0) translate(0,-142%);-moz-transform:rotate(0) translate(0,-142%);-ms-transform:rotate(0) translate(0,-142%);-o-transform:rotate(0) translate(0,-142%);transform:rotate(0) translate(0,-142%);-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.cg-busy-default-spinner div.bar2{-webkit-transform:rotate(30deg) translate(0,-142%);-moz-transform:rotate(30deg) translate(0,-142%);-ms-transform:rotate(30deg) translate(0,-142%);-o-transform:rotate(30deg) translate(0,-142%);transform:rotate(30deg) translate(0,-142%);-webkit-animation-delay:-.9167s;-moz-animation-delay:-.9167s;-ms-animation-delay:-.9167s;-o-animation-delay:-.9167s;animation-delay:-.9167s}.cg-busy-default-spinner div.bar3{-webkit-transform:rotate(60deg) translate(0,-142%);-moz-transform:rotate(60deg) translate(0,-142%);-ms-transform:rotate(60deg) translate(0,-142%);-o-transform:rotate(60deg) translate(0,-142%);transform:rotate(60deg) translate(0,-142%);-webkit-animation-delay:-833ms;-moz-animation-delay:-833ms;-ms-animation-delay:-833ms;-o-animation-delay:-833ms;animation-delay:-833ms}.cg-busy-default-spinner div.bar4{-webkit-transform:rotate(90deg) translate(0,-142%);-moz-transform:rotate(90deg) translate(0,-142%);-ms-transform:rotate(90deg) translate(0,-142%);-o-transform:rotate(90deg) translate(0,-142%);transform:rotate(90deg) translate(0,-142%);-webkit-animation-delay:-.75s;-moz-animation-delay:-.75s;-ms-animation-delay:-.75s;-o-animation-delay:-.75s;animation-delay:-.75s}.cg-busy-default-spinner div.bar5{-webkit-transform:rotate(120deg) translate(0,-142%);-moz-transform:rotate(120deg) translate(0,-142%);-ms-transform:rotate(120deg) translate(0,-142%);-o-transform:rotate(120deg) translate(0,-142%);transform:rotate(120deg) translate(0,-142%);-webkit-animation-delay:-667ms;-moz-animation-delay:-667ms;-ms-animation-delay:-667ms;-o-animation-delay:-667ms;animation-delay:-667ms}.cg-busy-default-spinner div.bar6{-webkit-transform:rotate(150deg) translate(0,-142%);-moz-transform:rotate(150deg) translate(0,-142%);-ms-transform:rotate(150deg) translate(0,-142%);-o-transform:rotate(150deg) translate(0,-142%);transform:rotate(150deg) translate(0,-142%);-webkit-animation-delay:-.5833s;-moz-animation-delay:-.5833s;-ms-animation-delay:-.5833s;-o-animation-delay:-.5833s;animation-delay:-.5833s}.cg-busy-default-spinner div.bar7{-webkit-transform:rotate(180deg) translate(0,-142%);-moz-transform:rotate(180deg) translate(0,-142%);-ms-transform:rotate(180deg) translate(0,-142%);-o-transform:rotate(180deg) translate(0,-142%);transform:rotate(180deg) translate(0,-142%);-webkit-animation-delay:-.5s;-moz-animation-delay:-.5s;-ms-animation-delay:-.5s;-o-animation-delay:-.5s;animation-delay:-.5s}.cg-busy-default-spinner div.bar8{-webkit-transform:rotate(210deg) translate(0,-142%);-moz-transform:rotate(210deg) translate(0,-142%);-ms-transform:rotate(210deg) translate(0,-142%);-o-transform:rotate(210deg) translate(0,-142%);transform:rotate(210deg) translate(0,-142%);-webkit-animation-delay:-.41667s;-moz-animation-delay:-.41667s;-ms-animation-delay:-.41667s;-o-animation-delay:-.41667s;animation-delay:-.41667s}.cg-busy-default-spinner div.bar9{-webkit-transform:rotate(240deg) translate(0,-142%);-moz-transform:rotate(240deg) translate(0,-142%);-ms-transform:rotate(240deg) translate(0,-142%);-o-transform:rotate(240deg) translate(0,-142%);transform:rotate(240deg) translate(0,-142%);-webkit-animation-delay:-333ms;-moz-animation-delay:-333ms;-ms-animation-delay:-333ms;-o-animation-delay:-333ms;animation-delay:-333ms}.cg-busy-default-spinner div.bar10{-webkit-transform:rotate(270deg) translate(0,-142%);-moz-transform:rotate(270deg) translate(0,-142%);-ms-transform:rotate(270deg) translate(0,-142%);-o-transform:rotate(270deg) translate(0,-142%);transform:rotate(270deg) translate(0,-142%);-webkit-animation-delay:-.25s;-moz-animation-delay:-.25s;-ms-animation-delay:-.25s;-o-animation-delay:-.25s;animation-delay:-.25s}.cg-busy-default-spinner div.bar11{-webkit-transform:rotate(300deg) translate(0,-142%);-moz-transform:rotate(300deg) translate(0,-142%);-ms-transform:rotate(300deg) translate(0,-142%);-o-transform:rotate(300deg) translate(0,-142%);transform:rotate(300deg) translate(0,-142%);-webkit-animation-delay:-.1667s;-moz-animation-delay:-.1667s;-ms-animation-delay:-.1667s;-o-animation-delay:-.1667s;animation-delay:-.1667s}.cg-busy-default-spinner div.bar12{-webkit-transform:rotate(330deg) translate(0,-142%);-moz-transform:rotate(330deg) translate(0,-142%);-ms-transform:rotate(330deg) translate(0,-142%);-o-transform:rotate(330deg) translate(0,-142%);transform:rotate(330deg) translate(0,-142%);-webkit-animation-delay:-83.3ms;-moz-animation-delay:-83.3ms;-ms-animation-delay:-83.3ms;-o-animation-delay:-83.3ms;animation-delay:-83.3ms}@-webkit-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@-moz-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}.key-value-editor.as-sortable-dragging .as-sortable-item-delete,.key-value-editor.as-sortable-dragging .input-group-addon,.key-value-editor.as-sortable-dragging input{opacity:.65}.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:hover,.key-value-editor .as-sortable-item-handle:hover,.key-value-editor.as-sortable-dragging .as-sortable-item-handle{opacity:1}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete,.key-value-editor .as-sortable-item-handle{display:inline-block;font-size:14px;opacity:.65;padding:6px;vertical-align:middle}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete{color:#333}.key-value-editor .as-sortable-DISABLED-item-delete:active,.key-value-editor .as-sortable-DISABLED-item-delete:focus,.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:active,.key-value-editor .as-sortable-item-delete:focus,.key-value-editor .as-sortable-item-delete:hover{text-decoration:none}.key-value-editor .as-sortable-item-handle{cursor:move}.key-value-editor .input-group-addon span[title]:not([data-original-title=""]),abbr[data-original-title],abbr[title]{cursor:help}.key-value-editor .as-sortable-placeholder{border-top:2px solid #0088ce;clear:left;width:100%!important}.key-value-editor .key-value-editor-buttons{position:absolute;right:0;top:0;width:50px}.key-value-editor .key-value-editor-entry{display:table;padding-right:50px;position:relative;width:100%}.key-value-editor .key-value-editor-header,.key-value-editor .key-value-editor-input{float:left;padding-right:5px;padding-bottom:5px;width:50%}/*! * Bootstrap v3.4.1 (https://getbootstrap.com/) * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) diff --git a/Mundialito/wwwroot/css/app-space-lab.css b/Mundialito/wwwroot/css/app-space-lab.css index 163ba69..91f6fc0 100644 --- a/Mundialito/wwwroot/css/app-space-lab.css +++ b/Mundialito/wwwroot/css/app-space-lab.css @@ -1,4 +1,4 @@ -.cg-busy{position:absolute;top:0;left:0;right:0;bottom:0}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;display:block!important}.cg-busy-animation.ng-hide-remove{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove.ng-hide-remove-active{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add.ng-hide-add-active{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-backdrop{background-color:#fff;opacity:.7}.cg-busy-default-sign{position:absolute;top:0;left:50%;margin-left:-100px;width:170px;height:50px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#e9eeee;border:1px solid #ddd;border-top-width:0;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:0 0 7px 7px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.cg-busy-default-text{position:absolute;left:49px;top:15px;font-size:16px;color:#555}.cg-busy-default-spinner{position:absolute;width:25px;height:25px;display:inline-block;top:12px;left:14px}.cg-busy-default-spinner div{width:12%;height:26%;background:#000;position:absolute;left:44.5%;top:37%;opacity:0;-webkit-animation:cg-busy-spinner-anim 1s linear infinite;-moz-animation:cg-busy-spinner-anim 1s linear infinite;-ms-animation:cg-busy-spinner-anim 1s linear infinite;-o-animation:cg-busy-spinner-anim 1s linear infinite;animation:cg-busy-spinner-anim 1s linear infinite;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);-moz-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.cg-busy-default-spinner div.bar1{-webkit-transform:rotate(0) translate(0,-142%);-moz-transform:rotate(0) translate(0,-142%);-ms-transform:rotate(0) translate(0,-142%);-o-transform:rotate(0) translate(0,-142%);transform:rotate(0) translate(0,-142%);-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.cg-busy-default-spinner div.bar2{-webkit-transform:rotate(30deg) translate(0,-142%);-moz-transform:rotate(30deg) translate(0,-142%);-ms-transform:rotate(30deg) translate(0,-142%);-o-transform:rotate(30deg) translate(0,-142%);transform:rotate(30deg) translate(0,-142%);-webkit-animation-delay:-.9167s;-moz-animation-delay:-.9167s;-ms-animation-delay:-.9167s;-o-animation-delay:-.9167s;animation-delay:-.9167s}.cg-busy-default-spinner div.bar3{-webkit-transform:rotate(60deg) translate(0,-142%);-moz-transform:rotate(60deg) translate(0,-142%);-ms-transform:rotate(60deg) translate(0,-142%);-o-transform:rotate(60deg) translate(0,-142%);transform:rotate(60deg) translate(0,-142%);-webkit-animation-delay:-.833s;-moz-animation-delay:-.833s;-ms-animation-delay:-.833s;-o-animation-delay:-.833s;animation-delay:-.833s}.cg-busy-default-spinner div.bar4{-webkit-transform:rotate(90deg) translate(0,-142%);-moz-transform:rotate(90deg) translate(0,-142%);-ms-transform:rotate(90deg) translate(0,-142%);-o-transform:rotate(90deg) translate(0,-142%);transform:rotate(90deg) translate(0,-142%);-webkit-animation-delay:-.75s;-moz-animation-delay:-.75s;-ms-animation-delay:-.75s;-o-animation-delay:-.75s;animation-delay:-.75s}.cg-busy-default-spinner div.bar5{-webkit-transform:rotate(120deg) translate(0,-142%);-moz-transform:rotate(120deg) translate(0,-142%);-ms-transform:rotate(120deg) translate(0,-142%);-o-transform:rotate(120deg) translate(0,-142%);transform:rotate(120deg) translate(0,-142%);-webkit-animation-delay:-.667s;-moz-animation-delay:-.667s;-ms-animation-delay:-.667s;-o-animation-delay:-.667s;animation-delay:-.667s}.cg-busy-default-spinner div.bar6{-webkit-transform:rotate(150deg) translate(0,-142%);-moz-transform:rotate(150deg) translate(0,-142%);-ms-transform:rotate(150deg) translate(0,-142%);-o-transform:rotate(150deg) translate(0,-142%);transform:rotate(150deg) translate(0,-142%);-webkit-animation-delay:-.5833s;-moz-animation-delay:-.5833s;-ms-animation-delay:-.5833s;-o-animation-delay:-.5833s;animation-delay:-.5833s}.cg-busy-default-spinner div.bar7{-webkit-transform:rotate(180deg) translate(0,-142%);-moz-transform:rotate(180deg) translate(0,-142%);-ms-transform:rotate(180deg) translate(0,-142%);-o-transform:rotate(180deg) translate(0,-142%);transform:rotate(180deg) translate(0,-142%);-webkit-animation-delay:-.5s;-moz-animation-delay:-.5s;-ms-animation-delay:-.5s;-o-animation-delay:-.5s;animation-delay:-.5s}.cg-busy-default-spinner div.bar8{-webkit-transform:rotate(210deg) translate(0,-142%);-moz-transform:rotate(210deg) translate(0,-142%);-ms-transform:rotate(210deg) translate(0,-142%);-o-transform:rotate(210deg) translate(0,-142%);transform:rotate(210deg) translate(0,-142%);-webkit-animation-delay:-.41667s;-moz-animation-delay:-.41667s;-ms-animation-delay:-.41667s;-o-animation-delay:-.41667s;animation-delay:-.41667s}.cg-busy-default-spinner div.bar9{-webkit-transform:rotate(240deg) translate(0,-142%);-moz-transform:rotate(240deg) translate(0,-142%);-ms-transform:rotate(240deg) translate(0,-142%);-o-transform:rotate(240deg) translate(0,-142%);transform:rotate(240deg) translate(0,-142%);-webkit-animation-delay:-.333s;-moz-animation-delay:-.333s;-ms-animation-delay:-.333s;-o-animation-delay:-.333s;animation-delay:-.333s}.cg-busy-default-spinner div.bar10{-webkit-transform:rotate(270deg) translate(0,-142%);-moz-transform:rotate(270deg) translate(0,-142%);-ms-transform:rotate(270deg) translate(0,-142%);-o-transform:rotate(270deg) translate(0,-142%);transform:rotate(270deg) translate(0,-142%);-webkit-animation-delay:-.25s;-moz-animation-delay:-.25s;-ms-animation-delay:-.25s;-o-animation-delay:-.25s;animation-delay:-.25s}.cg-busy-default-spinner div.bar11{-webkit-transform:rotate(300deg) translate(0,-142%);-moz-transform:rotate(300deg) translate(0,-142%);-ms-transform:rotate(300deg) translate(0,-142%);-o-transform:rotate(300deg) translate(0,-142%);transform:rotate(300deg) translate(0,-142%);-webkit-animation-delay:-.1667s;-moz-animation-delay:-.1667s;-ms-animation-delay:-.1667s;-o-animation-delay:-.1667s;animation-delay:-.1667s}.cg-busy-default-spinner div.bar12{-webkit-transform:rotate(330deg) translate(0,-142%);-moz-transform:rotate(330deg) translate(0,-142%);-ms-transform:rotate(330deg) translate(0,-142%);-o-transform:rotate(330deg) translate(0,-142%);transform:rotate(330deg) translate(0,-142%);-webkit-animation-delay:-.0833s;-moz-animation-delay:-.0833s;-ms-animation-delay:-.0833s;-o-animation-delay:-.0833s;animation-delay:-.0833s}@-webkit-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@-moz-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}.key-value-editor.as-sortable-dragging .as-sortable-item-delete,.key-value-editor.as-sortable-dragging .input-group-addon,.key-value-editor.as-sortable-dragging input{opacity:.65}.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:hover,.key-value-editor .as-sortable-item-handle:hover,.key-value-editor.as-sortable-dragging .as-sortable-item-handle{opacity:1}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete,.key-value-editor .as-sortable-item-handle{display:inline-block;font-size:14px;opacity:.65;padding:6px;vertical-align:middle}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete{color:#333}.key-value-editor .as-sortable-DISABLED-item-delete:active,.key-value-editor .as-sortable-DISABLED-item-delete:focus,.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:active,.key-value-editor .as-sortable-item-delete:focus,.key-value-editor .as-sortable-item-delete:hover{text-decoration:none}.key-value-editor .as-sortable-item-handle{cursor:move}.key-value-editor .input-group-addon span[title]:not([data-original-title=""]),abbr[data-original-title],abbr[title]{cursor:help}.key-value-editor .as-sortable-placeholder{border-top:2px solid #0088ce;clear:left;width:100%!important}.key-value-editor .key-value-editor-buttons{position:absolute;right:0;top:0;width:50px}.key-value-editor .key-value-editor-entry{display:table;padding-right:50px;position:relative;width:100%}.key-value-editor .key-value-editor-header,.key-value-editor .key-value-editor-input{float:left;padding-right:5px;padding-bottom:5px;width:50%}/*! +.cg-busy{position:absolute;top:0;left:0;right:0;bottom:0;z-index:1001}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove{-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;transition:all .3s ease;display:block!important}.cg-busy-animation.ng-hide-remove{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-animation.ng-hide-add,.cg-busy-animation.ng-hide-remove.ng-hide-remove-active{opacity:1;-webkit-transform:translate(0,0);-moz-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.cg-busy-animation.ng-hide-add.ng-hide-add-active{opacity:0;-webkit-transform:translate(0,-40px);-moz-transform:translate(0,-40px);-ms-transform:translate(0,-40px);-o-transform:translate(0,-40px);transform:translate(0,-40px)}.cg-busy-backdrop{background-color:#fff;opacity:.7}.cg-busy-backdrop-animation.ng-hide-add,.cg-busy-backdrop-animation.ng-hide-remove{-webkit-transition:opacity .3s ease;-moz-transition:opacity .3s ease;-o-transition:opacity .3s ease;transition:opacity .3s ease;display:block!important}.cg-busy-backdrop-animation.ng-hide{opacity:0}.cg-busy-default-wrapper{text-align:center}.cg-busy-default-sign{display:inline-block;position:relative;z-index:1002;padding-bottom:6px;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#e9eeee;border:1px solid #ddd;border-top-width:0;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:0 0 7px 7px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.cg-busy-default-text{margin:13px 12px 6px 49px;font-size:16px;color:#555;text-align:left;max-width:400px}.cg-busy-default-spinner{position:absolute;width:25px;height:25px;display:inline-block;top:12px;left:14px}.cg-busy-default-spinner div{width:12%;height:26%;background:#000;position:absolute;left:44.5%;top:37%;opacity:0;-webkit-animation:cg-busy-spinner-anim 1s linear infinite;-moz-animation:cg-busy-spinner-anim 1s linear infinite;-ms-animation:cg-busy-spinner-anim 1s linear infinite;-o-animation:cg-busy-spinner-anim 1s linear infinite;animation:cg-busy-spinner-anim 1s linear infinite;-webkit-border-radius:50px;-moz-border-radius:50px;border-radius:50px;-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);-moz-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2)}.cg-busy-default-spinner div.bar1{-webkit-transform:rotate(0) translate(0,-142%);-moz-transform:rotate(0) translate(0,-142%);-ms-transform:rotate(0) translate(0,-142%);-o-transform:rotate(0) translate(0,-142%);transform:rotate(0) translate(0,-142%);-webkit-animation-delay:0s;-moz-animation-delay:0s;-ms-animation-delay:0s;-o-animation-delay:0s;animation-delay:0s}.cg-busy-default-spinner div.bar2{-webkit-transform:rotate(30deg) translate(0,-142%);-moz-transform:rotate(30deg) translate(0,-142%);-ms-transform:rotate(30deg) translate(0,-142%);-o-transform:rotate(30deg) translate(0,-142%);transform:rotate(30deg) translate(0,-142%);-webkit-animation-delay:-.9167s;-moz-animation-delay:-.9167s;-ms-animation-delay:-.9167s;-o-animation-delay:-.9167s;animation-delay:-.9167s}.cg-busy-default-spinner div.bar3{-webkit-transform:rotate(60deg) translate(0,-142%);-moz-transform:rotate(60deg) translate(0,-142%);-ms-transform:rotate(60deg) translate(0,-142%);-o-transform:rotate(60deg) translate(0,-142%);transform:rotate(60deg) translate(0,-142%);-webkit-animation-delay:-833ms;-moz-animation-delay:-833ms;-ms-animation-delay:-833ms;-o-animation-delay:-833ms;animation-delay:-833ms}.cg-busy-default-spinner div.bar4{-webkit-transform:rotate(90deg) translate(0,-142%);-moz-transform:rotate(90deg) translate(0,-142%);-ms-transform:rotate(90deg) translate(0,-142%);-o-transform:rotate(90deg) translate(0,-142%);transform:rotate(90deg) translate(0,-142%);-webkit-animation-delay:-.75s;-moz-animation-delay:-.75s;-ms-animation-delay:-.75s;-o-animation-delay:-.75s;animation-delay:-.75s}.cg-busy-default-spinner div.bar5{-webkit-transform:rotate(120deg) translate(0,-142%);-moz-transform:rotate(120deg) translate(0,-142%);-ms-transform:rotate(120deg) translate(0,-142%);-o-transform:rotate(120deg) translate(0,-142%);transform:rotate(120deg) translate(0,-142%);-webkit-animation-delay:-667ms;-moz-animation-delay:-667ms;-ms-animation-delay:-667ms;-o-animation-delay:-667ms;animation-delay:-667ms}.cg-busy-default-spinner div.bar6{-webkit-transform:rotate(150deg) translate(0,-142%);-moz-transform:rotate(150deg) translate(0,-142%);-ms-transform:rotate(150deg) translate(0,-142%);-o-transform:rotate(150deg) translate(0,-142%);transform:rotate(150deg) translate(0,-142%);-webkit-animation-delay:-.5833s;-moz-animation-delay:-.5833s;-ms-animation-delay:-.5833s;-o-animation-delay:-.5833s;animation-delay:-.5833s}.cg-busy-default-spinner div.bar7{-webkit-transform:rotate(180deg) translate(0,-142%);-moz-transform:rotate(180deg) translate(0,-142%);-ms-transform:rotate(180deg) translate(0,-142%);-o-transform:rotate(180deg) translate(0,-142%);transform:rotate(180deg) translate(0,-142%);-webkit-animation-delay:-.5s;-moz-animation-delay:-.5s;-ms-animation-delay:-.5s;-o-animation-delay:-.5s;animation-delay:-.5s}.cg-busy-default-spinner div.bar8{-webkit-transform:rotate(210deg) translate(0,-142%);-moz-transform:rotate(210deg) translate(0,-142%);-ms-transform:rotate(210deg) translate(0,-142%);-o-transform:rotate(210deg) translate(0,-142%);transform:rotate(210deg) translate(0,-142%);-webkit-animation-delay:-.41667s;-moz-animation-delay:-.41667s;-ms-animation-delay:-.41667s;-o-animation-delay:-.41667s;animation-delay:-.41667s}.cg-busy-default-spinner div.bar9{-webkit-transform:rotate(240deg) translate(0,-142%);-moz-transform:rotate(240deg) translate(0,-142%);-ms-transform:rotate(240deg) translate(0,-142%);-o-transform:rotate(240deg) translate(0,-142%);transform:rotate(240deg) translate(0,-142%);-webkit-animation-delay:-333ms;-moz-animation-delay:-333ms;-ms-animation-delay:-333ms;-o-animation-delay:-333ms;animation-delay:-333ms}.cg-busy-default-spinner div.bar10{-webkit-transform:rotate(270deg) translate(0,-142%);-moz-transform:rotate(270deg) translate(0,-142%);-ms-transform:rotate(270deg) translate(0,-142%);-o-transform:rotate(270deg) translate(0,-142%);transform:rotate(270deg) translate(0,-142%);-webkit-animation-delay:-.25s;-moz-animation-delay:-.25s;-ms-animation-delay:-.25s;-o-animation-delay:-.25s;animation-delay:-.25s}.cg-busy-default-spinner div.bar11{-webkit-transform:rotate(300deg) translate(0,-142%);-moz-transform:rotate(300deg) translate(0,-142%);-ms-transform:rotate(300deg) translate(0,-142%);-o-transform:rotate(300deg) translate(0,-142%);transform:rotate(300deg) translate(0,-142%);-webkit-animation-delay:-.1667s;-moz-animation-delay:-.1667s;-ms-animation-delay:-.1667s;-o-animation-delay:-.1667s;animation-delay:-.1667s}.cg-busy-default-spinner div.bar12{-webkit-transform:rotate(330deg) translate(0,-142%);-moz-transform:rotate(330deg) translate(0,-142%);-ms-transform:rotate(330deg) translate(0,-142%);-o-transform:rotate(330deg) translate(0,-142%);transform:rotate(330deg) translate(0,-142%);-webkit-animation-delay:-83.3ms;-moz-animation-delay:-83.3ms;-ms-animation-delay:-83.3ms;-o-animation-delay:-83.3ms;animation-delay:-83.3ms}@-webkit-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@-moz-keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}@keyframes cg-busy-spinner-anim{from{opacity:1}to{opacity:.25}}.key-value-editor.as-sortable-dragging .as-sortable-item-delete,.key-value-editor.as-sortable-dragging .input-group-addon,.key-value-editor.as-sortable-dragging input{opacity:.65}.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:hover,.key-value-editor .as-sortable-item-handle:hover,.key-value-editor.as-sortable-dragging .as-sortable-item-handle{opacity:1}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete,.key-value-editor .as-sortable-item-handle{display:inline-block;font-size:14px;opacity:.65;padding:6px;vertical-align:middle}.key-value-editor .as-sortable-DISABLED-item-delete,.key-value-editor .as-sortable-item-delete{color:#333}.key-value-editor .as-sortable-DISABLED-item-delete:active,.key-value-editor .as-sortable-DISABLED-item-delete:focus,.key-value-editor .as-sortable-DISABLED-item-delete:hover,.key-value-editor .as-sortable-item-delete:active,.key-value-editor .as-sortable-item-delete:focus,.key-value-editor .as-sortable-item-delete:hover{text-decoration:none}.key-value-editor .as-sortable-item-handle{cursor:move}.key-value-editor .input-group-addon span[title]:not([data-original-title=""]),abbr[data-original-title],abbr[title]{cursor:help}.key-value-editor .as-sortable-placeholder{border-top:2px solid #0088ce;clear:left;width:100%!important}.key-value-editor .key-value-editor-buttons{position:absolute;right:0;top:0;width:50px}.key-value-editor .key-value-editor-entry{display:table;padding-right:50px;position:relative;width:100%}.key-value-editor .key-value-editor-header,.key-value-editor .key-value-editor-input{float:left;padding-right:5px;padding-bottom:5px;width:50%}/*! * Bootstrap v3.4.1 (https://getbootstrap.com/) * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) diff --git a/Mundialito/wwwroot/js/app-min.js b/Mundialito/wwwroot/js/app-min.js index a532a87..23fefa2 100644 --- a/Mundialito/wwwroot/js/app-min.js +++ b/Mundialito/wwwroot/js/app-min.js @@ -1 +1 @@ -angular.module("mundialitoApp",["key-value-editor","security","ngSanitize","ngRoute","ngAnimate","ui.bootstrap","autofields.bootstrap","cgBusy","ajoslin.promise-tracker","ui.select","ui.bootstrap.datetimepicker","ui.grid","ui.grid.autoResize","googlechart","toaster","ui.grid.saveState","ui.grid.resizeColumns","ui.toggle"]).value("cgBusyTemplateName","App/Partials/angular-busy.html").config(["$routeProvider","$httpProvider","$locationProvider","$parseProvider","securityProvider","Constants",function(e,a,t,r,s,n){t.html5Mode(!0),a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",a.interceptors.push("myHttpInterceptor"),s.urls.login=n.LOGIN_PATH,s.usePopups=!1,e.when("/",{templateUrl:"App/Dashboard/Dashboard.html",controller:"DashboardCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()],players:["PlayersManager",e=>e.loadAllPlayers()]}}).when("/bets_center",{templateUrl:"App/Bets/BetsCenter.html",controller:"BetsCenterCtrl",resolve:{games:["GamesManager",e=>e.loadOpenGames()]}}).when("/users/:username",{templateUrl:"App/Users/UserProfile.html",controller:"UserProfileCtrl",resolve:{profileUser:["$route","UsersManager",(e,a)=>{var t=e.current.params.username;return a.getUser(t,!0)}],userGameBets:["$route","BetsManager",(e,a)=>{var t=e.current.params.username;return a.getUserBets(t)}],teams:["TeamsManager",e=>e.loadAllTeams()],generalBetsAreOpen:["GeneralBetsManager",e=>e.canSubmtiGeneralBet()],players:["PlayersManager",e=>e.loadAllPlayers()],allUsers:["UsersManager",e=>e.loadAllUsers()]}}).when("/manage_users",{templateUrl:"App/Users/ManageApp.html",controller:"ManageAppCtrl",resolve:{users:["UsersManager",e=>e.loadAllUsers()],teams:["TeamsManager",e=>e.loadAllTeams()],generalBets:["GeneralBetsManager",e=>e.loadAllGeneralBets()],players:["PlayersManager",e=>e.loadAllPlayers()]}}).when("/teams",{templateUrl:"App/Teams/Teams.html",controller:"TeamsCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()]}}).when("/teams/:teamId",{templateUrl:"App/Teams/Team.html",controller:"TeamCtrl",resolve:{team:["$route","TeamsManager",(e,a)=>{var t=e.current.params.teamId;return a.getTeam(t)}],games:["$route","GamesManager",(e,a)=>{var t=e.current.params.teamId;return a.getTeamGames(t)}]}}).when("/games/:gameId",{templateUrl:"App/Games/Game.html",controller:"GameCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()],players:["PlayersManager",e=>e.loadAllPlayers()],game:["$route","GamesManager",(e,a)=>{var t=e.current.params.gameId;return a.getGame(t)}],userBet:["$route","BetsManager",(e,a)=>{var t=e.current.params.gameId;return a.getUserBetOnGame(t)}]}}).when("/games",{templateUrl:"App/Games/Games.html",controller:"GamesCtrl",resolve:{games:["GamesManager",e=>e.loadAllGames()],teams:["TeamsManager",e=>e.loadAllTeams()]}}).when("/stadiums/:stadiumId",{templateUrl:"App/Stadiums/Stadium.html",controller:"StadiumCtrl",resolve:{stadium:["$q","$route","StadiumsManager",(e,a,t)=>{var r=a.current.params.stadiumId;return t.getStadium(r,!0)}]}}).when("/stadiums",{templateUrl:"App/Stadiums/Stadiums.html",controller:"StadiumsCtrl",resolve:{stadiums:["StadiumsManager",e=>e.loadAllStadiums()]}}).when("/login",{templateUrl:"App/Accounts/Login.html"}).when("/forgot",{templateUrl:"App/Accounts/ForgetPassword.html",controller:"ForgetPasswordCtrl"}).when("/reset",{templateUrl:"App/Accounts/ResetPassword.html",controller:"ResetPasswordCtrl"}).when("/join",{templateUrl:"App/Accounts/Register.html"}).when("/manage",{templateUrl:"App/Accounts/Manage.html"}).otherwise({redirectTo:"/"})}]).run(["$rootScope","$log","security","$route","$location","PluginsProvider","FootballDataGamePlugin","FootballDataTeamStatsPlugin",function(e,a,t,r,s,n,i,l){n.registerGameFactory(i),n.registerTeamFactory(l),t.events.login=function(t,r){a.log("Current user details: "+angular.toJson(r)),e.mundialitoApp.authenticating=!1},t.events.reloadUser=function(t,r){a.log("User reloaded"+angular.toJson(r)),e.mundialitoApp.authenticating=!1},t.events.logout=function(e){a.log("User logged out"),e.authenticate()},e.mundialitoApp={params:null,loading:!0,authenticating:!0,message:null},["/reset","/forgot","/join","/login"].includes(s.$$path)||(a.log("Starting authentication"),t.authenticate()),e.security=t,e.$on("$locationChangeStart",function(){a.debug("$locationChangeStart"),e.mundialitoApp.loading=!0}),e.$on("$locationChangeSuccess",function(){a.debug("$locationChangeSuccess"),e.mundialitoApp.params=angular.copy(r.current.params),e.mundialitoApp.loading=!1}),e.$on("$routeChangeStart",function(){a.debug("$routeChangeStart"),e.mundialitoApp.message="Loading..."}),e.$on("$routeChangeSuccess",function(){a.debug("$routeChangeSuccess"),e.mundialitoApp.message=null})}]),angular.module("mundialitoApp").constant("Constants",{LOGIN_PATH:"/login",REFRESH_TIME:3e5,TABLE_GRID_OPTIONS:{saveWidths:!0,saveVisible:!0,saveOrder:!0,enableRowSelection:!1,enableSelectAll:!1,multiSelect:!1,rowTemplate:'
',columnDefs:[{field:"Place",displayName:"",resizable:!1,maxWidth:30},{field:"Name",displayName:"Name",resizable:!0,minWidth:115},{field:"Points",displayName:"Points",resizable:!0,minWidth:45,maxWidth:75},{field:"GeneralBet.WinningTeam",displayName:"Team",resizable:!1,maxWidth:45,cellTemplate:'
'},{field:"GeneralBet.GoldenBootPlayer",displayName:"Player",resizable:!1,minWidth:50,maxWidth:50},{field:"TotalMarks",displayName:"Total Marks",resizable:!0},{field:"Results",displayName:"Results",resizable:!0},{field:"YellowCards",displayName:"Yellow Cards Marks",maxWidth:55,resizable:!1,headerCellTemplate:'
'},{field:"Corners",displayName:"Corners Marks",maxWidth:55,resizable:!1,headerCellTemplate:'
'},,{field:"PlaceDiff",displayName:"",resizable:!1,maxWidth:45,cellTemplate:"
{{::COL_FIELD}}
"}]}}),angular.module("mundialitoApp").controller("ForgetPasswordCtrl",["$scope","$rootScope","security","Alert",function(e,a,t,r){a.mundialitoApp.authenticating=!1;e.user=new function(){return{Email:""}},e.forget=function(){e.emailForm.$valid&&(a.mundialitoApp.message="Processing...",t.forgotPassword(angular.copy(e.user)).then(()=>{r.success("Reset password token was sent to your email, please follow the link from there")}).catch(e=>{r.error("Failed to generate reset password token: "+e)}).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"Email",label:"Email Address",type:"email",attr:{required:!0}}]}]),angular.module("mundialitoApp").controller("LoginCtrl",["$scope","$rootScope","security",function(e,a,t){a.mundialitoApp.authenticating=!1;e.user=new function(){return{username:"",password:"",rememberMe:!1}},e.login=function(){e.loginForm.$valid&&(a.mundialitoApp.message="Processing Login...",t.login(angular.copy(e.user)).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"username",type:"text",attr:{ngMinlength:4,required:!0}},{property:"password",type:"password",attr:{ngMinlength:4,required:!0}},{property:"rememberMe",label:"Keep me logged in",type:"checkbox"}]}]),angular.module("mundialitoApp").controller("ManageCtrl",["$scope","Alert",function(e,a){var t=function(){return{oldPassword:"",newPassword:"",confirmPassword:""}};e.changingPassword=null,e.changePassword=function(){e.changingPassword=new t},e.cancel=function(){e.changingPassword=null},e.updatePassword=function(){if(e.manageForm.$valid){var t=angular.copy(e.changingPassword);e.changingPassword=null,e.security.changePassword(t).then(function(){a.success("Password was changed sucessfully")},function(){a.error("Failed to change password"),e.changingPassword=t})}},e.changePasswordSchema=[{property:"oldPassword",type:"password",attr:{required:!0}},{property:"newPassword",type:"password",attr:{ngMinlength:4,required:!0}},{property:"confirmPassword",type:"password",attr:{confirmPassword:"changingPassword.newPassword",required:!0}}]}]),angular.module("mundialitoApp").controller("RegisterCtrl",["$scope","security",function(e,a){e.mundialitoApp.authenticating=!1;e.user=new function(){return{firstname:"",lastname:"",email:"",username:"",password:"",confirmPassword:""}},e.join=function(){e.joinForm.$valid&&(e.isJoinActive=!0,e.mundialitoApp.message="Processing Registration...",a.register(angular.copy(e.user)).finally(function(){e.mundialitoApp.message=null,e.isJoinActive=!1}))},e.schema=[{property:"firstname",label:"First Name",type:"text",attr:{required:!0}},{property:"lastname",label:"Last Name",type:"text",attr:{required:!0}},{property:"email",label:"Email Address",type:"email",attr:{required:!0}},{property:"username",type:"text",attr:{ngMinlength:4,required:!0}},{property:"password",type:"password",attr:{required:!0}},{property:"confirmPassword",label:"Confirm Password",type:"password",attr:{confirmPassword:"user.password",required:!0}}],!0===e.mundialitoApp.protect&&(e.user.privateKey="",e.schema.push({property:"privateKey",help:"The Private Key was given in the e-mail of the payment confirmation",label:"Private Key",type:"text",attr:{required:!0}}))}]),angular.module("mundialitoApp").controller("ResetPasswordCtrl",["$scope","$rootScope","security","$location","Alert",function(e,a,t,r,s){a.mundialitoApp.authenticating=!1;e.user=new function(){return{confirmPassword:"",password:"",email:r.search().email,token:r.search().token}},e.reset=function(){e.resetForm.$valid&&(a.mundialitoApp.message="Processing Reset Password...",t.resetPassword(angular.copy(e.user)).then(()=>{s.success("Your was was reset successfully")}).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"password",type:"password",attr:{required:!0}},{property:"confirmPassword",label:"Confirm Password",type:"password",attr:{confirmPassword:"user.password",required:!0}}]}]),angular.module("mundialitoApp").factory("Bet",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},update:function(){return a.debug("Bet: Will update bet "+this.BetId),e.put("api/bets/"+this.BetId,this,{tracker:"updateBet"})},getGameUrl:function(){return"/games/"+this.Game.GameId},getClass:function(){return 7===this.Points?"success":this.Points>=5?"primary":this.Points>=3?"info":this.Points>0?"warning":"danger"}},t}]),angular.module("mundialitoApp").controller("BetsCenterCtrl",["$scope","$log","$timeout","Alert","BetsManager","games",function(e,a,t,r,s,n){e.games=n,e.bets={};var i=function(){angular.isDefined(e.security.user)&&null!=e.security.user?s.getUserBets(e.security.user.Username).then(function(t){for(var r=0;r{r.success("Bet was updated successfully"),s.setBet(e)}).catch(function(){r.error("Failed to update Bet, please try again")})):(a.debug("BetsCenterCtrl: Will create new bet"),s.addBet(e.bets[t]).then(function(s){a.log("BetsCenterCtrl: Bet "+s.BetId+" was added"),e.bets[t]=s,r.success("Bet was added successfully")}).catch(function(){r.error("Failed to add Bet, please try again")}))},e.shuffleBet=function(t){var r,s,n=["1","X","2"],i=[0,0,0,0,1,1,1,1,2,2,3,3,4,5],l=n[Math.floor(3*Math.random())];do{r=i[Math.floor(Math.random()*i.length)],s=i[Math.floor(Math.random()*i.length)]}while("X"!==l&&r===s);a.debug("Random game mark is "+l),"X"===l&&(s=r),a.debug("Home goals: "+r),a.debug("Away goals: "+s),e.bets[t].HomeScore=r,e.bets[t].AwayScore=s,e.bets[t].CardsMark=n[Math.floor(3*Math.random())],e.bets[t].CornersMark=n[Math.floor(3*Math.random())]}}]),angular.module("mundialitoApp").factory("BetsManager",["$http","$q","Bet","$log","MundialitoUtils","GamesManager",function(e,a,t,r,s,n){return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("BetsManager: updating existing instance of bet "+e),s.setData(a)):(r.debug("BetsManager: saving new instance of bet "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("BetsManager: will fetch bet "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("BetsManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("BetsManager: will fetch bet "+a+" from server"),e.get("api/bets/"+a,{tracker:"getBet"}).then(e=>{var a=s._retrieveInstance(e.data.BetId,e.data);t.resolve(a)}).catch(()=>{t.reject()})},addBet:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will add new bet - "+angular.toJson(t)),e.post("api/bets/",t,{tracker:"addBetOnGame"}).then(e=>{var a=n._retrieveInstance(e.data.BetId,e.data);s.resolve(a)}).catch(e=>{r.error("Failed to add bet"),s.reject(e)}),s.promise},getBet:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},getGameBets:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch all bets of game "+t+" from server"),e.get("api/games/"+t+"/bets",{tracker:"getGameBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.BetId,e);a.push(t)}),s.resolve(a)}).catch(function(){s.reject()}),s.promise},getUserBets:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch user "+t+" bets from server"),e.get("api/bets/user/"+t,{tracker:"getUserBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.BetId,e);a.push(t)}),s.resolve(a)}).catch(function(){s.reject()}),s.promise},getUserBetOnGame:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch user bet of game "+t+" from server"),e.get("api/games/"+t+"/mybet",{tracker:"getUserBetOnGame"}).then(e=>{if(-1!=e.data.BetId){var a=n._retrieveInstance(e.data.BetId,e.data);s.resolve(a)}s.resolve(e.data)}).catch(()=>{s.reject()}),s.promise},setBet:function(e){r.debug("BetsManager: will set bet "+e.BetId+" to -"+angular.toJson(e));var a=this._search(e.BetId);return a?a.setData(e):a=this._retrieveInstance(e.BetId,e),a}}}]),angular.module("mundialitoApp").controller("DashboardCtrl",["$scope","$log","Constants","$location","$timeout","GamesManager","UsersManager","GeneralBetsManager","teams","players","BetsManager","MundialitoUtils",function(e,a,t,r,s,n,i,l,o,u,d,m){e.generalBetsAreOpen=!1,e.submittedGeneralBet=!0,e.pendingUpdateGames=!1,e.oneAtATime=!0,e.status={},e.teamsDic={},e.playersDic={},e.toggleValue={},e.players=u,e.changed=(a=>{e.toggleValue[a.GameId]?(e.selectedDic[a.GameId]=e.marksDic[a.GameId],e.selectedPercentage[a.GameId]=e.marksPercentage[a.GameId]):(e.selectedDic[a.GameId]=e.resultsDic[a.GameId],e.selectedPercentage[a.GameId]=e.resultsPercentage[a.GameId])});for(var c=0;c{e.games=t,e.resultsDic={},e.marksDic={},e.selectedDic={},e.resultsPercentage={},e.marksPercentage={},e.selectedPercentage={},e.pendingUpdateGames=void 0!==_.findWhere(e.games,{IsPendingUpdate:!0}),e.pendingUpdateGamesFolloweesBets={},a.info("DashboardCtrl: followees:"+e.security.user.Followees),_.filter(e.games,e=>e.IsPendingUpdate).forEach(a=>{d.getGameBets(a.GameId).then(t=>{let r=_.groupBy(t,e=>e.HomeScore+"-"+e.AwayScore),s=_.groupBy(t,e=>e.HomeScore===e.AwayScore?"X":e.HomeScore>e.AwayScore?e.Game.HomeTeam.ShortName:e.Game.AwayTeam.ShortName);e.resultsDic[a.GameId]=Object.entries(r).sort((e,a)=>a[1].length-e[1].length),e.marksDic[a.GameId]=Object.entries(s).sort((e,a)=>a[1].length-e[1].length),e.resultsPercentage[a.GameId]={},e.resultsDic[a.GameId].forEach(r=>{e.resultsPercentage[a.GameId][r[0]]=Math.round(r[1].length/t.length*100)}),e.marksPercentage[a.GameId]={},e.marksDic[a.GameId].forEach(r=>{e.marksPercentage[a.GameId][r[0]]=Math.round(r[1].length/t.length*100)});let n=_.filter(t,a=>e.security.user.Followees.includes(a.User.Username)||e.security.user.Username===a.User.Username);e.pendingUpdateGamesFolloweesBets[a.GameId]=n,e.changed(a)})})});var g=()=>{angular.isDefined(e.security.user)&&null!=e.security.user?l.hasGeneralBet(e.security.user.Username).then(a=>{e.submittedGeneralBet=!0===a}):(a.debug("DashboardCtrl: user info not loaded yet, will retry in 1 second"),s(g,1e3))};function p(){var a=e.gridApi.saveState.save();localStorage.setItem("gridState",a)}g(),l.canSubmtiGeneralBet().then(a=>{e.generalBetsAreOpen=!0===a,e.generalBetsAreOpen||l.loadAllGeneralBets().then(function(a){e.generalBets=a,e.winningTeams={},e.winningPlayers={};for(var t=0;t{e.users=a,e.users.forEach(a=>{angular.isDefined(a.GeneralBet)&&(a.GeneralBet.WinningTeam=e.teamsDic[a.GeneralBet.WinningTeamId].Name,a.GeneralBet.GoldenBootPlayer=m.shortName(e.playersDic[a.GeneralBet.GoldenBootPlayerId].Name))}),e.usersDic=a.reduce((e,a)=>(e[a.Id]=a,e),{})}),e.isOpenForBetting=(e=>e.IsOpen),e.isPendingUpdate=(e=>e.IsPendingUpdate),e.isDecided=function(e){return!e.IsOpen&&!e.IsPendingUpdate},e.isGameBet=(e=>a=>a.Game.GameId===e.GameId),e.hasBets=(a=>void 0!==e.pendingUpdateGamesFolloweesBets[a.GameId]&&e.pendingUpdateGamesFolloweesBets[a.GameId].length>0),e.gridOptions={...t.TABLE_GRID_OPTIONS,data:"users",onRegisterApi:a=>{e.gridApi=a,e.gridApi.colResizable.on.columnSizeChanged(e,p),e.gridApi.core.on.columnVisibilityChanged(e,p),e.gridApi.core.on.sortChanged(e,p)}},e.test=((e,a)=>""),e.getTableHeight=(()=>{var t=30*(e.users?e.users.length:0)+30;return a.debug("Total Height: "+t),{height:t+"px"}}),e.goToUser=(e=>{r.path(e.entity.getUrl())})}]),angular.module("mundialitoApp").factory("Game",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},delete:function(){if(confirm("Are you sure you would like to delete game "+this.GameId))return a.debug("Game: Will delete game "+this.GameId),e.delete("api/games/"+this.GameId,{tracker:"deleteGame"})},update:function(){return a.debug("Game: Will update game "+this.GameId),e.put("api/games/"+this.GameId,this,{tracker:"editGame"})},getUrl:function(){return"/games/"+this.GameId}},t}]),angular.module("mundialitoApp").controller("GameCtrl",["$scope","$log","Constants","UsersManager","GamesManager","BetsManager","game","userBet","Alert","$location","PluginsProvider","keyValueEditorUtils","MundialitoUtils","teams","players",function(e,a,t,r,s,n,i,l,o,u,d,m,c,g,p){e.game=i,e.teamsDic={},e.playersDic={},e.simulatedGame={},e.plugins={},e.userBet=l,e.userBet.GameId=i.GameId,e.showEditForm=!1,e.toKeyValue=(e=>_.keys(e).map(a=>({name:a,value:e[a]}))),e.integrationsData=e.toKeyValue(e.game.IntegrationsData);for(var f=0;fnew Date(e.Date)).filter(e=>e.IsBetResolved).map(e=>c.getGameMark(e,t)).value();e.teamsForm[t]={form:r,games:_.filter(a,e=>e.IsBetResolved)}}d.getGameDetailsFromAll(e.game).then(a=>{a.forEach(a=>{e.plugins[a.property]={data:a.data,template:a.template}})}),e.game.IsOpen||n.getGameBets(e.game.GameId).then(t=>{a.debug("GameCtrl: get game bets"+angular.toJson(t)),e.gameBets=t;var s={type:"PieChart",options:{displayExactValues:!0,is3D:!0,backgroundColor:{fill:"transparent"},chartArea:{left:10,top:20,bottom:0,height:"100%"},title:"Bets Distribution"}},n=_.filter(t,function(e){return e.HomeScore>e.AwayScore}).length,i=_.filter(t,function(e){return e.HomeScore===e.AwayScore}).length,l=_.filter(t,function(e){return e.HomeScore{e.usersMap=new Map,a.forEach(a=>{e.usersMap.set(a.Username,a)});let t=_.chain(a).filter(a=>e.security.user.Followees.includes(a.Username)).pluck("Username").value();e.followeesBets=_.filter(e.gameBets,e=>t.includes(e.User.Username));let r=_.chain(a).first(3).pluck("Username").value();e.top3UsersBets=_.filter(e.gameBets,e=>r.includes(e.User.Username));let s=0;a.forEach((a,t)=>{a.Username===e.security.user.Username&&(s=t)});let n=Math.max(s-3,0),i=Math.min(s+3,a.length),l=_.chain(a.slice(n,i+1)).pluck("Username").filter(a=>a!==e.security.user.Username).value();e.neighborsBets=_.filter(e.gameBets,e=>l.includes(e.User.Username))})}),e.updateGame=(()=>{angular.isDefined(i.Stadium.Games)&&null!=i.Stadium.Games&&delete i.Stadium.Games,e.game.IntegrationsData=m.mapEntries(m.compactEntries(e.integrationsData)),e.game.update().then(e=>{o.success("Game was updated successfully"),s.setGame(e.data)}).catch(e=>{o.error("Failed to update game, please try again"),a.error("Error updating game",e)})}),e.updateBet=(()=>{-1!==e.userBet.BetId?e.userBet.update().then(e=>{o.success("Bet was updated successfully"),n.setBet(e)}).catch(e=>{o.error("Failed to update bet, please try again"),a.error("Error updating bet",e)}):n.addBet(e.userBet).then(t=>{a.log("GameCtrl: Bet "+t.BetId+" was added"),e.userBet=t,o.success("Bet was added successfully")},e=>{o.error("Failed to add bet, please try again"),a.error("Error adding bet",e)})}),e.simulateGame=(()=>{a.debug("GameCtrl: simulating game"),s.simulateGame(e.game.GameId,e.simulatedGame).then(a=>{e.users=a,e.users.forEach(a=>{angular.isDefined(a.GeneralBet)&&(a.GeneralBet.WinningTeam=e.teamsDic[a.GeneralBet.WinningTeamId].Name,a.GeneralBet.GoldenBootPlayer=c.shortName(e.playersDic[a.GeneralBet.GoldenBootPlayerId].Name))}),o.success("Table updated with simulation result")}).catch(e=>{o.error("Failed to simulate game, please try again"),a.error("Error simulating game",e)})}),e.sort=(t=>{a.debug("GameCtrl: sorting by "+t),e.gameBets=_.sortBy(e.gameBets,e=>{switch(t){case"points":return e.Points;case"cards":return e.CardsMark;case"corners":return e.CornersMark;case"user":return e.User.FirstName+e.User.LastName;case"result":return e.HomeScore+"-"+e.AwayScore}})}),e.gridOptions={...t.TABLE_GRID_OPTIONS,data:"users",onRegisterApi:a=>{e.gridApi=a,e.gridApi.colResizable.on.columnSizeChanged(e,h),e.gridApi.core.on.columnVisibilityChanged(e,h),e.gridApi.core.on.sortChanged(e,h)}},e.getTableHeight=(()=>{var t=30*(e.users?e.users.length:0)+30;return a.debug("Total Height: "+t),{height:t+"px"}}),e.goToUser=(e=>{u.path(e.entity.getUrl())}),e.getUserPlace=(a=>e.usersMap.get(a.Username).Place),e.$watch("simulatedGame",()=>{e.users=void 0},!0),e.loadTeamsForm=(()=>{e.teamsForm={},s.getTeamGames(e.game.HomeTeam.TeamId).then(a=>{v(a,e.game.HomeTeam.TeamId)}).catch(e=>{o.error("Failed to get teams form"),a.error("Failed to get teams form",e)}),s.getTeamGames(e.game.AwayTeam.TeamId).then(a=>{v(a,e.game.AwayTeam.TeamId)}).catch(e=>{o.error("Failed to get teams form"),a.error("Failed to get teams form",e)})}),e.loadTeamsForm()}]),angular.module("mundialitoApp").controller("GamesCtrl",["$scope","$log","GamesManager","games","teams","StadiumsManager","Alert",function(e,a,t,r,s,n,i){e.newGame=null,e.gamesFilter="All",e.games=r,e.teams=s,n.loadAllStadiums().then(function(a){e.stadiums=a}),e.addNewGame=function(){$(".selectpicker").selectpicker("refresh"),e.newGame=t.getEmptyGameObject()},e.saveNewGame=function(){t.addGame(e.newGame).then(function(a){i.success("Game was added successfully"),e.newGame=t.getEmptyGameObject(),e.games.push(a)})},e.isPendingUpdate=function(e){return e.IsPendingUpdate},e.updateGame=function(e){angular.isDefined(e.Stadium.Games)&&null!=e.Stadium.Games&&delete e.Stadium.Games,e.update().then(e=>{i.success("Game was updated successfully"),t.setGame(e)})}}]),angular.module("mundialitoApp").factory("GamesManager",["$http","$q","Game","$log","MundialitoUtils","User",function(e,a,t,r,s,n){var i=void 0,l=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("GamesManager: updating existing instance of game "+e),s.setData(a)):(r.debug("GamesManager: saving new instance of game "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("GamesManager: will fetch game "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("GamesManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("GamesManager: will fetch game "+a+" from server"),e.get("api/games/"+a,{tracker:"getGame"}).then(e=>{var a=s._retrieveInstance(e.data.GameId,e.data);t.resolve(a)}).catch(()=>{t.reject()})},getEmptyGameObject:function(){return{HomeTeam:"",AwayTeam:"",Date:"",Stadium:""}},addGame:function(t){var s=a.defer();angular.isObject(t.AwayTeam)||(t.AwayTeam=angular.fromJson(t.AwayTeam)),angular.isObject(t.HomeTeam)||(t.HomeTeam=angular.fromJson(t.HomeTeam)),angular.isObject(t.Stadium)||(t.Stadium=angular.fromJson(t.Stadium));var n=this;return r.debug("GamesManager: will add new game - "+angular.toJson(t)),e.post("api/games",t,{tracker:"addGame"}).then(e=>{var a=n._retrieveInstance(e.data.GameId,e.data);s.resolve(a)}).catch(function(){s.reject()}),s.promise},getGame:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllGames:function(){if(i)return i;var t=a.defer(),s=this;return r.debug("GamesManager: will fetch all games from server"),e.get("api/games",{tracker:"getGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GameId,e);a.push(t)}),t.resolve(a)}).catch(()=>{t.reject()}),i=t.promise,t.promise},loadOpenGames:function(){if(l)return l;var t=a.defer(),s=this;return r.debug("GamesManager: will fetch all open games from server"),e.get("api/games/open",{tracker:"getOpenGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GameId,e);a.push(t)}),t.resolve(a)}).catch(()=>{t.reject()}),l=t.promise,t.promise},getTeamGames:function(t){var s=a.defer(),n=this;return r.debug("GamesManager: will fetch all games of team "+t+" from server"),e.get("api/teams/"+t+"/games",{tracker:"getTeamGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.GameId,e);a.push(t)}),s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getStadiumGames:function(t){var s=a.defer(),n=this;return r.debug("GamesManager: will fetch all games in stadium "+t+" from server"),e.get("api/games/Stadium/"+t,{tracker:"getStadiumGames"}).then(function(e){var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.GameId,e);a.push(t)}),s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},simulateGame:function(t,s){var i=a.defer();return r.debug("GamesManager: will simulate game "+t),e.post("api/games/"+t+"/simulate",s,{tracker:"simulateGame"}).then(e=>{var a=[];e.data.forEach(e=>{a.push(new n(e))}),i.resolve(a)}).catch(e=>{i.reject(e)}),i.promise},setGame:function(e){r.debug("GamesManager: will set game "+e.GameId+" to -"+angular.toJson(e));var a=this._search(e.GameId);return a?a.setData(e):a=this._retrieveInstance(e.GameId,e),a}}}]),angular.module("mundialitoApp").directive("mundialitoGames",["Alert",function(e){return{restrict:"E",scope:{games:"=info",gamesType:"=filter",showOnly:"=",onAdd:"&"},templateUrl:"App/Games/gamesTemplate.html",link:a=>{a.allGames=a.games,a.$watch("gamesType",function(e){a.games=e&&"All"!==e?a.games.filter(e=>e.IsOpen):a.allGames}),a.deleteGame=(t=>{var r=t;t.delete().then(()=>{e.success("Game was deleted successfully"),a.games.splice(a.games.indexOf(r),1)})})}}}]),angular.module("mundialitoApp").factory("Alert",["toaster","$log","$rootScope",function(e,a,t){return{success:function(a){e.pop("success","Success",a)},error:function(a,t){e.pop("error",t||"Error",a)},note:function(a){e.pop("note","Info",a)}}}]),angular.module("mundialitoApp").factory("ErrorHandler",["$rootScope","$log","Alert","$location","Constants",function(e,a,t,r,s){return this.handle=((e,n,i,l)=>{if(a.log(e),!l.ignoreError){if(401===n)return localStorage.removeItem("accessToken"),sessionStorage.removeItem("accessToken"),void r.path(s.LOGIN_PATH);var o=[],u=void 0;e.Message&&(u=e.Message),e.errors&&angular.forEach(e.errors,e=>{angular.forEach(e,e=>{o.push(e)})}),e.ModelState&&angular.forEach(e.ModelState,function(e){o.push(e)}),e.ExceptionMessage&&o.push(e.ExceptionMessage),e.error_description&&o.push(e.error_description),0!==o.length||u||(u="General Error",o.push("Looks like the server is down, please try again in few minutes")),t.error(o.join("\n"),u)}}),this}]).factory("myHttpInterceptor",["ErrorHandler","$q",function(e,a){return{response:function(e){return e},responseError:function(t){return e.handle(t.data,t.status,t.headers,t.config),a.reject(t)}}}]),angular.module("mundialitoApp").factory("MundialitoUtils",["Constants",function(e){return{shouldRefreshInstance:a=>{return!(!angular.isDefined(a.LoadTime)||!angular.isDate(a.LoadTime))&&(new Date).getTime()-a.LoadTime.getTime()>e.REFRESH_TIME},shortName:e=>{if(-1!==e.indexOf(" ")){let a=e.split(" ");return a[0].substring(0,1)+"."+a[1].substring(0,1)}return e.substring(0,1)},getGameMark:(e,a)=>e.HomeTeam.TeamId===a?e.HomeScore>e.AwayScore?{game:e.GameId,mark:"W"}:e.HomeScoree.AwayScore?{game:e.GameId,mark:"L"}:e.HomeScore{var a=s._retrieveInstance(e.data.GeneralBetId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},addGeneralBet:function(t){var s=a.defer(),n=this;return r.debug("GeneralBetsManager: will add new bet - "+angular.toJson(t)),e.post("api/generalbets/",t,{tracker:"addGeneralBet"}).then(e=>{var a=n._retrieveInstance(e.data.GeneralBetId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getGeneralBet:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllGeneralBets:function(){var t=a.defer(),s=this;return r.debug("GeneralBetsManager: will fetch all general bets from server"),e.get("api/generalbets",{tracker:"getGeneralBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GeneralBetId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),t.promise},hasGeneralBet:function(t){var s=a.defer();return r.debug("GeneralBetsManager: will check if user "+t+" has general bets"),e.get("api/generalbets/has-bet/"+t,{tracker:"getUserGeneralBet"}).then(e=>{s.resolve(e.data)}).catch(e=>{s.reject(e)}),s.promise},canSubmtiGeneralBet:function(){var t=a.defer();return r.debug("GeneralBetsManager: will check if user general bets are closed"),e.get("api/generalbets/cansubmitbets/",{tracker:"getCanSubmitGeneralBets"}).then(e=>{t.resolve(e.data)}).catch(e=>{t.reject(e)}),t.promise},getUserGeneralBet:function(t){var s=a.defer(),n=this;return r.debug("GeneralBetsManager: will fetch user "+t+" general bet from server"),e.get("api/generalbets/user/"+t,{tracker:"getUserGeneralBet"}).then(e=>{var a=n._retrieveInstance(e.data.GeneralBetId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},setGeneralBet:function(e){r.debug("GeneralBetsManager: will set bet "+e.GeneralBetId+" to -"+angular.toJson(e));var a=this._search(e.GeneralBetId);return a?a.setData(e):a=this._retrieveInstance(e.GeneralBetId,e),a}}}]),angular.module("mundialitoApp").factory("Player",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)}},t}]),angular.module("mundialitoApp").factory("PlayersManager",["$http","$q","Player","$log",function(e,a,t,r){var s=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("playersPromise: updating existing instance of player "+e),s.setData(a)):(r.debug("playersPromise: saving new instance of player "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},getPlayerSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}}]},loadAllPlayers:function(){if(s)return s;var t=a.defer(),n=this;return r.debug("PlayersManager: will fetch all players from server"),e.get("api/players",{tracker:"getPlayers",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.PlayerId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),s=t.promise,t.promise}}}]),angular.module("mundialitoApp").factory("Stadium",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},delete:function(){if(confirm("Are you sure you would like to delete stadium "+this.Name))return a.debug("Stadium: Will delete stadium "+this.StadiumId),e.delete("api/stadiums/"+this.StadiumId,{tracker:"deleteStadium"})},update:function(){a.debug("Stadium: Will update stadium "+this.StadiumId);var t={};return angular.copy(this,t),delete t.Games,e.put("api/stadiums/"+this.StadiumId,t,{tracker:"editStadium"})},getUrl:function(){return"/stadiums/"+this.StadiumId}},t}]),angular.module("mundialitoApp").controller("StadiumCtrl",["$scope","$log","StadiumsManager","GamesManager","stadium","Alert",function(e,a,t,r,s,n){e.stadium=s,e.showEditForm=!1,r.getStadiumGames(e.stadium.StadiumId).then(t=>{a.debug("StadiumCtrl: Got games of stadium"),e.games=t}),e.updateStadium=(()=>{e.stadium.update().then(()=>{n.success("Stadium was updated successfully")})}),e.schema=t.getStaidumSchema()}]),angular.module("mundialitoApp").controller("StadiumsCtrl",["$scope","$log","StadiumsManager","stadiums","Alert",function(e,a,t,r,s){e.stadiums=r,e.showNewStadium=!1,e.newStadium=null,e.addNewStadium=function(){e.newStadium=t.getEmptyStadiumObject()},e.saveNewStadium=function(){t.addStadium(e.newStadium).then(a=>{s.success("Stadium was added successfully"),e.newStadium=null,e.stadiums.push(a)})},e.deleteStadium=function(a){var t=a;a.delete().then(()=>{s.success("Stadium was deleted successfully"),e.stadiums.splice(e.stadiums.indexOf(t),1)})},e.schema=t.getStaidumSchema()}]),angular.module("mundialitoApp").factory("StadiumsManager",["$http","$q","Stadium","$log","MundialitoUtils",function(e,a,t,r,s){var n=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("StadiumsManager: updating existing instance of stadium "+e),s.setData(a)):(r.debug("StadiumsManager: saving new instance of stadium "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("StadiumsManager: will fetch stadium "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("StadiumsManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("StadiumsManager: will fetch stadium "+a+" from server"),e.get("api/stadiums/"+a,{tracker:"getStadium"}).then(e=>{var a=s._retrieveInstance(e.data.StadiumId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getStaidumSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}},{property:"City",label:"City",type:"text",attr:{required:!0}},{property:"Capacity",label:"Capacity",type:"number",attr:{required:!0}}]},getEmptyStadiumObject:function(){return{HomeTeam:"",AwayTeam:""}},addStadium:function(t){var s=a.defer(),n=this;return r.debug("StadiumsManager: will add new stadium - "+angular.toJson(t)),e.post("api/stadiums",t,{tracker:"addStadium"}).then(e=>{var a=n._retrieveInstance(e.data.StadiumId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getStadium:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllStadiums:function(){if(n)return n;var t=a.defer(),s=this;return r.debug("StadiumsManager: will fetch all games from server"),e.get("api/stadiums",{tracker:"getStadiums",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.StadiumId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),n=t.promise,t.promise},setStadium:function(e){r.debug("StadiumsManager: will set stadium "+e.StadiumId+" to -"+angular.toJson(e));var a=this._search(e.StadiumId);return a?a.setData(e):a=this._retrieveInstance(e.StadiumId,e),a}}}]),angular.module("mundialitoApp").factory("Team",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e),this.Logo=this.Logo.toLowerCase(),this.Flag=this.Flag.toLowerCase()},delete:function(){if(confirm("Are you sure you would like to delete team "+this.Name))return a.debug("Team: Will delete team "+this.TeamId),e.delete("api/teams/"+this.TeamId,{tracker:"deleteTeam"})},update:function(){return a.debug("Team: Will update game "+this.TeamId),e.put("api/teams/"+this.TeamId,this,{tracker:"editTeam"})},getUrl:function(){return"/teams/"+this.TeamId}},t}]),angular.module("mundialitoApp").controller("TeamCtrl",["$scope","$log","TeamsManager","team","games","Alert","PluginsProvider","MundialitoUtils",function(e,a,t,r,s,n,i,l){e.team=r,e.games=s,e.plugins={},e.teamsForm={},e.showEditForm=!1,e.toKeyValue=(e=>_.keys(e).map(a=>({name:a,value:e[a]}))),e.IntegrationsData=e.toKeyValue(e.team.IntegrationsData),e.fromKeyValue=(e=>{let a={};return e.forEach(e=>{""!==e.name&&(a[e.name]=e.value)}),a});const o=_.chain(e.games).sortBy(e=>new Date(e.Date)).filter(e=>e.IsBetResolved).map(a=>l.getGameMark(a,e.team.TeamId)).value();e.teamsForm[e.team.TeamId]={form:o,games:_.filter(e.games,e=>e.IsBetResolved)},i.getTeamDetailsFromAll(e.team).then(a=>{a.forEach(a=>{e.plugins[a.property]={data:a.data,template:a.template}})}),e.updateTeam=(()=>{e.team.IntegrationsData=e.fromKeyValue(e.IntegrationsData),e.team.update().then(e=>{n.success("Team was updated successfully"),t.setTeam(e.data)})}),e.schema=t.getTeamSchema()}]),angular.module("mundialitoApp").controller("TeamsCtrl",["$scope","$log","TeamsManager","teams","Alert",function(e,a,t,r,s){e.teams=r,e.showNewTeam=!1,e.newTeam=null,e.addNewTeam=function(){$(".selectpicker").selectpicker("refresh"),e.newTeam=t.getEmptyTeamObject()},e.saveNewTeam=function(){t.addTeam(e.newTeam).then(function(a){s.success("Team was added successfully"),e.newTeam=null,e.teams.push(a)})},e.deleteTeam=function(a){var t=a;a.delete().then(()=>{s.success("Team was deleted successfully"),e.teams.splice(e.teams.indexOf(t),1)})},e.schema=t.getTeamSchema()}]),angular.module("mundialitoApp").factory("TeamsManager",["$http","$q","Team","$log","MundialitoUtils",function(e,a,t,r,s){return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("TeamsManager: updating existing instance of team "+e),s.setData(a)):(r.debug("TeamsManager: saving new instance of team "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("TeamsManager: will fetch team "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("TeamsManager: Instance was loaded at "+instanceLoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("TeamsManager: will fetch team "+a+" from server"),e.get("api/teams/"+a,{tracker:"getTeam"}).then(e=>{var a=s._retrieveInstance(e.data.TeamId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getTeamSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}},{property:"Flag",label:"Flag",type:"url",attr:{required:!0}},{property:"TeamPage",label:"TeamPage",type:"url",attr:{required:!1}},{property:"Logo",label:"Logo",type:"url",attr:{required:!0}},{property:"ShortName",label:"Short Name",type:"text",attr:{ngMaxlength:3,ngMinlength:3,required:!0}},{property:"TournamentTeamId",label:"Tournament Team Id",type:"number",attr:{required:!1}}]},getEmptyTeamObject:function(){return{Name:"",Flag:"",Logo:"",ShortName:"",TournamentTeamId:null,TeamPage:null}},addTeam:function(t){var s=a.defer(),n=this;return r.debug("TeamsManager: will add new team - "+angular.toJson(t)),e.post("api/teams",t,{tracker:"addTeam"}).then(e=>{var a=n._retrieveInstance(e.data.TeamId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getTeam:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllTeams:function(){var t=a.defer(),s=this;return r.debug("TeamsManager: will fetch all teams from server"),e.get("api/teams",{tracker:"getTeams",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.TeamId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),t.promise},setTeam:function(e){r.debug("TeamsManager: will set team "+e.TeamId+" to -"+angular.toJson(e));var a=this._search(e.TeamId);return a?a.setData(e):a=this._retrieveInstance(e.TeamId,e),a}}}]),angular.module("mundialitoApp").controller("ManageAppCtrl",["$scope","$log","Alert","users","teams","generalBets","UsersManager","players",function(e,a,t,r,s,n,i,l){e.users=r,e.generalBets=n,e.privateKey={},e.teamsDic={},e.playersDic={};for(var o=0;o{t.success("User was deleted successfully"),e.users.splice(e.users.indexOf(r),1)})},e.resolveBet=function(e){e.resolve().then(()=>{t.success("General bet was resolved successfully")})},e.generateKey=function(){e.privateKey.key="",i.generatePrivateKey(e.privateKey.email).then(function(t){a.debug("ManageAppCtrl: got private key "+t),e.privateKey.key=t})},e.makeAdmin=function(e){e.makeAdmin().then(()=>{t.success("User was is now admin"),e.IsAdmin=!0})}}]),angular.module("mundialitoApp").factory("User",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},getUrl:function(){return"/users/"+this.Username},delete:function(){if(confirm("Are you sure you would like to delete user "+this.Username))return a.debug("User: Will delete user "+this.Username),e.delete("api/users/"+this.Id,{tracker:"deleteUser"})},makeAdmin:function(){if(confirm("Are you sure you would like to make "+this.Name+" Admin?"))return a.debug("User: Will make user "+this.Username+" admin"),e.post("api/users/makeadmin/"+this.Id,{tracker:"makeAdmin"})}},t}]),angular.module("mundialitoApp").controller("UserProfileCtrl",["$scope","$log","UsersManager","Alert","GeneralBetsManager","profileUser","userGameBets","teams","generalBetsAreOpen","players",function(e,a,t,r,s,n,i,l,o,u){e.profileUser=n,e.userGameBets=i,e.teams=l,e.players=u,e.noGeneralBetWasSubmitted=!1,e.generalBetsAreOpen=!0===o,a.debug("UserProfileCtrl: generalBetsAreOpen = "+o),e.alreadyFollow=e.security.user.Followees.includes(e.profileUser.Username),e.isLoggedUserProfile=(()=>{var t=null!=e.security.user&&e.security.user.Username===e.profileUser.Username;return a.debug("UserProfileCtrl: isLoggedUserProfile = "+t),null!=e.security.user&&e.security.user.Username===e.profileUser.Username}),e.isGeneralBetClosed=(()=>{var t=!e.generalBetsAreOpen;return a.debug("UserProfileCtrl: isGeneralBetClosed = "+t),t}),e.isGeneralBetReadOnly=(()=>{var t=!e.isLoggedUserProfile()||e.isGeneralBetClosed();return a.debug("UserProfileCtrl: isGeneralBetReadOnly = "+t),t}),e.shoudLoadGeneralBet=(()=>{var t=e.isLoggedUserProfile()||e.isGeneralBetClosed();return a.debug("UserProfileCtrl: shoudLoadGeneralBet = "+t),t}),e.shoudLoadGeneralBet()&&s.hasGeneralBet(e.profileUser.Username).then(t=>{if(a.debug("UserProfileCtrl: hasGeneralBet = "+t),!0===t)s.getUserGeneralBet(e.profileUser.Username).then(t=>{a.info("UserProfileCtrl: got user general bet - "+angular.toJson(t)),e.generalBet=t});else{if(e.generalBet={},e.isGeneralBetClosed())return void(e.noGeneralBetWasSubmitted=!0);if(e.isLoggedUserProfile()&&!e.isGeneralBetClosed())return;e.noGeneralBetWasSubmitted=!0}}),e.saveGeneralBet=(()=>{angular.isDefined(e.generalBet.GeneralBetId)?e.generalBet.update().then(()=>{r.success("General Bet was updated successfully")},()=>{r.error("Failed to update General Bet, please try again")}):s.addGeneralBet(e.generalBet).then(t=>{a.log("UserProfileCtrl: General Bet "+t.GeneralBetId+" was added"),e.generalBet=t,r.success("General Bet was added successfully")},()=>{r.error("Failed to add General Bet, please try again")})}),e.social=(()=>{e.alreadyFollow?t.unfollow(e.profileUser.Username).then(()=>{e.alreadyFollow=!1;const a=e.security.user.Followees.indexOf(e.profileUser.Username);e.security.user.Followees.splice(a,1),r.success("You no longer following "+e.profileUser.Username)}).catch(a=>{r.error("Failed to unfollow "+e.profileUser.Username+": "+a)}):t.follow(e.profileUser.Username).then(()=>{e.alreadyFollow=!0,e.security.user.Followees.push(e.profileUser.Username),r.success("You are now following "+e.profileUser.Username)}).catch(a=>{r.error("Failed to follow "+e.profileUser.Username+": "+a)})}),t.getSocial(e.profileUser.Username).then(t=>{a.log("UserProfileCtrl: Got social response"),e.followers=t.followers,e.followees=t.followees}),e.isLoggedUserProfile()?t.getMyStats().then(a=>{e.performance=a}).catch(e=>{a.error("Failed to get user slef statistics",e),r.error("Failed to fetch user statistics: "+e)}):t.getStats(e.profileUser.Username).then(a=>{e.performance=a}).catch(e=>{a.error("Failed to get user statistics",e),r.error("Failed to fetch user statistics: "+e)})}]),angular.module("mundialitoApp").factory("UsersManager",["$http","$q","User","$log","MundialitoUtils",function(e,a,t,r,s){var n=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("UsersManager: updating existing instance of user "+e),s.setData(a)):(r.debug("UsersManager: saving new instance of user "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("UsersManager: will fetch user "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("UsersManager: Instance was loaded at "+a,LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("UsersManager: will fetch user "+a+" from server"),e.get("api/users/"+a,{tracker:"getUser"}).then(e=>{var a=s._retrieveInstance(e.data.Username,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getUser:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},generatePrivateKey:function(t){var s=a.defer();return r.debug("UsersManager: will generate private key for "+t),e.get("api/users/generateprivatekey/"+encodeURIComponent(t)+"/",{tracker:"generatePrivateKey"}).then(e=>{s.resolve(e.data)}).catch(e=>{s.reject(e)}),s.promise},getSocial:a=>(r.debug("UsersManager: will fetch followers and followees of user "+a),e.get("api/users/"+a+"/followees",{tracker:"getSocial"}).then(t=>e.get("api/users/"+a+"/followers",{tracker:"getSocial"}).then(e=>({followers:e.data,followees:t.data})))),getMyStats:()=>(r.debug("UsersManager: will the stats of logged user"),e.get("api/stats/me",{tracker:"getStats"}).then(e=>e.data)),getStats:a=>(r.debug("UsersManager: will the stats of "+a),e.get("api/stats/"+a,{tracker:"getStats"}).then(e=>e.data)),follow:a=>(r.debug("UsersManager: will follow "+a),e.post("api/users/follow/"+a,void 0,{tracker:"follow"})),unfollow:a=>(r.debug("UsersManager: will unfollow "+a),e.delete("api/users/follow/"+a,void 0,{tracker:"unfollow"})),loadAllUsers:function(){if(n)return n;var t=a.defer(),s=this;return r.debug("UsersManager: will fetch all users from server"),e.get("api/users",{tracker:"getUsers"}).then(e=>{var a=[];e.data.forEach(function(e){var t=s._retrieveInstance(e.Username,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),n=t.promise,t.promise},setUser:function(e){r.debug("UsersManager: will set user "+e.Username+" to -"+angular.toJson(e));var a=this._search(e.Username);return a?a.setData(e):a=this._retrieveInstance(e.Username,e),a}}}]),angular.module("mundialitoApp").factory("FootballDataGamePlugin",["$q","$rootScope","GenericProxyService",function(e,a,t){var r="https://api.football-data.org/v4/matches/";const s="football-data";return{getGameDetails:function(n){var i=r+n.IntegrationsData[s];return a.mundialitoApp.clientConfig&&a.mundialitoApp.clientConfig["football-data-api-key"]?t.proxyRequest("GET",i,void 0,{"X-Auth-Token":a.mundialitoApp.clientConfig["football-data-api-key"]}).then(e=>({data:e,property:"odds",template:"App/General/Plugins/FootballDataGameTemplate.html"})).catch(a=>e.reject(a)):e.reject("Skipping football-data as no api key provided")},integrationKey:s}}]),angular.module("mundialitoApp").factory("FootballDataTeamStatsPlugin",["$q","$rootScope","GenericProxyService",function(e,a,t){var r="https://api.football-data.org/v4/teams/";const s="football-data";function n(e){return(new Date).getFullYear()-parseInt(e.substring(0,4),10)}return{getTeamDetails:function(i){var l=r+i.IntegrationsData[s];return a.mundialitoApp.clientConfig&&a.mundialitoApp.clientConfig["football-data-api-key"]?t.proxyRequest("GET",l,void 0,{"X-Auth-Token":a.mundialitoApp.clientConfig["football-data-api-key"]}).then(e=>(e.coach.age=n(e.coach.dateOfBirth),e.squad.forEach(e=>{e.age=n(e.dateOfBirth),e.icon="goalkeeper"===e.position.toLowerCase()?"goalkeeper":"player"}),{data:e,property:"team-squad",template:"App/General/Plugins/FootballDataTeamStatsTemplate.html"})).catch(a=>e.reject(a)):e.reject("Skipping football-data as no api key provided")},integrationKey:s}}]),angular.module("mundialitoApp").factory("GenericProxyService",["$http","$q",function(e,a){var t="api/genericproxy";return{proxyRequest:function(r,s,n,i){var l=a.defer();return e({method:r,url:t+"?url="+s,data:n,headers:i,ignoreError:!0}).then(e=>{l.resolve(e.data)}).catch(e=>{l.reject(e)}),l.promise}}}]),angular.module("mundialitoApp").factory("PluginsProvider",["$q","$log",function(e,a){var t=[],r=[];return{getGameDetailsFromAll:function(r){let s=[];r.IntegrationsData&&(s=_.filter(t,e=>void 0!==r.IntegrationsData[e.integrationKey]));var n=s.map(e=>e.getGameDetails(r));return e.all(n).then(e=>e).catch(t=>(a.warn("Error fetching game details: "+t),e.reject(t)))},getTeamDetailsFromAll:function(t){let s=[];t.IntegrationsData&&(s=_.filter(r,e=>void 0!==t.IntegrationsData[e.integrationKey]));var n=s.map(e=>e.getTeamDetails(t));return e.all(n).then(e=>e).catch(t=>(a.warn("Error fetching team details: "+t),e.reject(t)))},registerGameFactory:e=>{t.push(e)},registerTeamFactory:e=>{r.push(e)}}}]); \ No newline at end of file +angular.module("mundialitoApp",["key-value-editor","security","ngSanitize","ngRoute","ngAnimate","ui.bootstrap","autofields.bootstrap","cgBusy","ajoslin.promise-tracker","ui.select","ui.bootstrap.datetimepicker","ui.grid","ui.grid.autoResize","googlechart","toaster","ui.grid.saveState","ui.grid.resizeColumns","ui.toggle"]).value("cgBusyTemplateName","App/Partials/angular-busy.html").config(["$routeProvider","$httpProvider","$locationProvider","$parseProvider","securityProvider","Constants",function(e,a,t,r,s,n){t.html5Mode(!0),a.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",a.interceptors.push("myHttpInterceptor"),s.urls.login=n.LOGIN_PATH,s.usePopups=!1,e.when("/",{templateUrl:"App/Dashboard/Dashboard.html",controller:"DashboardCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()],players:["PlayersManager",e=>e.loadAllPlayers()]}}).when("/bets_center",{templateUrl:"App/Bets/BetsCenter.html",controller:"BetsCenterCtrl",resolve:{games:["GamesManager",e=>e.loadOpenGames()]}}).when("/users/:username",{templateUrl:"App/Users/UserProfile.html",controller:"UserProfileCtrl",resolve:{profileUser:["$route","UsersManager",(e,a)=>{var t=e.current.params.username;return a.getUser(t,!0)}],userGameBets:["$route","BetsManager",(e,a)=>{var t=e.current.params.username;return a.getUserBets(t)}],teams:["TeamsManager",e=>e.loadAllTeams()],generalBetsAreOpen:["GeneralBetsManager",e=>e.canSubmtiGeneralBet()],players:["PlayersManager",e=>e.loadAllPlayers()],allUsers:["UsersManager",e=>e.loadAllUsers()]}}).when("/manage_users",{templateUrl:"App/Users/ManageApp.html",controller:"ManageAppCtrl",resolve:{users:["UsersManager",e=>e.loadAllUsers()],teams:["TeamsManager",e=>e.loadAllTeams()],generalBets:["GeneralBetsManager",e=>e.loadAllGeneralBets()],players:["PlayersManager",e=>e.loadAllPlayers()]}}).when("/teams",{templateUrl:"App/Teams/Teams.html",controller:"TeamsCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()]}}).when("/teams/:teamId",{templateUrl:"App/Teams/Team.html",controller:"TeamCtrl",resolve:{team:["$route","TeamsManager",(e,a)=>{var t=e.current.params.teamId;return a.getTeam(t)}],games:["$route","GamesManager",(e,a)=>{var t=e.current.params.teamId;return a.getTeamGames(t)}]}}).when("/games/:gameId",{templateUrl:"App/Games/Game.html",controller:"GameCtrl",resolve:{teams:["TeamsManager",e=>e.loadAllTeams()],players:["PlayersManager",e=>e.loadAllPlayers()],game:["$route","GamesManager",(e,a)=>{var t=e.current.params.gameId;return a.getGame(t)}],userBet:["$route","BetsManager",(e,a)=>{var t=e.current.params.gameId;return a.getUserBetOnGame(t)}]}}).when("/games",{templateUrl:"App/Games/Games.html",controller:"GamesCtrl",resolve:{games:["GamesManager",e=>e.loadAllGames()],teams:["TeamsManager",e=>e.loadAllTeams()]}}).when("/stadiums/:stadiumId",{templateUrl:"App/Stadiums/Stadium.html",controller:"StadiumCtrl",resolve:{stadium:["$q","$route","StadiumsManager",(e,a,t)=>{var r=a.current.params.stadiumId;return t.getStadium(r,!0)}]}}).when("/stadiums",{templateUrl:"App/Stadiums/Stadiums.html",controller:"StadiumsCtrl",resolve:{stadiums:["StadiumsManager",e=>e.loadAllStadiums()]}}).when("/login",{templateUrl:"App/Accounts/Login.html"}).when("/forgot",{templateUrl:"App/Accounts/ForgetPassword.html",controller:"ForgetPasswordCtrl"}).when("/reset",{templateUrl:"App/Accounts/ResetPassword.html",controller:"ResetPasswordCtrl"}).when("/join",{templateUrl:"App/Accounts/Register.html"}).when("/manage",{templateUrl:"App/Accounts/Manage.html"}).otherwise({redirectTo:"/"})}]).run(["$rootScope","$log","security","$route","$location","PluginsProvider","FootballDataGamePlugin","FootballDataTeamStatsPlugin",function(e,a,t,r,s,n,i,o){n.registerGameFactory(i),n.registerTeamFactory(o),t.events.login=function(t,r){a.log("Current user details: "+angular.toJson(r)),e.mundialitoApp.authenticating=!1},t.events.reloadUser=function(t,r){a.log("User reloaded"+angular.toJson(r)),e.mundialitoApp.authenticating=!1},t.events.logout=function(e){a.log("User logged out"),e.authenticate()},e.mundialitoApp={params:null,loading:!0,authenticating:!0,message:null},["/reset","/forgot","/join","/login"].includes(s.$$path)||(a.log("Starting authentication"),t.authenticate()),e.security=t,e.$on("$locationChangeStart",function(){a.debug("$locationChangeStart"),e.mundialitoApp.loading=!0}),e.$on("$locationChangeSuccess",function(){a.debug("$locationChangeSuccess"),e.mundialitoApp.params=angular.copy(r.current.params),e.mundialitoApp.loading=!1}),e.$on("$routeChangeStart",function(){a.debug("$routeChangeStart"),e.mundialitoApp.message="Loading..."}),e.$on("$routeChangeSuccess",function(){a.debug("$routeChangeSuccess"),e.mundialitoApp.message=null})}]),angular.module("mundialitoApp").constant("Constants",{LOGIN_PATH:"/login",REFRESH_TIME:3e5,TABLE_GRID_OPTIONS:{saveWidths:!0,saveVisible:!0,saveOrder:!0,enableRowSelection:!1,enableSelectAll:!1,multiSelect:!1,rowTemplate:'
',columnDefs:[{field:"Place",displayName:"",resizable:!1,maxWidth:30},{field:"Name",displayName:"Name",resizable:!0,minWidth:115},{field:"Points",displayName:"Points",resizable:!0,minWidth:45,maxWidth:75},{field:"GeneralBet.WinningTeam",displayName:"Team",resizable:!1,maxWidth:45,cellTemplate:'
'},{field:"GeneralBet.GoldenBootPlayer",displayName:"Player",resizable:!1,minWidth:50,maxWidth:50},{field:"Marks",displayName:"Marks",resizable:!0},{field:"Results",displayName:"Results",resizable:!0},{field:"YellowCards",displayName:"Yellow Cards Marks",maxWidth:55,resizable:!1,headerCellTemplate:'
'},{field:"Corners",displayName:"Corners Marks",maxWidth:55,resizable:!1,headerCellTemplate:'
'},,{field:"PlaceDiff",displayName:"",resizable:!1,maxWidth:45,cellTemplate:"
{{::COL_FIELD}}
"}]}}),angular.module("mundialitoApp").controller("ForgetPasswordCtrl",["$scope","$rootScope","security","Alert",function(e,a,t,r){a.mundialitoApp.authenticating=!1;e.user=new function(){return{Email:""}},e.forget=function(){e.emailForm.$valid&&(a.mundialitoApp.message="Processing...",t.forgotPassword(angular.copy(e.user)).then(()=>{r.success("Reset password token was sent to your email, please follow the link from there")}).catch(e=>{r.error("Failed to generate reset password token: "+e)}).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"Email",label:"Email Address",type:"email",attr:{required:!0}}]}]),angular.module("mundialitoApp").controller("LoginCtrl",["$scope","$rootScope","security",function(e,a,t){a.mundialitoApp.authenticating=!1;e.user=new function(){return{username:"",password:"",rememberMe:!1}},e.login=function(){e.loginForm.$valid&&(a.mundialitoApp.message="Processing Login...",t.login(angular.copy(e.user)).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"username",type:"text",attr:{ngMinlength:4,required:!0}},{property:"password",type:"password",attr:{ngMinlength:4,required:!0}},{property:"rememberMe",label:"Keep me logged in",type:"checkbox"}]}]),angular.module("mundialitoApp").controller("ManageCtrl",["$scope","Alert",function(e,a){var t=function(){return{oldPassword:"",newPassword:"",confirmPassword:""}};e.changingPassword=null,e.changePassword=function(){e.changingPassword=new t},e.cancel=function(){e.changingPassword=null},e.updatePassword=function(){if(e.manageForm.$valid){var t=angular.copy(e.changingPassword);e.changingPassword=null,e.security.changePassword(t).then(function(){a.success("Password was changed sucessfully")},function(){a.error("Failed to change password"),e.changingPassword=t})}},e.changePasswordSchema=[{property:"oldPassword",type:"password",attr:{required:!0}},{property:"newPassword",type:"password",attr:{ngMinlength:4,required:!0}},{property:"confirmPassword",type:"password",attr:{confirmPassword:"changingPassword.newPassword",required:!0}}]}]),angular.module("mundialitoApp").controller("RegisterCtrl",["$scope","security",function(e,a){e.mundialitoApp.authenticating=!1;e.user=new function(){return{firstname:"",lastname:"",email:"",username:"",password:"",confirmPassword:""}},e.join=function(){e.joinForm.$valid&&(e.isJoinActive=!0,e.mundialitoApp.message="Processing Registration...",a.register(angular.copy(e.user)).finally(function(){e.mundialitoApp.message=null,e.isJoinActive=!1}))},e.schema=[{property:"firstname",label:"First Name",type:"text",attr:{required:!0}},{property:"lastname",label:"Last Name",type:"text",attr:{required:!0}},{property:"email",label:"Email Address",type:"email",attr:{required:!0}},{property:"username",type:"text",attr:{ngMinlength:4,required:!0}},{property:"password",type:"password",attr:{required:!0}},{property:"confirmPassword",label:"Confirm Password",type:"password",attr:{confirmPassword:"user.password",required:!0}}],!0===e.mundialitoApp.protect&&(e.user.privateKey="",e.schema.push({property:"privateKey",help:"The Private Key was given in the e-mail of the payment confirmation",label:"Private Key",type:"text",attr:{required:!0}}))}]),angular.module("mundialitoApp").controller("ResetPasswordCtrl",["$scope","$rootScope","security","$location","Alert",function(e,a,t,r,s){a.mundialitoApp.authenticating=!1;e.user=new function(){return{confirmPassword:"",password:"",email:r.search().email,token:r.search().token}},e.reset=function(){e.resetForm.$valid&&(a.mundialitoApp.message="Processing Reset Password...",t.resetPassword(angular.copy(e.user)).then(()=>{s.success("Your was was reset successfully")}).finally(function(){a.mundialitoApp.message=null}))},e.schema=[{property:"password",type:"password",attr:{required:!0}},{property:"confirmPassword",label:"Confirm Password",type:"password",attr:{confirmPassword:"user.password",required:!0}}]}]),angular.module("mundialitoApp").factory("Bet",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},update:function(){return a.debug("Bet: Will update bet "+this.BetId),e.put("api/bets/"+this.BetId,this,{tracker:"updateBet"})},getGameUrl:function(){return"/games/"+this.Game.GameId},getClass:function(){return 7===this.Points?"success":this.Points>=5?"primary":this.Points>=3?"info":this.Points>0?"warning":"danger"}},t}]),angular.module("mundialitoApp").controller("BetsCenterCtrl",["$scope","$log","$timeout","Alert","BetsManager","games",function(e,a,t,r,s,n){e.games=n,e.bets={};var i=function(){angular.isDefined(e.security.user)&&null!=e.security.user?e.getUserBetsPromise=s.getUserBets(e.security.user.Username).then(t=>{for(var r=0;r{r.success("Bet was updated successfully"),s.setBet(e)}).catch(function(){r.error("Failed to update Bet, please try again")})):(a.debug("BetsCenterCtrl: Will create new bet"),s.addBet(e.bets[t]).then(function(s){a.log("BetsCenterCtrl: Bet "+s.BetId+" was added"),e.bets[t]=s,r.success("Bet was added successfully")}).catch(function(){r.error("Failed to add Bet, please try again")}))},e.shuffleBet=function(t){var r,s,n=["1","X","2"],i=[0,0,0,0,1,1,1,1,2,2,3,3,4,5],o=n[Math.floor(3*Math.random())];do{r=i[Math.floor(Math.random()*i.length)],s=i[Math.floor(Math.random()*i.length)]}while("X"!==o&&r===s);a.debug("Random game mark is "+o),"X"===o&&(s=r),a.debug("Home goals: "+r),a.debug("Away goals: "+s),e.bets[t].HomeScore=r,e.bets[t].AwayScore=s,e.bets[t].CardsMark=n[Math.floor(3*Math.random())],e.bets[t].CornersMark=n[Math.floor(3*Math.random())]}}]),angular.module("mundialitoApp").factory("BetsManager",["$http","$q","Bet","$log","MundialitoUtils","GamesManager",function(e,a,t,r,s,n){return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("BetsManager: updating existing instance of bet "+e),s.setData(a)):(r.debug("BetsManager: saving new instance of bet "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("BetsManager: will fetch bet "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("BetsManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("BetsManager: will fetch bet "+a+" from server"),e.get("api/bets/"+a,{tracker:"getBet"}).then(e=>{var a=s._retrieveInstance(e.data.BetId,e.data);t.resolve(a)}).catch(()=>{t.reject()})},addBet:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will add new bet - "+angular.toJson(t)),e.post("api/bets/",t,{tracker:"addBetOnGame"}).then(e=>{var a=n._retrieveInstance(e.data.BetId,e.data);s.resolve(a)}).catch(e=>{r.error("Failed to add bet"),s.reject(e)}),s.promise},getBet:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},getGameBets:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch all bets of game "+t+" from server"),e.get("api/games/"+t+"/bets",{tracker:"getGameBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.BetId,e);a.push(t)}),s.resolve(a)}).catch(function(){s.reject()}),s.promise},getUserBets:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch user "+t+" bets from server"),e.get("api/bets/user/"+t,{tracker:"getUserBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.BetId,e);a.push(t)}),s.resolve(a)}).catch(function(){s.reject()}),s.promise},getUserBetOnGame:function(t){var s=a.defer(),n=this;return r.debug("BetsManager: will fetch user bet of game "+t+" from server"),e.get("api/games/"+t+"/mybet",{tracker:"getUserBetOnGame"}).then(e=>{if(-1!=e.data.BetId){var a=n._retrieveInstance(e.data.BetId,e.data);s.resolve(a)}s.resolve(e.data)}).catch(()=>{s.reject()}),s.promise},setBet:function(e){r.debug("BetsManager: will set bet "+e.BetId+" to -"+angular.toJson(e));var a=this._search(e.BetId);return a?a.setData(e):a=this._retrieveInstance(e.BetId,e),a}}}]),angular.module("mundialitoApp").controller("DashboardCtrl",["$scope","$log","Constants","$location","$timeout","GamesManager","UsersManager","GeneralBetsManager","teams","players","BetsManager","MundialitoUtils",function(e,a,t,r,s,n,i,o,l,u,d,m){e.generalBetsAreOpen=!1,e.submittedGeneralBet=!0,e.pendingUpdateGames=!1,e.oneAtATime=!0,e.status={},e.teamsDic={},e.playersDic={},e.toggleValue={},e.players=u,e.changed=(a=>{e.toggleValue[a.GameId]?(e.selectedDic[a.GameId]=e.marksDic[a.GameId],e.selectedPercentage[a.GameId]=e.marksPercentage[a.GameId]):(e.selectedDic[a.GameId]=e.resultsDic[a.GameId],e.selectedPercentage[a.GameId]=e.resultsPercentage[a.GameId])});for(var c=0;c{e.games=t,e.resultsDic={},e.marksDic={},e.selectedDic={},e.resultsPercentage={},e.marksPercentage={},e.selectedPercentage={},e.pendingUpdateGames=void 0!==_.findWhere(e.games,{IsPendingUpdate:!0}),e.pendingUpdateGamesFolloweesBets={},a.info("DashboardCtrl: followees:"+e.security.user.Followees),_.filter(e.games,e=>e.IsPendingUpdate).forEach(a=>{d.getGameBets(a.GameId).then(t=>{let r=_.groupBy(t,e=>e.HomeScore+"-"+e.AwayScore),s=_.groupBy(t,e=>e.HomeScore===e.AwayScore?"X":e.HomeScore>e.AwayScore?e.Game.HomeTeam.ShortName:e.Game.AwayTeam.ShortName);e.resultsDic[a.GameId]=Object.entries(r).sort((e,a)=>a[1].length-e[1].length),e.marksDic[a.GameId]=Object.entries(s).sort((e,a)=>a[1].length-e[1].length),e.resultsPercentage[a.GameId]={},e.resultsDic[a.GameId].forEach(r=>{e.resultsPercentage[a.GameId][r[0]]=Math.round(r[1].length/t.length*100)}),e.marksPercentage[a.GameId]={},e.marksDic[a.GameId].forEach(r=>{e.marksPercentage[a.GameId][r[0]]=Math.round(r[1].length/t.length*100)});let n=_.filter(t,a=>e.security.user.Followees.includes(a.User.Username)||e.security.user.Username===a.User.Username);e.pendingUpdateGamesFolloweesBets[a.GameId]=n,e.changed(a)})})});var g=()=>{angular.isDefined(e.security.user)&&null!=e.security.user?o.hasGeneralBet(e.security.user.Username).then(a=>{e.submittedGeneralBet=!0===a}):(a.debug("DashboardCtrl: user info not loaded yet, will retry in 1 second"),s(g,1e3))};function p(){var a=e.gridApi.saveState.save();localStorage.setItem("gridState",a)}g(),o.canSubmtiGeneralBet().then(a=>{e.generalBetsAreOpen=!0===a,e.generalBetsAreOpen||o.loadAllGeneralBets().then(function(a){e.generalBets=a,e.winningTeams={},e.winningPlayers={};for(var t=0;t{e.users=a,e.users.forEach(a=>{angular.isDefined(a.GeneralBet)&&(a.GeneralBet.WinningTeam=e.teamsDic[a.GeneralBet.WinningTeamId].Name,a.GeneralBet.GoldenBootPlayer=m.shortName(e.playersDic[a.GeneralBet.GoldenBootPlayerId].Name))}),e.usersDic=a.reduce((e,a)=>(e[a.Id]=a,e),{})}),e.isOpenForBetting=(e=>e.IsOpen),e.isPendingUpdate=(e=>e.IsPendingUpdate),e.isDecided=function(e){return!e.IsOpen&&!e.IsPendingUpdate},e.isGameBet=(e=>a=>a.Game.GameId===e.GameId),e.hasBets=(a=>void 0!==e.pendingUpdateGamesFolloweesBets[a.GameId]&&e.pendingUpdateGamesFolloweesBets[a.GameId].length>0),e.gridOptions={...t.TABLE_GRID_OPTIONS,data:"users",onRegisterApi:a=>{e.gridApi=a,e.gridApi.colResizable.on.columnSizeChanged(e,p),e.gridApi.core.on.columnVisibilityChanged(e,p),e.gridApi.core.on.sortChanged(e,p)}},e.test=((e,a)=>""),e.getTableHeight=(()=>{var t=30*(e.users?e.users.length:0)+30;return a.debug("Total Height: "+t),{height:t+"px"}}),e.goToUser=(e=>{r.path(e.entity.getUrl())})}]),angular.module("mundialitoApp").factory("Game",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},delete:function(){if(confirm("Are you sure you would like to delete game "+this.GameId))return a.debug("Game: Will delete game "+this.GameId),e.delete("api/games/"+this.GameId,{tracker:"deleteGame"})},update:function(){return a.debug("Game: Will update game "+this.GameId),e.put("api/games/"+this.GameId,this,{tracker:"editGame"})},getUrl:function(){return"/games/"+this.GameId}},t}]),angular.module("mundialitoApp").controller("GameCtrl",["$scope","$log","Constants","UsersManager","GamesManager","BetsManager","game","userBet","Alert","$location","PluginsProvider","keyValueEditorUtils","MundialitoUtils","teams","players",function(e,a,t,r,s,n,i,o,l,u,d,m,c,g,p){e.game=i,e.teamsDic={},e.playersDic={},e.simulatedGame={},e.plugins={},e.userBet=o,e.userBet.GameId=i.GameId,e.showEditForm=!1,e.toKeyValue=(e=>_.keys(e).map(a=>({name:a,value:e[a]}))),e.integrationsData=e.toKeyValue(e.game.IntegrationsData);for(var f=0;fnew Date(e.Date)).filter(e=>e.IsBetResolved).map(e=>c.getGameMark(e,t)).value();e.teamsForm[t]={form:r,games:_.filter(a,e=>e.IsBetResolved)}}d.getGameDetailsFromAll(e.game).then(a=>{a.forEach(a=>{e.plugins[a.property]={data:a.data,template:a.template}})}),e.game.IsOpen||(e.getGameBetsPromsie=n.getGameBets(e.game.GameId).then(t=>{a.debug("GameCtrl: get game bets"+angular.toJson(t)),e.gameBets=t;var s={type:"PieChart",options:{displayExactValues:!0,is3D:!0,backgroundColor:{fill:"transparent"},chartArea:{left:10,top:20,bottom:0,height:"100%"},title:"Bets Distribution"}},n=_.filter(t,function(e){return e.HomeScore>e.AwayScore}).length,i=_.filter(t,function(e){return e.HomeScore===e.AwayScore}).length,o=_.filter(t,function(e){return e.HomeScore{e.usersMap=new Map,a.forEach(a=>{e.usersMap.set(a.Username,a)});let t=_.chain(a).filter(a=>e.security.user.Followees.includes(a.Username)).pluck("Username").value();e.followeesBets=_.filter(e.gameBets,e=>t.includes(e.User.Username));let r=_.chain(a).first(3).pluck("Username").value();e.top3UsersBets=_.filter(e.gameBets,e=>r.includes(e.User.Username));let s=0;a.forEach((a,t)=>{a.Username===e.security.user.Username&&(s=t)});let n=Math.max(s-3,0),i=Math.min(s+3,a.length),o=_.chain(a.slice(n,i+1)).pluck("Username").filter(a=>a!==e.security.user.Username).value();e.neighborsBets=_.filter(e.gameBets,e=>o.includes(e.User.Username))})})),e.updateGame=(()=>{angular.isDefined(i.Stadium.Games)&&null!=i.Stadium.Games&&delete i.Stadium.Games,e.game.IntegrationsData=m.mapEntries(m.compactEntries(e.integrationsData)),e.updateGamePromise=e.game.update().then(e=>{l.success("Game was updated successfully"),s.setGame(e.data)}).catch(e=>{l.error("Failed to update game, please try again"),a.error("Error updating game",e)})}),e.updateBet=(()=>{-1!==e.userBet.BetId?e.updateBetPromise=e.userBet.update().then(e=>{l.success("Bet was updated successfully"),n.setBet(e)}).catch(e=>{l.error("Failed to update bet, please try again"),a.error("Error updating bet",e)}):n.addBet(e.userBet).then(t=>{a.log("GameCtrl: Bet "+t.BetId+" was added"),e.userBet=t,l.success("Bet was added successfully")},e=>{l.error("Failed to add bet, please try again"),a.error("Error adding bet",e)})}),e.simulateGame=(()=>{a.debug("GameCtrl: simulating game"),e.simulateGamePromise=s.simulateGame(e.game.GameId,e.simulatedGame).then(a=>{e.users=a,e.users.forEach(a=>{angular.isDefined(a.GeneralBet)&&(a.GeneralBet.WinningTeam=e.teamsDic[a.GeneralBet.WinningTeamId].Name,a.GeneralBet.GoldenBootPlayer=c.shortName(e.playersDic[a.GeneralBet.GoldenBootPlayerId].Name))}),l.success("Table updated with simulation result")}).catch(e=>{l.error("Failed to simulate game, please try again"),a.error("Error simulating game",e)})}),e.sort=(t=>{a.debug("GameCtrl: sorting by "+t),e.gameBets=_.sortBy(e.gameBets,e=>{switch(t){case"points":return e.Points;case"cards":return e.CardsMark;case"corners":return e.CornersMark;case"user":return e.User.FirstName+e.User.LastName;case"result":return e.HomeScore+"-"+e.AwayScore}})}),e.gridOptions={...t.TABLE_GRID_OPTIONS,data:"users",onRegisterApi:a=>{e.gridApi=a,e.gridApi.colResizable.on.columnSizeChanged(e,h),e.gridApi.core.on.columnVisibilityChanged(e,h),e.gridApi.core.on.sortChanged(e,h)}},e.getTableHeight=(()=>{var t=30*(e.users?e.users.length:0)+30;return a.debug("Total Height: "+t),{height:t+"px"}}),e.goToUser=(e=>{u.path(e.entity.getUrl())}),e.getUserPlace=(a=>e.usersMap.get(a.Username).Place),e.$watch("simulatedGame",()=>{e.users=void 0},!0),e.loadTeamsForm=(()=>{e.teamsForm={},e.getTeamGamesPromise=s.getTeamGames(e.game.HomeTeam.TeamId).then(a=>{v(a,e.game.HomeTeam.TeamId)}).catch(e=>{l.error("Failed to get teams form"),a.error("Failed to get teams form",e)}),s.getTeamGames(e.game.AwayTeam.TeamId).then(a=>{v(a,e.game.AwayTeam.TeamId)}).catch(e=>{l.error("Failed to get teams form"),a.error("Failed to get teams form",e)})}),e.loadTeamsForm()}]),angular.module("mundialitoApp").controller("GamesCtrl",["$scope","$log","GamesManager","games","teams","StadiumsManager","Alert",function(e,a,t,r,s,n,i){e.newGame=null,e.gamesFilter="All",e.games=r,e.teams=s,n.loadAllStadiums().then(function(a){e.stadiums=a}),e.addNewGame=function(){$(".selectpicker").selectpicker("refresh"),e.newGame=t.getEmptyGameObject()},e.saveNewGame=function(){e.addGamePromise=t.addGame(e.newGame).then(function(a){i.success("Game was added successfully"),e.newGame=t.getEmptyGameObject(),e.games.push(a)})},e.isPendingUpdate=function(e){return e.IsPendingUpdate},e.updateGame=function(a){angular.isDefined(a.Stadium.Games)&&null!=a.Stadium.Games&&delete a.Stadium.Games,e.editGamePromise=a.update().then(e=>{i.success("Game was updated successfully"),t.setGame(e)})}}]),angular.module("mundialitoApp").factory("GamesManager",["$http","$q","Game","$log","MundialitoUtils","User",function(e,a,t,r,s,n){var i=void 0,o=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("GamesManager: updating existing instance of game "+e),s.setData(a)):(r.debug("GamesManager: saving new instance of game "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("GamesManager: will fetch game "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("GamesManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("GamesManager: will fetch game "+a+" from server"),e.get("api/games/"+a,{tracker:"getGame"}).then(e=>{var a=s._retrieveInstance(e.data.GameId,e.data);t.resolve(a)}).catch(()=>{t.reject()})},getEmptyGameObject:function(){return{HomeTeam:"",AwayTeam:"",Date:"",Stadium:""}},addGame:function(t){var s=a.defer();angular.isObject(t.AwayTeam)||(t.AwayTeam=angular.fromJson(t.AwayTeam)),angular.isObject(t.HomeTeam)||(t.HomeTeam=angular.fromJson(t.HomeTeam)),angular.isObject(t.Stadium)||(t.Stadium=angular.fromJson(t.Stadium));var n=this;return r.debug("GamesManager: will add new game - "+angular.toJson(t)),e.post("api/games",t,{tracker:"addGame"}).then(e=>{var a=n._retrieveInstance(e.data.GameId,e.data);s.resolve(a)}).catch(function(){s.reject()}),s.promise},getGame:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllGames:function(){if(i)return i;var t=a.defer(),s=this;return r.debug("GamesManager: will fetch all games from server"),e.get("api/games",{tracker:"getGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GameId,e);a.push(t)}),t.resolve(a)}).catch(()=>{t.reject()}),i=t.promise,t.promise},loadOpenGames:function(){if(o)return o;var t=a.defer(),s=this;return r.debug("GamesManager: will fetch all open games from server"),e.get("api/games/open",{tracker:"getOpenGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GameId,e);a.push(t)}),t.resolve(a)}).catch(()=>{t.reject()}),o=t.promise,t.promise},getTeamGames:function(t){var s=a.defer(),n=this;return r.debug("GamesManager: will fetch all games of team "+t+" from server"),e.get("api/teams/"+t+"/games",{tracker:"getTeamGames"}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.GameId,e);a.push(t)}),s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getStadiumGames:function(t){var s=a.defer(),n=this;return r.debug("GamesManager: will fetch all games in stadium "+t+" from server"),e.get("api/games/Stadium/"+t,{tracker:"getStadiumGames"}).then(function(e){var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.GameId,e);a.push(t)}),s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},simulateGame:function(t,s){var i=a.defer();return r.debug("GamesManager: will simulate game "+t),e.post("api/games/"+t+"/simulate",s,{tracker:"simulateGame"}).then(e=>{var a=[];e.data.forEach(e=>{a.push(new n(e))}),i.resolve(a)}).catch(e=>{i.reject(e)}),i.promise},setGame:function(e){r.debug("GamesManager: will set game "+e.GameId+" to -"+angular.toJson(e));var a=this._search(e.GameId);return a?a.setData(e):a=this._retrieveInstance(e.GameId,e),a}}}]),angular.module("mundialitoApp").directive("mundialitoGames",["Alert",function(e){return{restrict:"E",scope:{games:"=info",gamesType:"=filter",showOnly:"=",onAdd:"&"},templateUrl:"App/Games/gamesTemplate.html",link:a=>{a.allGames=a.games,a.$watch("gamesType",function(e){a.games=e&&"All"!==e?a.games.filter(e=>e.IsOpen):a.allGames}),a.deleteGame=(t=>{var r=t;t.delete().then(()=>{e.success("Game was deleted successfully"),a.games.splice(a.games.indexOf(r),1)})})}}}]),angular.module("mundialitoApp").factory("Alert",["toaster","$log","$rootScope",function(e,a,t){return{success:function(a){e.pop("success","Success",a)},error:function(a,t){e.pop("error",t||"Error",a)},note:function(a){e.pop("note","Info",a)}}}]),angular.module("mundialitoApp").factory("ErrorHandler",["$rootScope","$log","Alert","$location","Constants",function(e,a,t,r,s){return this.handle=((e,n,i,o)=>{if(a.log(e),!o.ignoreError){if(401===n)return localStorage.removeItem("accessToken"),sessionStorage.removeItem("accessToken"),void r.path(s.LOGIN_PATH);var l=[],u=void 0;e.Message&&(u=e.Message),e.errors&&angular.forEach(e.errors,e=>{angular.forEach(e,e=>{l.push(e)})}),e.ModelState&&angular.forEach(e.ModelState,function(e){l.push(e)}),e.ExceptionMessage&&l.push(e.ExceptionMessage),e.error_description&&l.push(e.error_description),0!==l.length||u||(u="General Error",l.push("Looks like the server is down, please try again in few minutes")),t.error(l.join("\n"),u)}}),this}]).factory("myHttpInterceptor",["ErrorHandler","$q",function(e,a){return{response:function(e){return e},responseError:function(t){return e.handle(t.data,t.status,t.headers,t.config),a.reject(t)}}}]),angular.module("mundialitoApp").factory("MundialitoUtils",["Constants",function(e){return{shouldRefreshInstance:a=>{return!(!angular.isDefined(a.LoadTime)||!angular.isDate(a.LoadTime))&&(new Date).getTime()-a.LoadTime.getTime()>e.REFRESH_TIME},shortName:e=>{if(-1!==e.indexOf(" ")){let a=e.split(" ");return a[0].substring(0,1)+"."+a[1].substring(0,1)}return e.substring(0,1)},getGameMark:(e,a)=>e.HomeTeam.TeamId===a?e.HomeScore>e.AwayScore?{game:e.GameId,mark:"W"}:e.HomeScoree.AwayScore?{game:e.GameId,mark:"L"}:e.HomeScore{var a=s._retrieveInstance(e.data.GeneralBetId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},addGeneralBet:function(t){var s=a.defer(),n=this;return r.debug("GeneralBetsManager: will add new bet - "+angular.toJson(t)),e.post("api/generalbets/",t,{tracker:"addGeneralBet"}).then(e=>{var a=n._retrieveInstance(e.data.GeneralBetId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getGeneralBet:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllGeneralBets:function(){var t=a.defer(),s=this;return r.debug("GeneralBetsManager: will fetch all general bets from server"),e.get("api/generalbets",{tracker:"getGeneralBets"}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.GeneralBetId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),t.promise},hasGeneralBet:function(t){var s=a.defer();return r.debug("GeneralBetsManager: will check if user "+t+" has general bets"),e.get("api/generalbets/has-bet/"+t,{tracker:"getUserGeneralBet"}).then(e=>{s.resolve(e.data)}).catch(e=>{s.reject(e)}),s.promise},canSubmtiGeneralBet:function(){var t=a.defer();return r.debug("GeneralBetsManager: will check if user general bets are closed"),e.get("api/generalbets/cansubmitbets/",{tracker:"getCanSubmitGeneralBets"}).then(e=>{t.resolve(e.data)}).catch(e=>{t.reject(e)}),t.promise},getUserGeneralBet:function(t){var s=a.defer(),n=this;return r.debug("GeneralBetsManager: will fetch user "+t+" general bet from server"),e.get("api/generalbets/user/"+t,{tracker:"getUserGeneralBet"}).then(e=>{var a=n._retrieveInstance(e.data.GeneralBetId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},setGeneralBet:function(e){r.debug("GeneralBetsManager: will set bet "+e.GeneralBetId+" to -"+angular.toJson(e));var a=this._search(e.GeneralBetId);return a?a.setData(e):a=this._retrieveInstance(e.GeneralBetId,e),a}}}]),angular.module("mundialitoApp").factory("Player",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)}},t}]),angular.module("mundialitoApp").factory("PlayersManager",["$http","$q","Player","$log",function(e,a,t,r){var s=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("playersPromise: updating existing instance of player "+e),s.setData(a)):(r.debug("playersPromise: saving new instance of player "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},getPlayerSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}}]},loadAllPlayers:function(){if(s)return s;var t=a.defer(),n=this;return r.debug("PlayersManager: will fetch all players from server"),e.get("api/players",{tracker:"getPlayers",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=n._retrieveInstance(e.PlayerId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),s=t.promise,t.promise}}}]),angular.module("mundialitoApp").factory("Stadium",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},delete:function(){if(confirm("Are you sure you would like to delete stadium "+this.Name))return a.debug("Stadium: Will delete stadium "+this.StadiumId),e.delete("api/stadiums/"+this.StadiumId,{tracker:"deleteStadium"})},update:function(){a.debug("Stadium: Will update stadium "+this.StadiumId);var t={};return angular.copy(this,t),delete t.Games,e.put("api/stadiums/"+this.StadiumId,t,{tracker:"editStadium"})},getUrl:function(){return"/stadiums/"+this.StadiumId}},t}]),angular.module("mundialitoApp").controller("StadiumCtrl",["$scope","$log","StadiumsManager","GamesManager","stadium","Alert",function(e,a,t,r,s,n){e.stadium=s,e.showEditForm=!1,e.getStadiumGamesPromise=r.getStadiumGames(e.stadium.StadiumId).then(t=>{a.debug("StadiumCtrl: Got games of stadium"),e.games=t}),e.updateStadium=(()=>{e.editStadiumPromise=e.stadium.update().then(()=>{n.success("Stadium was updated successfully")})}),e.schema=t.getStaidumSchema()}]),angular.module("mundialitoApp").controller("StadiumsCtrl",["$scope","$log","StadiumsManager","stadiums","Alert",function(e,a,t,r,s){e.stadiums=r,e.showNewStadium=!1,e.newStadium=null,e.addNewStadium=(()=>{e.newStadium=t.getEmptyStadiumObject()}),e.saveNewStadium=(()=>{t.addStadium(e.newStadium).then(a=>{s.success("Stadium was added successfully"),e.newStadium=null,e.stadiums.push(a)})}),e.deleteStadium=(a=>{var t=a;a.delete().then(()=>{s.success("Stadium was deleted successfully"),e.stadiums.splice(e.stadiums.indexOf(t),1)})}),e.schema=t.getStaidumSchema()}]),angular.module("mundialitoApp").factory("StadiumsManager",["$http","$q","Stadium","$log","MundialitoUtils",function(e,a,t,r,s){var n=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("StadiumsManager: updating existing instance of stadium "+e),s.setData(a)):(r.debug("StadiumsManager: saving new instance of stadium "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("StadiumsManager: will fetch stadium "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("StadiumsManager: Instance was loaded at "+a.LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("StadiumsManager: will fetch stadium "+a+" from server"),e.get("api/stadiums/"+a,{tracker:"getStadium"}).then(e=>{var a=s._retrieveInstance(e.data.StadiumId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getStaidumSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}},{property:"City",label:"City",type:"text",attr:{required:!0}},{property:"Capacity",label:"Capacity",type:"number",attr:{required:!0}}]},getEmptyStadiumObject:function(){return{HomeTeam:"",AwayTeam:""}},addStadium:function(t){var s=a.defer(),n=this;return r.debug("StadiumsManager: will add new stadium - "+angular.toJson(t)),e.post("api/stadiums",t,{tracker:"addStadium"}).then(e=>{var a=n._retrieveInstance(e.data.StadiumId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getStadium:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllStadiums:function(){if(n)return n;var t=a.defer(),s=this;return r.debug("StadiumsManager: will fetch all games from server"),e.get("api/stadiums",{tracker:"getStadiums",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.StadiumId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),n=t.promise,t.promise},setStadium:function(e){r.debug("StadiumsManager: will set stadium "+e.StadiumId+" to -"+angular.toJson(e));var a=this._search(e.StadiumId);return a?a.setData(e):a=this._retrieveInstance(e.StadiumId,e),a}}}]),angular.module("mundialitoApp").factory("Team",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e),this.Logo=this.Logo.toLowerCase(),this.Flag=this.Flag.toLowerCase()},delete:function(){if(confirm("Are you sure you would like to delete team "+this.Name))return a.debug("Team: Will delete team "+this.TeamId),e.delete("api/teams/"+this.TeamId,{tracker:"deleteTeam"})},update:function(){return a.debug("Team: Will update game "+this.TeamId),e.put("api/teams/"+this.TeamId,this,{tracker:"editTeam"})},getUrl:function(){return"/teams/"+this.TeamId}},t}]),angular.module("mundialitoApp").controller("TeamCtrl",["$scope","$log","TeamsManager","team","games","Alert","PluginsProvider","MundialitoUtils",function(e,a,t,r,s,n,i,o){e.team=r,e.games=s,e.plugins={},e.teamsForm={},e.showEditForm=!1,e.toKeyValue=(e=>_.keys(e).map(a=>({name:a,value:e[a]}))),e.IntegrationsData=e.toKeyValue(e.team.IntegrationsData),e.fromKeyValue=(e=>{let a={};return e.forEach(e=>{""!==e.name&&(a[e.name]=e.value)}),a});const l=_.chain(e.games).sortBy(e=>new Date(e.Date)).filter(e=>e.IsBetResolved).map(a=>o.getGameMark(a,e.team.TeamId)).value();e.teamsForm[e.team.TeamId]={form:l,games:_.filter(e.games,e=>e.IsBetResolved)},i.getTeamDetailsFromAll(e.team).then(a=>{a.forEach(a=>{e.plugins[a.property]={data:a.data,template:a.template}})}),e.updateTeam=(()=>{e.team.IntegrationsData=e.fromKeyValue(e.IntegrationsData),e.editTeamPromise=e.team.update().then(e=>{n.success("Team was updated successfully"),t.setTeam(e.data)})}),e.schema=t.getTeamSchema()}]),angular.module("mundialitoApp").controller("TeamsCtrl",["$scope","$log","TeamsManager","teams","Alert",function(e,a,t,r,s){e.teams=r,e.showNewTeam=!1,e.newTeam=null,e.addNewTeam=function(){$(".selectpicker").selectpicker("refresh"),e.newTeam=t.getEmptyTeamObject()},e.saveNewTeam=function(){t.addTeam(e.newTeam).then(function(a){s.success("Team was added successfully"),e.newTeam=null,e.teams.push(a)})},e.deleteTeam=function(a){var t=a;a.delete().then(()=>{s.success("Team was deleted successfully"),e.teams.splice(e.teams.indexOf(t),1)})},e.schema=t.getTeamSchema()}]),angular.module("mundialitoApp").factory("TeamsManager",["$http","$q","Team","$log","MundialitoUtils",function(e,a,t,r,s){return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("TeamsManager: updating existing instance of team "+e),s.setData(a)):(r.debug("TeamsManager: saving new instance of team "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("TeamsManager: will fetch team "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("TeamsManager: Instance was loaded at "+instanceLoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("TeamsManager: will fetch team "+a+" from server"),e.get("api/teams/"+a,{tracker:"getTeam"}).then(e=>{var a=s._retrieveInstance(e.data.TeamId,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getTeamSchema:function(){return[{property:"Name",label:"Name",type:"text",attr:{required:!0}},{property:"Flag",label:"Flag",type:"url",attr:{required:!0}},{property:"TeamPage",label:"TeamPage",type:"url",attr:{required:!1}},{property:"Logo",label:"Logo",type:"url",attr:{required:!0}},{property:"ShortName",label:"Short Name",type:"text",attr:{ngMaxlength:3,ngMinlength:3,required:!0}},{property:"TournamentTeamId",label:"Tournament Team Id",type:"number",attr:{required:!1}}]},getEmptyTeamObject:function(){return{Name:"",Flag:"",Logo:"",ShortName:"",TournamentTeamId:null,TeamPage:null}},addTeam:function(t){var s=a.defer(),n=this;return r.debug("TeamsManager: will add new team - "+angular.toJson(t)),e.post("api/teams",t,{tracker:"addTeam"}).then(e=>{var a=n._retrieveInstance(e.data.TeamId,e.data);s.resolve(a)}).catch(e=>{s.reject(e)}),s.promise},getTeam:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},loadAllTeams:function(){var t=a.defer(),s=this;return r.debug("TeamsManager: will fetch all teams from server"),e.get("api/teams",{tracker:"getTeams",cache:!0}).then(e=>{var a=[];e.data.forEach(e=>{var t=s._retrieveInstance(e.TeamId,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),t.promise},setTeam:function(e){r.debug("TeamsManager: will set team "+e.TeamId+" to -"+angular.toJson(e));var a=this._search(e.TeamId);return a?a.setData(e):a=this._retrieveInstance(e.TeamId,e),a}}}]),angular.module("mundialitoApp").controller("ManageAppCtrl",["$scope","$log","Alert","users","teams","generalBets","UsersManager","players",function(e,a,t,r,s,n,i,o){e.users=r,e.generalBets=n,e.privateKey={},e.teamsDic={},e.playersDic={};for(var l=0;l{var r=a;e.deleteUserPromise=a.delete().then(()=>{t.success("User was deleted successfully"),e.users.splice(e.users.indexOf(r),1)})}),e.resolveBet=function(a){e.resolveGeneralBetPromise=a.resolve().then(()=>{t.success("General bet was resolved successfully")})},e.generateKey=function(){e.privateKey.key="",e.generatePrivateKeyPromisd=i.generatePrivateKey(e.privateKey.email).then(function(t){a.debug("ManageAppCtrl: got private key "+t),e.privateKey.key=t})},e.makeAdmin=function(e){e.makeAdmin().then(()=>{t.success("User was is now admin"),e.IsAdmin=!0})}}]),angular.module("mundialitoApp").factory("User",["$http","$log",function(e,a){function t(e){e&&this.setData(e)}return t.prototype={setData:function(e){angular.extend(this,e)},getUrl:function(){return"/users/"+this.Username},delete:function(){if(confirm("Are you sure you would like to delete user "+this.Username))return a.debug("User: Will delete user "+this.Username),e.delete("api/users/"+this.Id,{tracker:"deleteUser"})},makeAdmin:function(){if(confirm("Are you sure you would like to make "+this.Name+" Admin?"))return a.debug("User: Will make user "+this.Username+" admin"),e.post("api/users/makeadmin/"+this.Id,{tracker:"makeAdmin"})}},t}]),angular.module("mundialitoApp").controller("UserProfileCtrl",["$scope","$log","UsersManager","Alert","GeneralBetsManager","profileUser","userGameBets","teams","generalBetsAreOpen","players",function(e,a,t,r,s,n,i,o,l,u){e.profileUser=n,e.userGameBets=i,e.teams=o,e.players=u,e.noGeneralBetWasSubmitted=!1,e.generalBetsAreOpen=!0===l,a.debug("UserProfileCtrl: generalBetsAreOpen = "+l),e.alreadyFollow=e.security.user.Followees.includes(e.profileUser.Username),e.isLoggedUserProfile=(()=>{var t=null!=e.security.user&&e.security.user.Username===e.profileUser.Username;return a.debug("UserProfileCtrl: isLoggedUserProfile = "+t),null!=e.security.user&&e.security.user.Username===e.profileUser.Username}),e.isGeneralBetClosed=(()=>{var t=!e.generalBetsAreOpen;return a.debug("UserProfileCtrl: isGeneralBetClosed = "+t),t}),e.isGeneralBetReadOnly=(()=>{var t=!e.isLoggedUserProfile()||e.isGeneralBetClosed();return a.debug("UserProfileCtrl: isGeneralBetReadOnly = "+t),t}),e.shoudLoadGeneralBet=(()=>{var t=e.isLoggedUserProfile()||e.isGeneralBetClosed();return a.debug("UserProfileCtrl: shoudLoadGeneralBet = "+t),t}),e.shoudLoadGeneralBet()&&(e.generalBetsPromise=s.hasGeneralBet(e.profileUser.Username).then(t=>{if(a.debug("UserProfileCtrl: hasGeneralBet = "+t),!0===t)s.getUserGeneralBet(e.profileUser.Username).then(t=>{a.info("UserProfileCtrl: got user general bet - "+angular.toJson(t)),e.generalBet=t});else{if(e.generalBet={},e.isGeneralBetClosed())return void(e.noGeneralBetWasSubmitted=!0);if(e.isLoggedUserProfile()&&!e.isGeneralBetClosed())return;e.noGeneralBetWasSubmitted=!0}})),e.saveGeneralBet=(()=>{angular.isDefined(e.generalBet.GeneralBetId)?e.generalBetsPromise=e.generalBet.update().then(()=>{r.success("General Bet was updated successfully")},()=>{r.error("Failed to update General Bet, please try again")}):e.generalBetsPromise=s.addGeneralBet(e.generalBet).then(t=>{a.log("UserProfileCtrl: General Bet "+t.GeneralBetId+" was added"),e.generalBet=t,r.success("General Bet was added successfully")},()=>{r.error("Failed to add General Bet, please try again")})}),e.social=(()=>{e.alreadyFollow?t.unfollow(e.profileUser.Username).then(()=>{e.alreadyFollow=!1;const a=e.security.user.Followees.indexOf(e.profileUser.Username);e.security.user.Followees.splice(a,1),r.success("You no longer following "+e.profileUser.Username)}).catch(a=>{r.error("Failed to unfollow "+e.profileUser.Username+": "+a)}):t.follow(e.profileUser.Username).then(()=>{e.alreadyFollow=!0,e.security.user.Followees.push(e.profileUser.Username),r.success("You are now following "+e.profileUser.Username)}).catch(a=>{r.error("Failed to follow "+e.profileUser.Username+": "+a)})}),e.getSocialPromise=t.getSocial(e.profileUser.Username).then(t=>{a.log("UserProfileCtrl: Got social response"),e.followers=t.followers,e.followees=t.followees}),e.isLoggedUserProfile()?e.getStatsPromise=t.getMyStats().then(a=>{e.performance=a}).catch(e=>{a.error("Failed to get user slef statistics",e),r.error("Failed to fetch user statistics: "+e)}):e.getStatsPromise=t.getStats(e.profileUser.Username).then(a=>{e.performance=a}).catch(e=>{a.error("Failed to get user statistics",e),r.error("Failed to fetch user statistics: "+e)}),e.security.user.Username===e.profileUser.Username?e.compareUsersPromise=t.getUserProgess(e.security.user.Username):e.compareUsersPromise=t.compareUsers(e.security.user.Username,e.profileUser.Username),e.compareUsersPromise.then(a=>{if(a.length>0){let r=_.map(a[0].Entries,e=>e.Name);var t=_.map(r,e=>({id:e,label:e,type:"number"}));t.unshift({id:"date",label:"Date",type:"date"});let s=_.map(a,e=>{var a={c:[{v:new Date(e.Date)}]};return _.each(e.Entries,e=>{a.c.push({v:e.Place})}),a});e.chart={type:"LineChart",data:{cols:t,rows:s},options:{colors:["#0000FF","#009900","#CC0000","#DD9900"],defaultColors:["#0000FF","#009900","#CC0000","#DD9900"],displayExactValues:!0,is3D:!0,backgroundColor:{fill:"transparent"},vAxis:{title:"Place"},hAxis:{title:"Date"}}}}}).catch(e=>{a.error("Failed to compare users",e),r.error("Failed to compare users: "+e)})}]),angular.module("mundialitoApp").factory("UsersManager",["$http","$q","User","$log","MundialitoUtils",function(e,a,t,r,s){var n=void 0;return{_pool:{},_retrieveInstance:function(e,a){var s=this._pool[e];return s?(r.debug("UsersManager: updating existing instance of user "+e),s.setData(a)):(r.debug("UsersManager: saving new instance of user "+e),s=new t(a),this._pool[e]=s),s.LoadTime=new Date,s},_search:function(e){r.debug("UsersManager: will fetch user "+e+" from local pool");var a=this._pool[e];if(!angular.isDefined(a)||!s.shouldRefreshInstance(a))return a;r.debug("UsersManager: Instance was loaded at "+a,LoadTime+", will reload it from server")},_load:function(a,t){var s=this;r.debug("UsersManager: will fetch user "+a+" from server"),e.get("api/users/"+a,{tracker:"getUser"}).then(e=>{var a=s._retrieveInstance(e.data.Username,e.data);t.resolve(a)}).catch(e=>{t.reject(e)})},getUser:function(e,t){var r=a.defer(),s=void 0;return angular.isDefined(t)&&t||(s=this._search(e)),s?r.resolve(s):this._load(e,r),r.promise},generatePrivateKey:function(t){var s=a.defer();return r.debug("UsersManager: will generate private key for "+t),e.get("api/users/generateprivatekey/"+encodeURIComponent(t)+"/",{tracker:"generatePrivateKey"}).then(e=>{s.resolve(e.data)}).catch(e=>{s.reject(e)}),s.promise},getSocial:a=>(r.debug("UsersManager: will fetch followers and followees of user "+a),e.get("api/users/"+a+"/followees",{tracker:"getSocial"}).then(t=>e.get("api/users/"+a+"/followers",{tracker:"getSocial"}).then(e=>({followers:e.data,followees:t.data})))),compareUsers:(a,t)=>(r.debug("UsersManager: will compare users: "+a+" and "+t),e.get("api/users/compare/"+a+"/"+t).then(e=>e.data)),getUserProgess:()=>(r.debug("UsersManager: will get user progress"),e.get("api/users/me/progress").then(e=>e.data)),getMyStats:()=>(r.debug("UsersManager: will the stats of logged user"),e.get("api/stats/me",{tracker:"getStats"}).then(e=>e.data)),getStats:a=>(r.debug("UsersManager: will the stats of "+a),e.get("api/stats/"+a,{tracker:"getStats"}).then(e=>e.data)),follow:a=>(r.debug("UsersManager: will follow "+a),e.post("api/users/follow/"+a,void 0,{tracker:"follow"})),unfollow:a=>(r.debug("UsersManager: will unfollow "+a),e.delete("api/users/follow/"+a,void 0,{tracker:"unfollow"})),loadAllUsers:function(){if(n)return n;var t=a.defer(),s=this;return r.debug("UsersManager: will fetch all users from server"),e.get("api/users",{tracker:"getUsers"}).then(e=>{var a=[];e.data.forEach(function(e){var t=s._retrieveInstance(e.Username,e);a.push(t)}),t.resolve(a)}).catch(e=>{t.reject(e)}),n=t.promise,t.promise},setUser:function(e){r.debug("UsersManager: will set user "+e.Username+" to -"+angular.toJson(e));var a=this._search(e.Username);return a?a.setData(e):a=this._retrieveInstance(e.Username,e),a}}}]),angular.module("mundialitoApp").factory("FootballDataGamePlugin",["$q","$rootScope","GenericProxyService",function(e,a,t){var r="https://api.football-data.org/v4/matches/";const s="football-data";return{getGameDetails:function(n){var i=r+n.IntegrationsData[s];return a.mundialitoApp.clientConfig&&a.mundialitoApp.clientConfig["football-data-api-key"]?t.proxyRequest("GET",i,void 0,{"X-Auth-Token":a.mundialitoApp.clientConfig["football-data-api-key"]}).then(e=>({data:e,property:"odds",template:"App/General/Plugins/FootballDataGameTemplate.html"})).catch(a=>e.reject(a)):e.reject("Skipping football-data as no api key provided")},integrationKey:s}}]),angular.module("mundialitoApp").factory("FootballDataTeamStatsPlugin",["$q","$rootScope","GenericProxyService",function(e,a,t){var r="https://api.football-data.org/v4/teams/";const s="football-data";function n(e){return(new Date).getFullYear()-parseInt(e.substring(0,4),10)}return{getTeamDetails:function(i){var o=r+i.IntegrationsData[s];return a.mundialitoApp.clientConfig&&a.mundialitoApp.clientConfig["football-data-api-key"]?t.proxyRequest("GET",o,void 0,{"X-Auth-Token":a.mundialitoApp.clientConfig["football-data-api-key"]}).then(e=>(e.coach.age=n(e.coach.dateOfBirth),e.squad.forEach(e=>{e.age=n(e.dateOfBirth),e.icon="goalkeeper"===e.position.toLowerCase()?"goalkeeper":"player"}),{data:e,property:"team-squad",template:"App/General/Plugins/FootballDataTeamStatsTemplate.html"})).catch(a=>e.reject(a)):e.reject("Skipping football-data as no api key provided")},integrationKey:s}}]),angular.module("mundialitoApp").factory("GenericProxyService",["$http","$q",function(e,a){var t="api/genericproxy";return{proxyRequest:function(r,s,n,i){var o=a.defer();return e({method:r,url:t+"?url="+s,data:n,headers:i,ignoreError:!0}).then(e=>{o.resolve(e.data)}).catch(e=>{o.reject(e)}),o.promise}}}]),angular.module("mundialitoApp").factory("PluginsProvider",["$q","$log",function(e,a){var t=[],r=[];return{getGameDetailsFromAll:function(r){let s=[];r.IntegrationsData&&(s=_.filter(t,e=>void 0!==r.IntegrationsData[e.integrationKey]));var n=s.map(e=>e.getGameDetails(r));return e.all(n).then(e=>e).catch(t=>(a.warn("Error fetching game details: "+t),e.reject(t)))},getTeamDetailsFromAll:function(t){let s=[];t.IntegrationsData&&(s=_.filter(r,e=>void 0!==t.IntegrationsData[e.integrationKey]));var n=s.map(e=>e.getTeamDetails(t));return e.all(n).then(e=>e).catch(t=>(a.warn("Error fetching team details: "+t),e.reject(t)))},registerGameFactory:e=>{t.push(e)},registerTeamFactory:e=>{r.push(e)}}}]); \ No newline at end of file diff --git a/Mundialito/wwwroot/js/app.js b/Mundialito/wwwroot/js/app.js index 74fdc88..ff52f7a 100644 --- a/Mundialito/wwwroot/js/app.js +++ b/Mundialito/wwwroot/js/app.js @@ -200,7 +200,7 @@ angular.module('mundialitoApp').constant('Constants', { field: 'Points', displayName: 'Points', resizable: true, minWidth: 45, maxWidth: 75}, { field: 'GeneralBet.WinningTeam', displayName: 'Team', resizable: false, maxWidth: 45, cellTemplate: '
' }, { field: 'GeneralBet.GoldenBootPlayer', displayName: 'Player', resizable: false, minWidth: 50, maxWidth: 50 }, - { field: 'TotalMarks', displayName: 'Total Marks', resizable: true }, + { field: 'Marks', displayName: 'Marks', resizable: true }, { field: 'Results', displayName: 'Results', resizable: true }, { field: 'YellowCards', displayName: 'Yellow Cards Marks', maxWidth: 55, resizable: false, headerCellTemplate: '
' }, { field: 'Corners', displayName: 'Corners Marks', maxWidth: 55, resizable: false, headerCellTemplate: '
' },, @@ -418,16 +418,16 @@ angular.module('mundialitoApp').controller('BetsCenterCtrl', ['$scope', '$log', $timeout(loadUserBets,1000); } else { - BetsManager.getUserBets($scope.security.user.Username).then(function (bets) { - for(var i=0; i < bets.length; i++) { + $scope.getUserBetsPromise = BetsManager.getUserBets($scope.security.user.Username).then((bets) => { + for (var i = 0; i < bets.length; i++) { $scope.bets[bets[i].Game.GameId] = bets[i]; - $scope.bets[bets[i].Game.GameId].GameId = bets[i].Game.GameId + $scope.bets[bets[i].Game.GameId].GameId = bets[i].Game.GameId; } - for(var j=0; j < games.length; j++) { + for (var j = 0; j < games.length; j++) { if (!angular.isDefined($scope.bets[games[j].GameId])) { - $log.debug('BetsCenterCtrl: game ' + games[j].GameId + ' has not bet') - $scope.bets[games[j].GameId] = { BetId : -1, GameId : games[j].GameId}; + $log.debug('BetsCenterCtrl: game ' + games[j].GameId + ' has not bet'); + $scope.bets[games[j].GameId] = { BetId: -1, GameId: games[j].GameId }; } else { $scope.bets[$scope.bets[games[j].GameId]] = bets[i]; @@ -660,7 +660,7 @@ angular.module('mundialitoApp').controller('DashboardCtrl', ['$scope', '$log', ' $scope.playersDic[players[i].PlayerId] = players[i]; } - GamesManager.loadAllGames().then((games) => { + $scope.getGamesPromise = GamesManager.loadAllGames().then((games) => { $scope.games = games; $scope.resultsDic = {}; $scope.marksDic = {}; @@ -767,7 +767,7 @@ angular.module('mundialitoApp').controller('DashboardCtrl', ['$scope', '$log', ' }); } }); - UsersManager.loadAllUsers().then((users) => { + $scope.getUsersPromise = UsersManager.loadAllUsers().then((users) => { $scope.users = users; $scope.users.forEach((user) => { if (angular.isDefined(user.GeneralBet)) { @@ -884,7 +884,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const }); if (!$scope.game.IsOpen) { - BetsManager.getGameBets($scope.game.GameId).then((data) => { + $scope.getGameBetsPromsie = BetsManager.getGameBets($scope.game.GameId).then((data) => { $log.debug("GameCtrl: get game bets" + angular.toJson(data)); $scope.gameBets = data; var chart1 = {}; @@ -906,7 +906,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const ['2', mark2] ]; $scope.chart = chart1; - UsersManager.loadAllUsers().then((users) => { + $scope.getUsersPromise = UsersManager.loadAllUsers().then((users) => { $scope.usersMap = new Map(); users.forEach((obj) => { $scope.usersMap.set(obj.Username, obj); @@ -935,7 +935,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const delete game.Stadium.Games; } $scope.game.IntegrationsData = keyValueEditorUtils.mapEntries(keyValueEditorUtils.compactEntries($scope.integrationsData)); - $scope.game.update().then((res) => { + $scope.updateGamePromise = $scope.game.update().then((res) => { Alert.success('Game was updated successfully'); GamesManager.setGame(res.data); }).catch((err) => { @@ -946,7 +946,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.updateBet = () => { if ($scope.userBet.BetId !== -1) { - $scope.userBet.update().then((data) => { + $scope.updateBetPromise = $scope.userBet.update().then((data) => { Alert.success('Bet was updated successfully'); BetsManager.setBet(data); }).catch((err) => { @@ -968,7 +968,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.simulateGame = () => { $log.debug('GameCtrl: simulating game'); - GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => { + $scope.simulateGamePromise = GamesManager.simulateGame($scope.game.GameId, $scope.simulatedGame).then((data) => { $scope.users = data; $scope.users.forEach((user) => { if (angular.isDefined(user.GeneralBet)) { @@ -1029,7 +1029,7 @@ angular.module('mundialitoApp').controller('GameCtrl', ['$scope', '$log', 'Const $scope.$watch('simulatedGame', () => { $scope.users = undefined }, true); $scope.loadTeamsForm = () => { $scope.teamsForm = {}; - GamesManager.getTeamGames($scope.game.HomeTeam.TeamId).then((res) => { + $scope.getTeamGamesPromise = GamesManager.getTeamGames($scope.game.HomeTeam.TeamId).then((res) => { storeTeamForm(res, $scope.game.HomeTeam.TeamId); }).catch((err) => { Alert.error('Failed to get teams form'); @@ -1072,7 +1072,7 @@ angular.module('mundialitoApp').controller('GamesCtrl', ['$scope','$log','GamesM }; $scope.saveNewGame = function() { - GamesManager.addGame($scope.newGame).then(function(data) { + $scope.addGamePromise = GamesManager.addGame($scope.newGame).then(function(data) { Alert.success('Game was added successfully'); $scope.newGame = GamesManager.getEmptyGameObject(); $scope.games.push(data); @@ -1087,7 +1087,7 @@ angular.module('mundialitoApp').controller('GamesCtrl', ['$scope','$log','GamesM if ((angular.isDefined(game.Stadium.Games)) && (game.Stadium.Games != null)) { delete game.Stadium.Games; } - game.update().then((data) => { + $scope.editGamePromise = game.update().then((data) => { Alert.success('Game was updated successfully'); GamesManager.setGame(data); }); @@ -1853,13 +1853,13 @@ angular.module('mundialitoApp').controller('StadiumCtrl', ['$scope', '$log', 'St $scope.stadium = stadium; $scope.showEditForm = false; - GamesManager.getStadiumGames($scope.stadium.StadiumId).then((data) => { + $scope.getStadiumGamesPromise = GamesManager.getStadiumGames($scope.stadium.StadiumId).then((data) => { $log.debug('StadiumCtrl: Got games of stadium'); $scope.games = data; }); $scope.updateStadium = () => { - $scope.stadium.update().then(() => { + $scope.editStadiumPromise = $scope.stadium.update().then(() => { Alert.success('Stadium was updated successfully'); }); }; @@ -1872,11 +1872,11 @@ angular.module('mundialitoApp').controller('StadiumsCtrl', ['$scope', '$log', 'S $scope.showNewStadium = false; $scope.newStadium = null; - $scope.addNewStadium = function () { + $scope.addNewStadium = () => { $scope.newStadium = StadiumsManager.getEmptyStadiumObject(); }; - $scope.saveNewStadium = function() { + $scope.saveNewStadium = () => { StadiumsManager.addStadium($scope.newStadium).then((data) => { Alert.success('Stadium was added successfully'); $scope.newStadium = null; @@ -1884,15 +1884,15 @@ angular.module('mundialitoApp').controller('StadiumsCtrl', ['$scope', '$log', 'S }); }; - $scope.deleteStadium = function(stadium) { + $scope.deleteStadium = (stadium) => { var scope = stadium; stadium.delete().then(() => { Alert.success('Stadium was deleted successfully'); $scope.stadiums.splice($scope.stadiums.indexOf(scope), 1); - }) + }); }; - $scope.schema = StadiumsManager.getStaidumSchema(); + $scope.schema = StadiumsManager.getStaidumSchema(); }]); 'use strict'; angular.module('mundialitoApp').factory('StadiumsManager', ['$http', '$q', 'Stadium', '$log', 'MundialitoUtils', function ($http, $q, Stadium, $log, MundialitoUtils) { @@ -2089,7 +2089,7 @@ angular.module('mundialitoApp').controller('TeamCtrl', ['$scope', '$log', 'Teams $scope.updateTeam = () => { $scope.team.IntegrationsData = $scope.fromKeyValue($scope.IntegrationsData); - $scope.team.update().then((data) => { + $scope.editTeamPromise = $scope.team.update().then((data) => { Alert.success('Team was updated successfully'); TeamsManager.setTeam(data.data); }); @@ -2276,23 +2276,23 @@ angular.module('mundialitoApp').controller('ManageAppCtrl', ['$scope', '$log', ' $scope.playersDic[players[i].PlayerId] = players[i]; } - $scope.deleteUser = function(user) { + $scope.deleteUser = (user) => { var scope = user; - user.delete().then(() => { + $scope.deleteUserPromise = user.delete().then(() => { Alert.success('User was deleted successfully'); $scope.users.splice($scope.users.indexOf(scope), 1); - }) + }); }; $scope.resolveBet = function(bet) { - bet.resolve().then(() => { + $scope.resolveGeneralBetPromise = bet.resolve().then(() => { Alert.success('General bet was resolved successfully'); }); }; $scope.generateKey = function() { $scope.privateKey.key = ''; - UsersManager.generatePrivateKey($scope.privateKey.email).then(function(data) { + $scope.generatePrivateKeyPromisd = UsersManager.generatePrivateKey($scope.privateKey.email).then(function(data) { $log.debug('ManageAppCtrl: got private key ' + data); $scope.privateKey.key = data; }); @@ -2374,7 +2374,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } if ($scope.shoudLoadGeneralBet()) { - GeneralBetsManager.hasGeneralBet($scope.profileUser.Username).then((answer) => { + $scope.generalBetsPromise = GeneralBetsManager.hasGeneralBet($scope.profileUser.Username).then((answer) => { $log.debug('UserProfileCtrl: hasGeneralBet = ' + answer); if (answer === true) { GeneralBetsManager.getUserGeneralBet($scope.profileUser.Username).then((generalBet) => { @@ -2398,7 +2398,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', $scope.saveGeneralBet = () => { if (angular.isDefined($scope.generalBet.GeneralBetId)) { - $scope.generalBet.update().then(() => { + $scope.generalBetsPromise = $scope.generalBet.update().then(() => { Alert.success('General Bet was updated successfully'); }, () => { Alert.error('Failed to update General Bet, please try again'); @@ -2406,7 +2406,7 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } else { - GeneralBetsManager.addGeneralBet($scope.generalBet).then((data) => { + $scope.generalBetsPromise = GeneralBetsManager.addGeneralBet($scope.generalBet).then((data) => { $log.log('UserProfileCtrl: General Bet ' + data.GeneralBetId + ' was added'); $scope.generalBet = data; Alert.success('General Bet was added successfully'); @@ -2437,28 +2437,83 @@ angular.module('mundialitoApp').controller('UserProfileCtrl', ['$scope', '$log', } }; - UsersManager.getSocial($scope.profileUser.Username).then((data) => { + $scope.getSocialPromise = UsersManager.getSocial($scope.profileUser.Username).then((data) => { $log.log('UserProfileCtrl: Got social response'); $scope.followers = data['followers']; $scope.followees = data['followees']; }); if ($scope.isLoggedUserProfile()) { - UsersManager.getMyStats().then((data) => { + $scope.getStatsPromise = UsersManager.getMyStats().then((data) => { $scope.performance = data; }).catch((err) => { $log.error('Failed to get user slef statistics', err); Alert.error('Failed to fetch user statistics: ' + err); }); } else { - UsersManager.getStats($scope.profileUser.Username).then((data) => { + $scope.getStatsPromise = UsersManager.getStats($scope.profileUser.Username).then((data) => { $scope.performance = data; }).catch((err) => { $log.error('Failed to get user statistics', err); Alert.error('Failed to fetch user statistics: ' + err); - }); + }); } - + if ($scope.security.user.Username === $scope.profileUser.Username) { + $scope.compareUsersPromise = UsersManager.getUserProgess($scope.security.user.Username); + } else { + $scope.compareUsersPromise = UsersManager.compareUsers($scope.security.user.Username, $scope.profileUser.Username); + } + $scope.compareUsersPromise.then((res) => { + if (res.length > 0) { + let users = _.map(res[0].Entries, (entry) => { return entry.Name }); + var cols = _.map(users, (user) => { + return { + id: user, + label: user, + type: "number" + } + }); + cols.unshift({ + id: "date", + label: "Date", + type: "date" + }); + let rows = _.map(res, (entry) => { + var res = { c: [{ + v: new Date(entry.Date), + }]}; + _.each(entry.Entries, (entry) => { + res.c.push({ + v: entry.Place, + }); + }); + return res; + }); + $scope.chart = { + type: "LineChart", + data: { + "cols": cols, + "rows": rows + }, + options: { + colors: ['#0000FF', '#009900', '#CC0000', '#DD9900'], + defaultColors: ['#0000FF', '#009900', '#CC0000', '#DD9900'], + displayExactValues: true, + is3D: true, + backgroundColor: { fill: 'transparent' }, + vAxis: { + title: "Place", + }, + hAxis: { + title: "Date" + } + } + }; + } + }).catch((err) => { + $log.error('Failed to compare users', err); + Alert.error('Failed to compare users: ' + err); + }); }]); 'use strict'; @@ -2544,6 +2599,22 @@ angular.module('mundialitoApp').factory('UsersManager', ['$http', '$q', 'User', }); }, + compareUsers: (usera, userb) => { + $log.debug('UsersManager: will compare users: ' + usera + ' and ' + userb); + return $http.get('api/users/compare/' + usera + '/' + userb) + .then((res) => { + return res.data; + }); + }, + + getUserProgess: () => { + $log.debug('UsersManager: will get user progress'); + return $http.get('api/users/me/progress') + .then((res) => { + return res.data; + }); + }, + getMyStats: () => { $log.debug('UsersManager: will the stats of logged user'); return $http.get('api/stats/me', { tracker: 'getStats' }) diff --git a/Mundialito/wwwroot/lib/lib-min.js b/Mundialito/wwwroot/lib/lib-min.js index a1261f4..a9282bb 100644 --- a/Mundialito/wwwroot/lib/lib-min.js +++ b/Mundialito/wwwroot/lib/lib-min.js @@ -1 +1 @@ -if(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e;function t(){return e.apply(null,arguments)}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){return void 0===e}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e,t){var n,r=[];for(n=0;n>>0,r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},G={};function W(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(G[e]=i),t&&(G[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&(G[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function U(e,t){return e.isValid()?(t=q(t,e.localeData()),z[t]=z[t]||function(e){var t,n,r,i=e.match(j);for(t=0,n=i.length;t=0&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var B=/\d/,J=/\d\d/,K=/\d{3}/,X=/\d{4}/,Z=/[+-]?\d{6}/,Q=/\d\d?/,ee=/\d\d\d\d?/,te=/\d\d\d\d\d\d?/,ne=/\d{1,3}/,re=/\d{1,4}/,ie=/[+-]?\d{1,6}/,oe=/\d+/,ae=/[+-]?\d+/,se=/Z|[+-]\d\d:?\d\d/gi,le=/Z|[+-]\d\d(?::?\d\d)?/gi,ue=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ce={};function de(e,t,n){ce[e]=S(t)?t:function(e,r){return e&&n?n:t}}function pe(e,t){return l(ce,e)?ce[e](t._strict,t._locale):new RegExp(fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ge(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),o(t)&&(r=function(e,n){n[t]=w(e)}),n=0;n68?1900:2e3)};var Ie=R("FullYear",!0);function Ne(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function je(e,t,n){var r=7+t-n;return-((7+Ne(e,0,r).getUTCDay()-t)%7)+r-1}function Ve(e,t,n,r,i){var o,a,s=1+7*(t-1)+(7+n-r)%7+je(e,r,i);return s<=0?a=Re(o=e-1)+s:s>Re(e)?(o=e+1,a=s-Re(e)):(o=e,a=s),{year:o,dayOfYear:a}}function ze(e,t,n){var r,i,o=je(e.year(),t,n),a=Math.floor((e.dayOfYear()-o-1)/7)+1;return a<1?r=a+Ge(i=e.year()-1,t,n):a>Ge(e.year(),t,n)?(r=a-Ge(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function Ge(e,t,n){var r=je(e,t,n),i=je(e+1,t,n);return(Re(e)-r+i)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),H("week",5),H("isoWeek",5),de("w",Q),de("ww",Q,J),de("W",Q),de("WW",Q,J),me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=w(e)});W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),de("d",Q),de("e",Q),de("E",Q),de("dd",function(e,t){return t.weekdaysMinRegex(e)}),de("ddd",function(e,t){return t.weekdaysShortRegex(e)}),de("dddd",function(e,t){return t.weekdaysRegex(e)}),me(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:d(n).invalidWeekday=e}),me(["d","e","E"],function(e,t,n,r){t[r]=w(e)});var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ue="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Be=ue;var Je=ue;var Ke=ue;function Xe(){function e(e,t){return t.length-e.length}var t,n,r,i,o,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=c([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),s.push(i),l.push(o),u.push(r),u.push(i),u.push(o);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=fe(s[t]),l[t]=fe(l[t]),u[t]=fe(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function Qe(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Ze),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+Ze.apply(this)+N(this.minutes(),2)}),W("hmmss",0,0,function(){return""+Ze.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),Qe("a",!0),Qe("A",!1),A("hour","h"),H("hour",13),de("a",et),de("A",et),de("H",Q),de("h",Q),de("k",Q),de("HH",Q,J),de("hh",Q,J),de("kk",Q,J),de("hmm",ee),de("hmmss",te),de("Hmm",ee),de("Hmmss",te),ge(["H","HH"],we),ge(["k","kk"],function(e,t,n){var r=w(e);t[we]=24===r?0:r}),ge(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ge(["h","hh"],function(e,t,n){t[we]=w(e),d(n).bigHour=!0}),ge("hmm",function(e,t,n){var r=e.length-2;t[we]=w(e.substr(0,r)),t[$e]=w(e.substr(r)),d(n).bigHour=!0}),ge("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=w(e.substr(0,r)),t[$e]=w(e.substr(r,2)),t[xe]=w(e.substr(i)),d(n).bigHour=!0}),ge("Hmm",function(e,t,n){var r=e.length-2;t[we]=w(e.substr(0,r)),t[$e]=w(e.substr(r))}),ge("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[we]=w(e.substr(0,r)),t[$e]=w(e.substr(r,2)),t[xe]=w(e.substr(i))});var tt,nt=R("Hours",!0),rt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:Ee,week:{dow:0,doy:6},weekdays:We,weekdaysMin:qe,weekdaysShort:Ue,meridiemParse:/[ap]\.?m?\.?/i},it={},ot={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function st(e){var t=null;if(!it[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=tt._abbr,require("./locale/"+e),lt(t)}catch(e){}return it[e]}function lt(e,t){var n;return e&&(n=i(t)?ct(e):ut(e,t))&&(tt=n),tt._abbr}function ut(e,t){if(null!==t){var n=rt;if(t.abbr=e,null!=it[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=it[e]._config;else if(null!=t.parentLocale){if(null==it[t.parentLocale])return ot[t.parentLocale]||(ot[t.parentLocale]=[]),ot[t.parentLocale].push({name:e,config:t}),null;n=it[t.parentLocale]._config}return it[e]=new L(T(n,t)),ot[e]&&ot[e].forEach(function(e){ut(e.name,e.config)}),lt(e),it[e]}return delete it[e],null}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return tt;if(!n(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,r,i,o=0;o0;){if(r=st(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&$(i,n,!0)>=t-1)break;t--}o++}return null}(e)}function dt(e){var t,n=e._a;return n&&-2===d(e).overflow&&(t=n[be]<0||n[be]>11?be:n[_e]<1||n[_e]>Te(n[ye],n[be])?_e:n[we]<0||n[we]>24||24===n[we]&&(0!==n[$e]||0!==n[xe]||0!==n[Me])?we:n[$e]<0||n[$e]>59?$e:n[xe]<0||n[xe]>59?xe:n[Me]<0||n[Me]>999?Me:-1,d(e)._overflowDayOfYear&&(t_e)&&(t=_e),d(e)._overflowWeeks&&-1===t&&(t=Ce),d(e)._overflowWeekday&&-1===t&&(t=ke),d(e).overflow=t),e}var pt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,gt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((\-?\d+)/i;function yt(e){var t,n,r,i,o,a,s=e._i,l=pt.exec(s)||ft.exec(s);if(l){for(d(e).iso=!0,t=0,n=gt.length;t10?"YYYY ":"YY "),o="HH:mm"+(n[4]?":ss":""),n[1]){var u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][new Date(n[2]).getDay()];if(n[1].substr(0,3)!==u)return d(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(n[5].length){case 2:a=0===s?" +0000":((s="YXWVUTSRQPONZABCDEFGHIKLM".indexOf(n[5][1].toUpperCase())-12)<0?" -":" +")+(""+s).replace(/^-?/,"0").match(/..$/)[0]+"00";break;case 4:a=l[n[5]];break;default:a=l[" GMT"]}n[5]=a,e._i=n.splice(1).join("")," ZZ",e._f=r+i+o+" ZZ",xt(e),d(e).rfc2822=!0}else e._isValid=!1}function wt(e,t,n){return null!=e?e:null!=t?t:n}function $t(e){var n,r,i,o,a=[];if(!e._d){for(i=function(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[be]&&function(e){var t,n,r,i,o,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)o=1,a=4,n=wt(t.GG,e._a[ye],ze(kt(),1,4).year),r=wt(t.W,1),((i=wt(t.E,1))<1||i>7)&&(l=!0);else{o=e._locale._week.dow,a=e._locale._week.doy;var u=ze(kt(),o,a);n=wt(t.gg,e._a[ye],u.year),r=wt(t.w,u.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+o,(t.e<0||t.e>6)&&(l=!0)):i=o}r<1||r>Ge(n,o,a)?d(e)._overflowWeeks=!0:null!=l?d(e)._overflowWeekday=!0:(s=Ve(n,r,i,o,a),e._a[ye]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=wt(e._a[ye],i[ye]),(e._dayOfYear>Re(o)||0===e._dayOfYear)&&(d(e)._overflowDayOfYear=!0),r=Ne(o,0,e._dayOfYear),e._a[be]=r.getUTCMonth(),e._a[_e]=r.getUTCDate()),n=0;n<3&&null==e._a[n];++n)e._a[n]=a[n]=i[n];for(;n<7;n++)e._a[n]=a[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[we]&&0===e._a[$e]&&0===e._a[xe]&&0===e._a[Me]&&(e._nextDay=!0,e._a[we]=0),e._d=(e._useUTC?Ne:function(e,t,n,r,i,o,a){var s=new Date(e,t,n,r,i,o,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[we]=24)}}function xt(e){if(e._f!==t.ISO_8601)if(e._f!==t.RFC_2822){e._a=[],d(e).empty=!0;var n,r,i,o,a,s=""+e._i,l=s.length,u=0;for(i=q(e._f,e._locale).match(j)||[],n=0;n0&&d(e).unusedInput.push(a),s=s.slice(s.indexOf(r)+r.length),u+=r.length),G[o]?(r?d(e).empty=!1:d(e).unusedTokens.push(o),ve(o,r,e)):e._strict&&!r&&d(e).unusedTokens.push(o);d(e).charsLeftOver=l-u,s.length>0&&d(e).unusedInput.push(s),e._a[we]<=12&&!0===d(e).bigHour&&e._a[we]>0&&(d(e).bigHour=void 0),d(e).parsedDateParts=e._a.slice(0),d(e).meridiem=e._meridiem,e._a[we]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[we],e._meridiem),$t(e),dt(e)}else _t(e);else yt(e)}function Mt(e){var l=e._i,c=e._f;return e._locale=e._locale||ct(e._l),null===l||void 0===c&&""===l?h({nullInput:!0}):("string"==typeof l&&(e._i=l=e._locale.preparse(l)),b(l)?new y(dt(l)):(a(l)?e._d=l:n(c)?function(e){var t,n,r,i,o;if(0===e._f.length)return d(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:h()});function Lt(e,t){var r,i;if(1===t.length&&n(t[0])&&(t=t[0]),!t.length)return kt();for(r=t[0],i=1;i(o=Ge(e,r,i))&&(t=o),function(e,t,n,r,i){var o=Ve(e,t,n,r,i),a=Ne(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,i))}W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Zt("gggg","weekYear"),Zt("ggggg","weekYear"),Zt("GGGG","isoWeekYear"),Zt("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),de("G",ae),de("g",ae),de("GG",Q,J),de("gg",Q,J),de("GGGG",re,X),de("gggg",re,X),de("GGGGG",ie,Z),de("ggggg",ie,Z),me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=w(e)}),me(["gg","GG"],function(e,n,r,i){n[i]=t.parseTwoDigitYear(e)}),W("Q",0,"Qo","quarter"),A("quarter","Q"),H("quarter",7),de("Q",B),ge("Q",function(e,t){t[be]=3*(w(e)-1)}),W("D",["DD",2],"Do","date"),A("date","D"),H("date",9),de("D",Q),de("DD",Q,J),de("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ge(["D","DD"],_e),ge("Do",function(e,t){t[_e]=w(e.match(Q)[0])});var en=R("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),H("dayOfYear",4),de("DDD",ne),de("DDDD",K),ge(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),W("m",["mm",2],0,"minute"),A("minute","m"),H("minute",14),de("m",Q),de("mm",Q,J),ge(["m","mm"],$e);var tn=R("Minutes",!1);W("s",["ss",2],0,"second"),A("second","s"),H("second",15),de("s",Q),de("ss",Q,J),ge(["s","ss"],xe);var nn,rn=R("Seconds",!1);for(W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),H("millisecond",16),de("S",ne,B),de("SS",ne,J),de("SSS",ne,K),nn="SSSS";nn.length<=9;nn+="S")de(nn,oe);function on(e,t){t[Me]=w(1e3*("0."+e))}for(nn="S";nn.length<=9;nn+="S")ge(nn,on);var an=R("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var sn=y.prototype;function ln(e){return e}sn.add=qt,sn.calendar=function(e,n){var r=e||kt(),i=Rt(r,this).startOf("day"),o=t.calendarFormat(this,i)||"sameElse",a=n&&(S(n[o])?n[o].call(this,r):n[o]);return this.format(a||this.localeData().calendar(o,this,kt(r)))},sn.clone=function(){return new y(this)},sn.diff=function(e,t,n){var r,i,o,a;return this.isValid()&&(r=Rt(e,this)).isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),"year"===(t=Y(t))||"month"===t||"quarter"===t?(s=this,l=r,d=12*(l.year()-s.year())+(l.month()-s.month()),p=s.clone().add(d,"months"),l-p<0?(u=s.clone().add(d-1,"months"),c=(l-p)/(p-u)):(u=s.clone().add(d+1,"months"),c=(l-p)/(u-p)),a=-(d+c)||0,"quarter"===t?a/=3:"year"===t&&(a/=12)):(o=this-r,a="second"===t?o/1e3:"minute"===t?o/6e4:"hour"===t?o/36e5:"day"===t?(o-i)/864e5:"week"===t?(o-i)/6048e5:o),n?a:_(a)):NaN;var s,l,u,c,d,p},sn.endOf=function(e){return void 0===(e=Y(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},sn.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=U(this,e);return this.localeData().postformat(n)},sn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||kt(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.fromNow=function(e){return this.from(kt(),e)},sn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||kt(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},sn.toNow=function(e){return this.to(kt(),e)},sn.get=function(e){return S(this[e=Y(e)])?this[e]():this},sn.invalidAt=function(){return d(this).overflow},sn.isAfter=function(e,t){var n=b(e)?e:kt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=Y(i(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()9999?U(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():U(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},sn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},sn.toJSON=function(){return this.isValid()?this.toISOString():null},sn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},sn.unix=function(){return Math.floor(this.valueOf()/1e3)},sn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},sn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},sn.year=Ie,sn.isLeapYear=function(){return Fe(this.year())},sn.weekYear=function(e){return Qt.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},sn.isoWeekYear=function(e){return Qt.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},sn.quarter=sn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},sn.month=Ye,sn.daysInMonth=function(){return Te(this.year(),this.month())},sn.week=sn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},sn.isoWeek=sn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},sn.weeksInYear=function(){var e=this.localeData()._week;return Ge(this.year(),e.dow,e.doy)},sn.isoWeeksInYear=function(){return Ge(this.year(),1,4)},sn.date=en,sn.day=sn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},sn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},sn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},sn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},sn.hour=sn.hours=nt,sn.minute=sn.minutes=tn,sn.second=sn.seconds=rn,sn.millisecond=sn.milliseconds=an,sn.utcOffset=function(e,n,r){var i,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(le,e)))return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&n&&(i=Ft(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),o!==e&&(!n||this._changeInProgress?Ut(this,Vt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ft(this)},sn.utc=function(e){return this.utcOffset(0,e)},sn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ft(this),"m")),this},sn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},sn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},sn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},sn.isLocal=function(){return!!this.isValid()&&!this._isUTC},sn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},sn.isUtc=It,sn.isUTC=It,sn.zoneAbbr=function(){return this._isUTC?"UTC":""},sn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},sn.dates=M("dates accessor is deprecated. Use date instead.",en),sn.months=M("months accessor is deprecated. Use month instead",Ye),sn.years=M("years accessor is deprecated. Use year instead",Ie),sn.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),sn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!i(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),(e=Mt(e))._a){var t=e._isUTC?c(e._a):kt(e._a);this._isDSTShifted=this.isValid()&&$(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var un=L.prototype;function cn(e,t,n,r){var i=ct(),o=c().set(r,t);return i[n](o,e)}function dn(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=cn(e,r,n,"month");return i}function pn(e,t,n,r){"boolean"==typeof e?(o(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,o(t)&&(n=t,t=void 0),t=t||"");var i,a=ct(),s=e?a._week.dow:0;if(null!=n)return cn(t,(n+s)%7,r,"day");var l=[];for(i=0;i<7;i++)l[i]=cn(t,(i+s)%7,r,"day");return l}un.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return S(r)?r.call(t,n):r},un.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},un.invalidDate=function(){return this._invalidDate},un.ordinal=function(e){return this._ordinal.replace("%d",e)},un.preparse=ln,un.postformat=ln,un.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return S(i)?i(e,t,n,r):i.replace(/%d/i,e)},un.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)},un.set=function(e){var t,n;for(n in e)S(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},un.months=function(e,t){return e?n(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:n(this._months)?this._months:this._months.standalone},un.monthsShort=function(e,t){return e?n(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},un.monthsParse=function(e,t,n){var r,i,o;if(this._monthsParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=c([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Se.call(this._shortMonthsParse,a))?i:null:-1!==(i=Se.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Se.call(this._shortMonthsParse,a))?i:-1!==(i=Se.call(this._longMonthsParse,a))?i:null:-1!==(i=Se.call(this._longMonthsParse,a))?i:-1!==(i=Se.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=c([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},un.monthsRegex=function(e){return this._monthsParseExact?(l(this,"_monthsRegex")||He.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Oe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},un.monthsShortRegex=function(e){return this._monthsParseExact?(l(this,"_monthsRegex")||He.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},un.week=function(e){return ze(e,this._week.dow,this._week.doy).week},un.firstDayOfYear=function(){return this._week.doy},un.firstDayOfWeek=function(){return this._week.dow},un.weekdays=function(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone},un.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},un.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},un.weekdaysParse=function(e,t,n){var r,i,o;if(this._weekdaysParseExact)return function(e,t,n){var r,i,o,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=c([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Se.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Se.call(this._minWeekdaysParse,a))?i:-1!==(i=Se.call(this._weekdaysParse,a))?i:-1!==(i=Se.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=c([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},un.weekdaysRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Be),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},un.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},un.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ke),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},un.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},un.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},lt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=M("moment.lang is deprecated. Use moment.locale instead.",lt),t.langData=M("moment.langData is deprecated. Use moment.localeData instead.",ct);var fn=Math.abs;function hn(e,t,n,r){var i=Vt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function mn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function yn(e){return function(){return this.as(e)}}var bn=yn("ms"),_n=yn("s"),wn=yn("m"),$n=yn("h"),xn=yn("d"),Mn=yn("w"),Cn=yn("M"),kn=yn("y");function Sn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Tn=Sn("milliseconds"),Ln=Sn("seconds"),Dn=Sn("minutes"),En=Sn("hours"),An=Sn("days"),Yn=Sn("months"),Pn=Sn("years");var On=Math.round,Hn={ss:44,s:45,m:45,h:22,d:26,M:11};var Rn=Math.abs;function Fn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),i=Rn(this._months);e=_(n/60),t=_(e/60),n%=60,e%=60;var o=_(i/12),a=i%=12,s=r,l=t,u=e,c=n,d=this.asSeconds();return d?(d<0?"-":"")+"P"+(o?o+"Y":"")+(a?a+"M":"")+(s?s+"D":"")+(l||u||c?"T":"")+(l?l+"H":"")+(u?u+"M":"")+(c?c+"S":""):"P0D"}var In=Et.prototype;In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),e.milliseconds=fn(e.milliseconds),e.seconds=fn(e.seconds),e.minutes=fn(e.minutes),e.hours=fn(e.hours),e.months=fn(e.months),e.years=fn(e.years),this},In.add=function(e,t){return hn(this,e,t,1)},In.subtract=function(e,t){return hn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=Y(e))||"year"===e)return t=this._days+r/864e5,n=this._months+mn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=bn,In.asSeconds=_n,In.asMinutes=wn,In.asHours=$n,In.asDays=xn,In.asWeeks=Mn,In.asMonths=Cn,In.asYears=kn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},In._bubble=function(){var e,t,n,r,i,o=this._milliseconds,a=this._days,s=this._months,l=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*gn(vn(s)+a),a=0,s=0),l.milliseconds=o%1e3,e=_(o/1e3),l.seconds=e%60,t=_(e/60),l.minutes=t%60,n=_(t/60),l.hours=n%24,a+=_(n/24),s+=i=_(mn(a)),a-=gn(vn(i)),r=_(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},In.get=function(e){return e=Y(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Tn,In.seconds=Ln,In.minutes=Dn,In.hours=En,In.days=An,In.weeks=function(){return _(this.days()/7)},In.months=Yn,In.years=Pn,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Vt(e).abs(),i=On(r.as("s")),o=On(r.as("m")),a=On(r.as("h")),s=On(r.as("d")),l=On(r.as("M")),u=On(r.as("y")),c=i<=Hn.ss&&["s",i]||i0,c[4]=n,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},In.toISOString=Fn,In.toString=Fn,In.toJSON=Fn,In.locale=Jt,In.localeData=Xt,In.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),In.lang=Kt,W("X",0,0,"unix"),W("x",0,0,"valueOf"),de("x",ae),de("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ge("x",function(e,t,n){n._d=new Date(w(e))}),t.version="2.18.1",e=kt,t.fn=sn,t.min=function(){return Lt("isBefore",[].slice.call(arguments,0))},t.max=function(){return Lt("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=c,t.unix=function(e){return kt(1e3*e)},t.months=function(e,t){return dn(e,t,"months")},t.isDate=a,t.locale=lt,t.invalid=h,t.duration=Vt,t.isMoment=b,t.weekdays=function(e,t,n){return pn(e,t,n,"weekdays")},t.parseZone=function(){return kt.apply(null,arguments).parseZone()},t.localeData=ct,t.isDuration=At,t.monthsShort=function(e,t){return dn(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return pn(e,t,n,"weekdaysMin")},t.defineLocale=ut,t.updateLocale=function(e,t){if(null!=t){var n,r=rt;null!=it[e]&&(r=it[e]._config),(n=new L(t=T(r,t))).parentLocale=it[e],it[e]=n,lt(e)}else null!=it[e]&&(null!=it[e].parentLocale?it[e]=it[e].parentLocale:null!=it[e]&&delete it[e]);return it[e]},t.locales=function(){return D(it)},t.weekdaysShort=function(e,t,n){return pn(e,t,n,"weekdaysShort")},t.normalizeUnits=Y,t.relativeTimeRounding=function(e){return void 0===e?On:"function"==typeof e&&(On=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==Hn[e]&&(void 0===t?Hn[e]:(Hn[e]=t,"s"===e&&(Hn.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},t.prototype=sn,t.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}}),t.defineLocale("ar-dz",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:4}}),t.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});var Nn={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},jn=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},Vn={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},zn=function(e){return function(t,n,r,i){var o=jn(t),a=Vn[e][jn(t)];return 2===o&&(a=a[n?0:1]),a.replace(/%d/i,t)}},Gn=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];t.defineLocale("ar-ly",{months:Gn,monthsShort:Gn,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:zn("s"),m:zn("m"),mm:zn("m"),h:zn("h"),hh:zn("h"),d:zn("d"),dd:zn("d"),M:zn("M"),MM:zn("M"),y:zn("y"),yy:zn("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Nn[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),t.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}});var Wn={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Un={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};t.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return Un[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return Wn[e]}).replace(/,/g,"،")},week:{dow:0,doy:6}}),t.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});var qn={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},Bn={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},Jn=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},Kn={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Xn=function(e){return function(t,n,r,i){var o=Jn(t),a=Kn[e][Jn(t)];return 2===o&&(a=a[n?0:1]),a.replace(/%d/i,t)}},Zn=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"];t.defineLocale("ar",{months:Zn,monthsShort:Zn,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:Xn("s"),m:Xn("m"),mm:Xn("m"),h:Xn("h"),hh:Xn("h"),d:Xn("d"),dd:Xn("d"),M:Xn("M"),MM:Xn("M"),y:Xn("y"),yy:Xn("y")},preparse:function(e){return e.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(e){return Bn[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return qn[e]}).replace(/,/g,"،")},week:{dow:6,doy:12}});var Qn={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};function er(e,t,n){var r,i;return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,i={mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}t.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var t=e%10;return e+(Qn[t]||Qn[e%100-t]||Qn[e>=100?100:null])},week:{dow:1,doy:7}}),t.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:er,mm:er,h:er,hh:er,d:"дзень",dd:er,M:"месяц",MM:er,y:"год",yy:er},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}}),t.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});var tr={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},nr={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};t.defineLocale("bn",{months:"জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,function(e){return nr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return tr[e]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});var rr={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},ir={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};function or(e,t,n){return e+" "+function(e,t){if(2===t)return function(e){var t={m:"v",b:"v",d:"z"};if(void 0===t[e.charAt(0)])return e;return t[e.charAt(0)]+e.substring(1)}(e);return e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function ar(e,t,n){var r=e+" ";switch(n){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}t.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(e){return ir[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return rr[e]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}}),t.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:or,h:"un eur",hh:"%d eur",d:"un devezh",dd:or,M:"ur miz",MM:or,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}}),t.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:ar,mm:ar,h:ar,hh:ar,d:"dan",dd:ar,M:"mjesec",MM:ar,y:"godinu",yy:ar},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),t.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"[el] D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"[el] D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"[el] dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});var sr="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),lr="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");function ur(e){return e>1&&e<5&&1!=~~(e/10)}function cr(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(ur(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(ur(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(ur(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(ur(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(ur(e)?"roky":"let"):i+"lety"}}function dr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}function pr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}function fr(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}t.defineLocale("cs",{months:sr,monthsShort:lr,monthsParse:function(e,t){var n,r=[];for(n=0;n<12;n++)r[n]=new RegExp("^"+e[n]+"$|^"+t[n]+"$","i");return r}(sr,lr),shortMonthsParse:function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i");return n}(lr),longMonthsParse:function(e){var t,n=[];for(t=0;t<12;t++)n[t]=new RegExp("^"+e[t]+"$","i");return n}(sr),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:cr,m:cr,mm:cr,h:cr,hh:cr,d:cr,dd:cr,M:cr,MM:cr,y:cr,yy:cr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}}),t.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}}),t.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:dr,mm:"%d Minuten",h:dr,hh:"%d Stunden",d:dr,dd:dr,M:dr,MM:dr,y:dr,yy:dr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._März_April_Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH.mm",LLLL:"dddd, D. MMMM YYYY HH.mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:pr,mm:"%d Minuten",h:pr,hh:"%d Stunden",d:pr,dd:pr,M:pr,MM:pr,y:pr,yy:pr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:fr,mm:"%d Minuten",h:fr,hh:"%d Stunden",d:fr,dd:fr,M:fr,MM:fr,y:fr,yy:fr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var hr=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],gr=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];t.defineLocale("dv",{months:hr,monthsShort:hr,weekdays:gr,weekdaysShort:gr,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}}),t.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n=this._calendarEl[e],r=t&&t.hours();return S(n)&&(n=n.apply(t)),n.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}}),t.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});var mr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),vr="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");t.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?vr[e.month()]:mr[e.month()]:mr},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});var yr="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),br="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_");function _r(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?br[e.month()]:yr[e.month()]:yr},monthsParseExact:!0,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),t.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:_r,m:_r,mm:_r,h:_r,hh:_r,d:_r,dd:"%d päeva",M:_r,MM:_r,y:_r,yy:_r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var wr={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},$r={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};t.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return $r[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return wr[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});var xr="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),Mr=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",xr[7],xr[8],xr[9]];function Cr(e,t,n,r){var i="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"m":return r?"minuutin":"minuutti";case"mm":i=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":i=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":i=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":i=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":i=r?"vuoden":"vuotta"}return i=function(e,t){return e<10?t?Mr[e]:xr[e]:e}(e,r)+" "+i}t.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:Cr,m:Cr,mm:Cr,h:Cr,hh:Cr,d:Cr,dd:Cr,M:Cr,MM:Cr,y:Cr,yy:Cr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}}),t.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}}),t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});var kr="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),Sr="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");t.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?Sr[e.month()]:kr[e.month()]:kr},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});function Tr(e,t,n,r){var i={s:["thodde secondanim","thodde second"],m:["eka mintan","ek minute"],mm:[e+" mintanim",e+" mintam"],h:["eka horan","ek hor"],hh:[e+" horanim",e+" hor"],d:["eka disan","ek dis"],dd:[e+" disanim",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineanim",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsanim",e+" vorsam"]};return t?i[n][0]:i[n][1]}t.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}}),t.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),t.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:Tr,m:Tr,mm:Tr,h:Tr,hh:Tr,d:Tr,dd:Tr,M:Tr,MM:Tr,y:Tr,yy:Tr},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokalli"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokalli":e<16?"donparam":e<20?"sanje":"rati"}}),t.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}});var Lr={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},Dr={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function Er(e,t,n){var r=e+" ";switch(n){case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return r+=1===e?"dan":"dana";case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}t.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return Dr[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Lr[e]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}}),t.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:Er,mm:Er,h:Er,hh:Er,d:"dan",dd:Er,M:"mjesec",MM:Er,y:"godinu",yy:Er},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Ar="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function Yr(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function Pr(e){return(e?"":"[múlt] ")+"["+Ar[this.day()]+"] LT[-kor]"}function Or(e){return e%100==11||e%10!=1}function Hr(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return t?"mínúta":"mínútu";case"mm":return Or(e)?i+(t||r?"mínútur":"mínútum"):t?i+"mínúta":i+"mínútu";case"hh":return Or(e)?i+(t||r?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return t?"dagur":r?"dag":"degi";case"dd":return Or(e)?t?i+"dagar":i+(r?"daga":"dögum"):t?i+"dagur":i+(r?"dag":"degi");case"M":return t?"mánuður":r?"mánuð":"mánuði";case"MM":return Or(e)?t?i+"mánuðir":i+(r?"mánuði":"mánuðum"):t?i+"mánuður":i+(r?"mánuð":"mánuði");case"y":return t||r?"ár":"ári";case"yy":return Or(e)?i+(t||r?"ár":"árum"):i+(t||r?"ár":"ári")}}t.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return Pr.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return Pr.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:Yr,m:Yr,mm:Yr,h:Yr,hh:Yr,d:Yr,dd:Yr,M:Yr,MM:Yr,y:Yr,yy:Yr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}}),t.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),t.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:Hr,m:Hr,mm:Hr,h:"klukkustund",hh:Hr,d:Hr,dd:Hr,M:Hr,MM:Hr,y:Hr,yy:Hr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),t.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 HH:mm dddd",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日 HH:mm dddd"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),t.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),t.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return/(წამი|წუთი|საათი|წელი)/.test(e)?e.replace(/ი$/,"ში"):e+"ში"},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის უკან"):/წელი/.test(e)?e.replace(/წელი$/,"წლის უკან"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});var Rr={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};t.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(Rr[e]||Rr[e%10]||Rr[e>=100?100:null])},week:{dow:1,doy:7}}),t.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}});var Fr={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},Ir={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};t.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(e){return Ir[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Fr[e]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}}),t.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}});var Nr={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};function jr(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function Vr(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return Vr(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return Vr(e)}return Vr(e/=1e3)}t.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(Nr[e]||Nr[e%10]||Nr[e>=100?100:null])},week:{dow:1,doy:7}}),t.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return Vr(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return Vr(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",m:jr,mm:"%d Minutten",h:jr,hh:"%d Stonnen",d:jr,dd:"%d Deeg",M:jr,MM:"%d Méint",y:jr,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});var zr={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function Gr(e,t,n,r){return t?Ur(n)[0]:r?Ur(n)[1]:Ur(n)[2]}function Wr(e){return e%10==0||e>10&&e<20}function Ur(e){return zr[e].split("_")}function qr(e,t,n,r){var i=e+" ";return 1===e?i+Gr(0,t,n[0],r):t?i+(Wr(e)?Ur(n)[1]:Ur(n)[0]):r?i+Ur(n)[1]:i+(Wr(e)?Ur(n)[1]:Ur(n)[2])}t.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},m:Gr,mm:qr,h:Gr,hh:qr,d:Gr,dd:qr,M:Gr,MM:qr,y:Gr,yy:qr},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});var Br={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function Jr(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function Kr(e,t,n){return e+" "+Jr(Br[n],e,t)}function Xr(e,t,n){return Jr(Br[n],e,t)}t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},m:Xr,mm:Kr,h:Xr,hh:Kr,d:Xr,dd:Kr,M:Xr,MM:Kr,y:Xr,yy:Kr},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Zr={words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=Zr.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+Zr.correctGrammaticalCase(e,r)}};t.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:Zr.translate,mm:Zr.translate,h:Zr.translate,hh:Zr.translate,d:"dan",dd:Zr.translate,M:"mjesec",MM:Zr.translate,y:"godinu",yy:Zr.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),t.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),t.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}}),t.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});var Qr={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},ei={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function ti(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}t.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:ti,m:ti,mm:ti,h:ti,hh:ti,d:ti,dd:ti,M:ti,MM:ti,y:ti,yy:ti},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return ei[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Qr[e]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात्री"===t?e<4?e:e+12:"सकाळी"===t?e:"दुपारी"===t?e>=10?e:e+12:"सायंकाळी"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात्री":e<10?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}}),t.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),t.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});var ni={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},ri={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};t.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(e){return ri[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ni[e]})},week:{dow:1,doy:4}}),t.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var ii={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},oi={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};t.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,function(e){return oi[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return ii[e]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});var ai="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),si="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),li=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],ui=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?si[e.month()]:ai[e.month()]:ai},monthsRegex:ui,monthsShortRegex:ui,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:li,longMonthsParse:li,shortMonthsParse:li,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});var ci="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),di="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),pi=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],fi=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?di[e.month()]:ci[e.month()]:ci},monthsRegex:fi,monthsShortRegex:fi,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:pi,longMonthsParse:pi,shortMonthsParse:pi,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}}),t.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var hi={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},gi={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};t.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(e){return gi[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return hi[e]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});var mi="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),vi="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");function yi(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function bi(e,t,n){var r=e+" ";switch(n){case"m":return t?"minuta":"minutę";case"mm":return r+(yi(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(yi(e)?"godziny":"godzin");case"MM":return r+(yi(e)?"miesiące":"miesięcy");case"yy":return r+(yi(e)?"lata":"lat")}}function _i(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"}[n]}function wi(e,t,n){var r,i;return"m"===n?t?"минута":"минуту":e+" "+(r=+e,i={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}t.defineLocale("pl",{months:function(e,t){return e?""===t?"("+vi[e.month()]+"|"+mi[e.month()]+")":/D MMMM/.test(t)?vi[e.month()]:mi[e.month()]:mi},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:bi,mm:bi,h:bi,hh:bi,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:bi,y:"rok",yy:bi},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"}),t.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),t.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:_i,h:"o oră",hh:_i,d:"o zi",dd:_i,M:"o lună",MM:_i,y:"un an",yy:_i},week:{dow:1,doy:7}});var $i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:$i,longMonthsParse:$i,shortMonthsParse:$i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:wi,mm:wi,h:"час",hh:wi,d:"день",dd:wi,M:"месяц",MM:wi,y:"год",yy:wi},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:7}});var xi=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],Mi=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];t.defineLocale("sd",{months:xi,monthsShort:xi,weekdays:Mi,weekdaysShort:Mi,weekdaysMin:Mi,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),t.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});var Ci="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),ki="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function Si(e){return e>1&&e<5}function Ti(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?i+(Si(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(Si(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?i+(Si(e)?"dni":"dní"):i+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?i+(Si(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?i+(Si(e)?"roky":"rokov"):i+"rokmi"}}function Li(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami";case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi";case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci";case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti"}}t.defineLocale("sk",{months:Ci,monthsShort:ki,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:Ti,m:Ti,mm:Ti,h:Ti,hh:Ti,d:Ti,dd:Ti,M:Ti,MM:Ti,y:Ti,yy:Ti},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:Li,m:Li,mm:Li,h:Li,hh:Li,d:Li,dd:Li,M:Li,MM:Li,y:Li,yy:Li},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),t.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Di={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=Di.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+Di.correctGrammaticalCase(e,r)}};t.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:Di.translate,mm:Di.translate,h:Di.translate,hh:Di.translate,d:"дан",dd:Di.translate,M:"месец",MM:Di.translate,y:"годину",yy:Di.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});var Ei={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,t,n){var r=Ei.words[n];return 1===n.length?t?r[0]:r[1]:e+" "+Ei.correctGrammaticalCase(e,r)}};t.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:Ei.translate,mm:Ei.translate,h:Ei.translate,hh:Ei.translate,d:"dan",dd:Ei.translate,M:"mesec",MM:Ei.translate,y:"godinu",yy:Ei.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),t.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}}),t.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"e":1===t?"a":2===t?"a":"e")},week:{dow:1,doy:4}}),t.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});var Ai={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},Yi={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};t.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(e){return Yi[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return Ai[e]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t?e:"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}}),t.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}}),t.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sext_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Sex_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",m:"minutu ida",mm:"minutus %d",h:"horas ida",hh:"horas %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),t.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});var Pi="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function Oi(e,t,n,r){var i=function(e){var t=Math.floor(e%1e3/100),n=Math.floor(e%100/10),r=e%10,i="";t>0&&(i+=Pi[t]+"vatlh");n>0&&(i+=(""!==i?" ":"")+Pi[n]+"maH");r>0&&(i+=(""!==i?" ":"")+Pi[r]);return""===i?"pagh":i}(e);switch(n){case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}t.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",m:"wa’ tup",mm:Oi,h:"wa’ rep",hh:Oi,d:"wa’ jaj",dd:Oi,M:"wa’ jar",MM:Oi,y:"wa’ DIS",yy:Oi},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});var Hi={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};function Ri(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r?i[n][0]:t?i[n][0]:i[n][1]}function Fi(e,t,n){var r,i;return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,i={mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?i[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?i[1]:i[2])}function Ii(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}t.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},dayOfMonthOrdinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(e){if(0===e)return e+"'ıncı";var t=e%10;return e+(Hi[t]||Hi[e%100-t]||Hi[e>=100?100:null])},week:{dow:1,doy:7}}),t.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:Ri,m:Ri,mm:Ri,h:Ri,hh:Ri,d:Ri,dd:Ri,M:Ri,MM:Ri,y:Ri,yy:Ri},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),t.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}}),t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:Ii("[Сьогодні "),nextDay:Ii("[Завтра "),lastDay:Ii("[Вчора "),nextWeek:Ii("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return Ii("[Минулої] dddd [").call(this);case 1:case 2:case 4:return Ii("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:Fi,mm:Fi,h:"годину",hh:Fi,d:"день",dd:Fi,M:"місяць",MM:Fi,y:"рік",yy:Fi},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});var Ni=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],ji=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];return t.defineLocale("ur",{months:Ni,monthsShort:Ni,weekdays:ji,weekdaysShort:ji,weekdaysMin:ji,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}}),t.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}}),t.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}}),t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}}),t.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}}),t.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}}),t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}}),t.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),t.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}}),t.locale("en"),t}),function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=Object.getPrototypeOf,i=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},a=n.push,s=n.indexOf,l={},u=l.toString,c=l.hasOwnProperty,d=c.toString,p=d.call(Object),f={},h=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,i,o=(n=n||m).createElement("script");if(o.text=e,t)for(r in v)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[u.call(e)]||"object":typeof e}var _=function(e,t){return new _.fn.init(e,t)};function w(e){var t=!!e&&"length"in e&&e.length,n=b(e);return!h(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:"3.5.1",constructor:_,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(_.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),W=new RegExp(R+"|>"),U=new RegExp(N),q=new RegExp("^"+F+"$"),B={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){p()},ae=_e(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{Y.apply(D=P.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(e){Y={apply:D.length?function(e,t){A.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var o,s,u,c,d,h,v,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(p(t),t=t||f,g)){if(11!==w&&(d=Q.exec(e)))if(o=d[1]){if(9===w){if(!(u=t.getElementById(o)))return r;if(u.id===o)return r.push(u),r}else if(y&&(u=y.getElementById(o))&&b(t,u)&&u.id===o)return r.push(u),r}else{if(d[2])return Y.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return Y.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(v=e,y=t,1===w&&(W.test(e)||G.test(e))){for((y=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=_)),s=(h=a(e)).length;s--;)h[s]=(c?"#"+c:":scope")+" "+be(h[s]);v=h.join(",")}try{return Y.apply(r,y.querySelectorAll(v)),r}catch(t){S(e,!0)}finally{c===_&&t.removeAttribute("id")}}}return l(e.replace(V,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ue(e){return e[_]=!0,e}function ce(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ue(function(t){return t=+t,ue(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},o=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!J.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=f&&9===a.nodeType&&a.documentElement?(h=(f=a).documentElement,g=!o(f),w!=f&&(i=f.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce(function(e){return h.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(f.getElementsByClassName),n.getById=ce(function(e){return h.appendChild(e).id=_,!f.getElementsByName||!f.getElementsByName(_).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=Z.test(f.querySelectorAll))&&(ce(function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=Z.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),v.push("!=",N)}),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=Z.test(h.compareDocumentPosition),b=t||Z.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},T=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==f?-1:t==f?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){S(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&p(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&L.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(T),d){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=se.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ue,match:B,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return B.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=M[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&M(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=se.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(j," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,p,f,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(f=(u=(c=(d=(p=m)[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===$&&u[1])&&u[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(b=f=0)||h.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[$,f,b];break}}else if(y&&(b=f=(u=(c=(d=(p=t)[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===$&&u[1]),!1===b)for(;(p=++f&&p&&p[g]||(b=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((c=(d=p[_]||(p[_]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[$,b]),p!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ue(function(e){var t=[],n=[],r=s(e.replace(V,"$1"));return r[_]?ue(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return se(e,t).length>0}}),contains:ue(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:ue(function(e){return q.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:me(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function $e(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;s-1&&(o[u]=!(a[u]=d))}}else v=$e(v===a?v.splice(h,v.length):v),i?i(null,a,v,l):Y.apply(a,v)})}function Me(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],l=a?1:0,c=_e(function(e){return e===t},s,!0),d=_e(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):d(e,n,r));return t=null,i}];l1&&we(p),l>1&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(V,"$1"),n,l0,i=e.length>0,o=function(o,a,s,l,c){var d,h,m,v=0,y="0",b=o&&[],_=[],w=u,x=o||i&&r.find.TAG("*",c),M=$+=null==w?1:Math.random()||.1,C=x.length;for(c&&(u=a==f||a||c);y!==C&&null!=(d=x[y]);y++){if(i&&d){for(h=0,a||d.ownerDocument==f||(p(d),s=!g);m=e[h++];)if(m(d,a||f,s)){l.push(d);break}c&&($=M)}n&&((d=!m&&d)&&v--,o&&b.push(d))}if(v+=y,n&&y!==v){for(h=0;m=t[h++];)m(b,_,a,s);if(o){if(v>0)for(;y--;)b[y]||_[y]||(_[y]=E.call(l));_=$e(_)}Y.apply(l,_),c&&!o&&_.length>0&&v+t.length>1&&se.uniqueSort(l)}return c&&($=M,u=w),b};return n?ue(o):o}(o,i))).selector=e}return s},l=se.select=function(e,t,n,i){var o,l,u,c,d,p="function"==typeof e&&e,f=!i&&a(e=p.selector||e);if(n=n||[],1===f.length){if((l=f[0]=f[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=B.needsContext.test(e)?0:l.length;o--&&(u=l[o],!r.relative[c=u.type]);)if((d=r.find[c])&&(i=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&be(l)))return Y.apply(n,i),n;break}}return(p||s(e,f))(i,t,!g,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(T).join("")===_,n.detectDuplicates=!!d,p(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))}),ce(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(H,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(e);_.find=$,_.expr=$.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=$.uniqueSort,_.text=$.getText,_.isXMLDoc=$.isXML,_.contains=$.contains,_.escapeSelector=$.escape;var x=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(n))break;r.push(e)}return r},M=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},C=_.expr.match.needsContext;function k(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,t,n){return h(t)?_.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?_.grep(e,function(e){return e===t!==n}):"string"!=typeof t?_.grep(e,function(e){return s.call(t,e)>-1!==n}):_.filter(t,e,n)}_.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?_.find.matchesSelector(r,e)?[r]:[]:_.find.matches(e,_.grep(t,function(e){return 1===e.nodeType}))},_.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(_(e).filter(function(){for(t=0;t1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&C.test(e)?_(e):e||[],!1).length}});var L,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),S.test(r[1])&&_.isPlainObject(t))for(r in t)h(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=m.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):h(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,L=_(m);var E=/^(?:parents|prev(?:Until|All))/,A={children:!0,contents:!0,next:!0,prev:!0};function Y(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&_.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(_(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x(e,"parentNode")},parentsUntil:function(e,t,n){return x(e,"parentNode",n)},next:function(e){return Y(e,"nextSibling")},prev:function(e){return Y(e,"previousSibling")},nextAll:function(e){return x(e,"nextSibling")},prevAll:function(e){return x(e,"previousSibling")},nextUntil:function(e,t,n){return x(e,"nextSibling",n)},prevUntil:function(e,t,n){return x(e,"previousSibling",n)},siblings:function(e){return M((e.parentNode||{}).firstChild,e)},children:function(e){return M(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(k(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},function(e,t){_.fn[e]=function(n,r){var i=_.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=_.filter(r,i)),this.length>1&&(A[e]||_.uniqueSort(i),E.test(e)&&i.reverse()),this.pushStack(i)}});var P=/[^\x20\t\r\n\f]+/g;function O(e){return e}function H(e){throw e}function R(e,t,n,r){var i;try{e&&h(i=e.promise)?i.call(e).done(t).fail(n):e&&h(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(P)||[],function(e,n){t[n]=!0}),t}(e):_.extend({},e);var t,n,r,i,o=[],a=[],s=-1,l=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?_.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},_.extend({Deferred:function(t){var n=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return _.Deferred(function(t){_.each(n,function(n,r){var i=h(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&h(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,l=arguments,u=function(){var e,u;if(!(t=o&&(r!==H&&(s=void 0,l=[e]),n.rejectWith(s,l))}};t?c():(_.Deferred.getStackHook&&(c.stackTrace=_.Deferred.getStackHook()),e.setTimeout(c))}}return _.Deferred(function(e){n[0][3].add(a(0,e,h(i)?i:O,e.notifyWith)),n[1][3].add(a(0,e,h(t)?t:O)),n[2][3].add(a(0,e,h(r)?r:H))}).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},o={};return _.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=i.call(arguments),a=_.Deferred(),s=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?i.call(arguments):n,--t||a.resolveWith(r,o)}};if(t<=1&&(R(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||h(o[n]&&o[n].then)))return a.then();for(;n--;)R(o[n],s(n),a.reject);return a.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&F.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},_.readyException=function(t){e.setTimeout(function(){throw t})};var I=_.Deferred();function N(){m.removeEventListener("DOMContentLoaded",N),e.removeEventListener("load",N),_.ready()}_.fn.ready=function(e){return I.then(e).catch(function(e){_.readyException(e)}),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||I.resolveWith(m,[_]))}}),_.ready.then=I.then,"complete"===m.readyState||"loading"!==m.readyState&&!m.documentElement.doScroll?e.setTimeout(_.ready):(m.addEventListener("DOMContentLoaded",N),e.addEventListener("load",N));var j=function(e,t,n,r,i,o,a){var s=0,l=e.length,u=null==n;if("object"===b(n))for(s in i=!0,n)j(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,h(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(_(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),_.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=B.get(e,t),n&&(!r||Array.isArray(n)?r=B.access(e,t,_.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),r=n.length,i=n.shift(),o=_._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){_.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return B.get(e,n)||B.access(e,n,{empty:_.Callbacks("once memory").add(function(){B.remove(e,[t+"queue",n])})})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ce.appendChild(de),f.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",f.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",f.option=!!ce.lastChild;var ge={thead:[1,"
Name Email
","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?_.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var ye=/<|&#?\w+;/;function be(e,t,n,r,i){for(var o,a,s,l,u,c,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f-1)i&&i.push(o);else if(u=re(o),a=me(d.appendChild(o),"script"),u&&ve(a),n)for(c=0;o=a[c++];)he.test(o.type||"")&&n.push(o);return d}var _e=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$e=/^([^.]*)(?:\.(.+)|)/;function xe(){return!0}function Me(){return!1}function Ce(e,t){return e===function(){try{return m.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Me;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return _().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=_.guid++)),e.each(function(){_.event.add(this,t,i,r,n)})}function Se(e,t,n){n?(B.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var r,o,a=B.get(this,t);if(1&e.isTrigger&&this[t]){if(a.length)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(a=i.call(arguments),B.set(this,t,a),r=n(this,t),this[t](),a!==(o=B.get(this,t))||r?B.set(this,t,!1):o={},a!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else a.length&&(B.set(this,t,{value:_.event.trigger(_.extend(a[0],_.Event.prototype),a.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===B.get(e,t)&&_.event.add(e,t,xe)}_.event={global:{},add:function(e,t,n,r,i){var o,a,s,l,u,c,d,p,f,h,g,m=B.get(e);if(U(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&_.find.matchesSelector(ne,i),n.guid||(n.guid=_.guid++),(l=m.events)||(l=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(P)||[""]).length;u--;)f=g=(s=$e.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f&&(d=_.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=_.event.special[f]||{},c=_.extend({type:f,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=l[f])||((p=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),_.event.global[f]=!0)},remove:function(e,t,n,r,i){var o,a,s,l,u,c,d,p,f,h,g,m=B.hasData(e)&&B.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(P)||[""]).length;u--;)if(f=g=(s=$e.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f){for(d=_.event.special[f]||{},p=l[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,d.remove&&d.remove.call(e,c));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,m.handle)||_.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)_.event.remove(e,f+t[u],n,r,!0);_.isEmptyObject(l)&&B.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),l=_.event.fix(e),u=(B.get(this,"events")||Object.create(null))[l.type]||[],c=_.event.special[l.type]||{};for(s[0]=l,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],a={},n=0;n-1:_.find(i,this,null,[u]).length),a[i]&&o.push(r);o.length&&s.push({elem:u,handlers:o})}return u=this,l\s*$/g;function Ee(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Ae(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ye(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(B.hasData(e)&&(s=B.get(e).events))for(i in B.remove(t,"handle events"),s)for(n=0,r=s[i].length;n1&&"string"==typeof m&&!f.checkClone&&Le.test(m))return e.each(function(i){var o=e.eq(i);v&&(t[0]=m.call(this,i,o.html())),Oe(o,t,n,r)});if(p&&(a=(i=be(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(l=(s=_.map(me(i,"script"),Ae)).length;d0&&ve(a,!d&&me(e,"script")),c},cleanData:function(e){for(var t,n,r,i=_.event.special,o=0;void 0!==(n=e[o]);o++)if(U(n)){if(t=n[B.expando]){if(t.events)for(r in t.events)i[r]?_.event.remove(n,r):_.removeEvent(n,r,t.handle);n[B.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),_.fn.extend({detach:function(e){return He(this,e,!0)},remove:function(e){return He(this,e)},text:function(e){return j(this,function(e){return void 0===e?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Oe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ee(this,e).appendChild(e)})},prepend:function(){return Oe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ee(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Oe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Oe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return _.clone(this,e,t)})},html:function(e){return j(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Te.test(e)&&!ge[(fe.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n3,ne.removeChild(t)),s}}))}();var ze=["Webkit","Moz","ms"],Ge=m.createElement("div").style,We={};function Ue(e){var t=_.cssProps[e]||We[e];return t||(e in Ge?e:We[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=ze.length;n--;)if((e=ze[n]+t)in Ge)return e}(e)||e)}var qe=/^(none|table(?!-c[ea]).+)/,Be=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Xe(e,t,n){var r=ee.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=_.css(e,n+te[a],!0,i)),r?("content"===n&&(l-=_.css(e,"padding"+te[a],!0,i)),"margin"!==n&&(l-=_.css(e,"border"+te[a]+"Width",!0,i))):(l+=_.css(e,"padding"+te[a],!0,i),"padding"!==n?l+=_.css(e,"border"+te[a]+"Width",!0,i):s+=_.css(e,"border"+te[a]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-s-.5))||0),l}function Qe(e,t,n){var r=Fe(e),i=(!f.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,r),o=i,a=je(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Re.test(a)){if(!n)return a;a="auto"}return(!f.boxSizingReliable()&&i||!f.reliableTrDimensions()&&k(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===_.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===_.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ze(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=je(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=W(t),l=Be.test(t),u=e.style;if(l||(t=Ue(s)),a=_.cssHooks[t]||_.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];"string"===(o=typeof n)&&(i=ee.exec(n))&&i[1]&&(n=ae(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(_.cssNumber[s]?"":"px")),f.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var i,o,a,s=W(t);return Be.test(t)||(t=Ue(s)),(a=_.cssHooks[t]||_.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=je(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),_.each(["height","width"],function(e,t){_.cssHooks[t]={get:function(e,n,r){if(n)return!qe.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Qe(e,t,r):Ie(e,Je,function(){return Qe(e,t,r)})},set:function(e,n,r){var i,o=Fe(e),a=!f.scrollboxSize()&&"absolute"===o.position,s=(a||r)&&"border-box"===_.css(e,"boxSizing",!1,o),l=r?Ze(e,t,r,s,o):0;return s&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),l&&(i=ee.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),Xe(0,n,l)}}}),_.cssHooks.marginLeft=Ve(f.reliableMarginLeft,function(e,t){if(t)return(parseFloat(je(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),_.each({margin:"",padding:"",border:"Width"},function(e,t){_.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+te[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(_.cssHooks[e+t].set=Xe)}),_.fn.extend({css:function(e,t){return j(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a1)}}),_.Tween=et,et.prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}},et.prototype.init.prototype=et.prototype,et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[Ue(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},et.propHooks.scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=et.prototype.init,_.fx.step={};var tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){nt&&(!1===m.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(ot):e.setTimeout(ot,_.fx.interval),_.fx.tick())}function at(){return e.setTimeout(function(){tt=void 0}),tt=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=te[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(ut.tweeners[t]||[]).concat(ut.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){_.removeAttr(this,e)})}}),_.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,n):(1===o&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=_.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!f.radioValue&&"radio"===t&&k(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||_.find.attr;dt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=dt[a],dt[a]=i,i=null!=n(e,t,r)?a:null,dt[a]=o),i}});var pt=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}_.fn.extend({prop:function(e,t){return j(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[_.propFix[e]||e]})}}),_.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,l=0;if(h(e))return this.each(function(t){_(this).addClass(e.call(this,t,gt(this)))});if((t=mt(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,l=0;if(h(e))return this.each(function(t){_(this).removeClass(e.call(this,t,gt(this)))});if(!arguments.length)return this.attr("class","");if((t=mt(e)).length)for(;n=this[l++];)if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):h(e)?this.each(function(n){_(this).toggleClass(e.call(this,n,gt(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=_(this),a=mt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&B.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":B.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+ht(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var vt=/\r/g;_.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=h(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,function(e){return null==e?"":e+""})),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(vt,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:ht(_.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?o+1:i.length;for(r=o<0?l:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},f.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),f.focusin="onfocusin"in e;var yt=/^(?:focusinfocus|focusoutblur)$/,bt=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(t,n,r,i){var o,a,s,l,u,d,p,f,v=[r||m],y=c.call(t,"type")?t.type:t,b=c.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=r=r||m,3!==r.nodeType&&8!==r.nodeType&&!yt.test(y+_.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),u=y.indexOf(":")<0&&"on"+y,(t=t[_.expando]?t:new _.Event(y,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:_.makeArray(n,[t]),p=_.event.special[y]||{},i||!p.trigger||!1!==p.trigger.apply(r,n))){if(!i&&!p.noBubble&&!g(r)){for(l=p.delegateType||y,yt.test(l+y)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(r.ownerDocument||m)&&v.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=v[o++])&&!t.isPropagationStopped();)f=a,t.type=o>1?l:p.bindType||y,(d=(B.get(a,"events")||Object.create(null))[t.type]&&B.get(a,"handle"))&&d.apply(a,n),(d=u&&a[u])&&d.apply&&U(a)&&(t.result=d.apply(a,n),!1===t.result&&t.preventDefault());return t.type=y,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!U(r)||u&&h(r[y])&&!g(r)&&((s=r[u])&&(r[u]=null),_.event.triggered=y,t.isPropagationStopped()&&f.addEventListener(y,bt),r[y](),t.isPropagationStopped()&&f.removeEventListener(y,bt),_.event.triggered=void 0,s&&(r[u]=s)),t.result}},simulate:function(e,t,n){var r=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(r,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each(function(){_.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),f.focusin||_.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=B.access(r,t);i||r.addEventListener(e,n,!0),B.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=B.access(r,t)-1;i?B.access(r,t,i):(r.removeEventListener(e,n,!0),B.remove(r,t))}}});var _t=e.location,wt={guid:Date.now()},$t=/\?/;_.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+t),n};var xt=/\[\]$/,Mt=/\r?\n/g,Ct=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function St(e,t,n,r){var i;if(Array.isArray(t))_.each(t,function(t,i){n||xt.test(e)?r(e,i):St(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)St(e+"["+i+"]",t[i],n,r)}_.param=function(e,t){var n,r=[],i=function(e,t){var n=h(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,function(){i(this.name,this.value)});else for(n in e)St(n,e[n],t,i);return r.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&kt.test(this.nodeName)&&!Ct.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:n.replace(Mt,"\r\n")}}).get()}});var Tt=/%20/g,Lt=/#.*$/,Dt=/([?&])_=[^&]*/,Et=/^(.*?):[ \t]*([^\r\n]*)$/gm,At=/^(?:GET|HEAD)$/,Yt=/^\/\//,Pt={},Ot={},Ht="*/".concat("*"),Rt=m.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(P)||[];if(h(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function It(e,t,n,r){var i={},o=e===Ot;function a(s){var l;return i[s]=!0,_.each(e[s]||[],function(e,s){var u=s(t,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),a(u),!1)}),l}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Nt(e,t){var n,r,i=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&_.extend(!0,e,r),e}Rt.href=_t.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:_t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(_t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ht,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Nt(Nt(e,_.ajaxSettings),t):Nt(_.ajaxSettings,e)},ajaxPrefilter:Ft(Pt),ajaxTransport:Ft(Ot),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,l,u,c,d,p,f=_.ajaxSetup({},n),h=f.context||f,g=f.context&&(h.nodeType||h.jquery)?_(h):_.event,v=_.Deferred(),y=_.Callbacks("once memory"),b=f.statusCode||{},w={},$={},x="canceled",M={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Et.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=$[e.toLowerCase()]=$[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)M.always(e[M.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),C(0,t),this}};if(v.promise(M),f.url=((t||f.url||_t.href)+"").replace(Yt,_t.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(P)||[""],null==f.crossDomain){l=m.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Rt.protocol+"//"+Rt.host!=l.protocol+"//"+l.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=_.param(f.data,f.traditional)),It(Pt,f,n,M),u)return M;for(d in(c=_.event&&f.global)&&0==_.active++&&_.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!At.test(f.type),i=f.url.replace(Lt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Tt,"+")):(p=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=($t.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Dt,"$1"),p=($t.test(i)?"&":"?")+"_="+wt.guid+++p),f.url=i+p),f.ifModified&&(_.lastModified[i]&&M.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&M.setRequestHeader("If-None-Match",_.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&M.setRequestHeader("Content-Type",f.contentType),M.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ht+"; q=0.01":""):f.accepts["*"]),f.headers)M.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(h,M,f)||u))return M.abort();if(x="abort",y.add(f.complete),M.done(f.success),M.fail(f.error),r=It(Ot,f,n,M)){if(M.readyState=1,c&&g.trigger("ajaxSend",[M,f]),u)return M;f.async&&f.timeout>0&&(s=e.setTimeout(function(){M.abort("timeout")},f.timeout));try{u=!1,r.send(w,C)}catch(e){if(u)throw e;C(-1,e)}}else C(-1,"No Transport");function C(t,n,a,l){var d,p,m,w,$,x=n;u||(u=!0,s&&e.clearTimeout(s),r=void 0,o=l||"",M.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(w=function(e,t,n){for(var r,i,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,M,a)),!d&&_.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),w=function(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(a=u[l+" "+o]||u["* "+o]))for(i in u)if((s=i.split(" "))[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[i]:!0!==u[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(f,w,M,d),d?(f.ifModified&&(($=M.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=$),($=M.getResponseHeader("etag"))&&(_.etag[i]=$)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,p=w.data,d=!(m=w.error))):(m=x,!t&&x||(x="error",t<0&&(t=0))),M.status=t,M.statusText=(n||x)+"",d?v.resolveWith(h,[p,x,M]):v.rejectWith(h,[M,x,m]),M.statusCode(b),b=void 0,c&&g.trigger(d?"ajaxSuccess":"ajaxError",[M,f,d?p:m]),y.fireWith(h,[M,x]),c&&(g.trigger("ajaxComplete",[M,f]),--_.active||_.event.trigger("ajaxStop")))}return M},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],function(e,t){_[t]=function(e,n,r,i){return h(n)&&(i=i||r,r=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:n,success:r},_.isPlainObject(e)&&e))}}),_.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),_._evalUrl=function(e,t,n){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t,n)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(h(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return h(e)?this.each(function(t){_(this).wrapInner(e.call(this,t))}):this.each(function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=h(e);return this.each(function(n){_(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var jt={0:200,1223:204},Vt=_.ajaxSettings.xhr();f.cors=!!Vt&&"withCredentials"in Vt,f.ajax=Vt=!!Vt,_.ajaxTransport(function(t){var n,r;if(f.cors||Vt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),_.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),_.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=_("'); + + script.attr('type', 'text/javascript'); + + script.on('load', onLoad); + script.on('error', onError); + + script.attr('src', url); + + // This: head.append(script); + // Adds the tag, but event handles don't work. + // Workaround is to add element with native appendChild(). + head[0].appendChild(script[0]); + + function onLoad() { + deferred.resolve(); + } + + function onError() { + deferred.reject(); + } + + return deferred.promise; + } + + return agcScriptTagHelper; + } +})(); + +/* global angular, google */ +/* jshint -W072 */ +(function(){ + angular.module('googlechart') + .directive('googleChart', googleChartDirective); + + googleChartDirective.$inject = []; + + function googleChartDirective() { + + return { + restrict: 'A', + scope: false, + controller: 'GoogleChartController' + }; + } +})(); + +/* global angular */ +(function(){ + angular.module('googlechart') + .value('googleChartApiConfig', { + version: '1', + optionalSettings: { + packages: ['corechart'] + } + }); +})(); +/* global angular */ +(function(){ + angular.module('googlechart') + .factory('googleChartApiPromise', googleChartApiPromiseFactory); + + googleChartApiPromiseFactory.$inject = ['agcLibraryLoader']; + + /** Here for backward-compatibility only. */ + function googleChartApiPromiseFactory(agcLibraryLoader) { + return agcLibraryLoader; + } +})(); + +/* global angular */ +(function() { + angular.module('googlechart') + .factory('GoogleChartService', GoogleChartServiceFactory); + + GoogleChartServiceFactory.$inject = ['agcLibraryLoader', '$injector', '$q', 'FormatManager']; + + function GoogleChartServiceFactory(agcLibraryLoader, $injector, $q, FormatManager) { + function GoogleChartService() { + var self = this; + self.draw = draw; + self.getChartWrapper = getChartWrapper; + self.getData = getData; + self.getElement = getElement; + self.getOption = getOption; + self.getOptions = getOptions; + self.getView = getView; + self.getReadyPromise = getReadyPromise; + self.isApiReady = isApiReady; + self.registerChartListener = registerChartListener; + self.registerServiceListener = registerServiceListener; + self.registerWrapperListener = registerWrapperListener; + self.setData = setData; + self.setElement = setElement; + self.setOption = setOption; + self.setOptions = setOptions; + self.setup = setup; + self.setView = setView; + + var $google, + _libraryPromise, + _apiReady, + _chartWrapper, + _element, + _chartType, + _data, + _view, + _options, + _formatters, + _innerVisualization, + _formatManager, + _needsUpdate = true, + _customFormatters, + _serviceDeferred, + serviceListeners = {}, + wrapperListeners = {}, + chartListeners = {}; + + _init(); + + function _activateServiceEvent(eventName) { + var i; + if (angular.isArray(serviceListeners[eventName])) { + for (i = 0; i < serviceListeners[eventName].length; i++) { + serviceListeners[eventName][i](); } + } + } - function draw() { - if (!draw.triggered && ($scope.chart != undefined)) { - draw.triggered = true; - $timeout(function () { - if (typeof ($scope.formatters) === 'undefined') - $scope.formatters = {}; - - var dataTable; - if ($scope.chart.data instanceof google.visualization.DataTable) - dataTable = $scope.chart.data; - else if (angular.isArray($scope.chart.data)) - dataTable = google.visualization.arrayToDataTable($scope.chart.data); - else - dataTable = new google.visualization.DataTable($scope.chart.data, 0.5); - - if (typeof ($scope.chart.formatters) != 'undefined') { - applyFormat("number", google.visualization.NumberFormat, dataTable); - applyFormat("arrow", google.visualization.ArrowFormat, dataTable); - applyFormat("date", google.visualization.DateFormat, dataTable); - applyFormat("bar", google.visualization.BarFormat, dataTable); - applyFormat("color", google.visualization.ColorFormat, dataTable); - } + function _apiLoadFail(reason) { + // Not sure what to do if this does happen. + // Post your suggestions in the issues tracker at + // https://github.com/angular-google-chart/angular-google-chart/ + return reason; + } - var customFormatters = $scope.chart.customFormatters; - if (typeof (customFormatters) != 'undefined') { - for (var name in customFormatters) { - applyFormat(name, customFormatters[name], dataTable); - } - } + function _apiLoadSuccess(g) { + $google = g; + _apiReady = true; + _serviceDeferred.resolve(); + return g; + } - var chartWrapperArgs = { - chartType: $scope.chart.type, - dataTable: dataTable, - view: $scope.chart.view, - options: $scope.chart.options, - containerId: $elm[0] - }; - - $scope.chartWrapper = new google.visualization.ChartWrapper(chartWrapperArgs); - google.visualization.events.addListener($scope.chartWrapper, 'ready', function () { - $scope.chart.displayed = true; - $scope.$apply(function (scope) { - scope.onReady({ chartWrapper: scope.chartWrapper }); - }); - }); - google.visualization.events.addListener($scope.chartWrapper, 'error', function (err) { - console.log("Chart not displayed due to error: " + err.message + ". Full error object follows."); - console.log(err); - }); - google.visualization.events.addListener($scope.chartWrapper, 'select', function () { - var selectedItem = $scope.chartWrapper.getChart().getSelection()[0]; - $scope.$apply(function () { - $scope.select({ selectedItem: selectedItem }); - }); - }); + function _continueSetup() { + if (!angular.isDefined(_chartWrapper)) { + _chartWrapper = new $google.visualization.ChartWrapper({ + chartType: _chartType, + dataTable: _data, + view: _view, + options: _options, + containerId: _element[0] + }); + _registerListenersWithGoogle(_chartWrapper, wrapperListeners); + } + else { + _chartWrapper.setChartType(_chartType); + _chartWrapper.setDataTable(_data); + _chartWrapper.setView(_view); + _chartWrapper.setOptions(_options); + } - $timeout(function () { - $elm.empty(); - $scope.chartWrapper.draw(); - draw.triggered = false; - }); - }, 0, true); + if (!_formatManager) { + _formatManager = new FormatManager($google); + } + + if (_formatManager.applyFormats(_chartWrapper.getDataTable(), + _formatters, _customFormatters).requiresHtml) { + _chartWrapper.setOption('allowHtml', true); + } + + _needsUpdate = false; + } + + // Credit for this solution: + // http://stackoverflow.com/a/20125572/3771976 + function _getSetDescendantProp(obj, desc, value) { + var arr = desc ? desc.split(".") : []; + + while (arr.length && obj) { + var comp = arr.shift(); + var match = new RegExp("(.+)\\[([0-9]*)\\]").exec(comp); + + if (value) { + if (obj[comp] === undefined) { + obj[comp] = {}; + } + + if (arr.length === 0) { + obj[comp] = value; } } - function drawAsync() { - googleChartApiPromise.then(function () { - draw(); - }) + obj = obj[comp]; + } + + return obj; + } + + function _handleReady() { + // When the chartWrapper is ready, check to see if the inner chart + // has changed. If it has, re-register listeners onto that chart. + if (_innerVisualization !== _chartWrapper.getChart()) { + _innerVisualization = _chartWrapper.getChart(); + _registerListenersWithGoogle(_innerVisualization, chartListeners); + } + } + + function _init() { + _apiReady = false; + _serviceDeferred = $q.defer(); + //keeps the resulting promise to chain on other actions + _libraryPromise = agcLibraryLoader + .then(_apiLoadSuccess) + .catch(_apiLoadFail); + + registerWrapperListener('ready', _handleReady, self); + } + + function _registerListener(listenerCollection, eventName, listenerFn, listenerObject) { + // This is the function that will be invoked by the charts API. + // Passing the wrapper function allows the use of DI for + // for the called function. + var listenerWrapper = function() { + var locals = { + chartWrapper: _chartWrapper, + chart: _chartWrapper.getChart(), + args: arguments + }; + $injector.invoke(listenerFn, listenerObject || this, locals); + }; + + if (angular.isDefined(listenerCollection) && angular.isObject(listenerCollection)) { + if (!angular.isArray(listenerCollection[eventName])) { + listenerCollection[eventName] = []; } + listenerCollection[eventName].push(listenerWrapper); + return function() { + if (angular.isDefined(listenerWrapper.googleListenerHandle)) { + $google.visualization.events.removeListener(listenerWrapper.googleListenerHandle); + } + var fnIndex = listenerCollection[eventName].indexOf(listenerWrapper); + listenerCollection[eventName].splice(fnIndex, 1); + if (listenerCollection[eventName].length === 0) { + listenerCollection[eventName] = undefined; + } + }; } - }; - }]) + } - .run(['$rootScope', '$window', function ($rootScope, $window) { - angular.element($window).bind('resize', function () { - $rootScope.$emit('resizeMsg'); - }); - }]); + function _registerListenersWithGoogle(eventSource, listenerCollection) { + for (var eventName in listenerCollection) { + if (listenerCollection.hasOwnProperty(eventName) && angular.isArray(listenerCollection[eventName])) { + for (var fnIterator = 0; fnIterator < listenerCollection[eventName].length; fnIterator++) { + if (angular.isFunction(listenerCollection[eventName][fnIterator])) { + listenerCollection[eventName][fnIterator].googleListenerHandle = + $google.visualization.events.addListener(eventSource, eventName, listenerCollection[eventName][fnIterator]); + } + } + } + } + } + + function _runDrawCycle() { + _activateServiceEvent('beforeDraw'); + _chartWrapper.draw(); + } + + /* + This function does this: + - waits for API to load, if not already loaded + - sets up ChartWrapper object (create or update) + - schedules timeout event to draw chart + */ + function draw() { + if (_needsUpdate) { + _libraryPromise = _libraryPromise.then(_continueSetup); + } + _libraryPromise = _libraryPromise.then(_runDrawCycle()); + } + + function getChartWrapper() { + // Most get functions on this interface return copies, + // this one should return reference so as to expose the + //chart api to users + return _chartWrapper; + } + + function getData() { + var data = _data || {}; + return angular.copy(data); + } + + function getElement() { + return _element; + } + + function getOption(name) { + var options = _options || {}; + return _getSetDescendantProp(options, name); + } -})(document, window, window.angular); + function getOptions() { + var options = _options || {}; + return angular.copy(options); + } + + function getReadyPromise() { + return _serviceDeferred.promise; + } + + function getView() { + var view = _view || {}; + return angular.copy(view); + } + + function isApiReady() { + return _apiReady; + } + + function registerChartListener(eventName, listenerFn, listenerObject) { + return _registerListener(chartListeners, eventName, listenerFn, listenerObject); + } + + function registerServiceListener(eventName, listenerFn, listenerObject) { + return _registerListener(serviceListeners, eventName, listenerFn, listenerObject); + } + + function registerWrapperListener(eventName, listenerFn, listenerObject) { + return _registerListener(wrapperListeners, eventName, listenerFn, listenerObject); + } + + function setData(data) { + if (angular.isDefined(data)) { + _data = angular.copy(data); + _needsUpdate = true; + } + } + + function setElement(element) { + if (angular.isElement(element) && _element !== element) { + _element = element; + // clear out the chartWrapper because we're going to need a new one + _chartWrapper = null; + _needsUpdate = true; + } + } + + function setOption(name, value) { + _options = _options || {}; + _getSetDescendantProp(_options, name, angular.copy(value)); + _needsUpdate = true; + } + + function setOptions(options) { + if (angular.isDefined(options)) { + _options = angular.copy(options); + _needsUpdate = true; + } + } + + function setup(element, chartType, data, view, options, formatters, customFormatters) { + // Keep values if already set, + // can call setup() with nulls to keep + // existing values + _element = element || _element; + _chartType = chartType || _chartType; + _data = data || _data; + _view = view || _view; + _options = options || _options; + _formatters = formatters || _formatters; + _customFormatters = customFormatters || _customFormatters; + + _libraryPromise = _libraryPromise.then(_continueSetup); + } + + function setView(view) { + _view = angular.copy(view); + } + } + return GoogleChartService; + } +})(); /** * @author Jason Dobry * @file angular-cache.min.js @@ -84418,87 +85255,282 @@ require = function a(b, c, d) { function e(g, h) { if (!c[g]) { if (!b[g]) { var }] ); })(window, document); -angular.module('cgBusy', ['ajoslin.promise-tracker']); - -angular.module('cgBusy').value('cgBusyTemplateName', 'angular-busy.html'); - -angular.module('cgBusy').directive('cgBusy', ['promiseTracker', '$compile', '$templateCache', 'cgBusyTemplateName', '$http', '$animate', - function (promiseTracker, $compile, $templateCache, cgBusyTemplateName, $http, $animate) { - return { - restrict: 'A', - link: function (scope, element, attrs, fn) { - - var options = scope.$eval(attrs.cgBusy); - - if (angular.isString(options) || angular.isArray(options)) { - options = { tracker: options }; - } - - if (angular.isUndefined(options) || angular.isUndefined(options.tracker)) { - throw new Error('Options for cgBusy directive must be provided (tracker option is required).'); - } - - options.tracker = angular.isArray(options.tracker) ? options.tracker : [options.tracker]; - - if (!scope.$cgBusyTracker) { - scope.$cgBusyTracker = {}; - } - - angular.forEach(options.tracker, function (tracker) { - // Checking for a non-existent tracker throws an exception, - // so we check for one first, then register it if it doesn't exist yet - try { - scope.$cgBusyTracker[tracker] = promiseTracker(tracker); - } catch (error) { - scope.$cgBusyTracker[tracker] = promiseTracker.register(tracker); - } - }); - - //multiple cg-busy's can be active in the same scope so we have to be careful not to overwrite the - //same isActive function. So lets name it uniquely by the trackers its watching. - var isActiveFnName = 'isActive_' + options.tracker.join('_'); - - scope[isActiveFnName] = function () { - var active = false; - angular.forEach(options.tracker, function (tracker) { - if (scope.$cgBusyTracker[tracker].active()) { - active = true; - } - }); - return active; - }; - - var position = element.css('position'); - if (position === 'static' || position === '' || typeof position === 'undefined') { - element.css('position', 'relative'); - } - - var indicatorTemplateName = options.template ? options.template : cgBusyTemplateName; - - $http.get(indicatorTemplateName, { cache: $templateCache }).then(function (indicatorTemplate) { - - options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop; - var backdrop = options.backdrop ? '
' : ''; - - var template = '
' + backdrop + indicatorTemplate + '
'; - var templateElement = $compile(template)(scope); - - angular.element(templateElement.children()[options.backdrop ? 1 : 0]) - .css('position', 'absolute') - .css('top', 0) - .css('left', 0) - .css('right', 0) - .css('bottom', 0); - element.append(templateElement); - - }).catch(function (data) { - throw new Error('Template specified for cgBusy (' + options.template + ') could not be loaded. ' + data); - }); - } - }; - } +angular.module('cgBusy',[]); + +//loosely modeled after angular-promise-tracker +angular.module('cgBusy').factory('_cgBusyTrackerFactory',['$timeout','$q',function($timeout,$q){ + + return function(){ + + var tracker = {}; + tracker.promises = []; + tracker.delayPromise = null; + tracker.durationPromise = null; + tracker.delayJustFinished = false; + + tracker.reset = function(options){ + tracker.minDuration = options.minDuration; + + tracker.promises = []; + angular.forEach(options.promises,function(p){ + if (!p || p.$cgBusyFulfilled) { + return; + } + addPromiseLikeThing(p); + }); + + if (tracker.promises.length === 0) { + //if we have no promises then dont do the delay or duration stuff + return; + } + + tracker.delayJustFinished = false; + if (options.delay) { + tracker.delayPromise = $timeout(function(){ + tracker.delayPromise = null; + tracker.delayJustFinished = true; + },parseInt(options.delay,10)); + } + if (options.minDuration) { + tracker.durationPromise = $timeout(function(){ + tracker.durationPromise = null; + },parseInt(options.minDuration,10) + (options.delay ? parseInt(options.delay,10) : 0)); + } + }; + + tracker.isPromise = function(promiseThing){ + var then = promiseThing && (promiseThing.then || promiseThing.$then || + (promiseThing.$promise && promiseThing.$promise.then)); + + return typeof then !== 'undefined'; + }; + + tracker.callThen = function(promiseThing,success,error){ + var promise; + if (promiseThing.then || promiseThing.$then){ + promise = promiseThing; + } else if (promiseThing.$promise){ + promise = promiseThing.$promise; + } else if (promiseThing.denodeify){ + promise = $q.when(promiseThing); + } + + var then = (promise.then || promise.$then); + + then.call(promise,success,error); + }; + + var addPromiseLikeThing = function(promise){ + + if (!tracker.isPromise(promise)) { + throw new Error('cgBusy expects a promise (or something that has a .promise or .$promise'); + } + + if (tracker.promises.indexOf(promise) !== -1){ + return; + } + tracker.promises.push(promise); + + tracker.callThen(promise, function(){ + promise.$cgBusyFulfilled = true; + if (tracker.promises.indexOf(promise) === -1) { + return; + } + tracker.promises.splice(tracker.promises.indexOf(promise),1); + },function(){ + promise.$cgBusyFulfilled = true; + if (tracker.promises.indexOf(promise) === -1) { + return; + } + tracker.promises.splice(tracker.promises.indexOf(promise),1); + }); + }; + + tracker.active = function(){ + if (tracker.delayPromise){ + return false; + } + + if (!tracker.delayJustFinished){ + if (tracker.durationPromise){ + return true; + } + return tracker.promises.length > 0; + } else { + //if both delay and min duration are set, + //we don't want to initiate the min duration if the + //promise finished before the delay was complete + tracker.delayJustFinished = false; + if (tracker.promises.length === 0) { + tracker.durationPromise = null; + } + return tracker.promises.length > 0; + } + }; + + return tracker; + + }; +}]); + +angular.module('cgBusy').value('cgBusyDefaults',{}); + +angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusyDefaults','$http','_cgBusyTrackerFactory', + function($compile,$templateCache,cgBusyDefaults,$http,_cgBusyTrackerFactory){ + return { + restrict: 'A', + link: function(scope, element, attrs, fn) { + + //Apply position:relative to parent element if necessary + var position = element.css('position'); + if (position === 'static' || position === '' || typeof position === 'undefined'){ + element.css('position','relative'); + } + + var templateElement; + var backdropElement; + var currentTemplate; + var templateScope; + var backdrop; + var tracker = _cgBusyTrackerFactory(); + + var defaults = { + templateUrl: 'angular-busy.html', + delay:0, + minDuration:0, + backdrop: true, + message:'Please Wait...', + wrapperClass: 'cg-busy cg-busy-animation' + }; + + angular.extend(defaults,cgBusyDefaults); + + scope.$watchCollection(attrs.cgBusy,function(options){ + + if (!options) { + options = {promise:null}; + } + + if (angular.isString(options)) { + throw new Error('Invalid value for cg-busy. cgBusy no longer accepts string ids to represent promises/trackers.'); + } + + //is it an array (of promises) or one promise + if (angular.isArray(options) || tracker.isPromise(options)) { + options = {promise:options}; + } + + options = angular.extend(angular.copy(defaults),options); + + if (!options.templateUrl){ + options.templateUrl = defaults.templateUrl; + } + + if (!angular.isArray(options.promise)){ + options.promise = [options.promise]; + } + + // options.promise = angular.isArray(options.promise) ? options.promise : [options.promise]; + // options.message = options.message ? options.message : 'Please Wait...'; + // options.template = options.template ? options.template : cgBusyTemplateName; + // options.minDuration = options.minDuration ? options.minDuration : 0; + // options.delay = options.delay ? options.delay : 0; + + if (!templateScope) { + templateScope = scope.$new(); + } + + templateScope.$message = options.message; + + if (!angular.equals(tracker.promises,options.promise)) { + tracker.reset({ + promises:options.promise, + delay:options.delay, + minDuration: options.minDuration + }); + } + + templateScope.$cgBusyIsActive = function() { + return tracker.active(); + }; + + + if (!templateElement || currentTemplate !== options.templateUrl || backdrop !== options.backdrop) { + + if (templateElement) { + templateElement.remove(); + } + if (backdropElement){ + backdropElement.remove(); + } + + currentTemplate = options.templateUrl; + backdrop = options.backdrop; + + $http.get(currentTemplate,{cache: $templateCache}).then(function(indicatorTemplate){ + + options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop; + + if (options.backdrop){ + var backdrop = '
'; + backdropElement = $compile(backdrop)(templateScope); + element.append(backdropElement); + } + + var template = '
' + indicatorTemplate.data + '
'; + templateElement = $compile(template)(templateScope); + + angular.element(templateElement.children()[0]) + .css('position','absolute') + .css('top',0) + .css('left',0) + .css('right',0) + .css('bottom',0); + element.append(templateElement); + + }, function(data){ + throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data); + }); + } + + },true); + } + }; + } ]); + +angular.module('cgBusy').run(['$templateCache', function($templateCache) { + 'use strict'; + + $templateCache.put('angular-busy.html', + "
\n" + + "\n" + + "
\n" + + "\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "
\n" + + "\n" + + "
{{$message}}
\n" + + "\n" + + "
\n" + + "\n" + + "
" + ); + +}]); (function() { 'use strict'; angular.module('key-value-editor', ['as.sortable']);