PageSourceSearch

https://donate-portal.vercel.app/_next/static/chunks/pages/user/chart-f62835dacf547d93.js

js donate-portal.vercel.app collected 2026-10-03 07:15:55 UTC 9,844 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[500],{1946:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/chart",function(){return r(9956)}])},8874:(e,t,r)=>{"use strict";r.d(t,{$W:()=>l,Bq:()=>p,DT:()=>m,F4:()=>h,QV:()=>S,Sk:()=>y,WJ:()=>x,bg:()=>u,ej:()=>v,ki:()=>f,n4:()=>g,nW:()=>c,rX:()=>d,w4:()=>b,wx:()=>j});var a=r(6540),n=r(4335),o=r(8465),s=r.n(o),i=r(8122);let l={adminMail:"[email protected]",server:"https://donation.divyavrat.com/"},c=e=>{(0,a.useEffect)(()=>{let t=document.createElement("script");return t.src=e,t.async=!0,document.body.appendChild(t),()=>{document.body.removeChild(t)}},[e])},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[t,r]=(0,a.useState)("");return(0,a.useEffect)(()=>{r(localStorage[e]||"")},[]),t},h=e=>{e&&(e.preventDefault(),e.stopPropagation())},u=()=>{"admin"!=localStorage.type&&(window.location.href="/")},p=e=>e.replace(/(^[,\s]+)|([,\s]+$)/g,""),m=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase()),g=e=>{let t=e.slice(0,12).replace(/\D/g,""),r=t.match(/^(\d{1,3})(\d{0,3})(\d{0,4})$/);return r&&(t="".concat(r[1]).concat(r[2]?" ":"").concat(r[2]).concat(r[3]?"-":"").concat(r[3])),t},x=e=>{var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)},f=e=>{n.A.post("/api/mail",e)},j=e=>e;function y(e){return new Promise((t,r)=>{let a=new FileReader;a.onloadend=()=>t(a.result),a.readAsDataURL(e)})}async function b(e){try{return await (0,i.A)(e,{maxSizeMB:1,maxWidthOrHeight:1920,useWebWorker:!0})}catch(e){console.log(e)}}let v=e=>e&&e.toString?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):e,S=(e,t)=>{s().fire({title:"Are you sure?",text:"You won't be able to revert this!",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes, delete it!"}).then(t=>{t.isConfirmed&&(e(),s().fire("Deleted!","Successfully deleted.","success"))})}},3261:(e,t,r)=>{"use strict";r.d(t,{A:()=>x});var a=r(4848),n=r(6540),o=r(5556),s=r.n(o),i=r(6715),l=r(6752),c=r(4968),d=r(9998),h=r(3422),u=r(4335),p=r(8874);function m(){let e=(0,i.useRouter)(),[t,r]=(0,n.useState)(0),[o,s]=(0,n.useState)(null),[m,g]=(0,n.useState)(null),x=(0,p.rX)("userImage"),f=(0,p.rX)("type")||"user",j=(0,p.rX)("lastPage");return(0,n.useEffect)(()=>{localStorage.org&&s(localStorage.org?JSON.parse(localStorage.org).image:null),"admin"==localStorage.type&&((0,p.bg)(),(async()=>{u.A.post("/api/mail",{type:"list"}).then(e=>{if(e&&e.data){var t;r(null===(t=e.data)||void 0===t?void 0:t.length)}})})())},[]),(0,a.jsxs)("header",{children:[(0,a.jsxs)("div",{className:"nav thin",children:[(0,a.jsx)("input",{type:"checkbox",id:"nav-check"}),(0,a.jsx)("div",{className:"nav-header",children:(0,a.jsx)("div",{className:"nav-title",children:(0,a.jsx)("a",{href:"/user/home",children:(0,a.jsx)("img",{className:"logo",alt:"",src:(0,p.wx)(o)||"/logo.png",onError:e=>{"/logo.png"!=e.target.src&&(e.target.src="/logo.png")}})})})}),(0,a.jsx)("div",{className:"nav-btn",children:(0,a.jsxs)("label",{htmlFor:"nav-check",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]})}),(0,a.jsxs)("div",{className:"nav-links",children:[(0,a.jsx)("a",{href:"/user/home",children:"Home"}),(0,a.jsx)("a",{href:"/user/report",children:"Reports"}),("org"==f||"admin"==f)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"/user/campaign",children:"Campaigns"}),(0,a.jsx)("a",{href:"/user/import",children:"Import"}),(0,a.jsx)("a",{href:"/user/integration",children:"Integration"})]}),"org"==f&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("a",{href:"/user/create",children:"Start New Campaign"})}),"admin"==f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"/admin/clients",children:"Clients"}),(0,a.jsx)("a",{href:"/admin/notification",children:(0,a.jsx)(l.A,{badgeContent:t,color:"primary",children:(0,a.jsx)(h.A,{})})})]}),"user"==f&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("a",{href:"/page/donate?id="+j,children:"GIVE"})}),(0,a.jsx)("a",{style:{padding:0,marginRight:40},id:"menu-button","aria-controls":"headerMenu","aria-haspopup":"true",onClick:e=>g(e.currentTarget),children:(0,a.jsx)("img",{alt:"User",src:(0,p.wx)(x)||"/img/user.jpg",onError:e=>{"/img/user.jpg"!=e.target.src&&(e.target.src="/img/user.jpg")},className:"img-fluid img-fit border-circle nav-avatar"})})]})]}),(0,a.jsxs)(c.A,{id:"headerMenu",anchorEl:m,open:!!m,onClose:()=>g(null),MenuListProps:{"aria-labelledby":"menu-button"},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:[(0,a.jsx)(d.A,{onClick:()=>e.push("/user/profile"),children:"Profile"}),(0,a.jsx)(d.A,{href:"/",onClick:()=>{localStorage.clear(),e.push("/")},children:"Logout"})]})]})}function g(){let e=(0,p.rX)("type");return(0,a.jsxs)("footer",{className:"thin",children:[(0,a.jsxs)("a",{href:"/",className:"flex flex-row flex-center",children:[(0,a.jsx)("span",{className:"hidden-xs mr-20",children:"Powered by "}),(0,a.jsx)("img",{src:"/logo.png",className:"logo",alt:""})]}),(0,a.jsxs)("div",{id:"FooterRightLinks",className:"ml-auto",children:["admin"!=e&&(0,a.jsx)("a",{href:"/page/helpmessage",className:"mr-20",children:"Message to Admin"}),(0,a.jsx)("a",{href:"/page/contact",className:"mr-20",children:"Contact Us"})]})]})}
1function x(e){let{header:t,footer:r,children:o,className:s,background:l,Component:c,pageProps:d}=e,h=(0,i.useRouter)();return(0,n.useEffect)(()=>{let e=document.querySelector("#jss-server-side");e&&e.parentElement.removeChild(e)},[]),(0,n.useEffect)(()=>{h&&h.pathname&&(-1!=h.pathname.indexOf("user")||-1!=h.pathname.indexOf("admin"))&&!localStorage.userid&&h.push("/")},[h]),(0,a.jsxs)("main",{className:"loggedinLayout "+s,children:[t&&(0,a.jsx)(m,{}),(0,a.jsx)(c,{...d}),o&&(0,a.jsx)("section",{children:o}),r&&(0,a.jsx)(g,{}),(0,a.jsx)("style",{children:l?"\n        main{\n          background:#3D652A url('".concat(l,"') no-repeat center center;\n          background-size:cover;\n        }\n        "):t?"main{background:#F9F9FB;}":""})]})}x.propTypes={Component:s().func.isRequired}},9956:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var a=r(4848),n=r(6540),o=r(4335),s=r(3261);function i(){(0,n.useEffect)(()=>{(async()=>{o.A.post("/api/Donation",{action:"totaldonationsChart",userId:localStorage.userid,type:localStorage.type}).then(t=>{if(t&&t.data){let r=[],a=[],n=[],o=[{name:"Alumni",y:0,sliced:!0,selected:!0},{name:"Parent",y:0},{name:"Trustee",y:0},{name:"Friend",y:0}];t.data.map(e=>{r.push(e.amount),a.push(e.creationDate);let t=["Alumni","Parent","Trustee","Friend"].indexOf(e.donorType);(isNaN(t)||t<0)&&(t=0),o[t].y+=e.amount;let s=!1;n.forEach((t,r)=>{t.name==e.creationDate&&(s=r)}),!1!==s?n[s].y+=e.amount:n.push({name:e.creationDate,y:e.amount})}),e(r,a,n,o)}})})()},[]);let e=(e,t,r,a)=>{Highcharts.chart("container",{title:{text:"Total Donations Received"},subtitle:{text:"From 2021 till date"},yAxis:{title:{text:"Donation Amount"}},xAxis:{accessibility:{rangeDescription:"Dates"},categories:t},legend:{layout:"vertical",align:"right",verticalAlign:"middle"},plotOptions:{series:{label:{connectorAllowed:!1}}},series:[{name:"Received",data:e}],responsive:{rules:[{condition:{maxWidth:700},chartOptions:{legend:{layout:"horizontal",align:"center",verticalAlign:"bottom"}}}]},exporting:{showTable:!0},credits:{enabled:!1}});var n=function(){var e,t=[],r=Highcharts.getOptions().colors[0];for(e=0;e<10;e+=1)t.push(Highcharts.color(r).brighten((e-3)/7).get());return t}();
1Highcharts.chart("container2",{chart:{plotBackgroundColor:null,plotBorderWidth:null,plotShadow:!1,type:"pie"},title:{text:"Amount received to-date"},tooltip:{pointFormat:"{series.name}: ${point.y:.1f} <b>{point.percentage:.1f}%</b>"},accessibility:{point:{valueSuffix:"%"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",colors:n,dataLabels:{enabled:!0,format:"<b>{point.name}</b><br>{point.percentage:.1f} %",distance:-50,filter:{property:"percentage",operator:">",value:4}}}},series:[{name:"Share",data:r}],credits:{enabled:!1}}),Highcharts.chart("container3",{chart:{plotBackgroundColor:null,plotBorderWidth:null,plotShadow:!1,type:"pie"},title:{text:"Donor Type"},tooltip:{pointFormat:"{series.name}: ${point.y:.1f} <b>{point.percentage:.1f}%</b>"},accessibility:{point:{valueSuffix:"%"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",colors:n,dataLabels:{enabled:!0,format:"<b>{point.name}</b><br>{point.percentage:.1f} %",distance:-50,filter:{property:"percentage",operator:">",value:4}}}},series:[{name:"Share",data:a}],credits:{enabled:!1}})};return(0,a.jsxs)("main",{children:[(0,a.jsx)("script",{src:"https://code.highcharts.com/highcharts.js"}),(0,a.jsx)("script",{src:"https://code.highcharts.com/modules/series-label.js"}),(0,a.jsx)("script",{src:"https://code.highcharts.com/modules/exporting.js"}),(0,a.jsx)("script",{src:"https://code.highcharts.com/modules/export-data.js"}),(0,a.jsx)("script",{src:"https://code.highcharts.com/modules/accessibility.js"}),(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h1",{children:"Total Donations Chart"}),(0,a.jsx)("small",{children:"Click on Chart menu to export data"}),(0,a.jsxs)("figure",{class:"highcharts-figure",children:[(0,a.jsx)("div",{id:"container2"}),(0,a.jsx)("div",{id:"container3"}),(0,a.jsx)("div",{id:"container"})]})]})]})}let l=()=>(0,a.jsx)(s.A,{Component:i,header:!0,footer:!0})}},e=>{var t=t=>e(e.s=t);e.O(0,[3478,9906,8037,636,6593,8792],()=>t(1946)),_N_E=e.O()}]);

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.