1"use strict";(self.webpackChunkbass_kingdom=self.webpackChunkbass_kingdom||[]).push([[3077],{56915:(W,R,_)=>{_.d(R,{N:()=>o});var c=_(15861),O=_(59657),A=_(10708),z=_(78645),v=_(83620),T=_(269),t=_(65879),F=_(19347),h=_(72901),P=_(96814),u=_(56223),N=_(43181),e=_(75986),I=_(32296);function C(r,i){if(1&r&&(t.TgZ(0,"option",30),t._uU(1),t.qZA()),2&r){const n=i.$implicit,a=t.oxw(2);t.Q6J("ngValue",n),t.xp6(1),t.hij(" ",a.getEntryLabel(n)," ")}}function S(r,i){if(1&r&&(t.TgZ(0,"option",30),t._uU(1),t.qZA()),2&r){const n=i.$implicit;t.Q6J("ngValue",n),t.xp6(1),t.AsE(" ",null==n?null:n.first_name," ",null==n?null:n.last_name," ")}}function w(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",11)(1,"div",12),t._uU(2,"Paid By"),t.qZA(),t.TgZ(3,"select",13),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(2);return t.KtG(p.selectedUser=s)}),t.YNc(4,S,2,3,"option",15),t.qZA()()}if(2&r){const n=t.oxw(2);t.xp6(3),t.Q6J("ngModel",n.selectedUser),t.xp6(1),t.Q6J("ngForOf",n.teamMembers)}}function G(r,i){if(1&r&&(t.TgZ(0,"div",11)(1,"div",12),t._uU(2,"Paid By"),t.qZA(),t.TgZ(3,"div",31),t._uU(4),t.qZA()()),2&r){const n=t.oxw(2);t.xp6(4),t.AsE("",null==n.selectedUser?null:n.selectedUser.first_name," ",null==n.selectedUser?null:n.selectedUser.last_name,"")}}function Q(r,i){if(1&r&&(t.TgZ(0,"div",11)(1,"div",12),t._uU(2,"Paid To"),t.qZA(),t.TgZ(3,"div",31),t._uU(4),t.qZA()()),2&r){const n=t.oxw(2);t.xp6(4),t.Oqu(n.directorName)}}const j=function(){return{standalone:!0}};function at(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",35)(1,"span",36),t._uU(2,"$"),t.qZA(),t.TgZ(3,"input",37),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw().$implicit;return t.KtG(p.amount=s)})("wheel",function(s){return s.preventDefault()}),t.qZA()()}if(2&r){const n=t.oxw().$implicit;t.xp6(3),t.Q6J("ngModel",n.amount)("ngModelOptions",t.DdM(2,j))}}function st(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",32)(1,"mat-checkbox",33),t.NdJ("ngModelChange",function(s){const d=t.CHM(n).$implicit;return t.KtG(d.checked=s)}),t._uU(2),t.qZA(),t.YNc(3,at,4,3,"div",34),t.qZA()}if(2&r){const n=i.$implicit;t.ekj("checked",n.checked),t.xp6(1),t.Q6J("ngModel",n.checked)("ngModelOptions",t.DdM(6,j)),t.xp6(1),t.hij(" ",n.type," "),t.xp6(1),t.Q6J("ngIf",n.checked)}}function et(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",38)(1,"mat-checkbox",33),t.NdJ("ngModelChange",function(s){const d=t.CHM(n).$implicit;return t.KtG(d.checked=s)}),t.TgZ(2,"input",39),t.NdJ("ngModelChange",function(s){const d=t.CHM(n).$implicit;return t.KtG(d.type=s)})("click",function(s){return s.stopPropagation()}),t.qZA()(),t.TgZ(3,"div",35)(4,"span",36),t._uU(5,"$"),t.qZA(),t.TgZ(6,"input",37),t.NdJ("ngModelChange",function(s){const d=t.CHM(n).$implicit;return t.KtG(d.amount=s)})("wheel",function(s){return s.preventDefault()}),t.qZA()(),t.TgZ(7,"button",40),t.NdJ("click",function(){const p=t.CHM(n).index,d=t.oxw(2);return t.KtG(d.removeCustomItem(p))}),t.TgZ(8,"span",4),t._uU(9,"close"),t.qZA()()()}if(2&r){const n=i.$implicit;t.xp6(1),t.Q6J("ngModel",n.checked)("ngModelOptions",t.DdM(6,j)),t.xp6(1),t.Q6J("ngModel",n.type)("ngModelOptions",t.DdM(7,j)),t.xp6(4),t.Q6J("ngModel",n.amount)("ngModelOptions",t.DdM(8,j))}}function nt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",10)(1,"div",11)(2,"div",12),t._uU(3,"Team"),t.qZA(),t.TgZ(4,"select",13),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.selectedEntry=s)})("ngModelChange",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.onEntrySelected())}),t.TgZ(5,"option",14),t._uU(6,"Select a registered team..."),t.qZA(),t.YNc(7,C,2,2,"option",15),t.qZA()(),t.YNc(8,w,5,2,"div",16),t.YNc(9,G,5,2,"div",16),t.YNc(10,Q,5,1,"div",16),t.TgZ(11,"div",11)(12,"div",12),t._uU(13,"Direction"),t.qZA(),t.TgZ(14,"div",17)(15,"button",18),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.debitOrCredit="credit")}),t.TgZ(16,"span",19),t._uU(17,"arrow_upward"),t.qZA(),t._uU(18," Credit "),t.qZA(),t.TgZ(19,"button",18),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.debitOrCredit="debit")}),t.TgZ(20,"span",19),t._uU(21,"arrow_downward"),t.qZA(),t._uU(22," Debit "),t.qZA()()(),t.TgZ(23,"div",11)(24,"div",12),t._uU(25,"Status"),t.qZA(),t.TgZ(26,"div",20)(27,"button",18),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.status="completed")}),t._uU(28,"Completed"),t.qZA(),t.TgZ(29,"button",18),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.status="Initiated")}),t._uU(30,"Incomplete"),t.qZA(),t.TgZ(31,"button",18),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.status="processing")}),t._uU(32,"Processing"),t.qZA()()(),t.TgZ(33,"div",11)(34,"div",12),t._uU(35,"Description "),t.TgZ(36,"span",21),t._uU(37,"optional"),t.qZA()(),t.TgZ(38,"textarea",22),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.description=s)}),t.qZA()(),t.TgZ(39,"div",11)(40,"div",12),t._uU(41,"Line Items"),t.qZA(),t.YNc(42,st,4,7,"div",23),t.YNc(43,et,10,9,"div",24),t.TgZ(44,"button",25),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.addCustomItem())}),t.TgZ(45,"span",4),t._uU(46,"add"),t.qZA(),t._uU(47," Add Custom Item "),t.qZA()(),t.TgZ(48,"div",26)(49,"div",27)(50,"span",28),t._uU(51,"Total"),t.qZA(),t.TgZ(52,"span",29),t._uU(53),t.ALo(54,"currency"),t.qZA()()()()}if(2&r){const n=t.oxw();
1t.xp6(4),t.Q6J("ngModel",n.selectedEntry),t.xp6(1),t.Q6J("ngValue",null),t.xp6(2),t.Q6J("ngForOf",n.entries),t.xp6(1),t.Q6J("ngIf",n.teamMembers.length>1),t.xp6(1),t.Q6J("ngIf",n.selectedEntry&&1===n.teamMembers.length),t.xp6(1),t.Q6J("ngIf",n.selectedEntry),t.xp6(5),t.ekj("active-credit","credit"===n.debitOrCredit),t.xp6(4),t.ekj("active-debit","debit"===n.debitOrCredit),t.xp6(8),t.ekj("active","completed"===n.status),t.xp6(2),t.ekj("active-warn","Initiated"===n.status),t.xp6(2),t.ekj("active","processing"===n.status),t.xp6(7),t.Q6J("ngModel",n.description),t.xp6(4),t.Q6J("ngForOf",n.lineItemTypes),t.xp6(1),t.Q6J("ngForOf",n.customItems),t.xp6(10),t.Oqu(t.lcZ(54,20,n.runningTotal))}}function ct(r,i){1&r&&(t.TgZ(0,"div",41),t._UZ(1,"section-loading-displayer",42),t.qZA()),2&r&&(t.xp6(1),t.Q6J("loadingLabel","Loading")("loadingText","Loading tournament entries..."))}let x=(()=>{class r{constructor(n,a,s,p){this.dialogRef=n,this._paymentService=a,this._tournamentEntryService=s,this._sharedUtilsService=p,this.entries=[],this.selectedEntry=null,this.selectedUser=null,this.teamMembers=[],this.debitOrCredit="credit",this.status="completed",this.description="",this.lineItemTypes=[{type:"Entry Fee",checked:!1,amount:0},{type:"Big Fish Pot",checked:!1,amount:0},{type:"Side Pot",checked:!1,amount:0},{type:"Admin Fees",checked:!1,amount:0},{type:"Membership",checked:!1,amount:0},{type:"Main Pot Payout",checked:!1,amount:0},{type:"Side Pot Payout",checked:!1,amount:0}],this.customItems=[],this.saving=!1,this.loading=!0}ngOnInit(){this.loadEntries()}loadEntries(){var n=this;return(0,c.Z)(function*(){const a=new T.y0;a.tournament=n.currentTournament._id;try{n.entries=yield(0,A.lastValueFrom)(n._tournamentEntryService.search(a))}catch(s){console.log("Error loading entries: ",s),n.entries=[]}n.loading=!1})()}onEntrySelected(){const n=this.selectedEntry;n&&(this.teamMembers=[],n.team?.captain&&this.teamMembers.push(n.team.captain),n.team?.coanglers?.length&&this.teamMembers.push(...n.team.coanglers),!this.teamMembers.length&&n.team?.users?.length&&(this.teamMembers=[...n.team.users].filter(a=>a&&a._id)),!this.teamMembers.length&&n.users?.length&&(this.teamMembers=[...n.users].filter(a=>a&&a._id)),this.selectedUser=n.boatCaptain||this.teamMembers[0]||null)}getEntryLabel(n){const a=n?.team?.captain||n?.boatCaptain,s=a?`${a.first_name||""} ${a.last_name||""}`.trim():"Team",p=n?.team?.coanglers?.length||0;return p>0?`${s} + ${p} co-angler${p>1?"s":""}`:s}get directorName(){const n=this.currentTournament?.director;return n?.first_name?`${n.first_name} ${n.last_name||""}`.trim():"Tournament Director"}get runningTotal(){return[...this.lineItemTypes,...this.customItems].filter(a=>a.checked).reduce((a,s)=>a+(parseFloat(s.amount)||0),0)}get isValid(){const n=[...this.lineItemTypes,...this.customItems].some(a=>a.checked&&a.amount>0);return!!(this.selectedEntry&&this.selectedUser&&n)}addCustomItem(){this.customItems.push({type:"",checked:!0,amount:0})}removeCustomItem(n){this.customItems.splice(n,1)}createPayment(){var n=this;return(0,c.Z)(function*(){if(!n.isValid||n.saving)return;n.saving=!0;const a=new T.F6;a.user=n.selectedUser._id||n.selectedUser,a.recipientOfPayment=n.currentTournament.director?._id||n.currentTournament.director,a.status=n.status,a.debitOrCredit=n.debitOrCredit,a.paymentForType="Tournament",a.sourceModuleRecord=n.currentTournament._id,a.description=n.description,a.team=n.selectedEntry?.team?._id||n.selectedEntry?.team;const s=[...n.lineItemTypes,...n.customItems];a.items=s.filter(p=>p.checked&&p.amount>0).map(p=>({type:p.type||"Custom",cost:parseFloat(p.amount)||0,description:p.type||"Custom"})),a.amount=n.runningTotal;try{const p=yield(0,A.lastValueFrom)(n._paymentService.create(a));n._sharedUtilsService.showNotification("Payment created successfully."),n.dialogRef.close(p)}catch(p){console.log("Error creating payment: ",p),n._sharedUtilsService.showNotification("Error creating payment. Please try again."),n.saving=!1}})()}close(){this.dialogRef.close(null)}static{this.\u0275fac=function(a){return new(a||r)(t.Y36(F.so),t.Y36(h.te),t.Y36(h.OB),t.Y36(h.n3))}}static{this.\u0275cmp=t.Xpm({type:r,selectors:[["create-payment-dialog"]],decls:15,vars:4,consts:[[1,"cp-dialog"],[1,"cp-header"],[1,"cp-title"],[1,"cp-close-btn",3,"click"],[1,"material-symbols-outlined"],["class","cp-body",4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"cp-footer"],["mat-stroked-button","",3,"click"],["mat-flat-button","","color","primary",3,"disabled","click"],[1,"cp-body"],[1,"cp-section"],[1,"section-label"],[1,"cp-native-select",3,"ngModel","ngModelChange"],["disabled","",3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],["class","cp-section",4,"ngIf"],[1,"cp-segmented-toggle"],[1,"cp-seg-btn",3,"click"],[1,"material-symbols-outlined","seg-icon"],[1,"cp-segmented-toggle","three-way"],[1,"optional-tag"],["placeholder","Add a note about this payment...",1,"cp-native-textarea",3,"ngModel","ngModelChange"],["class","ts-pot-item",3,"checked",4,"ngFor","ngForOf"],["class","ts-pot-item checked",4,"ngFor","ngForOf"],[1,"t
1s-add-custom-btn",3,"click"],[1,"ts-total-card"],[1,"ts-total-row"],[1,"ts-total-label"],[1,"ts-total-value"],[3,"ngValue"],[1,"cp-readonly-field"],[1,"ts-pot-item"],["color","primary",3,"ngModel","ngModelOptions","ngModelChange"],["class","ts-item-amount",4,"ngIf"],[1,"ts-item-amount"],[1,"ts-dollar-sign"],["type","number","placeholder","0.00","min","0","step","0.01",1,"ts-amount-input",3,"ngModel","ngModelOptions","ngModelChange","wheel"],[1,"ts-pot-item","checked"],["type","text","placeholder","Custom item name",1,"ts-custom-type-input",3,"ngModel","ngModelOptions","ngModelChange","click"],["title","Remove item",1,"ts-remove-custom",3,"click"],[1,"cp-body","cp-loading"],[3,"loadingLabel","loadingText"]],template:function(a,s){if(1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"h3",2),t._uU(3,"Create Payment"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){return s.close()}),t.TgZ(5,"span",4),t._uU(6,"close"),t.qZA()()(),t.YNc(7,nt,55,22,"div",5),t.YNc(8,ct,2,2,"ng-template",null,6,t.W1O),t.TgZ(10,"div",7)(11,"button",8),t.NdJ("click",function(){return s.close()}),t._uU(12,"Cancel"),t.qZA(),t.TgZ(13,"button",9),t.NdJ("click",function(){return s.createPayment()}),t._uU(14),t.qZA()()()),2&a){const p=t.MAs(9);t.xp6(7),t.Q6J("ngIf",!s.loading)("ngIfElse",p),t.xp6(6),t.Q6J("disabled",!s.isValid||s.saving),t.xp6(1),t.hij(" ",s.saving?"Creating...":"Create Payment"," ")}},dependencies:[P.sg,P.O5,u.YN,u.Kr,u.Fj,u.wV,u.EJ,u.JJ,u.qQ,u.On,N.O,e.oG,I.lW,P.H9],styles:["[_nghost-%COMP%]{display:block;color:#1a2b3c}.cp-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:85vh}.cp-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 16px;border-bottom:1px solid #e0e4e8}.cp-title[_ngcontent-%COMP%]{font-size:20px;font-weight:800;color:#0a3d62;letter-spacing:-.3px;margin:0}.cp-close-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:6px;cursor:pointer;color:#6b8a9a;transition:all .15s ease}.cp-close-btn[_ngcontent-%COMP%]:hover{background:#f5f7fa;color:#1a2b3c}.cp-close-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:20px}.cp-body[_ngcontent-%COMP%]{padding:20px 24px;overflow-y:auto;flex:1}.cp-body.cp-loading[_ngcontent-%COMP%]{min-height:200px;display:flex;align-items:center;justify-content:center}.cp-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid #e0e4e8}.cp-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border-radius:8px;font-weight:700}.section-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.8px;color:#6b8a9a;margin-bottom:8px;padding-left:2px}.optional-tag[_ngcontent-%COMP%]{font-weight:500;text-transform:lowercase;letter-spacing:0;font-style:italic;color:#89a2af}.cp-section[_ngcontent-%COMP%]{margin-bottom:20px}.cp-native-select[_ngcontent-%COMP%]{display:block;width:100%;padding:10px 36px 10px 14px;border:1px solid #e0e4e8;border-radius:8px;background:white;font-size:14px;font-weight:500;color:#1a2b3c;cursor:pointer;-webkit-appearance:none;appearance:none;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b8a9a' stroke-width='2' fill='none'/%3E%3C/svg%3E\");background-repeat:no-repeat;background-position:right 14px center;transition:border-color .15s ease}.cp-native-select[_ngcontent-%COMP%]:focus{outline:none;border-color:#008afc;box-shadow:0 0 0 3px #008afc1a}.cp-native-select[_ngcontent-%COMP%]:hover{border-color:#c3cbd2}.cp-native-textarea[_ngcontent-%COMP%]{display:block;width:100%;padding:10px 14px;border:1px solid #e0e4e8;border-radius:8px;background:white;font-size:14px;font-weight:500;color:#1a2b3c;font-family:inherit;min-height:64px;resize:vertical;transition:border-color .15s ease}.cp-native-textarea[_ngcontent-%COMP%]::placeholder{color:#89a2af}.cp-native-textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:#008afc;box-shadow:0 0 0 3px #008afc1a}.cp-native-textarea[_ngcontent-%COMP%]:hover{border-color:#c3cbd2}.cp-readonly-field[_ngcontent-%COMP%]{padding:10px 14px;border:1px solid #e0e4e8;border-radius:8px;background:#f5f7fa;font-size:14px;font-weight:600;
1color:#1a2b3c}.cp-segmented-toggle[_ngcontent-%COMP%]{display:flex;border:1px solid #e0e4e8;border-radius:8px;overflow:hidden;background:white}.cp-seg-btn[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border:none;background:white;font-size:13px;font-weight:600;color:#6b8a9a;cursor:pointer;transition:all .15s ease;border-right:1px solid #e0e4e8}.cp-seg-btn[_ngcontent-%COMP%]:last-child{border-right:none}.cp-seg-btn[_ngcontent-%COMP%]:hover{background:#f5f7fa}.cp-seg-btn[_ngcontent-%COMP%] .seg-icon[_ngcontent-%COMP%]{font-size:16px}.cp-seg-btn.active-credit[_ngcontent-%COMP%]{background:rgba(46,125,50,.08);color:#2e7d32;font-weight:700}.cp-seg-btn.active-debit[_ngcontent-%COMP%]{background:rgba(198,40,40,.08);color:#c62828;font-weight:700}.cp-seg-btn.active[_ngcontent-%COMP%]{background:rgba(0,138,252,.08);color:#008afc;font-weight:700}.cp-seg-btn.active-warn[_ngcontent-%COMP%]{background:rgba(245,127,23,.08);color:#e8720a;font-weight:700}.ts-pot-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:8px;margin-bottom:6px;background:#f5f7fa;border:1px solid transparent;transition:all .15s ease}.ts-pot-item[_ngcontent-%COMP%]:hover{border-color:#e0e4e8}.ts-pot-item.checked[_ngcontent-%COMP%]{background:rgba(46,125,50,.04);border-color:#2e7d3226}.ts-item-amount[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px;margin-left:auto;padding-left:12px}.ts-dollar-sign[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#6b8a9a}.ts-amount-input[_ngcontent-%COMP%]{width:90px;padding:6px 10px;border:1px solid #e0e4e8;border-radius:6px;background:white;font-size:14px;font-weight:600;color:#1a2b3c;text-align:right;font-variant-numeric:tabular-nums;transition:border-color .15s ease}.ts-amount-input[_ngcontent-%COMP%]:focus{outline:none;border-color:#008afc;box-shadow:0 0 0 2px #008afc1a}.ts-amount-input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .ts-amount-input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ts-custom-type-input[_ngcontent-%COMP%]{border:none;background:transparent;font-size:14px;font-weight:500;color:#1a2b3c;padding:0;width:140px}.ts-custom-type-input[_ngcontent-%COMP%]:focus{outline:none}.ts-custom-type-input[_ngcontent-%COMP%]::placeholder{color:#89a2af;font-style:italic}.ts-remove-custom[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;color:#6b8a9a;margin-left:4px;transition:all .15s ease}.ts-remove-custom[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.ts-remove-custom[_ngcontent-%COMP%]:hover{background:rgba(198,40,40,.08);color:#c62828}.ts-add-custom-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;border:1px dashed #e0e4e8;background:transparent;color:#6b8a9a;font-size:13px;font-weight:600;cursor:pointer;transition:all .15s ease;margin-top:4px}.ts-add-custom-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.ts-add-custom-btn[_ngcontent-%COMP%]:hover{border-color:#008afc;color:#008afc;background:rgba(0,138,252,.04)}.ts-total-card[_ngcontent-%COMP%]{border:2px solid #0a3d62;border-radius:10px;background:rgba(10,61,98,.03);padding:16px 20px;margin:20px 0 8px}.ts-total-card[_ngcontent-%COMP%] .ts-total-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.ts-total-card[_ngcontent-%COMP%] .ts-total-label[_ngcontent-%COMP%]{font-size:14px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#1a2b3c}.ts-total-card[_ngcontent-%COMP%] .ts-total-value[_ngcontent-%COMP%]{font-size:24px;font-weight:800;color:#0a3d62;letter-spacing:-.5px;font-variant-numeric:tabular-nums}@media (max-width: 480px){.cp-body[_ngcontent-%COMP%]{padding:16px}.cp-segmented-toggle[_ngcontent-%COMP%]{flex-direction:column}.cp-segmented-toggle[_ngcontent-%COMP%] .cp-seg-btn[_ngcontent-%COMP%]{border-right:none;border-bottom:1px solid #e0e4e8}.cp-segmented-toggle[_ngcontent-%COMP%] .cp-seg-btn[_ngcontent-%COMP%]:last-child{border-bottom:none}.ts-pot-item[_ngcontent-%COMP%]{flex-wrap:wrap;gap:8px}
1.ts-pot-item[_ngcontent-%COMP%] .ts-item-amount[_ngcontent-%COMP%]{margin-left:0;padding-left:26px}.ts-total-card[_ngcontent-%COMP%] .ts-total-value[_ngcontent-%COMP%]{font-size:20px}.ts-amount-input[_ngcontent-%COMP%]{width:80px}}"]})}}return r})();var E=_(23166);function b(r,i){if(1&r&&(t.ynx(0),t._uU(1),t.BQk()),2&r){const n=t.oxw(2);t.xp6(1),t.hij(" (",n.result.reused," re-sent with a fresh link)")}}function k(r,i){if(1&r&&(t.TgZ(0,"p",17),t._uU(1),t.qZA()),2&r){const n=i.$implicit;t.xp6(1),t.AsE("",n.name," \u2014 ",n.reason,"")}}function Z(r,i){if(1&r&&(t.TgZ(0,"div",14)(1,"p",15),t._uU(2,"Skipped:"),t.qZA(),t.YNc(3,k,2,2,"p",16),t.qZA()),2&r){const n=t.oxw(2);t.xp6(3),t.Q6J("ngForOf",n.result.skipped)}}function B(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",9)(1,"span",10),t._uU(2,"mark_email_read"),t.qZA(),t.TgZ(3,"p",11)(4,"strong"),t._uU(5),t.qZA(),t._uU(6),t.YNc(7,b,2,1,"ng-container",8),t._uU(8,". "),t.qZA(),t.YNc(9,Z,4,1,"div",12),t.TgZ(10,"button",13),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.close())}),t._uU(11,"Done"),t.qZA()()}if(2&r){const n=t.oxw();t.xp6(5),t.Oqu(n.result.emailed),t.xp6(1),t.hij(" ",1===n.result.emailed?"request":"requests"," emailed"),t.xp6(1),t.Q6J("ngIf",n.result.reused),t.xp6(2),t.Q6J("ngIf",null==n.result.skipped?null:n.result.skipped.length)}}function L(r,i){if(1&r&&(t.TgZ(0,"span",35),t._uU(1),t.qZA()),2&r){const n=t.oxw(2);t.xp6(1),t.hij("",n.selected.length," selected")}}function X(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"input",36),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(2);return t.KtG(p.filter=s)}),t.qZA()}if(2&r){const n=t.oxw(2);t.Q6J("ngModel",n.filter)}}function tt(r,i){if(1&r&&(t.TgZ(0,"span",44),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.email)}}function pt(r,i){1&r&&(t.TgZ(0,"span",45),t._uU(1,"no email on file"),t.qZA())}function Ct(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"label",39)(1,"input",40),t.NdJ("ngModelChange",function(s){const d=t.CHM(n).$implicit;return t.KtG(d.checked=s)}),t.qZA(),t.TgZ(2,"span",41),t._uU(3),t.qZA(),t.YNc(4,tt,2,1,"span",42),t.YNc(5,pt,2,0,"span",43),t.qZA()}if(2&r){const n=i.$implicit;t.xp6(1),t.Q6J("ngModel",n.checked),t.xp6(2),t.Oqu(n.name),t.xp6(1),t.Q6J("ngIf",n.email),t.xp6(1),t.Q6J("ngIf",!n.email)}}function wt(r,i){1&r&&(t.TgZ(0,"p",46),t._uU(1,"No anglers match."),t.qZA())}function vt(r,i){if(1&r&&(t.TgZ(0,"div",37),t.YNc(1,Ct,6,4,"label",38),t.YNc(2,wt,2,0,"p",31),t.qZA()),2&r){const n=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",n.filteredAnglers)("ngForTrackBy",n.trackByAngler),t.xp6(1),t.Q6J("ngIf",!n.filteredAnglers.length)}}function Mt(r,i){1&r&&(t.TgZ(0,"p",46),t._uU(1,"Loading the roster\u2026"),t.qZA())}function Ot(r,i){if(1&r){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",18)(2,"div",19)(3,"label",20),t._uU(4,"Amount per angler"),t.qZA(),t.TgZ(5,"div",21)(6,"span",22),t._uU(7,"$"),t.qZA(),t.TgZ(8,"input",23),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.amount=s)}),t.qZA()()(),t.TgZ(9,"div",19)(10,"label",24),t._uU(11,"Reason"),t.qZA(),t.TgZ(12,"input",25),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.reason=s)}),t.qZA(),t.TgZ(13,"span",26),t._uU(14,"Shown in the email, on the pay page, and on the payment record."),t.qZA()(),t.TgZ(15,"div",19)(16,"label",27),t._uU(17,"Anglers "),t.YNc(18,L,2,1,"span",28),t.qZA(),t.YNc(19,X,1,1,"input",29),t.YNc(20,vt,3,3,"div",30),t.YNc(21,Mt,2,0,"p",31),t.qZA()(),t.TgZ(22,"div",32)(23,"button",33),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.close())}),t._uU(24,"Cancel"),t.qZA(),t.TgZ(25,"button",34),t.NdJ("click",function(){t.CHM(n);const s=t.oxw();return t.KtG(s.send())}),t._uU(26),t.ALo(27,"currency"),t.qZA()(),t.BQk()}if(2&r){const n=t.oxw();t.xp6(8),t.Q6J("ngModel",n.amount),t.xp6(4),t.Q6J("ngModel",n.reason),t.xp6(6),t.Q6J("ngIf",n.selected.length),t.xp6(1),t.Q6J("ngIf",n.anglers.length>6),t.xp6(1),t.Q6J("ngIf",!n.loading),t.xp6(1),t.Q6J("ngIf",n.loading),t.xp6(4),t.Q6J("disabled",!n.isValid||n.sending),t.xp6(1),t.hij(" ",n.sending?"Sending\u2026":n.selected.length?"Request "+t.lcZ(27,8,n.amount||0)+" from "+n.selected.length+(1===n.selected.length?" angler":" anglers"):"Request payment"," ")}}let ut=(()=>
1{class r{constructor(n,a,s,p){this.dialogRef=n,this._tournamentEntryService=a,this._paymentRequests=s,this._sharedUtilsService=p,this.anglers=[],this.filter="",this.amount=null,this.reason="",this.loading=!0,this.sending=!1,this.result=null}ngOnInit(){this.loadAnglers()}loadAnglers(){var n=this;return(0,c.Z)(function*(){const a=new T.y0;a.tournament=n.currentTournament._id;let s=[];try{s=yield(0,A.lastValueFrom)(n._tournamentEntryService.search(a))}catch(d){console.log("Error loading entries: ",d)}const p=new Map;for(const d of s||[]){const g=[...d.users||[],d.team?.captain,...d.team?.coanglers||[]].filter(f=>f&&f._id);for(const f of g){const y=String(f._id);p.has(y)||p.set(y,{_id:y,name:`${f.first_name||""} ${f.last_name||""}`.trim()||"Unknown angler",email:f.email||"",checked:!1})}}n.anglers=[...p.values()].sort((d,g)=>d.name.localeCompare(g.name)),n.loading=!1})()}get filteredAnglers(){const n=this.filter.trim().toLowerCase();return n?this.anglers.filter(a=>a.name.toLowerCase().includes(n)||a.email.toLowerCase().includes(n)):this.anglers}get selected(){return this.anglers.filter(n=>n.checked)}get isValid(){return this.selected.length>0&&Number(this.amount)>0&&!!this.reason.trim()}send(){var n=this;return(0,c.Z)(function*(){if(n.isValid&&!n.sending){n.sending=!0;try{const a=yield(0,A.lastValueFrom)(n._paymentRequests.send({tournament:n.currentTournament._id},n.selected.map(s=>s._id),Number(n.amount),n.reason.trim()));n.result=a}catch(a){console.log("Error sending payment requests: ",a),n._sharedUtilsService.showNotification(a?.error?.message||"Could not send those requests.")}finally{n.sending=!1}}})()}close(){this.dialogRef.close(!!this.result)}trackByAngler(n,a){return a._id}static{this.\u0275fac=function(a){return new(a||r)(t.Y36(F.so),t.Y36(h.OB),t.Y36(E.g),t.Y36(h.n3))}}static{this.\u0275cmp=t.Xpm({type:r,selectors:[["request-payment-dialog"]],decls:12,vars:2,consts:[[1,"rpd-wrap"],[1,"rpd-head"],[1,"rpd-head-text"],[1,"rpd-title"],[1,"rpd-subtitle"],["type","button","aria-label","Close",1,"rpd-icon-btn",3,"click"],[1,"material-symbols-outlined"],["class","rpd-body rpd-result",4,"ngIf"],[4,"ngIf"],[1,"rpd-body","rpd-result"],[1,"material-symbols-outlined","rpd-result-icon"],[1,"rpd-result-line"],["class","rpd-skips",4,"ngIf"],["type","button",1,"rpd-primary",3,"click"],[1,"rpd-skips"],[1,"rpd-skips-title"],["class","rpd-skip",4,"ngFor","ngForOf"],[1,"rpd-skip"],[1,"rpd-body"],[1,"rpd-field"],["for","rpd-amount",1,"rpd-label"],[1,"rpd-amount-wrap"],[1,"rpd-amount-symbol"],["id","rpd-amount","type","number","min","1","step","0.01","placeholder","25.00",1,"rpd-input","rpd-amount",3,"ngModel","ngModelChange"],["for","rpd-reason",1,"rpd-label"],["id","rpd-reason","type","text","maxlength","140","placeholder","Team Series entry \u2014 remaining balance",1,"rpd-input",3,"ngModel","ngModelChange"],[1,"rpd-hint"],[1,"rpd-label"],["class","rpd-count",4,"ngIf"],["class","rpd-input","type","text","placeholder","Filter by name or email",3,"ngModel","ngModelChange",4,"ngIf"],["class","rpd-anglers",4,"ngIf"],["class","rpd-empty",4,"ngIf"],[1,"rpd-foot"],["type","button",1,"rpd-secondary",3,"click"],["type","button",1,"rpd-primary",3,"disabled","click"],[1,"rpd-count"],["type","text","placeholder","Filter by name or email",1,"rpd-input",3,"ngModel","ngModelChange"],[1,"rpd-anglers"],["class","rpd-angler",4,"ngFor","ngForOf","ngForTrackBy"],[1,"rpd-angler"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"rpd-angler-name"],["class","rpd-angler-email",4,"ngIf"],["class","rpd-angler-email rpd-no-email",4,"ngIf"],[1,"rpd-angler-email"],[1,"rpd-angler-email","rpd-no-email"],[1,"rpd-empty"]],template:function(a,s){1&a&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),t._uU(4,"Request a payment"),t.qZA(),t.TgZ(5,"span",4),t._uU(6,"Each angler gets an email with a secure link to pay this amount."),t.qZA()(),t.TgZ(7,"button",5),t.NdJ("click",function(){return s.close()}),t.TgZ(8,"span",6),t._uU(9,"close"),t.qZA()()(),t.YNc(10,B,12,4,"div",7),t.YNc(11,Ot,28,10,"ng-container",8),t.qZA()),2&a&&(t.xp6(10),t.Q6J("ngIf",s.result),t.xp6(1),t.Q6J("ngIf",!s.result))},dependencies:[P.sg,P.O5,u.Fj,u.wV,u.Wl,u.JJ,u.nD,u.qQ,u.On,P.H9],styles:[".rpd-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:min(92vw,460px);max-height:82vh}.rpd-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:14px 16px 10px;border-bottom:1px solid var(--wb-border)}.rpd-head-text[_ngcontent-%COMP%]{flex:1;min-width:0}.rpd-title[_ngcontent-%COMP%]{margin:0;font-size:1.02rem;color:var(--wb-text)}.rpd-subtitle[_ngcontent-%COMP%]{font-size:.8rem;color:var(--wb-text-3)}.rpd-icon-btn[_ngcontent-%COMP%]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:none;border-radius:50%;background:transparent;color:var(--wb-text-3);cursor:pointer}.rpd-icon-btn[_ngcontent-%COMP%]:hover{background:var(--wb-surface-hover, #eef1f4)}.rpd-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:14px}.rpd-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.rpd-label[_ngcontent-%COMP%]{font-size:.82rem;font-weight:600;color:var(--wb-text)}.rpd-count[_ngcontent-%COMP%]{margin-left:6px;font-weight:700;color:var(--wb-accent)}.rpd-input[_ngcontent-%COMP%]{height:42px;padding:0 12px;border:1px solid var(--wb-border);border-radius:var(--wb-radius-md);background:var(--wb-surface);font-family:inherit;font-size:16px;color:var(--wb-text)}.rpd-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--wb-accent);box-shadow:var(--wb-focus)}.rpd-amount-wrap[_ngcontent-%COMP%]{position:relative}.rpd-amount-wrap[_ngcontent-%COMP%] .rpd-amount-symbol[_ngcontent-%COMP%]{position:absolute;
1left:12px;top:50%;transform:translateY(-50%);font-weight:700;color:var(--wb-text-3)}.rpd-amount-wrap[_ngcontent-%COMP%] .rpd-amount[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding-left:26px}.rpd-hint[_ngcontent-%COMP%]{font-size:.74rem;color:var(--wb-text-4)}.rpd-anglers[_ngcontent-%COMP%]{max-height:240px;overflow-y:auto;border:1px solid var(--wb-border);border-radius:var(--wb-radius-md)}.rpd-angler[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--wb-tg-border-hairline);cursor:pointer}.rpd-angler[_ngcontent-%COMP%]:last-child{border-bottom:0}.rpd-angler[_ngcontent-%COMP%]:hover{background:var(--wb-surface-hover, #f6f7f9)}.rpd-angler[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{flex:none;width:17px;height:17px;accent-color:var(--wb-accent)}.rpd-angler-name[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:.88rem;font-weight:600;color:var(--wb-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rpd-angler-email[_ngcontent-%COMP%]{flex:none;max-width:45%;font-size:.74rem;color:var(--wb-text-4);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rpd-no-email[_ngcontent-%COMP%]{color:var(--wb-warning);font-weight:600}.rpd-empty[_ngcontent-%COMP%]{margin:0;padding:12px;font-size:.84rem;color:var(--wb-text-3)}.rpd-foot[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;border-top:1px solid var(--wb-border)}.rpd-primary[_ngcontent-%COMP%]{height:40px;padding:0 16px;border:0;border-radius:var(--wb-radius-md);background:var(--wb-accent);color:var(--wb-on-accent);font-family:inherit;font-size:.88rem;font-weight:700;cursor:pointer}.rpd-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--wb-accent-hover)}.rpd-primary[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.rpd-secondary[_ngcontent-%COMP%]{height:40px;padding:0 14px;border:1px solid var(--wb-border);border-radius:var(--wb-radius-md);background:var(--wb-surface);color:var(--wb-text-2);font-family:inherit;font-size:.88rem;font-weight:600;cursor:pointer}.rpd-secondary[_ngcontent-%COMP%]:hover{background:var(--wb-surface-hover, #f6f7f9)}.rpd-result[_ngcontent-%COMP%]{align-items:center;text-align:center;padding:22px 16px 18px}.rpd-result-icon[_ngcontent-%COMP%]{font-size:40px;color:var(--wb-success)}.rpd-result-line[_ngcontent-%COMP%]{margin:8px 0 0;font-size:.92rem;color:var(--wb-text)}.rpd-skips[_ngcontent-%COMP%]{width:100%;margin-top:8px;padding:10px 12px;border:1px solid var(--wb-border);border-radius:var(--wb-radius-md);text-align:left}.rpd-skips-title[_ngcontent-%COMP%]{margin:0 0 4px;font-size:.78rem;font-weight:700;color:var(--wb-warning)}.rpd-skip[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--wb-text-2)}"]})}}return r})();var lt=_(35420),mt=_(52805),_t=_(85890),ft=_(12338),Tt=_(50404),ot=_(30617),kt=_(92596),Zt=_(66464);function At(r,i){if(1&r&&(t.TgZ(0,"span",12),t._uU(1),t.ALo(2,"currency"),t.qZA()),2&r){const n=t.oxw();t.xp6(1),t.hij(" ",t.gM2(2,1,n.owed,"USD","symbol","1.0-0")," owed ")}}function Ut(r,i){if(1&r&&(t.TgZ(0,"div",13)(1,"div",14)(2,"div",15),t._uU(3,"Paid"),t.qZA(),t.TgZ(4,"div",16),t._uU(5),t.ALo(6,"currency"),t.qZA()(),t.TgZ(7,"div",14)(8,"div",15),t._uU(9,"Won"),t.qZA(),t.TgZ(10,"div",17),t._uU(11),t.ALo(12,"currency"),t.qZA()(),t.TgZ(13,"div",14)(14,"div",15),t._uU(15,"Incomplete"),t.qZA(),t.TgZ(16,"div",16),t._uU(17),t.ALo(18,"currency"),t.qZA()()()),2&r){const n=t.oxw();t.xp6(5),t.Oqu(t.gM2(6,7,n.totalPaid,"USD","symbol","1.0-0")),t.xp6(6),t.Oqu(t.gM2(12,12,n.totalWon,"USD","symbol","1.0-0")),t.xp6(2),t.ekj("is-owed-card",n.owed>0),t.xp6(3),t.ekj("is-owed",n.owed>0),t.xp6(1),t.Oqu(t.gM2(18,17,n.owed,"USD","symbol","1.0-0"))}}function St(r,i){if(1&r&&(t.TgZ(0,"span",32),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.subtitle)}}function qt(r,i){if(1&r&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.hij(" \xb7 to ",n.recipientName,"")}}function It(r,i){if(1&r&&(t.TgZ(0,"span",33),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.Q6J("ngClass",n.status),t.xp6(1),t.Oqu(n.statusLabel)}}function Ft(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(2);return t.KtG(d.openTxn(p))}),t.TgZ(1,"span",22)(2,"span",23),t._uU(3),t.qZA()(),t.TgZ(4,"span",24)(5,"span",25),t._uU(6),t.qZA(),t.YNc(7,St,2,1,"span",26),t.TgZ(8,"span",27),t._uU(9),t.ALo(10,"date"),t.YNc(11,qt,2,1,"span",28),t.qZA()(),t.TgZ(12,"span",29)(13,"span",30),t._uU(14),t.ALo(15,"currency"),t.qZA(),t.YNc(16,It,2,2,"span",31),t.qZA()()}if(2&r){const n=i.$implicit;t.ekj("is-won","won"===n.kind)("is-static","won"===n.kind),t.xp6(1),t.Q6J("ngClass",n.kind),t.xp6(2),t.Oqu("won"===n.kind?"emoji_events":"receipt_long"),t.xp6(3),t.Oqu(n.title),t.xp6(1),t.Q6J("ngIf",n.subtitle),t.xp6(2),t.Oqu(t.xi3(10,14,n.date,"MMM d, y")),t.xp6(2),t.Q6J("ngIf",n.recipientName),t.xp6(2),t.Q6J("ngClass",n.kind),t.xp6(1),t.AsE("","
1won"===n.kind?"+":"\u2212","",t.lcZ(15,17,n.amount),""),t.xp6(2),t.Q6J("ngIf","paid"===n.kind&&"completed"!==n.status)}}function zt(r,i){if(1&r&&(t.TgZ(0,"div",34)(1,"span",23),t._uU(2,"account_balance_wallet"),t.qZA(),t.TgZ(3,"p"),t._uU(4),t.qZA()()),2&r){const n=t.oxw(2);t.xp6(4),t.Oqu("won"===n.activeFilter?"No winnings yet - cash a check to see it here.":"owed"===n.activeFilter?"No incomplete payments. You're all paid up.":"paid"===n.activeFilter?"No payments yet.":"No payments yet. Entry fees and winnings will show up here.")}}function Nt(r,i){if(1&r&&(t.TgZ(0,"div",18),t.YNc(1,Ft,17,19,"button",19),t.YNc(2,zt,5,1,"div",20),t.qZA()),2&r){const n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.pagedTxns)("ngForTrackBy",n.trackByTxn),t.xp6(1),t.Q6J("ngIf",!n.filtered.length)}}const Et=function(){return[25,50,100]};function Jt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"admin-grid-pagination",35),t.NdJ("pageChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.onPageChange(s))})("pageSizeChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.onPageSizeChange(s))}),t.qZA()}if(2&r){const n=t.oxw();t.Q6J("page",n.page)("pageSize",n.pageSize)("total",n.filtered.length)("pageSizeOptions",t.DdM(4,Et))}}function Dt(r,i){if(1&r&&(t.TgZ(0,"div",36)(1,"span",23),t._uU(2,"account_balance_wallet"),t.qZA(),t.TgZ(3,"p"),t._uU(4),t.qZA()()),2&r){const n=t.oxw();t.xp6(4),t.Oqu("won"===n.activeFilter?"No winnings yet - cash a check to see it here.":"owed"===n.activeFilter?"No incomplete payments. You're all paid up.":"paid"===n.activeFilter?"No payments yet.":"No payments yet. Entry fees and winnings will show up here.")}}function Yt(r,i){if(1&r&&(t.TgZ(0,"span",48),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.subtitle)}}function dt(r,i){1&r&&(t.TgZ(0,"span",49),t._uU(1,"Won"),t.qZA())}function Rt(r,i){if(1&r&&(t.TgZ(0,"span",50),t._uU(1),t.qZA()),2&r){const n=t.oxw().$implicit;t.Q6J("ngClass",n.status),t.xp6(1),t.Oqu(n.statusLabel)}}function gt(r,i){if(1&r&&(t.TgZ(0,"div",37)(1,"span",38)(2,"span",23),t._uU(3),t.qZA()(),t.TgZ(4,"div",39)(5,"span",40),t._uU(6),t.qZA(),t.YNc(7,Yt,2,1,"span",41),t.qZA()(),t.TgZ(8,"div",42),t._uU(9),t.ALo(10,"date"),t.qZA(),t.TgZ(11,"div",43),t.YNc(12,dt,2,0,"span",44),t.YNc(13,Rt,2,2,"span",45),t.qZA(),t.TgZ(14,"div",46)(15,"span",47),t._uU(16),t.ALo(17,"currency"),t.qZA()()),2&r){const n=i.$implicit;t.xp6(1),t.Q6J("ngClass",n.kind),t.xp6(2),t.Oqu("won"===n.kind?"emoji_events":"receipt_long"),t.xp6(3),t.Oqu(n.title),t.xp6(1),t.Q6J("ngIf",n.subtitle),t.xp6(2),t.Oqu(t.xi3(10,10,n.date,"MMM d, y")),t.xp6(3),t.Q6J("ngIf","won"===n.kind),t.xp6(1),t.Q6J("ngIf","paid"===n.kind),t.xp6(2),t.Q6J("ngClass",n.kind),t.xp6(1),t.AsE("","won"===n.kind?"+":"\u2212","",t.lcZ(17,13,n.amount),"")}}const ht=function(){return["#6aa84f","#3B6D11"]};let Qt=(()=>{class r{constructor(n,a,s,p,d){this._authService=n,this._userService=a,this._paymentService=s,this._tournamentEntryService=p,this.router=d,this.baseRoute="/angler",this.isLoading=!0,this.txns=[],this.filtered=[],this.activeFilter="all",this.totalPaid=0,this.totalWon=0,this.owed=0,this.columns=[{key:"title",label:"Description",align:"left",skeletonWidth:180},{key:"date",label:"Date",sortable:!0,align:"left",skeletonWidth:90},{key:"status",label:"Status",align:"center",skeletonWidth:70},{key:"amount",label:"Amount",sortable:!0,align:"right",skeletonWidth:70}],this.filterChips=[{key:"paid",label:"Payments",color:"#185fa5"},{key:"won",label:"Winnings",color:"#2f7d32"},{key:"owed",label:"Incomplete",color:"#b23b3b"}],this.sortField="date",this.sortDir="desc",this.page=1,this.pageSize=25,this.rowClassFn=g=>"won"===g.kind?"is-won-row":"is-paid-row"}ngOnInit(){this.currentUser=this._authService.getCurrentlyLoggedInUser(),this.currentUser&&(this.baseRoute=this._userService.getRouteForUser(this.currentUser.userType)),this.load()}load(){var n=this;return(0,c.Z)(function*(){n.isLoading=!0;try{const[a,s]=yield Promise.all([n.fetchPayments(),n.fetchEntries()]),p=[];for(const g of a){if(g.voidedAt||"voided"===g.status)continue;const f=(g.items||[]).reduce((Y,U)=>Y+(U?.cost||0),0),y=(g.items||[]).map(Y=>
1Y?.type).filter(Boolean),q=g.status||"";p.push({kind:"paid",date:new Date(g.createdAt),title:g.relatedModuleRecord?.name||y[0]||"Payment",subtitle:y.join(" \xb7 "),amount:f,status:q,statusLabel:n.statusLabel(q),recipientName:n.recipientName(g),paymentId:g._id})}const d=O();for(const g of s){const f=g?.payout?.amount||0,y=g?.tournament;if(!y?._id||f<=0||!O(y.startDate).isBefore(d))continue;const q=g.payout?.position;p.push({kind:"won",date:new Date(y.endDate||y.startDate),title:y.name,subtitle:q?`${n.ordinal(q)} place`:"Payout",amount:f,status:"won",statusLabel:"Won",recipientName:""})}p.sort((g,f)=>f.date.getTime()-g.date.getTime()),n.txns=p,n.totalPaid=p.filter(g=>"paid"===g.kind&&"completed"===g.status).reduce((g,f)=>g+f.amount,0),n.owed=p.filter(g=>"paid"===g.kind&&"Initiated"===g.status).reduce((g,f)=>g+f.amount,0),n.totalWon=p.filter(g=>"won"===g.kind).reduce((g,f)=>g+f.amount,0),n.applyFilter(n.activeFilter)}catch(a){console.error("Angler payments load error:",a)}n.isLoading=!1})()}fetchPayments(){var n=this;return(0,c.Z)(function*(){const a=new T.F6;return a.user=n.currentUser._id,a.excludeVoided=!0,(yield(0,A.lastValueFrom)(n._paymentService.search(a)))||[]})()}fetchEntries(){var n=this;return(0,c.Z)(function*(){try{return((yield n._tournamentEntryService.getAnglersEntriesWithOnlineCheck(n.currentUser._id))||[]).filter(s=>s?.tournament?._id)}catch{return[]}})()}applyFilter(n){let a;this.activeFilter=n,a="paid"===n?this.txns.filter(s=>"paid"===s.kind):"won"===n?this.txns.filter(s=>"won"===s.kind):"owed"===n?this.txns.filter(s=>"paid"===s.kind&&"Initiated"===s.status):this.txns,this.filtered=this.sortList(a)}sortList(n){const a="asc"===this.sortDir?1:-1,s=this.sortField;return[...n].sort((p,d)=>(("amount"===s?p.amount:p.date.getTime())-("amount"===s?d.amount:d.date.getTime()))*a)}openTxn(n){"paid"===n.kind&&n.paymentId&&this.router.navigateByUrl(`${this.baseRoute}/payments/${n.paymentId}`)}get owedCount(){return this.txns.filter(n=>"paid"===n.kind&&"Initiated"===n.status).length}get chipCounts(){return{all:this.txns.length,paid:this.txns.filter(n=>"paid"===n.kind).length,won:this.txns.filter(n=>"won"===n.kind).length,owed:this.owedCount}}get activeKeys(){return"all"===this.activeFilter?[]:[this.activeFilter]}get pagedTxns(){const n=(this.page-1)*this.pageSize;return this.filtered.slice(n,n+this.pageSize)}onChipToggle(n){const a="all"===n||n===this.activeFilter?"all":n;this.page=1,this.applyFilter(a)}onSortChange(n){this.sortField=n.field,this.sortDir=n.dir,this.page=1,this.applyFilter(this.activeFilter)}onPageChange(n){this.page=n}onPageSizeChange(n){this.pageSize=n,this.page=1}recipientName(n){const a=n?.recipientOfPayment;return a?.first_name||a?.last_name?`${a.first_name||""} ${a.last_name||""}`.trim():""}statusLabel(n){switch(n){case"completed":return"Paid";case"Initiated":return"Incomplete";case"processing":return"Processing";case"voided":return"Voided";default:return n?n.charAt(0).toUpperCase()+n.slice(1):""}}ordinal(n){if(!n)return"";const a=["th","st","nd","rd"],s=n%100;return n+(a[(s-20)%10]||a[s]||a[0])}trackByTxn(n,a){return(a.paymentId||a.title)+a.date.getTime()}static{this.\u0275fac=function(a){return new(a||r)(t.Y36(h.e8),t.Y36(h.KD),t.Y36(h.te),t.Y36(h.OB),t.Y36(lt.F0))}}static{this.\u0275cmp=t.Xpm({type:r,selectors:[["angler-payments"]],decls:14,vars:22,consts:[[1,"admin-grid-page","ap-payments"],["heading","Payments","icon","payments","eyebrow","Angler \xb7 Payments",1,"ap-mast",3,"tint","context","showBack"],["class","wbh-chip is-warn","wbh-chip","",4,"ngIf"],[1,"tg-card"],["class","ap-summary",4,"ngIf"],[1,"tg-toolbar","ap-toolbar"],["allLabel","All",3,"chips","counts","activeKeys","chipToggle"],[1,"ap-table",3,"columns","rows","sortField","sortDir","loading","rowTemplate","trackBy","rowClassFn","sortChange","rowClick"],["class","ap-cards",4,"ngIf"],["class","ap-pagination",3,"page","pageSize","total","pageSizeOptions","pageChange","pageSizeChange",4,"ngIf"],["class","ap-empty ap-empty-desktop",4,"ngIf"],["rowTpl",""],["wbh-chip","",1,"wbh-chip","is-warn"],[1,"ap-summary"],[1,"ap-stat"],[1,"ap-stat-l"],[1,"ap-stat-v"],[1,"ap-stat-v","is-won"],[1,"ap-cards"],["type","button","class","ap-txn",3,"is-won","is-static","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","ap-empty",4,"ngIf"],["type","button",1,"ap-txn",3,"click"],[1,"ap-txn-ic",3,"ngClass"],[1,"material-symbols-outlined"],[1,"ap-txn-main"],[1,"ap-txn-title"],["class","ap-txn-sub",4,"ngIf"],[1,"ap-txn-meta"],[4,"ngIf"],[1,"ap-txn-right"],[1,"ap-txn-amt",3,"ngClass"],["class","ap-txn-badge",3,"ngClass",4,"ngIf"],[1,"ap-txn-sub"],[1,"ap-txn-badge",3,"ngClass"],[1,"ap-empty"],[1,"ap-pagination",3,"page","pageSize","total","pageSizeOptions","pageChange","pageSizeChange"],[1,"ap-empty","ap-empty-desktop"],[1,"admin-grid-cell","ap-c-desc"],[1,"ap-row-ic",3,"ngClass"],[1,"ap-row-titles"],[1,"ap-row-title"],["class","ap-row-sub",4,"ngIf"],[1,"admin-grid-cell","ap-c-date"],[1,"admin-grid-cell","ap-c-status","align-center"],["class","ap-badge won",4,"ngIf"],["class","ap-badge",3,"ngClass",4,"ngIf"],[1,"admin-grid-cell","ap-c-amount","align-right"],[1,"ap-amt",3,"ngClass"],[1,"ap-row-sub"],[1,"ap-badge","won"],[1,"ap-badge",3,"ngClass"]],template:function(a,s){if(1&a&&(t.TgZ(0,"div",0)(1,"wb-header",1),t.ALo(2,"number"),t.YNc(3,At,3,6,"span",2),t.qZA(),t.TgZ(4,"div",3),t.YNc(5,Ut,19,22,"div",4),t.TgZ(6,"div",5)(7,"admin-grid-chips",6),t.NdJ("chipToggle",function(d){return s.onChipToggle(d)}),t.qZA()(),t.TgZ(8,"admin-grid-table",7),t.NdJ("sortChange",function(d){return s.onSortChange(d)})("rowClick",function(d){return s.openTxn(d)}),t.qZA(),t.YNc(9,Nt,3,3,"div",8),t.YNc(10,Jt,1,5,"admin-grid-pagination",9),t.qZA(),t.YNc(11,Dt,5,1,"div",10),t.qZA(),t.YNc(12,gt,18,15,"ng-template",null,11,t.W1O)),2&a){const p=t.MAs(13);t.xp6(1),t.Q6J("tint",t.DdM(21,ht))("context",!s.isLoading&&s.txns.length?t.lcZ(2,19,s.txns.length)+" transactions":"")("showBack",!1),t.xp6(2),t.Q6J("ngIf",!s.isLoading&&s.owed>0),t.xp6(2),t.Q6J("ngIf",!s.isLoading),t.xp6(2),t.Q6J("chips",s.filterChips)("counts",s.chipCounts)("activeKeys",s.activeKeys),t.xp6(1),t.Q6J("columns",s.columns)("rows",s.pagedTxns)("sortField",s.sortField)("sortDir",s.sortDir)("loading",s.isLoading)("rowTemplate",p)("trackBy",s.trackByTxn)("rowClassFn",s.rowClassFn),t.xp6(1),t.Q6J("ngIf",!s.isLoading),t.xp6(1),t.Q6J("ngIf",s.filtered.length>s.pageSize),t.xp6(1),t.Q6J("ngIf",!s.isLoading&&!s.filtered.length)}},dependencies:[P.mk,P.sg,P.O5,mt.d,_t.q,ft.j,Zt.hs,P.JJ,P.H9,P.uU],styles:['.admin-grid-page[_ngcontent-%COMP%]{padding:24px 24px 16px}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]{padding:14px 12px 8px}}.admin-grid-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}.admin-grid-title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.admin-grid-title[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:10px;font-size:22px;font-weight:700;color:#0f172a;margin:0}.admin-grid-title-count[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#94a3b8;font-variant-numeric:tabular-nums}.admin-grid-subtitle[_ngcontent-%COMP%]{font-size:12.5px;color:#6b7280}.admin-grid-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}.admin-grid-search[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;height:36px;padding:0 10px 0 36px;min-width:280px;transition:border-color .12s,background .12s}.admin-grid-search[_ngcontent-%COMP%]:focus-within{border-color:#2563eb;background:#ffffff}.admin-grid-search[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;
1left:10px;color:#9ca3af;font-size:18px;pointer-events:none}.admin-grid-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;font-size:13px;color:#1f2937;height:100%;font-family:inherit;min-width:0}.admin-grid-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.admin-grid-search[_ngcontent-%COMP%] .search-shortcut[_ngcontent-%COMP%]{margin-left:8px;font-size:11px;font-weight:500;color:#9ca3af;border:1px solid #e5e7eb;border-radius:4px;padding:1px 6px;background:#fafbfc;font-family:SFMono-Regular,Menlo,Consolas,monospace}.admin-grid-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;font-size:13px;font-weight:500;color:#374151;cursor:pointer;font-family:inherit;transition:background .12s,border-color .12s}.admin-grid-btn[_ngcontent-%COMP%]:hover{background:#f9fafb;border-color:#d1d5db}.admin-grid-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px;color:#6b7280}.admin-grid-btn.is-primary[_ngcontent-%COMP%]{background:#2563eb;border-color:#2563eb;color:#fff}.admin-grid-btn.is-primary[_ngcontent-%COMP%]:hover{background:#1d4ed8;border-color:#1d4ed8}.admin-grid-btn.is-primary[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{color:#fff}.admin-grid-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 10px;flex-wrap:wrap}.admin-grid-toolbar-left[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;flex:1;min-width:0}.admin-grid-toolbar-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}.cell-primary[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:#0f172a;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.cell-secondary[_ngcontent-%COMP%]{font-size:11.5px;color:#94a3b8;line-height:1.3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cell-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:#f3f4f6;font-size:12px;font-weight:500;color:#4b5563;line-height:1.4}.status-pill[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:#9ca3af}.status-pill.is-active[_ngcontent-%COMP%]{background:#ecfdf5;color:#047857}.status-pill.is-active[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#10b981}.status-pill.is-upcoming[_ngcontent-%COMP%]{background:#eff6ff;color:#1d4ed8}.status-pill.is-upcoming[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#3b82f6}.status-pill.is-completed[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.status-pill.is-completed[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-archived[_ngcontent-%COMP%]{background:#fef2f2;color:#b91c1c}.status-pill.is-archived[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#ef4444}.status-pill.is-inactive[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.status-pill.is-inactive[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-empty[_ngcontent-%COMP%]{background:#fff7ed;color:#c2410c}.status-pill.is-empty[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#f97316}.status-pill.is-draft[_ngcontent-%COMP%]{background:#f3f4f6;color:#6b7280}.status-pill.is-draft[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-scheduled[_ngcontent-%COMP%]{background:#eff6ff;color:#2563eb}.status-pill.is-scheduled[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#3b82f6}.status-pill.is-open[_ngcontent-%COMP%]{background:#ecfdf5;color:#059669}.status-pill.is-open[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#10b981}.status-pill.is-in-progress[_ngcontent-%COMP%]{background:#fffbeb;color:#b45309}
1.status-pill.is-in-progress[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#f59e0b;animation:_ngcontent-%COMP%_pill-pulse 1.6s ease-in-out infinite}.status-pill.is-closed[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.status-pill.is-closed[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#ef4444}@keyframes _ngcontent-%COMP%_pill-pulse{0%,to{box-shadow:0 0 #f59e0b8c}50%{box-shadow:0 0 0 4px #f59e0b00}}.count-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border-radius:6px;background:#eff6ff;color:#1d4ed8;font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums}.count-chip.is-zero[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}.admin-grid-cell.align-right[_ngcontent-%COMP%] .count-chip[_ngcontent-%COMP%]{background:transparent;padding:0;min-width:0;height:auto;font-size:13px}.admin-grid-cell.align-right[_ngcontent-%COMP%] .count-chip.is-zero[_ngcontent-%COMP%]{background:transparent}.dates-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.dates-cell[_ngcontent-%COMP%] .dates-range[_ngcontent-%COMP%]{font-size:13px;color:#0f172a;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dates-cell[_ngcontent-%COMP%] .dates-rel[_ngcontent-%COMP%]{font-size:11.5px;margin-top:2px}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-active[_ngcontent-%COMP%]{color:#047857}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-upcoming[_ngcontent-%COMP%]{color:#1d4ed8}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-completed[_ngcontent-%COMP%]{color:#94a3b8}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-archived[_ngcontent-%COMP%]{color:#b91c1c}.row-chevron[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;color:#cbd5e1;font-size:18px}.row-chevron[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;text-align:center;color:#6b7280}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:50%;background:#f3f4f6;display:inline-flex;align-items:center;justify-content:center;margin-bottom:12px}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:28px;color:#9ca3af}.empty-state[_ngcontent-%COMP%] .empty-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#1f2937;margin-bottom:4px}.empty-state[_ngcontent-%COMP%] .empty-desc[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;max-width:380px}.tour-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;border-radius:7px;color:var(--wb-text-2);background:var(--wb-neutral-soft);margin-right:10px}.tour-avatar[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.tour-avatar.is-empty[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}[_nghost-%COMP%]{display:block;background:var(--fc-bg);--wb-page-max: 1560px;--wb-admin-chrome: 300px;--wb-tg-bg-canvas: var(--wb-canvas, #F4F5F7);--wb-tg-bg-surface: var(--wb-surface, #FFFFFF);--wb-tg-bg-surface-elevated: var(--wb-surface, #FFFFFF);--wb-tg-bg-surface-glow: var(--wb-warning-soft, #FFF8E8);--wb-tg-shadow: var(--wb-e1, 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06));--wb-tg-border-soft: rgba(15, 23, 42, .1);--wb-tg-border-emphasis: rgba(15, 23, 42, .18);--wb-tg-text-primary: var(--wb-text, #111827);--wb-tg-text-secondary: var(--wb-text-2, #5B6370);--wb-tg-text-tertiary: var(--wb-text-3, #6B7280);--wb-tg-text-quaternary: var(--wb-text-4, #9AA1AC);--wb-tg-status-draft: var(--wb-status-draft-fg);--wb-tg-status-scheduled: var(--wb-status-scheduled-fg);--wb-tg-status-open: var(--wb-status-open-fg);--wb-tg-status-live: var(--wb-status-live-fg);--wb-tg-status-live-glow: var(--wb-status-live-glow);--wb-tg-status-closed: var(--wb-status-closed-fg);--wb-tg-status-completed: var(--wb-status-completed-fg);--wb-tg-status-active: var(--wb-status-active-fg);--wb-tg-status-upcoming: var(--wb-status-upcoming-fg);--wb-tg-status-archived: var(--wb-status-archived-fg);--wb-tg-status-inactive: var(--wb-status-inactive-fg);--wb-tg-status-empty: var(--wb-status-empty-fg);--wb-tg-accent-blue: var(--wb-accent);background:var(--wb-tg-bg-canvas);color:var(--wb-tg-text-primary);-webkit-font-smoothing:antialiased}.admin-grid-page[_ngcontent-%COMP%]{max-width:1440px;margin:0 auto;padding:32px}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]{padding:20px 16px}}.tg-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:32px;margin-bottom:28px;flex-wrap:wrap}@media (max-width: 720px){.tg-header[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:14px;margin-bottom:20px}}.tg-header-left[_ngcontent-%COMP%]{flex:1;min-width:0}.tg-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;margin:0;font-size:28px;font-weight:600;letter-spacing:-.4px;color:var(--wb-tg-text-primary);flex-wrap:wrap}@media (max-width: 720px){.tg-title[_ngcontent-%COMP%]{font-size:22px;gap:10px;letter-spacing:-.3px}}.tg-title-count[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--wb-tg-text-tertiary);font-variant-numeric:tabular-nums;letter-spacing:0}
1.tg-title-live[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;font-size:11px;font-weight:700;letter-spacing:1.2px;color:var(--wb-tg-status-live);background:rgba(217,119,6,.1);border:.5px solid rgba(217,119,6,.3);border-radius:6px;font-variant-numeric:tabular-nums;white-space:nowrap}@media (max-width: 720px){.tg-title-live[_ngcontent-%COMP%]{display:none}}.tg-live-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--wb-tg-status-live);box-shadow:0 0 8px var(--wb-tg-status-live-glow);animation:_ngcontent-%COMP%_tg-live-pulse 1.6s ease-in-out infinite}.tg-subtitle[_ngcontent-%COMP%]{margin:8px 0 0;font-size:13px;color:var(--wb-tg-text-secondary)}.tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-emph[_ngcontent-%COMP%]{color:var(--wb-tg-status-live);font-weight:500}.tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-sep[_ngcontent-%COMP%]{margin:0 8px;color:var(--wb-tg-text-quaternary)}.tg-header-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}@media (max-width: 720px){.tg-header-right[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}}.tg-search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin:0;width:320px;height:40px;background:var(--wb-tg-bg-surface);border:1px solid var(--wb-tg-border-soft);border-radius:8px;transition:border-color .12s,box-shadow .12s}.tg-search[_ngcontent-%COMP%]:focus-within{border-color:var(--wb-tg-accent-blue);box-shadow:0 0 0 3px var(--wb-tg-accent-blue-glow, rgba(37, 99, 235, .15))}@media (max-width: 720px){.tg-search[_ngcontent-%COMP%]{width:100%}}.tg-search-icon[_ngcontent-%COMP%]{font-size:18px;color:var(--wb-tg-text-tertiary);margin:0 8px 0 12px}.tg-header-right[_ngcontent-%COMP%] .tg-date-range .dropdown-trigger{height:40px;min-height:40px;padding-top:0;padding-bottom:0}.tg-search-input[_ngcontent-%COMP%]{flex:1;height:100%;background:transparent;border:none;outline:none;color:var(--wb-tg-text-primary);font-size:13px;font-family:inherit;min-width:0}.tg-search-input[_ngcontent-%COMP%]::placeholder{color:var(--wb-tg-text-tertiary)}.tg-search-kbd[_ngcontent-%COMP%]{margin:0 10px 0 0;padding:3px 7px;line-height:1;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:11px;font-weight:600;color:var(--wb-tg-text-tertiary);background:#F3F4F6;border:1px solid var(--wb-tg-border-soft);border-radius:4px}@media (hover: none){.tg-search-kbd[_ngcontent-%COMP%]{display:none}}.tg-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;background:var(--wb-tg-text-primary);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .12s,transform .05s}.tg-action-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.tg-action-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#1E293B}.tg-action-btn[_ngcontent-%COMP%]:not(:disabled):active{transform:translateY(1px)}.tg-action-btn[_ngcontent-%COMP%]:disabled{background:var(--wb-n-200, #E3E6EA);color:var(--wb-n-500, #6B7280);cursor:not-allowed}.tg-ghost-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;padding:0;background:transparent;color:var(--wb-tg-text-secondary);border:1px solid var(--wb-tg-border-soft);border-radius:8px;cursor:pointer;transition:background .12s,color .12s}.tg-ghost-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.tg-ghost-btn[_ngcontent-%COMP%]:hover{background:var(--wb-tg-bg-surface-hover, #F3F4F6);color:var(--wb-tg-text-primary)}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]{background:var(--fc-action, #008afc)}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]:hover{background:#0079DE}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--fc-action, #008afc) 88%,#000)}.tg-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table{background:var(--wb-tg-bg-surface);border:1px solid var(--wb-tg-border-hairline);border-radius:var(--tg-table-radius, 16px);box-shadow:var(--wb-tg-shadow);overflow:clip}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-header{background:transparent;border-bottom:1px solid var(--wb-tg-border-hairline);color:var(--wb-tg-text-tertiary);font-size:10px;letter-spacing:1.6px;font-weight:600;text-transform:uppercase;min-height:40px}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row{border-bottom:1px solid var(--wb-tg-border-hairline);background:transparent;min-height:64px;transition:background .12s ease}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row:hover{background:#F7F9FB}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row:last-child{border-bottom:none}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-in-progress-row{background:#F9F9F9;border-bottom-color:var(--wb-tg-border-hairline);box-shadow:inset 2px 0 0 var(--wb-tg-status-live);position:relative}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-in-progress-row:hover{background:#F1F3F5}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-past-row{background:#F9FAFB}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-past-row:hover{background:#F1F3F5}.tg-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:12px 16px;min-width:0}.tg-cell-actions[_ngcontent-%COMP%], .tg-cell.col-act[_ngcontent-%COMP%], .tg-cell.col-actions[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-end;
1gap:6px;flex-wrap:wrap}.tg-cell-name[_ngcontent-%COMP%]{gap:4px}.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--wb-tg-text-primary);letter-spacing:-.2px;text-decoration:none;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]:hover{color:var(--wb-tg-accent-blue)}.tg-cell-name[_ngcontent-%COMP%] .tg-name-context[_ngcontent-%COMP%]{font-size:11px;color:var(--wb-tg-text-tertiary);letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-tour-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border-radius:8px;font-size:12px;font-weight:700;flex-shrink:0;background:var(--wb-neutral-soft);color:var(--wb-text-2)}.tg-cell-members[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.tg-member-stack[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.tg-member-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;min-width:26px;border-radius:50%;font-size:10px;font-weight:700;background:var(--wb-neutral-soft);color:var(--wb-text-2);box-shadow:0 0 0 2px var(--wb-tg-bg-surface, #fff)}.tg-member-avatar[_ngcontent-%COMP%] + .tg-member-avatar[_ngcontent-%COMP%]{margin-left:-8px}.tg-cell-status[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.tg-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:2px 2px 2px 0;font-size:12.5px;font-weight:500}.tg-status[_ngcontent-%COMP%]:before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:currentColor;box-sizing:border-box}.tg-status[data-status=draft][_ngcontent-%COMP%]{color:var(--wb-tg-status-draft)}.tg-status[data-status=scheduled][_ngcontent-%COMP%]{color:var(--wb-tg-status-scheduled)}.tg-status[data-status=open][_ngcontent-%COMP%]{color:var(--wb-tg-status-open)}.tg-status[data-status=in_progress][_ngcontent-%COMP%]{color:var(--wb-tg-status-live)}.tg-status[data-status=closed][_ngcontent-%COMP%]{color:var(--wb-tg-status-closed)}.tg-status[data-status=completed][_ngcontent-%COMP%]{color:var(--wb-tg-status-completed)}.tg-status[data-status=active][_ngcontent-%COMP%]{color:var(--wb-tg-status-active)}.tg-status[data-status=upcoming][_ngcontent-%COMP%]{color:var(--wb-tg-status-upcoming)}.tg-status[data-status=archived][_ngcontent-%COMP%]{color:var(--wb-tg-status-archived)}.tg-status[data-status=inactive][_ngcontent-%COMP%]{color:var(--wb-tg-status-inactive)}.tg-status[data-status=empty][_ngcontent-%COMP%]{color:var(--wb-tg-status-empty)}.tg-status[data-status=draft][_ngcontent-%COMP%]:before, .tg-status[data-status=empty][_ngcontent-%COMP%]:before, .tg-status[data-status=inactive][_ngcontent-%COMP%]:before, .tg-status[data-status=archived][_ngcontent-%COMP%]:before, .tg-status[data-status=completed][_ngcontent-%COMP%]:before, .tg-status[data-status=closed][_ngcontent-%COMP%]:before{width:8px;height:8px;background:transparent;border:1.2px solid currentColor}.tg-status[data-status=empty][_ngcontent-%COMP%]:before{border-width:1.5px;border-style:dashed}.tg-status[data-status=in_progress][_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_tg-live-icon-pulse 1.6s ease-in-out infinite;box-shadow:0 0 8px var(--wb-tg-status-live-glow)}.tg-status[_ngcontent-%COMP%] .tg-status-icon[_ngcontent-%COMP%]{display:none}.tg-status-icon[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0}.tg-status-icon.tg-status-icon-live[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_tg-live-icon-pulse 1.6s ease-in-out infinite;filter:drop-shadow(0 0 6px var(--wb-tg-status-live-glow))}.tg-status-label[_ngcontent-%COMP%]{color:inherit;text-transform:lowercase}.tg-cell-date[_ngcontent-%COMP%]{gap:3px}.tg-cell-date[_ngcontent-%COMP%] .tg-date-primary[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--wb-tg-text-primary);font-variant-numeric:tabular-nums;letter-spacing:.1px}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%]{font-size:11px;color:var(--wb-tg-text-tertiary);display:inline-flex;align-items:center}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%] .tg-date-time[_ng
1content-%COMP%]{font-variant-numeric:tabular-nums}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%] .tg-date-sep[_ngcontent-%COMP%]{margin:0 5px;color:var(--wb-tg-text-quaternary)}.tg-cell-location[_ngcontent-%COMP%]{gap:3px}.tg-cell-location[_ngcontent-%COMP%] .tg-location-primary[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--wb-tg-text-primary);letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-location[_ngcontent-%COMP%] .tg-location-secondary[_ngcontent-%COMP%]{font-size:10px;color:var(--wb-tg-text-tertiary);letter-spacing:1.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-number[_ngcontent-%COMP%]{align-items:flex-end}.tg-cell-number[_ngcontent-%COMP%] .tg-number[_ngcontent-%COMP%]{font-size:15.5px;font-weight:600;color:var(--wb-tg-text-primary);font-variant-numeric:tabular-nums;line-height:1}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-zero[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary)}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-draft-test[_ngcontent-%COMP%]{font-style:italic;color:var(--wb-tg-text-tertiary)}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-muted[_ngcontent-%COMP%]{color:var(--wb-tg-text-secondary);font-weight:600}.tg-cell-tertiary[_ngcontent-%COMP%]{align-items:flex-end}.tg-cell-tertiary[_ngcontent-%COMP%] .tg-tertiary[_ngcontent-%COMP%]{font-size:12px;color:var(--wb-tg-text-tertiary);font-variant-numeric:tabular-nums}.tg-cell-chevron[_ngcontent-%COMP%]{align-items:center}.tg-chevron[_ngcontent-%COMP%]{width:12px;height:12px;color:var(--wb-tg-text-quaternary);transition:color .12s} .admin-grid-table-row:hover .tg-chevron{color:var(--wb-tg-text-secondary)}.tg-cell-empty[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary);font-size:13px}.empty-state[_ngcontent-%COMP%]{padding:60px 24px;color:var(--wb-tg-text-secondary)}.empty-state[_ngcontent-%COMP%] .empty-title[_ngcontent-%COMP%]{color:var(--wb-tg-text-primary)}.empty-state[_ngcontent-%COMP%] .empty-desc[_ngcontent-%COMP%]{color:var(--wb-tg-text-secondary)} .tg-pagination{margin-top:20px} .tg-pagination .grid-pagination{padding-top:16px}@keyframes _ngcontent-%COMP%_tg-live-pulse{0%,to{opacity:1;box-shadow:0 0 8px var(--wb-tg-status-live-glow)}50%{opacity:.6;box-shadow:0 0 16px var(--wb-tg-status-live-glow)}}@keyframes _ngcontent-%COMP%_tg-live-icon-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(.9)}}@keyframes _ngcontent-%COMP%_tg-live-row-breathe{0%,to{opacity:1}50%{opacity:.5}}@media (prefers-reduced-motion: reduce){.tg-live-dot[_ngcontent-%COMP%], .tg-status-icon-live[_ngcontent-%COMP%], .tg-status[data-status=in_progress][_ngcontent-%COMP%]:before{animation:none!important} .admin-grid-table-row.is-in-progress-row:after{animation:none!important}}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header{background:var(--wb-ink, #14110F);border-bottom:none;min-height:34px;color:var(--wb-text-3)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .admin-grid-cell.is-head{color:var(--wb-text-3);font-size:11px;font-weight:600;letter-spacing:.08em;padding-top:0;padding-bottom:0}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .is-sort:hover{color:var(--wb-text-2)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .is-sort.is-active{color:var(--wb-text-2)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .sort-indicator{color:var(--wb-text-2)}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row{min-height:52px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .admin-grid-cell{padding:8px 16px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-cell-name-with-avatar{gap:10px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-name{font-size:13.5px;line-height:1.25}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-name-context{font-size:12px;line-height:1.25}.tg-name-featured[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;margin-left:10px;flex-shrink:0}
1.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]{font-weight:700}.tg-cell-name[_ngcontent-%COMP%] .tg-name-context[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel){max-width:none;padding-left:16px;padding-right:16px;padding-top:0}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]{min-height:0!important;max-width:var(--wb-page-max, 1560px)!important;margin:0 auto!important;padding:16px 22px var(--tg-hero-pad, 16px)!important;border-radius:var(--tg-hero-radius, 14px) var(--tg-hero-radius, 14px) var(--tg-hero-radius-btm, var(--tg-hero-radius, 14px)) var(--tg-hero-radius-btm, var(--tg-hero-radius, 14px))!important;border:1px solid rgba(255,255,255,.06)!important;background:var(--wb-flagship-band)!important;align-items:var(--tg-hero-align, center);position:relative;overflow:visible;box-shadow:inset 0 1px #ffffff0d}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]:after{content:var(--tg-watermark, none)!important;font-family:Material Symbols Outlined;font-size:170px;font-weight:300;line-height:1;color:#ffffff0a;position:absolute;right:60px;top:0;bottom:0;width:200px;display:flex;align-items:center;justify-content:center;overflow:hidden;transform:rotate(-8deg);pointer-events:none;-webkit-user-select:none;user-select:none}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%] .tg-header-left[_ngcontent-%COMP%], .admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%] .tg-header-right[_ngcontent-%COMP%]{position:relative;z-index:1}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-entity-badge[_ngcontent-%COMP%]{flex:none;width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--wb-blue-500),var(--wb-blue-700));box-shadow:0 2px 12px #0059a880,0 0 0 5px #008afc1f}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-entity-badge[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:23px;color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-card[_ngcontent-%COMP%], .admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .empty-state[_ngcontent-%COMP%]{max-width:var(--wb-page-max, 1560px);margin-left:auto;margin-right:auto}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-card[_ngcontent-%COMP%]{position:relative;z-index:1;margin-top:var(--tg-hero-tuck, 0);box-shadow:var(--tg-card-shadow, var(--wb-tg-shadow))!important}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-title[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-title-count[_ngcontent-%COMP%]{color:#ffffff80}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%]{margin-left:56px;color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-emph[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-sep[_ngcontent-%COMP%]{color:#ffffff59}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search[_ngcontent-%COMP%]{background:rgba(255,255,255,.08);border-color:#ffffff29}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search[_ngcontent-%COMP%]:focus-within{border-color:#ffffff80;box-shadow:0 0 0 3px #ffffff1a}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-icon[_ngcontent-%COMP%]{color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-input[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-input[_ngcontent-%COMP%]::placeholder{color:#ffffff80}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-kbd[_ngcontent-%COMP%]{background:rgba(255,255,255,.1);border-color:#fff3;color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]{background:#fff;color:#14110f}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]:hover{background:#ececec}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]:disabled:hover{background:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn[_ngcontent-%COMP%]{background:rgba(255,255,255,.06);border-color:#ffffff2e;color:#ffffffc7}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.12);color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn.is-active[_ngcontent-%COMP%]{background:rgba(0,138,252,.22);border-color:#008afc8c;color:#fff}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]{min-height:132px!important}}@media (max-width: 640px){.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]{gap:0;padding:0;width:40px;min-width:40px;height:40px;border-radius:10px;justify-content:center}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%] .tg-action-label[_ngcontent-%COMP%]{display:none}}.ap-payments[_ngcontent-%COMP%]{padding-bottom:20px}.ap-payments[_ngcontent-%COMP%] .tg-card[_ngcontent-%COMP%]{background:#fff;border:1px solid var(--wb-tg-border-hairline, #eceef3);border-radius:16px;box-shadow:var(--wb-tg-shadow);overflow:hidden}.ap-payments[_ngcontent-%COMP%] .tg-toolbar[_ngcontent-%COMP%]{margin-bottom:0;padding:14px 16px}.ap-payments[_ngcontent-%COMP%] .admin-grid-table{border:none;border-radius:0;box-shadow:none}
1.ap-payments[_ngcontent-%COMP%] admin-grid-pagination{display:block;border-top:1px solid var(--wb-tg-border-hairline, #eceef3)}.ap-payments[_ngcontent-%COMP%] .admin-grid-cell[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 16px;min-width:0}.ap-payments[_ngcontent-%COMP%] .admin-grid-cell.align-right[_ngcontent-%COMP%]{justify-content:flex-end}.ap-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:12px;padding:64px 16px}.ap-loading-text[_ngcontent-%COMP%]{font-size:13px;color:#8a97a4}.ap-summary[_ngcontent-%COMP%]{position:relative;z-index:2;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:16px 16px 0}@media (max-width: 720px){.ap-summary[_ngcontent-%COMP%]{gap:10px;padding:12px 12px 0}}.ap-stat[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #e6e9ee;border-radius:14px;padding:14px 16px;min-width:0}.ap-stat-l[_ngcontent-%COMP%]{font-size:.7rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#8a97a4;margin-bottom:6px}.ap-stat-v[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:800;color:#1a2b3c;line-height:1.05;font-variant-numeric:tabular-nums}.ap-stat-v.is-won[_ngcontent-%COMP%]{color:#2f7d32}.ap-stat-v.is-owed[_ngcontent-%COMP%]{color:#b23b3b}@media (max-width: 720px){.ap-stat-v[_ngcontent-%COMP%]{font-size:1.25rem}}.ap-stat.is-owed-card[_ngcontent-%COMP%]{border-color:#f0d4d4;background:#fdf6f6}.ap-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center}.ap-payments[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(220px,2fr) 130px 120px 120px}@media (max-width: 980px){.ap-payments[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(180px,2fr) 110px 130px}.ap-payments[_ngcontent-%COMP%] .admin-grid-table .ap-c-status{display:none}}.ap-c-desc[_ngcontent-%COMP%]{display:flex;align-items:center;gap:11px;min-width:0}.ap-row-ic[_ngcontent-%COMP%]{flex-shrink:0;width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center}.ap-row-ic[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.ap-row-ic.paid[_ngcontent-%COMP%]{background:#eef2f7;color:#185fa5}.ap-row-ic.won[_ngcontent-%COMP%]{background:#e6f4e9;color:#2f7d32}.ap-row-titles[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.ap-row-title[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:#1a2b3c;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-row-sub[_ngcontent-%COMP%]{font-size:11.5px;color:#5a6b7b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-c-date[_ngcontent-%COMP%]{font-size:12.5px;color:#8a97a4;font-variant-numeric:tabular-nums}.ap-amt[_ngcontent-%COMP%]{font-size:13.5px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.ap-amt.paid[_ngcontent-%COMP%]{color:#1a2b3c}.ap-amt.won[_ngcontent-%COMP%]{color:#2f7d32}.ap-badge[_ngcontent-%COMP%], .ap-txn-badge[_ngcontent-%COMP%]{font-size:9.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;padding:2px 7px;border-radius:6px}.ap-badge.Initiated[_ngcontent-%COMP%], .ap-txn-badge.Initiated[_ngcontent-%COMP%]{background:#fbe9e9;color:#b23b3b}.ap-badge.processing[_ngcontent-%COMP%], .ap-txn-badge.processing[_ngcontent-%COMP%]{background:#fff2da;color:#b6791b}.ap-badge.completed[_ngcontent-%COMP%], .ap-txn-badge.completed[_ngcontent-%COMP%], .ap-badge.won[_ngcontent-%COMP%], .ap-txn-badge.won[_ngcontent-%COMP%]{background:#e6f4e9;color:#2f7d32}.ap-cards[_ngcontent-%COMP%]{display:none}@media (max-width: 720px){.ap-table[_ngcontent-%COMP%]{display:none}}@media (max-width: 720px){.ap-empty-desktop[_ngcontent-%COMP%]{display:none}}@media (max-width: 720px){.ap-cards[_ngcontent-%COMP%]{display:block}}.ap-txn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;background:#ffffff;border:0;border-top:1px solid #e6e9ee;text-align:left;cursor:pointer;font:inherit}.ap-txn[_ngcontent-%COMP%]:first-child{border-top:0}.ap-txn[_ngcontent-%COMP%]:active{background:#f7f9fb}.ap-txn.is-static[_ngcontent-%COMP%]{cursor:default}.ap-txn-ic[_ngcontent-%COMP%]{flex-shrink:0;width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center}.ap-txn-ic[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:20px}.ap-txn-ic.paid[_ngcontent-%COMP%]{background:#eef2f7;
1color:#185fa5}.ap-txn-ic.won[_ngcontent-%COMP%]{background:#e6f4e9;color:#2f7d32}.ap-txn-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.ap-txn-title[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:#1a2b3c;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-txn-sub[_ngcontent-%COMP%]{font-size:11.5px;color:#5a6b7b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ap-txn-meta[_ngcontent-%COMP%]{font-size:11px;color:#8a97a4}.ap-txn-right[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:4px}.ap-txn-amt[_ngcontent-%COMP%]{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.ap-txn-amt.paid[_ngcontent-%COMP%]{color:#1a2b3c}.ap-txn-amt.won[_ngcontent-%COMP%]{color:#2f7d32}.ap-empty[_ngcontent-%COMP%]{text-align:center;padding:56px 24px;color:#8a97a4}.ap-empty[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:40px;color:#c2ccd6;margin-bottom:10px}.ap-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13px;margin:0}[_nghost-%COMP%]{--tg-card-shadow: 0 1px 3px rgba(16, 24, 40, .06);--wb-page-max: var(--wb-angler-col, 1560px)}.ap-mast[_ngcontent-%COMP%]{display:block;max-width:var(--wb-angler-col, 1560px);margin:16px auto 0}@media (max-width: 639.98px){.ap-mast[_ngcontent-%COMP%]{margin:0 auto;--wbh-bleed-t: 0px;--wbh-bleed-x: 16px}}']})}}return r})();const Bt=["downloadSpreadsheetLink"];function rt(r,i){1&r&&t._UZ(0,"angler-payments")}function Gt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openRequestPaymentDialog())}),t.TgZ(1,"span",11),t._uU(2,"forward_to_inbox"),t.qZA(),t._uU(3," Request Payment "),t.qZA()}}function Lt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",10),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.openCreatePaymentDialog())}),t.TgZ(1,"span",11),t._uU(2,"add"),t.qZA(),t._uU(3," Create Payment "),t.qZA()}}function bt(r,i){if(1&r){const n=t.EpF();t.ynx(0,12),t.TgZ(1,"button",13),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setReportsView(!1))}),t._uU(2,"Ledger"),t.qZA(),t.TgZ(3,"button",13),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.setReportsView(!0))}),t._uU(4,"Reports"),t.qZA(),t.BQk()}if(2&r){const n=t.oxw(2);t.xp6(1),t.ekj("is-on",!n.reportsView),t.xp6(2),t.ekj("is-on",n.reportsView)}}function jt(r,i){1&r&&t.GkF(0)}function $t(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"profile-tab-panel",6),t.NdJ("searchChange",function(s){t.CHM(n);const p=t.oxw();return t.KtG(p.onUserQuickSearch(s))}),t.YNc(1,Gt,4,0,"button",7),t.YNc(2,Lt,4,0,"button",7),t.YNc(3,bt,5,4,"ng-container",8),t.YNc(4,jt,1,0,"ng-container",9),t.qZA()}if(2&r){const n=t.oxw(),a=t.MAs(4);t.Q6J("count",n.length||null)("subtitle",n.moneyStrip)("showSearch",!(null==n._directorsUsers||!n._directorsUsers.length))("searchValue",n.userQuickSearch),t.xp6(1),t.Q6J("ngIf",n.currentTournament&&"Angler"!==(null==n.currentUser?null:n.currentUser.userType)),t.xp6(1),t.Q6J("ngIf",n.isSystemAdmin&&n.currentTournament),t.xp6(1),t.Q6J("ngIf",null==n.currentTournament?null:n.currentTournament._id),t.xp6(1),t.Q6J("ngTemplateOutlet",a)}}function Vt(r,i){if(1&r&&(t.TgZ(0,"p",28),t._uU(1),t.ALo(2,"number"),t.qZA()),2&r){const n=t.oxw(3);t.xp6(1),t.AsE(" ",t.lcZ(2,2,n.length)," ",1===n.length?"payment":"payments"," ")}}function Kt(r,i){if(1&r&&(t.TgZ(0,"div",29)(1,"div",30)(2,"span",31),t._uU(3,"Collected"),t.qZA(),t.TgZ(4,"span",32),t._uU(5),t.ALo(6,"currency"),t.qZA()(),t._UZ(7,"div",33),t.TgZ(8,"div",30)(9,"span",31),t._uU(10,"Paid Out"),t.qZA(),t.TgZ(11,"span",34),t._uU(12),t.ALo(13,"currency"),t.qZA()()()),2&r){const n=t.oxw(3);t.xp6(5),t.Oqu(t.lcZ(6,2,n.heroStats.collected)),t.xp6(7),t.Oqu(t.lcZ(13,4,n.heroStats.paidOut))}}function Ht(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",35),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openRequestPaymentDialog())}),t.TgZ(1,"span",11),t._uU(2,"forward_to_inbox"),t.qZA()()}}function Wt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.openCreatePaymentDialog())}),t.TgZ(1,"span",11),t._uU(2,"add"),t.qZA()()}}function Xt(r,i){if(1&r&&(t.TgZ(0,"div",19)(1,"div",20)(2,"div",21)(3,"span",11),t._uU(4,"payments"),t.qZA()(),t.TgZ(5,"div",22)(6,"h2"),t._uU(7,"Payments"),t.qZA(),t.YNc(8,Vt,3,4,"p",23),t.qZA()(),t.YNc(9,Kt,14,6,"div",24),t.TgZ(10,"div",25),t.YNc(11,Ht,3,0,"button",26),t.YNc(12,Wt,3,0,"button",27),t.qZA()()),2&r){const n=t.oxw(2);t.xp6(8),t.Q6J("ngIf",n.length),t.xp6(1),t.Q6J("ngIf",n.heroStats),t.xp6(2),t.Q6J("ngIf",n.currentTournament&&"Angler"!==(null==n.currentUser?null:n.currentUser.userType)),t.xp6(1),t.Q6J("ngIf",n.isSystemAdmin&&n.currentTournament)}}function te(r,i){1&r&&t.GkF(0)}function ee(r,i){if(1&r&&(t.TgZ(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",17),t.YNc(4,Xt,13,4,"div",18),t.YNc(5,te,1,0,"ng-container",9),t.qZA()()()()),2&r){const n=t.oxw(),a=t.MAs(4);t.xp6(1),t.ekj("is-embedded",!!n.userToView),t.xp6(3),t.Q6J("ngIf",!n.userToView),t.xp6(1),t.Q6J("ngTemplateOutlet",a)}}function ne(r,i){if(1&r&&(t.ynx(0),t._uU(1),t.BQk()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.hij(" \xb7 reminded \xd7",n.remindersSent,"")}}function oe(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",47)(1,"span",48),t._uU(2),t.qZA(),t.TgZ(3,"span",49),t._uU(4),t.qZA(),t.TgZ(5,"span",50),t._uU(6),t.qZA(),t.TgZ(7,"span",51),t._uU(8),t.ALo(9,"date"),t.YNc(10,ne,2,1,"ng-container",0),t.qZA(),t.TgZ(11,"span",52),t._uU(12),t.qZA(),t.TgZ(13,"span",53)(14,"button",54),t.
1NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(3);return t.KtG(d.payPaymentRequest(p))}),t._uU(15,"Pay"),t.qZA(),t.TgZ(16,"button",54),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(3);return t.KtG(d.remindPaymentRequest(p))}),t._uU(17),t.qZA(),t.TgZ(18,"button",55),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(3);return t.KtG(d.revokePaymentRequest(p))}),t._uU(19,"Withdraw"),t.qZA()()()}if(2&r){const n=i.$implicit,a=t.oxw(3);t.xp6(2),t.Oqu(n.name),t.xp6(2),t.Oqu(a.requestAmountLabel(n)),t.xp6(2),t.Oqu(n.reason),t.xp6(2),t.hij(" sent ",t.xi3(9,12,n.sentAt,"MMM d"),""),t.xp6(2),t.Q6J("ngIf",n.remindersSent),t.xp6(1),t.ekj("is-expired","expired"===a.requestStatus(n)),t.xp6(1),t.hij(" ","expired"===a.requestStatus(n)?"Expired":"Awaiting payment"," "),t.xp6(2),t.Q6J("disabled",a.requestsBusy[n._id]),t.xp6(2),t.Q6J("disabled",a.requestsBusy[n._id]),t.xp6(1),t.hij(" ","expired"===a.requestStatus(n)?"Re-send":"Remind"," "),t.xp6(1),t.Q6J("disabled",a.requestsBusy[n._id])}}function re(r,i){if(1&r&&(t.TgZ(0,"div",56),t._uU(1),t.qZA()),2&r){const n=t.oxw(3);t.xp6(1),t.AsE(" ",n.paidPaymentRequests.length," ",1===n.paidPaymentRequests.length?"request":"requests"," paid \u2014 the payments are in the ledger below. ")}}function xt(r,i){if(1&r&&(t.TgZ(0,"div",40)(1,"div",41)(2,"span",42),t._uU(3,"schedule_send"),t.qZA(),t.TgZ(4,"span",43),t._uU(5,"Payment requests outstanding"),t.qZA(),t.TgZ(6,"span",44),t._uU(7),t.qZA()(),t.YNc(8,oe,20,15,"div",45),t.YNc(9,re,2,2,"div",46),t.qZA()),2&r){const n=t.oxw(2);t.xp6(7),t.Oqu(n.openPaymentRequests.length),t.xp6(1),t.Q6J("ngForOf",n.openPaymentRequests),t.xp6(1),t.Q6J("ngIf",n.paidPaymentRequests.length)}}function ie(r,i){1&r&&(t.TgZ(0,"div",57),t._UZ(1,"section-loading-displayer",58),t.qZA()),2&r&&(t.xp6(1),t.Q6J("loadingLabel","Loading Payments")("loadingText","Loading all of your Payments..."))}function ae(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",88),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return t.KtG(s.clearUserQuickSearch())}),t.TgZ(1,"span",11),t._uU(2,"close"),t.qZA()()}}const se=function(){return{standalone:!0}};function ce(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"label",84)(1,"span",85),t._uU(2,"search"),t.qZA(),t.TgZ(3,"input",86),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.onUserQuickSearch(s))}),t.qZA(),t.YNc(4,ae,3,0,"button",87),t.qZA()}if(2&r){const n=t.oxw(3);t.xp6(3),t.Q6J("ngModel",n.userQuickSearch)("ngModelOptions",t.DdM(3,se)),t.xp6(1),t.Q6J("ngIf",n.userQuickSearch)}}function pe(r,i){if(1&r&&(t.TgZ(0,"option",91),t._uU(1),t.qZA()),2&r){const n=i.$implicit;t.Q6J("ngValue",n._id),t.xp6(1),t.Oqu(null==n?null:n.name)}}function le(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"label",89)(1,"span",11),t._uU(2,"emoji_events"),t.qZA(),t.TgZ(3,"select",90),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.setTournamentFilter(s))}),t.TgZ(4,"option",91),t._uU(5,"Any tournament"),t.qZA(),t.YNc(6,pe,2,2,"option",92),t.qZA()()}if(2&r){const n=t.oxw(3);t.xp6(3),t.Q6J("ngModel",(null==n.searchTerms?null:n.searchTerms.sourceModuleRecord)||null),t.xp6(1),t.Q6J("ngValue",null),t.xp6(2),t.Q6J("ngForOf",n._tournaments)}}function de(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",93),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.clearFilters())}),t.TgZ(1,"span",11),t._uU(2,"restart_alt"),t.qZA(),t._uU(3," Clear "),t.qZA()}}function ge(r,i){if(1&r&&(t.TgZ(0,"span",94),t._uU(1),t.qZA()),2&r){const n=t.oxw(3);t.xp6(1),t.Oqu(n.sheetFilterCount)}}function ue(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",98),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(4);return t.KtG(d.toggleTypeFilter(p))}),t._uU(1),t.TgZ(2,"span",11),t._uU(3,"close"),t.qZA()()}if(2&r){const n=i.$implicit;t.xp6(1),t.hij(" ",n," ")}}function me(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",98),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return t.KtG(s.setStatusFilter(null))}),t._uU(1),t.TgZ(2,"span",11),t._uU(3,"close"),t.qZA()()}if(2&r){const n=t.oxw(4);t.xp6(1),t.hij(" ",n.activeStatusLabel," ")}}function _e(r,i){if(1&r&&(t.TgZ(0,"div",95),t.YNc(1,ue,4,1,"button",96),t.YNc(2,me,4,1,"button",97),t.qZA()),2&r){const n=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",n.selectedTypeFilters),t.xp6(1),t.Q6J("ngIf",n.activeStatusLabel)}}function fe(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(3);
1return t.KtG(d.toggleTypeFilter(p))}),t._uU(1),t.qZA()}if(2&r){const n=i.$implicit,a=t.oxw(3);t.ekj("active",a.isTypeSelected(n)),t.xp6(1),t.Oqu(n)}}function he(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",100)(1,"div",101)(2,"mat-icon"),t._uU(3,"filter_none"),t.qZA()(),t.TgZ(4,"h3",102),t._uU(5,"No Payments Match These Filters"),t.qZA(),t.TgZ(6,"p",103),t._uU(7,"Try a different search, status, type, or amount range."),t.qZA(),t.TgZ(8,"div",104)(9,"button",105),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.clearFilters())}),t.TgZ(10,"mat-icon"),t._uU(11,"refresh"),t.qZA(),t._uU(12," Clear Filters "),t.qZA()()()}}function be(r,i){1&r&&(t.TgZ(0,"div",100)(1,"div",101)(2,"mat-icon"),t._uU(3,"receipt"),t.qZA()(),t.TgZ(4,"h3",102),t._uU(5,"No Payments Yet"),t.qZA(),t.TgZ(6,"p",103),t._uU(7,"Payments will appear here once anglers register and pay for tournament entries."),t.qZA()())}function xe(r,i){if(1&r){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",108),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return t.KtG(s.actionsMenuOpen=!1)}),t.qZA(),t.TgZ(2,"div",109)(3,"button",110),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return s.actionsMenuOpen=!1,t.KtG(s.selectAll())}),t.TgZ(4,"mat-icon"),t._uU(5,"check_box"),t.qZA(),t._uU(6," Select all "),t.qZA(),t.TgZ(7,"button",111),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return s.actionsMenuOpen=!1,t.KtG(s._tableService.deselectAll())}),t.TgZ(8,"mat-icon"),t._uU(9,"check_box_outline_blank"),t.qZA(),t._uU(10," Deselect all "),t.qZA(),t._UZ(11,"div",112),t.TgZ(12,"button",111),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return s.actionsMenuOpen=!1,t.KtG(s.exportToExcelFormat("spreadsheet"))}),t.TgZ(13,"mat-icon"),t._uU(14,"grid_on"),t.qZA(),t._uU(15," Export to spreadsheet "),t.qZA(),t.TgZ(16,"button",111),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(4);return s.actionsMenuOpen=!1,t.KtG(s.exportToExcelFormat("csv"))}),t.TgZ(17,"mat-icon"),t._uU(18,"description"),t.qZA(),t._uU(19," Export to CSV "),t.qZA()(),t.BQk()}if(2&r){const n=t.oxw(4);t.xp6(7),t.Q6J("disabled",!n._tableService.hasSelectedItems()),t.xp6(5),t.Q6J("disabled",!n._tableService.hasSelectedItems()),t.xp6(4),t.Q6J("disabled",!n._tableService.hasSelectedItems())}}function ye(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",106)(1,"button",107),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.actionsMenuOpen=!s.actionsMenuOpen)}),t.TgZ(2,"mat-icon"),t._uU(3,"more_vert"),t.qZA()(),t.YNc(4,xe,20,3,"ng-container",0),t.qZA()}if(2&r){const n=t.oxw(3);t.xp6(1),t.ekj("is-open",n.actionsMenuOpen),t.uIk("aria-expanded",n.actionsMenuOpen),t.xp6(3),t.Q6J("ngIf",n.actionsMenuOpen)}}const Pe=function(){return[]},Ce=function(){return["select"]};function we(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"admin-grid-table",113),t.NdJ("sortChange",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.onGridSortChange(s))})("rowClick",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.viewRecord(s))}),t.qZA()}if(2&r){t.oxw();const n=t.MAs(29),a=t.MAs(26),s=t.oxw(2);t.ekj("has-select",s.hasSelectColumn),t.Q6J("columns",s.gridColumns)("rows",s._payments||t.DdM(9,Pe))("sortField",s.sortField)("sortDir",s.sortDir)("rowTemplate",n)("headerTemplate",a)("headerTemplateColumns",t.DdM(10,Ce))}}function ve(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",135)(1,"mat-checkbox",136),t.NdJ("click",function(s){return s.stopPropagation()})("change",function(s){t.CHM(n);const p=t.oxw().$implicit,d=t.oxw(3);return t.KtG(s?d._tableService.toggleItem(p):null)}),t.qZA()()}if(2&r){const n=t.oxw().$implicit,a=t.oxw(3);t.xp6(1),t.Q6J("checked",a._tableService.isItemSelected(n._id))}}function Me(r,i){1&r&&(t.ynx(0),t._uU(1,", "),t.BQk())}function Oe(r,i){if(1&r&&(t.ynx(0),t._uU(1),t.YNc(2,Me,2,0,"ng-container",0),t.BQk()),2&r){const n=i.$implicit,a=i.index,s=t.oxw(2).$implicit;t.xp6(1),t.Oqu(n.type),t.xp6(1),t.Q6J("ngIf",a<s.items.length-1)}}function Te(r,i){if(1&r&&(t.TgZ(0,"span",137),t.YNc(1,Oe,3,2,"ng-container",138),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",n.items)}}function ke(r,i){1&r&&(t.TgZ(0,"span",139),t._uU(1,"\xb7"),t.qZA())}function Ze(r,i){if(1&r&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,n.createdAt,"MMM d, y"))}}function Ae(r,i){1&r&&(t.TgZ(0,"span",139),t._uU(1,"\xb7"),t.qZA())}function Ue(r,i){if(1&r&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"date"),t.qZA()),2&r){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,n.createdAt,"h:mm a"))}}function Se(r,i){1&r&&(t.ynx(0),t.TgZ(1,"div",140)(2,"div",141),t._uU(3,"Voided"),t.qZA()(),t.BQk())}function qe(r,i){1&r&&(t.TgZ(0,"div",147)(1,"div",141),t._uU(2,"Incomplete"),t.qZA()())}function Ie(r,i){1&r&&(t.TgZ(0,"div",148)(1,"div",141),t._uU(2,"Processing"),t.qZA()())}function Fe(r,i){1&r&&(t.TgZ(0,"div",149)(1,"div",141),t._uU(2,"Completed"),t.qZA()())}function ze(r,i){if(1&r&&(t.TgZ(0,"div",150)(1,"div",141),t._uU(2),t.ALo(3,"titlecase"),t.qZA()()),2&r){const n=t.oxw(2).$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,n.status))}}function Ne(r,i){if(1&r&&(t.TgZ(0,"div",142),t.YNc(1,qe,3,0,"div",143),t.YNc(2,Ie,3,0,"div",144),t.YNc(3,Fe,3,0,"div",145),t.YNc(4,ze,4,3,"div",146),t.qZA()),2&r){const n=t.oxw().$implicit;t.Q6J("ngSwitch",n.status),t.xp6(1),t.Q6J("ngSwitchCase","Initiated"),t.xp6(1),t.Q6J("ngSwitchCase","processing"),t.xp6(1),t.Q6J("ngSwitchCase","completed")}}function Ee(r,i){if(1&r&&(t.YNc(0,ve,2,1,"div",114),t.TgZ(1,"div",115)(2,"div",116)(3,"span",11),t._uU(4),t.qZA()(),t.TgZ(5,"div",117)(6,"a",118),t.NdJ("click",function(a){return a.stopPropagation()}),t._uU(7),t.qZA(),t.TgZ(8,"div",119),t.YNc(9,Te,2,1,"span",120),t.YNc(10,ke,2,0,"span",121),t.YNc(11,Ze,3,4,"span",0),t.YNc(12,Ae,2,0,"span",121),t.YNc(13,Ue,3,4,"span",0),t.qZA()()(),t.TgZ(14,"div",122)(15,"span",123),t._uU(16),t.qZA(),t.TgZ(17,"div",124)(18,"span",125),t._uU(19),t.qZA(),t.TgZ(20,"span",126),t._uU(21),t.qZA()()(),t.TgZ(22,"div",127)(23,"span",128),t._uU(24,"trending_flat"),t.qZA()(),t.TgZ(25,"div",129)(26,"span",123),t._uU(27),t.qZA(),t.TgZ(28,"div",124)(29,"span",125),t._uU(30),t.qZA(),t.TgZ(31,"span",126),t._uU(32),t.qZA()()(),t.TgZ(33,"div",130)(34,"span",131),t._uU(35),t.ALo(36,"currency"),t.qZA()(),t.TgZ(37,"div",132),t.YNc(38,Se,4,0,"ng-container",133),t.YNc(39,Ne,5,4,"ng-template",null,134,t.W1O),t.qZA()),2&r){const n=i.$implicit,a=t.MAs(40),s=t.oxw(3);t.Q6J("ngIf",s.hasSelectColumn),t.xp6(2),t.ekj("is-credit","credit"===n.debitOrCredit)("is-debit","credit"!==n.debitOrCredit),t.Q6J("matTooltip","credit"===n.debitOrCredit?"Money in":"Money out"),t.xp6(2),t.Oqu("credit"===n.debitOrCredit?"south_west":"north_east"),t.xp6(2),t.Q6J("routerLink",s.baseRoute+"/payments/"+n._id),t.xp6(1),t.hij(" ",(null==n||null==n.relatedModuleRecord?null:n.relatedModuleRecord.name)||"Payment"," "),t.xp6(2),t.Q6J("ngIf",null==n.items?null:n.items.length),t.xp6(1),t.Q6J("ngIf",(null==n.items?null:n.items.length)&&n.createdAt),t.xp6(1),t.Q6J("ngIf",n.createdAt),t.xp6(1),t.Q6J("ngIf",n.createdAt),t.xp6(1),t.Q6J("ngIf",n.createdAt),t.xp6(2),t.uIk("data-kind",s.payerKind(n)),t.xp6(1),t.Oqu(s.partyInitials(s.payerName(n),s.payerKind(n))),t.xp6(2),t.ekj("is-unset","unassigned"===s.payerKind(n)),t.xp6(1),t.Oqu(s.payerName(n)),t.xp6(2),t.Oqu(s.kindLabel(s.payerKind(n))),t.xp6(5),t.uIk("data-kind",s.payeeKind(n)),t.xp6(1),t.Oqu(s.partyInitials(s.payeeName(n),s.payeeKind(n))),t.xp6(2),t.ekj("is-unset","unassigned"===s.payeeKind(n)),t.xp6(1),t.Oqu(s.payeeName(n)),t.xp6(2),t.Oqu(s.kindLabel(s.payeeKind(n))),t.xp6(2),t.ekj("is-credit","credit"===n.debitOrCredit)("is-zero",!n.amount),t.xp6(1),t.AsE(" ",n.amount?"credit"===n.debitOrCredit?"+":"\u2212":"","",t.lcZ(36,34,n.amount<0?-n.amount:n.amount)," "),t.xp6(3),t.Q6J("ngIf",n.voidedAt)("ngIfElse",a)}}function Je(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(4);return t.KtG(d.onStatusChipToggle(p.key))}),t._UZ(1,"span",157),t._uU(2),t.qZA()}if(2&r){const n=i.$implicit,a=t.oxw(4);t.ekj("active",(null==a.searchTerms?null:a.searchTerms.status)===n.key),t.xp6(1),t.Udp("background",n.color),t.xp6(1),t.hij("",n.label," ")}}function De(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"button",99),t.NdJ("click",function(){const p=t.CHM(n).$implicit,d=t.oxw(4);
1return t.KtG(d.toggleTypeFilter(p))}),t._uU(1),t.qZA()}if(2&r){const n=i.$implicit,a=t.oxw(4);t.ekj("active",a.isTypeSelected(n)),t.xp6(1),t.Oqu(n)}}function yt(r,i){if(1&r){const n=t.EpF();t.ynx(0),t.TgZ(1,"div",151),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.filterSheetOpen=!1)}),t.qZA(),t.TgZ(2,"div",152)(3,"button",153),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.filterSheetOpen=!1)}),t.qZA(),t.TgZ(4,"div",154),t._uU(5,"Filters"),t.qZA(),t.TgZ(6,"div",155),t._uU(7,"Status"),t.qZA(),t.TgZ(8,"div",156)(9,"button",99),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(3);return t.KtG(s.setStatusFilter(null))}),t._uU(10,"All"),t.qZA(),t.YNc(11,Je,3,5,"button",77),t.qZA(),t.TgZ(12,"div",155),t._uU(13,"Type"),t.qZA(),t.TgZ(14,"div",156),t.YNc(15,De,2,3,"button",77),t.qZA()(),t.BQk()}if(2&r){const n=t.oxw(3);t.xp6(9),t.ekj("active",!(null!=n.searchTerms&&n.searchTerms.status)),t.xp6(2),t.Q6J("ngForOf",n.statusChips),t.xp6(4),t.Q6J("ngForOf",n.paymentItemsTypes)}}function it(r,i){1&r&&(t.TgZ(0,"p",103),t._uU(1,"No payments match the active filters. Loosen them and the charts fill back in."),t.qZA())}function Ye(r,i){1&r&&(t.TgZ(0,"p",103),t._uU(1,"Once anglers register and pay, the totals by payment type show up here."),t.qZA())}function Pt(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",104)(1,"button",105),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(5);return t.KtG(s.clearFilters())}),t.TgZ(2,"mat-icon"),t._uU(3,"refresh"),t.qZA(),t._uU(4," Clear Filters "),t.qZA()()}}function Re(r,i){if(1&r&&(t.TgZ(0,"div",100)(1,"div",101)(2,"mat-icon"),t._uU(3,"donut_small"),t.qZA()(),t.TgZ(4,"h3",102),t._uU(5,"Nothing to Chart Yet"),t.qZA(),t.YNc(6,it,2,0,"p",159),t.YNc(7,Ye,2,0,"p",159),t.YNc(8,Pt,5,0,"div",160),t.qZA()),2&r){const n=t.oxw(4);t.xp6(6),t.Q6J("ngIf",n.hasActiveFilters),t.xp6(1),t.Q6J("ngIf",!n.hasActiveFilters),t.xp6(1),t.Q6J("ngIf",n.hasActiveFilters)}}function Qe(r,i){if(1&r&&(t.O4$(),t._UZ(0,"circle",183)),2&r){const n=i.$implicit,a=t.oxw(6);t.Udp("stroke-dasharray",(a.reportsRevealed?n.len:0)+" "+a.donutC),t.uIk("r",a.donutR)("stroke",a.typeColor(n.type))("transform","rotate("+n.rotate+" 60 60)")}}function Be(r,i){if(1&r&&(t.TgZ(0,"li"),t._UZ(1,"span",184),t.TgZ(2,"span",185),t._uU(3),t.qZA(),t.TgZ(4,"span",186),t._uU(5),t.ALo(6,"currency"),t.qZA(),t.TgZ(7,"span",187),t._uU(8),t.ALo(9,"percent"),t.qZA()()),2&r){const n=i.$implicit,a=t.oxw(6);t.xp6(1),t.Udp("background",a.typeColor(n.type)),t.xp6(2),t.Oqu(n.type),t.xp6(2),t.Oqu(t.lcZ(6,5,n.amount)),t.xp6(3),t.Oqu(t.xi3(9,7,n.share,"1.0-0"))}}function Ge(r,i){if(1&r&&(t.TgZ(0,"div",170)(1,"h3",171),t._uU(2,"Collected by Type"),t.qZA(),t.TgZ(3,"div",174)(4,"div",175),t.O4$(),t.TgZ(5,"svg",176),t._UZ(6,"circle",177),t.YNc(7,Qe,1,5,"circle",178),t.qZA(),t.kcU(),t.TgZ(8,"div",179)(9,"span",180),t._uU(10),t.ALo(11,"currency"),t.qZA(),t.TgZ(12,"span",181),t._uU(13,"collected"),t.qZA()()(),t.TgZ(14,"ul",182),t.YNc(15,Be,10,10,"li",138),t.qZA()()()),2&r){const n=t.oxw(5);t.xp6(6),t.uIk("r",n.donutR),t.xp6(1),t.Q6J("ngForOf",n.reportData.donut),t.xp6(3),t.Oqu(t.gM2(11,4,n.reportData.collected,"USD","symbol","1.0-0")),t.xp6(5),t.Q6J("ngForOf",n.reportData.donut)}}function Xe(r,i){if(1&r&&(t.TgZ(0,"div",191)(1,"span",192),t._uU(2),t.qZA(),t.TgZ(3,"div",193),t._UZ(4,"div",194),t.qZA(),t.TgZ(5,"span",195),t._uU(6),t.qZA(),t.TgZ(7,"span",196),t._uU(8),t.ALo(9,"currency"),t.qZA()()),2&r){const n=i.$implicit,a=t.oxw(6);t.xp6(2),t.Oqu(n.type),t.xp6(2),t.Udp("background",a.typeColor(n.type))("width",a.reportsRevealed?n.pct:0,"%"),t.xp6(2),t.hij("",n.count,"\xd7"),t.xp6(2),t.Oqu(t.lcZ(9,7,n.amount))}}function Le(r,i){if(1&r&&(t.TgZ(0,"div",188)(1,"span",189),t._uU(2,"Money In"),t.qZA(),t.YNc(3,Xe,10,9,"div",190),t.qZA()),2&r){const n=t.oxw(5);t.xp6(3),t.Q6J("ngForOf",n.reportData.inRows)}}function je(r,i){if(1&r&&(t.TgZ(0,"div",191)(1,"span",192),t._uU(2),t.qZA(),t.TgZ(3,"div",193),t._UZ(4,"div",194),t.qZA(),t.TgZ(5,"span",195),t._uU(6),t.qZA(),t.TgZ(7,"span",196),t._uU(8),t.ALo(9,"currency"),t.qZA()()),2&r){const n=i.$implicit,a=t.oxw(6);t.xp6(2),t.Oqu(n.type),t.xp6(2),t.Udp("background",a.typeColor(n.type))("width",a.reportsRevealed?n.pct:0,"%"),t.xp6(2),t.hij("",n.count,"\xd7"),t.xp6(2),t.Oqu(t.lcZ(9,7,n.amount))}}function $e(r,i){if(1&r&&(t.TgZ(0,"div",188)(1,"span",189),t._uU(2,"Paid Out"),t.qZA(),t.YNc(3,je,10,9,"div",190),t.qZA()),2&r){const n=t.oxw(5);t.xp6(3),t.Q6J("ngForOf",n.reportData.outRows)}}function Ve(r,i){1&r&&(t.TgZ(0,"div",197),t._uU(1," No completed payments match the current filters \u2014 the incomplete ones are tallied above. "),t.qZA())}function Ke(r,i){if(1&r&&(t.ynx(0),t.TgZ(1,"div",161)(2,"div",162)(3,"span",163),t._uU(4,"Collected"),t.qZA(),t.TgZ(5,"span",164),t._uU(6),t.ALo(7,"currency"),t.qZA()(),t.TgZ(8,"div",162)(9,"span",163),t._uU(10,"Paid Out"),t.qZA(),t.TgZ(11,"span",165),t._uU(12),t.ALo(13,"currency"),t.qZA()(),t.TgZ(14,"div",162)(15,"span",163),t._uU(16,"Incomplete"),t.qZA(),t.TgZ(17,"span",166),t._uU(18),t.ALo(19,"currency"),t.qZA(),t.TgZ(20,"span",167),t._uU(21),t.qZA()()(),t.TgZ(22,"div",168),t.YNc(23,Ge,16,9,"div",169),t.TgZ(24,"div",170)(25,"h3",171),t._uU(26,"Breakdown by Type"),t.qZA(),t.YNc(27,Le,4,1,"div",172),t.YNc(28,$e,4,1,"div",172),t.YNc(29,Ve,2,0,"div",173),t.qZA()(),t.BQk()),2&r){const n=t.oxw(4);t.xp6(6),t.Oqu(t.lcZ(7,9,n.reportData.collected)),t.xp6(6),t.Oqu(t.lcZ(13,11,n.reportData.paidOut)),t.xp6(6),t.Oqu(t.lcZ(19,13,n.reportData.incompleteAmount)),t.xp6(3),t.AsE("",n.reportData.incompleteCount," ",1===n.reportData.incompleteCount?"payment":"payments",""),t.xp6(2),t.Q6J("ngIf",n.reportData.donut.length),t.xp6(4),t.Q6J("ngIf",n.reportData.inRows.length),t.xp6(1),t.Q6J("ngIf",n.reportData.outRows.length),t.xp6(1),t.Q6J("ngIf",!n.reportData.inRows.length&&!n.reportData.outRows.length)}}function He(r,i){if(1&r&&(t.TgZ(0,"div",158),t.YNc(1,Re,9,3,"div",78),t.YNc(2,Ke,30,15,"ng-container",0),t.qZA()),2&r){const n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!n.reportData.inRows.length&&!n.reportData.outRows.length&&!n.reportData.incompleteCount),t.xp6(1),t.Q6J("ngIf",n.reportData.inRows.length||n.reportData.outRows.length||n.reportData.incompleteCount)}
1}function We(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"admin-grid-pagination",198),t.NdJ("pageChange",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.onGridPageChange(s))})("pageSizeChange",function(s){t.CHM(n);const p=t.oxw(3);return t.KtG(p.onGridPageSizeChange(s))}),t.qZA()}if(2&r){const n=t.oxw(3);t.Q6J("page",n.gridPage)("pageSize",n.pageSize)("total",n.length)}}function l(r,i){if(1&r){const n=t.EpF();t.TgZ(0,"div",59)(1,"div",60),t.YNc(2,ce,5,4,"label",61),t.TgZ(3,"admin-grid-chips",62),t.NdJ("chipToggle",function(s){t.CHM(n);const p=t.oxw(2);return t.KtG(p.onStatusChipToggle(s))}),t.qZA(),t._UZ(4,"span",63),t.YNc(5,le,7,3,"label",64),t.TgZ(6,"div",65)(7,"span",66),t._uU(8,"$"),t.qZA(),t.TgZ(9,"input",67),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(2);return t.KtG(p.searchTerms.minAmount=s)})("change",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.getPayments())}),t.qZA(),t.TgZ(10,"span",68),t._uU(11,"\u2013"),t.qZA(),t.TgZ(12,"input",69),t.NdJ("ngModelChange",function(s){t.CHM(n);const p=t.oxw(2);return t.KtG(p.searchTerms.maxAmount=s)})("change",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.getPayments())}),t.qZA()(),t.YNc(13,de,4,0,"button",70),t.TgZ(14,"button",71),t.NdJ("click",function(){t.CHM(n);const s=t.oxw(2);return t.KtG(s.filterSheetOpen=!0)}),t._uU(15," Filters "),t.YNc(16,ge,2,1,"span",72),t.qZA()(),t.YNc(17,_e,3,2,"div",73),t.TgZ(18,"div",74)(19,"span",75),t._uU(20,"Type"),t.qZA(),t.TgZ(21,"div",76),t.YNc(22,fe,2,3,"button",77),t.qZA()(),t.YNc(23,he,13,0,"div",78),t.YNc(24,be,8,0,"div",78),t.YNc(25,ye,5,4,"ng-template",null,79,t.W1O),t.YNc(27,we,1,11,"admin-grid-table",80),t.YNc(28,Ee,41,36,"ng-template",null,81,t.W1O),t.YNc(30,yt,16,4,"ng-container",0),t.YNc(31,He,3,2,"div",82),t.YNc(32,We,1,3,"admin-grid-pagination",83),t.qZA()}if(2&r){const n=t.oxw(2);t.ekj("no-hero",!!n.userToView),t.xp6(2),t.Q6J("ngIf",!n.panelMode&&(null==n._directorsUsers?null:n._directorsUsers.length)),t.xp6(1),t.Q6J("chips",n.statusChips)("activeKeys",n.activeStatusChipKeys),t.xp6(2),t.Q6J("ngIf",!n.currentTournament&&(null==n._tournaments?null:n._tournaments.length)),t.xp6(4),t.Q6J("ngModel",n.searchTerms.minAmount),t.xp6(3),t.Q6J("ngModel",n.searchTerms.maxAmount),t.xp6(1),t.Q6J("ngIf",n.hasActiveFilters),t.xp6(3),t.Q6J("ngIf",n.sheetFilterCount),t.xp6(1),t.Q6J("ngIf",n.sheetFilterCount),t.xp6(5),t.Q6J("ngForOf",n.paymentItemsTypes),t.xp6(1),t.Q6J("ngIf",!n.reportsView&&(!n.unfilteredPayments||!n.unfilteredPayments.length)&&n.hasActiveFilters),t.xp6(1),t.Q6J("ngIf",!(n.reportsView||n.unfilteredPayments&&n.unfilteredPayments.length||n.hasActiveFilters)),t.xp6(3),t.Q6J("ngIf",!n.reportsView),t.xp6(3),t.Q6J("ngIf",n.filterSheetOpen),t.xp6(1),t.Q6J("ngIf",n.reportsView&&n.reportData),t.xp6(1),t.Q6J("ngIf",(null==n.unfilteredPayments?null:n.unfilteredPayments.length)&&!n.reportsView)}}function m(r,i){if(1&r&&(t.YNc(0,xt,10,3,"div",37),t.YNc(1,ie,2,2,"div",38),t.YNc(2,l,33,18,"div",39)),2&r){const n=t.oxw();t.Q6J("ngIf",n.openPaymentRequests.length),t.xp6(1),t.Q6J("ngIf",!n.initialized),t.xp6(1),t.Q6J("ngIf",n.initialized)}}let o=(()=>{class r{buildGridColumns(){const n=[];-1!==this.displayedColumns.indexOf("select")&&n.push({key:"select",label:"",headerClass:"col-select"}),n.push({key:"details",label:"Payment",headerClass:"col-details"},{key:"payerName",label:"Paid By",sortable:!0,headerClass:"col-payer"},{key:"flow",label:"",headerClass:"col-flow"},{key:"payeeName",label:"Paid To",sortable:!0,headerClass:"col-payee"},{key:"amount",label:"Amount",align:"right",headerClass:"col-amount"},{key:"status",label:"Status",headerClass:"col-status"}),this.gridColumns=n}personName(n){return n?`${n.first_name||""} ${n.last_name||""}`.trim():""}payerName(n){return this.personName(n?.user)||"Not recorded"}payeeName(n){return n?.accountToPay?.name||this.personName(n?.recipientOfPayment)||"WeighBook"}kindOf(n,a){return"Director"===n?.userType||"System Admin"===n?.userType?"director":n?.userType?"angler":"WeighBook"===a?"weighbook":"unassigned"}payerKind(n){return n?.user?this.kindOf(n.user,""):"unassigned"}payeeKind(n){return n?.accountToPay?.name?"weighbook":n?.recipientOfPayment?this.kindOf(n.recipientOfPayment,""):"weighbook"}kindLabel(n){return this.KIND_LABELS[n]||""}partyInitials(n,a){return"unassigned"===a?"?":(n||"").split(" ").filter(
1Boolean).slice(0,2).map(s=>s[0]).join("").toUpperCase()||"?"}onGridSortChange(n){this.sortField=n.field,this.sortDir=n.dir,this.pageIndex=0,this.searchTerms&&(this.searchTerms.sortField=n.field,this.searchTerms.sortOrder=n.dir),this.getPayments()}get hasSelectColumn(){return-1!==this.displayedColumns.indexOf("select")}get gridPage(){return this.pageIndex+1}onGridPageChange(n){this.pageIndex=Math.max(0,(n||1)-1),this.useServerPagination?this.getPayments():this._payments=this.paginate(this.unfilteredPayments,this.pageSize,this.pageIndex+1)}onGridPageSizeChange(n){this.pageSize=n,this.pageIndex=0,this.useServerPagination?this.getPayments():this._payments=this.paginate(this.unfilteredPayments,this.pageSize,1)}typeColor(n){return this.TYPE_COLORS[n]||"#64748b"}setReportsView(n){this.reportsView!==n&&(this.reportsView=n,n&&(this.reportsRevealed=!1,setTimeout(()=>{this.reportsRevealed=!0},30)))}constructor(n,a,s,p,d,g,f,y,q,Y,U){this._authService=n,this._userService=a,this._paymentService=s,this._fileService=p,this._tableService=d,this._tournamentService=g,this._sharedUtilsService=f,this._networkService=y,this._dialog=q,this.router=Y,this._paymentRequests=U,this.panelMode=!1,this.baseRoute="/",this.director=null,this.currentUser=null,this._payments=null,this.searchTerms=null,this.displayedColumns=["details","createdAt","amount"],this.gridColumns=[],this.KIND_LABELS={director:"Director",angler:"Angler",weighbook:"WeighBook",unassigned:"Not set"},this.userQuickSearch="",this.userQuickSearch$=new z.x,this.unfilteredPayments=null,this.itemsPerPage=10,this.showIncomplete=!1,this.length=0,this.pageSize=25,this.sortField=null,this.sortDir="asc",this.pageIndex=0,this.heroStats=null,this.reportsView=!1,this.reportsRevealed=!1,this.donutR=44,this.donutC=2*Math.PI*44,this.TYPE_COLORS={"Entry Fee":"#008afc","Big Fish Pot":"#16a34a","Side Pot":"#7c3aed","Admin Fees":"#d97706",Membership:"#0891b2","Main Pot Payout":"#dc2626","Side Pot Payout":"#db2777","Jackpot Payout":"#9333ea"},this.reportData=null,this.actionsMenuOpen=!1,this.paymentItemsTypes=["Entry Fee","Big Fish Pot","Side Pot","Admin Fees","Membership","Main Pot Payout","Side Pot Payout","Jackpot Payout"],this.canCreateTournaments=!1,this.initialized=!1,this.isAnglerStandalone=!1,this.currentlyChosenTourId=null,this._tournaments=null,this._directorsUsers=null,this.isSystemAdmin=!1,this.paymentRequests=[],this.paymentRequestsLoaded=!1,this.requestsBusy={},this.useServerPagination=!1,this.gridOptionsKey="payments-grid-options",this.isScoped=!1,this.persistableSearchKeys=["status","paymentItemType","usersInvolvedInPayment","sourceModuleRecord","minAmount","maxAmount"],this.statusChips=[{key:"completed",label:"Completed",color:"#16a34a"},{key:"Initiated",label:"Incomplete",color:"#d97706"}],this.filterSheetOpen=!1}ngOnInit(){this.init()}init(){var n=this;return(0,c.Z)(function*(){if(n.currentUser=n._authService.getCurrentlyLoggedInUser(),n.currentUser){if(n.baseRoute=n._userService.getRouteForUser(n.currentUser.userType),n.isSystemAdmin="System Admin"===n.currentUser.userType,n.isAnglerStandalone="Angler"===n.currentUser.userType&&!n.currentTournament&&!n.userToView,n.isAnglerStandalone)return void(n.initialized=!0);"Angler"!==n.currentUser.userType&&n.displayedColumns.unshift("select")}n.isScoped=!!(n.currentTournament&&n.currentTournament._id||n.userToView&&n.userToView._id),yield n.resetSearch(),yield n.restoreSavedSearch(),n.getPayments(),n.getDirectorsUsers(),n.loadPaymentRequests(),n.getTournaments(),n.userQuickSearch$.pipe((0,v.b)(300)).subscribe(()=>n.applyUserQuickSearch()),n.displayedColumns.push("status"),n.buildGridColumns()})()}resetSearchTerms(){var n=this;return(0,c.Z)(function*(){n.searchTerms=yield n.resetSearch(),n.saveSearch()})()}saveSearch(){if(this.isScoped||!this.searchTerms)return;const n={};for(const a of this.persistableSearchKeys)n[a]=this.searchTerms[a]??null;this._tableService.saveSearchTermsInLocal(this.gridOptionsKey,n)}restoreSavedSearch(){var n=this;return(0,c.Z)(function*(){if(n.isScoped)return;yield n._tableService.hydrationReady;const a=n._tableService.getSearchTermsFromLocal(n.gridOptionsKey);if(a)for(const s of n.persistableSearchKeys)null!=a[s]&&(n.searchTerms[s]=a[s])})()}setStatusFilter(n){this.searchTerms&&(this.searchTerms.status=n,this.getPayments())}get activeStatusChipKeys(){return this.searchTerms?.status?[this.searchTerms.status]:[]}onStatusChipToggle(n){this.setStatusFilter("all"===n||(this.searchTerms?.status||null)===n?null:n)}isTypeSelected(n){const a=this.searchTerms?.paymentItemType;return Array.isArray(a)?-1!==a.indexOf(n):a===n}toggleTypeFilter(n){if(!this.searchTerms)return;const a=Array.isArray(this.searchTerms.paymentItemType)?[...this.searchTerms.paymentItemType]:this.searchTerms.paymentItemType?[this.searchTerms.paymentItemType]:[],s=a.indexOf(n);-1===s?a.push(n):a.splice(s,1),this.searchTerms.paymentItemType=a,this.getPayments()}get selectedTypeFilters(){const n=this.searchTerms?.paymentItemType;return Array.isArray(n)?n:n?[n]:[]}get activeStatusLabel(){const n=this.searchTerms?.status;return n?this.statusChips.find(a=>a.key===n)?.label||n:null}get moneyStrip(){if(!this.heroStats)return"";const n=[`${this.money(this.heroStats.collected)} collected`];return this.heroStats.paidOut&&n.push(`${this.money(this.heroStats.paidOut)} paid out`),n.join(" \xb7 ")}
1money(n){return(n||0).toLocaleString("en-US",{style:"currency",currency:"USD"})}get sheetFilterCount(){let n=this.selectedTypeFilters.length;return this.searchTerms?.status&&n++,(this.searchTerms?.minAmount||this.searchTerms?.maxAmount)&&n++,n}setTournamentFilter(n){this.searchTerms&&(this.searchTerms.sourceModuleRecord=n,this.getPayments())}get hasActiveFilters(){if(!this.searchTerms)return!1;const n=this.searchTerms.paymentItemType,a=this.searchTerms.usersInvolvedInPayment;return!!(this.searchTerms.status||(Array.isArray(n)?n.length:n)||Array.isArray(a)&&a.length||!this.currentTournament&&this.searchTerms.sourceModuleRecord||this.searchTerms.minAmount||this.searchTerms.maxAmount||this.userQuickSearch)}clearFilters(){var n=this;return(0,c.Z)(function*(){n.userQuickSearch="",yield n.resetSearchTerms(),n.getPayments()})()}onUserQuickSearch(n){this.userQuickSearch=n??"",this.userQuickSearch$.next(this.userQuickSearch)}clearUserQuickSearch(){this.userQuickSearch="",this.userQuickSearch$.next("")}applyUserQuickSearch(){if(!this.searchTerms)return;const n=(this.userQuickSearch||"").trim().toLowerCase();if(!n)return this.searchTerms.usersInvolvedInPayment=[],void this.getPayments();const a=n.replace(/\D/g,""),s=(this._directorsUsers||[]).filter(p=>{const d=`${p?.first_name||""} ${p?.last_name||""}`.trim().toLowerCase(),g=(p?.email||"").toLowerCase(),f=(p?.phone||"").replace(/\D/g,"");return!!(d.includes(n)||g.includes(n)||a.length>=3&&f&&f.includes(a))}).map(p=>p._id);this.searchTerms.usersInvolvedInPayment=s.length?s:["000000000000000000000000"],this.getPayments()}getTournaments(){var n=this;return(0,c.Z)(function*(){if("Director"===n.currentUser?.userType)n._tournaments=yield n._tournamentService.getTournamentsFromStorage(n.currentUser._id);else if("System Admin"===n.currentUser?.userType){const a=new T.fC;n._tournaments=yield(0,A.lastValueFrom)(n._tournamentService.skinnySearch(a))}n._tournaments?.length&&(n._tournaments=[...n._tournaments].sort((a,s)=>(a?.name??"").localeCompare(s?.name??"",void 0,{sensitivity:"base"})))})()}getDirectorsUsers(){var n=this;return(0,c.Z)(function*(){n._directorsUsers=yield n._userService.getUsersForDirector(n.currentUser)})()}getPayments(){var n=this;return(0,c.Z)(function*(){n.saveSearch();const a=n.currentTournament&&n.currentTournament._id?n.currentTournament._id:null;let s=null;if(!n.userToView)if("Director"===n.currentUser?.userType&&n.currentTournament){const d=n.currentTournament.director;s=d?._id?d._id:d}else if("System Admin"===n.currentUser?.userType&&n.currentTournament){const d=n.currentTournament.director;s=d?._id?d._id:d}let p=null;if("Director"!==n.currentUser?.userType||n.currentTournament||n.userToView)if("System Admin"!==n.currentUser?.userType||n.currentTournament||n.userToView)if(!s||"Director"!==n.currentUser?.userType&&"System Admin"!==n.currentUser?.userType)p=yield(0,A.lastValueFrom)(n._paymentService.search(n.searchTerms));else{const d="System Admin"===n.currentUser.userType?s:n.currentUser._id;p=n._networkService.isOnLine(!0)?yield(0,A.lastValueFrom)(n._paymentService.searchByAssistantDirectorPaged(d,null,null,!0,{...n.searchTerms,sourceModuleRecord:a})):yield n._paymentService.getPaymentsWithStorageCheck(s,a,n.searchTerms)}else{n.useServerPagination=!0;const d=yield(0,A.lastValueFrom)(n._paymentService.getCustomDatasource(n.searchTerms,n.sortField||"createdAt",n.sortField?n.sortDir:"desc",n.pageIndex,n.pageSize));p=d?.message||[],n.length=d?.totalItemCount||0,n.heroStats=d?.stats||null}else{n.useServerPagination=!0;const d=yield(0,A.lastValueFrom)(n._paymentService.searchByAssistantDirectorPaged(n.currentUser._id,n.pageIndex,n.pageSize,!0,n.searchTerms));p=d?.message||[],n.length=d?.totalItemCount||0,n.heroStats=d?.stats||null}p=[...p||[]].sort((d,g)=>new Date(g.createdAt).getTime()-new Date(d.createdAt).getTime()),n.unfilteredPayments=p.map(d=>(d.amount=d.items?.reduce((g,f)=>g+f.cost,0)||0,d)),n.useServerPagination?n._payments=n.unfilteredPayments:(n.length=n.unfilteredPayments.slice().length,n._payments=n.paginate(n.unfilteredPayments,n.pageSize,n.pageIndex+1),n.computeLocalMoneyStats(),n.computeReportData()),n.initialized=!0})()}computeReportData(){const n={credit:{},debit:{}};let a=0,s=0;for(const M of this.unfilteredPayments||[]){if(M.voidedAt||"voided"===M.status)continue;if("Initiated"===M.status||"processing"===M.status){a++,s+=M.amount||0;continue}if("completed"!==M.status)continue;const J="debit"===M.debitOrCredit?"debit":"credit";for(const V of M.items||[]){const K=V.type||"Other",tn=n[J][K]||(n[J][K]={amount:0,count:0});tn.amount+=V.cost||0,tn.count++}}const p=M=>Object.keys(M).map(J=>({type:J,amount:M[J].amount,count:M[J].count,pct:0})).sort((J,V)=>V.amount-J.amount),d=p(n.credit),g=p(n.debit),f=Math.max(1,...d.map(M=>M.amount),...g.map(M=>M.amount));for(const M of d)M.pct=M.amount/f*100;for(const M of g)M.pct=M.amount/f*100;const y=d.reduce((M,J)=>M+J.amount,0),q=g.reduce((M,J)=>M+J.amount,0),Y=d.filter(M=>M.amount>0),U=Y.length>1?3:0,D=this.donutC-U*Y.length;let $=-90;const H=Y.map(M=>{const J=y?M.amount/y:0,V=J*D,K={type:M.type,amount:M.amount,share:J,len:V,rotate:$};return $+=(V+U)/this.donutC*360,K});this.reportData={collected:y,paidOut:q,incompleteCount:a,incompleteAmount:s,inRows:d,outRows:g,donut:H}}computeLocalMoneyStats(){const n={collected:0,pending:0,paidOut:0};for(const a of this.unfilteredPayments||[]){const s=a.amount||0;a.voidedAt||"voided"===a.status||("completed"===a.status?"debit"===a.debitOrCredit?n.paidOut+=s:n.collected+=s:("Initiated"===a.status||"processing"===a.status)&&(n.pending+=s))}this.heroStats=n}selectAll(){var n=this;return(0,c.Z)(function*(){let a;if(n.initialized=!1,"Director"!==n.currentUser?.userType||n.currentTournament||n.userToView)if(!n.currentTournament?._id||n.userToView||"Director"!==n.currentUser?.userType&&"
1System Admin"!==n.currentUser?.userType)a=yield(0,A.lastValueFrom)(n._paymentService.search(n.searchTerms));else{const s=n.currentTournament.director,p="System Admin"===n.currentUser.userType?s?._id?s._id:s:n.currentUser._id;a=yield(0,A.lastValueFrom)(n._paymentService.searchByAssistantDirectorPaged(p,null,null,!0,{...n.searchTerms,sourceModuleRecord:n.currentTournament._id}))}else a=yield(0,A.lastValueFrom)(n._paymentService.searchByAssistantDirectorPaged(n.currentUser._id,null,null,!0,n.searchTerms));a?.length&&n._tableService.setResults(a),n.initialized=!0})()}exportToExcelFormat(n){var a=this;return(0,c.Z)(function*(){const s=a._tableService.selectedRows.selected.slice(0),p=[];for(let g=0;g<s.length;g++){const f=s[g];let y=f?.user?.first_name?.length?`${f.user?.first_name} `:"";f?.user?.last_name?.length&&(y+=f.user?.last_name),f?.items?.length&&f.items.forEach((q,Y)=>{p.push({name:y,_id:f._id,type:q.type,amount:q.cost,description:q.description,createdAt:O(f.createdAt).format("MM/DD/YY h:mm:ss A")})})}const d={columns:[{field:"_id",label:"ID"},{field:"name",label:"Paid By"},{field:"type",label:"Type"},{field:"amount",label:"Amount"},{field:"description",label:"Payment Details"},{field:"createdAt",label:"Date Received"}],data:p,exportType:n};if(null!=d){const g=yield(0,A.lastValueFrom)(a._fileService.exportToExcelFormat(d));if(null!=g){const f=a.downloadSpreadsheetLink.nativeElement;f.href=g.relativeUrl,f.download=g.relativeUrl,f.click(),a._tableService.deselectAll()}else a._sharedUtilsService.showNotification("There may have been an issue exporting this data to selected format. Please try again.")}})()}paginate(n,a,s){n.length<this.pageSize&&(this.pageIndex=0,s=1);const p=(s-1)*a;return n.slice(p,p+a)}resetSearch(){var n=this;return new Promise(function(){var a=(0,c.Z)(function*(s){n.searchTerms=new T.F6,n.userToView?n.searchTerms.user=n.userToView._id:n.currentUser&&!(("Director"===n.currentUser.userType||"System Admin"===n.currentUser.userType)&&n.currentTournament?.director)&&"System Admin"!==n.currentUser.userType&&(n.searchTerms.user=n.currentUser._id),n.currentTournament&&n.currentTournament._id&&(n.searchTerms.sourceModuleRecord=n.currentTournament._id),n.searchTerms.excludeVoided=!0,s(n.searchTerms)});return function(s){return a.apply(this,arguments)}}())}paymentPartiesLabel(n){const a=n.accountToPay,s=n.recipientOfPayment,p=a?.name||(s?.first_name?`${s.first_name} ${s.last_name}`:"WeighBook");if(this.userToView)return`Paid to ${p}`;const d=`${n.user?.first_name||""} ${n.user?.last_name||""}`.trim();return d?`${d} \u2192 ${p}`:`To ${p}`}chooseTournament(n){this.currentlyChosenTourId=n._id}createDivision(){let n=document.location.pathname;this.router.navigate([n+"/create"])}loadPaymentRequests(){var n=this;return(0,c.Z)(function*(){if(n.currentTournament?._id&&"Angler"!==n.currentUser?.userType){try{const a=yield(0,A.lastValueFrom)(n._paymentRequests.search({tournament:n.currentTournament._id}));n.paymentRequests=(a?.requests||[]).filter(s=>!s.revokedAt)}catch{n.paymentRequests=[]}n.paymentRequestsLoaded=!0}})()}requestStatus(n){return n.usedAt?"paid":n.expiresAt&&new Date(n.expiresAt)<new Date?"expired":"open"}get openPaymentRequests(){return this.paymentRequests.filter(n=>"paid"!==this.requestStatus(n))}get paidPaymentRequests(){return this.paymentRequests.filter(n=>"paid"===this.requestStatus(n))}payPaymentRequest(n){var a=this;return(0,c.Z)(function*(){if(!a.requestsBusy[n._id]){a.requestsBusy[n._id]=!0;try{const s=yield(0,A.lastValueFrom)(a._paymentRequests.payLink(n._id));s?.link&&a.router.navigateByUrl(s.link)}catch(s){a._sharedUtilsService.showNotification(s?.error?.message||"Could not open that request for payment.")}finally{a.requestsBusy[n._id]=!1}}})()}remindPaymentRequest(n){var a=this;return(0,c.Z)(function*(){if(!a.requestsBusy[n._id]){a.requestsBusy[n._id]=!0;try{yield(0,A.lastValueFrom)(a._paymentRequests.remind(n._id)),a._sharedUtilsService.showNotification(`Reminder sent to ${n.name}.`),a.loadPaymentRequests()}catch(s){a._sharedUtilsService.showNotification(s?.error?.message||"Could not send that reminder.")}finally{a.requestsBusy[n._id]=!1}}})()}revokePaymentRequest(n){var a=this;return(0,c.Z)(function*(){if(!a.requestsBusy[n._id]&&(yield a._sharedUtilsService.confirmationDialogPromise({title:"Withdraw this request?",textToDisplay:`${n.name} will no longer be able to pay the ${a.requestAmountLabel(n)} \u2014 their link stops working immediately.`,items:null,buttonsInfo:{confirmText:"Withdraw",confirmBtnColor:"warn",denyText:"Keep it",denyBtnColor:""}}))){a.requestsBusy[n._id]=!0;try{yield(0,A.lastValueFrom)(a._paymentRequests.revoke(n._id)),a.loadPaymentRequests()}catch(p){a._sharedUtilsService.showNotification(p?.error?.message||"Could not withdraw that request.")}finally{a.requestsBusy[n._id]=!1}}})()}requestAmountLabel(n){const a=(n.amountCents||0)/100;return"$"+(a%1==0?String(a):a.toFixed(2))}openRequestPaymentDialog(){if(!this.currentTournament?._id)return;const n=this._dialog.open(ut,{width:"500px",maxHeight:"90vh",panelClass:"white-bg",disableClose:!1});n.componentInstance.currentTournament=this.currentTournament,n.afterClosed().subscribe(a=>{a&&this.loadPaymentRequests()})}openCreatePaymentDialog(){if(!this.currentTournament?._id)return;const n=this._dialog.open(x,{width:"540px",maxHeight:"90vh",panelClass:"white-bg",disableClose:!1});n.componentInstance.currentTournament=this.currentTournament,n.afterClosed().subscribe(a=>{a&&this.getPayments()})}viewRecord(n){this._paymentService.setCurrent(n);const a=`${this.baseRoute}/payments/`+n._id;this.currentTournament?._id?this.router.navigate([a],{queryParams:{returnUrl:`${this.baseRoute}/tournaments/${this.currentTournament._id}?tab=payments`}}):this.router.navigateByUrl(a)}static{this.\u0275fac=function(a){return new(a||r)(t.Y36(h.e8),t.Y36(h.K
1D),t.Y36(h.te),t.Y36(h.Ip),t.Y36(h.wm),t.Y36(h.Zr),t.Y36(h.n3),t.Y36(h.SL),t.Y36(F.uw),t.Y36(lt.F0),t.Y36(E.g))}}static{this.\u0275cmp=t.Xpm({type:r,selectors:[["payments-grid"]],viewQuery:function(a,s){if(1&a&&t.Gf(Bt,7),2&a){let p;t.iGM(p=t.CRH())&&(s.downloadSpreadsheetLink=p.first)}},inputs:{currentTournament:"currentTournament",panelMode:"panelMode",userToView:"userToView"},decls:7,vars:3,consts:[[4,"ngIf"],["class","pf-panel","title","Payments","searchPlaceholder","Find by name, email, or phone",3,"count","subtitle","showSearch","searchValue","searchChange",4,"ngIf"],["id","page-wrap-inner","class","full-height",4,"ngIf"],["gridBody",""],[1,"download-zip-link"],["downloadSpreadsheetLink",""],["title","Payments","searchPlaceholder","Find by name, email, or phone",1,"pf-panel",3,"count","subtitle","showSearch","searchValue","searchChange"],["actions","","type","button","class","ptp-btn-secondary",3,"click",4,"ngIf"],["subtabs","",4,"ngIf"],[4,"ngTemplateOutlet"],["actions","","type","button",1,"ptp-btn-secondary",3,"click"],[1,"material-symbols-outlined"],["subtabs",""],["type","button",1,"ptp-subtab",3,"click"],["id","page-wrap-inner",1,"full-height"],[1,"payments-page","gray-bg","relative","full-height"],[1,"card"],[1,"card-body","full-height"],["class","grid-hero-header",4,"ngIf"],[1,"grid-hero-header"],[1,"hero-left"],[1,"hero-icon-wrap"],[1,"hero-text"],["class","hero-subtitle",4,"ngIf"],["class","hero-stats",4,"ngIf"],[1,"hero-actions"],["class","hero-action-btn","matTooltip","Request Payment",3,"click",4,"ngIf"],["class","hero-action-btn","matTooltip","Create Payment",3,"click",4,"ngIf"],[1,"hero-subtitle"],[1,"hero-stats"],[1,"hero-stat"],[1,"hero-stat-label"],[1,"hero-stat-value","is-collected"],[1,"hero-stat-divider"],[1,"hero-stat-value","is-paid-out"],["matTooltip","Request Payment",1,"hero-action-btn",3,"click"],["matTooltip","Create Payment",1,"hero-action-btn",3,"click"],["class","pr-strip",4,"ngIf"],["class","loading-wrapper",4,"ngIf"],["class","table-wrapper no-pad-first-col-td",3,"no-hero",4,"ngIf"],[1,"pr-strip"],[1,"pr-strip-head"],[1,"material-symbols-outlined","pr-strip-icon"],[1,"pr-strip-title"],[1,"pr-strip-count"],["class","pr-row",4,"ngFor","ngForOf"],["class","pr-strip-paid",4,"ngIf"],[1,"pr-row"],[1,"pr-row-name"],[1,"pr-row-amount"],[1,"pr-row-reason"],[1,"pr-row-meta"],[1,"pr-row-status"],[1,"pr-row-actions"],["type","button",1,"pr-row-btn",3,"disabled","click"],["type","button",1,"pr-row-btn","pr-row-btn-danger",3,"disabled","click"],[1,"pr-strip-paid"],[1,"loading-wrapper"],[3,"loadingLabel","loadingText"],[1,"table-wrapper","no-pad-first-col-td"],[1,"payments-toolbar"],["class","pf-user-search",4,"ngIf"],[1,"tg-chips",3,"chips","activeKeys","chipToggle"],[1,"pf-toolbar-spacer"],["class","pf-toolbar-select","matTooltip","Tournament",4,"ngIf"],["matTooltip","Amount range",1,"pf-amount-range"],[1,"pf-amount-symbol"],["type","number","placeholder","Min",1,"pf-amount-input",3,"ngModel","ngModelChange","change"],[1,"pf-amount-dash"],["type","number","placeholder","Max",1,"pf-amount-input",3,"ngModel","ngModelChange","change"],["type","button","class","pf-clear-btn","matTooltip","Clear all filters",3,"click",4,"ngIf"],["type","button",1,"pf-filters-btn",3,"click"],["class","pf-filters-count",4,"ngIf"],["class","pf-active-chips",4,"ngIf"],[1,"payments-toolbar","payments-toolbar-types"],[1,"pf-quick-label"],[1,"pf-chip-group"],["type","button","class","pf-chip",3,"active","click",4,"ngFor","ngForOf"],["class","empty-state",4,"ngIf"],["selectHead",""],["class","pf-table",3,"has-select","columns","rows","sortField","sortDir","rowTemplate","headerTemplate","headerTemplateColumns","sortChange","rowClick",4,"ngIf"],["paymentRow",""],["class","rp-body",4,"ngIf"],["class","tg-pagination",3,"page","pageSize","total","pageChange","pageSizeChange",4,"ngIf"],[1,"pf-user-search"],[1,"material-symbols-outlined","pf-user-search-icon"],["type","text","placeholder","Find by name, email, or phone",1,"pf-user-search-input",3,"ngModel","ngModelOptions","ngModelChange"],["type","button","class","pf-user-search-clear","aria-label","Clear",3,"click",4,"ngIf"],["type","button","aria-label","Clear",1,"pf-user-search-clear",3,"click"],["matTooltip","Tournament",1,"pf-toolbar-select"],[3,"ngModel","ngModelChange"],[3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],["type","button","matTooltip","Clear all filters",1,"pf-clear-btn",3,"click"],[1,"pf-filters-count"],[1,"pf-active-chips"],["type","button","class","pf-active-chip",3,"click",4,"ngFor","ngForOf"],["type","button","class","pf-active-chip",3,"click",4,"ngIf"],["type","button",1,"pf-active-chip",3,"click"],["type","button",1,"pf-chip",3,"click"],[1,"empty-state"],[1,"empty-icon-wrap"],[1,"empty-title"],[1,"empty-desc"],[1,"empty-actions"],["mat-stroked-button","",3,"click"],[1,"pmt-
1actions-anchor"],["type","button","matTooltip","Bulk actions",1,"pmt-actions-btn",3,"click"],[1,"pmt-actions-backdrop",3,"click"],[1,"pmt-actions-dropdown"],["type","button",1,"pmt-actions-item",3,"click"],["type","button",1,"pmt-actions-item",3,"disabled","click"],[1,"pmt-actions-divider"],[1,"pf-table",3,"columns","rows","sortField","sortDir","rowTemplate","headerTemplate","headerTemplateColumns","sortChange","rowClick"],["class","admin-grid-cell tg-cell col-select",4,"ngIf"],[1,"admin-grid-cell","tg-cell","tg-cell-name-with-avatar","col-details"],[1,"pmt-dir-tile",3,"matTooltip"],[1,"pmt-info"],[1,"pmt-name",3,"routerLink","click"],[1,"pmt-sub"],["class","pmt-items",4,"ngIf"],["class","pmt-sub-sep",4,"ngIf"],[1,"admin-grid-cell","tg-cell","col-payer"],[1,"pmt-party-av"],[1,"pmt-party-text"],[1,"pmt-party-name"],[1,"pmt-party-role"],[1,"admin-grid-cell","tg-cell","col-flow"],[1,"material-symbols-outlined","pmt-flow-arrow"],[1,"admin-grid-cell","tg-cell","col-payee"],[1,"admin-grid-cell","tg-cell","col-amount","align-right"],[1,"pmt-amount"],[1,"admin-grid-cell","tg-cell","col-status"],[4,"ngIf","ngIfElse"],["gridStatusSwitch",""],[1,"admin-grid-cell","tg-cell","col-select"],["data-no-row-click","",3,"checked","click","change"],[1,"pmt-items"],[4,"ngFor","ngForOf"],[1,"pmt-sub-sep"],[1,"label-wrapper","voided"],[1,"inner-label"],[3,"ngSwitch"],["class","label-wrapper failed",4,"ngSwitchCase"],["class","label-wrapper processing",4,"ngSwitchCase"],["class","label-wrapper completed",4,"ngSwitchCase"],["class","label-wrapper",4,"ngSwitchDefault"],[1,"label-wrapper","failed"],[1,"label-wrapper","processing"],[1,"label-wrapper","completed"],[1,"label-wrapper"],[1,"pf-sheet-backdrop",3,"click"],["role","dialog","aria-label","Payment filters",1,"pf-sheet"],["type","button","aria-label","Close filters",1,"pf-sheet-handle",3,"click"],[1,"pf-sheet-title"],[1,"pf-sheet-label"],[1,"pf-sheet-chips"],[1,"pf-chip-dot"],[1,"rp-body"],["class","empty-desc",4,"ngIf"],["class","empty-actions",4,"ngIf"],[1,"rp-tiles"],[1,"rp-tile"],[1,"rp-tile-label"],[1,"rp-tile-value","is-in"],[1,"rp-tile-value"],[1,"rp-tile-value","is-warn"],[1,"rp-tile-sub"],[1,"rp-charts"],["class","rp-card",4,"ngIf"],[1,"rp-card"],[1,"rp-card-title"],["class","rp-bar-group",4,"ngIf"],["class","rp-none",4,"ngIf"],[1,"rp-donut-flex"],[1,"rp-donut"],["viewBox","0 0 120 120","aria-hidden","true"],["cx","60","cy","60",1,"rp-donut-track"],["class","rp-donut-seg","cx","60","cy","60",3,"stroke-dasharray",4,"ngFor","ngForOf"],[1,"rp-donut-center"],[1,"rp-donut-total"],[1,"rp-donut-caption"],[1,"rp-legend"],["cx","60","cy","60",1,"rp-donut-seg"],[1,"rp-legend-dot"],[1,"rp-legend-type"],[1,"rp-legend-amount"],[1,"rp-legend-share"],[1,"rp-bar-group"],[1,"rp-bar-group-label"],["class","rp-bar-row",4,"ngFor","ngForOf"],[1,"rp-bar-row"],[1,"rp-bar-type"],[1,"rp-bar-track"],[1,"rp-bar-fill"],[1,"rp-bar-count"],[1,"rp-bar-amount"],[1,"rp-none"],[1,"tg-pagination",3,"page","pageSize","total","pageChange","pageSizeChange"]],template:function(a,s){1&a&&(t.YNc(0,rt,1,0,"angler-payments",0),t.YNc(1,$t,5,8,"profile-tab-panel",1),t.YNc(2,ee,6,4,"div",2),t.YNc(3,m,3,3,"ng-template",null,3,t.W1O),t._UZ(5,"a",4,5)),2&a&&(t.Q6J("ngIf",s.isAnglerStandalone),t.xp6(1),t.Q6J("ngIf",!s.isAnglerStandalone&&s.panelMode),t.xp6(1),t.Q6J("ngIf",!s.isAnglerStandalone&&!s.panelMode))},dependencies:[P.sg,P.O5,P.tP,P.RF,P.n9,P.ED,u.YN,u.Kr,u.Fj,u.wV,u.EJ,u.JJ,u.On,N.O,mt.d,_t.q,ft.j,Tt.M,ot.Hw,e.oG,I.lW,kt.gM,lt.rH,Qt,P.JJ,P.Zx,P.rS,P.H9,P.uU],styles:['.admin-grid-page[_ngcontent-%COMP%]{padding:24px 24px 16px}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]{padding:14px 12px 8px}}.admin-grid-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:14px}.admin-grid-title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.admin-grid-title[_ngcontent-%COMP%]{display:inline-flex;align-items:baseline;gap:10px;font-size:22px;font-weight:700;color:#0f172a;margin:0}.admin-grid-title-count[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#94a3b8;font-variant-numeric:tabular-nums}.admin-grid-subtitle[_ngcontent-%COMP%]{font-size:12.5px;color:#6b7280}.admin-grid-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}.admin-grid-search[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;height:36px;padding:0 10px 0 36px;min-width:280px;transition:border-color .12s,background .12s}.admin-grid-search[_ngcontent-%COMP%]:focus-within{border-color:#2563eb;background:#ffffff}.admin-grid-search[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{position:absolute;
1left:10px;color:#9ca3af;font-size:18px;pointer-events:none}.admin-grid-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;font-size:13px;color:#1f2937;height:100%;font-family:inherit;min-width:0}.admin-grid-search[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.admin-grid-search[_ngcontent-%COMP%] .search-shortcut[_ngcontent-%COMP%]{margin-left:8px;font-size:11px;font-weight:500;color:#9ca3af;border:1px solid #e5e7eb;border-radius:4px;padding:1px 6px;background:#fafbfc;font-family:SFMono-Regular,Menlo,Consolas,monospace}.admin-grid-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;font-size:13px;font-weight:500;color:#374151;cursor:pointer;font-family:inherit;transition:background .12s,border-color .12s}.admin-grid-btn[_ngcontent-%COMP%]:hover{background:#f9fafb;border-color:#d1d5db}.admin-grid-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px;color:#6b7280}.admin-grid-btn.is-primary[_ngcontent-%COMP%]{background:#2563eb;border-color:#2563eb;color:#fff}.admin-grid-btn.is-primary[_ngcontent-%COMP%]:hover{background:#1d4ed8;border-color:#1d4ed8}.admin-grid-btn.is-primary[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{color:#fff}.admin-grid-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0 10px;flex-wrap:wrap}.admin-grid-toolbar-left[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;flex:1;min-width:0}.admin-grid-toolbar-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}.cell-primary[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:#0f172a;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.cell-secondary[_ngcontent-%COMP%]{font-size:11.5px;color:#94a3b8;line-height:1.3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cell-stack[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;background:#f3f4f6;font-size:12px;font-weight:500;color:#4b5563;line-height:1.4}.status-pill[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:#9ca3af}.status-pill.is-active[_ngcontent-%COMP%]{background:#ecfdf5;color:#047857}.status-pill.is-active[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#10b981}.status-pill.is-upcoming[_ngcontent-%COMP%]{background:#eff6ff;color:#1d4ed8}.status-pill.is-upcoming[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#3b82f6}.status-pill.is-completed[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.status-pill.is-completed[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-archived[_ngcontent-%COMP%]{background:#fef2f2;color:#b91c1c}.status-pill.is-archived[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#ef4444}.status-pill.is-inactive[_ngcontent-%COMP%]{background:#f3f4f6;color:#4b5563}.status-pill.is-inactive[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-empty[_ngcontent-%COMP%]{background:#fff7ed;color:#c2410c}.status-pill.is-empty[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#f97316}.status-pill.is-draft[_ngcontent-%COMP%]{background:#f3f4f6;color:#6b7280}.status-pill.is-draft[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#9ca3af}.status-pill.is-scheduled[_ngcontent-%COMP%]{background:#eff6ff;color:#2563eb}.status-pill.is-scheduled[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#3b82f6}.status-pill.is-open[_ngcontent-%COMP%]{background:#ecfdf5;color:#059669}.status-pill.is-open[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#10b981}.status-pill.is-in-progress[_ngcontent-%COMP%]{background:#fffbeb;color:#b45309}
1.status-pill.is-in-progress[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#f59e0b;animation:_ngcontent-%COMP%_pill-pulse 1.6s ease-in-out infinite}.status-pill.is-closed[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.status-pill.is-closed[_ngcontent-%COMP%] .pill-dot[_ngcontent-%COMP%]{background:#ef4444}@keyframes _ngcontent-%COMP%_pill-pulse{0%,to{box-shadow:0 0 #f59e0b8c}50%{box-shadow:0 0 0 4px #f59e0b00}}.count-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border-radius:6px;background:#eff6ff;color:#1d4ed8;font-size:12.5px;font-weight:600;font-variant-numeric:tabular-nums}.count-chip.is-zero[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}.admin-grid-cell.align-right[_ngcontent-%COMP%] .count-chip[_ngcontent-%COMP%]{background:transparent;padding:0;min-width:0;height:auto;font-size:13px}.admin-grid-cell.align-right[_ngcontent-%COMP%] .count-chip.is-zero[_ngcontent-%COMP%]{background:transparent}.dates-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.dates-cell[_ngcontent-%COMP%] .dates-range[_ngcontent-%COMP%]{font-size:13px;color:#0f172a;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dates-cell[_ngcontent-%COMP%] .dates-rel[_ngcontent-%COMP%]{font-size:11.5px;margin-top:2px}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-active[_ngcontent-%COMP%]{color:#047857}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-upcoming[_ngcontent-%COMP%]{color:#1d4ed8}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-completed[_ngcontent-%COMP%]{color:#94a3b8}.dates-cell[_ngcontent-%COMP%] .dates-rel.is-archived[_ngcontent-%COMP%]{color:#b91c1c}.row-chevron[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;color:#cbd5e1;font-size:18px}.row-chevron[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;text-align:center;color:#6b7280}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:50%;background:#f3f4f6;display:inline-flex;align-items:center;justify-content:center;margin-bottom:12px}.empty-state[_ngcontent-%COMP%] .empty-icon[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:28px;color:#9ca3af}.empty-state[_ngcontent-%COMP%] .empty-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:#1f2937;margin-bottom:4px}.empty-state[_ngcontent-%COMP%] .empty-desc[_ngcontent-%COMP%]{font-size:13px;color:#6b7280;max-width:380px}.tour-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;border-radius:7px;color:var(--wb-text-2);background:var(--wb-neutral-soft);margin-right:10px}.tour-avatar[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.tour-avatar.is-empty[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}[_nghost-%COMP%]{display:block;background:var(--fc-bg);--wb-page-max: 1560px;--wb-admin-chrome: 300px;--wb-tg-bg-canvas: var(--wb-canvas, #F4F5F7);--wb-tg-bg-surface: var(--wb-surface, #FFFFFF);--wb-tg-bg-surface-elevated: var(--wb-surface, #FFFFFF);--wb-tg-bg-surface-glow: var(--wb-warning-soft, #FFF8E8);--wb-tg-shadow: var(--wb-e1, 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06));--wb-tg-border-soft: rgba(15, 23, 42, .1);--wb-tg-border-emphasis: rgba(15, 23, 42, .18);--wb-tg-text-primary: var(--wb-text, #111827);--wb-tg-text-secondary: var(--wb-text-2, #5B6370);--wb-tg-text-tertiary: var(--wb-text-3, #6B7280);--wb-tg-text-quaternary: var(--wb-text-4, #9AA1AC);--wb-tg-status-draft: var(--wb-status-draft-fg);--wb-tg-status-scheduled: var(--wb-status-scheduled-fg);--wb-tg-status-open: var(--wb-status-open-fg);--wb-tg-status-live: var(--wb-status-live-fg);--wb-tg-status-live-glow: var(--wb-status-live-glow);--wb-tg-status-closed: var(--wb-status-closed-fg);--wb-tg-status-completed: var(--wb-status-completed-fg);--wb-tg-status-active: var(--wb-status-active-fg);--wb-tg-status-upcoming: var(--wb-status-upcoming-fg);--wb-tg-status-archived: var(--wb-status-archived-fg);--wb-tg-status-inactive: var(--wb-status-inactive-fg);--wb-tg-status-empty: var(--wb-status-empty-fg);--wb-tg-accent-blue: var(--wb-accent);background:var(--wb-tg-bg-canvas);color:var(--wb-tg-text-primary);-webkit-font-smoothing:antialiased}.admin-grid-page[_ngcontent-%COMP%]{max-width:1440px;margin:0 auto;padding:32px}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]{padding:20px 16px}}.tg-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:32px;margin-bottom:28px;flex-wrap:wrap}@media (max-width: 720px){.tg-header[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:14px;margin-bottom:20px}}.tg-header-left[_ngcontent-%COMP%]{flex:1;min-width:0}.tg-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;margin:0;font-size:28px;font-weight:600;letter-spacing:-.4px;color:var(--wb-tg-text-primary);flex-wrap:wrap}@media (max-width: 720px){.tg-title[_ngcontent-%COMP%]{font-size:22px;gap:10px;letter-spacing:-.3px}}.tg-title-count[_ngcontent-%COMP%]{font-size:16px;font-weight:500;color:var(--wb-tg-text-tertiary);font-variant-numeric:tabular-nums;letter-spacing:0}
1.tg-title-live[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;font-size:11px;font-weight:700;letter-spacing:1.2px;color:var(--wb-tg-status-live);background:rgba(217,119,6,.1);border:.5px solid rgba(217,119,6,.3);border-radius:6px;font-variant-numeric:tabular-nums;white-space:nowrap}@media (max-width: 720px){.tg-title-live[_ngcontent-%COMP%]{display:none}}.tg-live-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--wb-tg-status-live);box-shadow:0 0 8px var(--wb-tg-status-live-glow);animation:_ngcontent-%COMP%_tg-live-pulse 1.6s ease-in-out infinite}.tg-subtitle[_ngcontent-%COMP%]{margin:8px 0 0;font-size:13px;color:var(--wb-tg-text-secondary)}.tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-emph[_ngcontent-%COMP%]{color:var(--wb-tg-status-live);font-weight:500}.tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-sep[_ngcontent-%COMP%]{margin:0 8px;color:var(--wb-tg-text-quaternary)}.tg-header-right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px}@media (max-width: 720px){.tg-header-right[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}}.tg-search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;margin:0;width:320px;height:40px;background:var(--wb-tg-bg-surface);border:1px solid var(--wb-tg-border-soft);border-radius:8px;transition:border-color .12s,box-shadow .12s}.tg-search[_ngcontent-%COMP%]:focus-within{border-color:var(--wb-tg-accent-blue);box-shadow:0 0 0 3px var(--wb-tg-accent-blue-glow, rgba(37, 99, 235, .15))}@media (max-width: 720px){.tg-search[_ngcontent-%COMP%]{width:100%}}.tg-search-icon[_ngcontent-%COMP%]{font-size:18px;color:var(--wb-tg-text-tertiary);margin:0 8px 0 12px}.tg-header-right[_ngcontent-%COMP%] .tg-date-range .dropdown-trigger{height:40px;min-height:40px;padding-top:0;padding-bottom:0}.tg-search-input[_ngcontent-%COMP%]{flex:1;height:100%;background:transparent;border:none;outline:none;color:var(--wb-tg-text-primary);font-size:13px;font-family:inherit;min-width:0}.tg-search-input[_ngcontent-%COMP%]::placeholder{color:var(--wb-tg-text-tertiary)}.tg-search-kbd[_ngcontent-%COMP%]{margin:0 10px 0 0;padding:3px 7px;line-height:1;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:11px;font-weight:600;color:var(--wb-tg-text-tertiary);background:#F3F4F6;border:1px solid var(--wb-tg-border-soft);border-radius:4px}@media (hover: none){.tg-search-kbd[_ngcontent-%COMP%]{display:none}}.tg-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;background:var(--wb-tg-text-primary);color:#fff;border:none;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .12s,transform .05s}.tg-action-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.tg-action-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:#1E293B}.tg-action-btn[_ngcontent-%COMP%]:not(:disabled):active{transform:translateY(1px)}.tg-action-btn[_ngcontent-%COMP%]:disabled{background:var(--wb-n-200, #E3E6EA);color:var(--wb-n-500, #6B7280);cursor:not-allowed}.tg-ghost-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;padding:0;background:transparent;color:var(--wb-tg-text-secondary);border:1px solid var(--wb-tg-border-soft);border-radius:8px;cursor:pointer;transition:background .12s,color .12s}.tg-ghost-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.tg-ghost-btn[_ngcontent-%COMP%]:hover{background:var(--wb-tg-bg-surface-hover, #F3F4F6);color:var(--wb-tg-text-primary)}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]{background:var(--fc-action, #008afc)}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]:hover{background:#0079DE}.is-embedded[_ngcontent-%COMP%] .tg-action-btn[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--fc-action, #008afc) 88%,#000)}.tg-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table{background:var(--wb-tg-bg-surface);border:1px solid var(--wb-tg-border-hairline);border-radius:var(--tg-table-radius, 16px);box-shadow:var(--wb-tg-shadow);overflow:clip}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-header{background:transparent;border-bottom:1px solid var(--wb-tg-border-hairline);color:var(--wb-tg-text-tertiary);font-size:10px;letter-spacing:1.6px;font-weight:600;text-transform:uppercase;min-height:40px}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row{border-bottom:1px solid var(--wb-tg-border-hairline);background:transparent;min-height:64px;transition:background .12s ease}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row:hover{background:#F7F9FB}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row:last-child{border-bottom:none}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-in-progress-row{background:#F9F9F9;border-bottom-color:var(--wb-tg-border-hairline);box-shadow:inset 2px 0 0 var(--wb-tg-status-live);position:relative}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-in-progress-row:hover{background:#F1F3F5}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-past-row{background:#F9FAFB}.admin-grid-page[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row.is-past-row:hover{background:#F1F3F5}.tg-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding:12px 16px;min-width:0}.tg-cell-actions[_ngcontent-%COMP%], .tg-cell.col-act[_ngcontent-%COMP%], .tg-cell.col-actions[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-end;
1gap:6px;flex-wrap:wrap}.tg-cell-name[_ngcontent-%COMP%]{gap:4px}.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--wb-tg-text-primary);letter-spacing:-.2px;text-decoration:none;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]:hover{color:var(--wb-tg-accent-blue)}.tg-cell-name[_ngcontent-%COMP%] .tg-name-context[_ngcontent-%COMP%]{font-size:11px;color:var(--wb-tg-text-tertiary);letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-tour-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border-radius:8px;font-size:12px;font-weight:700;flex-shrink:0;background:var(--wb-neutral-soft);color:var(--wb-text-2)}.tg-cell-members[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.tg-member-stack[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.tg-member-avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;min-width:26px;border-radius:50%;font-size:10px;font-weight:700;background:var(--wb-neutral-soft);color:var(--wb-text-2);box-shadow:0 0 0 2px var(--wb-tg-bg-surface, #fff)}.tg-member-avatar[_ngcontent-%COMP%] + .tg-member-avatar[_ngcontent-%COMP%]{margin-left:-8px}.tg-cell-status[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:flex-start}.tg-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:2px 2px 2px 0;font-size:12.5px;font-weight:500}.tg-status[_ngcontent-%COMP%]:before{content:"";flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:currentColor;box-sizing:border-box}.tg-status[data-status=draft][_ngcontent-%COMP%]{color:var(--wb-tg-status-draft)}.tg-status[data-status=scheduled][_ngcontent-%COMP%]{color:var(--wb-tg-status-scheduled)}.tg-status[data-status=open][_ngcontent-%COMP%]{color:var(--wb-tg-status-open)}.tg-status[data-status=in_progress][_ngcontent-%COMP%]{color:var(--wb-tg-status-live)}.tg-status[data-status=closed][_ngcontent-%COMP%]{color:var(--wb-tg-status-closed)}.tg-status[data-status=completed][_ngcontent-%COMP%]{color:var(--wb-tg-status-completed)}.tg-status[data-status=active][_ngcontent-%COMP%]{color:var(--wb-tg-status-active)}.tg-status[data-status=upcoming][_ngcontent-%COMP%]{color:var(--wb-tg-status-upcoming)}.tg-status[data-status=archived][_ngcontent-%COMP%]{color:var(--wb-tg-status-archived)}.tg-status[data-status=inactive][_ngcontent-%COMP%]{color:var(--wb-tg-status-inactive)}.tg-status[data-status=empty][_ngcontent-%COMP%]{color:var(--wb-tg-status-empty)}.tg-status[data-status=draft][_ngcontent-%COMP%]:before, .tg-status[data-status=empty][_ngcontent-%COMP%]:before, .tg-status[data-status=inactive][_ngcontent-%COMP%]:before, .tg-status[data-status=archived][_ngcontent-%COMP%]:before, .tg-status[data-status=completed][_ngcontent-%COMP%]:before, .tg-status[data-status=closed][_ngcontent-%COMP%]:before{width:8px;height:8px;background:transparent;border:1.2px solid currentColor}.tg-status[data-status=empty][_ngcontent-%COMP%]:before{border-width:1.5px;border-style:dashed}.tg-status[data-status=in_progress][_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_tg-live-icon-pulse 1.6s ease-in-out infinite;box-shadow:0 0 8px var(--wb-tg-status-live-glow)}.tg-status[_ngcontent-%COMP%] .tg-status-icon[_ngcontent-%COMP%]{display:none}.tg-status-icon[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0}.tg-status-icon.tg-status-icon-live[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_tg-live-icon-pulse 1.6s ease-in-out infinite;filter:drop-shadow(0 0 6px var(--wb-tg-status-live-glow))}.tg-status-label[_ngcontent-%COMP%]{color:inherit;text-transform:lowercase}.tg-cell-date[_ngcontent-%COMP%]{gap:3px}.tg-cell-date[_ngcontent-%COMP%] .tg-date-primary[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--wb-tg-text-primary);font-variant-numeric:tabular-nums;letter-spacing:.1px}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%]{font-size:11px;color:var(--wb-tg-text-tertiary);display:inline-flex;align-items:center}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%] .tg-date-time[_ng
1content-%COMP%]{font-variant-numeric:tabular-nums}.tg-cell-date[_ngcontent-%COMP%] .tg-date-secondary[_ngcontent-%COMP%] .tg-date-sep[_ngcontent-%COMP%]{margin:0 5px;color:var(--wb-tg-text-quaternary)}.tg-cell-location[_ngcontent-%COMP%]{gap:3px}.tg-cell-location[_ngcontent-%COMP%] .tg-location-primary[_ngcontent-%COMP%]{font-size:13px;font-weight:500;color:var(--wb-tg-text-primary);letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-location[_ngcontent-%COMP%] .tg-location-secondary[_ngcontent-%COMP%]{font-size:10px;color:var(--wb-tg-text-tertiary);letter-spacing:1.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.tg-cell-number[_ngcontent-%COMP%]{align-items:flex-end}.tg-cell-number[_ngcontent-%COMP%] .tg-number[_ngcontent-%COMP%]{font-size:15.5px;font-weight:600;color:var(--wb-tg-text-primary);font-variant-numeric:tabular-nums;line-height:1}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-zero[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary)}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-draft-test[_ngcontent-%COMP%]{font-style:italic;color:var(--wb-tg-text-tertiary)}.tg-cell-number[_ngcontent-%COMP%] .tg-number.is-muted[_ngcontent-%COMP%]{color:var(--wb-tg-text-secondary);font-weight:600}.tg-cell-tertiary[_ngcontent-%COMP%]{align-items:flex-end}.tg-cell-tertiary[_ngcontent-%COMP%] .tg-tertiary[_ngcontent-%COMP%]{font-size:12px;color:var(--wb-tg-text-tertiary);font-variant-numeric:tabular-nums}.tg-cell-chevron[_ngcontent-%COMP%]{align-items:center}.tg-chevron[_ngcontent-%COMP%]{width:12px;height:12px;color:var(--wb-tg-text-quaternary);transition:color .12s} .admin-grid-table-row:hover .tg-chevron{color:var(--wb-tg-text-secondary)}.tg-cell-empty[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary);font-size:13px}.empty-state[_ngcontent-%COMP%]{padding:60px 24px;color:var(--wb-tg-text-secondary)}.empty-state[_ngcontent-%COMP%] .empty-title[_ngcontent-%COMP%]{color:var(--wb-tg-text-primary)}.empty-state[_ngcontent-%COMP%] .empty-desc[_ngcontent-%COMP%]{color:var(--wb-tg-text-secondary)} .tg-pagination{margin-top:20px} .tg-pagination .grid-pagination{padding-top:16px}@keyframes _ngcontent-%COMP%_tg-live-pulse{0%,to{opacity:1;box-shadow:0 0 8px var(--wb-tg-status-live-glow)}50%{opacity:.6;box-shadow:0 0 16px var(--wb-tg-status-live-glow)}}@keyframes _ngcontent-%COMP%_tg-live-icon-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(.9)}}@keyframes _ngcontent-%COMP%_tg-live-row-breathe{0%,to{opacity:1}50%{opacity:.5}}@media (prefers-reduced-motion: reduce){.tg-live-dot[_ngcontent-%COMP%], .tg-status-icon-live[_ngcontent-%COMP%], .tg-status[data-status=in_progress][_ngcontent-%COMP%]:before{animation:none!important} .admin-grid-table-row.is-in-progress-row:after{animation:none!important}}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header{background:var(--wb-ink, #14110F);border-bottom:none;min-height:34px;color:var(--wb-text-3)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .admin-grid-cell.is-head{color:var(--wb-text-3);font-size:11px;font-weight:600;letter-spacing:.08em;padding-top:0;padding-bottom:0}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .is-sort:hover{color:var(--wb-text-2)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .is-sort.is-active{color:var(--wb-text-2)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .admin-grid-table .admin-grid-table-header .sort-indicator{color:var(--wb-text-2)}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row{min-height:52px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .admin-grid-cell{padding:8px 16px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-cell-name-with-avatar{gap:10px}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-name{font-size:13.5px;line-height:1.25}.admin-grid-page[data-density=dense][_ngcontent-%COMP%] .admin-grid-table .tg-name-context{font-size:12px;line-height:1.25}.tg-name-featured[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;margin-left:10px;flex-shrink:0}
1.tg-cell-name[_ngcontent-%COMP%] .tg-name[_ngcontent-%COMP%]{font-weight:700}.tg-cell-name[_ngcontent-%COMP%] .tg-name-context[_ngcontent-%COMP%]{color:var(--wb-tg-text-quaternary)}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel){max-width:none;padding-left:16px;padding-right:16px;padding-top:0}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]{min-height:0!important;max-width:var(--wb-page-max, 1560px)!important;margin:0 auto!important;padding:16px 22px var(--tg-hero-pad, 16px)!important;border-radius:var(--tg-hero-radius, 14px) var(--tg-hero-radius, 14px) var(--tg-hero-radius-btm, var(--tg-hero-radius, 14px)) var(--tg-hero-radius-btm, var(--tg-hero-radius, 14px))!important;border:1px solid rgba(255,255,255,.06)!important;background:var(--wb-flagship-band)!important;align-items:var(--tg-hero-align, center);position:relative;overflow:visible;box-shadow:inset 0 1px #ffffff0d}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]:after{content:var(--tg-watermark, none)!important;font-family:Material Symbols Outlined;font-size:170px;font-weight:300;line-height:1;color:#ffffff0a;position:absolute;right:60px;top:0;bottom:0;width:200px;display:flex;align-items:center;justify-content:center;overflow:hidden;transform:rotate(-8deg);pointer-events:none;-webkit-user-select:none;user-select:none}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%] .tg-header-left[_ngcontent-%COMP%], .admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%] .tg-header-right[_ngcontent-%COMP%]{position:relative;z-index:1}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-entity-badge[_ngcontent-%COMP%]{flex:none;width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,var(--wb-blue-500),var(--wb-blue-700));box-shadow:0 2px 12px #0059a880,0 0 0 5px #008afc1f}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-entity-badge[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:23px;color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-card[_ngcontent-%COMP%], .admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .empty-state[_ngcontent-%COMP%]{max-width:var(--wb-page-max, 1560px);margin-left:auto;margin-right:auto}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-card[_ngcontent-%COMP%]{position:relative;z-index:1;margin-top:var(--tg-hero-tuck, 0);box-shadow:var(--tg-card-shadow, var(--wb-tg-shadow))!important}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-title[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-title-count[_ngcontent-%COMP%]{color:#ffffff80}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%]{margin-left:56px;color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-emph[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-subtitle[_ngcontent-%COMP%] .tg-subtitle-sep[_ngcontent-%COMP%]{color:#ffffff59}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search[_ngcontent-%COMP%]{background:rgba(255,255,255,.08);border-color:#ffffff29}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search[_ngcontent-%COMP%]:focus-within{border-color:#ffffff80;box-shadow:0 0 0 3px #ffffff1a}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-icon[_ngcontent-%COMP%]{color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-input[_ngcontent-%COMP%]{color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-input[_ngcontent-%COMP%]::placeholder{color:#ffffff80}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-search-kbd[_ngcontent-%COMP%]{background:rgba(255,255,255,.1);border-color:#fff3;color:#fff9}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]{background:#fff;color:#14110f}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]:hover{background:#ececec}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]:disabled:hover{background:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn[_ngcontent-%COMP%]{background:rgba(255,255,255,.06);border-color:#ffffff2e;color:#ffffffc7}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.12);color:#fff}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-ghost-btn.is-active[_ngcontent-%COMP%]{background:rgba(0,138,252,.22);border-color:#008afc8c;color:#fff}@media (max-width: 720px){.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-header[_ngcontent-%COMP%]{min-height:132px!important}}@media (max-width: 640px){.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%]{gap:0;padding:0;width:40px;min-width:40px;height:40px;border-radius:10px;justify-content:center}.admin-grid-page[_ngcontent-%COMP%]:not(.is-embedded):not(.is-panel) .tg-action-btn[_ngcontent-%COMP%] .tg-action-label[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]{display:block;width:100%}.grid-hero-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;margin-bottom:12px}.hero-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px}.hero-icon-wrap[_ngcontent-%COMP%]{width:38px;height:38px;display:flex;align-items:center;justify-content:center;background:rgba(0,138,252,.08);border-radius:8px}.hero-icon-wrap[_ngcontent-%COMP%] span.material-symbols-outlined[_ngcontent-%COMP%]{font-size:22px;color:#008afc}.hero-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:700;color:#1e293b;letter-spacing:-.3px}.hero-text[_ngcontent-%COMP%] .hero-subtitle[_ngcontent-%COMP%]{margin:2px 0 0;font-size:.8rem;color:#94a3b8;font-weight:500}.hero-actions[_ngcontent-%COMP%]{display:flex;gap:6px}.hero-action-btn[_ngcontent-%COMP%]{width:34px;height:34px;display:flex;align-items:center;justify-content:center;background:var(--wb-surface);border:1px solid #e2e8f0;border-radius:8px;
1cursor:pointer;transition:all .2s ease}.hero-action-btn[_ngcontent-%COMP%] span.material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px;color:#64748b;transition:color .2s ease}.hero-action-btn[_ngcontent-%COMP%]:hover{background:#f1f5f9;border-color:#cbd5e1}.hero-action-btn[_ngcontent-%COMP%]:hover span.material-symbols-outlined[_ngcontent-%COMP%]{color:#334155}@media (max-width: 768px){.grid-hero-header[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:12px}}.loading-wrapper[_ngcontent-%COMP%]{position:relative;background:transparent;min-height:420px;display:flex;align-items:center;justify-content:center;width:100%;overflow:visible}.pmt-dir-tile[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.pmt-dir-tile[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.pmt-dir-tile.is-credit[_ngcontent-%COMP%]{background:rgba(22,163,74,.1);color:#16a34a}.pmt-dir-tile.is-debit[_ngcontent-%COMP%]{background:rgba(220,38,38,.1);color:#dc2626}.pmt-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px;min-width:0}.pmt-name[_ngcontent-%COMP%]{font-weight:700;font-size:1.1rem;color:#1f2937;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.pmt-name[_ngcontent-%COMP%]:hover{color:#2563eb;text-decoration:underline}.pmt-sub[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;min-width:0;margin-top:-3px;font-size:1rem;color:#8c94a4;white-space:nowrap}.pmt-sub[_ngcontent-%COMP%] .pmt-items[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;flex-shrink:1;min-width:0}.pmt-sub[_ngcontent-%COMP%] .pmt-sub-sep[_ngcontent-%COMP%]{color:#cbd5e1;flex-shrink:0}.pmt-sub[_ngcontent-%COMP%] .pmt-parties[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;flex-shrink:2;min-width:0}.pmt-date-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.pmt-date[_ngcontent-%COMP%]{font-size:.83rem;font-weight:600;color:#334155}.pmt-time[_ngcontent-%COMP%]{font-size:.74rem;color:#94a3b8}.pmt-amount[_ngcontent-%COMP%]{font-weight:700;font-size:1rem;font-variant-numeric:tabular-nums;color:#0f172a;white-space:nowrap}.pmt-amount.is-credit[_ngcontent-%COMP%]{color:#16a34a}.pmt-amount.is-zero[_ngcontent-%COMP%]{color:#94a3b8;font-weight:600}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px;text-align:center}.empty-icon-wrap[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:16px;background:rgba(8,145,178,.1);display:flex;align-items:center;justify-content:center;margin-bottom:16px}.empty-icon-wrap[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;color:#0891b2}.empty-title[_ngcontent-%COMP%]{font-size:1.1rem;font-weight:600;color:#1a1a2e;margin:0 0 8px}.empty-desc[_ngcontent-%COMP%]{font-size:.88rem;color:#6b7280;max-width:360px;line-height:1.5;margin:0}.label-wrapper[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:999px;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}.label-wrapper[_ngcontent-%COMP%]:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex-shrink:0}.label-wrapper.completed[_ngcontent-%COMP%]{background:#ecfdf5;color:#059669}.label-wrapper.failed[_ngcontent-%COMP%]{background:#fef2f2;color:#dc2626}.label-wrapper.processing[_ngcontent-%COMP%]{background:#fffbeb;color:#d97706}.label-wrapper.voided[_ngcontent-%COMP%]{background:#f5f3ff;color:#7c3aed}.label-wrapper[_ngcontent-%COMP%]:not(.completed):not(.failed):not(.processing):not(.voided){background:#eff6ff;color:#2563eb}.clickable-row[_ngcontent-%COMP%]{cursor:pointer;transition:background-color .15s ease}.clickable-row[_ngcontent-%COMP%]:hover{background-color:#008afc0a}.payments-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid #eceef3}.pf-toolbar-spacer[_ngcontent-%COMP%]{flex:1}.payments-toolbar-types[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;background:#f8fafc;gap:8px}.pf-toolbar-select[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 8px 0 12px;background:var(--wb-surface);border:1px solid #e2e8f0;border-radius:8px;
1cursor:pointer;transition:border-color .12s,box-shadow .12s}.pf-toolbar-select[_ngcontent-%COMP%]:focus-within{border-color:#2f80c8;box-shadow:0 0 0 3px #2f80c826}.pf-toolbar-select[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px;color:#94a3b8}.pf-toolbar-select[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{border:none;background:transparent;outline:none;font-size:13px;font-weight:500;font-family:inherit;color:#1a1a2e;cursor:pointer;max-width:180px}.pf-amount-range[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;height:40px;padding:0 12px;background:var(--wb-surface);border:1px solid #e2e8f0;border-radius:8px;transition:border-color .12s,box-shadow .12s}.pf-amount-range[_ngcontent-%COMP%]:focus-within{border-color:#2f80c8;box-shadow:0 0 0 3px #2f80c826}.pf-amount-range[_ngcontent-%COMP%] .pf-amount-symbol[_ngcontent-%COMP%], .pf-amount-range[_ngcontent-%COMP%] .pf-amount-dash[_ngcontent-%COMP%]{font-size:13px;color:#94a3b8;font-weight:500}.pf-amount-range[_ngcontent-%COMP%] .pf-amount-input[_ngcontent-%COMP%]{width:56px;border:none;outline:none;background:transparent;font-size:13px;font-family:inherit;color:#1a1a2e;-moz-appearance:textfield}.pf-amount-range[_ngcontent-%COMP%] .pf-amount-input[_ngcontent-%COMP%]::placeholder{color:#b0b8c8}.pf-amount-range[_ngcontent-%COMP%] .pf-amount-input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .pf-amount-range[_ngcontent-%COMP%] .pf-amount-input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.pf-clear-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;height:40px;padding:0 12px;background:transparent;border:1px dashed #cbd5e1;border-radius:8px;font-size:12.5px;font-weight:600;font-family:inherit;color:#64748b;cursor:pointer;transition:border-color .12s,color .12s,background .12s}.pf-clear-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.pf-clear-btn[_ngcontent-%COMP%]:hover{background:#fef2f2;border-color:#fca5a5;color:#dc2626}.pf-user-search[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 10px 0 4px;border:1px solid #e2e8f0;border-radius:8px;background:var(--wb-surface);transition:border-color .15s ease,box-shadow .15s ease}.pf-user-search[_ngcontent-%COMP%]:focus-within{border-color:#2f80c8;box-shadow:0 0 0 3px #2f80c826}.pf-user-search[_ngcontent-%COMP%] .pf-user-search-icon[_ngcontent-%COMP%]{margin-left:8px}@media (max-width: 720px){.pf-user-search[_ngcontent-%COMP%]{width:100%}}.pf-user-search-icon[_ngcontent-%COMP%]{font-size:18px;color:#94a3b8}.pf-user-search-input[_ngcontent-%COMP%]{border:none;outline:none;background:transparent;font-family:inherit;font-size:.84rem;color:#1a2b3c;width:210px;max-width:46vw}.pf-user-search-input[_ngcontent-%COMP%]::placeholder{color:#b0b8c8}.pf-user-search-clear[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:22px;height:22px;border:none;background:#eef2f7;border-radius:999px;cursor:pointer;color:#64748b;flex-shrink:0}.pf-user-search-clear[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:15px}.pf-user-search-clear[_ngcontent-%COMP%]:hover{background:#e2e8f0;color:#334155}.pf-quick-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;margin-right:4px}.pf-chip-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.pf-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;border:1px solid #d0dbe3;background:var(--wb-surface);font-family:inherit;font-size:12px;font-weight:500;color:#1a2b3c;cursor:pointer;transition:background .12s,border-color .12s,color .12s}.pf-chip[_ngcontent-%COMP%]:hover{border-color:#9bb4c4}.pf-chip.active[_ngcontent-%COMP%]{background:#0a3d62;border-color:#0a3d62;color:#fff}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%]{position:relative;overflow:hidden;max-width:var(--wb-page-max, 1560px);margin:0 auto;padding:22px 26px;align-items:center;border:1px solid rgba(255,255,255,.06);border-radius:16px 16px 0 0;background:var(--wb-flagship-band);box-shadow:inset 0 1px #ffffff0d}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%]:after{content:"payments";font-family:Material Symbols Outlined;font-size:170px;font-weight:300;line-height:1;color:#ffffff0a;position:absolute;right:60px;top:50%;transform:translateY(-46%) rotate(-8deg);pointer-events:none;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-left[_ngcontent-%COMP%], [_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-actions[_ngcontent-%COMP%]{position:relative;z-index:1}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-icon-wrap[_ngcontent-%COMP%]{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#2f80c8,var(--wb-accent));box-shadow:0 2px 12px #185fa580,0 0 0 5px #2f80c81f}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-icon-wrap[_ngcontent-%COMP%] span.material-symbols-outlined[_ngcontent-%COMP%]{font-size:23px;color:#fff}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#fff;font-size:1.3rem;letter-spacing:-.4px}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-text[_ngcontent-%COMP%] .hero-subtitle[_ngcontent-%COMP%]{color:#ffffff8c;font-size:.82rem}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stats[_ngcontent-%COMP%]{position:relative;z-index:1;display:flex;align-items:center;gap:22px;margin-left:auto;margin-right:18px;padding-top:2px}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;min-width:90px}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:#ffffff73;white-space:nowrap}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-value[_ngcontent-%COMP%]{font-size:1.18rem;font-weight:700;letter-spacing:-.3px;font-variant-numeric:tabular-nums;color:#fff;white-space:nowrap}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-value.is-collected[_ngcontent-%COMP%]{color:#4ade80}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-value.is-pending[_ngcontent-%COMP%]{color:#fbbf24}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-value.is-paid-out[_ngcontent-%COMP%]{color:#ffffffd9}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stat-divider[_ngcontent-%COMP%]{width:1px;align-self:stretch;background:rgba(255,255,255,.1)}@media (max-width: 900px){[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-stats[_ngcontent-%COMP%]{margin-left:0;margin-right:0;gap:16px;flex-wrap:wrap}}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-action-btn[_ngcontent-%COMP%]{background:rgba(255,255,255,.08);border-color:#ffffff29}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-action-btn[_ngcontent-%COMP%] span.material-symbols-outlined[_ngcontent-%COMP%]{color:#ffffffd9}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-action-btn[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.16);border-color:#fff6}[_nghost-%COMP%] .grid-hero-header[_ngcontent-%COMP%] .hero-action-btn[_ngcontent-%COMP%]:hover span.material-symbols-outlined[_ngcontent-%COMP%]{color:#fff}@media (max-width: 680px){.pmt-date-cell[_ngcontent-%COMP%]{flex-direction:row;align-items:baseline;gap:6px}.pmt-date[_ngcontent-%COMP%]{font-size:.76rem;font-weight:500;color:#64748b}
1.pmt-time[_ngcontent-%COMP%]{font-size:.72rem}.pmt-amount[_ngcontent-%COMP%]{font-size:.98rem}}.pmt-actions-anchor[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center}.pmt-actions-btn[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:30px;height:30px;border:none;border-radius:8px;background:transparent;color:#9aa3b2;cursor:pointer;transition:background .12s,color .12s}.pmt-actions-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.pmt-actions-btn[_ngcontent-%COMP%]:hover, .pmt-actions-btn.is-open[_ngcontent-%COMP%]{background:#eef2f6;color:#334155}.pmt-actions-backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:40;background:transparent}.pmt-actions-dropdown[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 8px);left:0;right:auto;z-index:50;min-width:230px;background:var(--wb-surface);border:1px solid #eceef3;border-radius:12px;box-shadow:0 12px 32px #10182824;padding:6px}.pmt-actions-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:8px;font-size:14px;font-weight:500;font-family:inherit;color:#1a2b3c;text-align:left;cursor:pointer;white-space:nowrap}.pmt-actions-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:#8c94a4}.pmt-actions-item[_ngcontent-%COMP%]:hover:not(:disabled){background:rgba(15,23,42,.05)}.pmt-actions-item[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.pmt-actions-divider[_ngcontent-%COMP%]{height:1px;background:#eceef3;margin:6px 4px}.gray-bg[_ngcontent-%COMP%] > .card[_ngcontent-%COMP%]{background:transparent}.pf-panel[_ngcontent-%COMP%]{display:block}.pf-panel[_ngcontent-%COMP%] .table-wrapper[_ngcontent-%COMP%]{max-width:none;border:none;border-radius:0;box-shadow:none}.pf-panel[_ngcontent-%COMP%] .tg-pagination{border-bottom:none}.payments-page.is-embedded[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{border:none;box-shadow:none;background:transparent}.payments-page.is-embedded[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{padding:0}.pf-filters-btn[_ngcontent-%COMP%], .pf-active-chips[_ngcontent-%COMP%], .pf-sheet-backdrop[_ngcontent-%COMP%], .pf-sheet[_ngcontent-%COMP%]{display:none}@media (max-width: 768px){.payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%]{flex-wrap:nowrap;gap:10px}.payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .tg-chips[_ngcontent-%COMP%], .payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-toolbar-select[_ngcontent-%COMP%], .payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-amount-range[_ngcontent-%COMP%], .payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-clear-btn[_ngcontent-%COMP%], .payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-toolbar-spacer[_ngcontent-%COMP%]{display:none}.payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-user-search[_ngcontent-%COMP%]{width:auto;flex:1 1 auto;min-width:0}.payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar[_ngcontent-%COMP%] .pf-user-search-input[_ngcontent-%COMP%]{width:100%;min-width:0;max-width:none}.payments-page.is-embedded[_ngcontent-%COMP%] .payments-toolbar-types[_ngcontent-%COMP%]{display:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-filters-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;margin-left:auto;background:var(--wb-ink, #14110F);color:#fff;border:none;border-radius:99px;font-family:inherit;font-size:12.5px;font-weight:700;padding:9px 16px;cursor:pointer;flex:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-filters-count[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--wb-surface);color:var(--wb-ink, #14110F);font-size:11px;font-weight:800}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-active-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 12px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-active-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;background:var(--wb-accent-soft, #E7F0F8);border:1px solid var(--wb-accent, #185FA5);border-radius:99px;color:var(--wb-accent-press, #12497E);font-family:inherit;font-size:12px;font-weight:700;padding:5px 12px;cursor:pointer}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-active-chip[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:13px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .admin-grid-table{background:transparent;border:none;box-shadow:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .admin-grid-table-header{display:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .admin-grid-table-row{display:flex;align-items:center;gap:12px;background:var(--wb-surface, #fff);border:.5px solid var(--wb-border, #E5E3DB);border-radius:12px;padding:12px 14px;margin-bottom:8px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-select, .payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-payer, .payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-flow, .payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-payee, .payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-status{display:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-details{flex:1;min-width:0}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-table .col-amount{flex:none}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet-backdrop[_ngcontent-%COMP%]{display:block;position:fixed;inset:0;background:rgba(11,22,32,.4);z-index:1200}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet[_ngcontent-%COMP%]{display:block;position:fixed;left:0;right:0;bottom:var(--wb-tabbar-h, 0px);z-index:1201;background:var(--wb-surface, #fff);border-radius:20px 20px 0 0;padding:10px 16px calc(24px + env(safe-area-inset-bottom,0px));box-shadow:0 -12px 40px #0b162040}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet-handle[_ngcontent-%COMP%]{display:block;width:44px;height:5px;margin:0 auto 12px;border:none;border-radius:99px;background:var(--wb-border-strong, #B4B2A9);cursor:pointer}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet-title[_ngcontent-%COMP%]{font-size:15px;font-weight:800;color:var(--wb-ink, #14110F);margin-bottom:10px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet-label[_ngcontent-%COMP%]{font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--wb-text-3, #888780);margin:12px 0 8px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-sheet-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.payments-page.is-embedded[_ngcontent-%COMP%] .pf-chip-dot[_ngcontent-%COMP%]{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:6px}}.table-wrapper[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;max-width:var(--wb-page-max, 1560px);margin:0 auto;background:var(--wb-surface);border:1px solid var(--wb-tg-border-hairline, #eceef3);border-top:none;border-radius:0 0 16px 16px;overflow:hidden;box-shadow:0 12px 28px #060a121f,0 1px 3px #1018280f}.table-wrapper.no-hero[_ngcontent-%COMP%]{border-top:1px solid var(--wb-tg-border-hairline, #eceef3);border-radius:16px}.empty-actions[_ngcontent-%COMP%]{margin-top:24px}.pf-table[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(260px,1fr) 210px 28px 210px 130px 130px}@media (max-width: 1180px){.pf-table[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(220px,1fr) 180px 28px 180px 120px 120px}}@media (max-width: 940px){.pf-table[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(0,1fr) 120px 120px}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-payer, .pf-table[_ngcontent-%COMP%] .admin-grid-table .col-flow, .pf-table[_ngcontent-%COMP%] .admin-grid-table .col-payee{display:none}}@media (max-width: 720px){.pf-table[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(0,1fr) 120px}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-status{display:none}}.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:72px minmax(260px,1fr) 210px 28px 210px 130px 130px}@media (max-width: 1180px){.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:72px minmax(220px,1fr) 180px 28px 180px 120px 120px}}@media (max-width: 940px){.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:72px minmax(0,1fr) 120px 120px}.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table .col-payer, .pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table .col-flow, .pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table .col-payee{display:none}}@media (max-width: 720px){.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table{grid-template-columns:minmax(0,1fr) 120px}.pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table .col-select, .pf-table.has-select[_ngcontent-%COMP%] .admin-grid-table .col-status{display:none}}
1.tg-cell-name-with-avatar[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center;gap:14px}.pmt-info[_ngcontent-%COMP%]{flex:1}.col-payer[_ngcontent-%COMP%], .col-payee[_ngcontent-%COMP%]{flex-direction:row;justify-content:flex-start;align-items:center;gap:9px;padding-right:12px}.pmt-party-av[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;min-width:26px;border-radius:50%;font-size:10.5px;font-weight:700;letter-spacing:.02em;flex:none}.pmt-party-av[data-kind=director][_ngcontent-%COMP%]{background:var(--wb-accent);color:var(--wb-surface)}.pmt-party-av[data-kind=angler][_ngcontent-%COMP%]{background:var(--wb-n-100);color:var(--wb-n-700)}.pmt-party-av[data-kind=weighbook][_ngcontent-%COMP%]{background:var(--wb-ink);color:var(--wb-surface)}.pmt-party-av[data-kind=unassigned][_ngcontent-%COMP%]{background:#f1f3f5;color:#b0b8c8}.pmt-party-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:0}.pmt-party-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:#1f2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pmt-party-name.is-unset[_ngcontent-%COMP%]{color:#b0b8c8;font-style:italic}.pmt-party-role[_ngcontent-%COMP%]{font-size:.8rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#a8b0be}.col-flow[_ngcontent-%COMP%]{align-items:center;justify-content:center;padding:0}.pmt-flow-arrow[_ngcontent-%COMP%]{font-size:17px;color:#cbd5e1}.col-status[_ngcontent-%COMP%]{align-items:center;justify-content:center} .tg-pagination{margin-top:0;border-top:1px solid var(--wb-tg-border-hairline, #eceef3)} .tg-pagination .grid-pagination{padding:12px}.pf-table[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-header{min-height:42px;padding:0 24px;background:#fbfcfd;border-bottom:1px solid #eceef3}.pf-table[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-header .admin-grid-cell.is-head{padding:0;font-size:10px;font-weight:600;letter-spacing:1.4px;text-transform:uppercase;color:#9aa3b2}.pf-table[_ngcontent-%COMP%] .admin-grid-table .admin-grid-table-row{min-height:72px;padding:0 24px;border-bottom:1px solid #f1f3f5}
1.pf-table[_ngcontent-%COMP%] .admin-grid-table .admin-grid-cell{padding:0}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-select{flex:none}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-details{gap:14px;padding:4px 0}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-payer, .pf-table[_ngcontent-%COMP%] .admin-grid-table .col-payee{gap:9px;padding-right:12px}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-flow{justify-content:center;align-items:center}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-amount{justify-content:center;align-items:flex-end;padding-right:24px}.pf-table[_ngcontent-%COMP%] .admin-grid-table .col-status{justify-content:center;align-items:center}.pr-strip[_ngcontent-%COMP%]{margin:0 0 14px;border:1px solid var(--wb-border);border-radius:var(--wb-radius-lg);background:var(--wb-surface);overflow:hidden}.pr-strip-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:1px solid var(--wb-border);background:var(--wb-warning-soft, #fdf6e7)}.pr-strip-head[_ngcontent-%COMP%] .pr-strip-icon[_ngcontent-%COMP%]{font-size:18px;color:var(--wb-warning)}.pr-strip-title[_ngcontent-%COMP%]{font-size:.86rem;font-weight:700;color:var(--wb-text)}.pr-strip-count[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--wb-radius-pill);background:var(--wb-warning);color:#fff;font-size:.72rem;font-weight:800}.pr-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:9px 14px;border-bottom:1px solid var(--wb-tg-border-hairline)}.pr-row[_ngcontent-%COMP%]:last-of-type{border-bottom:0}.pr-row-name[_ngcontent-%COMP%]{font-size:.86rem;font-weight:700;color:var(--wb-text)}.pr-row-amount[_ngcontent-%COMP%]{font-size:.86rem;font-weight:800;color:var(--wb-text)}.pr-row-reason[_ngcontent-%COMP%]{flex:1;min-width:140px;font-size:.8rem;color:var(--wb-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pr-row-meta[_ngcontent-%COMP%]{font-size:.74rem;color:var(--wb-text-4)}.pr-row-status[_ngcontent-%COMP%]{font-size:.74rem;font-weight:700;color:var(--wb-warning)}.pr-row-status.is-expired[_ngcontent-%COMP%]{color:var(--wb-danger)}.pr-row-actions[_ngcontent-%COMP%]{display:flex;gap:6px}.pr-row-btn[_ngcontent-%COMP%]{height:28px;padding:0 10px;border:1px solid var(--wb-border);border-radius:var(--wb-radius-md);background:var(--wb-surface);font-family:inherit;font-size:.76rem;font-weight:600;color:var(--wb-text-2);cursor:pointer}.pr-row-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--wb-surface-hover, #f6f7f9)}.pr-row-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.pr-row-btn-danger[_ngcontent-%COMP%]{color:var(--wb-danger);border-color:color-mix(in srgb,var(--wb-danger) 35%,transparent)}.pr-strip-paid[_ngcontent-%COMP%]{padding:8px 14px;border-top:1px solid var(--wb-tg-border-hairline);font-size:.76rem;color:var(--wb-text-3)}@keyframes _ngcontent-%COMP%_rp-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.rp-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;padding:16px}.rp-tiles[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;animation:_ngcontent-%COMP%_rp-rise .4s ease both}.rp-tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--wb-border, #e5e7eb);border-radius:12px;background:var(--wb-surface)}.rp-tile-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--wb-text-3, #94a3b8)}.rp-tile-value[_ngcontent-%COMP%]{font-size:1.35rem;font-weight:700;letter-spacing:-.3px;font-variant-numeric:tabular-nums;color:var(--wb-text, #0f172a)}.rp-tile-value.is-in[_ngcontent-%COMP%]{color:#16a34a}.rp-tile-value.is-warn[_ngcontent-%COMP%]{color:#d97706}.rp-tile-sub[_ngcontent-%COMP%]{font-size:.74rem;color:var(--wb-text-4, #94a3b8)}.rp-charts[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:12px;align-items:start}.rp-card[_ngcontent-%COMP%]{padding:16px;border:1px solid var(--wb-border, #e5e7eb);border-radius:12px;background:var(--wb-surface);animation:_ngcontent-%COMP%_rp-rise .4s ease both}
1.rp-card[_ngcontent-%COMP%]:nth-child(2){animation-delay:.08s}.rp-card-title[_ngcontent-%COMP%]{margin:0 0 14px;font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--wb-text-2, #64748b)}.rp-donut-flex[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.rp-donut[_ngcontent-%COMP%]{position:relative;width:168px;height:168px;flex:none}.rp-donut[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.rp-donut-track[_ngcontent-%COMP%]{fill:none;stroke:var(--wb-n-100, #f1f5f9);stroke-width:16}.rp-donut-seg[_ngcontent-%COMP%]{fill:none;stroke-width:16;transition:stroke-dasharray .8s cubic-bezier(.22,.61,.36,1)}.rp-donut-center[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;pointer-events:none}.rp-donut-total[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:800;letter-spacing:-.3px;font-variant-numeric:tabular-nums;color:var(--wb-text, #0f172a)}.rp-donut-caption[_ngcontent-%COMP%]{font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--wb-text-4, #94a3b8)}.rp-legend[_ngcontent-%COMP%]{flex:1;min-width:190px;margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}.rp-legend[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:.84rem}.rp-legend-dot[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:3px;flex:none}.rp-legend-type[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--wb-text-2, #334155)}.rp-legend-amount[_ngcontent-%COMP%]{font-weight:700;font-variant-numeric:tabular-nums;color:var(--wb-text, #0f172a)}.rp-legend-share[_ngcontent-%COMP%]{width:38px;text-align:right;font-size:.76rem;font-variant-numeric:tabular-nums;color:var(--wb-text-4, #94a3b8)}.rp-bar-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:9px}.rp-bar-group[_ngcontent-%COMP%] + .rp-bar-group[_ngcontent-%COMP%]{margin-top:18px}.rp-bar-group-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--wb-text-3, #94a3b8)}.rp-bar-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:130px minmax(0,1fr) 34px 90px;align-items:center;gap:10px}.rp-bar-type[_ngcontent-%COMP%]{font-size:.82rem;font-weight:600;color:var(--wb-text-2, #334155);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rp-bar-track[_ngcontent-%COMP%]{height:12px;border-radius:99px;background:var(--wb-n-100, #f1f5f9);overflow:hidden}.rp-bar-fill[_ngcontent-%COMP%]{height:100%;border-radius:99px;transition:width .7s cubic-bezier(.22,.61,.36,1)}.rp-bar-count[_ngcontent-%COMP%]{font-size:.74rem;text-align:right;font-variant-numeric:tabular-nums;color:var(--wb-text-4, #94a3b8)}.rp-bar-amount[_ngcontent-%COMP%]{font-size:.84rem;font-weight:700;text-align:right;font-variant-numeric:tabular-nums;color:var(--wb-text, #0f172a)}.rp-none[_ngcontent-%COMP%]{font-size:.82rem;color:var(--wb-text-3, #94a3b8)}@media (max-width: 900px){.rp-charts[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (max-width: 720px){.rp-body[_ngcontent-%COMP%]{padding:12px}.rp-tiles[_ngcontent-%COMP%]{grid-template-columns:1fr}.rp-bar-row[_ngcontent-%COMP%]{grid-template-columns:90px minmax(0,1fr) 80px;gap:8px}.rp-bar-count[_ngcontent-%COMP%]{display:none}}']})}}return r})()},63077:(W,R,_)=>{_.r(R),_.d(R,{PaymentsModule:()=>We});var c=_(56223),O=_(96814),A=_(40840),z=_(35420),v=_(15861),T=_(86825),t=_(78645),F=_(59773),h=_(72901),P=_(269),u=_(10708),N=_(34317),e=_(65879),I=_(23166),C=_(9145),S=_(89849),w=_(4312),G=_(30617),Q=_(32296);function j(l,m){if(1&l&&(e.TgZ(0,"div",18),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.xp6(1),e.hij(" ",o.relatedTournament?"Paid \xb7 you're in":"Paid"," ")}}function at(l,m){if(1&l&&(e.TgZ(0,"p",19),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.xp6(1),e.Oqu(o.successSubtext)}}function st(l,m){if(1&l&&(e.TgZ(0,"p",20)(1,"mat-icon",21),e._uU(2,"autorenew"),e.qZA(),e._uU(3),e.qZA()),2&l){const o=e.oxw(3);e.xp6(3),e.hij(" ",o.squarePaymentId?"Confirming your Square payment...":"Processing your payment..."," ")}}function et(l,m){1&l&&(e.TgZ(0,"p",19),e._uU(1," This is taking longer than usual. Your payment is safe \u2014 the entry will appear automatically once Square finishes confirming it, and you can leave this page at any time. "),e.qZA())}function nt(l,m){if(1&l&&(e.TgZ(0,"div",31)(1,"span",29),e._uU(2),e.qZA(),e.TgZ(3,"span",30),e._uU(4),e.ALo(5,"currency"),e.qZA()()),2&l){const o=m.$implicit;
1e.xp6(2),e.Oqu(o.type),e.xp6(2),e.Oqu(e.lcZ(5,2,o.cost))}}function ct(l,m){if(1&l&&(e.TgZ(0,"div",32)(1,"span",33),e._uU(2,"check"),e.qZA(),e._uU(3),e.qZA()),2&l){const o=m.$implicit;e.xp6(3),e.hij(" ",o.type," \xb7 included ")}}function x(l,m){if(1&l&&(e.TgZ(0,"div",22)(1,"div",23)(2,"span"),e._uU(3,"Receipt"),e.qZA()(),e.TgZ(4,"div",24),e.YNc(5,nt,6,4,"div",25),e.qZA(),e.YNc(6,ct,4,1,"div",26),e._UZ(7,"div",27),e.TgZ(8,"div",28)(9,"span",29),e._uU(10,"Total paid"),e.qZA(),e.TgZ(11,"span",30),e._uU(12),e.ALo(13,"currency"),e.qZA()()()),2&l){const o=e.oxw(3);e.Q6J("@fadeUpLate",void 0),e.xp6(5),e.Q6J("ngForOf",o.chargedItems),e.xp6(1),e.Q6J("ngForOf",o.waivedItems),e.xp6(6),e.Oqu(e.lcZ(13,4,o.currentPayment.amount))}}function E(l,m){if(1&l&&(e.TgZ(0,"span",44),e._uU(1),e.ALo(2,"currency"),e.qZA()),2&l){const o=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,o.amount))}}function b(l,m){1&l&&(e.ynx(0),e.TgZ(1,"span",45),e._uU(2,"check"),e.qZA(),e._uU(3," Registered"),e.BQk())}function k(l,m){1&l&&(e.ynx(0),e.TgZ(1,"span",45),e._uU(2,"check"),e.qZA(),e._uU(3," Registered (free)"),e.BQk())}function Z(l,m){if(1&l&&(e.ynx(0),e.TgZ(1,"span",46),e._uU(2,"close"),e.qZA(),e._uU(3),e.BQk()),2&l){const o=e.oxw().$implicit;e.xp6(3),e.hij(" ",o.error||"Not charged","")}}function B(l,m){if(1&l&&(e.ynx(0),e.TgZ(1,"span",46),e._uU(2,"help"),e.qZA(),e._uU(3),e.BQk()),2&l){const o=e.oxw().$implicit;e.xp6(3),e.hij(" ",o.error||"Being reviewed","")}}function L(l,m){1&l&&(e.ynx(0),e.TgZ(1,"mat-icon",21),e._uU(2,"autorenew"),e.qZA(),e._uU(3," Processing\u2026"),e.BQk())}function X(l,m){if(1&l&&(e.TgZ(0,"div",38)(1,"span",39),e._uU(2),e.YNc(3,E,3,3,"span",40),e.qZA(),e.TgZ(4,"span",41),e.YNc(5,b,4,0,"ng-container",42),e.YNc(6,k,4,0,"ng-container",42),e.YNc(7,Z,4,1,"ng-container",42),e.YNc(8,B,4,1,"ng-container",42),e.YNc(9,L,4,0,"ng-container",43),e.qZA()()),2&l){const o=m.$implicit;e.uIk("data-status",o.status),e.xp6(2),e.hij(" ",o.name||"Added event"," "),e.xp6(1),e.Q6J("ngIf","succeeded"===o.status&&o.amount),e.xp6(1),e.Q6J("ngSwitch",o.status),e.xp6(1),e.Q6J("ngSwitchCase","succeeded"),e.xp6(1),e.Q6J("ngSwitchCase","free"),e.xp6(1),e.Q6J("ngSwitchCase","failed"),e.xp6(1),e.Q6J("ngSwitchCase","needs-review")}}function tt(l,m){if(1&l&&(e.TgZ(0,"div",47)(1,"span"),e._uU(2,"Total paid across all events"),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"currency"),e.qZA()()),2&l){const o=e.oxw(4);e.xp6(4),e.Oqu(e.lcZ(5,1,o.batchGrandTotal))}}function pt(l,m){if(1&l&&(e.TgZ(0,"div",34)(1,"div",35)(2,"span",33),e._uU(3,"event_repeat"),e.qZA(),e.TgZ(4,"span"),e._uU(5,"Your added events"),e.qZA()(),e.YNc(6,X,10,8,"div",36),e.YNc(7,tt,6,3,"div",37),e.qZA()),2&l){const o=e.oxw(3);e.xp6(6),e.Q6J("ngForOf",o.batchResults),e.xp6(1),e.Q6J("ngIf",!o.batchProcessing)}}function Ct(l,m){1&l&&(e.TgZ(0,"div",48)(1,"div",49)(2,"span",33),e._uU(3,"how_to_reg"),e.qZA(),e.TgZ(4,"span"),e._uU(5,"At the ramp"),e.qZA()(),e.TgZ(6,"p",50),e._uU(7," Give your name at the sign-in table on tournament day. There is no paperwork to bring. The director already has your entry. "),e.qZA()()),2&l&&e.Q6J("@fadeUpLate",void 0)}function wt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",51)(1,"button",52),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(3);return e.KtG(i.backAction())}),e._uU(2),e.TgZ(3,"mat-icon"),e._uU(4,"arrow_forward"),e.qZA()()()}if(2&l){const o=e.oxw(3);e.Q6J("@fadeUpLate",void 0),e.xp6(2),e.hij(" ",o.backButtonLabel," ")}}function vt(l,m){if(1&l&&(e.TgZ(0,"div",4)(1,"div",5),e.O4$(),e.TgZ(2,"svg",6),e._UZ(3,"circle",7)(4,"path",8),e.qZA()(),e.kcU(),e.TgZ(5,"div",9),e.YNc(6,j,2,1,"div",10),e.TgZ(7,"h1",11),e._uU(8),e.qZA(),e.YNc(9,at,2,1,"p",12),e.YNc(10,st,4,1,"p",13),e.YNc(11,et,2,0,"p",12),e.qZA(),e.YNc(12,x,14,6,"div",14),e.YNc(13,pt,8,2,"div",15),e.YNc(14,Ct,8,1,"div",16),e.YNc(15,wt,5,2,"div",17),e.qZA()),2&l){const o=e.oxw(2);e.Q6J("@cardEnter",void 0),e.xp6(1),e.Q6J("@checkPop",void 0),e.xp6(4),e.Q6J("@fadeUp",void 0),e.xp6(1),e.Q6J("ngIf",o.doneProcessing),e.xp6(2),e.Oqu((null==o.relatedTournament?null:o.relatedTournament.name)||o.successHeading),e.xp6(1),e.Q6J("ngIf",o.doneProcessing),e.xp6(1),e.Q6J("ngIf",!o.doneProcessing),e.xp6(1),e.Q6J("ngIf",!o.doneProcessing&&o.squareSlow),e.xp6(1),e.Q6J("ngIf",o.doneProcessing&&o.chargedItems.length),e.xp6(1),e.Q6J("ngIf",o.batchProcessing||o.batchResults.length),e.xp6(1),e.Q6J("ngIf",o.doneProcessing&&o.relatedTournament),e.xp6(1),e.Q6J("ngIf",o.doneProcessing)}}function Mt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",53)(1,"div",54)(2,"mat-icon"),e._uU(3,"close"),e.qZA()(),e.TgZ(4,"div",9)(5,"h1",11),e._uU(6,"Payment Failed"),e.qZA(),e.TgZ(7,"p",19),e._uU(8,"Your payment could not be processed. Please try again with a different payment method."),e.qZA()(),e.TgZ(9,"div",51)(10,"button",52),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.backAction())}),e._uU(11),e.TgZ(12,"mat-icon"),e._uU(13,"arrow_forward"),e.qZA()()()()}if(2&l){const o=e.oxw(2);e.Q6J("@cardEnter",void 0),e.xp6(1),e.Q6J("@checkPop",void 0),e.xp6(3),e.Q6J("@fadeUp",void 0),e.xp6(
15),e.Q6J("@fadeUpLate",void 0),e.xp6(2),e.hij(" ",o.backButtonLabel," ")}}function Ot(l,m){if(1&l&&(e.TgZ(0,"div",1),e.YNc(1,vt,16,12,"div",2),e.YNc(2,Mt,14,5,"div",3),e.qZA()),2&l){const o=e.oxw();e.xp6(1),e.Q6J("ngIf","succeeded"===o.paymentStatus),e.xp6(1),e.Q6J("ngIf",o.paymentStatus&&"succeeded"!==o.paymentStatus)}}let ut=(()=>{class l{get batchGrandTotal(){const o=this.batchResults.filter(r=>"succeeded"===r.status).reduce((r,i)=>r+(Number(i.amount)||0),0);return(Number(this.currentPayment?.amount)||0)+o}get chargedItems(){return(this.currentPayment?.items||[]).filter(o=>o&&o.type&&(Number(o.cost)||0)>0)}get waivedItems(){return(this.currentPayment?.items||[]).filter(o=>o&&o.type&&(Number(o.cost)||0)<=0&&/waiv/i.test(o.type))}get successHeading(){switch(this.currentPayment?.paymentForType){case"Tour":return"Membership Paid!";case"Season":return"Season Membership Paid!";case"Entry Credits":return"Credits Added!";default:return"You're Registered!"}}get successSubtext(){const o=this.relatedTournament?.name||this.relatedTour?.name||"";switch(this.currentPayment?.paymentForType){case"Tour":return o?`Your membership for ${o} is confirmed.`:"Your tour membership is confirmed.";case"Season":return o?`Your season membership for ${o} is confirmed.`:"Your season membership is confirmed.";case"Entry Credits":return"Your entry credits have been added to your account.";default:return o?`You're all set for ${o}.`:"Your registration is confirmed."}}get backButtonLabel(){switch(this.currentPayment?.paymentForType){case"Tour":return"Back to Tour";case"Season":return"Back to Season";case"Entry Credits":return"View Entry Balance";default:return"Back to Tournament"}}constructor(o,r,i,n,a,s,p,d,g,f,y,q,Y,U,D,$,H,M,J,V){this.route=o,this._router=r,this._authService=i,this._userService=n,this._paymentService=a,this._paymentRequestService=s,this._clubDuesService=p,this._membershipService=d,this._messageService=g,this._sharedUtilsService=f,this._accountService=y,this._directorsCreditService=q,this._creditTransactionService=Y,this._tournamentService=U,this._tourService=D,this._seasonService=$,this._stripeService=H,this._tournamentRaffleEntryService=M,this._entryService=J,this._squareService=V,this.ngUnsubscribe=new t.x,this.currentUser=null,this.currentPayment=null,this.paymentCopy=null,this.baseRoute="",this.payment_intent_client_secret="",this.paymentIntentId="",this.paymentStatus="",this.doneProcessing=!1,this.squarePaymentId="",this.squareSlow=!1,this.squarePollTimer=null,this.safeToLeave=!1,this.relatedTournament=null,this.relatedTour=null,this.batchResults=[],this.batchProcessing=!1,this.route.queryParams.pipe((0,F.R)(this.ngUnsubscribe)).subscribe(K=>{this.paymentIntentId=K.payment_intent,this.paymentStatus=K.redirect_status,this.payment_intent_client_secret=K.payment_intent_client_secret,this.squarePaymentId=K.squarePaymentId})}ngOnInit(){this.init()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete(),this.squarePollTimer&&clearInterval(this.squarePollTimer),window.onbeforeunload=null}startSquarePoll(){var o=this;let n=0;const a=function(){var s=(0,v.Z)(function*(){n++,n>=24&&(o.squareSlow=!0);try{"completed"===(yield o._squareService.paymentStatus(o.squarePaymentId))?.status&&(clearInterval(o.squarePollTimer),o.squarePollTimer=null,o.currentPayment.status="completed",o.doneProcessing=!0)}catch{}});return function(){return s.apply(this,arguments)}}();this.squarePollTimer=setInterval(a,2500),a()}init(){var o=this;return(0,v.Z)(function*(){if(o.currentUser=o._authService.getCurrentlyLoggedInUser(),o.isTheMan=o.currentUser&&["sensd@","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"].includes(o.currentUser.email),o.baseRoute=o._userService.getRouteForUser(o.currentUser.userType),o.currentPayment=o._sharedUtilsService.getFromLocal("current-payment"),o.currentPayment){if("Tour"===o.currentPayment.paymentForType?o.relatedTour=yield(0,u.lastValueFrom)(o._tourService.get(o.currentPayment.sourceModuleRecord)):"Season"===o.currentPayment.paymentForType||"Entry Credits"===o.currentPayment.paymentForType||(o.relatedTournament=yield(0,u.lastValueFrom)(o._tournamentService.get(o.currentPayment.sourceModuleRecord))),o._paymentService.setCurrent(o.currentPayment),o.squarePaymentId)return o.paymentStatus="succeeded",void o.startSquarePoll();if(o.isTheMan||!o.currentPayment.amount||o.currentPayment.amount<=0)o.paymentStatus="succeeded",o.currentPayment.status="completed",o.processSuccessfulPayment();else{const i=yield(0,u.lastValueFrom)(o._stripeService.getPaymentIntent({paymentIntentId:o.paymentIntentId,str
1ipeAccountId:o.currentPayment.stripeIdToSendTo}));i&&(o.currentPayment.paymentIntentId=i.id,o.currentPayment.status="succeeded"===i.status?"completed":"processing",["succeeded"].includes(i.status)&&o.processSuccessfulPayment())}}})()}processSuccessfulPayment(){var o=this;return(0,v.Z)(function*(){window.onbeforeunload=()=>"Payment is still being processed. Are you sure you want to leave?",o.paymentCopy={...o.currentPayment},o.paymentCopy&&!o.paymentCopy.seasonTeam&&o.paymentCopy?.team?.seasonTeam&&(o.paymentCopy.seasonTeam=o.paymentCopy.team.seasonTeam);let r=null;if(r=o.currentPayment._id?yield(0,u.lastValueFrom)(o._paymentService.update(o.currentPayment)):yield(0,u.lastValueFrom)(o._paymentService.create(o.currentPayment)),o.currentPayment={...r},o._paymentService.setCurrent(o.currentPayment),o._sharedUtilsService.saveInLocal("current-payment",o.currentPayment),o.safeToLeave=!0,window.onbeforeunload=null,o.currentPayment?.metaData?.paymentRequestId)try{yield(0,u.lastValueFrom)(o._paymentRequestService.complete(o.currentPayment.metaData.paymentRequestId,o.currentPayment.paymentIntentId))}catch(n){console.log("Payment request completion deferred to the webhook: ",n?.error?.message||n)}else if(o.currentPayment?.metaData?.clubDuesChargeIds?.length)try{yield(0,u.lastValueFrom)(o._clubDuesService.complete(o.currentPayment.paymentIntentId))}catch(n){console.log("Club dues completion deferred to the webhook: ",n?.error?.message||n)}else if(o.currentPayment?.metaData?.membershipUpgrade)try{const n=o.currentPayment.metaData.membershipUpgrade,a=(o.currentPayment.items||[]).find(s=>s&&"membership-upgrade"===s.key);yield(0,u.lastValueFrom)(o._membershipService.upgrade({membershipId:n.membershipId,tierName:n.targetTierName,chargedAmount:Number(a?.cost)||0}))}catch(n){console.error(`Membership upgrade failed to apply after a successful payment. Payment ${o.currentPayment?._id}. The webhook can still apply it. `,n),o.sendFulfillmentFailureAlert("Tour",n)}else if("Tour"===o.currentPayment.paymentForType)try{const n=new P.EA,a=yield(0,u.lastValueFrom)(o._tourService.get(o.currentPayment.sourceModuleRecord));n.user=o.currentUser._id,n.tour=a._id?a._id:a,n.optionalAdditionalValue=o.currentPayment?.metaData?o.currentPayment.metaData.membershipId:null,n.optionalValues=o.paymentCopy.metaData?o.paymentCopy.metaData.additionalInputValues:null,n.approved=!1,n.completedPayment=!0;const s=(o.currentPayment.items||[]).find(p=>"membership"===p?.key);s&&Number(s.cost)>0&&(n.amount=Number(s.cost),n.amountPaid=Number(s.cost)),o.currentPayment.metaData?.tierName&&(n.tierName=o.currentPayment.metaData.tierName),o.currentPayment.metaData?.roleGroupId&&(n.roleGroup=o.currentPayment.metaData.roleGroupId),o.currentPayment.metaData?.club&&(n.club=o.currentPayment.metaData.club),o.currentPayment.metaData?.signedAgreements?.length&&(n.signedAgreements=o.currentPayment.metaData.signedAgreements),"Director"===o.currentUser?.userType?yield o._membershipService.addWithOfflineStorage(n):yield(0,u.lastValueFrom)(o._membershipService.create(n)),yield o.sendNewMemberEmail(a,n.optionalAdditionalValue),yield(0,u.lastValueFrom)(o._userService.joinTour(o.currentUser._id,a._id))}catch(n){console.error("Failed to create tour membership after successful payment:",n,"Payment:",o.currentPayment._id,"User:",o.currentUser._id),o.sendFulfillmentFailureAlert("Tour",n)}else if("Season"===o.currentPayment.paymentForType)try{const n=new P.EA,a=yield(0,u.lastValueFrom)(o._seasonService.get(o.currentPayment.sourceModuleRecord));n.user=o.currentUser._id,o.currentPayment.metaData?.payOnBehalfOf&&(n.user=o.currentPayment.metaData?.payOnBehalfOf),n.season=a._id?a._id:a,n.approved=!1,n.completedPayment=!0,n.amount=o.currentPayment.amount,n.amountPaid=o.currentPayment.amount,yield(0,u.lastValueFrom)(o._membershipService.create(n)),yield(0,u.lastValueFrom)(o._userService.joinSeason(o.currentUser._id,a._id)),yield o.sendNewMemberEmail(a,n.optionalAdditionalValue,"season")}catch(n){console.error("Failed to create season membership after successful payment:",n,"Payment:",o.currentPayment._id,"User:",o.currentUser._id),o.sendFulfillmentFailureAlert("Season",n)}else if("Entry Credits"===o.currentPayment.paymentForType)try{const n=o.currentPayment?.items?.length?o.currentPayment.items.find(d=>"Entry Credits"===d.type):null,s=parseFloat(((n?n.cost:o.currentPayment.amount)/2).toFixed(2)),p=yield(0,u.lastValueFrom)(o._directorsCreditService.getEffectiveCreditBankByUserId(o.currentUser._id));if(p){const d=p.balance,g=new P.Cu;g.amount=o.currentPayment.amount,g.type="Director credit purchase",g.relatedPayment=o.currentPayment._id,g.relatedCreditAccount=p._id,g.debitOrCredit="credit",g.numberAdjusted=s,g.description=`Purchased entry credits: ${o.currentPayment.amount}. Added ${s} credits to their account.`,p.balance=parseInt(d.toFixed(2))+s,yield(0,u.lastValueFrom)(o._creditTransactionService.create(g)),yield(0,u.lastValueFrom)(o._directorsCreditService.update(p))}p&&(yield o._directorsCreditService.updateCreditBankInStorage(p))}catch(n){console.error(`Entry credits failed to post after a successful payment. Payment ${o.currentPayment?._id}, user ${o.currentUser?._id}. `,n),o.sendFulfillmentFailureAlert("Entry Credits",n)}
1else{o.paymentCopy.seasonTeam&&(o.currentPayment.seasonTeam=o.paymentCopy.seasonTeam),yield o.processMemberships(),yield o.updateDirectorsCredit();try{yield o.registerForTourney(o.currentPayment)}catch(n){if(console.error(`Post-payment registration failed. Payment ${o.currentPayment?._id} is saved; the webhook can still complete fulfillment. `,n),!o.currentPayment?.amount||o.currentPayment.amount<=0){const s=(0,N.l)(n,"Something went wrong finishing your registration.");o._sharedUtilsService.showErrorDialog(`Your registration could not be completed: ${s} You are NOT on the roster yet \u2014 please correct the issue and register again, or contact your tournament director.`)}}yield o.processBatchExtras(),o._tournamentService.setCurrentBeingViewed(null)}o._paymentService.setCurrent(null),o._sharedUtilsService.clearKeyFromLocal("current-payment"),o._sharedUtilsService.clearKeyFromLocal("registration-attempted"),o.doneProcessing=!0,window.onbeforeunload=null;const i=o._paymentService.routeForPostPayment||sessionStorage.getItem("routeForPostPayment");if(i&&i.length){let n="Payment Successfull! Sending you back to where you were.";"Tour"===o.currentPayment.paymentForType&&(n="Tour Membership Paid! Sending you back to the tournament you were registering for."),o._sharedUtilsService.showNotification(n),o._paymentService.routeForPostPayment=null,sessionStorage.removeItem("routeForPostPayment"),setTimeout(()=>{o._router.navigateByUrl(i)},2e3)}})()}processBatchExtras(){var o=this;return(0,v.Z)(function*(){const r=o._paymentService.getBatch();if(!r?.payments?.length)return;const i=String(o.currentPayment?.sourceModuleRecord?._id||o.currentPayment?.sourceModuleRecord||"");if(!r.mainTournamentId||r.mainTournamentId!==i)return console.warn("Discarding a payment batch that does not belong to this checkout.",{expected:r.mainTournamentId,got:i}),void o._paymentService.clearBatch();o.batchProcessing=!0,window.onbeforeunload=()=>"Your added events are still being charged. Are you sure you want to leave?";let n=null,a=null;try{const p=o.currentPayment?.paymentIntentId||o.paymentIntentId,d=o.currentPayment?.stripeIdToSendTo;if(p&&d){const g=yield(0,u.lastValueFrom)(o._stripeService.getPaymentIntent({paymentIntentId:p,stripeAccountId:d}));n=g?.customer?.id||g?.customer||null,a=g?.payment_method?.id||g?.payment_method||null}}catch(p){console.error("Could not read the saved payment method off the main intent: ",p)}r.results=r.results||[];for(let p=0;p<r.payments.length;p++){const d=r.payments[p],g=r.events?.[p]||{};r.results[p]||(r.results[p]={tournamentId:g.tournamentId||d.sourceModuleRecord,name:g.name||"",amount:Number(d.amount)||0,status:"pending",fulfilled:!1});const f=r.results[p];o.batchResults=r.results;try{yield o.processOneBatchExtra(d,f,r,n,a)}catch(y){console.error(`Batch event "${f.name}" failed: `,y),f.status="charging"===f.status?"needs-review":"failed",f.error=o.batchErrorMessage(y),o._paymentService.setBatch(r)}}o.batchResults=r.results;const s=r.results.filter(p=>"needs-review"===p.status);s.length&&o.sendFulfillmentFailureAlert("Multi-event batch",new Error(`Needs review: ${s.map(p=>`${p.name} (payment ${p.paymentId||"none"})`).join(", ")}`)),o._paymentService.clearBatch(),o.batchProcessing=!1,window.onbeforeunload=null})()}processOneBatchExtra(o,r,i,n,a){var s=this;return(0,v.Z)(function*(){if(r.fulfilled||"failed"===r.status||"needs-review"===r.status)return;if(r.paymentIntentId){if("succeeded"===(yield(0,u.lastValueFrom)(s._stripeService.getPaymentIntent({paymentIntentId:r.paymentIntentId,stripeAccountId:o.stripeIdToSendTo})))?.status){const Y=yield s.markBatchPaymentCompleted(o,r);yield s.fulfillBatchExtra(o,Y,r,i)}else r.status="failed",r.error="The charge did not complete.",s._paymentService.setBatch(i);return}if("charging"===r.status)return r.status="needs-review",r.error="This charge could not be confirmed. Our team has been alerted.",void s._paymentService.setBatch(i);if(!(Number(o.amount)>0)){const q=yield s.saveBatchPaymentRecord(o,r,"completed");return void(yield s.fulfillBatchExtra(o,q,r,i))}if(!n||!a)return r.status="failed",r.error="No saved card was available for this event. Please register for it separately.",void s._paymentService.setBatch(i);const p=yield s.saveBatchPaymentRecord(o,r,"pending");r.status="charging",s._paymentService.setBatch(i);const d=o?.metaData?.teamSeriesEnabled?1:o?.team?.users?.length||1,f={stripeIdToPay:o.stripeIdToSendTo,amount:o.amount,totalPreFees:o.totalPreFees,anglerFeeMultiplier:o?.metaData?.bigFishModeOptions?.daysChosen?.length||0,anglerEntryCount:d,hasApplicationFee:!o.exemptFromAnglerFees,receipt_email:o.recipientOfPayment?.email||"[email protected]",description:o.description,sidepotBigFishDetails:o.sidePotBigFishEntries,customerId:n,paymentMethodId:a,confirmOffSession:!0,metadata:{weighbookPaymentId:p?._id||r.paymentId||"",tournamentId:o.sourceModuleRecord?._id||o.sourceModuleRecord||"",teamId:o.team?._id||o.team||"",userId:o.user?._id||o.user||"",paymentForType:"Tournament",recipientOfPayment:o.recipientOfPayment?._id||o.recipientOfPayment||"",stripeAccountId:o.stripeIdToSendTo||"",prizePoolReserveCents:"0"}};let y=null;try{y=yield(0,u.lastValueFrom)(s._stripeService.createPaymentIntent(f))}catch(q){return r.status="failed",r.error=s.batchErrorMessage(q),void s._paymentService.setBatch(i)}if(r.paymentIntentId=y?.id||null,s._paymentService.setBatch(i),"succeeded"===y?.status){const q=yield s.markBatchPaymentCompleted(o,r);yield s.fulfillBatchExtra(o,q,r,i)}else r.status=y?.id?"failed":"needs-review",r.error="The charge did not complete. Please register for this event separately.",s._paymentService.setBatch(i)})()}saveBatchPaymentRecord(o,r,i){var n=this;return(0,v.Z)(function*(){if(r.paymentId){const p=n._sharedUtilsService.deepClone(o);return p._id=r.paymentId,p.status=i,yield(0,u.lastValueFrom)(n._paymentService.update(p))}const a=n._sharedUtilsService.deepClone(o);a.status=i;const s=yield(0,u.lastValueFrom)(n._paymentService.create(a));return r.paymentId=s?._id||null,s})()}markBatchPaymentCompleted(o,r){var i=this;return(0,v.Z)(function*(){const n=i._sharedUtilsService.deepClone(o);return n._id=r.paymentId,n.paymentIntentId=r.paymentIntentId||null,n.status="completed",n._id?yield(0,u.lastValueFrom)(i._paymentService.update(n)):yield(0,u.lastValueFrom)(i._paymentService.create(n))})()}fulfillBatchExtra(o,r,i,n){var a=this;return(0,v.Z)(function*(){const s=yield(0,u.lastValueFrom)(a._tournamentService.getFromApi(o.sourceModuleRecord?._id||o.sourceModuleRecord)),p=!!(o.items||[]).find(g=>"Big Fish"===g.type),d=!!(o.items||[]).find(g=>"Side Pot"===g.type);yield a._tournamentService.registerForTourneyFromPayment(s,o.team,p,d,r,o),o?.metaData?.raffleSelections?.length&&(yield a.neverStrand("batch raffle entries",()=>a.createRaffleEntriesFromPayment(r))),yield a.neverStrand("batch receipt",()=>
1a.sendPaymentReceipt(r,s)),i.status=Number(o.amount)>0?"succeeded":"free",i.fulfilled=!0,a._paymentService.setBatch(n)})()}batchErrorMessage(o){const r=o?.error?.raw?.message||o?.error?.message||o?.message||"";return/card was declined|insufficient|do not honor|declined/i.test(r)?"Your bank declined this charge. Please register for this event separately.":r||"This event could not be charged. Please register for it separately."}neverStrand(o,r){var i=this;return(0,v.Z)(function*(){try{return yield r()}catch(n){return console.error(`Post-payment step "${o}" failed. Payment ${i.currentPayment?._id} is already saved; the webhook can still complete fulfillment. `,n),null}})()}sendNewMemberEmail(o,r,i="tour"){var n=this;return this.neverStrand("sendNewMemberEmail",(0,v.Z)(function*(){let a=`A new membership was paid for ${o.name} in the amount of $${n.currentPayment.amount}.`;"tour"===i&&(a+=` They provided a BASS Membership ID of: ${r}.`);const s=o.director?._id||o.director,p=n.currentPayment.items.map(y=>`${y.type}: $${parseFloat(y.cost)}`),d={directorId:s};"tour"===i?d.tourId=o._id:(d.seasonId=o._id,d.divisionId=o.division?._id||o.division,d.tourId=o.tour?._id||o.tour);const g=new h.zX;g.from="[email protected]",g.notifyPaymentStaff=d,g.subject="Successful Membership Payment",g.message=a,g.items=p,g.template="payment-confirmation",g.record=n.currentPayment,yield(0,u.lastValueFrom)(n._messageService.sendEmail(g));const f=new h.zX;if(f.from="[email protected]",f.subject="Successful Membership Payment",f.message=a,f.items=p,f.template="payment-confirmation",f.record=n.currentPayment,"tour"===i)f.notifyTourOwner=o._id,yield(0,u.lastValueFrom)(n._messageService.sendEmail(f));else{const y=(o.director?.email?o.director:null)||(o.directors||[]).find(q=>q?.email)||null;y?.email&&(f.to=y.email,f.recipFirstName=y.first_name,yield(0,u.lastValueFrom)(n._messageService.sendEmail(f)))}return null}))}sendFulfillmentFailureAlert(o,r){try{const i=new h.zX;i.from="[email protected]",i.to="[email protected]",i.recipFirstName="Support",i.subject=`ALERT: ${o} fulfillment failed after payment`,i.message=`${o} fulfillment failed after a successful payment. Payment ID: ${this.currentPayment?._id}. User: ${this.currentUser?.first_name} ${this.currentUser?.last_name} (${this.currentUser?._id}). Amount: $${this.currentPayment?.amount}. Source record: ${this.currentPayment?.sourceModuleRecord}. Error: ${r?.message||r}`,i.template="payment-confirmation",i.items=[`Payment ID: ${this.currentPayment?._id}`,`User ID: ${this.currentUser?._id}`,`Amount: $${this.currentPayment?.amount}`,`Error: ${r?.message||r}`],i.record=this.currentPayment,(0,u.lastValueFrom)(this._messageService.sendEmail(i))}catch(i){console.error("Failed to send membership failure alert email:",i)}}updateDirectorsCredit(){var o=this;return this.neverStrand("updateDirectorsCredit",(0,v.Z)(function*(){if(!o.currentPayment.accountToPay)return null;const r=yield(0,u.lastValueFrom)(o._accountService.get(o.currentPayment.accountToPay));if(r){const i=r.user,n=i&&i._id?i._id:i;yield(0,u.lastValueFrom)(o._directorsCreditService.getCreditBankByUserId(n)),o.currentPayment.weighBookProcessingFee||(o.currentPayment.weighBookProcessingFee=0)}return null}))}processMemberships(){var o=this;return this.neverStrand("processMemberships",(0,v.Z)(function*(){const r=o.currentPayment.items.filter(n=>"membership"===n.key||n.type.toLowerCase().includes("membership"));if(r&&r.length){const n=r.map(function(){var a=(0,v.Z)(function*(s){const p=s.user;if(!p)return void console.error("Membership line item missing user ID - skipping:",s);let d=new P.EA;d.active=!0,d.amountPaid=s.cost,d.user=p,d.expired=!1,d.completedPayment=!0;const g=new P.EA;g.user=p;let f=!1;const y=s.membershipScope?"season"===s.membershipScope:s.type.toLowerCase().includes("season");y?(d.season=o.relatedTournament.season?._id?o.relatedTournament.season._id:o.relatedTournament.season,d.approved=!0,g.season=d.season):(d.tour=o.relatedTournament.tour?._id?o.relatedTournament.tour._id:o.relatedTournament.tour,g.tour=d.tour,d.approved=!1);const q=yield(0,u.lastValueFrom)(o._membershipService.search(g)),Y=q?.length?q[0]:null;if(Y&&(d=Y,d.amountPaid=s.cost,d.completedPayment=!0,f=!0),o.currentPayment.metaData&&o.currentPayment.metaData.additionalInputValues?.length){const U=o.currentPayment.metaData.additionalInputValues?.length?o.currentPayment.metaData.additionalInputValues:[];if(U?.length){const $=U.find(H=>H.user._id==s.user);$&&(d.optionalAdditionalValue=$.inputRequested)}const D=o.currentPayment.metaData.optionalMembershipQuestionsByUser;D&&Object.keys(D).length&&(d.optionalValues=o.relatedTournament.tour.additionalInputs.map((H,M)=>({label:H.label,value:D["membership-question-user-"+(d.user?._id?d.user._id:d.user)+"-question-"+M]})))}if(f){if(yield(0,u.lastValueFrom)(o._membershipService.update(d)),!y)try{yield(0,u.lastValueFrom)(o._membershipService.renew({membershipId:d._id,tierName:o.currentPayment.metaData?.tierName||d?.tier?.name,markPaid:!0,amountPaid:s.cost}))}catch(U){console.log("Membership renew after payment failed: ",U?.status,U)}}else yield(0,u.lastValueFrom)(o._membershipService.create(d))});return function(s){return a.apply(this,arguments)}}());yield Promise.all(n)}return null}))}sendPaymentReceipt(o,r){var i=this;return this.neverStrand("sendPaymentReceipt",(0,v.Z)(function*(){const n=new h.zX;let a=`Your payment has been received for ${r.name} in the amount of $${o.amount}.`;const s={...o};return s.amount=Math.round(100*o.amount)/100,s.items=o.items.map(p=>(p.cost=Math.round(100*p.cost)/100,p)),n.from="[email protected]",n.to=i.currentUser.email,n.recipFirstName=i.currentUser.first_name,n.subject="Successful Tournament Payment",n.message=a,n.items=o.items.map(p=>
1`${p.type}: $${parseFloat(p.cost)}`),n.template="payment-confirmation",n.record=s,yield(0,u.lastValueFrom)(i._messageService.sendEmail(n)),null}))}registerForTourney(o){var r=this;return(0,v.Z)(function*(){const n=!!r.currentPayment.items.find(g=>"Big Fish"===g.type),s=!!r.currentPayment.items.find(g=>"Side Pot"===g.type);let p=r.relatedTournament;(!p||void 0===p&&"Tournament"===o.paymentForType)&&(p=yield(0,u.lastValueFrom)(r._tournamentService.getFromApi(o.sourceModuleRecord))),r.relatedTournament=r._sharedUtilsService.deepClone(p);const d=yield r._tournamentService.registerForTourneyFromPayment(p,r.paymentCopy.team,n,s,o,r.paymentCopy);yield r.verifyDualFormatEntryIntegrity(d,p,o),yield r.createRaffleEntriesFromPayment(o),yield r.sendPaymentReceipt(o,r.relatedTournament)})()}verifyDualFormatEntryIntegrity(o,r,i){var n=this;return(0,v.Z)(function*(){try{if(!r?.settings?.payout?.teamSeriesEnabled||!o?._id)return;const s=o.users||[];if(s.length<=1)return;const p=i?.user?._id||i?.user||n.currentUser?._id;if(!p)return;const d=s.filter(y=>String(y?._id||y)===String(p)),g=d.length?d:[s[0]];console.warn("[dual-format guard] Entry came back with multiple users - pruning to paying angler.",{entryId:o._id,before:s.map(y=>y?._id||y),after:g.map(y=>y?._id||y)});const f={...o,users:g};try{yield(0,u.lastValueFrom)(n._entryService.createOrUpdate(f))}catch{}}catch{}})()}createRaffleEntriesFromPayment(o){var r=this;return(0,v.Z)(function*(){const i=o?.metaData?.raffleSelections||r.paymentCopy?.metaData?.raffleSelections;if(!i?.length||!r.currentUser?._id)return;const n=`${r.currentUser.first_name||""} ${r.currentUser.last_name||""}`.trim();let a=1;for(const s of i)if(s.raffle?.raffleEntries?.length)for(const p of s.raffle.raffleEntries){const d=parseInt(p.ticketId,10);!isNaN(d)&&d>=a&&(a=d+1)}for(const s of i){const p=s.raffle;let d=p?.raffleEntries?.length||0;for(let g=0;g<s.quantity;g++){const f=new P.FB;f.user=r.currentUser._id,f.entrant=n,f.entryNumber=d+1,f.raffle=p._id,f.ticketId=String(a),f.relatedPayment=o?._id||r.currentPayment?._id,a++,yield(0,u.lastValueFrom)(r._tournamentRaffleEntryService.create(f)),d++}}})()}backToTour(){this._router.navigateByUrl(this.currentPayment&&this.currentPayment.sourceModuleRecord?this.baseRoute+"/tours/"+this.currentPayment.sourceModuleRecord:this.baseRoute+"/tours/")}backToSeason(){this._router.navigateByUrl(this.currentPayment&&this.currentPayment.sourceModuleRecord?this.baseRoute+"/seasons/"+this.currentPayment.sourceModuleRecord:this.baseRoute+"/seasons/")}backToCredits(){this._router.navigateByUrl("/director/buy-credits?rl=1")}backToTournament(){this._router.navigateByUrl(this.currentPayment&&this.currentPayment.sourceModuleRecord?this.baseRoute+"/tournaments/"+this.currentPayment.sourceModuleRecord:this.baseRoute+"/tournaments/")}backAction(){switch(this.currentPayment?.paymentForType){case"Tour":this.backToTour();break;case"Season":this.backToSeason();break;case"Entry Credits":this.backToCredits();break;default:this.backToTournament()}}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(z.gz),e.Y36(z.F0),e.Y36(h.e8),e.Y36(h.KD),e.Y36(h.te),e.Y36(I.g),e.Y36(h.ly),e.Y36(h.vf),e.Y36(h.ez),e.Y36(h.n3),e.Y36(h.BR),e.Y36(h.J3),e.Y36(h.z9),e.Y36(h.Zr),e.Y36(h.QL),e.Y36(h.tq),e.Y36(h.Qv),e.Y36(C.g),e.Y36(S.O),e.Y36(w.k))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["app-payment-confirmation"]],decls:1,vars:1,consts:[["class","confirmation-page",4,"ngIf"],[1,"confirmation-page"],["class","confirmation-card",4,"ngIf"],["class","confirmation-card failure-card",4,"ngIf"],[1,"confirmation-card"],[1,"check-circle"],["viewBox","0 0 52 52",1,"check-svg"],["cx","26","cy","26","r","25","fill","none",1,"check-circle-bg"],["fill","none","d","M14.1 27.2l7.1 7.2 16.7-16.8",1,"check-path"],[1,"confirmation-text"],["class","confirmation-eyebrow","data-testid","payment-confirmation-status",4,"ngIf"],[1,"confirmation-heading"],["class","confirmation-subtext",4,"ngIf"],["class","confirmation-subtext processing",4,"ngIf"],["class","receipt-card",4,"ngIf"],["class","batch-events-card",4,"ngIf"],["class","next-up-card",4,"ngIf"],["class","confirmation-actions",4,"ngIf"],["data-testid","payment-confirmation-status",1,"confirmation-eyebrow"],[1,"confirmation-subtext"],[1,"confirmation-subtext","processing"],[1,"spin"],[1,"receipt-card"],[1,"receipt-header"],[1,"receipt-items"],["class","receipt-line",4,"ngFor","ngForOf"],["class","receipt-waived",4,"ngFor","ngForOf"],[1,"receipt-divider"],[1,"receipt-line","receipt-total"],[1,"receipt-line-label"],[1,"receipt-line-value"],[1,"receipt-line"],[1,"receipt-waived"],[1,"material-symbols-outlined"],[1,"batch-events-card"],[1,"batch-events-header"],["class","batch-event-line",4,"ngFor","ngForOf"],["class","batch-events-total",4,"ngIf"],[1,"batch-event-line"],[1,"batch-event-name"],["class","batch-event-amount",4,"ngIf"],[1,"batch-event-status",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"batch-event-amount"],[1,"material-symbols-outlined","ok"],[1,"material-symbols-outlined","bad"],[1,"batch-events-total"],[1,"next-up-card"],[1,"next-up-header"],[1,"next-up-text"],[1,"confirmation-actions"],["mat-flat-button","","color","primary",1,"back-btn",3,"click"],[1,"confirmation-card","failure-card"],[1,"fail-circle"]],template:function(r,i){1&r&&e.YNc(0,Ot,3,2,"div",0),2&r&&e.Q6J("ngIf",i.currentPayment)},dependencies:[O.sg,O.O5,O.RF,O.n9,O.ED,G.Hw,Q.lW,O.H9],styles:["[_nghost-%COMP%]{width:100%}.confirmation-page[_ngcontent-%COMP%]{min-height:85vh;display:flex;align-items:center;justify-content:center;padding:32px 20px;background:var(--wb-canvas)}.confirmation-card[_ngcontent-%COMP%]{max-width:520px;width:100%;display:flex;flex-direction:column;align-items:stretch;text-align:left;padding:32px 34px 28px;background:var(--wb-surface);border-radius:10px;border:1px solid var(--wb-border)}
1.check-circle[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:999px;background:var(--wb-success-soft);display:flex;align-items:center;justify-content:center;margin-bottom:16px;flex-shrink:0}.check-svg[_ngcontent-%COMP%]{width:24px;height:24px}.check-circle-bg[_ngcontent-%COMP%]{stroke:transparent}.check-path[_ngcontent-%COMP%]{stroke:var(--wb-success);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:48;stroke-dashoffset:48;animation:_ngcontent-%COMP%_checkStroke .35s .2s ease-out forwards}@keyframes _ngcontent-%COMP%_checkStroke{to{stroke-dashoffset:0}}.fail-circle[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:999px;background:var(--wb-danger-soft, #FBEAE8);display:flex;align-items:center;justify-content:center;margin-bottom:16px}.fail-circle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:24px;width:24px;height:24px;color:var(--wb-danger)}.confirmation-text[_ngcontent-%COMP%]{margin-bottom:24px}.confirmation-eyebrow[_ngcontent-%COMP%]{font-size:11px;font-weight:600;line-height:1;letter-spacing:.1em;text-transform:uppercase;color:var(--wb-success);margin-bottom:8px}.confirmation-heading[_ngcontent-%COMP%]{margin:0;font-size:22px;font-weight:700;color:var(--wb-text);line-height:1.2}.confirmation-subtext[_ngcontent-%COMP%]{margin:8px 0 0;font-size:12.5px;font-weight:400;color:var(--wb-text-2);line-height:1.5}.confirmation-subtext.processing[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;gap:8px;color:var(--wb-text-3);font-weight:500}.spin[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_spin 1s linear infinite;font-size:18px;width:18px;height:18px}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.receipt-card[_ngcontent-%COMP%]{width:100%;background:var(--wb-canvas);border:1px solid var(--wb-border);border-radius:10px;padding:18px 20px;margin-bottom:16px;text-align:left;box-sizing:border-box}.receipt-header[_ngcontent-%COMP%]{font-size:10.5px;font-weight:600;line-height:1;text-transform:uppercase;letter-spacing:.1em;color:var(--wb-text-3);margin-bottom:14px}.receipt-items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:9px}.receipt-line[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;gap:16px}.receipt-line-label[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:1.4;color:var(--wb-text-2)}.receipt-line-value[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--wb-text);font-variant-numeric:tabular-nums;white-space:nowrap}.receipt-waived[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-top:10px;font-size:12px;font-weight:500;line-height:1.4;color:var(--wb-success)}.receipt-waived[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:15px}.receipt-divider[_ngcontent-%COMP%]{height:1px;background:var(--wb-border);margin:14px 0}.receipt-total[_ngcontent-%COMP%] .receipt-line-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--wb-text)}.receipt-total[_ngcontent-%COMP%] .receipt-line-value[_ngcontent-%COMP%]{font-size:19px;font-weight:700;color:var(--wb-text)}.next-up-card[_ngcontent-%COMP%]{width:100%;border:1px solid var(--wb-border);border-radius:10px;padding:16px 18px;margin-bottom:20px;box-sizing:border-box}.next-up-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--wb-text);margin-bottom:6px}.next-up-header[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px;color:var(--wb-text-3)}.next-up-text[_ngcontent-%COMP%]{margin:0;font-size:12.5px;font-weight:400;line-height:1.5;color:var(--wb-text-2)}.confirmation-actions[_ngcontent-%COMP%]{width:100%}.back-btn[_ngcontent-%COMP%]{width:100%;padding:12px 24px;font-size:13.5px;font-weight:600;border-radius:8px;letter-spacing:0;color:#fff}.back-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:17px;width:17px;height:17px;margin-left:6px}@media (max-width: 480px){.confirmation-card[_ngcontent-%COMP%]{padding:26px 20px 22px}.confirmation-heading[_ngcontent-%COMP%]{font-size:18px}}.batch-events-card[_ngcontent-%COMP%]{width:100%;border:1px solid var(--wb-border);border-radius:12px;background:var(--wb-surface);padding:14px 16px;margin-top:14px;text-align:left}.batch-events-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--wb-text-2);margin-bottom:10px}.batch-events-header[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.batch-event-line[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:6px 0;font-size:14px}
1.batch-event-line[_ngcontent-%COMP%] .batch-event-name[_ngcontent-%COMP%]{color:var(--wb-text);min-width:0;overflow:hidden;text-overflow:ellipsis}.batch-event-line[_ngcontent-%COMP%] .batch-event-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;max-width:55%;font-size:13px;color:var(--wb-text-2);text-align:right}.batch-event-line[_ngcontent-%COMP%] .batch-event-status[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.batch-event-line[_ngcontent-%COMP%] .batch-event-status[_ngcontent-%COMP%] .material-symbols-outlined.ok[_ngcontent-%COMP%]{color:var(--wb-success, #2e7d32)}.batch-event-line[_ngcontent-%COMP%] .batch-event-status[_ngcontent-%COMP%] .material-symbols-outlined.bad[_ngcontent-%COMP%]{color:var(--wb-danger, #c2382f)}.batch-event-amount[_ngcontent-%COMP%]{margin-left:6px;font-size:12.5px;color:var(--wb-text-2);font-variant-numeric:tabular-nums}.batch-events-total[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;margin-top:8px;padding-top:10px;border-top:1px solid var(--wb-border);font-weight:700;font-size:14px;color:var(--wb-text);font-variant-numeric:tabular-nums}"],data:{animation:[(0,T.X$)("cardEnter",[(0,T.eR)(":enter",[(0,T.oB)({opacity:0,transform:"translateY(30px) scale(0.95)"}),(0,T.jt)("500ms ease-out",(0,T.oB)({opacity:1,transform:"translateY(0) scale(1)"}))])]),(0,T.X$)("checkPop",[(0,T.eR)(":enter",[(0,T.jt)("600ms 300ms ease-out",(0,T.F4)([(0,T.oB)({opacity:0,transform:"scale(0)",offset:0}),(0,T.oB)({opacity:1,transform:"scale(1.2)",offset:.6}),(0,T.oB)({opacity:1,transform:"scale(1)",offset:1})]))])]),(0,T.X$)("fadeUp",[(0,T.eR)(":enter",[(0,T.oB)({opacity:0,transform:"translateY(12px)"}),(0,T.jt)("400ms 600ms ease-out",(0,T.oB)({opacity:1,transform:"translateY(0)"}))])]),(0,T.X$)("fadeUpLate",[(0,T.eR)(":enter",[(0,T.oB)({opacity:0,transform:"translateY(12px)"}),(0,T.jt)("400ms 800ms ease-out",(0,T.oB)({opacity:1,transform:"translateY(0)"}))])])]}})}}return l})();function lt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"button",53),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.refundPayment())}),e.TgZ(1,"span",4),e._uU(2,"currency_exchange"),e.qZA(),e._uU(3),e.qZA()}if(2&l){const o=e.oxw(2);e.ekj("is-busy",o.refundingPayment),e.Q6J("disabled",o.refundingPayment),e.xp6(3),e.hij(" ",o.refundingPayment?"Refunding\u2026":"Refund"," ")}}function mt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"button",54),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.voidPayment())}),e.TgZ(1,"span",4),e._uU(2,"block"),e.qZA(),e._uU(3),e.qZA()}if(2&l){const o=e.oxw(2);e.ekj("is-busy",o.voidingPayment),e.Q6J("disabled",o.voidingPayment),e.xp6(3),e.hij(" ",o.voidingPayment?"Voiding\u2026":"Void payment"," ")}}function _t(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"button",53),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.unvoidPayment())}),e.TgZ(1,"span",4),e._uU(2,"restart_alt"),e.qZA(),e._uU(3),e.qZA()}if(2&l){const o=e.oxw(2);e.ekj("is-busy",o.unvoidingPayment),e.Q6J("disabled",o.unvoidingPayment),e.xp6(3),e.hij(" ",o.unvoidingPayment?"Restoring\u2026":"Unvoid payment"," ")}}function ft(l,m){if(1&l&&(e.TgZ(0,"div",55)(1,"span",4),e._uU(2,"info"),e.qZA(),e._uU(3),e.ALo(4,"date"),e.qZA()),2&l){const o=e.oxw(2);e.xp6(3),e.hij(" This payment was voided on ",e.xi3(4,1,o.currentPayment.voidedAt,"mediumDate")," ")}}function Tt(l,m){if(1&l&&(e.TgZ(0,"div",56)(1,"span",4),e._uU(2,"currency_exchange"),e.qZA(),e._uU(3),e.ALo(4,"currency"),e.ALo(5,"date"),e.qZA()),2&l){const o=e.oxw(2);e.xp6(3),e.AsE(" Entry fee of ",e.lcZ(4,2,o.currentPayment.refundedAmount)," refunded to the angler on ",e.xi3(5,4,o.currentPayment.refundedAt,"mediumDate")," ")}}const ot=function(l){return[l]};function kt(l,m){if(1&l&&(e.TgZ(0,"a",57),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.Q6J("routerLink",e.VKq(2,ot,o.payerLink)),e.xp6(1),e.Oqu(o.payerName)}}function Zt(l,m){if(1&l&&(e.TgZ(0,"span",58),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Oqu(o.payerName)}}function At(l,m){if(1&l&&(e.TgZ(0,"div",59),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Oqu(o.payerEmail)}}function Ut(l,m){if(1&l&&(e.TgZ(0,"a",57),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.Q6J("routerLink",e.VKq(2,ot,o.payeeLink)),e.xp6(1),e.Oqu(o.payeeName)}}function St(l,m){if(1&l&&(e.TgZ(0,"span",60),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Oqu(o.payeeName)}}function qt(l,m){if(1&l&&(e.TgZ(0,"div",59),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Oqu(o.payeeEmail)}}function It(l,m){if(1&l&&(e.TgZ(0,"div",61)(1,"div",37),e._uU(2),e.qZA(),e.TgZ(3,"div",38)(4,"span",62),e._uU(5),e.qZA()(),e.TgZ(6,"div",39),e._uU(7),e.ALo(8,"currency"),e.qZA()()),2&l){const o=m.$implicit;e.ekj("is-coupon",o.cost<0),e.xp6(2),e.Oqu(o.description),e.xp6(2),e.ekj("is-coupon",o.cost<0),e.xp6(1),e.Oqu(o.type),e.xp6(2),e.Oqu(e.l
1cZ(8,7,o.cost))}}function Ft(l,m){if(1&l&&(e.TgZ(0,"div",47)(1,"span",48),e._uU(2,"Type"),e.qZA(),e.TgZ(3,"span",49),e._uU(4),e.qZA()()),2&l){const o=e.oxw(2);e.xp6(4),e.Oqu(null==o.currentPayment.items[0]?null:o.currentPayment.items[0].type)}}function zt(l,m){if(1&l&&(e.TgZ(0,"div",47)(1,"span",48),e._uU(2,"Date"),e.qZA(),e.TgZ(3,"span",49),e._uU(4),e.ALo(5,"date"),e.qZA()()),2&l){const o=e.oxw(2);e.xp6(4),e.Oqu(e.xi3(5,1,o.currentPayment.createdAt,"MMM d, y"))}}function Nt(l,m){if(1&l&&(e.TgZ(0,"div",47)(1,"span",48),e._uU(2,"Time"),e.qZA(),e.TgZ(3,"span",49),e._uU(4),e.ALo(5,"date"),e.qZA()()),2&l){const o=e.oxw(2);e.xp6(4),e.Oqu(e.xi3(5,1,o.currentPayment.createdAt,"h:mm a"))}}function Et(l,m){if(1&l&&(e.TgZ(0,"a",65),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.Q6J("routerLink",e.VKq(2,ot,o.baseRoute+"/"+o.getRelatedRoute()+"/"+o.currentPayment.sourceModuleRecord)),e.xp6(1),e.hij(" ",o.currentPayment.relatedModuleRecord.name," ")}}function Jt(l,m){if(1&l&&(e.TgZ(0,"span",49),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.xp6(1),e.Oqu(o.currentPayment.relatedModuleRecord.name)}}function Dt(l,m){if(1&l&&(e.TgZ(0,"div",47)(1,"span",48),e._uU(2),e.qZA(),e.YNc(3,Et,2,4,"a",63),e.YNc(4,Jt,2,1,"ng-template",null,64,e.W1O),e.qZA()),2&l){const o=e.MAs(5),r=e.oxw(2);e.xp6(2),e.Oqu(r.currentPayment.paymentForType||"Record"),e.xp6(1),e.Q6J("ngIf",r.getRelatedRoute())("ngIfElse",o)}}function Yt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",1)(1,"div",2)(2,"a",3)(3,"span",4),e._uU(4,"arrow_back"),e.qZA(),e._uU(5," Payments "),e.qZA(),e._UZ(6,"span",5),e.TgZ(7,"button",6),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.print())}),e.TgZ(8,"span",4),e._uU(9,"print"),e.qZA(),e._uU(10," Print "),e.qZA(),e.YNc(11,lt,4,4,"button",7),e.YNc(12,mt,4,4,"button",8),e.YNc(13,_t,4,4,"button",7),e.qZA(),e.TgZ(14,"header",9)(15,"div",10)(16,"div",11)(17,"span",4),e._uU(18),e.qZA()(),e.TgZ(19,"div",12)(20,"div",13),e._uU(21),e.qZA(),e.TgZ(22,"h1",14),e._uU(23),e.qZA()()(),e.TgZ(24,"div",15)(25,"span",16),e._uU(26),e.ALo(27,"currency"),e.qZA(),e.TgZ(28,"span",17),e._UZ(29,"span",18),e._uU(30),e.qZA()()(),e.TgZ(31,"div",19)(32,"div",20),e.YNc(33,ft,5,4,"div",21),e.YNc(34,Tt,6,7,"div",22),e.TgZ(35,"section",23)(36,"div",24),e._uU(37,"Parties"),e.qZA(),e.TgZ(38,"div",25)(39,"div",26)(40,"span",27),e._uU(41),e.qZA(),e.TgZ(42,"div",28)(43,"div",29),e._uU(44),e.qZA(),e.YNc(45,kt,2,4,"a",30),e.YNc(46,Zt,2,1,"ng-template",null,31,e.W1O),e.YNc(48,At,2,1,"div",32),e.qZA()(),e.TgZ(49,"div",33)(50,"span",4),e._uU(51,"trending_flat"),e.qZA()(),e.TgZ(52,"div",26)(53,"span",27),e._uU(54),e.qZA(),e.TgZ(55,"div",28)(56,"div",29),e._uU(57),e.qZA(),e.YNc(58,Ut,2,4,"a",30),e.YNc(59,St,2,1,"ng-template",null,34,e.W1O),e.YNc(61,qt,2,1,"div",32),e.qZA()()()(),e.TgZ(62,"section",23)(63,"div",24),e._uU(64,"Line items"),e.qZA(),e.TgZ(65,"div",35)(66,"div",36)(67,"div",37),e._uU(68,"Description"),e.qZA(),e.TgZ(69,"div",38),e._uU(70,"Type"),e.qZA(),e.TgZ(71,"div",39),e._uU(72,"Amount"),e.qZA()(),e.YNc(73,It,9,9,"div",40),e.TgZ(74,"div",41),e._UZ(75,"div",37),e.TgZ(76,"div",42),e._uU(77),e.qZA(),e.TgZ(78,"div",43),e._uU(79),e.ALo(80,"currency"),e.qZA()()()()(),e.TgZ(81,"aside",44)(82,"section",23)(83,"div",24),e._uU(84,"Details"),e.qZA(),e.TgZ(85,"div",45),e.YNc(86,Ft,5,1,"div",46),e.TgZ(87,"div",47)(88,"span",48),e._uU(89,"Direction"),e.qZA(),e.TgZ(90,"span",49),e._uU(91),e.qZA()(),e.YNc(92,zt,6,4,"div",46),e.YNc(93,Nt,6,4,"div",46),e.YNc(94,Dt,6,3,"div",46),e.TgZ(95,"div",47)(96,"span",48),e._uU(97,"Method"),e.qZA(),e.TgZ(98,"span",49),e._uU(99),e.qZA()()()(),e.TgZ(100,"section",23)(101,"div",24),e._uU(102,"Receipt"),e.qZA(),e.TgZ(103,"div",50)(104,"span",51),e._uU(105),e.qZA(),e.TgZ(106,"button",52),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.copyReceipt())}),e.TgZ(107,"span",4),e._uU(108,"content_copy"),e.qZA()()()()()()()}if(2&l){const o=e.MAs(47),r=e.MAs(60),i=e.oxw();e.xp6(2),e.Q6J("routerLink",e.VKq(43,ot,i.baseRoute+"/"+i.paymentsRoute)),e.xp6(9),e.Q6J("ngIf",i.canRefundPayment()),e.xp6(1),e.Q6J("ngIf",i.canVoidPayment()),e.xp6(1),e.Q6J("ngIf",i.canUnvoidPayment()),e.xp6(3),e.ekj("is-credit",i.isCredit)("is-debit",!i.isCredit),e.xp6(2),e.Oqu(i.isCredit?"south_west":"north_east"),e.xp6(3),e.Oqu(i.paymentEyebrow),e.xp6(2),e.Oqu((null==i.currentPayment||null==i.currentPayment.relatedModuleRecord?null:i.currentPayment.relatedModuleRecord.name)||(null==i.currentPayment?null:i.currentPayment.description)||"Payment"),e.xp6(3),e.AsE("",i.isCredit?"+":"\u2212","",e.lcZ(27,39,i.signedAmount),""),e.xp6(2),e.uIk("data-status",i.statusKey),e.xp6(2),e.hij("",i.statusLabel," "),e.xp6(3),e.Q6J("ngIf",i.currentPayment.voidedAt),e.xp6(1),e.Q6J("ngIf",i.currentPayment.refundedAt),e.xp6(6),e.uIk("data-kind",i.payerKind),e.xp6(1),e.Oqu(i.partyInitials(i.payerName,i.payerKind)),e.xp6(3),e.hij("Paid by \xb7 ",i.kindLabel(i.payerKind),""),e.xp6(1),e.Q6J("ngIf",i.payerLink)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",i.payerEmail),e.xp6(5),e.uIk("data-kind",i.payeeKind),e.xp6(1),e.Oqu(i.partyInitials(i.payeeName,i.payeeKind)),e.xp6(3),e.hij("Paid to \xb7 ",i.kindLabel(i.payeeKind),""),e.xp6(1),e.Q6J("ngIf",i.payeeLink)("ngIfElse",r),e.xp6(3),e.Q6J("ngIf",i.payeeEmail),e.xp6(12),e.Q6J("ngForOf",i.currentPayment.items),e.xp6(4),e.Oqu(i.isCredit?"Total paid":"Total paid out"),e.xp6(2),e.Oqu(e.l
1cZ(80,41,i.totalCost)),e.xp6(7),e.Q6J("ngIf",null==i.currentPayment.items?null:i.currentPayment.items.length),e.xp6(5),e.Oqu(i.directionLabel),e.xp6(1),e.Q6J("ngIf",i.currentPayment.createdAt),e.xp6(1),e.Q6J("ngIf",i.currentPayment.createdAt),e.xp6(1),e.Q6J("ngIf",null==i.currentPayment.relatedModuleRecord?null:i.currentPayment.relatedModuleRecord.name),e.xp6(5),e.Oqu(i.methodLabel),e.xp6(6),e.Oqu(i.currentPayment._id)}}let dt=(()=>{class l{constructor(o,r,i,n,a,s){this._router=o,this._location=r,this.route=i,this._userService=n,this._paymentService=a,this._sharedUtilsService=s,this.ngUnsubscribe=new t.x,this.currentPaymentId="",this.currentPayment=null,this.totalCost=0,this.baseRoute="/",this.isUserTourMember=!1,this.tournaments=null,this.isLoaded=!1,this.tabLoadTimes=[],this.lineItemColumns=["description","type","cost"],this.paymentsRoute="payments",this.voidingPayment=!1,this.unvoidingPayment=!1,this.refundingPayment=!1,this.KIND_LABELS={director:"Director",angler:"Angler",weighbook:"WeighBook",unassigned:"Not set"},this.route.params.pipe((0,F.R)(this.ngUnsubscribe)).subscribe(p=>this.currentPaymentId=p.id)}ngOnInit(){this.currentUser=this._userService.getCurrentlyLoggedInUser(),this.currentUser&&(this.baseRoute=this._userService.getRouteForUser(this.currentUser.userType)),this.init()}ngOnDestroy(){this.ngUnsubscribe.next(null),this.ngUnsubscribe.complete()}init(){var o=this;return(0,v.Z)(function*(){yield o.initPayment(),"System Admin"===o.currentUser.userType&&(o.paymentsRoute="payments-admin")})()}showEditSeason(){this._paymentService.setCurrent(this.currentPayment),this._router.navigate([this.baseRoute+"/payments/edit/"+this.currentPayment._id])}initPayment(){var o=this;return new Promise(function(){var r=(0,v.Z)(function*(i){o.currentPayment=o._paymentService.getCurrent(),(!o.currentPayment||o.currentPayment._id!==o.currentPaymentId)&&(o.currentPayment=yield o._paymentService.getPaymentWithStorageCheck(o.currentPaymentId,!1)),o.currentPayment?.coupon&&o.currentPayment.coupon.amount&&o.currentPayment.items.push({type:"Coupon Code",key:"coupon",cost:-o.currentPayment.coupon.amount,amount:-o.currentPayment.coupon.amount,description:`Coupon code "${o.currentPayment.coupon.code}" applied`}),o.totalCost=o.currentPayment.items.map(n=>n.cost).reduce((n,a)=>n+a,0),i(null)});return function(i){return r.apply(this,arguments)}}())}getTotalCost(){return this.currentPayment.items.map(o=>o.cost).reduce((o,r)=>o+r,0)}getRelatedRoute(){return{Tournament:"tournaments",Tour:"tours",Season:"seasons"}[this.currentPayment?.paymentForType]||null}canVoidPayment(){return!(!this.currentPayment||this.currentPayment.voidedAt)&&("System Admin"===this.currentUser?.userType||(this.currentPayment.recipientOfPayment?._id||this.currentPayment.recipientOfPayment)===this.currentUser?._id)}voidPayment(){var o=this;return(0,v.Z)(function*(){if(yield o._sharedUtilsService.confirmationDialogPromise({title:"Void Payment",textToDisplay:"Are you sure you want to void this payment? This will exclude it from revenue reports.",buttonsInfo:{confirmText:"Void Payment",denyText:"Cancel",confirmBtnColor:"warn"}})){o.voidingPayment=!0;try{const i=yield(0,u.lastValueFrom)(o._paymentService.voidPayment(o.currentPayment._id));i&&(o.currentPayment.voidedAt=i.voidedAt,o.currentPayment.voidedBy=i.voidedBy,o._sharedUtilsService.showNotification("Payment voided successfully"))}catch{o._sharedUtilsService.showNotification("Failed to void payment")}o.voidingPayment=!1}})()}canUnvoidPayment(){return!(!this.currentPayment||!this.currentPayment.voidedAt)&&("System Admin"===this.currentUser?.userType||(this.currentPayment.recipientOfPayment?._id||this.currentPayment.recipientOfPayment)===this.currentUser?._id)}unvoidPayment(){var o=this;return(0,v.Z)(function*(){if(yield o._sharedUtilsService.confirmationDialogPromise({title:"Unvoid Payment",textToDisplay:"Restore this payment? It will be counted in revenue reports again.",buttonsInfo:{confirmText:"Unvoid Payment",denyText:"Cancel",confirmBtnColor:"primary"}})){o.unvoidingPayment=!0;try{const i=yield(0,u.lastValueFrom)(o._paymentService.unvoidPayment(o.currentPayment._id));i&&(o.currentPayment.voidedAt=i.voidedAt,o.currentPayment.voidedBy=i.voidedBy,o._sharedUtilsService.showNotification("Payment restored successfully"))}catch{o._sharedUtilsService.showNotification("Failed to unvoid payment")}o.unvoidingPayment=!1}})()}getRefundableAmount(){return this.currentPayment?.items?this.currentPayment.items.filter(o=>"Processing Fees"!==o.type).reduce((o,r)=>o+(parseFloat(r.cost)||0),0):0}canRefundPayment(){return!(!this.currentPayment||this.currentPayment.refundedAt||this.currentPayment.paymentMethod&&"stripe"!==this.currentPayment.paymentMethod||!this.currentPayment.paymentIntentId||"debit"===this.currentPayment.debitOrCredit||this.getRefundableAmount()<=0)&&("System Admin"===this.currentUser?.userType||(this.currentPayment.recipientOfPayment?._id||this.currentPayment.recipientOfPayment)===this.currentUser?._id)}refundPayment(){var o=this;return(0,v.Z)(function*(){const r=o.getRefundableAmount(),i=o.currentPayment.user,n=i?`${i.first_name} ${i.last_name}
1`.trim():"the angler",a=r.toLocaleString("en-US",{style:"currency",currency:"USD"});if(yield o._sharedUtilsService.confirmationDialogPromise({title:"Refund Entry Fee",textToDisplay:`Refund ${a} to ${n}? This returns the entry fee to their card. Processing fees and angler fees are not refunded. This cannot be undone.`,buttonsInfo:{confirmText:`Refund ${a}`,denyText:"Cancel",confirmBtnColor:"warn"}})){o.refundingPayment=!0;try{const p=yield(0,u.lastValueFrom)(o._paymentService.refundPayment(o.currentPayment._id));p&&(o.currentPayment.refundedAt=p.refundedAt,o.currentPayment.refundedBy=p.refundedBy,o.currentPayment.stripeRefundId=p.stripeRefundId,o.currentPayment.refundedAmount=p.refundedAmount,o._sharedUtilsService.showNotification("Entry fee refunded successfully"))}catch(p){const d=(0,N.l)(p,"Failed to refund payment");o._sharedUtilsService.showNotification(d)}o.refundingPayment=!1}})()}goBack(){const o=this.route.snapshot.queryParams.returnUrl;o?this._router.navigateByUrl(o):this._location.back()}get isCredit(){return"credit"===this.currentPayment?.debitOrCredit}get paymentEyebrow(){const o=this.isCredit?"Payment":"Payout",r=this.currentPayment?.items?.[0]?.type;return r?`${o} \xb7 ${r}`:o}get statusLabel(){return this.currentPayment?.voidedAt?"Voided":"completed"===this.currentPayment?.status?"Completed":"processing"===this.currentPayment?.status?"Processing":"Incomplete"}get statusKey(){return this.statusLabel.toLowerCase()}get signedAmount(){const o=this.currentPayment?.amount||0;return o<0?-o:o}personName(o){return o?`${o.first_name||""} ${o.last_name||""}`.trim():""}get payerName(){return this.personName(this.currentPayment?.user)||"Not recorded"}get payeeName(){const o=this.currentPayment;return o?.accountToPay?.name||this.personName(o?.recipientOfPayment)||"WeighBook"}kindOf(o){return"Director"===o?.userType||"System Admin"===o?.userType?"director":o?.userType?"angler":"unassigned"}get payerKind(){return this.currentPayment?.user?this.kindOf(this.currentPayment.user):"unassigned"}get payeeKind(){const o=this.currentPayment;return o?.accountToPay?.name?"weighbook":o?.recipientOfPayment?this.kindOf(o.recipientOfPayment):"weighbook"}kindLabel(o){return this.KIND_LABELS[o]||""}partyInitials(o,r){return"unassigned"===r?"?":(o||"").split(" ").filter(Boolean).slice(0,2).map(i=>i[0]).join("").toUpperCase()||"?"}get payerEmail(){return this.currentPayment?.user?.email||""}get payeeEmail(){return this.currentPayment?.recipientOfPayment?.email||""}get payerLink(){const o=this.currentPayment?.user?._id;return o?`${this.baseRoute}/users/${o}`:null}get payeeLink(){const o=this.currentPayment?.recipientOfPayment?._id;return o?`${this.baseRoute}/users/${o}`:null}get directionLabel(){return this.isCredit?"Money in":"Money out"}get methodLabel(){const o=this.currentPayment?.paymentMethod;return o?"cashapp"===o?"Cash App":"paypal-me"===o||"paypal"===o?"PayPal":o.charAt(0).toUpperCase()+o.slice(1):"WeighBook balance"}print(){window.print()}copyReceipt(){const o=this.currentPayment?._id;!o||!navigator?.clipboard||navigator.clipboard.writeText(String(o)).then(()=>this._sharedUtilsService.showNotification("Receipt ID copied"),()=>this._sharedUtilsService.showNotification("Could not copy receipt ID"))}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(z.F0),e.Y36(O.Ye),e.Y36(z.gz),e.Y36(h.KD),e.Y36(h.te),e.Y36(h.n3))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["payment-profile"]],decls:1,vars:1,consts:[["class","pp-page",4,"ngIf"],[1,"pp-page"],[1,"pp-actions"],[1,"pp-back",3,"routerLink"],[1,"material-symbols-outlined"],[1,"pp-actions-spacer"],["type","button",1,"pp-action-btn",3,"click"],["type","button","class","pp-action-btn",3,"is-busy","disabled","click",4,"ngIf"],["type","button","class","pp-action-btn is-danger",3,"is-busy","disabled","click",4,"ngIf"],[1,"pp-band"],[1,"pp-band-left"],[1,"pp-dir-tile"],[1,"pp-band-text"],[1,"pp-eyebrow"],[1,"pp-title"],[1,"pp-band-right"],[1,"pp-amount"],[1,"pp-status"],[1,"pp-status-dot"],[1,"pp-card"],[1,"pp-main"],["class","pp-notice is-voided",4,"ngIf"],["class","pp-notice is-refunded",4,"ngIf"],[1,"pp-section"],[1,"pp-section-label"],[1,"pp-parties"],[1,"pp-party"],[1,"pp-party-av"],[1,"pp-party-text"],[1,"pp-party-label"],["class","pp-party-name",3,"routerLink",4,"ngIf","ngIfElse"],["payerPlain",""],["class","pp-party-email",4,"ngIf"],[1,"pp-party-flow"],["payeePlain",""],[1,"pp-items"],[1,"pp-items-head"],[1,"pp-col-desc"],[1,"pp-col-type"],[1,"pp-col-amount"],["class","pp-items-row",3,"is-coupon",4,"ngFor","ngForOf"],[1,"pp-items-total"],[1,"pp-total-label"],[1,"pp-total-amount"],[1,"pp-rail"],[1,"pp-detail-rows"],["class","pp-detail",4,"ngIf"],[1,"pp-detail"],[1,"pp-detail-k"],[1,"pp-detail-v"],[1,"pp-receipt"],[1,"pp-receipt-id"],["type","button","title","Copy receipt ID",1,"pp-receipt-copy",3,"click"],["type","button",1,"pp-action-btn",3,"disabled","click"],["type","button",1,"pp-action-btn","is-danger",3,"disabled","click"],[1,"pp-notice","is-voided"],[1,"pp-notice","is-refunded"],[1,"pp-party-name",3,"routerLink"],[1,"pp-party-name","is-unset"],[1,"pp-party-email"],[1,"pp-party-name"],[1,"pp-items-row"],[1,"pp-type-chip"],["class","pp-detail-v is-link",3,"routerLink",4,"ngIf","ngIfElse"],["relatedPlain",""],[1,"pp-detail-v","is-link",3,"routerLink"]],template:function(r,i){1&r&&e.YNc(0,Yt,109,45,"div",0),2&r&&e.Q6J("ngIf",i.currentPayment)},dependencies:[O.sg,O.O5,z.rH,O.H9,O.uU],styles:['[_nghost-%COMP%]{display:block;width:100%}.pp-page[_ngcontent-%COMP%]{padding:18px 24px 32px}.pp-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;max-width:1240px;margin:0 auto 14px}.pp-actions-spacer[_ngcontent-%COMP%]{flex:1}.pp-back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#5f6b7a;text-decoration:none}.pp-back[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.pp-back[_ngcontent-%COMP%]:hover{color:#1f2937}.pp-action-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-radius:8px;background:var(--wb-surface);border:1px solid #e2e8f0;font-family:inherit;font-size:13px;font-weight:600;color:#4a5568;cursor:pointer;transition:border-color .12s,background .12s}.pp-action-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.pp-action-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#b0b8c8}.pp-action-btn[_ngcontent-%COMP%]:disabled, .pp-action-btn.is-busy[_ngcontent-%COMP%]{opacity:.6;cursor:default}.pp-action-btn.is-danger[_ngcontent-%COMP%]{border-color:#f3c7c7;color:#c2382f}.pp-action-btn.is-danger[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#c2382f}.pp-band[_ngcontent-%COMP%]{position:relative;overflow:hidden;box-sizing:border-box;max-width:1240px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:24px 28px;border:1px solid rgba(255,255,255,.06);border-radius:16px 16px 0 0;background:var(--wb-flagship-band);box-shadow:inset 0 1px #ffffff0d}.pp-band[_ngcontent-%COMP%]:after{content:"payments";font-family:Material Symbols Outlined;font-size:170px;font-weight:300;line-height:1;color:#ffffff0a;position:absolute;right:56px;top:50%;transform:translateY(-46%) rotate(-8deg);pointer-events:none;-webkit-user-select:none;user-select:none}.pp-band-left[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;position:relative;z-index:1;min-width:0}.pp-dir-tile[_ngcontent-%COMP%]{width:46px;height:46px;border-radius:13px;flex:none;display:flex;align-items:center;justify-content:center}.pp-dir-tile[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:23px}.pp-dir-tile.is-credit[_ngcontent-%COMP%]{background:rgba(22,163,74,.18);color:#86efac}
1.pp-dir-tile.is-debit[_ngcontent-%COMP%]{background:rgba(220,38,38,.18);color:#ff8a80}.pp-eyebrow[_ngcontent-%COMP%]{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.14em;color:#ffffff73;margin-bottom:5px}.pp-title[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;font-weight:700;color:#fff;letter-spacing:-.4px}.pp-band-right[_ngcontent-%COMP%]{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none}.pp-amount[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;letter-spacing:-1px;font-variant-numeric:tabular-nums;color:#fff;line-height:1}.pp-status[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;padding:4px 11px;border-radius:999px;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;background:rgba(255,255,255,.12);color:#ffffffd1}.pp-status[data-status=completed][_ngcontent-%COMP%]{background:rgba(74,222,128,.14);color:#4ade80}.pp-status[data-status=incomplete][_ngcontent-%COMP%]{background:rgba(248,113,113,.16);color:#f87171}.pp-status[data-status=processing][_ngcontent-%COMP%]{background:rgba(251,191,36,.16);color:#fbbf24}.pp-status[data-status=voided][_ngcontent-%COMP%]{background:rgba(196,181,253,.16);color:#c4b5fd}.pp-status-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}.pp-card[_ngcontent-%COMP%]{max-width:1240px;margin:0 auto;display:flex;background:var(--wb-surface);border:1px solid #eceef3;border-top:none;border-radius:0 0 16px 16px;overflow:hidden;box-shadow:0 12px 28px #060a121f,0 1px 3px #1018280f}.pp-main[_ngcontent-%COMP%]{flex:1;min-width:0;padding:26px 28px 30px;display:flex;flex-direction:column;gap:26px}.pp-rail[_ngcontent-%COMP%]{flex:0 0 320px;border-left:1px solid #eceef3;background:#fbfcfd;padding:26px 24px;display:flex;flex-direction:column;gap:22px}.pp-section-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;letter-spacing:1.4px;text-transform:uppercase;color:#9aa3b2;margin-bottom:12px}.pp-notice[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:10px;font-size:.86rem;font-weight:500}.pp-notice[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px;flex:none}.pp-notice.is-voided[_ngcontent-%COMP%]{background:#f5f3ff;color:#6d28d9}.pp-notice.is-refunded[_ngcontent-%COMP%]{background:#fffbeb;color:#b45309}.pp-parties[_ngcontent-%COMP%]{display:flex;align-items:stretch;border:1px solid #eceef3;border-radius:12px;overflow:hidden}.pp-party[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;align-items:center;gap:12px;padding:16px 18px}.pp-party-av[_ngcontent-%COMP%]{width:38px;height:38px;border-radius:50%;flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:700}.pp-party-av[data-kind=director][_ngcontent-%COMP%]{background:var(--wb-accent);color:var(--wb-surface)}.pp-party-av[data-kind=angler][_ngcontent-%COMP%]{background:var(--wb-n-100);color:var(--wb-n-700)}.pp-party-av[data-kind=weighbook][_ngcontent-%COMP%]{background:var(--wb-ink);color:var(--wb-surface)}.pp-party-av[data-kind=unassigned][_ngcontent-%COMP%]{background:#f1f3f5;color:#b0b8c8}.pp-party-text[_ngcontent-%COMP%]{min-width:0}.pp-party-label[_ngcontent-%COMP%]{font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#a8b0be;margin-bottom:3px}.pp-party-name[_ngcontent-%COMP%]{display:block;font-size:.95rem;font-weight:700;color:#1f2937;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pp-party-name[_ngcontent-%COMP%]:hover{color:var(--wb-accent);text-decoration:underline}.pp-party-name.is-unset[_ngcontent-%COMP%]{color:#b0b8c8;font-style:italic}.pp-party-email[_ngcontent-%COMP%]{font-size:.78rem;color:#8c94a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pp-party-flow[_ngcontent-%COMP%]{flex:none;width:44px;display:flex;align-items:center;justify-content:center;background:#fbfcfd;border-left:1px solid #eceef3;border-right:1px solid #eceef3}.pp-party-flow[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px;color:#b0b8c8}.pp-items[_ngcontent-%COMP%]{border:1px solid #eceef3;border-radius:12px;overflow:hidden}.pp-items-head[_ngcontent-%COMP%], .pp-items-row[_ngcontent-%COMP%], .pp-items-total[_ngcontent-%COMP%]{display:flex;align-items:center;padding:0 18px}.pp-items-head[_ngcontent-%COMP%]{min-height:38px;background:#fbfcfd;border-bottom:1px solid #eceef3;font-size:10px;font-weight:600;letter-spacing:1.4px;text-transform:uppercase;color:#9aa3b2}.pp-items-row[_ngcontent-%COMP%]{min-height:54px;border-bottom:1px solid #f1f3f5}
1.pp-items-total[_ngcontent-%COMP%]{min-height:52px;background:#fbfcfd}.pp-col-desc[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:.9rem;font-weight:600;color:#1f2937}.pp-col-type[_ngcontent-%COMP%]{flex:0 0 170px}.pp-col-amount[_ngcontent-%COMP%]{flex:0 0 120px;text-align:right;font-size:.9rem;font-weight:600;color:#0f172a;font-variant-numeric:tabular-nums}.pp-items-head[_ngcontent-%COMP%] .pp-col-desc[_ngcontent-%COMP%], .pp-items-head[_ngcontent-%COMP%] .pp-col-amount[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#9aa3b2}.pp-type-chip[_ngcontent-%COMP%]{display:inline-flex;padding:4px 10px;border-radius:6px;background:#eff6ff;color:#2563eb;font-size:.74rem;font-weight:600}.pp-type-chip.is-coupon[_ngcontent-%COMP%]{background:#ecfdf5;color:#059669}.pp-items-row.is-coupon[_ngcontent-%COMP%] .pp-col-amount[_ngcontent-%COMP%]{color:#059669}.pp-total-label[_ngcontent-%COMP%]{flex:0 0 170px;text-align:right;font-size:.78rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#5f6b7a;padding-right:18px}.pp-total-amount[_ngcontent-%COMP%]{flex:0 0 120px;text-align:right;font-size:1.15rem;font-weight:700;color:#0f172a;font-variant-numeric:tabular-nums;letter-spacing:-.4px}.pp-detail[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid #eceef3}.pp-detail-k[_ngcontent-%COMP%]{font-size:.8rem;color:#8c94a4;flex:none;text-transform:capitalize}.pp-detail-v[_ngcontent-%COMP%]{font-size:.84rem;font-weight:600;color:#1f2937;text-align:right;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.pp-detail-v.is-link[_ngcontent-%COMP%]{color:#0070d1}.pp-detail-v.is-link[_ngcontent-%COMP%]:hover{color:var(--wb-brand-blue);text-decoration:underline}.pp-receipt[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--wb-surface);border:1px solid #eceef3;border-radius:8px}.pp-receipt-id[_ngcontent-%COMP%]{flex:1;min-width:0;font-family:ui-monospace,Menlo,monospace;font-size:11px;color:#5f6b7a;overflow:hidden;text-overflow:ellipsis}.pp-receipt-copy[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0;cursor:pointer;color:#9aa3b2}.pp-receipt-copy[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.pp-receipt-copy[_ngcontent-%COMP%]:hover{color:#1f2937}@media (max-width: 960px){.pp-card[_ngcontent-%COMP%]{flex-direction:column}.pp-rail[_ngcontent-%COMP%]{flex:none;border-left:none;border-top:1px solid #eceef3}}@media (max-width: 680px){.pp-page[_ngcontent-%COMP%]{padding:12px 12px 24px}.pp-band[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;gap:16px}.pp-band-right[_ngcontent-%COMP%]{align-items:flex-start}.pp-parties[_ngcontent-%COMP%]{flex-direction:column}.pp-party-flow[_ngcontent-%COMP%]{width:auto;height:34px;border-left:none;border-right:none;border-top:1px solid #eceef3;border-bottom:1px solid #eceef3}.pp-party-flow[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{transform:rotate(90deg)}.pp-col-type[_ngcontent-%COMP%]{display:none}.pp-total-label[_ngcontent-%COMP%]{flex:1}}@media print{.pp-actions[_ngcontent-%COMP%]{display:none}.pp-card[_ngcontent-%COMP%]{box-shadow:none}}']})}}return l})();var Rt=_(56915),gt=_(85349),ht=_(61247),Qt=_(94664),Bt=_(92726),rt=_(91236),Gt=_(27237),Lt=_(2032),bt=_(64170);const jt=["declineAlert"];function $t(l,m){1&l&&(e.TgZ(0,"div",16)(1,"span",17),e._uU(2,"timer_off"),e.qZA(),e.TgZ(3,"div",18)(4,"span",19),e._uU(5,"This checkout timed out"),e.qZA(),e.TgZ(6,"span",20),e._uU(7," Your answers and team are saved. Start the payment again to pick up where you left off. The fee may have changed if the early-bird window closed. "),e.qZA()()())}function Vt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.restartPayment())}),e.TgZ(1,"span",17),e._uU(2,"refresh"),e.qZA(),e._uU(3," Restart payment "),e.qZA()}}function Kt(l,m){if(1&l&&(e.TgZ(0,"div",22,23)(2,"span",17),e._uU(3,"error"),e.qZA(),e.TgZ(4,"div",18)(5,"span",19),e._uU(6),e.qZA(),e.TgZ(7,"span",20),e._uU(8),e.qZA()()()),2&l){const o=e.oxw();e.xp6(6),e.Oqu(o.lastError.title),e.xp6(2),e.Oqu(o.lastError.body)}}function Ht(l,m){if(1&l&&(e.TgZ(0,"div",24)(1,"span",25),e._uU(2,"error"),e.qZA(),e.TgZ(3,"span"),e._uU(4),e.qZA()()),2&l){const o=e.oxw();e.xp6(4),e.Oqu(o.formError)}}function Wt(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",26)(1,"mat-form-field",27)(2,"mat-label"),e._uU(3,"Email for Confirmation"),e.qZA(),e.TgZ(4,"input",28),e.NdJ("ngModelChange",function(i){e.CHM(o);const n=e.oxw();return e.KtG(n.currentUser.email=i)}),e.qZA()()()}if(2&l){const o=e.oxw();e.xp6(4),e.Q6J("ngModel",o.currentUser.email)}}function Xt(l,m){1&l&&e._UZ(0,"span",29)}function te(l,m){1&l&&(e.TgZ(0,"span",30),e._uU(1,"lock"),e.qZA())}function ee(l,m){1&l&&(e.TgZ(0,"p",31),e._uU(1,"Don't close this page or hit back."),e.qZA())}function ne(l,m){1&l&&(e.TgZ(0,"p",32)(1,"span",17),e._uU(2,"verified_user"),e.qZA(),e._uU(3," Card details go straight to Stripe. "),e.qZA())}function oe(l,m){1&l&&(e.TgZ(0,"p",32)(1,"span",17),e._uU(2,"event_repeat"),e.qZA(),e._uU(3," Charged as one payment per event. "),e.qZA())}function re(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",33)(1,"span",17),e._uU(2,"shield_person"),e.qZA(),e.TgZ(3,"span",34),e._uU(4,"Admin only. Mark this entry paid without charging."),e.qZA(),e.TgZ(5,"button",35),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.skip())}),e._uU(6,"Skip"),e.qZA()()}}let xt=(()=>{class l{constructor(o,r,i,n,a,s,p,d,g){this._router=o,this._ngZone=r,this._authService=i,this.formValidationService=n,this._stripeService=a,this._paymentService=s,this._teamService=p,this._sharedUtilsService=d,this._userService=g,this.ngUnsubscribe=new t.x,this.paymentResults=new e.vpe,this.totalsUpdated=new e.vpe,this.elements=null,this.customCard=null,this.customPayment=null,this.expressCheckoutElement=null,this.showEmailAddress=!1,this.directorPayingProcessingFees=!1,this.currentUser=null,this.batchExtrasAmount=0,this.paymentSubmitted=!1,this.paymentBlocked=!1,this.submitting=!1,this.lastError=null,this.expired=!1,this.elementTouched=!1,this.elementComplete=!1,this.paymentElement=null,this.currentCardZipCode=null,this.cardOptions={iconStyle:"solid",style:{base
1:{iconColor:"#c4f0ff",color:"#fff",fontWeight:500,fontFamily:rt.j,fontSize:"16px",fontSmoothing:"antialiased",":-webkit-autofill":{color:"#fce883"},"::placeholder":{color:"#87bbfd"}},invalid:{iconColor:"#ffc7ee",color:"#ffc7ee"}}},this.elementsOptions=null,this.options={layout:{type:"accordion"}},this.paymentForm=null,this.formError=null,this.paymentIntentData=null,this.stripeSecret=null,this.stripeKey=null}ngOnInit(){this.currentPayment.directorPaysFees&&(this.directorPayingProcessingFees=!0),this.currentUser=this._authService.getCurrentlyLoggedInUser(),this.currentCardZipCode=this.currentUser.zip&&this.currentUser.zip.length?this.currentUser.zip:"",this.isTheMan=this.currentUser&&["sensd@","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"].includes(this.currentUser.email),this.init()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}init(){var o=this;return(0,v.Z)(function*(){o.stripeKey=o._stripeService.getStripeApiKey(),o.elementsOptions={fonts:(0,rt.p)(),locale:"en",appearance:o.buildAppearance(),clientSecret:o.stripeKey},yield o.initForm(),console.log("Form initialized: "),setTimeout(()=>o.initStripe(),0)})()}buildAppearance(){const o=(s,p)=>{try{if(typeof window>"u"||!document?.documentElement)return p;const d=getComputedStyle(document.documentElement).getPropertyValue(s);return d&&d.trim().length?d.trim():p}catch{return p}},r=o("--wb-border","#E5E3DB"),i=o("--wb-accent","#185FA5"),n=o("--wb-danger","#C2382F"),a=o("--wb-surface","#FFFFFF");return{theme:"stripe",variables:{fontFamily:rt.j,fontSizeBase:"14px",colorText:o("--wb-text","#1F2024"),colorTextPlaceholder:o("--wb-text-3","#888780"),colorBackground:a,colorDanger:n,borderRadius:"8px",spacingUnit:"4px"},rules:{".Input":{border:`1px solid ${r}`,boxShadow:"none",padding:"11px 12px"},".Input:focus":{border:`1px solid ${i}`,boxShadow:"0 0 0 3px rgba(24, 95, 165, 0.15)"},".Input--invalid":{border:`1px solid ${n}`,boxShadow:"0 0 0 3px rgba(194, 56, 47, 0.14)"},".Label":{fontSize:"12px",fontWeight:"600",color:o("--wb-text-2","#5F5E5A")}}}}initForm(){var o=this;return new Promise(function(){var r=(0,v.Z)(function*(i){const n=o._sharedUtilsService.getFromLocal("payment-intent");o.currentPayment.team||(o.currentPayment.team=o._teamService.getCurrentBeingViewed());const a=o._paymentService.getTotalPreFeesFromPayment(o.currentPayment);o.currentPayment.directorPaysFees&&(a.totalWithfees=a.tournamentCostTotals,a.feeTotals=0),o.currentPayment.coupon?.amount?(o.currentPayment.amount=a.totalWithfees-o.currentPayment.coupon.amount,o.currentPayment.totalPreFees=a.tournamentCostTotals-o.currentPayment.coupon.amount):(o.currentPayment.amount=a.totalWithfees,o.currentPayment.totalPreFees=a.tournamentCostTotals),o.paymentIntentData=n&&n.totalPreFees&&void 0!==n.totalPreFees?n:{name:o.currentUser.first_name+" "+o.currentUser.last_name,amount:o.currentPayment.amount,totalPreFees:o.currentPayment.totalPreFees,email:o.currentUser.email},o.paymentIntentData.amount=a.totalWithfees,o.paymentForm=o._stripeService.paymentFormGroup(o.paymentIntentData),o.paymentForm.valueChanges.pipe((0,F.R)(o.ngUnsubscribe)).subscribe(()=>o.formError=o.formValidationService.validateForm(o.paymentForm,o.formError)),o._sharedUtilsService.saveInLocal("payment-intent",o.paymentIntentData),setTimeout(()=>o.totalsUpdated.emit(o.currentPayment.amount),0),i(null)});return function(i){return r.apply(this,arguments)}}())}initStripe(){var o=this;return(0,v.Z)(function*(){if(console.log("Payment Intent Data: ",o.paymentIntentData),"Entry Credits"!==o.currentPayment.paymentForType&&!o.currentPayment.stripeIdToSendTo)return console.error("Blocked platform-account charge for",o.currentPayment.paymentForType,"- no connected payout account (stripeIdToSendTo)."),o.formError="This organizer hasn't finished connecting their payout account, so online payments can't be collected here yet. Please contact the tournament director.",void(o.paymentBlocked=!0);o.currentPayment?.team?.chosenTeam&&(o.currentPayment.team=o.currentPayment.team.chosenTeam),(!o.paymentIntentData.totalPreFees||o.paymentIntentData.totalPreFees)&&(o.paymentIntentData.totalPreFees=o.currentPayment.totalPreFees);let i=o.currentPayment?.team?.users?.length?o.currentPayment.team.users.length:1;if(o.currentPayment&&o.currentPayment.team&&!o.currentPayment.team._id){let U=o.currentPayment.team;U.chosenTeam&&(U=U.chosenTeam);const D=yield(0,u.lastValueFrom)(o._teamService.get(U));D&&D.users&&(i=D.users.length)}o.currentPayment?.metaData?.teamSeriesEnabled&&(i=1);const n=o.currentPayment?.metaData?.bigFishModeOptions?.daysChosen?o.currentPayment.metaData.bigFishModeOptions.daysChosen.length:0;let a=!0;["Tour","Season","Entry Credits"].includes(o.currentPayment.paymentForType)&&(a=!1),o.currentPayment.exemptFromAnglerFees&&(a=!1),o.currentPayment.metaData||(o.currentPayment.metaData={}),o.currentPayment.sidePotBigFishEntries&&(o.currentPayment.metaData.sidePotBigFishEntries=o.currentPayment.sidePotBigFishEntries),o.currentPayment.chosenGroups&&(o.currentPayment.metaData.chosenGroups=o.currentPayment.chosenGroups),o.currentPayment.acknowledgedGroupRules&&(o.currentPayment.metaData.acknowledgedGroupRules=o.currentPayment.acknowledgedGroupRules),o.currentPayment.seasonTeam&&(o.currentPayment.metaData.seasonTeam
1=o.currentPayment.seasonTeam);const s=o.currentPayment.metaData&&o.currentPayment.metaData.prizePoolReserveCents||0,p=o._sharedUtilsService.deepClone(o.currentPayment);o.currentPayment.status="pending",o.currentPayment=o.currentPayment._id?yield(0,u.lastValueFrom)(o._paymentService.update(o.currentPayment)):yield(0,u.lastValueFrom)(o._paymentService.create(o.currentPayment)),o.currentPayment.seasonTeam=p.seasonTeam,o.currentPayment.team=p.team,o.currentPayment.sidePotBigFishEntries=p.sidePotBigFishEntries,o.currentPayment.chosenGroups=p.chosenGroups;const d=o.currentPayment.team?._id||o.currentPayment.team,g=o.currentPayment.user?._id||o.currentPayment.user,f=o.currentPayment.recipientOfPayment?._id||o.currentPayment.recipientOfPayment,y={stripeIdToPay:o.currentPayment.stripeIdToSendTo,amount:o.paymentIntentData.amount,totalPreFees:o.paymentIntentData.totalPreFees,anglerFeeMultiplier:n,anglerEntryCount:i,hasApplicationFee:a,receipt_email:o.currentPayment.recipientOfPayment?.email?o.currentPayment.recipientOfPayment.email:"[email protected]",description:o.currentPayment.description,sidepotBigFishDetails:o.currentPayment.sidePotBigFishEntries,metadata:{weighbookPaymentId:o.currentPayment._id||"",tournamentId:o.currentPayment.sourceModuleRecord||"",teamId:d||"",userId:g||"",paymentForType:o.currentPayment.paymentForType||"",recipientOfPayment:f||"",stripeAccountId:o.currentPayment.stripeIdToSendTo||"",prizePoolReserveCents:String(s)}};o.currentPayment.coupon?.amount&&(y.totalPreFees=o.paymentIntentData.amount-o.currentPayment.coupon.amount,y.amount=o.paymentIntentData.amount-o.currentPayment.coupon.amount);const q=o._paymentService.getBatch();q?.mainTournamentId&&String(q.mainTournamentId)===String(o.currentPayment.sourceModuleRecord?._id||o.currentPayment.sourceModuleRecord||"")&&q?.payments?.length?(y.setupFutureUsage=!0,y.customerEmail=o.currentUser.email,y.customerName=`${o.currentUser.first_name} ${o.currentUser.last_name}`,o.batchExtrasAmount=q.payments.reduce((U,D)=>U+(Number(D?.amount)||0),0)):o.batchExtrasAmount=0;try{const U=yield(0,u.lastValueFrom)(o._stripeService.createPaymentIntent(y));if(U&&U.client_secret){o.stripeSecret=U.client_secret,o.currentPayment.paymentIntentId=U.id,o.currentPayment.status="Initiated",yield(0,u.lastValueFrom)(o._paymentService.update(o.currentPayment)),(!o.currentPayment.sidePotBigFishEntries||void 0===o.currentPayment.sidePotBigFishEntries)&&(o.currentPayment.sidePotBigFishEntries=U.sidePotBigFishEntries),o.directorPayingProcessingFees&&(o.currentPayment.directorPaysFees=!0),o._paymentService.setCurrent(o.currentPayment),o._sharedUtilsService.saveInLocal("current-payment",o.currentPayment);let D=null;if(!(0,Gt.Jc)())return;o.stripe=o.currentPayment.stripeIdToSendTo?yield(0,ht.J)(o.stripeKey,{stripeAccount:o.currentPayment.stripeIdToSendTo}):yield(0,ht.J)(o.stripeKey);const $=o.buildAppearance();D=o.stripe.elements({clientSecret:o.stripeSecret,appearance:$,fonts:(0,rt.p)()}),o.elements=D;const M=o.elements.create("payment",{business:{name:"WeighBook"},fields:{billingDetails:{name:"never",email:"never"}},wallets:{googlePay:"auto",applePay:"auto"},layout:{type:"accordion",defaultCollapsed:!1,radios:!1,spacedAccordionItems:!1}});M.mount("#payment-element"),o.paymentElement=M,M.on("change",J=>{o._ngZone.run(()=>{o.elementTouched=!0,o.elementComplete=!!J?.complete,o.lastError&&(o.lastError=null)})})}else{let D="Payment Request Failed: ";U&&U.raw&&U.raw.message&&(D=U.raw.message),o.formError=D}}catch(U){console.error("Error confirming payment: ",U)}})()}submitPayment(){var o=this;return(0,v.Z)(function*(){if(o.ctaDisabled||!o.stripe||!o.elements)return;o.submitting=!0,o.paymentSubmitted=!0,o.lastError=null;const r=o._userService.getCurrentUsersBaseRoute(),i=`${document.location.origin}${r}/payments/confirmation`;o._sharedUtilsService.clearKeyFromLocal("payment-intent");try{const n=Bt.dV.isNativePlatform(),a={return_url:i,payment_method_data:{billing_details:{name:o.currentUser.first_name+" "+o.currentUser.last_name,email:o.currentUser.email,address:{line1:o.currentUser.street&&o.currentUser.street.length?o.currentUser.street:"4918 Norman Park Place",line2:"",city:o.currentUser.city&&o.currentUser.city.length?o.currentUser.city:"Lake Wylie",state:o.currentUser.state&&o.currentUser.state.length?o.currentUser.state:"SC",country:"US",postal_code:o.currentCardZipCode}}}};let s=null,p=null;if(n){const d=yield o.stripe.confirmPayment({elements:o.elements,confirmParams:a,redirect:"if_required"});s=d.error,p=d.paymentIntent}else s=(yield o.stripe.confirmPayment({elements:o.elements,confirmParams:a})).error;if(s)o.handleConfirmError(s);else if(n&&p){const d=new URLSearchParams({payment_intent:p.id,payment_intent_client_secret:p.client_secret||"",redirect_status:"succeeded"===p.status?"succeeded":p.status});o._router.navigateByUrl(`${r}/payments/confirmation?${d.toString()}`)}}catch(n){console.error("Error confirming payment: ",n),o.handleConfirmError(n)}finally{o.submitting=!1}})()}handleConfirmError(o){console.error("There was an error processing this payment: ",o);const r=o?.decline_code||o?.code||"";if(["payment_intent_unexpected_state","resource_missing","payment_intent_payment_attempt_expired"].includes(r))return this.expired=!0,void(this.lastError=null);if("email_invalid"===r)return this.formError=`Payment Failed. ${this.currentUser.email} is not a valid email address.`,void(this.showEmailAddress=!0);const i="Try another card, or contact the tournament director.",n={insufficient_funds:`There wasn't enough available on this card. Nothing was charged. ${i}`,card_declined:`Your bank turned down the charge without saying why. Nothing was charged. ${i}`,expired_card:`This card has expired. Nothing was charged. ${i}`,incorrect_cvc:"The security code on the back of the card did not match. Nothing was charged. Check the code and try again.",incorrect_number:"That card number is not val
1id. Nothing was charged. Check the number and try again.",invalid_expiry_year:"That expiration date is not valid. Nothing was charged. Check the date and try again.",invalid_expiry_month:"That expiration date is not valid. Nothing was charged. Check the date and try again.",processing_error:"Something went wrong on the bank's end. Nothing was charged. Wait a moment and try again.",lost_card:`Your bank turned down the charge. Nothing was charged. ${i}`,stolen_card:`Your bank turned down the charge. Nothing was charged. ${i}`,do_not_honor:`Your bank turned down the charge without saying why. Nothing was charged. ${i}`};"validation_error"!==o?.type?(this.lastError="card_error"===o?.type||o?.decline_code||n[r]?{title:"Your bank declined this card",body:n[r]||`The payment did not go through. Nothing was charged. ${i}`,fieldInvalid:["incorrect_cvc","incorrect_number","invalid_expiry_year","invalid_expiry_month"].includes(r)}:{title:"This payment could not be taken",body:"Nothing was charged, and this was not your card. The organizer's payment setup refused the charge. Let the tournament director know so they can check their payout account.",fieldInvalid:!1},setTimeout(()=>this.declineAlert?.nativeElement?.focus(),0)):this.lastError=null}restartPayment(){var o=this;return(0,v.Z)(function*(){o.expired=!1,o.lastError=null,o.formError=null,o.submitting=!1,o.paymentSubmitted=!1,o.elementTouched=!1,o.elementComplete=!1,o.stripeSecret=null,o._sharedUtilsService.clearKeyFromLocal("payment-intent");try{o.paymentElement?.unmount()}catch{}o.paymentElement=null,o.elements=null,yield o.init()})()}get ctaDisabled(){return this.submitting||this.paymentBlocked||this.expired}get ctaNotReady(){return this.elementTouched&&!this.elementComplete}get ctaLabel(){if(this.submitting)return"Charging your card\u2026";
1const o=this.formatAmount((Number(this.currentPayment?.amount)||0)+this.batchExtrasAmount);return this.lastError?`Try again \xb7 ${o}`:`Pay ${o}`}formatAmount(o){const r=Number(o);return isFinite(r)?`$${r.toFixed(2)}`:""}create(o,r,i=null){return i||(i=this.elements),i.create(o,r)}pay(){var o=this;if(this.paymentSubmitted=!0,this.paymentForm.valid){const r=this.paymentForm.get("amount").value;let i=null;this._stripeService.createPaymentIntent({stripeIdToPay:this.currentPayment.stripeIdToSendTo,amount:r,receipt_email:this.currentPayment.recipientOfPayment.email,description:this.currentPayment.description}).pipe((0,Qt.w)(a=>(console.log("Payment Intent: ",a),i=a,this.stripe.confirmCardPayment(a.client_secret,{payment_method:{card:this.cardNumberInput.element,billing_details:{name:this.paymentForm.get("name").value}}})))).subscribe(function(){var a=(0,v.Z)(function*(s){const p=o.currentPayment.chosenGroups?.length?o.currentPayment.chosenGroups.slice(0):[],d=o.currentPayment.sidePotBigFishEntries?.length?o.currentPayment.sidePotBigFishEntries.slice(0):[];o.currentPayment.paymentIntentId=i.id,o.currentPayment=yield(0,u.lastValueFrom)(o._paymentService.create(o.currentPayment)),o.currentPayment.chosenGroups=p,o.currentPayment.sidePotBigFishEntries=d,o._paymentService.setCurrent(o.currentPayment),o._sharedUtilsService.saveInLocal("current-payment",o.currentPayment),s.error?o.formError=s.error.message:"succeeded"===s.paymentIntent.status&&(o._sharedUtilsService.showNotification("Payment Successful"),o.paymentResults.next({result:"authorized",data:null,actions:null,details:null}))});return function(s){return a.apply(this,arguments)}}())}else console.log("You have a dirty form: ",this.paymentForm)}skip(){const i=`${this._userService.getCurrentUsersBaseRoute()||"/angler"}/payments/confirmation`;this._router.navigateByUrl(i),this.paymentResults.next({result:"authorized",data:!0,details:null})}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(z.F0),e.Y36(e.R0b),e.Y36(h.e8),e.Y36(h.mt),e.Y36(h.Qv),e.Y36(h.te),e.Y36(h.UA),e.Y36(h.n3),e.Y36(h.KD))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["stripe-payment-through-us"]],viewQuery:function(r,i){if(1&r&&(e.Gf(gt.hF,5),e.Gf(gt.fy,5),e.Gf(jt,5)),2&r){let n;e.iGM(n=e.CRH())&&(i.cardNumberInput=n.first),e.iGM(n=e.CRH())&&(i.card=n.first),e.iGM(n=e.CRH())&&(i.declineAlert=n.first)}},inputs:{currentPayment:"currentPayment",isTheMan:"isTheMan"},outputs:{paymentResults:"paymentResults",totalsUpdated:"totalsUpdated"},decls:18,vars:23,consts:[[1,"stripe-card-wrapper"],["class","checkout-alert checkout-alert--warning","role","alert",4,"ngIf"],["class","restart-button","type","button",3,"click",4,"ngIf"],["class","checkout-alert checkout-alert--danger","role","alert","tabindex","-1",4,"ngIf"],["id","payment-form",3,"hidden"],["id","payment-element"],["id","error-message"],["class","error-display",4,"ngIf"],["class","email-field",4,"ngIf"],[1,"action-buttons",3,"hidden"],["id","submit-pay","type","button",1,"main-pay",3,"disabled","click"],["class","pay-spinner","aria-hidden","true",4,"ngIf"],["class","material-symbols-outlined pay-icon",4,"ngIf"],["class","submitting-note","aria-live","polite",4,"ngIf"],["class","pay-reassurance",4,"ngIf"],["class","admin-strip",4,"ngIf"],["role","alert",1,"checkout-alert","checkout-alert--warning"],[1,"material-symbols-outlined"],[1,"checkout-alert__body"],[1,"checkout-alert__title"],[1,"checkout-alert__text"],["type","button",1,"restart-button",3,"click"],["role","alert","tabindex","-1",1,"checkout-alert","checkout-alert--danger"],["declineAlert",""],[1,"error-display"],[1,"material-symbols-outlined","error-icon"],[1,"email-field"],["appearance","outline"],["matInput","","placeholder","Email","name","email",3,"ngModel","ngModelChange"],["aria-hidden","true",1,"pay-spinner"],[1,"material-symbols-outlined","pay-icon"],["aria-live","polite",1,"submitting-note"],[1,"pay-reassurance"],[1,"admin-strip"],[1,"admin-strip__text"],["type","button",1,"admin-strip__button",3,"click"]],template:function(r,i){1&r&&(e.TgZ(0,"div",0),e.YNc(1,$t,8,0,"div",1),e.YNc(2,Vt,4,0,"button",2),e.YNc(3,Kt,9,2,"div",3),e.TgZ(4,"form",4),e._UZ(5,"div",5)(6,"div",6),e.qZA(),e.YNc(7,Ht,5,
11,"div",7),e.YNc(8,Wt,5,1,"div",8),e.TgZ(9,"div",9)(10,"button",10),e.NdJ("click",function(){return i.submitPayment()}),e.YNc(11,Xt,1,0,"span",11),e.YNc(12,te,2,0,"span",12),e._uU(13),e.qZA(),e.YNc(14,ee,2,0,"p",13),e.YNc(15,ne,4,0,"p",14),e.YNc(16,oe,4,0,"p",14),e.YNc(17,re,7,0,"div",15),e.qZA()()),2&r&&(e.xp6(1),e.Q6J("ngIf",i.expired),e.xp6(1),e.Q6J("ngIf",i.expired),e.xp6(1),e.Q6J("ngIf",i.lastError),e.xp6(1),e.ekj("is-submitting",i.submitting)("has-invalid-field",null==i.lastError?null:i.lastError.fieldInvalid),e.Q6J("hidden",i.paymentBlocked||i.expired),e.xp6(3),e.Q6J("ngIf",i.formError),e.xp6(1),e.Q6J("ngIf",i.showEmailAddress),e.xp6(1),e.Q6J("hidden",i.paymentBlocked||i.expired),e.xp6(1),e.ekj("is-submitting",i.submitting)("is-not-ready",i.ctaNotReady),e.Q6J("disabled",i.ctaDisabled),e.xp6(1),e.Q6J("ngIf",i.submitting),e.xp6(1),e.Q6J("ngIf",!i.submitting),e.xp6(1),e.hij(" ",i.ctaLabel," "),e.xp6(1),e.Q6J("ngIf",i.submitting),e.xp6(1),e.Q6J("ngIf",!i.submitting),e.xp6(1),e.Q6J("ngIf",!i.submitting&&i.batchExtrasAmount),e.xp6(1),e.Q6J("ngIf",i.isTheMan))},dependencies:[O.O5,c._Y,c.Fj,c.JJ,c.JL,c.On,c.F,Lt.Nt,bt.KE,bt.hX],styles:[".stripe-card-wrapper[_ngcontent-%COMP%]{width:100%;font-family:var(--wb-font)}#payment-element[_ngcontent-%COMP%]{min-height:80px}.error-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px;margin-top:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:8px;color:#dc2626;font-size:.85rem;font-weight:500}.error-display[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{font-size:18px;flex-shrink:0}.email-field[_ngcontent-%COMP%]{margin-top:16px}.email-field[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.checkout-alert[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:13px 15px;margin-bottom:14px;border-radius:8px}.checkout-alert[_ngcontent-%COMP%]:focus{outline:none}.checkout-alert[_ngcontent-%COMP%]:focus-visible{box-shadow:var(--wb-focus)}.checkout-alert[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px;flex-shrink:0}.checkout-alert__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px;min-width:0}.checkout-alert__title[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.checkout-alert__text[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:1.5}.checkout-alert--danger[_ngcontent-%COMP%]{background:var(--wb-danger-soft);border:1px solid var(--wb-danger);color:var(--wb-danger)}.checkout-alert--danger[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{color:var(--wb-danger)}.checkout-alert--warning[_ngcontent-%COMP%]{background:var(--wb-warning-soft);border:1px solid var(--wb-warning);color:var(--wb-warning)}.checkout-alert--warning[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{color:var(--wb-warning)}.restart-button[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;width:100%;height:46px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-surface);font-family:inherit;font-size:14px;font-weight:600;color:var(--wb-text);cursor:pointer;transition:background .14s ease,border-color .14s ease}.restart-button[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px;color:var(--wb-text-2)}.restart-button[_ngcontent-%COMP%]:hover{background:var(--wb-surface-hover);border-color:var(--wb-border-strong)}#payment-form.is-submitting[_ngcontent-%COMP%]{opacity:.55;pointer-events:none}#payment-form.has-invalid-field[_ngcontent-%COMP%] #payment-element[_ngcontent-%COMP%]{border-radius:8px;box-shadow:0 0 0 3px #c2382f24}.submitting-note[_ngcontent-%COMP%]{margin:10px 0 0;text-align:center;font-size:11.5px;font-weight:400;color:var(--wb-text-3)}.action-buttons[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:20px}.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;width:100%;height:50px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;background:var(--wb-green);color:#fff;font-family:inherit;font-size:15.5px;font-weight:600;cursor:pointer;transition:background .14s ease}.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%] .pay-icon[_ngcontent-%COMP%]{font-size:18px}.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--wb-green-hover)}.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%]:active:not(:disabled){background:var(--wb-green-press)}.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.action-buttons[_ngcontent-%COMP%] .main-pay.is-not-ready[_ngcontent-%COMP%]:not(:disabled){opacity:.6}.action-buttons[_ngcontent-%COMP%] .main-pay.is-submitting[_ngcontent-%COMP%]{opacity:.75;cursor:progress}.pay-spinner[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;border-radius:999px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;animation:_ngcontent-%COMP%_paySpin .8s linear infinite}@keyframes _ngcontent-%COMP%_paySpin{to{transform:rotate(360deg)}}.pay-reassurance[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:5px;margin:10px 0 0;font-size:11.5px;font-weight:400;color:var(--wb-text-3)}.pay-reassurance[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px}.admin-strip[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-top:16px;padding:11px 14px;border:1px dashed var(--wb-gold);border-radius:8px;background:var(--wb-gold-soft)}.admin-strip[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px;color:var(--wb-warning);flex-shrink:0}.admin-strip__text[_ngcontent-%COMP%]{flex:1;min-width:0;font-size:11.5px;font-weight:400;color:var(--wb-warning)}.admin-strip__button[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;flex-shrink:0;height:30px;padding:0 12px;border:1px solid var(--wb-gold);border-radius:6px;background:var(--wb-surface);font-family:inherit;font-size:11.5px;font-weight:600;color:var(--wb-warning);cursor:pointer;transition:background .14s ease}.admin-strip__button[_ngcontent-%COMP%]:hover{background:var(--wb-warning-soft)}@media (prefers-reduced-motion: reduce){.action-buttons[_ngcontent-%COMP%] .main-pay[_ngcontent-%COMP%], .admin-strip__button[_ngcontent-%COMP%], .restart-button[_ngcontent-%COMP%]{transition:none}.pay-spinner[_ngcontent-%COMP%]{animation:none;border-top-color:#ffffffe6}}"]})}}return l})();var ie=_(38858),ae=_(2368);function se(l,m){if(1&l&&(e.TgZ(0,"span",44),e._uU(1),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Oqu(o.bandView.kind)}}function ce(l,m){if(1&l&&(e.TgZ(0,"span",47)(1,"span",2),e._uU(2,"event"),e.qZA(),e._uU(3),e.ALo(4,"date"),e.qZA()),2&l){const o=e.oxw(3);e.xp6(3),e.hij(" ",e.Dn7(4,1,o.bandView.date,"EEE, MMM d, y \xb7 h:mm a","UTC")," ")}}function pe(l,m){if(1&l&&(e.TgZ(0,"span",47)(1,"span",2),e._uU(2,"place"),e.qZA(),e._uU(3),e.qZA()),2&l){const o=e.oxw(3);e.xp6(3),e.hij(" ",o.bandView.location," ")}}function le(l,m){if(1&l&&(e.TgZ(0,"div",45),e.YNc(1,ce,5,5,"span",46),e.YNc(2,pe,4,1,"span",46),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",o.bandView.date),e.xp6(1),e.Q6J("ngIf",o.bandView.location)}}function de(l,m){if(1&l&&(e.TgZ(0,"div",50)(1,"span",51),e._uU(2,"Paid by"),e.qZA(),e.TgZ(3,"span",52),e._uU(4),e.ALo(5,"nameCase"),e.qZA()()),2&l){const o=e.oxw(3);
1e.xp6(4),e.Oqu(e.lcZ(5,1,o.currentUser.first_name+" "+o.currentUser.last_name))}}function ge(l,m){if(1&l&&(e.TgZ(0,"span",55)(1,"span",56),e._uU(2),e.ALo(3,"nameCase"),e.qZA(),e.TgZ(4,"span",57),e._uU(5),e.qZA()()),2&l){const o=m.$implicit;e.ekj("pp-chip--not-fishing",o.notFishing),e.xp6(2),e.Oqu(e.lcZ(3,6,o.name)),e.xp6(2),e.ekj("pp-chip__role--sub","Substitute"===o.role),e.xp6(1),e.Oqu(o.role)}}function ue(l,m){if(1&l&&(e.TgZ(0,"div",50)(1,"span",51),e._uU(2,"Team"),e.qZA(),e.TgZ(3,"div",53),e.YNc(4,ge,6,8,"span",54),e.qZA()()),2&l){const o=e.oxw(3);e.xp6(4),e.Q6J("ngForOf",o.teamMembers)}}function me(l,m){if(1&l&&(e.TgZ(0,"div",48),e.YNc(1,de,6,3,"div",49),e.YNc(2,ue,5,1,"div",49),e.qZA()),2&l){const o=e.oxw(2);e.xp6(1),e.Q6J("ngIf",o.currentUser),e.xp6(1),e.Q6J("ngIf",o.teamMembers.length)}}function _e(l,m){if(1&l&&(e.TgZ(0,"section",38)(1,"div",39),e.YNc(2,se,2,1,"span",40),e.TgZ(3,"h1",41),e._uU(4),e.qZA(),e.YNc(5,le,3,2,"div",42),e.qZA(),e.YNc(6,me,3,2,"div",43),e.qZA()),2&l){const o=e.oxw();e.xp6(2),e.Q6J("ngIf",o.bandView.title),e.xp6(2),e.Oqu(o.bandView.title||o.bandView.kind),e.xp6(1),e.Q6J("ngIf",o.bandView.date||o.bandView.location),e.xp6(1),e.Q6J("ngIf",o.currentUser||o.teamMembers.length)}}function fe(l,m){if(1&l&&(e.ynx(0),e._uU(1),e.ALo(2,"currency"),e.BQk()),2&l){const o=e.oxw();e.xp6(1),e.hij(" \xb7 ",e.lcZ(2,1,o.currentPayment.coupon.amount)," discount applied")}}function he(l,m){1&l&&(e.TgZ(0,"p",58),e._uU(1,"No items added"),e.qZA())}function be(l,m){if(1&l&&(e.TgZ(0,"div",63)(1,"span",64),e._uU(2),e.qZA(),e.TgZ(3,"span",65),e._uU(4),e.ALo(5,"nameCase"),e.qZA()()),2&l){const o=e.oxw().$implicit;e.xp6(1),e.ekj("pp-avatar--payer",o.isPayer),e.xp6(1),e.Oqu(o.initials),e.xp6(2),e.Oqu(e.lcZ(5,4,o.name))}}function xe(l,m){if(1&l&&(e.TgZ(0,"span",70),e._uU(1),e.ALo(2,"currency"),e.qZA()),2&l){const o=e.oxw().$implicit;e.xp6(1),e.Oqu(e.gM2(2,1,o.cost,"USD","symbol","1.2-2"))}}function ye(l,m){1&l&&(e.TgZ(0,"span",71),e._uU(1,"Included"),e.qZA())}function Pe(l,m){if(1&l&&(e.TgZ(0,"div",66)(1,"span",67),e._uU(2),e.qZA(),e.YNc(3,xe,3,6,"span",68),e.YNc(4,ye,2,0,"ng-template",null,69,e.W1O),e.qZA()),2&l){const o=m.$implicit,r=e.MAs(5);e.xp6(2),e.Oqu(o.label),e.xp6(1),e.Q6J("ngIf",o.cost)("ngIfElse",r)}}function Ce(l,m){if(1&l&&(e.TgZ(0,"div",59),e.YNc(1,be,6,6,"div",60),e.TgZ(2,"div",61),e.YNc(3,Pe,6,3,"div",62),e.qZA()()),2&l){const o=m.$implicit;e.xp6(1),e.Q6J("ngIf",o.attributed),e.xp6(1),e.ekj("pp-group__rows--flat",!o.attributed),e.xp6(1),e.Q6J("ngForOf",o.rows)}}function we(l,m){if(1&l&&(e.TgZ(0,"div",66)(1,"span",67),e._uU(2),e.qZA(),e.TgZ(3,"span",70),e._uU(4),e.ALo(5,"currency"),e.qZA()()),2&l){const o=m.$implicit;e.xp6(2),e.Oqu(o.label),e.xp6(2),e.Oqu(e.gM2(5,2,o.cost,"USD","symbol","1.2-2"))}}function ve(l,m){if(1&l&&(e.ynx(0),e._uU(1),e.BQk()),2&l){const o=e.oxw(3);e.xp6(1),e.hij(" \xb7 ",o.currentPayment.coupon.code,"")}}function Me(l,m){if(1&l&&(e.TgZ(0,"div",74)(1,"span",67)(2,"span",2),e._uU(3,"sell"),e.qZA(),e._uU(4," Discount"),e.YNc(5,ve,2,1,"ng-container",12),e.qZA(),e.TgZ(6,"span",70),e._uU(7),e.ALo(8,"currency"),e.qZA()()),2&l){const o=e.oxw(2);e.xp6(5),e.Q6J("ngIf",o.currentPayment.coupon.code),e.xp6(2),e.hij("\u2212",e.gM2(8,2,o.currentPayment.coupon.amount,"USD","symbol","1.2-2"),"")}}function Oe(l,m){if(1&l&&(e.TgZ(0,"div",72),e.YNc(1,we,6,7,"div",62),e.YNc(2,Me,9,7,"div",73),e.qZA()),2&l){const o=e.oxw();e.xp6(1),e.Q6J("ngForOf",o.orderLevelRows),e.xp6(1),e.Q6J("ngIf",null==o.currentPayment||null==o.currentPayment.coupon?null:o.currentPayment.coupon.amount)}}function Te(l,m){if(1&l&&(e.TgZ(0,"div",80),e._uU(1),e.qZA()),2&l){const o=e.oxw().$implicit;e.xp6(1),e.Oqu(o.detail)}}function ke(l,m){if(1&l&&(e.TgZ(0,"div",78)(1,"div",66)(2,"span",67),e._uU(3),e.qZA(),e.TgZ(4,"span",70),e._uU(5),e.ALo(6,"currency"),e.qZA()(),e.YNc(7,Te,2,1,"div",79),e.qZA()),2&l){const o=m.$implicit;e.xp6(3),e.Oqu(o.name),e.xp6(2),e.Oqu(e.lcZ(6,3,o.amount)),e.xp6(2),e.Q6J("ngIf",o.detail)}}function Ze(l,m){if(1&l&&(e.TgZ(0,"div",75)(1,"div",76)(2,"span",2),e._uU(3,"event_repeat"),e.qZA(),e.TgZ(4,"span"),e._uU(5,"Your added events"),e.qZA()(),e.YNc(6,ke,8,5,"div",77),e.qZA()),2&l){const o=e.oxw();e.xp6(6),e.Q6J("ngForOf",o.batchExtraLines)}}function Ae(l,m){1&l&&(e.TgZ(0,"p",81),e._uU(1," One payment per event on the same card \u2014 this event first, the added events right after \u2014 so any one of them can still be refunded on its own. You'll see every event confirm on the next screen. "),e.qZA())}function Ue(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",85)(1,"span",2),e._uU(2,"sell"),e.qZA(),e.TgZ(3,"span",86)(4,"strong"),e._uU(5),e.qZA(),e._uU(6),e.ALo(7,"currency"),e.qZA(),e.TgZ(8,"button",87),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.removeCoupon())}),e._uU(9,"Remove"),e.qZA()()}if(2&l){const o=e.oxw(2);e.xp6(5),e.Oqu(o.currentPayment.coupon.code),e.xp6(1),e.hij(" applied \xb7 \u2212",e.lcZ(7,3,o.currentPayment.coupon.amount)," "),e.xp6(2),e.Q6J("disabled",o.couponBusy)}}function Se(l,m){if(1&l&&(e.TgZ(0,"p",93),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.xp6(1),e.Oqu(o.couponMessage)}}function qe(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"label",88),e._uU(1,"Have a coupon code?"),e.qZA(),e.TgZ(2,"div",89)(3,"input",90),e.NdJ("ngModelChange",function(i){e.CHM(o);const n=e.oxw(2);return e.KtG(n.couponInput=i)})("keydown.enter",function(i){e.CHM(o);const n=e.oxw(2);return i.preventDefault(),e.KtG(n.applyCoupon())}),e.qZA(),e.TgZ(4,"button",91),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);return e.KtG(i.applyCoupon())}),e._uU(5),e.qZA()(),e.YNc(6,Se,2,1,"p",92)}if(2&l){const o=e.oxw(2);e.xp6(3),e.Q6J("ngModel",o.couponInput)("disabled",o.couponBusy),e.xp6(1),e.Q6J("disabled",o.couponBusy||!(null!=o.couponInput&&o.couponInput.trim())),e.xp6(1),e.hij(" ",o.couponApplying?"Applying\u2026":"Apply"," "),e.xp6(1),e.Q6J("ngIf",o.couponMessage)}}function Ie(l,m){if(1&l&&(e.TgZ(0,"div",82),e.YNc(1,Ue,10,5,"div",83),e.YNc(2,qe,7,5,"ng-template",null,84,e.W1O),e.qZA()),2&l){const o=e.MAs(3),r=e.oxw();e.xp6(1),e.Q6J("ngIf",r.couponApplied)("ngIfElse",o)}}function Fe(l,m){if(1&l&&(e.TgZ(0,"p",100),e._uU(1),e.qZA()),2&l){const o=e.oxw(3);e.xp6(1),e.Oqu(o.squareError)}}function ze(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"div",96)(1,"p",97),e._uU(2," This event's entry fees are collected through the director's Square account. You'll finish paying on Square's secure checkout page and land right back here when you're done. "),e.qZA(),e.TgZ(3,"button",98),e.NdJ("click",function(){e.CHM(o);const i=e.oxw(2);
1return e.KtG(i.payWithSquare())}),e.TgZ(4,"span",2),e._uU(5),e.qZA(),e._uU(6),e.ALo(7,"currency"),e.qZA(),e.YNc(8,Fe,2,1,"p",99),e.qZA()}if(2&l){const o=e.oxw(2);e.xp6(3),e.Q6J("disabled",o.squareWorking),e.xp6(2),e.Oqu(o.squareWorking?"hourglass_top":"open_in_new"),e.xp6(1),e.hij(" ",o.squareWorking?"Opening Square\u2026":"Pay "+e.lcZ(7,4,o.orderTotal)+" with Square"," "),e.xp6(2),e.Q6J("ngIf",o.squareError)}}function Ne(l,m){if(1&l){const o=e.EpF();e.TgZ(0,"stripe-payment-through-us",101),e.NdJ("totalsUpdated",function(i){e.CHM(o);const n=e.oxw(2);return e.KtG(n.onTotalsUpdated(i))}),e.qZA()}if(2&l){const o=e.oxw(2);e.Q6J("currentPayment",o.currentPayment)("isTheMan",o.isTheMan)}}function Ee(l,m){if(1&l&&(e.ynx(0),e.YNc(1,ze,9,6,"div",94),e.YNc(2,Ne,1,2,"ng-template",null,95,e.W1O),e.BQk()),2&l){const o=e.MAs(3),r=e.oxw();e.xp6(1),e.Q6J("ngIf",r.squareMode)("ngIfElse",o)}}function Je(l,m){1&l&&(e.TgZ(0,"div",102),e._UZ(1,"div",103),e.TgZ(2,"div",104),e._UZ(3,"div",103)(4,"div",103),e.qZA(),e.TgZ(5,"div",104),e._UZ(6,"div",103)(7,"div",103),e.qZA(),e._UZ(8,"div",105),e.qZA())}function De(l,m){if(1&l&&(e.ynx(0),e._uU(1),e.ALo(2,"nameCase"),e.BQk()),2&l){const o=e.oxw();e.xp6(1),e.hij(" and to ",e.lcZ(2,1,o.receiptOtherNames.join(", ")),"")}}let yt=(()=>{class l{constructor(o,r,i,n,a,s,p,d,g){this._authService=o,this._userService=r,this._tournamentService=i,this._tourService=n,this._seasonService=a,this._paymentService=s,this._squareService=p,this._sharedUtilsService=d,this._location=g,this.currentPayment=null,this.currentUser=null,this.currentTournament=null,this.currentTour=null,this.currentSeason=null,this.baseRoute="/",this.isTheMan=!1,this.paymentInitialized=!1,this.teamMembers=[],this.bandView=null,this.chargeGroups=[],this.orderLevelRows=[],this.receiptOtherNames=[],this.orderTotal=0,this.summaryExpanded=!1,this.batchExtrasCount=0,this.batchExtrasTotal=0,this.batchExtraLines=[],this.SUMMARY_KEY="wb-checkout-summary-open",this.squareMode=!1,this.squareWorking=!1,this.squareError="",this.couponInput="",this.couponApplying=!1,this.couponMessage=""}ngOnInit(){this.currentUser=this._authService.getCurrentlyLoggedInUser(),this.currentUser&&(this.baseRoute=this._userService.getRouteForUser(this.currentUser.userType),this.isTheMan=this.currentUser&&["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"].includes(this.currentUser.email)),this.summaryExpanded=this.readSummaryPreference(),this.initPayment()}initPayment(){var o=this;return(0,v.Z)(function*(){let r=o._paymentService.getCurrent();(!r||void 0===r)&&(r=o._sharedUtilsService.getFromLocal("current-payment")),o.currentPayment=o._sharedUtilsService.deepClone(r),o._paymentService.setCurrent(o.currentPayment),o.paymentInitialized=!0,o.readBatchExtras(),o.buildTeamMembers(),o.buildBandView(),o.buildCharges(),o.buildReceiptRecipients(),yield o.loadPurchaseSubject(),o.buildBandView(),yield o.checkSquareEligibility()})()}checkSquareEligibility(){var o=this;return(0,v.Z)(function*(){const r=o.currentPayment?.paymentForType;if("Tour"===r||"Season"===r||"Entry Credits"===r||!(Number(o.currentPayment?.amount)>0))return;const i=o.currentPayment?.sourceModuleRecord,n=i&&"object"==typeof i?i._id:i;if(n)try{const a=yield o._squareService.checkEligibility(n);o.squareMode=!!a?.enabled}catch{o.squareMode=!1}})()}payWithSquare(){var o=this;return(0,v.Z)(function*(){if(!o.squareWorking){o.squareWorking=!0,o.squareError="";try{const r=o.currentPayment?.sourceModuleRecord,i=r&&"object"==typeof r?r._id:r,n=yield o._squareService.createPaymentLink({tournamentId:i,teamId:o.currentPayment?.team?._id||o.currentPayment?.team||null,userId:o.currentPayment?.user?._id||o.currentPayment?.user||o.currentUser?._id||null,amount:Number(o.currentPayment.amount),items:o.currentPayment.items||[],description:o.bandView?.title?`Entry: ${o.bandView.title}`:void 0,metaData:o.currentPayment.metaData||{},returnPath:`${o.baseRoute}/payments/confirmation`});
1o._sharedUtilsService.saveInLocal("current-payment",o.currentPayment),o._squareService.openPaymentLink(n.url)}catch(r){o.squareError=r?.error?.error||r?.error?.message||"Could not start the Square checkout. Please try again.",o.squareWorking=!1}}})()}loadPurchaseSubject(){var o=this;return(0,v.Z)(function*(){const r=o.currentPayment?.paymentForType,i=o.currentPayment?.sourceModuleRecord,n=i&&"object"==typeof i?i._id:i,a=function(){var p=(0,v.Z)(function*(d,g){try{return yield d}catch(f){return console.error(`Could not load the ${g} behind this payment: `,f),null}});return function(g,f){return p.apply(this,arguments)}}();if("Tour"===r){const p=o._tourService.getCurrentTourBeingViewed();return o.currentTour=p?.name?p:null,void(!o.currentTour&&n&&(o.currentTour=(yield a((0,u.lastValueFrom)(o._tourService.get(n)),"tour"))||p))}if("Season"===r){const p=o._seasonService.getCurrentBeingViewed();return o.currentSeason=p?.name?p:null,void(!o.currentSeason&&n&&(o.currentSeason=(yield a((0,u.lastValueFrom)(o._seasonService.get(n)),"season"))||p))}if("Entry Credits"===r)return;const s=o._tournamentService.getCurrentBeingViewed();o.currentTournament=s?.name?s:null,!o.currentTournament&&n&&(o.currentTournament=(yield a((0,u.lastValueFrom)(o._tournamentService.get(n)),"tournament"))||s)})()}buildTeamMembers(){if(!this.currentPayment?.team)return;const o=this.currentPayment.team;o.captain?.first_name&&this.teamMembers.push({name:`${o.captain.first_name} ${o.captain.last_name}`,role:"Captain"});const r=!!o.fishingSolo||!!this.currentPayment?.fishingSolo;if(o.sub?.first_name&&1===o.coanglers?.length)this.teamMembers.push({name:`${o.sub.first_name} ${o.sub.last_name}`,role:"Substitute"});else if(o.coanglers?.length)for(const i of o.coanglers)i?.first_name&&this.teamMembers.push({name:`${i.first_name} ${i.last_name}`,role:r?"Not Fishing":"Co-Angler",notFishing:r})}buildBandView(){const o=this.currentPayment?.paymentForType;this.bandView="Tour"!==o?"Season"!==o?"Entry Credits"!==o?{kind:"Tournament entry",title:this.currentTournament?.name||"",date:this.currentTournament?.startDate||null,location:this.currentTournament?.location||null}:{kind:"Director credits",title:this.currentPayment?.description||"",date:null,location:null}:{kind:"Season membership",title:this.currentSeason?.name||"",date:this.currentSeason?.startDate||null,location:null}:{kind:"Tour membership",title:this.currentTour?.name||"",date:null,location:null}}buildCharges(){this.chargeGroups=[],this.orderLevelRows=[],this.orderTotal=Number(this.currentPayment?.amount)||0;const o=this.currentPayment?.items;if(!o||!o.length)return;const r=this.buildPersonDirectory(),i=new Map,n=[];for(const s of o){if(!s||!s.type&&!s.description)continue;if("processing"===s.key){this.orderLevelRows.push({label:s.description?.length?s.description:s.type,cost:s.cost||0});continue}const p=this.resolveOwnerId(s),d=p?r.get(p):null;p&&d?(i.has(p)||i.set(p,{key:p,name:d,initials:this.initialsFor(d),isPayer:p===this.idOf(this.currentUser),attributed:!0,rows:[]}),i.get(p).rows.push({label:this.rowLabel(s,d),cost:s.cost||0})):n.push({label:this.rowLabel(s,null),cost:s.cost||0})}const a=Array.from(i.values());a.sort((s,p)=>s.isPayer===p.isPayer?0:s.isPayer?-1:1),this.chargeGroups=a,n.length&&this.chargeGroups.push({key:"unattributed",name:"",initials:"",isPayer:!1,attributed:!1,rows:n})}buildPersonDirectory(){const o=new Map,r=n=>{if(!n)return;const a=this.idOf(n);if(!a)return;const s=`${n.first_name||""} ${n.last_name||""}`.trim();s.length&&o.set(a,s)};r(this.currentUser),r(this.currentPayment?.metaData?.payOnBehalfOf);const i=this.currentPayment?.team;return i&&(r(i.captain),r(i.sub),(i.coanglers||[]).forEach(r),(i.users||[]).forEach(r)),o}resolveOwnerId(o){return o.userId?this.idOf(o.userId):o.user?this.idOf(o.user):null}idOf(o){return o?"string"==typeof o?o:o._id?String(o._id):null:null}rowLabel(o,r){const i=(o.description?.length?o.description:o.type)||"";if(!r)return i;const n=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+");return i.replace(new RegExp(`\\s+for\\s+${n}\\s*$`,"i"),"").trim()||i}
1initialsFor(o){const r=(o||"").trim().split(/\s+/).filter(Boolean);return r.length?1===r.length?r[0].charAt(0).toUpperCase():(r[0].charAt(0)+r[r.length-1].charAt(0)).toUpperCase():""}buildReceiptRecipients(){const o=`${this.currentUser?.first_name||""} ${this.currentUser?.last_name||""}`.trim().toLowerCase();this.receiptOtherNames=this.teamMembers.filter(r=>r.name.trim().toLowerCase()!==o).map(r=>r.name.trim().split(/\s+/)[0]).filter((r,i,n)=>r&&n.indexOf(r)===i)}get anglerCount(){return this.chargeGroups.filter(r=>r.attributed).length||this.teamMembers.length||1}get chargeCount(){return this.chargeGroups.reduce((o,r)=>o+r.rows.length,0)+this.orderLevelRows.length}onTotalsUpdated(o){this.buildCharges(),this.orderTotal=Number(o)||this.orderTotal}get couponAvailable(){if(this.squareMode||!this.currentTournament||["Tour","Season","Entry Credits"].includes(this.currentPayment?.paymentForType))return!1;const o=this.currentTournament.settings?.payout;return!!(o?.couponCode?.length&&Number(o.couponAmountOff)>0)}get couponApplied(){return Number(this.currentPayment?.coupon?.amount)>0}get couponBusy(){return this.couponApplying||!!this.stripeChild?.submitting}applyCoupon(){var o=this;return(0,v.Z)(function*(){if(o.couponBusy||!o.couponAvailable)return;const r=(o.couponInput||"").trim();if(o.couponMessage="",!r)return;const i=o.currentTournament.settings.payout;if(r.toLowerCase()!==String(i.couponCode).trim().toLowerCase())return void(o.couponMessage="That code didn't match this event.");if(o.couponApplied)return void(o.couponMessage="That code is already applied.");const n=Number(i.couponAmountOff);n>=o._paymentService.getTotalPreFeesFromPayment(o.currentPayment).tournamentCostTotals?o.couponMessage="That code covers more than this order. Contact the tournament director to enter without paying here.":(o.currentPayment.coupon={code:i.couponCode,amount:n},yield o.rebuildAfterCouponChange())})()}removeCoupon(){var o=this;return(0,v.Z)(function*(){o.couponBusy||!o.couponApplied||(o.currentPayment.coupon=null,o.couponInput="",o.couponMessage="",yield o.rebuildAfterCouponChange())})()}rebuildAfterCouponChange(){var o=this;return(0,v.Z)(function*(){o.couponApplying=!0;try{o._paymentService.setCurrent(o.currentPayment),o._sharedUtilsService.saveInLocal("current-payment",o.currentPayment),yield o.stripeChild?.restartPayment()}finally{o.couponApplying=!1}})()}toggleSummary(){this.summaryExpanded=!this.summaryExpanded,this.writeSummaryPreference(this.summaryExpanded)}readSummaryPreference(){try{return!(typeof sessionStorage>"u")&&"true"===sessionStorage.getItem(this.SUMMARY_KEY)}catch{return!1}}writeSummaryPreference(o){try{if(typeof sessionStorage>"u")return;sessionStorage.setItem(this.SUMMARY_KEY,String(o))}catch{}}readBatchExtras(){try{const o=this._paymentService.getBatch(),r=String(this.currentPayment?.sourceModuleRecord?._id||this.currentPayment?.sourceModuleRecord||"");if(!o?.payments?.length||!o.mainTournamentId||o.mainTournamentId!==r)return;this.batchExtrasCount=o.payments.length,this.batchExtrasTotal=o.payments.reduce((i,n)=>i+(Number(n?.amount)||0),0),this.batchExtraLines=o.payments.map((i,n)=>({name:o.events?.[n]?.name||"Added event",amount:Number(i?.amount)||0,detail:this.describeBatchItems(i)}))}catch{}}describeBatchItems(o){return(o?.items||[]).filter(r=>r&&(r.type||r.description)&&(Number(r.cost)||0)>0).map(r=>`${String(r.type||r.description).replace(/\s+for\s+.+$/i,"").replace(/^Processing Fees$/i,"Processing")} ${this.formatDetailAmount(r.cost)}`).join(" \xb7 ")}formatDetailAmount(o){const r=Number(o);return isFinite(r)?`$${r.toFixed(2)}`:""}cancelPayment(){this._location.back()}editRegistration(){this._location.back()}processPaymentResults(o){var r=this;return(0,v.Z)(function*(){if(o&&"authorized"===o.result){const i=yield(0,u.lastValueFrom)(r._paymentService.create(r.currentPayment));r.registerForTourney(i)}})()}registerForTourney(o){var r=this;return(0,v.Z)(function*(){let i=r._tournamentService.getCurrentBeingViewed();!i&&"Tour"!==r.currentPayment?.paymentForType&&(i=yield(0,u.lastValueFrom)(r._tournamentService.get(r.currentPayment.sourceModuleRecord)));const a=!!r.currentPayment.items.find(d=>"Big Fish"===d.type),p=!!r.currentPayment.items.find(d=>"Side Pot"===d.type);try{yield r._tournamentService.registerForTourneyFromPayment(i,null,a,p,o,r.currentPayment),r._sharedUtilsService.showNotification("Your entry has been received")}catch(d){console.error("Post-payment registration failed (payment is saved):",d?.message||d),r._sharedUtilsService.showNotification("Payment received. If your entry does not appear shortly, contact your tournament director.")}r._sharedUtilsService.reloadComponentByRoute(`${r.baseRoute}/tournaments/${i._id}`)})()}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(h.e8),e.Y36(h.K
1D),e.Y36(h.Zr),e.Y36(h.QL),e.Y36(h.tq),e.Y36(ie.te),e.Y36(w.k),e.Y36(h.n3),e.Y36(O.Ye))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["process-payment"]],viewQuery:function(r,i){if(1&r&&e.Gf(xt,5),2&r){let n;e.iGM(n=e.CRH())&&(i.stripeChild=n.first)}},decls:67,vars:26,consts:[[1,"pp-page"],[1,"pp-trust"],[1,"material-symbols-outlined"],[1,"pp-grid"],[1,"pp-col","pp-col--context"],["class","pp-context",4,"ngIf"],[1,"pp-charges"],["type","button","aria-controls","pp-charges-body",1,"pp-charges__summary",3,"click"],[1,"material-symbols-outlined","pp-charges__summary-icon"],[1,"pp-charges__summary-text"],[1,"pp-charges__summary-title"],[1,"pp-charges__summary-sub"],[4,"ngIf"],[1,"pp-charges__summary-amount"],[1,"material-symbols-outlined","pp-charges__summary-chevron"],[1,"pp-charges__header"],[1,"pp-charges__title"],["type","button",1,"pp-link",3,"click"],["id","pp-charges-body",1,"pp-charges__body"],["class","pp-charges__empty",4,"ngIf"],["class","pp-group",4,"ngFor","ngForOf"],["class","pp-order-level",4,"ngIf"],["class","pp-batch-panel",4,"ngIf"],[1,"pp-total"],[1,"pp-total__label"],[1,"pp-total__amount"],["class","pp-batch-panel__note",4,"ngIf"],[1,"pp-col","pp-col--payment"],[1,"pp-payment"],[1,"pp-payment__header"],[1,"pp-payment__title"],[1,"pp-payment__stripe"],["class","pp-coupon",4,"ngIf"],[4,"ngIf","ngIfElse"],["loadingPayment",""],[1,"pp-receipt"],[1,"pp-receipt__note"],["type","button",1,"pp-link","pp-link--back",3,"click"],[1,"pp-context"],[1,"pp-context__band"],["class","pp-context__eyebrow",4,"ngIf"],[1,"pp-context__title"],["class","pp-context__meta",4,"ngIf"],["class","pp-context__strip",4,"ngIf"],[1,"pp-context__eyebrow"],[1,"pp-context__meta"],["class","pp-context__meta-item",4,"ngIf"],[1,"pp-context__meta-item"],[1,"pp-context__strip"],["class","pp-context__field",4,"ngIf"],[1,"pp-context__field"],[1,"pp-context__label"],[1,"pp-context__value"],[1,"pp-context__chips"],["class","pp-chip",3,"pp-chip--not-fishing",4,"ngFor","ngForOf"],[1,"pp-chip"],[1,"pp-chip__name"],[1,"pp-chip__role"],[1,"pp-charges__empty"],[1,"pp-group"],["class","pp-group__head",4,"ngIf"],[1,"pp-group__rows"],["class","pp-row",4,"ngFor","ngForOf"],[1,"pp-group__head"],[1,"pp-avatar"],[1,"pp-group__name"],[1,"pp-row"],[1,"pp-row__label"],["class","pp-row__amount",4,"ngIf","ngIfElse"],["includedRow",""],[1,"pp-row__amount"],[1,"pp-row__amount","pp-row__amount--included"],[1,"pp-order-level"],["class","pp-row pp-row--discount",4,"ngIf"],[1,"pp-row","pp-row--discount"],[1,"pp-batch-panel"],[1,"pp-batch-panel__head"],["class","pp-batch-row",4,"ngFor","ngForOf"],[1,"pp-batch-row"],["class","pp-batch-row__detail",4,"ngIf"],[1,"pp-batch-row__detail"],[1,"pp-batch-panel__note"],[1,"pp-coupon"],["class","pp-coupon__applied",4,"ngIf","ngIfElse"],["couponEntry",""],[1,"pp-coupon__applied"],[1,"pp-coupon__applied-text"],["type","button",1,"pp-link",3,"disabled","click"],["for","pp-coupon-input",1,"pp-coupon__label"],[1,"pp-coupon__row"],["id","pp-coupon-input","type","text","placeholder","Enter code","autocomplete","off","autocapitalize","characters","spellcheck","false",1,"pp-coupon__input",3,"ngModel","disabled","ngModelChange","keydown.enter"],["type","button",1,"pp-coupon__apply",3,"disabled","click"],["class","pp-coupon__message","role","status",4,"ngIf"],["role","status",1,"pp-coupon__message"],["class","pp-square",4,"ngIf","ngIfElse"],["stripeForm",""],[1,"pp-square"],[1,"pp-square__blurb"],["type","button",1,"pp-square__cta",3,"disabled","click"],["class","pp-square__error",4,"ngIf"],[1,"pp-square__error"],[3,"currentPayment","isTheMan","totalsUpdated"],["aria-live","polite","aria-label","Loading payment form",1,"pp-skeleton"],[1,"pp-skeleton__field"],[1,"pp-skeleton__pair"],[1,"pp-skeleton__cta"]],template:function(r,i){if(1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span",2),e._uU(3,"lock"),e.qZA(),e._uU(4," Secure checkout "),e.qZA(),e.TgZ(5,"div",3)(6,"div",4),e.YNc(7,_e,7,4,"section",5),e.TgZ(8,"section",6)(9,"button",7),e.NdJ("click",function(){return i.toggleSummary()}),e.TgZ(10,"span",8),e._uU(11,"receipt_long"),e.qZA(),e.TgZ(12,"span",9)(13,"span",10),e._uU(14),e.qZA(),e.TgZ(15,"span",11),e._uU(16),e.YNc(17,fe,3,3,"ng-container",12),e.qZA()(),e.TgZ(18,"span",13),e._uU(19),e.ALo(20,"currency"),e.qZA(),e.TgZ(21,"span",14),e._uU(22,"expand_more"),e.qZA()(),e.TgZ(23,"div",15)(24,"h2",16),e._uU(25,"Charges"),e.qZA(),e.TgZ(26,"button",17),e.NdJ("click",function(){return i.editRegistration()}),e._uU(27,"Edit registration"),e.qZA()(),e.TgZ(28,"div",18),e.YNc(29,he,2,0,"p",19),e.YNc(30,Ce,4,4,"div",20),e.YNc(31,Oe,3,2,"div",21),e.YNc(32,Ze,7,1,"div",22),e.TgZ(33,"div",23)(34,"span",24),e._uU(35,"Order total"),e.qZA(),e.TgZ(36,"span",25),e._uU(37),e.ALo(38,"currency"),e.qZA()(),e.YNc(39,Ae,2,0,"p",26),e.qZA()()(),e.TgZ(40,"div",27)(41,"section",28)(42,"div",29)(43,"h2",30),e._uU(44,"Payment"),e.qZA(),e.TgZ(45,"span",31)(46,"span",2),e._uU(47,"lock"),e.qZA(),e._uU(48),e.qZA()(),e.YNc(49,Ie,4,2,"div",32),e.YNc(50,Ee,4,2,"ng-container",33),e.YNc(51,Je,9,0,"ng-template",null,34,e.W1O),e.qZA()(),e.TgZ(53,"div",35)(54,"span",36)(55,"span",2),e._uU(56,"mail_outline"),e.qZA(),e.TgZ(57,"span"),e._uU(58," A receipt goes to "),e.TgZ(59,"strong"),e._uU(60),e.qZA(),e.YNc(61,De,3,3,"ng-container",12),e._uU(62,". "),e.qZA()(),e.TgZ(63,"button",37),e.NdJ("click",function(){return i.cancelPayment()}),e.TgZ(64,"span",2),e._uU(65,"arrow_back"),e.qZA(),e._uU(66," Cancel & go back "),e.qZA()()()()),2&r){const n=e.MAs(52);e.xp6(7),e.Q6J("ngIf",i.bandView),e.xp6(1),e.ekj("pp-charges--open",i.summaryExpanded),e.xp6(1),e.uIk("aria-expanded",i.summaryExpanded),e.xp6(
15),e.AsE("Order total \xb7 ",i.chargeCount," charge",1===i.chargeCount?"":"s",""),e.xp6(2),e.AsE(" ",i.anglerCount," angler",1===i.anglerCount?"":"s",""),e.xp6(1),e.Q6J("ngIf",null==i.currentPayment||null==i.currentPayment.coupon?null:i.currentPayment.coupon.amount),e.xp6(2),e.Oqu(e.lcZ(20,22,i.orderTotal+i.batchExtrasTotal)),e.xp6(10),e.Q6J("ngIf",!i.chargeGroups.length&&!i.orderLevelRows.length),e.xp6(1),e.Q6J("ngForOf",i.chargeGroups),e.xp6(1),e.Q6J("ngIf",i.orderLevelRows.length||(null==i.currentPayment||null==i.currentPayment.coupon?null:i.currentPayment.coupon.amount)),e.xp6(1),e.Q6J("ngIf",i.batchExtrasCount),e.xp6(5),e.Oqu(e.lcZ(38,24,i.orderTotal+i.batchExtrasTotal)),e.xp6(2),e.Q6J("ngIf",i.batchExtrasCount),e.xp6(9),e.hij(" ",i.squareMode?"Square":"Stripe"," "),e.xp6(1),e.Q6J("ngIf",i.couponAvailable&&i.paymentInitialized&&i.currentPayment),e.xp6(1),e.Q6J("ngIf",i.paymentInitialized&&i.currentPayment)("ngIfElse",n),e.xp6(10),e.Oqu(null==i.currentUser?null:i.currentUser.email),e.xp6(1),e.Q6J("ngIf",i.receiptOtherNames.length)}},dependencies:[O.sg,O.O5,c.Fj,c.JJ,c.On,xt,O.H9,O.uU,ae.u],styles:["[_nghost-%COMP%]{width:100%;display:block;background:var(--wb-canvas);font-family:var(--wb-font)}.pp-page[_ngcontent-%COMP%]{min-height:100%}.pp-trust[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:14px 40px 0;max-width:1080px;margin:0 auto;font-size:12px;font-weight:500;color:var(--wb-text-3)}.pp-trust[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px;color:var(--wb-success)}.pp-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:32px;max-width:1080px;margin:0 auto;padding:28px 40px 48px;align-items:start}.pp-col[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.pp-col--context[_ngcontent-%COMP%]{gap:16px}.pp-col--payment[_ngcontent-%COMP%]{gap:12px;position:sticky;top:20px}.pp-context[_ngcontent-%COMP%]{border:1px solid var(--wb-border);border-radius:10px;overflow:hidden}.pp-context__band[_ngcontent-%COMP%]{padding:22px 24px;background:var(--wb-flagship-band);color:#fff}.pp-context__eyebrow[_ngcontent-%COMP%]{display:block;font-size:10.5px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#fff9;margin-bottom:6px}.pp-context__title[_ngcontent-%COMP%]{margin:0;font-size:24px;font-weight:700;line-height:1.2;color:#fff}.pp-context__meta[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px 22px;margin-top:10px}.pp-context__meta-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:#fffc}.pp-context__meta-item[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px;opacity:.65}.pp-context__strip[_ngcontent-%COMP%]{padding:16px 24px;background:var(--wb-surface);display:flex;flex-wrap:wrap;gap:20px 40px}.pp-context__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;min-width:0}.pp-context__label[_ngcontent-%COMP%]{font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--wb-text-3)}.pp-context__value[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600;color:var(--wb-text)}.pp-context__chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.pp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.pp-chip__name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--wb-text)}.pp-chip__role[_ngcontent-%COMP%]{padding:2px 7px;border-radius:999px;background:var(--wb-canvas-sunk);color:var(--wb-text-2);font-size:10px;font-weight:600;line-height:1.4}.pp-chip__role--sub[_ngcontent-%COMP%]{background:var(--wb-warning-soft);color:var(--wb-warning)}.pp-chip--not-fishing[_ngcontent-%COMP%] .pp-chip__name[_ngcontent-%COMP%]{color:var(--wb-text-3);text-decoration:line-through}
1.pp-charges[_ngcontent-%COMP%]{background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:10px;padding:22px 24px}.pp-charges__summary[_ngcontent-%COMP%]{display:none}.pp-charges__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.pp-charges__title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:var(--wb-text)}.pp-charges__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;font-variant-numeric:tabular-nums lining-nums}.pp-charges__empty[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--wb-text-3)}.pp-link[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;background:none;border:0;padding:0;display:inline-flex;align-items:center;gap:5px;font-family:inherit;font-size:12.5px;font-weight:600;color:var(--wb-accent);text-decoration:underline;cursor:pointer;transition:color .14s ease}.pp-link[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.pp-link[_ngcontent-%COMP%]:hover{color:var(--wb-accent-press)}.pp-link--back[_ngcontent-%COMP%]{flex-shrink:0}.pp-group__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:9px;margin-bottom:8px}.pp-group__name[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600;color:var(--wb-text)}.pp-group__rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px;padding-left:35px}.pp-group__rows--flat[_ngcontent-%COMP%]{padding-left:0}.pp-avatar[_ngcontent-%COMP%]{flex-shrink:0;width:26px;height:26px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:9.5px;font-weight:700;letter-spacing:.02em;background:var(--wb-accent-soft);border:1px solid var(--wb-accent);color:var(--wb-accent-press)}.pp-avatar--payer[_ngcontent-%COMP%]{background:var(--wb-ink);border-color:var(--wb-ink);color:#fff}.pp-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.pp-row__label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:400;color:var(--wb-text-2)}.pp-row__label[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:16px}.pp-row__amount[_ngcontent-%COMP%]{flex-shrink:0;font-size:13px;font-weight:600;color:var(--wb-text)}.pp-row__amount--included[_ngcontent-%COMP%]{font-weight:500;color:var(--wb-text-3)}.pp-row--discount[_ngcontent-%COMP%] .pp-row__label[_ngcontent-%COMP%], .pp-row--discount[_ngcontent-%COMP%] .pp-row__amount[_ngcontent-%COMP%]{font-weight:600;color:var(--wb-success)}.pp-order-level[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:7px;padding-top:14px;border-top:1px solid var(--wb-border)}.pp-total[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-top:14px;border-top:1px solid var(--wb-border)}.pp-total__label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:var(--wb-text)}.pp-total__amount[_ngcontent-%COMP%]{font-size:28px;font-weight:700;color:var(--wb-text);font-variant-numeric:tabular-nums lining-nums}.pp-receipt[_ngcontent-%COMP%]{grid-column:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:var(--wb-canvas-sunk);border-radius:8px}.pp-receipt__note[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:400;color:var(--wb-text-2)}.pp-receipt__note[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px;color:var(--wb-text-3);flex-shrink:0}.pp-receipt__note[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:600;color:var(--wb-text)}.pp-payment[_ngcontent-%COMP%]{background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:10px;padding:22px 24px}.pp-payment__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.pp-payment__title[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700;color:var(--wb-text)}.pp-payment__stripe[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:500;color:var(--wb-text-3)}.pp-payment__stripe[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:15px;color:var(--wb-success)}.pp-skeleton[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}
1.pp-skeleton__pair[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pp-skeleton__field[_ngcontent-%COMP%]{height:44px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-canvas)}.pp-skeleton__cta[_ngcontent-%COMP%]{height:50px;margin-top:6px;border-radius:8px;background:var(--wb-canvas-sunk)}@media (max-width: 900px){.pp-trust[_ngcontent-%COMP%]{padding:12px 20px 0}.pp-grid[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr);gap:12px;padding:14px 16px 32px}.pp-col--payment[_ngcontent-%COMP%]{order:-1;position:static}.pp-col--context[_ngcontent-%COMP%]{gap:12px}}@media (max-width: 680px){.pp-col--payment[_ngcontent-%COMP%]{order:0}.pp-receipt[_ngcontent-%COMP%]{order:1}.pp-trust[_ngcontent-%COMP%]{display:none}.pp-context[_ngcontent-%COMP%]{border:0;border-radius:0;margin:-14px -16px 0}.pp-context__band[_ngcontent-%COMP%]{padding:calc(16px + var(--wb-safe-top)) 18px 16px}.pp-context__title[_ngcontent-%COMP%]{font-size:20px;line-height:1.25}.pp-context__eyebrow[_ngcontent-%COMP%]{margin-bottom:4px}.pp-context__meta[_ngcontent-%COMP%]{margin-top:8px;gap:4px 18px}.pp-context__meta-item[_ngcontent-%COMP%]{font-size:12px}.pp-context__strip[_ngcontent-%COMP%]{padding:14px 18px;gap:14px 28px}.pp-charges[_ngcontent-%COMP%]{padding:0}.pp-charges__summary[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;width:100%;display:flex;align-items:center;gap:12px;padding:13px 15px;background:var(--wb-surface);border:0;border-radius:10px;font-family:inherit;text-align:left;cursor:pointer}.pp-charges__summary-icon[_ngcontent-%COMP%]{font-size:20px;color:var(--wb-text-3);flex-shrink:0}.pp-charges__summary-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.pp-charges__summary-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:var(--wb-text)}.pp-charges__summary-sub[_ngcontent-%COMP%]{font-size:10.5px;font-weight:400;color:var(--wb-text-3)}.pp-charges__summary-amount[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:var(--wb-text);font-variant-numeric:tabular-nums lining-nums;flex-shrink:0}.pp-charges__summary-chevron[_ngcontent-%COMP%]{font-size:19px;color:var(--wb-border-strong);flex-shrink:0;transition:transform .15s ease}.pp-charges__header[_ngcontent-%COMP%]{display:none}.pp-charges__body[_ngcontent-%COMP%]{display:none;padding:0 15px 16px}.pp-charges--open[_ngcontent-%COMP%] .pp-charges__body[_ngcontent-%COMP%]{display:flex}.pp-charges--open[_ngcontent-%COMP%] .pp-charges__summary-chevron[_ngcontent-%COMP%]{transform:rotate(180deg)}.pp-receipt[_ngcontent-%COMP%]{padding:10px 12px;flex-wrap:wrap}.pp-receipt__note[_ngcontent-%COMP%]{font-size:11px}.pp-receipt__note[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px}.pp-payment[_ngcontent-%COMP%]{padding:16px}.pp-payment__title[_ngcontent-%COMP%]{font-size:15px}.pp-total__amount[_ngcontent-%COMP%]{font-size:24px}.pp-skeleton__field[_ngcontent-%COMP%]{height:46px}}@media (max-width: 480px){.pp-skeleton__pair[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (prefers-reduced-motion: reduce){.pp-charges__summary-chevron[_ngcontent-%COMP%], .pp-link[_ngcontent-%COMP%]{transition:none}}.pp-batch-note[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;margin-top:10px;padding:10px 12px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-canvas-sunk, var(--wb-surface));font-size:12.5px;line-height:1.45;color:var(--wb-text-2)}.pp-batch-note[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px;flex:0 0 auto;color:var(--wb-accent)}.pp-batch-panel[_ngcontent-%COMP%]{margin-top:12px;padding:12px 14px;border:1px solid var(--wb-border);border-radius:10px;background:var(--wb-canvas-sunk, var(--wb-surface))}.pp-batch-panel[_ngcontent-%COMP%] .pp-batch-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--wb-text-2);margin-bottom:8px}.pp-batch-panel[_ngcontent-%COMP%] .pp-batch-panel__head[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:17px;color:var(--wb-accent)}
1.pp-batch-panel[_ngcontent-%COMP%] .pp-batch-panel__total[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;margin-top:8px;padding-top:8px;border-top:1px solid var(--wb-border);font-weight:700;font-size:14px;color:var(--wb-text);font-variant-numeric:tabular-nums}.pp-batch-panel[_ngcontent-%COMP%] .pp-batch-panel__note[_ngcontent-%COMP%]{margin:8px 0 0;font-size:12px;line-height:1.5;color:var(--wb-text-2)}.pp-batch-row[_ngcontent-%COMP%]:not(:last-child){margin-bottom:6px}.pp-batch-row[_ngcontent-%COMP%] .pp-batch-row__detail[_ngcontent-%COMP%]{margin-top:1px;font-size:11.5px;color:var(--wb-text-3);font-variant-numeric:tabular-nums}.pp-square[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.pp-square__blurb[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.55;color:var(--wb-text-2, var(--wb-text-3))}.pp-square__cta[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px 18px;border:none;border-radius:8px;background:var(--wb-ink, #1a1a1a);color:#fff;font-size:15px;font-weight:600;font-family:var(--wb-font);cursor:pointer}.pp-square__cta[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.pp-square__cta[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:default}.pp-square__error[_ngcontent-%COMP%]{margin:0;font-size:12.5px;line-height:1.5;color:var(--wb-danger, #c0392b)}.pp-coupon[_ngcontent-%COMP%]{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--wb-border)}.pp-coupon__label[_ngcontent-%COMP%]{display:block;margin-bottom:6px;font-size:12px;font-weight:600;color:var(--wb-text-2)}.pp-coupon__row[_ngcontent-%COMP%]{display:flex;gap:8px}.pp-coupon__input[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;height:44px;padding:0 12px;border:1px solid var(--wb-border);border-radius:8px;background:var(--wb-surface);color:var(--wb-text);font-family:inherit;font-size:14px}.pp-coupon__input[_ngcontent-%COMP%]::placeholder{color:var(--wb-text-3)}.pp-coupon__input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--wb-accent);box-shadow:0 0 0 3px #185fa526}.pp-coupon__input[_ngcontent-%COMP%]:disabled{opacity:.6}.pp-coupon__apply[_ngcontent-%COMP%]{flex:0 0 auto;height:44px;padding:0 18px;border:none;border-radius:8px;background:var(--wb-ink, #1a1a1a);color:#fff;font-family:inherit;font-size:14px;font-weight:600;cursor:pointer}.pp-coupon__apply[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.pp-coupon__applied[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--wb-success);border-radius:8px;color:var(--wb-success);font-size:13px}.pp-coupon__applied[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.pp-coupon__applied[_ngcontent-%COMP%] .pp-link[_ngcontent-%COMP%]{margin-left:auto;color:var(--wb-text-2)}.pp-coupon__applied[_ngcontent-%COMP%] .pp-link[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.pp-coupon__applied-text[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums}.pp-coupon__message[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12.5px;line-height:1.45;color:var(--wb-danger, #c0392b)}"]})}}return l})();var it=_(20553),Ye=_(71818),Pt=_(92596);const Be=[{path:"",children:[{path:"",component:Rt.N},{path:"success/:session_id",component:(()=>{class l{constructor(o,r,i,n,a,s){this.route=o,this.router=r,this._stripeService=i,this._accountService=n,this._authService=a,this._sharedUtilsService=s,this.ngUnsubscribe=new t.x,this.sessionId="",this.stripeApiKey=null,this.route.params.pipe((0,F.R)(this.ngUnsubscribe)).subscribe(p=>this.sessionId=p?.session_id)}ngOnInit(){console.log("Session ID: ",this.sessionId),this.stripeApiKey=this._stripeService.getStripeApiKey(),this.updateAccountWithCustomerInfo()}updateAccountWithCustomerInfo(){var o=this;return(0,v.Z)(function*(){const n={session_id:o.sessionId,return_url:(o.stripeApiKey!==it.N?.stripe?.apiKeyTest?"https://www.weighbook.com/director":"http://localhost:4200/director")+"/subscriptions/"},a=yield(0,u.lastValueFrom)(o._stripeService.requestPortalSession(n));console.log("Customer Portal: ",a);const s=o._authService.getCurrentlyLoggedInUser(),p=yield o._accountService.getWeighBookAccount(s);if(console.log("weighbookAccountForUser: ",p),a&&p?._id){p.stripeCustomerId=a.customer;const d=yield(0,u.lastValueFrom)(o._accountService.update(p));console.log("Updated user account",d),o._sharedUtilsService.hapticSuccess()}})()}manageSubscription(){var o=this;return(0,v.Z)(function*(){const n={session_id:o.sessionId,return_url:(o.stripeApiKey!==it.N?.stripe?.apiKeyTest?"https://www.weighbook.com/director":"http://localhost:4200/director")+"/subscriptions/"},a=yield(0,u.lastValueFrom)(o._stripeService.requestPortalSession(n));console.log("Customer Portal: ",a),document.location=a?.url})()}goBack(){this.router.navigateByUrl("/director/subscriptions/upgrade")}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(z.gz),e.Y36(z.F0),e.Y36(Ye.Q),e.Y36(h.BR),e.Y36(h.e8),e.Y36(h.n3))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["successful-payment"]],decls:17,vars:0,consts:[[1,"card"],[1,"card-body"],[1,"account-options"],[1,"status-bg","success"],[1,"checkmark-wrapper","default-flex","flex-center",2,"border-radius","200px","height","200px","width","200px","background","#F8FAF5","margin","0 auto"],[1,"checkmark"],[1,"desc"],[1,"btns","default-flex"],["mat-stroked-button","","color","primary","matTooltip","Go Back",3,"click"],["mat-flat-button","","color","primary","matTooltip","Manage Subscription",3,"click"]],template:function(r,i){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"i",5),e._uU(6,"\u2713"),e.qZA()(),e.TgZ(7,"div",6)(8,"h1"),e._uU(9,"Success"),e.qZA(),e.TgZ(10,"p"),e._uU(11,"Your payment was successful"),e.qZA(),e.TgZ(12,"div",7)(13,"button",8),e.NdJ("click",function(){return i.goBack()}),e._uU(14,"Go Back"),e.qZA(),e.TgZ(15,"button",9),e.NdJ("click",function(){return i.manageSubscription()}),e._uU(16,"Manage Subscription"),e.qZA()()()()()()())},dependencies:[Q.lW,Pt.gM],styles:["[_nghost-%COMP%]{width:100%}.account-options[_ngcontent-%COMP%]{width:100%;min-height:89vh;display:flex;align-items:center;justify-content:center;flex-direction:column;margin:0 auto}.status-bg[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background:white;padding:60px;border-radius:4px;box-shadow:0 2px 3px #c8d0d8;display:inline-block;margin:0 auto}.status-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:100px;line-height:200px;margin-left:-15px}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{max-width:400px;padding-top:25px;display:flex;flex-direction:column;align-items:center}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{text-align:center}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:25px 0}.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#9abc66}.failure[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#c04040}"]})}}return l})()},{path:"cancel",component:(()=>{class l{constructor(o){this.router=o}goBack(){this.router.navigateByUrl("/director/subscriptions/upgrade")}static{this.\u0275fac=function(r){return new(r||l)(e.Y36(z.F0))}}static{this.\u0275cmp=e.Xpm({type:l,selectors:[["cancel-payment"]],decls:11,vars:0,consts:[[1,"status-bg","failure"],[1,"checkmark-wrapper","default-flex","flex-center",2,"border-radius","200px","height","200px","width","200px","background","#F8FAF5","margin","0 auto"],[1,"checkmark"],[1,"desc"],["mat-flat-button","","color","primary","matTooltip","Back to Subscriptions",3,"click"]],template:function(r,i){1&r&&(e.TgZ(0,"div",0)(1,"div",1)(2,"i",2),e._uU(3,"\u2717"),e.qZA()(),e.TgZ(4,"div",3)(5,"h1"),e._uU(6,"You have cancelled your payment."),e.qZA(),e.TgZ(7,"p"),e._uU(8,"WeighBook uses Stripe to keep your personal and payment information secure. Thousands of companies around the world trust Stripe to process payments for their users."),e.qZA(),e.TgZ(9,"button",4),e.NdJ("click",function(){return i.goBack()}),e._uU(10,"Back to Subscriptions"),e.qZA()()())},dependencies:[Q.lW,Pt.gM],styles:["[_nghost-%COMP%]{width:100%}.account-options[_ngcontent-%COMP%]{width:100%;min-height:89vh;display:flex;align-items:center;justify-content:center;flex-direction:column;margin:0 auto}.status-bg[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;background:white;padding:60px;border-radius:4px;box-shadow:0 2px 3px #c8d0d8;margin:0 auto}.status-bg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:100px;line-height:200px;margin-left:-15px}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%]{max-width:400px;padding-top:25px;display:flex;flex-direction:column;align-items:center}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{text-align:center}.status-bg[_ngcontent-%COMP%] .desc[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:25px 0}.success[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#9abc66}.failure[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#c04040}"]})}}return l})()},{path:"process-payment",component:yt},{path:"confirmation",component:ut},{path:":id/success",component:dt},{path:":id",component:dt}]}];let Ge=(()=>{class l{static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275mod=e.oAB({type:l})}static{this.\u0275inj=e.cJS({imports:[z.Bz.forChild(Be),z.Bz]})}}return l})();var Le=_(83192),je=_(16417),$e=_(6176),Ve=_(15656),Ke=_(45120);const He=typeof document<"u"&&document.location.href.includes("www.")?it.N.stripe.apiKey:it.N.stripe.apiKeyTest;let We=(()=>{class l{static{this.\u0275fac=function(r){return new(r||l)}}static{this.\u0275mod=e.oAB({type:l})}static{this.\u0275inj=e.cJS({imports:[O.ez,c.u5,c.UX,$e.d,Le.X,je.J,Ve.D,Ke.q,A.h,gt.lO.forRoot(He),Ge]})}}return l})()},50404:(W,R,_)=>{_.d(R,{M:()=>I});var c=_(65879),O=_(96814);function A(C,S){if(1&C&&(c.TgZ(0,"span",16),c._uU(1),c.qZA()),2&C){const w=c.oxw(2);c.xp6(1),c.Oqu(w.count)}}function z(C,S){if(1&C&&(c.TgZ(0,"span",17),c._uU(1),c.qZA()),2&C){const w=c.oxw(2);c.xp6(1),c.Oqu(w.subtitle)}}function v(C,S){if(1&C){const w=c.EpF();c.TgZ(0,"label",18)(1,"span",19),c._uU(2,"search"),c.qZA(),c.TgZ(3,"input",20),c.NdJ("input",function(Q){c.CHM(w);const j=c.oxw(2);return c.KtG(j.onSearch(Q.target.value))}),c.qZA()()}if(2&C){const w=c.oxw(2);c.xp6(3),c.Q6J("placeholder",w.searchPlaceholder)("value",w.searchValue)}}function T(C,S){if(1&C&&(c.TgZ(0,"header",7)(1,"div",8)(2,"h2",9),c._uU(3),c.qZA(),c.YNc(4,A,2,1,"span",10),c.qZA(),c.TgZ(5,"div",11),c.Hsn(6,1),c.qZA(),c.YNc(7,z,2,1,"span",12),c._UZ(8,"span",13),c.TgZ(9,"div",14),c.YNc(10,v,4,2,"label",15),c.Hsn(11,2),c.qZA()()),2&C){const w=c.oxw();c.ekj("is-inline",w.headInline&&!w.showSearch),c.xp6(3),c.Oqu(w.title),c.xp6(1),c.Q6J("ngIf",null!==w.count&&""!==w.count),c.xp6(3),c.Q6J("ngIf",w.subtitle),c.xp6(3),c.Q6J("ngIf",w.showSearch)}}function t(C,S){1&C&&(c.TgZ(0,"div",21),c.Hsn(1,3),c.qZA())}function F(C,S){if(1&C&&(c.TgZ(0,"div",22),c.Hsn(1,4),c.qZA()),2&C){const w=c.oxw();c.ekj("is-prose","prose"===w.bodyPad)("is-cards","cards"===w.bodyPad)}}function h(C,S){if(1&C&&(c.TgZ(0,"p",28),c._uU(1),c.qZA()),2&C){const w=c.oxw(2);c.xp6(1),c.Oqu(w.emptyBody)}}function P(C,S){if(1&C&&(c.TgZ(0,"div",23)(1,"div",24)(2,"span",25),c._uU(3),c.qZA()(),c.TgZ(4,"h3",26),c._uU(5),c.qZA(),c.YNc(6,h,2,1,"p",27),c.Hsn(7,5),c.qZA()),2&C){const w=c.oxw();c.xp6(3),c.Oqu(w.emptyIcon),c.xp6(2),c.Oqu(w.emptyTitle),c.xp6(1),c.Q6J("ngIf",w.emptyBody)}}function u(C,S){if(1&C&&(c.TgZ(0,"div",29)(1,"span",30),c._uU(2),c.qZA(),c._UZ(3,"span",31),c.Hsn(4,6),c.qZA()),2&C){const w=c.oxw();c.xp6(2),c.Oqu(w.footText)}}const N=[[["","subtabs",""]],[["","status",""]],[["","actions",""]],[["","rail",""]],"*",[["","emptyAction",""]],[["","foot",""]]],e=["[subtabs]","[status]","[actions]","[rail]","*","[emptyAction]","[foot]"];let I=(()=>{class C{constructor(){this.title="",this.hideHead=!1,this.count=null,this.subtitle="",this.showSearch=!1,this.searchPlaceholder="Search\u2026",this.searchValue="",this.searchChange=new c.vpe,this.empty=!1,this.emptyIcon="inbox",this.emptyTitle="Nothing here yet",this.emptyBody="",this.footText="",this.bodyPad="flush",this.headInline=!1}onSearch(w){this.searchValue=w,this.searchChange.emit(w)}static{this.\u0275fac=function(G){return new(G||C)}}static{this.\u0275cmp=c.Xpm({type:C,selectors:[["profile-tab-panel"]],inputs:{title:"title",hideHead:"hideHead",count:"count",subtitle:"subtitle",showSearch:"showSearch",searchPlaceholder:"searchPlaceholder",searchValue:"searchValue",empty:"empty",emptyIcon:"emptyIcon",emptyTitle:"emptyTitle",emptyBody:"emptyBody",footText:"footText",bodyPad:"bodyPad",headInline:"headInline"},outputs:{searchChange:"searchChange"},ngContentSelectors:e,decls:8,vars:5,consts:[[1,"ptp"],["class","ptp-head",3,"is-inline",4,"ngIf"],[1,"ptp-subtabs"],["class","ptp-rail",4,"ngIf"],["class","ptp-body",3,"is-prose","is-cards",4,"ngIf"],["class","ptp-empty",4,"ngIf"],["class","ptp-foot",4,"ngIf"],[1,"ptp-head"],[1,"ptp-head-title"],[1,"ptp-title"],["class","ptp-count",4,"ngIf"],[1,"ptp-head-status"],["class","ptp-sub",4,"ngIf"],[1,"ptp-head-spacer"],[1,"ptp-head-actions"],["class","ptp-search",4,"ngIf"],[1,"ptp-count"],[1,"ptp-sub"],[1,"ptp-search"],[1,"material-symbols-outlined","ptp-search-icon"],["type","text",1,"ptp-search-input",3,"placeholder","value","input"],[1,"ptp-rail"],[1,"ptp-body"],[1,"ptp-empty"],[1,"ptp-empty-icon"],[1,"material-symbols-outlined"],[1,"ptp-empty-title"],["class","ptp-empty-body",4,"ngIf"],[1,"ptp-empty-body"],[1,"ptp-foot"],[1,"ptp-foot-text"],[1,"ptp-foot-spacer"]],template:function(G,Q){1&G&&(c.F$t(N),c.TgZ(0,"section",0),c.YNc(1,T,12,6,"header",1),c.TgZ(2,"div",2),c.Hsn(3),c.qZA(),c.YNc(4,t,2,0,"div",3),c.YNc(5,F,2,4,"div",4),c.YNc(6,P,8,3,"div",5),c.YNc(7,u,5,1,"div",6),c.qZA()),2&G&&(c.xp6(1),c.Q6J("ngIf",!Q.hideHead),c.xp6(3),c.Q6J("ngIf",!Q.empty),c.xp6(1),c.Q6J("ngIf",!Q.empty),c.xp6(1),c.Q6J("ngIf",Q.empty),c.xp6(1),c.Q6J("ngIf",!Q.empty&&Q.footText))},dependencies:[O.O5],styles:['[_nghost-%COMP%]{display:block}.ptp[_ngcontent-%COMP%]{background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:var(--wb-r-card, 10px);box-shadow:var(--wb-e1);overflow:hidden}.ptp-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;padding:15px 20px;border-bottom:1px solid var(--wb-tg-border-hairline);flex-wrap:wrap}.ptp-head-title[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:9px;min-width:0}.ptp-title[_ngcontent-%COMP%]{margin:0;font-family:var(--wb-font, inherit);font-size:19px;font-weight:600;letter-spacing:-.3px;color:var(--wb-text)}.ptp-count[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 9px;border-radius:var(--wb-r-pill, 999px);background:var(--wb-canvas-sunk);color:var(--wb-text-2);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.ptp-head-status[_ngcontent-%COMP%]{display:contents}.ptp-sub[_ngcontent-%COMP%]{font-size:12.5px;color:var(--wb-text-3);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ptp-head-spacer[_ngcontent-%COMP%]{flex:1}.ptp-head-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ptp-head-actions[_ngcontent-%COMP%]:empty{display:none}.ptp-search[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;height:34px;width:216px;padding:0 11px;box-sizing:border-box;background:var(--wb-surface);border:1px solid var(--wb-border);border-radius:var(--wb-r-control, 8px);transition:border-color .12s,box-shadow .12s}.ptp-search[_ngcontent-%COMP%]:focus-within{border-color:var(--wb-accent);box-shadow:var(--wb-focus)}.ptp-search-icon[_ngcontent-%COMP%]{font-size:17px;color:var(--wb-text-4)}.ptp-search-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:none;outline:none;background:transparent;font-family:inherit;font-size:13px;color:var(--wb-text)}.ptp-search-input[_ngcontent-%COMP%]::placeholder{color:var(--wb-text-4)}.ptp-subtabs[_ngcontent-%COMP%]{display:flex;gap:20px;padding:11px 20px 0;border-bottom:1px solid var(--wb-tg-border-hairline)}.ptp-subtabs[_ngcontent-%COMP%]:empty{display:none}@media (max-width: 720px){.ptp-subtabs[_ngcontent-%COMP%]{padding:10px 14px 0;gap:16px;overflow-x:auto;scrollbar-width:none}.ptp-subtabs[_ngcontent-%COMP%]::-webkit-sc
1rollbar{display:none}}.ptp-rail[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 20px;border-bottom:1px solid var(--wb-tg-border-hairline);background:var(--wb-canvas);flex-wrap:wrap}.ptp-rail[_ngcontent-%COMP%]:empty{display:none}.ptp-body[_ngcontent-%COMP%]{min-width:0}.ptp-body.is-prose[_ngcontent-%COMP%]{padding:22px 24px 26px}.ptp-body.is-cards[_ngcontent-%COMP%]{padding:18px 20px 22px}.ptp-empty[_ngcontent-%COMP%]{padding:56px 24px;text-align:center}.ptp-empty-icon[_ngcontent-%COMP%]{width:64px;height:64px;border-radius:50%;background:var(--wb-canvas-sunk);display:inline-flex;align-items:center;justify-content:center;margin-bottom:16px}.ptp-empty-icon[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:30px;color:var(--wb-text-3)}.ptp-empty-title[_ngcontent-%COMP%]{margin:0 0 6px;font-size:15px;font-weight:600;color:var(--wb-text)}.ptp-empty-body[_ngcontent-%COMP%]{margin:0 auto 18px;max-width:380px;font-size:13px;line-height:1.6;color:var(--wb-text-2);text-wrap:pretty}.ptp-foot[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:11px 20px;border-top:1px solid var(--wb-tg-border-hairline);background:var(--wb-canvas)}.ptp-foot-text[_ngcontent-%COMP%]{font-size:12px;color:var(--wb-text-3);font-variant-numeric:tabular-nums}.ptp-foot-spacer[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%] .ptp-btn-primary{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px;background:var(--fc-action, var(--wb-ink));color:#fff;border:none;border-radius:var(--wb-r-control, 8px);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .12s,transform 50ms}[_nghost-%COMP%] .ptp-btn-primary .material-symbols-outlined{font-size:17px}[_nghost-%COMP%] .ptp-btn-primary:hover{background:color-mix(in srgb,var(--fc-action) 88%,#000)}[_nghost-%COMP%] .ptp-btn-primary:not(:disabled):active{transform:translateY(1px)}[_nghost-%COMP%] .ptp-btn-primary:disabled{opacity:.5;cursor:not-allowed}[_nghost-%COMP%] .ptp-btn-secondary, [_nghost-%COMP%] .ptp-btn-quiet{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;background:var(--wb-surface);color:var(--wb-text);border:1px solid var(--wb-border);border-radius:var(--wb-r-control, 8px);font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .12s,background .12s}[_nghost-%COMP%] .ptp-btn-secondary .material-symbols-outlined, [_nghost-%COMP%] .ptp-btn-quiet .material-symbols-outlined{font-size:17px}[_nghost-%COMP%] .ptp-btn-secondary:hover, [_nghost-%COMP%] .ptp-btn-quiet:hover{border-color:var(--wb-border-strong);background:var(--wb-surface-hover)}[_nghost-%COMP%] .ptp-btn-secondary:disabled, [_nghost-%COMP%] .ptp-btn-quiet:disabled{color:var(--wb-text-4);cursor:not-allowed}[_nghost-%COMP%] .ptp-btn-quiet{height:28px;padding:0 10px;font-size:12.5px}[_nghost-%COMP%] .ptp-btn-quiet .material-symbols-outlined{font-size:16px}[_nghost-%COMP%] .ptp-chip{display:inline-flex;align-items:center;gap:7px;height:27px;padding:0 11px;border-radius:var(--wb-r-pill, 999px);border:1px solid var(--wb-border);background:var(--wb-surface);font-family:inherit;font-size:12.5px;font-weight:600;color:var(--wb-text-2);cursor:pointer;transition:border-color .12s,color .12s,background .12s}[_nghost-%COMP%] .ptp-chip:hover{border-color:var(--wb-border-strong);color:var(--wb-text)}[_nghost-%COMP%] .ptp-chip.is-on{background:var(--wb-ink);border-color:var(--wb-ink);color:#fff}[_nghost-%COMP%] .ptp-chip .ptp-chip-n{font-variant-numeric:tabular-nums;font-weight:600;opacity:.62}[_nghost-%COMP%] .ptp-chip.is-on .ptp-chip-n{opacity:.75}[_nghost-%COMP%] .ptp-seg{display:inline-flex;padding:3px;background:var(--wb-canvas-sunk);border:1px solid var(--wb-border);border-radius:var(--wb-r-pill, 999px);gap:2px}[_nghost-%COMP%] .ptp-seg button{background:transparent;border:none;border-radius:var(--wb-r-pill, 999px);padding:4px 12px;font-family:inherit;font-size:12.5px;font-weight:600;color:var(--wb-text-2);cursor:pointer}[_nghost-%COMP%] .ptp-seg button:hover{color:var(--wb-text)}[_nghost-%COMP%] .ptp-seg button.is-on{background:var(--wb-surface);color:var(--wb-text);box-shadow:var(--wb-e1)}[_nghost-%COMP%] .ptp-rail-spacer{flex:1}[_nghost-%COMP%] .ptp-subtab{background:transparent;border:none;border-bottom:2px solid transparent;padding:0 2px 7px;font-family:inherit;font-size:13px;font-weight:600;color:var(--wb-text-3);cursor:pointer;white-space:nowrap;transition:color var(--wb-ease, .12s ease-out),border-color var(--wb-ease, .12s ease-out)}[_nghost-%COMP%] .ptp-subtab:hover{color:var(--wb-text)}[_nghost-%COMP%] .ptp-subtab.is-on{color:var(--wb-ink);border-bottom-color:var(--wb-ink)}[_nghost-%COMP%] .ptp-live{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:var(--wb-r-pill);background:var(--wb-danger-soft);color:var(--wb-danger);font-size:12px;font-weight:600;white-space:nowrap}[_nghost-%COMP%] .ptp-live:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;animation:_ngcontent-%COMP%_ptp-livepulse 1.6s ease-in-out infinite}@keyframes _ngcontent-%COMP%_ptp-livepulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(.9)}}@media (prefers-reduced-motion: reduce){[_nghost-%COMP%] .ptp-live:before{animation:none}}@media (max-width: 720px){.ptp-head[_ngcontent-%COMP%]{padding:13px 14px;gap:10px}.ptp-sub[_ngcontent-%COMP%], .ptp-head-spacer[_ngcontent-%COMP%]{display:none}.ptp-head-actions[_ngcontent-%COMP%]{width:100%;flex-wrap:wrap}.ptp-head.is-inline[_ngcontent-%COMP%] .ptp-head-actions[_ngcontent-%COMP%]{width:auto;margin-left:auto}.ptp-head.is-inline[_ngcontent-%COMP%] .ptp-head-title[_ngcontent-%COMP%]{min-width:88px}.ptp-search[_ngcontent-%COMP%]{width:100%}.ptp-rail[_ngcontent-%COMP%]{padding:9px 14px;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.ptp-rail[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.ptp-body.is-prose[_ngcontent-%COMP%]{padding:16px 14px 20px}.ptp-body.is-cards[_ngcontent-%COMP%]{padding:14px 12px 18px}.ptp-foot[_ngcontent-%COMP%]{padding:10px 14px}}']})}}return C})()},66464:(W,R,_)=>{_.d(R,{a_:()=>nt,hs:()=>ct,j8:()=>et});var c=_(65879),O=_(35420),A=_(72901),z=_(96814),v=_(28016);const T=["chipsRow"];function t(x,E){1&x&&c._UZ(0,"span",10)}function F(x,E){1&x&&(c.TgZ(0,"span",15)(1,"span",16),c._uU(2,"workspace_premium"),c.qZA(),c._uU(3,"Angler Pro"),c.qZA())}function h(x,E){if(1&x&&(c.ynx(0),c.TgZ(1,"span",19),c._uU(2),c.qZA(),c.BQk()),2&x){const b=c.oxw(3);c.xp6(2),c.hij("",b.eyebrowPrefix," \xb7 ")}}function P(x,E){if(1&x&&(c.TgZ(0,"span",17),c.YNc(1,h,3,1,"ng-container",18),c._uU(2),c.qZA()),2&x){const b=c.oxw(2);c.xp6(1),c.Q6J("ngIf",b.eyebrowPrefix),c.xp6(1),c.Oqu(b.eyebrowSection)}}function u(x,E){if(1&x&&(c.TgZ(0,"span",20),c._uU(1),c.qZA()),2&x){const b=c.oxw(2);c.xp6(1),c.Oqu(b.context)}}function N(x,E){if(1&x&&(c.TgZ(0,"div",11),c.YNc(1,F,4,0,"span",12),c.YNc(2,P,3,2,"span",13),c.YNc(3,u,2,1,"span",14),c.Hsn(4,1),c.qZA()),2&x){const b=c.oxw();c.xp6(1),c.Q6J("ngIf",b.showProEyebrow),c.xp6(1),c.Q6J("ngIf",!b.showProEyebrow&&b.eyebrow),c.xp6(1),c.Q6J("ngIf",b.context)}}function e(x,E){if(1&x&&c._UZ(0,"wb-back",21),2&x){const b=c.oxw();c.Q6J("iconOnly",!0)("large",!0)("label",b.backLabel)("fallback",b.fallback)}}function I(x,E){if(1&x&&(c.TgZ(0,"span",22)(1,"span",16),c._uU(2),c.qZA()()),2&x){const b=c.oxw();c.Udp("background",b.tileGradient),c.xp6(2),c.Oqu(b.icon)}}function C(x,E){if(1&x&&(c.TgZ(0,"a",26),c._uU(1),c.qZA()),2&x){const b=E.$implicit,k=c.oxw(3);c.ekj("is-on",k.isOn(b.route)),c.Q6J("routerLink",b.route),c.uIk("aria-current",k.isOn(b.route)?"page":null),c.xp6(1),c.Oqu(b.label)}}function S(x,E){if(1&x&&(c.ynx(0),c.YNc(1,C,2,5,"a",25),c.BQk()),2&x){const b=c.oxw(2);c.xp6(1),c.Q6J("ngForOf",b.proSections)}}function w(x,E){if(1&x){const b=c.EpF();
1c.TgZ(0,"button",29),c.NdJ("click",function(){const B=c.CHM(b).$implicit,L=c.oxw(3);return c.KtG(L.goPro.emit(B))}),c.TgZ(1,"span",16),c._uU(2,"lock"),c.qZA(),c._uU(3),c.qZA()}if(2&x){const b=E.$implicit;c.xp6(3),c.hij("",b," ")}}function G(x,E){if(1&x){const b=c.EpF();c.ynx(0),c.YNc(1,w,4,1,"button",27),c.TgZ(2,"button",28),c.NdJ("click",function(){c.CHM(b);const Z=c.oxw(2);return c.KtG(Z.goPro.emit("Go Pro"))}),c._uU(3,"Go Pro"),c.qZA(),c.BQk()}if(2&x){const b=c.oxw(2);c.xp6(1),c.Q6J("ngForOf",b.tease)}}function Q(x,E){if(1&x&&(c.TgZ(0,"div",23,24),c.YNc(2,S,2,1,"ng-container",18),c.Hsn(3,2),c.YNc(4,G,4,1,"ng-container",18),c.qZA()),2&x){const b=c.oxw();c.xp6(2),c.Q6J("ngIf",b.showProNav),c.xp6(2),c.Q6J("ngIf",null==b.tease?null:b.tease.length)}}function j(x,E){1&x&&(c.TgZ(0,"div",30),c.Hsn(1,3),c.qZA())}const at=[[["","wbh-chip",""]],[["","wbh-context",""]],[["","wbh-chips",""]],[["","wbh-foot",""]]],st=["[wbh-chip]","[wbh-context]","[wbh-chips]","[wbh-foot]"];let et=(()=>{class x{static{this.\u0275fac=function(k){return new(k||x)}}static{this.\u0275dir=c.lG2({type:x,selectors:[["","wbh-chips",""]]})}}return x})(),nt=(()=>{class x{static{this.\u0275fac=function(k){return new(k||x)}}static{this.\u0275dir=c.lG2({type:x,selectors:[["","wbh-foot",""]]})}}return x})(),ct=(()=>{class x{constructor(b,k){this.router=b,this.auth=k,this.heading="",this.backLabel="Back to Angler Pro Home",this.fallback="/angler/premium-overview",this.showBack=!0,this.band=!1,this.proNav=!1,this.goPro=new c.vpe,this.proSections=[{label:"Today",route:"/angler/premium-overview"},{label:"Patterns",route:"/angler/patterns"},{label:"Bite",route:"/angler/bite-forecast"},{label:"Weather",route:"/angler/weather"},{label:"Lake",route:"/angler/lake-hub"},{label:"Baits",route:"/angler/baits"},{label:"Catches",route:"/angler/catch-log"},{label:"Membership",route:"/angler/premium"}],this.autoInk=!1}get isInk(){return this.skin?"ink"===this.skin:this.band||this.autoInk}get showProNav(){return this.isInk&&this.proNav}get showProEyebrow(){return this.isInk&&this.proNav}get eyebrowPrefix(){const b=(this.eyebrow||"").indexOf("\xb7");return b>0?this.eyebrow.slice(0,b).trim():null}get eyebrowSection(){const b=(this.eyebrow||"").indexOf("\xb7");return b>0?this.eyebrow.slice(b+1).trim():this.eyebrow||""}get tileGradient(){return`linear-gradient(135deg, ${this.tintPair[0]}, ${this.tintPair[1]})`}get tintPair(){return this.tint||["#2f80c8","#185fa5"]}get resolvedBandEnd(){return this.bandEnd?this.bandEnd:x.mixToInk(this.tintPair[1])}get resolvedGlow(){if(this.glow)return this.glow;const[b,k,Z]=x.toRgb(this.tintPair[0]);return`rgba(${b}, ${k}, ${Z}, 0.26)`}static toRgb(b){let k=(b||"").trim().replace("#","");3===k.length&&(k=k.split("").map(B=>B+B).join(""));const Z=parseInt(k,16);return Number.isNaN(Z)||6!==k.length?[47,128,200]:[Z>>16&255,Z>>8&255,255&Z]}static mixToInk(b){const[k,Z,B]=x.toRgb(b),L=[30,26,22],X=(tt,pt)=>Math.round(.28*tt+.72*pt);return"#"+[X(k,L[0]),X(Z,L[1]),X(B,L[2])].map(tt=>tt.toString(16).padStart(2,"0")).join("")}isOn(b){return this.router.url.split("?")[0].split("#")[0]===b}ngOnInit(){this.autoInk=this.router.url.startsWith("/angler")&&this.auth.isPremium()}ngAfterViewInit(){const b=this.chipsRow?.nativeElement,k=b?.querySelector(".is-on");b&&k&&(b.scrollLeft=Math.max(0,k.offsetLeft-(b.clientWidth-k.offsetWidth)/2))}static{this.\u0275fac=function(k){return new(k||x)(c.Y36(O.F0),c.Y36(A.e8))}}static{this.\u0275cmp=c.Xpm({type:x,selectors:[["wb-header"]],contentQueries:function(k,Z,B){if(1&k&&(c.Suo(B,et,5),c.Suo(B,nt,5)),2&k){let L;c.iGM(L=c.CRH())&&(Z.projectedChips=L.first),c.iGM(L=c.CRH())&&(Z.projectedFoot=L.first)}},viewQuery:function(k,Z){if(1&k&&c.Gf(T,5),2&k){let B;c.iGM(B=c.CRH())&&(Z.chipsRow=B.first)}},inputs:{heading:"heading",backLabel:"backLabel",fallback:"fallback",showBack:"showBack",icon:"icon",tint:"tint",skin:"skin",band:"band",bandEnd:"bandEnd",glow:"glow",eyebrow:"eyebrow",context:"context",proNav:"proNav",tease:"tease"},outputs:{goPro:"goPro"},ngContentSelectors:st,decls:12,vars:15,consts:[[1,"wbh"],["class","wbh-glow","aria-hidden","true",4,"ngIf"],["class","wbh-eyebrow",4,"ngIf"],[1,"wbh-row"],["class","wbh-back",3,"iconOnly","large","label","fallback",4,"ngIf"],["class","wbh-tile",3,"background",4,"ngIf"],[1,"wbh-title"],[1,"wbh-side"],["class","wbh-chips",4,"ngIf"],["class","wbh-foot",4,"ngIf"],["aria-hidden","true",1,"wbh-glow"],[1,"wbh-eyebrow"],["class","wbh-pro",4,"ngIf"],["class","wbh-eye",4,"ngIf"],["class","wbh-ctx",4,"ngIf"],[1,"wbh-pro"],[1,"material-symbols-outlined"],[1,"wbh-eye"],[4,"ngIf"],[1,"wbh-eye-pre"],[1,"wbh-ctx"],[1,"wbh-back",3,"iconOnly","large","label","fallback"],[1,"wbh-tile"],[1,"wbh-chips"],["chipsRow",""],["class","wbh-chip-nav",3,"routerLink","is-on",4,"ngFor","ngForOf"],[1,"wbh-chip-nav",3,"routerLink"],["class","wbh-chip-locked","type","button",3,"click",4,"ngFor","ngForOf"],["type","button",1,"wbh-chip-gopro",3,"click"],["type","button",1,"wbh-chip-locked",3,"click"],[1,"wbh-foot"]],template:function(k,Z){1&k&&(c.F$t(at),c.TgZ(0,"header",0),c.YNc(1,t,1,0,"span",1),c.YNc(2,N,5,3,"div",2),c.TgZ(3,"div",3),c.YNc(4,e,1,4,"wb-back",4),c.YNc(5,I,3,3,"span",5),c.TgZ(6,"h1",6),c._uU(7),c.qZA(),c.TgZ(8,"span",7),c.Hsn(9),c.qZA()(),c.YNc(10,Q,5,2,"div",8),c.YNc(11,j,2,0,"div",9),c.qZA()),2&k&&(c.Udp("--wbh-end",Z.isInk?Z.resolvedBandEnd:null)("--wbh-glow-tint",Z.isInk?Z.resolvedGlow:null),c.ekj("wbh-ink",Z.isInk)("wbh-paper",!Z.isInk),c.xp6(1),c.Q6J("ngIf",Z.isInk),c.xp6(1),c.Q6J("ngIf",Z.showProEyebrow||Z.eyebrow||Z.context),c.xp6(2),c.Q6J("ngIf",Z.showBack),c.xp6(1),c.Q6J("ngIf",Z.icon),c.xp6(2),c.Oqu(Z.heading),c.xp6(3),c.Q6J("ngIf",Z.showProNav||Z.projectedChips||(null==Z.tease?null:Z.tease.length)),c.xp6(1),c.Q6J("ngIf",Z.projectedFoot))},dependencies:[z.sg,z.O5,O.rH,v.O],styles:['.wbh[_ngcontent-%COMP%]{position:relative;overflow:hidden;border-radius:18px;padding:14px 16px 15px;margin-bottom:16px}.wbh-paper[_ngcontent-%COMP%]{background:var(--wb-surface);border:1px solid var(--wb-border)}@property --wbh-end{syntax: "<color>"; inherits: false; initial-value: #1c3a55;}@property --wbh-glow-tint{syntax: "<color>"; inherits: false; initial-value: rgba(56,189,248,.26);}.wbh-ink[_ngcontent-%COMP%]{color:#fff;background:linear-gradient(150deg,var(--wb-gold-ink) 0%,#232d3a 72%,var(--wbh-end, #1c3a55) 100%);transition:--wbh-end .4s ease,--wbh-glow-tint .4s ease}@media (min-width: 1024px){.wbh-ink[_ngcontent-%COMP%]{background:linear-gradient(150deg,var(--wb-gold-ink) 0%,#232d3a 55%,var(--wbh-end, #1c3a55) 100%)}.wbh-glow[_ngcontent-%COMP%]{top:-50px;right:-50px;width:220px;height:220px}}.wbh-eyebrow[_ngcontent-%COMP%]{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:24px}.wbh-pro[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--wb-gold, #e0b44c)}.wbh-pro[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:14px;font-variation-settings:"FILL" 1}.wbh-eye[_ngcontent-%COMP%]{font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.wbh-paper[_ngcontent-%COMP%] .wbh-eye[_ngcontent-%COMP%]{color:var(--wb-accent)}.wbh-ink[_ngcontent-%COMP%] .wbh-eye[_ngcontent-%COMP%]{color:#ffffffb8}.wbh-ctx[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.wbh-ink[_ngcontent-%COMP%] .wbh-ctx[_ngcontent-%COMP%]{color:#ffffff8c}.wbh-paper[_ngcontent-%COMP%] .wbh-ctx[_ngcontent-%COMP%]{color:#b4b2a9}.wbh-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;position:relative;z-index:1;margin-top:11px}.wbh-row[_ngcontent-%COMP%]:first-child{margin-top:0}.wbh-title[_ngcontent-%COMP%]{margin:0;font-size:21px;font-weight:800;letter-spacing:-.02em;line-height:1.15}.wbh-paper[_ngcontent-%COMP%] .wbh-title[_ngcontent-%COMP%]{color:var(--wb-text)}.wbh-ink[_ngcontent-%COMP%] .wbh-title[_ngcontent-%COMP%]{color:#fff}.wbh-tile[_ngcontent-%COMP%]{position:relative;flex:0 0 38px;width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 3px 8px #10203638,inset 0 1px #ffffff59}.wbh-tile[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:21px;color:#fff;position:relative;z-index:1}.wbh-tile[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-30%;bottom:-30%;left:-60%;width:45%;background:linear-gradient(105deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 100%);transform:skew(-18deg);animation:_ngcontent-%COMP%_wbh-glisten 4.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_wbh-glisten{0%{left:-60%}38%{left:130%}to{left:130%}}@media (prefers-reduced-motion: reduce){.wbh-tile[_ngcontent-%COMP%]:after{animation:none;display:none}}.wbh-glow[_ngcontent-%COMP%]{position:absolute;top:-34px;right:-34px;width:148px;height:148px;border-radius:50%;background:radial-gradient(circle,var(--wbh-glow-tint, rgba(56, 189, 248, .26)) 0%,rgba(0,0,0,0) 70%);pointer-events:none}.wbh-side[_ngcontent-%COMP%]{margin-left:auto;flex:0 0 auto}.wbh-ink[_ngcontent-%COMP%] .wb-back.wb-back--icon.wb-back--lg{background:rgba(255,255,255,.08);border-color:#ffffff2e;box-shadow:none;color:#fff}.wbh-ink[_ngcontent-%COMP%] .wb-back.wb-back--icon.wb-back--lg .material-symbols-outlined{color:#fff}.wbh-ink[_ngcontent-%COMP%] .wb-back.wb-back--icon.wb-back--lg:hover{background:rgba(255,255,255,.14)}.wbh-side[_ngcontent-%COMP%] .wbh-chip{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;line-height:1.2;white-space:nowrap;padding:6px 11px;border-radius:999px;font-family:inherit}.wbh-side[_ngcontent-%COMP%] .wbh-chip .material-symbols-outlined{font-size:15px}.wbh-side[_ngcontent-%COMP%] .wbh-chip .wbh-chip-dot{width:7px;height:7px;border-radius:50%;background:currentColor}.wbh-ink[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16);color:#fff}.wbh-ink[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip.is-good{background:rgba(47,158,68,.16);border-color:#2f9e4466;color:#7fd692}.wbh-ink[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip.is-gold{background:rgba(224,180,76,.14);border-color:#e0b44c73;color:var(--wb-gold, #e0b44c)}.wbh-paper[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip{background:var(--wb-canvas-sunk);border:0;color:var(--wb-text)}.wbh-paper[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip .material-symbols-outlined{color:var(--wb-accent)}.wbh-paper[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip.is-good{background:var(--wb-success-soft);color:var(--wb-success)}.wbh-paper[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip.is-warn{background:var(--wb-danger-soft);color:var(--wb-danger)}.wbh-paper[_ngcontent-%COMP%] .wbh-side[_ngcontent-%COMP%] .wbh-chip.is-gold{background:var(--wb-warning-soft);color:var(--wb-warning)}.wbh-eyebrow[_ngcontent-%COMP%] .wbh-locpill{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;line-height:1.2;white-space:nowrap;padding:5px 11px;border-radius:999px;cursor:pointer;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);color:#fff;font-family:inherit}.wbh-eyebrow[_ngcontent-%COMP%] .wbh-locpill .material-symbols-outlined{font-size:14px}.wbh-eyebrow[_ngcontent-%COMP%] .wbh-locpill:hover{background:rgba(255,255,255,.14)}.wbh-eyebrow[_ngcontent-%COMP%] .wbh-locpill:active{transform:scale(.98)}.wbh-chips[_ngcontent-%COMP%]{position:relative;z-index:1;display:flex;align-items:center;gap:6px;margin-top:12px}.wbh-ink[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%]{margin-top:13px}.wbh-chips[_ngcontent-%COMP%] [wbh-chips]{display:contents}.wbh-chip-nav[_ngcontent-%COMP%], .wbh-chip-locked[_ngcontent-%COMP%], .wbh-chip-gopro[_ngcontent-%COMP%], .wbh-chips[_ngcontent-%COMP%] .wbh-tab{flex:none;white-space:nowrap;font-size:12px;font-weight:700;line-height:1.2;padding:6px 13px;border-radius:999px;font-family:inherit;text-decoration:none;cursor:pointer}.wbh-chip-nav[_ngcontent-%COMP%]{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);color:#aab4bf}.wbh-chip-nav[_ngcontent-%COMP%]:hover{background:rgba(255,255,255,.12);color:#d3dae1}.wbh-chip-nav.is-on[_ngcontent-%COMP%]{font-weight:800;background:rgba(224,180,76,.16);border-color:#e0b44c80;color:var(--wb-gold, #e0b44c)}.wbh-paper[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab{background:var(--wb-surface);border:1px solid var(--wb-border);color:var(--wb-text-2)}.wbh-paper[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab:hover{border-color:#d4d2c9;color:var(--wb-text)}.wbh-paper[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab.is-on{font-weight:800;background:var(--wb-accent);border-color:var(--wb-accent);color:#fff}.wbh-ink[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);color:#aab4bf}.wbh-ink[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab:hover{background:rgba(255,255,255,.12);color:#d3dae1}.wbh-ink[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%] .wbh-tab.is-on{font-weight:800;background:rgba(224,180,76,.16);border-color:#e0b44c80;color:var(--wb-gold, #e0b44c)}.wbh-chip-locked[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;background:var(--wb-gold-soft);border:1px solid rgba(224,180,76,.55);color:var(--wb-warning)}.wbh-chip-locked[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:13px;font-variation-settings:"FILL" 1}.wbh-chip-locked[_ngcontent-%COMP%]:hover{background:#F5E6C4}.wbh-chip-gopro[_ngcontent-%COMP%]{font-weight:800;background:var(--wb-gold);border:1px solid var(--wb-gold);color:var(--wb-ink)}.wbh-chip-gopro[_ngcontent-%COMP%]:hover{background:#E8C266}.wbh-foot[_ngcontent-%COMP%]{position:relative;z-index:1;margin-top:15px;padding-top:14px;border-top:1px solid rgba(0,0,0,.08)}.wbh-ink[_ngcontent-%COMP%] .wbh-foot[_ngcontent-%COMP%]{border-top-color:#ffffff1a}.wbh-foot[_ngcontent-%COMP%] [wbh-foot]{display:contents}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar{display:flex;align-items:center;justify-content:space-between;gap:12px}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar-name{margin:0;min-width:0;font-size:21px;font-weight:800;letter-spacing:-.02em;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar-change{flex-shrink:0;display:inline-flex;align-items:center;gap:5px;padding:6px 12px 6px 9px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);color:#cdd6e0;font-family:inherit;font-size:12px;font-weight:700;white-space:nowrap;text-decoration:none;cursor:pointer}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar-change .material-symbols-outlined{font-size:16px;color:#e0b44c}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar-change:hover{background:rgba(255,255,255,.12);color:#fff}.wbh-foot[_ngcontent-%COMP%] .wbh-lakebar-change:focus-visible{outline:2px solid #e0b44c;outline-offset:2px}@media (max-width: 639.98px){.wbh[_ngcontent-%COMP%]{border-radius:0;margin:calc(-1 * var(--wbh-bleed-t, 14px)) calc(-1 * var(--wbh-bleed-x, 12px)) 16px;padding:12px 14px 13px}.wbh-paper[_ngcontent-%COMP%]{border:0;border-bottom:1px solid var(--wb-border);padding-bottom:11px}.wbh-eye[_ngcontent-%COMP%]{font-size:9.5px}.wbh-eye-pre[_ngcontent-%COMP%]{display:none}.wbh-ctx[_ngcontent-%COMP%]{font-size:10px}.wbh-row[_ngcontent-%COMP%]{margin-top:10px;gap:9px}.wbh-title[_ngcontent-%COMP%]{font-size:19px}.wbh-tile[_ngcontent-%COMP%]{flex-basis:34px;width:34px;height:34px;border-radius:10px}.wbh-tile[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:19px}.wbh-side[_ngcontent-%COMP%] .wbh-chip{font-size:11px;padding:5px 10px}.wbh-side[_ngcontent-%COMP%] .wbh-chip .material-symbols-outlined{font-size:13px}.wbh-chips[_ngcontent-%COMP%]{margin:10px -14px 0;padding:0 14px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}.wbh-chips[_ngcont
1ent-%COMP%]::-webkit-scrollbar{display:none}.wbh-ink[_ngcontent-%COMP%] .wbh-chips[_ngcontent-%COMP%]{margin-top:12px}.wbh-ink[_ngcontent-%COMP%] .wbh-back[_ngcontent-%COMP%]{display:none}.wbh-foot[_ngcontent-%COMP%]{margin-top:12px;padding-top:11px}}']})}}return x})()},12338:(W,R,_)=>{_.d(R,{j:()=>t});var c=_(65879),O=_(96814),A=_(56223);function z(F,h){if(1&F&&(c.TgZ(0,"div",10),c._uU(1),c.qZA()),2&F){const P=c.oxw();c.xp6(1),c.lnq(" Showing ",P.rangeStart,"\u2013",P.rangeEnd," of ",P.total," ")}}function v(F,h){1&F&&(c.TgZ(0,"div",10),c._uU(1,"No results"),c.qZA())}function T(F,h){if(1&F&&(c.TgZ(0,"option",11),c._uU(1),c.qZA()),2&F){const P=h.$implicit;c.Q6J("ngValue",P),c.xp6(1),c.hij("",P," / page")}}let t=(()=>{class F{constructor(){this.page=1,this.pageSize=25,this.total=0,this.pageSizeOptions=[10,25,50,100],this.pageChange=new c.vpe,this.pageSizeChange=new c.vpe}get totalPages(){return this.total&&this.pageSize?Math.max(1,Math.ceil(this.total/this.pageSize)):1}get rangeStart(){return this.total?(this.page-1)*this.pageSize+1:0}get rangeEnd(){return Math.min(this.page*this.pageSize,this.total)}get canPrev(){return this.page>1}get canNext(){return this.page<this.totalPages}prev(){this.canPrev&&this.pageChange.emit(this.page-1)}next(){this.canNext&&this.pageChange.emit(this.page+1)}onSizeChange(P){const u="string"==typeof P?parseInt(P,10):P;u&&u!==this.pageSize&&this.pageSizeChange.emit(u)}static{this.\u0275fac=function(u){return new(u||F)}}static{this.\u0275cmp=c.Xpm({type:F,selectors:[["admin-grid-pagination"]],inputs:{page:"page",pageSize:"pageSize",total:"total",pageSizeOptions:"pageSizeOptions"},outputs:{pageChange:"pageChange",pageSizeChange:"pageSizeChange"},decls:15,vars:8,consts:[[1,"grid-pagination"],["class","range-label",4,"ngIf"],[1,"page-controls"],["type","button","aria-label","Previous page",1,"pg-btn",3,"disabled","click"],[1,"material-symbols-outlined"],[1,"page-of"],["type","button","aria-label","Next page",1,"pg-btn",3,"disabled","click"],[1,"size-control"],["aria-label","Page size",1,"size-select",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"range-label"],[3,"ngValue"]],template:function(u,N){1&u&&(c.TgZ(0,"div",0),c.YNc(1,z,2,3,"div",1),c.YNc(2,v,2,0,"div",1),c.TgZ(3,"div",2)(4,"button",3),c.NdJ("click",function(){return N.prev()}),c.TgZ(5,"span",4),c._uU(6,"chevron_left"),c.qZA()(),c.TgZ(7,"div",5),c._uU(8),c.qZA(),c.TgZ(9,"button",6),c.NdJ("click",function(){return N.next()}),c.TgZ(10,"span",4),c._uU(11,"chevron_right"),c.qZA()()(),c.TgZ(12,"div",7)(13,"select",8),c.NdJ("ngModelChange",function(I){return N.onSizeChange(I)}),c.YNc(14,T,2,2,"option",9),c.qZA()()()),2&u&&(c.xp6(1),c.Q6J("ngIf",N.total>0),c.xp6(1),c.Q6J("ngIf",!N.total),c.xp6(2),c.Q6J("disabled",!N.canPrev),c.xp6(4),c.AsE("",N.page," / ",N.totalPages,""),c.xp6(1),c.Q6J("disabled",!N.canNext),c.xp6(4),c.Q6J("ngModel",N.pageSize),c.xp6(1),c.Q6J("ngForOf",N.pageSizeOptions))},dependencies:[O.sg,O.O5,A.YN,A.Kr,A.EJ,A.JJ,A.On],styles:["[_nghost-%COMP%]{display:block}.grid-pagination[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 4px 4px;flex-wrap:wrap}.range-label[_ngcontent-%COMP%]{font-size:12.5px;color:#6b7280;font-variant-numeric:tabular-nums}.page-controls[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;padding:2px}.pg-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:transparent;border:none;border-radius:6px;color:#4b5563;cursor:pointer;transition:background .12s,color .12s}.pg-btn[_ngcontent-%COMP%] .material-symbols-outlined[_ngcontent-%COMP%]{font-size:18px}.pg-btn[_ngcontent-%COMP%]:hover:not([disabled]){background:#f3f4f6;color:#111827}.pg-btn[disabled][_ngcontent-%COMP%]{color:#d1d5db;cursor:not-allowed}.page-of[_ngcontent-%COMP%]{font-size:12.5px;color:#4b5563;font-variant-numeric:tabular-nums;padding:0 8px}.size-control[_ngcontent-%COMP%]{display:inline-flex}.size-select[_ngcontent-%COMP%]{appearance:none;-webkit-appearance:none;background:#ffffff;border:1px solid #e5e7eb;border-radius:8px;padding:6px 26px 6px 10px;font-size:12.5px;color:#374151;cursor:pointer;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236b7280' d='M5 6 0 0h10z'/></svg>\");background-repeat:no-repeat;background-position:right 8px center;font-family:inherit}.size-select[_ngcontent-%COMP%]:focus{outline:none;border-color:#2563eb}"],changeDetection:0})}}return F})()},4312:(W,R,_)=>{_.d(R,{k:()=>T});var c=_(69862),O=_(10708),A=_(55546),z=_(65879),v=_(32333);let T=(()=>{class t{constructor(h,P){this.httpClient=h,this._authService=P,this._route="/api/square/",this.headerOptions={headers:new c.WM({"Content-Type":"application/json"})}}checkEligibility(h){return(0,O.lastValueFrom)(this.httpClient.get(this._route+"eligibility/"+h))}createPaymentLink(h){return(0,O.lastValueFrom)(this.httpClient.post(this._route+"create-payment-link",JSON.stringify(h),this.headerOptions))}paymentStatus(h){return(0,O.lastValueFrom)(this.httpClient.get(this._route+"payment-status/"+h))}disconnect(h){return(0,O.lastValueFrom)(this.httpClient.post(this._route+"disconnect/"+h,JSON.stringify({}),this.headerOptions))}startConnect(h){const P=`${this._route}oauth/start/${h}?token=${encodeURIComponent(this._authService.getToken()||"")}`;window.location.href=P}openPaymentLink(h){(0,A.k)(h)||(window.location.href=h)}static{this.\u0275fac=function(P){return new(P||t)(z.LFG(c.eN),z.LFG(v.e))}}static{this.\u0275prov=z.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})()},91236:(W,R,_)=>{_.d(R,{j:()=>A,p:()=>O});var c=_(16368);function O(){return typeof window>"u"?[]:[{family:"Archivo",src:`url(${(0,c.Lv)("/assets/css/fonts/Archivo.woff2")})`,weight:"400"}]}const A='Archivo, system-ui, -apple-system, "Segoe UI", sans-serif'},61247:(W,R,_)=>{_.d(R,{J:()=>N});var c="https://js.stripe.com/v3",O=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,A="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",t=null,P=Promise.resolve().then(function(){return I=null,null!==t||(t=new Promise(function(C,S){if(typeof window>"u"||typeof document>"u")C(null);else if(window.Stripe&&I&&console.warn(A),window.Stripe)C(window.Stripe);else try{var w=function(){for(var I=document.querySelectorAll('script[src^="'.concat(c,'"]')),C=0;C<I.length;C++){var S=I[C];if(O.test(S.src))return S}return null}();w&&I?console.warn(A):w||(w=function(I){var C=I&&!I.advancedFraudSignals?"?advancedFraudSignals=false":"",S=document.createElement("script");S.src="".concat(c).concat(C);var w=document.head||document.body;if(!w)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return w.appendChild(S),S}(I)),w.addEventListener("load",function(){window.Stripe?C(window.Stripe):S(new Error("Stripe.js not available"))}),w.addEventListener("error",function(){S(new Error("Failed to load Stripe.js"))})}catch(G){return void S(G)}})),t;var I}),u=!1;P.catch(function(e){u||console.warn(e)});var N=function(){for(var I=arguments.length,C=new Array(I),S=0;S<I;S++)C[S]=arguments[S];u=!0;var w=Date.now();
1return P.then(function(G){return function(I,C,S){if(null===I)return null;var w=I.apply(void 0,C);return function(I,C){!I||!I._registerWrapper||I._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:C})}(w,S),w}(G,C,w)})}}}]);
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.