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]="1e1d7b19-966b-5695-8098-fac107c44e7a")}catch(e){}}(); 3import{a as pe}from"./chunk-MYL2H5NC.js";import{a as me}from"./chunk-B7XOMD4F.js";import{a as le}from"./chunk-JRHQOV6G.js";import{a as oe}from"./chunk-ZN3PVEIW.js";import{a as K,b as Q,c as W,e as X,f as Z,h as ee,i as te,k as ie,l as ne,n as ae,p as re}from"./chunk-IZJQTZVB.js";import{a as N,c as q,d as G,e as J}from"./chunk-C5T7GUT6.js";import"./chunk-DSHWJW7U.js";import{a as Y}from"./chunk-FLZNG7WM.js";import{b as U}from"./chunk-Y53ZYOIU.js";import"./chunk-4OKMPB3H.js";import{c as z}from"./chunk-CN4EGA4I.js";import{d as P}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"./chunk-5K5PYV5V.js";import"./chunk-TDGVUJZJ.js";import"./chunk-MWF7JXGK.js";import"./chunk-UJXOZNZV.js";import{a as O,b as j}from"./chunk-KS3Q7H57.js";import"./chunk-DAOAKQM2.js";import"./chunk-MGCQ5S6F.js";import"./chunk-MJXNRHWH.js";import"./chunk-BUOPWRDV.js";import"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import"./chunk-CNRKNNWP.js";import"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import"./chunk-5SJALNJN.js";import"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-LXBG4CPT.js";import"./chunk-56KVT3OQ.js";import"./chunk-MF7VZYLI.js";import{a as A,b as V,e as $}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import{a as H,b as B}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"./chunk-VO633UWN.js";import{f as R}from"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import{g as D,k as L,p as I}from"./chunk-NK2KZLT6.js";import"./chunk-MU5APV2L.js";import"./chunk-KRFZY2QT.js";import"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import"./chunk-BWICLBYB.js";import"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import{L as k}from"./chunk-746D4QTP.js";import{Ac as _,Dc as d,Ib as w,Nc as F,Ob as f,Sc as p,Tc as M,Ua as x,cc as g,dc as S,hd as y,ic as c,id as E,jc as i,kc as n,lc as m,pc as C,qa as s,qb as l,qc as v,uc as b,va as h,wa as T}from"./chunk-BZJI6Z2X.js";import"./chunk-CS7K6LXP.js";var ce=()=>["create"],de=e=>[e,"edit"];function ue(e,r){e&1&&m(0,"th",30)}function fe(e,r){if(e&1){let t=b();i(0,"button",34),_("click",function(){h(t);let a=d(2);return T(a.removeDefaultTemplate())}),m(1,"i",35),n()}}function _e(e,r){if(e&1){let t=b();i(0,"button",36),_("click",function(){h(t);let a=d().$implicit,u=d();return T(u.changeActiveTemplate(a))}),m(1,"i",37),n()}}function he(e,r){if(e&1&&(i(0,"td",31),g(1,fe,2,0,"button",32)(2,_e,2,0,"button",33),n()),e&2){let t=r.$implicit,o=d();l(),S(t.id===o.org.active_fundraiser_template_id?1:2)}}function Te(e,r){e&1&&(i(0,"th",30),p(1,"Fundraiser Title"),n())}function Ce(e,r){if(e&1&&(i(0,"td",31),p(1),n()),e&2){let t=r.$implicit;l(),M(t.title)}}function ve(e,r){e&1&&(i(0,"th",30),p(1,"Note"),n())}function ge(e,r){if(e&1&&(i(0,"td",31),p(1),n()),e&2){let t=r.$implicit;l(),M(t.admin_note)}}function Se(e,r){e&1&&(i(0,"th",38),m(1,"i",39),n())}function be(e,r){if(e&1){let t=b();i(0,"td",31)(1,"button",40),m(2,"i",41),n(),i(3,"mat-menu",42,0)(5,"button",43),_("click",function(){let a=h(t).$implicit,u=d();return T(u.copyLink(a))}),m(6,"mat-icon",44),i(7,"span"),p(8,"Copy Link"),n()(),i(9,"a",45),m(10,"mat-icon",46),i(11,"span"),p(12,"Edit Template"),n()(),i(13,"button",43),_("click",function(){let a=h(t).$implicit,u=d();return T(u.deleteTemplate(a))}),m(14,"mat-icon",47),i(15,"span"),p(16,"Delete Template"),n()()()()}if(e&2){let t=r.$implicit,o=F(4);l(),c("matMenuTriggerFor",o),l(8),c("routerLink",E(2,de,t.id))}}function Me(e,r){e&1&&m(0,"tr",48)}function xe(e,r){e&1&&m(0,"tr",49)}function we(e,r){e&1&&(i(0,"div",28)(1,"p"),p(2,"You don't have any fundraiser templates yet."),n()())}function Fe(e,r){e&1&&(i(0,"div",29)(1,"div",50),m(2,"mat-spinner",51),n()())}var Ze=(()=>{class e{appService=s(R);route=s(D);frTemplateService=s(me);orgService=s(P);clipboard=s(le);snackbar=s(z);suggestedArticlesService=s(oe);pageLoading;urn;org;spinner=!1;frTemplates;frTemplateColumns=["active","title","note","actions"];platformId=s(x);
3constructor(){this.urn=this.route.snapshot.parent.params.urn,this.org=this.orgService.data,this.appService.footer=!1,this.suggestedArticlesService.suggestedLabel="org-fundraiser-template"}ngOnInit(){k(this.platformId)&&this.fetchFrTemplates()}fetchFrTemplates(){this.spinner=!0,this.frTemplateService.templates(this.urn).subscribe({next:t=>{this.frTemplates=t,this.spinner=!1},error:()=>{this.spinner=!1}})}changeActiveTemplate(t){t.id!==this.org.active_fundraiser_template_id&&(this.spinner=!0,this.frTemplateService.updateDefaultTemplate(this.urn,t.id).subscribe({next:o=>{this.orgService.data={active_fundraiser_template_id:o.new_id},this.org=this.orgService.data,this.spinner=!1},error:()=>{this.spinner=!1}}))}removeDefaultTemplate(){this.spinner=!0,this.frTemplateService.updateDefaultTemplate(this.urn,null).subscribe({next:t=>{this.orgService.data={active_fundraiser_template_id:t.new_id},this.org=this.orgService.data,this.spinner=!1},error:()=>{this.spinner=!1}})}copyLink(t){let o=`${this.appService.generateHostname()}/organization/${this.urn}?start_fundraiser&use_template_id=${t.id}`;this.appService.getShortUrl({long_url:o}).subscribe(a=>{this.clipboard.copy(a.url),this.snackbar.open("Copied","",{duration:1e3})})}deleteTemplate(t){this.frTemplateService.deleteTemplate(this.urn,t.id).subscribe(()=>{this.fetchFrTemplates()})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=w({type:e,selectors:[["app-fundraiser-template"]],decls:40,vars:9,consts:[["TemplateActionMenu","matMenu"],[1,"min-vh-100","pb-5"],[1,"container",3,"hidden"],["contentType","report",3,"changeContentLoading"],[1,"container-fluid",3,"hidden"],[1,"row"],[1,"col-12"],[1,"d-flex","flex-wrap","justify-content-between","align-items-center"],[1,"display-2","mb-3"],[1,"actions"],["mat-button","","color","accent",1,"custom",3,"routerLink"],[1,"left-icon"],["aria-hidden","true",1,"fal","fa-plus"],[1,"mb-0"],[1,"sm"],[1,"fas","fa-star"],[1,"table-wrapper","mt-3"],[1,"table-responsive"],["mat-table","",3,"dataSource"],["matColumnDef","active"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","note"],["matColumnDef","actions"],["mat-header-cell","","style","justify-content: flex-end",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"table-no-results"],[1,"update-overlay"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","aria-label","active"],["mat-icon-button","","aria-label","make active"],["mat-icon-button","","aria-label","active",3,"click"],[1,"fa-solid","fa-star"],["mat-icon-button","","aria-label","make active",3,"click"],[1,"fa-light","fa-star"],["mat-header-cell","",2,"justify-content","flex-end"],[1,"fal","fa-tools"],["mat-icon-button","","aria-label","Template Actions","matTooltip","Options",3,"matMenuTriggerFor"],[1,"fa-solid","fa-ellipsis-vertical"],[1,"auto-width","shadow-lg"],["mat-menu-item","",3,"click"],["fontSet","fal","fontIcon","fa-copy"],["mat-menu-item","",3,"routerLink"],["fontSet","fal","fontIcon","fa-pencil","aria-hidden","true"],["fontSet","fal","fontIcon","fa-trash"],["mat-header-row",""],["mat-row",""],[1,"spinner"],["diameter","50"]],template:function(o,a){o&1&&(i(0,"div",1)(1,"div",2)(2,"app-org-content-loader",3),_("changeContentLoading",function(se){return a.pageLoading=!!se}),n()(),i(3,"div",4)(4,"div",5)(5,"div",6)(6,"div",7)(7,"h1",8),p(8,"Fundraiser Templates"),n(),i(9,"div",9)(10,"a",10)(11,"span",11),m(12,"i",12),n(),p(13,"Create "),n()()(),i(14,"p",13),p(15," Use fundraiser templates to give your supporters a head start when creating a new fundraiser page for your organization. "),n(),i(16,"p",14),p(17," Apply a "),m(18,"i",15),p(19,' to the template that creators will see when they "start a fundraiser" from your profile. You can also send a direct link for a specific template to fundraiser creators. '),n()(),i(20,"div",6)(21,"div",16)(22,"div",17)(23,"table",18),C(24,19),f(25,ue,1,0,"th",20)(26,he,3,1,"td",21),v(),C(27,22),f(28,Te,2,0,"th",20)(29,Ce,2,1,"td",21),v(),C(30,23),f(31,ve,2,0,"th",20)(32,ge,2,1,"td",21),v(),C(33,24),f(34,Se,2,0,"th",25)(35,be,17,4,"td",21),v(),f(36,Me,1,0,"tr",26)(37,xe,1,0,"tr",27),n()(),g(38,we,3,0,"div",28),g(39,Fe,3,0,"div",29),n()()()()()),o&2&&(l(),c("hidden",!a.pageLoading),l(2),c("hidden",a.pageLoading),l(7),c("routerLink",y(8,ce)),l(13),c("dataSource",a.frTemplates),l(13),c("matHeaderRowDef",a.frTemplateColumns),l(),c("matRowDefColumns",a.frTemplateColumns),l(),S((a.frTemplates==null?null:a.frTemplates.length)===0?38:-1),l(),S(a.spinner?39:-1))},dependencies:[I,L,$,V,A,B,H,J,q,N,G,j,O,re,K,W,te,X,Q,ie,Z,ee,ne,ae,Y,U,pe],encapsulation:2})}return e})();export{Ze as FundraiserTemplateComponent}; 4 5//# debugId=1e1d7b19-966b-5695-8098-fac107c44e7a
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.