1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6643],{6643:(v,d,o)=>{o.r(d),o.d(d,{TournamentsComponent:()=>N});var c=o(10467),s=o(2615),E=o(72200),_=o(89417),g=o(91029),r=o(89079),M=o(54843),O=o(68018),p=o(27544),P=o(61048),D=o(82e3),f=o(60152),h=o(48749),T=o(19348),L=o(66124),I=o(17633),R=o(35705),B=o(7030),t=o(73664),A=o(80954),W=o(89902),K=o(15449),U=o(48142),x=o(82966),y=o(69415);const z=()=>({placeholder:"global.common.season"}),S=()=>({placeholder:"global.common.organizer"}),k=()=>["module.competition.no_data_to_show"],G=(i,m)=>m.id;function b(i,m){if(1&i&&(t.j41(0,"form",4)(1,"app-form-row",6),t.nrm(2,"app-input",7)(3,"app-input",8),t.k0s()()),2&i){const n=t.XpG();t.Y8G("formGroup",n.filtersForm),t.R7$(),t.Y8G("items",2),t.R7$(),t.Y8G("isDark",!0)("selectOptions",n.seasonOptions())("isSelectMultiple",!1)("select",t.lJ4(10,z)),t.R7$(),t.Y8G("isDark",!0)("selectOptions",n.organizerOptions())("isSelectMultiple",!1)("select",t.lJ4(11,S))}}function X(i,m){1&i&&t.nrm(0,"app-skeleton-block")}function $(i,m){1&i&&t.nrm(0,"app-empty-space",9),2&i&&t.Y8G("isButtonOutlined",!0)("isLink",!1)("isMedium",!0)("noButton",!0)("textArray",t.lJ4(5,k))}function j(i,m){if(1&i){const n=t.RV6();t.j41(0,"app-list-item",12),t.bIt("listAction",function(){const a=s.eBV(n).$implicit,l=t.XpG(3);return s.Njj(l.goToCompetition(a))}),t.k0s()}if(2&i){const n=m.$implicit;t.Y8G("whiteBkg",!0)("hasBorder",!0)("mainTitle",n.name)("subtitle",null==n.organization?null:n.organization.name)("hasHover",!0)}}function F(i,m){if(1&i&&(t.j41(0,"div",10),t.Z7z(1,j,1,5,"app-list-item",11,G),t.k0s()),2&i){const n=t.XpG(2);t.R7$(),t.Dyx(n.competitions())}}function Q(i,m){if(1&i&&t.nVh(0,$,1,6,"app-empty-space",9)(1,F,3,0,"div",10),2&i){const n=t.XpG();t.vxM(n.competitions().length?1:0)}}let N=(()=>{class i{_fb=(0,s.WQX)(_.ok);_router=(0,s.WQX)(g.Ix);_route=(0,s.WQX)(g.nX);_destroyRef=(0,s.WQX)(s.abz);_clubsService=(0,s.WQX)(f.X);_apiSeasonsService=(0,s.WQX)(p.o);_apiOrganizationsService=(0,s.WQX)(P.k);_apiCompetitionsService=(0,s.WQX)(D.Y);filtersForm=this._fb.nonNullable.group({seasonId:[""],organizerId:[""]});seasonOptions=(0,s.vPA)([]);organizerOptions=(0,s.vPA)([]);competitions=(0,s.vPA)([]);filtersLoading=(0,s.vPA)(!0);competitionsLoading=(0,s.vPA)(!0);constructor(){this.filtersForm.controls.seasonId.valueChanges.pipe((0,r.pQ)(this._destroyRef)).subscribe(n=>this._loadOrganizers(n)),this.filtersForm.controls.organizerId.valueChanges.pipe((0,r.pQ)(this._destroyRef)).subscribe(n=>this._loadCompetitions(n)),this._init()}goToCompetition(n){this._router.navigate([n.id],{relativeTo:this._route})}_init(){var n=this;return(0,c.A)(function*(){const e=yield(0,M._)(n._apiSeasonsService.getSeasons());n.seasonOptions.set(e.map(u=>n._toOption(u.id,u.title)));const l=(yield n._apiSeasonsService.getCurrentSeason())?.id??e[0]?.id??"";n.filtersLoading.set(!1),l?n.filtersForm.controls.seasonId.setValue(l):n.competitionsLoading.set(!1)})()}_loadOrganizers(n){var e=this;return(0,c.A)(function*(){if(e.organizerOptions.set([]),e.competitions.set([]),!n)return void e.competitionsLoading.set(!1);const a=e._clubsService.isClubOrganization()?"private":"clupik,private",l=yield(0,M._)(e._apiOrganizationsService.getOrganizations(a,!0,n));e.organizerOptions.set(l.map(C=>e._toOption(C.id,C.name)));const u=l[0]?.id??"";u?e.filtersForm.controls.organizerId.setValue(u):e.competitionsLoading.set(!1)})()}_loadCompetitions(n){var e=this;return(0,c.A)(function*(){if(!n)return e.competitions.set([]),void e.competitionsLoading.set(!1);e.competitionsLoading.set(!0);const a=e.filtersForm.controls.seasonId.value,l=e._clubsService.getClubId();try{const u=yield(0,M._)(e._apiCompetitionsService.getOrganizationCompetitions(n,l,a));e.competitions.set(u??[])}finally{e.competitionsLoading.set(!1)}})()}_toOption(n,e){return{id:n,title:e}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=t.VBU({type:i,selectors:[["app-tournaments"]],decls:10,vars:8,consts:[[3,"isDarkMode","hasSelect"],[1,"tournaments-page-head"],[1,"fix"],[1,"tournaments-title"],[1,"tournaments-filters",3,"formGroup"],[1,"public-dashboard","white","public-tourn
1aments","main-container"],[3,"items"],["type","select","formControlName","seasonId","popoverSize","cover","inputSize","default",3,"isDark","selectOptions","isSelectMultiple","select"],["type","select","formControlName","organizerId","popoverSize","cover","inputSize","default",3,"isDark","selectOptions","isSelectMultiple","select"],["svgImage","empty_search",3,"isButtonOutlined","isLink","isMedium","noButton","textArray"],[1,"tournaments-list"],["iconRight","fa-light fa-chevron-right",3,"whiteBkg","hasBorder","mainTitle","subtitle","hasHover"],["iconRight","fa-light fa-chevron-right",3,"listAction","whiteBkg","hasBorder","mainTitle","subtitle","hasHover"]],template:function(e,a){1&e&&(t.j41(0,"app-clupik-header",0)(1,"div",1)(2,"div",2)(3,"div",3),t.EFF(4),t.nI1(5,"translate"),t.k0s()(),t.nVh(6,b,4,12,"form",4),t.k0s()(),t.j41(7,"div",5),t.nVh(8,X,1,0,"app-skeleton-block"),t.nVh(9,Q,2,1),t.k0s()),2&e&&(t.Y8G("isDarkMode",!0)("hasSelect",!1),t.R7$(4),t.JRh(t.bMT(5,6,"global.common.competitions")),t.R7$(2),t.vxM(a.filtersLoading()?-1:6),t.R7$(2),t.vxM(a.filtersLoading()||a.competitionsLoading()?8:-1),t.R7$(),t.vxM(a.filtersLoading()||a.competitionsLoading()?-1:9))},dependencies:[E.MD,_.X1,_.qT,_.BC,_.cb,_.j4,_.JD,O.h,h.P,A.Y,T.x,W.S,L.M,K.P,I.E,U.x,R.T,x.K,B.g,y.p,O.D9],styles:[".tournaments-page-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between}@media (max-width: 991px){.tournaments-page-head[_ngcontent-%COMP%]{flex-direction:column;padding-left:20px;padding-right:20px}}.tournaments-page-head[_ngcontent-%COMP%] .tournaments-title[_ngcontent-%COMP%]{font-family:var(--main-font);font-weight:600;font-size:36px;line-height:54px;color:var(--primary-text)}@media (max-width: 991px){.tournaments-page-head[_ngcontent-%COMP%] .tournaments-title[_ngcontent-%COMP%]{font-size:22px;line-height:33px}}.tournaments-filters[_ngcontent-%COMP%]{display:block}.public-tournaments[_ngcontent-%COMP%]{padding-top:20px}.tournaments-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}"],changeDetection:0})}return i})()},17633:(v,d,o)=>{o.d(d,{E:()=>O});var c=o(72200),s=o(19072),E=o(35745),_=o(49189),g=o(73664),r=o(2615);o(48142);let O=(()=>{class p{static \u0275fac=function(f){return new(f||p)};static \u0275mod=g.$C({type:p});static \u0275inj=r.G2t({imports:[_.G,E.C,c.MD,s.$]})}return p})()},19072:(v,d,o)=>{o.d(d,{$:()=>g});var c=o(49189),s=o(73664),E=o(2615);o(31165);let g=(()=>{class r{static \u0275fac=function(p){return new(p||r)};static \u0275mod=s.$C({type:r});static \u0275inj=E.G2t({imports:[c.G]})}return r})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.