1try{!function(){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]="977f9579-decf-431c-a6ab-bb0e93665cb0",e._sentryDebugIdIdentifier="sentry-dbid-977f9579-decf-431c-a6ab-bb0e93665cb0")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5248],{8285:(e,n,t)=>{"use strict";t.d(n,{a:()=>u});var i=t(37876);t(14232);var r=t(44264),a=t(75773),o=t(47677),s=t(91930),l=t(88651),d=t(126);let c=r.Ay.div.withConfig({componentId:"sc-45cf4390-0"})(["background-color:",";border-radius:3px;color:white;"],(0,l.yW)("primary")),u=e=>{let{title:n,icon:t}=e;return(0,i.jsx)(c,{children:(0,i.jsx)(a.u.Section,{children:(0,i.jsxs)(o.o,{align:"center",children:[(0,i.jsx)(d.A,{source:t}),(0,i.jsx)(s.E,{variant:"headingMd",as:"p",children:n})]})})})}},10178:(e,n,t)=>{"use strict";t.d(n,{O:()=>o});var i=t(71432),r=t.n(i),a=t(14232);function o(e,n){let[t,i]=(0,a.useState)(null),[o,s]=(0,a.useState)(!0);return(0,a.useEffect)(()=>{if(!n)return;let t=!1;return async function(){s(!0);try{let a=r()(e).query(n.query).setFilters(n.filters).setSortBy(n.sortBy),o=await a.execute({facets:!0,hits:{size:n.page.size,from:n.page.from}});t||(s(!1),i(o))}catch(e){t||s(!1)}}(),()=>{t=!0}},[n]),{results:t,loading:o}}},15511:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>e7});var i=t(37876),r=t(14232),a=t(29516),o=t(81199),s=t(2032),l=t(57901),d=t(88062),c=t(80407),u=t(55645),h=t(77005),g=t(91930),m=t(75773),x=t(51377),p=t(47677),j=t(52387),f=t(96181),v=t(68522),y=t(22882),b=t(1384),S=t(1487),w=t(53965),C=t(22999),_=t.n(C),k=t(55608),E=t(10309),A=t
1(27537),I=t(8285);let N={query:"",sortBy:[],filters:{modifiedOn:"2022-08-26T07:20:08.31893"},pageSize:100,pageNumber:1},T=e=>(0,E.A)(null!=e?e:0).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0});function D(e){let n=Math.ceil((new Date(e).getTime()-Date.now())/864e5);return n<=7?(0,i.jsx)(c.E,{tone:"warning",children:"Expiring soon"}):n<=30?(0,i.jsx)(c.E,{tone:"attention",children:"".concat(n," days left")}):(0,i.jsx)(c.E,{children:"".concat(n," days left")})}let F=()=>{let[e,n]=(0,r.useState)(null),[t,a]=(0,r.useState)(!0),[o,s]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{try{var e;let t=await (0,S.$I)(N),i=(null!=(e=null==t?void 0:t.result)?e:[]).filter(e=>!1===e.voucherOrder.isExpired&&e.voucherStateName!==w.StateName.FullyRedeemed),r=_()(i,["voucherOrder.expireDate"],["asc"]);n(r),r.length>0&&s(!0)}catch(e){n([])}})()},[]);let l=(0,r.useMemo)(()=>e&&1===e.length?e[0]:null,[e]);return t?(0,i.jsxs)(u.P.Section,{children:[e&&0===e.length&&(0,i.jsx)(h.lZ,{tone:"info",onDismiss:()=>a(!1),children:(0,i.jsx)(g.E,{as:"p",children:"No vouchers to redeem right now."})}),l&&(0,i.jsxs)(m.u,{children:[(0,i.jsxs)(x.a,{gap:"200",children:[(0,i.jsx)(I.a,{title:"Congratulations. You have a ".concat(T(l.voucherStateRemainingBalance)," Charity Gift Card. To spread the love, click Redeem!"),icon:b.S}),(0,i.jsx)(A.A,{completed:o})]}),(0,i.jsx)(m.u.Section,{children:(0,i.jsx)(x.a,{gap:"300",children:(0,i.jsxs)(p.o,{align:"center",gap:"200",blockAlign:"center",children:[D(l.voucherOrder.expireDate),(0,i.jsx)(g.E,{as:"span",variant:"bodySm",children:"(Expires on ".concat((0,k.ae)(l.voucherOrder.expireDate,"dS mmm yyyy"),")")}),(0,i.jsx)(j.$,{variant:"secondary",url:"/admin/user/gift-vouchers/".concat(l.voucherCode,"/redeem"),children:"Redeem"})]})})})]}),e&&e.length>1&&(0,i.jsxs)(m.u,{children:[(0,i.jsxs)(x.a,{gap:"200",children:[(0,i.jsx)(I.a,{title:"Congratulations! You have vouchers available to redeem. Spread the love!",icon:b.S}),(0,i.jsx)(A.A,{completed:o})]}),(0,i.jsx)(m.u.Section,{children:(0,i.jsx)(f.m,{columns:{xs:1,sm:2,lg:4},gap:"300",children:e.map(e=>(0,i.jsx)(v.a,{padding:"300",borderWidth:"025",borderRadius:"200",borderColor:"border-tertiary",children:(0,i.jsxs)(x.a,{gap:"200",children:[(0,i.jsxs)(p.o,{align:"start",gap:"200",blockAlign:"center",children:[D(e.voucherOrder.expireDate),(0,i.jsx)(g.E,{as:"span",tone:"subdued",variant:"bodySm",children:"Expires ".concat((0,k.ae)(e.voucherOrder.expireDate,"dS mmm yyyy"))})]}),(0,i.jsx)(g.E,{as:"p",variant:"headingLg",fontWeight:"semibold",children:T(e.voucherStateRemainingBalance)}),(0,i.jsx)(g.E,{as:"span",tone:"subdued",variant:"bodySm",children:"Charity Gift Card"}),(0,i.jsx)(y.c,{}),(0,i.jsx)(p.o,{align:"end",children:(0,i.jsx)(j.$,{variant:"secondary",url:"/admin/user/gift-vouchers/".concat(e.voucherCode,"/redeem"),children:"Redeem"})})]})},e.voucherCode))})})]})]}):null};var M=t(33698),z=t(92490),B=t(77360),P=t(70109);let W=e=>{let{authorized:n,country:t}=e;return(0,i.jsxs)(p.o,{align:"center",blockAlign:"center",gap:"400",children:[n.to(o.x.Workplace_Volunteering)&&(0,i.jsx)(j.$,{variant:"primary",size:"large",icon:(0,i.jsx)(M.I,{source:z.S}),url:"/".concat(t,"/volunteering"),children:"Volunteer Now"}),n.to(o.x.Workplace_DollarHandle)&&(0,i.jsx)(j.$,{variant:"primary",size:"large",icon:(0,i.jsx)(M.I,{source:B.S}),url:"/".concat(t,"/donating"),children:"Donate Now"}),n.to(o.x.Workplace_Fundraising)&&(0,i.jsx)(j.$,{variant:"primary",size:"large",icon:(0,i.jsx)(M.I,{source:P.S}),url:"/".concat(t,"/fundraising"),children:"Fundraise Now"})]})},R=e=>{let{name:n,authorized:t,siteName:r,country:a,showCallToAction:o}=e;return(0,i.jsx)(u.P.Section,{children:(0,i.jsx)(m.u,{children:(0,i.jsx)(v.a,{background:"bg-surface-secondary",padding:"800",children:(0,i.jsxs)(x.a,{gap:"150",children:[n&&(0,i.jsxs)(g.E,{as:"p",variant:"bodySm",fontWeight:"semibold",tone:"subdued",children:["DEAR ",n.toUpperCase()]}),(0,i.jsxs)(p.o,{align:"space-between",blockAlign:"baseline",gap:"400",children:[(0,i.jsxs)(g.E,{variant:"headingLg",as:"p",fontWeight:"medium",children:["Welcome to ",n&&"your"," ",(0,i.jsx)(g.E,{as:"span",fontWeight:"bold",children:r||"Your Company"})," ",n?"platform":"Dashboard","."]}),o&&(0,i.jsx)(W,{authorized:t,country:a})]})]})})})})};var H=t(75975),O=t.n(H);t(71914);let L=e=>{var n,t,r,a,o;let{data:s,siteName:l}=e;return(0,i.jsxs)(x.a,{children:[(0,i.jsxs)(p.o,{align:"center",gap:"300",children:[(0,i.jsxs)(g.E,{as:"h3",variant:"headingMd",children:["Plus"," ",l," Giving matching + Vouchers:"]}),(0,i.jsx)(g.E,{as:"p",variant:"headingXl",children:(0,E.A)(null==s||null==(n=s.donationSummary)?void 0:n.matchedTotal).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]}),(0,i.jsxs)(p.o,{align:"center",gap:"300",children:[(0,i.jsx)(g.E,{as:"h3",variant:"headingMd",children:"Together we've donated:"}),(0,i.jsx)(g.E,{as:"p",variant:"headingXl",children:(0,E.A)((null!=(a=null==s||null==(t=s.donationSummary)?void 0:t.yearlyGrowth.currentYear)?a:0)+(null!=(o=null==s||null==(r=s.donationSummary)?void 0:r.matchedTotal)?o:0)).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]})]})};t(27738);let $=e=>{var n,t,r,a;let{data:o,matchData:s,siteInfo:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.P.Section,{children:(0,i.jsxs)(m.u,{children:[(0,i.jsx)("div",{className:O().headColor,children:(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"center",blockAlign:"center",gap:"400",children:[(0,i.jsxs)(g.E,{variant:"headingMd",as:"p",children:[l.siteName()||"Your Company"," together we have donated:"]}),(0,i.jsx)(g.E,{variant:"headingXl",as:"p",children:(0,E.A)(null==o||null==(n=o.donationSummary)?void 0:n.workplaceTotal).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]})})}),(0,i.jsx)("br",{}),(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"center",gap:"600",children:[(0,i.jsxs)(x.a,{children:[(0,i.jsxs)(g.E,{variant:"headingMd",as:"h3",children:[" ","Since 1st January"]}),(0,i.jsxs)(p.o,{align:"center",gap:"300",children:[(0,i.jsx)(g.E,{variant:"headingMd",as:"h3",children:"My Donations:"}),(0,i.jsx)(g.E,{variant:"headingXl",as:"p",children:(0,E.A)(null==o||null==(t=o.donationSummary)?void 0:t.yearlyGrowth.currentYear).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]}),(null==o||null==(r=o.donationSummary)?void 0:r.matchedTotal)>0&&(0,i.jsx)(L,{data:o,siteName:l.siteName()}),(0,i.jsxs)(x.a,{children:[(0,i.jsx)(g.E,{variant:"headingMd",as:"h3",children:(0,i.jsx)("hr",{})}),(0,i.jsxs)(p.o,{align:"center",gap:"300",children:[(0,i.jsx)(g.E,{variant:"headingMd",as:"h3",children:"Lifetime Donations:"}),(0,i.jsx)(g.E,{variant:"headingXl",as:"p",children:(0,E.A)(null==o||null==(a=o.donationSummary)?void 0:a.userTotal).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]}),!1]})]}),(0,i.jsx)(j.$,{variant:"primary",size:"large",url:"/".concat(l.getCountry().code,"/donating"),children:"Donate Now"}),!1]})})]})}),!1]})};var V=t(33911),q=t.n(V);t(67287);let U=e=>{var n,t,r;let{data:a,siteInfo:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.P.Section,{children:(0,i.jsxs)(m.u,{children:[(0,i.jsx)("div",{className:q().headColor,children:(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"center",blockAlign:"center",gap:"400",children:[(0,i.jsxs)(g.E,{variant:"headingMd",as:"p",children:[o.siteName()||"Your Company"," together we have Volunteered:"]}),(0,i.jsxs)(g.E,{variant:"headingXl",as:"p",children:[(0,E.A)(null==a||null==(n=a.volunteeringSummary)?void 0:n.workplaceTotal).format({thousandSeparated:!0})," ","hrs"]})]})})}),(0,i.jsx)("br",{}),(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"center",gap:"600",children:[(0,i.jsxs)(x.a,{children:[(0,i.jsx)(g.E,{variant:"headingMd",as:"h3",children:"Hours:"}),(0,i.jsx)(g.E,{variant:"headingXl",as:"p",children:null==a||null==(t=a.volunteeringSummary)?void 0:t.userTotal})]}),(0,i.jsxs)(x.a,{children:[(0,i.jsx)(g.E,{variant:"headingMd",as:"h3",children:"Number of Roles:"}),(0,i.jsx)(g.E,{variant:"headingXl",as:"p",children:null==a||null==(r=a.volunteeringSummary)?void 0:r.numberOfRoles})]}),(0,i.jsx)(j.$,{variant:"primary",size:"large",url:"/".concat(o.getCountry().code,"/volunteering"),children:"Volunteer Now"}),!1]})})]})}),!1]})};var X=t(84897),Y=t.n(X);t(37890);let G=e=>{var n,t,r;let{data:a,siteInfo:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.P.Section,{children:(0,i.jsxs)(m.u,{children:[(0,i.jsx)("div",{className:Y().headColor,children:(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"center",children:[(0,i.jsxs)(g.E,{as:"h3",variant:"headingMd",children:[o.siteName()||"Your Company"," together we have Fundraised:"]}),(0,i.jsx)(g.E,{as:"h2",variant:"headingXl",children:(0,E.A)(null==a||null==(n=a.fundraisingSummary)?void 0:n.workplaceTotal).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]})})}),(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(p.o,{align:"start",ga
1p:"600",children:[(0,i.jsxs)(x.a,{children:[(0,i.jsx)(g.E,{as:"h3",variant:"headingMd",children:"Funds:"}),(0,i.jsx)(g.E,{as:"h2",variant:"headingXl",children:(0,E.A)(null==a||null==(t=a.fundraisingSummary)?void 0:t.userTotal).formatCurrency({thousandSeparated:!0,mantissa:2,optionalMantissa:!0})})]}),(0,i.jsxs)(x.a,{children:[(0,i.jsx)(g.E,{as:"h3",variant:"headingMd",children:"Fundraisers:"}),(0,i.jsx)(g.E,{as:"h2",variant:"headingXl",children:null==a||null==(r=a.fundraisingSummary)?void 0:r.donatedPages})]}),(0,i.jsx)(j.$,{variant:"primary",size:"large",url:"/".concat(o.getCountry().code,"/fundraising"),children:"Fundraise Now"}),!1]})}),(0,i.jsx)("br",{})]})}),!1]})},J=e=>{let{data:n,name:t,matchData:r,authorized:a}=e;return(0,i.jsx)(d.f5.Consumer,{children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(F,{}),(0,i.jsx)(R,{siteName:e.siteName(),country:e.getCountry().code,authorized:a,name:t}),a.to(o.x.Workplace_DollarHandle)&&(0,i.jsx)($,{data:n,matchData:r,siteInfo:e}),a.to(o.x.Workplace_Volunteering)&&(0,i.jsx)(U,{data:n,siteInfo:e}),a.to(o.x.Workplace_Fundraising)&&(0,i.jsx)(G,{data:n,siteInfo:e})]})})};var Q=t(97710),Z=t(19351),K=t(33448),ee=t(89099),en=t.n(ee),et=t(45393),ei=t(52454),er=t(71432),ea=t(10178),eo=t(44264),es=t(65714),el=t(21013);function ed(e,n){return new Date(n).getTime()-new Date(e).getTime()>6e4}let ec=e=>{let{data:n}=e,t=function(e){var n,t,i;switch(e.type){case"volunteeringopportunities":{let t=null==(n=e.charities)?void 0:n[0],i=(null==t?void 0:t.slug)?decodeURIComponent(t.slug):"",r=e.slug?decodeURIComponent(e.slug):"",a=ed(e.createdon,e.modifiedon);return{image:e.image||(null==t?void 0:t.image),title:e.title,subtitle:(null==t?void 0:t.name)?"".concat(t.name," ").concat(a?"updated":"posted"," a volunteering role"):a?"Volunteering role updated":"New volunteering role",url:"/charity/".concat(i,"/vacancy/").concat(r),date:a?e.modifiedon:e.createdon}}case"fundraisingevent":{let n=null==(t=e.charities)?void 0:t[0],i=ed(e.createdon,e.modifiedon);return{image:e.image||(null==n?void 0:n.image),title:e.title,subtitle:(null==n?void 0:n.name)?"".concat(n.name," ").concat(i?"updated":"started"," a fundraiser"):i?"Fundraiser updated":"New fundraiser",url:"/fundraising/".concat(decodeURIComponent(e.slug)),date:i?e.modifiedon:e.createdon}}case"fundraisingpage":{let n=null==(i=e.charities)?void 0:i[0],t=ed(e.createdon,e.modifiedon);return{image:e.image||(null==n?void 0:n.image),title:e.title,subtitle:(null==n?void 0:n.name)?"".concat(n.name," ").concat(t?"updated":"started"," a fundraising page"):t?"Fundraising page updated":"New fundraising page",url:"/fundraising/".concat(decodeURIComponent(e.event.slug),"/").concat(decodeURIComponent(e.slug)),date:t?e.modifiedon:e.createdon}}case"story":{let n=ed(e.createdOn,e.modifiedOn);return{image:e.imageUrl,title:e.title,subtitle:n?"Story updated":"New story shared",url:"/story/".concat(e.slugUrl),date:n?e.modifiedOn:e.createdOn}}default:return null}}(n);return t?(0,i.jsx)(eu,{href:t.url,children:(0,i.jsxs)(p.o,{gap:"300",blockAlign:"center",wrap:!1,children:[t.image&&(0,i.jsx)(es.V,{source:t.image,alt:t.title,size:"small"}),(0,i.jsxs)(x.a,{gap:"050",children:[(0,i.jsx)(g.E,{as:"p",fontWeight:"medium",children:t.title}),(0,i.jsxs)(g.E,{as:"p",variant:"bodySm",tone:"subdued",children:[t.subtitle," \xb7 ",(0,el.PK)((0,k.yQ)(t.date))]})]})]})}):null},eu=eo.Ay.a.withConfig({componentId:"sc-49f9d44c-0"})(["display:block;margin:-0.5rem;padding:0.5rem;border-radius:var(--p-border-radius-100);text-decoration:none;color:inherit;transition:background-color 100ms ease;&:hover{background-color:var(--p-color-bg-surface-hover);text-decoration:none;}"]),eh=e=>{var n;let t,{host:a,indexName:o,queryFields:s,noHitsTitle:l,noHitsDescription:d,noHitsButton:c,browsePath:u}=e,h=(0,Z.OY)(),{results:g,loading:x}=(0,ea.O)((t=(0,ei.JJ)(),{host:"".concat("https://portalapis.cloud.goodcompany.org/api","/search"),index:o,connectionOptions:{headers:{"x-host":a,"x-country":t}},query:new er.CustomQuery({queryFn:(e,n)=>({bool:{should:[{multi_match:{query:e,fields:s,type:"best_fields"}}]}})}),hits:{fields:["title","description"]},sortOptions:[{id:"modifiedon",label:"Latest",field:[{modifiedon:{order:"desc",unmapped_type:"date"}},{modifiedOn:{order:"desc",unmapped_type:"date"}}]}]}
1),h.getSearchState());(0,r.useEffect)(()=>{let e=()=>{h.setSortBy("modifiedon"),h.search()};e();let n=setTimeout(e,2e3);return()=>clearTimeout(n)},[]);let j=(0,i.jsx)(et.A,{title:l,description:d,browseButton:c,onClick:()=>{en().push("/".concat((0,ei.JJ)(),"/").concat(u))}}),y=null!=(n=null==g?void 0:g.hits.items)?n:[];return(0,i.jsx)(m.u.Section,{children:(0,i.jsxs)(v.a,{minHeight:"180px",children:[x&&(0,i.jsx)(p.o,{align:"center",children:(0,i.jsx)(K.y,{size:"small"})}),!x&&y.length>0&&(0,i.jsx)(f.m,{columns:{xs:1,md:2},gap:"300",children:y.map(e=>(0,i.jsx)(ec,{data:e.fields},e.fields.id))}),!x&&y.length<1&&(0,i.jsx)(p.o,{align:"center",children:j})]})})},eg=[{id:"volunteer",content:"Volunteering",footerLabel:"More Opportunities",permission:o.x.Workplace_Volunteering,indexName:"volunteeringopportunities-v2",queryFields:["title~3","description","slug"],noHitsTitle:"There are no Volunteering Roles",noHitsDescription:"Checkout the large range of volunteering roles on Good Company",noHitsButton:"Browse Roles",browsePath:"volunteering"},{id:"fundraise",content:"Fundraising",footerLabel:"More Fundraisers",permission:o.x.Workplace_Fundraising,indexName:"fundraisingevents-v2,fundraisingpages-v2",queryFields:["title~3","description","slug"],noHitsTitle:"There are no Fundraisers",noHitsDescription:"Checkout the large range of fundraising events and pages on Good Company",noHitsButton:"Browse Fundraising",browsePath:"fundraising"},{id:"story",content:"Stories",footerLabel:"More Stories",permission:o.x.Workplace_Story,indexName:"stories-v2",queryFields:["title~3","description"],noHitsTitle:"There are no Stories",noHitsDescription:"Checkout the range of stories shared on Good Company",noHitsButton:"Browse Stories",browsePath:"stories"}],em=e=>{let{host:n,authorized:t}=e,a=(0,r.useMemo)(()=>eg.filter(e=>t.to(e.permission)),[t]),[o,s]=(0,r.useState)(0),l=(0,r.useMemo)(()=>a.map(()=>new Z.M1({itemsPerPage:6})),[a]);if(0===a.length)return null;let d=a[o],c=l[o];return(0,i.jsxs)(m.u,{title:"Latest",primaryFooterAction:{content:d.footerLabel,accessibilityLabel:d.footerLabel,url:"/".concat(d.browsePath)},children:[a.length>1&&(0,i.jsx)(Q.t,{tabs:a,selected:o,onSelect:s}),c&&(0,i.jsx)(Z.m7,{client:c,children:(0,i.jsx)(eh,{host:n,indexName:d.indexName,queryFields:d.queryFields,noHitsTitle:d.noHitsTitle,noHitsDescription:d.noHitsDescription,noHitsButton:d.noHitsButton,browsePath:d.browsePath})},d.id)]})};var ex=t(3256),ep=t(20207),ej=t(28888),ef=t(11269),ev=t.n(ef),ey=t(28823);let eb=e=>{let{title:n,progress:t,description:r}=e,a=window.location.href;return(0,i.jsx)(ey.r6,{url:a,title:((e,n,t)=>n||"I have earned a ".concat(null!=e?e:""," badge on GoodCompany for doing good!\uD83C\uDFC5 - ").concat(null!=t?t:""," #goodcompany"))(n,t,r),windowHeight:350,windowWidth:350,children:(0,i.jsx)(ey.uv,{size:32,round:!0})})},eS=e=>{let{title:n,progress:t,description:r}=e;return(0,i.jsx)("button",{type:"button",onClick:()=>{let e=window.location.href,i=((e,n,t)=>n||"I have earned a ".concat(null!=e?e:""," badge on GoodCompany for doing good!\uD83C\uDFC5 - ").concat(null!=t?t:""))(n,t,r),a="https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(e)+"&summary="+i;window.open(a,"LinkedinShare","menubar=1,resizable=1,width=350,height=350")},"aria-label":"Share on LinkedIn",style:{border:"none",background:"none",padding:0,margin:0,cursor:"pointer",display:"inline-flex",alignItems:"center"},children:(0,i.jsx)(ey._z,{size:32,round:!0})})},ew=e=>{let{title:n,progress:t,description:r}=e,a=window.location.href;return(0,i.jsx)(ey.kQ,{url:a,quote:((e,n,t)=>n||"I have earned a ".concat(null!=e?e:""," badge on GoodCompany for doing good!\uD83C\uDFC5 - ").concat(null!=t?t:""))(n,t,r),windowHeight:350,windowWidth:350,children:(0,i.jsx)(ey.sE,{size:32,round:!0})})},eC=function(e){let{title:n,progress:t,description:r}=e;return(0,i.jsxs)(p.o,{align:"center",gap:"300",children:[!1,(0,i.jsx)(eb,{title:n,progress:t,description:r}),(0,i.jsx)(eS,{title:n,progress:t,description:r}),(0,i.jsx)(ew,{title:n,progress:t,description:r})]})};var e_=t(12534),ek=t(43713);let eE=eo.Ay.img.withConfig({componentId:"sc-b379064d-0"})(["border-radius:50%;width:120px;height:120px;object-fit:cover;border:2px solid transparent;transition:transform 0.2s,border-color 0.2s;"]),eA=e=>{let{badge:n,showNextButton:t,handleNext:r,handlePrevious:a}=e;return(0,i.jsxs)(m.u,{sectioned:!0,children:[(0,i.jsxs)(x.a,{align:"center",gap:"300",children:[(0,i.jsxs)(p.o,{gap:"200",children:[(0,i.jsx)(g.E,{as:"span",fontWeight:"medium",children:"Name:"}),(0,i.jsx)(g.E,{as:"span",children:n.badgeName}),(0,i.jsxs)(g.E,{as:"span",tone:"subdued",children:["- Earned on ",(0,k.ae)(n.earnedDate,"d mmm yyyy")]})]}),t?(0,i.jsxs)(p.o,{align:"center",gap:"400",children:[(0,i.jsx)(j.$,{variant:"primary",size:"slim",onClick:a,icon:(0,i.jsx)(M.I,{source:e_.S})}),(0,i.jsx)(eE,{src:n.badgeImageUrl,alt:n.badgeName}),(0,i.jsx)(j.$,{variant:"primary",size:"slim",onClick:r,icon:(0,i.jsx)(M.I,{source:ek.S})})]}):(0,i.jsx)(p.o,{children:(0,i.jsx)(eE,{src:n.badgeImageUrl,alt:n.badgeName})})]}),(0,i.jsx)(eC,{title:null==n?void 0:n.badgeName,description:null==n?void 0:n.badgeDescription})]},n.id)};var eI=t(43307);let eN=eo.Ay.div.withConfig({componentId:"sc-c2fb5871-0"})(["padding:0.5rem;width:100%;"]),eT=eo.Ay.span.withConfig({componentId:"sc-c2fb5871-1"})(["display:inline-block;position:absolute;top:50%;right:",";left:",";transform:translateY(-50%) rotate(",");width:16px;height:16px;cursor:pointer;border-top:2px solid #888;border-right:2px solid #888;&:hover{border-color:#333;}"],e=>{let{$type:n}=e;return"right"===n?"8px":"unset"},e=>{let{$type:n}=e;return"left"===n?"8px":"unset"},e=>{let{$type:n}=e;return"right"===n?"45deg":"-135deg"}),eD=e=>{let{badges:n,viewedBadges:t,onAddViewBadge:a}=e,[o,s]=(0,r.useState)(0),l=async()=>{let e=(o-1+n.length)%n.length;s(e);let i=n[e];t.includes(i.id)||await c(n[e].id)},d=async()=>{let e=(o+1)%n.length;s(e);let i=n[e];t.includes(i.id)||await c(n[e].id)},c=async e=>{try{await (0,eI.rH)(e),a(e)}catch(e){console.log("Error")}};return(0,r.useEffect)(()=>{c(n[0].badgeId)}
1,[]),(0,i.jsx)(eN,{children:(0,i.jsx)(ev(),{cols:1,rows:1,dotColorActive:"var(--primary, #999)",autoplay:void 0,loop:!0,responsiveLayout:[{breakpoint:375,cols:1,rows:1,gap:2,loop:!0}],arrowLeft:(0,i.jsx)(eT,{$type:"left",onClick:l}),arrowRight:(0,i.jsx)(eT,{$type:"right",onClick:d}),children:null==n?void 0:n.map(e=>(0,i.jsx)(ev().Item,{width:"100%",children:(0,i.jsx)(eA,{badge:e})},e.badgeId))})})},eF=e=>{let{badges:n,viewedBadges:t,onAddViewBadge:a}=e,[o,s]=(0,r.useState)(0),l=async()=>{let e=(o+1)%n.length;s(e);let i=n[e];t.includes(i.badgeId)||await c(n[e].badgeId)},d=async()=>{let e=(o-1+n.length)%n.length;s(e);let i=n[e];t.includes(i.badgeId)||await c(n[e].badgeId)},c=async e=>{try{await (0,eI.rH)(e),a(e)}catch(e){console.log("Error")}};return(0,r.useEffect)(()=>{c(n[0].badgeId)},[]),(0,i.jsx)(eA,{badge:n[o],showNextButton:(null==n?void 0:n.length)>1,handleNext:l,handlePrevious:d})};var eM=t(62988);function ez(){let e=(0,ej._)(["\n display: initial;\n"]);return ez=function(){return e},e}function eB(){let e=(0,ej._)(["\n display: none; // Ensure it hides again starting from tablet portrait sizes\n "]);return eB=function(){return e},e}function eP(){let e=(0,ej._)(["\n display: initial;\n"]);return eP=function(){return e},e}let eW=eo.Ay.div.withConfig({componentId:"sc-93e2acc-0"})([""," ",""],eM.$.phone(ez()),eM.$.tabletLandscape(eB())),eR=eo.Ay.div.withConfig({componentId:"sc-93e2acc-1"})([""," display:none;"],eM.$.tabletLandscape(eP())),eH=e=>{let{badges:n}=e,t=(0,ee.useRouter)(),[a,o]=(0,r.useState)([]),s=e=>{o(n=>[...n,e])};return(0,i.jsxs)(m.u,{sectioned:!0,title:"New Badge(s) Unlocked \uD83C\uDFC5",children:[(0,i.jsx)(eR,{children:(0,i.jsx)(eD,{badges:n,viewedBadges:a,onAddViewBadge:s})}),(0,i.jsx)(eW,{children:(0,i.jsx)(eF,{badges:n,viewedBadges:a,onAddViewBadge:s})}),(0,i.jsxs)(p.o,{align:"end",blockAlign:"center",gap:"300",children:[(0,i.jsx)(g.E,{as:"span",fontWeight:"medium",children:"Keep Making Difference!"}),(0,i.jsx)(j.$,{variant:"primary",onClick:()=>{t.push("/admin/user/badges")},children:"Explore Badges"})]})]})};var eO=t(6849),eL=t(62557);let e$=()=>{let[e,n]=(0,r.useState)([]),[t,a]=r.useState(!1),o=async()=>{var e;let t=await (0,S.ib)();(0,eO.bJ)(t)||(n(t.result),a((null==t||null==(e=t.result)?void 0:e.length)>0))};return(0,r.useEffect)(()=>{o()},[]),(0,i.jsx)(eL.a,{open:t,title:"New Badge Notification",onClose:()=>{a(!1)},children:(0,i.jsx)(eL.a.Section,{children:(0,i.jsx)(eH,{badges:e})})})},eV=eo.Ay.div.withConfig({componentId:"sc-eea10479-0"})(["display:grid;grid-template-columns:repeat(5,1fr);gap:1rem;margin-bottom:1rem;justify-items:center;align-items:center;"]),eq=eo.Ay.div.withConfig({componentId:"sc-eea10479-1"})(["display:flex;flex-direction:column;align-items:center;"]);function eU(e){var n,t,r,a,o;let{earnedBadges:s,lockedBadges:l}=e,d=(0,ee.useRouter)(),c=null!=(n=null==s?void 0:s.length)?n:0,h=null==s?void 0:s.slice(0,Math.min(c,2)),g=null==l?void 0:l.slice(0,4-(null!=(t=null==h?void 0:h.length)?t:0)),x=(null!=(r=null==s?void 0:s.length)?r:0)+(null!=(a=null==l?void 0:l.length)?a:0),f=[];return null==h||h.forEach(e=>{f.push((0,i.jsx)(eq,{children:(0,i.jsx)(ep.D,{badge:e})},e.badgeId))}),null==g||g.forEach(e=>{f.push((0,i.jsx)(eq,{children:(0,i.jsx)(ex.S,{badge:e})},e.badgeId))}),(null!=(o=f.length)?o:0)<=4&&f.push((0,i.jsx)(eq,{children:(0,i.jsxs)(p.o,{align:"center",gap:"400",children:[(0,i.jsx)(j.$,{variant:"primary",onClick:()=>d.push("/admin/user/badges"),children:"Explore badges"}),(0,i.jsx)(eC,{progress:"I have earned ".concat(c," out of ").concat(x," badges on GoodCompany")})]})},"explore-button")),(0,i.jsx)(u.P.Section,{children:(0,i.jsxs)(m.u,{title:"Badges Earned (".concat(c,"/").concat(x,")"),sectioned:!0,children:[(0,i.jsx)(eV,{children:f}),(0,i.jsx)(e$,{})]})})}let eX=e=>{let{name:n,authorized:t,host:r,earnedBadges:a,lockedBadges:s}=e;return(0,i.jsx)(d.f5.Consumer,{children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(R,{siteName:e.siteName(),country:e.getCountry().code,authorized:t,showCallToAction:!0,name:n}),(0,i.jsx)(F,{}),t.to(o.x.User_ViewBadges)&&(0,i.jsx)(eU,{earnedBadges:a,lockedBadges:s}),(0,i.jsx)(u.P.Section,{children:(0,i.jsx)(h.lZ,{tone:"success",title:"Curious how much of a difference you've made?",action:{content:"Track your impact",url:"/admin/user/impact"},children:"See your total donations and volunteering hours in one place."})}),(0,i.jsx)(u.P.Section,{children:(0,i.jsx)(em,{host:r,authorized:t})})]})})},eY=e=>{let{data:n,name:t,authorized:r,maintenanceMessage:a,metabase:o,host:s,earnedBadges:d,lockedBadges:c}=e;return a?(0,i.jsx)(l.A,{}):(0,i.jsx)(i.Fragment,{children:o?(0,i.jsx)(eX,{authorized:r,name:t,host:s,earnedBadges:d,lockedBadges:c}):(0,i.jsx)(J,{data:n,authorized:r,name:t})})};var eG=t(58454),eJ=t(66727),eQ=t(47167);let eZ=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.P.Section,{children:(0,i.jsx)(m.u,{children:(0,i.jsx)(v.a,{background:"bg-surface-secondary",padding:"800",children:(0,i.jsxs)(p.o,{align:"space-between",blockAlign:"center",gap:"400",children:[(0,i.jsxs)(x.a,{gap:"150",children:[(0,i.jsx)(eG.d,{size:"small",maxWidth:"20ch"}),(0,i.jsx)(eG.d,{size:"medium",maxWidth:"45ch"})]}),(0,i.jsxs)(p.o,{gap:"400",children:[(0,i.jsx)(eG.d,{size:"medium",maxWidth:"15ch"}),(0,i.jsx)(eG.d,{size:"medium",maxWidth:"15ch"}),(0,i.jsx)(eG.d,{size:"medium",maxWidth:"15ch"})]})]})})})}),(0,i.jsx)(u.P.Section,{children:(0,i.jsx)(m.u,{children:(0,i.jsx)(v.a,{padding:"400",children:(0,i.jsx)(eJ.D,{lines:2})})})}),(0,i.jsx)(u.P.Section,{children:(0,i.jsxs)(m.u,{children:[(0,i.jsx)(v.a,{padding:"400",children:(0,i.jsx)(eQ.S,{count:3})}),(0,i.jsx)(m.u.Section,{children:(0,i.jsx)(f.m,{columns:{xs:1,md:3},gap:"400",children:[0,1,2].map(e=>(0,i.jsx)(v.a,{padding:"400",borderWidth:"025",borderColor:"border",borderRadius:"200",children:(0,i.jsxs)(x.a,{gap:"200",children:[(0,i.jsx)(eG.d,{size:"small"}),(0,i.jsx)(eJ.D,{lines:2})]})},e))})})]})})]});var eK=t(95725),e0=t(67948),e1=t(55018),e2=t(84325);let e3=e=>{let{isSignedIn:n,metabase:t,host:o}=e,[s,l]=(0,r.useState)(void 0),[d,c]=(0,r.useState)(""),[u,h]=(0,r.useState)(!0),[g,m]=(0,r.useState)(""),[x,p]=(0,r.useState)(void 0),[j,f]=(0,r.useState)(void 0),[v,y]=(0,r.useState)(),[b,w]=(0,r.useState)(),C=async()=>{let e=await (0,S.wH)();(0,eO.bJ)(e)?(y([]),w([])):(y(e.result.filter(e=>!0===e.isUnlocked)),w(e.result.filter(e=>!1===e.isUnlocked)))},_=async()=>{try{let e=await (0,S.n6)(),n=await (0,S.Fs)(),t=await (0,S.zY)();C(),l(e),c(n.firstName),p(t),h(!1)}catch(e){m("Error loading the data, Please try again."),h(!1)}};return(0,r.useEffect)(()=>{_()},[]),(0,i.jsx)(e1.A,{isLoggedIn:n,children:(0,i.jsx)(a.yB,{adminArea:"user",title:"Dashboard",errorMessage:g,fullWidth:t,titleHidden:!0,children:u?(0,i.jsx)(eZ,{}):(0,i.jsx)(e0.ZC,{children:e=>{let{authorized:n}=e;return(0,i.jsx)(eY,{chartsData:j,data:s,name:d,matchData:x,authorized:n,metabase:t,host:o,earnedBadges:v,lockedBadges:b})}})})})};e3.getInitialProps=async e=>({isSignedIn:await (0,eK.M3)(e.req),metabase:!0,host:(0,e2.Y2)(e)});let e7=(0,s.m)(o.x.User_ViewDashboard)(e3)},27537:(e,n,t)=>{"use strict";t.d(n,{A:()=>o});var i=t(37876),r=t(14232),a=t(82418);let o=e=>{let{completed:n}=e,[t,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>
1{if(!n)return void o(!1);o(!1);let e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)},[n]),(0,i.jsx)("div",{style:{position:"relative",overflow:"visible",zIndex:1},children:(0,i.jsx)(a.A,{active:t,config:{elementCount:200,spread:75,startVelocity:35}})})}},27738:(e,n,t)=>{"use strict";t.d(n,{j:()=>a});var i=t(37876),r=t(72806);t(14232);let a=(e,n)=>e>=n?(0,i.jsx)(r.z,{progress:100}):(0,i.jsx)(r.z,{progress:e/n*100})},33911:e=>{e.exports={headColor:"volunteering-section_headColor__FuN1H",imageTitle:"volunteering-section_imageTitle__Sxqev",cartIcon:"volunteering-section_cartIcon__ITdG7",skeletonShimmerAnimation:"volunteering-section_skeletonShimmerAnimation__HOthO"}},37890:e=>{e.exports={imageTitle:"fundraise-card_imageTitle__Bk0_y",cartIcon:"fundraise-card_cartIcon__V09V2",skeletonShimmerAnimation:"fundraise-card_skeletonShimmerAnimation__CYU6O"}},41687:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/user/dashboard",function(){return t(15511)}])},42634:()=>{},45393:(e,n,t)=>{"use strict";t.d(n,{A:()=>l});var i=t(37876);t(14232);var r=t(51377),a=t(91930),o=t(47677),s=t(52387);let l=e=>{let{title:n,description:t,browseButton:l,onClick:d}=e;return(0,i.jsxs)(r.a,{gap:"200",align:"center",inlineAlign:"center",children:[(0,i.jsx)(a.E,{variant:"headingLg",as:"p",children:n}),(0,i.jsx)(a.E,{variant:"bodyMd",tone:"subdued",as:"p",children:t}),(0,i.jsx)(o.o,{children:(0,i.jsx)(s.$,{variant:"primary",onClick:d,children:l})})]})}},55018:(e,n,t)=>{"use strict";t.d(n,{A:()=>m});var i=t(37876),r=t(14232),a=t(89099),o=t(95705),s=t(91930),l=t(88062),d=t(62557),c=t(3422);let u=t(44264).Ay.p.withConfig({componentId:"sc-3fdc9578-0"})(["margin-right:10px;"]),h=e=>{let{title:n,open:t=!0}=e,r=(0,a.useRouter)();return(0,i.jsx)(l.f5.Consumer,{children:e=>(0,i.jsx)(d.a,{open:t,onClose:()=>{},title:n||"Login/Register",primaryAction:{content:"Login/Register via SSO",onAction:()=>{r.push((0,o.fx)(r.asPath))}},secondaryActions:[{content:"Login via family/friends",onAction:()=>{r.push((0,o.fx)(r.asPath))}},{content:"Register via family/friends",onAction:()=>{(0,c.setCookie)(null,"redirect","true",{maxAge:120,path:"/"}),r.push((0,o.xl)(r.asPath))}}],children:(0,i.jsx)(d.a.Section,{children:(0,i.jsx)("div",{children:(0,i.jsxs)(u,{children:[(0,i.jsx)("p",{children:"It looks like youâre not logged in. To accept the invitation, please choose one of the options below."}),(0,i.jsx)("br",{}),(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:["If youâre a ",e.getCurrentSite().companyName," ","member:"]})," ","use the third option to sign in or register via SSO.",(0,i.jsx)("br",{}),(0,i.jsx)("strong",{children:"Otherwise:"})," use the first two options to sign in or register through family or friends."]})]})})})})})},g="redirect",m=e=>{let{isLoggedIn:n,children:t,isModal:l=!1}=e,{replace:d,isReady:u,asPath:m}=(0,a.useRouter)(),x=l&&!n;return((0,r.useEffect)(()=>{if(n||!u)return;let{[g]:e}=(0,c.parseCookies)();if(e){(0,c.destroyCookie)(null,g,{path:"/"}),d((0,o.fx)(m));return}l||d((0,o.fx)(m))},[n,l,u,m,d]),n)?(0,i.jsx)(i.Fragment,{children:t}):x?(0,i.jsx)(h,{}):(0,i.jsx)(s.E,{as:"p",variant:"bodySm",children:"Redirecting to loginâ¦"})}},57901:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var i=t(37876),r=t(55645),a=t(77005),o=t(91930);t(14232);let s=()=>(0,i.jsx)(r.P.Section,{children:(0,i.jsx)(a.lZ,{children:(0,i.jsxs)(o.E,{as:"p",variant:"bodyMd",children:[(0,i.jsx)("p",{children:(0,i.jsx)("b",{children:"Your GoodCompany dashboards are currently down for maintenance."})}),(0,i.jsx)("br",{}),(0,i.jsx)("p",{children:" They will be back by 5pm 8th June AEST."}),(0,i.jsx)("br",{}),(0,i.jsx)("p",{children:"Thank you for your patience."})," ",(0,i.jsx)("br",{}),(0,i.jsx)("p",{children:"Please note - Your reports and other functionality are fully operative. This maintenance is only impacting dashboards."})]})})})},67287:e=>{e.exports={imageTitle:"volunteer-card_imageTitle__nR_CK",cartIcon:"volunteer-card_cartIcon__EeMJZ",skeletonShimmerAnimation:"volunteer-card_skeletonShimmerAnimation__Qpt4F"}},71914:e=>{e.exports={imageTitle:"donate-card_imageTitle__l7do9",cartIcon:"donate-card_cartIcon__9lW5Q",skeletonShimmerAnimation:"donate-card_skeletonShimmerAnimation__kXI7S"}},75975:e=>{e.exports={headColor:"donation-section_headColor__IChXf",imageTitle:"donation-section_imageTitle__jWhge",cartIcon:"donation-section_cartIcon__4tWLb",skeletonShimmerAnimation:"donation-section_skeletonShimmerAnimation__WReNO"}},84325:(e,n,t)=>{"use strict";function i(e){var n,t;return null!=(t=null==e||null==(n=e.headers)?void 0:n.host)?t:window.location.hostname}function r(e){return i(e.req)}function a(e){var n,t,i;return null!=(i=null==e||null==(t=e.req)||null==(n=t.headers)?void 0:n.referer)?i:"undefined"!=typeof document?document.referrer:""}t.d(n,{Pl:()=>a,Y2:()=>r,v4:()=>i})},84897:e=>{e.exports={headColor:"fundraising-section_headColor__tdPQX",imageTitle:"fundraising-section_imageTitle__0HnOH",cartIcon:"fundraising-section_cartIcon__breRa",skeletonShimmerAnimation:"fundraising-section_skeletonShimmerAnimation__8B9CX"}}},e=>{e.O(0,[2026,9879,9174,888,6989,4751,8174,9830,3266,2402,7710,6374,177,1409,4182,1487,8962,636,6593,8792],()=>e(e.s=41687)),_N_E=e.O()}]); 2//# sourceMappingURL=dashboard-1585c2968cddac1d.js.map
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.