PageSourceSearch

https://account.canapii.com/chunk-DETR3KQ5.js

js canapii.com collected 2026-10-01 12:00:06 UTC 156,712 bytes, 2 lines download raw bytes

1import{b as Zi}from"./chunk-T5XIVCXW.js";import{a as Qi}from"./chunk-YJ5EYHYU.js";import{a as pt,b as Yi}from"./chunk-KDASPGTW.js";import{a as Xi}from"./chunk-6O23O374.js";import{c as Ki}from"./chunk-FEF2BASD.js";import{b as qi}from"./chunk-DBW5ALOY.js";import{a as Ji}from"./chunk-JUDGEAWM.js";import{b as X}from"./chunk-KPUSPNGO.js";import{a as Ui}from"./chunk-6ZW7GUUB.js";import{a as ji}from"./chunk-UBK5EF7W.js";import{a as zi}from"./chunk-CZTBVQUJ.js";import"./chunk-MVI4HLSY.js";import{a as $i}from"./chunk-DDP2AJ2G.js";import{a as Wi}from"./chunk-RKSZSAK2.js";import"./chunk-OQZF75AH.js";import{c as Hi}from"./chunk-O6T6UJOX.js";import"./chunk-NE7QIBGA.js";import"./chunk-2SGXIXZG.js";import"./chunk-JIFKKBLC.js";import"./chunk-C4MS7DNK.js";import{a as Ri}from"./chunk-IHJMD6TU.js";import{b as Bi}from"./chunk-5WM5FMYT.js";import"./chunk-3RA6TRNJ.js";import"./chunk-YZMJNOQO.js";import"./chunk-ZM2M4T7I.js";import"./chunk-Q3SQLHFQ.js";import"./chunk-KATBQBTT.js";import{a as Gi}from"./chunk-TNNTZHL4.js";import"./chunk-4VSEFKV4.js";import"./chunk-AVEAC6TK.js";import"./chunk-BYR6FOHH.js";import"./chunk-4R3OCM6P.js";import"./chunk-AKBYKJU5.js";import"./chunk-KEOYM2AG.js";import{a as Ai}from"./chunk-4QBFOCAY.js";import"./chunk-YHU7MHLI.js";import{a as Ni}from"./chunk-BOX3DYO6.js";import"./chunk-4URW5AOX.js";import{a as Li}from"./chunk-4WROE6D2.js";import{a as Oi}from"./chunk-DWBJ3FFW.js";import"./chunk-KZNNECHN.js";import"./chunk-VQV5QB5X.js";import"./chunk-N56KERXN.js";import{a as Fi}from"./chunk-MDZNRQS6.js";import{a as Vi}from"./chunk-OJOX72FE.js";import"./chunk-F3UQTJ3A.js";import"./chunk-63K2LES7.js";import{a as Di}from"./chunk-SHLKCSFW.js";import"./chunk-KJKDN4Z7.js";import"./chunk-MTEBZJP6.js";import{d as Ii}from"./chunk-TYDSKJ25.js";import"./chunk-DG3V3SWL.js";import"./chunk-63S7Z45L.js";import"./chunk-UZGYBFOB.js";import{a as mt}from"./chunk-GA4ZWRQ2.js";import"./chunk-4MPIUD7L.js";import"./chunk-XEDJBE7K.js";import"./chunk-PU4BAJCF.js";import{a as Ti}from"./chunk-MX45D7L5.js";import{a as J,b as xe,c as Pi}from"./chunk-WVPPBW3D.js";import{a as Ce,b as we,c as ye,d as Se,e as Pe,f as ke,g as Me,h as Ee,i as Te,j as Oe,l as ki,m as Fe}from"./chunk-75MPFHDW.js";import{b as ve,c as Si}from"./chunk-BXSMPFUE.js";import"./chunk-BUGNONG7.js";import"./chunk-S7RUJHDK.js";import"./chunk-O4W4ZLKR.js";import{c as wi}from"./chunk-POEVXAF3.js";import{a as Ei}from"./chunk-RDBQLGOI.js";import"./chunk-WWE47JCL.js";import"./chunk-72DQ4U6K.js";import"./chunk-W6QVGQJH.js";import{a as Mi}from"./chunk-D2HMEQE7.js";import{a as be,b as xi}from"./chunk-27KAN2UR.js";import{a as Ci}from"./chunk-BENDDUCM.js";import"./chunk-D7TP2RB2.js";import{a as _i}from"./chunk-7LPUNKYA.js";import"./chunk-FJ2I7HMZ.js";import"./chunk-CCGT3L3J.js";import{b as si}from"./chunk-P5C2FRN2.js";import"./chunk-BRMPHYYJ.js";import"./chunk-VADS3VHW.js";import{a as yi}from"./chunk-IDTQSFGF.js";import{c as R}from"./chunk-QSR4XSOW.js";import"./chunk-ZGH3XX3D.js";import{b as ci,c as mi}from"./chunk-XDKIYMLL.js";import"./chunk-WBTZD3PJ.js";import"./chunk-ZJHHHNWB.js";import"./chunk-QUG5JEKF.js";import"./chunk-QKTH7SM6.js";import{a as gi}from"./chunk-EYV3GWVO.js";import"./chunk-F2XU6FO6.js";import"./chunk-7WOG2EAO.js";import"./chunk-HB4JGH6L.js";import{b as bi}from"./chunk-MZRJWZOV.js";import"./chunk-MWH5Q7LD.js";import"./chunk-FYEJJVAJ.js";import"./chunk-ETPYH4DV.js";import"./chunk-L6HRYWNR.js";import"./chunk-6E33DBBC.js";import{e as hi}from"./chunk-VJX6N2HB.js";import"./chunk-H4EPMV5Z.js";import"./chunk-BCE55JYA.js";import{b as di}from"./chunk-MYI3YS2M.js";import"./chunk-3KNWRENG.js";import{a as dt}from"./chunk-6PXU6RTR.js";import"./chunk-6DH3EJIN.js";import"./chunk-UZY2R5Q5.js";import"./chunk-5GAGQHFR.js";import"./chunk-RXRKGCUL.js";import"./chunk-LW7CZM4G.js";import"./chunk-EW2NZJHY.js";import"./chunk-ZIK5QK3P.js";import"./chunk-GAHMBGQ7.js";import"./chunk-UAWJ3VGL.js";import"./chunk-VT7CJSCD.js";import"./chunk-346ISJSG.js";import{a as vi}from"./chunk-U5B2TWE2.js";import"./chunk-ZFE6ZTWO.js";import"./chunk-67IT4HQ6.js";import"./chunk-I75T67SK.js";import"./chunk-EYI3M4W7.js";import"./chunk-N47RT2FV.js";import"./chunk-EDTOPITP.js";import{a as ct}from"./chunk-R2ER225G.js";import{h as ui}from"./chunk-TU3JUKDL.js";import"./chunk-6JETGMQG.js";import"./chunk-VRQFSSVW.js";import{a as fi}from"./chunk-E3FOSCHV.js";import"./chunk-J2VV25SD.js";import"./chunk-RGZN3DMZ.js";import{a as pi}from"./chunk-Y4544WYO.js";import"./chunk-73R64QIM.js";import{a as Ve}from"./chunk-KOEZPSOA.js";import{A as rt,B as lt,C as ai,G as ri,H as st,I as li,k as Qt,l as Jt,m as Zt,n as ei,o as ti,p as ii,q as ni,r as fe,t as tt,v as it,w as oi,x as nt,y as ot,z as at}from"./chunk-ZEL44FAF.js";import"./chunk-RT33Z4W3.js";import{F as Yt,K as he,L as q,M as ae,c as ne,e as B,h as oe,i as pe,k as qt,n as re,o as Xt,p as ge,q as Qe,t as ue,w as _e,x as Je,y as Ze,z as et}from"./chunk-CTTXKPH2.js";import"./chunk-EURTYAWN.js";import"./chunk-CT5YU3F2.js";import{e as jt,h as Ut,i as Kt,j as xt}from"./chunk-B5NVKW3K.js";import{i as Ye,j as me,k as te,q as ie,z as zt}from"./chunk-MRC2PHN7.js";import{A as Ot,Ad as Rt,Cc as $e,Cd as Xe,Dc as ze,Dd as Ht,Eb as de,Ec as m,Fa as He,Fc as a,Gc as o,Hc as _,Ic as ce,Id as N,Jb as l,Jc as De,Jd as A,Kc as je,Lc as M,Mc as E,Ob as Vt,Od as ee,Qc as C,Sa as g,Sd as P,Ta as u,Wb as w,Xc as p,Yd as D,Zc as c,Zd as Wt,ab as Lt,bc as I,bd as 
1j,cc as We,cd as U,dd as K,ee as $t,fb as Dt,fd as Nt,g as Mt,gc as f,gd as At,hd as W,i as Le,id as $,jd as v,k as Et,ld as r,md as k,nd as L,od as It,pd as Gt,q as Tt,sd as Ue,td as Ke,ud as qe,va as Ft,vc as G,xc as O,z as Re,zc as F,zd as Bt}from"./chunk-77LCFR2D.js";import{a as V,b as Z,l as S}from"./chunk-6G35VSEK.js";function kn(t,d){if(t&1&&(a(0,"option",20),r(1),o()),t&2){let e=d.$implicit;m("value",e.value),l(),k(e.title)}}function Mn(t,d){t&1&&(a(0,"small",27),r(1," Activity name is required. "),o())}function En(t,d){t&1&&(a(0,"small",27),r(1," Points is required. "),o())}function Tn(t,d){t&1&&(a(0,"small",27),r(1," Points should be greater than 0. "),o())}function On(t,d){if(t&1&&(M(0),a(1,"div",21)(2,"label",22),r(3,"Name of activity"),o(),_(4,"textarea",23),f(5,Mn,2,0,"small",24),o(),a(6,"div",21)(7,"label",22),r(8,"Description of activity"),o(),_(9,"textarea",25),o(),a(10,"div",21)(11,"label",22),r(12,"Number of points to award"),o(),_(13,"input",26),f(14,En,2,0,"small",24)(15,Tn,2,0,"small",24),o(),E()),t&2){let e=c(2);l(5),m("ngIf",e.formGroup==null?null:e.formGroup.get("activityName").hasError("required")),l(9),m("ngIf",e.formGroup==null?null:e.formGroup.get("points").hasError("required")),l(),m("ngIf",e.formGroup==null?null:e.formGroup.get("points").hasError("min"))}}function Fn(t,d){t&1&&(a(0,"div",7)(1,"label",11),r(2," Linked ID "),_(3,"input",28),a(4,"small"),r(5,"ID of session, poll, chat, or meeting that is related to this activity. Leave blank if none."),o()()(),a(6,"p",29),r(7," Attendees who have already acquired points for the selected activity will not be given twice. "),o())}function Ln(t,d){t&1&&_(0,"span",30)}function Dn(t,d){if(t&1){let e=C();a(0,"form",5)(1,"div",6)(2,"div",7)(3,"label"),r(4," Attendees "),o(),_(5,"app-attendee-input",8),o(),a(6,"label"),r(7," OR "),o(),a(8,"div",7)(9,"label"),r(10," Enter attendee emails "),o(),_(11,"textarea",9),a(12,"small",10),r(13," * Please enter one email per line "),o()(),a(14,"div",7)(15,"label",11),r(16," Activity "),a(17,"select",12),p("ngModelChange",function(){g(e);let i=c();return u(i.onChangeActivity())}),_(18,"option"),a(19,"option",13),r(20,"Create one time activity"),o(),f(21,kn,2,2,"option",14),o()()(),f(22,On,16,3,"ng-container",15),N(23,"async"),f(24,Fn,8,0,"ng-template",null,0,ee),o(),a(26,"div",16)(27,"button",17),p("click",function(){g(e);let i=c();return u(i.activeModal.dismiss())}),r(28,"Close"),o(),a(29,"button",18),p("click",function(){g(e);let i=c();return u(i.submit())}),f(30,Ln,1,0,"span",19),r(31," Award points "),o()()()}if(t&2){let e=W(25),n=c();m("formGroup",n.formGroup),l(5),m("hasDelete",!0)("multiple",!0),l(16),m("ngForOf",n.rulesOptions),l(),m("ngIf",A(23,8,n.isOneTimeActivity$))("ngIfElse",e),l(7),m("disabled",n.formGroup.invalid||n.isLoading),l(),m("ngIf",n.isLoading)}}var ut=(()=>{class t{constructor(e,n,i){this.formBuilder=e,this.gamifyService=n,this.activeModal=i,this.rules=[],this.rulesOptions=[],this.subscription$=[],this.isLoading=!1,this.awardFunction=s=>{},this.isOneTimeActivity$=new Le(!1)}ngOnInit(){this.initialize(),this.subscription$.push(this.gamifyService.rulesSubject.subscribe(e=>{this.rules=e,this.rulesOptions=this.rules.map(n=>({title:n.activity,value:n.key}))})),this.gamifyService.listRules(!0)}ngOnDestroy(){this.subscription$.forEach(e=>{e.unsubscribe()})}initialize(){return S(this,null,function*(){this.formGroup=this.formBuilder.group({attendees:[[],[]],attendeeEmail:["",[]],activity:["",[B.required]],linkedId:["",[]]})})}submit(){return S(this,null,function*(){this.isLoading=!0;for(let e of Object.keys(this.formGroup.controls))this.formGroup.controls[e]?.disable();try{let e=V({attendees:this.formGroup.get("attendees").value,activity:this.formGroup.get("activity").value,linkedId:this.formGroup.get("linkedId").value,attendeeEmail:this.formGroup.get("attendeeEmail").value},this.isOneTimeActivity$.value?{oneTimeActivity:{activity:this.formGroup.get("activityName").value,description:this.formGroup.get("description").value,points:this.formGroup.get("points").value}}:{});yield this.awardFunction(e),this.activeModal.close(e)}catch{this.isLoading=!1;for(let n of Object.keys(this.formGroup.controls))this.formGroup.controls[n]?.enable()}})}get activity(){return this.formGroup.get("activity")}onChangeActivity(){this.activity.value==="oneTimeActivity"?(this.formGroup.addControl("activityName",new re("",[B.required])),this.formGroup.addControl("description",new re("",[])),this.formGroup.addControl("points",new re("",[B.required,B.min(1)])),this.isOneTimeActivity$.next(!0)):this.isOneTimeActivity$.value&&(this.formGroup.removeControl("activityName"),this.formGroup.removeControl("description"),this.formGroup.removeControl("points"),this.isOneTimeActivity$.next(!1))}static{this.\u0275fac=function(n){return new(n||t)(w(he),w(X),w(fe))}}static{this.\u0275cmp=I({type:t,selectors:[["app-add-point"]],decls:5,vars:2,consts:[["normalActivities",""],[1,"modal-header"],["id","add-point-modal-title",1,"modal-title"],["type","button","aria-label","Close","aria-describedby","add-point-modal-title",1,"btn-close",3,"click","disabled"],[3,"formGroup",4,"ngIf"],[3,"formGroup"],[1,"modal-body"],[1,"form-group","w-100"],["formControlName","attendees","type","text",3,"hasDelete","multiple"],["rows","5","formControlName","attendeeEmail",1,"form-control","w-100"],[1,"form-text","text-muted"],[1,"w-100"],["matInput","","formControlName","activity",1,"form-select","w-100",3,"ngModelChange"],["value","oneTimeActivity"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"],["class","spinner-grow spinner-grow-sm me-1",4,"ngIf"],[3,"value"],[1,"form-group"],["for",""],["name","activityName","rows","4","formControlName","activityName","placeholder","Name of the activity",1,"form-control"],["class","text-danger","translate","",4,"ngIf"],["name","description","rows","4","formControlName","description","placeholder","Description of the activity",1,"form-control"],["type","number","formControlName","points",1,"form-control"],["translate","",1,"text-danger"],["type","text","formControlName","linkedId",1,"form-control"],[1,"alert","alert-info"],[1,"spinner-grow","spinner-grow-sm","me-1"]],template:function(n,i){n&1&&(a(0,"div",1)(1,"h4",2),r(2,"Award point"),o(),a(3,"button",3),p("click",function(){return i.activeModal.dismiss()}),o()(),f(4,Dn,32,10,"form",4)),n&2&&(l(3),m("disabled",i.isLoading),l(
1),m("ngIf",i.formGroup))},dependencies:[te,q,ge,Ze,et,ne,Qe,Je,oe,pe,ae,ue,_e,ji,me,ie],encapsulation:2})}}return t})();var Vn=["stage"],Nn=(t,d)=>d.id;function An(t,d){if(t&1&&je(0,"span",14),t&2){let e=c();$("height",e.titleHeightPx,"px")("background-color",e.barColor())}}function In(t,d){if(t&1&&je(0,"span",15),t&2){let e=d.$implicit,n=c();$("width",e.width,"%")("height",n.rowHeightPx,"px")("background-color",n.rowTextColor())}}var en="#FFFFFF",tn="#082E4A",nn="#23313B",on="#EEF0F3",Gn=[238,240,243],Bn=70,Rn=25,Hn=20,an=100,rn=100,Wn=50,$n=200,ln=100,zn=0,jn=100,sn=100,Un=20,Kn=100,dn=60,St=400,qn=16,Xn=14,_t=100,Ne=[{id:1,width:84},{id:2,width:72},{id:3,width:79},{id:4,width:66},{id:5,width:75},{id:6,width:61},{id:7,width:70},{id:8,width:82},{id:9,width:64},{id:10,width:77},{id:11,width:69},{id:12,width:74},{id:13,width:63},{id:14,width:80},{id:15,width:68}],Yn=9.5,cn=0,Qn=3.25,Jn=10.17,Zn=6.5,eo=4,mn=6.33,to=.5/6,io=178,no=1,oo={cover:"Background image shown with cover fit, filling the whole frame.",contain:"Background image shown with contain fit, so the frame color shows as bars around it.",tile:"Background image shown with tile fit, repeating from the top left, with the frame color behind any gap."},ao={left:"left",center:"center",right:"right"},ro={top:"top",middle:"middle",bottom:"bottom"},se=[{value:"default",label:"Page default",stack:null,network:"Falls back with no internet.",aliases:[],singleWeight:!1},{value:"nunito",label:"Nunito",stack:"'Nunito', 'Roboto', -apple-system, sans-serif",network:"Needs an internet connection.",aliases:[],singleWeight:!1},{value:"forma-display",label:"Forma DJR Display",stack:"'forma-djr-display', 'Nunito', 'Roboto', -apple-system, sans-serif",network:"Works offline.",aliases:["forma-micro"],singleWeight:!0},{value:"system",label:"System font",stack:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif",network:"Works offline.",aliases:[],singleWeight:!1}],Y=[{value:300,label:"Light"},{value:400,label:"Regular"},{value:600,label:"Semibold"},{value:700,label:"Bold"},{value:800,label:"Extra bold"},{value:900,label:"Black"}];function gn(t){let d=se[0];return typeof t!="string"?d:se.find(n=>n.value===t||n.aliases.includes(t))??d}function un(t){return gn(t).singleWeight}function lo(t){let e=typeof t=="number"||typeof t=="string"&&t.trim().length>0?Number(t):Number.NaN,n=Y.find(i=>i.value===e);return n?n.value:St}function pn(t){let d=Y.find(e=>e.value===t);return(d?d.label:"Regular").toLowerCase()}function so(t){let d=Y.findIndex(e=>e.value===t);return d<0?Y[Y.length-1].value:Y[Math.min(d+1,Y.length-1)].value}function ht(t,d,e,n){let s=typeof t=="number"||typeof t=="string"&&t.trim().length>0?Number(t):Number.NaN;return Number.isFinite(s)?Math.min(e,Math.max(d,s)):n}function yt(t,d){return typeof t=="boolean"?t:d}function co(t){if(typeof t!="string")return null;let d=t.trim().replace(/^#/,""),e=d.length===8?d.slice(0,6):d,n=e.length===3?e.split("").map(i=>i+i).join(""):e;return/^[0-9a-fA-F]{6}$/.test(n)?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:null}function mo(t){let d=typeof t=="string"?t.trim():"";return d.length?`url("${d.replace(/[\r\n]/g,"").replace(/\\/g,String.raw`\\`).replace(/"/g,String.raw`\"`)}")`:null}var _n=(()=>{class t{constructor(){this.bgFitMode=D("cover"),this.boardWidthMode=D("contained"),this.boardWidthPercent=D(rn),this.boardAlignX=D("center"),this.boardAlignY=D("top"),this.boardScalePercent=D(ln),this.boardPanelEnabled=D(!0),this.boardPanelColor=D(on),this.boardPanelOpacity=D(sn),this.boardMaxHeightEnabled=D(!1),this.boardMaxHeightPercent=D(dn),this.showBoardTitle=D(!0),this.boardFontFamily=D("default"),this.boardFontWeight=D(St),this.backgroundImageUrl=D(null),this.backgroundColor=D(nn),this.fontColor=D(en),this.cellFontColor=D(tn),this.allRows=Ne,this.measuredStageHeight=Lt(null),this.stageRef=Wt("stage"),this.stageObserver=null,this.fit=P(()=>{let e=this.bgFitMode();return e==="contain"||e==="tile"?e:"cover"}),this.widthMode=P(()=>{let e=this.boardWidthMode();return e==="full"||e==="custom"?e:"contained"}),this.alignX=P(()=>{let e=this.boardAlignX();return e==="left"||e==="right"?e:"center"}),this.alignY=P(()=>{let e=this.boardAlignY();return e==="middle"||e==="bottom"?e:"top"}),this.customWidth=P(()=>ht(this.boardWidthPercent(),Hn,an,rn)),this.scalePercent=P(()=>ht(this.boardScalePercent(),Wn,$n,ln)),this.panelOpacity=P(()=>ht(this.boardPanelOpacity(),zn,jn,sn)),this.maxHeightPercent=P(()=>ht(this.boardMaxHeightPercent(),Un,Kn,dn)),this.isPanelOn=P(()=>yt(this.boardPanelEnabled(),!0)),this.isHeightBounded=P(()=>yt(this.boardMaxHeightEnabled(),!1)),this.showsTitle=P(()=>yt(this.showBoardTitle(),!0)),this.fontFamilyOption=P(()=>gn(this.boardFontFamily())),this.fontStack=P(()=>this.fontFamilyOption().stack),this.hasSingleWeightFace=P(()=>this.fontFamilyOption().singleWeight),this.bodyWeight=P(()=>this.hasSingleWeightFace()?St:lo(this.boardFontWeight())),this.headingWeight=P(()=>this.hasSingleWeightFace()?this.bodyWeight():so(this.bodyWeight())),this.rowHeightPx=Yn,this.titleHeightPx=Jn,this.theadHeightPx=mn,this.specimenBodySizePx=qn,this.specimenHeaderSizePx=Xn,this.specimenNote=P(()=>{let e=this.fontFamilyOption(),n=this.hasSingleWeightFace()?"ships one weight":`at ${pn(this.bodyWeight())}`;return`${e.label} ${n}. ${e.network}`}
1),this.screenBackgroundImage=P(()=>mo(this.backgroundImageUrl())),this.screenBackgroundColor=P(()=>{let e=this.backgroundColor();return typeof e=="string"&&e.trim().length?e:nn}),this.barColor=P(()=>{let e=this.fontColor();return typeof e=="string"&&e.trim().length?e:en}),this.rowTextColor=P(()=>{let e=this.cellFontColor();return typeof e=="string"&&e.trim().length?e:tn}),this.panelColor=P(()=>{let e=this.boardPanelColor();return typeof e=="string"&&e.trim().length?e:on}),this.screenBackgroundSize=P(()=>{switch(this.fit()){case"contain":return"contain";case"tile":return`${Rn}%`;default:return"cover"}}),this.screenBackgroundRepeat=P(()=>this.fit()==="tile"?"repeat":"no-repeat"),this.screenBackgroundPosition=P(()=>this.fit()==="tile"?"top left":"center center"),this.boardJustify=P(()=>{switch(this.alignX()){case"left":return"flex-start";case"right":return"flex-end";default:return"center"}}),this.boardAlign=P(()=>{switch(this.alignY()){case"middle":return"center";case"bottom":return"flex-end";default:return"flex-start"}}),this.baseWidth=P(()=>{switch(this.widthMode()){case"full":return an;case"custom":return this.customWidth();default:return Bn}}),this.boardZoom=P(()=>this.scalePercent()/_t),this.boardWidth=P(()=>Math.min(_t,this.baseWidth()*this.boardZoom())),this.boardMaxHeight=P(()=>this.isHeightBounded()?this.maxHeightPercent():null),this.wholeRowsThatFit=P(()=>{let n=(this.measuredStageHeight()??io)*this.maxHeightPercent()/_t/this.boardZoom(),i=eo*2+Qn*2+mn+(this.showsTitle()?this.titleHeightPx+Zn:0),s=Math.floor((n-i+cn+to/this.boardZoom())/(this.rowHeightPx+cn));return Math.max(no,Math.min(Ne.length,Number.isFinite(s)?s:Ne.length))}),this.visibleRows=P(()=>this.isHeightBounded()?Ne.slice(0,this.wholeRowsThatFit()):Ne),this.panelBackground=P(()=>{if(!this.isPanelOn())return null;let[e,n,i]=co(this.panelColor())??Gn;return`rgba(${e}, ${n}, ${i}, ${this.panelOpacity()/_t})`}),this.hasPanel=P(()=>this.panelBackground()!==null),this.ariaLabel=P(()=>
1{let e=this.screenBackgroundImage()?oo[this.fit()]:"Background is a solid color, so the fit setting has no effect.",n;switch(this.widthMode()){case"full":n="full width";break;case"custom":n=`a custom width of ${this.customWidth()} percent`;break;default:n="contained width"}let i=`at the ${ro[this.alignY()]} ${ao[this.alignX()]}`,s=this.showsTitle()?"The board title is shown above the rows.":"The board title is hidden, so the rows start at the top of the board.",h=this.hasSingleWeightFace()?`Text is set in ${this.fontFamilyOption().label}, which ships one weight. The weight setting is turned off for this font. ${this.fontFamilyOption().network}`:`Text is set in ${this.fontFamilyOption().label} at ${pn(this.bodyWeight())}, with the column headings and the rank one step bolder. ${this.fontFamilyOption().network}`,b=this.isPanelOn()?`The row background is on, in ${this.panelColor()} at ${this.panelOpacity()} percent opacity.`:"The row background is off, so the rows sit straight on the artwork.",x;if(!this.isHeightBounded())x="The board height is not limited.";else{let y=this.visibleRows().length,T=y===1?"one row":`${y} rows`;x=`The board is limited to ${this.maxHeightPercent()} percent of the screen height, and shows ${T} under it. Rows that do not fit are left out rather than cut in half, and where the limit cannot hold one whole row the board keeps one row and the limit cuts it.`}return`Schematic preview of the leaderboard frame. ${e} The board uses ${n}, sits ${i}, and is scaled to ${this.scalePercent()} percent of its natural size in both directions, up to the frame edge. ${s} ${h} ${b} ${x}`})}ngAfterViewInit(){this.watchStage()}ngOnDestroy(){this.stageObserver?.disconnect(),this.stageObserver=null}watchStage(){let e=this.stageRef()?.nativeElement;!e||typeof ResizeObserver!="function"||(this.stageObserver=new ResizeObserver(()=>{let n=e.getBoundingClientRect().height;this.measuredStageHeight.set(Number.isFinite(n)&&n>0?n:null)}),this.stageObserver.observe(e))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=I({type:t,selectors:[["app-leaderboard-frame-preview"]],viewQuery:function(n,i){n&1&&Nt(i.stageRef,Vn,5),n&2&&At()},inputs:{bgFitMode:[1,"bgFitMode"],boardWidthMode:[1,"boardWidthMode"],boardWidthPercent:[1,"boardWidthPercent"],boardAlignX:[1,"boardAlignX"],boardAlignY:[1,"boardAlignY"],boardScalePercent:[1,"boardScalePercent"],boardPanelEnabled:[1,"boardPanelEnabled"],boardPanelColor:[1,"boardPanelColor"],boardPanelOpacity:[1,"boardPanelOpacity"],boardMaxHeightEnabled:[1,"boardMaxHeightEnabled"],boardMaxHeightPercent:[1,"boardMaxHeightPercent"],showBoardTitle:[1,"showBoardTitle"],boardFontFamily:[1,"boardFontFamily"],boardFontWeight:[1,"boardFontWeight"],backgroundImageUrl:[1,"backgroundImageUrl"],backgroundColor:[1,"backgroundColor"],fontColor:[1,"fontColor"],cellFontColor:[1,"cellFontColor"]},decls:18,vars:45,consts:[["stage",""],[1,"lfp"],["role","img",1,"lfp-screen"],[1,"lfp-stage"],[1,"lfp-board"],[1,"lfp-board-inner"],[1,"lfp-title",3,"height","background-color"],[1,"lfp-rows"],[1,"lfp-thead"],[1,"lfp-row",3,"width","height","background-color"],["aria-hidden","true",1,"lfp-specimen"],[1,"lfp-specimen-heading"],[1,"lfp-specimen-body"],[1,"lfp-specimen-note"],[1,"lfp-title"],[1,"lfp-row"]],template:function(n,i){n&1&&(ce(0,"div",1)(1,"div",2)(2,"div",3,0)(4,"div",4)(5,"div",5),O(6,An,1,4,"span",6),ce(7,"div",7),je(8,"span",8),$e(9,In,1,6,"span",9,Nn),De()()()()(),ce(11,"div",10)(12,"span",11),r(13,"Name"),De(),ce(14,"span",12),r(15,"Alex Morgan"),De()(),ce(16,"p",13),r(17),De()()),n&2&&(l(),$("background-color",i.screenBackgroundColor())("background-image",i.screenBackgroundImage())("background-size",i.screenBackgroundSize())("background-repeat",i.screenBackgroundRepeat())("background-position",i.screenBackgroundPosition()),G("aria-label",i.ariaLabel()),l(),$("justify-content",i.boardJustify())("align-items",i.boardAlign()),l(2),$("width",i.boardWidth(),"%")("max-height",i.boardMaxHeight(),"%"),v("lfp-board-bounded",i.isHeightBounded()),l(),$("zoom",i.boardZoom()),l(),F(i.showsTitle()?6:-1),l(),$("background-color",i.panelBackgroun
1d()),v("lfp-rows-panel",i.hasPanel()),l(),$("height",i.theadHeightPx,"px")("background-color",i.rowTextColor()),l(),ze(i.visibleRows()),l(3),$("font-family",i.fontStack())("font-weight",i.headingWeight())("font-size",i.specimenHeaderSizePx,"px"),l(2),$("font-family",i.fontStack())("font-weight",i.bodyWeight())("font-size",i.specimenBodySizePx,"px"),l(3),k(i.specimenNote()))},styles:["[_nghost-%COMP%]{display:block}.lfp[_ngcontent-%COMP%]{max-width:320px;margin-inline:auto}.lfp-screen[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border:1px solid rgba(0,0,0,.15);border-radius:4px;background-color:#23313b;background-repeat:no-repeat;background-position:center center;background-size:cover}.lfp-stage[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;box-sizing:border-box}.lfp-board[_ngcontent-%COMP%]{display:block;box-sizing:border-box;flex:0 0 auto}.lfp-board-bounded[_ngcontent-%COMP%]{overflow:hidden}.lfp-board-inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;width:100%;gap:6.5px;padding:4px 8px}.lfp-title[_ngcontent-%COMP%]{display:block;flex:0 0 auto;align-self:center;width:44%;height:10.17px;border-radius:3px}.lfp-rows[_ngcontent-%COMP%]{display:flex;flex:0 0 auto;flex-direction:column;box-sizing:border-box;width:100%;gap:0;padding:3.25px 6px;border-radius:4px}.lfp-row[_ngcontent-%COMP%]{display:block;flex:0 0 auto;box-sizing:border-box;height:9.5px;padding:1px 0;background-clip:content-box;border-radius:1.5px}.lfp-thead[_ngcontent-%COMP%]{display:block;flex:0 0 auto;box-sizing:border-box;width:46%;padding:1px 0;background-clip:content-box;border-radius:1.5px;opacity:.55}.lfp-specimen[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;margin-top:8px;line-height:1.2;color:var(--bs-body-color, #212529)}.lfp-specimen-body[_ngcontent-%COMP%]{min-width:0}.lfp-specimen-note[_ngcontent-%COMP%]{margin:4px 0 0;font-size:12px;line-height:1.4;color:var(--bs-secondary-color, #6c757d)}"],changeDetection:0})}}return t})();function go(t,d){t&1&&(a(0,"div",36)(1,"label",37),r(2,"Display text"),o(),_(3,"textarea",38),o())}function uo(t,d){if(t&1){let e=C();a(0,"div",15)(1,"span",16),r(2,"Display mode"),o(),a(3,"div",17)(4,"div",27)(5,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("displayMode",!0))}),r(6," Visible "),o(),a(7,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("displayMode",!1))}),r(8," Hidden "),o()()()(),f(9,go,4,0,"div",28),a(10,"section",29)(11,"h6",30),r(12,"Display columns"),o(),a(13,"div",31)(14,"div",15)(15,"span",16),r(16,"Attendee type"),o(),a(17,"div",17)(18,"div",32)(19,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("attendeeType",!0))}),r(20," Visible "),o(),a(21,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("attendeeType",!1))}),r(22," Hidden "),o()()()(),a(23,"div",15)(24,"span",16),r(25,"Company"),o(),a(26,"div",17)(27,"div",33)(28,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("company",!0))}),r(29," Visible "),o(),a(30,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("company",!1))}),r(31," Hidden "),o()()()(),a(32,"div",15)(33,"span",16),r(34,"Job title"),o(),a(35,"div",17)(36,"div",34)(37,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("jobTitle",!0))}),r(38," Visible "),o(),a(39,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("jobTitle",!1))}),r(40," Hidden "),o()()()(),a(41,"div",15)(42,"span",16),r(43,"Points"),o(),a(44,"div",17)(45,"div",35)(46,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("points",!0))}),r(47," Visible "),o(),a(48,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("points",!1))}),r(49," Hidden "),o()()()()()()}if(t&2){let e=c(2);l(5),v("btn-light",!e.displayMode)("btn-success",e.displayMode),l(2),v("btn-light",e.displayMode)("btn-success",!e.displayMode),l(2),m("ngIf",!e.displayMode),l(10),v("btn-light",!e.attendeeType)("btn-success",e.attendeeType),l(2),v("btn-light",e.attendeeType)("btn-success",!e.attendeeType),l(7),v("btn-light",!e.company)("btn-success",e.company),l(2),v("btn-light",e.company)("btn-success",!e.company),l(7),v("btn-light",!e.jobTitle)("bt
1n-success",e.jobTitle),l(2),v("btn-light",e.jobTitle)("btn-success",!e.jobTitle),l(7),v("btn-light",!e.points)("btn-success",e.points),l(2),v("btn-light",e.points)("btn-success",!e.points)}}function _o(t,d){t&1&&(a(0,"div",36)(1,"label",42),r(2,"Display text"),o(),_(3,"textarea",43),o())}function ho(t,d){if(t&1){let e=C();a(0,"div",15)(1,"span",16),r(2,"Display mode"),o(),a(3,"div",17)(4,"div",39)(5,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("displayModeTeam",!0))}),r(6," Visible "),o(),a(7,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("displayModeTeam",!1))}),r(8," Hidden "),o()()()(),f(9,_o,4,0,"div",28),a(10,"section",29)(11,"h6",30),r(12,"Display columns"),o(),a(13,"div",31)(14,"div",15)(15,"span",16),r(16,"Logo"),o(),a(17,"div",17)(18,"div",40)(19,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("teamLogo",!0))}),r(20," Visible "),o(),a(21,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("teamLogo",!1))}),r(22," Hidden "),o()()()(),a(23,"div",15)(24,"span",16),r(25,"Points"),o(),a(26,"div",17)(27,"div",41)(28,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("teamPoints",!0))}),r(29," Visible "),o(),a(30,"button",19),p("click",function(){g(e);let i=c(2);return u(i.toggleChangeVal("teamPoints",!1))}),r(31," Hidden "),o()()()()()()}if(t&2){let e=c(2);l(5),v("btn-light",!e.displayModeTeam)("btn-success",e.displayModeTeam),l(2),v("btn-light",e.displayModeTeam)("btn-success",!e.displayModeTeam),l(2),m("ngIf",!e.displayModeTeam),l(10),v("btn-light",!e.teamLogo)("btn-success",e.teamLogo),l(2),v("btn-light",e.teamLogo)("btn-success",!e.teamLogo),l(7),v("btn-light",!e.teamPoints)("btn-success",e.teamPoints),l(2),v("btn-light",e.teamPoints)("btn-success",!e.teamPoints)}}function fo(t,d){if(t&1){let e=C();a(0,"div",15)(1,"span",16),r(2,"Show title"),o(),a(3,"div",17)(4,"div",18)(5,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("showBoardTitle",!0))}),r(6," Visible "),o(),a(7,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("showBoardTitle",!1))}),r(8," Hidden "),o()()()(),a(9,"div",20),r(10," Hidden takes the event name and the word Leaderboard off the board. Use it when the background artwork already carries a title. "),o(),a(11,"nav",21,1),N(13,"async"),M(14,22),a(15,"a",23),r(16,"Individual"),o(),f(17,uo,50,41,"ng-template",11),E(),M(18,24),a(19,"a",25),r(20,"Team"),o(),f(21,ho,32,25,"ng-template",11),E(),o(),_(22,"div",26)}if(t&2){let e=W(12),n=c();l(5),v("btn-light",!n.showBoardTitle)("btn-success",n.showBoardTitle),l(2),v("btn-light",n.showBoardTitle)("btn-success",!n.showBoardTitle),l(4),m("activeId",A(13,10,n.route.fragment)),l(11),m("ngbNavOutlet",e)}}function bo(t,d){if(t&1){let e=C();a(0,"button",80),p("click",function(){let i=g(e).$implicit,s=c(2);return u(s.selectAppearanceGroup(i.id))})("keydown",function(i){let s=g(e).index,h=c(2);return u(h.onAppearanceRailKeydown(i,s))}),r(1),o()}if(t&2){let e=d.$implicit,n=c(2);m("id","appearance-tab-"+e.id),G("aria-selected",n.isAppearanceGroup(e.id))("aria-controls","appearance-panel-"+e.id)("tabindex",n.isAppearanceGroup(e.id)?0:-1),l(),L(" ",e.label," ")}}function vo(t,d){if(t&1&&(a(0,"option",81),r(1),o()),t&2){let e=d.$implicit;m("value",e.value),l(),L(" ",e.label," ")}}function xo(t,d){if(t&1){let e=C();a(0,"div",15)(1,"span",16),r(2,"Background image"),o(),a(3,"div",17)(4,"button",82),p("click",function(){g(e);let i=c(2);return u(i.uploadImage())}),r(5),o()()()}if(t&2){let e=c(2);l(5),L(" ",e.selectedFilePreview?"Replace":"Select"," ")}}function Co(t,d){if(t&1&&(a(0,"option",81),r(1),o()),t&2){let e=d.$implicit;m("value",e.value),l(),k(e.label)}}function wo(t,d){if(t&1&&(a(0,"option",81),r(1),o()),t&2){let e=d.$implicit;m("value",e.value),l(),L(" ",e.label," ")}}function yo(t,d){if(t&1){let e=C();a(0,"div",15)(1,"label",83),r(2,"Width"),o(),a(3,"div",17)(4,"div",66)(5,"input",84),p("change",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardWidthPercent"))})("blur",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardWidthPercent"))}),o(),a(6,"span",68),r(7,"%"),o()()()()}if(t&2){let e=c(2);l(5),G("min",e.frameLayoutRanges.boardWidthPercent.min)("max",e.frameLayoutRanges.boardWidthPercent.max)}}function So(t,d){if(t&1){let e=C();a(0,"button",85),p("click",function(){let i=g(e).$implicit,s=c(2);return u(s.setBoardPosition(i.x,i.y))}),_(1,"span",86),o()}if(t&2){let e=d.$implicit,n=c(2);v("selected",n.isBoardPosition(e.x,e.y)),m("title",e.label),G("aria-pressed",n.isBoardPosition(e.x,e.y))("aria-label",e.label)}}function Po(t,d){if(t&1){let e=C();a(0,"div",15)(1,"label",87),r(2,"Max height"),o(),a(3,"div",17)(4,"div",66)(5,"input",88),p("change",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardMaxHeightPercent"))})("blur",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardMaxHeightPercent"))}),o(),a(6,"span",68),r(7,"%"),o()()()()}if(t&2){let e=c(2);l(5),G("min",e.frameLayoutRanges.boardMaxHeightPercent.min)("max",e.frameLayoutRanges.boardMaxHeightPercent.max)}}function ko(t,d){if(t&1&&(a(0,"option",81),r(1),o()),t&2){let e=d.$implicit;m("value",e.value),l(),L(" ",e.label," ")}}function Mo(t,d){t&1&&(a(0,"span",74),r(1,"(Forma has one weight)"),o())}function Eo(t,d){if(t&1&&(a(0,"option",89),r(1),o()),t&2){let e=d.$implicit;m("ngValue",e.value),l(),L(" ",e.label," ")}}
1function To(t,d){if(t&1){let e=C();M(0),a(1,"div",15)(2,"span",16),r(3,"Background color"),o(),a(4,"div",17)(5,"app-color-picker",55),p("saveColor",function(i){g(e);let s=c(2);return u(s.saveBoardPanelColorPicker(i,"preview"))})("resetColor",function(){g(e);let i=c(2);return u(i.resetBoardPanelColor())}),o()()(),a(6,"div",15)(7,"label",90),r(8,"Opacity"),o(),a(9,"div",17)(10,"div",66)(11,"input",91),p("change",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardPanelOpacity"))})("blur",function(){g(e);let i=c(2);return u(i.clampFrameLayoutValue("boardPanelOpacity"))}),o(),a(12,"span",68),r(13,"%"),o()()()(),E()}if(t&2){let e=c(2);l(5),m("defaultColor",e.defaultRowBackgroundColor)("selectedColor",e.boardPanelColor),l(6),G("min",e.frameLayoutRanges.boardPanelOpacity.min)("max",e.frameLayoutRanges.boardPanelOpacity.max)}}function Oo(t,d){if(t&1){let e=C();a(0,"div",44),_(1,"app-leaderboard-frame-preview",45),o(),a(2,"div",46)(3,"div",47),f(4,bo,2,5,"button",48),o(),a(5,"div",49)(6,"div",50)(7,"div",15)(8,"label",51),r(9,"Background options"),o(),a(10,"div",17)(11,"select",52),f(12,vo,2,2,"option",53),o()()(),a(13,"div",54)(14,"span",16),r(15,"Background color"),o(),a(16,"div",17)(17,"app-color-picker",55),p("saveColor",function(i){g(e);let s=c();return u(s.saveColorPicker(i,"preview"))})("resetColor",function(){g(e);let i=c();return u(i.resetPreviewBackgroundColor())}),o()()(),f(18,xo,6,1,"div",56),a(19,"div",15)(20,"label",57),r(21,"Background fit"),o(),a(22,"div",17)(23,"select",58),f(24,Co,2,2,"option",53),o()()()(),a(25,"div",59)(26,"div",15)(27,"label",60),r(28,"Board width"),o(),a(29,"div",17)(30,"select",61),f(31,wo,2,2,"option",53),o()()(),f(32,yo,8,2,"div",56),a(33,"div",15)(34,"span",62),r(35,"Board position"),o(),a(36,"div",17)(37,"div",63),f(38,So,2,5,"button",64),o()()(),a(39,"div",15)(40,"label",65),r(41,"Board scale"),o(),a(42,"div",17)(43,"div",66)(44,"input",67),p("change",function(){g(e);let i=c();return u(i.clampFrameLayoutValue("boardScalePercent"))})("blur",function(){g(e);let i=c();return u(i.clampFrameLayoutValue("boardScalePercent"))}),o(),a(45,"span",68),r(46,"%"),o()()()(),a(47,"div",15)(48,"span",16),r(49,"Board max height"),o(),a(50,"div",17)(51,"div",69)(52,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("boardMaxHeightEnabled",!0))}),r(53," On "),o(),a(54,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("boardMaxHeightEnabled",!1))}),r(55," Off "),o()()()(),f(56,Po,8,2,"div",56),o(),a(57,"div",70)(58,"div",15)(59,"label",71),r(60,"Font"),o(),a(61,"div",17)(62,"select",72),f(63,ko,2,2,"option",53),o()()(),a(64,"div",15)(65,"label",73),r(66," Weight "),O(67,Mo,2,0,"span",74),o(),a(68,"div",17)(69,"select",75),f(70,Eo,2,2,"option",76),o()()(),a(71,"div",15)(72,"span",16),r(73,"Title color"),o(),a(74,"div",17)(75,"app-color-picker",55),p("saveColor",function(i){g(e);let s=c();return u(s.saveFontColorPicker(i,"preview"))})("resetColor",function(){g(e);let i=c();return u(i.resetPreviewFontColor())}),o()()()(),a(76,"div",77)(77,"div",15)(78,"span",16),r(79,"Show"),o(),a(80,"div",17)(81,"div",78)(82,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("boardPanelEnabled",!0))}),r(83," Visible "),o(),a(84,"button",19),p("click",function(){g(e);let i=c();return u(i.toggleChangeVal("boardPanelEnabled",!1))}),r(85," Hidden "),o()()()(),a(86,"div",15)(87,"span",16),r(88,"Text color"),o(),a(89,"div",17)(90,"app-color-picker",55),p("saveColor",function(i){g(e);let s=c();return u(s.saveBoardCellFontColorPicker(i,"preview"))})("resetColor",function(){g(e);let i=c();return u(i.resetBoardCellFontColor())}),o()()(),f(91,To,14,4,"ng-container",79),o()()()}if(t&2){let e=c();l(),m("bgFitMode",e.bgFitMode)("boardWidthMode",e.boardWidthMode)("boardWidthPercent",e.boardWidthPercent)("boardAlignX",e.boardAlignX)("boardAlignY",e.boardAlignY)("boardScalePercent",e.boardScalePercent)("boardPanelEnabled",e.boardPanelEnabled)("boardPanelColor",e.boardPanelColor)("cellFontColor",e.boardCellFontColor)("boardPanelOpacity",e.boardPanelOpacity)("showBoardTitle",e.showBoardTitle)("boardFontFamily",e.boardFontFamily)("boardFontWeight",e.boardFontWeight)("boardMaxHeightEnabled",e.boardMaxHeightEnabled)("boardMaxHeightPercent",e.boardMaxHeightPercent)("backgroundImageUrl",e.previewBackgroun
1dImageUrl)("backgroundColor",e.previewBoardBackgroundColor)("fontColor",e.previewFontColor),l(3),m("ngForOf",e.appearanceGroups),l(2),m("hidden",!e.isAppearanceGroup("background")),l(6),m("ngForOf",e.backgroundSettingOptions),l(),m("hidden",e.previewBackgroundSetting!=="color"),l(4),m("defaultColor","#23313B")("selectedColor",e.previewBackgroundColor),l(),m("ngIf",e.previewBackgroundSetting==="image"),l(6),m("ngForOf",e.backgroundFitOptions),l(),m("hidden",!e.isAppearanceGroup("board")),l(6),m("ngForOf",e.boardWidthModeOptions),l(),m("ngIf",e.boardWidthMode==="custom"),l(6),m("ngForOf",e.boardPositions),l(6),G("min",e.frameLayoutRanges.boardScalePercent.min)("max",e.frameLayoutRanges.boardScalePercent.max),l(8),v("btn-light",!e.boardMaxHeightEnabled)("btn-success",e.boardMaxHeightEnabled),l(2),v("btn-light",e.boardMaxHeightEnabled)("btn-success",!e.boardMaxHeightEnabled),l(2),m("ngIf",e.boardMaxHeightEnabled),l(),m("hidden",!e.isAppearanceGroup("text")),l(6),m("ngForOf",e.boardFontFamilyOptions),l(4),F(e.boardFontWeightIsFixed?67:-1),l(2),G("title",e.boardFontWeightIsFixed?"Forma DJR Display ships one weight.":null),l(),m("ngForOf",e.boardFontWeightOptions),l(5),m("defaultColor",e.defaultTitleFontColor)("selectedColor",e.previewFontColor),l(),m("hidden",!e.isAppearanceGroup("rows")),l(6),v("btn-light",!e.boardPanelEnabled)("btn-success",e.boardPanelEnabled),l(2),v("btn-light",e.boardPanelEnabled)("btn-success",!e.boardPanelEnabled),l(6),m("defaultColor",e.defaultBoardCellFontColor)("selectedColor",e.boardCellFontColor),l(),m("ngIf",e.boardPanelEnabled)}}function Fo(t,d){t&1&&(M(0),_(1,"span",96),r(2," Saving... "),E())}function Lo(t,d){t&1&&r(0," Save ")}function Do(t,d){if(t&1){let e=C();a(0,"div",92)(1,"div",93)(2,"button",94),p("click",function(){g(e);let i=c();return u(i.save())}),f(3,Fo,3,0,"ng-container",95)(4,Lo,1,0,"ng-template",null,2,ee),o()()()}if(t&2){let e=W(5),n=c();l(2),m("disabled",n.loading),l(),m("ngIf",n.loading)("ngIfElse",e)}}var Ie="#EEF0F3",Ge="#082E4A",Pt="#FFFFFF",Vo=400,fn=[{value:"default",label:"Default"},{value:"color",label:"Background color"},{value:"image",label:"Background image"}],bn=[{value:"cover",label:"Cover"},{value:"contain",label:"Contain"},{value:"tile",label:"Tile"}],vn=[{value:"contained",label:"Contained"},{value:"full",label:"Full width"},{value:"custom",label:"Custom"}],hn=[{id:"background",label:"Background"},{id:"board",label:"Board"},{id:"text",label:"Text"},{id:"rows",label:"Rows"}],No=[{key:"ArrowDown",step:1},{key:"ArrowRight",step:1},{key:"ArrowUp",step:-1},{key:"ArrowLeft",step:-1}],kt=[{x:"left",y:"top",label:"Top left"},{x:"center",y:"top",label:"Top center"},{x:"right",y:"top",label:"Top right"},{x:"left",y:"middle",label:"Middle left"},{x:"center",y:"middle",label:"Middle center"},{x:"right",y:"middle",label:"Middle right"},{x:"left",y:"bottom",label:"Bottom left"},{x:"center",y:"bottom",label:"Bottom center"},{x:"right",y:"bottom",label:"Bottom right"}],Ao=fn.map(t=>t.value),Io=bn.map(t=>t.value),Go=vn.map(t=>t.value),Bo=kt.map(t=>t.x),Ro=kt.map(t=>t.y);function Ae(t,d,e){return typeof t=="string"&&d.includes(t)?t:e}var Ho=[{value:"forma-display",aliases:["forma"]}];function Wo(t){let d=se[0].value;if(typeof t!="string")return d;let e=se.find(s=>s.value===t||s.aliases.includes(t));if(e)return e.value;let n=Ho.find(s=>s.aliases.includes(t)),i=n?se.find(s=>s.value===n.value):void 0;return i?i.value:d}function $o(t){let e=typeof t=="number"||typeof t=="string"&&t.trim().length>0?Number(t):Number.NaN,n=Y.find(i=>i.value===e);return n?n.value:Vo}function z(t,d){return typeof t=="boolean"?t:d}var zo={PK:"",SK:"",previewBackgroundSetting:"default",previewFontColor:"#FFFFFF",previewBackgroundColor:"#23313B",previewDefaultBgColor:"#23313B",previewBackgroundImage:"",previewBackgroundImageName:"",displayMode:!0,displayModeTeam:!0,displayMessage:"",displayMessageTeam:"",attendeeType:!0,company:!0,jobTitle:!0,points:!0,teamLogo:!0,teamPoints:!0,bgFitMode:"cover",boardWidthMode:"contained",boardWidthPercent:100,boardAlignX:"center",boardAlignY:"top",boardScalePercent:100,boardPanelEnabled:!0,boardPanelColor:Ie,boardCellFontColor:Ge,boardPanelOpacity:100,boardMaxHeightEnabled:!1,boardMaxHeightPercent:60,showBoardTitle:!0},Be=(()=>{class t{isAppearanceGroup(e){return this.activeAppearanceGroup===e}selectAppearanceGroup(e){this.activeAppearanceGroup=e}onAppearanceRailKeydown(e,n){let i=this.appearanceGroups.length,s;if(e.key==="Home")s=0;else if(e.key==="End")s=i-1;else{let y=No.find(T=>T.key===e.key);if(!y)return;s=(n+y.step+i)%i}
1e.preventDefault(),this.selectAppearanceGroup(this.appearanceGroups[s].id);let h=e.currentTarget.parentElement,b=h?h.querySelectorAll(".appearance-rail__item"):null,x=b?b.item(s):null;x&&x.focus()}constructor(e,n,i,s,h,b,x){this.formBuilder=e,this.activeModal=n,this.modal=i,this.gamificationService=s,this.utilities=h,this.router=b,this.route=x,this.detail=V({},zo),this.showActions=!0,this.saveComplete=new Vt,this.frameLayoutRanges={boardWidthPercent:{min:20,max:100,fallback:100},boardScalePercent:{min:50,max:200,fallback:100},boardPanelOpacity:{min:0,max:100,fallback:100},boardMaxHeightPercent:{min:20,max:100,fallback:60}},this.boardFontFamilyOptions=se,this.boardFontWeightOptions=Y,this.backgroundSettingOptions=fn,this.backgroundFitOptions=bn,this.boardWidthModeOptions=vn,this.boardFontFamilySubscription=null,this.defaultRowBackgroundColor=Ie,this.defaultBoardCellFontColor=Ge,this.defaultTitleFontColor=Pt,this.boardPositions=kt,this.appearanceGroups=hn,this.activeAppearanceGroup=hn[0].id,this.loading=!1,this.setNewImage=!0}ngOnInit(){this.initializeComponent()}ngOnChanges(e){e.detail&&!e.detail.firstChange&&this.initializeComponent()}initializeComponent(){typeof this.detail.previewBackgroundImage!="string"||!this.detail.previewBackgroundImage.length?(this.detail.previewBackgroundImage="",this.detail.previewBackgroundImageName=""):(this.selectedFilePreview=this.detail.previewBackgroundImage,this.setNewImage=!1),!this.detail.previewBackgroundImageName&&this.detail.previewBackgroundImage&&(this.detail.previewBackgroundImageName=this.detail.previewBackgroundImage.split("/").pop()),this.formGroup=this.formBuilder.group({previewBackgroundSetting:[Ae(this.detail.previewBackgroundSetting,Ao,"default"),[]],previewBackgroundColor:[this.detail.previewBackgroundColor||"#23313B",[]],previewFontColor:[this.detail.previewFontColor||"#FFFFFF",[]],previewDefaultBgColor:[this.detail.previewDefaultBgColor||"#23313B",[]],displayMode:[z(this.detail.displayMode,!0),[]],displayMessage:[this.detail.displayMessage||"",[]],displayModeTeam:[z(this.detail.displayModeTeam,!0),[]],displayMessageTeam:[this.detail.displayMessageTeam||"",[]],attendeeType:[z(this.detail.attendeeType,!0),[]],company:[z(this.detail.company,!0),[]],jobTitle:[z(this.detail.jobTitle,!0),[]],points:[z(this.detail.points,!0),[]],teamLogo:[z(this.detail.teamLogo,!0),[]],teamPoints:[z(this.detail.teamPoints,!0),[]],bgFitMode:[Ae(this.detail.bgFitMode,Io,"cover"),[]],boardWidthMode:[Ae(this.detail.boardWidthMode,Go,"contained"),[]],boardWidthPercent:[typeof this.detail.boardWidthPercent<"u"?this.detail.boardWidthPercent:100,[]],boardAlignX:[Ae(this.detail.boardAlignX,Bo,"center"),[]],boardAlignY:[Ae(this.detail.boardAlignY,Ro,"top"),[]],boardScalePercent:[typeof this.detail.boardScalePercent<"u"?this.detail.boardScalePercent:100,[]],boardPanelEnabled:[z(this.detail.boardPanelEnabled,!0),[]],boardPanelColor:[this.detail.boardPanelColor||Ie,[]],boardCellFontColor:[this.detail.boardCellFontColor||Ge,[]],boardPanelOpacity:[typeof this.detail.boardPanelOpacity<"u"?this.detail.boardPanelOpacity:100,[]],boardMaxHeightEnabled:[z(this.detail.boardMaxHeightEnabled,!1),[]],boardMaxHeightPercent:[typeof this.detail.boardMaxHeightPercent<"u"?this.detail.boardMaxHeightPercent:60,[]],showBoardTitle:[z(this.detail.showBoardTitle,!0),[]],boardFontFamily:[Wo(this.detail.boardFontFamily),[]],boardFontWeight:[$o(this.detail.boardFontWeight),[]]}),this.clampFrameLayoutValues(),this.watchBoardFontFamily(),this.detail.previewBackgroundImage&&(this.setNewImage=!1)}watchBoardFontFamily(){this.boardFontFamilySubscription?.unsubscribe(),this.syncBoardFontWeightState(),this.boardFontFamilySubscription=this.formGroup.get("boardFontFamily").valueChanges.subscribe(()=>this.syncBoardFontWeightState())}syncBoardFontWeightState(){let e=this.formGroup.get("boardFontWeight");if(this.boardFontWeightIsFixed){e.enabled&&e.disable({emitEvent:!1});return}e.disabled&&e.enable({emitEvent:!1})}ngOnDestroy(){this.boardFontFamilySubscription?.unsubscribe(),this.boardFontFamilySubscription=null,this.previewColorPicker&&this.previewColorPicker.destroyAndRemove()}changeListener(e){this.selectedFile=e.target.files[0]}replaceExistingImage(e,n){e.stopPropagation(),e.preventDefault(),this.setNewImage=n}
1save(){return S(this,null,function*(){if(this.previewBackgroundSetting==="image"&&!this.selectedFile&&this.setNewImage)return this.utilities.alert({header:"External page background image",message:"Please select a file"}),{success:!1,message:"Please select a file"};this.clampFrameLayoutValues(),this.loading=!0;let e=V({},this.formGroup.getRawValue()),n=yield this.gamificationService.setGamifyExtPageSetting(e);if(n.success){let i=Z(V({},e),{previewBackgroundImage:this.detail.previewBackgroundImage});return this.selectedFile&&(i=(yield this.gamificationService.uploadExternalLeaderBoardBg(e,this.selectedFile)).data),this.loading=!1,this.saveComplete.emit(i),this.showActions&&this.activeModal&&this.activeModal.close(i),{success:!0,data:i}}else return this.utilities.alert({header:"External page",message:n.message?n.message:"Failed to update external leaderboard background settings."}),this.loading=!1,{success:!1,message:n.message||"Failed to update external leaderboard background settings."}})}showImageLibrary(){return S(this,null,function*(){let e=this.modal.open(bi,{centered:!0,backdrop:!0,size:"lg"});try{let n=yield e.result;n?.photo&&(this.selectedFile=n.photo)}catch(n){console.error("Error showing image library:",n)}})}get previewBackgroundSetting(){return this.formGroup.get("previewBackgroundSetting").value}get previewBackgroundColor(){return this.formGroup.get("previewBackgroundColor").value}set previewBackgroundColor(e){this.formGroup.get("previewBackgroundColor").setValue(e)}get previewFontColor(){return this.formGroup.get("previewFontColor").value}set previewFontColor(e){this.formGroup.get("previewFontColor").setValue(e)}get displayMode(){return this.formGroup.get("displayMode").value}set displayMode(e){this.formGroup.get("displayMode").setValue(e)}get displayModeTeam(){return this.formGroup.get("displayModeTeam").value}set displayModeTeam(e){this.formGroup.get("displayModeTeam").setValue(e)}get attendeeType(){return this.formGroup.get("attendeeType").value}set attendeeType(e){this.formGroup.get("attendeeType").setValue(e)}get company(){return this.formGroup.get("company").value}set company(e){this.formGroup.get("company").setValue(e)}get jobTitle(){return this.formGroup.get("jobTitle").value}set jobTitle(e){this.formGroup.get("jobTitle").setValue(e)}get points(){return this.formGroup.get("points").value}set points(e){this.formGroup.get("points").setValue(e)}get teamLogo(){return this.formGroup.get("teamLogo").value}set teamLogo(e){this.formGroup.get("teamLogo").setValue(e)}get teamPoints(){return this.formGroup.get("teamPoints").value}set teamPoints(e){this.formGroup.get("teamPoints").setValue(e)}get bgFitMode(){return this.formGroup.get("bgFitMode").value}get boardWidthMode(){return this.formGroup.get("boardWidthMode").value}get boardWidthPercent(){return this.formGroup.get("boardWidthPercent").value}get boardAlignX(){return this.formGroup.get("boardAlignX").value}get boardAlignY(){return this.formGroup.get("boardAlignY").value}get boardScalePercent(){return this.formGroup.get("boardScalePercent").value}get boardPanelEnabled(){return this.formGroup.get("boardPanelEnabled").value}set boardPanelEnabled(e){this.formGroup.get("boardPanelEnabled").setValue(e)}get boardPanelOpacity(){return this.formGroup.get("boardPanelOpacity").value}get boardPanelColor(){return this.formGroup.get("boardPanelColor").value}set boardPanelColor(e){this.formGroup.get("boardPanelColor").setValue(e)}get boardCellFontColor(){return this.formGroup.get("boardCellFontColor").value}set boardCellFontColor(e){this.formGroup.get("boardCellFontColor").setValue(e)}get boardMaxHeightEnabled(){return this.formGroup.get("boardMaxHeightEnabled").value}set boardMaxHeightEnabled(e){this.formGroup.get("boardMaxHeightEnabled").setValue(e)}get boardMaxHeightPercent(){return this.formGroup.get("boardMaxHeightPercent").value}get boardFontFamily(){return this.formGroup.get("boardFontFamily").value}get boardFontWeight(){return this.formGroup.get("boardFontWeight").value}get boardFontWeightIsFixed(){return un(this.boardFontFamily)}get showBoardTitle(){return this.formGroup.get("showBoardTitle").value}set showBoardTitle(e){this.formGroup.get("showBoardTitle").setValue(e)}
1get previewBackgroundImageUrl(){return this.previewBackgroundSetting!=="image"?null:this.selectedFilePreview||this.detail.previewBackgroundImage||null}get previewBoardBackgroundColor(){return this.previewBackgroundSetting==="color"?this.previewBackgroundColor:this.formGroup.get("previewDefaultBgColor").value||"#23313B"}isBoardPosition(e,n){return this.boardAlignX===e&&this.boardAlignY===n}setBoardPosition(e,n){this.formGroup.get("boardAlignX").setValue(e),this.formGroup.get("boardAlignY").setValue(n),this.detail.boardAlignX=e,this.detail.boardAlignY=n}clampFrameLayoutValue(e){let n=this.frameLayoutRanges[e],i=this.formGroup.get(e);if(!n||!i)return;let s=i.value,h=s==null||s===""?Number.NaN:Number(s),b=Number.isFinite(h)?Math.min(Math.max(Math.round(h),n.min),n.max):n.fallback;b!==s&&i.setValue(b)}clampFrameLayoutValues(){Object.keys(this.frameLayoutRanges).forEach(e=>this.clampFrameLayoutValue(e))}resetPreviewBackgroundColor(){this.previewBackgroundColor="#23313B",this.detail.previewBackgroundColor="#23313B"}uploadImage(){return S(this,null,function*(){let e=this.modal.open(Ti,{backdrop:"static",keyboard:!1});e.componentInstance.withPreviewUrl=!0,e.componentInstance.showCentralizedFilesButton=!0;try{let n=yield e.result;n&&(this.selectedFile=n.file,this.selectedFilePreview=n.previewUrl)}catch(n){n&&console.error("Error uploading image:",n)}})}fileChangeListener(e){this.selectedFile=e.target.files[0]}saveColorPicker(e,n){this.setColorValue(e,n,"previewBackgroundColor")}saveFontColorPicker(e,n){this.setColorValue(e,n,"previewFontColor")}saveBoardPanelColorPicker(e,n){this.setColorValue(e,n,"boardPanelColor")}saveBoardCellFontColorPicker(e,n){this.setColorValue(e,n,"boardCellFontColor")}setColorValue(e,n,i){if(n!=="preview")return;let s=this.formGroup.get(i);s&&s.setValue(e)}resetPreviewFontColor(){this.previewFontColor=Pt,this.detail.previewFontColor=Pt}resetBoardCellFontColor(){this.boardCellFontColor=Ge,this.detail.boardCellFontColor=Ge}resetBoardPanelColor(){this.boardPanelColor=Ie,this.detail.boardPanelColor=Ie}toggleChangeVal(e,n){this[e]=n,this.detail[e]=n}static{this.\u0275fac=function(n){return new(n||t)(w(he),w(fe,8),w(tt),w(X),w(Ve),w(Ut),w(jt))}}static{this.\u0275cmp=I({type:t,selectors:[["app-external-leaderboard-settings"]],inputs:{detail:"detail",showActions:"showActions"},outputs:{saveComplete:"saveComplete"},features:[Dt],decls:19,vars:4,consts:[["settingsNav","ngbNav"],["nav","ngbNav"],["not",""],[3,"formGroup"],[1,"container-fluid"],[1,"row","mb-2","mt-2"],[1,"col"],[1,"fw-bold"],["ngbNav","","aria-label","External leaderboard settings",1,"nav-tabs",3,"destroyOnHide"],["ngbNavItem","content"],["ngbNavLink",""],["ngbNavContent",""],["ngbNavItem","appearance"],[3,"ngbNavOutlet"],["class","row mt-3",4,"ngIf"],[1,"settings-row"],[1,"settings-row__label"],[1,"settings-row__control"],["role","group","aria-label","Show title",1,"btn-group"],["type","button",1,"btn","btn-light","btn-sm",3,"click"],[1,"form-text","settings-help"],["ngbNav","","aria-label","Leaderboard board",1,"nav-tabs","mt-3",3,"activeId"],["ngbNavItem","events"],["ngbNavLink","","fragment","events"],["ngbNavItem","assets"],["ngbNavLink","","fragment","assets"],[1,"mt-3",3,"ngbNavOutlet"],["role","group","aria-label","Display mode",1,"btn-group"],["class","form-group settings-textarea",4,"ngIf"],[1,"settings-section"],[1,"settings-section__title"],[1,"settings-grid"],["role","group","aria-label","Attendee type",1,"btn-group"],["role","group","aria-label","Company",1,"btn-group"],["role","group","aria-label","Job title",1,"btn-group"],["role","group","aria-label","Points",1,"btn-group"],[1,"form-group","settings-textarea"],["for","displayMessage"],["id","displayMessage","formControlName","displayMessage","rows","3",1,"form-control"],["role","group","aria-label","Team display mode",1,"btn-group"],["role","group","aria-label","Team logo",1,"btn-group"],["role","group","aria-label","Team points",1,"btn-group"],["for","displayMessageTeam"],["id","displayMessageTeam","formControlName","displayMessageTeam","rows","3",1,"form-control"],[1,"appearance-preview"],[3,"bgFitMode","boardWidthMode","boardWidthPercent","boardAlignX","boardAlignY","boardScalePercent","boardPanelEnabled","boardPanelColor","cellFontColor","boardPanelOpacity","showBoardTitle","boardFontFamily","boardFontWeight","boardMaxHeightEnabled","boardMaxHeightPercent","backgroundImageUrl","backgroundColor","fontColor"],[1,"appearance-layout"],["role","tablist","aria-orientation","vertical","aria-label","Appearance settings groups",1,"appearance-rail"],["type","button","role","tab","class","appearance-rail__item",3,"id","click","keydown",4,"ngFor","ngForOf"],[1,"appearance-content"],["role","tabpanel","id","appearance-panel-background","aria-labelledby","appearance-tab-background",1,"appearance-panel",3,"hidden"],["for","previewBackgroun
1dSetting",1,"settings-row__label"],["id","previewBackgroundSetting","formControlName","previewBackgroundSetting",1,"form-select"],[3,"value",4,"ngFor","ngForOf"],[1,"settings-row",3,"hidden"],[3,"saveColor","resetColor","defaultColor","selectedColor"],["class","settings-row",4,"ngIf"],["for","bgFitMode",1,"settings-row__label"],["id","bgFitMode","formControlName","bgFitMode",1,"form-select"],["role","tabpanel","id","appearance-panel-board","aria-labelledby","appearance-tab-board",1,"appearance-panel",3,"hidden"],["for","boardWidthMode",1,"settings-row__label"],["id","boardWidthMode","formControlName","boardWidthMode",1,"form-select"],["id","boardPositionLabel",1,"settings-row__label"],["role","group","aria-labelledby","boardPositionLabel",1,"position-grid"],["type","button","class","position-cell",3,"selected","title","click",4,"ngFor","ngForOf"],["for","boardScalePercent",1,"settings-row__label"],[1,"input-group"],["id","boardScalePercent","type","number","formControlName","boardScalePercent","step","1",1,"form-control",3,"change","blur"],[1,"input-group-text"],["role","group","aria-label","Board max height",1,"btn-group"],["role","tabpanel","id","appearance-panel-text","aria-labelledby","appearance-tab-text",1,"appearance-panel",3,"hidden"],["for","boardFontFamily",1,"settings-row__label"],["id","boardFontFamily","formControlName","boardFontFamily",1,"form-select"],["for","boardFontWeight",1,"settings-row__label"],[1,"settings-row__aside"],["id","boardFontWeight","formControlName","boardFontWeight",1,"form-select"],[3,"ngValue",4,"ngFor","ngForOf"],["role","tabpanel","id","appearance-panel-rows","aria-labelledby","appearance-tab-rows",1,"appearance-panel",3,"hidden"],["role","group","aria-label","Row background",1,"btn-group"],[4,"ngIf"],["type","button","role","tab",1,"appearance-rail__item",3,"click","keydown","id"],[3,"value"],["type","button",1,"btn","btn-success","btn-sm",3,"click"],["for","boardWidthPercent",1,"settings-row__label"],["id","boardWidthPercent","type","number","formControlName","boardWidthPercent","step","1",1,"form-control",3,"change","blur"],["type","button",1,"position-cell",3,"click","title"],[1,"position-dot"],["for","boardMaxHeightPercent",1,"settings-row__label"],["id","boardMaxHeightPercent","type","number","formControlName","boardMaxHeightPercent","step","1",1,"form-control",3,"change","blur"],[3,"ngValue"],["for","boardPanelOpacity",1,"settings-row__label"],["id","boardPanelOpacity","type","number","formControlName","boardPanelOpacity","step","1",1,"form-control",3,"change","blur"],[1,"row","mt-3"],[1,"col","d-flex","justify-content-end"],[1,"btn","btn-primary",3,"click","disabled"],[4,"ngIf","ngIfElse"],[1,"spinner-grow","spinner-grow-sm","me-1"]],template:function(n,i){if(n&1&&(a(0,"form",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"h6",7),r(5,"External leaderboard page setting"),o()()(),a(6,"div",6)(7,"nav",8,0),M(9,9),a(10,"a",10),r(11,"Content"),o(),f(12,fo,23,12,"ng-template",11),E(),M(13,12),a(14,"a",10),r(15,"Appearance"),o(),f(16,Oo,92,60,"ng-template",11),E(),o(),_(17,"div",13),o()(),f(18,Do,6,3,"div",14),o()),n&2){let s=W(8);m("formGroup",i.formGroup),l(7),m("destroyOnHide",!1),l(10),m("ngbNavOutlet",s),l(),m("ngIf",i.showActions)}},dependencies:[q,ge,Ze,et,ne,Qe,Je,oe,pe,ae,ue,_e,Di,te,me,ot,nt,rt,at,it,lt,_n,ie],styles:["[_nghost-%COMP%]{--settings-control-width: 12rem;display:block;font-size:var(--cnp-font-size-label, 13px)}[_nghost-%COMP%]   label[_ngcontent-%COMP%], [_nghost-%COMP%]   .form-select[_ngcontent-%COMP%], [_nghost-%COMP%]   .form-control[_ngcontent-%COMP%], [_nghost-%COMP%]   .input-group-text[_ngcontent-%COMP%], [_nghost-%COMP%]   .nav-tabs[_ngcontent-%COMP%]   .nav-link[_ngcontent-%COMP%]{font-size:var(--cnp-font-size-label, 13px)}[_nghost-%COMP%]   .form-text[_ngcontent-%COMP%]{font-size:12px}.settings-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1.25rem;padding:.4rem 0}.settings-row[hidden][_ngcontent-%COMP%]{display:none}.settings-row__label[_ngcontent-%COMP%]{flex:1 1 7rem;min-width:0;margin-bottom:0;font-size:var(--cnp-font-size-label, 13px)}.settings-row__aside[_ngcontent-%COMP%]{margin-left:.25rem;color:var(--bs-secondary-color, #6c757d);font-size:var(--cnp-font-size-pill, 11px);font-weight:400}.settings-row__control[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;width:var(--settings-control-width);min-width:0}.settings-row__control[_ngcontent-%COMP%] > .form-select[_ngcontent-%COMP%], .settings-row__control[_ngcontent-%COMP%] > .input-group[_ngcontent-%COMP%], .settings-row__control[_ngcontent-%COMP%] > .btn-group[_ngcontent-%COMP%], .settings-row__control[_ngcontent-%COMP%] > .position-grid[_ngcontent-%COMP%], .settings-row__control[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%], .settings-row__control[_ngcontent-%COMP%] > app-color-picker[_ngcontent-%COMP%]{width:100%;max-width:100%}.settings-row__control[_ngcontent-%COMP%] > app-color-picker[_ngcontent-%COMP%]{display:block}.settings-row__control[_ngcontent-%COMP%] > .btn-group[_ngcontent-%COMP%] > .btn[_ngcontent-%COMP%]{flex:1 1 0;min-width:0}.settings-help[_ngcontent-%COMP%]{margin-top:-.15rem;margin-bottom:.35rem;max-width:34rem}.settings-textarea[_ngcontent-%COMP%]{margin:.5rem 0 .25rem}.settings-column[_ngcontent-%COMP%] + .settings-column[_ngcontent-%COMP%]{margin-top:1.25rem}@media (min-width: 992px){.settings-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:2.5rem}.settings-column[_ngcontent-%COMP%] + .settings-column[_ngcontent-%COMP%]{margin-top:0}}.settings-row__control[_ngcontent-%COMP%]     .branding-colors{flex-wrap:nowrap;align-items:center;gap:.5rem;width:100%}.settings-row__control[_ngcontent-%COMP%]     .branding-colors .pickr{flex:0 0 auto;margin:0}.settings-row__control[_ngcontent-%COMP%]     .branding-colors .pcr-button{width:1.75rem;height:1.75rem}.settings-row__control[_ngcontent-%COMP%]     .branding-colors .branding-color-value{flex:1 1 auto;min-width:0;margin:0;top:0;padding:.25rem .5rem;font-size:var(--cnp-font-size-pill, 11px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-row__control[_ngcontent-%COMP%]     .branding-colors .btn{flex:0 0 auto}.settings-section[_ngcontent-%COMP%]{margin-top:1.25rem}.settings-section[_ngcontent-%COMP%]:first-child{margin-top:0}.settings-section__title[_ngcontent-%COMP%]{margin:0 0 .5rem;padding-bottom:.5rem;border-bottom:1px solid var(--bs-border-color, #dee2e6);font-size:var(--cnp-font-size-label, 13px);font-weight:700}.appearance-layout[_ngcontent-%COMP%]{display:block}.appearance-rail[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;gap:.25rem;margin-bottom:1rem}.appearance-rail__item[_ngcontent-%COMP%]{appearance:none;padding:.4rem .65rem;border:0;border-radius:.25rem;background-color:transparent;color:var(--bs-secondary-color, #6c757d);font-size:var(--cnp-font-size-label, 13px);line-height:1.4;text-align:left;white-space:nowrap;cursor:pointer}.appearance-rail__item[_ngcontent-%COMP%]:hover{background-color:var(--bs-tertiary-bg, #f8f9fa);color:var(--bs-body-color, #212529)}.appearance-rail__item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:1px}.appearance-rail__item[aria-selected=true][_ngcontent-%COMP%]{background-color:var(--bs-tertiary-bg, #f1f3f5);color:var(--bs-body-color, #212529);font-weight:700}.appearance-panel[hidden][_ngcontent-%COMP%]{display:none}.appearance-preview[_ngcontent-%COMP%]{max-width:36rem;margin-bottom:1rem}.appearance-panel[_ngcontent-%COMP%]   .settings-row[_ngcontent-%COMP%]{max-width:25rem}@media (min-width: 992px){.appearance-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:9rem minmax(0,1fr);column-gap:2rem;align-items:start}.appearance-rail[_ngcontent-%COMP%]{flex-direction:column;flex-wrap:nowrap;gap:.125rem;margin-bottom:0}}.position-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,2.25rem);gap:.25rem}.position-grid[_ngcontent-%COMP%]   .position-cell[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:0;line-height:1;border:1px solid var(--bs-border-color, #ced4da);border-radius:.25rem;background-color:var(--bs-body-bg, #ffffff);color:var(--bs-secondary-color, #6c757d)}.position-grid[_ngcontent-%COMP%]   .position-cell[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:1px}.position-grid[_ngcontent-%COMP%]   .position-cell.selected[_ngcontent-%COMP%]{border-color:var(--bs-success, #198754);background-color:var(--bs-success, #198754);color:#fff}.position-grid[_ngcontent-%COMP%]   .position-cell[_ngcontent-%COMP%]   .position-dot[_ngcontent-%COMP%]{display:block;width:.5rem;height:.5rem;border-radius:50%;background-color:currentColor}"]})}}return t})();var Xo=(t,d)=>d.timestamp;
1function Yo(t,d){if(t&1&&_(0,"img",7),t&2){let e=c();m("src",e.attendee.photoId,de)("alt",e.attendeeName)}}function Qo(t,d){if(t&1&&(a(0,"span",8),r(1),o()),t&2){let e=c();l(),k(e.attendeeInitials)}}function Jo(t,d){if(t&1&&(a(0,"span",11),r(1),o()),t&2){let e=c();l(),k(e.attendee.company)}}function Zo(t,d){t&1&&(a(0,"th",40),r(1,"Activity"),o())}function ea(t,d){if(t&1&&(a(0,"td",41)(1,"div",42)(2,"span",43),r(3),o()()()),t&2){let e=d.$implicit;v("revoked-text",e.revoked),l(3),k(e.activity)}}function ta(t,d){t&1&&(a(0,"th",40),r(1,"Timestamp"),o())}function ia(t,d){if(t&1&&(a(0,"td",41),r(1),N(2,"dateFormat"),o()),t&2){let e=d.$implicit;v("revoked-text",e.revoked),l(),L(" ",A(2,3,e.dateCreated)," ")}}function na(t,d){t&1&&(a(0,"th",44),r(1,"Points"),o())}function oa(t,d){if(t&1&&(a(0,"td",45)(1,"span",46),r(2),o()()),t&2){let e=d.$implicit;l(),v("points-badge-revoked",e.revoked),l(),L(" ",e.points," ")}}function aa(t,d){t&1&&(a(0,"th",40),r(1,"Status"),o())}function ra(t,d){if(t&1&&(a(0,"span",47),r(1," Revoked "),_(2,"i",49),o()),t&2){let e=c().$implicit,n=c(2);m("ngbTooltip",n.getAuditTooltip(e))}}function la(t,d){t&1&&(a(0,"span",48),r(1,"Active"),o())}function sa(t,d){if(t&1&&(a(0,"td",41),O(1,ra,3,1,"span",47)(2,la,2,0,"span",48),o()),t&2){let e=d.$implicit;l(),F(e.revoked?1:2)}}function da(t,d){t&1&&_(0,"th",50)}function ca(t,d){if(t&1){let e=C();a(0,"td",41)(1,"button",51),p("click",function(){let i=g(e).$implicit,s=c(2);return u(s.openRevokeModal(i))}),_(2,"i",52),o()()}if(t&2){let e=d.$implicit;l(),G("aria-label",e.revoked?"Manage revoked point":"Revoke point"),l(),v("bi-pencil",!e.revoked)("bi-arrow-counterclockwise",e.revoked)}}function ma(t,d){t&1&&_(0,"tr",53)}function pa(t,d){if(t&1&&_(0,"tr",54),t&2){let e=d.$implicit;v("revoked-row",e.revoked)}}function ga(t,d){t&1&&(a(0,"div",39),_(1,"mat-spinner",55),o())}function ua(t,d){t&1&&(a(0,"div",39)(1,"p",56),r(2,"No activity yet."),o()())}function _a(t,d){if(t&1){let e=C();a(0,"div",19)(1,"div",20)(2,"div",21)(3,"div",22)(4,"button",23),p("click",function(){g(e);let i=c();return u(i.export())}),_(5,"i",24),r(6," Export "),o()()()()(),a(7,"table",25),M(8,26),f(9,Zo,2,0,"th",27)(10,ea,4,3,"td",28),E(),M(11,29),f(12,ta,2,0,"th",27)(13,ia,3,5,"td",28),E(),M(14,30),f(15,na,2,0,"th",31)(16,oa,3,3,"td",32),E(),M(17,33),f(18,aa,2,0,"th",27)(19,sa,3,1,"td",34),E(),M(20,35),f(21,da,1,0,"th",36)(22,ca,3,5,"td",34),E(),f(23,ma,1,0,"tr",37)(24,pa,1,2,"tr",38),o(),O(25,ga,2,0,"div",39),O(26,ua,3,0,"div",39)}if(t&2){let e=c();l(7),m("dataSource",e.attendeeProgressDataSource),l(16),m("matHeaderRowDef",e.displayedColumns),l(),m("matRowDefColumns",e.displayedColumns),l(),F(e.isLoading?25:-1),l(),F(!e.isLoading&&(!e.attendeeProgressData||e.attendeeProgressData.length===0)?26:-1)}}function ha(t,d){if(t&1&&(a(0,"div",77)(1,"div",78),_(2,"i",52),a(3,"strong"),r(4),o(),a(5,"span",79),r(6),o(),a(7,"span",79),r(8),o()(),a(9,"div",80),r(10),o()()),t&2){let e=d.$implicit,n=c(3);v("audit-revoke",e.action==="revoke")("audit-restore",e.action==="restore"),l(2),v("bi-x-circle",e.action==="revoke")("bi-arrow-counterclockwise",e.action==="restore"),l(2),k(e.action==="revoke"?"Revoked":"Restored"),l(2),L("by ",e.adminName),l(2),k(n.formatAuditDate(e.timestamp)),l(2),L('"',e.comment,'"')}}function fa(t,d){if(t&1&&(a(0,"div",65)(1,"h6",75),r(2,"Audit trail"),o(),$e(3,ha,11,12,"div",76,Xo),o()),t&2){let e=c(2);l(3),ze(e.auditTrailForTarget)}}function ba(t,d){t&1&&(a(0,"small",70),r(1,"A comment is required."),o())}function va(t,d){t&1&&(a(0,"small",70),r(1,"Comment must be at least 3 characters."),o())}function xa(t,d){t&1&&_(0,"span",82)}function Ca(t,d){if(t&1){let e=C();a(0,"button",81),p("click",function(){g(e);let i=c(2);return u(i.submitRevoke())}),O(1,xa,1,0,"span",82),_(2,"i",83),r(3,"Revoke points "),o()}if(t&2){let e=c(2);
1m("disabled",e.revokeForm.invalid||e.isSubmitting),l(),F(e.isSubmitting?1:-1)}}function wa(t,d){t&1&&_(0,"span",82)}function ya(t,d){if(t&1){let e=C();a(0,"button",84),p("click",function(){g(e);let i=c(2);return u(i.submitRestore())}),O(1,wa,1,0,"span",82),_(2,"i",85),r(3,"Restore points "),o()}if(t&2){let e=c(2);m("disabled",e.revokeForm.invalid||e.isSubmitting),l(),F(e.isSubmitting?1:-1)}}function Sa(t,d){if(t&1){let e=C();a(0,"div",16)(1,"div",57)(2,"button",58),p("click",function(){g(e);let i=c();return u(i.closeRevokeModal())}),_(3,"i",59),r(4,"Back to list "),o(),a(5,"h5",60),r(6),o()(),a(7,"div",61)(8,"div",62)(9,"span",63),r(10,"Activity"),o(),a(11,"span",64),r(12),o()(),a(13,"div",62)(14,"span",63),r(15,"Points"),o(),a(16,"span",64),r(17),o()(),a(18,"div",62)(19,"span",63),r(20,"Date"),o(),a(21,"span",64),r(22),N(23,"dateFormat"),o()()(),O(24,fa,5,0,"div",65),a(25,"form",66)(26,"div",67)(27,"label",68),r(28),o(),_(29,"textarea",69),O(30,ba,2,0,"small",70),O(31,va,2,0,"small",70),o(),a(32,"div",71),O(33,Ca,4,2,"button",72)(34,ya,4,2,"button",73),a(35,"button",74),p("click",function(){g(e);let i=c();return u(i.closeRevokeModal())}),r(36," Cancel "),o()()()()}if(t&2){let e,n,i=c();l(6),k(i.modalTitle),l(6),k(i.revokeTarget==null?null:i.revokeTarget.activity),l(5),k(i.revokeTarget==null?null:i.revokeTarget.points),l(5),k(A(23,12,i.revokeTarget==null?null:i.revokeTarget.dateCreated)),l(2),F(i.auditTrailForTarget.length>0?24:-1),l(),m("formGroup",i.revokeForm),l(3),L(" ",i.isRevocation?"Reason for revocation":"Reason for action"," "),l(),m("placeholder",i.isRevocation?"Please explain why these points are being revoked...":"Please explain why these points are being restored..."),l(),F((e=i.revokeForm.get("comment"))!=null&&e.touched&&((e=i.revokeForm.get("comment"))!=null&&e.hasError("required"))?30:-1),l(),F((n=i.revokeForm.get("comment"))!=null&&n.touched&&((n=i.revokeForm.get("comment"))!=null&&n.hasError("minlength"))?31:-1),l(2),F(i.isRevocation?33:34),l(2),m("disabled",i.isSubmitting)}}var ft=(()=>{class t{get isRevocation(){return!this.revokeTarget?.revoked}get modalTitle(){return this.isRevocation?"Revoke points":"Manage revoked points"}get auditTrailForTarget(){return this.revokeTarget?.auditTrail||[]}get attendeeName(){if(!this.attendee)return"";let e=`${this.attendee.firstName||""} ${this.attendee.lastName||""}`.trim();return this.attendee.nickName?`${e} (${this.attendee.nickName})`:e}get attendeeInitials(){return(this.attendee?.firstName?.charAt(0)||"")+(this.attendee?.lastName?.charAt(0)||"")}get activityCount(){return this.attendeeProgressData.length}constructor(e,n,i,s,h,b,x){this.gamificationService=e,this.csvDownloadService=n,this.eventService=i,this.toast=s,this.dateFormatPipe=h,this.activeModal=b,this.formBuilder=x,this.attendee=null,this.attendeeProgressDataSource=new Fe([]),this.displayedColumns=["activity","timestamp","points","status","actions"],this.isLoading=!1,this.attendeeProgressData=[],this.totalScore=0,this.destroy$=new Mt,this.showRevokeModal=!1,this.revokeForm=null,this.revokeTarget=null,this.isSubmitting=!1}ngOnInit(){this.isLoading=!0,this.gamificationService.loadAttendeeProgress(null),this.gamificationService.loadAttendeeProgress(this.attendeePK),this.dateFormat=this.eventService.data.dateformat,this.gamificationService.attendeeProgressSubject$.pipe(Ft(this.destroy$)).subscribe(e=>{this.isLoading=!1,e?.points?(this.attendeeProgressData=e.points,this.attendeeProgressDataSource.data=e.points,this.totalScore=e.score??0):(this.attendeeProgressData=[],this.attendeeProgressDataSource.data=[],this.totalScore=0)})}ngAfterViewInit(){this.attendeeProgressDataSource.sort=this.sort,this.attendeeProgressDataSource.sortingDataAccessor=(e,n)=>{switch(n){case"timestamp":return new Date(e.dateCreated).getTime();case"points":return Number(e.points)||0;case"status":return e.revoked?1:0;case"activity":return e.activity||"";default:return""}}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}openRevokeModal(e){this.revokeTarget=e,this.revokeForm=this.formBuilder.group({comment:["",[B.required,B.minLength(3),B.pattern(/\S/)]]}),this.showRevokeModal=!0}closeRevokeModal(){this.showRevokeModal=!1,this.revokeTarget=null,this.revokeForm=null}submitRevoke(){return S(this,null,function*(){yield this.submitAction((e,n,i)=>this.gamificationService.revokePoint(e,n,i),"Points revoked successfully.","Failed to revoke points.")})}submitRestore(){return S(this,null,function*(){yield this.submitAction((e,n,i)=>this.gamificationService.restorePoint(e,n,i),"Points restored successfully.","Failed to restore points.")})}submitAction(e,n,i){return S(this,null,function*(){if(!this.revokeForm||this.revokeForm.invali
1d||!this.revokeTarget?.SK)return;this.isSubmitting=!0;let s=this.revokeForm.get("comment").value.trim(),h=this.revokeTarget.SK;try{yield e(this.attendeePK,h,s),this.toast.showSuccess("Success",n),this.closeRevokeModal(),this.reloadProgress()}catch{this.toast.showDanger("Error",i)}finally{this.isSubmitting=!1}})}formatAuditDate(e){return this.dateFormatPipe.transform(e,!0,!1,this.dateFormat)}getAuditTooltip(e){let n=e.auditTrail?.length?[...e.auditTrail].reverse().find(i=>i.action==="revoke"):null;return n?`Revoked by ${n.adminName} on ${this.formatAuditDate(n.timestamp)} \u2014 "${n.comment}"`:`Revoked by ${e.revokedBy||"Unknown"}`}reloadProgress(){this.isLoading=!0,this.gamificationService.loadAttendeeProgress(this.attendeePK),this.gamificationService.load(!0)}findLatestAction(e,n){return e.auditTrail?.length&&[...e.auditTrail].reverse().find(i=>i.action===n)||null}export(){return S(this,null,function*(){let n=(this.gamificationService.attendeeProgressSubject$.value?.points||[]).map(s=>this.buildExportRow(s));if(!n?.length){this.toast.showDanger("Error","Nothing to export.");return}let i=["activity","timestamp","points","eventId","revoked","revokedBy","revokedAt","restored","restoredBy","restoredAt","comment"];this.csvDownloadService.fromJsonList(`gamification_points_${this.attendeePK}`,n,i)})}buildExportRow(e){let n=e.revoked?null:this.findLatestAction(e,"restore"),i=e.revoked?this.findLatestAction(e,"revoke"):null;return Z(V({},e),{activity:e.revoked?`Revoked: ${e.activity}`:e.activity,timestamp:this.dateFormatPipe.transform(e.dateCreated,!0,!1,R.DATEFORMAT_ISO),revoked:e.revoked?"Yes":"No",revokedBy:e.revoked&&(i?.adminName||e.revokedBy)||"",revokedAt:e.revoked&&e.revokedAt?this.dateFormatPipe.transform(e.revokedAt,!0,!1,R.DATEFORMAT_ISO):"",restored:n?"Yes":"No",restoredBy:n?.adminName||"",restoredAt:n?this.dateFormatPipe.transform(n.timestamp,!0,!1,R.DATEFORMAT_ISO):"",comment:e.revoked?e.revokedComment||"":n?.comment||""})}static{this.\u0275fac=function(n){return new(n||t)(w(X),w(mt),w(dt),w(ct),w(R),w(fe),w(he))}}static{this.\u0275cmp=I({type:t,selectors:[["app-view-progress"]],viewQuery:function(n,i){if(n&1&&j(J,5),n&2){let s;U(s=K())&&(i.sort=s.first)}},decls:31,vars:7,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"attendee-summary","mb-3"],[1,"attendee-identity"],["loading","lazy",1,"attendee-avatar",3,"src","alt"],[1,"attendee-avatar","attendee-avatar-initials"],[1,"attendee-meta"],[1,"attendee-name"],[1,"attendee-company"],[1,"summary-tiles"],[1,"summary-tile"],[1,"tile-value"],[1,"tile-label"],[1,"revoke-panel"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],[1,"table-toolbar","mb-3"],[1,"toolbar-row"],[1,"toolbar-right","ms-auto"],[1,"toolbar-controls"],[1,"btn","btn-primary",3,"click"],[1,"bi","bi-download"],["mat-table","","matSort","",1,"data-table",3,"dataSource"],["matColumnDef","activity"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"revoked-text",4,"matCellDef"],["matColumnDef","timestamp"],["matColumnDef","points"],["mat-header-cell","","mat-sort-header","","class","text-end",4,"matHeaderCellDef"],["mat-cell","","class","text-end",4,"matCellDef"],["matColumnDef","status"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"revoked-row",4,"matRowDef","matRowDefColumns"],[1,"text-center","py-4"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"activity-cell"],[1,"activity-name"],["mat-header-cell","","mat-sort-header","",1,"text-end"],["mat-cell","",1,"text-end"],[1,"points-badge"],["aria-label","Revocation details",1,"status-pill","status-revoked",3,"ngbTooltip"],[1,"status-pill","status-active"],[1,"bi","bi-info-circle","audit-info-icon"],["mat-header-cell",""],[1,"btn","btn-sm","btn-action",3,"click"],[1,"bi"],["mat-header-row",""],["mat-row",""],["diameter","30",1,"mx-auto"],[1,"text-muted"],[1,"revoke-panel-header"],[1,"btn","btn-sm","btn-link","text-secondary","p-0",3,"click"],[1,"bi","bi-arrow-left","me-1"],[1,"mt-2","mb-3"],[1,"revoke-detail-card","mb-3"],[1,"detail-row"],[1,"detail-label"],[1,"detail-value"],[1,"audit-trail","mb-3"],[3,"formGroup"],[1,"mb-3"],["for","revokeComment",1,"form-label","fw-bold"],["
1id","revokeComment","formControlName","comment","rows","3",1,"form-control",3,"placeholder"],[1,"text-danger"],[1,"d-flex","gap-2"],["type","button",1,"btn","btn-danger",3,"disabled"],["type","button",1,"btn","btn-success",3,"disabled"],["type","button",1,"btn","btn-secondary",3,"click","disabled"],[1,"mb-2"],[1,"audit-entry",3,"audit-revoke","audit-restore"],[1,"audit-entry"],[1,"audit-action"],[1,"text-muted","ms-1"],[1,"audit-comment"],["type","button",1,"btn","btn-danger",3,"click","disabled"],[1,"spinner-grow","spinner-grow-sm","me-1"],[1,"bi","bi-x-circle","me-1"],["type","button",1,"btn","btn-success",3,"click","disabled"],[1,"bi","bi-arrow-counterclockwise","me-1"]],template:function(n,i){n&1&&(a(0,"div",0)(1,"h4",1),r(2,"Attendee progress"),o(),a(3,"button",2),p("click",function(){return i.activeModal.dismiss()}),a(4,"span",3),r(5,"\xD7"),o()()(),a(6,"div",4)(7,"div",5)(8,"div",6),O(9,Yo,1,2,"img",7)(10,Qo,2,1,"span",8),a(11,"div",9)(12,"span",10),r(13),o(),O(14,Jo,2,1,"span",11),o()(),a(15,"div",12)(16,"div",13)(17,"span",14),r(18),o(),a(19,"span",15),r(20,"Total points"),o()(),a(21,"div",13)(22,"span",14),r(23),o(),a(24,"span",15),r(25,"Activities"),o()()()(),O(26,_a,27,5),O(27,Sa,37,14,"div",16),o(),a(28,"div",17)(29,"button",18),p("click",function(){return i.activeModal.dismiss()}),r(30,"Close"),o()()),n&2&&(l(9),F(i.attendee!=null&&i.attendee.photoId?9:10),l(4),k(i.attendeeName),l(),F(i.attendee!=null&&i.attendee.company?14:-1),l(4),k(i.totalScore),l(5),k(i.activityCount),l(3),F(i.showRevokeModal?-1:26),l(),F(i.showRevokeModal?27:-1))},dependencies:[Ce,J,Se,ye,Pe,xe,we,ke,Me,Te,Ee,Oe,be,st,q,ge,ne,oe,pe,ae,ue,_e,R],styles:[".attendee-summary[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:16px;background:#f8f9fa;border-radius:8px}.attendee-summary[_ngcontent-%COMP%]   .attendee-identity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.attendee-summary[_ngcontent-%COMP%]   .attendee-avatar[_ngcontent-%COMP%]{width:44px;height:44px;border-radius:50%;object-fit:cover;flex-shrink:0}.attendee-summary[_ngcontent-%COMP%]   .attendee-avatar-initials[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;background-color:#144673;color:#fff;font-weight:600;font-size:16px;text-transform:uppercase}.attendee-summary[_ngcontent-%COMP%]   .attendee-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column}.attendee-summary[_ngcontent-%COMP%]   .attendee-name[_ngcontent-%COMP%]{font-weight:600;font-size:15px}.attendee-summary[_ngcontent-%COMP%]   .attendee-company[_ngcontent-%COMP%]{color:#495057;font-size:13px}.attendee-summary[_ngcontent-%COMP%]   .summary-tiles[_ngcontent-%COMP%]{display:flex;gap:12px}.attendee-summary[_ngcontent-%COMP%]   .summary-tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;min-width:80px;padding:8px 16px;background:#fff;border:1px solid #e9ecef;border-radius:8px}.attendee-summary[_ngcontent-%COMP%]   .tile-value[_ngcontent-%COMP%]{font-weight:700;font-size:20px;color:#144673}.attendee-summary[_ngcontent-%COMP%]   .tile-label[_ngcontent-%COMP%]{font-size:11px;text-transform:uppercase;letter-spacing:.3px;color:#495057}.audit-info-icon[_ngcontent-%COMP%]{margin-left:4px;font-size:13px;opacity:.7;transition:opacity .15s}.table-toolbar[_ngcontent-%COMP%]   .toolbar-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%}.table-toolbar[_ngcontent-%COMP%]   .toolbar-row[_ngcontent-%COMP%]   .toolbar-right[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:auto}.table-toolbar[_ngcontent-%COMP%]   .toolbar-row[_ngcontent-%COMP%]   .toolbar-right[_ngcontent-%COMP%]   .toolbar-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#f8f9fa;padding:12px 16px;font-weight:600;color:#495057;text-align:left;font-size:14px;border-bottom:2px solid #e9ecef;-webkit-user-select:none;user-select:none}.data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px;border-bottom:1px solid #e9ecef;font-size:14px}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{transition:background .2s}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#f8f9fa}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.revoked-row[_ngcontent-%COMP%]{background:#fdf2f2}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.revoked-row[_ngcontent-%COMP%]:hover{background:#f9e4e4}
1.activity-cell[_ngcontent-%COMP%]   .activity-name[_ngcontent-%COMP%]{font-weight:500}.revoked-text[_ngcontent-%COMP%]{opacity:.6}.points-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 8px;background-color:#144673;color:#fff;border-radius:12px;font-size:12px;font-weight:600;min-width:30px;text-align:center}.points-badge-revoked[_ngcontent-%COMP%]{background-color:#6c757d;text-decoration:line-through}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:3px 10px;border-radius:12px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.3px;cursor:default}.status-revoked[_ngcontent-%COMP%]{background-color:#dc35451a;color:#dc3545;cursor:help}.status-revoked[_ngcontent-%COMP%]:hover   .audit-info-icon[_ngcontent-%COMP%]{opacity:1}.status-active[_ngcontent-%COMP%]{background-color:#1987541a;color:#198754}.btn-action[_ngcontent-%COMP%]{opacity:0;transition:opacity .15s;padding:4px 8px;color:#495057;border:none;background:none}.btn-action[_ngcontent-%COMP%]:hover{color:#144673;background-color:#14467314;border-radius:4px}tr[_ngcontent-%COMP%]:hover   .btn-action[_ngcontent-%COMP%], .btn-action[_ngcontent-%COMP%]:focus{opacity:1}.text-center[_ngcontent-%COMP%]{text-align:center}.revoke-panel[_ngcontent-%COMP%]   .revoke-panel-header[_ngcontent-%COMP%]{margin-bottom:8px}.revoke-detail-card[_ngcontent-%COMP%]{background:#f8f9fa;border-radius:8px;padding:16px}.revoke-detail-card[_ngcontent-%COMP%]   .detail-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #e9ecef}.revoke-detail-card[_ngcontent-%COMP%]   .detail-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.revoke-detail-card[_ngcontent-%COMP%]   .detail-label[_ngcontent-%COMP%]{font-weight:600;color:#495057;font-size:13px}.revoke-detail-card[_ngcontent-%COMP%]   .detail-value[_ngcontent-%COMP%]{font-size:13px}.audit-trail[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{color:#495057;font-size:13px;text-transform:uppercase;letter-spacing:.5px}.audit-entry[_ngcontent-%COMP%]{padding:10px 12px;border-left:3px solid #e9ecef;margin-bottom:8px;font-size:13px}.audit-entry.audit-revoke[_ngcontent-%COMP%]{border-left-color:#dc3545}.audit-entry.audit-restore[_ngcontent-%COMP%]{border-left-color:#198754}.audit-action[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.audit-comment[_ngcontent-%COMP%]{color:#495057;font-style:italic;margin-top:4px;padding-left:20px}"]})}}return t})();var Pa=()=>[25,50,100,150,200,300,500];function ka(t,d){t&1&&(a(0,"th",26),r(1,"Rank"),o())}function Ma(t,d){if(t&1&&(a(0,"td",27)(1,"div",28)(2,"span"),r(3),o()()()),t&2){let e=d.$implicit,n=c();l(),m("ngClass",n.getRankClass(e.rank)),l(2),k(e.rank)}}function Ea(t,d){t&1&&(a(0,"th",26),r(1,"Team"),o())}function Ta(t,d){if(t&1&&_(0,"img",32),t&2){let e=c().$implicit;m("alt",Bt("Team logo for ",e.name))("src",e.logo,de)}}function Oa(t,d){t&1&&(a(0,"div",33),_(1,"i",34),o())}function Fa(t,d){if(t&1&&(a(0,"td",27)(1,"div",29),f(2,Ta,1,3,"img",30)(3,Oa,2,0,"ng-template",null,0,ee),a(5,"div",31),r(6),o()()()),t&2){let e=d.$implicit,n=W(4);l(2),m("ngIf",e.logo)("ngIfElse",n),l(4),L(" ",e.name," ")}}function La(t,d){t&1&&(a(0,"th",35),r(1,"Target attendees"),o())}function Da(t,d){if(t&1&&(a(0,"td",27),_(1,"app-target-attendees",36),o()),t&2){let e=d.$implicit;l(),m("data",e.target)("withUpdate",!1)("showLabel",!1)}}function Va(t,d){t&1&&(a(0,"th",37),r(1,"Points"),o())}function Na(t,d){if(t&1&&(a(0,"td",38)(1,"span",39),r(2),o()()),t&2){let e=d.$implicit;l(2),k(e.points)}}function Aa(t,d){t&1&&_(0,"tr",40)}function Ia(t,d){t&1&&_(0,"tr",41)}function Ga(t,d){t&1&&_(0,"mat-spinner",42)}function Ba(t,d){t&1&&(a(0,"div",43)(1,"div",44),_(2,"i",45),a(3,"h6"),r(4,"No teams yet"),o(),a(5,"p",46),r(6,"Teams will appear here once they are created."),o()()())}var bt=(()=>{class t{constructor(e){this.gamificationService=e,this.columns=["rank","name","target","points"],this.isLoading=!1,this.dataSource=new Fe([])}ngOnInit(){this.dataSource$=this.gamificationService.teamLeaderboardObservable$.pipe(Re(e=>{this.isLoading=!1;let n=this.dataSource,i=e.map(s=>Z(V({}
1,s),{points:s.points?s.points.toLocaleString():0}));return n.data=i,n})),this.gamificationService.loadTeamLeaderboard(!0)}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}filter(e){let n=e.target.value;this.dataSource.filter=n.trim().toLowerCase(),this.paginator.firstPage()}getRankClass(e){return e===1?"rank-first":e===2?"rank-second":e===3?"rank-third":"rank-default"}static{this.\u0275fac=function(n){return new(n||t)(w(X))}}static{this.\u0275cmp=I({type:t,selectors:[["app-team-leaderboard"]],viewQuery:function(n,i){if(n&1&&(j(ve,5),j(J,5)),n&2){let s;U(s=K())&&(i.paginator=s.first),U(s=K())&&(i.sort=s.first)}},decls:29,vars:9,consts:[["noLogo",""],[1,"table-section"],[1,"table-toolbar","mt-2"],[1,"toolbar-row"],[1,"toolbar-right"],[1,"toolbar-controls"],[1,"search-container"],[1,"bi","bi-search","search-icon"],["type","text","placeholder","Search teams...",1,"search-input",3,"keyup"],["mat-table","","matSort","","matSortActive","rank","matSortDirection","asc",1,"data-table",3,"dataSource"],["matColumnDef","rank"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","target"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","points"],["mat-header-cell","","mat-sort-header","","style","text-align: right",4,"matHeaderCellDef"],["mat-cell","","style","text-align: right",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mx-auto my-5","diameter","40",4,"ngIf"],["class","empty-state",4,"ngIf"],[1,"pagination-container"],[1,"pagination-controls"],["showFirstLastButtons","",3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"rank-badge",3,"ngClass"],[1,"team-info"],["class","team-logo-img team-avatar","loading","lazy",3,"src","alt",4,"ngIf","ngIfElse"],[1,"team-name"],["loading","lazy",1,"team-logo-img","team-avatar",3,"src","alt"],[1,"team-logo-placeholder","team-avatar"],[1,"bi","bi-image"],["mat-header-cell",""],["emptyText","All attendees",3,"data","withUpdate","showLabel"],["mat-header-cell","","mat-sort-header","",2,"text-align","right"],["mat-cell","",2,"text-align","right"],[1,"points-badge"],["mat-header-row",""],["mat-row",""],["diameter","40",1,"mx-auto","my-5"],[1,"empty-state"],[1,"empty-state-content"],[1,"bi","bi-people","empty-state-icon"],[1,"text-muted"]],template:function(n,i){n&1&&(a(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),_(6,"i",7),a(7,"input",8),p("keyup",function(h){return i.filter(h)}),o()()()()()(),a(8,"table",9),N(9,"async"),M(10,10),f(11,ka,2,0,"th",11)(12,Ma,4,2,"td",12),E(),M(13,13),f(14,Ea,2,0,"th",11)(15,Fa,7,3,"td",12),E(),M(16,14),f(17,La,2,0,"th",15)(18,Da,2,3,"td",12),E(),M(19,16),f(20,Va,2,0,"th",17)(21,Na,3,1,"td",18),E(),f(22,Aa,1,0,"tr",19)(23,Ia,1,0,"tr",20),o(),f(24,Ga,1,0,"mat-spinner",21)(25,Ba,7,0,"div",22),a(26,"div",23)(27,"div",24),_(28,"mat-paginator",25),o()()()),n&2&&(l(8),m("dataSource",A(9,6,i.dataSource$)),l(14),m("matHeaderRowDef",i.columns),l(),m("matRowDefColumns",i.columns),l(),m("ngIf",i.isLoading),l(),m("ngIf",!i.isLoading&&!i.dataSource.data.length),l(3),m("pageSizeOptions",Xe(8,Pa)))},dependencies:[Ce,J,Se,ye,Pe,xe,we,ke,Ye,te,Hi,Me,Te,Ee,Oe,be,ve,ie],styles:[".table-section[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014;overflow:hidden}.table-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:16px 24px;border-bottom:1px solid #e9ecef;transition:all .3s}.toolbar-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:16px;flex-wrap:wrap}.toolbar-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.toolbar-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.search-container[_ngcontent-%COMP%]{position:relative;width:250px;
1min-width:200px}.search-input[_ngcontent-%COMP%]{width:100%;padding:10px 16px 10px 40px;border:1px solid #dee2e6;border-radius:6px;background-color:#fff;font-size:14px;transition:all .2s}.search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#144673;box-shadow:0 0 0 .2rem #0e1e3240}.search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#6c757d;font-size:20px}.data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#f8f9fa;padding:12px 16px;font-weight:600;color:#495057;text-align:left;font-size:14px;border-bottom:2px solid #e9ecef;-webkit-user-select:none;user-select:none}.data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px;border-bottom:1px solid #e9ecef;font-size:14px}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{transition:background .2s;cursor:pointer}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#f8f9fa}.rank-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;font-weight:600;font-size:14px}.rank-first[_ngcontent-%COMP%]{background:gold;color:#333}.rank-second[_ngcontent-%COMP%]{background:silver;color:#333}.rank-third[_ngcontent-%COMP%]{background:#cd7f32;color:#fff}.rank-default[_ngcontent-%COMP%]{background:#f8f9fa;color:#666}.team-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.team-logo[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.team-logo-img[_ngcontent-%COMP%], .team-avatar[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:8px;object-fit:contain;background:#f8f9fa;padding:2px;flex-shrink:0}.team-logo-placeholder[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:8px;background:#f8f9fa;display:flex;align-items:center;justify-content:center;color:#6c757d;flex-shrink:0}.team-logo-placeholder[_ngcontent-%COMP%]   .bi[_ngcontent-%COMP%]{font-size:20px}.team-name[_ngcontent-%COMP%]{font-weight:500;color:#212529;line-height:1.4}.team-avatar[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:#144673;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px}.points-badge[_ngcontent-%COMP%]{background:#144673;color:#fff;padding:6px 12px;border-radius:16px;font-weight:600;font-size:13px}.empty-state[_ngcontent-%COMP%]{padding:60px 20px;text-align:center}.empty-state-content[_ngcontent-%COMP%]{max-width:400px;margin:0 auto}.empty-state-icon[_ngcontent-%COMP%]{font-size:48px;color:#6c757d;margin-bottom:16px}.empty-state[_ngcontent-%COMP%]   h6[_ngcontent-%COMP%]{font-size:18px;font-weight:600;color:#495057;margin-bottom:8px}.empty-state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#6c757d;margin:0}.pagination-container[_ngcontent-%COMP%]{border-top:1px solid #e9ecef;background:#fff}.pagination-controls[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding:16px 24px}@media (max-width: 768px){.toolbar-row[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.toolbar-right[_ngcontent-%COMP%]{width:100%;justify-content:center}.toolbar-controls[_ngcontent-%COMP%]{justify-content:center}.search-container[_ngcontent-%COMP%]{width:100%;max-width:none}.team-logo-img[_ngcontent-%COMP%], .team-logo-placeholder[_ngcontent-%COMP%]{width:40px;height:40px}.team-logo-placeholder[_ngcontent-%COMP%]   .bi[_ngcontent-%COMP%]{font-size:20px}}@media (max-width: 1200px){.toolbar-right[_ngcontent-%COMP%]{flex-wrap:wrap}.search-container[_ngcontent-%COMP%]{width:200px}}"]})}}return t})();var Ra=()=>[25,50,100,150,200,300,500],Ha=t=>({"show d-block":t});function Wa(t,d){if(t&1&&(a(0,"div",74)(1,"div",75)(2,"div",76)(3,"div",77),r(4),o(),a(5,"div",78),r(6," Active attendees "),a(7,"span",79),r(8,"\u24D8"),o()()(),a(9,"div",80)(10,"div",77),r(11),o(),a(12,"div",78),r(13," Points awarded "),a(14,"span",79),r(15,"\u24D8"),o()()(),a(16,"div",81)(17,"div",77),r(18),o(),a(19,"div",78),r(20," Avg. points/attendee "),a(21,"span",79),r(22,"\u24D8"),o()()()()()),t&2){let e=c();l(4),k(e.stats.activeAttendeesCount||0),l(7),k(e.stats.totalPointsAwarded||0),l(7),k(e.stats.averagePoints||0)}}function $a(t,d){t&1&&_(0,"span",82)}function za(t,d){t&1&&_(0,"i",83)}function ja(t,d){t&1&&_(0,"div",84)}function Ua(t,d){if(t&1){let e=C();a(0,"button",30),p("click",function(){let i=g(e).$implicit,s=c();return u(s.applyFilter(i))}),r(1),o()}if(t&2){let e=d.$implicit,n=c();v("active",n.currentFilter===e),l(),L(" ",e," ")}}function Ka(t,d){if(t&1){let e=C();a(0,"th",85)(1,"input",86),p("change",function(i){g(e);let s=c();return u(s.selectAll(i.target.checked))}),o()()}if(t&2){let e=c();l(),m("checked",e.isAllSelected)}}
1function qa(t,d){if(t&1){let e=C();a(0,"td",87)(1,"input",88),p("change",function(i){let s=g(e).$implicit,h=c();return u(h.selectItem(s,i.target.checked))})("click",function(i){return g(e),u(i.stopPropagation())}),o()()}if(t&2){let e=d.$implicit;l(),m("checked",e.checked)}}function Xa(t,d){t&1&&(a(0,"th",89),r(1,"Rank"),o())}function Ya(t,d){if(t&1&&(a(0,"span"),r(1),o()),t&2){let e=c().$implicit;l(),k(e.rank)}}function Qa(t,d){t&1&&_(0,"i",31)}function Ja(t,d){t&1&&_(0,"i",95)}function Za(t,d){if(t&1){let e=C();a(0,"td",90),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),a(1,"div",91),f(2,Ya,2,1,"span",92)(3,Qa,1,0,"i",93)(4,Ja,1,0,"i",94),o()()}if(t&2){let e=d.$implicit,n=c();l(),m("ngClass",n.getRankClass(e.rank)),l(),m("ngIf",e.rank!=="hidden"&&e.rank!=="opted out"&&e.rank!=="no point"),l(),m("ngIf",e.hidden||e.noPoint),l(),m("ngIf",e.optOutGamification)}}function er(t,d){t&1&&(a(0,"th",89),r(1,"Attendee"),o())}function tr(t,d){if(t&1&&(a(0,"a",101),r(1),o()),t&2){let e=c().$implicit,n=c();l(),L(" ",n.getInitials(e.firstName,e.lastName)," ")}}function ir(t,d){if(t&1&&_(0,"img",102),t&2){let e=c().$implicit;m("alt",Rt("Profile of ",e.firstName," ",e.lastName))("src",e.photoId,de)}}function nr(t,d){if(t&1){let e=C();a(0,"div")(1,"a",103),p("click",function(){g(e);let i=c().$implicit,s=c();return u(s.viewProgress(i))}),r(2),o()()}if(t&2){let e=c().$implicit;l(2),Gt("",e.firstName," ",e.lastName," (",e.nickName,") ")}}function or(t,d){if(t&1){let e=C();a(0,"a",103),p("click",function(){g(e);let i=c().$implicit,s=c();return u(s.viewProgress(i))}),r(1),o()}if(t&2){let e=c().$implicit;l(),It("",e.firstName," ",e.lastName," ")}}function ar(t,d){if(t&1){let e=C();a(0,"td",90),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),a(1,"div",96),f(2,tr,2,1,"a",97)(3,ir,1,4,"img",98),a(4,"div",99),f(5,nr,3,3,"div",100)(6,or,2,2,"ng-template",null,0,ee),o()()()}if(t&2){let e=d.$implicit,n=W(7);l(2),m("ngIf",!e.photoId),l(),m("ngIf",e.photoId),l(2),m("ngIf",e.nickName)("ngIfElse",n)}}function rr(t,d){t&1&&(a(0,"th",89),r(1,"Company"),o())}function lr(t,d){if(t&1){let e=C();a(0,"td",90),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),r(1),o()}if(t&2){let e=d.$implicit;l(),k(e.company)}}function sr(t,d){t&1&&(a(0,"th",89),r(1,"Job title"),o())}function dr(t,d){if(t&1){let e=C();a(0,"td",90),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),r(1),o()}if(t&2){let e=d.$implicit;l(),k(e.jobTitle)}}function cr(t,d){t&1&&(a(0,"th",89),r(1,"Status"),o())}function mr(t,d){t&1&&(a(0,"span"),r(1,"Visible"),o())}function pr(t,d){t&1&&(a(0,"span"),r(1,"Hidden"),o())}function gr(t,d){t&1&&(a(0,"span"),r(1,"Opted out"),o())}function ur(t,d){if(t&1){let e=C();a(0,"td",90),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),a(1,"span",104),f(2,mr,2,0,"span",92)(3,pr,2,0,"span",92)(4,gr,2,0,"span",92),o()()}if(t&2){let e=d.$implicit,n=c();l(),m("ngClass",n.getStatusClass(e)),l(),m("ngIf",!e.hidden&&!e.optOutGamification),l(),m("ngIf",e.hidden),l(),m("ngIf",e.optOutGamification)}}function _r(t,d){t&1&&(a(0,"th",105),r(1,"Points"),o())}function hr(t,d){if(t&1){let e=C();a(0,"td",106),p("click",function(){let i=g(e).$implicit,s=c();return u(s.handleRowClick(i))}),a(1,"span",107),r(2),o()()}if(t&2){let e=d.$implicit;l(2),k(e.formattedScore)}}function fr(t,d){t&1&&_(0,"tr",108)}function br(t,d){if(t&1&&_(0,"tr",109),t&2){let e=d.$implicit;v("selected",e.checked)}}function vr(t,d){t&1&&_(0,"mat-spinner",110)}function xr(t,d){if(t&1){let e=C();a(0,"div",139)(1,"label",140),r(2,"Link text"),o(),a(3,"input",141),qe("ngModelChange",function(i){g(e);let s=c(3);return Ke(s.tcButtonLabel,i)||(s.tcButtonLabel=i),u(i)}),o(),a(4,"small",142),r(5,"This text will appear as a clickable link on the gamification page."),o()(),a(6,"div",139)(7,"label",143),r(8,"Content"),o(),a(9,"editor",144),qe("ngModelChange",function(i){g(e);let s=c(3);return Ke(s.tcContent,i)||(s.tcContent=i),u(i)}),o()()}if(t&2){let e=c(3);l(3),Ue("ngModel",e.tcButtonLabel),l(6),m("init",e.tcEditorConfig),Ue("ngModel",e.tcContent)}}function Cr(t,d){if(t&1){let e=C();a(0,"div",127)(1,"div",128)(2,"app-page-settings-form",129,2),p("save",function(i){g(e);let s=c(2);return u(s.savePageSettings(i))}),o()(),a(4,"div",128),_(5,"hr",130),a(6,"h6",131),r(7,"Terms & Conditions"),o(),a(8,"p",132),r(9," Configure terms and conditions displayed as a clickable link on the gamification page in the app. "),o(),a(10,"div",133)(11,"span",134)(12,"span",135),_(13,"i",136),o(),r(14," Display Terms & Conditions "),o(),a(15,"div",137)(16,"button",138),p("click",function(){g(e);let i=c(2);return u(i.toggleTcEnabled(!0))}),r(17," Enabled "),o(),a(18,"button",138),p("click",function(){g(e);let i=c(2);return u(i.toggleTcEnabled(!1))}),r(19," Disabled "),o()()(),O(20,xr,10,3),o()()}if(t&2){let e=c(2);
1l(2),m("data",e.pageSettingsData)("page","gamification")("groupSpeakersByType",!1)("overwriteGroupSpeakerSort",!1)("showModalFooter",!1)("showBanner",!0)("descriptionEditor","quill"),l(14),v("btn-success",e.tcEnabled)("btn-light",!e.tcEnabled),l(2),v("btn-success",!e.tcEnabled)("btn-light",e.tcEnabled),l(2),F(e.tcEnabled?20:-1)}}function wr(t,d){if(t&1){let e=C();a(0,"div",127)(1,"div",145)(2,"div",146)(3,"div",147)(4,"h6",148),r(5,"Get external page"),o(),a(6,"p",149),r(7," Share your leaderboard with external audiences using these public URLs. "),o(),a(8,"div",139)(9,"label",150),r(10,"Individual leaderboard"),o(),a(11,"div",151),_(12,"input",152),a(13,"button",153),p("click",function(){g(e);let i=c(2);return u(i.copyExternalLink())}),_(14,"i",154),r(15," Copy "),o()()(),a(16,"div",139)(17,"label",155),r(18,"Team leaderboard"),o(),a(19,"div",151),_(20,"input",156),a(21,"button",153),p("click",function(){g(e);let i=c(2);return u(i.copyExternalLinkTeam())}),_(22,"i",154),r(23," Copy "),o()()()()()(),a(24,"app-external-leaderboard-settings",157),p("saveComplete",function(i){g(e);let s=c(2);return u(s.onExternalLeaderboardSave(i))}),o()()}if(t&2){let e=c(2);l(12),m("value",e.getIndividualLeaderboardUrl()),l(8),m("value",e.getTeamLeaderboardUrl()),l(4),m("detail",e.gamifyExternalPageSettings)("showActions",!1)}}function yr(t,d){t&1&&(a(0,"div",159)(1,"div",174)(2,"div",175)(3,"span",176),r(4,"Loading..."),o()(),a(5,"div",177),r(6,"Loading settings..."),o()()())}function Sr(t,d){if(t&1&&(a(0,"div",181),r(1),o()),t&2){let e=c(4);l(),L(" ",e.scheduleFormErrors," ")}}function Pr(t,d){if(t&1&&(a(0,"div",163)(1,"h6",139),r(2,"Leaderboard Schedule"),o(),a(3,"div",146)(4,"div",178),_(5,"app-reactive-input-datetime",179),o(),a(6,"div",178),_(7,"app-reactive-input-datetime",180),o()(),a(8,"small",142),r(9," The leaderboard will only be visible between these dates and times. "),o(),O(10,Sr,2,1,"div",181),o()),t&2){let e=c(3);l(5),m("group",e.leaderboardScheduleForm)("isFormGroup",!1)("required",!0)("timezone",e.timezone)("timezoneLabel",e.timezoneLabel),l(2),m("group",e.leaderboardScheduleForm)("isFormGroup",!1)("required",!0)("timezone",e.timezone)("timezoneLabel",e.timezoneLabel),l(3),F(e.scheduleFormErrors?10:-1)}}function kr(t,d){t&1&&(a(0,"small",167),r(1," Message is required "),o())}function Mr(t,d){t&1&&(a(0,"small",167),r(1," Message exceeds character limit "),o())}function Er(t,d){if(t&1){let e=C();a(0,"div",169)(1,"span",134)(2,"span",182),_(3,"i",136),o(),r(4," Overall leaderboard "),o(),a(5,"div",171)(6,"button",172),p("click",function(){g(e);let i=c(3);return u(i.toggleOverallLeaderboard(!0))}),r(7," Enabled "),o(),a(8,"button",173),p("click",function(){g(e);let i=c(3);return u(i.toggleOverallLeaderboard(!1))}),r(9," Disabled "),o()()()}if(t&2){let e=c(3);l(6),v("btn-light",!e.overallLeaderboardEnabled)("btn-success",e.overallLeaderboardEnabled),m("value",!0),l(2),v("btn-disable",e.overallLeaderboardEnabled)("btn-disable",!e.overallLeaderboardEnabled),m("value",!1)}}function Tr(t,d){if(t&1){let e=C();a(0,"div",158),O(1,yr,7,0,"div",159),a(2,"div",145)(3,"div",146)(4,"div",147)(5,"div",133)(6,"span",134)(7,"span",160),_(8,"i",136),o(),r(9," Leaderboard display "),o(),a(10,"div",161)(11,"button",138),p("click",function(){g(e);let i=c(2);return u(i.toggleShowLeaderboard("show"))}),r(12," Show "),o(),a(13,"button",138),p("click",function(){g(e);let i=c(2);return u(i.toggleShowLeaderboard("scheduled"))}),r(14," Scheduled "),o(),a(15,"button",138),p("click",function(){g(e);let i=c(2);return u(i.toggleShowLeaderboard("hide"))}),r(16," Hide "),o()()(),_(17,"hr",162),O(18,Pr,11,11,"div",163),a(19,"div",163)(20,"label",164),r(21," Hidden message "),o(),a(22,"quill-editor",165),qe("ngModelChange",function(i){g(e);let s=c(2);return Ke(s.leaderboardHiddenMessage,i)||(s.leaderboardHiddenMessage=i),u(i)}),o(),a(23,"div",166)(24,"div"),O(25,kr,2,0,"small",167)(26,Mr,2,0,"small",167),o(),a(27,"small",168),r(28),o()()(),a(29,"div",169)(30,"span",134)(31,"span",170),_(32,"i",136),o(),r(33," Attendee type leaderboards "),o(),a(34,"div",171)(35,"button",172),p("click",function(){g(e);let i=c(2);return u(i.toggleAttendeeTypeLeaderboard(!0))}),r(36," Enabled "),o(),a(37,"button",173),p("click",function(){g(e);let i=c(2);return u(i.toggleAttendeeTypeLeaderboard(!1))}),r(38," Disabled "),o()()(),O(39,Er,10,10,"div",169),o()()()()}if(t&2){let e=c(2);l(),F(e.isAppLeaderboardSettingsLoading?1:-1),l(10),v("btn-success",e.showLeaderboard==="show")("btn-light",e.showLeaderboard!=="show"),l(2),v("btn-success",e.showLeaderboard==="scheduled")("btn-light",e.showLeaderboard!=="scheduled"),l(2),v("btn-success",e.showLeaderboard==="hide")("btn-light",e.showLeaderboard!=="hide"),l(3),F(e.showLeaderboard==="scheduled"?18:-1),l(4),m("modules",e.hiddenMessageQuillModules),Ue("ngModel",e.leaderboardHiddenMessage),l(3),F(e.isLeaderboardMessageRequired?25:e.isLeaderboardMessageTooLong?26:-1),l(2),v("text-danger",e.isLeaderboardMessageTooLong||e.isLeaderboardMessageRequired),l(),L(" ",e.leaderboardMessageCharCount,"/500 "),l(7),v("btn-light",!e.attendeeTypeLeaderboardEnabled)("btn-success",e.attendeeTypeLeaderboardEnabled),m("value",!0),l(2),v("btn-disable",e.attendeeTypeLeaderboardEnabled)("btn-disable",!e.attendeeTypeLeaderboardEnabled),m("value",!1),l(2),F(e.attendeeTypeLeaderboardEnabled?39:-1)}}function Or(t,d){if(t&1){let e=C();a(0,"div",190)(1,"label",191)(2,"input",192),p("click",function(i){g(e);let s=c(4);return u(s.onBlockAttendeeType(i))}),o(),r(3),o()()}if(t&2){let e=d.$implicit,n=c(4);l(2),m("value",e)("checked",n.blockedAttendeeTypes.includes(e)),l(),L(" ",e," ")}}function Fr(t,d){if(t&1){let e=C();a(0,"div",146)(1,"div",147)(2,"div",169)(3,"span",134)(4,"span",185),_(5,"i",136),o(),r(6),o(),a(7,"div",186)(8,"button",187),p("click",function(i){return g(e),u(i.preventDefault())}),r(9," Configure "),o(),a(10,"div",188),f(11,Or,4,3,"div",189),o()()()()()}if(t&2){let e=c(3);l(6),L(" Block attendee types (",e.blockedAttendeeTypes.length,") "),l(5),m("ngForOf",e.attendeeTypeOptions)}}function Lr(t,d){if(t&1&&(a(0,"div",127)(1,"div",145)(2,"div",146)(3,"div",147)(4,"p",183),r(5," Additional configuration options for miscellaneous gamification features. "),o()()(),f(6,Fr,12,2,"div",184),o()()),t&2){let e=c(2);l(6),m("ngIf",e.attendeeTypeOptions.length)}}function Dr(t,d){t&1&&r(0," Save ")}function Vr(t,d){t&1&&(_(0,"span",195),r(1," Saving... "))}function Nr(t,d){if(t&1){let e=C();a(0,"div",126)(1,"button",193),p("click",function(){g(e);let i=c(2);return u(i.closeSettings())}),r(2,"Close"),o(),a(3,"button",194),p("click",function(){g(e);let i=c(2);return u(i.saveSettings())}),O(4,Dr,1,0)(5,Vr,2,0),o()()}if(t&2){let e=c(2);l(3),m("disabled",e.isSettingsSaving||e.activeSettingsTab==="app"&&(e.isLeaderboardMessageRequired||e.isLeaderboardMessageTooLong||e.showLeaderboard==="scheduled"&&e.leaderboardScheduleForm.invali
1d)),l(),F(e.isSettingsSaving?5:4)}}function Ar(t,d){if(t&1){let e=C();a(0,"div",111),p("click",function(i){g(e);let s=c();return u(s.closeSettings(i))}),a(1,"div",112)(2,"div",113)(3,"div",114)(4,"h5",115),r(5,"Settings"),o(),a(6,"button",116),p("click",function(){g(e);let i=c();return u(i.closeSettings())}),o()(),a(7,"div",117)(8,"ul",118,1),p("navChange",function(i){g(e);let s=c();return u(s.onNavChange(i))}),a(10,"li",119)(11,"a",120),r(12,"Page settings"),o(),f(13,Cr,21,16,"ng-template",121),o(),a(14,"li",122)(15,"a",120),r(16,"External leaderboard"),o(),f(17,wr,25,4,"ng-template",121),o(),a(18,"li",123)(19,"a",120),r(20,"App leaderboard"),o(),f(21,Tr,40,31,"ng-template",121),o(),a(22,"li",124)(23,"a",120),r(24,"Others"),o(),f(25,Lr,7,1,"ng-template",121),o()(),_(26,"div",125),o(),O(27,Nr,6,2,"div",126),o()()()}if(t&2){let e=W(9),n=c();m("ngClass",Ht(3,Ha,n.showSettingsModal)),l(26),m("ngbNavOutlet",e),l(),F(n.activeSettingsTab!=="others"?27:-1)}}var vt=(()=>{class t{constructor(e,n,i,s,h,b,x,y,T,Q,H,Cn,wn,yn,Sn,Pn){this.gamificationService=e,this.utilitiesService=n,this.csvDownloadService=i,this.utilities=s,this.settingService=h,this.modalService=b,this.eventService=x,this.dateFormatPipe=y,this.attendeeService=T,this.attendeeTypeService=Q,this.auditTrailService=H,this.toast=Cn,this.cdr=wn,this.clipboard=yn,this.user=Sn,this.quillUtil=Pn,this.page="gamification",this.pageSettings={header:"",text:"",bannerUrl:null},this.pageSettingsData=null,this.dataSource=new Fe([]),this.scores=[],this.isAllSelected=!1,this.subscription$=[],this.attendees=[],this.isLoading=!1,this.isEVPS2021=!1,this.stage="",this.selectedCount$=new Le(0),this.isExportLoading$=new Le(!1),this.isAppLeaderboardSettingsLoading=!1,this.gamificationSettings=[],this.activeTab="individual",this.activeSettingsTab="page",this.showSettingsModal=!1,this.isSettingsSaving=!1,this.stats={activeAttendeesCount:0,totalPointsAwarded:0,averagePoints:0},this.selectedCount=0,this.hasSelection=!1,this.totalResults=0,this.distinctTicketNames=[],this.currentFilter="all",this.attendeeTypeLeaderboardEnabled=!1,this.overallLeaderboardEnabled=!0,this.showLeaderboard="show",this.leaderboardHiddenMessage="Gamification leaderboard has been hidden",this.leaderboardScheduleStart="",this.leaderboardScheduleEnd="",this.leaderboardScheduleForm=new qt({startDateTime:new re("",[B.required]),endDateTime:new re("",[B.required])},{validators:this.dateRangeValidator}),this.timezoneLabel="",this.timezone="",this.hiddenMessageQuillModules=this.quillUtil.getHiddenMessageQuillModules(),this.tcEnabled=!1,this.tcButtonLabel="Terms & Conditions",this.tcContent="",this.tcEditorConfig=Z(V({},Ii),{height:300}),this.attendeeTypeOptions=[],this.blockedAttendeeTypes=[],this.gamifyExternalPageSettings={PK:"gamify-settings",SK:"gamifyExternalPageSettings",previewBackgroundSetting:"default",previewFontColor:"#FFFFFF",previewBackgroundColor:"#23313B",previewDefaultBgColor:"#23313B",previewBackgroundImage:"",previewBackgroundImageName:"",displayMode:!0,displayMessage:"",displayModeTeam:!0,displayMessageTeam:"",attendeeType:!0,company:!0,jobTitle:!0,points:!0,teamLogo:!0,teamPoints:!0,bgFitMode:"cover",boardWidthMode:"contained",boardWidthPercent:100,boardAlignX:"center",boardAlignY:"top",boardScalePercent:100,boardPanelEnabled:!0,boardPanelColor:"#EEF0F3",boardCellFontColor:"#082E4A",boardPanelOpacity:100,boardMaxHeightEnabled:!1,boardMaxHeightPercent:60,showBoardTitle:!0,boardFontFamily:"default",boardFontWeight:400},this.displayedColumns=["checked","rank","attendee","company","jobTitle","status","score"]}ngOnInit(){this.user.me().then(n=>{this.isSuperAdmin=n.superadmin}),this.stage=pi.stage,this.isEVPS2021=window.location.pathname.includes("evps-2021-virtual"),this.isLoading=!0;let e=Ot([this.attendeeService.attendeesObservable,this.gamificationService.leaderboardObservable]).pipe(Tt(Et),Re(([n,i])=>{let s=n.reduce((x,y)=>(x[y.PK]=y,x),{}),h=JSON.parse(JSON.stringify(s)),b=i.map(x=>{let y=h[x.PK];return y&&(delete h[x.PK],delete y.dateCreated,delete y.rank,delete y.score),x.hidden&&(x.rank="hidden"),typeof x.score=="number"?x.formattedScore=x.score.toLocaleStr
1ing():x.formattedScore=x.score,V(V({},x),y)});return b=[...b,...Object.values(h).map(x=>(x.rank=x.optOutGamification?"opted out":"no point",x.score="N/A",x.formattedScore="N/A",x.noPoint=!x.optOutGamification,x)).sort((x,y)=>x.rank.localeCompare(y.rank)).filter(x=>this.scores.findIndex(y=>y.PK===x.PK)<0)],this.dataSource.data=b,this.currentFilter&&this.currentFilter!=="all"&&this.applyFilter(this.currentFilter),n?.length&&i?.length&&(this.isLoading=!1),this.refreshSelectedCount(),[s,b]}));this.subscription$.push(e.subscribe(([n,i])=>{this.attendees=n,this.scores=i;let s=i.map(T=>T.ticketName).filter(T=>T&&T.trim()!=="").filter((T,Q,H)=>H.indexOf(T)===Q).sort();this.distinctTicketNames=s;let h=i.filter(T=>typeof T.score=="number"&&T.score>0),b=h.length,x=h.reduce((T,Q)=>T+(typeof Q.score=="number"?Q.score:0),0),y=b>0?x/b:0;this.stats.activeAttendeesCount=b.toLocaleString(),this.stats.totalPointsAwarded=x.toLocaleString(),this.stats.averagePoints=Number(y.toFixed(2)).toLocaleString()})),this.gamificationService.load(!0),this.attendeeService.load(!0),this.subscription$.push(this.attendeeTypeService.onChanged(n=>{this.attendeeTypeOptions=n.map(i=>i.name)})),this.attendeeTypeService.load(),this.loadGamificationSettings(),this.subscription$.push(this.settingService.onChangedPageSettings(this.page,n=>S(this,null,function*(){n?.data&&(this.pageSettings=n.data,this.pageSettingsData=n.data,zi(this.pageSettings.text)&&(this.pageSettings.text=yield di(this.pageSettings.text)))}))),this.settingService.loadPageSettings(this.page)}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(e,n)=>n==="attendee"?`${e.firstName||""} ${e.lastName||""}`.trim().toLowerCase():e[n],this.dateFormat=this.eventService.data?.dateformat,this.timezoneLabel=this.eventService.data.timezoneLabel||this.eventService.data?.timezone||"UTC",this.timezone=this.eventService.data?.timezone||"UTC"}ngAfterViewChecked(){this.cdr.detectChanges()}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}refresh(e=!1){this.isLoading=!0,this.dataSource.data=[],e&&this.attendeeService.load(!0),this.gamificationService.load(!0)}export(){return S(this,null,function*(){this.isExportLoading$.next(!0);let e=yield this.gamificationService.getAttendeeWithMeetings(),n;if((window.location.pathname.includes("lenovoaptopgun21")||window.location.pathname.includes("lenovo-ap-top-gun")||window.location.pathname.includes("lenovo-next-22")||window.location.pathname.includes("lenovonext22")||window.location.pathname.includes("lenovonext23"))&&(n=yield this.gamificationService.getMandatorySessionProgress()),!e?.success){this.utilitiesService.alert({header:"Error",message:e.message?e.message:e}),this.isExportLoading$.next(!1);return}let i={},s=this.dataSource.data.filter(b=>b.checked);(!s||s.length===0)&&(s=this.dataSource.data),s=s.map(b=>{b.date=this.dateFormatPipe.transform(b.dateCreated,!0,!1,R.DATEFORMAT_ISO);let x=e.data.find(y=>y.PK===b.PK);if(b.meetingsCount=x?x.meetingCount:0,this.isEVPS2021&&(b.gamificationOptingDate=b.gamificationOptOutDate?this.dateFormatPipe.transform(b.gamificationOptOutDate,!0,!1):""),n?.success){let y=n.data.find(T=>T.PK===b.PK);b.overall_progress=y?.hasOwnProperty("mandatoryWatchPercent")?Math.round((y.mandatoryWatchPercent*100+Number.EPSILON)*100)/100+"%":"",Object.keys(y).filter(T=>T.includes("_progress")).forEach(T=>{b[T]=Math.round((y[T]*100+Number.EPSILON)*100)/100+"%",typeof i[T]>"u"&&(i[T]=!0)})}return b});let h=["rank","firstName","lastName","email","jobTitle","company","score","type","meetingsCount","date"];window.location.pathname.includes("softcat-kick-off-2021")&&h.push(["Office aligned to","custom-87400732"],["Breakout stream","custom-c8f47cdb"]),(window.location.pathname.includes("lenovo-next-22")||window.location.pathname.includes("lenovonext22"))&&(_i(this.stage)?h.push(["Location","custom-485c55e1"]):this.stage==="staging"?h.push(["Location","custom-6aa9fb3b"]):h.push(["Location","custom-21d09726"])),this.isEVPS2021&&h.push(["Opting Date","gamificationOptingDate"]),window.location.pathname.includes("lenovonext23")&&h.push(["Group","typeGroup"]),n?.success&&(h.push("overall_progress"),Object.keys(i).sort((b,x)=>new Date(b.split("_")[0]).getTime()-new Date(x.split("_")[0]).getTime()).forEac
1h(b=>{h.push(b)})),this.csvDownloadService.fromJsonList("gamification_overview",s,h,{reorderFields:!0}),yield this.auditTrailService.create(this.auditTrailService.ActionEnum.Export,"/overview"),this.isExportLoading$.next(!1)})}selectAll(e){this.dataSource.filteredData.forEach(n=>{n.checked=e}),this.isAllSelected=e,this.refreshSelectedCount()}selectItem(e,n){e.checked=n,this.refreshSelectedCount()}refreshSelectedCount(){let e=this.dataSource.filteredData.filter(i=>i.checked).length,n=this.dataSource.filteredData.length;this.selectedCount$.next(e),this.selectedCount=e,this.hasSelection=e>0,this.isAllSelected=e>0&&e===n}filter(e){let n=e.target.value;this.dataSource.filter=n.trim().toLowerCase(),this.paginator.firstPage()}batchResetScores(){return S(this,null,function*(){let e=this.dataSource.data.filter(i=>i.checked).map(i=>i.PK);if(!e.length){let i=this.utilities.alert({header:"Score reset",message:"Please select scores to be reset."});try{yield i.result;return}catch{}}let n=this.utilities.confirm({header:"Score reset",message:"Are you sure you want to reset scores of selected attendee(s)? This will remove all the points that they already acquired."});try{yield n.result,this.isLoading=!0,yield this.gamificationService.batchResetScores(e),this.gamificationService.load(!0)}catch{}})}batchOpting(e){return S(this,null,function*(){let n=e?"Opt-in":"Opt-out",i=this.dataSource.data.filter(h=>h.checked).map(h=>h.PK);if(!i.length){let h=this.utilities.alert({header:n,message:"Please select attendees first."});try{yield h.result;return}catch{}}let s=this.utilities.confirm({header:n,message:`Are you sure you want to opt-${e?"in":"out"} the selected attendee(s)? ${e?"":"This will also remove all the points that they already acquired."}`});try{yield s.result,yield this.gamificationService.batchOpting({PKs:i,optOutGamification:!e}),this.refresh(!0)}catch{}})}batchHideScores(e){return S(this,null,function*(){let n=this.dataSource.data.filter(s=>s.checked).map(s=>s.PK);if(!n.length){let s=this.utilities.alert({header:e?"Hide scores":"Show scores",message:`Please select scores to be ${e?"hidden":"shown"}.`});try{yield s.result;return}catch{}}let i=this.utilities.confirm({header:e?"Hide scores":"Show scores",message:`Are you sure you want to ${e?"hide":"show"} selected scores from the leaderboard?`});try{yield i.result,yield this.gamificationService.batchHideScores(n,e),this.refresh()}catch{}})}addPoint(){return S(this,null,function*(){let e=this.modalService.open(ut,{centered:!0,backdrop:"static",ariaLabelledBy:"add-point-modal-title"});e.componentInstance.awardFunction=n=>S(this,null,function*(){if(!n)return;if(n.attendees.length<=0&&n.attendeeEmail==="")throw this.toast.showDanger("Error","Please select attendees or enter email address"),Error("no selected");let i=[];if(n.attendeeEmail!==""){let y=[];y=n.attendeeEmail.split(`
2`).filter(H=>H).map(H=>H.toLowerCase().trim());let Q=[...new Set(y)];if(!this.checkValidEmails(Q))throw this.toast.showDanger("Error","You have entered one or more invalid email/s."),Error("has invalid email");i=Object.values(this.attendees).filter(H=>Q.includes(H.email.toLowerCase().trim())).map(H=>H.PK)}if(n.attendees?.length&&n.attendeeEmail!==""){let y=n.attendees.concat(i);n.attendees=[...new Set(y)]}else n.attendees?.length||(n.attendees=i);delete n.attendeeEmail;let s=[...n.attendees],h=[],b=0,x=0;do n.attendees=s.slice(b,b+500),b+=500,n.attendees.length&&(h.push(this.gamificationService.addPoint(V({},n))),x++);while(b<s.length+500);yield Promise.all(h),s?.length>100?(this.gamificationService.load(!0),yield new Promise(y=>setTimeout(y,x*5e3))):yield new Promise(y=>setTimeout(y,5e3)),this.gamificationService.load(!0)});try{yield e.result}catch{}})}checkValidEmails(e){let n=!0;for(let i of e)if(!/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i.test(i)){n=!1;break}return n}viewProgress(e){return S(this,null,function*(){if(e.noPoint)this.utilities.alert({message:"Attendee has not gained points yet"});else if(e.optOutGamification)this.utilities.alert({message:"Attendee opted out or is disabled from gamification."});else{let n=this.modalService.open(ft,{size:"lg"});n.componentInstance.attendeePK=e.PK,n.componentInstance.attendee=e;try{yield n.result}catch{}}})}showPageSettings(){return S(this,null,function*(){let e=this.modalService.open(Yi,{centered:!0,backdrop:"static",size:"lg"});e.componentInstance.page=this.page,e.componentInstance.data=this.pageSettings,e.componentInstance.descriptionEditor="quill";try{yield e.result,this.settingService.loadPageSettings(this.page)}catch{}})}deleteBanner(){this.settingService.deletePageBanner(this.page,this.pageSettings)}copyExternalLink(){let e=window.location.pathname.split("/");this.clipboard.copy(`${window.location.host}/external/${e[2]}/leaderboard`),this.utilitiesService.alert({header:"Copied link!",message:"The link for external individual leaderboard has been copied to your clipboard!"})}copyExternalLinkTeam(){let e=window.location.pathname.split("/");this.clipboard.copy(`${window.location.host}/external/${e[2]}/team-leaderboard`),this.utilitiesService.alert({header:"Copied link!",message:"The link for external team leaderboard has been copied to your clipboard!"})}formatExportDate(e){return e==null||e===""?"":this.dateFormatPipe.transform(e,!0,!1,R.DATEFORMAT_ISO_24H)}exportTimezoneFor(e){return this.dateFormatPipe.resolveTimezoneLabel("",e)}exportDetailed(){return S(this,null,function*(){this.isExportLoading$.next(!0);try{let n=(yield this.gamificationService.exportDetailed()).map(s=>(s.timestamp=this.formatExportDate(s.dateCreated),s.revokedAt=this.formatExportDate(s.revokedAt),s.restoredAt=this.formatExportDate(s.restoredAt),s.timezone=this.exportTimezoneFor(s.dateCreated),s)).filter(s=>s?.dateCreated!==s?.dateUpdated),i=[["participantId","PK"],"firstName","lastName","email","type","jobTitle","company","rank","score","activity","timestamp","timezone","points","revoked","revokedBy","revokedAt","restored","restoredBy","restoredAt","comment"];this.csvDownloadService.fromJsonList("gamification_detailed",n,i),yield this.auditTrailService.create(this.auditTrailService.ActionEnum.Export,"/detailed")}catch(e){this.utilitiesService.alert({header:"Error",message:e})}finally{this.isExportLoading$.next(!1)}})}showTab(e){this.activeTab=e}handleRowClick(e){e.checked=!e.checked,this.refreshSelectedCount()}openSettings(){return S(this,null,function*(){this.activeSettingsTab="page",this.showSettingsModal=!0,this.isAppLeaderboardSettingsLoading=!0,yield this.loadGamificationSettings(),yield this.loadExternalPageSettings(),yield this.loadAttendeeTypeLeaderboardSettings()})}loadExternalPageSettings(){return S(this,null,function*(){try{this.gamificationSettings=yield this.gamificationService.listSettings();let e=this.gamificationSettings.find(n=>n.PK==="gamify-settings"&&n.SK==="gamifyExternalPageSettings");if(e&&typeof e<"u"){this.gamifyExternalPageSettings=e,"displayMode"in e||(this.gamifyExternalPageSettings.displayMode=!0),"displayModeTeam"in e||(this.gamifyExternalPageSettings.displayModeTeam=!0);let n={attendeeType:!0,company:!0,jobTitle:!0,points:!0,teamLogo:!0,teamPoints:!0,bgFitMode:"cover",boardWidthMode:"contained",boardWidthPercent:100,boardAlignX:"center",boardAlignY:"top",boardScalePercent:100,boardPanelEnabled:!0,boardPanelColor:"#EEF0F3",boardCellFontColor:"#082E4A",boardPanelOpacity:100,boardMaxHeightEnabled:!1,boardMaxHeightPercent:60,showBoardTitle:!0,boardFontFamily:"default",boardFontWeight:400};
2Object.keys(n).forEach(i=>{i in this.gamifyExternalPageSettings||(this.gamifyExternalPageSettings[i]=n[i])})}}catch(e){console.error("Error loading external page settings:",e)}})}loadAttendeeTypeLeaderboardSettings(){return S(this,null,function*(){try{let e=this.gamificationSettings.find(i=>i.SK==="attendeeTypeLeaderboard")?.value;typeof e<"u"&&(this.attendeeTypeLeaderboardEnabled=e);let n=this.gamificationSettings.find(i=>i.SK==="overallLeaderboard")?.value;typeof n<"u"&&(this.overallLeaderboardEnabled=n)}catch(e){console.error("Error loading attendee type leaderboard settings:",e)}})}toggleAttendeeTypeLeaderboard(e){return S(this,null,function*(){this.attendeeTypeLeaderboardEnabled=e})}toggleOverallLeaderboard(e){return S(this,null,function*(){this.overallLeaderboardEnabled=e})}toggleShowLeaderboard(e){return S(this,null,function*(){if(this.showLeaderboard=e,(e==="show"||e==="hide")&&(this.leaderboardScheduleForm.reset(),this.leaderboardScheduleStart="",this.leaderboardScheduleEnd=""),e==="scheduled"){let n=this.eventService.data?.startDate,i=this.eventService.data?.endDate;if(n&&i){let s=n.replace("T"," ").replace("Z",""),b=`${i.split("T")[0]} 23:59`;this.leaderboardScheduleForm.patchValue({startDateTime:s,endDateTime:b}),this.leaderboardScheduleStart=s,this.leaderboardScheduleEnd=b}}})}saveGeneralLeaderboardSettings(){return S(this,null,function*(){try{let e=this.leaderboardHiddenMessage.replace(/&nbsp;/g," "),n={showLeaderboard:this.showLeaderboard,hiddenMessage:e,scheduleStart:this.leaderboardScheduleStart,scheduleEnd:this.leaderboardScheduleEnd};yield this.gamificationService.setSettings({key:"leaderboardDisplaySettings",value:n})}catch(e){throw console.error("Error saving leaderboard settings:",e),e}})}saveAllLeaderboardSettings(){return S(this,null,function*(){try{if(this.getTextContentLength(this.leaderboardHiddenMessage)===0){this.toast.showDanger("Error","Custom message is required.");return}if(this.getTextContentLength(this.leaderboardHiddenMessage)>500){this.toast.showDanger("Error","Custom message cannot exceed 500 characters.");return}if(this.showLeaderboard==="scheduled"&&this.leaderboardScheduleForm.invalid){this.toast.showDanger("Error","Please fill in valid start and end dates for the schedule.");return}this.showLeaderboard==="scheduled"&&(this.leaderboardScheduleStart=this.leaderboardScheduleForm.get("startDateTime")?.value||"",this.leaderboardScheduleEnd=this.leaderboardScheduleForm.get("endDateTime")?.value||""),yield Promise.all([this.saveGeneralLeaderboardSettings(),this.gamificationService.setSettings({key:"attendeeTypeLeaderboard",value:this.attendeeTypeLeaderboardEnabled}),this.gamificationService.setSettings({key:"overallLeaderboard",value:this.overallLeaderboardEnabled})]),this.toast.showSuccess("Success","App leaderboard settings saved."),yield this.loadExternalPageSettings(),yield this.loadGamificationSettings()}catch(e){console.error("Error saving leaderboard settings:",e),this.toast.showDanger("Error","Failed to save app leaderboard settings.")}})}get leaderboardMessageCharCount(){return this.getTextContentLength(this.leaderboardHiddenMessage)}get isLeaderboardMessageTooLong(){return this.leaderboardMessageCharCount>500}get isLeaderboardMessageRequired(){return this.leaderboardMessageCharCount===0}getTextContentLength(e){if(!e)return 0;let n=document.createElement("div");return n.innerHTML=e,(n.textContent||n.innerText||"").length}saveLeaderboardSchedule(){return S(this,null,function*(){if(!this.leaderboardScheduleForm.invalid)try{this.leaderboardScheduleStart=this.leaderboardScheduleForm.get("startDateTime")?.value||"",this.leaderboardScheduleEnd=this.leaderboardScheduleForm.get("endDateTime")?.value||"",yield this.saveGeneralLeaderboardSettings(),this.toast.showSuccess("Success","Leaderboard schedule saved.")}catch(e){console.error("Error saving leaderboard schedule:",e),this.toast.showDanger("Error","Failed to save leaderboard schedule.")}})}dateRangeValidator(e){let n=e.get("startDateTime")?.value,i=e.get("endDateTime")?.value;if(!n||!i)return null;let s=new Date(n),h=new Date(i);return s>=h?{dateRangeInvalid:{message:"Start date must be before end date"}}:null}get scheduleFormErrors(){let e=this.leaderboardScheduleForm.errors;return e?.dateRangeInvalid?e.dateRangeInvalid.message:null}toggleTcEnabled(e){this.tcEnabled=e}closeSettings(e){(!e||e.target===e.currentTarget)&&(this.showSettingsModal=!1)}applyFilter(e){this.currentFilter=e,e==="all"?this.dataSource.data=this.scores:this.dataSource.data=this.scores.filter(n=>n.ticketName===e),this.clearSelection()}
2clearSelection(){this.dataSource.data.forEach(e=>e.checked=!1),this.refreshSelectedCount()}getFilterDisplayText(){return this.currentFilter==="all"?"Filter":this.currentFilter}getInitials(e,n){return(e?.charAt(0)||"")+(n?.charAt(0)||"")}getRankClass(e){return typeof e=="number"?e===1?"rank-1":e===2?"rank-2":e===3?"rank-3":"rank-other":"rank-other"}getStatusClass(e){return e.optOutGamification?"status-opted-out":e.hidden?"status-hidden":"status-visible"}getStartIndex(){return this.paginator?this.paginator.pageIndex*this.paginator.pageSize+1:0}getEndIndex(){if(!this.paginator)return 0;let e=(this.paginator.pageIndex+1)*this.paginator.pageSize;return Math.min(e,this.getTotalResults())}getTotalResults(){return this.dataSource.filteredData.length}getIndividualLeaderboardUrl(){let e=window.location.pathname.split("/");return`${window.location.host}/external/${e[2]}/leaderboard`}getTeamLeaderboardUrl(){let e=window.location.pathname.split("/");return`${window.location.host}/external/${e[2]}/team-leaderboard`}savePageSettings(e){return S(this,null,function*(){try{if(e.bannerUrl=this.pageSettingsData?.bannerUrl||"",e.bannerObj){let i=yield this.eventService.upload(e.bannerObj);e.bannerUrl=i.data}let n=yield this.settingService.updatePageSettings(this.page,e);this.saveTcSettings(),n&&n.success?(this.pageSettingsData=n.data,this.pageSettings=V({},n.data),this.toast.showSuccess("Success","Page settings saved successfully"),this.closeSettings()):this.toast.showDanger("Error","Error saving page settings. "+(n.message?n.message:""))}catch(n){console.error("Error saving page settings:",n),this.toast.showDanger("Error","An unexpected error occurred while saving page settings.")}finally{this.isSettingsSaving=!1}})}saveTcSettings(){return S(this,null,function*(){try{let e="";this.tcContent&&(e=yield this.gamificationService.uploadTcContent(this.tcContent)),yield this.gamificationService.setSettings({key:"termsAndConditions",value:{enabled:this.tcEnabled,buttonLabel:this.tcButtonLabel.trim()||"Terms & Conditions",contentUrl:e}})}catch{this.toast.showDanger("Error","Failed to save Terms & Conditions.")}})}saveSettings(){return S(this,null,function*(){this.isSettingsSaving=!0;try{this.activeSettingsTab==="page"?this.pageSettingsForm?this.pageSettingsForm.formSubmit():this.isSettingsSaving=!1:this.activeSettingsTab==="external"?(this.externalLeaderboardSettings&&(yield this.externalLeaderboardSettings.save()).success&&(this.closeSettings(),this.toast.showSuccess("Success","External leaderboard settings saved successfully")),this.isSettingsSaving=!1):this.activeSettingsTab==="app"?(yield this.saveAllLeaderboardSettings(),this.closeSettings(),this.isSettingsSaving=!1):(yield new Promise(e=>setTimeout(e,500)),this.closeSettings(),this.toast.showSuccess("Success","Settings saved successfully"),this.isSettingsSaving=!1)}catch(e){console.error("Error saving settings:",e),this.toast.showDanger("Error","An error occurred while saving settings."),this.isSettingsSaving=!1}})}onNavChange(e){this.activeSettingsTab=e.nextId}onExternalLeaderboardSave(e){this.gamifyExternalPageSettings=V(V({},this.gamifyExternalPageSettings),e)}onBlockAttendeeType(e){return S(this,null,function*(){if(e.target.checked)this.blockedAttendeeTypes.push(e.target.value);else{let n=0;this.blockedAttendeeTypes.forEach(i=>{if(i===e.target.value){this.blockedAttendeeTypes.splice(n,1);return}n++})}yield this.gamificationService.setSettings({key:"blockedAttendeeTypes",value:this.blockedAttendeeTypes}),this.toast.showSuccess("Success","Blocked attendee types updated."),yield this.loadGamificationSettings()})}loadGamificationSettings(){return S(this,null,function*(){try{this.gamificationSettings=yield this.gamificationService.listSettings();let e=this.gamificationSettings.find(b=>b.SK==="blockedAttendeeTypes")?.value;this.blockedAttendeeTypes=e||[];let n=this.gamificationSettings.find(b=>b.SK==="attendeeTypeLeaderboard")?.value;typeof n<"u"&&(this.attendeeTypeLeaderboardEnabled=n);let i=this.gamificationSettings.find(b=>b.SK==="overallLeaderboard")?.value;typeof i<"u"&&(this.overallLeaderboardEnabled=i);let s=this.gamificationSettings.find(b=>b.SK==="termsAndConditions")?.value;if(s&&typeof s=="object")if(this.tcEnabled=s.enabled??!1,this.tcButtonLabel=s.buttonLabel||"Terms & Conditions",s.contentUrl)try{let x=yield(yield fetch(s.contentUrl)).json();this.tcContent=x.content||""}catch{this.tcContent=""}else this.tcContent=s.content||"";let h=this.gamificationSettings.find(b=>b.SK==="leaderboardDisplaySettings")?.value;h&&typeof h=="object"&&(typeof h.showLeaderboard<"u"&&(this.showLeaderboard=h.showLeaderboard),typeof h.hiddenMessage<"u"&&(this.leaderboardHiddenMessage=h.hiddenMessage),typeof h.scheduleStart<"u"&&(this.leaderboardScheduleStart=h.scheduleStart,this.leaderboardScheduleForm.get("startDateTime")?.setValue(h.scheduleStart)),typeof h.scheduleEnd<"u"&&(this.leaderboardScheduleEnd=h.scheduleEnd,this.leaderboardScheduleForm.get("endDateTime")?.setValue(h.scheduleEnd)))}catch(e){console.error("Error loading gamification settings:",e),this.toast.showDanger("Error","Failed to load gamification settings.")}finally{this.isAppLeaderboardSettingsLoading=!1}})}static{this.\u0275fac=function(n){return new(n||t)(w(X),w(Ve),w(mt),w(Ve),w(hi),w(tt),w(dt),w(R),w(Ci),w(Ri),w(Fi),w(ct),w($t),w(Mi),w(gi),w(Xi))}}static{this.\u0275cmp=I({type:t,selectors:[["ng-component"]],viewQuery:function(n,i){if
vendor: 4,344 bytes, line 2
2(n&1&&(j(ve,5),j(J,5),j(pt,5),j(Be,5)),n&2){let s;U(s=K())&&(i.paginator=s.first),U(s=K())&&(i.sort=s.first),U(s=K())&&(i.pageSettingsForm=s.first),U(s=K())&&(i.externalLeaderboardSettings=s.first)}},decls:120,vars:38,consts:[["noNickName",""],["settingsNav","ngbNav"],["pageSettingsForm",""],[1,"container-fluid"],[1,"page-header"],[1,"header-content"],[1,"page-title"],[1,"header-description"],[1,"header-actions"],[1,"btn","btn-secondary",3,"click"],[1,"bi","bi-gear"],["routerLink","rules-list",1,"btn","btn-primary"],[1,"bi","bi-list-task"],["routerLink","teams",1,"btn","btn-primary"],[1,"bi","bi-people"],["class","stats-section",4,"ngIf"],[1,"tabs-section"],[1,"tabs-header"],[1,"tab",3,"click"],["id","individual-tab",1,"table-section"],[1,"table-toolbar","mt-2"],[1,"toolbar-row"],[1,"selection-controls"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"selected-count"],[1,"selection-actions"],["ngbDropdown","",1,"d-inline-block"],["ngbDropdownToggle","",1,"btn","btn-outline"],[1,"bi","bi-eye"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click"],[1,"bi","bi-eye-slash"],[1,"bi","bi-person-check"],[1,"bi","bi-box-arrow-in-right"],[1,"bi","bi-box-arrow-right"],[1,"btn","btn-danger-text",3,"click"],[1,"bi","bi-arrow-clockwise"],[1,"toolbar-right"],[1,"toolbar-controls"],[1,"btn","btn-primary",3,"click"],[1,"bi","bi-plus"],["ngbDropdownToggle","",1,"btn","btn-outline",3,"disabled"],["class","spinner-grow spinner-grow-sm",4,"ngIf"],["class","bi bi-download",4,"ngIf"],[1,"bi","bi-funnel"],[1,"filter-text"],["ngbDropdownMenu","",1,"filter-dropdown-menu"],["class","dropdown-divider",4,"ngIf"],["ngbDropdownItem","",3,"active","click",4,"ngFor","ngForOf"],[1,"search-container"],[1,"bi","bi-search","search-icon"],["type","text","placeholder","Search attendees...",1,"search-input",3,"keyup"],["mat-table","","matSort","","matSortActive","rank","matSortDirection","asc",1,"data-table",3,"dataSource"],["matColumnDef","checked"],["class","checkbox-cell","mat-header-cell","",4,"matHeaderCellDef"],["class","checkbox-cell","mat-cell","",4,"matCellDef"],["matColumnDef","rank"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","attendee"],["matColumnDef","company"],["matColumnDef","jobTitle"],["matColumnDef","status"],["matColumnDef","score"],["mat-header-cell","","mat-sort-header","","style","text-align: right",4,"matHeaderCellDef"],["mat-cell","","style","text-align: right",3,"click",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected",4,"matRowDef","matRowDefColumns"],["class","mx-auto my-5","diameter","40",4,"ngIf"],[1,"pagination-container"],[1,"pagination-controls"],["showFirstLastButtons","",3,"pageSizeOptions"],["id","team-tab",1,"table-section"],["class","modal","tabindex","-1",3,"ngClass","click",4,"ngIf"],[1,"stats-section"],[1,"stats-grid"],["ngbTooltip","Number of attendees currently participating in gamification",1,"stat-card"],[1,"stat-number"],[1,"stat-label"],[1,"info-icon"],["ngbTooltip","Total points awarded across all attendees through rules and manual awards",1,"stat-card"],["ngbTooltip","Average points earned per participating attendee",1,"stat-card"],[1,"spinner-grow","spinner-grow-sm"],[1,"bi","bi-download"],[1,"dropdown-divider"],["mat-header-cell","",1,"checkbox-cell"],["type","checkbox",1,"table-checkbox","form-check-input",3,"change","checked"],["mat-cell","",1,"checkbox-cell"],["type","checkbox",1,"table-checkbox","form-check-input",3,"change","click","checked"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"click"],[1,"rank-badge",3,"ngClass"],[4,"ngIf"],["class","bi bi-eye-slash",4,"ngIf"],["class","bi bi-x-circle",4,"ngIf"],[1,"bi","bi-x-circle"],[1,"attendee-info"],["class","attendee-avatar",4,"ngIf"],["class","attendee-avatar","loading","lazy",3,"src","alt",4,"ngIf"],[1,"attendee-details"],[4,"ngIf","ngIfElse"],[1,"attendee-avatar"],["loading","lazy",1,"attendee-avatar",3,"src","alt"],[1,"name-link",3,"click"],[1,"status-badge",3,"ngClass"],["mat-header-cell","","mat-sort-header","",2,"text-align","right"],["mat-cell","",2,"text-align","right",3,"click"],[1,"points-badge"],["mat-header-row",""],["mat-row",""],["diameter","40",1,"mx-auto","my-5"],["tabindex","-1",1,"modal",3,"click","ngClass"],[1,"modal-dialog","modal
2-lg","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button",1,"btn-close",3,"click"],[1,"modal-body"],["ngbNav","",1,"nav-tabs",3,"navChange"],["ngbNavItem","page"],["ngbNavLink",""],["ngbNavContent",""],["ngbNavItem","external"],["ngbNavItem","app"],["ngbNavItem","others"],[1,"mt-3",3,"ngbNavOutlet"],[1,"modal-footer"],[1,"settings-section"],[1,"settings-section","mb-4"],[3,"save","data","page","groupSpeakersByType","overwriteGroupSpeakerSort","showModalFooter","showBanner","descriptionEditor"],[1,"my-4"],[1,"fw-bold","mb-3"],[1,"text-muted","mb-3"],[1,"d-flex","justify-content-between","mb-3","align-items-center"],[1,"me-2"],["placement","bottom","container","body","ngbTooltip","Enable or disable the Terms & Conditions link on the gamification page. Content is preserved when disabled.",1,"mt-1","help-tooltips","top--2"],[1,"bi","bi-question-circle"],["aria-label","Terms and conditions toggle",1,"btn-group"],["type","button",1,"btn",3,"click"],[1,"mb-3"],["for","tcButtonLabel",1,"form-label"],["type","text","id","tcButtonLabel","placeholder","Terms & Conditions","maxlength","100",1,"form-control",3,"ngModelChange","ngModel"],[1,"form-text","text-muted"],["for","tcContentEditor",1,"form-label"],["id","tcContentEditor",3,"ngModelChange","init","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"fw-bold"],[1,"text-muted","mb-4"],["for","individual-leaderboard-url",1,"form-label"],[1,"input-group"],["type","text","id","individual-leaderboard-url","readonly","",1,"form-control",3,"value"],[1,"btn","btn-outline-secondary",3,"click"],[1,"bi","bi-clipboard"],["for","team-leaderboard-url",1,"form-label"],["type","text","id","team-leaderboard-url","readonly","",1,"form-control",3,"value"],[3,"saveComplete","detail","showActions"],[1,"settings-section","position-relative"],[1,"loading-overlay","d-flex","align-items-center","justify-content-center"],["placement","bottom","container","body","ngbTooltip","Control whether the leaderboard is visible to attendees in the app. 'Show' displays the leaderboard, 'Scheduled' shows it based on the set dates, and 'Hide' displays the custom message.",1,"mt-1","help-tooltips","top--2"],["aria-label","Display leaderboard toggle",1,"btn-group"],[1,"my-3"],[1,"mb-3","px-3"],["for","leaderboardHiddenMessage",1,"form-label"],["placeholder","Enter a message to display when the leaderboard is hidden...",1,"w-100",3,"ngModelChange","modules","ngModel"],[1,"d-flex","justify-content-between","mt-1"],[1,"text-danger"],[1,"text-muted"],[1,"d-flex","justify-content-between","mb-2","align-items-center"],["placement","top","container","body","ngbTooltip","Enable this feature if you wish to split up the leader board by attendee type. Tabs will be created per attendee type;  attendees can see how well they are doing compared to other attendees in their attendee type.",1,"mt-1","help-tooltips","top--2"],["aria-label","Menu button",1,"btn-group"],["type","button",1,"btn","btn-success",3,"click","value"],["type","button",1,"btn","btn-light",3,"click","value"],[1,"text-center"],[1,"spinner-border","text-primary"],[1,"visually-hidden"],[1,"mt-2","text-muted"],[1,"col-md-6"],["label","Start Date & Time","name","startDateTime",3,"group","isFormGroup","required","timezone","timezoneLabel"],["label","End Date & Time","name","endDateTime",3,"group","isFormGroup","required","timezone","timezoneLabel"],[1,"text-danger","mt-2"],["placement","top","container","body","ngbTooltip","This feature controls the showing of the overall leaderboard when attendee-type leaderboards are enabled.",1,"mt-1","help-tooltips","top--2"],[1,"text-muted","m-1"],["class","row",4,"ngIf"],["placement","top","container","body","ngbTooltip","Block specific attendee types from earning points in gamification. Blocked attendee types will not gain points from any rules.",1,"mt-1","help-tooltips","top--2"],["ngbDropdown","","placement","bottom-right","container","body",1,"d-inline-block"],["id","attendeeTypeForm","ngbDropdownToggle","","title","Configure which attendee types are blocked from gaining points",1,"btn","btn-primary",3,"click"],["ngbDropdownMenu","","aria-labelledby","attendeeTypeForm",1,"p-3","attendee-type-dropdown-menu"],["class","form-group",4,"ngFor","ngForOf"],[1,"form-group"],[1,"m-0","d-block"],["type","checkbox",1,"form-check-input",3,"click","value","checked"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"spinner-grow","spinner-grow-sm","me-1"]],template:function(n,i){n&1&&(a(0,"div",3)(1,"div",4)(2,"div",5)(3,"div")(4,"h1",6),r(5,"Gamification"),o(),a(6,"p",7),r(7," Incentivize attendee participation by gamifying your event with automated rules to award points for completing certain tasks. "),o()(),a(8,"div",8)(9,"button",9),p("click",function(){return i.openSettings()}),_(10,"i",10),r(11," Settings "),o(),a(12,"button",11),_(13,"i",12),r(14," Manage rules"),o(),a(15,"button",13),_(16,"i",14),r(17," Manage teams"),o()()()(),f(18,Wa,23,3,"div",15),a(19,"div",16)(20,"div",17)(21,"button",18),p("click",function(){return i.showTab("individual")}),r(22," Individual leaderboard "),o(),a(23,"button",18),p("click",function(){return i.showTab("team")}),r(24,"Team leaderboard"),o()(),a(25,"div",19)(26,"div",20)(27,"div",21)(28,"div",22)(29,"input",23),p("change",function(h){return i.selectAll(h.target.checked)}),o(),a(30,"span",24),r(31),o(),a(32,"div",25)(33,"div",26)(34,"button",27),_(35,"i",28),r(36," Visibility "),o(),a(37,"div",29)(38,"button",30),p("click",function(){return i.batchHideScores(0)}),_(39,"i",28),r(40," Show"),o(),a(41,"button",30),p("click",function(){return i.batchHideScores(1)}),_(42,"i",31),r(43," Hide"),o()()(),a(44,"div",26)(45,"button",27),_(46,"i",32),r(47," Participation "),o(),a(48,"div",29)(49,"button",30),p("click",function(){return i.batchOpting(!0)}),_(50,"i",33),r(51," Opt in "),o(),a(52,"button",30),p("click",function(){return i.batchOpting(!1)}),_(53,"i",34),r(54," Opt out "),o()()(),a(55,"button",35),p("click",function(){return i.batchResetScores()}),_(56,"i",36),r(57," Reset score "),o()()(),a(58,"div",37)(59,"div",38)(60,"button",39),p("click",function(){return i.addPoint()}),_(61,"i",40),r(62," Award points "),o(),a(63,"div",26)(64,"button",41),N(65,"async"),f(66,$a,1,0,"span",42),N(67,"async"),f(68,za,1,0,"i",43),N(69,"async"),r(70," Export "),o(),a(71,"div",29)(72,"button",30),p("click",function(){return i.export()}),r(73,"Overview"),o(),a(74,"button",30),p("click",function(){return i.exportDetailed()}),r(75,"Detailed"),o()()(),a(76,"div",26)(77,"button",27),_(78,"i",44),a(79,"span",45),r(80),o()(),a(81,"div",46)(82,"button",30),p("click",function(){return i.applyFilter("all")}),r(83," All attendees "),o(),f(84,ja,1,0,"div",47)(85,Ua,2,3,"button",48),o()(),a(86,"div",49),_(87,"i",50),a(88,"input",51),p("keyup",function(h){return i.filter(h)}),o()()()()()(),a(89,"table",52),M(90,53),f(91,Ka,2,1,"th",54)(92,qa,2,1,"td",55),E(),M(93,56),f(94,Xa,2,0,"th",57)(95,Za,5,4,"td",58),E(),M(96,59),f(97,er,2,0,"th",57)(98,ar,8,4,"td",58),E(),M(99,60),f(100,rr,2,0,"th",57)(101,lr,2,1,"td",58),E(),M(102,61),f(103,sr,2,0,"th",57)(104,dr,2,1,"td",58),E(),M(105,62),f(106,cr,2,0,"th",57)(107,ur,5,4,"td",58),E(),M(108,63),f(109,_r,2,0,"th",64)(110,hr,3,1,"td",65),E(),f(111,fr,1,0,"tr",66)(112,br,1,2,"tr",67),o(),f(113,vr,1,0,"mat-spinner",68),a(114,"div",69)(115,"div",70),_(116,"mat-paginator",71),o()()(),a(117,"div",72),_(118,"app-team-leaderboard"),o()()(),f(119,Ar,28,5,"div",73)),n&2&&(l(18),m("ngIf",i.stats),l(3),v("active",i.activeTab==="individual"),l(2),v("active",i.activeTab==="team"),l(2),v("hidden",i.activeTab!=="individual"),l(),v("selection-mode",i.hasSelection),l(2),v("active",i.hasSelection),l(),m("checked",i.isAllSelected),l(2),L("",i.selectedCount," selected"),l(33),m("disabled",A(65,31,i.isExportLoading$)),l(2),m("ngIf",A(67,33,i.isExportLoading$)),l(2),m("ngIf",A(69,35,i.isExportLoading$)===!1),l(12),k(i.getFilterDisplayText()),l(2),v("active",i.currentFilter==="all"),l(2),m("ngIf",i.distinctTicketNames.length>0),l(),m("ngForOf",i.distinctTicketNames),l(4),v("selection-mode",i.hasSelection),m("dataSource",i.dataSource),l(22),m("matHeaderRowDef",i.displayedColumns),l(),m("matRowDefColumns",i.displayedColumns),l(),m("ngIf",i.isLoading),l(3),m("pageSizeOptions",Xe(37,Ra)),l(),v("hidden",i.activeTab!=="team"),l(2),m("ngIf",i.showSettingsModal))},dependencies:[Kt,te,st,ii,ti,ei,Zt,Jt,me,Ce,J,Se,ye,Pe,we,ke,xe,Ye,Me,Te,Ee,Oe,be,ve,bt,ot,nt,oi,rt,at,it,pt,Be,Oi,ci,si,q,ne,oe,Yt,Xt,lt,ie],styles:["table[_ngcontent-%COMP%], mat-form-field[_ngcontent-%COMP%]{width:100%}.attendee-image[_ngcontent-%COMP%]{width:40px;height:40px;margin-top:4px;border-radius:20px}.name-link[_ngcontent-%COMP%]{cursor:pointer}.dropdown-item.active[_ngcontent-%COMP%]{background-color:#304966!important;color:#fff!important}.filter-dropdown-menu[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto;overflow-x:hidden}.attendee-type-dropdown-menu[_ngcontent-%COMP%]{min-width:250px;max-height:300px;overflow-y:auto;z-index:1050}[_nghost-%COMP%]     .ql-align-center{text-align:center}[_nghost-%COMP%]     .ql-align-justify{text-align:justify}[_nghost-%COMP%]     .ql-align-right{text-align:right}.container[_ngcontent-%COMP%]{max-width:1400px;margin:0 auto;padding:20px}.page-header[_ngcontent-%COMP%]{background:#fff;padding:24px;border-radius:8px;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014;margin-bottom:24px}.header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.page-title[_ngcontent-%COMP%]{font-size:24px;font-weight:600;color:#082e4a;margin-bottom:8px}.header-description[_ngcontent-%COMP%]{font-size:16px;color:#6c757d;margin:0;width:95%}.header-actions[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center;flex-shrink:0}.btn[_ngcontent-%COMP%]{padding:8px 16px;border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;display:inline-flex;align-items:center;gap:8px;transition:all .2s;white-space:nowrap}.btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;pointer-events:none}.btn-primary[_ngcontent-%COMP%]{background:#144673;color:#fff}.btn-secondary[_ngcontent-%COMP%]{background:transparent;color:#144673;border:1px solid #dee2e6}.btn-secondary[_ngcontent-%COMP%]:hover{background:#f1f3f5;border-color:#082e4a;color:#082e4a}.btn-outline[_ngcontent-%COMP%]{background:transparent;border:1px solid #dee2e6;color:#495057}
2.btn-outline[_ngcontent-%COMP%]:hover{background:#f1f3f5;border-color:#082e4a;color:#082e4a}.btn-danger-text[_ngcontent-%COMP%]{background:transparent;color:#ef4444}.btn-danger-text[_ngcontent-%COMP%]:hover{background:#ef44441a}.stats-section[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014;padding:24px;margin-bottom:24px}.stats-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:24px}.stat-card[_ngcontent-%COMP%]{text-align:center;padding:20px;border-radius:8px;background:#f8f9fa;transition:all .2s}.stat-card[_ngcontent-%COMP%]:hover{background:#f1f3f5;transform:translateY(-2px)}.stat-number[_ngcontent-%COMP%]{font-size:36px;font-weight:700;color:#144673;margin-bottom:8px}.stat-label[_ngcontent-%COMP%]{font-size:14px;color:#6c757d;font-weight:500}.tabs-section[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 2px 4px #0000001a;overflow:hidden;margin-bottom:24px}.tabs-header[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid #e9ecef}.tab[_ngcontent-%COMP%]{flex:1;padding:16px 24px;background:transparent;border:none;cursor:pointer;font-size:14px;font-weight:500;color:#666;transition:all .2s;border-bottom:3px solid transparent}.tab.active[_ngcontent-%COMP%]{color:#144673;border-bottom-color:#144673;background:#f8f9fa}.tab[_ngcontent-%COMP%]:hover{background:#f8f9fa}.table-section[_ngcontent-%COMP%]{background:#fff;border-radius:8px;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014;overflow:hidden;min-height:400px}.table-toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:16px 24px;border-bottom:1px solid #e9ecef;transition:all .3s}.table-toolbar.selection-mode[_ngcontent-%COMP%]{background:#e3f2fd}.toolbar-row[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:16px;flex-wrap:wrap}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .toolbar-row[_ngcontent-%COMP%]{justify-content:space-between}.toolbar-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;flex:1;min-width:0}.toolbar-right[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.toolbar-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.selection-controls[_ngcontent-%COMP%]{display:none;align-items:center;gap:16px;justify-self:flex-start}.selection-controls.active[_ngcontent-%COMP%]{display:flex}.selected-count[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:#144673;margin-top:5px}.selection-actions[_ngcontent-%COMP%]{display:flex;gap:8px}.search-container[_ngcontent-%COMP%]{position:relative;width:250px;
2min-width:200px}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .search-container[_ngcontent-%COMP%]{width:200px;min-width:180px}.search-input[_ngcontent-%COMP%]{width:100%;padding:10px 16px 10px 40px;border:1px solid #dee2e6;border-radius:6px;background-color:#fff;font-size:14px;transition:all .2s}.search-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#144673;box-shadow:0 0 0 .2rem #0e1e3240}.search-icon[_ngcontent-%COMP%]{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#6c757d;font-size:20px}.material-icons[_ngcontent-%COMP%]{font-size:20px;vertical-align:middle}.data-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.data-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#f8f9fa;padding:12px 16px;font-weight:600;color:#495057;text-align:left;font-size:14px;border-bottom:2px solid #e9ecef;-webkit-user-select:none;user-select:none}.data-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{padding:16px;border-bottom:1px solid #e9ecef;font-size:14px}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]{transition:background .2s;cursor:pointer}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]:hover{background:#f8f9fa}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.selected[_ngcontent-%COMP%]{background:#0e1e3214}.data-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr.selected[_ngcontent-%COMP%]:hover{background:#0e1e321f}.bulk-actions[_ngcontent-%COMP%]{align-items:center;background-color:#144673;color:#fff;padding:12px 16px;border-radius:8px;margin-bottom:16px;justify-content:space-between}.bulk-count[_ngcontent-%COMP%]{font-weight:500}.bulk-buttons[_ngcontent-%COMP%]{display:flex;gap:8px}.bulk-button[_ngcontent-%COMP%]{background-color:#fff3;border:none;color:#fff;padding:6px 10px;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;gap:4px}.bulk-button[_ngcontent-%COMP%]:hover{background-color:#ffffff4d}.bulk-button[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;pointer-events:none}.bulk-button[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:16px}.attendee-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.attendee-avatar[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;background:#144673;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px}.attendee-details[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{font-weight:600;margin-bottom:2px;color:#212529}.attendee-details[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#6c757d;font-size:13px;margin:0}.rank-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;font-weight:600;font-size:14px}.rank-badge[_ngcontent-%COMP%]   .bi[_ngcontent-%COMP%]{font-size:16px}.rank-badge.rank-1[_ngcontent-%COMP%]{background:gold;color:#333}.rank-badge.rank-2[_ngcontent-%COMP%]{background:silver;color:#333}.rank-badge.rank-3[_ngcontent-%COMP%]{background:#cd7f32;color:#fff}.rank-badge.rank-other[_ngcontent-%COMP%]{background:#f8f9fa;color:#666}.points-badge[_ngcontent-%COMP%]{background:#144673;color:#fff;padding:6px 12px;border-radius:16px;font-weight:600;font-size:13px}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:16px;font-size:13px;font-weight:600}.status-visible[_ngcontent-%COMP%]{background:#10b98126;color:#10b981}.status-hidden[_ngcontent-%COMP%]{background:#ef444426;color:#ef4444}.status-opted-in[_ngcontent-%COMP%]{background:#3b82f626;color:#3b82f6}.status-opted-out[_ngcontent-%COMP%]{background:#f59e0b26;color:#f59e0b}.hidden[_ngcontent-%COMP%]{display:none}@media (max-width: 768px){.header-content[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:16px}.header-actions[_ngcontent-%COMP%]{width:100%;justify-content:stretch}.header-actions[_ngcontent-%COMP%]   .btn[_ngcontent-%COMP%]{flex:1}.toolbar-row[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:12px}.toolbar-left[_ngcontent-%COMP%], .toolbar-right[_ngcontent-%COMP%]{width:100%;justify-content:center}
2.toolbar-controls[_ngcontent-%COMP%]{justify-content:center}.search-container[_ngcontent-%COMP%]{width:100%;max-width:none}.stats-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.attendee-info[_ngcontent-%COMP%]{flex-direction:column;text-align:center}.selection-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .toolbar-row[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .toolbar-right[_ngcontent-%COMP%]{order:1;margin-left:0;margin-bottom:12px}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .selection-controls[_ngcontent-%COMP%]{order:2;margin-bottom:0;flex-direction:column;align-items:stretch;gap:8px}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .selection-controls[_ngcontent-%COMP%]   .selected-count[_ngcontent-%COMP%]{text-align:center;padding:8px 0}.table-toolbar.selection-mode[_ngcontent-%COMP%]   .selection-controls[_ngcontent-%COMP%]   .selection-actions[_ngcontent-%COMP%]{justify-content:center;flex-wrap:wrap;gap:8px}}@media (max-width: 1200px){.toolbar-right[_ngcontent-%COMP%]{flex-wrap:wrap}.search-container[_ngcontent-%COMP%]{width:200px}}.loading-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background-color:#fffc;z-index:1000}"]})}}return t})();var Ir=[{path:"",component:vt},{path:"teams",loadChildren:()=>import("./chunk-SCZRFF6Z.js").then(t=>t.TeamsModule)},{path:"rules-list",loadChildren:()=>import("./chunk-FHMUWHWQ.js").then(t=>t.RulesListModule)},{path:"point-recalculation",loadComponent:()=>import("./chunk-PZB76AKB.js").then(t=>t.PointRecalculationComponent),canDeactivate:[t=>t?.canDeactivate()??!0]},{path:"settings",loadChildren:()=>import("./chunk-YFMWAAPR.js").then(t=>t.SettingsModule)}],xn=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=We({type:t})}static{this.\u0275inj=He({imports:[xt.forChild(Ir),xt]})}}return t})();var js=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275mod=We({type:t})}static{this.\u0275inj=He({imports:[zt,xn,q,ae,ki,Si,Pi,vi,Bi,ni,Qt,ri,qi,wi,Ki,Ji,Ui,xi,Ni,yi,$i,Ei,Qi,Ai,ui,Vi,ai,fi,Wi,li,Zi,Gi,Li,mi,vt,ut,ft,Be,bt]})}}return t})();export{js as GamificationModule};

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.