@mtgame/core 0.0.48 → 0.0.50
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/api/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +20 -0
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/league-api.js +4 -1
- package/esm2015/api/tournament-api.js +4 -1
- package/esm2015/api/tournament-season-api.js +4 -1
- package/esm2015/models/hockey-game-statistic.js +4 -1
- package/esm2015/models/tournament-season.js +6 -2
- package/esm5/api/league-api.js +4 -1
- package/esm5/api/tournament-api.js +4 -1
- package/esm5/api/tournament-season-api.js +4 -1
- package/esm5/models/hockey-game-statistic.js +8 -1
- package/esm5/models/tournament-season.js +6 -2
- package/fesm2015/mtgame-core.js +16 -0
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +20 -0
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/hockey-game-statistic.d.ts +1 -0
- package/models/tournament-season.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
13
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
14
|
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var p=function(t,e){return(p=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}p(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 d(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 h(t,e){return function(n,o){e(n,o,t)}}function g(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 v(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 _(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 y(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(y(arguments[e]));return t}var k=[{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:"Штраф вратаря"}],T=function(){function t(t){var e,n;if(t)try{for(var o=_(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 S(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function P(){return{toFront:function(t){return t?"object"==typeof t?t:k.find((function(e){return e.id===t})):null},toBack:function(t){return t?"object"==typeof t?t.id:t:null}}}function F(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var w=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}(T),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}(T);function G(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 c=_(Object.keys(s)),l=c.next();!l.done;l=c.next()){var p=l.value,m=s[p],f=j(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}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 c=_(Object.keys(s)),l=c.next();!l.done;l=c.next()){var p=l.value,m=s[p];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[p]=u[m].toBack(n[m]):a[p]=n[m]}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(i)throw i.error}}return a}(e,t)})}}var I,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)}}},B=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 j(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=_(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}}(I=t.FileEngine||(t.FileEngine={}))[I.django=1]="django",I[I.s3=2]="s3";var L,O=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine"},relation:{engine:S(t.FileEngine)}})],e)}();(L=t.SportTypes||(t.SportTypes={}))[L.basketball=1]="basketball",L[L.volleyball=2]="volleyball",L[L.classic_basketball=3]="classic_basketball",L[L.streetball=4]="streetball",L[L.classic_volleyball=5]="classic_volleyball",L[L.beach_volleyball=6]="beach_volleyball",L[L.hockey=7]="hockey",L[L.ice_hockey=8]="ice_hockey",L[L.ball_hockey=9]="ball_hockey";var H,A,x=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.toFront=function(t){return null},n.toBack=function(t){return null},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(T),V=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name"}})],e)}(T);(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 N,M,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameBasketballPosition),workHand:S(t.WorkHand)}})],n)}(T);(N=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[N.setter=1]="setter",N[N.libero=2]="libero",N[N.middle_player=3]="middle_player",N[N.receiver_attacker=4]="receiver_attacker",N[N.dioganal=5]="dioganal",(M=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[M.left=1]="left",M[M.right=2]="right";var D,R,q=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameVolleyballPosition),workHand:S(t.VolleyballWorkHand)}})],n)}(T);(D=t.GameHockeyPosition||(t.GameHockeyPosition={}))[D.defensemen=1]="defensemen",D[D.forward=2]="forward",D[D.goaltender=3]="goaltender",(R=t.HockeyWorkHand||(t.HockeyWorkHand={}))[R.left=1]="left",R[R.right=2]="right";var 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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameHockeyPosition),workHand:S(t.HockeyWorkHand)}})],n)}(T);(W=t.UserGender||(t.UserGender={}))[W.male=1]="male",W[W.female=2]="female";var X,J=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}),d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:w,photo:O,profile:V,basketballProfile:z,volleyballProfile:q,hockeyProfile:$,city:E,gender:S(t.UserGender)}})],n)}(T),Y=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"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:x,logo:O,owner:J,city:E,closestGameDatetime:w}})],e)}(T),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:J}})],e)}(T),K=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"https://vk.com/"===t.substr(0,15)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.facebook.com/"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.instagram.com"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",closest_game_datetime:"closestGameDatetime",cover:"cover",about:"about"},relation:{organization:Z,logo:O,cover:O,sport:x}})],e)}(T);(X=t.TournamentSeasonStatuses||(t.TournamentSeasonStatuses={}))[X.open=0]="open",X[X.in_progress=1]="in_progress",X[X.closed=2]="closed";var Q,tt,et,nt,ot,it,rt,at=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",status:"status"},relation:{logo:O,cover:O,previewImage:O,status:S(t.TournamentSeasonStatuses)}})],n)}(T);(Q=t.TournamentTypes||(t.TournamentTypes={})).group="group",Q.elimination="elimination",Q.fiba="fiba",(tt=t.TournamentStatuses||(t.TournamentStatuses={}))[tt.open=0]="open",tt[tt.in_progress=1]="in_progress",tt[tt.closed=2]="closed",(et=t.TournamentGender||(t.TournamentGender={}))[et.male=1]="male",et[et.female=2]="female",et[et.all=3]="all",(nt=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[nt.standard=1]="standard",nt[nt.light=2]="light",nt[nt.advanced=3]="advanced",(ot=t.VolleyballStatisticTypes||(t.VolleyballStatisticTypes={}))[ot.standard=1]="standard",ot[ot.light=2]="light",ot[ot.advanced=3]="advanced",(it=t.GameTimeTypes||(t.GameTimeTypes={}))[it.clean=1]="clean",it[it.dirty=2]="dirty",(rt=t.OvertimeTypes||(t.OvertimeTypes={}))[rt.to_score_total=1]="to_score_total",rt[rt.to_score_diff=2]="to_score_diff",rt[rt.time=3]="time",rt[rt.without_overtime=4]="without_overtime",rt[rt.to_first_goal=5]="to_first_goal",rt[rt.to_first_goal_and_bullitts=6]="to_first_goal_and_bullitts",rt[rt.bullitts=7]="bullitts";var st,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType",with_result_table:"withResultTable"},relation:{type:S(t.TournamentTypes),gender:S(t.TournamentGender),basketballStatisticType:S(t.BasketballStatisticTypes),volleyballStatisticType:S(t.VolleyballStatisticTypes),gameTimeType:S(t.GameTimeTypes),overtimeType:S(t.OvertimeTypes)}})],n)}(T),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:Y}})],e)}(T),lt=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"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{logo:O,cover:O,previewImage:O,city:E,sport:x,regulationFile:O,settings:ut,date:C,league:K,status:S(t.TournamentStatuses),teamWinner:ct,teamSecond:ct,teamThird:ct,season:at}})],n)}(T),pt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.OvertimeTypes),statisticType:S(t.BasketballStatisticTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(st=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[st.best_of_five=1]="best_of_five",st[st.best_of_three=2]="best_of_three";var mt,ft,dt=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{gameType:S(t.VolleyballGameTypes),statisticType:S(t.VolleyballStatisticTypes)}})],n)}(T),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(T),gt=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T),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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(mt=t.GameStatuses||(t.GameStatuses={}))[mt.open=1]="open",mt[mt.in_progress=2]="in_progress",mt[mt.closed=3]="closed",mt[mt.archived=4]="archived",mt[mt.draft=5]="draft",(ft=t.GameResultTypes||(t.GameResultTypes={}))[ft.team_won=1]="team_won",ft[ft.competitor_team_won=2]="competitor_team_won",ft[ft.team_technical_defeat=3]="team_technical_defeat",ft[ft.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var _t,yt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),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 this.teamScore>this.competitorTeamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return this.competitorTeamScore>this.teamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.status!==t.GameStatuses.closed||this.teamScore===this.competitorTeamScore?null:this.team.id?this.teamScore>this.competitorTeamScore?this.team.id:this.competitorTeam.id:this.teamScore>this.competitorTeamScore?this.teamId:this.competitorTeamId},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",status:"status",team:"team",tournament_team_id:"tournamentTeamId",team_id:"teamId",competitor_team:"competitorTeam",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",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",hockey_game_config:"hockeyGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media_live_count:"mediaLiveCount",media:"media",tournament:"tournament"},relation:{status:S(t.GameStatuses),team:Y,competitorTeam:Y,datetime:C,resultType:S(t.GameResultTypes),basketballGameConfig:pt,volleyballGameConfig:dt,hockeyGameConfig:vt,tournamentCourt:ht,media:F(gt),tournament:lt}})],n)}(T);(_t=t.TeamUserRole||(t.TeamUserRole={}))[_t.member=1]="member",_t[_t.moderator=2]="moderator",_t[_t.admin=3]="admin";var bt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:J,team:Y,role:S(t.TeamUserRole)}})],n)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(T),Tt=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",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",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"},relation:{tournament:lt,team:Y,group:kt,games:yt}})],e)}(T),St=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:w,dateTo:w}})],e)}(T),Pt=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}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",first_name:"firstName",last_name:"lastName",middle_name:"middleName",photo:"photo",disqualification:"disqualification",has_changes:"hasChanges"},relation:{tournamentTeam:Tt,teamUser:bt,photo:O,disqualification:St}})],e)}(T),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",updated_at:"updatedAt"},relation:{teamUser:bt,tournamentTeamUser:Pt,updatedAt:C}})],e)}(T);function wt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&Bt(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 Ct(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=wt(t,e,n,o)})),t}function Gt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return Bt(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function It(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=Gt(t,e,n,o)})),t}function Ut(t,e){return Array.isArray(t)?Bt(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function Bt(t){return t&&"[object Function]"==={}.toString.call(t)}var jt,Lt=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,Gt(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,It(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,Gt(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,It(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,wt(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,Ct(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,Ut(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=_(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}(),Ot=function(){function t(){this.store=new Lt}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ht=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=d([e.Injectable({providedIn:"root"}),h(0,e.Optional()),h(0,e.Inject("mtg-core-config-data"))],n)}(Ot),At=function(){},xt=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}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",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",newbie:"newbie"},relation:{tournamentTeamUser:Pt,team:Y,teamUser:bt,user:J,tournamentTeam:Tt,month:w}})],e)}(At),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:xt,competitorTeam:xt}})],e)}(T),Et=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}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T);(jt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[jt.enter_game=1]="enter_game",jt[jt.exit_game=2]="exit_game",jt[jt.remove_game=3]="remove_game",jt[jt.two_point_made=4]="two_point_made",jt[jt.three_point_made=5]="three_point_made",jt[jt.free_throw_made=6]="free_throw_made",jt[jt.two_point_attempt=7]="two_point_attempt",jt[jt.three_point_attempt=8]="three_point_attempt",jt[jt.free_throw_attempt=9]="free_throw_attempt",jt[jt.assist=10]="assist",jt[jt.block=11]="block",jt[jt.rebound=12]="rebound",jt[jt.offensive_rebound=13]="offensive_rebound",jt[jt.defensive_rebound=14]="defensive_rebound",jt[jt.steal=15]="steal",jt[jt.turnover=16]="turnover",jt[jt.personal_foul=17]="personal_foul",jt[jt.technical_foul=18]="technical_foul",jt[jt.unsportsmanlike_foul=19]="unsportsmanlike_foul",jt[jt.one_point_attempt=20]="one_point_attempt",jt[jt.one_point_made=21]="one_point_made",jt[jt.timeout=22]="timeout";var Nt,Mt,zt=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.BasketballGameLogTypes)}})],n)}(T),Dt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Vt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 zt.toFront(t)}))).toPromise()]}))}))},t.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.prototype.downloadFibaProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Rt=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{id:"id",theme:"theme",message:"message",files:"files",email:"email",captcha:"captcha"},relation:{files:O}})],t)}(),qt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.sendFeedback=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",Rt.toBack(t)).pipe(o.map((function(t){return Rt.toFront(t)}))).toPromise()]}))}))},t.prototype.sendLeagueFeedback=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/feedback/",Rt.toBack(e)).pipe(o.map((function(t){return Rt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Wt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.upload=function(t,e){return g(this,void 0,void 0,(function(){var n;return v(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",n).pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return g(this,void 0,void 0,(function(){var e,n,o,i,r,a;return v(this,(function(s){e=new FormData;try{for(n=_(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:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Nt=t.HockeyGameLogTypes||(t.HockeyGameLogTypes={}))[Nt.enter_game=1]="enter_game",Nt[Nt.exit_game=2]="exit_game",Nt[Nt.shot_miss=3]="shot_miss",Nt[Nt.shot_on_goal=4]="shot_on_goal",Nt[Nt.shot_blocked=5]="shot_blocked",Nt[Nt.goal=6]="goal",Nt[Nt.shootout_attempt=7]="shootout_attempt",Nt[Nt.shootout_goal=8]="shootout_goal",Nt[Nt.assist=9]="assist",Nt[Nt.block_shot=10]="block_shot",Nt[Nt.minor_penalty=11]="minor_penalty",Nt[Nt.major_penalty=12]="major_penalty",Nt[Nt.misconduct_penalty=13]="misconduct_penalty",Nt[Nt.game_misconduct_penalty=14]="game_misconduct_penalty",Nt[Nt.match_penalty=15]="match_penalty",Nt[Nt.penalty_shot=16]="penalty_shot",Nt[Nt.face_off_lose=17]="face_off_lose",Nt[Nt.face_off_win=18]="face_off_win",Nt[Nt.save=19]="save",Nt[Nt.timeout=20]="timeout",Nt[Nt.penalty_start=21]="penalty_start",Nt[Nt.penalty_end=22]="penalty_end",(Mt=t.HockeyAdvantageTypes||(t.HockeyAdvantageTypes={}))[Mt.power_play=1]="power_play",Mt[Mt.shorthanded=2]="shorthanded",Mt[Mt.even_strength=3]="even_strength";var $t,Xt=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].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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.HockeyGameLogTypes),advantage:S(t.HockeyAdvantageTypes),penaltyType:P()}})],n)}(T),Jt=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},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,"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,"savesPercent",{get:function(){return this.shotsAgainst&&this.saves?Math.round(1e3*this.saves/this.shotsAgainst)/10:0},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:C}})],e)}(T),Yt=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(){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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",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",sh_goals:"shGoals",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots:"shots",goals_percent:"goalsPercent",shots_against:"shotsAgainst",saves_percent:"savesPercent",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",face_offs:"faceOffs",face_off_percent:"faceOffPercent",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Pt,team:Y,teamUser:bt,user:J,tournamentTeam:Tt,month:w}})],e)}(At),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Yt,competitorTeam:Yt}})],e)}(T),Kt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Jt.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 Xt.toFront(t)}))).toPromise()]}))}))},t.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();($t=t.LeagueNewsType||(t.LeagueNewsType={}))[$t.text=1]="text",$t[$t.video=2]="video";var Qt,te=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:F(lt),type:S(t.LeagueNewsType)}})],n)}(T);(Qt=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Qt.game_closed=1]="game_closed",Qt[Qt.media_added=2]="media_added",Qt[Qt.news=3]="news";var ee,ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:yt,news:te,league:K,tournaments:F(lt),datetime:w,event:S(t.TournamentEventTypes)}})],n)}(T),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort"},relation:{picture:O}})],e)}(T),ie=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return K.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return K.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentSeasons=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/").pipe(o.map((function(t){return at.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getSeasons=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(this,(function(r){return i=(new n.HttpParams).set("not_closed",e?"1":""),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/",{params:i}).pipe(o.map((function(t){return at.toFront(t)}))).toPromise()]}))}))},i.prototype.getPartners=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/partners/").pipe(o.map((function(t){return oe.toFront(t)}))).toPromise()]}))}))},i.prototype.getCourts=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/courts/").pipe(o.map((function(t){return ht.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),re=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),g(this,void 0,void 0,(function(){var s;return v(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:te.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getMainLeagueNews=function(t){return g(this,void 0,void 0,(function(){return v(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?te.toFront(t[0]):null}))).toPromise()]}))}))},i.prototype.getMainLeagueNewsList=function(t){return g(this,void 0,void 0,(function(){return v(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 te.toFront(t)}))).toPromise()]}))}))},i.prototype.getNewsById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t+"/").pipe(o.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentNewsList=function(t){return g(this,void 0,void 0,(function(){return v(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:te.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueMedia=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return v(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)),[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:gt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/download/",{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(ee=t.PollStatuses||(t.PollStatuses={}))[ee.open=1]="open",ee[ee.closed=2]="closed",ee[ee.archived=3]="archived";var 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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{uuid:"uuid",name:"name"}})],e)}(T),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:J}})],e)}(T),le=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.PollStatuses),variants:ue,author:J,answers:ce,createdAt:C}})],n)}(T),pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:J,team:Y,createdAt:C,updateAt:C}})],e)}(T);(se=t.GameInviteStatus||(t.GameInviteStatus={}))[se.accepted=1]="accepted",se[se.declined=2]="declined";var me,fe,de=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:yt,teamUser:bt,status:S(t.GameInviteStatus)}})],n)}(T);(me=t.TeamEventTypes||(t.TeamEventTypes={}))[me.training=1]="training",me[me.other=2]="other";var he,ge=((fe={})[t.TeamEventTypes.training]="Тренировка",fe[t.TeamEventTypes.other]="Другое",fe),ve=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:ge[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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:S(t.TeamEventTypes),team:Y,datetime:C}})],n)}(T);(he=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[he.accepted=1]="accepted",he[he.declined=2]="declined";var _e,ye,be=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:S(t.TeamEventInviteStatuses)}})],e)}(),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:bt}})],e)}(T),Te=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:Y,tournament:lt,userInvites:ke}})],e)}(T);(_e=t.NotificationType||(t.NotificationType={}))[_e.team_updated=1]="team_updated",_e[_e.team_invited=2]="team_invited",_e[_e.team_join_request=3]="team_join_request",_e[_e.team_join_declined_by_team=4]="team_join_declined_by_team",_e[_e.team_join_declined_by_user=5]="team_join_declined_by_user",_e[_e.team_join_canceled_by_team=6]="team_join_canceled_by_team",_e[_e.team_join_canceled_by_user=7]="team_join_canceled_by_user",_e[_e.team_joined_for_user=8]="team_joined_for_user",_e[_e.team_joined_for_team=9]="team_joined_for_team",_e[_e.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",_e[_e.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",_e[_e.team_user_number_changed=12]="team_user_number_changed",_e[_e.team_user_deleted_for_user=13]="team_user_deleted_for_user",_e[_e.team_user_deleted_for_team=14]="team_user_deleted_for_team",_e[_e.team_user_left=15]="team_user_left",_e[_e.game_updated=16]="game_updated",_e[_e.game_invited=17]="game_invited",_e[_e.game_invite_accepted=18]="game_invite_accepted",_e[_e.game_invite_declined=19]="game_invite_declined",_e[_e.game_remind=20]="game_remind",_e[_e.game_won=21]="game_won",_e[_e.game_losing=22]="game_losing",_e[_e.game_tech_defeat=23]="game_tech_defeat",_e[_e.game_tech_victory=24]="game_tech_victory",_e[_e.poll_created=25]="poll_created",_e[_e.poll_closed=26]="poll_closed",_e[_e.team_event_invited=27]="team_event_invited",_e[_e.team_event_accepted=28]="team_event_accepted",_e[_e.team_event_declined=29]="team_event_declined",_e[_e.team_event_remind=30]="team_event_remind",_e[_e.tournament_invited=31]="tournament_invited",_e[_e.tournament_joined=32]="tournament_joined",_e[_e.tournament_join_declined=33]="tournament_join_declined",_e[_e.tournament_join_canceled=34]="tournament_join_canceled",_e[_e.tournament_user_invited=35]="tournament_user_invited",_e[_e.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",_e[_e.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",_e[_e.tournament_user_added=38]="tournament_user_added",_e[_e.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",_e[_e.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",_e[_e.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",_e[_e.tournament_user_deleted=42]="tournament_user_deleted",_e[_e.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",_e[_e.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",_e[_e.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",_e[_e.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",_e[_e.tournament_team_deleted=47]="tournament_team_deleted",_e[_e.org_tournament_invite_created=48]="org_tournament_invite_created",_e[_e.org_tournament_invite_declined=49]="org_tournament_invite_declined",_e[_e.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",_e[_e.org_tournament_invite_changed=51]="org_tournament_invite_changed",_e[_e.org_tournament_user_deleted=52]="org_tournament_user_deleted",_e[_e.org_tournament_user_invited=53]="org_tournament_user_invited",_e[_e.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",_e[_e.org_tournament_team_leave=55]="org_tournament_team_leave",(ye=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[ye.public=1]="public",ye[ye.org=2]="org";var Se,Pe=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.NotificationType),initiator:J,team:Y,teamInvite:pe,teamUser:bt,poll:le,game:yt,gameInvite:de,teamEvent:ve,teamEventInvite:be,tournament:lt,tournamentInvite:Te,tournamentTeam:Tt,service:S(t.NotificationServiceEnum),createdAt:C}})],n)}(T);(Se=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Se.all=1]="all",Se[Se.important=2]="important",Se[Se.none=3]="none";var Fe,we=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:S(t.NotificationAllowTypes),browser:S(t.NotificationAllowTypes)}})],n)}(T),Ce=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return g(this,void 0,void 0,(function(){return v(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={}),g(this,void 0,void 0,(function(){var r,a,s,u,c,l;return v(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=_(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){c={error:t}}finally{try{s&&!s.done&&(l=a.return)&&l.call(a)}finally{if(c)throw c.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Pe.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return g(this,void 0,void 0,(function(){return v(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 Pe.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Pe.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",we.toBack(t)).pipe(o.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ge=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(Ht))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(Ce),Ie=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(Ht))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(Ce),Ue=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return E.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",team_user:"teamUser",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"},relation:{team:Y,teamUser:bt,tournamentTeamUser:Pt,tournamentTeam:Tt,user:J,month:w}})],e)}(At);(Fe=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[Fe.for_all=1]="for_all",Fe[Fe.for_users=2]="for_users",Fe[Fe.for_team=3]="for_team";var Le,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:S(t.TeamPermissionTypes),games:S(t.TeamPermissionTypes),statistic:S(t.TeamPermissionTypes),polls:S(t.TeamPermissionTypes),events:S(t.TeamPermissionTypes)}})],n)}(T),He=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.TeamUserRole)}})],n)}(T),Ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.search=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(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 Y.toFront(t)}))).toPromise()]}))}))},i.prototype.create=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",Y.toBack(t)).pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(o.map((function(t){return He.toFront(t)}))).toPromise()]}))}))},i.prototype.update=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",Y.toBack(e)).pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.delete=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},i.prototype.getPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},i.prototype.updatePermission=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",Oe.toBack(e)).pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsers=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserRole=function(e,n,i){return g(this,void 0,void 0,(function(){return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserNumber=function(t,e,n){return g(this,void 0,void 0,(function(){return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteUser=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(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 Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.resendInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvitesExternal=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInviteExternal=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",Be.toBack(e)).pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteInviteExternal=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(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 Be.toFront(t)}))).toPromise()]}))}))},i.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return v(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 le.toFront(t)}))).toPromise()]}))}))},i.prototype.createPoll=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",le.toBack(e)).pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsersStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},i.prototype.joinTeam=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},i.prototype.leaveTeam=function(t){return g(this,void 0,void 0,(function(){return v(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),g(this,void 0,void 0,(function(){return v(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 yt.toFront(t)}))).toPromise()]}))}))},i.prototype.createGame=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",yt.toBack(e)).pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.createTeamEvent=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",ve.toBack(e)).pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return v(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:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.acceptTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.declineTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.registerLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:J.toBack(e)}).pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.getLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:J.toBack(e)}).pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},i.prototype.resendLazyUserEmail=function(t){return g(this,void 0,void 0,(function(){return v(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:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),xe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",ve.toBack(t)).pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").toPromise()]}))}))},t.prototype.getTeamEventInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:O,author:J,createdAt:C}})],e)}(T),Ee=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),Ne=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:F(Ee)}})],e)}(T);(Le=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[Le.open=0]="open",Le[Le.in_progress=1]="in_progress",Le[Le.closed=2]="closed";var Me,ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:w,status:S(t.TournamentStageStatuses)}})],n)}(T);function De(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}(Me=t.PlayoffTypes||(t.PlayoffTypes={})).double_elimination="double_elimination",Me.elimination="elimination";var Re,qe,We=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount",type:"type"},relation:{type:S(t.PlayoffTypes)}})],n)}(T),$e=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=De(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:We}})],e)}(T),Xe=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:Tt,group:kt}})],e)}(T);!function(t){t[t.admin=1]="admin",t[t.moderator=2]="moderator",t[t.game_manager=3]="game_manager"}(Re||(Re={})),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"}(qe||(qe={}));!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=Re[t]},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",user:"user",role:"role",permissions:"permissions"},relation:{user:J,permissions:F(S(qe))}})],e)}(T);var Je,Ye=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/"+e+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return ze.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return $e.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return Ne.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return void 0===a&&(a={}),g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return v(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 yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},i.prototype.getHockeyStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic/",{params:e}).pipe(o.map((function(t){return Yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeamUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/users/").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.myPermission=function(t){return g(this,void 0,void 0,(function(){return v(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 qe[t]}))}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Ze=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",join_data:"joinData"},relation:{team:Y,joinData:Ze}})],e)}(T),Qe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return g(this,void 0,void 0,(function(){return v(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 Ke.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return v(this,(function(r){return i={team:{id:e},user_invites:ke.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),tn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return v(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 at.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return v(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 Ne.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),en=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return ze.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return $e.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(T);(Je=t.UserPermissionTypes||(t.UserPermissionTypes={}))[Je.denied=1]="denied",Je[Je.for_all=2]="for_all",Je[Je.for_users=3]="for_users",Je[Je.for_team=4]="for_team";var on,rn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:S(t.UserPermissionTypes),games:S(t.UserPermissionTypes),teams:S(t.UserPermissionTypes),statistic:S(t.UserPermissionTypes)}})],n)}(T),an=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCurrentUser=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(o.map((function(t){return nn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",J.toBack(e)).pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return g(this,void 0,void 0,(function(){var n;return v(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 g(this,void 0,void 0,(function(){var i;return v(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 g(this,void 0,void 0,(function(){var o;return v(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 g(this,void 0,void 0,(function(){var i;return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(o.map((function(t){return q.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",V.toBack(t)).pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",q.toBack(t)).pipe(o.map((function(t){return q.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(o.map((function(t){return rn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",rn.toBack(t)).pipe(o.map((function(t){return rn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 de.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 de.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return g(this,void 0,void 0,(function(){var e;return v(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 J.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return g(this,void 0,void 0,(function(){return v(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 J.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:je,competitorTeam:je}})],e)}(T),un=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T);(on=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[on.enter_game=1]="enter_game",on[on.exit_game=2]="exit_game",on[on.remove_game=3]="remove_game",on[on.serve_hit=4]="serve_hit",on[on.serve_fault=5]="serve_fault",on[on.serve_ace=6]="serve_ace",on[on.stuff_block=7]="stuff_block",on[on.block_fault=8]="block_fault",on[on.block_rebound=9]="block_rebound",on[on.attack_spike=10]="attack_spike",on[on.attack_fault=11]="attack_fault",on[on.attack_shot=12]="attack_shot",on[on.receive=13]="receive",on[on.receive_fault=14]="receive_fault",on[on.excellent_receive=15]="excellent_receive",on[on.point=16]="point",on[on.fault=17]="fault",on[on.serve_receive=18]="serve_receive",on[on.serve_receive_fault=19]="serve_receive_fault",on[on.excellent_serve_receive=20]="excellent_serve_receive",on[on.timeout=21]="timeout",on[on.yellow_card=22]="yellow_card";var cn,ln,pn,mn,fn,dn,hn,gn,vn,_n,yn,bn,kn,Tn=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],Sn=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],Pn=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 Tn.includes(this.logType)},n.prototype.isFaultType=function(){return Sn.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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{logType:S(t.VolleyballGameLogType),datetime:C}})],n)}(T),Fn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 sn.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 un.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 Pn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),wn=((cn={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",cn[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",cn[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",cn[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",cn[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",cn[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",cn[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",cn[t.BasketballGameLogTypes.two_point_made]="2 очка",cn[t.BasketballGameLogTypes.three_point_made]="3 очка",cn[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",cn[t.BasketballGameLogTypes.one_point_made]="1 очко",cn[t.BasketballGameLogTypes.assist]="Передача",cn[t.BasketballGameLogTypes.block]="Блокшот",cn[t.BasketballGameLogTypes.rebound]="Подбор",cn[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",cn[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",cn[t.BasketballGameLogTypes.steal]="Перехват",cn[t.BasketballGameLogTypes.turnover]="Потеря",cn[t.BasketballGameLogTypes.personal_foul]="Фол",cn[t.BasketballGameLogTypes.technical_foul]="Технический фол",cn[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",cn[t.BasketballGameLogTypes.timeout]="Таймаут",cn),Cn=((ln={})[t.HockeyGameLogTypes.enter_game]="Выход на площадку",ln[t.HockeyGameLogTypes.exit_game]="Ушел с площадки",ln[t.HockeyGameLogTypes.shot_miss]="Бросок мимо",ln[t.HockeyGameLogTypes.shot_on_goal]="Бросок по воротам",ln[t.HockeyGameLogTypes.shot_blocked]="Заблокированный бросок",ln[t.HockeyGameLogTypes.goal]="Гол",ln[t.HockeyGameLogTypes.shootout_attempt]="Булит промах",ln[t.HockeyGameLogTypes.shootout_goal]="Булит гол",ln[t.HockeyGameLogTypes.assist]="Передача",ln[t.HockeyGameLogTypes.block_shot]="Блокировка броска",ln[t.HockeyGameLogTypes.minor_penalty]="Малый штраф",ln[t.HockeyGameLogTypes.major_penalty]="Большой штраф",ln[t.HockeyGameLogTypes.misconduct_penalty]="Дисциплинарный штраф",ln[t.HockeyGameLogTypes.game_misconduct_penalty]="Дисциплинарный штраф до конца игры",ln[t.HockeyGameLogTypes.match_penalty]="Матч-штраф",ln[t.HockeyGameLogTypes.penalty_shot]="Штрафной бросок",ln[t.HockeyGameLogTypes.face_off_lose]="Проигрыш в вбрасывании",ln[t.HockeyGameLogTypes.face_off_win]="Победа в вбрасывании",ln[t.HockeyGameLogTypes.save]="Отражен бросок",ln[t.HockeyGameLogTypes.timeout]="Таймаут",ln[t.HockeyGameLogTypes.penalty_start]="Начало штрафного времени",ln[t.HockeyGameLogTypes.penalty_end]="Конец штрафного времени",ln),Gn=((pn={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",pn[t.OvertimeTypes.to_score_total]="До N очков",pn[t.OvertimeTypes.time]="По времени",pn[t.OvertimeTypes.without_overtime]="Без овертайма",pn[t.OvertimeTypes.to_first_goal]="На N минут до первой шайбы",pn[t.OvertimeTypes.to_first_goal_and_bullitts]="На N минут до первой шайбы + буллиты",pn[t.OvertimeTypes.bullitts]="Буллиты",pn),In=((mn={})[t.TeamUserRole.moderator]="Модератор",mn[t.TeamUserRole.member]="Пользователь",mn[t.TeamUserRole.admin]="Владелец",mn),Un=((fn={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",fn[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",fn[t.GameBasketballPosition.small_forward]="Легкий форвард",fn[t.GameBasketballPosition.power_forward]="Мощный форвард",fn[t.GameBasketballPosition.center]="Центровой",fn),Bn=((dn={})[t.GameBasketballPosition.point_guard]="PG",dn[t.GameBasketballPosition.shooting_guard]="SG",dn[t.GameBasketballPosition.small_forward]="SF",dn[t.GameBasketballPosition.power_forward]="PF",dn[t.GameBasketballPosition.center]="C",dn),jn=((hn={})[t.WorkHand.left]="Левая",hn[t.WorkHand.right]="Правая",hn),Ln=((gn={})[t.GameVolleyballPosition.setter]="Связующий",gn[t.GameVolleyballPosition.libero]="Либеро",gn[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",gn[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",gn[t.GameVolleyballPosition.dioganal]="Диагональный",gn),On=((vn={})[t.GameVolleyballPosition.setter]="S",vn[t.GameVolleyballPosition.libero]="L",vn[t.GameVolleyballPosition.middle_player]="MP",vn[t.GameVolleyballPosition.receiver_attacker]="RA",vn[t.GameVolleyballPosition.dioganal]="D",vn),Hn=((_n={})[t.GameVolleyballPosition.setter]="связ.",_n[t.GameVolleyballPosition.libero]="либеро",_n[t.GameVolleyballPosition.middle_player]="блок.",_n[t.GameVolleyballPosition.receiver_attacker]="доигр.",_n[t.GameVolleyballPosition.dioganal]="диаг.",_n),An=((yn={})[t.VolleyballWorkHand.left]="Левая",yn[t.VolleyballWorkHand.right]="Правая",yn),xn=((bn={})[t.GameHockeyPosition.goaltender]="Вратарь",bn[t.GameHockeyPosition.defensemen]="Защитник",bn[t.GameHockeyPosition.forward]="Нападающий",bn),Vn=((kn={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",kn[t.VolleyballGameLogType.exit_game]="Уход с площадки",kn[t.VolleyballGameLogType.remove_game]="Удаление с площадки",kn[t.VolleyballGameLogType.serve_ace]="Эйс",kn[t.VolleyballGameLogType.serve_hit]="Подача",kn[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",kn[t.VolleyballGameLogType.attack_spike]="Результативная атака",kn[t.VolleyballGameLogType.attack_shot]="Успешная атака",kn[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",kn[t.VolleyballGameLogType.stuff_block]="Результативный блок",kn[t.VolleyballGameLogType.block_rebound]="Успешный блок",kn[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",kn[t.VolleyballGameLogType.excellent_receive]="Отличный прием",kn[t.VolleyballGameLogType.receive]="Прием",kn[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",kn[t.VolleyballGameLogType.serve_receive]="Прием подачи",kn[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",kn[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",kn[t.VolleyballGameLogType.point]="Очко",kn[t.VolleyballGameLogType.fault]="Ошибка",kn[t.VolleyballGameLogType.timeout]="Таймаут",kn[t.VolleyballGameLogType.yellow_card]="Предупреждение",kn),En=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:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Nn=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}(),Mn=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=_(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}(),zn=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}(Mn);function Dn(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function Rn(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 qn=function(){function t(t,e){this.injector=t,this.platformId=e,this.isBrowser=l.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);t=t.clone({withCredentials:!0});var n=Dn("csrftoken");return n&&(t=t.clone({setHeaders:{"X-CSRFToken":n}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=d([e.Injectable(),h(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=T,t.BaseService=Ot,t.BaseStatistic=At,t.BasketballGameApi=Dt,t.BasketballGameConfig=pt,t.BasketballGameLog=zt,t.BasketballGameLogTypeLocalization=wn,t.BasketballGameStatistic=Et,t.BasketballGameTeamStatistic=Vt,t.BasketballProfile=z,t.BasketballStatistic=xt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=En,t.City=E,t.ConfigService=Ht,t.DateField=w,t.DateTimeField=C,t.FAULT_LOG_TYPES=Sn,t.Feedback=Rt,t.FeedbackApi=qt,t.File=O,t.FileApi=Wt,t.Game=yt,t.GameBasketballPositionLocalization=Un,t.GameBasketballPositionShortLocalization=Bn,t.GameHockeyPositionLocalization=xn,t.GameInvite=de,t.GameTimelineStageItem=Ee,t.GameTimelineStages=Ne,t.GameUser=Ft,t.GameVolleyballPositionLocalization=Ln,t.GameVolleyballPositionShortLocalization=On,t.GameVolleyballPositionShortRuLocalization=Hn,t.HockeyGameApi=Kt,t.HockeyGameConfig=vt,t.HockeyGameLog=Xt,t.HockeyGameLogTypeLocalization=Cn,t.HockeyGameStatistic=Jt,t.HockeyGameTeamStatistic=Zt,t.HockeyPenaltyTypes=k,t.HockeyProfile=$,t.HockeyStatistic=Yt,t.HttpCookieInterceptor=qn,t.League=K,t.LeagueApi=ie,t.LeagueCourt=ht,t.LeagueNews=te,t.LeagueNewsApi=re,t.LeaguePartner=oe,t.LocalStorageEngine=zn,t.MediaApi=ae,t.MediaItem=gt,t.ModelInstance=G,t.Notification=Pe,t.NotificationApi=Ge,t.NotificationBaseApi=Ce,t.NotificationSettings=we,t.OrgNotificationApi=Ie,t.Organization=Z,t.OvertimeTypeLocalization=Gn,t.Playoff=$e,t.PlayoffSettings=We,t.Poll=le,t.PollAnswer=ce,t.PollVariant=ue,t.ReferenceApi=Ue,t.SCORE_LOG_TYPES=Tn,t.Sport=x,t.StorageEngine=Mn,t.StorageEngineField=Nn,t.Store=Lt,t.Team=Y,t.TeamAccess=He,t.TeamApi=Ae,t.TeamEvent=ve,t.TeamEventApi=xe,t.TeamEventInvite=be,t.TeamEventTypeLocalization=ge,t.TeamInvite=pe,t.TeamInviteExternal=Be,t.TeamPermission=Oe,t.TeamUser=bt,t.TeamUserRoleLocalization=In,t.ToBackHook=B,t.ToFrontHook=U,t.Tournament=lt,t.TournamentApi=Ye,t.TournamentDisqualification=St,t.TournamentEvent=ne,t.TournamentGroup=kt,t.TournamentInvite=Te,t.TournamentJoinApi=Qe,t.TournamentJoinData=Ze,t.TournamentJoinTeam=Ke,t.TournamentNews=Ve,t.TournamentSeason=at,t.TournamentSeasonApi=tn,t.TournamentSettings=ut,t.TournamentStage=ze,t.TournamentStageApi=en,t.TournamentStageTeam=Xe,t.TournamentTeam=Tt,t.TournamentTeamUser=Pt,t.TournamentTeamUserInvite=ke,t.TournamentTeamWinner=ct,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=J,t.UserAccess=nn,t.UserApi=an,t.UserPermission=rn,t.UserProfile=V,t.VolleyballGameApi=Fn,t.VolleyballGameConfig=dt,t.VolleyballGameLog=Pn,t.VolleyballGameLogTypeLocalization=Vn,t.VolleyballGameStatistic=un,t.VolleyballGameTeamStatistic=sn,t.VolleyballProfile=q,t.VolleyballStatistic=je,t.VolleyballWorkHandLocalization=An,t.WorkHandLocalization=jn,t.addItemInArray=Gt,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=Rn(a);try{for(var u=_(s),c=u.next();!c.done;c=u.next()){var l=c.value,p=t.createElement("link");try{for(var m=(i=void 0,_(Object.keys(l))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,l[d])}}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(p)}}catch(t){n={error:t}}finally{try{c&&!c.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=Ut,t.enumField=S,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=De,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=Dn,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=Rn,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=F,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof c.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof c.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&&Bt(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=wt,t.updateItemsInArray=Ct,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}},t.ɵa=P,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
15
|
+
***************************************************************************** */var p=function(t,e){return(p=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}p(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 d(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 h(t,e){return function(n,o){e(n,o,t)}}function g(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 v(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 _(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 y(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(y(arguments[e]));return t}var k=[{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:"Штраф вратаря"}],T=function(){function t(t){var e,n;if(t)try{for(var o=_(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 S(t){return{toFront:function(e){return isNaN(+e)?t[e]:e},toBack:function(e){return isNaN(+e)?e:t[e]}}}function P(){return{toFront:function(t){return t?"object"==typeof t?t:k.find((function(e){return e.id===t})):null},toBack:function(t){return t?"object"==typeof t?t.id:t:null}}}function F(t){return{toFront:function(e){return Array.isArray(e)?t.toFront(e):[]},toBack:function(e){return Array.isArray(e)?t.toBack(e):[]}}}var w=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}(T),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}(T);function G(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 c=_(Object.keys(s)),l=c.next();!l.done;l=c.next()){var p=l.value,m=s[p],f=j(p,n);u&&u.hasOwnProperty(m)?a[m]=u[m].toFront(f):a[m]=f}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}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 c=_(Object.keys(s)),l=c.next();!l.done;l=c.next()){var p=l.value,m=s[p];u&&u.hasOwnProperty(m)&&void 0!==n[m]?a[p]=u[m].toBack(n[m]):a[p]=n[m]}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(i)throw i.error}}return a}(e,t)})}}var I,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)}}},B=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 j(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=_(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}}(I=t.FileEngine||(t.FileEngine={}))[I.django=1]="django",I[I.s3=2]="s3";var L,O=function(){function e(){}return e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",path:"path",mime_type:"mimeType",size:"size",engine:"engine"},relation:{engine:S(t.FileEngine)}})],e)}();(L=t.SportTypes||(t.SportTypes={}))[L.basketball=1]="basketball",L[L.volleyball=2]="volleyball",L[L.classic_basketball=3]="classic_basketball",L[L.streetball=4]="streetball",L[L.classic_volleyball=5]="classic_volleyball",L[L.beach_volleyball=6]="beach_volleyball",L[L.hockey=7]="hockey",L[L.ice_hockey=8]="ice_hockey",L[L.ball_hockey=9]="ball_hockey";var H,A,x=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.toFront=function(t){return null},n.toBack=function(t){return null},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",parent_id:"parentId",sub_sports:"subSports"}})],n)}(T),V=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{id:"id",user_id:"userId",height:"height",weight:"weight"}})],t)}(),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name"}})],e)}(T);(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 M,N,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameBasketballPosition),workHand:S(t.WorkHand)}})],n)}(T);(M=t.GameVolleyballPosition||(t.GameVolleyballPosition={}))[M.setter=1]="setter",M[M.libero=2]="libero",M[M.middle_player=3]="middle_player",M[M.receiver_attacker=4]="receiver_attacker",M[M.dioganal=5]="dioganal",(N=t.VolleyballWorkHand||(t.VolleyballWorkHand={}))[N.left=1]="left",N[N.right=2]="right";var D,R,q=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameVolleyballPosition),workHand:S(t.VolleyballWorkHand)}})],n)}(T);(D=t.GameHockeyPosition||(t.GameHockeyPosition={}))[D.defensemen=1]="defensemen",D[D.forward=2]="forward",D[D.goaltender=3]="goaltender",(R=t.HockeyWorkHand||(t.HockeyWorkHand={}))[R.left=1]="left",R[R.right=2]="right";var 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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",user_id:"userId",position:"position",work_hand:"workHand"},relation:{position:S(t.GameHockeyPosition),workHand:S(t.HockeyWorkHand)}})],n)}(T);(W=t.UserGender||(t.UserGender={}))[W.male=1]="male",W[W.female=2]="female";var X,J=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}),d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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",wizards:"wizards",city:"city",gender:"gender",is_active:"isActive"},relation:{birthDate:w,photo:O,profile:V,basketballProfile:z,volleyballProfile:q,hockeyProfile:$,city:E,gender:S(t.UserGender)}})],n)}(T),Y=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"),t.join(" ")},e.toFront=function(t){return null},e.toBack=function(t){return null},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:x,logo:O,owner:J,city:E,closestGameDatetime:w}})],e)}(T),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",owner_id:"ownerId",owner:"owner"},relation:{owner:J}})],e)}(T),K=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"https://vk.com/"===t.substr(0,15)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fbLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.facebook.com/"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instaLink",{get:function(){return this.socialLinks.find((function(t){return"https://www.instagram.com"===t.substr(0,25)}))},enumerable:!0,configurable:!0}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",closest_game_datetime:"closestGameDatetime",cover:"cover",about:"about"},relation:{organization:Z,logo:O,cover:O,sport:x}})],e)}(T);(X=t.TournamentSeasonStatuses||(t.TournamentSeasonStatuses={}))[X.open=0]="open",X[X.in_progress=1]="in_progress",X[X.closed=2]="closed";var Q,tt,et,nt,ot,it,rt,at=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",alias:"alias",logo:"logo",cover:"cover",preview_image:"previewImage",status:"status",start_date:"startDate",closed_date:"closedDate"},relation:{logo:O,cover:O,previewImage:O,status:S(t.TournamentSeasonStatuses),startDate:w,closedDate:w}})],n)}(T);(Q=t.TournamentTypes||(t.TournamentTypes={})).group="group",Q.elimination="elimination",Q.fiba="fiba",(tt=t.TournamentStatuses||(t.TournamentStatuses={}))[tt.open=0]="open",tt[tt.in_progress=1]="in_progress",tt[tt.closed=2]="closed",(et=t.TournamentGender||(t.TournamentGender={}))[et.male=1]="male",et[et.female=2]="female",et[et.all=3]="all",(nt=t.BasketballStatisticTypes||(t.BasketballStatisticTypes={}))[nt.standard=1]="standard",nt[nt.light=2]="light",nt[nt.advanced=3]="advanced",(ot=t.VolleyballStatisticTypes||(t.VolleyballStatisticTypes={}))[ot.standard=1]="standard",ot[ot.light=2]="light",ot[ot.advanced=3]="advanced",(it=t.GameTimeTypes||(t.GameTimeTypes={}))[it.clean=1]="clean",it[it.dirty=2]="dirty",(rt=t.OvertimeTypes||(t.OvertimeTypes={}))[rt.to_score_total=1]="to_score_total",rt[rt.to_score_diff=2]="to_score_diff",rt[rt.time=3]="time",rt[rt.without_overtime=4]="without_overtime",rt[rt.to_first_goal=5]="to_first_goal",rt[rt.to_first_goal_and_bullitts=6]="to_first_goal_and_bullitts",rt[rt.bullitts=7]="bullitts";var st,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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",shot_clock_enabled:"shotClockEnabled",game_time_type:"gameTimeType",with_result_table:"withResultTable"},relation:{type:S(t.TournamentTypes),gender:S(t.TournamentGender),basketballStatisticType:S(t.BasketballStatisticTypes),volleyballStatisticType:S(t.VolleyballStatisticTypes),gameTimeType:S(t.GameTimeTypes),overtimeType:S(t.OvertimeTypes)}})],n)}(T),ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_id:"teamId",tournament_id:"tournamentId",team:"team",points:"points"},relation:{team:Y}})],e)}(T),lt=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"),t.join(" ")},n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{logo:O,cover:O,previewImage:O,city:E,sport:x,regulationFile:O,settings:ut,date:C,league:K,status:S(t.TournamentStatuses),teamWinner:ct,teamSecond:ct,teamThird:ct,season:at}})],n)}(T),pt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.OvertimeTypes),statisticType:S(t.BasketballStatisticTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(st=t.VolleyballGameTypes||(t.VolleyballGameTypes={}))[st.best_of_five=1]="best_of_five",st[st.best_of_three=2]="best_of_three";var mt,ft,dt=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{gameType:S(t.VolleyballGameTypes),statisticType:S(t.VolleyballStatisticTypes)}})],n)}(T),ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",address:"address",league_id:"leagueId"}})],e)}(T),gt=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T),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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.OvertimeTypes),gameTimeType:S(t.GameTimeTypes)}})],n)}(T);(mt=t.GameStatuses||(t.GameStatuses={}))[mt.open=1]="open",mt[mt.in_progress=2]="in_progress",mt[mt.closed=3]="closed",mt[mt.archived=4]="archived",mt[mt.draft=5]="draft",(ft=t.GameResultTypes||(t.GameResultTypes={}))[ft.team_won=1]="team_won",ft[ft.competitor_team_won=2]="competitor_team_won",ft[ft.team_technical_defeat=3]="team_technical_defeat",ft[ft.competitor_team_technical_defeat=4]="competitor_team_technical_defeat";var _t,yt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),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 this.teamScore>this.competitorTeamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isCompetitorTeamWon",{get:function(){return this.competitorTeamScore>this.teamScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"teamWinnerId",{get:function(){return this.status!==t.GameStatuses.closed||this.teamScore===this.competitorTeamScore?null:this.team.id?this.teamScore>this.competitorTeamScore?this.team.id:this.competitorTeam.id:this.teamScore>this.competitorTeamScore?this.teamId:this.competitorTeamId},enumerable:!0,configurable:!0}),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",status:"status",team:"team",tournament_team_id:"tournamentTeamId",team_id:"teamId",competitor_team:"competitorTeam",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",basketball_game_config:"basketballGameConfig",volleyball_game_config:"volleyballGameConfig",hockey_game_config:"hockeyGameConfig",score_by_period:"scoreByPeriod",playoff_stage:"playoffStage",tournament_stage_id:"tournamentStageId",tournament_playoff_id:"tournamentPlayoffId",tournament_court:"tournamentCourt",media_count:"mediaCount",media_live_count:"mediaLiveCount",media:"media",tournament:"tournament"},relation:{status:S(t.GameStatuses),team:Y,competitorTeam:Y,datetime:C,resultType:S(t.GameResultTypes),basketballGameConfig:pt,volleyballGameConfig:dt,hockeyGameConfig:vt,tournamentCourt:ht,media:F(gt),tournament:lt}})],n)}(T);(_t=t.TeamUserRole||(t.TeamUserRole={}))[_t.member=1]="member",_t[_t.moderator=2]="moderator",_t[_t.admin=3]="admin";var bt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_id:"teamId",user:"user",role:"role",number:"number",team:"team"},relation:{user:J,team:Y,role:S(t.TeamUserRole)}})],n)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",tournament_stage_id:"tournamentStageId"}})],e)}(T),Tt=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",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",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"},relation:{tournament:lt,team:Y,group:kt,games:yt}})],e)}(T),St=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team_user_id:"tournamentTeamUserId",date_from:"dateFrom",date_to:"dateTo",matches_count:"matchesCount"},relation:{dateFrom:w,dateTo:w}})],e)}(T),Pt=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}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team:"tournamentTeam",team_user:"teamUser",disqualified:"disqualified",first_name:"firstName",last_name:"lastName",middle_name:"middleName",photo:"photo",disqualification:"disqualification",has_changes:"hasChanges"},relation:{tournamentTeam:Tt,teamUser:bt,photo:O,disqualification:St}})],e)}(T),Ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",game_id:"gameId",team_user:"teamUser",tournament_team_user:"tournamentTeamUser",updated_at:"updatedAt"},relation:{teamUser:bt,tournamentTeamUser:Pt,updatedAt:C}})],e)}(T);function wt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.map((function(t){if(o&&Bt(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 Ct(t,e,n,o){return void 0===n&&(n=!1),e.forEach((function(e){t=wt(t,e,n,o)})),t}function Gt(t,e,n,o){return void 0===n&&(n=!1),Array.isArray(t)?t.find((function(t){return Bt(o)?o(t):t.id===e.id}))?t:n?b(t,[e]):b([e],t):[e]}function It(t,e,n,o){return void 0===n&&(n=!1),(n?e:Object.assign([],e).reverse()).forEach((function(e){t=Gt(t,e,n,o)})),t}function Ut(t,e){return Array.isArray(t)?Bt(e)?t.filter((function(t){return!e(t)})):t.filter((function(t){return t.id!==e.id})):[]}function Bt(t){return t&&"[object Function]"==={}.toString.call(t)}var jt,Lt=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,Gt(this.value(t)||[],e,!0,n))},t.prototype.appendItems=function(t,e,n){this.save(t,It(this.value(t)||[],e,!0))},t.prototype.prependItem=function(t,e,n){this.save(t,Gt(this.value(t)||[],e,!1,n))},t.prototype.prependItems=function(t,e,n){this.save(t,It(this.value(t)||[],e,!1,n))},t.prototype.updateItem=function(t,e,n,o){this.save(t,wt(this.value(t)||[],e,n,o))},t.prototype.updateItems=function(t,e,n,o){this.save(t,Ct(this.value(t)||[],e,n,o))},t.prototype.deleteItem=function(t,e){this.save(t,Ut(this.value(t)||[],e))},t.prototype.dispose=function(){var t,e;try{for(var n=_(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}(),Ot=function(){function t(){this.store=new Lt}return t.prototype.dispose=function(){this.store.dispose()},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ht=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=d([e.Injectable({providedIn:"root"}),h(0,e.Optional()),h(0,e.Inject("mtg-core-config-data"))],n)}(Ot),At=function(){},xt=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}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",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",newbie:"newbie"},relation:{tournamentTeamUser:Pt,team:Y,teamUser:bt,user:J,tournamentTeam:Tt,month:w}})],e)}(At),Vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:xt,competitorTeam:xt}})],e)}(T),Et=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}),d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T);(jt=t.BasketballGameLogTypes||(t.BasketballGameLogTypes={}))[jt.enter_game=1]="enter_game",jt[jt.exit_game=2]="exit_game",jt[jt.remove_game=3]="remove_game",jt[jt.two_point_made=4]="two_point_made",jt[jt.three_point_made=5]="three_point_made",jt[jt.free_throw_made=6]="free_throw_made",jt[jt.two_point_attempt=7]="two_point_attempt",jt[jt.three_point_attempt=8]="three_point_attempt",jt[jt.free_throw_attempt=9]="free_throw_attempt",jt[jt.assist=10]="assist",jt[jt.block=11]="block",jt[jt.rebound=12]="rebound",jt[jt.offensive_rebound=13]="offensive_rebound",jt[jt.defensive_rebound=14]="defensive_rebound",jt[jt.steal=15]="steal",jt[jt.turnover=16]="turnover",jt[jt.personal_foul=17]="personal_foul",jt[jt.technical_foul=18]="technical_foul",jt[jt.unsportsmanlike_foul=19]="unsportsmanlike_foul",jt[jt.one_point_attempt=20]="one_point_attempt",jt[jt.one_point_made=21]="one_point_made",jt[jt.timeout=22]="timeout";var Mt,Nt,zt=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.BasketballGameLogTypes)}})],n)}(T),Dt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_basketball_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Vt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Et.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 zt.toFront(t)}))).toPromise()]}))}))},t.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.prototype.downloadFibaProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Rt=function(){function t(){}return t.toFront=function(t){return null},t.toBack=function(t){return null},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{id:"id",theme:"theme",message:"message",files:"files",email:"email",captcha:"captcha"},relation:{files:O}})],t)}(),qt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.sendFeedback=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/feedback/",Rt.toBack(t)).pipe(o.map((function(t){return Rt.toFront(t)}))).toPromise()]}))}))},t.prototype.sendLeagueFeedback=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/feedback/",Rt.toBack(e)).pipe(o.map((function(t){return Rt.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Wt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.upload=function(t,e){return g(this,void 0,void 0,(function(){var n;return v(this,(function(i){return(n=new FormData).append("file",t,e),[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/file/",n).pipe(o.map((function(t){return O.toFront(t)}))).toPromise()]}))}))},t.prototype.createZipArchive=function(t){return g(this,void 0,void 0,(function(){var e,n,o,i,r,a;return v(this,(function(s){e=new FormData;try{for(n=_(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:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();(Mt=t.HockeyGameLogTypes||(t.HockeyGameLogTypes={}))[Mt.enter_game=1]="enter_game",Mt[Mt.exit_game=2]="exit_game",Mt[Mt.shot_miss=3]="shot_miss",Mt[Mt.shot_on_goal=4]="shot_on_goal",Mt[Mt.shot_blocked=5]="shot_blocked",Mt[Mt.goal=6]="goal",Mt[Mt.shootout_attempt=7]="shootout_attempt",Mt[Mt.shootout_goal=8]="shootout_goal",Mt[Mt.assist=9]="assist",Mt[Mt.block_shot=10]="block_shot",Mt[Mt.minor_penalty=11]="minor_penalty",Mt[Mt.major_penalty=12]="major_penalty",Mt[Mt.misconduct_penalty=13]="misconduct_penalty",Mt[Mt.game_misconduct_penalty=14]="game_misconduct_penalty",Mt[Mt.match_penalty=15]="match_penalty",Mt[Mt.penalty_shot=16]="penalty_shot",Mt[Mt.face_off_lose=17]="face_off_lose",Mt[Mt.face_off_win=18]="face_off_win",Mt[Mt.save=19]="save",Mt[Mt.timeout=20]="timeout",Mt[Mt.penalty_start=21]="penalty_start",Mt[Mt.penalty_end=22]="penalty_end",(Nt=t.HockeyAdvantageTypes||(t.HockeyAdvantageTypes={}))[Nt.power_play=1]="power_play",Nt[Nt.shorthanded=2]="shorthanded",Nt[Nt.even_strength=3]="even_strength";var $t,Xt=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].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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.HockeyGameLogTypes),advantage:S(t.HockeyAdvantageTypes),penaltyType:P()}})],n)}(T),Jt=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},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,"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,"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,"gameMinutes",{get:function(){return Math.floor(this.gameTime/60)},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus"},relation:{updatedAt:C}})],e)}(T),Yt=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(){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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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",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",sh_goals:"shGoals",shot_misses:"shotMisses",shots_on_goal:"shotsOnGoal",shots_blocked:"shotsBlocked",shots:"shots",goals_percent:"goalsPercent",shots_against:"shotsAgainst",saves_percent:"savesPercent",pp_assists:"ppAssists",ev_assists:"evAssists",sh_assists:"shAssists",shootout_attempts:"shootoutAttempts",shootout_goals:"shootoutGoals",block_shots:"blockShots",face_off_losses:"faceOffLosses",face_off_wins:"faceOffWins",face_offs:"faceOffs",face_off_percent:"faceOffPercent",saves:"saves",goals_against:"goalsAgainst",safety_rate:"safetyRate",penalty_minutes:"penaltyMinutes",game_time:"gameTime",plus_minus:"plusMinus",newbie:"newbie"},relation:{tournamentTeamUser:Pt,team:Y,teamUser:bt,user:J,tournamentTeam:Tt,month:w}})],e)}(At),Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:Yt,competitorTeam:Yt}})],e)}(T),Kt=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_hockey_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Zt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 Jt.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 Xt.toFront(t)}))).toPromise()]}))}))},t.prototype.downloadProtocol=function(t,e){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.prototype.downloadApplication=function(t,e,o){return g(this,void 0,void 0,(function(){return v(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()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}();($t=t.LeagueNewsType||(t.LeagueNewsType={}))[$t.text=1]="text",$t[$t.video=2]="video";var Qt,te=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:F(lt),type:S(t.LeagueNewsType)}})],n)}(T);(Qt=t.TournamentEventTypes||(t.TournamentEventTypes={}))[Qt.game_closed=1]="game_closed",Qt[Qt.media_added=2]="media_added",Qt[Qt.news=3]="news";var ee,ne=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",game:"game",news:"news",league:"league",tournaments:"tournaments",event:"event",datetime:"datetime"},relation:{game:yt,news:te,league:K,tournaments:F(lt),datetime:w,event:S(t.TournamentEventTypes)}})],n)}(T),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",title:"title",picture:"picture",link:"link",sort:"sort"},relation:{picture:O}})],e)}(T),ie=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/").pipe(o.map((function(t){return K.toFront(t)}))).toPromise()]}))}))},i.prototype.getByDomain=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/by_domain/"+t+"/").pipe(o.map((function(t){return K.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentSeasons=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/").pipe(o.map((function(t){return at.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),a.tournamentCourtId&&(s=s.set("tournament_court_id",a.tournamentCourtId.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getSeasons=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(this,(function(r){return i=(new n.HttpParams).set("not_closed",e?"1":""),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournament_seasons/",{params:i}).pipe(o.map((function(t){return at.toFront(t)}))).toPromise()]}))}))},i.prototype.getPartners=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/partners/").pipe(o.map((function(t){return oe.toFront(t)}))).toPromise()]}))}))},i.prototype.getCourts=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/courts/").pipe(o.map((function(t){return ht.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),re=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),g(this,void 0,void 0,(function(){var s;return v(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:te.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getMainLeagueNews=function(t){return g(this,void 0,void 0,(function(){return v(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?te.toFront(t[0]):null}))).toPromise()]}))}))},i.prototype.getMainLeagueNewsList=function(t){return g(this,void 0,void 0,(function(){return v(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 te.toFront(t)}))).toPromise()]}))}))},i.prototype.getNewsById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league_news/"+t+"/").pipe(o.map((function(t){return te.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentNewsList=function(t){return g(this,void 0,void 0,(function(){return v(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:te.toFront(t.body)}}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getLeagueMedia=function(t,e,i,r){return void 0===r&&(r={}),g(this,void 0,void 0,(function(){var a;return v(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)),[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:gt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMediaById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/game_media/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGameMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/media/").pipe(o.map((function(t){return gt.toFront(t)}))).toPromise()]}))}))},i.prototype.createZip=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/media/zip/",t,{responseType:"blob"}).toPromise()]}))}))},i.prototype.downloadMedia=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/media/"+t+"/download/",{responseType:"blob"}).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}();(ee=t.PollStatuses||(t.PollStatuses={}))[ee.open=1]="open",ee[ee.closed=2]="closed",ee[ee.archived=3]="archived";var 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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{uuid:"uuid",name:"name"}})],e)}(T),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",answer_uuid:"answerUuid",user:"user",poll_id:"pollId"},relation:{user:J}})],e)}(T),le=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.PollStatuses),variants:ue,author:J,answers:ce,createdAt:C}})],n)}(T),pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:J,team:Y,createdAt:C,updateAt:C}})],e)}(T);(se=t.GameInviteStatus||(t.GameInviteStatus={}))[se.accepted=1]="accepted",se[se.declined=2]="declined";var me,fe,de=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_user:"teamUser",game_id:"gameId",game:"game",status:"status"},relation:{game:yt,teamUser:bt,status:S(t.GameInviteStatus)}})],n)}(T);(me=t.TeamEventTypes||(t.TeamEventTypes={}))[me.training=1]="training",me[me.other=2]="other";var he,ge=((fe={})[t.TeamEventTypes.training]="Тренировка",fe[t.TeamEventTypes.other]="Другое",fe),ve=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:ge[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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",team_id:"teamId",team:"team",event_type:"eventType",event_custom_name:"eventCustomName",description:"description",datetime:"datetime",location:"location"},relation:{eventType:S(t.TeamEventTypes),team:Y,datetime:C}})],n)}(T);(he=t.TeamEventInviteStatuses||(t.TeamEventInviteStatuses={}))[he.accepted=1]="accepted",he[he.declined=2]="declined";var _e,ye,be=function(){function e(){}return e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_event_id:"teamEventId",team_user_id:"teamUserId",status:"status"},relation:{status:S(t.TeamEventInviteStatuses)}})],e)}(),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",tournament_team_invite_id:"tournamentTeamInviteId",tournament_team_id:"tournamentTeamId",team_user:"teamUser",accepted:"accepted"},relation:{teamUser:bt}})],e)}(T),Te=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:Y,tournament:lt,userInvites:ke}})],e)}(T);(_e=t.NotificationType||(t.NotificationType={}))[_e.team_updated=1]="team_updated",_e[_e.team_invited=2]="team_invited",_e[_e.team_join_request=3]="team_join_request",_e[_e.team_join_declined_by_team=4]="team_join_declined_by_team",_e[_e.team_join_declined_by_user=5]="team_join_declined_by_user",_e[_e.team_join_canceled_by_team=6]="team_join_canceled_by_team",_e[_e.team_join_canceled_by_user=7]="team_join_canceled_by_user",_e[_e.team_joined_for_user=8]="team_joined_for_user",_e[_e.team_joined_for_team=9]="team_joined_for_team",_e[_e.team_user_role_changed_for_user=10]="team_user_role_changed_for_user",_e[_e.team_user_role_changed_for_team=11]="team_user_role_changed_for_team",_e[_e.team_user_number_changed=12]="team_user_number_changed",_e[_e.team_user_deleted_for_user=13]="team_user_deleted_for_user",_e[_e.team_user_deleted_for_team=14]="team_user_deleted_for_team",_e[_e.team_user_left=15]="team_user_left",_e[_e.game_updated=16]="game_updated",_e[_e.game_invited=17]="game_invited",_e[_e.game_invite_accepted=18]="game_invite_accepted",_e[_e.game_invite_declined=19]="game_invite_declined",_e[_e.game_remind=20]="game_remind",_e[_e.game_won=21]="game_won",_e[_e.game_losing=22]="game_losing",_e[_e.game_tech_defeat=23]="game_tech_defeat",_e[_e.game_tech_victory=24]="game_tech_victory",_e[_e.poll_created=25]="poll_created",_e[_e.poll_closed=26]="poll_closed",_e[_e.team_event_invited=27]="team_event_invited",_e[_e.team_event_accepted=28]="team_event_accepted",_e[_e.team_event_declined=29]="team_event_declined",_e[_e.team_event_remind=30]="team_event_remind",_e[_e.tournament_invited=31]="tournament_invited",_e[_e.tournament_joined=32]="tournament_joined",_e[_e.tournament_join_declined=33]="tournament_join_declined",_e[_e.tournament_join_canceled=34]="tournament_join_canceled",_e[_e.tournament_user_invited=35]="tournament_user_invited",_e[_e.tournament_user_accepted_for_team=36]="tournament_user_accepted_for_team",_e[_e.tournament_user_accepted_for_user=37]="tournament_user_accepted_for_user",_e[_e.tournament_user_added=38]="tournament_user_added",_e[_e.tournament_user_declined_for_team=39]="tournament_user_declined_for_team",_e[_e.tournament_user_declined_for_user=40]="tournament_user_declined_for_user",_e[_e.tournament_user_invite_deleted=41]="tournament_user_invite_deleted",_e[_e.tournament_user_deleted=42]="tournament_user_deleted",_e[_e.tournament_user_disqualified_for_team=43]="tournament_user_disqualified_for_team",_e[_e.tournament_user_disqualified_for_user=44]="tournament_user_disqualified_for_user",_e[_e.tournament_user_disqualification_updated_for_team=45]="tournament_user_disqualification_updated_for_team",_e[_e.tournament_user_disqualification_updated_for_user=46]="tournament_user_disqualification_updated_for_user",_e[_e.tournament_team_deleted=47]="tournament_team_deleted",_e[_e.org_tournament_invite_created=48]="org_tournament_invite_created",_e[_e.org_tournament_invite_declined=49]="org_tournament_invite_declined",_e[_e.org_tournament_invite_deleted=50]="org_tournament_invite_deleted",_e[_e.org_tournament_invite_changed=51]="org_tournament_invite_changed",_e[_e.org_tournament_user_deleted=52]="org_tournament_user_deleted",_e[_e.org_tournament_user_invited=53]="org_tournament_user_invited",_e[_e.org_tournament_user_has_changes=54]="org_tournament_user_has_changes",_e[_e.org_tournament_team_leave=55]="org_tournament_team_leave",(ye=t.NotificationServiceEnum||(t.NotificationServiceEnum={}))[ye.public=1]="public",ye[ye.org=2]="org";var Se,Pe=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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.NotificationType),initiator:J,team:Y,teamInvite:pe,teamUser:bt,poll:le,game:yt,gameInvite:de,teamEvent:ve,teamEventInvite:be,tournament:lt,tournamentInvite:Te,tournamentTeam:Tt,service:S(t.NotificationServiceEnum),createdAt:C}})],n)}(T);(Se=t.NotificationAllowTypes||(t.NotificationAllowTypes={}))[Se.all=1]="all",Se[Se.important=2]="important",Se[Se.none=3]="none";var Fe,we=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{user_id:"userId",popup:"popup",sound:"sound",browser:"browser",email:"email"},relation:{sound:S(t.NotificationAllowTypes),browser:S(t.NotificationAllowTypes)}})],n)}(T),Ce=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCount=function(){return g(this,void 0,void 0,(function(){return v(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={}),g(this,void 0,void 0,(function(){var r,a,s,u,c,l;return v(this,(function(p){r=(new n.HttpParams).set("page",t.toString()).set("size",e.toString());try{for(a=_(Object.keys(i)),s=a.next();!s.done;s=a.next())u=s.value,r=r.set(u,i[u])}catch(t){c={error:t}}finally{try{s&&!s.done&&(l=a.return)&&l.call(a)}finally{if(c)throw c.error}}return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/",{params:r,observe:"response"}).pipe(o.map((function(t){var e=Pe.toFront(t.body);return{total:+t.headers.get("x-page-count"),data:e}}))).toPromise()]}))}))},t.prototype.markViewed=function(t,e){return g(this,void 0,void 0,(function(){return v(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 Pe.toFront(t)}))).toPromise()]}))}))},t.prototype.markAllViewed=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification/viewed/",{}).pipe(o.map((function(t){return Pe.toFront(t)}))).toPromise()]}))}))},t.prototype.getNotificationSettings=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/").pipe(o.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},t.prototype.updateNotificationSettings=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(""+this.configService.get("apiUrl")+this.apiUrl+"/notification_settings/",we.toBack(t)).pipe(o.map((function(t){return we.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ge=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(Ht))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(Ce),Ie=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(Ht))},token:o,providedIn:"root"}),o=d([e.Injectable({providedIn:"root"})],o)}(Ce),Ue=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCities=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/reference/cities/").pipe(o.map((function(t){return E.toFront(t)}))).toPromise()]}))}))},t.prototype.getSports=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/sport/").pipe(o.map((function(t){return x.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Be=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",team_id:"teamId",email:"email",first_name:"firstName",last_name:"lastName"}})],e)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",team_user:"teamUser",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"},relation:{team:Y,teamUser:bt,tournamentTeamUser:Pt,tournamentTeam:Tt,user:J,month:w}})],e)}(At);(Fe=t.TeamPermissionTypes||(t.TeamPermissionTypes={}))[Fe.for_all=1]="for_all",Fe[Fe.for_users=2]="for_users",Fe[Fe.for_team=3]="for_team";var Le,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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{players:"players",games:"games",statistic:"statistic",polls:"polls",events:"events"},relation:{players:S(t.TeamPermissionTypes),games:S(t.TeamPermissionTypes),statistic:S(t.TeamPermissionTypes),polls:S(t.TeamPermissionTypes),events:S(t.TeamPermissionTypes)}})],n)}(T),He=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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:S(t.TeamUserRole)}})],n)}(T),Ae=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.search=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(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 Y.toFront(t)}))).toPromise()]}))}))},i.prototype.create=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/",Y.toBack(t)).pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/access/").pipe(o.map((function(t){return He.toFront(t)}))).toPromise()]}))}))},i.prototype.update=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/",Y.toBack(e)).pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},i.prototype.delete=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team/"+t.id+"/").toPromise()]}))}))},i.prototype.getPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/").pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},i.prototype.updatePermission=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/permission/",Oe.toBack(e)).pipe(o.map((function(t){return Oe.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsers=function(t,e){return g(this,void 0,void 0,(function(){var i;return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserRole=function(e,n,i){return g(this,void 0,void 0,(function(){return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateUserNumber=function(t,e,n){return g(this,void 0,void 0,(function(){return v(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 bt.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteUser=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(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 Y.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites/").pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.resendInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},i.prototype.getInvitesExternal=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/").pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.sendInviteExternal=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/invites_external/",Be.toBack(e)).pipe(o.map((function(t){return Be.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteInviteExternal=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(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 Be.toFront(t)}))).toPromise()]}))}))},i.prototype.getPolls=function(t,e){return void 0===e&&(e=!1),g(this,void 0,void 0,(function(){return v(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 le.toFront(t)}))).toPromise()]}))}))},i.prototype.createPoll=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/polls/",le.toBack(e)).pipe(o.map((function(t){return le.toFront(t)}))).toPromise()]}))}))},i.prototype.getUsersStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},i.prototype.joinTeam=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/join/",{}).pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},i.prototype.leaveTeam=function(t){return g(this,void 0,void 0,(function(){return v(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),g(this,void 0,void 0,(function(){return v(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 yt.toFront(t)}))).toPromise()]}))}))},i.prototype.createGame=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/games/",yt.toBack(e)).pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.createTeamEvent=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/events/",ve.toBack(e)).pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/tournament_invites/").pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentGames=function(t,e,i,r){return g(this,void 0,void 0,(function(){var a;return v(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:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.acceptTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/accept/",{}).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.declineTournamentInvite=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament_invite/"+t+"/decline/",{}).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},i.prototype.registerLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/lazy_user/",{user:J.toBack(e)}).pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.getLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.updateLazyUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/",{user:J.toBack(e)}).pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},i.prototype.deleteLazyUser=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/lazy_user/"+t+"/").toPromise()]}))}))},i.prototype.resendLazyUserEmail=function(t){return g(this,void 0,void 0,(function(){return v(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:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),xe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.updateTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/team_event/"+t.id+"/",ve.toBack(t)).pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.prototype.deleteTeamEvent=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.delete(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/").toPromise()]}))}))},t.prototype.getTeamEventInvites=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team_event/"+t+"/invites/").pipe(o.map((function(t){return be.toFront(t)}))).toPromise()]}))}))},t.prototype.createTeamEventInvite=function(t,e){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.prototype.declineTeamEventInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 be.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",title:"title",picture:"picture",text:"text",author:"author",created_at:"createdAt"},relation:{picture:O,author:J,createdAt:C}})],e)}(T),Ee=function(){function t(){}return t.toFront=function(t){},t.toBack=function(t){},d([U],t,"toFront",null),d([B],t,"toBack",null),t=d([G({mappingFields:{stage_id:"stageId",tours_count:"toursCount",playoff_stages_count:"playoffStagesCount"}})],t)}(),Me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{tours_count:"toursCount",playoff_stages_count:"playoffStagesCount",current_tour:"currentTour",current_playoff_stage:"currentPlayoffStage",stages:"stages",tournament_stage_id:"tournamentStageId"},relation:{stages:F(Ee)}})],e)}(T);(Le=t.TournamentStageStatuses||(t.TournamentStageStatuses={}))[Le.open=0]="open",Le[Le.in_progress=1]="in_progress",Le[Le.closed=2]="closed";var Ne,ze=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",name:"name",date:"date",tournament_id:"tournamentId",status:"status"},relation:{date:w,status:S(t.TournamentStageStatuses)}})],n)}(T);function De(t){return t<=0?[]:Array.apply(null,Array(t)).map((function(t,e){return e+1}))}(Ne=t.PlayoffTypes||(t.PlayoffTypes={})).double_elimination="double_elimination",Ne.elimination="elimination";var Re,qe,We=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{rounds:"rounds",final_rounds:"finalRounds",third_place_rounds:"thirdPlaceRounds",teams_count:"teamsCount",type:"type"},relation:{type:S(t.PlayoffTypes)}})],n)}(T),$e=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=De(e).map((function(e){var n=t.settings.teamsCount/Math.pow(2,e);return{value:e,title:1===n?"Финал":"1 / "+n}}))}return this.stages},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",name:"name",settings:"settings",tournament_id:"tournamentId",tournament_stage_id:"tournamentStageId",is_official:"isOfficial"},relation:{settings:We}})],e)}(T),Xe=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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:Tt,group:kt}})],e)}(T);!function(t){t[t.admin=1]="admin",t[t.moderator=2]="moderator",t[t.game_manager=3]="game_manager"}(Re||(Re={})),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"}(qe||(qe={}));!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=Re[t]},enumerable:!0,configurable:!0}),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{id:"id",user:"user",role:"role",permissions:"permissions"},relation:{user:J,permissions:F(S(qe))}})],e)}(T);var Je,Ye=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/league/"+t+"/tournaments/"+e+"/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getNews=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/news/").pipe(o.map((function(t){return Ve.toFront(t)}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTournamentStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stages/").pipe(o.map((function(t){return ze.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoff=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/playoff/").pipe(o.map((function(t){return $e.toFront(t)}))).toPromise()]}))}))},i.prototype.getPlayoffGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_playoff/"+t+"/games/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/games_stages/").pipe(o.map((function(t){return Me.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return void 0===a&&(a={}),g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),a.tournamentCourtId&&(s=s.set("tournament_court_id",a.tournamentCourtId.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getStageTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/stage_teams/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},i.prototype.getTeamById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team_user/"+t+"/").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.getUserGames=function(t){return g(this,void 0,void 0,(function(){return v(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 yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getBasketballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/basketball_statistic/",{params:e}).pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},i.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/volleyball_statistic/",{params:e}).pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},i.prototype.getHockeyStatistic=function(t){return g(this,void 0,void 0,(function(){var e,i,r,a,s,u;return v(this,(function(c){if(e=new n.HttpParams,t){try{for(i=_(Object.keys(t)),r=i.next();!r.done;r=i.next())a=r.value,t[a]&&(e=e.set(a,t[a]))}catch(t){s={error:t}}finally{try{r&&!r.done&&(u=i.return)&&u.call(i)}finally{if(s)throw s.error}}void 0!==t.per_game&&(e=e.set("per_game",t.per_game?"1":"0"))}return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/hockey_statistic/",{params:e}).pipe(o.map((function(t){return Yt.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournamentTeamUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_team/"+t+"/users/").pipe(o.map((function(t){return Pt.toFront(t)}))).toPromise()]}))}))},i.prototype.myPermission=function(t){return g(this,void 0,void 0,(function(){return v(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 qe[t]}))}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),Ze=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{valid_users_count:"validUsersCount",invalid_users_count:"invalidUsersCount",has_access:"hasAccess",invite_sent:"inviteSent",already_in_tournament:"alreadyInTournament"}})],e)}(T),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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",join_data:"joinData"},relation:{team:Y,joinData:Ze}})],e)}(T),Qe=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getTeamsForJoin=function(t){return g(this,void 0,void 0,(function(){return v(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 Ke.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/team/"+t+"/users/").pipe(o.map((function(t){return bt.toFront(t)}))).toPromise()]}))}))},t.prototype.joinTournament=function(t,e,n){return g(this,void 0,void 0,(function(){var i;return v(this,(function(r){return i={team:{id:e},user_invites:ke.toBack(n)},[2,this.httpClient.post(this.configService.get("apiUrl")+"/api/v1/tournament/"+t+"/join/",i).pipe(o.map((function(t){return Te.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),tn=function(){function i(t,e){this.httpClient=t,this.configService=e}return i.prototype.getByAlias=function(t,e){return g(this,void 0,void 0,(function(){return v(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 at.toFront(t)}))).toPromise()]}))}))},i.prototype.getTournaments=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/tournaments/").pipe(o.map((function(t){return lt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGames=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s,u;return v(this,(function(c){return s=(new n.HttpParams).set("page",i.toString()),r&&(s=s.set("size",r.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status])),a.statuses&&(u=a.statuses.map((function(e){return t.GameStatuses[e]})),s=s.set("statuses",u.join(","))),a.tournamentCourtId&&(s=s.set("tournament_court_id",a.tournamentCourtId.toString())),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/games/",{params:s,observe:"response"}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getEvents=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(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:ne.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getGameMedia=function(e,i,r,a){return g(this,void 0,void 0,(function(){var s;return v(this,(function(u){return s=(new n.HttpParams).set("page",i.toString()).set("size",r.toString()),a&&(a.tournamentTour&&(s=s.set("tournament_tour",a.tournamentTour.toString())),a.teamId&&(s=s.set("team_id",a.teamId.toString())),a.tournamentStageId&&(s=s.set("tournament_stage_id",a.tournamentStageId.toString())),a.playoffId&&(s=s.set("playoff_id",a.playoffId.toString())),a.playoffStage&&(s=s.set("playoff_stage",a.playoffStage.toString())),a.status&&(s=s.set("status",t.GameStatuses[a.status]))),[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+e+"/game_media/",{observe:"response",params:s}).pipe(o.map((function(t){return{total:+t.headers.get("X-Page-Count"),data:yt.toFront(t.body)}}))).toPromise()]}))}))},i.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_season/"+t+"/teams/").pipe(o.map((function(t){return Tt.toFront(t)}))).toPromise()]}))}))},i.prototype.getGamesStages=function(t){return g(this,void 0,void 0,(function(){return v(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 Me.toFront(t)}))).toPromise()]}))}))},i.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:i,providedIn:"root"}),i=d([e.Injectable({providedIn:"root"})],i)}(),en=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/").pipe(o.map((function(t){return ze.toFront(t)}))).toPromise()]}))}))},t.prototype.getGroups=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/groups/").pipe(o.map((function(t){return kt.toFront(t)}))).toPromise()]}))}))},t.prototype.getPlayoffs=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/playoff/").pipe(o.map((function(t){return $e.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_stage/"+t+"/teams/").pipe(o.map((function(t){return Xe.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{edit:"edit",personal_data:"personalData",teams:"teams",statistic:"statistic",games:"games"}})],e)}(T);(Je=t.UserPermissionTypes||(t.UserPermissionTypes={}))[Je.denied=1]="denied",Je[Je.for_all=2]="for_all",Je[Je.for_users=3]="for_users",Je[Je.for_team=4]="for_team";var on,rn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.toFront=function(t){},n.toBack=function(t){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({mappingFields:{id:"id",personal_data:"personalData",games:"games",teams:"teams",statistic:"statistic"},relation:{personalData:S(t.UserPermissionTypes),games:S(t.UserPermissionTypes),teams:S(t.UserPermissionTypes),statistic:S(t.UserPermissionTypes)}})],n)}(T),an=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getCurrentUser=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/").pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/").pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.getAccess=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/access/").pipe(o.map((function(t){return nn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUser=function(t,e){return g(this,void 0,void 0,(function(){return v(this,(function(n){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/",J.toBack(e)).pipe(o.map((function(t){return J.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPhoto=function(t,e){return g(this,void 0,void 0,(function(){var n;return v(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 g(this,void 0,void 0,(function(){var i;return v(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 g(this,void 0,void 0,(function(){var o;return v(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 g(this,void 0,void 0,(function(){var i;return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/profile/").pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.getBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_profile/").pipe(o.map((function(t){return q.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserProfile=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/profile/",V.toBack(t)).pipe(o.map((function(t){return V.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserBasketballProfile=function(t){return g(this,void 0,void 0,(function(){return v(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 g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/"+t.userId+"/volleyball_profile/",q.toBack(t)).pipe(o.map((function(t){return q.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserPermissions=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+(t||"current")+"/permission/").pipe(o.map((function(t){return rn.toFront(t)}))).toPromise()]}))}))},t.prototype.updateUserPermission=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.patch(this.configService.get("apiUrl")+"/api/v1/user/current/permission/",rn.toBack(t)).pipe(o.map((function(t){return rn.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeams=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/teams/").pipe(o.map((function(t){return Y.toFront(t)}))).toPromise()]}))}))},t.prototype.getInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/invites/").pipe(o.map((function(t){return pe.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},t.prototype.declineInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 pe.toFront(t)}))).toPromise()]}))}))},t.prototype.getStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},t.prototype.getStreetballStatistics=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/streetball_statistics/").pipe(o.map((function(t){return xt.toFront(t)}))).toPromise()]}))}))},t.prototype.getVolleyballStatistic=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/volleyball_statistics/").pipe(o.map((function(t){return je.toFront(t)}))).toPromise()]}))}))},t.prototype.getGames=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/"+t+"/games/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getGameInvites=function(){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/game_invites/").pipe(o.map((function(t){return de.toFront(t)}))).toPromise()]}))}))},t.prototype.acceptGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 de.toFront(t)}))).toPromise()]}))}))},t.prototype.declineGameInvite=function(t){return g(this,void 0,void 0,(function(){return v(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 de.toFront(t)}))).toPromise()]}))}))},t.prototype.searchUsers=function(t){return g(this,void 0,void 0,(function(){var e;return v(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 J.toFront(t)}))).toPromise()]}))}))},t.prototype.setWizardShowed=function(t){return g(this,void 0,void 0,(function(){return v(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 J.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamEvents=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(t){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/user/current/team_events/").pipe(o.map((function(t){return ve.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.toFront=function(t){},e.toBack=function(t){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({mappingFields:{team:"team",competitor_team:"competitorTeam"},relation:{team:je,competitorTeam:je}})],e)}(T),un=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){},d([U],e,"toFront",null),d([B],e,"toBack",null),e=d([G({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)}(T);(on=t.VolleyballGameLogType||(t.VolleyballGameLogType={}))[on.enter_game=1]="enter_game",on[on.exit_game=2]="exit_game",on[on.remove_game=3]="remove_game",on[on.serve_hit=4]="serve_hit",on[on.serve_fault=5]="serve_fault",on[on.serve_ace=6]="serve_ace",on[on.stuff_block=7]="stuff_block",on[on.block_fault=8]="block_fault",on[on.block_rebound=9]="block_rebound",on[on.attack_spike=10]="attack_spike",on[on.attack_fault=11]="attack_fault",on[on.attack_shot=12]="attack_shot",on[on.receive=13]="receive",on[on.receive_fault=14]="receive_fault",on[on.excellent_receive=15]="excellent_receive",on[on.point=16]="point",on[on.fault=17]="fault",on[on.serve_receive=18]="serve_receive",on[on.serve_receive_fault=19]="serve_receive_fault",on[on.excellent_serve_receive=20]="excellent_serve_receive",on[on.timeout=21]="timeout",on[on.yellow_card=22]="yellow_card";var cn,ln,pn,mn,fn,dn,hn,gn,vn,_n,yn,bn,kn,Tn=[t.VolleyballGameLogType.serve_ace,t.VolleyballGameLogType.stuff_block,t.VolleyballGameLogType.attack_spike,t.VolleyballGameLogType.point],Sn=[t.VolleyballGameLogType.serve_fault,t.VolleyballGameLogType.attack_fault,t.VolleyballGameLogType.block_fault,t.VolleyballGameLogType.receive_fault,t.VolleyballGameLogType.fault,t.VolleyballGameLogType.serve_receive_fault],Pn=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 Tn.includes(this.logType)},n.prototype.isFaultType=function(){return Sn.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){},d([U],n,"toFront",null),d([B],n,"toBack",null),n=d([G({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"},relation:{logType:S(t.VolleyballGameLogType),datetime:C}})],n)}(T),Fn=function(){function t(t,e){this.httpClient=t,this.configService=e}return t.prototype.getById=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_volleyball_game/"+t+"/").pipe(o.map((function(t){return yt.toFront(t)}))).toPromise()]}))}))},t.prototype.getUsers=function(t){return g(this,void 0,void 0,(function(){return v(this,(function(e){return[2,this.httpClient.get(this.configService.get("apiUrl")+"/api/v1/tournament_game/"+t+"/users/").pipe(o.map((function(t){return Ft.toFront(t)}))).toPromise()]}))}))},t.prototype.getTeamStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 sn.toFront(t)}))).toPromise()]}))}))},t.prototype.getUserStatistic=function(t){return g(this,void 0,void 0,(function(){return v(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 un.toFront(t)}))).toPromise()]}))}))},t.prototype.getLogs=function(t){return g(this,void 0,void 0,(function(){return v(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 Pn.toFront(t)}))).toPromise()]}))}))},t.ctorParameters=function(){return[{type:n.HttpClient},{type:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),wn=((cn={})[t.BasketballGameLogTypes.enter_game]="Выход на площадку",cn[t.BasketballGameLogTypes.exit_game]="Ушел с площадки",cn[t.BasketballGameLogTypes.remove_game]="Удаление с площадки",cn[t.BasketballGameLogTypes.two_point_attempt]="Бросок 2 очка",cn[t.BasketballGameLogTypes.three_point_attempt]="Бросок 3 очка",cn[t.BasketballGameLogTypes.free_throw_attempt]="Штрафной бросок",cn[t.BasketballGameLogTypes.one_point_attempt]="Бросок 1 очко",cn[t.BasketballGameLogTypes.two_point_made]="2 очка",cn[t.BasketballGameLogTypes.three_point_made]="3 очка",cn[t.BasketballGameLogTypes.free_throw_made]="1 очко, штрафной",cn[t.BasketballGameLogTypes.one_point_made]="1 очко",cn[t.BasketballGameLogTypes.assist]="Передача",cn[t.BasketballGameLogTypes.block]="Блокшот",cn[t.BasketballGameLogTypes.rebound]="Подбор",cn[t.BasketballGameLogTypes.offensive_rebound]="Подбор в нападении",cn[t.BasketballGameLogTypes.defensive_rebound]="Подбор в защите",cn[t.BasketballGameLogTypes.steal]="Перехват",cn[t.BasketballGameLogTypes.turnover]="Потеря",cn[t.BasketballGameLogTypes.personal_foul]="Фол",cn[t.BasketballGameLogTypes.technical_foul]="Технический фол",cn[t.BasketballGameLogTypes.unsportsmanlike_foul]="Неспортиный фол",cn[t.BasketballGameLogTypes.timeout]="Таймаут",cn),Cn=((ln={})[t.HockeyGameLogTypes.enter_game]="Выход на площадку",ln[t.HockeyGameLogTypes.exit_game]="Ушел с площадки",ln[t.HockeyGameLogTypes.shot_miss]="Бросок мимо",ln[t.HockeyGameLogTypes.shot_on_goal]="Бросок по воротам",ln[t.HockeyGameLogTypes.shot_blocked]="Заблокированный бросок",ln[t.HockeyGameLogTypes.goal]="Гол",ln[t.HockeyGameLogTypes.shootout_attempt]="Булит промах",ln[t.HockeyGameLogTypes.shootout_goal]="Булит гол",ln[t.HockeyGameLogTypes.assist]="Передача",ln[t.HockeyGameLogTypes.block_shot]="Блокировка броска",ln[t.HockeyGameLogTypes.minor_penalty]="Малый штраф",ln[t.HockeyGameLogTypes.major_penalty]="Большой штраф",ln[t.HockeyGameLogTypes.misconduct_penalty]="Дисциплинарный штраф",ln[t.HockeyGameLogTypes.game_misconduct_penalty]="Дисциплинарный штраф до конца игры",ln[t.HockeyGameLogTypes.match_penalty]="Матч-штраф",ln[t.HockeyGameLogTypes.penalty_shot]="Штрафной бросок",ln[t.HockeyGameLogTypes.face_off_lose]="Проигрыш в вбрасывании",ln[t.HockeyGameLogTypes.face_off_win]="Победа в вбрасывании",ln[t.HockeyGameLogTypes.save]="Отражен бросок",ln[t.HockeyGameLogTypes.timeout]="Таймаут",ln[t.HockeyGameLogTypes.penalty_start]="Начало штрафного времени",ln[t.HockeyGameLogTypes.penalty_end]="Конец штрафного времени",ln),Gn=((pn={})[t.OvertimeTypes.to_score_diff]="До разницы в N мячей",pn[t.OvertimeTypes.to_score_total]="До N очков",pn[t.OvertimeTypes.time]="По времени",pn[t.OvertimeTypes.without_overtime]="Без овертайма",pn[t.OvertimeTypes.to_first_goal]="На N минут до первой шайбы",pn[t.OvertimeTypes.to_first_goal_and_bullitts]="На N минут до первой шайбы + буллиты",pn[t.OvertimeTypes.bullitts]="Буллиты",pn),In=((mn={})[t.TeamUserRole.moderator]="Модератор",mn[t.TeamUserRole.member]="Пользователь",mn[t.TeamUserRole.admin]="Владелец",mn),Un=((fn={})[t.GameBasketballPosition.point_guard]="Разыгрывающий защитник",fn[t.GameBasketballPosition.shooting_guard]="Атакующий защитник",fn[t.GameBasketballPosition.small_forward]="Легкий форвард",fn[t.GameBasketballPosition.power_forward]="Мощный форвард",fn[t.GameBasketballPosition.center]="Центровой",fn),Bn=((dn={})[t.GameBasketballPosition.point_guard]="PG",dn[t.GameBasketballPosition.shooting_guard]="SG",dn[t.GameBasketballPosition.small_forward]="SF",dn[t.GameBasketballPosition.power_forward]="PF",dn[t.GameBasketballPosition.center]="C",dn),jn=((hn={})[t.WorkHand.left]="Левая",hn[t.WorkHand.right]="Правая",hn),Ln=((gn={})[t.GameVolleyballPosition.setter]="Связующий",gn[t.GameVolleyballPosition.libero]="Либеро",gn[t.GameVolleyballPosition.middle_player]="Центральный блокирующий",gn[t.GameVolleyballPosition.receiver_attacker]="Доигровщик",gn[t.GameVolleyballPosition.dioganal]="Диагональный",gn),On=((vn={})[t.GameVolleyballPosition.setter]="S",vn[t.GameVolleyballPosition.libero]="L",vn[t.GameVolleyballPosition.middle_player]="MP",vn[t.GameVolleyballPosition.receiver_attacker]="RA",vn[t.GameVolleyballPosition.dioganal]="D",vn),Hn=((_n={})[t.GameVolleyballPosition.setter]="связ.",_n[t.GameVolleyballPosition.libero]="либеро",_n[t.GameVolleyballPosition.middle_player]="блок.",_n[t.GameVolleyballPosition.receiver_attacker]="доигр.",_n[t.GameVolleyballPosition.dioganal]="диаг.",_n),An=((yn={})[t.VolleyballWorkHand.left]="Левая",yn[t.VolleyballWorkHand.right]="Правая",yn),xn=((bn={})[t.GameHockeyPosition.goaltender]="Вратарь",bn[t.GameHockeyPosition.defensemen]="Защитник",bn[t.GameHockeyPosition.forward]="Нападающий",bn),Vn=((kn={})[t.VolleyballGameLogType.enter_game]="Выход на площадку",kn[t.VolleyballGameLogType.exit_game]="Уход с площадки",kn[t.VolleyballGameLogType.remove_game]="Удаление с площадки",kn[t.VolleyballGameLogType.serve_ace]="Эйс",kn[t.VolleyballGameLogType.serve_hit]="Подача",kn[t.VolleyballGameLogType.serve_fault]="Ошибка на подаче",kn[t.VolleyballGameLogType.attack_spike]="Результативная атака",kn[t.VolleyballGameLogType.attack_shot]="Успешная атака",kn[t.VolleyballGameLogType.attack_fault]="Ошибка атаки",kn[t.VolleyballGameLogType.stuff_block]="Результативный блок",kn[t.VolleyballGameLogType.block_rebound]="Успешный блок",kn[t.VolleyballGameLogType.block_fault]="Ошибка на блоке",kn[t.VolleyballGameLogType.excellent_receive]="Отличный прием",kn[t.VolleyballGameLogType.receive]="Прием",kn[t.VolleyballGameLogType.receive_fault]="Ошибка на приеме",kn[t.VolleyballGameLogType.serve_receive]="Прием подачи",kn[t.VolleyballGameLogType.excellent_serve_receive]="Отличный прием подачи",kn[t.VolleyballGameLogType.serve_receive_fault]="Ошибка приема подачи",kn[t.VolleyballGameLogType.point]="Очко",kn[t.VolleyballGameLogType.fault]="Ошибка",kn[t.VolleyballGameLogType.timeout]="Таймаут",kn[t.VolleyballGameLogType.yellow_card]="Предупреждение",kn),En=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:Ht}]},t.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new t(e.ɵɵinject(n.HttpClient),e.ɵɵinject(Ht))},token:t,providedIn:"root"}),t=d([e.Injectable({providedIn:"root"})],t)}(),Mn=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}(),Nn=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=_(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}(),zn=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}(Nn);function Dn(t){var e=("; "+document.cookie).split("; "+t+"=");return 2===e.length?e.pop().split(";").shift():null}function Rn(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 qn=function(){function t(t,e){this.injector=t,this.platformId=e,this.isBrowser=l.isPlatformBrowser(this.platformId)}return t.prototype.intercept=function(t,e){if(!this.isBrowser)return e.handle(t);t=t.clone({withCredentials:!0});var n=Dn("csrftoken");return n&&(t=t.clone({setHeaders:{"X-CSRFToken":n}})),e.handle(t)},t.ctorParameters=function(){return[{type:e.Injector},{type:String,decorators:[{type:e.Inject,args:[e.PLATFORM_ID]}]}]},t=d([e.Injectable(),h(1,e.Inject(e.PLATFORM_ID))],t)}();t.BaseModel=T,t.BaseService=Ot,t.BaseStatistic=At,t.BasketballGameApi=Dt,t.BasketballGameConfig=pt,t.BasketballGameLog=zt,t.BasketballGameLogTypeLocalization=wn,t.BasketballGameStatistic=Et,t.BasketballGameTeamStatistic=Vt,t.BasketballProfile=z,t.BasketballStatistic=xt,t.CONFIG_DATA="mtg-core-config-data",t.CentrifugoService=En,t.City=E,t.ConfigService=Ht,t.DateField=w,t.DateTimeField=C,t.FAULT_LOG_TYPES=Sn,t.Feedback=Rt,t.FeedbackApi=qt,t.File=O,t.FileApi=Wt,t.Game=yt,t.GameBasketballPositionLocalization=Un,t.GameBasketballPositionShortLocalization=Bn,t.GameHockeyPositionLocalization=xn,t.GameInvite=de,t.GameTimelineStageItem=Ee,t.GameTimelineStages=Me,t.GameUser=Ft,t.GameVolleyballPositionLocalization=Ln,t.GameVolleyballPositionShortLocalization=On,t.GameVolleyballPositionShortRuLocalization=Hn,t.HockeyGameApi=Kt,t.HockeyGameConfig=vt,t.HockeyGameLog=Xt,t.HockeyGameLogTypeLocalization=Cn,t.HockeyGameStatistic=Jt,t.HockeyGameTeamStatistic=Zt,t.HockeyPenaltyTypes=k,t.HockeyProfile=$,t.HockeyStatistic=Yt,t.HttpCookieInterceptor=qn,t.League=K,t.LeagueApi=ie,t.LeagueCourt=ht,t.LeagueNews=te,t.LeagueNewsApi=re,t.LeaguePartner=oe,t.LocalStorageEngine=zn,t.MediaApi=ae,t.MediaItem=gt,t.ModelInstance=G,t.Notification=Pe,t.NotificationApi=Ge,t.NotificationBaseApi=Ce,t.NotificationSettings=we,t.OrgNotificationApi=Ie,t.Organization=Z,t.OvertimeTypeLocalization=Gn,t.Playoff=$e,t.PlayoffSettings=We,t.Poll=le,t.PollAnswer=ce,t.PollVariant=ue,t.ReferenceApi=Ue,t.SCORE_LOG_TYPES=Tn,t.Sport=x,t.StorageEngine=Nn,t.StorageEngineField=Mn,t.Store=Lt,t.Team=Y,t.TeamAccess=He,t.TeamApi=Ae,t.TeamEvent=ve,t.TeamEventApi=xe,t.TeamEventInvite=be,t.TeamEventTypeLocalization=ge,t.TeamInvite=pe,t.TeamInviteExternal=Be,t.TeamPermission=Oe,t.TeamUser=bt,t.TeamUserRoleLocalization=In,t.ToBackHook=B,t.ToFrontHook=U,t.Tournament=lt,t.TournamentApi=Ye,t.TournamentDisqualification=St,t.TournamentEvent=ne,t.TournamentGroup=kt,t.TournamentInvite=Te,t.TournamentJoinApi=Qe,t.TournamentJoinData=Ze,t.TournamentJoinTeam=Ke,t.TournamentNews=Ve,t.TournamentSeason=at,t.TournamentSeasonApi=tn,t.TournamentSettings=ut,t.TournamentStage=ze,t.TournamentStageApi=en,t.TournamentStageTeam=Xe,t.TournamentTeam=Tt,t.TournamentTeamUser=Pt,t.TournamentTeamUserInvite=ke,t.TournamentTeamWinner=ct,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=J,t.UserAccess=nn,t.UserApi=an,t.UserPermission=rn,t.UserProfile=V,t.VolleyballGameApi=Fn,t.VolleyballGameConfig=dt,t.VolleyballGameLog=Pn,t.VolleyballGameLogTypeLocalization=Vn,t.VolleyballGameStatistic=un,t.VolleyballGameTeamStatistic=sn,t.VolleyballProfile=q,t.VolleyballStatistic=je,t.VolleyballWorkHandLocalization=An,t.WorkHandLocalization=jn,t.addItemInArray=Gt,t.changeFavicons=function(t,e){var n,o,i,r,a="";"ablmoscow"===e&&(a="abl/");var s=Rn(a);try{for(var u=_(s),c=u.next();!c.done;c=u.next()){var l=c.value,p=t.createElement("link");try{for(var m=(i=void 0,_(Object.keys(l))),f=m.next();!f.done;f=m.next()){var d=f.value;p.setAttribute(d,l[d])}}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(p)}}catch(t){n={error:t}}finally{try{c&&!c.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=Ut,t.enumField=S,t.fileSizeValidator=function(t){return function(t){if(!t.value)return null}},t.generateArray=De,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=Dn,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=Rn,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=F,t.markFormGroupTouched=function t(e){Object.values(e.controls).forEach((function(e){e.markAsTouched(),e.markAsDirty(),e instanceof c.FormGroup?t(e):e.controls&&e.controls.forEach((function(e){e instanceof c.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&&Bt(n)){if(!n(t))return t}else if(t.id!==e.id)return t;return Object.assign(t,e)})):t},t.updateItemInArray=wt,t.updateItemsInArray=Ct,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}},t.ɵa=P,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
16
16
|
//# sourceMappingURL=mtgame-core.umd.min.js.map
|