1import{b as be,c as xe}from"./chunk-56A7BQAL.js";import{b as ve,c as Se,d as T,e as Ce}from"./chunk-RXHK7XE4.js";import{a as ie}from"./chunk-4CVZBQNN.js";import{Zb as pe,hc as ce,jc as de,lc as ue,qc as he}from"./chunk-PXZNPNHI.js";import"./chunk-KWNDGQWR.js";import"./chunk-2ZFY6MCW.js";import"./chunk-KQ7PEKEE.js";import"./chunk-KVMIYEBS.js";import"./chunk-DLHY2JKF.js";import"./chunk-WLMRFXCZ.js";import"./chunk-WN3UI2QV.js";import"./chunk-YVLOHBDK.js";import{a as _}from"./chunk-Z3AXU4EF.js";import"./chunk-TP3A6IN2.js";import"./chunk-XNFXA3ZT.js";import"./chunk-QLTRNXEK.js";import"./chunk-TEFEWVO6.js";import"./chunk-ZB64W4XA.js";import"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import"./chunk-FUY7HSJY.js";import"./chunk-JTYXZXFU.js";import"./chunk-7MK6I7GJ.js";import"./chunk-3HFTO6XY.js";import"./chunk-XNSH6ILV.js";import"./chunk-IZKA562T.js";import"./chunk-BROSYERN.js";import"./chunk-Y2KCFOCP.js";import"./chunk-Z52L74DH.js";import{q as ge}from"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import{b as O}from"./chunk-4D5SN44G.js";import{j as fe}from"./chunk-22ACI5KU.js";import"./chunk-FXUQQQIE.js";import"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.js";import"./chunk-FWW3IJT2.js";import"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{Cc as ne,Ff as me,Mb as te,Ue as se,d as G,k as H,kh as le,le as re,vc as oe,ve as ae}from"./chunk-X5J6QTCG.js";import{$ as I,$a as S,Ad as k,E as F,Fa as p,Ib as i,Ka as m,Ma as d,Na as P,Ni as ee,Qb as B,Rb as N,Sa as L,Sb as U,Th as v,U as E,ad as W,bb as C,cc as z,d as R,di as Z,fa as w,ga as y,gb as c,hb as a,ib as s,jb as f,o as $,pj as h,qb as M,qc as q,sb as V,tb as g,td as K,vd as u,wd as J,xd as Q,yd as X,z as j,zd as Y}from"./chunk-SMW7PHYX.js";import{j as A}from"./chunk-BMIYOSOG.js";function Oe(n,t){if(n&1&&(i(0,` 2 `),f(1,"app-calendar",0),i(2,` 3`)),n&2){let l=g();p(),c("calendarViewLocation","TEAM_CALENDAR_"+l.programID)("programViewProgramID",l.programID)}}var De=(()=>{let t=class t{constructor(e,o){this.route=e,this.siteDataService=o,this.routeSub$=null}ngOnInit(){this.route.parent.params.subscribe(e=>{console.log("params",e),this.programID=+e.programID,this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(h))},t.\u0275cmp=d({type:t,selectors:[["app-admin-program-calendar"]],standalone:!1,decls:1,vars:1,consts:[[3,"calendarViewLocation","programViewProgramID"]],template:function(o,r){o&1&&S(0,Oe,3,2),o&2&&C(r.programID?0:-1)},dependencies:[pe],encapsulation:2});let n=t;return n})();var Ie=(()=>{let t=class t{constructor(e,o){this.route=e,this.siteDataService=o,this.routeSub$=null}ngOnInit(){this.routeSub$=this.route.parent.params.subscribe(e=>{this.programID=+e.programID,this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(h))},t.\u0275cmp=d({type:t,selectors:[["app-admin-program-field-schedule"]],standalone:!1,decls:2,vars:1,consts:[[3,"programViewProgramID"]],template:function(o,r){o&1&&(a(0,"app-field-calendar",0),i(1,` 4`),s()),o&2&&c("programViewProgramID",r.programID)},dependencies:[be],encapsulation:2});let n=t;return n})();var Ae=()=>["./volunteer-settings"];function Re(n,t){n&1&&(i(0,` 5 `),a(1,"a",6),i(2,` 6 `),a(3,"span",7),i(4,` 7 `),f(5,"i",8),i(6,` Volunteer Settings 8 `),s(),i(7,` 9 `),s(),i(8,` 10 `)),n&2&&(p(),c("routerLink",z(1,Ae)))}function $e(n,t){if(n&1&&(i(0,` 11 `),f(1,"app-split-button",9),i(2,` 12 `)),n&2){let l=g(2);p(),c("menuItems",l.actionMenuItems)}}function je(n,t){if(n&1){let l=M();i(0,` 13 `),a(1,"button",10),V("click",function(){w(l);let o=g(2);return y(o.publish())}),i(2,"Publish"),s(),i(3,` 14 `)}}function Fe(n,t){if(n&1&&(i(0,` 15 `),S(1,Re,9,2),S(2,$e,3,1),S(3,je,4,0)),n&2){let l=g();p(),C(l.enableVolunteerTasks&&l.user&&l.user[l.Permission.VolunteerEvents]?1:-1),p(),C(l.actionMenuItems!=null&&l.actionMenuItems.length?2:-1),p(),C(l.showPublish?3:-1)}}function Le(n,t){if(n&1){let l=M();i(0,` 16 `),a(1,"p-selectButton",11),U("ngModelChange",function(o){w(l);let r=g();return N(r.selectedSection,o)||(r.selectedSection=o),y(o)}),V("onChange",function(o){w(l);let r=g();return y(r.onSectionChange(o.value))}),s(),i(2,` 17 `)}if(n&2){let l=g();p(),c("options",l.sectionOptions),B("ngModel",l.selectedSection),c("allowEmpty",!1)}}var we=(()=>{let t=class t{constructor(e,o,r,Me,Ve,ke){this.router=e,this.clubCalendarService=o,this.route=r,this.authorizeService=Me,this.siteDataService=Ve,this.programService=ke,this.routeSub$=null,this.unsubscribe$=new R,this.Permission=v,this.showPublish=!1,this.enableVolunteerTasks=!0,this.title="Club Calendar",this.sectionOptions=[],this.selectedSection=null}ngOnInit(){return A(this,null,function*(){this.user=yield $(this.authorizeService.getUser()),this.siteDataService.getClubSettings().pipe(E(this.unsubscribe$)).subscribe({next:e=>{this.clubSettings=e,this.enableVolunteerTasks=!!e.clubOptions.find(o=>o.optionID===ee.ENABLE_VOLUNTEER_TASKS)?.boolValue,this.buildSectionOptions()}}),this.route.params.pipe(E(this.unsubscribe$),F(e=>(console.log("params",e),this.programID=+e.programID,this.createMenuItems(this.programID),this.programService.getProgram(this.programID)))).subscribe({next:e=>
17{this.program=e,this.siteDataService.hideSiteLoader()},error:e=>{console.error(e),this.siteDataService.hideSiteLoader()}}),this.router.events.pipe(j(e=>e instanceof K)).subscribe(()=>{this.updateShowPublish()}),this.updateShowPublish()})}updateShowPublish(){let e=this.route;for(console.log("Starting updateShowPublish"),this.showPublish=!1,this.title="Club Calendar";e.firstChild;)e=e.firstChild,e.snapshot.data&&(console.log("Route data:",e.snapshot.data),e.snapshot.data.showPublish&&(this.showPublish=!0),e.snapshot.data.metaTitle&&(this.title=e.snapshot.data.metaTitle));e.snapshot.data&&(console.log("Final Route data:",e.snapshot.data),e.snapshot.data.showPublish&&(this.showPublish=!0),e.snapshot.data.metaTitle&&(this.title=e.snapshot.data.metaTitle)),console.log("Final showPublish:",this.showPublish),this.setSelectedSectionFromRoute()}buildSectionOptions(){let e=[{label:"Calendar",value:"calendar"}];this.user?.[v.FieldCalendar]&&e.push({label:`${this.clubSettings?.club?.sport?.locationType||"Field"} Schedule`,value:"field-schedule"}),this.sectionOptions=e}setSelectedSectionFromRoute(){this.selectedSection=this.router.url.includes("/field-schedule")?"field-schedule":"calendar"}onSectionChange(e){this.router.navigate([e],{relativeTo:this.route})}createMenuItems(e){this.actionMenuItems=[],this.actionMenuItems.push({label:"Import/Export",command:()=>{this.router.navigate([`/admin/teams/manage-calendar/program/${e}/import`])}}),this.actionMenuItems.push({label:"Bulk Cancel",command:()=>{this.router.navigate([`/admin/teams/manage-calendar/program/${e}/bulk-edit`])}}),this.user[v.CalendarBulkEdit]&&this.actionMenuItems.push({label:"Bulk Editing",command:()=>{this.router.navigate([`/admin/teams/manage-calendar/program/${e}/bulk-edit`],{queryParams:{advancedView:!0}})}})}publish(){console.log("publish"),this.clubCalendarService.publishEventsClicked()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};t.\u0275fac=function(o){return new(o||t)(m(Q),m(re),m(u),m(Z),m(h),m(_))},t.\u0275cmp=d({type:t,selectors:[["ng-component"]],standalone:!1,decls:21,vars:5,consts:[["customButtonContent",""],["role","main"],[1,"calendar-header-navigation"],[3,"pageTitle","parentLinkText","showBackButton","parentLinkUrl"],[1,"mb-3"],[1,"full-width","d-flex","justify-content-center"],["routerLinkActive","d-none",1,"btn-a11y","mr-3","opacity-100",3,"routerLink"],[1,"text-primary-link","opacity-100"],[1,"fa-regular","fa-gear"],["buttonClass","btn-md",3,"menuItems"],["type","button",1,"ml-3","btn","btn-primary",3,"click"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","options","ngModel","allowEmpty"]],template:function(o,r){o&1&&(a(0,"main",1),i(1,` 18 `),a(2,"div",2),i(3,` 19 `),a(4,"app-admin-header",3),i(5,` 20 `),L(6,Fe,4,3,"ng-template",null,0,q),i(8,` 21 `),s(),i(9,` 22 `),a(10,"div",4),i(11,` 23 `),a(12,"div",5),i(13,` 24 `),i(14,` 25 `),S(15,Le,3,3),s(),i(16,` 26 `),s(),i(17,` 27 `),s(),i(18,` 28 `),f(19,"router-outlet"),i(20,` 29`),s()),o&2&&(p(4),c("pageTitle",(r.program==null?null:r.program.name)+" "+r.title)("parentLinkText",r.showPublish?"Manage Teams":"Calendar")("showBackButton",!0)("parentLinkUrl",r.showPublish?"/admin/teams":"./calendar"),p(11),C(r.showPublish?15:-1))},dependencies:[J,X,Y,G,H,ae,se,ne],styles:[".calendar-header-navigation[_ngcontent-%COMP%]{max-width:calc(100vw - 90px);position:sticky!important;left:0;margin-bottom:1rem}"]});let n=t;return n})();var ye=(()=>{let t=class t{constructor(e,o){this.route=e,this.siteDataService=o,this.routeSub$=null}ngOnInit(){this.routeSub$=this.route.parent.params.subscribe(e=>{this.programID=+e.programID,this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(h))},t.\u0275cmp=d({type:t,selectors:[["app-admin-program-calendar-review"]],standalone:!1,decls:3,vars:0,template:function(o,r){o&1&&(a(0,"p"),i(1,"Coming soon, an overview of all your events for the program."),s(),i(2,` 30`))},encapsulation:2});let n=t;return n})();var Pe=(()=>{let t=class t{constructor(e,o){this.route=e,this.siteDataService=o,this.routeSub$=null}ngOnInit(){this.routeSub$=this.route.parent.params.subscribe(e=>
30{this.programID=+e.programID,this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(h))},t.\u0275cmp=d({type:t,selectors:[["app-import-program-calendar"]],standalone:!1,decls:7,vars:2,consts:[["role","main"],[3,"programID"]],template:function(o,r){o&1&&(a(0,"main",0),i(1,` 31 `),f(2,"app-import-calendar",1),i(3,` 32 `),f(4,"app-import-volunteer",1),i(5,` 33`),s(),i(6,` 34 35`)),o&2&&(p(2),c("programID",r.programID),p(2),c("programID",r.programID))},dependencies:[de,T],encapsulation:2});let n=t;return n})();var _e=(()=>{let t=class t{constructor(e,o){this.route=e,this.siteDataService=o,this.advancedView=!1,this.routeSub$=null}ngOnInit(){this.route.parent.params.subscribe(e=>{console.log("params",e),this.programID=+e.programID,this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)}),this.routeSub$=this.route.queryParams.subscribe(e=>{this.advancedView=e.advancedView,this.siteDataService.hideSiteLoader(),console.log("publish view: ",this.advancedView)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(h))},t.\u0275cmp=d({type:t,selectors:[["ng-component"]],standalone:!1,decls:1,vars:2,consts:[[3,"advancedView","programID"]],template:function(o,r){o&1&&f(0,"app-advanced-bulk-edit-calendar",0),o&2&&c("advancedView",r.advancedView)("programID",r.programID)},dependencies:[ue],encapsulation:2});let n=t;return n})();function Ne(n,t){if(n&1&&(i(0,` 36 `),a(1,"app-volunteer-settings",7),i(2,` 37 `),s(),i(3,` 38 `)),n&2){let l=g();p(),c("programID",l.programID)("teams",l.teams)}}var Te=(()=>{let t=class t{constructor(e,o,r){this.route=e,this.teamService=o,this.siteDataService=r,this.teams=[],this.routeSub$=null}ngOnInit(){this.route.parent.params.subscribe(e=>{console.log("params",e),this.programID=+e.programID,this.teamService.getTeamsForProgram(this.programID).subscribe({next:o=>{this.teams=o}}),this.siteDataService.hideSiteLoader(),console.log("Program ID:",this.programID)})}ngOnDestroy(){this.routeSub$&&this.routeSub$.unsubscribe()}};t.\u0275fac=function(o){return new(o||t)(m(u),m(me),m(h))},t.\u0275cmp=d({type:t,selectors:[["app-program-volunteer-settings"]],standalone:!1,decls:38,vars:5,consts:[["role","main"],[1,"row"],[1,"col-lg-6"],[1,"card","horizontal-form"],[1,"card-heading"],["alerType","info",3,"isInline"],[3,"programID"],[3,"programID","teams"]],template:function(o,r){o&1&&(a(0,"main",0),i(1,` 39 `),i(2,` 40`),a(3,"div",1),i(4,` 41 `),a(5,"div",2),i(6,` 42 `),a(7,"section",3),i(8,` 43 `),a(9,"h2",4),i(10,"Volunteer Tasks (Program)"),s(),i(11,` 44 `),a(12,"app-inline-alert",5),i(13,"Create new volunteer tasks available to all teams in the program. These tasks are in addition to any existing club-wide tasks."),s(),i(14,` 45 `),a(15,"app-volunteer-roles",6),i(16,` 46 `),s(),i(17,` 47 `),s(),i(18,` 48 `),s(),i(19,` 49 `),a(20,"div",2),i(21,` 50 `),a(22,"section",3),i(23,` 51 `),a(24,"h2",4),i(25,"Bulk Settings Update"),s(),i(26,` 52 `),a(27,"app-inline-alert",5),i(28,"Use this tool to quickly apply volunteer settings across multiple teams in the program. To view a specific team's settings, visit their team page in the Manage Teams section."),s(),i(29,` 53 `),S(30,Ne,4,2),s(),i(31,` 54 `),s(),i(32,` 55`),s(),i(33,` 56`),a(34,"app-import-volunteer",6),i(35,` 57`),s(),i(36,` 58`),s(),i(37,` 59`)),o&2&&(p(12),c("isInline",!0),p(3),c("programID",r.programID),p(12),c("isInline",!0),p(3),C((r.teams==null?null:r.teams.length)>0?30:-1),p(4),c("programID",r.programID))},dependencies:[te,ve,Se,T],encapsulation:2});let n=t;return n})();var Ee=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=P({type:t}),t.\u0275inj=I({imports:[k.forChild([{path:"program/:programID",component:we,canActivate:[O],data:{metaTitle:"Calendar",admin:!0},canActivateChild:[ie],children:[{path:"review",component:ye},{path:"field-schedule",component:Ie,data:{admin:!0,metaTitle:"Facility Calendar",permissions:[v.FieldCalendar],showPublish:!0,bodyClass:"field-calendar"}},{path:"import",component:Pe,data:{admin:!0,metaTitle:"Import & Export",permissions:[v.ClubCalendar]}},{path:"bulk-edit",component:_e,canActivate:[O],data:{metaTitle:"Bulk Actions",permissions:[v.ClubCalendar]}},{path:"calendar",component:De,data:{admin:!0,showPublish:!0,metaTitle:"Calendar",permissions:[v.ClubCalendar]}}
59,{path:"volunteer-settings",component:Te,data:{admin:!0,permissions:[v.VolunteerEvents],metaTitle:"Volunteer Settings"}}]}]),k]});let n=t;return n})();var Di=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=P({type:t}),t.\u0275inj=I({providers:[_],imports:[W,Ee,le,oe,fe,ge,ce,he,xe,Ce]});let n=t;return n})();export{Di as ManageCalendarModule};
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.