PageSourceSearch

https://ftc.nexus/en/chunk-VU4VXQTC.js

js ftc.nexus collected 2026-10-08 20:49:36 UTC 9,352 bytes, 2 lines download raw bytes

1import{a as ve}from"./chunk-6YME5PBE.js";import{a as ue}from"./chunk-7OAU4BDI.js";import"./chunk-UNWMD5OV.js";import"./chunk-55OAQNJ7.js";import{a as we}from"./chunk-ZTPV5Q2V.js";import{a as fe,b as he,d as _e,e as ge,f as ye,g as B,l as Ce,o as be,u as xe,v as Ee,x as Se,z as ke}from"./chunk-YTNBM6NL.js";import{a as pe}from"./chunk-KZJWNBY3.js";import{a as T}from"./chunk-EWRFUGRC.js";import{D as ae,Da as ce,I as se,K as w,Ka as de,Na as me,oa as le,z as re}from"./chunk-OVOR3KFK.js";import{$a as d,B as H,Ba as a,Db as l,Eb as k,Fb as q,Gb as P,H as J,Ja as g,La as Q,Lc as ne,Mb as X,Mc as oe,R as S,Rb as Z,Sb as L,Ua as v,Va as W,Wa as f,Yb as h,Za as R,Zb as _,_a as V,ab as t,bb as i,c as Y,cb as I,ga as F,ha as D,l as G,lb as A,n as O,p as U,q as j,tb as x,tc as ee,uc as te,vb as b,wc as ie}from"./chunk-A7GXEXYS.js";import"./chunk-3MQWISOM.js";var M=e=>["/event",e],Te=()=>({logout:!0}),z=(e,n)=>n.key;function $e(e,n){e&1&&(t(0,"p",19),l(1,"No events yet. Request access to an event by selecting it below and tapping on your volunteer role."),i())}function Fe(e,n){if(e&1&&(t(0,"a",21),l(1),i()),e&2){let o=n.$implicit;d("routerLink",L(3,M,o.key)),a(),P("",o.name," (",o.role,")")}}function De(e,n){if(e&1&&(t(0,"div",1)(1,"div",2)(2,"div",18)(3,"div",4)(4,"h5",5),l(5,"Your events"),i(),v(6,$e,2,0,"p",19),t(7,"ul",20),R(8,Fe,2,5,"a",21,z),i()()()()()),e&2){let o=n;d("@fade",void 0),a(6),f(o.length?-1:6),a(2),V(o)}}function Re(e,n){if(e&1){let o=A();t(0,"a",22),l(1,"Try it out"),i(),t(2,"button",23),x("click",function(){F(o);let c=b();return D(c.createDemo())}),l(3,"Reset demo"),i()}e&2&&d("routerLink",L(1,M,n))}function Ve(e,n){if(e&1){let o=A();t(0,"button",24),x("click",function(){F(o);let c=b();return D(c.createDemo())}),l(1,"Try it out"),i()}}function Ie(e,n){if(e&1&&(t(0,"p",8),l(1),i()),e&2){let o=b();a(),P("Nexus for ",o.program," is in early access. ",o.program," events using Nexus are required to promptly send feedback following their event.")}}function Ae(e,n){if(e&1){let o=A();t(0,"li",25)(1,"span")(2,"span",26),l(3),i(),t(4,"span",27),l(5),i()(),t(6,"button",28),x("click",function(){let c=F(o).$implicit,s=b(2);return D(s.deleteRegistration(c.key))}),i()()}if(e&2){let o=n.$implicit;d("@fade",void 0),a(3),k(o.key),a(2),k(o.value)}}function Pe(e,n){e&1&&(t(0,"ul",16),R(1,Ae,7,3,"li",25,z),h(3,"keyvalue"),i()),e&2&&(d("@fade",void 0),a(),V(_(3,1,n)))}function Le(e,n){if(e&1&&(t(0,"a",35),l(1),i()),e&2){let o=n.$implicit;d("routerLink",L(2,M,o.key)),a(),k(o.name)}}function Ne(e,n){if(e&1&&(t(0,"div",1)(1,"div",2)(2,"div",29)(3,"div",30)(4,"div",31)(5,"h2",32)(6,"button",33),l(7),i()(),t(8,"div",34)(9,"div",16),R(10,Le,2,4,"a",35,z),i()()()()()()()),e&2){let o=b(),r=b();d("@fade",void 0),a(7),P(" All ",r.program," events (",o.length,") "),a(3),V(o)}}function Ge(e,n){e&1&&v(0,Ne,12,3,"div",1),e&2&&f(n.length?0:-1)}function je(e,n){e&1&&(t(0,"div",17)(1,"div",36)(2,"div"),l(3,"Logged in as "),t(4,"b"),l(5),i()(),t(6,"a",37),l(7,"Log out"),i()()()),e&2&&(d("@fade",void 0),a(5),k(n.email),a(),d("queryParams",Z(3,Te)))}var ot=(()=>{let n=class n{constructor(r,c,s,m,u,y,C){this.auth=r,this.eventDataService=c,this.rpcService=s,this.router=m,this.toast=u,this.analytics=y,this.authzService=C,this.user$=ae(this.auth),this.events$=this.eventDataService.getEventSummaries(!1,"start"),this.registrations$=this.user$.pipe(S(p=>p?this.eventDataService.getOffseasonRegistrations(p.uid):G(void 0))),this.demoEventKey$=this.user$.pipe(S(p=>p?this.eventDataService.getDemoEventKey(p.uid):G(void 0))),this.roles$=this.events$.pipe(S(p=>{let $={};for(let E of p)$[E.key]=this.authzService.getHighestRole(E.key);return j($)})),this.yourEvents$=j([this.events$,this.roles$]).pipe(U(([p,$])=>{let E=[];for(let N of p){let K=$[N.key];K&&E.push({name:N.name,key:N.key,role:K})}return E})),this.inProgress$=new Y(!1),this.registrationFormGroup=new ye({eventCode:new B(""),authorized:new B(!1)}),this.year=T.program==="FTC"?new Date().getUTCFullYear()-(new Date().getUTCMonth()<8?1:0):new Date().getUTCFullYear(),this.hasPrepended=!1,this.eventRegistrationType=T.eventRegistrationType,this.program=T.program,this.earlyAccess=T.earlyAccess}createDemo(){this.rpcService.createDemo().subscribe(r=>{this.router.navigate([`/event/${r}`]),this.toast.show("Demo event created"),w(this.analytics,"events-demo-create",{eventKey:r})})}async submitRegistration(){var s,m;let r=(m=(s=this.registrationFormGroup.value.eventCode)==null?void 0:s.trim())==null?void 0:m.toLowerCase();if(!r)return;if((await O(this.events$)).find(u=>u.key===r)){this.toast.show("Event already registered. Request access instead",{color:"danger"}),w(this.analytics,"events-offseason-already-registered",{eventKey:r});return}this.inProgress$.next(!0),this.rpcService.registerOffseason(r).subscribe({next:()=>{this.registrationFormGroup.reset(),this.inProgress$.next(!1),this.toast.show("Event registered")},error:u=>{var C;let y="Unable to register offseason. Try again later";(C=u.details)!=null&&C.snackbarMessage&&(y=u.details.snackbarMessage),this.toast.show(y,{color:"danger"}),this.inProgress$.next(!1)}}),w(this.analytics,"events-offseason-submit",{eventKey:r})}deleteRegistration(r){this.user$.pipe(J(1),H(c=>!!c),S(c=>
1this.eventDataService.deleteOffseasonRegistration(c.uid,r))).subscribe(),w(this.analytics,"events-offseason-remove",{eventKey:r})}prependYear(){var c,s,m;let r=(s=(c=this.registrationFormGroup.get("eventCode"))==null?void 0:c.value)==null?void 0:s.trim();!this.hasPrepended&&r&&!/^(\d{4}\S+)$/.test(r)&&((m=this.registrationFormGroup.get("eventCode"))==null||m.setValue(`${this.year}${r}`),this.hasPrepended=!0)}};n.\u0275fac=function(c){return new(c||n)(g(re),g(de),g(we),g(ne),g(le),g(se),g(pe))},n.\u0275cmp=Q({type:n,selectors:[["nexus-events"]],decls:43,vars:26,consts:[[1,"container"],[1,"row","mb-2"],[1,"col","col-fixed"],[1,"card"],[1,"card-body"],[1,"card-title"],[1,"card-text"],[1,"btn","btn-primary"],[1,"alert","alert-primary"],["ngNativeValidate","",3,"ngSubmit","formGroup"],["for","event",1,"form-label"],["id","eventCode","pattern","^20\\d\\d\\w+$","required","","autocomplete","off","formControlName","eventCode",1,"form-control","mb-3",3,"blur","placeholder"],[1,"form-check","mb-3"],["type","checkbox","value","","id","authorized","required","","formControlName","authorized",1,"form-check-input"],["for","authorized",1,"form-check-label"],["type","submit",1,"btn","btn-primary","register",3,"disabled"],[1,"list-group","list-group-flush"],[1,"row","mt-4"],[1,"card","text-bg-primary"],[1,"mb-0"],[1,"list-inline","mb-0","text-center"],[1,"btn","btn-primary","list-inline-item","me-0",3,"routerLink"],[1,"btn","btn-primary","me-2",3,"routerLink"],[1,"btn","btn-outline-warning",3,"click"],[1,"btn","btn-primary",3,"click"],[1,"list-group-item","d-flex","justify-content-between"],[1,"me-2"],[1,"badge","text-bg-secondary"],["type","button","aria-label","Delete","tooltip","Cancel registration",1,"btn-close","flex-shrink-0",3,"click"],[1,"card","overflow-hidden"],["id","allEvents",1,"accordion","accordion-flush"],[1,"accordion-item"],[1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#allEventsAccordion","aria-expanded","false","aria-controls","allEventsAccordion",1,"accordion-button","collapsed"],["id","allEventsAccordion","data-bs-parent","#allEvents",1,"accordion-collapse","collapse"],[1,"list-group-item","list-group-item-action",3,"routerLink"],[1,"col","col-fixed","text-center"],["routerLink","/login",1,"btn","btn-sm","btn-secondary","mt-3",3,"queryParams"]],template:function(c,s){if(c&1&&(I(0,"nexus-main-nav"),t(1,"div",0),v(2,De,10,2,"div",1),h(3,"async"),t(4,"div",1)(5,"div",2)(6,"div",3)(7,"div",4)(8,"h5",5),l(9,"Demo event"),i(),t(10,"p",6),l(11,"Try out Nexus with a demo event with fake teams & matches."),i(),v(12,Re,4,3),h(13,"async"),W(14,Ve,2,0,"button",7),i()()()(),t(15,"div",1)(16,"div",2)(17,"div",3)(18,"div",4)(19,"h5",5),l(20),h(21,"titlecase"),i(),t(22,"p",6),l(23),i(),v(24,Ie,2,2,"p",8),t(25,"form",9),x("ngSubmit",function(){return s.submitRegistration()}),t(26,"label",10),l(27,"Event code"),i(),t(28,"input",11),x("blur",function(){return s.prependYear()}),i(),t(29,"div",12),I(30,"input",13),t(31,"label",14),l(32," I am authorized to register this event (event management, FTA, lead queuer, etc) "),i()(),t(33,"button",15),h(34,"async"),l(35,"Register"),i()()(),v(36,Pe,4,3,"ul",16),h(37,"async"),i()()(),v(38,Ge,1,1),h(39,"async"),v(40,je,8,4,"div",17),h(41,"async"),i(),I(42,"nexus-footer")),c&2){let m,u,y,C,p;a(2),f((m=_(3,12,s.yourEvents$))?2:-1,m),a(10),f((u=_(13,14,s.demoEventKey$))?12:14,u),a(8),q("",_(21,16,s.eventRegistrationType)," registration"),a(3),q("Register your ",s.eventRegistrationType," for Nexus at least a week before the event."),a(),f(s.earlyAccess?24:-1),a(),d("formGroup",s.registrationFormGroup),a(3),d("placeholder",X("",s.year,"cabb")),a(5),d("disabled",_(34,18,s.inProgress$)),a(3),f((y=_(37,20,s.registrations$))?36:-1,y),a(2),f((C=_(39,22,s.events$))?38:-1,C),a(2),f((p=_(41,24,s.user$))?40:-1,p)}},dependencies:[ve,oe,ke,he,fe,_e,ge,xe,Se,Ee,Ce,be,me,ue,ee,ie,te],styles:["[_nghost-%COMP%]{display:block;padding:80px 0}"],data:{animation:[ce]},changeDetection:0});let e=n;return e})();export{ot as EventsComponent};
2/**i18n:8849c35ed7d56eea57e07b59482ab337b8520b0828ef6bfd1761c41b6d989a36*/

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.