1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a1a74312-617d-58e8-81f1-d2e9576b90bc")}catch(e){}}(); 3import{a as At}from"./chunk-EP32VYWY.js";import{a as Vt,b as Lt}from"./chunk-BALVIWJK.js";import{a as Nt}from"./chunk-ZIYBDEB4.js";import{a as Bt}from"./chunk-NJRBCB6J.js";import"./chunk-OXCZUTFN.js";import{a as Pt,b as It}from"./chunk-W5TUM65A.js";import{a as Ot}from"./chunk-AJDLWPVD.js";import{a as Ft}from"./chunk-M4ZBF6OL.js";import"./chunk-2H6C5WXZ.js";import{a as Rt}from"./chunk-UDCTPCQG.js";import{a as kt}from"./chunk-MYL2H5NC.js";import{b as Mt}from"./chunk-HIIYI656.js";import{a as Et}from"./chunk-OQPOJZ46.js";import{a as wt}from"./chunk-PVOMZEKD.js";import"./chunk-5DR2TZCK.js";import"./chunk-VOB3J7UR.js";import{a as vt,b as bt,c as Tt}from"./chunk-XHPBKMRW.js";import{a as St,b as yt}from"./chunk-FMAAPPZH.js";import"./chunk-B36LD7HJ.js";import{a as xt}from"./chunk-VAZWI6EK.js";import{a as Dt}from"./chunk-ZN3PVEIW.js";import"./chunk-K5PPCAPC.js";import"./chunk-Z6USEE7H.js";import"./chunk-LHPVZF3V.js";import"./chunk-2M3QETKK.js";import"./chunk-INEWE6SG.js";import"./chunk-IKEJPASG.js";import"./chunk-HVR6QYVL.js";import"./chunk-2JF74RQL.js";import"./chunk-I7BLO743.js";import"./chunk-DF7HIBO6.js";import"./chunk-PVICISUF.js";import"./chunk-ZXVXVPQZ.js";import{a as ot,b as at,c as rt,h as lt}from"./chunk-TMNV4PDT.js";import{a as st,b as dt,c as mt,e as pt,f as ct,h as ut,i as _t,k as ft,l as gt,n as ht,p as Ct}from"./chunk-IZJQTZVB.js";import"./chunk-77KO6I45.js";import"./chunk-R7MSJQOC.js";import"./chunk-6HTRP6U7.js";import"./chunk-BSKHYKXK.js";import"./chunk-I5X7DE55.js";import"./chunk-ETZRMDHS.js";import"./chunk-NPR23P7I.js";import"./chunk-BVS47MGJ.js";import"./chunk-WDJPTZC5.js";import{a as Xe}from"./chunk-XZFXRJRY.js";import{b as ce,d as N}from"./chunk-AAFBOZHS.js";import"./chunk-T5Q4IEHB.js";import"./chunk-A7W5NRHC.js";import"./chunk-NTJ4CINI.js";import"./chunk-6UNLROVI.js";import"./chunk-XBHOMARE.js";import{a as et,c as tt,d as nt,e as it}from"./chunk-C5T7GUT6.js";import"./chunk-DSHWJW7U.js";import{a as de}from"./chunk-FLZNG7WM.js";import{b as se}from"./chunk-Y53ZYOIU.js";import"./chunk-3YM57F2T.js";import"./chunk-MQQUES44.js";import"./chunk-4OKMPB3H.js";import{a as L}from"./chunk-AGVOJNE2.js";import{a as Qe,b as Ze,c as Je}from"./chunk-HJXQJEZE.js";import"./chunk-I664YVIA.js";import"./chunk-YSTTJCSR.js";import{c as le}from"./chunk-CN4EGA4I.js";import{c as qe,f as re}from"./chunk-Z5M2FKAZ.js";import"./chunk-5NDSS4DO.js";import"./chunk-TTUVP5SZ.js";import"./chunk-5CMUHLSG.js";import"./chunk-TNAGEFXD.js";import"./chunk-YH4N3M4B.js";import"./chunk-BHOSW24E.js";import"./chunk-56LBQIQP.js";import"./chunk-IKWIL4NU.js";import{a as Ge}from"./chunk-5K5PYV5V.js";import{a as ie}from"./chunk-TDGVUJZJ.js";import{a as G,b as Y,d as I,e as q,f as Q,g as Z,h as J,i as X}from"./chunk-MWF7JXGK.js";import{b as Ye}from"./chunk-UJXOZNZV.js";import{a as oe,b as ae}from"./chunk-KS3Q7H57.js";import"./chunk-DAOAKQM2.js";import"./chunk-MGCQ5S6F.js";import"./chunk-MJXNRHWH.js";import"./chunk-BUOPWRDV.js";import{d as ze,e as Ke}from"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import{b as He,d as je}from"./chunk-CNRKNNWP.js";import{d as Ae}from"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import{a as $e}from"./chunk-5SJALNJN.js";import{a as Be,d as Ve,e as Le,i as Ne}from"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-LXBG4CPT.js";import"./chunk-56KVT3OQ.js";import{D as Oe,H as ne,b as Ie,g as ee,n as te}from"./chunk-MF7VZYLI.js";import{a as O,b as A,e as B}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import{a as Ue,b as We}from"./chunk-B5YZVWIB.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";import{x as Pe}from"./chunk-VO633UWN.js";import{e as j,f as Fe}from"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import{g as be,j as Te,k as Me,p as we}from"./chunk-NK2KZLT6.js";import"./chunk-MU5APV2L.js";import"./chunk-KRFZY2QT.js";import{a as Re,b as ke}from"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import{a as Ee}from"./chunk-BWICLBYB.js";import"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import{B as Se,E as ye,L as ve}from"./chunk-746D4QTP.js";import{Ac as g,Dc as m,Ib as w,Mb as fe,Nc as K,Ob as y,Pc as he,Sc as s,Tc as v,Ua as _e,Uc as S,Yc as k,Zc as F,_c as P,ac as ge,cc as _,cd as Ce,dc as f,dd as me,ed as De,gc as E,hc as R,hd as pe,ic as u,id as xe,jc as i,kc as o,lb as z,lc as p,nd as M,pc as b,pd as H,qa as h,qb as a,qc as T,qd as V,uc as x,va as C,w as ue,wa as D}from"./chunk-BZJI6Z2X.js";import{g as W}from"./chunk-CS7K6LXP.js";function Qt(t,l){t&1&&(i(0,"div",4),p(1,"mat-spinner",7),o())}function Zt(t,l){t&1&&(i(0,"p",5),s(1,"You do not have permission to reassign this donation."),o())}function Jt(t,l){if(t&1&&(i(0,"p",5),s(1),o()),t&2){let e=m();a(),v(e.orderPermissions==null?null:e.orderPermissions.change_donation_fundraiser_ineligible_reason)}}function Xt(t,l){if(t&1&&(i(0,"p",18),s(1),o()),t&2){let e=m(3);a(),S("Selected: ",e.selectedFundraiserLabel)}}function en(t,l){if(t&1){let e=x();i(0,"app-story-selector",17),g("selectedItem",function(n){C(e);let d=m(2);return D(d.onFundraiserSelected(n))}),o(),_(1,Xt,2,1,"p",18)}if(t&2){let e=m(2);u("searchParams",e.fundraiserSearchParams),a(),f(e.selectedFundraiser!=null&&e.selectedFundraiser.title?1:-1)}}function tn(t,l){t&1&&(i(0,"p",16),s(1,"This donation is already credited to the organization main page."),o())}function nn(t,l){if(t&1){let e=x();i(0,"p",8),s(1," Use if a donation appears on the wrong fundraiser page. This updates reporting and leaderboard totals. It does not refund or re-charge the donor. See more details "),i(2,"a",9),s(3," here. "),o()(),i(4,"p",10)(5,"span",8),s(6,"Currently credited to:"),o(),p(7,"br"),i(8,"strong"),s(9),o()(),i(10,"mat-radio-group",11),g("ngModelChange",function(n){C(e);let d=m();return D(d.onFundraiserTargetTypeChange(n))}),i(11,"mat-radio-button",12),s(12," Organization main donation page "),p(13,"i",13),o(),i(14,"mat-radio-button",14),s(15," Select a fundraiser page "),p(16,"i",15),o()(),_(17,en,2,2),_(18,tn,2,0,"p",16)}if(t&2){let e=m();a(9),v(e.currentCreditedPageLabel),a(),u("ngModel",e.fundraiserTargetType),a(7),f(e.fundraiserTargetType==="fundraiser"?17:-1),a(),f(!e.canSubmitFundraiserChange&&e.fundraiserTargetType==="org_main"&&!(!(e.orderDetails==null||e.orderDetails.donation_details==null)&&e.orderDetails.donation_details.story_name)?18:-1)}}function on(t,l){if(t&1){let e=x();i(0,"mat-dialog-actions",6)(1,"button",19),s(2," Cancel "),o(),i(3,"button",20),g("click",function(){C(e);let n=m();return D(n.onSubmit())}),s(4," Save "),o()()}if(t&2){let e=m();a(3),u("disabled",!e.canSubmitFundraiserChange||e.submitting)("active",e.submitting)}}function $t(t){if(!t?.title)return"";let l=t.details?.for_label||"";return l.startsWith("Team for")||l.startsWith("Team ")?`${t.title} \u2014 Team`:l.startsWith("Event for")||l.startsWith("Event ")?`${t.title} \u2014 Event`:t.title}var zt=(()=>
3{class t{donationDetailsService=h(Lt);dialog=h(I);snackbar=h(le);dialogRef=h(G);dialogData=h(Y);loading=!0;submitting=!1;orderDetails;orderPermissions;fundraiserSearchParams={};fundraiserTargetType="fundraiser";selectedFundraiser=null;currentCreditedPageLabel="Organization main donation page";selectedFundraiserLabel="";canSubmitFundraiserChange=!1;ngOnInit(){this.donationDetailsService.getFundraiserReassign(this.dialogData.orderId).subscribe({next:e=>{this.orderDetails={id:e.order_id,donation_details:e.fundraiser_reassign},this.orderPermissions=e.permissions,this.initFundraiserChangeForm(),this.loading=!1},error:()=>{this.loading=!1,this.dialogRef.close(!1)}})}onFundraiserSelected(e){this.selectedFundraiser=e,this.updateFundraiserUiState()}onFundraiserTargetTypeChange(e){this.fundraiserTargetType=e,e==="org_main"&&(this.selectedFundraiser=null),this.updateFundraiserUiState()}onSubmit(){return W(this,null,function*(){if(!this.canSubmitFundraiserChange||this.submitting)return;if(this.submitting=!0,!(yield this.openFundraiserChangeConfirmationDialog(this.currentCreditedPageLabel,this.getSelectedTargetLabel(),this.orderPermissions?.is_recurring_donation,this.orderPermissions?.recurring_installment_count))){this.submitting=!1;return}this.donationDetailsService.setFundraiser(this.dialogData.orderId,{widget_urn:this.getSelectedTargetUrn()}).subscribe({next:r=>{this.submitting=!1;let n=this.getSelectedTargetLabel(),d=r.message||`This donation is now credited to ${n}. Refresh the page if totals have not updated yet.`;if(r.pending_count>0&&(d=`${d} Additional installments are updating in the background; refresh the report for updated totals.`),r.failures?.length){let c=r.failures.map(U=>`Order ${U.order_id}: ${U.message}`).join(" ");d=`${d} ${c}`}this.snackbar.open(d,"Ok"),this.dialogRef.close(!0)},error:()=>{this.submitting=!1}})})}initFundraiserChangeForm(){this.fundraiserSearchParams={org_id:this.orderDetails?.donation_details?.org_id,per_page:10,type:"fundraiserPicker",searchSortOrder:"title",widgetsOnly:!0,excludeTipFundraisers:!0},this.fundraiserTargetType="fundraiser",this.selectedFundraiser=null,this.updateFundraiserUiState()}getSelectedTargetUrn(){return this.fundraiserTargetType==="org_main"?this.orderDetails?.donation_details?.org_urn:this.selectedFundraiser?.urn}getSelectedTargetLabel(){return this.fundraiserTargetType==="org_main"?"Organization main donation page":$t(this.selectedFundraiser)}updateFundraiserUiState(){this.currentCreditedPageLabel=this.orderDetails?.donation_details?.credited_page_label||"Organization main donation page",this.selectedFundraiserLabel=$t(this.selectedFundraiser);let e=this.getSelectedTargetUrn();if(!e){this.canSubmitFundraiserChange=!1;return}if(this.fundraiserTargetType==="org_main"){this.canSubmitFundraiserChange=!!this.orderDetails?.donation_details?.story_name;return}this.canSubmitFundraiserChange=e!==this.orderDetails?.donation_details?.story_urn}openFundraiserChangeConfirmationDialog(e,r,n=!1,d){let c=`Are you sure you want to move this donation?<br><br><strong>From:</strong> ${e}<br><strong>To:</strong> ${r}<br><br>This will update your donation reports and any related campaign totals. The donor will not be charged again and will not receive a new receipt unless you send one separately.`;if(n){let Ht=d?`This will update ${d} installments. `:"";c=`This is a recurring donation. <strong>All installments</strong> in this series (past and future) will be credited to <strong>${r}</strong>. ${Ht}This will update your donation reports and campaign totals for each charge. <strong>Matching grants may change</strong> for past installments based on the new page. The donor will not be charged again.`}let U=this.dialog.open(L,{data:{title:"Are you sure?",content:c,cancelButtonText:"Cancel",confirmButtonText:n?"Yes, move all installments":"Yes, move donation"}});return ue(U.afterClosed())}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=w({type:t,selectors:[["app-reassign-fundraiser-dialog"]],decls:10,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-close","","mat-icon-button","","aria-label","close",1,"dialog-close"],[1,"fa-solid","fa-times"],["appDialogScroll",""],[1,"text-center","py-4"],[1,"mb-0"],["align","end"],["diameter","40"],[1,"sm","text-secondary"],["href","https://support.mightycause.com/hc/en-us/articles/360017259552","target","_blank","rel","noopener noreferrer"],[1,"mb-2"],[1,"d-flex","flex-column","mb-3",3,"ngModelChange","ngModel"],["value","org_main"],["matTooltip","Use when the donation should not be tied to a specific fundraiser.","matTooltipClass","tooltip shadow-sm","aria-label","Use when the donation should not be tied to a specific fundraiser.","tabindex","0",1,"fa-solid","fa-info-circle","ms-1","cursor-pointer"],["value","fundraiser"],["matTooltip","Search and select a different fundraiser page to continue.","matTooltipClass","tooltip shadow-sm","aria-label","Search and select a different fundraiser page to continue.","tabindex","0",1,"fa-solid","fa-info-circle","ms-1","cursor-pointer"],[1,"sm","text-secondary","mb-0"],["label","Search fundraiser pages",3,"selectedItem","searchParams"],[1,"sm","mb-2"],["mat-button","","mat-dialog-close","","color","accent","type","button",1,"custom"],["mat-button","","color","primary","type","button","appLoadingBtn","",1,"custom",3,"click","disabled","active"]],template:function(r,n){r&1&&(i(0,"h3",0),s(1,"Reassign fundraiser"),o(),i(2,"button",1),p(3,"i",2),o(),i(4,"mat-dialog-content",3),_(5,Qt,2,0,"div",4)(6,Zt,2,0,"p",5)(7,Jt,2,1,"p",5)(8,nn,19,4),o(),_(9,on,5,2,"mat-dialog-actions",6)),r&2&&(a(5),f(n.loading?5:n.orderPermissions!=null&&n.orderPermissions.may_change_donation_fundraiser?n.orderPermissions!=null&&n.orderPermissions.change_donation_fundraiser_eligible?8:7:6),a(4),f(!n.loading&&(n.orderPermissions!=null&&n.orderPermissions.may_change_donation_fundraiser)&&(n.orderPermissions!=null&&n.orderPermissions.change_donation_fundraiser_eligible)?9:-1))},dependencies:[ne,ee,te,X,q,Q,J,Z,B,A,O,Je,Qe,Ze,de,se,ae,oe,ie,Ge,Rt],encapsulation:2})}return t})();function an(t,l){t&1&&(s(0," Note: The datetime provided in your file will be imported as "),p(1,"app-display-time-zone",15),s(2,". "))}function rn(t,l){t&1&&(s(0," Note: The datetime provided in your file will be imported as "),p(1,"app-display-time-zone",16),s(2,". "))}function ln(t,l){t&1&&(i(0,"p"),s(1,"You can import up to 1000 records at a time."),o())}var Kt=(()=>{class t{dialogRef=h(G);importLogService=h(Ft);userService=h(re);appService=h(Fe);cookieService=h(ke);dialog=h(I);user;licenseKey;importKey="offline_donations";environmentName=Ee.name;currentBrand;data=h(Y);constructor(){this.appService.currentBrand?.disable_offline_donations&&(this.dialog.open(qe,{data:{title:"Offline Donations Disabled",buttonText:"Ok",content:`Offline donation are disabled for ${this.appService.currentBrand.name}.`}}),this.dialogRef.close()),this.user=this.userService.currentUser,this.currentBrand=this.appService.currentBrand,this.licenseKey=this.importLogService.getLicenseKey(this.importKey)}onImportCompleted(e){e.success?this.createImportLog(e.data):this.dialogRef.close()}createImportLog(e){let r=e.import_id+"_"+this.importKey+this.importLogService.csvBoxFileExtensionFormat,d={import_type:"OfflineDonation",import_file_url:this.importLogService.generateImportFileURL(this.importKey,r),import_file_name:r,use_csvbox:!0};
3this.currentBrand?.id===1&&(d.user_tz=this.cookieService.get(Re.TimeZone)),this.importLogService.createImportLog(this.data.id,this.data.type,d).subscribe({next:()=>{this.dialogRef.close(!0)},error:()=>{this.dialogRef.close(!1)}})}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=w({type:t,selectors:[["app-import-offline-donation"]],decls:30,vars:5,consts:[["mat-dialog-title",""],["mat-dialog-close","","mat-icon-button","","aria-label","close",1,"dialog-close"],[1,"fa-solid","fa-times"],["appDialogScroll",""],[1,"row"],[1,"col-12"],[1,"col-12","col-md-6","text-center"],["mat-button","","color","accent","target","_self","href","https://d1byvvo791gp2e.cloudfront.net/public/assets/brands/1/Offline_donations_data_template_org_v4.csv",1,"custom"],[1,"left-icon"],["aria-hidden","true",1,"fa-solid","fa-download"],["href","https://support.mightycause.com/hc/en-us/articles/360035302271","target","_blank","mat-button","","color","accent","cdkFocusInitial","",1,"custom"],["aria-hidden","true",1,"far","fa-external-link-alt"],[1,"mt-3"],["align","end"],["buttonText","Select a file",3,"importCompleted","userId","environmentName","licenseKey"],["tz","browser"],["tz","brand"]],template:function(r,n){r&1&&(i(0,"h3",0),s(1,"Import Offline Donations"),o(),i(2,"button",1),p(3,"i",2),o(),i(4,"mat-dialog-content",3)(5,"div",4)(6,"div",5)(7,"p"),s(8," You can import data from all kinds of software or databases. First, make sure your data is formatted to match the data template provided in the link below. "),o()(),i(9,"div",6)(10,"a",7)(11,"span",8),p(12,"i",9),o(),i(13,"span"),s(14,"Mightycause data template"),o()()(),i(15,"div",6)(16,"a",10)(17,"span",8),p(18,"i",11),o(),s(19,"Guide to import "),o()(),i(20,"div",5)(21,"p",12),_(22,an,3,0)(23,rn,3,0),o()(),i(24,"div",5)(25,"p"),s(26," Once you begin an import, it can take several minutes for us to process your data. We'll let you know
3when it's ready. "),o(),_(27,ln,2,0,"p"),o()()(),i(28,"mat-dialog-actions",13)(29,"app-csvbox-upload",14),g("importCompleted",function(c){return n.onImportCompleted(c)}),o()()),r&2&&(a(22),f((n.currentBrand==null?null:n.currentBrand.id)===1?22:23),a(5),f(n.user.mighty_admin?-1:27),a(2),u("userId",n.importKey)("environmentName",n.environmentName)("licenseKey",n.licenseKey))},dependencies:[X,q,Q,J,Z,B,A,O,Pe,ie,xt,Ot],encapsulation:2})}return t})();var sn=()=>[5,10,25,100],dn=()=>["../disbursements"],mn=t=>["/user",t],$=(t,l)=>l.value;function pn(t,l){t&1&&(i(0,"p"),s(1," For details about donations included in a specific disbursement, "),i(2,"a",55),s(3,"visit the Disbursements area."),o()()),t&2&&(a(2),u("routerLink",pe(1,dn)))}function cn(t,l){if(t&1&&(i(0,"mat-option",22),s(1),o()),t&2){let e=l.$implicit;u("value",e.value),a(),S(" ",e.viewValue," ")}}function un(t,l){t&1&&(i(0,"p",59),s(1,"Date range cannot be greater than a year"),o())}function _n(t,l){if(t&1){let e=x();i(0,"div")(1,"mat-form-field")(2,"input",56),P("ngModelChange",function(n){C(e);let d=m();return F(d.report.range.fromDate,n)||(d.report.range.fromDate=n),D(n)}),g("dateChange",function(){C(e);let n=m();return D(n.updateFromDate())}),o(),p(3,"mat-datepicker-toggle",57)(4,"mat-datepicker",null,0),o(),i(6,"mat-form-field")(7,"input",58),P("ngModelChange",function(n){C(e);let d=m();return F(d.report.range.thruDate,n)||(d.report.range.thruDate=n),D(n)}),g("dateChange",function(){C(e);let n=m();return D(n.updateThruDate())}),o(),p(8,"mat-datepicker-toggle",57)(9,"mat-datepicker",null,1),o(),_(11,un,2,0,"p",59),o()}if(t&2){let e=K(5),r=K(10),n=m();a(2),u("matDatepicker",e),k("ngModel",n.report.range.fromDate),a(),u("for",e),a(4),u("matDatepicker",r),k("ngModel",n.report.range.thruDate),a(),u("for",r),a(3),f(n.dateRangeError?11:-1)}}function fn(t,l){if(t&1&&(i(0,"mat-option",22),s(1),o()),t&2){let e=l.$implicit;u("value",e.value),a(),S(" ",e.viewValue," ")}}function gn(t,l){if(t&1&&(i(0,"mat-option",22),s(1),o()),t&2){let e=l.$implicit;u("value",e.value),a(),S(" ",e.viewValue," ")}}function hn(t,l){if(t&1&&(i(0,"mat-option",22),s(1),o()),t&2){let e=l.$implicit;u("value",e.value),a(),S(" ",e.viewValue," ")}}function Cn(t,l){if(t&1){let e=x();i(0,"mat-form-field")(1,"mat-label"),s(2,"Campaign name"),o(),i(3,"mat-select",21),g("selectionChange",function(n){C(e);let d=m();return D(d.onCampaignNameChange(n))}),E(4,hn,2,2,"mat-option",22,$),o()()}if(t&2){let e=m();a(3),u("value",e.report.campaignName),a(),R(e.donationsCampaigns)}}function Dn(t,l){if(t&1&&(i(0,"mat-option",22),s(1),o()),t&2){let e=l.$implicit;u("value",e.value),a(),S(" ",e.viewValue," ")}}function xn(t,l){if(t&1){let e=x();i(0,"mat-icon",60),g("click",function(){C(e);let n=m();return D(n.clearSearchKw())}),o()}}function Sn(t,l){if(t&1&&(i(0,"span"),s(1),M(2,"centsToCurrency"),o()),t&2){let e=m(2);a(),v(V(2,1,e.metrics.net_amount_in_cents,"$","1.2-2"))}}function yn(t,l){t&1&&(i(0,"span",64),p(1,"i",68),o())}function vn(t,l){if(t&1&&(i(0,"span"),s(1),M(2,"number"),o()),t&2){let e=m(2);a(),v(H(2,1,e.metrics.no_of_donations,0))}}function bn(t,l){t&1&&(i(0,"span",64),p(1,"i",68),o())}function Tn(t,l){if(t&1&&(i(0,"span"),s(1),M(2,"centsToCurrency"),o()),t&2){let e=m(2);a(),v(V(2,1,e.metrics.donation_amount_in_cents,"$","1.2-2"))}}function Mn(t,l){t&1&&(i(0,"span",64),p(1,"i",68),o())}function wn(t,l){if(t&1&&(i(0,"span"),s(1),M(2,"centsToCurrency"),o()),t&2){let e=m(2);a(),v(V(2,1,e.metrics.offline_donations_in_cents||0,"$","1.2-2"))}}function En(t,l){t&1&&(i(0,"span",64),p(1,"i",68),o())}function Rn(t,l){if(t&1){let e=x();i(0,"div",8)(1,"div",61)(2,"div",62)(3,"p",63),_(4,Sn,3,5,"span")(5,yn,2,0,"span",64),o(),i(6,"p",65),s(7," Net Online "),i(8,"span",66),g("click",function(){C(e);let n=m();return D(n.netTotalBreakdownDialog())})("keydown.enter",function(){C(e);let n=m();return D(n.netTotalBreakdownDialog())}),p(9,"i",67),o()()()(),i(10,"div",61)(11,"div",62)(12,"p",63),_(13,vn,3,4,"span")(14,bn,2,0,"span",64),o(),i(15,"p",65),s(16,"Number of donations"),o()()(),i(17,"div",61)(18,"div",62)(19,"p",63),_(20,Tn,3,5,"span")(21,Mn,2,0,"span",64),o(),i(22,"p",65),s(23,"Online"),o()()(),i(24,"div",61)(25,"div",62)(26,"p",63),_(27,wn,3,5,"span")(28,En,2,0,"span",64),o(),i(29,"p",65),s(30,"Offline"),o()()()()}if(t&2){let e=m();a(4),f(e.spinner.metrics?5:4),a(9),f(e.spinner.metrics?14:13),a(7),f(e.spinner.metrics?21:20),a(7
3),f(e.spinner.metrics?28:27)}}function kn(t,l){t&1&&(i(0,"th",69),s(1,"Donor"),o())}function Fn(t,l){if(t&1){let e=x();i(0,"span")(1,"button",72),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.navigateToSupporterRecord(n.org_contact_id,n.user_short_token))}),s(2),o()()}if(t&2){let e=m().$implicit;a(2),S(" ",e.donor," ")}}function Pn(t,l){if(t&1&&(i(0,"span")(1,"span"),s(2),o()()),t&2){let e=m().$implicit;a(2),v(e.donor)}}function In(t,l){t&1&&(i(0,"span"),p(1,"i",73),o())}function On(t,l){if(t&1&&(i(0,"td",70)(1,"span",71),_(2,Fn,3,1,"span")(3,Pn,3,1,"span"),_(4,In,2,0,"span"),o()()),t&2){let e=l.$implicit;a(),u("matTooltipDisabled",!e.publicly_hidden),a(),f(e.user_short_token?2:3),a(2),f(e.publicly_hidden&&e.donor!=="ANONYMOUS"?4:-1)}}function An(t,l){t&1&&(i(0,"th",74),s(1,"Amount"),o())}function Bn(t,l){t&1&&(i(0,"span"),p(1,"i",77),o())}function Vn(t,l){if(t&1&&(i(0,"p",76),s(1),M(2,"date"),o()),t&2){let e=m().$implicit;a(),S("Refunded on ",H(2,1,e.refund_date,"MM-dd-yyyy"))}}function Ln(t,l){if(t&1&&(i(0,"p",76),s(1," Matched "),i(2,"span",78),p(3,"i",67),o()()),t&2){let e=m().$implicit,r=m();a(2),u("matTooltip",e.matching_grant_name.replace(r.matchingGrantReplaceRegexp,", "))}}function Nn(t,l){if(t&1&&(i(0,"td",75)(1,"span",71),_(2,Bn,2,0,"span"),s(3),M(4,"centsToCurrency"),o(),_(5,Vn,3,4,"p",76),_(6,Ln,4,1,"p",76),o()),t&2){let e=l.$implicit;a(),u("matTooltipDisabled",!e.hide_donation_amount),a(),f(e.hide_donation_amount?2:-1),a(),S(" ",V(4,5,e.donation_amount_in_cents,"$","1.2-2")," "),a(2),f(e.refund_date?5:-1),a(),f(e.matching_grant_name?6:-1)}}function $n(t,l){t&1&&(i(0,"th",69),s(1,"Date"),o())}function Un(t,l){if(t&1&&(i(0,"td",79),s(1),M(2,"date"),o()),t&2){let e=l.$implicit;a(),S(" ",H(2,1,e.donated_at,"MM-dd-yyyy")," ")}}function Wn(t,l){t&1&&(i(0,"th",80),s(1,"Type"),o())}function zn(t,l){if(t&1&&(i(0,"span",78),p(1,"i",81),o()),t&2){let e=m().$implicit;u("matTooltip",e.offline_note)}}function Kn(t,l){if(t&1&&(i(0,"td",79),s(1),_(2,zn,2,1,"span",78),o()),t&2){let e=l.$implicit;a(),S(" ",e.donation_type," "),a(),f(e.offline_note?2:-1)}}function Hn(t,l){t&1&&(i(0,"th",80),s(1,"Campaign"),o())}function jn(t,l){if(t&1&&(i(0,"a",82),s(1),o()),t&2){let e=m().$implicit;u("href",Ce(e.source_path),z),ge("aria-label",me("",e.source_title," (opens in new window)")),a(),S(" ",e.source_title," ")}}function Gn(t,l){if(t&1&&s(0),t&2){let e=m().$implicit;S(" ",e.source_title," ")}}function Yn(t,l){if(t&1&&(i(0,"td",70),_(1,jn,2,5,"a",82)(2,Gn,1,1),o()),t&2){let e=l.$implicit;a(),f(e.source_path?1:2)}}function qn(t,l){t&1&&(i(0,"th",80),s(1,"Campaign Type"),o())}function Qn(t,l){if(t&1&&(i(0,"td",70),s(1),o()),t&2){let e=l.$implicit;a(),v(e.source_type)}}function Zn(t,l){t&1&&(i(0,"th",80),s(1,"Email"),o())}function Jn(t,l){if(t&1&&(i(0,"td",70)(1,"a",83),s(2),o()()),t&2){let e=l.$implicit;a(),u("href",me("mailto:",e.email),z),a(),S(" ",e.email," ")}}function Xn(t,l){t&1&&(i(0,"th",80),p(1,"i",84),o())}function ei(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.resendReceipt(n))}),p(1,"mat-icon",93),i(2,"span"),s(3,"Resend receipt"),o()()}}function ti(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.deleteOfflineDonation(n.offline_donation_id))}),p(1,"mat-icon",94),i(2,"span"),s(3,"Delete"),o()()}}function ni(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.deleteOfflineOrder(n.order_id))}),p(1,"mat-icon",94),i(2,"span"),s(3,"Delete"),o()()}}function ii(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.reassignFundraiser(n))}),p(1,"mat-icon",95),i(2,"span"),s(3,"Reassign fundraiser"),o()()}}function oi(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.cancelRecurringDonation(n))}),p(1,"mat-icon",96),i(2,"span"),s(3,"Cancel recurring donation"),o()()}}function ai(t,l){if(t&1){let e=x();i(0,"button",92),g("click",function(){C(e);let n=m().$implicit,d=m();return D(d.refundDonation(n))}),p(1,"mat-icon",97),i(2,"span"),s(3,"Refund"),o()()}if(t&2){let e=m(2);he("text-admin",!e.orgSettings.stripe_connected)}}function ri(t,l){if(t&1&&(i(0,"a",90),p(1,"mat-icon",98),i(2,"span"),s(3,"Order details"),o()()),t&2){let e=m().$implicit,r=m();u("href",De("/brand/",r.brand.id,"/donations/",e.order_id),z)}}function li(t,l){if(t&1&&(i(0,"a",91),p(1,"mat-icon",99),i(2,"span"),s(3,"User profile link"),o()()),t&2){let e=m().$implicit;u("routerLink",xe(1,mn,e.user_short_token))}}function si(t,l){if(t&1&&(i(0,"td",70)(1,"div",null,2)(3,"button",85),p(4,"i",86),o(),i(5,"mat-menu",87,3),_(7,ei,4,0,"button",88),_(8,ti,4,0,"button",88),_(9,ni,4,0,"button",88),_(10,ii,4,0,"button",88),_(11,oi,4,0,"button",88),_(12,ai,4,2,"button",89),_(13,ri,4,3,"a",90),_(14,li,4,3,"a",91),o()()()),t&2){let e=l.$implicit,r=K(6),n=m();a(3),u("matMenuTriggerFor",r),a(4),f(e.order_id&&e.email!=="ANONYMOUS"&&e.donation_type!=="Offline"?7:-1),a(),f(e.offline_donation_id?8:-1),a(),f(e.order_id&&e.donation_type==="Offline"?9:-1),a(),f(e.order_id&&!e.offline_donation_id&&!e.is_tip_fundraiser_donation?10:-1),a(),f(n.canCancelRecurringDonation(e)?11:-1),a(),f(e.fully_refund
3able&&(n.orgSettings.stripe_connected||n.user.mighty_admin)&&!n.brand.allow_stripe_connect&&!n.brand.payment_account_id?12:-1),a(),f(!e.offline_donation_id&&n.user.mighty_admin&&e.order_id?13:-1),a(),f(!e.offline_donation_id&&n.user.mighty_admin&&e.user_short_token?14:-1)}}function di(t,l){t&1&&p(0,"tr",100)}function mi(t,l){t&1&&p(0,"tr",101)}function pi(t,l){t&1&&(i(0,"div",52)(1,"p"),s(2,"No results found."),o()())}function ci(t,l){t&1&&(i(0,"div",53)(1,"div",102),p(2,"mat-spinner",103),o()())}var Wo=(()=>{class t extends Bt{route=h(be);router=h(Te);offlineDonationService=h(Pt);userService=h(re);snackBar=h(le);downloadReportService=h(Mt);dialog=h(I);suggestedArticlesService=h(Dt);urn;user;org;orgSettings;donations;mcPermissions;pageLoading;dateRangeError=!1;spinnerObj={loading:!1};orderDetails;donationsColumns=["donor_name","amount","donated_at","donationType","campaign","campaignType","email","actions"];metrics;report={page:1,perPage:this.defaultPerPage,sortBy:"donated_at",sortOrder:"desc",processingEntities:"all",donationType:"all",campaignType:"all",campaignName:"all",donorName:"",range:{fromDate:null,thruDate:null,periodValue:null},minDonationAmount:"",maxDonationAmount:""};matchingGrantReplaceRegexp=new RegExp("</br>","g");unformattedDonationAmounts={min:null,max:null};invalidMinMaxDonationAmount=!1;maskAmountOptions={numeral:!0,numeralThousandsGroupStyle:"thousand",numeralPositiveOnly:!0};getReportSubscription;getMetricsSubscription;platformId=h(_e);constructor(){super(),this.appService.footer=!1,this.urn=this.route.snapshot.parent.params.urn,super.setUrn(this.urn),this.mcPermissions=this.appService.permissions,this.user=this.userService.currentUser,this.report.range=this.reportsService.setRangeFromPeriod("30days"),this.org=this.orgService.data,this.orgSettings=this.orgService.settings,this.brand=this.appService.currentBrand}ngOnInit(){ve(this.platformId)&&(this.route.queryParams.subscribe(e=>{this.handleQueryParams(e),this.updateReport()}),this.changeFilter.subscribe(e=>{this.processFilterChange(e.type,e.value)}),this.suggestedArticlesService.suggestedLabel="org-donations-report")}updateReport(){if(this.validateDonationAmounts(),this.invalidMinMaxDonationAmount){this.snackBar.open("Maximum donation amount must be greater than minimum donation amount.","Ok");return}this.getReportMetrics(),this.getReport()}updateFromDate(){let e=ce.fromObject({years:1}),r=this.report.range.fromDate,n=this.report.range.thruDate;if(this.isDiffBetweenDateRangeWithinDuration(r,n,e))this.dateRangeError=!1;else{this.dateRangeError=!0;return}this.getReportMetrics(),this.getReport()}updateThruDate(){let e=ce.fromObject({years:1}),r=this.report.range.fromDate,n=this.report.range.thruDate;if(this.isDiffBetweenDateRangeWithinDuration(r,n,e))this.dateRangeError=!1;else{this.dateRangeError=!0;return}this.getReportMetrics(),this.getReport()}clearAllFilters(){super.clearAllFilters(),this.report={page:1,perPage:this.defaultPerPage,sortBy:"donated_at",sortOrder:"desc",processingEntities:"all",donationType:"all",campaignType:"all",campaignName:"all",donorName:"",range:this.reportsService.setRangeFromPeriod("30days"),minDonationAmount:"",maxDonationAmount:""},this.unformattedDonationAmounts.min=null,this.unformattedDonationAmounts.max=null,this.updateReport()}addOfflineDonation(){if(!this.orgService.hasPlanFeature("offline_donation_management")){this.orgService.openAdvancedRequiredDialog(this.urn,"offline_donation_management");return}let e={urn:this.urn};this.dialog.open(It,{width:j.lg,data:e}).afterClosed().subscribe(n=>{n&&this.updateReport()})}deleteOfflineDonation(e){this.dialog.open(L,{data:{title:"Are you sure?",confirmButtonText:"Delete",cancelButtonText:"Cancel"}}).afterClosed().subscribe(n=>{if(n){let d={id:e,story_id:this.urn};this.offlineDonationService.deleteOfflineDonation(d).subscribe(c=>{c&&(this.snackBar.open("Offline Donation successfully deleted.","",{duration:5e3}),this.updateReport())})}})}deleteOfflineOrder(e){this.dialog.open(L,{data:{title:"Are you sure?",confirmButtonText:"Delete",cancelButtonText:"Cancel"}}).afterClosed().subscribe(n=>{n&&this.offlineDonationService.deleteOfflineOrder(e).subscribe(d=>{d&&(this.snackBar.open("Offline Donation successfully deleted.","",{duration:5e3}),this.updateReport())})})}importOfflineDonation(){if(!this.orgService.hasPlanFeature("import_offline_donations")){this.orgService.openAdvancedRequiredDialog(this.urn,"import_offline_donations");return}let e={id:this.org.id,type:this.org.type};this.dialog.open(Kt,{data:e})}refundDonation(e){let r={orderDetails:{fullName:e.donor,email:e.email,completedAt:e.donated_at,orderChargedAmount:e.charged_amount_in_cents/100,feesCovered:e.charged_amount_in_cents!==e.donation_amount_in_cents},orderId:e.order_id};this.dialog.open(Vt,{data:r}).afterClosed().subscribe(d=>{d&&this.updateReport()})}reassignFundraiser(e){let r={orderId:e.order_id};this.dialog.open(zt,{width:j.lg,data:r}).afterClosed().subscribe(n=>{n&&this.updateReport()})}resendReceipt(e){let r={urn:this.urn,advisorTemplateType:"approval_receipt_template",donation:e};this.dialog.open(Et,{data:r})}downloadDonationReports(){return W(this,null,function*(){if(!this.metrics){this.snackBar.open("Unable to download report. Please try again.","Ok",{duration:5e3});return}if(this.metrics.no_of_donations>this.mcPermissions.delayed_donation_report_trigger_limit){let e=this.reportDelta(),r=null;this.metrics.offline_donations_in_cents>0&&(r=!0),e.offline_report=r,this.dialog.open(wt,{data:{urn:this.urn,params:e,reportType:"donations"}})}else if(this.metrics.no_of_donations>0){let e=this.metrics.csv_download_url+encodeURI("&delay_report=false");window.open(e,"_self")}})}netTotalBreakdownDialog(){this.dialog.open(At,{data:{metrics:this.metrics}})}handleQueryParams(e){if(e.addOffline&&setTimeout(()=>{this.addOfflineDonation()}),e.reload,e.from,e.thru,e.donationType)switch(e.donationType){case"re
3curringDonations":this.report.donationType=e.donationType;break;case"onlineDonations":this.report.donationType=e.donationType;break;case"offlineDonations":this.report.donationType=e.donationType;break;case"refundedDonations":this.report.donationType=e.donationType;break;default:}e.download&&this.downloadReportService.download(this.urn,e.download)}getReport(){this.dateRangeError||(this.getReportSubscription&&this.getReportSubscription.unsubscribe(),this.spinner.data=!0,this.getReportSubscription=this.orgService.getDonationsReport(this.urn,this.reportDelta()).subscribe(e=>{this.donations=e,this.spinner.data=!1},()=>{this.spinner.data=!1}))}getReportMetrics(){this.dateRangeError||(this.getMetricsSubscription&&this.getMetricsSubscription.unsubscribe(),this.spinner.metrics=!0,this.getMetricsSubscription=this.orgService.getDonationsReportMetrics(this.urn,this.reportDelta()).subscribe(e=>{this.metrics=e,this.paymentProcessor.splice(1),this.metrics.processing_entities.forEach(r=>{this.paymentProcessor.push({viewValue:r.title,value:r.id})}),this.spinner.metrics=!1},()=>{this.spinner.metrics=!1}))}navigateToSupporterRecord(e,r){this.orgService.hasPlanFeature("contacts")||this.user.mighty_admin&&this.user.hasSuperPower?this.router.navigate(["../contacts",e,"summary"],{relativeTo:this.route,queryParams:{q:e}}):this.orgService.hasPlanFeature("view_donor_records")||this.user.mighty_admin&&this.user.hasSuperPower?this.router.navigate(["../supporters",r,"edit"],{relativeTo:this.route}):this.orgService.openAdvancedRequiredDialog(this.urn,"view_donor_records")}cancelRecurringDonation(e){let r=this.metrics?.cancellation_reason_options??[];if(!r.length){this.snackBar.open("Cancellation reasons are unavailable. Please refresh and try again.","",{duration:5e3});return}let n={urn:this.urn,scheduleId:e.schedule_id,donorName:e.donor,cancellationReasonOptions:r};this.dialog.open(Nt,{width:j.md,data:n}).afterClosed().subscribe(c=>{c==="success"&&this.updateReport()})}canCancelRecurringDonation(e){return!!(this.metrics?.may_cancel_recurring_donations&&e.donation_type==="Recurring"&&e.schedule_id&&e.recurring_schedule_active)}processFilterChange(e,r){switch(e){case"onTimePeriodChange":{this.report.page=1;let n={};r==="custom"&&(typeof this.report.range.fromDate=="string"?(n.fromDate=N.fromFormat(this.report.range.fromDate,"MM/dd/yyyy"),n.thruDate=N.fromFormat(this.report.range.thruDate,"MM/dd/yyyy")):(n.fromDate=this.report.range.fromDate,n.thruDate=this.report.range.thruDate)),this.report.range=this.reportsService.setRangeFromPeriod(r,n),this.updateReport();break}case"onCampaignTypeChange":this.report.page=1,this.report.campaignType=r,this.report.campaignName="all",this.updateReport();break;case"onCampaignNameChange":this.report.page=1,this.report.campaignName=r,this.updateReport();break;case"onDonationTypeChange":this.report.page=1,this.report.donationType=r,this.updateReport();break;case"onDonorNameChange":this.report.page=1,this.report.donorName=r,this.updateReport();break;case"onPaymentProcessorChange":this.report.page=1,this.report.processingEntities=r,this.updateReport();break;case"onPageChange":this.report.page=r.pageIndex+1,this.report.perPage=r.pageSize,this.getReport();break;case"onSortChange":this.report.sortBy=r.active,this.report.sortOrder=r.direction,this.getReport();break;case"onMinDonationAmtChange":this.report.page=1,this.unformattedDonationAmounts.min=r,this.updateReport();break;case"onMaxDonationAmtChange":this.report.page=1,this.unformattedDonationAmounts.max=r,this.updateReport();break;default:}}reportDelta(){let e={from_date:this.report.range.fromDate,thru_date:this.report.range.thruDate,with_processing_entity:this.report.processingEntities,with_donor_name:this.report.donorName};switch(this.unformattedDonationAmounts.min&&(e.with_min_amount_in_cents=this.unformattedDonationAmounts.min*100),this.unformattedDonationAmounts.max&&(e.with_max_amount_in_cents=this.unformattedDonationAmounts.max*100),N.isDateTime(e.from_date)&&(e.from_date=e.from_date.toFormat("MM/dd/yyyy")),N.isDateTime(e.thru_date)&&(e.thru_date=e.thru_date.toFormat("MM/dd/yyyy")),this.report.donationType){case"re
3curringDonations":e.only_recurring=!0;break;case"onlineDonations":e.only_online=!0;break;case"offlineDonations":e.only_offline=!0;break;case"refundedDonations":e.only_refunded=!0;break;default:}switch(this.report.campaignType){case"fundraisers":e.with_story_urn=this.report.campaignName;break;case"campaigns":e.with_campaign_urn=this.report.campaignName;break;case"events":e.with_event_urn=this.report.campaignName;break;case"giving_events":e.with_giving_event=this.report.campaignName;break;default:}return{page:this.report.page,per_page:this.report.perPage,sort_by:this.report.sortBy,sort_order:this.report.sortOrder,report_filter:JSON.stringify(e)}}validateDonationAmounts(){this.invalidMinMaxDonationAmount=!1,this.unformattedDonationAmounts.min&&this.unformattedDonationAmounts.max&&this.unformattedDonationAmounts.min>this.unformattedDonationAmounts.max&&(this.invalidMinMaxDonationAmount=!0)}static \u0275fac=function(r){return new(r||t)};static \u0275cmp=w({type:t,selectors:[["app-donations"]],features:[fe],decls:123,vars:27,consts:[["picker1",""],["picker2",""],["donationActionBtn",""],["donationActionMenu","matMenu"],[1,"min-vh-100"],[1,"container",3,"hidden"],["contentType","report",3,"changeContentLoading"],[1,"dashboard-container-fluid",3,"hidden"],[1,"row"],[1,"col-12"],[1,"d-flex","flex-wrap","justify-content-between","align-items-center","donations-header"],[1,"dashboard-heading","mb-3"],[1,"actions"],["mat-button","","color","accent",1,"custom",3,"click"],[1,"left-icon"],[1,"fa-solid","fa-cloud-download-alt"],[1,"fal","fa-file-import"],[1,"advanced-icon","ms-1","text-primary",3,"hidden"],[1,"fa-solid","fa-fire"],[1,"fal","fa-hand-holding-usd"],[1,"col-12","col-md-3"],[3,"selectionChange","value"],[3,"value"],["for","amount"],["matInput","","type","text","inputmode","numeric","pattern","[0-9.,]*",3,"ngModelChange","appMask","ngModel"],["matTextPrefix","",1,"text-secondary"],[1,"row","align-items-center"],[1,"col-12","col-md-4"],["type","text","matInput","","placeholder","Filter by donor",3,"ngModelChange","ngModel"],["matPrefix","","fontSet","fa-solid","fontIcon","fa-search"],["matSuffix","","fontSet","fa-solid","fontIcon","fa-times-circle"],[1,"col-12","col-md-8","text-end"],[1,"fa-solid","fa-eraser"],[1,"table-wrapper"],[1,"table-responsive"],["mat-table","","matSort","",3,"matSortChange","dataSource"],["matColumnDef","donor_name"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","style","direction: rtl",4,"matHeaderCellDef"],["mat-cell","","class","text-nowrap text-end",4,"matCellDef"],["matColumnDef","donated_at"],["mat-cell","","class","text-nowrap",4,"matCellDef"],["matColumnDef","donationType"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","campaign"],["matColumnDef","campaignType"],["matColumnDef","email"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"table-no-results"],[1,"update-overlay"],["showFirstLastButtons","",3,"page","length","pageSize","pageSizeOptions"],[3,"routerLink"],["matInput","","placeholder","Start date",3,"ngModelChange","dateChange","matDatepicker","ngModel"],["matSuffix","",3,"for"],["matInput","","placeholder","End date",3,"ngModelChange","dateChange","matDatepicker","ngModel"],[1,"sm","mb-0","text-danger"],["matSuffix","","fontSet","fa-solid","fontIcon","fa-times-circle",3,"click"],[1,"col-12","col-md-3","col-lg-2"],[1,"metrics-box","bg-white","shadow","text-center","py-3","px-2","mb-2"],[1,"h3","mb-0"],[1,"c-brand-theme"],[1,"sm","mb-0","text-secondary"],["tabindex","0","role","button","aria-label","Net total breakdown",1,"ms-1","cursor-pointer",3,"click","keydown.enter"],[1,"fal","fa-info-circle"],[1,"fas","fa-spinner","fa-spin"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["matTooltip","Hidden from public","matTooltipClass","tooltip shadow-sm",3,"matTooltipDisabled"],[1,"btn-link","p-0",3,"click"],[1,"fa-solid","fa-user-secret","ps-1"],["mat-header-cell","","mat-sort-header","",2,"direction","rtl"],["mat-cell","",1,"text-nowrap","text-end"],[1,"mb-0","xs"],[1,"fa-solid","fa-user-secret"],["matTooltipClass","tooltip shadow-sm",1,"ms-1",3,"matTooltip"],["mat-cell","",1,"text-nowrap"],["mat-header-cell",""],[1,"fal","fa-note"],["target","_blank",3,"href","aria-label"],[3,"href"],[1,"fal","fa-tools"],["mat-icon-button","","aria-label","Donation Actions","matTooltip","Options",1,"sm",3,"matMenuTriggerFor"],[1,"fas","fa-ellipsis-v"],[1,"auto-width","shadow-lg"],["mat-menu-item",""],["mat-menu-item","",3,"text-admin"],["mat-menu-item","","target","_blank","rel","noopener noreferrer","aria-label","Order details (opens in new window)",1,"text-admin",3,"href"],["mat-menu-item","","target","_blank","rel","noopener noreferrer","aria-label","User profile (opens in new window)",1,"text-admin",3,"routerLink"],["mat-menu-item","",3,"click"],["fontSet","fal","fontIcon","fa-receipt"],["fontSet","fal","fontIcon","fa-tras
3h-alt"],["fontSet","fal","fontIcon","fa-exchange-alt"],["fontSet","fa-solid","fontIcon","fa-ban"],["fontSet","fal","fontIcon","fa-undo"],["fontSet","fal","fontIcon","fa-barcode","aria-hidden","true"],["fontSet","fa-solid","fontIcon","fa-user","aria-hidden","true"],["mat-header-row",""],["mat-row",""],[1,"spinner"],["diameter","50"]],template:function(r,n){r&1&&(i(0,"div",4)(1,"div",5)(2,"app-org-content-loader",6),g("changeContentLoading",function(c){return n.pageLoading=!!c}),o()(),i(3,"div",7)(4,"div",8)(5,"div",9)(6,"div",10)(7,"h1",11),s(8,"Donations"),o(),i(9,"div",12)(10,"button",13),g("click",function(){return n.downloadDonationReports()}),i(11,"span",14),p(12,"i",15),o(),i(13,"span"),s(14,"Download"),o()(),i(15,"button",13),g("click",function(){return n.importOfflineDonation()}),i(16,"span",14),p(17,"i",16),o(),i(18,"span"),s(19,"Import offline donation"),o(),i(20,"span",17),p(21,"i",18),o()(),i(22,"button",13),g("click",function(){return n.addOfflineDonation()}),i(23,"span",14),p(24,"i",19),o(),i(25,"span"),s(26,"Add offline donation"),o(),i(27,"span",17),p(28,"i",18),o()()()(),_(29,pn,4,2,"p"),o()(),i(30,"div",8)(31,"div",20)(32,"mat-form-field")(33,"mat-label"),s(34,"Time period"),o(),i(35,"mat-select",21),g("selectionChange",function(c){return n.onTimePeriodChange(c)}),E(36,cn,2,2,"mat-option",22,$),o()(),_(38,_n,12,7,"div"),o(),i(39,"div",20)(40,"mat-form-field")(41,"mat-label"),s(42,"Donation type"),o(),i(43,"mat-select",21),g("selectionChange",function(c){return n.onDonationTypeChange(c)}),E(44,fn,2,2,"mat-option",22,$),o()()(),i(46,"div",20)(47,"mat-form-field")(48,"mat-label"),s(49,"Campaign type"),o(),i(50,"mat-select",21),g("selectionChange",function(c){return n.onCampaignTypeChange(c)}),E(51,gn,2,2,"mat-option",22,$),o()(),_(53,Cn,6,1,"mat-form-field"),o(),i(54,"div",20)(55,"mat-form-field")(56,"mat-label"),s(57,"Payment processor"),o(),i(58,"mat-select",21),g("selectionChange",function(c){return n.onPaymentProcessorChange(c)}),E(59,Dn,2,2,"mat-option",22,$),o()()()(),i(61,"div",8)(62,"div",20)(63,"mat-form-field")(64,"mat-label",23),s(65,"Min. donation"),o(),i(66,"input",24),P("ngModelChange",function(c){return F(n.report.minDonationAmount,c)||(n.report.minDonationAmount=c),c}),g("ngModelChange",function(c){return n.onMinDonationAmtChange.next(c)}),o(),i(67,"span",25),s(68,"$\xA0"),o()()(),i(69,"div",20)(70,"mat-form-field")(71,"mat-label",23),s(72,"Max. donation"),o(),i(73,"input",24),P("ngModelChange",function(c){return F(n.report.maxDonationAmount,c)||(n.report.maxDonationAmount=c),c}),g("ngModelChange",function(c){return n.onMaxDonationAmtChange.next(c)}),o(),i(74,"span",25),s(75,"$\xA0"),o()()()(),i(76,"div",26)(77,"div",27)(78,"mat-form-field")(79,"mat-label"),s(80,"Search report"),o(),i(81,"input",28),P("ngModelChange",function(c){return F(n.report.donorName,c)||(n.report.donorName=c),c}),g("ngModelChange",function(c){return n.onDonorNameChange.next(c)}),o(),p(82,"mat-icon",29),_(83,xn,1,0,"mat-icon",30),o()(),i(84,"div",31)(85,"button",13),g("click",function(){return n.clearAllFilters()}),i(86,"span",14),p(87,"i",32),o(),i(88,"span"),s(89,"Clear all filters"),o()()()(),_(90,Rn,31,4,"div",8),i(91,"div",33)(92,"div",34)(93,"table",35),g("matSortChange",function(c){return n.onSortChange(c)}),b(94,36),y(95,kn,2,0,"th",37)(96,On,5,3,"td",38),T(),b(97,39),y(98,An,2,0,"th",40)(99,Nn,7,9,"td",41),T(),b(100,42),y(101,$n,2,0,"th",37)(102,Un,3,4,"td",43),T(),b(103,44),y(104,Wn,2,0,"th",45)(105,Kn,3,2,"td",43),T(),b(106,46),y(107,Hn,2,0,"th",45)(108,Yn,3,1,"td",38),T(),b(109,47),y(110,qn,2,0,"th",45)(111,Qn,2,1,"td",38),T(),b(112,48),y(113,Zn,2,0,"th",45)(114,Jn,3,3,"td",38),T(),b(115,49),y(116,Xn,2,0,"th",45)(117,si,15,9,"td",38),T(),y(118,di,1,0,"tr",50)(119,mi,1,0,"tr",51),o()(),_(120,pi,3,0,"div",52),_(121,ci,3,0,"div",53),i(122,"mat-paginator",54),g("page",function(c){return n.onPageChange(c)}),o()()()()),r&2&&(a(),u("hidden",!n.pageLoading),a(2),u("hidden",n.pageLoading),a(17),u("hidden",n.orgService.hideFeatureIcon("import_offline_donations")),a(7),u("hidden",n.orgService.hideFeatureIcon("offline_donation_management")),a(2),f(!(n.orgSettings!=null&&n.orgSettings.hide_disbursement_reports)||n.user!=null&&n.user.mighty_admin?29:-1),a(6),u("value",n.report.range.periodValue),a(),R(n.timePeriod),a(2),f(n.report.range.periodValue==="custom"?38:-1),a(5),u("value",n.report.donationType),a(),R(n.donationTypes),a(6),u("value",n.report.campaignType),a(),R(n.campaignTypes),a(2),f(n.donationsCampaigns.length>1?53:-1),a(5),u("value",n.report.processingEntities),a(),R(n.paymentProcessor),a(7),u("appMask",n.maskAmountOptions),k("ngModel",n.report.minDonationAmount),a(7),u("appMask",n.maskAmountOptions),k("ngModel",n.report.maxDonationAmount),a(8),k("ngModel",n.report.donorName),a(2),f(n.report.donorName?83:-1),a(7),f(n.metrics?90:-1),a(3),u("dataSource",n.donations),a(25),u("matHeaderRowDef",n.donationsColumns),a(),u("matRowDefColumns",n.donationsColumns),a(),f((n.donations==null?null:n.donations.length)===0?120:-1),a(),f(n.spinner.data?121:-1),a(),u("length",n.metrics&&n.metrics.no_of_donations)("pageSize",n.report.perPage)("pageSizeOptions",pe(26,sn)))},dependencies:[ne,Ie,ee,Oe,te,we,Me,B,A,O,lt,ot,at,rt,$e,Ne,Be,Ve,Le,We,Ue,Ke,ze,it,tt,et,nt,yt,St,ae,oe,je,He,Ae,Tt,vt,bt,Ct,st,mt,_t,pt,dt,ft,ct,ut,gt,ht,de,se,Ye,kt,Se,ye,Xe],styles:["@media (max-width: 575.98px){.donations-header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{width:100%;text-align:right}}"]})}return t})();export{Wo as DonationsComponent}; 4 5//# debugId=a1a74312-617d-58e8-81f1-d2e9576b90bc
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.