@bookmypuja-tech/bmp-pdf 0.4.65 → 0.4.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import u from'react';import {maxBy}from'lodash';import Co from'qrcode';var Mi=Object.defineProperty;var $i=(n,s,m)=>s in n?Mi(n,s,{enumerable:true,configurable:true,writable:true,value:m}):n[s]=m;var bt=(n,s,m)=>$i(n,typeof s!="symbol"?s+"":s,m);var qe=n=>{typeof n=="string"&&(n=new Date(n));let s={day:"2-digit",month:"short",year:"numeric"};return n.toLocaleDateString("en-GB",s).replace(",","")};var K=(n,s=false)=>{if(!s){if(n>=1e7)return `\u20B9${(n/1e7).toFixed(2)}Cr`;if(n>=1e5)return `\u20B9${(n/1e5).toFixed(2)}L`}return n.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:n%1===0?0:2})};var ke="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",gt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",At="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ct="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var mt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",ut="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Tt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:at});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var Nt=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Ui=({data:n,dates:s})=>{let m=qe(s[0])===qe(s[1]);return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:Nt.page},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),u.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",m?qe(s[0]):`${qe(s[0])} - ${qe(s[1])}`),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},n?n.map((l,d)=>u.createElement(View,{wrap:false,key:d,style:Nt.pujaTile},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(d+1).toString().padStart(2,"0"))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantName),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.pujaName)),m?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},qe(l.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},u.createElement(Text,null,"Priest Note: ",l.priestNote)):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},u.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},u.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Gi=Ui;Font.register({family:"Roboto",fontWeight:"normal",src:at});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var ue=1,nt=25*ue,Bt=StyleSheet.create({page:{padding:10*ue,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ue,paddingHorizontal:10*ue,fontSize:nt,border:`${5*ue}px solid black`,borderRadius:5*ue,width:"100%",display:"flex",flexDirection:"column"}}),Ri=({data:n,dates:s})=>{let m=qe(s[0])===qe(s[1]);return u.createElement(Document,null,u.createElement(Page,{dpi:200,size:[457*ue],style:Bt.page},u.createElement(Image,{fixed:true,style:{height:55*ue,width:274*ue,marginBottom:10*ue,marginHorizontal:"auto"},src:ke}),u.createElement(Text,{style:{fontSize:25*ue,marginBottom:5*ue,marginHorizontal:"auto"}},"Puja List"),u.createElement(Text,{style:{fontSize:20*ue,marginBottom:5*ue,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",m?qe(s[0]):`${qe(s[0])} - ${qe(s[1])}`),u.createElement(Text,{style:{fontSize:17*ue,marginBottom:20*ue,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ue}},n?n.map((l,d)=>u.createElement(View,{wrap:false,key:d,style:Bt.pujaTile},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ue}},u.createElement(Text,{style:{opacity:.6,marginRight:10*ue}},"#",(d+1).toString().padStart(2,"0")),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ue}},l.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ue,paddingHorizontal:5*ue,borderRadius:5*ue,marginTop:3*ue}},u.createElement(Text,{style:{color:"#ffffff",fontSize:nt}},"Pending")):null,u.createElement(Text,{style:{fontWeight:"bold",fontSize:nt}},"Rs ",l.amount))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ue,gap:3*ue}},u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.participantName),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ue}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.pujaName)),m?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},qe(l.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ue}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ue}},u.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},eo=Ri;var io={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},oo=({style:n={},children:s})=>{let m=r=>{let t=maxBy(Object.entries(io),([i,p])=>{let I=r.match(p);return I?I.length:0});return t?t[0]:"Latin"},l=r=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(r));function d(r){return r.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let y=r=>{let t=[],i=null,p="";for(let I of r){I=d(I);let S=m(I);S!==i?(p&&t.push({text:p,script:i}),i=S,p=I):p+=I;}return p&&t.push({text:p,script:i}),t},g=[];s&&typeof s=="string"&&!Array.isArray(s)&&!l(s)&&y(s).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;g.push(u.createElement(Text,{key:i,style:{fontFamily:p}},t.text));});let a=[],o={fontFamily:"Noto Sans"};return Array.isArray(n)?a=[...n,o]:n&&Object.keys(n).length>0?a=[n,o]:a=[o],u.createElement(Text,{style:a},g?.length?g:s)},e=oo;var no=({startDate:n,endDate:s,reportTiming:m,templeName:l,reportName:d,showGeneratedAt:y=true})=>u.createElement(u.Fragment,null,u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:ke}),y&&u.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),s?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",n.toDateString()," - ",s.toDateString()):u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",n.toDateString()),m&&Object.keys(Tt).includes(m)?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Tt[m]," Report"):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),u.createElement(e,{style:{fontSize:12}},`${l}`)),F=no;var po=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,templeName:m,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,"Quantity"))),l.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,g+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,y.name)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,y.quantity))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Et=po;var mo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayWiseTotals:y,summary:g})=>{let a=g?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=g?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=g?.totalCreditedAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},u.createElement(View,{style:{marginBottom:15}},u.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",a.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&y&&y.length>0&&u.createElement(View,{style:{marginBottom:20}},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Puja Amount")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Postal Charges")),u.createElement(View,{style:{padding:6,width:"25%"}},u.createElement(e,null,"Credited Amount"))),y.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.dateDisplay)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,width:"25%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),u.createElement(View,null,d&&u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Puja Amt")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,"Delivery")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,"Credited Amt")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Transaction ID"))),l.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,t.date," ",t.time)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?u.createElement(View,{style:{padding:6,width:"58%"}},u.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):u.createElement(u.Fragment,null,u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,t.transactionId))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},_t=mo;var fo=({children:n,splitat:s})=>{if(!n||typeof n!="string")return null;let m="";return s=="words"&&(m=" "),u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},n.split(m).map((l,d)=>u.createElement(u.Fragment,null,u.createElement(e,{key:d},l,s=="words"?" ":"")))))},Q=fo;var wo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},a=l.map(g),o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Post Type")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,width:"15%"}},u.createElement(e,null,"Postal Amnt"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(Q,null,t.invoiceNumber)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,t.devoteeName),u.createElement(e,{style:{fontSize:8,marginTop:4}},t.address)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,t.postType)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.pujaName)),u.createElement(View,{style:{padding:6,width:"15%"}},u.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:m}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((t,i)=>{let p=t.items.map(g);return u.createElement(View,{key:t.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),o(),p.map((I,S)=>r(I,S)))})):u.createElement(u.Fragment,null,o(),a.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Lt=wo;var To=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d,isDayWiseGrouped:y,dayGroups:g,isEmbed:a=false})=>{l.sort((p,I)=>p.invoiceNumber.localeCompare(I.invoiceNumber));let r=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,width:"7%"}},u.createElement(e,null,"Mode"))),t=(p,I)=>u.createElement(View,{key:I,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,I+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,p.invoiceNumber)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,p.devoteeName)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,p.pujaName," - ",p.prasadName)),u.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,p.quantity)),u.createElement(View,{style:{padding:6,width:"7%"}},u.createElement(e,null,p.collectionMode))),i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:m,reportTiming:d}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},y&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((p,I)=>u.createElement(View,{key:p.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},p.dateDisplay),u.createElement(e,{style:{fontSize:10}},p.count," item",p.count!==1?"s":"")),r(),p.items.map((S,k)=>t(S,k))))):u.createElement(u.Fragment,null,r(),l.map((p,I)=>t(p,I)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?i:u.createElement(Document,null,i)},ft=To;var Vo=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,isDayWiseGrouped:y,isEmbed:g=false})=>{let a=0,o=0,r=l.some(i=>i.bookings.some(p=>p.requires_coupon));if(!l||l.length===0){let i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja List",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return g?i:u.createElement(Document,null,i)}let t=u.createElement(u.Fragment,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),l.some(i=>i.bookings.some(p=>p.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(i=>i.bookings.some(p=>p.is_early_reminder&&!p.requires_coupon))?l.flatMap((i,p)=>i.bookings.filter(I=>I.is_early_reminder&&!I.requires_coupon).map((I,S)=>(o++,u.createElement(View,{key:`${p}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,i.name)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,I.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,I.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,I.date?new Date(I.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),u.createElement(e,{style:{fontSize:12}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((i,p)=>{if(i.bookings.every(P=>P.is_early_reminder||P.requires_coupon))return null;a=0;let I=i.bookings.some(P=>P.topping_name),S=y&&i.dayGroups&&i.dayGroups.length>0,k=(P=false)=>I?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),B=(P,R,ge)=>P.is_early_reminder||P.requires_coupon?null:I?u.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,ge)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,P.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},u.createElement(e,null,P.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,P.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},u.createElement(e,null,P.topping_name||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},u.createElement(e,null,P.quantity))):u.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,ge)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,P.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,P.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,P.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,P.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,P.collectionMode||""))),P.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,P.priestNote))));return u.createElement(View,{key:p,style:{marginBottom:25}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${i.name} - ${i.totalBookings||i.bookings.length}`),!S&&k(true)),S?u.createElement(u.Fragment,null,i.dayGroups.map((P,R)=>{let ge=0,Le=P.items.filter(rt=>!rt.is_early_reminder&&!rt.requires_coupon);return Le.length===0?null:u.createElement(View,{key:P.dateKey,style:{marginTop:R>0?15:0}},u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},P.dateDisplay),u.createElement(e,{style:{fontSize:9}},`${Le.length} booking${Le.length!==1?"s":""}`)),k(false),Le.map((rt,ci)=>(ge++,B(rt,ci,ge))))})):u.createElement(u.Fragment,null,(()=>{if(I){let P=i.bookings.filter(ge=>!ge.is_early_reminder&&!ge.requires_coupon),R=new Map;return P.forEach(ge=>{let Le=`${ge.invoiceNumber}|${ge.devoteeName}|${ge.nakshatra}|${ge.topping_name||""}`;if(R.has(Le)){let rt=R.get(Le);rt.quantity=(parseInt(rt.quantity)+parseInt(ge.quantity)).toString();}else R.set(Le,{...ge});}),Array.from(R.values()).map((ge,Le)=>(a++,B(ge,Le,a)))}else return i.bookings.map((P,R)=>P.is_early_reminder||P.requires_coupon?null:(a++,B(P,R,a)))})()))}))),r?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=l.flatMap(I=>I.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:I.name}))),p={};for(let I of i)p[I.invoiceNumber]||(p[I.invoiceNumber]=[]),p[I.invoiceNumber].push(I);return Object.entries(p).map(([I,S],k)=>{let B=S,P=B[0],R=B.length<=5;return u.createElement(View,{key:I,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!R},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},u.createElement(e,{style:{fontWeight:"semibold"}},I),u.createElement(e,null,P.date?new Date(P.date).toDateString():n.toDateString())),u.createElement(e,null,P.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),B.map((ge,Le)=>u.createElement(View,{key:Le,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${ge.devoteeName} ----- ${ge.nakshatra} ----- ${ge.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return g?t:u.createElement(Document,null,t)},yt=Vo;var Po=({templeName:n,startDate:s,endDate:m,pujas:l,reportTiming:d})=>{let y=l.sort((g,a)=>{let o=g.nakshatras.length;return a.nakshatras.length-o});return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:s,endDate:m,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},y.map((g,a)=>u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:25}},u.createElement(View,null,u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${g.name} - ${g.totalCount}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},u.createElement(e,null,"Quantity"))),g.nakshatras.map((o,r)=>u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},u.createElement(e,null,o.count))))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},ct=Po;var No=({startDate:n,endDate:s,templeName:m,data:l,isEmbed:d=false})=>{let y=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?u.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let g=l.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),a=l.filter(t=>t.deliveryMode==="international-post"),o=l.filter(t=>t.deliveryMode==="speedpost"),r=t=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:20,flexWrap:"wrap"}},t.map(i=>{let p=i.qrContent,I=Co.toDataURL(p);return u.createElement(View,{wrap:false,key:i.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},u.createElement(View,{style:{width:240}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},i.name),u.createElement(View,{style:{fontSize:10}},u.createElement(e,{style:{fontSize:10}},i.address)),u.createElement(e,{style:{fontSize:10}},i.phone)),u.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},i.deliveryMode==="speedpost"?"SP":i.deliveryMode==="international-post"?"IP":"NP"),i.qrContent&&I?u.createElement(Image,{src:I,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,u.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",i.pujaDetails))}));return u.createElement(u.Fragment,null,g.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",g.length),r(g)),a.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",a.length),r(a)),o.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",o.length),r(o)))})()):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return d?y:u.createElement(Document,null,y)},xt=No;var Bo=({startDate:n,endDate:s,templeName:m,pujaData:l,prasadData:d,deliveryData:y,reportTiming:g})=>{y=y.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});l.some(t=>t.bookings.some(i=>i.requires_coupon));return l.length==0&&d.length==0&&y.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Combined Report",templeName:m}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,l.length>0&&yt({startDate:n,endDate:s,templeName:m,pujas:l,isEmbed:true}),d.length>0&&ft({startDate:n,endDate:s,templeName:m,data:d,isEmbed:true}),y.length>0&&xt({startDate:n,endDate:s,templeName:m,data:y,isEmbed:true})))},$t=Bo;var jo=({startDate:n,endDate:s,data:m})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Temple Payment Report",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"S.No.")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,"Temple Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Bookings")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Revenue"))),m?.map((l,d)=>u.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,d+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,l.bookings)),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"\u20B9",l.revenue))))))),Ot=jo;var Lo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Settlement")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"UTR")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Settlement ID"))),a=(o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,o.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.settlement_amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},u.createElement(e,null,o.utr.split("").map((t,i)=>u.createElement(e,{key:i},t)))),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},u.createElement(View,{style:{display:"flex",flexDirection:"column"}},o.invoices.map((t,i)=>u.createElement(e,{key:i},t.number," (",t.amount,")")))),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,o.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:m}),u.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:10}},o.count," settlement",o.count!==1?"s":""," | Total: ",o.dayTotal)),g(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g(),l.settlements.map((o,r)=>a(o,r)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ht=Lo;var Mo=({data:n})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},u.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),u.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},n.templeName),u.createElement(e,{style:{fontSize:10}},n.templeAddress),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},u.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),u.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:mt}))),n.qrContent?u.createElement(View,{style:{width:85}},u.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},n.status==="confirmed"?u.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,u.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),u.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:10}},u.createElement(e,{style:{fontSize:11}},"Bill to:"),u.createElement(e,{style:{fontSize:11}},n.devoteeDetails.name),n.devoteeDetails.phone?u.createElement(e,{style:{fontSize:11}},n.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:11}},n.bookingDate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},u.createElement(e,null,"Item Description")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Price")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Quantity")),u.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},u.createElement(e,null,"Total"))),n.items.map((s,m)=>u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},s.pujaName?u.createElement(e,{style:{fontSize:11}},s.pujaName):null,s.devoteesName?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.devoteesName):null,s.pujaDate?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.pujaDate," ",s.timing?`- ${s.timing}`:null):null,s.repeatEndDate&&s.repeatStartDate?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.repeatStartDate," to ",s.repeatEndDate," ",s.timing?`- ${s.timing}`:null):null),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.basePujPrice)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},`${s.quantity?s.quantity:""}${s.repeatCount?` x ${s.repeatCount}`:""}`)),u.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.totalPrice))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},u.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),u.createElement(e,null,n.paymentMethod)),u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"50%",textAlign:"right"}},u.createElement(e,null,"Subtotal: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.subTotal))),n.postalCharges?u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Postal Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.postalCharges))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Payment Gateway Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.paymentGatewayCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Platform Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.platformCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"GST (18%): ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.gst))),u.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Total: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},u.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.afternoon.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.evening.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null):null,n.instructions.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},u.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},u.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},n.instructions.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,") ",s.instruction)))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),u.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Kt=Mo;var Ho=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Amount")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Payment Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},u.createElement(e,null,"Bank UTR No"))),l.map((d,y)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.invoiceNo)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.paymentDate)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},u.createElement(Q,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Qt=Ho;var Uo=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Base Amount")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway Charges")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Payment Mode")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},u.createElement(e,null,"UTR Number"))),l.map((d,y)=>u.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.baseAmount)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFees)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFeesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayCharges)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.paymentMode)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement(Q,null,d.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:3,width:"12%"}},u.createElement(Q,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ut=Uo;var Yo=({startDate:n,endDate:s,templeName:m,data:l,dayGroups:d,summary:y})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&d.length>1?u.createElement(View,{style:{marginBottom:25}},u.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Total Count")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,null,"Total Amount"))),(()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.entries()).map(([a,o],r)=>u.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,null,K(o.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}},(()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.values()).reduce((a,o)=>a+o.quantity,0)})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.values()).reduce((a,o)=>a+o.amount,0)})())))),d.some(g=>g.dayPostalTempleFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,(()=>{let g=d.filter(o=>o.postalChargesBreakup).map(o=>o.postalChargesBreakup);if(g.length===0)return "";let a=[0,0,0];return g.forEach(o=>{o&&(a[0]+=o[0],a[1]+=o[1],a[2]+=o[2]);}),`${a.join("+")}`})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((g,a)=>g+(a.dayPostalTempleFees||0),0))))),d.some(g=>g.dayPostalCarrierFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((g,a)=>g+(a.dayPostalCarrierFees||0),0))))),(()=>{let g=new Map;return d.forEach(a=>{a.otherChargesBreakup?.forEach(o=>{let r=g.get(o.name)||{count:0,amount:0};g.set(o.name,{count:r.count+(o.count||0),amount:r.amount+o.amount});});}),g.size===0?null:Array.from(g.entries()).map(([a,o])=>u.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},a)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.count>0?o.count:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(o.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}})),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let g=new Map;d.forEach(t=>{t.items.forEach(i=>{let p=g.get(i.name)||{quantity:0,amount:0};g.set(i.name,{quantity:p.quantity+i.quantity,amount:p.amount+(i.amount||0)});});});let a=Array.from(g.values()).reduce((t,i)=>t+i.amount,0),o=d.reduce((t,i)=>t+((i.dayPostalCarrierFees||0)+(i.dayPostalTempleFees||0)),0),r=d.reduce((t,i)=>{let p=i.otherChargesBreakup?.reduce((I,S)=>I+S.amount,0)||0;return t+p},0);return a+o+r})()))))):null,d&&d.length>0&&u.createElement(View,{break:true},u.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),d.map((g,a)=>u.createElement(View,{key:g.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},g.dateDisplay)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Count")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,"Amount"))),g.items.map((o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(o.amount||0))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,g.items.reduce((o,r)=>o+r.quantity,0))),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPujaTotal)))),g.dayPostalTempleFees||g.dayPostalCarrierFees?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Charge")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,g.postalChargesBreakup?`${g.postalChargesBreakup.map(o=>o||0).join("+")}`:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPostalTempleFees)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Service")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPostalCarrierFees))))):null,g.otherChargesBreakup?.length?u.createElement(u.Fragment,null,g.otherChargesBreakup.map((o,r)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.count?o.count:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(o.amount)))))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Grand Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayGrandTotal)))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Gt=Yo;var Zo=({startDate:n,templeName:s,pujas:m,reportTiming:l})=>{return !m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),m.map((y,g)=>{let a=y.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return a.length===0?null:u.createElement(View,{key:g,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},y.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," booking",a.length>1?"s":"")),a.map((o,r)=>(u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:o.topping_name?6:0}},u.createElement(e,{style:{fontSize:12}},o.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",o.quantity)),o.topping_name&&u.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},u.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",o.topping_name)),o.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.priestNote))))))})))},Zt=Zo;var Xo=({startDate:n,templeName:s,data:m,reportTiming:l,isDayWiseGrouped:d,dayGroups:y})=>{if(!m||m.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let g=m.sort((o,r)=>o.invoiceNumber.localeCompare(r.invoiceNumber)),a=(o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},u.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},u.createElement(e,{style:{fontSize:12}},o.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",o.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},o.collectionMode)));return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.length," item",g.length>1?"s":"")),d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:12}},u.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:11}},o.count," item",o.count!==1?"s":""))),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g.map((o,r)=>a(o,r)))))},ei=Xo;var Ro=({startDate:n,templeName:s,data:m,isDayWiseGrouped:l,dayGroups:d})=>{let y=o=>{let r="";try{let t=JSON.parse(o.address);r=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{r=o.address;}return {...o,address:r}},g=m.map(y);if(!g||g.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let a=(o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},o.address)),o.phoneNumber&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",o.phoneNumber)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",o.note||o.pujaName)));return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.length," delivery",g.length>1?" items":" item")),l&&d&&d.length>0?u.createElement(u.Fragment,null,d.map((o,r)=>{let t=o.items.map(y);return u.createElement(View,{key:o.dateKey,style:{marginBottom:12}},u.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:11}},o.count," item",o.count!==1?"s":""))),t.map((i,p)=>a(i,p)))})):u.createElement(u.Fragment,null,g.map((o,r)=>a(o,r)))))},oi=Ro;var er=({startDate:n,templeName:s,pujaData:m,prasadData:l,deliveryData:d,reportTiming:y})=>{if(m.length===0&&l.length===0&&d.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let a=l.sort((o,r)=>o.invoiceNumber.localeCompare(r.invoiceNumber));return u.createElement(Document,null,m.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),y&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.charAt(0).toUpperCase()+y.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),m.map((o,r)=>{let t=o.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:u.createElement(View,{key:r,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},o.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,p)=>(u.createElement(View,{key:p,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12}},i.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})),l.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),y&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.charAt(0).toUpperCase()+y.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," item",a.length>1?"s":"")),a.map((o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},u.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},u.createElement(e,{style:{fontSize:12}},o.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",o.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},o.collectionMode))))),d.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},d.length," delivery",d.length>1?" items":" item")),d.map((o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.name),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},o.address)),o.phone&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",o.phone)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",o.pujaDetails))))))},ni=er;var tr=({startDate:n,templeName:s,data:m})=>!m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.length," label",m.length>1?"s":"")),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),m.map(l=>u.createElement(View,{key:l.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},u.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},l.name),u.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},l.deliveryMode==="speedpost"?"SP":l.deliveryMode==="international-post"?"IP":"NP")),u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11}},l.address)),u.createElement(e,{style:{fontSize:11,marginBottom:5}},l.phone),u.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),u.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",l.pujaDetails))))),di=tr;var or=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,selectedPujaNames:y=[]})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),u.createElement(e,{style:{fontSize:12}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((r,t)=>{if(r.bookings.every(S=>S.is_early_reminder||S.requires_coupon))return null;g=0;let i=r.bookings.some(S=>S.topping_name),p=(S=false)=>i?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),I=(S,k,B)=>S.is_early_reminder||S.requires_coupon?null:i?u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,B)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,S.topping_name||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},u.createElement(e,null,S.quantity))):u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,B)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,S.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,S.collectionMode||""))),S.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,S.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:25}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),p(true)),u.createElement(u.Fragment,null,(()=>{if(i){let S=r.bookings.filter(B=>!B.is_early_reminder&&!B.requires_coupon),k=new Map;return S.forEach(B=>{let P=`${B.invoiceNumber}|${B.devoteeName}|${B.nakshatra}|${B.topping_name||""}`;if(k.has(P)){let R=k.get(P);R.quantity=(parseInt(R.quantity)+parseInt(B.quantity)).toString();}else k.set(P,{...B});}),Array.from(k.values()).map((B,P)=>(g++,I(B,P,g)))}else return r.bookings.map((S,k)=>S.is_early_reminder||S.requires_coupon?null:(g++,I(S,k,g)))})()))}))),o?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0];return u.createElement(View,{key:i,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),S.map((B,P)=>u.createElement(View,{key:P,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ai=or;var rr=({startDate:n,templeName:s,pujas:m,reportTiming:l,selectedPujaNames:d=[]})=>{return !m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," ","Report")),d.length>0&&u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),u.createElement(e,{style:{fontSize:9,marginTop:2}},d.join(", "))),m.map((g,a)=>{let o=g.bookings.filter(r=>!r.is_early_reminder&&!r.requires_coupon);return o.length===0?null:u.createElement(View,{key:a,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},g.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},o.length," booking",o.length>1?"s":"")),o.map((r,t)=>(u.createElement(View,{key:t,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},r.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},r.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12}},r.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",r.quantity)),r.collectionMode&&u.createElement(View,{style:{marginTop:4}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",r.collectionMode)),r.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},r.priestNote))))))}),u.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},u.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},ui=rr;var dr=n=>{let s=0,m=0,l=0,d=0;for(let y of n.items)y.paymentMethod!="INTERNATIONAL_CARD"&&y.platformFees>0&&(s+=y.platformFees,m+=y.platformFeesGST,d+=y.invoiceTotal);return l=m+s,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{flexDirection:"row",width:"100%"}},u.createElement(View,{style:{width:"50%"}},u.createElement(Text,null,"INVOICE RECON"),u.createElement(Text,{style:{fontSize:12,marginTop:6}},n.templeName," "),u.createElement(Text,{style:{fontSize:12}},"Bookings from ",n.startDate.toDateString()," to"," ",n.endDate.toDateString()," ")),u.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},u.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),u.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),u.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",marginTop:10}},"Bookings marked with yellow are not to be counted"),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,"Sr no")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,"Invoice Number")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},u.createElement(Text,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"Inv Total")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"PF Total")),u.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},u.createElement(Text,null,"Pay Method")),u.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},u.createElement(Text,null,"Transaction ID")),u.createElement(View,{style:{padding:3,width:"16%"}},u.createElement(Text,null,"Settlement ID")))),n.items.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${y.platformFees==0||y.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,g+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,y.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},u.createElement(Text,null,y.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(y.invoiceTotal))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(y.platformFees)," +"," ",K(y.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,y.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),u.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},u.createElement(Text,null,y.transactionID)),u.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},u.createElement(Text,null,y.settlementID)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,"Total")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(d))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(l))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),u.createElement(View,{style:{padding:3,width:"16%"}})),u.createElement(View,{style:{marginTop:10,fontSize:12}},u.createElement(Text,null,"Total Payable: ",K(l)))))},fi=dr;var gr=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,templeName:m,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,"Quantity"))),l.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,g+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,y.name)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,y.quantity))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),yi=gr;var fr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayWiseTotals:y,summary:g})=>{let a=g?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=g?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=g?.totalCreditedAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},u.createElement(View,{style:{marginBottom:12}},u.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",a.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&y&&y.length>0&&u.createElement(View,{style:{marginBottom:15}},u.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Puja Amount")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Postal Charges")),u.createElement(View,{style:{padding:4,width:"25%"}},u.createElement(e,null,"Credited Amount"))),y.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.dateDisplay)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,width:"25%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),u.createElement(View,null,d&&u.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Puja Amt")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,"Delivery")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,"Credited Amt")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Transaction ID"))),l.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,t.date," ",t.time)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?u.createElement(View,{style:{padding:4,width:"58%"}},u.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):u.createElement(u.Fragment,null,u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,t.transactionId))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},xi=fr;var wr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},a=l.map(g),o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Post Type")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,width:"15%"}},u.createElement(e,null,"Postal Amnt"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},u.createElement(Q,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(Q,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,t.devoteeName),u.createElement(e,{style:{fontSize:7,marginTop:3}},t.address)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,t.postType)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.pujaName)),u.createElement(View,{style:{padding:4,width:"15%"}},u.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:m}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((t,i)=>{let p=t.items.map(g);return u.createElement(View,{key:t.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),o(),p.map((I,S)=>r(I,S)))})):u.createElement(u.Fragment,null,o(),a.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},wi=wr;var Tr=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d,isDayWiseGrouped:y,dayGroups:g})=>{l.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,width:"7%"}},u.createElement(e,null,"Mode"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},u.createElement(e,null,t.devoteeName)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},u.createElement(e,null,t.pujaName," - ",t.prasadName)),u.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,t.quantity)),u.createElement(View,{style:{padding:4,width:"7%"}},u.createElement(e,null,t.collectionMode)));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:m,reportTiming:d}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},y&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((t,i)=>u.createElement(View,{key:t.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:9}},t.count," item",t.count!==1?"s":"")),o(),t.items.map((p,I)=>r(p,I))))):u.createElement(u.Fragment,null,o(),l.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},hi=Tr;var Vr=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,isDayWiseGrouped:y})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja List",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>{if(r.bookings.every(k=>k.is_early_reminder||k.requires_coupon))return null;g=0;let i=r.bookings.some(k=>k.topping_name),p=y&&r.dayGroups&&r.dayGroups.length>0,I=(k=false)=>i?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:k?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:k?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),S=(k,B,P)=>k.is_early_reminder||k.requires_coupon?null:i?u.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,P)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,k.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,k.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,k.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,k.topping_name||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"5%"}},u.createElement(e,null,k.quantity))):u.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,P)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,k.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,k.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,k.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,k.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,k.collectionMode||""))),k.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,k.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:20}},u.createElement(View,{wrap:false,minPresenceAhead:15},u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.totalBookings||r.bookings.length}`),!p&&I(true)),p?u.createElement(u.Fragment,null,r.dayGroups.map((k,B)=>{let P=0,R=k.items.filter(ge=>!ge.is_early_reminder&&!ge.requires_coupon);return R.length===0?null:u.createElement(View,{key:k.dateKey,style:{marginTop:B>0?12:0}},u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},k.dateDisplay),u.createElement(e,{style:{fontSize:8}},`${R.length} booking${R.length!==1?"s":""}`)),I(false),R.map((ge,Le)=>(P++,S(ge,Le,P))))})):u.createElement(u.Fragment,null,(()=>{if(i){let k=r.bookings.filter(P=>!P.is_early_reminder&&!P.requires_coupon),B=new Map;return k.forEach(P=>{let R=`${P.invoiceNumber}|${P.devoteeName}|${P.nakshatra}|${P.topping_name||""}`;if(B.has(R)){let ge=B.get(R);ge.quantity=(parseInt(ge.quantity)+parseInt(P.quantity)).toString();}else B.set(R,{...P});}),Array.from(B.values()).map((P,R)=>(g++,S(P,R,g)))}else return r.bookings.map((k,B)=>k.is_early_reminder||k.requires_coupon?null:(g++,S(k,B,g)))})()))}))),o?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0],B=S.length<=5;return u.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:!B},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),S.map((P,R)=>u.createElement(View,{key:R,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ti=Vr;var Pr=({templeName:n,startDate:s,endDate:m,pujas:l,reportTiming:d})=>{let y=l.sort((g,a)=>{let o=g.nakshatras.length;return a.nakshatras.length-o});return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:s,endDate:m,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},y.map((g,a)=>u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:20}},u.createElement(View,null,u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${g.name} - ${g.totalCount}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},u.createElement(e,null,"Quantity"))),g.nakshatras.map((o,r)=>u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},u.createElement(e,null,o.count))))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Di=Pr;var Ar=({startDate:n,endDate:s,templeName:m,pujaData:l,prasadData:d,deliveryData:y,reportTiming:g})=>{y=y.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let a=0,o=0,r=l.some(t=>t.bookings.some(i=>i.requires_coupon));return l.length==0&&d.length==0&&y.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Combined Report",templeName:m}),u.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,l.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"",templeName:""}),l.some(t=>t.bookings.some(i=>i.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?l.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,I)=>(o++,u.createElement(View,{wrap:false,key:`${i}-${I}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,t.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,p.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(a=0,u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:20}},u.createElement(View,null,u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${t.name} - ${t.bookings.length}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty"))),t.bookings.map((p,I)=>p.is_early_reminder||p.requires_coupon?null:(a++,u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,p.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},u.createElement(e,null,p.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},u.createElement(e,null,p.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},u.createElement(e,null,p.quantity))),p.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,p.priestNote))))))))))))),l.length>0&&r&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=l.flatMap(p=>p.bookings.filter(I=>I.requires_coupon).map(I=>({...I,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,I],S)=>{let k=I,B=k[0];return u.createElement(View,{key:p,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},p),u.createElement(e,null,B.date?new Date(B.date).toDateString():n.toDateString())),u.createElement(e,null,B.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),k.map((P,R)=>u.createElement(View,{key:R,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))))})})())),d.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Prasad Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,width:"10%"}},u.createElement(e,null,"Qty"))),d.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,t.devoteeName)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,t.prasadName)),u.createElement(View,{style:{padding:4,width:"10%"}},u.createElement(e,null,t.quantity)))))),y.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},y&&y.map(t=>{let i=Co.toDataURL(t.qrContent);return u.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.name),u.createElement(View,{style:{fontSize:8}},u.createElement(Q,{splitat:"words"},t.address)),u.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?u.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(Image,{src:i,style:{width:40,height:40,minWidth:40,maxWidth:40}}),u.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",t.pujaDetails))})))))},Ii=Ar;var Nr=({startDate:n,endDate:s,data:m})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Temple Payment Report",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"S.No.")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,"Temple Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Bookings")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Revenue"))),m?.map((l,d)=>u.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,d+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,l.bookings)),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"\u20B9",l.revenue))))))),Pi=Nr;var vr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Settlement")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"UTR")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Settlement ID"))),a=(o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,o.date)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.settlement_amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},u.createElement(e,null,o.utr.split("").map((t,i)=>u.createElement(e,{key:i},t)))),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},u.createElement(View,{style:{display:"flex",flexDirection:"column"}},o.invoices.map((t,i)=>u.createElement(e,{key:i},t.number," (",t.amount,")")))),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,o.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:m}),u.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:8}},o.count," settlement",o.count!==1?"s":""," | ",o.dayTotal)),g(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g(),l.settlements.map((o,r)=>a(o,r)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},zi=vr;var Er=({data:n})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},u.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),u.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},u.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},n.templeName),u.createElement(e,{style:{fontSize:8}},n.templeAddress),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},u.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),u.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:mt}))),n.qrContent?u.createElement(View,{style:{width:65}},u.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},n.status==="confirmed"?u.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,u.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),u.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:8}},u.createElement(e,{style:{fontSize:9}},"Bill to:"),u.createElement(e,{style:{fontSize:9}},n.devoteeDetails.name),n.devoteeDetails.phone?u.createElement(e,{style:{fontSize:9}},n.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:9}},n.bookingDate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},u.createElement(e,null,"Item Description")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Price")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Quantity")),u.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},u.createElement(e,null,"Total"))),n.items.map((s,m)=>u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},s.pujaName?u.createElement(e,{style:{fontSize:9}},s.pujaName):null,s.devoteesName?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.devoteesName):null,s.pujaDate?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.pujaDate," ",s.timing?`- ${s.timing}`:null):null,s.repeatEndDate&&s.repeatStartDate?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.repeatStartDate," to ",s.repeatEndDate," ",s.timing?`- ${s.timing}`:null):null),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.basePujPrice)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},`${s.quantity?s.quantity:""}${s.repeatCount?` x ${s.repeatCount}`:""}`)),u.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.totalPrice))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},u.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),u.createElement(e,null,n.paymentMethod)),u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"50%",textAlign:"right"}},u.createElement(e,null,"Subtotal: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.subTotal))),n.postalCharges?u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Postal Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.postalCharges))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Payment Gateway Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.paymentGatewayCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Platform Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.platformCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"GST (18%): ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.gst))),u.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Total: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?u.createElement(View,{style:{marginBottom:4}},u.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},u.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.afternoon.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.evening.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null):null,n.instructions.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},u.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},u.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},n.instructions.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:7}},m+1,") ",s.instruction)))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),u.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),Ai=Er;var Mr=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?u.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let d=l.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),y=l.filter(o=>o.deliveryMode==="international-post"),g=l.filter(o=>o.deliveryMode==="speedpost"),a=o=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:15,flexWrap:"wrap"}},o.map(r=>{let t=r.qrContent,i=Co.toDataURL(t);return u.createElement(View,{wrap:false,key:r.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},r.name),u.createElement(View,{style:{fontSize:8}},u.createElement(Q,{splitat:"words"},r.address)),u.createElement(e,{style:{fontSize:8}},r.phone)),r.qrContent&&i?u.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP"),u.createElement(Image,{src:i,style:{width:40,height:40,minWidth:40,maxWidth:40}}),u.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",r.pujaDetails))}));return u.createElement(u.Fragment,null,d.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",d.length),a(d)),y.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",y.length),a(y)),g.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",g.length),a(g)))})()):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),ki=Mr;var Hr=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Amount")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Payment Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},u.createElement(e,null,"Bank UTR No"))),l.map((d,y)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.invoiceNo)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.paymentDate)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},u.createElement(Q,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ci=Hr;var Ur=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Base Amount")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees GST")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway Charges")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway GST")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Payment Mode")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Booking Date")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},u.createElement(e,null,"UTR Number"))),l.map((d,y)=>u.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.invoiceNumber)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.baseAmount)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFees)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFeesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayCharges)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.paymentMode)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement(Q,null,d.bookingDate)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:2,width:"12%"}},u.createElement(Q,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ni=Ur;var Yr=({startDate:n,endDate:s,templeName:m,data:l,dayGroups:d,summary:y})=>{l.reduce((a,o)=>a+o.quantity,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&d.length>1?u.createElement(View,{style:{marginBottom:20}},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Total Count")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,null,"Total Amount"))),(()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.entries()).map(([o,r],t)=>u.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,t+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.quantity)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,null,K(r.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}},(()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.values()).reduce((o,r)=>o+r.quantity,0)})())),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.values()).reduce((o,r)=>o+r.amount,0)})())))),d.some(a=>a.dayPostalTempleFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,(()=>{let a=d.filter(r=>r.postalChargesBreakup).map(r=>r.postalChargesBreakup);if(a.length===0)return "";let o=[0,0,0];return a.forEach(r=>{r&&(o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]);}),`${o.join("+")}`})())),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((a,o)=>a+(o.dayPostalTempleFees||0),0))))),d.some(a=>a.dayPostalCarrierFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((a,o)=>a+(o.dayPostalCarrierFees||0),0))))),(()=>{let a=new Map;return d.forEach(o=>{o.otherChargesBreakup?.forEach(r=>{let t=a.get(r.name)||{count:0,amount:0};a.set(r.name,{count:t.count+(r.count||0),amount:t.amount+r.amount});});}),a.size===0?null:Array.from(a.entries()).map(([o,r])=>u.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},o)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.count>0?r.count:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(r.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}})),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let a=new Map;d.forEach(i=>{i.items.forEach(p=>{let I=a.get(p.name)||{quantity:0,amount:0};a.set(p.name,{quantity:I.quantity+p.quantity,amount:I.amount+(p.amount||0)});});});let o=Array.from(a.values()).reduce((i,p)=>i+p.amount,0),r=d.reduce((i,p)=>i+((p.dayPostalCarrierFees||0)+(p.dayPostalTempleFees||0)),0),t=d.reduce((i,p)=>{let I=p.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return i+I},0);return o+r+t})()))))):null,d&&d.length>0&&u.createElement(View,{break:true},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),d.map((a,o)=>u.createElement(View,{key:a.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},a.dateDisplay)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Count")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,"Amount"))),a.items.map((r,t)=>u.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,t+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.quantity)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(r.amount||0))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,a.items.reduce((r,t)=>r+t.quantity,0))),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPujaTotal)))),a.dayPostalTempleFees&&a.dayPostalCarrierFees?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Charge")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,a.postalChargesBreakup?`${a.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPostalTempleFees)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Service")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPostalCarrierFees))))):null,a.otherChargesBreakup?.length?u.createElement(u.Fragment,null,a.otherChargesBreakup.map((r,t)=>u.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.count?r.count:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(r.amount)))))):null,a.dayPostalTempleFees||a.dayPostalCarrierFees||a.otherChargesBreakup?.length?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Day Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayGrandTotal)))):null)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Fi=Yr;var Xr=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,selectedPujaNames:y=[]})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>{if(r.bookings.every(S=>S.is_early_reminder||S.requires_coupon))return null;g=0;let i=r.bookings.some(S=>S.topping_name),p=(S=false)=>i?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),I=(S,k,B)=>S.is_early_reminder||S.requires_coupon?null:i?u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,B)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,S.topping_name||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"5%"}},u.createElement(e,null,S.quantity))):u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,B)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,S.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,S.collectionMode||""))),S.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,S.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:20}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),p(true)),u.createElement(u.Fragment,null,(()=>{if(i){let S=r.bookings.filter(B=>!B.is_early_reminder&&!B.requires_coupon),k=new Map;return S.forEach(B=>{let P=`${B.invoiceNumber}|${B.devoteeName}|${B.nakshatra}|${B.topping_name||""}`;if(k.has(P)){let R=k.get(P);R.quantity=(parseInt(R.quantity)+parseInt(B.quantity)).toString();}else k.set(P,{...B});}),Array.from(k.values()).map((B,P)=>(g++,I(B,P,g)))}else return r.bookings.map((S,k)=>S.is_early_reminder||S.requires_coupon?null:(g++,I(S,k,g)))})()))}))),o?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0];return u.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),S.map((B,P)=>u.createElement(View,{key:P,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},vi=Xr;var tn=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>{let y=l.items[0].shares.length,g=50/(y||1),a=0,o=0,r=new Array(y).fill(0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"Share Report",templeName:m}),l.items.length<=0?u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.items.length>0?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},u.createElement(View,{style:{width:"5%",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),u.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),l.items[0].shares.map((t,i)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.key))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),l.items.map((t,i)=>(a+=t.count,o+=t.total,t.shares.forEach((p,I)=>{r[I]+=p.value;}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{width:"5%",padding:4}},u.createElement(e,{style:{fontSize:8}},i+1)),u.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},t.pujaName)),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t.price))),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},t.count)),t.shares.map((p,I)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(p.value)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t.total)))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},u.createElement(View,{style:{width:"33%",padding:4}},u.createElement(e,{style:{fontSize:8}},"Total")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},a)),r.map((t,i)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(o))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},u.createElement(View,{style:{width:"30%"}},r.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},l.items[0].shares[i].key)),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},K(t))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},"Total")),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},K(o))))),u.createElement(View,{style:{width:"50%"}},l.options?.right_side_table?.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2}},t.map((p,I)=>u.createElement(View,{style:{width:`${100/t.length}%`}},u.createElement(e,{style:{fontSize:9}},p))))))),l.options?.footer_paragraph&&u.createElement(View,{style:{marginTop:20}},u.createElement(e,{style:{fontSize:9}},l.options.footer_paragraph))):null)))},Wi=tn;var nn=n=>{let s=0,m=0;return n.data.items.forEach(l=>{s+=l.quantity,m+=l.total;}),u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n.startDate,endDate:n.endDate,reportName:"Advance Goods Report",templeName:n.templeName,showGeneratedAt:true}),u.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},n.data.multiplier.name," ="," ",K(n.data.multiplier.rate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Text,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,"Quantity")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,"Amount"))),n.data.items.map((l,d)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,d+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Text,null,l.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,l.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,K(l.total))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},u.createElement(Text,null,"Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,s)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,K(m)))))))},ji=nn;var Li={kitchen:{A4:Et,A5:yi},transaction:{A4:_t,A5:xi},"prasad-delivery":{A4:Lt,A5:wi,"110mm":oi},prasad:{A4:ft,A5:hi,"110mm":ei},"puja-detailed":{A4:yt,A5:Ti,"110mm":Zt},"puja-summary":{A4:ct,A5:Di},"combined-report":{A4:$t,A5:Ii,"110mm":ni},"multi-temple-payment":{A4:Ot,A5:Pi},"settlements-report":{A4:Ht,A5:zi},invoice:{A4:Kt,A5:Ai},"postal-report":{A4:xt,A5:ki,"110mm":di},"payment-settlement-report":{A4:Qt,A5:Ci},"invoice-breakup":{A4:Ut,A5:Ni},"puja-count":{A4:Gt,A5:Fi},"custom-report":{A4:ai,A5:vi,"110mm":ui},"invoice-recon":{A4:fi},"share-report":{A4:Wi},"advance-goods":{A4:ji}},qi=class{constructor(s,m){bt(this,"option");bt(this,"size");this.option=s,this.size=m,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:d,src:y})=>Font.register({family:d,src:y})),Font.register({family:"Noto Sans",fontWeight:"normal",src:At}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ct});}async print(s){let l=Li[this.option][this.size],d=u.createElement(l,{...s}),y=pdf(d).toBlob();return y.then(g=>{var a=URL.createObjectURL(g);if(window!=null){let o=window.open(a,"_blank");setTimeout(()=>{o?.print();},1e3);}}),y}async getBlob(s){let l=Li[this.option][this.size],d=u.createElement(l,{...s});return pdf(d).toBlob()}};
1
+ import {Font,StyleSheet,Document,Page,Image,Text,View,pdf}from'@react-pdf/renderer';import u from'react';import {maxBy}from'lodash';import Co from'qrcode';var Mi=Object.defineProperty;var $i=(n,s,m)=>s in n?Mi(n,s,{enumerable:true,configurable:true,writable:true,value:m}):n[s]=m;var bt=(n,s,m)=>$i(n,typeof s!="symbol"?s+"":s,m);var qe=n=>{typeof n=="string"&&(n=new Date(n));let s={day:"2-digit",month:"short",year:"numeric"};return n.toLocaleDateString("en-GB",s).replace(",","")};var K=(n,s=false)=>{if(!s){if(n>=1e7)return `\u20B9${(n/1e7).toFixed(2)}Cr`;if(n>=1e5)return `\u20B9${(n/1e5).toFixed(2)}L`}return n.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:n%1===0?0:2})};var ke="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",at="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",gt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",At="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375699/fonts_NotoSans-Regular_k3jucr.ttf",kt="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375737/fonts_NotoSans-Bold_ou3lxb.ttf",Ct="https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375778/fonts_NotoSans-SemiBold_pgg9sg.ttf";var mt="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375090/bmp-full-logo_heqdsk.png",ut="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375618/paid-5025785_1280_1_sionuj.png",Tt={morning:"Morning",evening:"Evening"};Font.register({family:"Roboto",fontWeight:"normal",src:at});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var Nt=StyleSheet.create({page:{padding:30,fontFamily:"Roboto"},pujaTile:{padding:10,fontSize:9,border:"1px solid rgb(100,100,100)",borderRadius:5,width:"100%",display:"flex",flexDirection:"row"}}),Ui=({data:n,dates:s})=>{let m=qe(s[0])===qe(s[1]);return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:Nt.page},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),u.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",m?qe(s[0]):`${qe(s[0])} - ${qe(s[1])}`),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},n?n.map((l,d)=>u.createElement(View,{wrap:false,key:d,style:Nt.pujaTile},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(Text,{style:{opacity:.6,marginRight:10}},"#",(d+1).toString().padStart(2,"0"))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",marginBottom:3,gap:3}},u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantName),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},l.pujaName)),m?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},qe(l.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},u.createElement(Text,null,"Priest Note: ",l.priestNote)):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},u.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",l.amount),l.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3,paddingHorizontal:5,borderRadius:5,marginTop:3}},u.createElement(Text,{style:{color:"#ffffff",fontSize:8}},"Pending")):null))):null)))},Gi=Ui;Font.register({family:"Roboto",fontWeight:"normal",src:at});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var ue=1,nt=25*ue,Bt=StyleSheet.create({page:{padding:10*ue,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ue,paddingHorizontal:10*ue,fontSize:nt,border:`${5*ue}px solid black`,borderRadius:5*ue,width:"100%",display:"flex",flexDirection:"column"}}),Ri=({data:n,dates:s})=>{let m=qe(s[0])===qe(s[1]);return u.createElement(Document,null,u.createElement(Page,{dpi:200,size:[457*ue],style:Bt.page},u.createElement(Image,{fixed:true,style:{height:55*ue,width:274*ue,marginBottom:10*ue,marginHorizontal:"auto"},src:ke}),u.createElement(Text,{style:{fontSize:25*ue,marginBottom:5*ue,marginHorizontal:"auto"}},"Puja List"),u.createElement(Text,{style:{fontSize:20*ue,marginBottom:5*ue,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",m?qe(s[0]):`${qe(s[0])} - ${qe(s[1])}`),u.createElement(Text,{style:{fontSize:17*ue,marginBottom:20*ue,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ue}},n?n.map((l,d)=>u.createElement(View,{wrap:false,key:d,style:Bt.pujaTile},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ue}},u.createElement(Text,{style:{opacity:.6,marginRight:10*ue}},"#",(d+1).toString().padStart(2,"0")),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ue}},l.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ue,paddingHorizontal:5*ue,borderRadius:5*ue,marginTop:3*ue}},u.createElement(Text,{style:{color:"#ffffff",fontSize:nt}},"Pending")):null,u.createElement(Text,{style:{fontWeight:"bold",fontSize:nt}},"Rs ",l.amount))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ue,gap:3*ue}},u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.participantName),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ue}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:nt,fontWeight:"bold"}},l.pujaName)),m?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},qe(l.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ue}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ue}},u.createElement(Text,null,"Priest Note: ",l.priestNote)):null))):null)))},eo=Ri;var io={Latin:/[A-Za-z\u00AA\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8\u02E0-\u02E4\u1D00-\u1D25\u1D2C-\u1D5C\u1D62-\u1D65\u1D6B-\u1D77\u1D79-\u1DBE\u1E00-\u1EFF\u2071\u207F\u2090-\u209C\u212A\u212B\u2132\u214E\u2160-\u2188\u2C60-\u2C7F\uA722-\uA787\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA7FF\uAB30-\uAB5A\uAB5C-\uAB64\uAB66-\uAB69\uFB00-\uFB06\uFF21-\uFF3A\uFF41-z]|\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]/g,SC:/[\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u3005\u3007\u3021-\u3029\u3038-\u303B\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFA6D\uFA70-\uFAD9]|\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]/g,Cyrillic:/[\u0400-\u0484\u0487-\u052F\u1C80-\u1C88\u1D2B\u1D78\u2DE0-\u2DFF\uA640-\uA69F\uFE2E\uFE2F]|\uD838[\uDC30-\uDC6D\uDC8F]/g,Arabic:/[\u0600-\u0604\u0606-\u060B\u060D-\u061A\u061C-\u061E\u0620-\u063F\u0641-\u064A\u0656-\u066F\u0671-\u06DC\u06DE-\u06FF\u0750-\u077F\u0870-\u088E\u0890\u0891\u0898-\u08E1\u08E3-\u08FF\uFB50-\uFBC2\uFBD3-\uFD3D\uFD40-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFDFF\uFE70-\uFE74\uFE76-\uFEFC]|\uD803[\uDE60-\uDE7E\uDEFD-\uDEFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]/g,Bengali:/[\u0980-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE]/g,Devanagari:/[\u0900-\u0950\u0955-\u0963\u0966-\u097F\uA8E0-\uA8FF]|\uD806[\uDF00-\uDF09]/g,JP:/[\u3041-\u3096\u309D-\u309F]|\uD82C[\uDC01-\uDD1F\uDD32\uDD50-\uDD52]|\uD83C\uDE00|[\u30A1-\u30FA\u30FD-\u30FF\u31F0-\u31FF\u32D0-\u32FE\u3300-\u3357\uFF66-\uFF6F\uFF71-\uFF9D]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD55\uDD64-\uDD67]|[\u3400-\u4DB5\u4E00-\u9FAF]/g,KR:/[\u1100-\u11FF\u302E\u302F\u3131-\u318E\u3200-\u321E\u3260-\u327E\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/g,Tamil:/[\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA]|\uD807[\uDFC0-\uDFF1\uDFFF]/g,Kannada:/[\u0C80-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3]/g,Myanmar:/[\u1000-\u109F\uA9E0-\uA9FE\uAA60-\uAA7F]/g,Ethiopic:/[\u1200-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]/g,Thai:/[\u0E01-\u0E3A\u0E40-\u0E5B]/g,Greek:/[\u0370-\u0373\u0375-\u0377\u037A-\u037D\u037F\u0384\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03E1\u03F0-\u03FF\u1D26-\u1D2A\u1D5D-\u1D61\u1D66-\u1D6A\u1DBF\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u2126\uAB65]|\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]/g,Khmer:/[\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u19E0-\u19FF]/g,Armenian:/[\u0531-\u0556\u0559-\u058A\u058D-\u058F\uFB13-\uFB17]/g,Hebrew:/[\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4F]/g,Georgian:/[\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u10FF\u1C90-\u1CBA\u1CBD-\u1CBF\u2D00-\u2D25\u2D27\u2D2D]/g,Lao:/[\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF]/g,"Canadian Aboriginal":/[\u1400-\u167F\u18B0-\u18F5]|\uD806[\uDEB0-\uDEBF]/g,Sinhala:/[\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4]|\uD804[\uDDE1-\uDDF4]/g,"Ol Chiki":/[\u1C50-\u1C7F]/g,Tibetan:/[\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FD4\u0FD9\u0FDA]/g,Tifinagh:/[\u2D30-\u2D67\u2D6F\u2D70\u2D7F]/g,Yi:/[\uA000-\uA48C\uA490-\uA4C6]/g,Syriac:/[\u0700-\u070D\u070F-\u074A\u074D-\u074F\u0860-\u086A]/g,Thaana:/[\u0780-\u07B1]/g,Vai:/[\uA500-\uA62B]/g,Cherokee:/[\u13A0-\u13F5\u13F8-\u13FD\uAB70-\uABBF]/g,"Tai Tham":/[\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD]/g,"Tai Viet":/[\uAA80-\uAAC2\uAADB-\uAADF]/g,Javanese:/[\uA980-\uA9CD\uA9D0-\uA9D9\uA9DE\uA9DF]/g,Telugu:/[\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C7F]/g,Gujarati:/[\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF]/g,Malayalam:/[\u0D00-\u0D03\u0D05-\u0D39\u0D3A\u0D3B\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D70-\u0D7F]/g,Gurmukhi:/[\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76]/g},oo=({style:n={},children:s})=>{let m=r=>{let t=maxBy(Object.entries(io),([i,p])=>{let I=r.match(p);return I?I.length:0});return t?t[0]:"Latin"},l=r=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(r));function d(r){return r.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let y=r=>{let t=[],i=null,p="";for(let I of r){I=d(I);let S=m(I);S!==i?(p&&t.push({text:p,script:i}),i=S,p=I):p+=I;}return p&&t.push({text:p,script:i}),t},g=[];s&&typeof s=="string"&&!Array.isArray(s)&&!l(s)&&y(s).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;g.push(u.createElement(Text,{key:i,style:{fontFamily:p}},t.text));});let a=[],o={fontFamily:"Noto Sans"};return Array.isArray(n)?a=[...n,o]:n&&Object.keys(n).length>0?a=[n,o]:a=[o],u.createElement(Text,{style:a},g?.length?g:s)},e=oo;var no=({startDate:n,endDate:s,reportTiming:m,templeName:l,reportName:d,showGeneratedAt:y=true})=>u.createElement(u.Fragment,null,u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:ke}),y&&u.createElement(e,{style:{fontSize:9,marginBottom:10}},"Generated / Printed at:"," ",new Date().toLocaleString("en-IN",{timeZone:"Asia/Kolkata",hour12:true})),s?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Dates: ",n.toDateString()," - ",s.toDateString()):u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",n.toDateString()),m&&Object.keys(Tt).includes(m)?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Tt[m]," Report"):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),u.createElement(e,{style:{fontSize:12}},`${l}`)),F=no;var po=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,templeName:m,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,"Quantity"))),l.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,g+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,y.name)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,y.quantity))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Et=po;var mo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayWiseTotals:y,summary:g})=>{let a=g?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=g?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=g?.totalCreditedAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},u.createElement(View,{style:{marginBottom:15}},u.createElement(e,{style:{fontSize:10}},"Total Bookings Amount: ",a.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&y&&y.length>0&&u.createElement(View,{style:{marginBottom:20}},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"Day Wise Totals")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Puja Amount")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Postal Charges")),u.createElement(View,{style:{padding:6,width:"25%"}},u.createElement(e,null,"Credited Amount"))),y.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.dateDisplay)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,width:"25%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),u.createElement(View,null,d&&u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:11,fontWeight:"bold"}},"All Bookings")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Puja Amt")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,"Delivery")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,"Credited Amt")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Transaction ID"))),l.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,t.date," ",t.time)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?u.createElement(View,{style:{padding:6,width:"58%"}},u.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):u.createElement(u.Fragment,null,u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,t.transactionId))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},_t=mo;var fo=({children:n,splitat:s})=>{if(!n||typeof n!="string")return null;let m="";return s=="words"&&(m=" "),u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},n.split(m).map((l,d)=>u.createElement(u.Fragment,null,u.createElement(e,{key:d},l,s=="words"?" ":"")))))},Q=fo;var wo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},a=l.map(g),o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Post Type")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,width:"15%"}},u.createElement(e,null,"Postal Amnt"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"13%"}},u.createElement(Q,null,t.invoiceNumber)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,t.devoteeName),u.createElement(e,{style:{fontSize:8,marginTop:4}},t.address)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,t.postType)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.pujaName)),u.createElement(View,{style:{padding:6,width:"15%"}},u.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:m}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((t,i)=>{let p=t.items.map(g);return u.createElement(View,{key:t.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:10}},t.count," delivery",t.count!==1?" items":" item")),o(),p.map((I,S)=>r(I,S)))})):u.createElement(u.Fragment,null,o(),a.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Lt=wo;var To=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d,isDayWiseGrouped:y,dayGroups:g,isEmbed:a=false})=>{l.sort((p,I)=>p.invoiceNumber.localeCompare(I.invoiceNumber));let r=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,width:"7%"}},u.createElement(e,null,"Mode"))),t=(p,I)=>u.createElement(View,{key:I,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,I+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,p.invoiceNumber)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,p.devoteeName)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,p.pujaName," - ",p.prasadName)),u.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,p.quantity)),u.createElement(View,{style:{padding:6,width:"7%"}},u.createElement(e,null,p.collectionMode))),i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:m,reportTiming:d}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},y&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((p,I)=>u.createElement(View,{key:p.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},p.dateDisplay),u.createElement(e,{style:{fontSize:10}},p.count," item",p.count!==1?"s":"")),r(),p.items.map((S,k)=>t(S,k))))):u.createElement(u.Fragment,null,r(),l.map((p,I)=>t(p,I)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return a?i:u.createElement(Document,null,i)},ft=To;var Vo=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,isDayWiseGrouped:y,isEmbed:g=false})=>{let a=0,o=0,r=l.some(i=>i.bookings.some(p=>p.requires_coupon));if(!l||l.length===0){let i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja List",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return g?i:u.createElement(Document,null,i)}let t=u.createElement(u.Fragment,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collec | D = Distribute | P = Postal")),l.some(i=>i.bookings.some(p=>p.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(i=>i.bookings.some(p=>p.is_early_reminder&&!p.requires_coupon))?l.flatMap((i,p)=>i.bookings.filter(I=>I.is_early_reminder&&!I.requires_coupon).map((I,S)=>(o++,u.createElement(View,{key:`${p}-${S}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,i.name)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,I.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,I.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,I.date?new Date(I.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),u.createElement(e,{style:{fontSize:12}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((i,p)=>{if(i.bookings.every(P=>P.is_early_reminder||P.requires_coupon))return null;a=0;let I=i.bookings.some(P=>P.topping_name),S=y&&i.dayGroups&&i.dayGroups.length>0,k=(P=false)=>I?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"27%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"29%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:P?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),B=(P,R,de)=>P.is_early_reminder||P.requires_coupon?null:I?u.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,de)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,P.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"27%"}},u.createElement(e,null,P.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,P.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"29%"}},u.createElement(e,null,P.topping_name||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},u.createElement(e,null,P.quantity))):u.createElement(View,{key:R,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,de)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,P.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,P.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,P.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,P.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,P.collectionMode||""))),P.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,P.priestNote))));return u.createElement(View,{key:p,style:{marginBottom:25}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${i.name} - ${i.totalBookings||i.bookings.length}`),!S&&k(true)),S?u.createElement(u.Fragment,null,i.dayGroups.map((P,R)=>{let de=0,Le=P.items.filter(rt=>!rt.is_early_reminder&&!rt.requires_coupon);return Le.length===0?null:u.createElement(View,{key:P.dateKey,style:{marginTop:R>0?15:0}},u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:6}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},P.dateDisplay),u.createElement(e,{style:{fontSize:9}},`${Le.length} booking${Le.length!==1?"s":""}`)),k(false),Le.map((rt,ci)=>(de++,B(rt,ci,de))))})):u.createElement(u.Fragment,null,(()=>{if(I){let P=i.bookings.filter(de=>!de.is_early_reminder&&!de.requires_coupon),R=new Map;return P.forEach(de=>{let Le=`${de.invoiceNumber}|${de.devoteeName}|${de.nakshatra}|${de.topping_name||""}`;if(R.has(Le)){let rt=R.get(Le);rt.quantity=(parseInt(rt.quantity)+parseInt(de.quantity)).toString();}else R.set(Le,{...de});}),Array.from(R.values()).map((de,Le)=>(a++,B(de,Le,a)))}else return i.bookings.map((P,R)=>P.is_early_reminder||P.requires_coupon?null:(a++,B(P,R,a)))})()))}))),r?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=l.flatMap(I=>I.bookings.filter(S=>S.requires_coupon).map(S=>({...S,pujaName:I.name}))),p={};for(let I of i)p[I.invoiceNumber]||(p[I.invoiceNumber]=[]),p[I.invoiceNumber].push(I);return Object.entries(p).map(([I,S],k)=>{let B=S,P=B[0],R=B.length<=5;return u.createElement(View,{key:I,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:!R},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},u.createElement(e,{style:{fontWeight:"semibold"}},I),u.createElement(e,null,P.date?new Date(P.date).toDateString():n.toDateString())),u.createElement(e,null,P.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),B.map((de,Le)=>u.createElement(View,{key:Le,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${de.devoteeName} ----- ${de.nakshatra} ----- ${de.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null);return g?t:u.createElement(Document,null,t)},yt=Vo;var Po=({templeName:n,startDate:s,endDate:m,pujas:l,reportTiming:d})=>{let y=l.sort((g,a)=>{let o=g.nakshatras.length;return a.nakshatras.length-o});return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:s,endDate:m,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},y.map((g,a)=>u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:25}},u.createElement(View,null,u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${g.name} - ${g.totalCount}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,width:"20%",fontWeight:"semibold"}},u.createElement(e,null,"Quantity"))),g.nakshatras.map((o,r)=>u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},u.createElement(e,null,o.count))))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},ct=Po;var No=({startDate:n,endDate:s,templeName:m,data:l,isEmbed:d=false})=>{let y=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:15,marginTop:10,fontSize:9}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?u.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let g=l.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),a=l.filter(t=>t.deliveryMode==="international-post"),o=l.filter(t=>t.deliveryMode==="speedpost"),r=t=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:20,flexWrap:"wrap"}},t.map(i=>{let p=i.qrContent,I=Co.toDataURL(p);return u.createElement(View,{wrap:false,key:i.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:6}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:5}},u.createElement(View,{style:{width:240}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},i.name),u.createElement(View,{style:{fontSize:10}},u.createElement(e,{style:{fontSize:10}},i.address)),u.createElement(e,{style:{fontSize:10}},i.phone)),u.createElement(View,{style:{flexShrink:0,width:60,maxWidth:60,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold",marginBottom:2}},i.deliveryMode==="speedpost"?"SP":i.deliveryMode==="international-post"?"IP":"NP"),i.qrContent&&I?u.createElement(Image,{src:I,style:{width:50,height:50,minWidth:50,maxWidth:50}}):null,u.createElement(e,{style:{fontSize:7}},"BookMyPuja"))),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:5,paddingTop:3,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:9,marginTop:3}},"Note: ",i.pujaDetails))}));return u.createElement(u.Fragment,null,g.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",g.length),r(g)),a.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"International Post (IP) - ",a.length),r(a)),o.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:15}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginBottom:10,paddingBottom:3,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",o.length),r(o)))})()):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return d?y:u.createElement(Document,null,y)},xt=No;var Bo=({startDate:n,endDate:s,templeName:m,pujaData:l,prasadData:d,deliveryData:y,reportTiming:g})=>{y=y.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});l.some(t=>t.bookings.some(i=>i.requires_coupon));return l.length==0&&d.length==0&&y.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Combined Report",templeName:m}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,l.length>0&&yt({startDate:n,endDate:s,templeName:m,pujas:l,isEmbed:true}),d.length>0&&ft({startDate:n,endDate:s,templeName:m,data:d,isEmbed:true}),y.length>0&&xt({startDate:n,endDate:s,templeName:m,data:y,isEmbed:true})))},$t=Bo;var jo=({startDate:n,endDate:s,data:m})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Temple Payment Report",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"S.No.")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,"Temple Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Bookings")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Revenue"))),m?.map((l,d)=>u.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,d+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,l.bookings)),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"\u20B9",l.revenue))))))),Ot=jo;var Lo=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Settlement")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"UTR")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"Settlement ID"))),a=(o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,o.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.settlement_amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},u.createElement(e,null,o.utr.split("").map((t,i)=>u.createElement(e,{key:i},t)))),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"25%",fontSize:9}},u.createElement(View,{style:{display:"flex",flexDirection:"column"}},o.invoices.map((t,i)=>u.createElement(e,{key:i},t.number," (",t.amount,")")))),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,o.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:m}),u.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:10}},o.count," settlement",o.count!==1?"s":""," | Total: ",o.dayTotal)),g(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g(),l.settlements.map((o,r)=>a(o,r)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ht=Lo;var Mo=({data:n})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},u.createElement(View,{style:{backgroundColor:"#FFA823",width:20,height:"100%"}}),u.createElement(View,{style:{marginLeft:15,marginTop:10,marginBottom:0,flex:1}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold"}},n.templeName),u.createElement(e,{style:{fontSize:10}},n.templeAddress),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:5,marginTop:10,alignItems:"center"}},u.createElement(e,{style:{fontSize:10,marginTop:-5}},"Powered by"),u.createElement(Image,{style:{height:25,width:95,objectFit:"contain"},src:mt}))),n.qrContent?u.createElement(View,{style:{width:85}},u.createElement(Image,{style:{height:70,width:70,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},n.status==="confirmed"?u.createElement(Image,{style:{height:85,width:85,marginBottom:5,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,u.createElement(e,{style:{fontSize:12,marginTop:5,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),u.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:10}},u.createElement(e,{style:{fontSize:11}},"Bill to:"),u.createElement(e,{style:{fontSize:11}},n.devoteeDetails.name),n.devoteeDetails.phone?u.createElement(e,{style:{fontSize:11}},n.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:11}},n.bookingDate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},u.createElement(e,null,"Item Description")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Price")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Quantity")),u.createElement(View,{style:{padding:6,width:"20%",textAlign:"center"}},u.createElement(e,null,"Total"))),n.items.map((s,m)=>u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"50%"}},s.pujaName?u.createElement(e,{style:{fontSize:11}},s.pujaName):null,s.devoteesName?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.devoteesName):null,s.pujaDate?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.pujaDate," ",s.timing?`- ${s.timing}`:null):null,s.repeatEndDate&&s.repeatStartDate?u.createElement(e,{style:{fontSize:9,color:"#333333"}},s.repeatStartDate," to ",s.repeatEndDate," ",s.timing?`- ${s.timing}`:null):null),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.basePujPrice)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},`${s.quantity?s.quantity:""}${s.repeatCount?` x ${s.repeatCount}`:""}`)),u.createElement(View,{style:{padding:6,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.totalPrice))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:20,marginHorizontal:20}},u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:11}},u.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),u.createElement(e,null,n.paymentMethod)),u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"50%",textAlign:"right"}},u.createElement(e,null,"Subtotal: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.subTotal))),n.postalCharges?u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Postal Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.postalCharges))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Payment Gateway Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.paymentGatewayCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Platform Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.platformCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"GST (18%): ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.gst))),u.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:5}}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Total: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:30}},u.createElement(View,{style:{backgroundColor:"#FF266F",padding:5}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.afternoon.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.evening.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:10,paddingVertical:5,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:10}},m+1,". ",s.name," (",s.timings,")"))):null):null,n.instructions.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:20,fontSize:8,border:"1px solid #757575"}},u.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:10,paddingVertical:5}},u.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:5,marginVertical:10,paddingHorizontal:10}},n.instructions.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,") ",s.instruction)))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:20}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Terms and Conditions:"),u.createElement(e,{style:{fontSize:8,marginLeft:5}},"https://www.bookmypuja.app/terms-and-condition")))),Kt=Mo;var Ho=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Amount")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Payment Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},u.createElement(e,null,"Bank UTR No"))),l.map((d,y)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.invoiceNo)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.paymentDate)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},u.createElement(Q,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Qt=Ho;var Uo=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Base Amount")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway Charges")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Payment Mode")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:3,borderRight:"none",width:"12%"}},u.createElement(e,null,"UTR Number"))),l.map((d,y)=>u.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.baseAmount)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFees)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFeesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayCharges)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.paymentMode)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement(Q,null,d.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:3,width:"12%"}},u.createElement(Q,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ut=Uo;var Yo=({startDate:n,endDate:s,templeName:m,data:l,dayGroups:d,summary:y})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&d.length>1?u.createElement(View,{style:{marginBottom:25}},u.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Summary")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Total Count")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,null,"Total Amount"))),(()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.entries()).map(([a,o],r)=>u.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,null,K(o.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}},(()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.values()).reduce((a,o)=>a+o.quantity,0)})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let g=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=g.get(o.name)||{quantity:0,amount:0};g.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(g.values()).reduce((a,o)=>a+o.amount,0)})())))),d.some(g=>g.dayPostalTempleFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,(()=>{let g=d.filter(o=>o.postalChargesBreakup).map(o=>o.postalChargesBreakup);if(g.length===0)return "";let a=[0,0,0];return g.forEach(o=>{o&&(a[0]+=o[0],a[1]+=o[1],a[2]+=o[2]);}),`${a.join("+")}`})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((g,a)=>g+(a.dayPostalTempleFees||0),0))))),d.some(g=>g.dayPostalCarrierFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((g,a)=>g+(a.dayPostalCarrierFees||0),0))))),(()=>{let g=new Map;return d.forEach(a=>{a.otherChargesBreakup?.forEach(o=>{let r=g.get(o.name)||{count:0,amount:0};g.set(o.name,{count:r.count+(o.count||0),amount:r.amount+o.amount});});}),g.size===0?null:Array.from(g.entries()).map(([a,o])=>u.createElement(View,{key:a,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},a)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.count>0?o.count:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(o.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}})),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let g=new Map;d.forEach(t=>{t.items.forEach(i=>{let p=g.get(i.name)||{quantity:0,amount:0};g.set(i.name,{quantity:p.quantity+i.quantity,amount:p.amount+(i.amount||0)});});});let a=Array.from(g.values()).reduce((t,i)=>t+i.amount,0),o=d.reduce((t,i)=>t+((i.dayPostalCarrierFees||0)+(i.dayPostalTempleFees||0)),0),r=d.reduce((t,i)=>{let p=i.otherChargesBreakup?.reduce((I,S)=>I+S.amount,0)||0;return t+p},0);return a+o+r})()))))):null,d&&d.length>0&&u.createElement(View,{break:true},u.createElement(View,{style:{marginBottom:10,paddingBottom:5,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},"Day-wise Breakdown")),d.map((g,a)=>u.createElement(View,{key:g.dateKey,style:{marginBottom:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:8,border:"1px solid #000",borderBottom:"none"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},g.dateDisplay)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"semibold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Count")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,"Amount"))),g.items.map((o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(o.amount||0))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,g.items.reduce((o,r)=>o+r.quantity,0))),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPujaTotal)))),g.dayPostalTempleFees||g.dayPostalCarrierFees?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Charge")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,g.postalChargesBreakup?`${g.postalChargesBreakup.map(o=>o||0).join("+")}`:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPostalTempleFees)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Service")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayPostalCarrierFees))))):null,g.otherChargesBreakup?.length?u.createElement(u.Fragment,null,g.otherChargesBreakup.map((o,r)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.count?o.count:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(o.amount)))))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Grand Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,K(g.dayGrandTotal)))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Gt=Yo;var Zo=({startDate:n,templeName:s,pujas:m,reportTiming:l})=>{return !m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),m.map((y,g)=>{let a=y.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return a.length===0?null:u.createElement(View,{key:g,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},y.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," booking",a.length>1?"s":"")),a.map((o,r)=>(u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:o.topping_name?6:0}},u.createElement(e,{style:{fontSize:12}},o.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",o.quantity)),o.topping_name&&u.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},u.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",o.topping_name)),o.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.priestNote))))))})))},Zt=Zo;var Xo=({startDate:n,templeName:s,data:m,reportTiming:l,isDayWiseGrouped:d,dayGroups:y})=>{if(!m||m.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let g=m.sort((o,r)=>o.invoiceNumber.localeCompare(r.invoiceNumber)),a=(o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},u.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},u.createElement(e,{style:{fontSize:12}},o.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",o.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},o.collectionMode)));return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.length," item",g.length>1?"s":"")),d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:12}},u.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:11}},o.count," item",o.count!==1?"s":""))),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g.map((o,r)=>a(o,r)))))},ei=Xo;var Ro=({startDate:n,templeName:s,data:m,isDayWiseGrouped:l,dayGroups:d})=>{let y=o=>{let r="";try{let t=JSON.parse(o.address);r=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{r=o.address;}return {...o,address:r}},g=m.map(y);if(!g||g.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let a=(o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},o.address)),o.phoneNumber&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",o.phoneNumber)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",o.note||o.pujaName)));return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Delivery"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.length," delivery",g.length>1?" items":" item")),l&&d&&d.length>0?u.createElement(u.Fragment,null,d.map((o,r)=>{let t=o.items.map(y);return u.createElement(View,{key:o.dateKey,style:{marginBottom:12}},u.createElement(View,{style:{backgroundColor:"#e0e0e0",padding:8,marginBottom:6}},u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:11}},o.count," item",o.count!==1?"s":""))),t.map((i,p)=>a(i,p)))})):u.createElement(u.Fragment,null,g.map((o,r)=>a(o,r)))))},oi=Ro;var er=({startDate:n,templeName:s,pujaData:m,prasadData:l,deliveryData:d,reportTiming:y})=>{if(m.length===0&&l.length===0&&d.length===0)return u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available")));let a=l.sort((o,r)=>o.invoiceNumber.localeCompare(r.invoiceNumber));return u.createElement(Document,null,m.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),y&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.charAt(0).toUpperCase()+y.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Puja List")),m.map((o,r)=>{let t=o.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:u.createElement(View,{key:r,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},o.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,p)=>(u.createElement(View,{key:p,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},i.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},i.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12}},i.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",i.quantity)),i.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},i.priestNote))))))})),l.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),y&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},y.charAt(0).toUpperCase()+y.slice(1)," Report")),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Prasad Report"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},a.length," item",a.length>1?"s":"")),a.map((o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},o.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},u.createElement(View,{style:{flexDirection:"row",alignItems:"center"}},u.createElement(e,{style:{fontSize:12}},o.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",o.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},o.collectionMode))))),d.length>0&&u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:12}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Delivery"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},d.length," delivery",d.length>1?" items":" item")),d.map((o,r)=>u.createElement(View,{key:r,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},o.name),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},o.address)),o.phone&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",o.phone)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",o.pujaDetails))))))},ni=er;var tr=({startDate:n,templeName:s,data:m})=>!m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString())),u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},"Postal Labels"),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},m.length," label",m.length>1?"s":"")),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"center",gap:10,marginBottom:12,fontSize:9}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP"),"-Normal"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP"),"-Speed"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP"),"-International")),m.map(l=>u.createElement(View,{key:l.id,style:{border:"1pt dashed #000",padding:8,marginBottom:10,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:5}},u.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},l.name),u.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},l.deliveryMode==="speedpost"?"SP":l.deliveryMode==="international-post"?"IP":"NP")),u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11}},l.address)),u.createElement(e,{style:{fontSize:11,marginBottom:5}},l.phone),u.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),u.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",l.pujaDetails))))),di=tr;var or=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,selectedPujaNames:y=[]})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range and pujas"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:8}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:10}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Custom Puja Report"),u.createElement(e,{style:{fontSize:12}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((r,t)=>{if(r.bookings.every(S=>S.is_early_reminder||S.requires_coupon))return null;g=0;let i=r.bookings.some(S=>S.topping_name),p=(S=false)=>i?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode"))),I=(S,k,B)=>S.is_early_reminder||S.requires_coupon?null:i?u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,B)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,S.topping_name||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"5%"}},u.createElement(e,null,S.quantity))):u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,B)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,S.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,S.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,S.collectionMode||""))),S.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,S.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:25}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",border:"1px solid black",padding:6,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),p(true)),u.createElement(u.Fragment,null,(()=>{if(i){let S=r.bookings.filter(B=>!B.is_early_reminder&&!B.requires_coupon),k=new Map;return S.forEach(B=>{let P=`${B.invoiceNumber}|${B.devoteeName}|${B.nakshatra}|${B.topping_name||""}`;if(k.has(P)){let R=k.get(P);R.quantity=(parseInt(R.quantity)+parseInt(B.quantity)).toString();}else k.set(P,{...B});}),Array.from(k.values()).map((B,P)=>(g++,I(B,P,g)))}else return r.bookings.map((S,k)=>S.is_early_reminder||S.requires_coupon?null:(g++,I(S,k,g)))})()))}))),o?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0];return u.createElement(View,{key:i,style:{marginBottom:10,fontSize:18,padding:10,border:"1px dotted black",position:"relative"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:10}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),S.map((B,P)=>u.createElement(View,{key:P,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},ai=or;var rr=({startDate:n,templeName:s,pujas:m,reportTiming:l,selectedPujaNames:d=[]})=>{return !m||m.length===0?u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:50}},"No data available"))):u.createElement(Document,null,u.createElement(Page,{size:[110*2.83465,297*2.83465],style:{padding:12,fontFamily:"Noto Sans"}},u.createElement(View,{style:{marginBottom:15,paddingBottom:10,borderBottom:"2pt solid #000"}},u.createElement(e,{style:{fontSize:16,fontWeight:"bold",textAlign:"center",marginBottom:4}},s),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginBottom:4,fontWeight:"semibold"}},"Custom Report"),u.createElement(e,{style:{fontSize:12,textAlign:"center"}},n.toLocaleDateString()),l&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.charAt(0).toUpperCase()+l.slice(1)," ","Report")),d.length>0&&u.createElement(View,{style:{backgroundColor:"#E3F2FD",padding:8,marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas:"),u.createElement(e,{style:{fontSize:9,marginTop:2}},d.join(", "))),m.map((g,a)=>{let o=g.bookings.filter(r=>!r.is_early_reminder&&!r.requires_coupon);return o.length===0?null:u.createElement(View,{key:a,style:{marginBottom:20},wrap:false},u.createElement(View,{style:{backgroundColor:"#FFE082",padding:10,marginBottom:8}},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",textAlign:"center"}},g.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},o.length," booking",o.length>1?"s":"")),o.map((r,t)=>(u.createElement(View,{key:t,style:{border:"1pt solid #999",padding:10,marginBottom:6,backgroundColor:"#FFF"},wrap:false},u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11,color:"#666"}},r.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},r.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12}},r.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",r.quantity)),r.collectionMode&&u.createElement(View,{style:{marginTop:4}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",r.collectionMode)),r.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},r.priestNote))))))}),u.createElement(View,{style:{marginTop:20,paddingTop:10,borderTop:"1pt solid #CCC"}},u.createElement(e,{style:{fontSize:9,textAlign:"center",color:"#666"}},"bookmypuja.app"))))},ui=rr;var dr=n=>{let s=0,m=0,l=0,d=0;for(let y of n.items)y.paymentMethod!="INTERNATIONAL_CARD"&&y.platformFees>0&&(s+=y.platformFees,m+=y.platformFeesGST,d+=y.invoiceTotal);return l=m+s,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:ke}),u.createElement(View,{style:{flexDirection:"row",width:"100%"}},u.createElement(View,{style:{width:"50%"}},u.createElement(Text,null,"INVOICE RECON"),u.createElement(Text,{style:{fontSize:12,marginTop:6}},n.templeName," "),u.createElement(Text,{style:{fontSize:12}},"Bookings from ",n.startDate.toDateString()," to"," ",n.endDate.toDateString()," ")),u.createElement(View,{style:{width:"50%",alignItems:"flex-end"}},u.createElement(Text,{style:{fontSize:12,fontWeight:"semibold"}},"Infinix AI Pvt Ltd"," "),u.createElement(Text,{style:{fontSize:12}},"GSTIN: 32AAICI0436P1ZG"," "))),u.createElement(Text,{style:{fontSize:10,backgroundColor:"#fffca6",marginTop:10}},"Bookings marked with yellow are not to be counted"),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,"Sr no")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,"Invoice Number")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%",fontSize:7}},u.createElement(Text,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"Inv Total")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"PF Total")),u.createElement(View,{style:{padding:3,width:"12%",borderRight:"1px solid #000"}},u.createElement(Text,null,"Pay Method")),u.createElement(View,{style:{padding:3,width:"17%",borderRight:"1px solid #000"}},u.createElement(Text,null,"Transaction ID")),u.createElement(View,{style:{padding:3,width:"16%"}},u.createElement(Text,null,"Settlement ID")))),n.items.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${y.platformFees==0||y.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,g+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,y.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}},u.createElement(Text,null,y.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(y.invoiceTotal))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(y.platformFees)," +"," ",K(y.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,y.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),u.createElement(View,{style:{padding:3,width:"17%",fontSize:6,borderRight:"1px solid #000"}},u.createElement(Text,null,y.transactionID)),u.createElement(View,{style:{padding:3,width:"16%",fontSize:6}},u.createElement(Text,null,y.settlementID)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,"Total")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"11%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(d))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,K(l))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"17%"}}),u.createElement(View,{style:{padding:3,width:"16%"}})),u.createElement(View,{style:{marginTop:10,fontSize:12}},u.createElement(Text,null,"Total Payable: ",K(l)))))},fi=dr;var gr=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,templeName:m,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:9,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,"Quantity"))),l.map((y,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,g+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,y.name)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,y.quantity))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),yi=gr;var fr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayWiseTotals:y,summary:g})=>{let a=g?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=g?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=g?.totalCreditedAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.creditedAmount,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},u.createElement(View,{style:{marginBottom:12}},u.createElement(e,{style:{fontSize:9}},"Total Bookings Amount: ",a.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",o.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",r.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&y&&y.length>0&&u.createElement(View,{style:{marginBottom:15}},u.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"Day Wise Totals")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Puja Amount")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,"Postal Charges")),u.createElement(View,{style:{padding:4,width:"25%"}},u.createElement(e,null,"Credited Amount"))),y.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.dateDisplay)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.pujaAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"25%"}},u.createElement(e,null,t.postalCharges.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,width:"25%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})))))),u.createElement(View,null,d&&u.createElement(View,{style:{marginBottom:6,paddingBottom:3,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},"All Bookings")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Puja Amt")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,"Delivery")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,"Credited Amt")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Transaction ID"))),l.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"6%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"19%"}},u.createElement(e,null,t.date," ",t.time)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"17%"}},u.createElement(e,null,t.invoiceNumber)),t.status=="cancelled"?u.createElement(View,{style:{padding:4,width:"58%"}},u.createElement(e,{style:{textAlign:"center"}},"CANCELLED")):u.createElement(u.Fragment,null,u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,t.bookingAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"11%"}},u.createElement(e,null,(t.postalCharges||0).toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"14%"}},u.createElement(e,null,t.creditedAmount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,t.transactionId))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},xi=fr;var wr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}},a=l.map(g),o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Post Type")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,width:"15%"}},u.createElement(e,null,"Postal Amnt"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%",fontSize:6}},u.createElement(Q,null,new Date(t.date).toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"}))),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"13%"}},u.createElement(Q,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"28%"}},u.createElement(e,null,t.devoteeName),u.createElement(e,{style:{fontSize:7,marginTop:3}},t.address)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,t.postType)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.pujaName)),u.createElement(View,{style:{padding:4,width:"15%"}},u.createElement(e,null,t.amount.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:m}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((t,i)=>{let p=t.items.map(g);return u.createElement(View,{key:t.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:9}},t.count," delivery",t.count!==1?" items":" item")),o(),p.map((I,S)=>r(I,S)))})):u.createElement(u.Fragment,null,o(),a.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},wi=wr;var Tr=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d,isDayWiseGrouped:y,dayGroups:g})=>{l.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let o=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,width:"7%"}},u.createElement(e,null,"Mode"))),r=(t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"23%",fontSize:8,flexWrap:"wrap"}},u.createElement(e,null,t.devoteeName)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%",fontSize:8,flexWrap:"wrap"}},u.createElement(e,null,t.pujaName," - ",t.prasadName)),u.createElement(View,{style:{padding:4,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,t.quantity)),u.createElement(View,{style:{padding:4,width:"7%"}},u.createElement(e,null,t.collectionMode)));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:m,reportTiming:d}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},y&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((t,i)=>u.createElement(View,{key:t.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},t.dateDisplay),u.createElement(e,{style:{fontSize:9}},t.count," item",t.count!==1?"s":"")),o(),t.items.map((p,I)=>r(p,I))))):u.createElement(u.Fragment,null,o(),l.map((t,i)=>r(t,i)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},hi=Tr;var Vr=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,isDayWiseGrouped:y})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja List",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:11,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>{if(r.bookings.every(k=>k.is_early_reminder||k.requires_coupon))return null;g=0;let i=r.bookings.some(k=>k.topping_name),p=y&&r.dayGroups&&r.dayGroups.length>0,I=(k=false)=>i?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:k?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice"))):u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:k?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No"))),S=(k,B,P)=>k.is_early_reminder||k.requires_coupon?null:i?u.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,P)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,k.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,k.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,k.topping_name||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,k.quantity)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"none",width:"12%"}},u.createElement(e,null,k.invoiceNumber))):u.createElement(View,{key:B,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,P)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,k.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,k.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,k.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${7*1.11111}%`}},u.createElement(e,null,k.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"none",width:`${20*1.11111}%`}},u.createElement(e,null,k.invoiceNumber))),k.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,k.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:20}},u.createElement(View,{wrap:false,minPresenceAhead:15},u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.totalBookings||r.bookings.length}`),!p&&I(true)),p?u.createElement(u.Fragment,null,r.dayGroups.map((k,B)=>{let P=0,R=k.items.filter(de=>!de.is_early_reminder&&!de.requires_coupon);return R.length===0?null:u.createElement(View,{key:k.dateKey,style:{marginTop:B>0?12:0}},u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#f0f0f0",border:"1px solid black",borderBottom:"none",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},k.dateDisplay),u.createElement(e,{style:{fontSize:8}},`${R.length} booking${R.length!==1?"s":""}`)),I(false),R.map((de,Le)=>(P++,S(de,Le,P))))})):u.createElement(u.Fragment,null,(()=>{if(i){let k=r.bookings.filter(P=>!P.is_early_reminder&&!P.requires_coupon),B=new Map;return k.forEach(P=>{let R=`${P.invoiceNumber}|${P.devoteeName}|${P.nakshatra}|${P.topping_name||""}`;if(B.has(R)){let de=B.get(R);de.quantity=(parseInt(de.quantity)+parseInt(P.quantity)).toString();}else B.set(R,{...P});}),Array.from(B.values()).map((P,R)=>{g=g||1;let de=g;return g+=Number(P.quantity)||1,S(P,R,de)})}else return r.bookings.map((k,B)=>k.is_early_reminder||k.requires_coupon?null:(g++,S(k,B,g)))})()))}))),o?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0],B=S.length<=5;return u.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:!B},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),S.map((P,R)=>u.createElement(View,{key:R,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},Ti=Vr;var Pr=({templeName:n,startDate:s,endDate:m,pujas:l,reportTiming:d})=>{let y=l.sort((g,a)=>{let o=g.nakshatras.length;return a.nakshatras.length-o});return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:s,endDate:m,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},y.map((g,a)=>u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:20}},u.createElement(View,null,u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${g.name} - ${g.totalCount}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,width:"20%",fontWeight:"semibold"}},u.createElement(e,null,"Quantity"))),g.nakshatras.map((o,r)=>u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,o.name)),u.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},u.createElement(e,null,o.count))))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Di=Pr;var Ar=({startDate:n,endDate:s,templeName:m,pujaData:l,prasadData:d,deliveryData:y,reportTiming:g})=>{y=y.map(t=>{let i="";try{let p=JSON.parse(t.address);i=`${p.address}, ${p.locality}, ${p.state} - ${p.pincode}`;}catch(p){console.error("Error parsing address:",p),i=t.address;}return {...t,address:i}});let a=0,o=0,r=l.some(t=>t.bookings.some(i=>i.requires_coupon));return l.length==0&&d.length==0&&y.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Combined Report",templeName:m}),u.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range"))):u.createElement(u.Fragment,null,u.createElement(Document,null,l.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"",templeName:""}),l.some(t=>t.bookings.some(i=>i.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"60%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?l.flatMap((t,i)=>t.bookings.filter(p=>p.is_early_reminder&&!p.requires_coupon).map((p,I)=>(o++,u.createElement(View,{wrap:false,key:`${i}-${I}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,t.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,p.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,p.date?new Date(p.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((t,i)=>t.bookings.every(p=>p.is_early_reminder||p.requires_coupon)?null:(a=0,u.createElement(u.Fragment,null,u.createElement(View,{style:{marginBottom:20}},u.createElement(View,null,u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${t.name} - ${t.bookings.length}`)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"35%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"25%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty"))),t.bookings.map((p,I)=>p.is_early_reminder||p.requires_coupon?null:(a++,u.createElement(u.Fragment,null,u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,p.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},u.createElement(e,null,p.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},u.createElement(e,null,p.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},u.createElement(e,null,p.quantity))),p.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,p.priestNote))))))))))))),l.length>0&&r&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=l.flatMap(p=>p.bookings.filter(I=>I.requires_coupon).map(I=>({...I,pujaName:p.name}))),i={};for(let p of t)i[p.invoiceNumber]||(i[p.invoiceNumber]=[]),i[p.invoiceNumber].push(p);return Object.entries(i).map(([p,I],S)=>{let k=I,B=k[0];return u.createElement(View,{key:p,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},p),u.createElement(e,null,B.date?new Date(B.date).toDateString():n.toDateString())),u.createElement(e,null,B.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),k.map((P,R)=>u.createElement(View,{key:R,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${P.devoteeName} ----- ${P.nakshatra} ----- ${P.pujaName}`))))})})())),d.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Prasad Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,"Prasad Name")),u.createElement(View,{style:{padding:4,width:"10%"}},u.createElement(e,null,"Qty"))),d.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,t.invoiceNumber)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,t.devoteeName)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,t.prasadName)),u.createElement(View,{style:{padding:4,width:"10%"}},u.createElement(e,null,t.quantity)))))),y.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:g,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},y&&y.map(t=>{let i=Co.toDataURL(t.qrContent);return u.createElement(View,{wrap:false,key:t.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.name),u.createElement(View,{style:{fontSize:8}},u.createElement(Q,{splitat:"words"},t.address)),u.createElement(e,{style:{fontSize:8}},t.phone)),t.qrContent&&i?u.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(Image,{src:i,style:{width:40,height:40,minWidth:40,maxWidth:40}}),u.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",t.pujaDetails))})))))},Ii=Ar;var Nr=({startDate:n,endDate:s,data:m})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Temple Payment Report",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",fontWeight:"semibold",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,"S.No.")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,"Temple Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,"Bookings")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Revenue"))),m?.map((l,d)=>u.createElement(View,{key:d,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,d+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"55%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,l.bookings)),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"\u20B9",l.revenue))))))),Pi=Nr;var vr=({startDate:n,endDate:s,templeName:m,data:l,isDayWiseGrouped:d,dayGroups:y})=>{let g=()=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Settlement")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"UTR")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%"}},u.createElement(e,null,"Invoice")),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"Settlement ID"))),a=(o,r)=>u.createElement(View,{key:r,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,r+1)),u.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,o.date)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,o.settlement_amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},u.createElement(e,null,o.utr.split("").map((t,i)=>u.createElement(e,{key:i},t)))),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"25%",fontSize:7}},u.createElement(View,{style:{display:"flex",flexDirection:"column"}},o.invoices.map((t,i)=>u.createElement(e,{key:i},t.number," (",t.amount,")")))),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,o.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:m}),u.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",l.totalCreditedAmount),l.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&y&&y.length>0?u.createElement(u.Fragment,null,y.map((o,r)=>u.createElement(View,{key:o.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid black",borderBottom:"none"}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},o.dateDisplay),u.createElement(e,{style:{fontSize:8}},o.count," settlement",o.count!==1?"s":""," | ",o.dayTotal)),g(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,g(),l.settlements.map((o,r)=>a(o,r)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},zi=vr;var Er=({data:n})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%"}},u.createElement(View,{style:{backgroundColor:"#FFA823",width:15,height:"100%"}}),u.createElement(View,{style:{marginLeft:10,marginTop:8,marginBottom:0,flex:1}},u.createElement(e,{style:{fontSize:13,fontWeight:"bold"}},n.templeName),u.createElement(e,{style:{fontSize:8}},n.templeAddress),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:4,marginTop:8,alignItems:"center"}},u.createElement(e,{style:{fontSize:8,marginTop:-4}},"Powered by"),u.createElement(Image,{style:{height:20,width:75,objectFit:"contain"},src:mt}))),n.qrContent?u.createElement(View,{style:{width:65}},u.createElement(Image,{style:{height:55,width:55,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",bottom:"0"},src:n.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},n.status==="confirmed"?u.createElement(Image,{style:{height:65,width:65,marginBottom:4,objectFit:"contain",position:"absolute",right:"0",top:"0"},src:ut}):null,u.createElement(e,{style:{fontSize:10,marginTop:4,fontWeight:"semibold"}},"INVOICE #",n.invoiceNumber),u.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",n.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:8}},u.createElement(e,{style:{fontSize:9}},"Bill to:"),u.createElement(e,{style:{fontSize:9}},n.devoteeDetails.name),n.devoteeDetails.phone?u.createElement(e,{style:{fontSize:9}},n.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:9}},n.bookingDate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},u.createElement(e,null,"Item Description")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Price")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center"}},u.createElement(e,null,"Quantity")),u.createElement(View,{style:{padding:4,width:"20%",textAlign:"center"}},u.createElement(e,null,"Total"))),n.items.map((s,m)=>u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"row",borderBottom:"1px solid #757575",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"50%"}},s.pujaName?u.createElement(e,{style:{fontSize:9}},s.pujaName):null,s.devoteesName?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.devoteesName):null,s.pujaDate?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.pujaDate," ",s.timing?`- ${s.timing}`:null):null,s.repeatEndDate&&s.repeatStartDate?u.createElement(e,{style:{fontSize:7,color:"#333333"}},s.repeatStartDate," to ",s.repeatEndDate," ",s.timing?`- ${s.timing}`:null):null),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.basePujPrice)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #b5b5b5",width:"15%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},`${s.quantity?s.quantity:""}${s.repeatCount?` x ${s.repeatCount}`:""}`)),u.createElement(View,{style:{padding:4,width:"20%",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},u.createElement(e,{style:{}},s.totalPrice))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginVertical:15,marginHorizontal:15}},u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",fontSize:9}},u.createElement(e,{style:{fontWeight:"bold"}},"Payment Method:"),u.createElement(e,null,n.paymentMethod)),u.createElement(View,{style:{width:"50%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-end"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"50%",textAlign:"right"}},u.createElement(e,null,"Subtotal: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.subTotal))),n.postalCharges?u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Postal Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.postalCharges))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Payment Gateway Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.paymentGatewayCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Platform Charges: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.platformCharges))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"GST (18%): ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.gst))),u.createElement(View,{style:{width:"60%",height:1,backgroundColor:"#757575",marginVertical:4}}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8,fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{width:"70%",textAlign:"right"}},u.createElement(e,null,"Total: ")),u.createElement(View,{style:{width:"30%",textAlign:"right"}},u.createElement(e,null,n.totalAmount))))),n.prasadCollectionMode?u.createElement(View,{style:{marginBottom:4}},u.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",n.prasadCollectionMode)):null,n.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",n.devoteeDetails.address)):null,n.prasads&&(n.prasads.morning.length>0||n.prasads.afternoon.length>0||n.prasads.evening.length>0)?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginBottom:20}},u.createElement(View,{style:{backgroundColor:"#FF266F",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold",color:"white"}},"Prasadsam Details")),n.prasads.morning.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Morning:"),n.prasads.morning.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.afternoon.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Afternoon:"),n.prasads.afternoon.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null,n.prasads.evening.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",paddingHorizontal:8,paddingVertical:4,borderBottom:"1px solid #757575",borderRight:"1px solid #757575",borderLeft:"1px solid #757575"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Evening:"),n.prasads.evening.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:8}},m+1,". ",s.name," (",s.timings,")"))):null):null,n.instructions.length>0?u.createElement(View,{wrap:false,style:{display:"flex",flexDirection:"column",marginHorizontal:15,fontSize:7,border:"1px solid #757575"}},u.createElement(View,{style:{backgroundColor:"#FFA823",paddingHorizontal:8,paddingVertical:4}},u.createElement(e,null,"IMPORTANT INSTRUCTIONS:")),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:4,marginVertical:8,paddingHorizontal:8}},n.instructions.map((s,m)=>u.createElement(e,{key:m,style:{fontSize:7}},m+1,") ",s.instruction)))):null,u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold"}},"Terms and Conditions:"),u.createElement(e,{style:{fontSize:7,marginLeft:4}},"https://www.bookmypuja.app/terms-and-condition")))),Ai=Er;var Mr=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:m}),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:10,marginTop:8,fontSize:7}},u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"NP")," - Normal Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"SP")," - Speed Post"),u.createElement(e,null,u.createElement(e,{style:{fontWeight:"bold"}},"IP")," - International Post")),l&&l.length>0?u.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let d=l.filter(o=>!o.deliveryMode||o.deliveryMode==="normal-post"),y=l.filter(o=>o.deliveryMode==="international-post"),g=l.filter(o=>o.deliveryMode==="speedpost"),a=o=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:15,flexWrap:"wrap"}},o.map(r=>{let t=r.qrContent,i=Co.toDataURL(t);return u.createElement(View,{wrap:false,key:r.id,style:{width:"46%",display:"flex",flexDirection:"column",border:"1px solid black",borderStyle:"dotted",borderWidth:1.5,padding:5}},u.createElement(View,{style:{flexGrow:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:4}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},r.name),u.createElement(View,{style:{fontSize:8}},u.createElement(Q,{splitat:"words"},r.address)),u.createElement(e,{style:{fontSize:8}},r.phone)),r.qrContent&&i?u.createElement(View,{style:{flexShrink:0,width:45,maxWidth:45,display:"flex",flexDirection:"column",alignItems:"center"}},u.createElement(e,{style:{fontSize:7,fontWeight:"bold",marginBottom:1}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP"),u.createElement(Image,{src:i,style:{width:40,height:40,minWidth:40,maxWidth:40}}),u.createElement(e,{style:{fontSize:6}},"BookMyPuja")):null),u.createElement(View,{style:{borderTop:"1px solid black",marginTop:4,paddingTop:2,borderStyle:"dotted"}}),u.createElement(e,{style:{fontSize:7,marginTop:2}},"Note: ",r.pujaDetails))}));return u.createElement(u.Fragment,null,d.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Normal Post (NP) - ",d.length),a(d)),y.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"International Post (IP) - ",y.length),a(y)),g.length>0&&u.createElement(View,{wrap:false,style:{marginBottom:12}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",marginBottom:8,paddingBottom:2,borderBottom:"1px solid #333"}},"Speed Post (SP) - ",g.length),a(g)))})()):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),ki=Mr;var Hr=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Invoice No")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Amount")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Payment Date")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},u.createElement(e,null,"Bank UTR No"))),l.map((d,y)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.invoiceNo)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(Q,null,d.amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.paymentDate)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},u.createElement(Q,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ci=Hr;var Ur=({startDate:n,endDate:s,templeName:m,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:6,fontWeight:"semibold"}},u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Invoice Number")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Base Amount")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Platform Fees GST")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway Charges")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Gateway GST")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Payment Mode")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Booking Date")),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(e,null,"Settlement Date")),u.createElement(View,{style:{padding:2,borderRight:"none",width:"12%"}},u.createElement(e,null,"UTR Number"))),l.map((d,y)=>u.createElement(View,{key:y,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:6}},u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"4%"}},u.createElement(e,null,y+1)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.invoiceNumber)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.baseAmount)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFees)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.platformFeesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayCharges)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement(Q,null,d.paymentMode)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement(Q,null,d.bookingDate)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement(Q,null,d.settlementDate)),u.createElement(View,{style:{padding:2,width:"12%"}},u.createElement(Q,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ni=Ur;var Yr=({startDate:n,endDate:s,templeName:m,data:l,dayGroups:d,summary:y})=>{l.reduce((a,o)=>a+o.quantity,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:m}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&d.length>1?u.createElement(View,{style:{marginBottom:20}},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Summary")),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Total Count")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,null,"Total Amount"))),(()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.entries()).map(([o,r],t)=>u.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,t+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,o)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.quantity)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,null,K(r.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Puja Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}},(()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.values()).reduce((o,r)=>o+r.quantity,0)})())),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let a=new Map;return d.forEach(o=>{o.items.forEach(r=>{let t=a.get(r.name)||{quantity:0,amount:0};a.set(r.name,{quantity:t.quantity+r.quantity,amount:t.amount+(r.amount||0)});});}),Array.from(a.values()).reduce((o,r)=>o+r.amount,0)})())))),d.some(a=>a.dayPostalTempleFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Charges")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,(()=>{let a=d.filter(r=>r.postalChargesBreakup).map(r=>r.postalChargesBreakup);if(a.length===0)return "";let o=[0,0,0];return a.forEach(r=>{r&&(o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]);}),`${o.join("+")}`})())),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((a,o)=>a+(o.dayPostalTempleFees||0),0))))),d.some(a=>a.dayPostalCarrierFees>0)&&u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Postal Service")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(d.reduce((a,o)=>a+(o.dayPostalCarrierFees||0),0))))),(()=>{let a=new Map;return d.forEach(o=>{o.otherChargesBreakup?.forEach(r=>{let t=a.get(r.name)||{count:0,amount:0};a.set(r.name,{count:t.count+(r.count||0),amount:t.amount+r.amount});});}),a.size===0?null:Array.from(a.entries()).map(([o,r])=>u.createElement(View,{key:o,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f5f5f5"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},o)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.count>0?r.count:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K(r.amount)))))})(),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,{style:{fontWeight:"bold"}},"Grand Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,{style:{fontWeight:"bold"}})),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},K((()=>{let a=new Map;d.forEach(i=>{i.items.forEach(p=>{let I=a.get(p.name)||{quantity:0,amount:0};a.set(p.name,{quantity:I.quantity+p.quantity,amount:I.amount+(p.amount||0)});});});let o=Array.from(a.values()).reduce((i,p)=>i+p.amount,0),r=d.reduce((i,p)=>i+((p.dayPostalCarrierFees||0)+(p.dayPostalTempleFees||0)),0),t=d.reduce((i,p)=>{let I=p.otherChargesBreakup?.reduce((S,k)=>S+k.amount,0)||0;return i+I},0);return o+r+t})()))))):null,d&&d.length>0&&u.createElement(View,{break:true},u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),d.map((a,o)=>u.createElement(View,{key:a.dateKey,style:{marginBottom:15}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",backgroundColor:"#e0e0e0",padding:6,border:"1px solid #000",borderBottom:"none"}},u.createElement(e,{style:{fontSize:9,fontWeight:"bold"}},a.dateDisplay)),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:8,fontWeight:"semibold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,"Sr no")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,"Count")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,"Amount"))),a.items.map((r,t)=>u.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,t+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.quantity)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(r.amount||0))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Puja Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,a.items.reduce((r,t)=>r+t.quantity,0))),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPujaTotal)))),a.dayPostalTempleFees&&a.dayPostalCarrierFees?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Charge")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,a.postalChargesBreakup?`${a.postalChargesBreakup.map(r=>r||0).join("+")}`:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPostalTempleFees)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Postal Service")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayPostalCarrierFees))))):null,a.otherChargesBreakup?.length?u.createElement(u.Fragment,null,a.otherChargesBreakup.map((r,t)=>u.createElement(View,{key:t,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,r.count?r.count:"")),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(r.amount)))))):null,a.dayPostalTempleFees||a.dayPostalCarrierFees||a.otherChargesBreakup?.length?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,fontWeight:"bold",backgroundColor:"#f0f0f0"}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}}),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,"Day Total")),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,K(a.dayGrandTotal)))):null)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Fi=Yr;var Xr=({startDate:n,endDate:s,templeName:m,pujas:l,reportTiming:d,selectedPujaNames:y=[]})=>{let g=0,a=0,o=l.some(r=>r.bookings.some(t=>t.requires_coupon));return !l||l.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:m,reportTiming:d}),u.createElement(e,{style:{fontSize:10,marginTop:80,textAlign:"center"}},"No data available for the selected date range and pujas"))):u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"",templeName:""}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginTop:1}},u.createElement(e,{style:{fontSize:7}},"C = Collect | D = Distribute | P = Postal")),l.some(r=>r.bookings.some(t=>t.is_early_reminder))&&u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:8}},"Early Reminders for Upcoming Pujas"),u.createElement(View,{style:{marginTop:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"53%"}},u.createElement(e,null,"Puja Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Date"))))),l.some(r=>r.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?l.flatMap((r,t)=>r.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,p)=>(a++,u.createElement(View,{key:`${t}-${p}`,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,a)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,r.name)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,i.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,i.date?new Date(i.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Custom Puja Report"),u.createElement(e,{style:{fontSize:10}},`${m}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>{if(r.bookings.every(S=>S.is_early_reminder||S.requires_coupon))return null;g=0;let i=r.bookings.some(S=>S.topping_name),p=(S=false)=>i?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Sr")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"22%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"26%"}},u.createElement(e,null,"Offerings")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"5%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"12%"}},u.createElement(e,null,"Invoice"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:S?void 0:"none"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Sr No")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"30%"}},u.createElement(e,null,"Devotee Name")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"23%"}},u.createElement(e,null,"Nakshatra")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"10%"}},u.createElement(e,null,"Qty")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",fontWeight:"semibold",width:"7%"}},u.createElement(e,null,"Mode")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",fontWeight:"semibold",width:"20%"}},u.createElement(e,null,"Invoice No"))),I=(S,k,B)=>S.is_early_reminder||S.requires_coupon?null:i?u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,B)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"26%"}},u.createElement(e,null,S.topping_name||"")),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"5%"}},u.createElement(e,null,S.quantity)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"none",width:"12%"}},u.createElement(e,null,S.invoiceNumber))):u.createElement(View,{key:k,wrap:false,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:"none",width:"100%"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"10%"}},u.createElement(e,null,B)),u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"90%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row"}},u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,S.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,S.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,S.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${7*1.11111}%`}},u.createElement(e,null,S.collectionMode||"")),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"none",width:`${20*1.11111}%`}},u.createElement(e,null,S.invoiceNumber))),S.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,S.priestNote))));return u.createElement(View,{key:t,style:{marginBottom:20}},u.createElement(View,{wrap:false,minPresenceAhead:20},u.createElement(e,{style:{fontSize:9,fontWeight:"bold",border:"1px solid black",padding:4,textAlign:"center",borderBottom:"none"}},`${r.name} - ${r.bookings.length}`),p(true)),u.createElement(u.Fragment,null,(()=>{if(i){let S=r.bookings.filter(B=>!B.is_early_reminder&&!B.requires_coupon),k=new Map;return S.forEach(B=>{let P=`${B.invoiceNumber}|${B.devoteeName}|${B.nakshatra}|${B.topping_name||""}`;if(k.has(P)){let R=k.get(P);R.quantity=(parseInt(R.quantity)+parseInt(B.quantity)).toString();}else k.set(P,{...B});}),Array.from(k.values()).map((B,P)=>(g++,I(B,P,g)))}else return r.bookings.map((S,k)=>S.is_early_reminder||S.requires_coupon?null:(g++,I(S,k,g)))})()))}))),o?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:ke}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let r=l.flatMap(i=>i.bookings.filter(p=>p.requires_coupon).map(p=>({...p,pujaName:i.name}))),t={};for(let i of r)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,p],I)=>{let S=p,k=S[0];return u.createElement(View,{key:i,style:{marginBottom:8,fontSize:14,padding:8,border:"1px dotted black",position:"relative"},wrap:false},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",gap:8}},u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:8}},u.createElement(e,{style:{fontWeight:"semibold"}},i),u.createElement(e,null,k.date?new Date(k.date).toDateString():n.toDateString())),u.createElement(e,null,k.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),S.map((B,P)=>u.createElement(View,{key:P,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${B.devoteeName} ----- ${B.nakshatra} ----- ${B.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:8,fontSize:8,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},vi=Xr;var tn=({startDate:n,endDate:s,templeName:m,data:l,reportTiming:d})=>{let y=l.items[0].shares.length,g=50/(y||1),a=0,o=0,r=new Array(y).fill(0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n,endDate:s,reportTiming:d,reportName:"Share Report",templeName:m}),l.items.length<=0?u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.items.length>0?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black"}},u.createElement(View,{style:{width:"5%",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Sr")),u.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Puja Name")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Price")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Count")),l.items[0].shares.map((t,i)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},t.key))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},"Total"))),l.items.map((t,i)=>(a+=t.count,o+=t.total,t.shares.forEach((p,I)=>{r[I]+=p.value;}),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",borderTop:"none"}},u.createElement(View,{style:{width:"5%",padding:4}},u.createElement(e,{style:{fontSize:8}},i+1)),u.createElement(View,{style:{width:"20%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},t.pujaName)),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t.price))),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},t.count)),t.shares.map((p,I)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(p.value)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t.total)))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",border:"1px solid black",fontWeight:"bold",borderTop:"none"}},u.createElement(View,{style:{width:"33%",padding:4}},u.createElement(e,{style:{fontSize:8}},"Total")),u.createElement(View,{style:{width:"8%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8,fontWeight:"bold"}},a)),r.map((t,i)=>u.createElement(View,{style:{width:`${g}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(t)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},K(o))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",gap:2,marginTop:20,width:"100%",justifyContent:"space-between"}},u.createElement(View,{style:{width:"30%"}},r.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},l.items[0].shares[i].key)),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},K(t))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",fontWeight:"bold"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},"Total")),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},K(o))))),u.createElement(View,{style:{width:"50%"}},l.options?.right_side_table?.map((t,i)=>u.createElement(View,{key:i,style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",marginVertical:2}},t.map((p,I)=>u.createElement(View,{style:{width:`${100/t.length}%`}},u.createElement(e,{style:{fontSize:9}},p))))))),l.options?.footer_paragraph&&u.createElement(View,{style:{marginTop:20}},u.createElement(e,{style:{fontSize:9}},l.options.footer_paragraph))):null)))},Wi=tn;var nn=n=>{let s=0,m=0;return n.data.items.forEach(l=>{s+=l.quantity,m+=l.total;}),u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(F,{startDate:n.startDate,endDate:n.endDate,reportName:"Advance Goods Report",templeName:n.templeName,showGeneratedAt:true}),u.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},n.data.multiplier.name," ="," ",K(n.data.multiplier.rate)),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,"Sr no")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Text,null,"Date")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,"Quantity")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,"Amount"))),n.data.items.map((l,d)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,d+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement(Text,null,l.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,l.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,K(l.total))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:10,fontWeight:"bold"}},u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"30%"}},u.createElement(Text,null,"Total")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,s)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,K(m)))))))},ji=nn;var Li={kitchen:{A4:Et,A5:yi},transaction:{A4:_t,A5:xi},"prasad-delivery":{A4:Lt,A5:wi,"110mm":oi},prasad:{A4:ft,A5:hi,"110mm":ei},"puja-detailed":{A4:yt,A5:Ti,"110mm":Zt},"puja-summary":{A4:ct,A5:Di},"combined-report":{A4:$t,A5:Ii,"110mm":ni},"multi-temple-payment":{A4:Ot,A5:Pi},"settlements-report":{A4:Ht,A5:zi},invoice:{A4:Kt,A5:Ai},"postal-report":{A4:xt,A5:ki,"110mm":di},"payment-settlement-report":{A4:Qt,A5:Ci},"invoice-breakup":{A4:Ut,A5:Ni},"puja-count":{A4:Gt,A5:Fi},"custom-report":{A4:ai,A5:vi,"110mm":ui},"invoice-recon":{A4:fi},"share-report":{A4:Wi},"advance-goods":{A4:ji}},qi=class{constructor(s,m){bt(this,"option");bt(this,"size");this.option=s,this.size=m,[{family:"Noto Sans SC",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-sc@latest/chinese-simplified-400-normal.ttf"},{family:"Noto Sans Arabic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-arabic@latest/arabic-400-normal.ttf"},{family:"Noto Sans Devanagari",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-devanagari@latest/devanagari-400-normal.ttf"},{family:"Noto Sans Kannada",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kannada@latest/kannada-400-normal.ttf"},{family:"Noto Sans Tamil",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tamil@latest/tamil-400-normal.ttf"},{family:"Noto Sans Gurmukhi",src:"https://cdn.jsdelivr.net/fontsource/fonts/anek-gurmukhi@latest/gurmukhi-400-normal.ttf"},{family:"Noto Sans Lao",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-lao@latest/lao-400-normal.ttf"},{family:"Noto Sans Thai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thai@latest/thai-400-normal.ttf"},{family:"Noto Sans Kr",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/korean-400-normal.ttf"},{family:"Noto Sans Bengali",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-bengali@latest/bengali-400-normal.ttf"},{family:"Noto Sans Cyrillic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-kr@latest/cyrillic-400-normal.ttf"},{family:"Noto Sans JP",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-jp@latest/japanese-400-normal.ttf"},{family:"Noto Sans Greek",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/greek-400-normal.ttf"},{family:"Noto Sans Latin",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf"},{family:"Noto Sans Myanmar",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-myanmar@latest/myanmar-400-normal.ttf"},{family:"Noto Sans Ethiopic",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ethiopic@latest/ethiopic-400-normal.ttf"},{family:"Noto Sans Khmer",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-khmer@latest/khmer-400-normal.ttf"},{family:"Noto Sans Armenian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-armenian@latest/armenian-400-normal.ttf"},{family:"Noto Sans Hebrew",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-hebrew@latest/hebrew-400-normal.ttf"},{family:"Noto Sans Georgian",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-georgian@latest/georgian-400-normal.ttf"},{family:"Noto Sans Canadian Aboriginal",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-canadian-aboriginal@latest/canadian-aboriginal-400-normal.ttf"},{family:"Noto Sans Sinhala",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-sinhala@latest/sinhala-400-normal.ttf"},{family:"Noto Sans Ol Chiki",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-ol-chiki@latest/ol-chiki-400-normal.ttf"},{family:"Noto Sans Tibetan",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-serif-tibetan@latest/tibetan-400-normal.ttf"},{family:"Noto Sans Tifinagh",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tifinagh@latest/tifinagh-400-normal.ttf"},{family:"Noto Sans Yi",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-yi@latest/yi-400-normal.ttf"},{family:"Noto Sans Syriac",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-syriac@latest/syriac-400-normal.ttf"},{family:"Noto Sans Thaana",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-thaana@latest/thaana-400-normal.ttf"},{family:"Noto Sans Vai",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-vai@latest/vai-400-normal.ttf"},{family:"Noto Sans Cherokee",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-cherokee@latest/cherokee-400-normal.ttf"},{family:"Noto Sans Tai Tham",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-tham@latest/tai-tham-400-normal.ttf"},{family:"Noto Sans Tai Viet",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-tai-viet@latest/tai-viet-400-normal.ttf"},{family:"Noto Sans Javanese",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-javanese@latest/javanese-400-normal.ttf"},{family:"Noto Sans Gujarati",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-gujarati@latest/gujarati-400-normal.ttf"},{family:"Noto Sans Malayalam",src:"https://res.cloudinary.com/dweb0rpy4/raw/upload/v1763375518/fonts_Manjari-Regular_nrgfti_klz6ho.ttf"},{family:"Noto Sans Telugu",src:"https://cdn.jsdelivr.net/fontsource/fonts/noto-sans-telugu@latest/telugu-400-normal.ttf"}].forEach(({family:d,src:y})=>Font.register({family:d,src:y})),Font.register({family:"Noto Sans",fontWeight:"normal",src:At}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ct});}async print(s){let l=Li[this.option][this.size],d=u.createElement(l,{...s}),y=pdf(d).toBlob();return y.then(g=>{var a=URL.createObjectURL(g);if(window!=null){let o=window.open(a,"_blank");setTimeout(()=>{o?.print();},1e3);}}),y}async getBlob(s){let l=Li[this.option][this.size],d=u.createElement(l,{...s});return pdf(d).toBlob()}};
2
2
  export{Gi as A4Print,eo as T2Inch,qi as reportPrinter};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bookmypuja-tech/bmp-pdf",
3
3
  "description": "PDF Report Generation for Temple360 and T-360 by BookMyPuja",
4
- "version": "0.4.65",
4
+ "version": "0.4.66",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",