@mtgame/core 0.1.58 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/mtgame-core.umd.js +4109 -4076
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/basketball-game-api.js +8 -9
- package/esm2015/api/feedback-api.js +8 -9
- package/esm2015/api/file-api.js +8 -9
- package/esm2015/api/football-game-api.js +8 -9
- package/esm2015/api/game-base-api.js +8 -9
- package/esm2015/api/handball-game-api.js +8 -9
- package/esm2015/api/hockey-game-api.js +8 -9
- package/esm2015/api/league-api.js +8 -9
- package/esm2015/api/league-news-api.js +8 -9
- package/esm2015/api/league-player-api.js +7 -9
- package/esm2015/api/media-api.js +8 -9
- package/esm2015/api/notification-api.js +6 -8
- package/esm2015/api/notification-base-api.js +8 -9
- package/esm2015/api/org-notification-api.js +6 -8
- package/esm2015/api/paginated-response.interface.js +2 -1
- package/esm2015/api/public-api.js +2 -1
- package/esm2015/api/public-team-api.js +7 -9
- package/esm2015/api/public-user-api.js +7 -9
- package/esm2015/api/reference-api.js +8 -9
- package/esm2015/api/rugby-game-api.js +8 -9
- package/esm2015/api/team-api.js +9 -10
- package/esm2015/api/team-event-api.js +8 -9
- package/esm2015/api/tournament-api.js +8 -9
- package/esm2015/api/tournament-join-api.js +8 -9
- package/esm2015/api/tournament-season-api.js +8 -9
- package/esm2015/api/tournament-stage-api.js +8 -9
- package/esm2015/api/user-api.js +8 -9
- package/esm2015/api/volleyball-game-api.js +8 -9
- package/esm2015/http-cookie.interceptor.js +6 -9
- package/esm2015/localization/basketball-game-log-types.js +1 -1
- package/esm2015/localization/football-game-log-types.js +1 -1
- package/esm2015/localization/handball-game-log-types.js +1 -1
- package/esm2015/localization/hockey-game-log-types.js +1 -1
- package/esm2015/localization/hockey-penalty-types.js +1 -1
- package/esm2015/localization/overtime-types.js +1 -1
- package/esm2015/localization/public-api.js +1 -1
- package/esm2015/localization/rugby-foul-sanction.js +1 -1
- package/esm2015/localization/rugby-game-log-types.js +1 -1
- package/esm2015/localization/team-event-type.js +1 -1
- package/esm2015/localization/team-user-role.js +1 -1
- package/esm2015/localization/user-profile.js +1 -1
- package/esm2015/localization/volleyball-game-log-types.js +1 -1
- package/esm2015/models/base-statistic.js +2 -1
- package/esm2015/models/basketball-game-config.js +1 -1
- package/esm2015/models/basketball-game-log.js +1 -1
- package/esm2015/models/basketball-game-statistic.js +1 -1
- package/esm2015/models/basketball-game-team-statistic.js +1 -1
- package/esm2015/models/basketball-profile.js +1 -1
- package/esm2015/models/basketball-statistic.js +1 -1
- package/esm2015/models/city.js +1 -1
- package/esm2015/models/feedback.js +1 -1
- package/esm2015/models/file.js +1 -1
- package/esm2015/models/football-game-config.js +1 -1
- package/esm2015/models/football-game-log.js +1 -1
- package/esm2015/models/football-game-statistic.js +1 -1
- package/esm2015/models/football-game-team-statistic.js +1 -1
- package/esm2015/models/football-profile.js +1 -1
- package/esm2015/models/football-statistic.js +1 -1
- package/esm2015/models/game-invite.js +1 -1
- package/esm2015/models/game-log-base.js +2 -1
- package/esm2015/models/game-statistic-base.js +2 -1
- package/esm2015/models/game-team-statistic-base.js +2 -1
- package/esm2015/models/game-timeline-stages.js +1 -1
- package/esm2015/models/game-user-limitation.js +1 -1
- package/esm2015/models/game-user.js +1 -1
- package/esm2015/models/game.js +1 -1
- package/esm2015/models/handball-game-config.js +1 -1
- package/esm2015/models/handball-game-log.js +1 -1
- package/esm2015/models/handball-game-statistic.js +1 -1
- package/esm2015/models/handball-game-team-statistic.js +1 -1
- package/esm2015/models/handball-profile.js +1 -1
- package/esm2015/models/handball-statistic.js +1 -1
- package/esm2015/models/hockey-game-config.js +1 -1
- package/esm2015/models/hockey-game-log.js +1 -1
- package/esm2015/models/hockey-game-statistic.js +1 -1
- package/esm2015/models/hockey-game-team-statistic.js +1 -1
- package/esm2015/models/hockey-profile.js +1 -1
- package/esm2015/models/hockey-statistic.js +1 -1
- package/esm2015/models/league-banner.js +1 -1
- package/esm2015/models/league-court.js +1 -1
- package/esm2015/models/league-document.js +1 -1
- package/esm2015/models/league-news.js +1 -1
- package/esm2015/models/league-partner.js +1 -1
- package/esm2015/models/league-player.js +1 -1
- package/esm2015/models/league-playlist.js +1 -1
- package/esm2015/models/league-user.js +1 -1
- package/esm2015/models/league.js +1 -1
- package/esm2015/models/media-item.js +1 -1
- package/esm2015/models/notification-settings.js +1 -1
- package/esm2015/models/notification.js +1 -1
- package/esm2015/models/organization.js +1 -1
- package/esm2015/models/playoff.js +1 -1
- package/esm2015/models/poll.js +1 -1
- package/esm2015/models/public-api.js +5 -1
- package/esm2015/models/rugby-foul-type.js +1 -1
- package/esm2015/models/rugby-game-config.js +1 -1
- package/esm2015/models/rugby-game-log.js +2 -2
- package/esm2015/models/rugby-game-statistic.js +1 -1
- package/esm2015/models/rugby-game-team-statistic.js +1 -1
- package/esm2015/models/rugby-profile.js +1 -1
- package/esm2015/models/rugby-statistic.js +1 -1
- package/esm2015/models/sport.js +1 -1
- package/esm2015/models/team-access.js +1 -1
- package/esm2015/models/team-event-invite.js +1 -1
- package/esm2015/models/team-event-type.js +1 -1
- package/esm2015/models/team-event.js +1 -1
- package/esm2015/models/team-invite-external.js +1 -1
- package/esm2015/models/team-invite.js +1 -1
- package/esm2015/models/team-permission.js +1 -1
- package/esm2015/models/team-user.js +1 -1
- package/esm2015/models/team.js +1 -1
- package/esm2015/models/tournament-disqualification.js +1 -1
- package/esm2015/models/tournament-event.js +1 -1
- package/esm2015/models/tournament-group.js +1 -1
- package/esm2015/models/tournament-invite.js +1 -1
- package/esm2015/models/tournament-join-team.js +1 -1
- package/esm2015/models/tournament-news.js +1 -1
- package/esm2015/models/tournament-season.js +1 -1
- package/esm2015/models/tournament-stage-team.js +1 -1
- package/esm2015/models/tournament-stage.js +1 -1
- package/esm2015/models/tournament-team-user-invite.js +1 -1
- package/esm2015/models/tournament-team-user.js +1 -1
- package/esm2015/models/tournament-team.js +1 -1
- package/esm2015/models/tournament.js +1 -1
- package/esm2015/models/user-access.js +1 -1
- package/esm2015/models/user-permission.js +1 -1
- package/esm2015/models/user-profile.js +1 -1
- package/esm2015/models/user.js +1 -1
- package/esm2015/models/util.js +1 -1
- package/esm2015/models/volleyball-game-config.js +1 -1
- package/esm2015/models/volleyball-game-log.js +1 -1
- package/esm2015/models/volleyball-game-statistic.js +1 -1
- package/esm2015/models/volleyball-game-team-statistic.js +1 -1
- package/esm2015/models/volleyball-profile.js +1 -1
- package/esm2015/models/volleyball-statistic.js +1 -1
- package/esm2015/mtgame-core.js +1 -1
- package/esm2015/public-api.js +1 -1
- package/esm2015/services/base.service.js +6 -8
- package/esm2015/services/centrifugo.service.js +7 -9
- package/esm2015/services/config.service.js +7 -10
- package/esm2015/services/public-api.js +1 -1
- package/esm2015/storage/local-storage-engine.js +1 -1
- package/esm2015/storage/public-api.js +1 -1
- package/esm2015/storage/storage-engine.js +1 -1
- package/esm2015/storage/store.js +1 -1
- package/esm2015/utils/array.js +1 -1
- package/esm2015/utils/component-destroyed.js +12 -8
- package/esm2015/utils/cookie.js +1 -1
- package/esm2015/utils/data.js +1 -1
- package/esm2015/utils/device.js +1 -1
- package/esm2015/utils/enum.js +1 -1
- package/esm2015/utils/errors.js +1 -1
- package/esm2015/utils/favicon.js +1 -1
- package/esm2015/utils/form.js +1 -1
- package/esm2015/utils/public-api.js +1 -1
- package/esm2015/utils/validators.js +1 -1
- package/fesm2015/mtgame-core.js +195 -191
- package/fesm2015/mtgame-core.js.map +1 -1
- package/localization/basketball-game-log-types.d.ts +0 -1
- package/localization/football-game-log-types.d.ts +0 -1
- package/localization/handball-game-log-types.d.ts +0 -1
- package/localization/hockey-game-log-types.d.ts +0 -1
- package/localization/overtime-types.d.ts +0 -1
- package/localization/rugby-foul-sanction.d.ts +0 -1
- package/localization/rugby-game-log-types.d.ts +0 -1
- package/localization/team-event-type.d.ts +0 -1
- package/localization/team-user-role.d.ts +0 -1
- package/localization/user-profile.d.ts +0 -6
- package/localization/volleyball-game-log-types.d.ts +0 -1
- package/package.json +9 -11
- package/bundles/mtgame-core.umd.min.js +0 -16
- package/bundles/mtgame-core.umd.min.js.map +0 -1
- package/esm5/api/basketball-game-api.js +0 -77
- package/esm5/api/feedback-api.js +0 -44
- package/esm5/api/file-api.js +0 -68
- package/esm5/api/football-game-api.js +0 -81
- package/esm5/api/game-base-api.js +0 -58
- package/esm5/api/handball-game-api.js +0 -81
- package/esm5/api/hockey-game-api.js +0 -81
- package/esm5/api/league-api.js +0 -168
- package/esm5/api/league-news-api.js +0 -82
- package/esm5/api/league-player-api.js +0 -37
- package/esm5/api/media-api.js +0 -149
- package/esm5/api/notification-api.js +0 -21
- package/esm5/api/notification-base-api.js +0 -109
- package/esm5/api/org-notification-api.js +0 -21
- package/esm5/api/paginated-response.interface.js +0 -1
- package/esm5/api/public-api.js +0 -27
- package/esm5/api/public-team-api.js +0 -34
- package/esm5/api/public-user-api.js +0 -44
- package/esm5/api/reference-api.js +0 -45
- package/esm5/api/rugby-game-api.js +0 -79
- package/esm5/api/team-api.js +0 -486
- package/esm5/api/team-event-api.js +0 -96
- package/esm5/api/tournament-api.js +0 -543
- package/esm5/api/tournament-join-api.js +0 -59
- package/esm5/api/tournament-season-api.js +0 -134
- package/esm5/api/tournament-stage-api.js +0 -65
- package/esm5/api/user-api.js +0 -350
- package/esm5/api/volleyball-game-api.js +0 -81
- package/esm5/http-cookie.interceptor.js +0 -41
- package/esm5/localization/basketball-game-log-types.js +0 -28
- package/esm5/localization/football-game-log-types.js +0 -34
- package/esm5/localization/handball-game-log-types.js +0 -25
- package/esm5/localization/hockey-game-log-types.js +0 -31
- package/esm5/localization/hockey-penalty-types.js +0 -50
- package/esm5/localization/overtime-types.js +0 -14
- package/esm5/localization/public-api.js +0 -13
- package/esm5/localization/rugby-foul-sanction.js +0 -11
- package/esm5/localization/rugby-game-log-types.js +0 -41
- package/esm5/localization/team-event-type.js +0 -7
- package/esm5/localization/team-user-role.js +0 -15
- package/esm5/localization/user-profile.js +0 -82
- package/esm5/localization/volleyball-game-log-types.js +0 -27
- package/esm5/models/base-statistic.js +0 -1
- package/esm5/models/basketball-game-config.js +0 -44
- package/esm5/models/basketball-game-log.js +0 -118
- package/esm5/models/basketball-game-statistic.js +0 -63
- package/esm5/models/basketball-game-team-statistic.js +0 -32
- package/esm5/models/basketball-profile.js +0 -48
- package/esm5/models/basketball-statistic.js +0 -97
- package/esm5/models/city.js +0 -27
- package/esm5/models/feedback.js +0 -37
- package/esm5/models/file.js +0 -65
- package/esm5/models/football-game-config.js +0 -53
- package/esm5/models/football-game-log.js +0 -111
- package/esm5/models/football-game-statistic.js +0 -213
- package/esm5/models/football-game-team-statistic.js +0 -32
- package/esm5/models/football-profile.js +0 -48
- package/esm5/models/football-statistic.js +0 -174
- package/esm5/models/game-invite.js +0 -42
- package/esm5/models/game-log-base.js +0 -1
- package/esm5/models/game-statistic-base.js +0 -1
- package/esm5/models/game-team-statistic-base.js +0 -1
- package/esm5/models/game-timeline-stages.js +0 -60
- package/esm5/models/game-user-limitation.js +0 -59
- package/esm5/models/game-user.js +0 -38
- package/esm5/models/game.js +0 -286
- package/esm5/models/handball-game-config.js +0 -39
- package/esm5/models/handball-game-log.js +0 -99
- package/esm5/models/handball-game-statistic.js +0 -162
- package/esm5/models/handball-game-team-statistic.js +0 -32
- package/esm5/models/handball-profile.js +0 -44
- package/esm5/models/handball-statistic.js +0 -105
- package/esm5/models/hockey-game-config.js +0 -61
- package/esm5/models/hockey-game-log.js +0 -135
- package/esm5/models/hockey-game-statistic.js +0 -223
- package/esm5/models/hockey-game-team-statistic.js +0 -32
- package/esm5/models/hockey-profile.js +0 -46
- package/esm5/models/hockey-statistic.js +0 -144
- package/esm5/models/league-banner.js +0 -44
- package/esm5/models/league-court.js +0 -29
- package/esm5/models/league-document.js +0 -31
- package/esm5/models/league-news.js +0 -55
- package/esm5/models/league-partner.js +0 -34
- package/esm5/models/league-player.js +0 -77
- package/esm5/models/league-playlist.js +0 -33
- package/esm5/models/league-user.js +0 -61
- package/esm5/models/league.js +0 -95
- package/esm5/models/media-item.js +0 -50
- package/esm5/models/notification-settings.js +0 -40
- package/esm5/models/notification.js +0 -143
- package/esm5/models/organization.js +0 -32
- package/esm5/models/playoff.js +0 -102
- package/esm5/models/poll.js +0 -154
- package/esm5/models/public-api.js +0 -88
- package/esm5/models/rugby-foul-type.js +0 -40
- package/esm5/models/rugby-game-config.js +0 -51
- package/esm5/models/rugby-game-log.js +0 -143
- package/esm5/models/rugby-game-statistic.js +0 -68
- package/esm5/models/rugby-game-team-statistic.js +0 -32
- package/esm5/models/rugby-profile.js +0 -42
- package/esm5/models/rugby-statistic.js +0 -119
- package/esm5/models/sport.js +0 -104
- package/esm5/models/team-access.js +0 -50
- package/esm5/models/team-event-invite.js +0 -35
- package/esm5/models/team-event-type.js +0 -6
- package/esm5/models/team-event.js +0 -58
- package/esm5/models/team-invite-external.js +0 -30
- package/esm5/models/team-invite.js +0 -46
- package/esm5/models/team-permission.js +0 -43
- package/esm5/models/team-user.js +0 -53
- package/esm5/models/team.js +0 -70
- package/esm5/models/tournament-disqualification.js +0 -34
- package/esm5/models/tournament-event.js +0 -50
- package/esm5/models/tournament-group.js +0 -29
- package/esm5/models/tournament-invite.js +0 -48
- package/esm5/models/tournament-join-team.js +0 -73
- package/esm5/models/tournament-news.js +0 -38
- package/esm5/models/tournament-season.js +0 -50
- package/esm5/models/tournament-stage-team.js +0 -54
- package/esm5/models/tournament-stage.js +0 -40
- package/esm5/models/tournament-team-user-invite.js +0 -34
- package/esm5/models/tournament-team-user.js +0 -41
- package/esm5/models/tournament-team.js +0 -80
- package/esm5/models/tournament.js +0 -234
- package/esm5/models/user-access.js +0 -30
- package/esm5/models/user-permission.js +0 -43
- package/esm5/models/user-profile.js +0 -27
- package/esm5/models/user.js +0 -107
- package/esm5/models/util.js +0 -298
- package/esm5/models/volleyball-game-config.js +0 -53
- package/esm5/models/volleyball-game-log.js +0 -145
- package/esm5/models/volleyball-game-statistic.js +0 -72
- package/esm5/models/volleyball-game-team-statistic.js +0 -32
- package/esm5/models/volleyball-profile.js +0 -48
- package/esm5/models/volleyball-statistic.js +0 -89
- package/esm5/mtgame-core.js +0 -5
- package/esm5/public-api.js +0 -8
- package/esm5/services/base.service.js +0 -19
- package/esm5/services/centrifugo.service.js +0 -122
- package/esm5/services/config.service.js +0 -52
- package/esm5/services/public-api.js +0 -4
- package/esm5/storage/local-storage-engine.js +0 -25
- package/esm5/storage/public-api.js +0 -4
- package/esm5/storage/storage-engine.js +0 -77
- package/esm5/storage/store.js +0 -77
- package/esm5/utils/array.js +0 -18
- package/esm5/utils/component-destroyed.js +0 -21
- package/esm5/utils/cookie.js +0 -9
- package/esm5/utils/data.js +0 -79
- package/esm5/utils/device.js +0 -14
- package/esm5/utils/enum.js +0 -7
- package/esm5/utils/errors.js +0 -12
- package/esm5/utils/favicon.js +0 -47
- package/esm5/utils/form.js +0 -22
- package/esm5/utils/public-api.js +0 -11
- package/esm5/utils/validators.js +0 -49
- package/fesm5/mtgame-core.js +0 -9819
- package/fesm5/mtgame-core.js.map +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("rxjs/operators"),require("rxjs"),require("rxjs/internal/Subject"),require("rxjs/internal/ReplaySubject"),require("centrifuge"),require("@sentry/angular"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("@mtgame/core",["exports","@angular/core","@angular/common/http","rxjs/operators","rxjs","rxjs/internal/Subject","rxjs/internal/ReplaySubject","centrifuge","@sentry/angular","@angular/forms","@angular/common"],e):e(((t=t||self).mtgame=t.mtgame||{},t.mtgame.core={}),t.ng.core,t.ng.common.http,t.rxjs.operators,t.rxjs,t.rxjs["internal/Subject"],t.rxjs["internal/ReplaySubject"],t.Centrifuge,t.angular,t.ng.forms,t.ng.common)}(this,(function(t,e,n,o,i,r,a,s,u,l,p){"use strict";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var c=function(t,e){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function g(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function d(t,e){return function(n,o){e(n,o,t)}}function h(t,e,n,o){return new(n||(n=Promise))((function(i,r){function a(t){try{u(o.next(t))}catch(t){r(t)}}function s(t){try{u(o.throw(t))}catch(t){r(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((o=o.apply(t,e||[])).next())}))}function _(t,e){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){a.label=r[1];break}if(6===r[0]&&a.label<i[1]){a.label=i[1],i=r;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function y(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(t){i={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function b(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}var T=[{id:1,code:"АГРЕС",title:"Агрессор в драке"},{id:2,code:"АТ-В-ГОЛ",title:"Атака в голову или шею"},{id:3,code:"АТ-ВР",title:"Атака вратаря"},{id:4,code:"АТ-СЗ",title:"Атака сзади"},{id:5,code:"БЛОК",title:"Блокировка"},{id:6,code:"БР-КЛ",title:"Бросок клюшки"},{id:7,code:"ВБ-ШБ",title:"Выброс шайбы"},{id:8,code:"ГРУБ",title:"Грубость"},{id:9,code:"ДИСЦ",title:"Дисциплинарный штраф"},{id:10,code:"ДИС-КН",title:"Дисциплинарный до конца матча"},{id:11,code:"ДРАКА",title:"Драка"},{id:12,code:"ЗАЧИН",title:"Зачинщик драки"},{id:13,code:"ЗД-ИГ",title:"Задержка игры"},{id:14,code:"ЗД-КЛ-СП",title:"Задержка клюшки соперника"},{id:15,code:"ЗД-КЛ",title:"Задержка клюшкой"},{id:16,code:"ЗД-СП",title:"Задержка соперника"},{id:17,code:"ЗД-ШБ",title:"Задержка шайбы руками"},{id:18,code:"СЛ-КЛ",title:"Игра со сломанной клюшкой"},{id:19,code:"ВП-КЛ",title:"Игра высоко поднятой клюшкой"},{id:20,code:"КЛ-УД",title:"Колющий удар"},{id:21,code:"СК-ШТ",title:"Малый скамеечный штраф"},{id:22,code:"МШ",title:"Матч-штраф"},{id:23,code:"НП-АТ",title:"Неправильная атака"},{id:24,code:"ЧС-СТ",title:"Нарушение численного состава"},{id:25,code:"НС-КЛ",title:"Нестандартная клюшка"},{id:26,code:"НАР-ЭК",title:"Опасное снаряжение"},{id:27,code:"НС-ПВ",title:"Оскорбление судей и неспортивное поведение"},{id:28,code:"ОТ-ИГ",title:"Отказ начать игру"},{id:29,code:"ОТСЧ",title:"Отсечение"},{id:30,code:"ПЛЕВОК",title:"Плевок"},{id:31,code:"ПОДН",title:"Подножка"},{id:32,code:"ПОДС",title:"Подсечка"},{id:33,code:"ПР-ИН",title:"Предупреждение инфекций"},{id:34,code:"ПК-СК",title:"Покидание скамейки во время конфликта"},{id:35,code:"СД-ВР",title:"Сдвиг ворот"},{id:36,code:"СИМ",title:"Симуляция"},{id:37,code:"ТЛ-БР",title:"Толчок на борт"},{id:38,code:"ТЛ-КЛ",title:"Толчок клюшкой"},{id:39,code:"УД-ГОЛ",title:"Удар головой"},{id:40,code:"УД-КЛ",title:"Удар клюшкой"},{id:41,code:"УД-К-КЛ",title:"Удар концом клюшки"},{id:42,code:"УД-КОЛ",title:"Удар коленом"},{id:43,code:"УД-ЛОК",title:"Удар локтем"},{id:44,code:"УД-НГ",title:"Удар ногой"},{id:45,code:"УКУС",title:"Укус"},{id:46,code:"КН-ЗР",title:"Физический контакт со зрителем"},{id:47,code:"ШТ-ВР",title:"Штраф вратаря"}],k=function(){function t(t){var e,n;if(t)try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;this[r]=t[r]}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return t.toFront=function(t){},t.toBack=function(t){},t}();function P(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function S(){return{toFront:function(t){return t?"object"==typeof t?t:T.find((function(e){return e.id===t})):null},toBack:function(t){return t?"object"==typeof t?t.id:t:null}}}function G(t){return{toFront:function(e){return Array.isArray(e)?e.map((function(e){return t.toFront(e)})):[]},toBack:function(e){return Array.isArray(e)?e.map((function(e){return t.toBack(e)})):[]}}}var F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){return t?new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())).toISOString().slice(0,10):void 0},e}(k),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){return t?new Date(t):void 0},e.toBack=function(t){if(t){new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds()));return t.toISOString()}},e}(k);function w(t){return function(e){t&&(t.mappingFields&&(e._mapping_fields_=t.mappingFields),t.relation&&(e._relation_=t.relation),e._to_front_=function(t,n){return function t(e,n,o){var i,r;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a=new e,s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=y(Object.keys(s)),p=l.next();!p.done;p=l.next()){var c=p.value,m=s[c],f=I(c,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)},e._to_back_=function(t,n){return function t(e,n,o){var i,r;if(!n)return n;if(Array.isArray(n))return n.map((function(n){return t(e,n)}));var a={},s=e._mapping_fields_,u=e._relation_;if(s)try{for(var l=y(Object.keys(s)),p=l.next();!p.done;p=l.next()){var c=p.value,m=s[c];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[c]=u[m].toBack(n[m]):a[c]=n[m]}}catch(t){i={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(i)throw i.error}}return a}(e,t)})}}var L,U=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_front_;if(o)return o(e[0],e.length>1?e[1]:void 0)}}},j=function(t,e,n){return{value:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t._to_back_;if(o)return o(e[0])}}};function I(t,e){var n,o;if(e){var i=t.split(".");if(1===i.length)return t in e?e[t]:void 0;try{for(var r=y(i),a=r.next();!a.done;a=r.next()){var s=a.value;if(!e||!(s in e))return;e=e[s]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(o=r.return)&&o.call(r)}finally{if(n)throw n.error}}return e}}(L=t.FileEngine||(t.FileEngine={}))[L.django=1]="django",L[L.s3=2]="s3";var B,O=function(){function e(){}return Object.defineProperty(e.prototype,"originalName",{get:function(){return this._originalName||this.name},set:function(t){this._originalName=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this.resizedPath||this._path},set:function(t){this._path=t},enumerable:!0,configurable:!0}),e.toFront=function(t){return null},e.toBack=function(t){return null},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",original_name:"originalName",path:"path",resized_path:"resizedPath",mime_type:"mimeType",size:"size",engine:"engine",created_at:"createdAt"},relation:{engine:P(t.FileEngine),createdAt:C}})],e)}();(B=t.SportTypes||(t.SportTypes={}))[B.basketball=1]="basketball",B[B.volleyball=2]="volleyball",B[B.classic_basketball=3]="classic_basketball",B[B.streetball=4]="streetball",B[B.classic_volleyball=5]="classic_volleyball",B[B.beach_volleyball=6]="beach_volleyball",B[B.hockey=7]="hockey",B[B.ice_hockey=8]="ice_hockey",B[B.ball_hockey=9]="ball_hockey",B[B.football=10]="football",B[B.classic_football=11]="classic_football",B[B.mini_football=12]="mini_football",B[B.handball=13]="handball",B[B.handball_classic=14]="handball_classic",B[B.rugby=15]="rugby",B[B.rugby7=16]="rugby7",B[B.rugby15=17]="rugby15";var H,A,R=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.isBasketball=function(){return this.id===t.SportTypes.basketball||this.parentId===t.SportTypes.basketball},n.prototype.isClassicBasketball=function(){return this.id===t.SportTypes.classic_basketball},n.prototype.isStreetball=function(){return this.id===t.SportTypes.streetball},n.prototype.isVolleyball=function(){return this.id===t.SportTypes.volleyball||this.parentId===t.SportTypes.volleyball},n.prototype.isClassicVolleyball=function(){return this.id===t.SportTypes.classic_volleyball},n.prototype.isBeachVolleyball=function(){return this.id===t.SportTypes.beach_volleyball},n.prototype.isHockey=function(){return this.id===t.SportTypes.hockey||this.parentId===t.SportTypes.hockey},n.prototype.isIceHockey=function(){return this.id===t.SportTypes.ice_hockey},n.prototype.isBallHockey=function(){return this.id===t.SportTypes.ball_hockey},n.prototype.isFootball=function(){return this.id===t.SportTypes.football||this.parentId===t.SportTypes.football},n.prototype.isClassicFootball=function(){return this.id===t.SportTypes.classic_football},n.prototype.isMiniFootball=function(){return this.id===t.SportTypes.mini_football},n.prototype.isHandball=function(){return this.id===t.SportTypes.handball||this.parentId===t.SportTypes.handball},n.prototype.isHandballClassic=function(){return this.id===t.SportTypes.handball_classic},n.prototype.isRugby=function(){return this.id===t.SportTypes.rugby||this.parentId===t.SportTypes.rugby},n.prototype.isRugby15=function(){return this.id===t.SportTypes.rugby15},n.prototype.isRugby7=function(){return this.id===t.SportTypes.rugby7},n.toFront=function(t){return null},n.toBack=function(t){return null},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(k),x=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},g([U],t,"toFront",null),g([j],t,"toBack",null),t=g([w({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name"}})],e)}(k);(H=t.GameBasketballPosition||(t.GameBasketballPosition={}))[H.point_guard=1]="point_guard",H[H.shooting_guard=2]="shooting_guard",H[H.small_forward=3]="small_forward",H[H.power_forward=4]="power_forward",H[H.center=5]="center",(A=t.WorkHand||(t.WorkHand={}))[A.left=1]="left",A[A.right=2]="right";var V,E,z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:P(t.GameBasketballPosition),workHand:P(t.WorkHand)}})],n)}(k);(V=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[V.setter=1]="setter",V[V.libero=2]="libero",V[V.middle_player=3]="middle_player",V[V.receiver_attacker=4]="receiver_attacker",V[V.dioganal=5]="dioganal",(E=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[E.left=1]="left",E[E.right=2]="right";var N,D,W=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:P(t.GameVolleyballPosition),workHand:P(t.VolleyballWorkHand)}})],n)}(k);(N=t.GameHockeyPosition||(t.GameHockeyPosition={}))[N.defensemen=1]="defensemen",N[N.forward=2]="forward",N[N.goaltender=3]="goaltender",(D=t.HockeyWorkHand||(t.HockeyWorkHand={}))[D.left=1]="left",D[D.right=2]="right";var q,X,$=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:P(t.GameHockeyPosition),workHand:P(t.HockeyWorkHand)}})],n)}(k);(q=t.GameFootballPosition||(t.GameFootballPosition={}))[q.defensemen=1]="defensemen",q[q.midfielder=2]="midfielder",q[q.forward=3]="forward",q[q.goalkeeper=4]="goalkeeper",(X=t.FootballWorkFoot||(t.FootballWorkFoot={}))[X.left=1]="left",X[X.right=2]="right",X[X.both=3]="both";var K,Y=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_foot:"workFoot"},relation:{position:P(t.GameFootballPosition),workFoot:P(t.FootballWorkFoot)}})],n)}(k);(K=t.GameHandballPosition||(t.GameHandballPosition={}))[K.goalkeeper=1]="goalkeeper",K[K.winger=2]="winger",K[K.pivot=3]="pivot",K[K.centre_back=4]="centre_back",K[K.fullback=5]="fullback";var J,Z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:P(t.GameHandballPosition),workHand:P(t.WorkHand)}})],n)}(k);(J=t.GameRugbyPosition||(t.GameRugbyPosition={}))[J.front_line=1]="front_line",J[J.second_line=2]="second_line",J[J.back_line=3]="back_line",J[J.halfback=4]="halfback",J[J.three_quarter=5]="three_quarter",J[J.fullback=6]="fullback";var Q,tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",user_id:"userId",position:"position"},relation:{position:P(t.GameRugbyPosition)}})],n)}(k);(Q=t.UserGender||(t.UserGender={}))[Q.male=1]="male",Q[Q.female=2]="female";var et,nt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){return null},n.toBack=function(t){return null},Object.defineProperty(n.prototype,"fullName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"age",{get:function(){if(!this.birthDate)return null;var t=(new Date).getTime()-this.birthDate.getTime();return Math.floor(t/31536e6)},enumerable:!0,configurable:!0}),g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",last_name:"lastName",first_name:"firstName",middle_name:"middleName",email:"email",phone:"phone",birth_date:"birthDate",photo:"photo",profile:"profile",basketball_profile:"basketballProfile",volleyball_profile:"volleyballProfile",hockey_profile:"hockeyProfile",football_profile:"footballProfile",handball_profile:"handballProfile",rugby_profile:"rugbyProfile",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:F,photo:O,profile:x,basketballProfile:z,volleyballProfile:W,hockeyProfile:$,footballProfile:Y,handballProfile:Z,rugbyProfile:tt,city:M,gender:P(t.UserGender)}})],n)}(k),ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),this.sport.isHandball()&&t.push("empty-logo-handball"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",sport:"sport",logo:"logo",owner:"owner",city:"city",users_count:"usersCount",won_games_count:"wonGamesCount",games_count:"gamesCount",score_sum:"scoreSum",closest_game_datetime:"closestGameDatetime"},relation:{sport:R,logo:O,owner:nt,city:M,closestGameDatetime:F}})],e)}(k),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:nt}})],e)}(k),rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"vkLink",{get:function(){return this.socialLinks.find((function(t){return t.indexOf("vk.com/")>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return t.indexOf("facebook.com/")>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return t.indexOf("instagram.com/")>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"youtubeLink",{get:function(){return this.socialLinks.find((function(t){return t.indexOf("youtube.com/")>-1}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"telegramLink",{get:function(){return this.socialLinks.find((function(t){return"https://t.me/"===t.substr(0,13)||"https://www.t.me/"===t.substr(0,17)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tiktokLink",{get:function(){return this.socialLinks.find((function(t){return t.indexOf("tiktok.com/")>-1}))},enumerable:!0,configurable:!0}),g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",logo:"logo",contact_email:"contactEmail",contact_phone:"contactPhone",name:"name",alias:"alias",sport:"sport",description:"description",social_links:"socialLinks",links:"links",organization:"organization",tournaments_count:"tournamentsCount",documents_count:"documentsCount",closest_game_datetime:"closestGameDatetime",cover:"cover",about:"about"},relation:{organization:it,logo:O,cover:O,sport:R}})],e)}(k);(et=t.TournamentSeasonStatuses||(t.TournamentSeasonStatuses={}))[et.open=0]="open",et[et.in_progress=1]="in_progress",et[et.closed=2]="closed";var at,st,ut,lt,pt,ct,mt,ft,gt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",status:"status",start_date:"startDate",closed_date:"closedDate",tournaments:"tournaments"},relation:{logo:O,cover:O,previewImage:O,status:P(t.TournamentSeasonStatuses),startDate:F,closedDate:F}})],n)}(k);(at=t.TournamentTypes||(t.TournamentTypes={})).group="group",at.elimination="elimination",at.fiba="fiba",(st=t.TournamentStatuses||(t.TournamentStatuses={}))[st.open=0]="open",st[st.in_progress=1]="in_progress",st[st.closed=2]="closed",(ut=t.TournamentGender||(t.TournamentGender={}))[ut.male=1]="male",ut[ut.female=2]="female",ut[ut.all=3]="all",(lt=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[lt.standard=1]="standard",lt[lt.light=2]="light",lt[lt.advanced=3]="advanced",(pt=t.VolleyballStatisticTypes||(t.VolleyballStatisticTypes={}))[pt.standard=1]="standard",pt[pt.light=2]="light",pt[pt.advanced=3]="advanced",(ct=t.RugbyStatisticTypes||(t.RugbyStatisticTypes={}))[ct.light=1]="light",ct[ct.standard=2]="standard",(mt=t.GameTimeTypes||(t.GameTimeTypes={}))[mt.clean=1]="clean",mt[mt.dirty=2]="dirty",(ft=t.OvertimeTypes||(t.OvertimeTypes={}))[ft.to_score_total=1]="to_score_total",ft[ft.to_score_diff=2]="to_score_diff",ft[ft.time=3]="time",ft[ft.without_overtime=4]="without_overtime",ft[ft.to_first_goal=5]="to_first_goal",ft[ft.to_first_goal_and_bullitts=6]="to_first_goal_and_bullitts",ft[ft.bullitts=7]="bullitts",ft[ft.penalties=8]="penalties",ft[ft.time_and_penalties=9]="time_and_penalties";var dt,ht=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",gender:"gender",age_from:"ageFrom",age_to:"ageTo",max_team_players:"maxTeamPlayers",max_game_players:"maxGamePlayers",type:"type",tours_count:"toursCount",periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",game_up_to_score:"gameUpToScore",volleyball_score_in_set:"volleyballScoreInSet",volleyball_score_in_last_set:"volleyballScoreInLastSet",manage_team_application:"manageTeamApplication",recruitment_is_open:"recruitmentIsOpen",transfer_is_open:"transferIsOpen",basketball_statistic_type:"basketballStatisticType",volleyball_statistic_type:"volleyballStatisticType",rugby_statistic_type:"rugbyStatisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType",with_result_table:"withResultTable",free_substitute_enabled:"freeSubstituteEnabled",substitute_manage_enabled:"substituteManageEnabled",bonus_points_enabled:"bonusPointsEnabled"},relation:{type:P(t.TournamentTypes),gender:P(t.TournamentGender),basketballStatisticType:P(t.BasketballStatisticTypes),volleyballStatisticType:P(t.VolleyballStatisticTypes),rugbyStatisticType:P(t.RugbyStatisticTypes),gameTimeType:P(t.GameTimeTypes),overtimeType:P(t.OvertimeTypes)}})],n)}(k),_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",name:"name",logo:"logo",team:"team",points:"points"},relation:{logo:O,team:ot}})],e)}(k),yt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getEmptyLogoClass=function(){var t=["empty-logo"];return this.sport.isBasketball()&&t.push("empty-logo-basketball"),this.sport.isVolleyball()&&t.push("empty-logo-volleyball"),this.sport.isHockey()&&t.push("empty-logo-hockey"),this.sport.isFootball()&&t.push("empty-logo-football"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",city:"city",sport:"sport",location:"location",description:"description",date:"date",price:"price",regulation_files:"regulationFiles",settings:"settings",league:"league",teams_count:"teamsCount",closest_game_datetime:"closestGameDatetime",status:"status",team_winner:"teamWinner",team_second:"teamSecond",team_third:"teamThird",season:"season",season_id:"seasonId"},relation:{logo:O,cover:O,previewImage:O,city:M,sport:R,regulationFile:O,settings:ht,date:C,league:rt,status:P(t.TournamentStatuses),teamWinner:_t,teamSecond:_t,teamThird:_t,season:gt}})],n)}(k),vt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",game_up_to_score:"gameUpToScore",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_score:"overtimeScore",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",statistic_type:"statisticType",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType"},relation:{overtimeType:P(t.OvertimeTypes),statisticType:P(t.BasketballStatisticTypes),gameTimeType:P(t.GameTimeTypes)}})],n)}(k);(dt=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[dt.best_of_five=1]="best_of_five",dt[dt.best_of_three=2]="best_of_three";var bt,Tt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"setsCount",{get:function(){return this.gameType===t.VolleyballGameTypes.best_of_three?3:5},enumerable:!0,configurable:!0}),n.prototype.getSetMaxScore=function(t){return t===this.setsCount?this.scoreInLastSet:this.scoreInSet},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{game_type:"gameType",timeout_count:"timeoutCount",timeout_time:"timeoutTime",substitute_count:"substituteCount",score_in_set:"scoreInSet",score_in_last_set:"scoreInLastSet",statistic_type:"statisticType",libero_user_ids:"liberoUserIds"},relation:{gameType:P(t.VolleyballGameTypes),statisticType:P(t.VolleyballStatisticTypes)}})],n)}(k),kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(k),Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isVideo",{get:function(){return Boolean(this.videoUrl)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",original_photo:"originalPhoto",list_photo:"listPhoto",detail_photo:"detailPhoto",game:"game",tournament:"tournament",game_id:"gameId",tournament_id:"tournament_id",video_url:"videoUrl",video_preview:"videoPreview",is_live:"isLive"},relation:{originalPhoto:O,listPhoto:O,detailPhoto:O,videoPreview:O}})],e)}(k),St=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},Object.defineProperty(n.prototype,"overtimePeriod",{get:function(){return this.periodsCount+1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bullitsPeriod",{get:function(){return this.periodsCount+2},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"playoffBullitsPeriod",{get:function(){return this.periodsCount+3},enumerable:!0,configurable:!0}),g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType",substitute_manage_enabled:"substituteManageEnabled"},relation:{overtimeType:P(t.OvertimeTypes),gameTimeType:P(t.GameTimeTypes)}})],n)}(k),Gt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"penaltyPeriod",{get:function(){return this.overtimeType!==t.OvertimeTypes.time_and_penalties?+this.periodsCount+1:+this.periodsCount+this.overtimePeriods+1},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_periods:"overtimePeriods",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType",substitute_count:"substituteCount",free_substitute_enabled:"freeSubstituteEnabled",substitute_manage_enabled:"substituteManageEnabled"},relation:{overtimeType:P(t.OvertimeTypes),gameTimeType:P(t.GameTimeTypes)}})],n)}(k),Ft=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",max_game_players:"maxGamePlayers",timeout_count:"timeoutCount",overtime_timeout_count:"overtimeTimeoutCount",timeout_time:"timeoutTime",game_time_type:"gameTimeType"},relation:{overtimeType:P(t.OvertimeTypes),gameTimeType:P(t.GameTimeTypes)}})],n)}(k);function Ct(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}(bt=t.PlayoffTypes||(t.PlayoffTypes={})).double_elimination="double_elimination",bt.elimination="elimination";var wt,Lt,Ut=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount",type:"type",min_player_games_count:"minPlayerGamesCount",min_player_time:"minPlayerTime"},relation:{type:P(t.PlayoffTypes)}})],n)}(k),jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stages=[],e}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"stagesCount",{get:function(){return Math.log(this.settings.teamsCount)/Math.log(2)},enumerable:!0,configurable:!0}),e.prototype.getPlayoffStages=function(){var t=this;if(0===this.stages.length&&this.settings.teamsCount){var e=Math.log(this.settings.teamsCount)/Math.log(2);this.stages=Ct(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:Ut}})],e)}(k),It=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",sort:"sort",tournament_stage_id:"tournamentStageId"}})],e)}(k),Bt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"penaltyPeriod",{get:function(){return this.overtimeType!==t.OvertimeTypes.time_and_penalties?+this.periodsCount+1:+this.periodsCount+this.overtimePeriods+1},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{periods_count:"periodsCount",period_time:"periodTime",overtime_type:"overtimeType",overtime_time:"overtimeTime",overtime_periods:"overtimePeriods",max_game_players:"maxGamePlayers",game_time_type:"gameTimeType",substitute_count:"substituteCount",free_substitute_enabled:"freeSubstituteEnabled",statistic_type:"statisticType"},relation:{overtimeType:P(t.OvertimeTypes),gameTimeType:P(t.GameTimeTypes),statisticType:P(t.RugbyStatisticTypes)}})],n)}(k);(wt=t.GameStatuses||(t.GameStatuses={}))[wt.open=1]="open",wt[wt.in_progress=2]="in_progress",wt[wt.closed=3]="closed",wt[wt.archived=4]="archived",wt[wt.draft=5]="draft",(Lt=t.GameResultTypes||(t.GameResultTypes={}))[Lt.team_won=1]="team_won",Lt[Lt.competitor_team_won=2]="competitor_team_won",Lt[Lt.team_technical_defeat=3]="team_technical_defeat",Lt[Lt.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",logo:"logo"},relation:{logo:O}})],e)}(k),Ht=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"basketballGameConfig",{get:function(){return this._basketballGameConfig&&this._basketballGameConfig.periodsCount||this.gameConfig&&(this._basketballGameConfig=vt.toFront(this.gameConfig)),this._basketballGameConfig},set:function(t){this._basketballGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"volleyballGameConfig",{get:function(){return this._volleyballGameConfig&&this._volleyballGameConfig.setsCount||this.gameConfig&&(this._volleyballGameConfig=Tt.toFront(this.gameConfig)),this._volleyballGameConfig},set:function(t){this._volleyballGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hockeyGameConfig",{get:function(){return this._hockeyGameConfig&&this._hockeyGameConfig.periodsCount||this.gameConfig&&(this._hockeyGameConfig=St.toFront(this.gameConfig)),this._hockeyGameConfig},set:function(t){this._hockeyGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"handballGameConfig",{get:function(){return this._handballGameConfig&&this._handballGameConfig.periodsCount||this.gameConfig&&(this._handballGameConfig=Ft.toFront(this.gameConfig)),this._handballGameConfig},set:function(t){this._handballGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"footballGameConfig",{get:function(){return this._footballGameConfig&&this._footballGameConfig.periodsCount||this.gameConfig&&(this._footballGameConfig=Gt.toFront(this.gameConfig)),this._footballGameConfig},set:function(t){this._footballGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rugbyGameConfig",{get:function(){return this._rugbyGameConfig&&this._rugbyGameConfig.periodsCount||this.gameConfig&&(this._rugbyGameConfig=Bt.toFront(this.gameConfig)),this._rugbyGameConfig},set:function(t){this._rugbyGameConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreByPeriodList",{get:function(){var t=this;return this.scoreByPeriod?Object.keys(this.scoreByPeriod).map((function(e){return{period:+e,teamScore:t.scoreByPeriod[e][0],competitorTeamScore:t.scoreByPeriod[e][1]}})):[]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.status===t.GameStatuses.closed},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isTeamWon",{get:function(){return[t.GameResultTypes.team_won,t.GameResultTypes.competitor_team_technical_defeat].includes(this.resultType)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return[t.GameResultTypes.competitor_team_won,t.GameResultTypes.team_technical_defeat].includes(this.resultType)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.isClosed?this.isTeamWon?this.team.id||this.teamId:this.isCompetitorTeamWon?this.competitorTeam.id||this.competitorTeamId:null:null},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",status:"status",team:"team",tournament_team:"tournamentTeam",tournament_team_id:"tournamentTeamId",team_id:"teamId",competitor_team:"competitorTeam",competitor_tournament_team:"competitorTournamentTeam",competitor_tournament_team_id:"competitorTournamentTeamId",competitor_team_id:"competitorTeamId",competitor_team_name:"competitorTeamName",datetime:"datetime",location:"location",team_score:"teamScore",competitor_team_score:"competitorTeamScore",result_type:"resultType",playoff_number:"playoffNumber",tournament_id:"tournamentId",tournament_tour:"tournamentTour",game_config:"gameConfig",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",hockey_game_config:"hockeyGameConfig",football_game_config:"footballGameConfig",handball_game_config:"handballGameConfig",rugby_game_config:"rugbyGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",playoff_round:"playoffRound",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_playoff:"tournamentPlayoff",tournament_court:"tournamentCourt",media_count:"mediaCount",media_live_count:"mediaLiveCount",media:"media",tournament:"tournament",tournament_group:"tournamentGroup"},relation:{status:P(t.GameStatuses),team:ot,tournamentTeam:Ot,competitorTeam:ot,competitorTournamentTeam:Ot,datetime:C,resultType:P(t.GameResultTypes),basketballGameConfig:vt,volleyballGameConfig:Tt,hockeyGameConfig:St,footballGameConfig:Gt,handballGameConfig:Ft,tournamentPlayoff:jt,tournamentCourt:kt,media:G(Pt),tournament:yt,tournamentGroup:It}})],n)}(k);function At(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&Et(o)){if(!o(t))return t}else if(t.id!==e.id)return t;return t.updatedAt&&e.updatedAt&&!n&&t.updatedAt>e.updatedAt?t:e})):t}function Rt(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=At(t,e,n,o)})),t}function xt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return Et(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function Mt(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=xt(t,e,n,o)})),t}function Vt(t,e){return Array.isArray(t)?Et(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function Et(t){return t&&"[object Function]"==={}.toString.call(t)}var zt,Nt=function(){function t(t){this.engine=t,this.data={}}return t.prototype.get=function(t){return this.getSubject(t).pipe(o.filter((function(t){return void 0!==t})))},t.prototype.value=function(t){return this.getSubject(t).value},t.prototype.save=function(t,e){this.getSubject(t).next(e),this.engine&&this.engine.save(t,e)},t.prototype.appendItem=function(t,e,n){this.save(t,xt(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,Mt(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,xt(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,Mt(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,At(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,Rt(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,Vt(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=y(Object.keys(this.data)),o=n.next();!o.done;o=n.next()){var i=o.value;this.data[i].complete(),delete this.data[i]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.clearStorageData=function(){this.engine&&this.engine.clear()},t.prototype.getEngine=function(){return this.engine},t.prototype.getSubject=function(t){return this.data[t]||(this.data[t]=new i.BehaviorSubject(this.engine?this.engine.get(t):void 0)),this.data[t]},t}(),Dt=function(){function t(){this.store=new Nt}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Wt=function(t){function n(e){var n=t.call(this)||this;return n.configData=e,e&&n.initialize(e),n}return m(n,t),Object.defineProperty(n.prototype,"config$",{get:function(){return this.store.get("config")},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this.store.value("config")||{}},enumerable:!0,configurable:!0}),n.prototype.initialize=function(t){this.store.save("config",t)},n.prototype.set=function(t,e){var n;this.store.save("config",f(f({},this.config),((n={})[t]=e,n)))},n.prototype.get=function(t){return this.store.value("config")&&this.store.value("config")[t]},n.ctorParameters=function(){return[{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:["mtg-core-config-data"]}]}]},n.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new n(e.ɵɵinject("mtg-core-config-data",8))},token:n,providedIn:"root"}),n=g([e.Injectable({providedIn:"root"}),d(0,e.Optional()),d(0,e.Inject("mtg-core-config-data"))],n)}(Dt),qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",logo:"logo",team_id:"teamId",tournament_id:"tournamentId",tournament:"tournament",team:"team",group:"group",final_standing:"finalStanding",games_count:"gamesCount",won_games_count:"wonGamesCount",draw_games_count:"drawGamesCount",lose_games_count:"loseGamesCount",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",score_sum:"scoreSum",missed_sum:"missedSum",score_points_sum:"scorePointsSum",missed_points_sum:"missedPointsSum",points:"points",users_count:"usersCount",games:"games",notifications_count:"notificationsCount",win_normal_time_games_count:"winNormalTimeGamesCount",lose_normal_time_games_count:"loseNormalTimeGamesCount",win_overtime_games_count:"winOvertimeGamesCount",lose_overtime_games_count:"loseOvertimeGamesCount",last_five_games:"lastFiveGames",tries_scored:"triesScored",tries_missed:"triesMissed",attack_bonuses:"attackBonuses",defense_bonuses:"defenseBonuses"},relation:{logo:O,tournament:yt,team:ot,group:It,games:Ht,lastFiveGames:Ht}})],e)}(k);(zt=t.TeamUserRole||(t.TeamUserRole={}))[zt.member=1]="member",zt[zt.moderator=2]="moderator",zt[zt.admin=3]="admin",zt[zt.coach=4]="coach",zt[zt.head_coach=5]="head_coach",zt[zt.playing_coach=6]="playing_coach",zt[zt.manager=7]="manager",zt[zt.head_manager=8]="head_manager",zt[zt.captain=9]="captain",zt[zt.assistant=10]="assistant";var Xt,$t=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:nt,team:ot,role:P(t.TeamUserRole)}})],n)}(k),Kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:F,dateTo:F}})],e)}(k),Yt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"fullName",{get:function(){return[this.lastName,this.firstName,this.middleName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shortName",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).join(" ")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initials",{get:function(){return[this.lastName,this.firstName].filter((function(t){return t})).map((function(t){return t.substr(0,1)})).join("")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"age",{get:function(){if(!this.birthDate)return null;var t=(new Date).getTime()-this.birthDate.getTime();return Math.floor(t/31536e6)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",user_id:"userId",league_id:"leagueId",first_name:"firstName",last_name:"lastName",middle_name:"middleName",birth_date:"birthDate",photo:"photo",user:"user",has_changes:"hasChanges",rating:"rating"},relation:{birthDate:F,photo:O,user:nt}})],e)}(k),Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",disqualification:"disqualification",league_player:"leaguePlayer"},relation:{tournamentTeam:qt,teamUser:$t,disqualification:Kt,leaguePlayer:Yt}})],e)}(k),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"totalFouls",{get:function(){return this.personalFouls+this.technicalFouls+this.unsportsmanlikeFouls},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamPoints",{get:function(){return this.tournamentTeam&&this.tournamentTeam.points},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{league_player:"leaguePlayer",tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",free_throws_made:"freeThrowsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",two_point_percent:"twoPointPercent",three_point_percent:"threePointPercent",free_throw_percent:"freeThrowPercent",one_point_percent:"onePointPercent",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",game_time:"gameTime",newbie:"newbie",rank:"rank"},relation:{leaguePlayer:Yt,tournamentTeamUser:Jt,team:ot,teamUser:$t,user:nt,tournamentTeam:qt,month:F}})],e)}(k),Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Zt,competitorTeam:Zt}})],e)}(k),te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},Object.defineProperty(e.prototype,"totalFouls",{get:function(){return(this.personalFouls||0)+(this.technicalFouls||0)+(this.unsportsmanlikeFouls||0)},enumerable:!0,configurable:!0}),g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",points:"points",free_throws_made:"freeThrowsMade",two_points_made:"twoPointsMade",three_points_made:"threePointsMade",one_points_made:"onePointsMade",two_point_attempts:"twoPointAttempts",three_point_attempts:"threePointAttempts",free_throw_attempts:"freeThrowAttempts",one_point_attempts:"onePointAttempts",assists:"assists",blocks:"blocks",rebounds:"rebounds",offensive_rebounds:"offensiveRebounds",defensive_rebounds:"defensiveRebounds",steals:"steals",turnovers:"turnovers",personal_fouls:"personalFouls",technical_fouls:"technicalFouls",unsportsmanlike_fouls:"unsportsmanlikeFouls",updated_at:"updatedAt"},relation:{updatedAt:C}})],e)}(k);(Xt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[Xt.enter_game=1]="enter_game",Xt[Xt.exit_game=2]="exit_game",Xt[Xt.remove_game=3]="remove_game",Xt[Xt.two_point_made=4]="two_point_made",Xt[Xt.three_point_made=5]="three_point_made",Xt[Xt.free_throw_made=6]="free_throw_made",Xt[Xt.two_point_attempt=7]="two_point_attempt",Xt[Xt.three_point_attempt=8]="three_point_attempt",Xt[Xt.free_throw_attempt=9]="free_throw_attempt",Xt[Xt.assist=10]="assist",Xt[Xt.block=11]="block",Xt[Xt.rebound=12]="rebound",Xt[Xt.offensive_rebound=13]="offensive_rebound",Xt[Xt.defensive_rebound=14]="defensive_rebound",Xt[Xt.steal=15]="steal",Xt[Xt.turnover=16]="turnover",Xt[Xt.personal_foul=17]="personal_foul",Xt[Xt.technical_foul=18]="technical_foul",Xt[Xt.unsportsmanlike_foul=19]="unsportsmanlike_foul",Xt[Xt.one_point_attempt=20]="one_point_attempt",Xt[Xt.one_point_made=21]="one_point_made",Xt[Xt.timeout=22]="timeout",Xt[Xt.team_rebound=23]="team_rebound";var ee,ne,oe=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.isPointsType=function(){return[t.BasketballGameLogTypes.two_point_made,t.BasketballGameLogTypes.three_point_made,t.BasketballGameLogTypes.free_throw_made,t.BasketballGameLogTypes.one_point_made].indexOf(this.logType)>-1},n.prototype.isReboundType=function(){return[t.BasketballGameLogTypes.rebound,t.BasketballGameLogTypes.offensive_rebound,t.BasketballGameLogTypes.defensive_rebound].indexOf(this.logType)>-1},n.prototype.isFoulType=function(){return[t.BasketballGameLogTypes.personal_foul,t.BasketballGameLogTypes.technical_foul,t.BasketballGameLogTypes.unsportsmanlike_foul].indexOf(this.logType)>-1},n.prototype.getScore=function(){var e;return((e={})[t.BasketballGameLogTypes.one_point_made]=1,e[t.BasketballGameLogTypes.free_throw_made]=1,e[t.BasketballGameLogTypes.two_point_made]=2,e[t.BasketballGameLogTypes.three_point_made]=3,e)[this.logType]},n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight"},relation:{datetime:C,logType:P(t.BasketballGameLogTypes)}})],n)}(k),ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",is_mvp:"isMvp",updated_at:"updatedAt"},relation:{teamUser:$t,tournamentTeamUser:Jt,updatedAt:C}})],e)}(k),re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{min_user_games_count:"minUserGamesCount",min_user_time:"minUserTime",manual:"manual"}})],e)}(k),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{tournament_team_user_id:"tournamentTeamUserId",limitations:"limitations"},relation:{limitations:re}})],e)}(k),se=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getUsers=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return ie.toFront(t)}))).toPromise()]}))}))},t.prototype.getMvp=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/mvp/").pipe(o.map((function(t){return ie.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsersLimitation=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users_limitation/").pipe(o.map((function(t){return ae.toFront(t)}))).toPromise()]}))}))},t.prototype.downloadApplication=function(t,e,o){return h(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/game_application/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),ue=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return Qt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/logs/").pipe(o.map((function(t){return oe.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadFibaProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/game_protocol_fiba/?file_type="+e,{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se),le=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},g([U],t,"toFront",null),g([j],t,"toBack",null),t=g([w({mappingFields:{id:"id",theme:"theme",message:"message",files:"files",email:"email",captcha:"captcha"},relation:{files:O}})],t)}(),pe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.sendFeedback=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",le.toBack(t)).pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},t.prototype.sendLeagueFeedback=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/feedback/",le.toBack(e)).pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),ce=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.upload=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a,s;return _(this,(function(u){return a=new n.HttpParams,i&&r&&(a=a.set("width",i.toString()).set("height",r.toString())),(s=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",s,{params:a}).pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return h(this,void 0,void 0,(function(){var e,n,o,i,r,a;return _(this,(function(s){e=new FormData;try{for(n=y(t),o=n.next();!o.done;o=n.next())i=o.value,e.append("files",i.file,i.filename)}catch(t){r={error:t}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/zip_archive/",e,{responseType:"blob"}).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}();(ee=t.HockeyGameLogTypes||(t.HockeyGameLogTypes={}))[ee.enter_game=1]="enter_game",ee[ee.exit_game=2]="exit_game",ee[ee.shot_miss=3]="shot_miss",ee[ee.shot_on_goal=4]="shot_on_goal",ee[ee.shot_blocked=5]="shot_blocked",ee[ee.goal=6]="goal",ee[ee.shootout_attempt=7]="shootout_attempt",ee[ee.shootout_goal=8]="shootout_goal",ee[ee.assist=9]="assist",ee[ee.block_shot=10]="block_shot",ee[ee.minor_penalty=11]="minor_penalty",ee[ee.major_penalty=12]="major_penalty",ee[ee.misconduct_penalty=13]="misconduct_penalty",ee[ee.game_misconduct_penalty=14]="game_misconduct_penalty",ee[ee.match_penalty=15]="match_penalty",ee[ee.penalty_shot=16]="penalty_shot",ee[ee.face_off_lose=17]="face_off_lose",ee[ee.face_off_win=18]="face_off_win",ee[ee.save=19]="save",ee[ee.timeout=20]="timeout",ee[ee.penalty_start=21]="penalty_start",ee[ee.penalty_end=22]="penalty_end",ee[ee.after_game_shootout_attempt=23]="after_game_shootout_attempt",ee[ee.after_game_shootout_goal=24]="after_game_shootout_goal",ee[ee.after_game_shootout_save=25]="after_game_shootout_save",ee[ee.shootout_save=26]="shootout_save",(ne=t.HockeyAdvantageTypes||(t.HockeyAdvantageTypes={}))[ne.power_play=1]="power_play",ne[ne.shorthanded=2]="shorthanded",ne[ne.even_strength=3]="even_strength";var me,fe=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),Object.defineProperty(n.prototype,"penalizedGameUserId",{get:function(){return this._penalizedGameUserId?this._penalizedGameUserId:this.gameUserId},set:function(t){this._penalizedGameUserId=t},enumerable:!0,configurable:!0}),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.HockeyGameLogTypes.goal,t.HockeyGameLogTypes.shootout_goal,t.HockeyGameLogTypes.after_game_shootout_goal].indexOf(this.logType)>-1},n.prototype.isPenaltyType=function(){return[t.HockeyGameLogTypes.minor_penalty,t.HockeyGameLogTypes.major_penalty,t.HockeyGameLogTypes.misconduct_penalty,t.HockeyGameLogTypes.game_misconduct_penalty,t.HockeyGameLogTypes.penalty_shot,t.HockeyGameLogTypes.match_penalty].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",advantage:"advantage",advantage_num:"advantageNum",is_goalie:"isGoalie",penalty_type:"penaltyType",penalized_game_user_id:"penalizedGameUserId",mutual_penalty:"mutualPenalty"},relation:{datetime:C,logType:P(t.HockeyGameLogTypes),advantage:P(t.HockeyAdvantageTypes),penaltyType:S()}})],n)}(k),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoal",{get:function(){return(this.evShotsOnGoal||0)+(this.ppShotsOnGoal||0)+(this.shShotsOnGoal||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsBlocked",{get:function(){return(this.evShotsBlocked||0)+(this.ppShotsBlocked||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotMisses",{get:function(){return(this.evShotMisses||0)+(this.ppShotMisses||0)+(this.shShotMisses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ppShots",{get:function(){return(this.ppShotMisses||0)+(this.ppShotsOnGoal||0)+(this.ppShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"evShots",{get:function(){return(this.evShotMisses||0)+(this.evShotsOnGoal||0)+(this.evShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shShots",{get:function(){return(this.shShotMisses||0)+(this.shShotsOnGoal||0)+(this.shShotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return this.ppShots+this.evShots+this.shShots+(this.shootoutAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalShots",{get:function(){return this.shots+(this.shootoutAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goals",{get:function(){return(this.ppGoals||0)+(this.shGoals||0)+(this.evGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoals",{get:function(){return this.goals+(this.shootoutGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.evAssists||0)+(this.shAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"faceOffs",{get:function(){return(this.faceOffWins||0)+(this.faceOffLosses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shootOuts",{get:function(){return(this.shootoutAttempts||0)+(this.shootoutGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shootoutShotsAgainst",{get:function(){return(this.shootoutSaves||0)+(this.shootoutGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalShotsAgainst",{get:function(){return this.shotsAgainst+this.shootoutShotsAgainst},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSaves",{get:function(){return(this.saves||0)+(this.shootoutSaves||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSavesPercent",{get:function(){return this.totalShotsAgainst&&this.totalSaves?Math.round(1e3*this.totalSaves/this.totalShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoalsAgainst",{get:function(){return(this.goalsAgainst||0)+(this.shootoutGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals:"ppGoals",ev_goals:"evGoals",sh_goals:"shGoals",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",after_game_shootout_attempts:"afterGameShootoutAttempts",after_game_shootout_goals:"afterGameShootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",saves:"saves",shootout_save:"shootoutSaves",after_game_shootout_saves:"afterGameShootoutSaves",goals_against:"goalsAgainst",shootout_goals_against:"shootoutGoalsAgainst",after_game_shootout_goals_against:"afterGameShootoutGoalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:C}})],e)}(k),de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"assists",{get:function(){return(this.ppAssists||0)+(this.shAssists||0)+(this.evAssists||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamPoints",{get:function(){return this.tournamentTeam&&this.tournamentTeam.points},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{league_player:"leaguePlayer",tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",lose_games_count:"loseGamesCount",points:"points",pp_shots:"ppShots",pp_shot_misses:"ppShotMisses",pp_shots_on_goal:"ppShotsOnGoal",pp_shots_blocked:"ppShotsBlocked",ev_shots:"evShots",ev_shot_misses:"evShotMisses",ev_shots_on_goal:"evShotsOnGoal",ev_shots_blocked:"evShotsBlocked",sh_shots:"shShots",sh_shot_misses:"shShotMisses",sh_shots_on_goal:"shShotsOnGoal",sh_shots_blocked:"shShotsBlocked",pp_goals_percent:"ppGoalsPercent",pp_goals:"ppGoals",ev_goals_percent:"evGoalsPercent",ev_goals:"evGoals",sh_goals_percent:"shGoalsPercent",goals:"goals",total_goals:"totalGoals",sh_goals:"shGoals",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots:"shots",total_shots:"totalShots",goals_percent:"goalsPercent",total_goals_percent:"totalGoalsPercent",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",after_game_shootout_attempts:"afterGameShootoutAttempts",after_game_shootout_goals:"afterGameShootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",face_offs:"faceOffs",face_off_percent:"faceOffPercent",saves:"saves",total_saves:"totalSaves",shootout_saves:"shootoutSaves",shots_against:"shotsAgainst",shootout_shots_against:"shootoutShotsAgainst",total_shots_against:"totalShotsAgainst",saves_percent:"savesPercent",total_saves_percent:"totalSavesPercent",goals_against:"goalsAgainst",shootout_goals_against:"shootoutGoalsAgainst",total_goals_against:"totalGoalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie",rank:"rank"},relation:{leaguePlayer:Yt,tournamentTeamUser:Jt,team:ot,teamUser:$t,user:nt,tournamentTeam:qt,month:F}})],e)}(k),he=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:de,competitorTeam:de}})],e)}(k),_e=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/team_statistic/").pipe(o.map((function(t){return he.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/user_statistic/").pipe(o.map((function(t){return ge.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/logs/").pipe(o.map((function(t){return fe.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return h(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se);(me=t.FootballGameLogTypes||(t.FootballGameLogTypes={}))[me.enter_game=1]="enter_game",me[me.exit_game=2]="exit_game",me[me.shot_miss=3]="shot_miss",me[me.shot_on_goal=4]="shot_on_goal",me[me.shot_blocked=5]="shot_blocked",me[me.goal=6]="goal",me[me.penalty_attempt=7]="penalty_attempt",me[me.penalty_goal=8]="penalty_goal",me[me.penalty_save=9]="penalty_save",me[me.small_penalty_attempt=10]="small_penalty_attempt",me[me.small_penalty_goal=11]="small_penalty_goal",me[me.small_penalty_save=12]="small_penalty_save",me[me.assist=13]="assist",me[me.block_shot=14]="block_shot",me[me.corner=15]="corner",me[me.free_kick=16]="free_kick",me[me.foul=17]="foul",me[me.save=18]="save",me[me.yellow_card=19]="yellow_card",me[me.red_card=20]="red_card",me[me.perfect_pass=21]="perfect_pass",me[me.loss=22]="loss",me[me.steal=23]="steal",me[me.out=24]="out",me[me.timeout=25]="timeout",me[me.auto_goal=26]="auto_goal",me[me.end_game_penalty_miss=27]="end_game_penalty_miss",me[me.end_game_penalty_goal=28]="end_game_penalty_goal",me[me.end_game_penalty_save=29]="end_game_penalty_save";var ye,ve=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.FootballGameLogTypes.goal,t.FootballGameLogTypes.penalty_goal,t.FootballGameLogTypes.small_penalty_goal,t.FootballGameLogTypes.auto_goal,t.FootballGameLogTypes.end_game_penalty_goal].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",is_goalie:"isGoalie"},relation:{datetime:C,logType:P(t.FootballGameLogTypes)}})],n)}(k),be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return(this.shotMisses||0)+(this.shotsOnGoal||0)+(this.shotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoals",{get:function(){return(this.goals||0)+(this.penaltyGoals||0)+(this.smallPenaltyGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goalsPercent",{get:function(){return this.shots&&this.totalGoals?Math.round(1e3*this.totalGoals/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoalPercent",{get:function(){return this.shotsOnGoal&&this.shots?Math.round(1e3*this.shotsOnGoal/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penalties",{get:function(){return(this.penaltyGoals||0)+(this.penaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyGoalsPercent",{get:function(){if(!this.penaltyAttempts||!this.penaltyGoals)return 0;var t=this.penaltyAttempts+this.penaltyGoals;return Math.round(1e3*this.penaltyGoals/t)/10},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenalties",{get:function(){return(this.smallPenaltyGoals||0)+(this.smallPenaltyAttempts||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyGoalsPercent",{get:function(){if(!this.smallPenaltyAttempts||!this.smallPenaltyGoals)return 0;var t=this.smallPenaltyAttempts+this.smallPenaltyGoals;return Math.round(1e3*this.smallPenaltyGoals/t)/10},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyShotsAgainst",{get:function(){return(this.penaltySaves||0)+(this.penaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltyShotsAgainst",{get:function(){return(this.smallPenaltySaves||0)+(this.smallPenaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoalsAgainst",{get:function(){return(this.goalsAgainst||0)+(this.penaltyGoalsAgainst||0)+(this.smallPenaltyGoalsAgainst||0)+(this.autoGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSaves",{get:function(){return(this.saves||0)+(this.penaltySaves||0)+(this.smallPenaltySaves||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltySavesPercent",{get:function(){return this.penaltyShotsAgainst&&this.penaltySaves?Math.round(1e3*this.penaltySaves/this.penaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smallPenaltySavesPercent",{get:function(){return this.smallPenaltyShotsAgainst&&this.smallPenaltySaves?Math.round(1e3*this.smallPenaltySaves/this.smallPenaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",goals:"goals",assists:"assists",corners:"corners",free_kicks:"freeKicks",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_against:"penaltyGoalsAgainst",penalty_saves:"penaltySaves",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_saves:"smallPenaltySaves",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",game_time:"gameTime",plus_minus:"plusMinus",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots",auto_goals:"autoGoals",auto_goals_against:"autoGoalsAgainst",end_game_penalty_goals:"endGamePenaltyGoals",end_game_penalty_misses:"endGamePenaltyMisses",end_game_penalty_saves:"endGamePenaltySaves"},relation:{updatedAt:C}})],e)}(k),Te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamPoints",{get:function(){return this.tournamentTeam&&this.tournamentTeam.points},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamGamesCount",{get:function(){return this.tournamentTeam&&this.tournamentTeam.gamesCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamWonGamesCount",{get:function(){return this.tournamentTeam&&this.tournamentTeam.wonGamesCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamDrawGamesCount",{get:function(){return this.tournamentTeam&&this.tournamentTeam.drawGamesCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamLostGamesCount",{get:function(){return this.tournamentTeam?this.tournamentTeam.gamesCount-this.tournamentTeam.drawGamesCount-this.tournamentTeam.wonGamesCount:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamScoreSum",{get:function(){return this.tournamentTeam&&this.tournamentTeam.scoreSum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamMissedSum",{get:function(){return this.tournamentTeam&&this.tournamentTeam.missedSum},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamPlusMinus",{get:function(){return this.tournamentTeam?this.tournamentTeam.scoreSum-this.tournamentTeam.missedSum:null},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{league_player:"leaguePlayer",tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots_on_goal_percent:"shotsOnGoalPercent",shots:"shots",goals:"goals",goals_percent:"goalsPercent",total_goals:"totalGoals",assists:"assists",penalty_goals:"penaltyGoals",penalty_attempts:"penaltyAttempts",penalty_goals_percent:"penaltyGoalsPercent",penalty_saves:"penaltySaves",penalty_goals_against:"penaltyGoalsAgainst",penalty_shots_against:"penaltyShotsAgainst",penalty_saves_percent:"penaltySavesPercent",small_penalty_goals:"smallPenaltyGoals",small_penalty_attempts:"smallPenaltyAttempts",small_penalty_goals_percent:"smallPenaltyGoalsPercent",small_penalty_saves:"smallPenaltySaves",small_penalty_goals_against:"smallPenaltyGoalsAgainst",small_penalty_shots_against:"smallPenaltyShotsAgainst",small_penalty_saves_percent:"smallPenaltySavesPercent",saves:"saves",saves_percent:"savesPercent",total_saves:"totalSaves",goals_against:"goalsAgainst",total_goals_against:"totalGoalsAgainst",shots_against:"shotsAgainst",safety_rate:"safetyRate",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",perfect_passes:"perfectPasses",losses:"losses",steals:"steals",outs:"outs",block_shots:"blockShots",corners:"corners",free_kicks:"freeKicks",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie",rank:"rank",auto_goals:"autoGoals",auto_goals_against:"autoGoalsAgainst",end_game_penalty_goals:"endGamePenaltyGoals",end_game_penalty_misses:"endGamePenaltyMisses",end_game_penalty_saves:"endGamePenaltySaves"},relation:{leaguePlayer:Yt,tournamentTeamUser:Jt,team:ot,teamUser:$t,user:nt,tournamentTeam:qt,month:F}})],e)}(k),ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Te,competitorTeam:Te}})],e)}(k),Pe=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/team_statistic/").pipe(o.map((function(t){return ke.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/user_statistic/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/logs/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return h(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_football_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se);(ye=t.HandballGameLogTypes||(t.HandballGameLogTypes={}))[ye.enter_game=1]="enter_game",ye[ye.exit_game=2]="exit_game",ye[ye.shot_miss=3]="shot_miss",ye[ye.shot_on_goal=4]="shot_on_goal",ye[ye.shot_blocked=5]="shot_blocked",ye[ye.goal=6]="goal",ye[ye.assist=7]="assist",ye[ye.penalty_miss=8]="penalty_miss",ye[ye.penalty_shot_on_goal=9]="penalty_shot_on_goal",ye[ye.penalty_goal=10]="penalty_goal",ye[ye.save=11]="save",ye[ye.penalty_save=12]="penalty_save",ye[ye.foul=13]="foul",ye[ye.yellow_card=14]="yellow_card",ye[ye.red_card=15]="red_card",ye[ye.two_minute_foul=16]="two_minute_foul",ye[ye.turnover=17]="turnover",ye[ye.steal=18]="steal",ye[ye.block_shot=19]="block_shot",ye[ye.timeout=20]="timeout";var Se,Ge=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return[t.HandballGameLogTypes.goal,t.HandballGameLogTypes.penalty_goal].indexOf(this.logType)>-1},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.prototype.isFoulType=function(){return[t.HandballGameLogTypes.foul,t.HandballGameLogTypes.yellow_card,t.HandballGameLogTypes.red_card].indexOf(this.logType)>-1},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",is_goalie:"isGoalie"},relation:{datetime:C,logType:P(t.HandballGameLogTypes)}})],n)}(k),Fe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shots",{get:function(){return(this.shotMisses||0)+(this.shotsOnGoal||0)+(this.shotsBlocked||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoals",{get:function(){return(this.goals||0)+(this.penaltyGoals||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"goalsPercent",{get:function(){return this.shots&&this.totalGoals?Math.round(1e3*this.totalGoals/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsOnGoalPercent",{get:function(){return this.shotsOnGoal&&this.shots?Math.round(1e3*this.shotsOnGoal/this.shots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyShots",{get:function(){return(this.penaltyShotsOnGoal||0)+(this.penaltyMisses||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyGoalsPercent",{get:function(){return this.penaltyShots&&this.penaltyGoals?Math.round(1e3*this.penaltyGoals/this.penaltyShots)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shotsAgainst",{get:function(){return(this.saves||0)+(this.goalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltyShotsAgainst",{get:function(){return(this.penaltySaves||0)+(this.penaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalGoalsAgainst",{get:function(){return(this.goalsAgainst||0)+(this.penaltyGoalsAgainst||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalSaves",{get:function(){return(this.saves||0)+(this.penaltySaves||0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"penaltySavesPercent",{get:function(){return this.penaltyShotsAgainst&&this.penaltySaves?Math.round(1e3*this.penaltySaves/this.penaltyShotsAgainst)/10:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",goals:"goals",assists:"assists",penalty_goals:"penaltyGoals",penalty_misses:"penaltyMisses",penalty_shots_on_goal:"penaltyShotsOnGoal",saves:"saves",penalty_saves:"penaltySaves",goals_against:"goalsAgainst",penalty_goals_against:"penaltyGoalsAgainst",safety_rate:"safetyRate",fouls:"fouls",yellowCards:"yellowCards",red_cards:"redCards",two_minute_fouls:"twoMinuteFouls",turnovers:"turnovers",steals:"steals",block_shots:"blockShots",game_time:"gameTime",plus_minus:"plusMinus"}})],e)}(k),Ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tournamentTeamPoints",{get:function(){return this.tournamentTeam&&this.tournamentTeam.points},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{league_player:"leaguePlayer",tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",points:"points",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",goals:"goals",assists:"assists",penalty_goals:"penaltyGoals",penalty_misses:"penaltyMisses",penalty_shots_on_goal:"penaltyShotsOnGoal",saves:"saves",penalty_saves:"penaltySaves",goals_against:"goalsAgainst",penalty_goals_against:"penaltyGoalsAgainst",safety_rate:"safetyRate",fouls:"fouls",yellow_cards:"yellowCards",red_cards:"redCards",two_minute_fouls:"twoMinuteFouls",turnovers:"turnovers",steals:"steals",block_shots:"blockShots",game_time:"gameTime",plus_minus:"plusMinus",shots:"shots",goals_percent:"goalsPercent",penalty_shots:"penaltyShots",penalty_goals_percent:"penaltyGoalsPercent",shots_against:"shotsAgainst",saves_percent:"savesPercent",penalty_shots_against:"penaltyShotsAgainst",penalty_saves_percent:"penaltySavesPercent",total_goals:"totalGoals",total_saves:"totalSaves",total_goals_against:"totalGoalsAgainst",newbie:"newbie",rank:"rank"},relation:{leaguePlayer:Yt,tournamentTeamUser:Jt,team:ot,teamUser:$t,user:nt,tournamentTeam:qt,month:F}})],e)}(k),we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Ce,competitorTeam:Ce}})],e)}(k),Le=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Fe.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/logs/").pipe(o.map((function(t){return Ge.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadApplication=function(t,e,o){return h(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_handball_game/"+t+"/game_application_file/",{params:(new n.HttpParams).set("file_type",e).set("application_type",o),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se),Ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:O,author:nt,createdAt:C}})],e)}(k),je=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},g([U],t,"toFront",null),g([j],t,"toBack",null),t=g([w({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",playoff_teams_count:"playoffTeamsCount"}})],t)}(),Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",playoff_teams_count:"playoffTeamsCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",current_playoff_round:"currentPlayoffRound",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:G(je)}})],e)}(k);(Se=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[Se.open=0]="open",Se[Se.in_progress=1]="in_progress",Se[Se.closed=2]="closed";var Be,Oe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:F,status:P(t.TournamentStageStatuses)}})],n)}(k),He=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"tournamentTeamPoints",{get:function(){return this.tournamentTeam&&this.tournamentTeam.points},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalReceives",{get:function(){return this.receives+this.excellentReceives},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",team_user:"teamUser",league_player:"leaguePlayer",tournament_team_user:"tournamentTeamUser",tournament_team:"tournamentTeam",user:"user",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",serve_percent:"servePercent",ace_percent:"acePercent",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",block_percent:"blockPercent",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",attack_percent:"attackPercent",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",receive_percent:"receivePercent",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",serve_receive_percent:"serveReceivePercent",points:"points",faults:"faults",newbie:"newbie",rank:"rank"},relation:{team:ot,teamUser:$t,leaguePlayer:Yt,tournamentTeamUser:Jt,tournamentTeam:qt,user:nt,month:F}})],e)}(k),Ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"gamesWonPercent",{get:function(){return this.gamesCount?Math.floor(1e3*this.wonGamesCount/this.gamesCount)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",tournament_team:"tournamentTeam",group:"group",tournament_stage_id:"tournamentStageId",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",missed_sum:"missedSum",last_games_count:"lastGamesCount",last_games_won:"lastGamesWon",points:"points",final_standing:"finalStanding",received_points:"receivedPoints"},relation:{tournamentTeam:qt,group:It}})],e)}(k);(Be=t.LeagueNewsType||(t.LeagueNewsType={}))[Be.text=1]="text",Be[Be.video=2]="video";var Re,xe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",title:"title",datetime:"datetime",preview_text:"previewText",detail_text:"detailText",picture:"picture",cover:"cover",mobile_picture:"mobilePicture",is_main:"isMain",tournaments:"tournaments",type:"type",video_link:"videoLink",tag:"tag"},relation:{datetime:C,picture:O,cover:O,mobilePicture:O,tournaments:G(yt),type:P(t.LeagueNewsType)}})],n)}(k);(Re=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Re.game_closed=1]="game_closed",Re[Re.media_added=2]="media_added",Re[Re.news=3]="news";var Me,Ve,Ee=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:Ht,news:xe,league:rt,tournaments:G(yt),datetime:F,event:P(t.TournamentEventTypes)}})],n)}(k);!function(t){t[t.admin=1]="admin",t[t.moderator=2]="moderator",t[t.game_manager=3]="game_manager"}(Me||(Me={})),function(t){t[t.settings=1]="settings",t[t.users=2]="users",t[t.teams=3]="teams",t[t.media=4]="media",t[t.news=5]="news",t[t.game_export=6]="game_export",t[t.schedule=7]="schedule",t[t.game_management=8]="game_management"}(Ve||(Ve={}));!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}m(e,t),Object.defineProperty(e.prototype,"role",{get:function(){return this._role},set:function(t){this._role=Me[t]},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",user:"user",role:"role",permissions:"permissions"},relation:{user:nt,permissions:G(P(Ve))}})],e)}(k);var ze=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"userMinutes",{get:function(){if(!this.gameTime)return"00:00";var t=Math.floor(this.gameTime/60),e=Math.floor(this.gameTime-60*t);return""+(t<10?0:"")+t+":"+(e<10?0:"")+e},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{tournament_team_user:"tournamentTeamUser",team:"team",team_user:"teamUser",user:"user",tournament_team:"tournamentTeam",month:"month",win_lose:"winLose",games_count:"gamesCount",won_games_count:"wonGamesCount",lose_games_count:"loseGamesCount",draw_games_count:"drawGamesCount",newbie:"newbie",points:"points",tries:"tries",penalty_tries:"penaltyTries",conversion_kicks:"conversionKicks",conversion_goals:"conversionGoals",conversion_misses:"conversionMisses",conversion_goals_percent:"conversionGoalsPercent",penalties:"penalties",penalty_kicks_on_goal:"penaltyKicksOnGoal",penalty_misses:"penaltyMisses",penalty_goals:"penaltyGoals",tap_penalties:"tapPenalties",penalty_kicks_to_touch:"penaltyKicksToTouch",penalty_goals_percent:"penaltyGoalsPercent",drop_goal_kicks:"dropGoalKicks",drop_goals:"dropGoals",drop_goal_misses:"dropGoalMisses",drop_goals_percent:"dropGoalsPercent",free_kicks:"freeKicks",yellow_cards:"yellowCards",red_cards:"redCards",offloads:"offloads",tackles:"tackles",handling_errors:"handlingErrors",carries_over_gainline:"carriesOverGainline",plus_minus:"plusMinus",game_time:"gameTime",scrums:"scrums",scrums_won:"scrumsWon",scrums_lost:"scrumsLost",scrums_won_percent:"scrumsWonPercent",scrums_won_free:"scrumsWonFree",opponent_scrums_won:"opponentScrumsWon",opponent_scrums_lost:"opponentScrumsLost",lineouts:"lineouts",lineouts_won:"lineoutsWon",lineouts_lost:"lineoutsLost",lineouts_steal:"lineoutsSteal",lineouts_won_percent:"lineoutsWonPercent",opponent_lineouts_lost:"opponentLineoutsLost",quick_throws:"quickThrows",rucks:"rucks",rucks_won:"rucksWon",rucks_lost:"rucksLost",rucks_won_percent:"rucksWonPercent",opponent_rucks_won:"opponentRucksWon",opponent_rucks_lost:"opponentRucksLost",mauls:"mauls",mauls_won:"maulsWon",mauls_lost:"maulsLost",mauls_won_percent:"maulWonPercent",opponent_mauls_won:"opponentMaulsWon",opponent_mauls_lost:"opponentMaulsLost",fouls:"fouls",team_fouls:"teamFouls"},relation:{tournamentTeamUser:Jt,team:ot,teamUser:$t,user:nt,tournamentTeam:qt,month:F}})],e)}(k),Ne=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getByAlias=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/"+e+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return Ue.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return h(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ee.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return jt.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("playoff_number",e)),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/",{params:i}).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return Ie.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return void 0===r&&(r={}),h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=De(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGroups=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/groups/").pipe(o.map((function(t){return It.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeams=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("group_id",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/",{params:i}).pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return Ae.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/games/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatisticLeaders=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=qe(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic_leaders/",{params:e}).pipe(o.map((function(t){var e,n;try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;t[r]=Zt.toFront(t[r])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return t}))).toPromise()]}))}))},i.prototype.getVolleyballStatisticLeaders=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=qe(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic_leaders/",{params:e}).pipe(o.map((function(t){var e,n;try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;t[r]=He.toFront(t[r])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return t}))).toPromise()]}))}))},i.prototype.getHockeyStatisticLeaders=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=qe(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic_leaders/",{params:e}).pipe(o.map((function(t){var e,n;try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;t[r]=de.toFront(t[r])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return t}))).toPromise()]}))}))},i.prototype.getFootballStatisticLeaders=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=qe(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/football_statistic_leaders/",{params:e}).pipe(o.map((function(t){var e,n;try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;t[r]=Te.toFront(t[r])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return t}))).toPromise()]}))}))},i.prototype.getHandballStatisticLeaders=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=qe(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/handball_statistic_leaders/",{params:e}).pipe(o.map((function(t){var e,n;try{for(var o=y(Object.keys(t)),i=o.next();!i.done;i=o.next()){var r=i.value;t[r]=Ce.toFront(t[r])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return t}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Zt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:He.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getHockeyStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:de.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getFootballStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/football_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Te.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getHandballStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/handball_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ce.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getRugbyStatistic=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=new n.HttpParams,e=We(t,e),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/rugby_statistic/",{params:e,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:ze.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentTeamUsers=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/users/").pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()]}))}))},i.prototype.myPermission=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/permission/").pipe(o.map((function(t){return(t.permissions||[]).map((function(t){return Ve[t]}))}))).toPromise()]}))}))},i.prototype.getTournamentTeamTournaments=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/tournaments/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentUserTournaments=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/tournaments/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}();function De(e,n){if(e.tournamentIds&&(n=n.set("tournament_ids",e.tournamentIds.join(","))),e.tournamentStageId&&(n=n.set("tournament_stage_id",e.tournamentStageId.toString())),e.tournamentTour&&(n=n.set("tournament_tour",e.tournamentTour.toString())),e.playoffStage&&(n=n.set("playoff_stage",e.playoffStage.toString())),e.playoffRound&&(n=n.set("playoff_round",e.playoffRound.toString())),e.teamId&&(n=n.set("team_id",e.teamId.toString())),e.status&&(n=n.set("status",t.GameStatuses[e.status])),e.statuses){var o=e.statuses.map((function(e){return t.GameStatuses[e]}));n=n.set("statuses",o.join(","))}return e.tournamentCourtId&&(n=n.set("tournament_court_id",e.tournamentCourtId.toString())),e.leaguePlayerId&&(n=n.set("league_player_id",e.leaguePlayerId.toString())),e.userId&&(n=n.set("user_id",e.userId.toString())),e.query&&(n=n.set("query",e.query)),void 0!==e.isPlayoff&&null!==e.isPlayoff&&(n=n.set("is_playoff",e.isPlayoff?"1":"0")),n}function We(t,e){var n,o;try{for(var i=y(Object.keys(t)),r=i.next();!r.done;r=i.next()){var a=r.value;t[a]&&(e=e.set(a,t[a]))}}catch(t){n={error:t}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(","))),void 0!==t.is_playoff&&null!==t.is_playoff&&(e=e.set("is_playoff",t.is_playoff?"1":"0")),e}function qe(t,e){var n,o;try{for(var i=y(Object.keys(t)),r=i.next();!r.done;r=i.next()){var a=r.value;t[a]&&(e=e.set(a,t[a]))}}catch(t){n={error:t}}finally{try{r&&!r.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0")),t.tournament_ids&&(e=e.set("tournament_ids",t.tournament_ids.join(","))),t.fields&&(e=e.set("fields",t.fields.join(","))),e}var Xe,$e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort"},relation:{picture:O}})],e)}(k);(Xe=t.BannerLocation||(t.BannerLocation={})).slider="slider",Xe.central="central",Xe.media="media";var Ke,Ye=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort",location:"location"},relation:{picture:O,location:P(t.BannerLocation)}})],n)}(k),Je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",file:"file"},relation:{file:O}})],e)}(k),Ze=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return rt.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return rt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(e,i){return h(this,void 0,void 0,(function(){var r;return _(this,(function(a){return r=new n.HttpParams,i&&i.statuses&&(r=r.set("statuses",i.statuses.map((function(e){return t.TournamentStatuses[e]})).join(","))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/tournaments/",{params:r}).pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return h(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ee.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentSeasons=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=De(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getSeasons=function(t,e,i,r,a){return void 0===e&&(e=1),void 0===i&&(i=20),h(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()).set("not_closed",r?"1":"").set("include",a?a.join(","):""),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:gt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getPartners=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/partners/").pipe(o.map((function(t){return $e.toFront(t)}))).toPromise()]}))}))},i.prototype.getBanners=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=e?(new n.HttpParams).set("location",e):new n.HttpParams,[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/banners/",{params:i}).pipe(o.map((function(t){return Ye.toFront(t)}))).toPromise()]}))}))},i.prototype.getCourts=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/courts/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGraphicSettings=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/graphic_settings/").toPromise()]}))}))},i.prototype.getDocuments=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/documents/").pipe(o.map((function(t){return Je.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(),Qe=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getLeagueNewsList=function(e,i,r,a){return void 0===a&&(a=t.LeagueNewsType.text),h(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()).set("type",t.LeagueNewsType[a]),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/news/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:xe.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getMainLeagueNews=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return t&&t.length>0?xe.toFront(t[0]):null}))).toPromise()]}))}))},i.prototype.getMainLeagueNewsList=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/news/?is_main=true").pipe(o.map((function(t){return xe.toFront(t)}))).toPromise()]}))}))},i.prototype.getNewsById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t+"/").pipe(o.map((function(t){return xe.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentNewsList=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/",{observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:xe.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(),tn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_player/"+t+"/").pipe(o.map((function(t){return Yt.toFront(t)}))).toPromise()},t.prototype.getTournamentUsers=function(t,e){var i=new n.HttpParams;return e&&(i=i.set("season_id",e.toString())),this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_player/"+t+"/tournament_users/",{params:i}).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),en=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getMedia=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},t.prototype.getTournamentGameMedia=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),a=nn(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/game_media/",{observe:"response",params:a}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},t.prototype.getLeagueGameMedia=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),a=nn(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/game_media/",{observe:"response",params:a}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},t.prototype.getLeagueMedia=function(t,e,i,r){return void 0===r&&(r={}),h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),r.mediaType&&(a=a.set("media_type",r.mediaType)),r.sort&&(a=a.set("sort",r.sort)),r.teamId&&(a=a.set("team_id",r.teamId.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/media/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Pt.toFront(t.body)}}))).toPromise()]}))}))},t.prototype.getGameMediaById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameMedia=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/?size=1000").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},t.prototype.createZip=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},t.prototype.downloadMedia=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/download/",{responseType:"blob"}).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}();function nn(e,n){return e&&(n=De(e,n),e.tournamentTour&&(n=n.set("tournament_tour",e.tournamentTour.toString())),e.teamId&&(n=n.set("team_id",e.teamId.toString())),e.tournamentStageId&&(n=n.set("tournament_stage_id",e.tournamentStageId.toString())),e.playoffId&&(n=n.set("playoff_id",e.playoffId.toString())),e.playoffStage&&(n=n.set("playoff_stage",e.playoffStage.toString())),e.playoffRound&&(n=n.set("playoff_round",e.playoffRound.toString())),e.status&&(n=n.set("status",t.GameStatuses[e.status])),e.mediaCount&&(n=n.set("media_count",e.mediaCount.toString()))),n}(Ke=t.PollStatuses||(t.PollStatuses={}))[Ke.open=1]="open",Ke[Ke.closed=2]="closed",Ke[Ke.archived=3]="archived";var on,rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{uuid:"uuid",name:"name"}})],e)}(k),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:nt}})],e)}(k),sn=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.variantsWithAnswers=[],t}return m(n,e),Object.defineProperty(n.prototype,"variants",{get:function(){return this._variants},set:function(t){this._variants=t||[],this._answers&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"answers",{get:function(){return this._answers},set:function(t){this._answers=t||[],this._variants&&this.calculateAnswersPercentage()},enumerable:!0,configurable:!0}),n.prototype.calculateAnswersPercentage=function(){var t=this;if(this._answers.length){var e=this._variants.map((function(t){return t.uuid})),n=this._answers.reduce((function(t,n){return e.indexOf(n.answerUuid)<0||(t[n.answerUuid]||(t[n.answerUuid]=0),t[n.answerUuid]++),t}),{});this.variantsWithAnswers=this._variants.map((function(e){return{variant:e,percent:n[e.uuid]?Math.round(100*n[e.uuid]/t._answers.length):0}})).sort((function(t,e){return t.percent>e.percent?-1:1}))}},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",active:"active",status:"status",team_id:"teamId",name:"name",description:"description",variants:"variants",author:"author",answers:"answers",multiple_answer:"multipleAnswer",anonymous:"anonymous",created_at:"createdAt"},relation:{status:P(t.PollStatuses),variants:rn,author:nt,answers:an,createdAt:C}})],n)}(k),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",user_id:"userId",user:"user",team:"team",team_id:"teamId",user_accept:"userAccept",team_accept:"teamAccept",users_count:"usersCount",games_count:"gamesCount",won_games_count:"wonGamesCount",score_sum:"scoreSum",created_at:"createdAt",updated_at:"updatedAt"},relation:{user:nt,team:ot,createdAt:C,updateAt:C}})],e)}(k);(on=t.GameInviteStatus||(t.GameInviteStatus={}))[on.accepted=1]="accepted",on[on.declined=2]="declined";var ln,pn,cn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:Ht,teamUser:$t,status:P(t.GameInviteStatus)}})],n)}(k);(ln=t.TeamEventTypes||(t.TeamEventTypes={}))[ln.training=1]="training",ln[ln.other=2]="other";var mn,fn=((pn={})[t.TeamEventTypes.training]="Тренировка",pn[t.TeamEventTypes.other]="Другое",pn),gn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this.eventType===t.TeamEventTypes.other?this.eventCustomName:fn[this.eventType]},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isClosed",{get:function(){return this.datetime.getTime()<(new Date).getTime()},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:P(t.TeamEventTypes),team:ot,datetime:C}})],n)}(k);(mn=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[mn.accepted=1]="accepted",mn[mn.declined=2]="declined";var dn,hn,_n=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:P(t.TeamEventInviteStatuses)}})],e)}(),yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:$t}})],e)}(k),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return(null===this.teamAccept||null===this.organizationAccept)&&!1!==this.teamAccept&&!1!==this.organizationAccept},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",team:"team",tournament:"tournament",team_accept:"teamAccept",organization_accept:"organizationAccept",user_invites_count:"userInvitesCount",user_invites:"userInvites",notifications_count:"notificationsCount"},relation:{team:ot,tournament:yt,userInvites:yn}})],e)}(k);(dn=t.NotificationType||(t.NotificationType={}))[dn.team_updated=1]="team_updated",dn[dn.team_invited=2]="team_invited",dn[dn.team_join_request=3]="team_join_request",dn[dn.team_join_declined_by_team=4]="team_join_declined_by_team",dn[dn.team_join_declined_by_user=5]="team_join_declined_by_user",dn[dn.team_join_canceled_by_team=6]="team_join_canceled_by_team",dn[dn.team_join_canceled_by_user=7]="team_join_canceled_by_user",dn[dn.team_joined_for_user=8]="team_joined_for_user",dn[dn.team_joined_for_team=9]="team_joined_for_team",dn[dn.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",dn[dn.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",dn[dn.team_user_number_changed=12]="team_user_number_changed",dn[dn.team_user_deleted_for_user=13]="team_user_deleted_for_user",dn[dn.team_user_deleted_for_team=14]="team_user_deleted_for_team",dn[dn.team_user_left=15]="team_user_left",dn[dn.game_updated=16]="game_updated",dn[dn.game_invited=17]="game_invited",dn[dn.game_invite_accepted=18]="game_invite_accepted",dn[dn.game_invite_declined=19]="game_invite_declined",dn[dn.game_remind=20]="game_remind",dn[dn.game_won=21]="game_won",dn[dn.game_losing=22]="game_losing",dn[dn.game_tech_defeat=23]="game_tech_defeat",dn[dn.game_tech_victory=24]="game_tech_victory",dn[dn.poll_created=25]="poll_created",dn[dn.poll_closed=26]="poll_closed",dn[dn.team_event_invited=27]="team_event_invited",dn[dn.team_event_accepted=28]="team_event_accepted",dn[dn.team_event_declined=29]="team_event_declined",dn[dn.team_event_remind=30]="team_event_remind",dn[dn.tournament_invited=31]="tournament_invited",dn[dn.tournament_joined=32]="tournament_joined",dn[dn.tournament_join_declined=33]="tournament_join_declined",dn[dn.tournament_join_canceled=34]="tournament_join_canceled",dn[dn.tournament_user_invited=35]="tournament_user_invited",dn[dn.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",dn[dn.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",dn[dn.tournament_user_added=38]="tournament_user_added",dn[dn.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",dn[dn.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",dn[dn.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",dn[dn.tournament_user_deleted=42]="tournament_user_deleted",dn[dn.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",dn[dn.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",dn[dn.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",dn[dn.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",dn[dn.tournament_team_deleted=47]="tournament_team_deleted",dn[dn.org_tournament_invite_created=48]="org_tournament_invite_created",dn[dn.org_tournament_invite_declined=49]="org_tournament_invite_declined",dn[dn.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",dn[dn.org_tournament_invite_changed=51]="org_tournament_invite_changed",dn[dn.org_tournament_user_deleted=52]="org_tournament_user_deleted",dn[dn.org_tournament_user_invited=53]="org_tournament_user_invited",dn[dn.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",dn[dn.org_tournament_team_leave=55]="org_tournament_team_leave",(hn=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[hn.public=1]="public",hn[hn.org=2]="org";var bn,Tn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),Object.defineProperty(n.prototype,"important",{get:function(){return!0},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",event_type:"event",data:"data",initiator:"initiator",team:"team",team_invite:"teamInvite",team_user:"teamUser",poll:"poll",game:"game",game_invite:"gameInvite",team_event:"teamEvent",team_event_invite:"teamEventInvite",tournament:"tournament",tournament_invite:"tournamentInvite",tournament_team:"tournamentTeam",viewed:"viewed",protected:"protected",service:"service",created_at:"createdAt"},relation:{event:P(t.NotificationType),initiator:nt,team:ot,teamInvite:un,teamUser:$t,poll:sn,game:Ht,gameInvite:cn,teamEvent:gn,teamEventInvite:_n,tournament:yt,tournamentInvite:vn,tournamentTeam:qt,service:P(t.NotificationServiceEnum),createdAt:C}})],n)}(k);(bn=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[bn.all=1]="all",bn[bn.important=2]="important",bn[bn.none=3]="none";var kn,Pn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:P(t.NotificationAllowTypes),browser:P(t.NotificationAllowTypes)}})],n)}(k),Sn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/count/").pipe(o.map((function(t){return+t}))).toPromise()]}))}))},t.prototype.getList=function(t,e,i){return void 0===i&&(i={}),h(this,void 0,void 0,(function(){var r,a,s,u,l,p;return _(this,(function(c){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=y(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){l={error:t}}finally{try{s&&!s.done&&(p=a.return)&&p.call(a)}finally{if(l)throw l.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Tn.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/"+t+"/viewed/",{viewed:e}).pipe(o.map((function(t){return Tn.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Tn.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return Pn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",Pn.toBack(t)).pipe(o.map((function(t){return Pn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Gn=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:o,providedIn:"root"}),o=g([e.Injectable({providedIn:"root"})],o)}(Sn),Fn=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.apiUrl="/org/api/v1",e}return m(o,t),o.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new o(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:o,providedIn:"root"}),o=g([e.Injectable({providedIn:"root"})],o)}(Sn),Cn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return M.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return R.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:ze,competitorTeam:ze}})],e)}(k),Ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",updated_at:"updatedAt",points:"points",tries:"tries",penalty_tries:"penaltyTries",conversion_goals:"conversionGoals",conversion_misses:"conversionMisses",conversion_kicks:"conversionKicks",conversion_goals_percent:"conversionGoalsPercent",penalty_misses:"penaltyMisses",penalty_goals:"penaltyGoals",penalty_kicks_on_goal:"penaltyKicksOnGoal",penalty_goals_percent:"penaltyGoalsPercent",drop_goals:"dropGoals",drop_goal_misses:"dropGoalMisses",drop_goal_kicks:"dropGoalKicks",drop_goals_percent:"dropGoalsPercent",free_kicks:"freeKicks",yellow_cards:"yellowCards",red_cards:"redCards",offloads:"offloads",tackles:"tackles",handling_errors:"handlingErrors",carries_over_gainline:"carriesOverGainline",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:C}})],e)}(k);(kn=t.RugbyFoulSanctions||(t.RugbyFoulSanctions={}))[kn.scrum=1]="scrum",kn[kn.lineout=2]="lineout",kn[kn.free_kick=3]="free_kick",kn[kn.penalty_shot=4]="penalty_shot",kn[kn.yellow_card=5]="yellow_card",kn[kn.red_card=6]="red_card";var Un,jn,In=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",name:"name",sanction:"sanction"},relation:{sanction:G(P(t.RugbyFoulSanctions))}})],n)}(k);(jn=t.RugbyGameLogTypes||(t.RugbyGameLogTypes={}))[jn.enter_game=1]="enter_game",jn[jn.exit_game=2]="exit_game",jn[jn.try=3]="try",jn[jn.penalty_try=4]="penalty_try",jn[jn.conversion_goal=5]="conversion_goal",jn[jn.conversion_miss=6]="conversion_miss",jn[jn.penalty_miss=7]="penalty_miss",jn[jn.penalty_goal=8]="penalty_goal",jn[jn.drop_goal=9]="drop_goal",jn[jn.drop_goal_miss=10]="drop_goal_miss",jn[jn.free_kick=11]="free_kick",jn[jn.foul=12]="foul",jn[jn.yellow_card=13]="yellow_card",jn[jn.red_card=14]="red_card",jn[jn.offload=15]="offload",jn[jn.tackle=16]="tackle",jn[jn.handling_error=17]="handling_error",jn[jn.carries_over_gainline=18]="carries_over_gainline",jn[jn.bleeding_injury=19]="bleeding_injury",jn[jn.head_injury=20]="head_injury",jn[jn.end_game_penalty_miss=21]="end_game_penalty_miss",jn[jn.end_game_penalty_goal=22]="end_game_penalty_goal",jn[jn.timeout=23]="timeout",jn[jn.tap_penalty=24]="tap_penalty",jn[jn.penalty_kick_to_touch=25]="penalty_kick_to_touch",jn[jn.scrum_won=26]="scrum_won",jn[jn.scrum_lost=27]="scrum_lost",jn[jn.scrum_won_free=28]="scrum_won_free",jn[jn.lineout_won=29]="lineout_won",jn[jn.lineout_lost=30]="lineout_lost",jn[jn.quick_throw=31]="quick_throw",jn[jn.ruck_won=32]="ruck_won",jn[jn.ruck_lost=33]="ruck_lost",jn[jn.maul_won=34]="maul_won",jn[jn.maul_lost=35]="maul_lost",jn[jn.team_foul=36]="team_foul";var Bn,On=((Un={})[t.RugbyGameLogTypes.penalty_try]=7,Un[t.RugbyGameLogTypes.try]=5,Un[t.RugbyGameLogTypes.conversion_goal]=2,Un[t.RugbyGameLogTypes.penalty_goal]=3,Un[t.RugbyGameLogTypes.drop_goal]=3,Un[t.RugbyGameLogTypes.end_game_penalty_goal]=1,Un),Hn=[t.RugbyGameLogTypes.timeout,t.RugbyGameLogTypes.scrum_won,t.RugbyGameLogTypes.scrum_lost,t.RugbyGameLogTypes.scrum_won_free,t.RugbyGameLogTypes.lineout_won,t.RugbyGameLogTypes.lineout_lost,t.RugbyGameLogTypes.quick_throw,t.RugbyGameLogTypes.ruck_won,t.RugbyGameLogTypes.ruck_lost,t.RugbyGameLogTypes.maul_won,t.RugbyGameLogTypes.maul_lost,t.RugbyGameLogTypes.team_foul,t.RugbyGameLogTypes.penalty_kick_to_touch,t.RugbyGameLogTypes.tap_penalty],An=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.time===t.time&&this.period===t.period?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.period===t.period?this.time<t.time?1:-1:this.period<t.period?1:-1},Object.defineProperty(n.prototype,"timeFormatted",{get:function(){var t=Math.floor(this.time/60),e=this.time-60*t;return(t<10?"0":"")+t+":"+(e<10?"0":"")+e},enumerable:!0,configurable:!0}),n.prototype.isScoreType=function(){return void 0!==On[this.logType]},n.prototype.scorePoints=function(){return On[this.logType]},n.prototype.isAfter=function(t){return this.time===t.time&&this.period===t.period?this.id>t.id:this.period===t.period?this.time>t.time:this.period>t.period},n.prototype.isFoulType=function(){return[t.RugbyGameLogTypes.team_foul,t.RugbyGameLogTypes.foul].indexOf(this.logType)>-1},n.prototype.isTeamType=function(){return Hn.includes(this.logType)},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",group:"group",game_id:"gameId",game_user_id:"gameUserId",team_id:"teamId",log_type:"logType",datetime:"datetime",time:"time",period:"period",active:"active",is_highlight:"isHighlight",foul_type:"foulType",foul_sanction:"foulSanction"},relation:{datetime:C,logType:P(t.RugbyGameLogTypes),foulType:In,foulSanction:P(t.RugbyFoulSanctions)}})],n)}(k),Rn=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/"+t+"/team_statistic/").pipe(o.map((function(t){return wn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/"+t+"/user_statistic/").pipe(o.map((function(t){return Ln.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/"+t+"/logs/").pipe(o.map((function(t){return An.toFront(t)}))).toPromise()]}))}))},i.prototype.getFoulTypes=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/foul_types/").pipe(o.map((function(t){return In.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocol=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_rugby_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type","pdf"),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(k);(Bn=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[Bn.for_all=1]="for_all",Bn[Bn.for_users=2]="for_users",Bn[Bn.for_team=3]="for_team";var Mn,Vn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:P(t.TeamPermissionTypes),games:P(t.TeamPermissionTypes),statistic:P(t.TeamPermissionTypes),polls:P(t.TeamPermissionTypes),events:P(t.TeamPermissionTypes)}})],n)}(k),En=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{can_edit:"canEdit",can_view_users:"canViewUsers",can_manage_permission:"canManagePermission",can_change_owner:"canChangeOwner",can_delete:"canDelete",can_manage_invites:"canManageInvites",can_view_invites:"canViewInvites",can_manage_polls:"canManagePolls",can_view_polls:"canViewPolls",can_answer_poll:"canAnswerPoll",can_manage_games:"canManageGames",can_view_games:"canViewGames",can_view_statistic:"canViewStatistic",can_promote_users:"canPromoteUsers",can_edit_users:"canEditUsers",can_delete_users:"canDeleteUsers",can_view_events:"canViewEvents",can_manage_events:"canManageEvents",can_view_tournaments:"canViewTournaments",can_manage_tournaments:"canManageTournaments",role:"role"},relation:{role:P(t.TeamUserRole)}})],n)}(k),zn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.search=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=(new n.HttpParams).set("search",t),e&&(i=i.set("sport",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/",{params:i}).pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},i.prototype.create=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",ot.toBack(t)).pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamAccess=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(o.map((function(t){return En.toFront(t)}))).toPromise()]}))}))},i.prototype.update=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",ot.toBack(e)).pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},i.prototype.delete=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},i.prototype.getPermission=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(o.map((function(t){return Vn.toFront(t)}))).toPromise()]}))}))},i.prototype.updatePermission=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",Vn.toBack(e)).pipe(o.map((function(t){return Vn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsers=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("tournament_id",e.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/",{params:i}).pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserRole=function(e,n,i){return h(this,void 0,void 0,(function(){return _(this,(function(r){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+e+"/users/"+n+"/role/",{role:t.TeamUserRole[i]}).pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserNumber=function(t,e,n){return h(this,void 0,void 0,(function(){return _(this,(function(i){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/"+e+"/number/",{number:n.toString()}).pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteUser=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.teamId+"/users/"+t.id+"/").toPromise()]}))}))},i.prototype.changeOwner=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/owner/",{id:e.id}).pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvites=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInvite=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/",{user:e}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.acceptInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.declineInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.resendInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_invite/"+t.id+"/resend/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvitesExternal=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(o.map((function(t){return xn.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInviteExternal=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",xn.toBack(e)).pipe(o.map((function(t){return xn.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteInviteExternal=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/").toPromise()]}))}))},i.prototype.resendInviteExternal=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/invites_external/"+t.id+"/resend/",{}).pipe(o.map((function(t){return xn.toFront(t)}))).toPromise()]}))}))},i.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/"+(e?"?archive=1":"")).pipe(o.map((function(t){return sn.toFront(t)}))).toPromise()]}))}))},i.prototype.createPoll=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",sn.toBack(e)).pipe(o.map((function(t){return sn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsersStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(o.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return He.toFront(t)}))).toPromise()]}))}))},i.prototype.joinTeam=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},i.prototype.leaveTeam=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/leave/",{}).toPromise()]}))}))},i.prototype.getGames=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/"+(e?"?archive=1":"")).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.createGame=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",Ht.toBack(e)).pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamEvents=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(o.map((function(t){return gn.toFront(t)}))).toPromise()]}))}))},i.prototype.createTeamEvent=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",gn.toBack(e)).pipe(o.map((function(t){return gn.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeams=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentInvites=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(o.map((function(t){return vn.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGames=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",i.toString()),r&&(a=a.set("size",r.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/"+e+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.acceptTournamentInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(o.map((function(t){return vn.toFront(t)}))).toPromise()]}))}))},i.prototype.declineTournamentInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(o.map((function(t){return vn.toFront(t)}))).toPromise()]}))}))},i.prototype.registerLazyUser=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:nt.toBack(e)}).pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.getLazyUser=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.updateLazyUser=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:nt.toBack(e)}).pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteLazyUser=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},i.prototype.resendLazyUserEmail=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/resend_email/",{}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(),Nn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamEvent=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(o.map((function(t){return gn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",gn.toBack(t)).pipe(o.map((function(t){return gn.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").toPromise()]}))}))},t.prototype.getTeamEventInvites=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/",{team_user_id:e}).pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/accept/",{}).pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team_event_invite/"+t.id+"/decline/",{}).pipe(o.map((function(t){return _n.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"usersCount",{get:function(){return this.validUsersCount+this.invalidUsersCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.hasAccess&&!this.inviteSent&&!this.alreadyInTournament},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(k),Wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",join_data:"joinData"},relation:{team:ot,joinData:Dn}})],e)}(k),qn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams_for_join/").pipe(o.map((function(t){return Wn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return $t.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={team:{id:e},user_invites:yn.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return vn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Xn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/"+e+"/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/tournaments/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()),i&&(a=a.set("size",i.toString())),a=De(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games/",{params:a,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return h(this,void 0,void 0,(function(){var s;return _(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.event&&(s=s.set("event",t.TournamentEventTypes[a.event])),a.search&&(s=s.set("search",a.search)),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString()))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/events/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ee.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t,e,i,r){return h(this,void 0,void 0,(function(){var a;return _(this,(function(s){return a=(new n.HttpParams).set("page",e.toString()).set("size",i.toString()),a=nn(r,a),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/game_media/",{observe:"response",params:a}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:Ht.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t,e){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i=new n.HttpParams,e&&(i=i.set("short","1")),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/teams/",{params:i}).pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/playoffs/").pipe(o.map((function(t){return jt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/games_stages/").pipe(o.map((function(t){return Ie.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(),$n=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return It.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return jt.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return Ae.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(k);(Mn=t.UserPermissionTypes||(t.UserPermissionTypes={}))[Mn.denied=1]="denied",Mn[Mn.for_all=2]="for_all",Mn[Mn.for_users=3]="for_users",Mn[Mn.for_team=4]="for_team";var Yn,Jn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:P(t.UserPermissionTypes),games:P(t.UserPermissionTypes),teams:P(t.UserPermissionTypes),statistic:P(t.UserPermissionTypes)}})],n)}(k),Zn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCurrentUser=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(o.map((function(t){return Kn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",nt.toBack(e)).pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return h(this,void 0,void 0,(function(){var n;return _(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/photo/",n).pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.changePassword=function(t,e,n,o){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={old_password:e,password:n,password_confirm:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_password/",i).toPromise()]}))}))},t.prototype.changeEmail=function(t,e,n){return h(this,void 0,void 0,(function(){var o;return _(this,(function(i){return o={email:e,password:n},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email/",o).toPromise()]}))}))},t.prototype.changeEmailConfirm=function(t,e,n,o){return h(this,void 0,void 0,(function(){var i;return _(this,(function(r){return i={email:e,password:n,token:o},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/change_email_confirm/",i).toPromise()]}))}))},t.prototype.getUserProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/basketball_profile/").pipe(o.map((function(t){return z.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",x.toBack(t)).pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/basketball_profile/",z.toBack(t)).pipe(o.map((function(t){return z.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserVolleyballProfile=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",W.toBack(t)).pipe(o.map((function(t){return W.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(o.map((function(t){return Jn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",Jn.toBack(t)).pipe(o.map((function(t){return Jn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/accept/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/invites/"+t+"/decline/",{}).pipe(o.map((function(t){return un.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(o.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(o.map((function(t){return Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return He.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(o.map((function(t){return cn.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/accept/",{}).pipe(o.map((function(t){return cn.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/"+t+"/decline/",{}).pipe(o.map((function(t){return cn.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return h(this,void 0,void 0,(function(){var e;return _(this,(function(i){return e=(new n.HttpParams).set("search",t),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/",{params:e}).pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.put(this.configService.get("apiUrl")+"/api/v1/user/current/wizards/",{wizard:t}).pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(o.map((function(t){return gn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Qn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:He,competitorTeam:He}})],e)}(k),to=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this.gameUserId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attacks",{get:function(){return this.attackSpikes+this.attackShots},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blocks",{get:function(){return this.stuffBlocks+this.blockRebounds},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"totalReceives",{get:function(){return this.receives+this.excellentReceives},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{game_user_id:"gameUserId",serve_hits:"serveHits",serve_faults:"serveFaults",serve_aces:"serveAces",stuff_blocks:"stuffBlocks",block_faults:"blockFaults",block_rebounds:"blockRebounds",attack_spikes:"attackSpikes",attack_faults:"attackFaults",attack_shots:"attackShots",receives:"receives",receive_faults:"receiveFaults",excellent_receives:"excellentReceives",serve_receives:"serveReceives",serve_receive_faults:"serveReceiveFaults",excellent_serve_receives:"excellentServeReceives",points:"points",faults:"faults",yellow_cards:"yellowCards"}})],e)}(k);(Yn=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[Yn.enter_game=1]="enter_game",Yn[Yn.exit_game=2]="exit_game",Yn[Yn.remove_game=3]="remove_game",Yn[Yn.serve_hit=4]="serve_hit",Yn[Yn.serve_fault=5]="serve_fault",Yn[Yn.serve_ace=6]="serve_ace",Yn[Yn.stuff_block=7]="stuff_block",Yn[Yn.block_fault=8]="block_fault",Yn[Yn.block_rebound=9]="block_rebound",Yn[Yn.attack_spike=10]="attack_spike",Yn[Yn.attack_fault=11]="attack_fault",Yn[Yn.attack_shot=12]="attack_shot",Yn[Yn.receive=13]="receive",Yn[Yn.receive_fault=14]="receive_fault",Yn[Yn.excellent_receive=15]="excellent_receive",Yn[Yn.point=16]="point",Yn[Yn.fault=17]="fault",Yn[Yn.serve_receive=18]="serve_receive",Yn[Yn.serve_receive_fault=19]="serve_receive_fault",Yn[Yn.excellent_serve_receive=20]="excellent_serve_receive",Yn[Yn.timeout=21]="timeout",Yn[Yn.yellow_card=22]="yellow_card";var eo,no,oo,io,ro,ao,so,uo,lo,po,co,mo,fo,go,ho,_o,yo,vo,bo,To,ko,Po=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],So=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],Go=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.active=!0,t}return m(n,e),n.prototype.compare=function(t){return this.rally===t.rally&&this.set===t.set?this.datetime&&t.datetime?this.datetime.getTime()<t.datetime.getTime()?1:-1:this.id<t.id?1:-1:this.set===t.set?this.rally<t.rally?1:-1:this.set<t.set?1:-1},n.prototype.isScoreType=function(){return Po.includes(this.logType)},n.prototype.isFaultType=function(){return So.includes(this.logType)},n.prototype.isServe=function(){return[t.VolleyballGameLogType.serve_hit,t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.serve_fault].includes(this.logType)},n.prototype.isAttack=function(){return[t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.attack_shot].includes(this.logType)},n.prototype.isReceive=function(){return[t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.receive,t.VolleyballGameLogType.excellent_receive].includes(this.logType)},n.prototype.isServeReceive=function(){return[t.VolleyballGameLogType.serve_receive_fault,t.VolleyballGameLogType.serve_receive,t.VolleyballGameLogType.excellent_serve_receive].includes(this.logType)},n.prototype.isBlock=function(){return[t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.block_rebound,t.VolleyballGameLogType.stuff_block].includes(this.logType)},n.prototype.isEnterExit=function(){return[t.VolleyballGameLogType.enter_game,t.VolleyballGameLogType.exit_game,t.VolleyballGameLogType.timeout].includes(this.logType)},n.prototype.isComboType=function(){return![t.VolleyballGameLogType.receive,t.VolleyballGameLogType.serve_receive].includes(this.logType)},n.toFront=function(t){},n.toBack=function(t){},g([U],n,"toFront",null),g([j],n,"toBack",null),n=g([w({mappingFields:{id:"id",unique_id:"uniqueId",game_id:"gameId",game_user_id:"gameUserId",log_type:"logType",set:"set",rally:"rally",position:"position",team_id:"teamId",datetime:"datetime",is_highlight:"isHighlight",group:"group"},relation:{logType:P(t.VolleyballGameLogType),datetime:C}})],n)}(k),Fo=function(t){function i(e,n){var o=t.call(this,e,n)||this;return o.httpClient=e,o.configService=n,o}return m(i,t),i.prototype.getById=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return Ht.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/team_statistic/").pipe(o.map((function(t){return Qn.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserStatistic=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/user_statistic/").pipe(o.map((function(t){return to.toFront(t)}))).toPromise()]}))}))},i.prototype.getLogs=function(t){return h(this,void 0,void 0,(function(){return _(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/logs/").pipe(o.map((function(t){return Go.toFront(t)}))).toPromise()]}))}))},i.prototype.downloadProtocolLight=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/game_protocol_light/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadProtocol=function(t,e){return h(this,void 0,void 0,(function(){return _(this,(function(o){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/game_protocol/",{params:(new n.HttpParams).set("file_type",e),responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:i,providedIn:"root"}),i=g([e.Injectable({providedIn:"root"})],i)}(se),Co=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/").pipe(o.map((function(t){return ot.toFront(t)}))).toPromise()},t.prototype.getTournamentTeams=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_team/"+t+"/tournament_teams/",{params:i}).pipe(o.map((function(t){return qt.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),wo=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/").pipe(o.map((function(t){return nt.toFront(t)}))).toPromise()},t.prototype.getTournaments=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournaments/",{params:i}).pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()},t.prototype.getTournamentUser=function(t,e){var i=(new n.HttpParams).set("season_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/tournament_user/",{params:i}).pipe(o.map((function(t){return Jt.toFront(t)}))).toPromise()},t.prototype.getLeaguePlayer=function(t,e){var i=(new n.HttpParams).set("league_id",e.toString());return this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/public_user/"+t+"/league_player/",{params:i}).pipe(o.map((function(t){return Yt.toFront(t)}))).toPromise()},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Lo=((eo={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",eo[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",eo[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",eo[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",eo[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",eo[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",eo[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",eo[t.BasketballGameLogTypes.two_point_made]="2 очка",eo[t.BasketballGameLogTypes.three_point_made]="3 очка",eo[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",eo[t.BasketballGameLogTypes.one_point_made]="1 очко",eo[t.BasketballGameLogTypes.assist]="Передача",eo[t.BasketballGameLogTypes.block]="Блокшот",eo[t.BasketballGameLogTypes.rebound]="Подбор",eo[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",eo[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",eo[t.BasketballGameLogTypes.steal]="Перехват",eo[t.BasketballGameLogTypes.turnover]="Потеря",eo[t.BasketballGameLogTypes.personal_foul]="Фол",eo[t.BasketballGameLogTypes.technical_foul]="Технический фол",eo[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",eo[t.BasketballGameLogTypes.timeout]="Таймаут",eo[t.BasketballGameLogTypes.team_rebound]="Командный подбор",eo),Uo=((no={})[t.HockeyGameLogTypes.enter_game]="Выход на площадку",no[t.HockeyGameLogTypes.exit_game]="Ушел с площадки",no[t.HockeyGameLogTypes.shot_miss]="Бросок мимо",no[t.HockeyGameLogTypes.shot_on_goal]="Бросок по воротам",no[t.HockeyGameLogTypes.shot_blocked]="Заблокированный бросок",no[t.HockeyGameLogTypes.goal]="Гол",no[t.HockeyGameLogTypes.shootout_attempt]="Буллит промах",no[t.HockeyGameLogTypes.shootout_goal]="Буллит гол",no[t.HockeyGameLogTypes.after_game_shootout_attempt]="Буллит промах",no[t.HockeyGameLogTypes.after_game_shootout_goal]="Буллит гол",no[t.HockeyGameLogTypes.assist]="Передача",no[t.HockeyGameLogTypes.block_shot]="Блокировка броска",no[t.HockeyGameLogTypes.minor_penalty]="Малый штраф",no[t.HockeyGameLogTypes.major_penalty]="Большой штраф",no[t.HockeyGameLogTypes.misconduct_penalty]="Дисциплинарный штраф",no[t.HockeyGameLogTypes.game_misconduct_penalty]="Дисциплинарный штраф до конца игры",no[t.HockeyGameLogTypes.match_penalty]="Матч-штраф",no[t.HockeyGameLogTypes.penalty_shot]="Штрафной бросок",no[t.HockeyGameLogTypes.face_off_lose]="Проигрыш в вбрасывании",no[t.HockeyGameLogTypes.face_off_win]="Победа в вбрасывании",no[t.HockeyGameLogTypes.save]="Отражен бросок",no[t.HockeyGameLogTypes.shootout_save]="Отражен бросок",no[t.HockeyGameLogTypes.after_game_shootout_save]="Отражен бросок",no[t.HockeyGameLogTypes.timeout]="Таймаут",no[t.HockeyGameLogTypes.penalty_start]="Начало штрафного времени",no[t.HockeyGameLogTypes.penalty_end]="Конец штрафного времени",no),jo=((oo={})[t.FootballGameLogTypes.enter_game]="Выход на поле",oo[t.FootballGameLogTypes.exit_game]="Ушел с поля",oo[t.FootballGameLogTypes.shot_miss]="Удар мимо",oo[t.FootballGameLogTypes.shot_on_goal]="Удар в створ",oo[t.FootballGameLogTypes.shot_blocked]="Заблокированный удар",oo[t.FootballGameLogTypes.goal]="Гол",oo[t.FootballGameLogTypes.assist]="Передача",oo[t.FootballGameLogTypes.penalty_attempt]="Пенальти промах",oo[t.FootballGameLogTypes.penalty_goal]="Пенальти гол",oo[t.FootballGameLogTypes.small_penalty_attempt]="10-метровый промах",oo[t.FootballGameLogTypes.small_penalty_goal]="10-метровый гол",oo[t.FootballGameLogTypes.block_shot]="Блокировка удара",oo[t.FootballGameLogTypes.corner]="Угловой",oo[t.FootballGameLogTypes.free_kick]="Штрафной удар",oo[t.FootballGameLogTypes.save]="Отражен удар",oo[t.FootballGameLogTypes.penalty_save]="Отражен пенальти",oo[t.FootballGameLogTypes.small_penalty_save]="Отражен 10 метровый",oo[t.FootballGameLogTypes.foul]="Фол",oo[t.FootballGameLogTypes.yellow_card]="Желтая карточка",oo[t.FootballGameLogTypes.red_card]="Красная карточка",oo[t.FootballGameLogTypes.perfect_pass]="Пас",oo[t.FootballGameLogTypes.loss]="Потеря",oo[t.FootballGameLogTypes.steal]="Перехват",oo[t.FootballGameLogTypes.out]="Аут",oo[t.FootballGameLogTypes.timeout]="Таймаут",oo[t.FootballGameLogTypes.auto_goal]="Автогол",oo[t.FootballGameLogTypes.end_game_penalty_goal]="Пенальти гол",oo[t.FootballGameLogTypes.end_game_penalty_miss]="Пенальти промах",oo[t.FootballGameLogTypes.end_game_penalty_save]="Отражен пенальти",oo),Io=((io={})[t.HandballGameLogTypes.enter_game]="Выход на поле",io[t.HandballGameLogTypes.exit_game]="Ушел с поля",io[t.HandballGameLogTypes.shot_miss]="Бросок мимо",io[t.HandballGameLogTypes.shot_on_goal]="Бросок в створ",io[t.HandballGameLogTypes.shot_blocked]="Заблокированный бросок",io[t.HandballGameLogTypes.goal]="Гол",io[t.HandballGameLogTypes.assist]="Передача",io[t.HandballGameLogTypes.penalty_miss]="7м промах",io[t.HandballGameLogTypes.penalty_shot_on_goal]="7м в створ",io[t.HandballGameLogTypes.penalty_goal]="7м гол",io[t.HandballGameLogTypes.save]="Сэйв",io[t.HandballGameLogTypes.penalty_save]="Сэйв 7м",io[t.HandballGameLogTypes.foul]="Фол",io[t.HandballGameLogTypes.yellow_card]="Желлтая карточка",io[t.HandballGameLogTypes.red_card]="Красная карточка",io[t.HandballGameLogTypes.two_minute_foul]="2х минутный штраф",io[t.HandballGameLogTypes.turnover]="Потеря",io[t.HandballGameLogTypes.steal]="Перехват",io[t.HandballGameLogTypes.block_shot]="Блок броска",io[t.HandballGameLogTypes.timeout]="Таймаут",io),Bo=((ro={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",ro[t.OvertimeTypes.to_score_total]="До N очков",ro[t.OvertimeTypes.time]="По времени",ro[t.OvertimeTypes.without_overtime]="Без овертайма",ro[t.OvertimeTypes.to_first_goal]="На N минут до первой шайбы",ro[t.OvertimeTypes.to_first_goal_and_bullitts]="На N минут до первой шайбы + буллиты",ro[t.OvertimeTypes.bullitts]="Буллиты",ro[t.OvertimeTypes.penalties]="Пенальти",ro[t.OvertimeTypes.time_and_penalties]="Дополнительное время + пенальти",ro),Oo=((ao={})[t.RugbyFoulSanctions.scrum]="Схватка",ao[t.RugbyFoulSanctions.lineout]="Корридор",ao[t.RugbyFoulSanctions.free_kick]="Свободный удар",ao[t.RugbyFoulSanctions.penalty_shot]="Штрафной удар",ao[t.RugbyFoulSanctions.yellow_card]="Желтая карточка",ao[t.RugbyFoulSanctions.red_card]="Красная карточка",ao),Ho=((so={})[t.RugbyGameLogTypes.enter_game]="Выход на площадку",so[t.RugbyGameLogTypes.exit_game]="Ушел с площадки",so[t.RugbyGameLogTypes.try]="Попытка",so[t.RugbyGameLogTypes.penalty_try]="Штрафная попытка",so[t.RugbyGameLogTypes.conversion_goal]="Реализация",so[t.RugbyGameLogTypes.conversion_miss]="Реализация промах",so[t.RugbyGameLogTypes.penalty_miss]="Штрафной промах",so[t.RugbyGameLogTypes.penalty_goal]="Штрафной гол",so[t.RugbyGameLogTypes.penalty_kick_to_touch]="Штрафной в аут",so[t.RugbyGameLogTypes.tap_penalty]="Штрафной розыгран",so[t.RugbyGameLogTypes.drop_goal]="Дроп-гол",so[t.RugbyGameLogTypes.drop_goal_miss]="Дроп-гол промах",so[t.RugbyGameLogTypes.free_kick]="Свободный удар",so[t.RugbyGameLogTypes.foul]="Фол",so[t.RugbyGameLogTypes.yellow_card]="Желтая карточка",so[t.RugbyGameLogTypes.red_card]="Красная карточка",so[t.RugbyGameLogTypes.offload]="Скидка при завхвате",so[t.RugbyGameLogTypes.tackle]="Успешный захват",so[t.RugbyGameLogTypes.handling_error]="Ошибка приема",so[t.RugbyGameLogTypes.carries_over_gainline]="Прорыв линии",so[t.RugbyGameLogTypes.bleeding_injury]="Кровоточащая травма",so[t.RugbyGameLogTypes.head_injury]="Травма головы",so[t.RugbyGameLogTypes.end_game_penalty_miss]="Штрафной промах",so[t.RugbyGameLogTypes.end_game_penalty_goal]="Штрафной гол",so[t.RugbyGameLogTypes.timeout]="Таймаут",so[t.RugbyGameLogTypes.scrum_won]="Схватка выиграна",so[t.RugbyGameLogTypes.scrum_lost]="Схватка проиграна",so[t.RugbyGameLogTypes.scrum_won_free]="Схватка выиграна без сопротивления",so[t.RugbyGameLogTypes.lineout_won]="Корридор выиграно",so[t.RugbyGameLogTypes.lineout_lost]="Корридор проиграно",so[t.RugbyGameLogTypes.quick_throw]="Быстрый вброс",so[t.RugbyGameLogTypes.ruck_won]="Рак выиграно",so[t.RugbyGameLogTypes.ruck_lost]="Рак проиграно",so[t.RugbyGameLogTypes.maul_won]="Мол выиграно",so[t.RugbyGameLogTypes.maul_lost]="Мол проиграно",so[t.RugbyGameLogTypes.team_foul]="Фол",so),Ao=((uo={})[t.TeamUserRole.member]="Пользователь",uo[t.TeamUserRole.moderator]="Модератор",uo[t.TeamUserRole.admin]="Владелец",uo[t.TeamUserRole.coach]="Тренер",uo[t.TeamUserRole.head_coach]="Главный тренер",uo[t.TeamUserRole.playing_coach]="Играющий тренер",uo[t.TeamUserRole.manager]="Менеджер",uo[t.TeamUserRole.head_manager]="Генеральный менеджер",uo[t.TeamUserRole.captain]="Капитан",uo[t.TeamUserRole.assistant]="Ассистент",uo),Ro=((lo={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",lo[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",lo[t.GameBasketballPosition.small_forward]="Легкий форвард",lo[t.GameBasketballPosition.power_forward]="Мощный форвард",lo[t.GameBasketballPosition.center]="Центровой",lo),xo=((po={})[t.GameBasketballPosition.point_guard]="PG",po[t.GameBasketballPosition.shooting_guard]="SG",po[t.GameBasketballPosition.small_forward]="SF",po[t.GameBasketballPosition.power_forward]="PF",po[t.GameBasketballPosition.center]="C",po),Mo=((co={})[t.WorkHand.left]="Левая",co[t.WorkHand.right]="Правая",co),Vo=((mo={})[t.GameVolleyballPosition.setter]="Связующий",mo[t.GameVolleyballPosition.libero]="Либеро",mo[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",mo[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",mo[t.GameVolleyballPosition.dioganal]="Диагональный",mo),Eo=((fo={})[t.GameVolleyballPosition.setter]="S",fo[t.GameVolleyballPosition.libero]="L",fo[t.GameVolleyballPosition.middle_player]="MP",fo[t.GameVolleyballPosition.receiver_attacker]="RA",fo[t.GameVolleyballPosition.dioganal]="D",fo),zo=((go={})[t.GameVolleyballPosition.setter]="связ.",go[t.GameVolleyballPosition.libero]="либеро",go[t.GameVolleyballPosition.middle_player]="блок.",go[t.GameVolleyballPosition.receiver_attacker]="доигр.",go[t.GameVolleyballPosition.dioganal]="диаг.",go),No=((ho={})[t.VolleyballWorkHand.left]="Левая",ho[t.VolleyballWorkHand.right]="Правая",ho),Do=((_o={})[t.GameHockeyPosition.goaltender]="Вратарь",_o[t.GameHockeyPosition.defensemen]="Защитник",_o[t.GameHockeyPosition.forward]="Нападающий",_o),Wo=((yo={})[t.GameFootballPosition.goalkeeper]="Вратарь",yo[t.GameFootballPosition.defensemen]="Защитник",yo[t.GameFootballPosition.midfielder]="Полузащитник",yo[t.GameFootballPosition.forward]="Нападающий",yo),qo=((vo={})[t.FootballWorkFoot.left]="Левая",vo[t.FootballWorkFoot.right]="Правая",vo[t.FootballWorkFoot.both]="Обе",vo),Xo=((bo={})[t.GameHandballPosition.goalkeeper]="Вратарь",bo[t.GameHandballPosition.winger]="Крайний",bo[t.GameHandballPosition.pivot]="Линейный",bo[t.GameHandballPosition.centre_back]="Центральный",bo[t.GameHandballPosition.fullback]="Полусредний",bo),$o=((To={})[t.GameRugbyPosition.front_line]="Надающий первой линии",To[t.GameRugbyPosition.second_line]="Нападающий второй линии",To[t.GameRugbyPosition.back_line]="Нападающий задней линии",To[t.GameRugbyPosition.halfback]="Полузащитник",To[t.GameRugbyPosition.three_quarter]="Трехчетвертный",To[t.GameRugbyPosition.fullback]="Замыкающий",To),Ko=((ko={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",ko[t.VolleyballGameLogType.exit_game]="Уход с площадки",ko[t.VolleyballGameLogType.remove_game]="Удаление с площадки",ko[t.VolleyballGameLogType.serve_ace]="Эйс",ko[t.VolleyballGameLogType.serve_hit]="Подача",ko[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",ko[t.VolleyballGameLogType.attack_spike]="Результативная атака",ko[t.VolleyballGameLogType.attack_shot]="Атака",ko[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",ko[t.VolleyballGameLogType.stuff_block]="Результативный блок",ko[t.VolleyballGameLogType.block_rebound]="Блок",ko[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",ko[t.VolleyballGameLogType.excellent_receive]="Отличный прием",ko[t.VolleyballGameLogType.receive]="Прием",ko[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",ko[t.VolleyballGameLogType.serve_receive]="Прием подачи",ko[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",ko[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",ko[t.VolleyballGameLogType.point]="Очко",ko[t.VolleyballGameLogType.fault]="Ошибка",ko[t.VolleyballGameLogType.timeout]="Таймаут",ko[t.VolleyballGameLogType.yellow_card]="Предупреждение",ko),Yo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},g([U],e,"toFront",null),g([j],e,"toBack",null),e=g([w({mappingFields:{id:"id",name:"name",files:"files",key_code:"keyCode"},relation:{files:G(O)}})],e)}(k),Jo=function(){function t(t,e){this.httpClient=t,this.configService=e,this.channels$={},this.subscriptions={},this.connectedSubject=new i.BehaviorSubject(!1)}return Object.defineProperty(t.prototype,"connected$",{get:function(){return this.connectedSubject},enumerable:!0,configurable:!0}),t.prototype.listen=function(t){var e=this;if(t in this.channels$)return this.channels$[t];this.channels$[t]=new r.Subject;var n=this.connect().subscribe((function(o){e.subscriptions[t]=e.addEngineSubscription(t),setTimeout((function(){n.unsubscribe()}))}));return this.channels$[t]},t.prototype.unsubscribe=function(t){this.subscriptions[t]&&(this.subscriptions[t].unsubscribe(),delete this.subscriptions[t]),this.channels$[t]&&(this.channels$[t].complete(),delete this.channels$[t])},t.prototype.connect=function(){var t=this;return this.initializeEngineSubject||(this.initializeEngineSubject=new a.ReplaySubject(1),this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/centrifugo/").subscribe((function(e){t.initializeEngine({url:t.configService.get("centrifugoUrl"),user:e.user,timestamp:e.timestamp,token:e.token,transports:["websocket"]}),t.centrifuge.connect(),t.centrifuge.on("connect",(function(){t.initializeEngineSubject.next(!0),t.connectedSubject.next(!0)})),t.centrifuge.on("disconnect",(function(){t.connectedSubject.next(!1)}))}))),this.initializeEngineSubject},t.prototype.publish=function(t,e){var n=this;return new i.Observable((function(o){n.connect().subscribe((function(){n.subscriptions[t]||(n.subscriptions[t]=n.addEngineSubscription(t)),n.subscriptions[t].publish(e).then((function(t){o.next(t),o.complete()}),(function(t){throw t}))}))}))},t.prototype.disconnect=function(){this.centrifuge.disconnect(),this.initializeEngineSubject=void 0,this.channels$={},this.subscriptions={}},t.prototype.initializeEngine=function(t){this.centrifuge=new s(t)},t.prototype.addEngineSubscription=function(t){return this.centrifuge.subscribe(t,this.resolveMessage.bind(this))},t.prototype.resolveMessage=function(t){var e=t.channel;this.channels$[e]&&this.channels$[e].next(t.data)},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Wt}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Wt))},token:t,providedIn:"root"}),t=g([e.Injectable({providedIn:"root"})],t)}(),Zo=function(){function t(t,e){this.modelClass=e,this.defaultValue=t}return t.prototype.toFront=function(t){return this.modelClass?this.modelClass.toFront(t):t},t.prototype.toBack=function(t){return this.modelClass?this.modelClass.toBack(t):t},t}(),Qo=function(){function t(t,e){this.name=t,this.fields=e}return t.prototype.addField=function(t,e){this.fields[t]=e},t.prototype.save=function(t,e){this.fields[t]&&this.setItem(this.name+"_"+t,this.fields[t].toBack(e))},t.prototype.get=function(t){if(this.fields[t]){var e=this.getItem(this.name+"_"+t);return null===e&&(e=this.fields[t].defaultValue),null==e?e:this.fields[t].toFront(e)}},t.prototype.clear=function(){var t,e;try{for(var n=y(Object.keys(this.fields)),o=n.next();!o.done;o=n.next()){var i=o.value;this.removeItem(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.getItem=function(t){throw new Error("Function getItem for store engine "+typeof this+" not implemented")},t.prototype.setItem=function(t,e){throw new Error("Function setItem for store engine "+typeof this+" not implemented")},t.prototype.removeItem=function(t){throw new Error("Function deleteItem for store engine "+typeof this+" not implemented")},t}(),ti=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.setItem=function(t,e){localStorage.setItem(t,JSON.stringify(e))},e.prototype.getItem=function(t){try{return JSON.parse(localStorage.getItem(t))}catch(t){return}},e.prototype.removeItem=function(t){localStorage.removeItem(t)},e}(Qo);function ei(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function ni(t){return[{rel:"apple-touch-icon",sizes:"180x180",href:"/assets/favicon/"+t+"apple-touch-icon.png"},{rel:"icon",type:"image/png",sizes:"32x32",href:"/assets/favicon/"+t+"favicon-32x32.png"},{rel:"icon",type:"image/png",sizes:"16x16",href:"/assets/favicon/"+t+"favicon-16x16.png"},{rel:"shortcut icon",href:"/assets/favicon/"+t+"favicon.ico"},{rel:"manifest",href:"/assets/favicon/"+t+"site.webmanifest"},{rel:"mask-icon",href:"/assets/favicon/"+t+"safari-pinned-tab.svg",color:"#ff0000"}]}var oi=function(){function t(t,e,n){this.injector=t,this.configService=e,this.platformId=n,this.isBrowser=p.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);var n=this.configService.get("apiUrl");n===t.url.substr(0,n.length)&&(t=t.clone({withCredentials:!0}));var o=ei("csrftoken");return o&&(t=t.clone({setHeaders:{"X-CSRFToken":o}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:Wt},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=g([e.Injectable(),d(2,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=k,t.BaseService=Dt,t.BasketballGameApi=ue,t.BasketballGameConfig=vt,t.BasketballGameLog=oe,t.BasketballGameLogTypeLocalization=Lo,t.BasketballGameStatistic=te,t.BasketballGameTeamStatistic=Qt,t.BasketballProfile=z,t.BasketballStatistic=Zt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=Jo,t.City=M,t.ConfigService=Wt,t.DateField=F,t.DateTimeField=C,t.FAULT_LOG_TYPES=So,t.Feedback=le,t.FeedbackApi=pe,t.File=O,t.FileApi=ce,t.FootballGameApi=Pe,t.FootballGameConfig=Gt,t.FootballGameLog=ve,t.FootballGameLogTypeLocalization=jo,t.FootballGameStatistic=be,t.FootballGameTeamStatistic=ke,t.FootballProfile=Y,t.FootballStatistic=Te,t.FootballWorkFootLocalization=qo,t.Game=Ht,t.GameBaseApi=se,t.GameBasketballPositionLocalization=Ro,t.GameBasketballPositionShortLocalization=xo,t.GameFootballPositionLocalization=Wo,t.GameHandballPositionLocalization=Xo,t.GameHockeyPositionLocalization=Do,t.GameInvite=cn,t.GameRugbyPositionLocalization=$o,t.GameTimelineStageItem=je,t.GameTimelineStages=Ie,t.GameUser=ie,t.GameUserLimitationTypes=re,t.GameUserLimitations=ae,t.GameVolleyballPositionLocalization=Vo,t.GameVolleyballPositionShortLocalization=Eo,t.GameVolleyballPositionShortRuLocalization=zo,t.HandballGameApi=Le,t.HandballGameConfig=Ft,t.HandballGameLog=Ge,t.HandballGameLogTypeLocalization=Io,t.HandballGameStatistic=Fe,t.HandballGameTeamStatistic=we,t.HandballProfile=Z,t.HandballStatistic=Ce,t.HockeyGameApi=_e,t.HockeyGameConfig=St,t.HockeyGameLog=fe,t.HockeyGameLogTypeLocalization=Uo,t.HockeyGameStatistic=ge,t.HockeyGameTeamStatistic=he,t.HockeyPenaltyTypes=T,t.HockeyProfile=$,t.HockeyStatistic=de,t.HttpCookieInterceptor=oi,t.League=rt,t.LeagueApi=Ze,t.LeagueBanner=Ye,t.LeagueCourt=kt,t.LeagueDocument=Je,t.LeagueNews=xe,t.LeagueNewsApi=Qe,t.LeaguePartner=$e,t.LeaguePlayer=Yt,t.LeaguePlayerApi=tn,t.LeaguePlaylist=Yo,t.LocalStorageEngine=ti,t.MODEL_MAPPING_FIELDS_KEY="_mapping_fields_",t.MODEL_RELATION_KEY="_relation_",t.MODEL_TO_BACK_KEY="_to_back_",t.MODEL_TO_FRONT_KEY="_to_front_",t.MediaApi=en,t.MediaItem=Pt,t.ModelInstance=w,t.Notification=Tn,t.NotificationApi=Gn,t.NotificationBaseApi=Sn,t.NotificationSettings=Pn,t.OrgNotificationApi=Fn,t.Organization=it,t.OvertimeTypeLocalization=Bo,t.Playoff=jt,t.PlayoffSettings=Ut,t.Poll=sn,t.PollAnswer=an,t.PollVariant=rn,t.PublicTeamApi=Co,t.PublicUserApi=wo,t.RUGBY_GAME_LOG_TYPE_POINTS=On,t.RUGBY_TEAM_LOG_TYPES=Hn,t.ReferenceApi=Cn,t.RugbyFoulSanctionLocalization=Oo,t.RugbyFoulType=In,t.RugbyGameApi=Rn,t.RugbyGameConfig=Bt,t.RugbyGameLog=An,t.RugbyGameLogTypeLocalization=Ho,t.RugbyGameStatistic=Ln,t.RugbyGameTeamStatistic=wn,t.RugbyProfile=tt,t.RugbyStatistic=ze,t.SCORE_LOG_TYPES=Po,t.Sport=R,t.StorageEngine=Qo,t.StorageEngineField=Zo,t.Store=Nt,t.Team=ot,t.TeamAccess=En,t.TeamApi=zn,t.TeamEvent=gn,t.TeamEventApi=Nn,t.TeamEventInvite=_n,t.TeamEventTypeLocalization=fn,t.TeamInvite=un,t.TeamInviteExternal=xn,t.TeamPermission=Vn,t.TeamUser=$t,t.TeamUserRoleLocalization=Ao,t.ToBackHook=j,t.ToFrontHook=U,t.Tournament=yt,t.TournamentApi=Ne,t.TournamentDisqualification=Kt,t.TournamentEvent=Ee,t.TournamentGroup=It,t.TournamentInvite=vn,t.TournamentJoinApi=qn,t.TournamentJoinData=Dn,t.TournamentJoinTeam=Wn,t.TournamentNews=Ue,t.TournamentSeason=gt,t.TournamentSeasonApi=Xn,t.TournamentSettings=ht,t.TournamentStage=Oe,t.TournamentStageApi=$n,t.TournamentStageTeam=Ae,t.TournamentTeam=qt,t.TournamentTeamShort=Ot,t.TournamentTeamUser=Jt,t.TournamentTeamUserInvite=yn,t.TournamentTeamWinner=_t,t.UntilDestroy=function(t){var e,n=(e=t).ɵcmp||e.ɵdir,o=n.onDestroy;t.__componentDestroyed$=new r.Subject,n.onDestroy=function(){t.__componentDestroyed$.next(),t.__componentDestroyed$.complete(),o.apply(this)}},t.User=nt,t.UserAccess=Kn,t.UserApi=Zn,t.UserPermission=Jn,t.UserProfile=x,t.VolleyballGameApi=Fo,t.VolleyballGameConfig=Tt,t.VolleyballGameLog=Go,t.VolleyballGameLogTypeLocalization=Ko,t.VolleyballGameStatistic=to,t.VolleyballGameTeamStatistic=Qn,t.VolleyballProfile=W,t.VolleyballStatistic=He,t.VolleyballWorkHandLocalization=No,t.WorkHandLocalization=Mo,t.addItemInArray=xt,t.applyGameMediaFilters=nn,t.applyGamesFilters=De,t.applyStatisticFilters=We,t.applyStatisticLeadersFilters=qe,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=ni(a);try{for(var u=y(s),l=u.next();!l.done;l=u.next()){var p=l.value,c=t.createElement("link");try{for(var m=(i=void 0,y(Object.keys(p))),f=m.next();!f.done;f=m.next()){var g=f.value;c.setAttribute(g,p[g])}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=m.return)&&r.call(m)}finally{if(i)throw i.error}}t.head.appendChild(c)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}},t.componentDestroyed=function(t){if(t.constructor.__componentDestroyed$)return t.constructor.__componentDestroyed$;throw new Error("Use @UntilDestroy decorator in class")},t.deleteItemFromArray=Vt,t.enumField=P,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=Ct,t.getArrayChunks=function(t,e){var n=[],o=Math.ceil(t.length/e);if(0===o)return[t];for(var i=0;i<o;i++)n.push(t.slice(i*e,(i+1)*e));return n},t.getCookie=ei,t.getEnumOptions=function(t){return Object.keys(t).map((function(e){return t[e]})).filter((function(t){return!1===isNaN(+t)})).map((function(t){return+t}))},t.getIconsData=ni,t.handleError=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!0),(!t||0!==t.status&&404!==t.status||e&&0!==t.status)&&u.captureException(t),n||console.error(t)},t.isTouchDevice=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch)return!0;var e,n=["(",t.join("touch-enabled),("),"heartz",")"].join("");return e=n,window.matchMedia(e).matches},t.listField=G,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof l.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof l.FormGroup?t(e):(e.markAsTouched(),e.markAsDirty())}))}))},t.minLengthArrayValidator=function(t){return function(e){return e.value.length<t?{minLengthArray:{valid:!1}}:null}},t.patchItemInArray=function(t,e,n){return Array.isArray(t)?t.map((function(t){if(n&&Et(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.penaltyTypeField=S,t.updateItemInArray=At,t.updateItemsInArray=Rt,t.validateDate=function(t){return!t.value||/\d{2}\.\d{2}\.\d{4}/gi.test(t.value)?null:{invalidDate:{valid:!1}}},t.validateEmail=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=[]);var r=i.of(null).pipe(o.delay(500));return function(a){return n.indexOf(a.value)>-1?i.of(null):r.pipe(o.switchMap((function(){return t.checkEmail(a.value,e).pipe(o.map((function(t){return t?null:{emailTaken:!0}})))})))}},t.validatePhone=function(t){return t.value?11===(""+t.value).replace(/\D/gi,"").length?null:{invalidPhone:{valid:!1}}:null},t.validateUrl=function(t){return!t.value||/^(?:http(s)?:\/\/)[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(t.value)?null:{invalidUrl:!0}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
|
-
//# sourceMappingURL=mtgame-core.umd.min.js.map
|