PageSourceSearch

https://starsbasketballclub.com/chunk-MDOPFUEK.js

js starsbasketballclub.com collected 2026-10-04 05:49:17 UTC 49,742 bytes, 451 lines download raw bytes

1import{a as $e}from"./chunk-MBYGL3GH.js";import{b as C,c as G}from"./chunk-KQRJFPHS.js";import{a as ve}from"./chunk-4CVZBQNN.js";import{a as Te}from"./chunk-JKMNVQUA.js";import{b as Ee}from"./chunk-4D5SN44G.js";import{a as Ue}from"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-U22BTVEZ.js";import{Cc as ye,Ec as be,Ed as Me,Ee as Ve,Eg as Be,Hd as Ne,Ic as De,Lc as we,Mb as fe,Rc as Pe,Ug as Le,bf as Re,cc as Ae,d as me,k as de,kd as Fe,kh as Ge,lc as Ie,ng as ke,ve as Oe,xa as Se}from"./chunk-X5J6QTCG.js";import{$ as B,$a as u,Ad as z,Eb as O,Fa as s,Fb as F,Gb as k,Hb as re,Ib as e,Jb as M,Ka as V,Kb as S,Lb as le,Ma as te,Na as L,Qb as b,Rb as D,Sa as ne,Sb as w,T as Z,Th as ge,U as N,V as ee,Wc as ce,Xb as se,bb as p,be as xe,cc as P,d as Q,db as T,eb as E,fa as _,fb as A,ga as x,gb as g,hb as a,ib as o,if as Ce,jb as f,k as q,lc as K,nc as j,pj as he,qb as I,sb as v,tb as m,u as Y,vd as ue,w as X,xb as ie,xd as pe,yb as ae,yd as _e,zb as oe}from"./chunk-SMW7PHYX.js";import{a as H,b as J}from"./chunk-BMIYOSOG.js";var Je=["accountForm"],U=()=>({width:"100%"}),$=()=>[];function Qe(i,c){if(i&1&&(e(0,`
2                              `),a(1,"span"),e(2),K(3,"date"),K(4,"date"),o(),e(5,`
3                            `)),i&2){let t=m().$implicit;s(2),le(`
4                                `,j(3,2,t.startDate,"MMM d, yyyy")," - ",j(4,5,t.endDate,"MMM d, yyyy"),`
5                              `)}}function qe(i,c){if(i&1&&(e(0,`
6                            `),a(1,"app-tag",22),e(2,`
7                            `),o(),e(3,`
8                          `)),i&2){let t=m().$implicit,n=m(3);s(),g("text",((t.teams==null?null:t.teams.length)||0).toString())("styleClass",(n.selectedProgram==null?null:n.selectedProgram.programID)===t.programID?"info":"")("buttonStyleClass","mr-0")}}function Ye(i,c){if(i&1){let t=I();e(0,`
9                    `),a(1,"li"),e(2,`
10                      `),a(3,"button",18),v("click",function(){let r=_(t).$implicit,l=m(3);return x(l.onProgramSelect(r))}),e(4,`
11                        `),a(5,"div",19),e(6,`
12                          `),a(7,"div",20),e(8),o(),e(9,`
13                          `),a(10,"div",21),e(11,`
14                            `),u(12,Qe,6,8),o(),e(13,`
15                        `),o(),e(14,`
16                        `),a(15,"span"),e(16,`
17                          `),u(17,qe,4,3),o(),e(18,`
18                      `),o(),e(19,`
19                    `),o(),e(20,`
20                  `)}if(i&2){let t=c.$implicit,n=m(3);s(),F("active",(n.selectedProgram==null?null:n.selectedProgram.programID)===t.programID),s(7),M(t.name),s(2),F("text-grey",(n.selectedProgram==null?null:n.selectedProgram.programID)!==t.programID),s(2),p(t.startDate&&t.endDate?12:-1),s(5),p(t.teams!=null&&t.teams.length?17:-1)}}function Xe(i,c){if(i&1&&(e(0,`
21                  `),E(1,Ye,21,7,null,null,T)),i&2){let t=m(2);s(),A(t.programs)}}function Ze(i,c){i&1&&(e(0,`
22                `),a(1,"div",23),e(2,`
23                  `),f(3,"i",24),e(4,` Loading programs...
24                `),o(),e(5,`
25              `))}function et(i,c){i&1&&(e(0,`
26                `),a(1,"div",25),e(2,`
27                  No active programs found
28                `),o(),e(3,`
29              `))}function tt(i,c){if(i&1){let t=I();e(0,`
30                    `),a(1,"div",29),e(2,`
31                      `),a(3,"p-checkbox",30),w("ngModelChange",function(r){_(t);let l=m(3);return D(l.selectAllTeams,r)||(l.selectAllTeams=r),x(r)}),v("onChange",function(){_(t);let r=m(3);return x(r.toggleSelectAll())}),e(4,`
32                      `),o(),e(5,`
33                      `),a(6,"label",31),e(7,`
34                        Select All
35                      `),o(),e(8,`
36                    `),o(),e(9,`
37                  `)}if(i&2){let t=m(3);s(3),b("ngModel",t.selectAllTeams),g("binary",!0)("disabled",!t.hasSelectableTeamsInCurrentProgram),s(3),F("text-muted",!t.hasSelectableTeamsInCurrentProgram)}}function nt(i,c){if(i&1&&(e(0,`
38                          `),a(1,"span"),e(2),o(),e(3,`
39                        `)),i&2){let t=m(4);s(2),S(`
40                            (`,t.selectedTeamsCount,` total)
41                          `)}}function it(i,c){if(i&1&&(e(0,`
42                    `),a(1,"div"),e(2,`
43                      `),a(3,"span",32),e(4),u(5,nt,4,1),o(),e(6,`
44                    `),o(),e(7,`
45                  `)),i&2){let t=m(3);s(4),S(`
46                        `,t.selectedTeamsInCurrentProgram,` selected in this program
47                        `),s(),p(t.selectedTeamsCount>t.selectedTeamsInCurrentProgram?5:-1)}}function at(i,c){i&1&&(e(0,`
48                    `),a(1,"div",33),e(2,`
49                      `),f(3,"i",24),e(4,` Loading teams...
50                    `),o(),e(5,`
51                  `))}function ot(i,c){i&1&&(e(0,`
52                                `),a(1,"app-status-indicator",41),e(2,`
53                                `),o(),e(3,`
54                                `))}function rt(i,c){if(i&1&&(e(0,`
55                        `),a(1,"tr",36),e(2,`
56                          `),a(3,"td",37),e(4,`
57                            `),a(5,"p-tableCheckbox",38),v("click",function(n){return n.stopPropagation()}),o(),e(6,`
58                          `),o(),e(7,`
59                          `),a(8,"td",39),e(9,`
60                            `),a(10,"div",40),e(11),u(12,ot,4,0),o(),e(13,`
61                          `),o(),e(14,`
62                        `),o(),e(15,`
63                      `)),i&2){let t=c.$implicit;s(),F("text-muted",t.hasExistingAccount)("cursor-pointer",!t.hasExistingAccount),g("pSelectableRow",t)("pSelectableRowDisabled",t.hasExistingAccount),s(4),g("value",t)("disabled",t.hasExistingAccount),s(6),S(`
64                                `,t.name,`
65                                `),s(),p(t.hasExistingAccount?12:-1)}}function lt(i,c){if(i&1){let t=I();e(0,`
66                    `),a(1,"p-table",34),w("selectionChange",function(r){_(t);let l=m(3);return D(l.selectedTeams,r)||(l.selectedTeams=r),x(r)}),v("selectionChange",function(){_(t);let r=m(3);return x(r.onTeamSelectionChange())}),e(2,`
67                      `),ne(3,rt,16,10,"ng-template",35),e(4,`
68                    `),o(),e(5,`
69                  `)}if(i&2){let t=m(3);s(),g("value",t.teams),b("selection",t.selectedTeams),g("rowHover",!1)}}function st(i,c){if(i&1&&(e(0,`
70              `),a(1,"div",26),e(2,`
71                `),a(3,"div",27),e(4,`
72                  `),u(5,tt,10,5),u(6,it,8,2),o(),e(7,`
73                `),a(8,"div",28),e(9,`
74                  `),u(10,at,6,0),u(11,lt,6,3),o(),e(12,`
75              `),o(),e(13,`
76            `)),i&2){let t=m(2);s(5),p(t.selectedProgram&&t.teams.length>0?5:-1),s(),p(t.selectedProgram&&t.teams.length>0?6:-1),s(4),p(t.selectedProgram&&t.loadingTeams?10:-1),s(),p(t.selectedProgram&&!t.loadingTeams&&t.teams.length>0?11:-1)}}function ct(i,c){i&1&&(e(0,`
77              `),f(1,"app-null-card",42),e(2,`
78            `)),i&2&&(s(),g("showCard",!0))}function mt(i,c){i&1&&(e(0,`
79              `),f(1,"app-null-card",43),e(2,`
80            `)),i&2&&(s(),g("showCard",!0))}function dt(i,c){if(i&1&&(e(0,`
81        `),a(1,"h2",10),e(2,"Select Teams"),o(),e(3,`
82        `),a(4,"div",11),e(5,`
83          Choose which teams you want to set up a team debit card account for. We'll create a separate
84          Stripe-managed account for each selected team; in the next step, you can assign a team
85          treasurer to manage spending and payouts.
86        `),o(),e(6,`
87        `),a(7,"div",12),e(8,`
88          `),e(9,`
89          `),a(10,"div",13),e(11,`
90            `),a(12,"nav",14),e(13,`
91              `),a(14,"ul"),e(15,`
92                `),a(16,"li",15)(17,"h2",16),e(18,"Active Programs"),o()(),e(19,`
93                `),u(20,Xe,3,0),o(),e(21,`
94              `),u(22,Ze,6,0),u(23,et,4,0),o(),e(24,`
95          `),o(),e(25,`
96          `),e(26,`
97          `),a(27,"div",17),e(28,`
98            `),u(29,st,14,4),u(30,ct,3,1),u(31,mt,3,1),o(),e(32,`
99        `),o(),e(33,`
100      `)),i&2){let t=m();s(20),p(!t.loadingPrograms&&t.programs.length>0?20:-1),s(2),p(t.loadingPrograms?22:-1),s(),p(!t.loadingPrograms&&t.programs.length===0?23:-1),s(6),p(t.selectedProgram&&t.teams.length>0&&!t.loadingTeams?29:-1),s(),p(t.selectedProgram?-1:30),s(),p(t.selectedProgram&&!t.loadingTeams&&t.teams.length===0?31:-1)}}function ut(i,c){if(i&1){let t=I();e(0,`
101                  `),a(1,"app-dynamic-form",55,0),e(3,`
102                    `),a(4,"div",56),e(5,`
103                      `),a(6,"div",52),e(7),o(),e(8,`
104                      `),a(9,"div",52),e(10,`
105                        `),a(11,"app-dynamic-form-field",57),e(12,`
106                        `),o(),e(13,`
107                      `),o(),e(14,`
108                      `),a(15,"div",53),e(16,`
109                        `),a(17,"p-multiSelect",58),w("ngModelChange",function(r){_(t);let l=m().$implicit;return D(l.treasurerClubUserIDs,r)||(l.treasurerClubUserIDs=r),x(r)}),v("onChange",function(r){_(t);let l=m().$implicit,d=m(4);return x(d.onTreasurerChange(r,l))})("onClear",function(){_(t);let r=m().$implicit,l=m(4);return x(l.onTreasurerClear(r))}),e(18,`
110                        `),o(),e(19,`
111                      `),o(),e(20,`
112                      `),a(21,"div",52),e(22,`
113                        `),a(23,"p-multiSelect",59),w("ngModelChange",function(r){_(t);let l=m().$implicit;return D(l.cardholderClubUserIDs,r)||(l.cardholderClubUserIDs=r),x(r)}),v("onChange",function(r){_(t);let l=m().$implicit,d=m(4);return x(d.onCardholderChange(r,l))}),e(24,`
114                        `),o(),e(25,`
115                      `),o(),e(26,`
116                      `),a(27,"div",60),e(28,`
117                        `),a(29,"button",61),v("click",function(){_(t);let r=m().$implicit,l=m(4);return x(l.removeTeamAccount(r))}),e(30,`
118                          `),f(31,"i",62),e(32,`
119                        `),o(),e(33,`
120                      `),o(),e(34,`
121                    `),o(),e(35,`
122                  `),o(),e(36,`
123                `)}if(i&2){let t=m(),n=t.$implicit,r=t.$index,l=t.$count,d=m(4);s(),g("formID","account-form-"+n.team.teamID+"-"+n.programID)("fields",d.accountFields[d.getAccountIndex(n)])("entity",n)("contentFieldsMode",!0)("horizontalForm",!1)("showSubmitButton",!1)("showCancelButton",!1)("enableSavingOverlay",!1),s(3),F("border-bottom",r!==l-1),s(3),S(`
124                        `,n.programName,`
125                      `),s(4),g("formID","account-form-"+n.team.teamID+"-"+n.programID)("hideLabel",!0),s(6),k(P(27,U)),b("ngModel",n.treasurerClubUserIDs),g("options",n.treasurerOptions||P(28,$))("showClear",!0)("maxSelectedLabels",1)("filter",!0),s(6),k(P(29,U)),b("ngModel",n.cardholderClubUserIDs),g("options",n.cardholderOptions||P(30,$))("showClear",!0)("maxSelectedLabels",1)("filter",!0)}}function pt(i,c){if(i&1&&(e(0,`
126                `),u(1,ut,37,31)),i&2){let t=c.$implicit,n=m(4);s(),p(n.accountFields[n.getAccountIndex(t)]?1:-1)}}function _t(i,c){if(i&1&&(e(0,`
127            `),a(1,"div",49),e(2,`
128              `),a(3,"h5",50),e(4),o(),e(5,`
129              `),a(6,"div",51),e(7,`
130                `),a(8,"div",52),e(9,"Program"),o(),e(10,`
131                `),a(11,"div",52),e(12,"Team Name on Card"),o(),e(13,`
132                `),a(14,"div",53),e(15,"Treasurer"),o(),e(16,`
133                `),a(17,"div",52),e(18,"Cardholders"),o(),e(19,`
134                `),f(20,"div",54),e(21,`
135              `),o(),e(22,`
136              `),E(23,pt,2,1,null,null,T),o(),e(25,`
137          `)),i&2){let t=c.$implicit;s(4),M(t.team.name),s(19),A(t.accounts)}}function xt(i,c){if(i&1&&(e(0,`
138          `),E(1,_t,26,1,null,null,T)),i&2){let t=m(2);s(),A(t.teamGroups)}}function Ct(i,c){if(i&1){let t=I();e(0,`
139                  `),a(1,"app-dynamic-form",55,0),e(3,`
140                    `),a(4,"div",56),e(5,`
141                      `),a(6,"div",52),e(7),o(),e(8,`
142                      `),a(9,"div",52),e(10,`
143                        `),a(11,"app-dynamic-form-field",57),e(12,`
144                        `),o(),e(13,`
145                      `),o(),e(14,`
146                      `),a(15,"div",53),e(16,`
147                        `),a(17,"p-multiSelect",58),w("ngModelChange",function(r){_(t);let l=m().$implicit;return D(l.treasurerClubUserIDs,r)||(l.treasurerClubUserIDs=r),x(r)}),v("onChange",function(r){_(t);let l=m().$implicit,d=m(4);return x(d.onTreasurerChange(r,l))})("onClear",function(){_(t);let r=m().$implicit,l=m(4);return x(l.onTreasurerClear(r))}),e(18,`
148                        `),o(),e(19,`
149                      `),o(),e(20,`
150                      `),a(21,"div",52),e(22,`
151                        `),a(23,"p-multiSelect",59),w("ngModelChange",function(r){_(t);let l=m().$implicit;return D(l.cardholderClubUserIDs,r)||(l.cardholderClubUserIDs=r),x(r)}),v("onChange",function(r){_(t);let l=m().$implicit,d=m(4);return x(d.onCardholderChange(r,l))}),e(24,`
152                        `),o(),e(25,`
153                      `),o(),e(26,`
154                      `),a(27,"div",60),e(28,`
155                        `),a(29,"button",61),v("click",function(){_(t);let r=m().$implicit,l=m(4);return x(l.removeTeamAccount(r))}),e(30,`
156                          `),f(31,"i",62),e(32,`
157                        `),o(),e(33,`
158                      `),o(),e(34,`
159                    `),o(),e(35,`
160                  `),o(),e(36,`
161                `)}if(i&2){let t=m(),n=t.$implicit,r=t.$index,l=t.$count,d=m(4);s(),g("formID","account-form-"+n.team.teamID+"-"+n.programID)("fields",d.accountFields[d.getAccountIndex(n)])("entity",n)("contentFieldsMode",!0)("horizontalForm",!1)("showSubmitButton",!1)("showCancelButton",!1)("enableSavingOverlay",!1),s(3),F("border-bottom",r!==l-1),s(3),S(`
162                        `,n.team.name,`
163                      `),s(4),g("formID","account-form-"+n.team.teamID+"-"+n.programID)("hideLabel",!0),s(6),k(P(27,U)),b("ngModel",n.treasurerClubUserIDs),g("options",n.treasurerOptions||P(28,$))("showClear",!0)("maxSelectedLabels",1)("filter",!0),s(6),k(P(29,U)),b("ngModel",n.cardholderClubUserIDs),g("options",n.cardholderOptions||P(30,$))("showClear",!0)("maxSelectedLabels",1)("filter",!0)}}function gt(i,c){if(i&1&&(e(0,`
164                `),u(1,Ct,37,31)),i&2){let t=c.$implicit,n=m(4);s(),p(n.accountFields[n.getAccountIndex(t)]?1:-1)}}function ht(i,c){if(i&1&&(e(0,`
165            `),a(1,"div",49),e(2,`
166              `),a(3,"h5",50),e(4),o(),e(5,`
167              `),a(6,"div",51),e(7,`
168                `),a(8,"div",52),e(9,"Team"),o(),e(10,`
169                `),a(11,"div",52),e(12,"Team Name on Card"),o(),e(13,`
170                `),a(14,"div",53),e(15,"Treasurer"),o(),e(16,`
171                `),a(17,"div",52),e(18,"Cardholders"),o(),e(19,`
172                `),f(20,"div",54),e(21,`
173              `),o(),e(22,`
174              `),E(23,gt,2,1,null,null,T),o(),e(25,`
175          `)),i&2){let t=c.$implicit;s(4),M(t.programName),s(19),A(t.accounts)}}function St(i,c){if(i&1&&(e(0,`
176          `),E(1,ht,26,1,null,null,T)),i&2){let t=m(2);s(),A(t.programGroups)}}function ft(i,c){i&1&&(e(0,`
177          `),f(1,"app-null-card",63),e(2,`
178        `))}function vt(i,c){if(i&1){let t=I();e(0,`
179        `),a(1,"h2",10),e(2,"Select Cardholders"),o(),e(3,`
180          `),a(4,"div",44),e(5,`
181          `),a(6,"div",45),e(7,`
182            `),a(8,"p-selectButton",46),w("ngModelChange",function(r){_(t);let l=m();return D(l.selectedGroupBy,r)||(l.selectedGroupBy=r),x(r)}),v("onChange",function(r){_(t);let l=m();return x(l.selectGroupBy(r.value))}),o(),e(9,`
183          `),o(),e(10,`
184        `),o(),e(11,`
185        `),a(12,"div",47),e(13,`
186          `),a(14,"div",48),e(15,`
187            Select teams to open accounts for. Name each team card and assign a treasurer. Cardholders
188            and treasurers can be assigned later if you're not ready now.
189          `),o(),e(16,`
190        `),o(),e(17,`
191        `),e(18,`
192        `),u(19,xt,3,0),u(20,St,3,0),u(21,ft,3,0)}if(i&2){let t=m();s(8),g("options",t.groupByOptions)("allowEmpty",!1),b("ngModel",t.selectedGroupBy),s(11),p(t.groupBy===t.GroupByOption.TEAM?19:-1),s(),p(t.groupBy===t.GroupByOption.PROGRAM?20:-1),s(),p(t.teamAccounts.length===0?21:-1)}}function Tt(i,c){if(i&1&&(e(0,`
193                                `),a(1,"div"),e(2),o(),e(3,`
194                              `)),i&2){let t=c.$implicit;s(2),S(`
195                                  `,t,`
196                                `)}}function Et(i,c){if(i&1&&(e(0,`
197                            `),a(1,"div"),e(2,`
198                              `),E(3,Tt,4,1,null,null,T),o(),e(5,`
199                          `)),i&2){let t=m().$implicit;s(3),A(t.treasurerNames)}}function At(i,c){i&1&&(e(0,`
200                            `),a(1,"em",80),e(2,`
201                              unassigned
202                            `),o(),e(3,`
203                          `))}function It(i,c){if(i&1&&(e(0,`
204                                `),a(1,"div"),e(2),o(),e(3,`
205                              `)),i&2){let t=c.$implicit;s(2),S(`
206                                  `,t,`
207                                `)}}function yt(i,c){if(i&1&&(e(0,`
208                            `),a(1,"div"),e(2,`
209                              `),E(3,It,4,1,null,null,T),o(),e(5,`
210                          `)),i&2){let t=m().$implicit;s(3),A(t.cardholderNames)}}function bt(i,c){i&1&&(e(0,`
211                            `),a(1,"em",80),e(2,`
212                              none
213                            `),o(),e(3,`
214                          `))}function Dt(i,c){if(i&1&&(e(0,`
215                      `),a(1,"div",76),e(2,`
216                        `),a(3,"div",77),e(4),o(),e(5,`
217                        `),a(6,"div",78),e(7),o(),e(8,`
218                        `),a(9,"div",79),e(10,`
219                          `),u(11,Et,6,0),u(12,At,4,0),o(),e(13,`
220                        `),a(14,"div",79),e(15,`
221                          `),u(16,yt,6,0),u(17,bt,4,0),o(),e(18,`
222                      `),o(),e(19,`
223                    `)),i&2){let t=c.$implicit;s(4),S(`
224                          `,t.programName,`
225                        `),s(3),S(`
226                          `,t.teamNameOnCard||t.team.name,`
227                        `),s(4),p((t.treasurerClubUserIDs==null?null:t.treasurerClubUserIDs.length)>0?11:-1),s(),p(!t.treasurerClubUserIDs||t.treasurerClubUserIDs.length===0?12:-1),s(4),p((t.cardholderClubUserIDs==null?null:t.cardholderClubUserIDs.length)>0?16:-1),s(),p(!t.cardholderClubUserIDs||t.cardholderClubUserIDs.length===0?17:-1)}}function wt(i,c){if(i&1&&(e(0,`
228                `),a(1,"div",71),e(2,`
229                  `),a(3,"div",72),e(4,`
230                    `),a(5,"h5",73),e(6),o(),e(7,`
231                  `),o(),e(8,`
232                  `),a(9,"div",48),e(10,`
233                    `),a(11,"div",74),e(12,`
234                      `),a(13,"div",75),e(14,"Program"),o(),e(15,`
235                      `),a(16,"div",52),e(17,"Team Name on Card"),o(),e(18,`
236                      `),a(19,"div",53),e(20,"Treasurer(s)"),o(),e(21,`
237                      `),a(22,"div",53),e(23,"Cardholders"),o(),e(24,`
238                    `),o(),e(25,`
239                    `),E(26,Dt,20,6,null,null,T),o(),e(28,`
240                `),o(),e(29,`
241              `)),i&2){let t=c.$implicit;s(6),M(t.team.name),s(20),A(t.accounts)}}function Pt(i,c){if(i&1&&(e(0,`
242              `),E(1,wt,30,1,null,null,T)),i&2){let t=m(2);s(),A(t.teamGroups)}}function Ft(i,c){if(i&1&&(e(0,`
243                                `),a(1,"div"),e(2),o(),e(3,`
244                              `)),i&2){let t=c.$implicit;s(2),S(`
245                                  `,t,`
246                                `)}}function Mt(i,c){if(i&1&&(e(0,`
247                            `),a(1,"div"),e(2,`
248                              `),E(3,Ft,4,1,null,null,T),o(),e(5,`
249                          `)),i&2){let t=m().$implicit;s(3),A(t.treasurerNames)}}function Nt(i,c){i&1&&(e(0,`
250                            `),a(1,"em",80),e(2,`
251                              unassigned
252                            `),o(),e(3,`
253                          `))}function Ot(i,c){if(i&1&&(e(0,`
254                                `),a(1,"div"),e(2),o(),e(3,`
255                              `)),i&2){let t=c.$implicit;s(2),S(`
256                                  `,t,`
257                                `)}}function Vt(i,c){if(i&1&&(e(0,`
258                            `),a(1,"div"),e(2,`
259                              `),E(3,Ot,4,1,null,null,T),o(),e(5,`
260                          `)),i&2){let t=m().$implicit;s(3),A(t.cardholderNames)}}function Rt(i,c){i&1&&(e(0,`
261                            `),a(1,"em",80),e(2,`
262                              none
263                            `),o()
263,e(3,`
264                          `))}function kt(i,c){if(i&1&&(e(0,`
265                      `),a(1,"div",76),e(2,`
266                        `),a(3,"div",77),e(4),o(),e(5,`
267                        `),a(6,"div",78),e(7),o(),e(8,`
268                        `),a(9,"div",79),e(10,`
269                          `),u(11,Mt,6,0),u(12,Nt,4,0),o(),e(13,`
270                        `),a(14,"div",79),e(15,`
271                          `),u(16,Vt,6,0),u(17,Rt,4,0),o(),e(18,`
272                      `),o(),e(19,`
273                    `)),i&2){let t=c.$implicit;s(4),S(`
274                          `,t.team.name,`
275                        `),s(3),S(`
276                          `,t.teamNameOnCard||t.team.name,`
277                        `),s(4),p((t.treasurerClubUserIDs==null?null:t.treasurerClubUserIDs.length)>0?11:-1),s(),p(!t.treasurerClubUserIDs||t.treasurerClubUserIDs.length===0?12:-1),s(4),p((t.cardholderClubUserIDs==null?null:t.cardholderClubUserIDs.length)>0?16:-1),s(),p(!t.cardholderClubUserIDs||t.cardholderClubUserIDs.length===0?17:-1)}}function Bt(i,c){if(i&1&&(e(0,`
278                `),a(1,"div",71),e(2,`
279                  `),a(3,"div",72),e(4,`
280                    `),a(5,"h5",73),e(6),o(),e(7,`
281                  `),o(),e(8,`
282                  `),a(9,"div",48),e(10,`
283                    `),a(11,"div",74),e(12,`
284                      `),a(13,"div",75),e(14,"Team"),o(),e(15,`
285                      `),a(16,"div",52),e(17,"Team Name on Card"),o(),e(18,`
286                      `),a(19,"div",53),e(20,"Treasurer(s)"),o(),e(21,`
287                      `),a(22,"div",53),e(23,"Cardholders"),o(),e(24,`
288                    `),o(),e(25,`
289                    `),E(26,kt,20,6,null,null,T),o(),e(28,`
290                `),o(),e(29,`
291              `)),i&2){let t=c.$implicit;s(6),M(t.programName),s(20),A(t.accounts)}}function Lt(i,c){if(i&1&&(e(0,`
292              `),E(1,Bt,30,1,null,null,T)),i&2){let t=m(2);s(),A(t.programGroups)}}function Gt(i,c){i&1&&(e(0,`
293              `),f(1,"app-null-card",63),e(2,`
294            `))}function Ut(i,c){if(i&1){let t=I();e(0,`
295        `),a(1,"div",64),e(2,`
296          `),a(3,"div",65),e(4,`
297            `),a(5,"div",66),e(6,`
298              `),a(7,"h2",10),e(8,"Review and Confirm"),o(),e(9,`
299            `),o(),e(10,`
300            `),a(11,"div",67),e(12,`
301              `),a(13,"p-selectButton",46),w("ngModelChange",function(r){_(t);let l=m();return D(l.selectedGroupBy,r)||(l.selectedGroupBy=r),x(r)}),v("onChange",function(r){_(t);let l=m();return x(l.selectGroupBy(r.value))}),o(),e(14,`
302            `),o(),e(15,`
303          `),o(),e(16,`
304          `),a(17,"div",68),e(18,`
305            `),a(19,"p",69),e(20,`
306              Review the teams you selected and the cardholders/treasurers assigned to each account. You
307              can go back to make changes if needed, then confirm to open the accounts.
308            `),o(),e(21,`
309          `),o(),e(22,`
310        `),o(),e(23,`
311        `),a(24,"div",70),e(25,`
312          `),a(26,"div",4),e(27,`
313            `),e(28,`
314            `),u(29,Pt,3,0),u(30,Lt,3,0),u(31,Gt,3,0),o(),e(32,`
315        `),o(),e(33,`
316      `)}if(i&2){let t=m();s(13),g("options",t.groupByOptions)("allowEmpty",!1),b("ngModel",t.selectedGroupBy),s(16),p(t.groupBy===t.GroupByOption.TEAM?29:-1),s(),p(t.groupBy===t.GroupByOption.PROGRAM?30:-1),s(),p(t.teamAccounts.length===0?31:-1)}}function $t(i,c){if(i&1&&(e(0,`
317                  `),a(1,"span"),e(2,`
318                    `),f(3,"i",88),e(4,`
319                    `),a(5,"span"),e(6,"Processing..."),o(),e(7,`
320                  `),o(),e(8,`
321                `)),i&2){let t=m(2);s(3),O("color",t.getProvisioningStatusColor(t.TeamAccountProvisioningStatus.IN_PROGRESS)),s(2),O("color",t.getProvisioningStatusColor(t.TeamAccountProvisioningStatus.IN_PROGRESS))}}function Wt(i,c){if(i&1&&(e(0,`
322                  `),a(1,"span"),e(2,`
323                    `),f(3,"i",89),e(4,`
324                    `),a(5,"span"),e(6,"Complete"),o(),e(7,`
325                  `),o(),e(8,`
326                `)),i&2){let t=m(2);s(3),O("color",t.getProvisioningStatusColor(t.TeamAccountProvisioningStatus.COMPLETED)),s(2),O("color",t.getProvisioningStatusColor(t.TeamAccountProvisioningStatus.COMPLETED))}}function Kt(i,c){if(i&1&&(e(0,`
327                              `),a(1,"span",92),e(2),o(),e(3,`
328                            `)),i&2){let t=m().$implicit;s(2),S(`
329                                Account: `,t.accountID,`
330                              `)}}function jt(i,c){if(i&1&&(e(0,`
331                              `),a(1,"span",93),e(2),o(),e(3,`
332                            `)),i&2){let t=m().$implicit;s(2),S(`
333                                `,t.provisioningError||"Unknown error",`
334                              `)}}function zt(i,c){i&1&&(e(0,`
335                              `),a(1,"span",94),e(2,`
336                                Account created, some cardholders pending
337                              `),o(),e(3,`
338                            `))}function Ht(i,c){i&1&&(e(0,`
339                              `),a(1,"span",92),e(2,`
340                                Waiting to start...
341                              `),o(),e(3,`
342                            `))}function Jt(i,c){i&1&&(e(0,`
343                              `),a(1,"span",92),e(2,`
344                                Creating Stripe resources...
345                              `),o(),e(3,`
346                            `))}function Qt(i,c){if(i&1&&(e(0,`
347                        `),a(1,"tr"),e(2,`
348                          `),a(3,"td",90),e(4),o(),e(5,`
349                          `),a(6,"td",91),e(7),o(),e(8,`
350                          `),a(9,"td",91),e(10,`
351                            `),f(11,"i"),e(12,`
352                            `),a(13,"span"),e(14),o(),e(15,`
353                          `),o(),e(16,`
354                          `),a(17,"td",91),e(18,`
355                            `),u(19,Kt,4,1),u(20,jt,4,1),u(21,zt,4,0),u(22,Ht,4,0),u(23,Jt,4,0),o(),e(24,`
356                        `),o(),e(25,`
357                      `)),i&2){let t=c.$implicit,n=m(2);s(4),M(t.teamName),s(3),M(t.programName),s(4),re(se("",n.getProvisioningStatusIcon(t.provisioningStatusID)," mr-2")),O("color",n.getProvisioningStatusColor(t.provisioningStatusID)),s(2),O("color",n.getProvisioningStatusColor(t.provisioningStatusID)),s(),S(`
358                              `,t.provisioningStatusName,`
359                            `),s(5),p(t.provisioningStatusID===n.TeamAccountProvisioningStatus.COMPLETED&&t.accountID?19:-1),s(),p(t.provisioningStatusID===n.TeamAccountProvisioningStatus.FAILED?20:-1),s(),p(t.provisioningStatusID===n.TeamAccountProvisioningStatus.PARTIAL?21:-1),s(),p(t.provisioningStatusID===n.TeamAccountProvisioningStatus.PENDING?22:-1),s(),p(t.provisioningStatusID===n.TeamAccountProvisioningStatus.IN_PROGRESS?23:-1)}}function qt(i,c){i&1&&(e(0,`
360              `),a(1,"app-inline-alert",95),e(2,`
361                `),a(3,"p",96),e(4,`
362                  Provisioning is complete. You can now manage your team accounts and assign cardholders.
363                `),o(),e(5,`
364              `),o(),e(6,`
365            `))}function Yt(i,c){if(i&1&&(e(0,`
366        `),a(1,"div",64),e(2,`
367          `),a(3,"div",65),e(4,`
368            `),a(5,"div",4),e(6,`
369              `),a(7,"h2"),e(8,"Creating Team Accounts"),o(),e(9,`
370            `),o(),e(10,`
371          `),o(),e(11,`
372          `),a(12,"div"),e(13,`
373            `),a(14,"p",69),e(15,`
374              Your team accounts are being set up with Stripe. This process typically takes a few moments.
375              You can wait here to see the progress, or navigate away - the accounts will continue to be
376              created in the background.
377            `),o(),e(16,`
378          `),o(),e(17,`
379        `),o(),e(18,`
380        `),a(19,"div",70),e(20,`
381          `),a(21,"div",4),e(22,`
382            `),a(23,"div",81),e(24,`
383              `),a(25,"div",82),e(26,`
384                `),a(27,"span",83),e(28,"Provisioning Status"),o(),e(29,`
385                `),u(30,$t,9,4),u(31,Wt,9,4),o(),e(32,`
386              `),a(33,"div",28),e(34,`
387                `),a(35,"div",84),e(36,`
388                  `),a(37,"table",85),e(38,`
389                    `),a(39,"thead",86),e(40,`
390                      `),a(41,"tr"),e(42,`
391                        `),a(43,"th",53),e(44,"Team"),o(),e(45,`
392                        `),a(46,"th",87),e(47,"Program"),o(),e(48,`
393                        `),a(49,"th",53),e(50,"Status"),o(),e(51,`
394                        `),a(52,"th",52),e(53,"Details"),o(),e(54,`
395                      `),o(),e(55,`
396                    `),o(),e(56,`
397                    `),a(57,"tbody"),e(58,`
398                      `),E(59,Qt,26,15,null,null,T),o(),e(61,`
399                  `),o(),e(62,`
400                `),o(),e(63,`
401              `),o(),e(64,`
402            `),o(),e(65,`
403            `),u(66,qt,7,0),o(),e(67,`
404        `),o(),e(68,`
405      `)),i&2){let t=m();s(30),p(t.provisioningComplete?-1:30),s(),p(t.provisioningComplete?31:-1),s(28),A(t.provisioningStatus),s(7),p(t.provisioningComplete?66:-1)}}function Xt(i,c){if(i&1){let t=I();e(0,`
406        `),a(1,"a",97),v("click",function(){_(t);let r=m();return x(r.cancel())}),e(2,`
407          Cancel
408        `),o(),e(3,`
409      `)}}function Zt(i,c){if(i&1){let t=I();e(0,`
410        `),a(1,"button",98),v("click",function(){_(t);let r=m();return x(r.previous())}),e(2,`
411          Previous
412        `),o(),e(3,`
413      `)}}function en(i,c){i&1&&(e(0,`
414            `),f(1,"span",100),e(2,`
415          `))}function tn(i,c){if(i&1){let t=I();e(0,`
416        `),a(1,"button",99),v("click",function(){_(t);let r=m();return x(r.next())}),e(2,`
417          `),u(3,en,3,0),e(4),o(),e(5,`
418      `)}if(i&2){let t=m();s(),F("btn-icon-chevron-right-after",t.currentStep!==t.Steps.REVIEW_CONFIRM),g("disabled",t.submitting||t.currentStep===t.Steps.SELECT_TEAMS&&t.selectedTeamsCount===0),s(2),p(t.submitting?3:-1),s(),S(`
419          `,t.submitting?"Creating Accounts...":t.currentStep===t.Steps.REVIEW_CONFIRM?`Confirm & Open
420          Accounts`:"Next",`
421        `)}}function nn(i,c){i&1&&(e(0,`
422            `),f(1,"span",100),e(2,`
423          `))}function an(i,c){if(i&1){let t=I();e(0,`
424        `),a(1,"button",99),v("click",function(){_(t);let r=m();return x(r.finishAndNavigate())}),e(2,`
425          `),u(3,nn,3,0),e(4),o(),e(5,`
426      `)}if(i&2){let t=m();s(),g("disabled",!t.provisioningComplete),s(2),p(t.provisioningComplete?-1:3),s(),S(`
427          `,t.provisioningComplete?"View Team Accounts":"Processing...",`
428        `)}}var y=(function(i){return i[i.SELECT_TEAMS=0]="SELECT_TEAMS",i[i.SELECT_CARDHOLDERS=1]="SELECT_CARDHOLDERS",i[i.REVIEW_CONFIRM=2]="REVIEW_CONFIRM",i[i.PROVISIONING=3]="PROVISIONING",i})(y||{}),R=(function(i){return i.TEAM="team",i.PROGRAM="program",i})(R||{}),Ke=(()=>{let c=class c{constructor(n,r,l,d,h){this.siteDataService=n,this.programService=r,this.teamAccountsService=l,this.router=d,this.route=h,this.Steps=y,this.TeamAccountProvisioningStatus=C,this.currentStep=y.SELECT_TEAMS,this.activeIndex=0,this.steps=[],this.programs=[],this.teams=[],this.selectedTeam
428s=[],this.teamProgramSelections=new Map,this.loadingPrograms=!1,this.loadingTeams=!1,this.selectAllTeams=!1,this.existingTeamAccounts=new Set,this.GroupByOption=R,this.groupBy=R.PROGRAM,this.selectedGroupBy=1,this.groupByOptions=[{label:"Group by Team",value:0},{label:"Group by Program",value:1}],this.teamAccounts=[],this.teamGroups=[],this.programGroups=[],this.eligibleTeamAccountUserCollections=[],this.treasurers=[],this.cardholders=[],this.submitting=!1,this.accountFields=[],this.provisioningStatus=[],this.provisioningComplete=!1,this.createdTeamAccountIDs=[],this.unsubscribe$=new Q}ngOnInit(){this.initializeSteps(),this.loadExistingAccounts(),this.loadPrograms(),this.siteDataService.hideSiteLoader()}initializeSteps(){this.steps=[{label:"Select Teams"},{label:"Select Cardholders"},{label:"Review & Confirm"},{label:"Creating Accounts"}]}loadPrograms(){this.loadingPrograms=!0,this.programService.getPrograms({includeTeams:!0,includeProgramsPastEndDate:!1,includeProgramsFromLastSixMonths:!1,programType:Se.TEAM}).pipe(N(this.unsubscribe$)).subscribe({next:n=>{this.programs=(n||[]).filter(r=>r.teams?.length>0).sort((r,l)=>{let d=Ce(new Date(r.endDate),new Date(l.endDate));return d===0?r.name.localeCompare(l.name):d}),this.loadingPrograms=!1},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to load programs."),this.loadingPrograms=!1}})}onProgramSelect(n){this.selectedProgram=n,this.loadTeamsForProgram(n)}loadTeamsForProgram(n){this.loadingTeams=!0,this.teams=[],n.teams&&n.teams.length>0?(this.teams=n.teams.map(r=>J(H({},r),{hasExistingAccount:this.existingTeamAccounts.has(this.getSelectionKey(r.teamID,n.programID))})),this.selectedTeams=this.teams.filter(r=>{let l=this.getSelectionKey(r.teamID,n.programID);return this.teamProgramSelections.has(l)}),this.updateSelectAllState(),this.loadingTeams=!1):(this.teams=[],this.selectedTeams=[],this.selectAllTeams=!1,this.loadingTeams=!1)}getSelectionKey(n,r){return`${n}_${r}`}loadExistingAccounts(){this.teamAccountsService.getExistingTeamAccounts().pipe(N(this.unsubscribe$)).subscribe({next:n=>{n.results.forEach(l=>{l.teamID&&l.programIDs&&Array.isArray(l.programIDs)&&l.programIDs.forEach(d=>{let h=this.getSelectionKey(l.teamID,d);this.existingTeamAccounts.add(h)})}),this.selectedProgram&&this.loadTeamsForProgram(this.selectedProgram)},error:n=>{console.error("Error loading existing team accounts:",n)}})}toggleSelectAll(){let n=this.selectedProgram;n&&(this.selectAllTeams?(this.teams.forEach(r=>{let l=this.getSelectionKey(r.teamID,n.programID);this.existingTeamAccounts.has(l)||this.teamProgramSelections.has(l)||this.teamProgramSelections.set(l,{teamID:r.teamID,programID:n.programID,team:r,program:n})}),this.selectedTeams=this.teams.filter(r=>!this.existingTeamAccounts.has(this.getSelectionKey(r.teamID,n.programID)))):(this.teams.forEach(r=>{let l=this.getSelectionKey(r.teamID,n.programID);this.teamProgramSelections.delete(l)}),this.selectedTeams=[]))}onTeamSelectionChange(){let n=this.selectedProgram;if(!n)return;let r=new Set(this.selectedTeams.map(l=>l.teamID));this.selectedTeams.forEach(l=>{let d=this.getSelectionKey(l.teamID,n.programID);this.existingTeamAccounts.has(d)||this.teamProgramSelections.has(d)||this.teamProgramSelections.set(d,{teamID:l.teamID,programID:n.programID,team:l,program:n})}),this.teams.forEach(l=>{if(!r.has(l.teamID)){let d=this.getSelectionKey(l.teamID,n.programID);this.teamProgramSelections.delete(d)}}),this.updateSelectAllState()}updateSelectAllState(){let n=this.selectedProgram;if(!n)return;let r=this.teams.filter(d=>!this.existingTeamAccounts.has(this.getSelectionKey(d.teamID,n.programID))),l=r.length>0&&r.every(d=>{let h=this.getSelectionKey(d.teamID,n.programID);return this.teamProgramSelections.has(h)});this.selectAllTeams=l}get selectedTeamsCount(){return this.teamProgramSelections.size}get selectedTeamsInCurrentProgram(){let n=this.selectedProgram;return n?this.teams.filter(r=>{let l=this.getSelectionKey(r.teamID,n.programID);return this.teamProgramSelections.has(l)}).length:0}get hasSelectableTeamsInCurrentProgram(){return!this.selectedProgram||!this.teams||this.teams.length===0?!1:this.teams.some(n=>!n.hasExistingAccount)}
428next(){if(this.currentStep===y.SELECT_TEAMS&&this.prepareTeamAccounts(),this.currentStep===y.SELECT_CARDHOLDERS)if(this.canProceedFromStep2)this.setShowValidationMessages(!1),this.extractFormValues();else{this.setShowValidationMessages(!0);return}if(this.currentStep===y.REVIEW_CONFIRM){this.createAccounts();return}this.currentStep<y.REVIEW_CONFIRM&&(this.currentStep++,this.activeIndex++)}setShowValidationMessages(n){this.accountForms.forEach(r=>{r.setShowFieldErrorMessages(n)})}extractFormValues(){this.accountForms&&this.accountForms.forEach((n,r)=>{if(n&&n.value&&this.teamAccounts[r]){let l=n.value;l.teamNameOnCard!==void 0&&(this.teamAccounts[r].teamNameOnCard=l.teamNameOnCard)}})}get canProceedFromStep2(){return this.currentStep!==y.SELECT_CARDHOLDERS?!0:this.accountForms&&this.accountForms.length>0?this.accountForms.toArray().every(n=>n&&n.form&&n.form.valid):this.teamAccounts.length>0}createAccounts(){if(this.submitting)return;this.submitting=!0;let n=this.teamAccounts.map(r=>({teamID:r.team.teamID,programID:r.programID,teamNameOnCard:r.teamNameOnCard||r.team.name,treasurerClubUserIDs:r.treasurerClubUserIDs||[],cardholderClubUserIDs:r.cardholderClubUserIDs||[]}));this.teamAccountsService.createTeamFinancialAccounts(n).pipe(N(this.unsubscribe$)).subscribe({next:r=>{r.success?(this.currentStep=y.PROVISIONING,this.activeIndex=3,this.provisioningJobID=r.provisioningJobID,this.provisioningStatus=r.teamAccounts,this.createdTeamAccountIDs=[...new Set(r.teamAccounts.map(l=>l.teamAccountID))],this.startProvisioningPolling(),this.siteDataService.showSiteSuccessAlert("Team accounts created! Stripe provisioning is in progress...")):(this.submitting=!1,this.siteDataService.showSiteErrorAlert(r.errorMessage||"Failed to create team financial accounts."))},error:()=>{this.submitting=!1,this.siteDataService.showSiteErrorAlert("Failed to create team financial accounts. Please try again.")}})}startProvisioningPolling(){this.provisioningPollingSubscription=X(0,3e3).pipe(N(this.unsubscribe$),Z(()=>this.teamAccountsService.getProvisioningJobStatus(this.provisioningJobID)),ee(n=>n.provisioningStatusID===C.PENDING||n.provisioningStatusID===C.IN_PROGRESS,!0)).subscribe({next:n=>{if(this.provisioningStatus=n.teamAccounts,n.provisioningStatusID===C.COMPLETED||n.provisioningStatusID===C.FAILED||n.provisioningStatusID===C.PARTIAL)if(this.provisioningComplete=!0,this.submitting=!1,n.provisioningStatusID===C.COMPLETED)this.siteDataService.showSiteSuccessAlert("All team accounts have been provisioned successfully!");else if(n.provisioningStatusID===C.FAILED){let l=n.provisioningFailureTypeName||"Unknown error";this.siteDataService.showSiteErrorAlert(`Provisioning failed: ${l}. Please check the status below.`)}else n.provisioningStatusID===C.PARTIAL&&this.siteDataService.showSiteSuccessAlert(`${n.completedCount} of ${n.totalTeamAccounts} accounts provisioned. Some had issues that can be resolved later.`)},error:n=>{console.error("Error polling provisioning status:",n)}})}getProvisioningStatusClass(n){switch(n){case C.PENDING:return"text-muted";case C.IN_PROGRESS:return"text-primary";case C.COMPLETED:return"text-success";case C.FAILED:return"text-danger";case C.PARTIAL:return"text-warning";default:return""}}getProvisioningStatusIcon(n){switch(n){case C.PENDING:return"fa fa-clock";case C.IN_PROGRESS:return"fa fa-spinner fa-spin";case C.COMPLETED:return"fa fa-check-circle";case C.FAILED:return"fa fa-times-circle";case C.PARTIAL:return"fa fa-exclamation-triangle";default:return"fa fa-question-circle"}}getProvisioningStatusColor(n){switch(n){case C.PENDING:return"#6c757d";case C.IN_PROGRESS:return"#007bff";case C.COMPLETED:return"#28a745";case C.FAILED:return"#dc3545";case C.PARTIAL:return"#ffc107";default:return"#000000"}}finishAndNavigate(){this.router.navigate(["../"],{relativeTo:this.route})}prepareTeamAccounts(){this.teamAccounts=Array.from(this.teamProgramSelections.values()).map(n=>({team:n.team,programID:n.programID,programName:n.program.name,teamNameOnCard:$e(n?.team?.name)||"",treasurerClubUserIDs:[],cardholderClubUserIDs:[],haveCardholdersManuallyChanged:!1})),this.updateGrouping(),Y({metadata:this.fields?q({fields:this.fields}):this.teamAccountsService.getTeamAccountMetadata()}).pipe(N(this.unsubscribe$)).subscribe({next:n=>{this.fields=n.metadata.fields,this.initializeAccountFields(),this.loadTreasurersAndCardholders()},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}initializeAccountFields(){this.accountFields=this.teamAccounts.map(()=>this.fields?JSON.parse(JSON.stringify(this.fields)):[])}updateGrouping(){this.groupBy===R.TEAM?this.groupByTeam():this.groupByProgram()}groupByTeam(){let n=new Map;
428this.teamAccounts.forEach(r=>{let l=r.team.teamID;n.has(l)||n.set(l,{team:r.team,accounts:[]}),n.get(l).accounts.push(r)}),this.teamGroups=Array.from(n.values())}groupByProgram(){let n=new Map;this.teamAccounts.forEach(r=>{n.has(r.programID)||n.set(r.programID,{programID:r.programID,programName:r.programName,accounts:[]}),n.get(r.programID).accounts.push(r)}),this.programGroups=Array.from(n.values())}onGroupByChange(){this.updateGrouping()}selectGroupBy(n){this.selectedGroupBy=n,this.groupBy=n===0?R.TEAM:R.PROGRAM,this.onGroupByChange()}loadTreasurersAndCardholders(){let n=[...new Set(this.teamAccounts.map(l=>l.programID))],r=[...new Set(this.teamAccounts.map(l=>l.team.teamID))];n.length===0||r.length===0||this.teamAccountsService.getEligibleTeamAccountUsers(n,r).pipe(N(this.unsubscribe$)).subscribe({next:l=>{this.eligibleTeamAccountUserCollections=l,this.populateDropdownOptions()},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to load potential team account users.")}})}populateDropdownOptions(){this.teamAccounts.forEach(n=>{let r=this.computeOptionsForAccount(n);n.treasurerOptions=r,n.cardholderOptions=r,this.updateAccountDisplayNames(n)})}updateAccountDisplayNames(n){n.treasurerNames=this.getTreasurerNamesArray(n),n.cardholderNames=this.getCardholderNamesArray(n)}computeOptionsForAccount(n){let r=this.eligibleTeamAccountUserCollections.find(h=>h.teamID===n.team.teamID&&h.programID===n.programID);return r?(r.eligibleUsers||[]).map(h=>({id:h.clubUserID,name:`${h.firstName} ${h.lastName}${h.roleName?` (${h.roleName})`:""}`})).filter((h,W,ze)=>ze.findIndex(He=>He.id===h.id)===W).sort((h,W)=>h.name.localeCompare(W.name)):[]}removeTeamAccount(n){let r=this.teamAccounts.indexOf(n);if(r>-1){this.teamAccounts.splice(r,1),this.accountFields.splice(r,1);let l=this.getSelectionKey(n.team.teamID,n.programID);this.teamProgramSelections.delete(l),this.updateGrouping()}}getTreasurerNames(n){return this.getTreasurerNamesArray(n).join(", ")}getTreasurerNamesArray(n){return!n.treasurerClubUserIDs?.length||!n.treasurerOptions?[]:n.treasurerClubUserIDs.map(r=>{let l=n.treasurerOptions?.find(d=>d.id===r);return l?l.name:null}).filter(r=>r!==null)}getCardholderNames(n){return!n.cardholderClubUserIDs?.length||!n.cardholderOptions?"":n.cardholderClubUserIDs.map(l=>{let d=n.cardholderOptions?.find(h=>h.id===l);return d?d.name:null}).filter(l=>l!==null).join(", ")}getCardholderNamesArray(n){return!n.cardholderClubUserIDs?.length||!n.cardholderOptions?[]:n.cardholderClubUserIDs.map(r=>{let l=n.cardholderOptions?.find(d=>d.id===r);return l?l.name:null}).filter(r=>r!==null)}onTreasurerChange(n,r){if(!r.haveCardholdersManuallyChanged){let l=r.treasurerClubUserIDs||[];r.cardholderClubUserIDs=l.filter(d=>r.cardholderOptions?.some(h=>h.id===d))}this.updateAccountDisplayNames(r)}onTreasurerClear(n){n.haveCardholdersManuallyChanged||(n.cardholderClubUserIDs=[]),this.updateAccountDisplayNames(n)}onCardholderChange(n,r){r.haveCardholdersManuallyChanged=!0,this.updateAccountDisplayNames(r)}getAccountIndex(n){return this.teamAccounts.findIndex(r=>r.team.teamID===n.team.teamID&&r.programID===n.programID)}previous(){this.currentStep>y.SELECT_TEAMS&&(this.currentStep--,this.activeIndex--)}cancel(){}ngOnDestroy(){this.provisioningPollingSubscription&&this.provisioningPollingSubscription.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};c.\u0275fac=function(r){return new(r||c)(V(he),V(Ue),V(G),V(pe),V(ue))},c.\u0275cmp=te({type:c,selectors:[["ng-component"]],viewQuery:function(r,l){if(r&1&&ie(Je,5),r&2){let d;ae(d=oe())&&(l.accountForms=d)}},standalone:!1,decls:37,vars:9,consts:[["accountForm",""],["role","main"],["pageTitle","New Account","parentLinkText","Team Accounts","parentLinkUrl","..",3,"showBackButton"],[1,"row","mb-5","mt-5"],[1,"col-md-12"],[3,"model","readonly","activeIndex"],[1,"account-content","mb-3"],["appStickyFormButtons","",1,"row","border-top","no-gutters","d-flex","align-items-center"],[1,"col-md-3","d-flex","justify-content-start"],[1,"col-md-9","d-flex","justify-content-end"],[1,""],[1,"card","bg-secondary","text-medium"],[1,"row","no-gutters"],[1,"col-md-auto","pr-3"],[1,"page-navigation"],[1,"header"],[1,"text-header-5","mb-0"],[1,"col"],[1,"btn-a11y","full-width","d-flex",3,"click"],[1,"flex-grow-1"],[1,"fw-600","mb-1"],[1,"text-small"],[3,"text","styleClass","buttonStyleClass"],[1,"text-center"],[1,"fas","fa-spinner","fa-spin"],[1,"text-center","text-grey"],[1,"card","position-sticky-top"],[1,"card-header","d-flex","justify-content-between","align-items-center","border-bottom","pb-2"],[1,"card-body","p-0"],[1,"pl-2"],["inputId","selectAll",1,"mr-2",3,"ngModelChange","onChange","ngModel","binary","disabled"],["for","selectAll",1,"mb-0","cursor-pointer"],[1,"text-grey-lt","text-medium"],[1,"p-3","text-center"],["selectionMode","multiple","dataKey","teamID",3,"selectionChange","value","selection","rowHover"],["pTemplate","body"],[3,"pSelectableRow","pSelectableRowDisabled"],[2,"width","50px"],[3,"click","value","disabled"],[1,"align-left"],[1,"d-flex","justify-content-between"],["status","success","text","Account Exists",1,"ml-2"],["text","Please select a program to view teams",3,"showCard"],["text","No teams found for this program",3,"showCard"],[1,"full-width","text-center","mb-3"],[1,"d-inline-flex"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","options","allowEmpty","ngModel"],[1,"card","bg-secondary","text-medium","mb-4"],[1,"card-body"],[1,"card","mb-4","pb-0"],[1,"px-3","pb-2","mb-2","border-bottom"],[1,"row","fw-800","pb-2","mb-2","border-bottom"],[1,"col-md-3"],[1,"col-md-2"],[1,"col-md-1"],[3,"formID","fields","entity","contentFieldsMode","horizontalForm","showSubmitButton","showCancelButton","enableSavingOverlay"],[1,"row","item-row","mb-2","pb-2","d-flex","align-items-center"],["fieldName","teamNameOnCard","styleClass","mb-0",3,"formID","hideLabel"],["o
428ptionLabel","name","optionValue","id","placeholder","Select Treasurers","selectedItemsLabel","{0} selected","appendTo","body",3,"ngModelChange","onChange","onClear","ngModel","options","showClear","maxSelectedLabels","filter"],["optionLabel","name","optionValue","id","placeholder","Select","selectedItemsLabel","{0} selected","appendTo","body",3,"ngModelChange","onChange","ngModel","options","showClear","maxSelectedLabels","filter"],[1,"col-md-1","text-right"],["type","button","title","Remove team",1,"btn","btn-tertiary",3,"click"],[1,"fa","fa-trash-alt"],["text","No teams selected. Please go back and select teams."],[1,"mb-5"],[1,"row","mb-3"],[1,"col-md-9"],[1,"col-md-3","text-right"],[1,"mb-3"],[1,"text-medium"],[1,"row"],[1,"card","mb-4"],[1,"card-header"],[1,"fw-600","mb-0"],[1,"row","fw-800","mb-3"],[1,"col-md-4"],[1,"row","item-row","mb-3","pb-3","d-flex","align-items-center","border-bottom"],[1,"col-md-4","align-middle"],[1,"col-md-3","align-middle"],[1,"col-md-2","align-middle"],[1,"text-muted"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fw-600"],[1,"table-responsive"],[1,"table","table-hover","mb-0"],[1,"thead-light"],[1,"col-md-5"],[1,"fa","fa-spinner","fa-spin","mr-2"],[1,"fa","fa-check-circle","mr-2"],[1,"align-middle","fw-600"],[1,"align-middle"],[1,"text-muted","text-small"],[1,"text-danger","text-small"],[1,"text-warning","text-small"],["alertType","info",1,"mt-3"],[1,"mb-0"],["type","button","routerLink","..",1,"btn","btn-lg","btn-naked",3,"click"],["type","button",1,"btn","btn-lg","btn-icon-chevron-left",3,"click"],["type","button",1,"btn","btn-lg","btn-primary",3,"click","disabled"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm","mr-2"]],template:function(r,l){if(r&1&&(a(0,"main",1),e(1,`
429  `),a(2,"app-admin-header",2),e(3,`
430  `),o(),e(4,`
431
432  `),a(5,"div",3),e(6,`
433    `),a(7,"div",4),e(8,`
434      `),f(9,"p-steps",5),e(10,`
435    `),o(),e(11,`
436  `),o(),e(12,`
437
438  `),a(13,"div",6),e(14,`
439    `),u(15,dt,34,6)(16,vt,22,6)(17,Ut,34,6)(18,Yt,69,3),e(19,`
440  `),o(),e(20,`
441
442  `),f(21,"app-team-accounts-disclosure"),e(22,`
443
444  `),a(23,"div",7),e(24,`
445    `),a(25,"div",8),e(26,`
446      `),u(27,Xt,4,0),o(),e(28,`
447    `),a(29,"div",9),e(30,`
448      `),u(31,Zt,4,0),u(32,tn,6,5),u(33,an,6,3),o(),e(34,`
449  `),o(),e(35,`
450`),o(),e(36,`
451`)),r&2){let d;s(2),g("showBackButton",!0),s(7),g("model",l.steps)("readonly",!0)("activeIndex",l.activeIndex),s(6),p((d=l.currentStep)===l.Steps.SELECT_TEAMS?15:d===l.Steps.SELECT_CARDHOLDERS?16:d===l.Steps.REVIEW_CONFIRM?17:d===l.Steps.PROVISIONING?18:-1),s(12),p(l.currentStep!==l.Steps.PROVISIONING?27:-1),s(4),p(l.currentStep!==l.Steps.SELECT_TEAMS&&l.currentStep!==l.Steps.PROVISIONING?31:-1),s(),p(l.currentStep!==l.Steps.PROVISIONING?32:-1),s(),p(l.currentStep===l.Steps.PROVISIONING?33:-1)}},dependencies:[Ne,Fe,me,de,_e,Pe,xe,fe,Oe,Ve,Re,ke,Me,be,De,we,Ae,Ie,ye,Le,ce],styles:["nav.page-navigation[_ngcontent-%COMP%]{max-width:300px}"]});let i=c;return i})();var on=[{path:"",component:Ke,canActivate:[ve,Te,Ee],data:{permissions:[ge.TeamAccounts],metaTitle:"Team Account Create"},children:[{path:"*",redirectTo:"",pathMatch:"full"}]}],je=(()=>{let c=class c{};c.\u0275fac=function(r){return new(r||c)},c.\u0275mod=L({type:c}),c.\u0275inj=B({imports:[z.forChild(on),z]});let i=c;return i})();var ei=(()=>{let c=class c{};c.\u0275fac=function(r){return new(r||c)},c.\u0275mod=L({type:c}),c.\u0275inj=B({providers:[G],imports:[Ge,je,Be]});let i=c;return i})();export{ei as TeamAccountCreateModule};

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.