@bookmypuja-tech/bmp-pdf 0.4.49 → 0.4.50

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.
package/dist/index.d.ts CHANGED
@@ -340,8 +340,15 @@ interface IDayGroup$2 {
340
340
  items: IPujaCountData[];
341
341
  dayPujaTotal: number;
342
342
  dayPostalTotal: number;
343
+ dayPostalTempleFees: number;
344
+ dayPostalCarrierFees: number;
343
345
  dayGrandTotal: number;
344
346
  postalChargesBreakup?: [number, number, number];
347
+ otherChargesBreakup?: {
348
+ name: string;
349
+ count?: number;
350
+ amount: number;
351
+ }[];
345
352
  }
346
353
  interface IPujaCountReportProps {
347
354
  startDate: Date;
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 No from'qrcode';var Mi=Object.defineProperty;var $i=(o,s,p)=>s in o?Mi(o,s,{enumerable:true,configurable:true,writable:true,value:p}):o[s]=p;var bt=(o,s,p)=>$i(o,typeof s!="symbol"?s+"":s,p);var ce=o=>{typeof o=="string"&&(o=new Date(o));let s={day:"2-digit",month:"short",year:"numeric"};return o.toLocaleDateString("en-GB",s).replace(",","")};var ie=(o,s=false)=>{if(!s){if(o>=1e7)return `\u20B9${(o/1e7).toFixed(2)}Cr`;if(o>=1e5)return `\u20B9${(o/1e5).toFixed(2)}L`}return o.toLocaleString("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:o%1===0?0:2})};var Ae="https://res.cloudinary.com/dweb0rpy4/image/upload/v1763375057/bmp-blacked_1_lbb2r8.png",pt="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",zt="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",Nt="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:pt});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var Ct=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:o,dates:s})=>{let p=ce(s[0])===ce(s[1]);return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:Ct.page},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),u.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),u.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",p?ce(s[0]):`${ce(s[0])} - ${ce(s[1])}`),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:8}},o?o.map((r,d)=>u.createElement(View,{wrap:false,key:d,style:Ct.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"}},r.participantName),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:10,fontWeight:"bold"}},r.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"}},r.pujaName)),p?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},ce(r.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3}},u.createElement(Text,null,"Priest Note: ",r.priestNote)):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"flex-end"}},u.createElement(Text,{style:{fontWeight:"bold",fontSize:10}},"Rs ",r.amount),r.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)))},Qi=Ui;Font.register({family:"Roboto",fontWeight:"normal",src:pt});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var ae=1,ot=25*ae,Bt=StyleSheet.create({page:{padding:10*ae,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*ae,paddingHorizontal:10*ae,fontSize:ot,border:`${5*ae}px solid black`,borderRadius:5*ae,width:"100%",display:"flex",flexDirection:"column"}}),Ri=({data:o,dates:s})=>{let p=ce(s[0])===ce(s[1]);return u.createElement(Document,null,u.createElement(Page,{dpi:200,size:[457*ae],style:Bt.page},u.createElement(Image,{fixed:true,style:{height:55*ae,width:274*ae,marginBottom:10*ae,marginHorizontal:"auto"},src:Ae}),u.createElement(Text,{style:{fontSize:25*ae,marginBottom:5*ae,marginHorizontal:"auto"}},"Puja List"),u.createElement(Text,{style:{fontSize:20*ae,marginBottom:5*ae,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",p?ce(s[0]):`${ce(s[0])} - ${ce(s[1])}`),u.createElement(Text,{style:{fontSize:17*ae,marginBottom:20*ae,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*ae}},o?o.map((r,d)=>u.createElement(View,{wrap:false,key:d,style:Bt.pujaTile},u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:5*ae}},u.createElement(Text,{style:{opacity:.6,marginRight:10*ae}},"#",(d+1).toString().padStart(2,"0")),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*ae}},r.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*ae,paddingHorizontal:5*ae,borderRadius:5*ae,marginTop:3*ae}},u.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,u.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",r.amount))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*ae,gap:3*ae}},u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.participantName),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*ae}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},r.pujaName)),p?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},ce(r.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*ae}}),r.priestNote!==""&&r.priestNote!==null&&r.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*ae}},u.createElement(Text,null,"Priest Note: ",r.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:o={},children:s})=>{let p=n=>{let t=maxBy(Object.entries(io),([i,a])=>{let P=n.match(a);return P?P.length:0});return t?t[0]:"Latin"},r=n=>[/\b\d{2}\/\d{2}\/\d{4}\b/,/\b\d{2}\s\w{3}\s\d{4}\b/].some(i=>i.test(n));function d(n){return n.replace(/[\uFF01-\uFF5E]/g,t=>`${String.fromCharCode(t.charCodeAt(0)-65248)} `)}let g=n=>{let t=[],i=null,a="";for(let P of n){P=d(P);let te=p(P);te!==i?(a&&t.push({text:a,script:i}),i=te,a=P):a+=P;}return a&&t.push({text:a,script:i}),t},h=[];s&&typeof s=="string"&&!Array.isArray(s)&&!r(s)&&g(s).forEach((t,i)=>{let a=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;h.push(u.createElement(Text,{key:i,style:{fontFamily:a}},t.text));});let m=[],l={fontFamily:"Noto Sans"};return Array.isArray(o)?m=[...o,l]:o&&Object.keys(o).length>0?m=[o,l]:m=[l],u.createElement(Text,{style:m},h?.length?h:s)},e=oo;var no=({startDate:o,endDate:s,reportTiming:p,templeName:r,reportName:d,showGeneratedAt:g=true})=>u.createElement(u.Fragment,null,u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:Ae}),g&&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: ",o.toDateString()," - ",s.toDateString()):u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},"Date: ",o.toDateString()),p&&Object.keys(Tt).includes(p)?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Tt[p]," Report"):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),u.createElement(e,{style:{fontSize:12}},`${r}`)),I=no;var ao=({startDate:o,endDate:s,templeName:p,data:r,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,templeName:p,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((g,h)=>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,h+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,g.name)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,g.quantity))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Et=ao;var mo=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayWiseTotals:g,summary:h})=>{let m=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),l=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),n=h?.totalCreditedAmount??r.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(I,{startDate:o,endDate:s,reportName:"Transactions Report",templeName:p}),r.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: ",m.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Postal Charges Collected: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:10}},"Total Amount Credited to Temple: ",n.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&g&&g.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"))),g.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"))),r.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"))))},ct=mo;var yo=({children:o,splitat:s})=>{if(!o||typeof o!="string")return null;let p="";return s=="words"&&(p=" "),u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},o.split(p).map((r,d)=>u.createElement(u.Fragment,null,u.createElement(e,{key:d},r,s=="words"?" ":"")))))},q=yo;var wo=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayGroups:g})=>{let h=t=>{let i="";try{let a=JSON.parse(t.address);i=`${a.address}, ${a.locality}, ${a.state} - ${a.pincode}`;}catch(a){console.error("Error parsing address:",a),i=t.address;}return {...t,address:i}},m=r.map(h),l=()=>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"))),n=(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(I,{startDate:o,endDate:s,reportName:"Prasad Delivery Address",templeName:p}),m.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((t,i)=>{let a=t.items.map(h);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")),l(),a.map((P,te)=>n(P,te)))})):u.createElement(u.Fragment,null,l(),m.map((t,i)=>n(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:o,endDate:s,templeName:p,data:r,reportTiming:d,isDayWiseGrouped:g,dayGroups:h,isEmbed:m=false})=>{r.sort((a,P)=>a.invoiceNumber.localeCompare(P.invoiceNumber));let n=()=>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=(a,P)=>u.createElement(View,{key:P,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,P+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"20%"}},u.createElement(e,null,a.invoiceNumber)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"23%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,a.devoteeName)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"30%",fontSize:9,flexWrap:"wrap"}},u.createElement(e,null,a.pujaName," - ",a.prasadName)),u.createElement(View,{style:{padding:6,width:"10%",borderRight:"1px solid black"}},u.createElement(e,null,a.quantity)),u.createElement(View,{style:{padding:6,width:"7%"}},u.createElement(e,null,a.collectionMode))),i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Prasad Report",templeName:p,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")),r.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g&&h&&h.length>0?u.createElement(u.Fragment,null,h.map((a,P)=>u.createElement(View,{key:a.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"}},a.dateDisplay),u.createElement(e,{style:{fontSize:10}},a.count," item",a.count!==1?"s":"")),n(),a.items.map((te,E)=>t(te,E))))):u.createElement(u.Fragment,null,n(),r.map((a,P)=>t(a,P)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return m?i:u.createElement(Document,null,i)},yt=To;var Vo=({startDate:o,endDate:s,templeName:p,pujas:r,reportTiming:d,isDayWiseGrouped:g,isEmbed:h=false})=>{let m=0,l=0,n=r.some(i=>i.bookings.some(a=>a.requires_coupon));if(!r||r.length===0){let i=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Puja List",templeName:p,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return h?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(I,{startDate:o,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")),r.some(i=>i.bookings.some(a=>a.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"))))),r.some(i=>i.bookings.some(a=>a.is_early_reminder&&!a.requires_coupon))?r.flatMap((i,a)=>i.bookings.filter(P=>P.is_early_reminder&&!P.requires_coupon).map((P,te)=>(l++,u.createElement(View,{key:`${a}-${te}`,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,l)),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,P.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,P.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,P.date?new Date(P.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),u.createElement(e,{style:{fontSize:12}},`${p}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((i,a)=>{if(i.bookings.every(_=>_.is_early_reminder||_.requires_coupon))return null;m=0;let P=i.bookings.some(_=>_.topping_name),te=g&&i.dayGroups&&i.dayGroups.length>0,E=(_=false)=>P?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:_?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:"none",fontWeight:"semibold",width:"31%"}},u.createElement(e,null,"Offerings"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:_?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"))),pe=(_,Fe,qe)=>_.is_early_reminder||_.requires_coupon?null:P?u.createElement(View,{key:Fe,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,qe)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,_.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,_.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,_.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},u.createElement(e,null,_.topping_name||""))):u.createElement(View,{key:Fe,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,qe)),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,_.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,_.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,_.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,_.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,_.collectionMode||""))),_.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,_.priestNote))));return u.createElement(View,{key:a,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}`),!te&&E(true)),te?u.createElement(u.Fragment,null,i.dayGroups.map((_,Fe)=>{let qe=0,lt=_.items.filter(at=>!at.is_early_reminder&&!at.requires_coupon);return lt.length===0?null:u.createElement(View,{key:_.dateKey,style:{marginTop:Fe>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"}},_.dateDisplay),u.createElement(e,{style:{fontSize:9}},`${lt.length} booking${lt.length!==1?"s":""}`)),E(false),lt.map((at,qi)=>(qe++,pe(at,qi,qe))))})):u.createElement(u.Fragment,null,i.bookings.map((_,Fe)=>_.is_early_reminder||_.requires_coupon?null:(m++,pe(_,Fe,m)))))}))),n?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=r.flatMap(P=>P.bookings.filter(te=>te.requires_coupon).map(te=>({...te,pujaName:P.name}))),a={};for(let P of i)a[P.invoiceNumber]||(a[P.invoiceNumber]=[]),a[P.invoiceNumber].push(P);return Object.entries(a).map(([P,te],E)=>{let pe=te,_=pe[0];return u.createElement(View,{key:P,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"}},P),u.createElement(e,null,_.date?new Date(_.date).toDateString():o.toDateString())),u.createElement(e,null,_.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),pe.map((Fe,qe)=>u.createElement(View,{key:qe,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${Fe.devoteeName} ----- ${Fe.nakshatra} ----- ${Fe.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 h?t:u.createElement(Document,null,t)},ft=Vo;var Po=({templeName:o,startDate:s,endDate:p,pujas:r,reportTiming:d})=>{let g=r.sort((h,m)=>{let l=h.nakshatras.length;return m.nakshatras.length-l});return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:s,endDate:p,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},g.map((h,m)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((l,n)=>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,n+1)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:6,fontSize:10,width:"20%"}},u.createElement(e,null,l.count))))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},qt=Po;var Co=({startDate:o,endDate:s,templeName:p,data:r,isEmbed:d=false})=>{let g=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:p}),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")),r&&r.length>0?u.createElement(View,{style:{marginTop:20,width:"100%"}},(()=>{let h=r.filter(t=>!t.deliveryMode||t.deliveryMode==="normal-post"),m=r.filter(t=>t.deliveryMode==="international-post"),l=r.filter(t=>t.deliveryMode==="speedpost"),n=t=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:20,flexWrap:"wrap"}},t.map(i=>{let a=i.qrContent,P=No.toDataURL(a);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&&P?u.createElement(Image,{src:P,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,h.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) - ",h.length),n(h)),m.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) - ",m.length),n(m)),l.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) - ",l.length),n(l)))})()):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"));return d?g:u.createElement(Document,null,g)},xt=Co;var Bo=({startDate:o,endDate:s,templeName:p,pujaData:r,prasadData:d,deliveryData:g,reportTiming:h})=>{g=g.map(t=>{let i="";try{let a=JSON.parse(t.address);i=`${a.address}, ${a.locality}, ${a.state} - ${a.pincode}`;}catch(a){console.error("Error parsing address:",a),i=t.address;}return {...t,address:i}});r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&g.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportTiming:h,reportName:"Combined Report",templeName:p}),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,r.length>0&&ft({startDate:o,endDate:s,templeName:p,pujas:r,isEmbed:true}),d.length>0&&yt({startDate:o,endDate:s,templeName:p,data:d,isEmbed:true}),g.length>0&&xt({startDate:o,endDate:s,templeName:p,data:g,isEmbed:true})))},$t=Bo;var Wo=({startDate:o,endDate:s,data:p})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,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"))),p?.map((r,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,r.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,r.bookings)),u.createElement(View,{style:{padding:6,width:"20%"}},u.createElement(e,null,"\u20B9",r.revenue))))))),Ot=Wo;var Lo=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayGroups:g})=>{let h=()=>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"))),m=(l,n)=>u.createElement(View,{key:n,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,n+1)),u.createElement(View,{style:{padding:6,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,l.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,l.settlement_amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%",fontSize:9}},u.createElement(e,null,l.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"}},l.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,l.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Settlements Report",templeName:p}),u.createElement(e,{style:{fontSize:10,marginTop:10}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((l,n)=>u.createElement(View,{key:l.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"}},l.dateDisplay),u.createElement(e,{style:{fontSize:10}},l.count," settlement",l.count!==1?"s":""," | Total: ",l.dayTotal)),h(),l.items.map((t,i)=>m(t,i))))):u.createElement(u.Fragment,null,h(),r.settlements.map((l,n)=>m(l,n)))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))},Ht=Lo;var Mo=({data:o})=>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"}},o.templeName),u.createElement(e,{style:{fontSize:10}},o.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}))),o.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:o.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:20,position:"relative"}},o.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 #",o.invoiceNumber),u.createElement(e,{style:{fontSize:10,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:10}},u.createElement(e,{style:{fontSize:11}},"Bill to:"),u.createElement(e,{style:{fontSize:11}},o.devoteeDetails.name),o.devoteeDetails.phone?u.createElement(e,{style:{fontSize:11}},o.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:11}},o.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"))),o.items.map((s,p)=>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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11,marginTop:5}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:11,maxWidth:400,marginBottom:20}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.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")),o.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:"),o.prasads.morning.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:10}},p+1,". ",s.name," (",s.timings,")"))):null,o.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:"),o.prasads.afternoon.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:10}},p+1,". ",s.name," (",s.timings,")"))):null,o.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:"),o.prasads.evening.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:10}},p+1,". ",s.name," (",s.timings,")"))):null):null,o.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}},o.instructions.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:8}},p+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:o,endDate:s,templeName:p,data:r})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Payment Settlement Report",templeName:p}),r.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"))),r.map((d,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:"10%"}},u.createElement(e,null,g+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")))),Gt=Ho;var Uo=({startDate:o,endDate:s,templeName:p,data:r})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Invoice Level Breakup",templeName:p}),r.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"))),r.map((d,g)=>u.createElement(View,{key:g,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,g+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:o,endDate:s,templeName:p,data:r,dayGroups:d,summary:g})=>{r.reduce((m,l)=>m+l.quantity,0);return u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Total Puja Count Report",templeName:p}),r.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 m=new Map;return d.forEach(l=>{l.items.forEach(n=>{let t=m.get(n.name)||{quantity:0,amount:0};m.set(n.name,{quantity:t.quantity+n.quantity,amount:t.amount+(n.amount||0)});});}),Array.from(m.entries()).map(([l,n],t)=>u.createElement(View,{key:l,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,t+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,l)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,n.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,null,ie(n.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 m=new Map;return d.forEach(l=>{l.items.forEach(n=>{let t=m.get(n.name)||{quantity:0,amount:0};m.set(n.name,{quantity:t.quantity+n.quantity,amount:t.amount+(n.amount||0)});});}),Array.from(m.values()).reduce((l,n)=>l+n.quantity,0)})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},ie((()=>{let m=new Map;return d.forEach(l=>{l.items.forEach(n=>{let t=m.get(n.name)||{quantity:0,amount:0};m.set(n.name,{quantity:t.quantity+n.quantity,amount:t.amount+(n.amount||0)});});}),Array.from(m.values()).reduce((l,n)=>l+n.amount,0)})())))),d.some(m=>m.dayPostalTotal>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 Total"," ",(()=>{let m=d.filter(n=>n.postalChargesBreakup).map(n=>n.postalChargesBreakup);if(m.length===0)return "";let l=[0,0,0];return m.forEach(n=>{n&&(l[0]+=n[0],l[1]+=n[1],l[2]+=n[2]);}),`(${l.join("+")})`})())),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"}},ie(d.reduce((m,l)=>m+(l.dayPostalTotal||0),0))))),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"}},(()=>{let m=new Map;return d.forEach(l=>{l.items.forEach(n=>{let t=m.get(n.name)||{quantity:0,amount:0};m.set(n.name,{quantity:t.quantity+n.quantity,amount:t.amount+(n.amount||0)});});}),Array.from(m.values()).reduce((l,n)=>l+n.quantity,0)})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},ie((()=>{let m=new Map;d.forEach(t=>{t.items.forEach(i=>{let a=m.get(i.name)||{quantity:0,amount:0};m.set(i.name,{quantity:a.quantity+i.quantity,amount:a.amount+(i.amount||0)});});});let l=Array.from(m.values()).reduce((t,i)=>t+i.amount,0),n=d.reduce((t,i)=>t+(i.dayPostalTotal||0),0);return l+n})()))))):null,d&&d.length>0&&u.createElement(View,null,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((m,l)=>u.createElement(View,{key:m.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"}},m.dateDisplay),m.dayPostalTotal>0?u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"column",width:"40%"}},u.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},u.createElement(View,{style:{width:"65%"}},u.createElement(e,{style:{fontSize:10}},"Puja Total")),u.createElement(View,{style:{width:"35%"}},u.createElement(e,{style:{fontSize:10,textAlign:"right"}},ie(m.dayPujaTotal||0)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},u.createElement(View,{style:{width:"65%"}},u.createElement(e,{style:{fontSize:10}},"Postal Charges ",m.postalChargesBreakup?`(${m.postalChargesBreakup.map(n=>n||0).join("+")})`:"")),u.createElement(View,{style:{width:"35%"}},u.createElement(e,{style:{fontSize:10,textAlign:"right"}},ie(m.dayPostalTotal||0)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",padding:2}},u.createElement(View,{style:{width:"65%"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Grand Total")),u.createElement(View,{style:{width:"35%"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold",textAlign:"right"}},ie(m.dayGrandTotal||0)))))):u.createElement(e,{style:{fontSize:10,fontWeight:"bold",textAlign:"right"}},"Grand Total:"," ",ie(m.dayGrandTotal||0))),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"))),m.items.map((n,t)=>u.createElement(View,{key:t,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,t+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,n.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,n.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,ie(n.amount||0))))))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"))))},Qt=Yo;var Zo=({startDate:o,templeName:s,pujas:p,reportTiming:r})=>{return !p||p.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"}},o.toLocaleDateString()),r&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.slice(1)," Report")),p.map((g,h)=>{let m=g.bookings.filter(l=>!l.is_early_reminder&&!l.requires_coupon);return m.length===0?null:u.createElement(View,{key:h,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}},m.length," booking",m.length>1?"s":"")),m.map((l,n)=>(u.createElement(View,{key:n,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"}},l.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between",marginBottom:l.topping_name?6:0}},u.createElement(e,{style:{fontSize:12}},l.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",l.quantity)),l.topping_name&&u.createElement(View,{style:{backgroundColor:"#FFF3E0",padding:6,borderRadius:4}},u.createElement(e,{style:{fontSize:11,fontWeight:"semibold",color:"#E65100"}},"Topping: ",l.topping_name)),l.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},l.priestNote))))))})))},Zt=Zo;var Xo=({startDate:o,templeName:s,data:p,reportTiming:r,isDayWiseGrouped:d,dayGroups:g})=>{if(!p||p.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 h=p.sort((l,n)=>l.invoiceNumber.localeCompare(n.invoiceNumber)),m=(l,n)=>u.createElement(View,{key:n,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"}},l.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.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}},l.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",l.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},l.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"}},o.toLocaleDateString()),r&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.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}},h.length," item",h.length>1?"s":"")),d&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((l,n)=>u.createElement(View,{key:l.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"}},l.dateDisplay),u.createElement(e,{style:{fontSize:11}},l.count," item",l.count!==1?"s":""))),l.items.map((t,i)=>m(t,i))))):u.createElement(u.Fragment,null,h.map((l,n)=>m(l,n)))))},ei=Xo;var Ro=({startDate:o,templeName:s,data:p,isDayWiseGrouped:r,dayGroups:d})=>{let g=l=>{let n="";try{let t=JSON.parse(l.address);n=`${t.address}, ${t.locality}, ${t.state} - ${t.pincode}`;}catch{n=l.address;}return {...l,address:n}},h=p.map(g);if(!h||h.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 m=(l,n)=>u.createElement(View,{key:n,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.devoteeName),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},l.address)),l.phoneNumber&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",l.phoneNumber)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",l.note||l.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"}},o.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}},h.length," delivery",h.length>1?" items":" item")),r&&d&&d.length>0?u.createElement(u.Fragment,null,d.map((l,n)=>{let t=l.items.map(g);return u.createElement(View,{key:l.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"}},l.dateDisplay),u.createElement(e,{style:{fontSize:11}},l.count," item",l.count!==1?"s":""))),t.map((i,a)=>m(i,a)))})):u.createElement(u.Fragment,null,h.map((l,n)=>m(l,n)))))},oi=Ro;var er=({startDate:o,templeName:s,pujaData:p,prasadData:r,deliveryData:d,reportTiming:g})=>{if(p.length===0&&r.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 m=r.sort((l,n)=>l.invoiceNumber.localeCompare(n.invoiceNumber));return u.createElement(Document,null,p.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"}},o.toLocaleDateString()),g&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.charAt(0).toUpperCase()+g.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")),p.map((l,n)=>{let t=l.bookings.filter(i=>!i.is_early_reminder&&!i.requires_coupon);return t.length===0?null:u.createElement(View,{key:n,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"}},l.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},t.length," booking",t.length>1?"s":"")),t.map((i,a)=>(u.createElement(View,{key:a,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))))))})),r.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"}},o.toLocaleDateString()),g&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},g.charAt(0).toUpperCase()+g.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}},m.length," item",m.length>1?"s":"")),m.map((l,n)=>u.createElement(View,{key:n,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"}},l.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.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}},l.prasadName),u.createElement(e,{style:{fontSize:12}}," (qty: ",l.quantity,")")),u.createElement(e,{style:{fontSize:12,color:"#666"}},l.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"}},o.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((l,n)=>u.createElement(View,{key:n,style:{border:"1pt solid #999",padding:10,marginBottom:8,backgroundColor:"#FFF"},wrap:false},u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},l.name),u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:11}},l.address)),l.phone&&u.createElement(View,{style:{marginBottom:6}},u.createElement(e,{style:{fontSize:12}},"Ph: ",l.phone)),u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Note: ",l.pujaDetails))))))},ni=er;var tr=({startDate:o,templeName:s,data:p})=>!p||p.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"}},o.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}},p.length," label",p.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")),p.map(r=>u.createElement(View,{key:r.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"}},r.name),u.createElement(e,{style:{fontSize:10,fontWeight:"bold",backgroundColor:"#f0f0f0",padding:2,paddingLeft:4,paddingRight:4}},r.deliveryMode==="speedpost"?"SP":r.deliveryMode==="international-post"?"IP":"NP")),u.createElement(View,{style:{marginBottom:5}},u.createElement(e,{style:{fontSize:11}},r.address)),u.createElement(e,{style:{fontSize:11,marginBottom:5}},r.phone),u.createElement(View,{style:{borderTop:"0.5pt dashed #CCC",marginTop:5,marginBottom:5}}),u.createElement(e,{style:{fontSize:10,color:"#666"}},"Note: ",r.pujaDetails))))),di=tr;var or=({startDate:o,endDate:s,templeName:p,pujas:r,reportTiming:d,selectedPujaNames:g=[]})=>{let h=0,m=0,l=r.some(n=>n.bookings.some(t=>t.requires_coupon));return !r||r.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Custom Puja Report",templeName:p,reportTiming:d}),g.length>0&&u.createElement(View,{style:{marginTop:10,marginBottom:10}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),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(I,{startDate:o,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")),g.length>0&&u.createElement(View,{style:{marginTop:10,marginBottom:5}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),r.some(n=>n.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"))))),r.some(n=>n.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((n,t)=>n.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,a)=>(m++,u.createElement(View,{key:`${t}-${a}`,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,m)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,n.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}},`${p}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},r.map((n,t)=>n.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,u.createElement(View,{key:t,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"}},`${n.name} - ${n.bookings.length}`)),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:"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"))),n.bookings.map((i,a)=>i.is_early_reminder||i.requires_coupon?null:(h++,u.createElement(View,{key:a,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,h)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,i.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,i.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,i.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,i.collectionMode||""))),i.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,i.priestNote))))))))))),l?u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:10},src:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let n=r.flatMap(i=>i.bookings.filter(a=>a.requires_coupon).map(a=>({...a,pujaName:i.name}))),t={};for(let i of n)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,a],P)=>{let te=a,E=te[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,E.date?new Date(E.date).toDateString():o.toDateString())),u.createElement(e,null,E.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),te.map((pe,_)=>u.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${pe.devoteeName} ----- ${pe.nakshatra} ----- ${pe.pujaName}`))),u.createElement(View,null,u.createElement(e,{style:{textAlign:"center",marginTop:10,fontSize:10,opacity:.5}},"~~~ bookmypuja.app - Your Puja, Our Commitment ~~~")))})})())):null))},pi=or;var rr=({startDate:o,templeName:s,pujas:p,reportTiming:r,selectedPujaNames:d=[]})=>{return !p||p.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"}},o.toLocaleDateString()),r&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},r.charAt(0).toUpperCase()+r.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(", "))),p.map((h,m)=>{let l=h.bookings.filter(n=>!n.is_early_reminder&&!n.requires_coupon);return l.length===0?null:u.createElement(View,{key:m,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"}},h.name),u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},l.length," booking",l.length>1?"s":"")),l.map((n,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"}},n.invoiceNumber)),u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginBottom:6}},n.devoteeName),u.createElement(View,{style:{flexDirection:"row",justifyContent:"space-between"}},u.createElement(e,{style:{fontSize:12}},n.nakshatra),u.createElement(e,{style:{fontSize:12}},"Qty: ",n.quantity)),n.collectionMode&&u.createElement(View,{style:{marginTop:4}},u.createElement(e,{style:{fontSize:11,color:"#666"}},"Mode: ",n.collectionMode)),n.priestNote&&u.createElement(View,{style:{marginTop:6,paddingTop:6,borderTop:"0.5pt dashed #CCC"}},u.createElement(e,{style:{fontSize:11,color:"#666"}},n.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=o=>{let s=0,p=0,r=0;for(let d of o.items)d.paymentMethod!="INTERNATIONAL_CARD"&&d.platformFees>0&&(s+=d.platformFees,p+=d.platformFeesGST);return r=p+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:Ae}),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}},o.templeName," "),u.createElement(Text,{style:{fontSize:12}},"Bookings from ",o.startDate.toDateString()," to"," ",o.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:"15%"}},u.createElement(Text,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"Platform Fees")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,"Plt Fees GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"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:"19%"}},u.createElement(Text,null,"Transaction ID")))),o.items.map((d,g)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${d.platformFees==0||d.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,d.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,d.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,ie(d.platformFees))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,ie(d.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,ie(d.platformFees+d.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,d.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),u.createElement(View,{style:{padding:3,width:"19%"}},u.createElement(Text,null,d.transactionID)))),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:"15%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,ie(s))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,ie(p))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,ie(r))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}}),u.createElement(View,{style:{padding:3,width:"19%"}})),u.createElement(View,{style:{marginTop:10,fontSize:12}},u.createElement(Text,null,"Total Payable: ",ie(r)))))},yi=dr;var gr=({startDate:o,endDate:s,templeName:p,data:r,reportTiming:d})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,templeName:p,reportTiming:d,reportName:"Temple Prasad (Kitchen) Report"}),r.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"))),r.map((g,h)=>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,h+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,g.name)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,g.quantity))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),fi=gr;var yr=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayWiseTotals:g,summary:h})=>{let m=h?.totalBookingsAmount??r.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),l=h?.totalPostalCharges??r.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),n=h?.totalCreditedAmount??r.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(I,{startDate:o,endDate:s,reportName:"Transactions Report",templeName:p}),r.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: ",m.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Postal Charges Collected: ",l.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"})),u.createElement(e,{style:{fontSize:9}},"Total Amount Credited to Temple: ",n.toLocaleString("en-IN",{maximumFractionDigits:2,style:"currency",currency:"INR"}))),d&&g&&g.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"))),g.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"))),r.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=yr;var wr=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayGroups:g})=>{let h=t=>{let i="";try{let a=JSON.parse(t.address);i=`${a.address}, ${a.locality}, ${a.state} - ${a.pincode}`;}catch(a){console.error("Error parsing address:",a),i=t.address;}return {...t,address:i}},m=r.map(h),l=()=>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"))),n=(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(I,{startDate:o,endDate:s,reportName:"Prasad Delivery Address",templeName:p}),m.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((t,i)=>{let a=t.items.map(h);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")),l(),a.map((P,te)=>n(P,te)))})):u.createElement(u.Fragment,null,l(),m.map((t,i)=>n(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:o,endDate:s,templeName:p,data:r,reportTiming:d,isDayWiseGrouped:g,dayGroups:h})=>{r.sort((t,i)=>t.invoiceNumber.localeCompare(i.invoiceNumber));let l=()=>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"))),n=(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(I,{startDate:o,endDate:s,reportName:"Prasad Report",templeName:p,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")),r.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g&&h&&h.length>0?u.createElement(u.Fragment,null,h.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":"")),l(),t.items.map((a,P)=>n(a,P))))):u.createElement(u.Fragment,null,l(),r.map((t,i)=>n(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:o,endDate:s,templeName:p,pujas:r,reportTiming:d,isDayWiseGrouped:g})=>{let h=0,m=0,l=r.some(n=>n.bookings.some(t=>t.requires_coupon));return !r||r.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Puja List",templeName:p,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(I,{startDate:o,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")),r.some(n=>n.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"))))),r.some(n=>n.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((n,t)=>n.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,a)=>(m++,u.createElement(View,{key:`${t}-${a}`,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,m)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,n.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}},`${p}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((n,t)=>{if(n.bookings.every(E=>E.is_early_reminder||E.requires_coupon))return null;h=0;let i=n.bookings.some(E=>E.topping_name),a=g&&n.dayGroups&&n.dayGroups.length>0,P=(E=false)=>i?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:E?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:"none",fontWeight:"semibold",width:"31%"}},u.createElement(e,null,"Offerings"))):u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:E?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"))),te=(E,pe,_)=>E.is_early_reminder||E.requires_coupon?null:i?u.createElement(View,{key:pe,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,_)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,E.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,E.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,E.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},u.createElement(e,null,E.topping_name||""))):u.createElement(View,{key:pe,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,_)),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,E.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,E.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,E.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,E.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,E.collectionMode||""))),E.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,E.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"}},`${n.name} - ${n.totalBookings||n.bookings.length}`),!a&&P(true)),a?u.createElement(u.Fragment,null,n.dayGroups.map((E,pe)=>{let _=0,Fe=E.items.filter(qe=>!qe.is_early_reminder&&!qe.requires_coupon);return Fe.length===0?null:u.createElement(View,{key:E.dateKey,style:{marginTop:pe>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"}},E.dateDisplay),u.createElement(e,{style:{fontSize:8}},`${Fe.length} booking${Fe.length!==1?"s":""}`)),P(false),Fe.map((qe,lt)=>(_++,te(qe,lt,_))))})):u.createElement(u.Fragment,null,n.bookings.map((E,pe)=>E.is_early_reminder||E.requires_coupon?null:(h++,te(E,pe,h)))))}))),l?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let n=r.flatMap(i=>i.bookings.filter(a=>a.requires_coupon).map(a=>({...a,pujaName:i.name}))),t={};for(let i of n)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,a],P)=>{let te=a,E=te[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,E.date?new Date(E.date).toDateString():o.toDateString())),u.createElement(e,null,E.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),te.map((pe,_)=>u.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${pe.devoteeName} ----- ${pe.nakshatra} ----- ${pe.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:o,startDate:s,endDate:p,pujas:r,reportTiming:d})=>{let g=r.sort((h,m)=>{let l=h.nakshatras.length;return m.nakshatras.length-l});return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:s,endDate:p,reportTiming:d,reportName:"Puja Summary",templeName:o}),r.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},g.map((h,m)=>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"}},`${h.name} - ${h.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"))),h.nakshatras.map((l,n)=>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,n+1)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"60%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:4,fontSize:9,width:"20%"}},u.createElement(e,null,l.count))))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Di=Pr;var zr=({startDate:o,endDate:s,templeName:p,pujaData:r,prasadData:d,deliveryData:g,reportTiming:h})=>{g=g.map(t=>{let i="";try{let a=JSON.parse(t.address);i=`${a.address}, ${a.locality}, ${a.state} - ${a.pincode}`;}catch(a){console.error("Error parsing address:",a),i=t.address;}return {...t,address:i}});let m=0,l=0,n=r.some(t=>t.bookings.some(i=>i.requires_coupon));return r.length==0&&d.length==0&&g.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportTiming:h,reportName:"Combined Report",templeName:p}),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,r.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportTiming:h,reportName:"",templeName:""}),r.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"))))),r.some(t=>t.bookings.some(i=>i.is_early_reminder&&!i.requires_coupon))?r.flatMap((t,i)=>t.bookings.filter(a=>a.is_early_reminder&&!a.requires_coupon).map((a,P)=>(l++,u.createElement(View,{wrap:false,key:`${i}-${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,l)),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,a.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"20%"}},u.createElement(e,null,a.date?new Date(a.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:12,fontWeight:"bold",marginTop:15}},"Puja List"),u.createElement(e,{style:{fontSize:10}},`${p}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((t,i)=>t.bookings.every(a=>a.is_early_reminder||a.requires_coupon)?null:(m=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((a,P)=>a.is_early_reminder||a.requires_coupon?null:(m++,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,m)),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,a.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${35*1.11111}%`}},u.createElement(e,null,a.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${25*1.11111}%`}},u.createElement(e,null,a.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${10*1.11111}%`}},u.createElement(e,null,a.quantity))),a.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,a.priestNote))))))))))))),r.length>0&&n&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=r.flatMap(a=>a.bookings.filter(P=>P.requires_coupon).map(P=>({...P,pujaName:a.name}))),i={};for(let a of t)i[a.invoiceNumber]||(i[a.invoiceNumber]=[]),i[a.invoiceNumber].push(a);return Object.entries(i).map(([a,P],te)=>{let E=P,pe=E[0];return u.createElement(View,{key:a,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"}},a),u.createElement(e,null,pe.date?new Date(pe.date).toDateString():o.toDateString())),u.createElement(e,null,pe.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),E.map((_,Fe)=>u.createElement(View,{key:Fe,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${_.devoteeName} ----- ${_.nakshatra} ----- ${_.pujaName}`))))})})())),d.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportTiming:h,reportName:"Prasad Report",templeName:p}),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)))))),g.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportTiming:h,reportName:"Prasad Delivery Postal Report",templeName:p}),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},g&&g.map(t=>{let i=No.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=zr;var Cr=({startDate:o,endDate:s,data:p})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,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"))),p?.map((r,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,r.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid black",width:"15%"}},u.createElement(e,null,r.bookings)),u.createElement(View,{style:{padding:4,width:"20%"}},u.createElement(e,null,"\u20B9",r.revenue))))))),Pi=Cr;var vr=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayGroups:g})=>{let h=()=>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"))),m=(l,n)=>u.createElement(View,{key:n,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,n+1)),u.createElement(View,{style:{padding:4,width:"15%",borderRight:"1px solid #000"}},u.createElement(e,null,l.date)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,l.settlement_amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%",fontSize:7}},u.createElement(e,null,l.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"}},l.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,l.settlement_id)));return u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Settlements Report",templeName:p}),u.createElement(e,{style:{fontSize:9,marginTop:8}},"Total Credited Amount: ",r.totalCreditedAmount),r.settlements.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&g&&g.length>0?u.createElement(u.Fragment,null,g.map((l,n)=>u.createElement(View,{key:l.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"}},l.dateDisplay),u.createElement(e,{style:{fontSize:8}},l.count," settlement",l.count!==1?"s":""," | ",l.dayTotal)),h(),l.items.map((t,i)=>m(t,i))))):u.createElement(u.Fragment,null,h(),r.settlements.map((l,n)=>m(l,n)))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))},Ai=vr;var Er=({data:o})=>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"}},o.templeName),u.createElement(e,{style:{fontSize:8}},o.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}))),o.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:o.qrContent})):null),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignItems:"center",marginTop:15,position:"relative"}},o.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 #",o.invoiceNumber),u.createElement(e,{style:{fontSize:8,marginTop:2}},"Status: ",o.status=="confirmed"?"PAID":"PENDING")),u.createElement(View,{style:{marginTop:8}},u.createElement(e,{style:{fontSize:9}},"Bill to:"),u.createElement(e,{style:{fontSize:9}},o.devoteeDetails.name),o.devoteeDetails.phone?u.createElement(e,{style:{fontSize:9}},o.devoteeDetails.phone):null,u.createElement(e,{style:{fontSize:9}},o.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"))),o.items.map((s,p)=>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,o.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,o.subTotal))),o.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,o.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,o.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,o.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,o.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,o.totalAmount))))),o.prasadCollectionMode?u.createElement(View,{style:{marginBottom:4}},u.createElement(e,{style:{fontSize:9,marginTop:4}},"Prasad Collection Mode: ",o.prasadCollectionMode)):null,o.devoteeDetails.address?u.createElement(u.Fragment,null,u.createElement(e,{style:{fontSize:9,maxWidth:300,marginBottom:15}},"Address: ",o.devoteeDetails.address)):null,o.prasads&&(o.prasads.morning.length>0||o.prasads.afternoon.length>0||o.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")),o.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:"),o.prasads.morning.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:8}},p+1,". ",s.name," (",s.timings,")"))):null,o.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:"),o.prasads.afternoon.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:8}},p+1,". ",s.name," (",s.timings,")"))):null,o.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:"),o.prasads.evening.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:8}},p+1,". ",s.name," (",s.timings,")"))):null):null,o.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}},o.instructions.map((s,p)=>u.createElement(e,{key:p,style:{fontSize:7}},p+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")))),zi=Er;var Mr=({startDate:o,endDate:s,templeName:p,data:r})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:p}),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")),r&&r.length>0?u.createElement(View,{style:{marginTop:15,width:"100%"}},(()=>{let d=r.filter(l=>!l.deliveryMode||l.deliveryMode==="normal-post"),g=r.filter(l=>l.deliveryMode==="international-post"),h=r.filter(l=>l.deliveryMode==="speedpost"),m=l=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"100%",gap:15,flexWrap:"wrap"}},l.map(n=>{let t=n.qrContent,i=No.toDataURL(t);return u.createElement(View,{wrap:false,key:n.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"}},n.name),u.createElement(View,{style:{fontSize:8}},u.createElement(q,{splitat:"words"},n.address)),u.createElement(e,{style:{fontSize:8}},n.phone)),n.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}},n.deliveryMode==="speedpost"?"SP":n.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: ",n.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),m(d)),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"}},"International Post (IP) - ",g.length),m(g)),h.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) - ",h.length),m(h)))})()):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))),ki=Mr;var Hr=({startDate:o,endDate:s,templeName:p,data:r})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Payment Settlement Report",templeName:p}),r.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"))),r.map((d,g)=>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,g+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")))),Ni=Hr;var Ur=({startDate:o,endDate:s,templeName:p,data:r})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Invoice Level Breakup",templeName:p}),r.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"))),r.map((d,g)=>u.createElement(View,{key:g,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,g+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")))),Ci=Ur;var Yr=({startDate:o,endDate:s,templeName:p,data:r,isDayWiseGrouped:d,dayGroups:g,summary:h})=>{let m=r.reduce((l,n)=>l+n.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(I,{startDate:o,endDate:s,reportName:"Total Puja Count Report",templeName:p}),r.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},u.createElement(View,{style:{marginBottom:20}},d&&u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Monthly Summary")),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:"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,"Remarks"))),r.map((l,n)=>u.createElement(View,{key:n,style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9}},u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"10%"}},u.createElement(e,null,n+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"40%"}},u.createElement(e,null,l.name)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,l.quantity)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:9,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"}},m)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"35%"}}))),d&&g&&g.length>0&&u.createElement(View,null,u.createElement(View,{style:{marginBottom:8,paddingBottom:4,borderBottom:"2px solid #333"}},u.createElement(e,{style:{fontSize:10,fontWeight:"bold"}},"Day-wise Breakdown")),g.map((l,n)=>u.createElement(View,{key:l.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"}},l.dateDisplay),u.createElement(e,{style:{fontSize:10}},"Day Total: ",l.dayTotal)),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"))),l.items.map((t,i)=>u.createElement(View,{key:i,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,i+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"55%"}},u.createElement(e,null,t.name)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,t.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,ie(t.amount||0))))))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range"))))},Fi=Yr;var Xr=({startDate:o,endDate:s,templeName:p,pujas:r,reportTiming:d,selectedPujaNames:g=[]})=>{let h=0,m=0,l=r.some(n=>n.bookings.some(t=>t.requires_coupon));return !r||r.length===0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o,endDate:s,reportName:"Custom Puja Report",templeName:p,reportTiming:d}),g.length>0&&u.createElement(View,{style:{marginTop:8,marginBottom:8}},u.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),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(I,{startDate:o,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")),g.length>0&&u.createElement(View,{style:{marginTop:8,marginBottom:4}},u.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",g.join(", "))),r.some(n=>n.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"))))),r.some(n=>n.bookings.some(t=>t.is_early_reminder&&!t.requires_coupon))?r.flatMap((n,t)=>n.bookings.filter(i=>i.is_early_reminder&&!i.requires_coupon).map((i,a)=>(m++,u.createElement(View,{key:`${t}-${a}`,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,m)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"53%"}},u.createElement(e,null,n.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}},`${p}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},r.map((n,t)=>n.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(h=0,u.createElement(View,{key:t,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"}},`${n.name} - ${n.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:"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"))),n.bookings.map((i,a)=>i.is_early_reminder||i.requires_coupon?null:(h++,u.createElement(View,{key:a,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,h)),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,i.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,i.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,i.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,i.collectionMode||""))),i.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,i.priestNote))))))))))),l?u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(Image,{fixed:true,style:{height:12,width:60,marginBottom:8},src:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let n=r.flatMap(i=>i.bookings.filter(a=>a.requires_coupon).map(a=>({...a,pujaName:i.name}))),t={};for(let i of n)t[i.invoiceNumber]||(t[i.invoiceNumber]=[]),t[i.invoiceNumber].push(i);return Object.entries(t).map(([i,a],P)=>{let te=a,E=te[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,E.date?new Date(E.date).toDateString():o.toDateString())),u.createElement(e,null,E.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),te.map((pe,_)=>u.createElement(View,{key:_,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${pe.devoteeName} ----- ${pe.nakshatra} ----- ${pe.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:o,endDate:s,templeName:p,data:r,reportTiming:d})=>{let g=r[0].shares.length,h=50/(g||1),m=0,l=0,n=new Array(g).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(I,{startDate:o,endDate:s,reportTiming:d,reportName:"Share Report",templeName:p}),r.length<=0?u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,r.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")),r[0].shares.map((t,i)=>u.createElement(View,{style:{width:`${h}}%`,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"))),r.map((t,i)=>(m+=t.count,l+=t.total,t.shares.forEach((a,P)=>{n[P]+=a.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}},ie(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((a,P)=>u.createElement(View,{style:{width:`${h}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},ie(a.value)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},ie(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"}},m)),n.map((t,i)=>u.createElement(View,{style:{width:`${h}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},ie(t)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},ie(l))))),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:2,marginTop:20}},n.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"25%",justifyContent:"space-between"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},r[0].shares[i].key)),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},ie(t))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"25%",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}},ie(l)))))):null)))},ji=tn;var nn=o=>{let s=0,p=0;return o.data.items.forEach(r=>{s+=r.quantity,p+=r.total;}),u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(I,{startDate:o.startDate,endDate:o.endDate,reportName:"Advance Goods Report",templeName:o.templeName,showGeneratedAt:true}),u.createElement(Text,{style:{fontSize:12,marginTop:10,fontWeight:"semibold"}},o.data.multiplier.name," ="," ",ie(o.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"))),o.data.items.map((r,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,r.date)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"40%"}},u.createElement(Text,null,r.quantity)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"40%"}},u.createElement(Text,null,ie(r.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,ie(p)))))))},Wi=nn;var Li={kitchen:{A4:Et,A5:fi},transaction:{A4:ct,A5:xi},"prasad-delivery":{A4:Lt,A5:wi,"110mm":oi},prasad:{A4:yt,A5:hi,"110mm":ei},"puja-detailed":{A4:ft,A5:Ti,"110mm":Zt},"puja-summary":{A4:qt,A5:Di},"combined-report":{A4:$t,A5:Ii,"110mm":ni},"multi-temple-payment":{A4:Ot,A5:Pi},"settlements-report":{A4:Ht,A5:Ai},invoice:{A4:Kt,A5:zi},"postal-report":{A4:xt,A5:ki,"110mm":di},"payment-settlement-report":{A4:Gt,A5:Ni},"invoice-breakup":{A4:Ut,A5:Ci},"puja-count":{A4:Qt,A5:Fi},"custom-report":{A4:pi,A5:vi,"110mm":ui},"invoice-recon":{A4:yi},"share-report":{A4:ji},"advance-goods":{A4:Wi}},_i=class{constructor(s,p){bt(this,"option");bt(this,"size");this.option=s,this.size=p,[{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:g})=>Font.register({family:d,src:g})),Font.register({family:"Noto Sans",fontWeight:"normal",src:zt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Nt});}async print(s){let r=Li[this.option][this.size],d=u.createElement(r,{...s}),g=pdf(d).toBlob();return g.then(h=>{var m=URL.createObjectURL(h);if(window!=null){let l=window.open(m,"_blank");setTimeout(()=>{l?.print();},1e3);}}),g}async getBlob(s){let r=Li[this.option][this.size],d=u.createElement(r,{...s});return pdf(d).toBlob()}};
2
- export{Qi as A4Print,eo as T2Inch,_i as reportPrinter};
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,g)=>s in n?Mi(n,s,{enumerable:true,configurable:true,writable:true,value:g}):n[s]=g;var bt=(n,s,g)=>$i(n,typeof s!="symbol"?s+"":s,g);var Le=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 M=(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 Ae="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",zt="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"}}),Qi=({data:n,dates:s})=>{let g=Le(s[0])===Le(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:Ae}),u.createElement(Text,{style:{fontSize:13,marginBottom:2}},"Puja List"),u.createElement(Text,{style:{fontSize:10,marginBottom:10}},"Date",":"," ",g?Le(s[0]):`${Le(s[0])} - ${Le(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)),g?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},Le(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=Qi;Font.register({family:"Roboto",fontWeight:"normal",src:at});Font.register({family:"Roboto",fontWeight:"bold",src:gt});var pe=1,ot=25*pe,Bt=StyleSheet.create({page:{padding:10*pe,fontFamily:"Roboto"},pujaTile:{paddingVertical:10*pe,paddingHorizontal:10*pe,fontSize:ot,border:`${5*pe}px solid black`,borderRadius:5*pe,width:"100%",display:"flex",flexDirection:"column"}}),Ri=({data:n,dates:s})=>{let g=Le(s[0])===Le(s[1]);return u.createElement(Document,null,u.createElement(Page,{dpi:200,size:[457*pe],style:Bt.page},u.createElement(Image,{fixed:true,style:{height:55*pe,width:274*pe,marginBottom:10*pe,marginHorizontal:"auto"},src:Ae}),u.createElement(Text,{style:{fontSize:25*pe,marginBottom:5*pe,marginHorizontal:"auto"}},"Puja List"),u.createElement(Text,{style:{fontSize:20*pe,marginBottom:5*pe,marginHorizontal:"auto",fontWeight:"bold"}},"Date",":"," ",g?Le(s[0]):`${Le(s[0])} - ${Le(s[1])}`),u.createElement(Text,{style:{fontSize:17*pe,marginBottom:20*pe,marginHorizontal:"auto"}},"Printed at : ",new Date().toLocaleString()),u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"space-between",gap:15*pe}},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*pe}},u.createElement(Text,{style:{opacity:.6,marginRight:10*pe}},"#",(d+1).toString().padStart(2,"0")),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignItems:"flex-end",gap:10*pe}},l.paymentStatus=="pending"?u.createElement(View,{style:{backgroundColor:"#000000",paddingVertical:3*pe,paddingHorizontal:5*pe,borderRadius:5*pe,marginTop:3*pe}},u.createElement(Text,{style:{color:"#ffffff",fontSize:ot}},"Pending")):null,u.createElement(Text,{style:{fontWeight:"bold",fontSize:ot}},"Rs ",l.amount))),u.createElement(View,{style:{flexGrow:1}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",marginBottom:3*pe,gap:3*pe}},u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantName),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},"-"),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.participantNakshatra)),u.createElement(View,{style:{display:"flex",flexDirection:"column",alignContent:"flex-end",gap:10*pe}},u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap",alignContent:"flex-end"}},u.createElement(Text,null,"Puja name : "),u.createElement(Text,{style:{fontSize:ot,fontWeight:"bold"}},l.pujaName)),g?null:u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end"}},u.createElement(Text,null,"Date: "),u.createElement(Text,{style:{fontWeight:"bold"}},Le(l.date)))),u.createElement(View,{style:{display:"flex",flexDirection:"row",alignContent:"flex-end",gap:10*pe}}),l.priestNote!==""&&l.priestNote!==null&&l.priestNote!==void 0?u.createElement(View,{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginTop:3*pe}},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 g=r=>{let t=maxBy(Object.entries(io),([i,p])=>{let P=r.match(p);return P?P.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 x=r=>{let t=[],i=null,p="";for(let P of r){P=d(P);let Z=g(P);Z!==i?(p&&t.push({text:p,script:i}),i=Z,p=P):p+=P;}return p&&t.push({text:p,script:i}),t},m=[];s&&typeof s=="string"&&!Array.isArray(s)&&!l(s)&&x(s).forEach((t,i)=>{let p=t.script==="Latin"||!t.script?"Noto Sans":`Noto Sans ${t.script}`;m.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},m?.length?m:s)},e=oo;var no=({startDate:n,endDate:s,reportTiming:g,templeName:l,reportName:d,showGeneratedAt:x=true})=>u.createElement(u.Fragment,null,u.createElement(Image,{fixed:true,style:{height:15,width:75,marginBottom:5},src:Ae}),x&&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()),g&&Object.keys(Tt).includes(g)?u.createElement(e,{style:{fontSize:11,marginTop:5,textAlign:"right"}},Tt[g]," Report"):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold"}},d),u.createElement(e,{style:{fontSize:12}},`${l}`)),k=no;var po=({startDate:n,endDate:s,templeName:g,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(k,{startDate:n,endDate:s,templeName:g,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((x,m)=>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,m+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,x.name)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,x.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:g,data:l,isDayWiseGrouped:d,dayWiseTotals:x,summary:m})=>{let a=m?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=m?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=m?.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(k,{startDate:n,endDate:s,reportName:"Transactions Report",templeName:g}),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&&x&&x.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"))),x.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"))))},Lt=mo;var yo=({children:n,splitat:s})=>{if(!n||typeof n!="string")return null;let g="";return s=="words"&&(g=" "),u.createElement(u.Fragment,null,u.createElement(View,{style:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},n.split(g).map((l,d)=>u.createElement(u.Fragment,null,u.createElement(e,{key:d},l,s=="words"?" ":"")))))},$=yo;var wo=({startDate:n,endDate:s,templeName:g,data:l,isDayWiseGrouped:d,dayGroups:x})=>{let m=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(m),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($,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(k,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:g}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},d&&x&&x.length>0?u.createElement(u.Fragment,null,x.map((t,i)=>{let p=t.items.map(m);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((P,Z)=>r(P,Z)))})):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")))},_t=wo;var To=({startDate:n,endDate:s,templeName:g,data:l,reportTiming:d,isDayWiseGrouped:x,dayGroups:m,isEmbed:a=false})=>{l.sort((p,P)=>p.invoiceNumber.localeCompare(P.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,P)=>u.createElement(View,{key:P,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,P+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(k,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:g,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}},x&&m&&m.length>0?u.createElement(u.Fragment,null,m.map((p,P)=>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((Z,L)=>t(Z,L))))):u.createElement(u.Fragment,null,r(),l.map((p,P)=>t(p,P)))):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)},yt=To;var Vo=({startDate:n,endDate:s,templeName:g,pujas:l,reportTiming:d,isDayWiseGrouped:x,isEmbed:m=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(k,{startDate:n,endDate:s,reportName:"Puja List",templeName:g,reportTiming:d}),u.createElement(e,{style:{fontSize:12,marginTop:100,textAlign:"center"}},"No data available for the selected date range"));return m?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(k,{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(P=>P.is_early_reminder&&!P.requires_coupon).map((P,Z)=>(o++,u.createElement(View,{key:`${p}-${Z}`,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,P.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"7%"}},u.createElement(e,null,P.collectionMode||"")),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"20%"}},u.createElement(e,null,P.date?new Date(P.date).toDateString():"")))))):null,u.createElement(e,{style:{fontSize:14,fontWeight:"bold",marginTop:20}},"Puja List"),u.createElement(e,{style:{fontSize:12}},`${g}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((i,p)=>{if(i.bookings.every(c=>c.is_early_reminder||c.requires_coupon))return null;a=0;let P=i.bookings.some(c=>c.topping_name),Z=x&&i.dayGroups&&i.dayGroups.length>0,L=(c=false)=>P?u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:c?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:"none",fontWeight:"semibold",width:"31%"}},u.createElement(e,null,"Offerings"))):u.createElement(View,{fixed:true,style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:c?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"))),ae=(c,Fe,ce)=>c.is_early_reminder||c.requires_coupon?null:P?u.createElement(View,{key:Fe,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,ce)),u.createElement(View,{style:{padding:6,fontSize:7,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,c.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,c.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,c.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:"31%"}},u.createElement(e,null,c.topping_name||""))):u.createElement(View,{key:Fe,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,ce)),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,c.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,c.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,c.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,c.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,c.collectionMode||""))),c.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,c.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}`),!Z&&L(true)),Z?u.createElement(u.Fragment,null,i.dayGroups.map((c,Fe)=>{let ce=0,lt=c.items.filter(pt=>!pt.is_early_reminder&&!pt.requires_coupon);return lt.length===0?null:u.createElement(View,{key:c.dateKey,style:{marginTop:Fe>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"}},c.dateDisplay),u.createElement(e,{style:{fontSize:9}},`${lt.length} booking${lt.length!==1?"s":""}`)),L(false),lt.map((pt,ci)=>(ce++,ae(pt,ci,ce))))})):u.createElement(u.Fragment,null,i.bookings.map((c,Fe)=>c.is_early_reminder||c.requires_coupon?null:(a++,ae(c,Fe,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:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10,gap:15}},(()=>{let i=l.flatMap(P=>P.bookings.filter(Z=>Z.requires_coupon).map(Z=>({...Z,pujaName:P.name}))),p={};for(let P of i)p[P.invoiceNumber]||(p[P.invoiceNumber]=[]),p[P.invoiceNumber].push(P);return Object.entries(p).map(([P,Z],L)=>{let ae=Z,c=ae[0];return u.createElement(View,{key:P,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"}},P),u.createElement(e,null,c.date?new Date(c.date).toDateString():n.toDateString())),u.createElement(e,null,c.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),ae.map((Fe,ce)=>u.createElement(View,{key:ce,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${Fe.devoteeName} ----- ${Fe.nakshatra} ----- ${Fe.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 m?t:u.createElement(Document,null,t)},ft=Vo;var Po=({templeName:n,startDate:s,endDate:g,pujas:l,reportTiming:d})=>{let x=l.sort((m,a)=>{let o=m.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(k,{startDate:s,endDate:g,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:20}},x.map((m,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"}},`${m.name} - ${m.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"))),m.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:g,data:l,isEmbed:d=false})=>{let x=u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:g}),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 m=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,P=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&&P?u.createElement(Image,{src:P,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,m.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) - ",m.length),r(m)),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?x:u.createElement(Document,null,x)},xt=No;var Bo=({startDate:n,endDate:s,templeName:g,pujaData:l,prasadData:d,deliveryData:x,reportTiming:m})=>{x=x.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&&x.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportTiming:m,reportName:"Combined Report",templeName:g}),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&&ft({startDate:n,endDate:s,templeName:g,pujas:l,isEmbed:true}),d.length>0&&yt({startDate:n,endDate:s,templeName:g,data:d,isEmbed:true}),x.length>0&&xt({startDate:n,endDate:s,templeName:g,data:x,isEmbed:true})))},$t=Bo;var jo=({startDate:n,endDate:s,data:g})=>u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{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"))),g?.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 _o=({startDate:n,endDate:s,templeName:g,data:l,isDayWiseGrouped:d,dayGroups:x})=>{let m=()=>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(k,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:g}),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&&x&&x.length>0?u.createElement(u.Fragment,null,x.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)),m(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,m(),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=_o;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,g)=>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,g)=>u.createElement(e,{key:g,style:{fontSize:10}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:10}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:10}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:8}},g+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:g,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:g}),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,x)=>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,x+1)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement($,null,d.invoiceNo)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement($,null,d.amount)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement($,null,d.paymentDate)),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"20%"}},u.createElement($,null,d.settlementDate)),u.createElement(View,{style:{padding:6,borderRight:"none",width:"25%"}},u.createElement($,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Ut=Ho;var Qo=({startDate:n,endDate:s,templeName:g,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:g}),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,x)=>u.createElement(View,{key:x,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,x+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.baseAmount)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.platformFees)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.platformFeesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.gatewayCharges)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.paymentMode)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement($,null,d.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"9%",fontSize:7}},u.createElement($,null,d.settlementDate)),u.createElement(View,{style:{padding:3,width:"12%"}},u.createElement($,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range")))),Qt=Qo;var Yo=({startDate:n,endDate:s,templeName:g,data:l,dayGroups:d,summary:x})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:g}),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 m=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=m.get(o.name)||{quantity:0,amount:0};m.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(m.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,M(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 m=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=m.get(o.name)||{quantity:0,amount:0};m.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(m.values()).reduce((a,o)=>a+o.quantity,0)})())),u.createElement(View,{style:{padding:6,borderRight:"none",width:"35%"}},u.createElement(e,{style:{fontWeight:"bold"}},M((()=>{let m=new Map;return d.forEach(a=>{a.items.forEach(o=>{let r=m.get(o.name)||{quantity:0,amount:0};m.set(o.name,{quantity:r.quantity+o.quantity,amount:r.amount+(o.amount||0)});});}),Array.from(m.values()).reduce((a,o)=>a+o.amount,0)})())))),d.some(m=>m.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 Charges")),u.createElement(View,{style:{padding:6,borderRight:"1px solid #000",width:"15%"}},u.createElement(e,null,(()=>{let m=d.filter(o=>o.postalChargesBreakup).map(o=>o.postalChargesBreakup);if(m.length===0)return "";let a=[0,0,0];return m.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"}},M(d.reduce((m,a)=>m+(a.dayPostalTotal||0),0))))),d.some(m=>m.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 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"}},M(d.reduce((m,a)=>m+(a.dayPostalTempleFees||0),0))))),(()=>{let m=new Map;return d.forEach(a=>{a.otherChargesBreakup?.forEach(o=>{let r=m.get(o.name)||{count:0,amount:0};m.set(o.name,{count:r.count+(o.count||0),amount:r.amount+o.amount});});}),m.size===0?null:Array.from(m.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"}},M(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"}},M((()=>{let m=new Map;d.forEach(t=>{t.items.forEach(i=>{let p=m.get(i.name)||{quantity:0,amount:0};m.set(i.name,{quantity:p.quantity+i.quantity,amount:p.amount+(i.amount||0)});});});let a=Array.from(m.values()).reduce((t,i)=>t+i.amount,0),o=d.reduce((t,i)=>t+(i.dayPostalTotal||0),0),r=d.reduce((t,i)=>{let p=i.otherChargesBreakup?.reduce((P,Z)=>P+Z.amount,0)||0;return t+p},0);return a+o+r})()))))):null,d&&d.length>0&&u.createElement(View,null,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((m,a)=>u.createElement(View,{key:m.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"}},m.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"))),m.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,M(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,m.items.reduce((o,r)=>o+r.quantity,0))),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,M(m.dayPujaTotal)))),m.dayPostalTempleFees||m.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,m.postalChargesBreakup?`${m.postalChargesBreakup.map(o=>o||0).join("+")}`:"")),u.createElement(View,{style:{padding:6,borderRight:"none",width:"20%"}},u.createElement(e,null,M(m.dayPostalCarrierFees)))),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,M(m.dayPostalTempleFees))))):null,m.otherChargesBreakup?.length?u.createElement(u.Fragment,null,m.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,M(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,M(m.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:g,reportTiming:l})=>{return !g||g.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")),g.map((x,m)=>{let a=x.bookings.filter(o=>!o.is_early_reminder&&!o.requires_coupon);return a.length===0?null:u.createElement(View,{key:m,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"}},x.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:g,reportTiming:l,isDayWiseGrouped:d,dayGroups:x})=>{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 m=g.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}},m.length," item",m.length>1?"s":"")),d&&x&&x.length>0?u.createElement(u.Fragment,null,x.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,m.map((o,r)=>a(o,r)))))},ei=Xo;var Ro=({startDate:n,templeName:s,data:g,isDayWiseGrouped:l,dayGroups:d})=>{let x=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}},m=g.map(x);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 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}},m.length," delivery",m.length>1?" items":" item")),l&&d&&d.length>0?u.createElement(u.Fragment,null,d.map((o,r)=>{let t=o.items.map(x);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,m.map((o,r)=>a(o,r)))))},oi=Ro;var er=({startDate:n,templeName:s,pujaData:g,prasadData:l,deliveryData:d,reportTiming:x})=>{if(g.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,g.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()),x&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},x.charAt(0).toUpperCase()+x.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")),g.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()),x&&u.createElement(e,{style:{fontSize:11,textAlign:"center",marginTop:2}},x.charAt(0).toUpperCase()+x.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:g})=>!g||g.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}},g.length," label",g.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")),g.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:g,pujas:l,reportTiming:d,selectedPujaNames:x=[]})=>{let m=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(k,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:g,reportTiming:d}),x.length>0&&u.createElement(View,{style:{marginTop:10,marginBottom:10}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",x.join(", "))),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(k,{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")),x.length>0&&u.createElement(View,{style:{marginTop:10,marginBottom:5}},u.createElement(e,{style:{fontSize:10,fontWeight:"semibold"}},"Selected Pujas: ",x.join(", "))),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}},`${g}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:10}},l.map((r,t)=>r.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(m=0,u.createElement(View,{key:t,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"}},`${r.name} - ${r.bookings.length}`)),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:"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"))),r.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(m++,u.createElement(View,{key:p,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,m)),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:10,borderRight:"1px solid black",width:`${20*1.11111}%`}},u.createElement(e,null,i.invoiceNumber)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,i.devoteeName)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,i.nakshatra)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:6,fontSize:10,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,i.collectionMode||""))),i.priestNote&&u.createElement(View,{style:{padding:6,fontSize:10,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,i.priestNote))))))))))),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:Ae}),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],P)=>{let Z=p,L=Z[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,L.date?new Date(L.date).toDateString():n.toDateString())),u.createElement(e,null,L.phone_number)),u.createElement(View,{style:{height:15,width:"100%"}}),Z.map((ae,c)=>u.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:25}},u.createElement(e,null,`${ae.devoteeName} ----- ${ae.nakshatra} ----- ${ae.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:g,reportTiming:l,selectedPujaNames:d=[]})=>{return !g||g.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(", "))),g.map((m,a)=>{let o=m.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"}},m.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,g=0,l=0;for(let d of n.items)d.paymentMethod!="INTERNATIONAL_CARD"&&d.platformFees>0&&(s+=d.platformFees,g+=d.platformFeesGST);return l=g+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:Ae}),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:"15%"}},u.createElement(Text,null,"Booking Date")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"Platform Fees")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,"Plt Fees GST")),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,"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:"19%"}},u.createElement(Text,null,"Transaction ID")))),n.items.map((d,x)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid #000",borderTop:"none",fontSize:8,backgroundColor:`${d.platformFees==0||d.paymentMethod=="INTERNATIONAL_CARD"?"#fffca6":""}`}},u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"5%"}},u.createElement(Text,null,x+1)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,d.invoiceNumber)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"15%"}},u.createElement(Text,null,d.bookingDate)),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,M(d.platformFees))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,M(d.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,M(d.platformFees+d.platformFeesGST))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,d.paymentMethod.replace("INTERNATIONAL_CARD","INT CARD"))),u.createElement(View,{style:{padding:3,width:"19%"}},u.createElement(Text,null,d.transactionID)))),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:"15%"}}),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,M(s))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"10%"}},u.createElement(Text,null,M(g))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}},u.createElement(Text,null,M(l))),u.createElement(View,{style:{padding:3,borderRight:"1px solid #000",width:"12%"}}),u.createElement(View,{style:{padding:3,width:"19%"}})),u.createElement(View,{style:{marginTop:10,fontSize:12}},u.createElement(Text,null,"Total Payable: ",M(l)))))},yi=dr;var gr=({startDate:n,endDate:s,templeName:g,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(k,{startDate:n,endDate:s,templeName:g,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((x,m)=>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,m+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"60%"}},u.createElement(e,null,x.name)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"20%"}},u.createElement(e,null,x.quantity))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),fi=gr;var yr=({startDate:n,endDate:s,templeName:g,data:l,isDayWiseGrouped:d,dayWiseTotals:x,summary:m})=>{let a=m?.totalBookingsAmount??l.reduce((t,i)=>i.status==="cancelled"?t:t+i.bookingAmount,0),o=m?.totalPostalCharges??l.reduce((t,i)=>i.status==="cancelled"?t:t+(i.postalCharges||0),0),r=m?.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(k,{startDate:n,endDate:s,reportName:"Transactions Report",templeName:g}),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&&x&&x.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"))),x.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=yr;var wr=({startDate:n,endDate:s,templeName:g,data:l,isDayWiseGrouped:d,dayGroups:x})=>{let m=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(m),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($,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($,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(k,{startDate:n,endDate:s,reportName:"Prasad Delivery Address",templeName:g}),a.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},d&&x&&x.length>0?u.createElement(u.Fragment,null,x.map((t,i)=>{let p=t.items.map(m);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((P,Z)=>r(P,Z)))})):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:g,data:l,reportTiming:d,isDayWiseGrouped:x,dayGroups:m})=>{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(k,{startDate:n,endDate:s,reportName:"Prasad Report",templeName:g,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}},x&&m&&m.length>0?u.createElement(u.Fragment,null,m.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,P)=>r(p,P))))):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:g,pujas:l,reportTiming:d,isDayWiseGrouped:x})=>{let m=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(k,{startDate:n,endDate:s,reportName:"Puja List",templeName:g,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(k,{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}},`${g}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>{if(r.bookings.every(L=>L.is_early_reminder||L.requires_coupon))return null;m=0;let i=r.bookings.some(L=>L.topping_name),p=x&&r.dayGroups&&r.dayGroups.length>0,P=(L=false)=>i?u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:L?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:"none",fontWeight:"semibold",width:"31%"}},u.createElement(e,null,"Offerings"))):u.createElement(View,{style:{display:"flex",flexDirection:"row",border:"1px solid black",borderTop:L?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"))),Z=(L,ae,c)=>L.is_early_reminder||L.requires_coupon?null:i?u.createElement(View,{key:ae,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,c)),u.createElement(View,{style:{padding:4,fontSize:6,borderRight:"1px solid black",width:"12%"}},u.createElement(e,null,L.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"30%"}},u.createElement(e,null,L.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:"22%"}},u.createElement(e,null,L.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:"31%"}},u.createElement(e,null,L.topping_name||""))):u.createElement(View,{key:ae,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,c)),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,L.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,L.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,L.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,L.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,L.collectionMode||""))),L.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,L.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&&P(true)),p?u.createElement(u.Fragment,null,r.dayGroups.map((L,ae)=>{let c=0,Fe=L.items.filter(ce=>!ce.is_early_reminder&&!ce.requires_coupon);return Fe.length===0?null:u.createElement(View,{key:L.dateKey,style:{marginTop:ae>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"}},L.dateDisplay),u.createElement(e,{style:{fontSize:8}},`${Fe.length} booking${Fe.length!==1?"s":""}`)),P(false),Fe.map((ce,lt)=>(c++,Z(ce,lt,c))))})):u.createElement(u.Fragment,null,r.bookings.map((L,ae)=>L.is_early_reminder||L.requires_coupon?null:(m++,Z(L,ae,m)))))}))),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:Ae}),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],P)=>{let Z=p,L=Z[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,L.date?new Date(L.date).toDateString():n.toDateString())),u.createElement(e,null,L.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),Z.map((ae,c)=>u.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${ae.devoteeName} ----- ${ae.nakshatra} ----- ${ae.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:g,pujas:l,reportTiming:d})=>{let x=l.sort((m,a)=>{let o=m.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(k,{startDate:s,endDate:g,reportTiming:d,reportName:"Puja Summary",templeName:n}),l.length>0?u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:15}},x.map((m,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"}},`${m.name} - ${m.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"))),m.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 zr=({startDate:n,endDate:s,templeName:g,pujaData:l,prasadData:d,deliveryData:x,reportTiming:m})=>{x=x.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&&x.length==0?u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportTiming:m,reportName:"Combined Report",templeName:g}),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(k,{startDate:n,endDate:s,reportTiming:m,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,P)=>(o++,u.createElement(View,{wrap:false,key:`${i}-${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,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}},`${g}`),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,P)=>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:Ae}),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8,gap:12}},(()=>{let t=l.flatMap(p=>p.bookings.filter(P=>P.requires_coupon).map(P=>({...P,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,P],Z)=>{let L=P,ae=L[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,ae.date?new Date(ae.date).toDateString():n.toDateString())),u.createElement(e,null,ae.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),L.map((c,Fe)=>u.createElement(View,{key:Fe,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${c.devoteeName} ----- ${c.nakshatra} ----- ${c.pujaName}`))))})})())),d.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportTiming:m,reportName:"Prasad Report",templeName:g}),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)))))),x.length>0&&u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportTiming:m,reportName:"Prasad Delivery Postal Report",templeName:g}),u.createElement(View,{style:{display:"flex",flexDirection:"row",marginTop:15,width:"100%",gap:15,flexWrap:"wrap"}},x&&x.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($,{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=zr;var Nr=({startDate:n,endDate:s,data:g})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{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"))),g?.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:g,data:l,isDayWiseGrouped:d,dayGroups:x})=>{let m=()=>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(k,{startDate:n,endDate:s,reportName:"Settlements Report",templeName:g}),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&&x&&x.length>0?u.createElement(u.Fragment,null,x.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)),m(),o.items.map((t,i)=>a(t,i))))):u.createElement(u.Fragment,null,m(),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")))},Ai=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,g)=>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,g)=>u.createElement(e,{key:g,style:{fontSize:8}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:8}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:8}},g+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,g)=>u.createElement(e,{key:g,style:{fontSize:7}},g+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")))),zi=Er;var Mr=({startDate:n,endDate:s,templeName:g,data:l})=>u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Prasad Delivery Postal Report",templeName:g}),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"),x=l.filter(o=>o.deliveryMode==="international-post"),m=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($,{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)),x.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) - ",x.length),a(x)),m.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) - ",m.length),a(m)))})()):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:g,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Payment Settlement Report",templeName:g}),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,x)=>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,x+1)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement($,null,d.invoiceNo)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"15%"}},u.createElement($,null,d.amount)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement($,null,d.paymentDate)),u.createElement(View,{style:{padding:4,borderRight:"1px solid #000",width:"20%"}},u.createElement($,null,d.settlementDate)),u.createElement(View,{style:{padding:4,borderRight:"none",width:"25%"}},u.createElement($,null,d.bankUtrNo))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ci=Hr;var Qr=({startDate:n,endDate:s,templeName:g,data:l})=>u.createElement(u.Fragment,null,u.createElement(Document,null,u.createElement(Page,{size:"A5",style:{padding:20,fontFamily:"Noto Sans"}},u.createElement(k,{startDate:n,endDate:s,reportName:"Invoice Level Breakup",templeName:g}),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,x)=>u.createElement(View,{key:x,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,x+1)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.invoiceNumber)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.baseAmount)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.platformFees)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.platformFeesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.gatewayCharges)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.gatewayChargesGST)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%"}},u.createElement($,null,d.paymentMode)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement($,null,d.bookingDate)),u.createElement(View,{style:{padding:2,borderRight:"1px solid #000",width:"9%",fontSize:5}},u.createElement($,null,d.settlementDate)),u.createElement(View,{style:{padding:2,width:"12%"}},u.createElement($,null,d.utrNumber))))):u.createElement(e,{style:{fontSize:14,textAlign:"center",marginTop:80}},"No data available for the selected date range")))),Ni=Qr;var Yr=({startDate:n,endDate:s,templeName:g,data:l,dayGroups:d,summary:x})=>{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(k,{startDate:n,endDate:s,reportName:"Puja Count Summary Report",templeName:g}),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,M(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"}},M((()=>{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.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 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"}},M(d.reduce((a,o)=>a+(o.dayPostalTotal||0),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 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"}},M(d.reduce((a,o)=>a+(o.dayPostalTempleFees||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"}},M(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"}},M((()=>{let a=new Map;d.forEach(i=>{i.items.forEach(p=>{let P=a.get(p.name)||{quantity:0,amount:0};a.set(p.name,{quantity:P.quantity+p.quantity,amount:P.amount+(p.amount||0)});});});let o=Array.from(a.values()).reduce((i,p)=>i+p.amount,0),r=d.reduce((i,p)=>i+(p.dayPostalTotal||0),0),t=d.reduce((i,p)=>{let P=p.otherChargesBreakup?.reduce((Z,L)=>Z+L.amount,0)||0;return i+P},0);return o+r+t})()))))):null,d&&d.length>0&&u.createElement(View,null,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,M(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,M(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,M(a.dayPostalCarrierFees)))),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,M(a.dayPostalTempleFees))))):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,M(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,M(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:g,pujas:l,reportTiming:d,selectedPujaNames:x=[]})=>{let m=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(k,{startDate:n,endDate:s,reportName:"Custom Puja Report",templeName:g,reportTiming:d}),x.length>0&&u.createElement(View,{style:{marginTop:8,marginBottom:8}},u.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",x.join(", "))),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(k,{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")),x.length>0&&u.createElement(View,{style:{marginTop:8,marginBottom:4}},u.createElement(e,{style:{fontSize:9,fontWeight:"semibold"}},"Selected Pujas: ",x.join(", "))),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}},`${g}`),u.createElement(View,{style:{display:"flex",flexDirection:"column",marginTop:8}},l.map((r,t)=>r.bookings.every(i=>i.is_early_reminder||i.requires_coupon)?null:(m=0,u.createElement(View,{key:t,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"}},`${r.name} - ${r.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:"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"))),r.bookings.map((i,p)=>i.is_early_reminder||i.requires_coupon?null:(m++,u.createElement(View,{key:p,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,m)),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,i.invoiceNumber)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${30*1.11111}%`}},u.createElement(e,null,i.devoteeName)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${23*1.11111}%`}},u.createElement(e,null,i.nakshatra)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"1px solid black",width:`${10*1.11111}%`}},u.createElement(e,null,i.quantity)),u.createElement(View,{style:{padding:4,fontSize:9,borderRight:"none",width:`${7*1.11111}%`}},u.createElement(e,null,i.collectionMode||""))),i.priestNote&&u.createElement(View,{style:{padding:4,fontSize:9,borderTop:"1px solid black",width:"100%"}},u.createElement(e,null,i.priestNote))))))))))),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:Ae}),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],P)=>{let Z=p,L=Z[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,L.date?new Date(L.date).toDateString():n.toDateString())),u.createElement(e,null,L.phone_number)),u.createElement(View,{style:{height:10,width:"100%"}}),Z.map((ae,c)=>u.createElement(View,{key:c,style:{display:"flex",flexDirection:"row",marginTop:18}},u.createElement(e,null,`${ae.devoteeName} ----- ${ae.nakshatra} ----- ${ae.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:g,data:l,reportTiming:d})=>{let x=l[0].shares.length,m=50/(x||1),a=0,o=0,r=new Array(x).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(k,{startDate:n,endDate:s,reportTiming:d,reportName:"Share Report",templeName:g}),l.length<=0?u.createElement(e,{style:{fontSize:18,textAlign:"center",marginTop:100}},"No data available for the selected date range"):null,l.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[0].shares.map((t,i)=>u.createElement(View,{style:{width:`${m}}%`,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.map((t,i)=>(a+=t.count,o+=t.total,t.shares.forEach((p,P)=>{r[P]+=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}},M(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,P)=>u.createElement(View,{style:{width:`${m}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},M(p.value)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},M(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:`${m}}%`,borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},M(t)))),u.createElement(View,{style:{width:"9%",borderLeft:"1px solid black",padding:4}},u.createElement(e,{style:{fontSize:8}},M(o))))),u.createElement(View,{style:{display:"flex",flexDirection:"column",gap:2,marginTop:20}},r.map((t,i)=>u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"25%",justifyContent:"space-between"}},u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},l[0].shares[i].key)),u.createElement(View,null,u.createElement(e,{style:{fontSize:8}},M(t))))),u.createElement(View,{style:{display:"flex",flexDirection:"row",width:"25%",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}},M(o)))))):null)))},Wi=tn;var nn=n=>{let s=0,g=0;return n.data.items.forEach(l=>{s+=l.quantity,g+=l.total;}),u.createElement(Document,null,u.createElement(Page,{size:"A4",style:{padding:30,fontFamily:"Noto Sans"}},u.createElement(k,{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," ="," ",M(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,M(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,M(g)))))))},ji=nn;var _i={kitchen:{A4:Et,A5:fi},transaction:{A4:Lt,A5:xi},"prasad-delivery":{A4:_t,A5:wi,"110mm":oi},prasad:{A4:yt,A5:hi,"110mm":ei},"puja-detailed":{A4:ft,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:Ai},invoice:{A4:Kt,A5:zi},"postal-report":{A4:xt,A5:ki,"110mm":di},"payment-settlement-report":{A4:Ut,A5:Ci},"invoice-breakup":{A4:Qt,A5:Ni},"puja-count":{A4:Gt,A5:Fi},"custom-report":{A4:ai,A5:vi,"110mm":ui},"invoice-recon":{A4:yi},"share-report":{A4:Wi},"advance-goods":{A4:ji}},qi=class{constructor(s,g){bt(this,"option");bt(this,"size");this.option=s,this.size=g,[{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:x})=>Font.register({family:d,src:x})),Font.register({family:"Noto Sans",fontWeight:"normal",src:zt}),Font.register({family:"Noto Sans",fontWeight:"bold",src:kt}),Font.register({family:"Noto Sans",fontWeight:"semibold",src:Ct});}async print(s){let l=_i[this.option][this.size],d=u.createElement(l,{...s}),x=pdf(d).toBlob();return x.then(m=>{var a=URL.createObjectURL(m);if(window!=null){let o=window.open(a,"_blank");setTimeout(()=>{o?.print();},1e3);}}),x}async getBlob(s){let l=_i[this.option][this.size],d=u.createElement(l,{...s});return pdf(d).toBlob()}};
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.49",
4
+ "version": "0.4.50",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",