@bookipi/htmlgenerator 1.1.25-alpha11 → 1.1.26-alpha11

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.
@@ -9401,7 +9401,7 @@ var en = (_terms$privacy$firstn = {
9401
9401
  supplier_details: "Supplier Details",
9402
9402
  customer_details: "Customer Details",
9403
9403
  effective_date: "Dated:"
9404
- }, _terms$privacy$firstn["start_date"] = "Start Date:", _terms$privacy$firstn["end_date"] = "End Date:", _terms$privacy$firstn.supplier_empty = "No supplier added yet.", _terms$privacy$firstn.customer_empty = "No customer added yet.", _terms$privacy$firstn.details_line_3 = "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.", _terms$privacy$firstn.kind_regards = "Kind regards,", _terms$privacy$firstn.services_title = "Services", _terms$privacy$firstn["total"] = "Total:", _terms$privacy$firstn.items_empty = "No services added yet.", _terms$privacy$firstn.agreement_title = "Terms and Conditions", _terms$privacy$firstn["signature"] = "Signature", _terms$privacy$firstn.proposal_id = "Proposal ID:", _terms$privacy$firstn.client = "Client:", _terms$privacy$firstn.email_addresses = "Email address:", _terms$privacy$firstn.ip = "IP:", _terms$privacy$firstn.time = "Time:", _terms$privacy$firstn);
9404
+ }, _terms$privacy$firstn["start_date"] = "Start Date:", _terms$privacy$firstn["end_date"] = "End Date:", _terms$privacy$firstn.supplier_empty = "No supplier added yet.", _terms$privacy$firstn.customer_empty = "No customer added yet.", _terms$privacy$firstn.details_line_3 = "Please accept this proposal and terms of service. This creates a legally binding contract between us. At any time if you have any questions please contact us on the details above. These terms will be effective throughout the period of our engagement and may only be changed by the Parties' agreement in writing.", _terms$privacy$firstn.kind_regards = "Kind regards,", _terms$privacy$firstn.services_title = "Billing Schedule", _terms$privacy$firstn["total"] = "Total:", _terms$privacy$firstn.items_empty = "No services added yet.", _terms$privacy$firstn.agreement_title = "Terms and Conditions", _terms$privacy$firstn["signature"] = "Signature", _terms$privacy$firstn.proposal_id = "Proposal ID:", _terms$privacy$firstn.client = "Client:", _terms$privacy$firstn.email_addresses = "Email address:", _terms$privacy$firstn.ip = "IP:", _terms$privacy$firstn.time = "Time:", _terms$privacy$firstn);
9405
9405
 
9406
9406
  var FormatCurrency$1 = index.FormatCurrency;
9407
9407
 
@@ -9689,10 +9689,10 @@ var invoiceHtmlWithDetails = (function (_ref) {
9689
9689
 
9690
9690
  var signatureContainer = document.sd ? "\n <div class=\"col-6\" style=\"text-align: center\">\n <strong>" + (company ? company.c : "") + "</strong>\n <div style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\">\n " + (signatureBase64 ? "<img src=\"" + signatureBase64 + "\" class=\"signature-img\" onerror=\"this.style.display='none'\" />" : "") + "\n </div>\n <div style=\"font-size:16px\">" + (document.sd ? formatDate(document.sd) : "") + "</div>\n </div>" : "";
9691
9691
  var clientSignature = document.cs || customerSignBase64 ? "\n <div class=\"col-6\" style=\"text-align: center\">\n <strong>" + (customer ? customer.c : "") + "</strong>\n <div style=\"height:100px;border-bottom:2px solid #dee2e6; margin-right:40px; margin-left:40px\">\n " + (customerSignBase64 ? "<img src=\"" + customerSignBase64 + "\" class=\"signature-img\" onerror=\"this.style.display='none'\" />" : "") + "\n </div>\n <div style=\"font-size:16px\">" + (customerSignBase64 ? formatDate(new Date()) : "( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp)") + "</div>\n </div>" : "";
9692
- var numOfRowsPaymentInstruction = (1 + (document.dc ? 1 : 0) + (document.sp && !document.sntx ? 1 : 0) + (document.tx != 0 ? 1 : 0) + (document.ttx && document.tx2 != 0 ? 1 : 0) + (document.sp && document.sntx ? 1 : 0) + (document.ti ? 1 : 0) + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? 1 : 0) + (document.sca ? 1 : 0) + (((_document$pm = document.pm) === null || _document$pm === void 0 ? void 0 : _document$pm.length) || 0) + (document.hangingAmount && document.hangingAmount > 0 ? 1 : 0)).toString();
9692
+ var numOfRowsPaymentInstruction = (1 + (document.dc ? 1 : 0) + (document.sp && !document.sntx ? 1 : 0) + (document.tx != 0 ? 1 : 0) + (document.ttx && document.tx2 != 0 ? 1 : 0) + (document.sp && document.sntx ? 1 : 0) + (document.ti ? 1 : 0) + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? 1 : 0) + (document.sca ? 1 : 0) + (((_document$pm = document.pm) === null || _document$pm === void 0 ? void 0 : _document$pm.length) || 0) + (document.hangingAmount && document.hangingAmount > 0 ? 1 : 0) + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? 1 : 0)).toString();
9693
9693
  var paymentInstructionDetails = "\n " + (paymentOn ? "<h2 style=\"margin-top: 0; font-size: 18px; font-weight: 700;\">" + (company.r_pi ? company.r_pi : lang["payment_instruction"]) + "</h2>" : "") + "\n " + (paymentOn && company.p1 ? company.p1 + "<br>" : "") + "\n " + (paymentOn && company.p2 ? company.p2 + "<br>" : "") + "\n " + (paymentOn && company.p3 ? company.p3 + "<br>" : "") + "\n ";
9694
9694
  var bookipayLinkComponent = bookipayLink && document.ty === 1 && document.ad >= 0.01 ? "<div class=\"invoice-price-left-container " + (hidePayBtnInScreen ? "noInScreen" : "") + "\" style=\"margin-right:60px\">\n <div style=\"margin-bottom: 7px;\">\n <img class=\"card-image\" alt=\"visa\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAABQCAYAAADRAH3kAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN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vehB9pkfpoZBKPJ7nzmI2zZmC4qZOn2Un6NR4PHUUJYGBchlv4cUbMqKC8bfvzeVJv5NCtfh43QLc/9ccWEkaxU2dHgngSX0TIJeybZALJHnjNSr2vNnueKPInzb7Shh1KjkWx4bhlexUxOgDPLbdlQc9mBiBV7JnQK+SD3ozaNCKoOGGXC4f0m4gwzCw2+1+bwZxdXvsc9mHfs9V/0jDYHcDh10T+HXB5XzX37EEb5HsGxUBhjr6ByMIGWg4f/R4d0Pj6O99hiofG5ImcLgxnGrYwRrGn+vull6PGelvB4sYHRAJIBJAhEgAESIBRIgEECESQIRIABEiAUSIBBAhEkCESAARIgFEiAQQIRJAxGgnQJ9oijGHPi4BTor2GHM4CfRLwmIBFAIIFe0yJmAAkKlUKmskAKBSqWoAZAI4DMAk2mfUwuT0cabT544IIGLs4t8DABFd1eolwC4WAAAAAElFTkSuQmCC\">\n </div>\n <a href=\"" + bookipayLink + "\" class=\"btn bookipay-payment-pay-btn\">\n " + (lang["pay_online_now"] || "PAY ONLINE NOW") + "\n </a>\n " + (surcharge ? "<div class=\"surcharge\">" + (lang["impose_surcharge"] ? lang["impose_surcharge"](surcharge) : "A surcharge of " + surcharge + "% will be applied.") + "</div>" : "") + "\n </div>" : "";
9695
- var html = (!removeHtmlStandardDom ? '<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <title>Invoice</title>' : "") + "\n " + (isOffline ? "<style>" + bootstrapCss + "</style><style>" + fontawesomeCss + "</style>" : " <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\n <link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css\" rel=\"stylesheet\">") + "\n " + (!removeHtmlStandardDom ? "</head>" : "") + "\n <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n font-size: 18px;removeHtmlStandardDom\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n }\n .invoice-body {\n background: #fff;\n padding: 30px 50px;\n }\n\n .invoice-company {\n font-size: 20px\n }\n\n .invoice-header {\n /* margin: 0 -50px; */\n background: #f0f3f4;\n padding: 25px 50px;\n }\n .invoice-content {\n padding: 20px 38px 10px;\n }\n .invoice-date,\n .invoice-from,\n .invoice-to {\n /* display: table-cell; */\n /* width: 1% */\n }\n\n .table td, .table th {\n padding: .50rem .75rem;\n }\n\n .invoice-from,\n .invoice-to {\n padding-right: 20px\n }\n\n .invoice-date .date,\n .invoice-from strong,\n .invoice-to strong {\n font-size: 18px;\n font-weight: 600\n }\n\n .invoice-date {\n /* text-align: right; */\n padding-left: 15px\n }\n\n .invoice-price{\n /* background: #f0f3f4; */\n display: table;\n width: 100%\n }\n \n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n // padding: 20px 12px 16px;\n font-size: 20px;\n font-weight: 600;\n width: 70%;\n position: relative;\n vertical-align: middle\n }\n\n .invoice-price .invoice-price-row{\n display: table;\n float: left;\n }\n\n .invoice-price .invoice-price-right {\n width: 30%;\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n padding: 28px 12px 16px;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: 17px;\n font-weight: 700;\n background: #067EED;\n border: none;\n color: white;\n padding-top: 10px;\n padding-bottom: 10px;\n text-transform: uppercase;\n }\n\n .bookipay-payment-pay-btn:hover {\n background: #0571d6;\n color: #fff;\n }\n \n .invoice-price .invoice-price-right .bookipay-payment-with-span {\n font-size: 12px;\n margin-top: 13px;\n margin-bottom: 10px;\n font-size: 12px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n \n .invoice-price .invoice-price-right small {\n display: block;\n opacity: .7;\n position: absolute;\n top: 10px;\n left: 12px;\n font-size: 18px\n }\n \n .invoice-price .invoice-price-right span {\n display: block;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: 85%\n }\n\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n .table-inline-block{\n display: inline-block;\n }\n \n .page-not-break {\n page-break-before: auto; \n page-break-after: auto; \n page-break-inside: avoid;\n reak-before: auto; \n break-after: auto; \n break-inside: avoid;\n }\n\n @media print {\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n .mb-md-0 {margin-bottom:0;}\n .text-md-right{text-align: right;}\n .d-md-table-cell { display: table-cell!important; }\n .d-md-block { display: block !important; }\n .d-md-none {display: none !important;}\n @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n }\n body, page, html {\n /*width: 21cm; */\n /*margin: 0; */\n width: 100%;\n box-shadow: 0;\n background-color: #fff;\n display: block;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n }\n\n .no-print {\n display: none;\n }\n /* .invoice-body {\n padding:10;\n } */\n #invoice {\n " + (isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "") + "\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n }\n \n }\n \n .text-left{\n text-align: left;\n }\n .text-center{\n text-align: center;\n } \n .text-right{\n text-align: right;\n }\n\n @media only screen {\n #invoice {\n margin-top:10px;\n max-width:28cm;\n zoom: 0.8;\n box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);\n margin-right:auto;margin-left:auto;\n background: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n @media (min-width: 575.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .invoice-price-right{\n width: 290px !important;\n display: block !important;\n }\n .item-last {\n width: 30%\n }\n .invoice-body {\n padding: 30px\n }\n .invoice-header {\n padding: 20px 30px;\n }\n .invoice-content {\n padding: 18px;\n }\n .invoice-price .invoice-price-right {\n right: 18px;\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n /*border-top: 1px solid #dee2e6;*/\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n .table-invoice-header{\n background: #f0f3f4\n }\n .surcharge {\n margin-top: 3px;\n font-size: 12px;\n color: #999;\n }\n h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\n h2 {font-size:22px}\n .card-image {width:45px;}\n .seperate-line{\n border-top: 1px solid #dee2e6;\n margin-top: 20px;\n margin-bottom: 10px;\n }\n \n .signature-img{\n width:220px;\n margin-top:20px;\n max-height: -moz-calc(100% - 20px);\n max-height: -webkit-calc(100% - 20px);\n max-height: -o-cal(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n \n </style>\n " + (!removeHtmlStandardDom ? "<body>" : "") + "\n <div id=\"invoice\" class=\"print\">\n <div class=\"invoice-body\">\n <!-- begin invoice-company -->\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-6 mb-3 mb-md-0\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col-sm-12 col-md-6 text-md-right\">\n <h1>" + documentName + "</h1>\n <div class=\"text-inverse mb-1\" style=\"font-size: 20px;\">\n <strong>" + company.c + "</strong>\n </div>\n <address class=\"m-t-5 m-b-5\">\n <div class=\"mb-2\">\n " + (companyAddress.address1 ? "<div>" + companyAddress.address1 + "</div>" : "") + "\n " + (companyAddress.address2 ? "<div>" + companyAddress.address2 + "</div>" : "") + "\n " + (companyAddress.address3 ? "<div>" + companyAddress.address3 + "</div>" : "") + "\n " + (companyAddress.city || companyAddress.state || companyAddress.zip ? "<div>" + ((companyAddress.city ? companyAddress.city + " " : "") + (companyAddress.state ? companyAddress.state + " " : "") + (companyAddress.zip ? companyAddress.zip + " " : "")) + "</div>" : "") + "\n " + (companyAddress.country ? "<div>" + companyAddress.country + "</div>" : "") + "\n </div>\n " + (company.ai ? "<div>" + company.ai + "</div>" : "") + "\n " + (company.ph ? "<div>" + company.ph + "</div>" : "") + "\n " + (company.de ? "<div>" + company.de + "</div>" : "") + "\n " + (company.tfn ? "<div>" + ((company.bn ? company.bn : "Tax no.") + " : " + company.tfn) + "</div>" : "") + "\n </address>\n </div>\n </div>\n </div>\n <!-- end invoice-company -->\n <!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <strong>" + (company.r_bt ? company.r_bt : lang["bill_to"]) + "</strong>\n <div class=\"text-inverse mb-1\">\n <small style=\"font-size: 18px;\">" + (customer ? customer.c : "") + "</small>\n </div>\n <address class=\"m-t-5 m-b-5\">\n " + (customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : "") + "\n " + (customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : "") + "\n " + (customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : "") + "\n " + (customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + " " : "") + (customerAddress.state ? customerAddress.state + " " : "") + (customerAddress.zip ? customerAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerAddress.country ? "<div>" + customerAddress.country + "</div>" : "") + "\n " + (customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || "Tax no.") + " : " + customer.tfn : "") + "</div>" : "") + "\n " + (customer && customer.ph ? "<div>" + customer.ph + "</div>" : "") + "\n " + (customer && customer.ai ? "<div>" + customer.ai + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : lang.ship_to) + "</strong>" : "") + "\n " + (shippingAddressExists ? "\n <address class=\"m-t-5 m-b-5\">\n " + (customerShippingAddress.address1 ? "<div>" + customerShippingAddress.address1 + "</div>" : "") + "\n " + (customerShippingAddress.address2 ? "<div>" + customerShippingAddress.address2 + "</div>" : "") + "\n " + (customerShippingAddress.address3 ? "<div>" + customerShippingAddress.address3 + "</div>" : "") + "\n " + (customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip ? "<div>" + ((customerShippingAddress.city ? customerShippingAddress.city + " " : "") + (customerShippingAddress.state ? customerShippingAddress.state + " " : "") + (customerShippingAddress.zip ? customerShippingAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : "") + "\n " + (document.asi ? "<div>" + document.asi + "</div>" : "") + "\n </address>\n " : "") + "\n </div>\n\n <div class=\"invoice-date col-sm-12 col-md-6\">\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n " + (document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>Proposal #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : "") + "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_d ? company.r_d : lang["date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_dd ? company.r_dd : lang["due_date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (document.dd ? formatDate(document.dd) : formatDate(new Date(document.d).setDate(new Date(document.d).getDate() + parseInt(document.di)))) + "\n </div>\n </div>" : "") + "\n " + (document.pon ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_po ? company.r_po : lang["po_number"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + document.pon + "</div>\n </div>\n " : "") + "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->\n <!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table class=\"table table-invoice\">\n <thead>\n <tr class=\"table table-invoice\">\n <th class=\"text-left\">" + (company.r_it ? company.r_it : lang["item"]) + "</th>\n <th class=\"text-center d-none d-md-table-cell\" width=\"15%\">" + (document.um ? document.um : company.r_q ? company.r_q : lang["quantity"]) + "</th>\n <th class=\"text-right d-none d-md-table-cell\" width=\"15%\">" + (company.r_p ? company.r_p : lang["price"]) + "</th>\n " + (discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" width=\"15%\">" + (company.r_dc ? company.r_dc : lang["discount"]) + "</th>" : "") + "\n <th class=\"text-right item-last\">" + (company.r_a ? company.r_a : lang["amount"]) + "</th>\n </tr>\n </thead>\n <tbody>\n " + itemsContainer + "\n </tbody>\n </table>\n </div>\n \n <hr />\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sb ? company.r_sb : lang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (document.dc ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ((company.r_dc ? company.r_dc : lang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("(" + FormatCurrency$1(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "") + "\n " + (document.sp && !document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.tx != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? "(" : "") + FormatCurrency$1(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? "(" : "") + FormatCurrency$1(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.sp && document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ti && !document.t1d && !document.t2d ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : lang["net"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$1(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : lang["total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency$1(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.sca ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + lang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.payment_in_progress ? company.payment_in_progress : lang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$1(document.hangingAmount || 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n\n\n <!-- begin invoice price -->\n <div class=\"invoice-price page-not-break\">\n <div class=\"invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">\n " + bookipayLinkComponent + "\n </div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (document.ty == 1 ? company.r_ad ? company.r_ad : lang["amount_due"] : company.r_gt ? company.r_gt : lang["grand_total"]) + "</small>\n <span class=\"f-w-600\">" + (isDeposit ? FormatCurrency$1(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$1(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf)) + "</span>\n \n </div>\n </div>\n <!-- end invoice price -->\n\n " + (paymentOn || bookipayLinkComponent ? "<div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n " + (bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "") + "\n </div>\n </div>" : "") + "\n\n <div class=\"invoice-body\">\n\n <!-- begin invoice-note -->\n " + (document.noteHtml ? "<div class=\"mt-1\">\n " + document.noteHtml + "\n </div>" : (document.nt ? "<div class=\"mt-1\">\n <h2>" + (company.r_nt ? company.r_nt : lang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : lang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.cs || document.sd ? "\n <div class=\"seperate-line\"></div>\n <div>" + (company.r_bs || lang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || "") + "\n " + (clientSignature || "") + "\n </div>" : "") + "\n <!-- end invoice-signature-->\n\n <!-- begin invoice attachments -->\n\n " + (attachments && attachments.length > 0 ? "<div style=\"text-align: center\">\n " + attachmentContainer + "\n </div>" : "") + "\n <!-- end invoice attachment -->\n </div>\n </div>\n\n" + (!removeHtmlStandardDom ? "</body></html>" : "") + "\n";
9695
+ var html = (!removeHtmlStandardDom ? '<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <title>Invoice</title>' : "") + "\n " + (isOffline ? "<style>" + bootstrapCss + "</style><style>" + fontawesomeCss + "</style>" : " <link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\n <link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css\" rel=\"stylesheet\">") + "\n " + (!removeHtmlStandardDom ? "</head>" : "") + "\n <style>\n * {\n -webkit-print-color-adjust: exact !important;\n color-adjust: exact !important;\n }\n body {\n font-size: 18px;removeHtmlStandardDom\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n hyphens: auto;\n word-break: break-word;\n }\n .invoice-body {\n background: #fff;\n padding: 30px 50px;\n }\n\n .invoice-company {\n font-size: 20px\n }\n\n .invoice-header {\n /* margin: 0 -50px; */\n background: #f0f3f4;\n padding: 25px 50px;\n }\n .invoice-content {\n padding: 20px 38px 10px;\n }\n .invoice-date,\n .invoice-from,\n .invoice-to {\n /* display: table-cell; */\n /* width: 1% */\n }\n\n .table td, .table th {\n padding: .50rem .75rem;\n }\n\n .invoice-from,\n .invoice-to {\n padding-right: 20px\n }\n\n .invoice-date .date,\n .invoice-from strong,\n .invoice-to strong {\n font-size: 18px;\n font-weight: 600\n }\n\n .invoice-date {\n /* text-align: right; */\n padding-left: 15px\n }\n\n .invoice-price{\n /* background: #f0f3f4; */\n display: table;\n width: 100%\n }\n \n .invoice-price .invoice-price-left,\n .invoice-price .invoice-price-right {\n display: table-cell;\n // padding: 20px 12px 16px;\n font-size: 20px;\n font-weight: 600;\n width: 70%;\n position: relative;\n vertical-align: middle\n }\n\n .invoice-price .invoice-price-row{\n display: table;\n float: left;\n }\n\n .invoice-price .invoice-price-right {\n width: 30%;\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n font-size: 28px;\n text-align: right;\n vertical-align: bottom;\n font-weight: 300;\n right: 38px;\n padding: 28px 12px 16px;\n }\n\n .bookipay-payment-pay-btn {\n right: 0;\n width: 220px;\n text-align: center;\n border-radius: 5px;\n font-size: 17px;\n font-weight: 700;\n background: #067EED;\n border: none;\n color: white;\n padding-top: 10px;\n padding-bottom: 10px;\n text-transform: uppercase;\n }\n\n .bookipay-payment-pay-btn:hover {\n background: #0571d6;\n color: #fff;\n }\n \n .invoice-price .invoice-price-right .bookipay-payment-with-span {\n font-size: 12px;\n margin-top: 13px;\n margin-bottom: 10px;\n font-size: 12px;\n width: 140px;\n right: 0;\n float: right;\n text-align:center;\n }\n \n .invoice-price .invoice-price-right small {\n display: block;\n opacity: .7;\n position: absolute;\n top: 10px;\n left: 12px;\n font-size: 18px\n }\n \n .invoice-price .invoice-price-right span {\n display: block;\n }\n\n .invoice-footer {\n border-top: 1px solid #ddd;\n padding-top: 10px;\n font-size: 18px\n }\n\n .invoice-note {\n color: #999;\n margin-top: 80px;\n font-size: 85%\n }\n\n\n .btn.btn-white, .btn.btn-white.disabled, .btn.btn-white.disabled:focus, .btn.btn-white.disabled:hover, .btn.btn-white[disabled], .btn.btn-white[disabled]:focus, .btn.btn-white[disabled]:hover {\n color: #2d353c;\n background: #fff;\n border-color: #d9dfe3;\n }\n .table-inline-block{\n display: inline-block;\n }\n \n .page-not-break {\n page-break-before: auto; \n page-break-after: auto; \n page-break-inside: avoid;\n reak-before: auto; \n break-after: auto; \n break-inside: avoid;\n }\n\n @media print {\n .col-md-6 {\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n max-width: 50%;\n width:50%;\n float:left\n }\n .mb-md-0 {margin-bottom:0;}\n .text-md-right{text-align: right;}\n .d-md-table-cell { display: table-cell!important; }\n .d-md-block { display: block !important; }\n .d-md-none {display: none !important;}\n @page {\n size: A4;\n margin: 0.66cm 0.66cm 0.66cm 0.66cm;\n }\n body, page, html {\n /*width: 21cm; */\n /*margin: 0; */\n width: 100%;\n box-shadow: 0;\n background-color: #fff;\n display: block;\n }\n .print {\n max-width:100%\n margin: 0 auto 0 auto;\n }\n\n .no-print {\n display: none;\n }\n /* .invoice-body {\n padding:10;\n } */\n #invoice {\n " + (isFromReactnative ? "zoom: 0.8; max-width:calc(38cm - 1.32cm);margin: 0 auto 0 auto;" : "") + "\n }\n\n .invoice-price .invoice-price-right {\n background: #f0f3f4;\n color: black;\n border: 2px solid #f0f3f4;\n }\n \n }\n \n .text-left{\n text-align: left;\n }\n .text-center{\n text-align: center;\n } \n .text-right{\n text-align: right;\n }\n\n @media only screen {\n #invoice {\n margin-top:10px;\n max-width:28cm;\n zoom: 0.8;\n box-shadow: 0 0 0.5cm rgba(0,0,0,0.2);\n margin-right:auto;margin-left:auto;\n background: white;\n }\n .noInScreen{\n display: none;\n }\n }\n\n @media (min-width: 575.99px) {\n .invoice-detail-right {\n max-width: 200px;\n }\n }\n\n .item-last {\n width: 15%;\n }\n\n @media only screen and (max-width: 575.98px) {\n .invoice-price-right{\n width: 290px !important;\n display: block !important;\n }\n .item-last {\n width: 30%\n }\n .invoice-body {\n padding: 30px\n }\n .invoice-header {\n padding: 20px 30px;\n }\n .invoice-content {\n padding: 18px;\n }\n .invoice-price .invoice-price-right {\n right: 18px;\n }\n #invoice-logo {\n max-width: 100%;\n display: block;\n }\n .invoice-date {\n margin-top:10px;\n /*border-top: 1px solid #dee2e6;*/\n }\n }\n\n .table-small td{\n padding: 8px 12px\n }\n .table-invoice-header{\n background: #f0f3f4\n }\n .surcharge {\n margin-top: 3px;\n font-size: 12px;\n color: #999;\n }\n h1,h2,h3,h4 {margin-top:15px}\n h1 {font-size:27px}\n h2 {font-size:22px}\n .card-image {width:45px;}\n .seperate-line{\n border-top: 1px solid #dee2e6;\n margin-top: 20px;\n margin-bottom: 10px;\n }\n \n .signature-img{\n width:220px;\n margin-top:20px;\n max-height: -moz-calc(100% - 20px);\n max-height: -webkit-calc(100% - 20px);\n max-height: -o-cal(100% - 20px);\n max-height: calc(100% - 20px);\n object-fit: contain;\n }\n \n </style>\n " + (!removeHtmlStandardDom ? "<body>" : "") + "\n <div id=\"invoice\" class=\"print\">\n <div class=\"invoice-body\">\n <!-- begin invoice-company -->\n <div class=\"row\">\n <div class=\"col-sm-12 col-md-6 mb-3 mb-md-0\" style=\"padding-top:10px\">\n " + logoContainer + "\n </div>\n <div class=\"col-sm-12 col-md-6 text-md-right\">\n <h1>" + documentName + "</h1>\n <div class=\"text-inverse mb-1\" style=\"font-size: 20px;\">\n <strong>" + company.c + "</strong>\n </div>\n <address class=\"m-t-5 m-b-5\">\n <div class=\"mb-2\">\n " + (companyAddress.address1 ? "<div>" + companyAddress.address1 + "</div>" : "") + "\n " + (companyAddress.address2 ? "<div>" + companyAddress.address2 + "</div>" : "") + "\n " + (companyAddress.address3 ? "<div>" + companyAddress.address3 + "</div>" : "") + "\n " + (companyAddress.city || companyAddress.state || companyAddress.zip ? "<div>" + ((companyAddress.city ? companyAddress.city + " " : "") + (companyAddress.state ? companyAddress.state + " " : "") + (companyAddress.zip ? companyAddress.zip + " " : "")) + "</div>" : "") + "\n " + (companyAddress.country ? "<div>" + companyAddress.country + "</div>" : "") + "\n </div>\n " + (company.ai ? "<div>" + company.ai + "</div>" : "") + "\n " + (company.ph ? "<div>" + company.ph + "</div>" : "") + "\n " + (company.de ? "<div>" + company.de + "</div>" : "") + "\n " + (company.tfn ? "<div>" + ((company.bn ? company.bn : "Tax no.") + " : " + company.tfn) + "</div>" : "") + "\n </address>\n </div>\n </div>\n </div>\n <!-- end invoice-company -->\n <!-- begin invoice-header -->\n <div class=\"invoice-header\">\n <div class=\"row\">\n <div class=\"invoice-to col-sm-12 col-md-6\">\n <strong>" + (company.r_bt ? company.r_bt : lang["bill_to"]) + "</strong>\n <div class=\"text-inverse mb-1\">\n <small style=\"font-size: 18px;\">" + (customer ? customer.c : "") + "</small>\n </div>\n <address class=\"m-t-5 m-b-5\">\n " + (customerAddress.address1 ? "<div>" + customerAddress.address1 + "</div>" : "") + "\n " + (customerAddress.address2 ? "<div>" + customerAddress.address2 + "</div>" : "") + "\n " + (customerAddress.address3 ? "<div>" + customerAddress.address3 + "</div>" : "") + "\n " + (customerAddress.city || customerAddress.state || customerAddress.zip ? "<div>" + ((customerAddress.city ? customerAddress.city + " " : "") + (customerAddress.state ? customerAddress.state + " " : "") + (customerAddress.zip ? customerAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerAddress.country ? "<div>" + customerAddress.country + "</div>" : "") + "\n " + (customer && customer.tfn ? "<div>" + (customer.tfn ? (company.bn || "Tax no.") + " : " + customer.tfn : "") + "</div>" : "") + "\n " + (customer && customer.ph ? "<div>" + customer.ph + "</div>" : "") + "\n " + (customer && customer.ai ? "<div>" + customer.ai + "</div>" : "") + "\n </address>\n\n " + (shippingAddressExists ? "<strong stryle=\"margin-top:10px\">" + (company.r_st ? company.r_st : lang.ship_to) + "</strong>" : "") + "\n " + (shippingAddressExists ? "\n <address class=\"m-t-5 m-b-5\">\n " + (customerShippingAddress.address1 ? "<div>" + customerShippingAddress.address1 + "</div>" : "") + "\n " + (customerShippingAddress.address2 ? "<div>" + customerShippingAddress.address2 + "</div>" : "") + "\n " + (customerShippingAddress.address3 ? "<div>" + customerShippingAddress.address3 + "</div>" : "") + "\n " + (customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip ? "<div>" + ((customerShippingAddress.city ? customerShippingAddress.city + " " : "") + (customerShippingAddress.state ? customerShippingAddress.state + " " : "") + (customerShippingAddress.zip ? customerShippingAddress.zip + " " : "")) + "</div>" : "") + "\n " + (customerShippingAddress.country ? "<div>" + customerShippingAddress.country + "</div>" : "") + "\n " + (document.asi ? "<div>" + document.asi + "</div>" : "") + "\n </address>\n " : "") + "\n </div>\n\n <div class=\"invoice-date col-sm-12 col-md-6\">\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + documentName + " #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + (document.no ? document.no : "") + "</div>\n </div>\n " + (document.proposal && document.proposal.no ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>Proposal #</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + document.proposal.no + "\n </div>\n </div>" : "") + "\n <div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_d ? company.r_d : lang["date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + formatDate(document.d) + "</div>\n </div>\n " + (document.ty == 1 && !document.rd ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_dd ? company.r_dd : lang["due_date"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">\n " + (document.dd ? formatDate(document.dd) : formatDate(new Date(document.d).setDate(new Date(document.d).getDate() + parseInt(document.di)))) + "\n </div>\n </div>" : "") + "\n " + (document.pon ? "<div class=\"row text-md-right\">\n <div class=\"col-6 col-md\">\n <strong>" + (company.r_po ? company.r_po : lang["po_number"]) + "</strong>\n </div>\n <div class=\"col-6 col-md invoice-detail-right\">" + document.pon + "</div>\n </div>\n " : "") + "\n </div>\n </div>\n </div>\n <!-- end invoice-header -->\n <!-- begin invoice-content -->\n <div class=\"invoice-content\">\n <div class=\"table-responsive\">\n <table class=\"table table-invoice\">\n <thead>\n <tr class=\"table table-invoice\">\n <th class=\"text-left\">" + (company.r_it ? company.r_it : lang["item"]) + "</th>\n <th class=\"text-center d-none d-md-table-cell\" width=\"15%\">" + (document.um ? document.um : company.r_q ? company.r_q : lang["quantity"]) + "</th>\n <th class=\"text-right d-none d-md-table-cell\" width=\"15%\">" + (company.r_p ? company.r_p : lang["price"]) + "</th>\n " + (discountOnItem ? "<th class=\"text-right d-none d-md-table-cell\" width=\"15%\">" + (company.r_dc ? company.r_dc : lang["discount"]) + "</th>" : "") + "\n <th class=\"text-right item-last\">" + (company.r_a ? company.r_a : lang["amount"]) + "</th>\n </tr>\n </thead>\n <tbody>\n " + itemsContainer + "\n </tbody>\n </table>\n </div>\n \n <hr />\n <div class=\"row\">\n <div class=\"col-12\">\n <table class=\"table table-borderless table-small\">\n <tbody>\n <tr>\n <td class=\"d-none d-md-table-cell\" rowspan=\"" + numOfRowsPaymentInstruction + "\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n </td>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sb ? company.r_sb : lang["subtotal"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.st, company.cr, company.la, company.cf) + "</td>\n </tr>\n " + (document.dc ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + ((company.r_dc ? company.r_dc : lang["discount"]) + (document.dcpo && document.dcp ? " (" + document.dcp + "%)" : "")) + "</td>\n <td class=\"text-right\" width=\"22%\">" + ("(" + FormatCurrency$1(document.dc, company.cr, company.la, company.cf) + ")") + "</td>\n </tr>" : "") + "\n " + (document.sp && !document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.tx != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName1 + taxIncluded1 + "(" + document.tp + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t1d ? "(" : "") + FormatCurrency$1(document.tx, company.cr, company.la, company.cf) + (document.t1d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.ttx && document.tx2 != 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (taxName2 + taxIncluded2 + "(" + document.tp2 + "%)") + "</td>\n <td class=\"text-right\" width=\"22%\">" + ((document.t2d ? "(" : "") + FormatCurrency$1(document.tx2, company.cr, company.la, company.cf) + (document.t2d ? ")" : "")) + "</td>\n </tr>" : "") + "\n " + (document.sp && document.sntx ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + (company.r_sp ? company.r_sp : lang["shipping"]) + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sp, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ti && !document.t1d && !document.t2d ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.r_n ? company.r_n : lang["net"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$1(document.tt - (document.tx || 0) - (document.tx2 || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 || document.ty !== 1 && (document.t1d || document.ttx && document.tx2 > 0 && document.t2d) ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + (company.r_tt ? company.r_tt : lang["total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-bottom: 1px solid #ddd\">" + FormatCurrency$1(document.tt ? document.tt : 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.sca ? "<tr>\n <td class=\"text-md-right\" width=\"22%\">" + lang["credit_card_surcharge"] + "</td>\n <td class=\"text-right\" width=\"22%\">" + FormatCurrency$1(document.sca, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.hangingAmount && document.hangingAmount > 0 ? "<tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (company.payment_in_progress ? company.payment_in_progress : lang.payment_in_progress) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$1(document.hangingAmount || 0, company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n " + (document.ty == 1 && document.pma && document.pm ? paymentContainer : "") + "\n " + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? "\n <tr>\n <td class=\"text-md-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + (document.ty == 1 ? company.r_ad ? company.r_ad : lang["amount_due"] : company.r_gt ? company.r_gt : lang["grand_total"]) + "</td>\n <td class=\"text-right\" width=\"22%\" style=\"border-top: 1px solid #ddd\">" + FormatCurrency$1(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf) + "</td>\n </tr>" : "") + "\n </tbody>\n </table>\n </div>\n </div>\n </div>\n <!-- end invoice-content -->\n \n \n\n <!-- begin invoice price -->\n <div class=\"invoice-price page-not-break\">\n <div class=\"invoice-price-left text-right\">\n <!-- begin bookipay payment -->\n <div class=\"d-none d-md-block\">\n " + bookipayLinkComponent + "\n </div>\n <!-- end bookipay payment -->\n </div>\n <div class=\"invoice-price-right\">\n <small>" + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? company.r_deposit_due ? company.r_deposit_due : lang["deposit_due"] : document.ty == 1 ? company.r_ad ? company.r_ad : lang["amount_due"] : company.r_gt ? company.r_gt : lang["grand_total"]) + "</small>\n <span class=\"f-w-600\">" + (document.ty == 1 && isDeposit && document.depositAmount > 0 ? FormatCurrency$1(document.depositAmount, company.cr, company.la, company.cf) : FormatCurrency$1(document.ad - (document.hangingAmount || 0), company.cr, company.la, company.cf)) + "</span>\n \n </div>\n </div>\n <!-- end invoice price -->\n\n " + (paymentOn || bookipayLinkComponent ? "<div class=\"invoice-body\">\n <div class=\"d-block d-md-none\">\n " + (paymentOn ? paymentInstructionDetails : "") + "\n " + (bookipayLinkComponent ? "<div class=\"mt-4\">" + bookipayLinkComponent + "</div>" : "") + "\n </div>\n </div>" : "") + "\n\n <div class=\"invoice-body\">\n\n <!-- begin invoice-note -->\n " + (document.noteHtml ? "<div class=\"mt-1\">\n " + document.noteHtml + "\n </div>" : (document.nt ? "<div class=\"mt-1\">\n <h2>" + (company.r_nt ? company.r_nt : lang["note"]) + "</h2>\n " + nl2br(document.nt) + "\n </div>" : "") + "\n " + (document.tc ? "<div class=\"mt-1\">\n <h2>" + (company.r_tc ? company.r_tc : lang["terms"]) + "</h2>\n " + nl2br(document.tc) + "\n </div>" : "")) + "\n <!-- end invoice-note -->\n \n <!--- begin company signature -->\n <!-- begin invoice-signature -->\n " + (document.cs || document.sd ? "\n <div class=\"seperate-line\"></div>\n <div>" + (company.r_bs || lang["by_signing"] || "") + "</div>\n <div class=\"row mt-1\">\n " + (signatureContainer || "") + "\n " + (clientSignature || "") + "\n </div>" : "") + "\n <!-- end invoice-signature-->\n\n <!-- begin invoice attachments -->\n\n " + (attachments && attachments.length > 0 ? "<div style=\"text-align: center\">\n " + attachmentContainer + "\n </div>" : "") + "\n <!-- end invoice attachment -->\n </div>\n </div>\n\n" + (!removeHtmlStandardDom ? "</body></html>" : "") + "\n";
9696
9696
  return {
9697
9697
  html: html,
9698
9698
  timeZone: timeZone,
@@ -9932,2161 +9932,6 @@ var InvoiceCompatHtml = function InvoiceCompatHtml(_ref) {
9932
9932
  });
9933
9933
  };
9934
9934
 
9935
- /*
9936
- object-assign
9937
- (c) Sindre Sorhus
9938
- @license MIT
9939
- */
9940
- /* eslint-disable no-unused-vars */
9941
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
9942
- var hasOwnProperty = Object.prototype.hasOwnProperty;
9943
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
9944
-
9945
- function toObject(val) {
9946
- if (val === null || val === undefined) {
9947
- throw new TypeError('Object.assign cannot be called with null or undefined');
9948
- }
9949
-
9950
- return Object(val);
9951
- }
9952
-
9953
- function shouldUseNative() {
9954
- try {
9955
- if (!Object.assign) {
9956
- return false;
9957
- }
9958
-
9959
- // Detect buggy property enumeration order in older V8 versions.
9960
-
9961
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
9962
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
9963
- test1[5] = 'de';
9964
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
9965
- return false;
9966
- }
9967
-
9968
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9969
- var test2 = {};
9970
- for (var i = 0; i < 10; i++) {
9971
- test2['_' + String.fromCharCode(i)] = i;
9972
- }
9973
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
9974
- return test2[n];
9975
- });
9976
- if (order2.join('') !== '0123456789') {
9977
- return false;
9978
- }
9979
-
9980
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9981
- var test3 = {};
9982
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
9983
- test3[letter] = letter;
9984
- });
9985
- if (Object.keys(Object.assign({}, test3)).join('') !==
9986
- 'abcdefghijklmnopqrst') {
9987
- return false;
9988
- }
9989
-
9990
- return true;
9991
- } catch (err) {
9992
- // We don't expect any of the above to throw, but better to be safe.
9993
- return false;
9994
- }
9995
- }
9996
-
9997
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
9998
- var from;
9999
- var to = toObject(target);
10000
- var symbols;
10001
-
10002
- for (var s = 1; s < arguments.length; s++) {
10003
- from = Object(arguments[s]);
10004
-
10005
- for (var key in from) {
10006
- if (hasOwnProperty.call(from, key)) {
10007
- to[key] = from[key];
10008
- }
10009
- }
10010
-
10011
- if (getOwnPropertySymbols) {
10012
- symbols = getOwnPropertySymbols(from);
10013
- for (var i = 0; i < symbols.length; i++) {
10014
- if (propIsEnumerable.call(from, symbols[i])) {
10015
- to[symbols[i]] = from[symbols[i]];
10016
- }
10017
- }
10018
- }
10019
- }
10020
-
10021
- return to;
10022
- };
10023
-
10024
- var n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"):
10025
- 60116,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
10026
- var D={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D;}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,"setState");};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};
10027
- function G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D;}var I=H.prototype=new G;I.constructor=H;objectAssign(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
10028
- function M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h;}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return {$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}
10029
- function N(a,b){return {$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return "object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return "$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return {result:a,keyPrefix:b,func:c,context:e,count:0}}
10030
- function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a);}
10031
- function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0;}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e);}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k=
10032
- 0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if("object"===d)throw c=""+a,Error(C(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V(a,b,c){return null==a?0:T(a,"",b,c)}function U(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++);}
10033
- function aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c)),e.push(a));}function X(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P,"$&/")+"/");b=R(b,g,e,d);V(a,aa,b);S(b);}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}
10034
- var ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:objectAssign};var Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b);},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};
10035
- var Component=F;var Fragment=r;var Profiler=u;var PureComponent=H;var StrictMode=t;var Suspense=y;var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;
10036
- var cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=objectAssign({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h]);}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f;}return {$$typeof:p,type:a.type,
10037
- key:d,ref:g,props:e,_owner:k}};var createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};var createElement=M;var createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};var createRef=function(){return {current:null}};var forwardRef=function(a){return {$$typeof:x,render:a}};var isValidElement=O;
10038
- var lazy=function(a){return {$$typeof:A,_ctor:a,_status:-1,_result:null}};var memo=function(a,b){return {$$typeof:z,type:a,compare:void 0===b?null:b}};var useCallback=function(a,b){return Z().useCallback(a,b)};var useContext=function(a,b){return Z().useContext(a,b)};var useDebugValue=function(){};var useEffect=function(a,b){return Z().useEffect(a,b)};var useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};
10039
- var useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};var useMemo=function(a,b){return Z().useMemo(a,b)};var useReducer=function(a,b,c){return Z().useReducer(a,b,c)};var useRef=function(a){return Z().useRef(a)};var useState=function(a){return Z().useState(a)};var version$1="16.14.0";
10040
-
10041
- var react_production_min = {
10042
- Children: Children,
10043
- Component: Component,
10044
- Fragment: Fragment,
10045
- Profiler: Profiler,
10046
- PureComponent: PureComponent,
10047
- StrictMode: StrictMode,
10048
- Suspense: Suspense,
10049
- __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
10050
- cloneElement: cloneElement,
10051
- createContext: createContext,
10052
- createElement: createElement,
10053
- createFactory: createFactory,
10054
- createRef: createRef,
10055
- forwardRef: forwardRef,
10056
- isValidElement: isValidElement,
10057
- lazy: lazy,
10058
- memo: memo,
10059
- useCallback: useCallback,
10060
- useContext: useContext,
10061
- useDebugValue: useDebugValue,
10062
- useEffect: useEffect,
10063
- useImperativeHandle: useImperativeHandle,
10064
- useLayoutEffect: useLayoutEffect,
10065
- useMemo: useMemo,
10066
- useReducer: useReducer,
10067
- useRef: useRef,
10068
- useState: useState,
10069
- version: version$1
10070
- };
10071
-
10072
- /**
10073
- * Copyright (c) 2013-present, Facebook, Inc.
10074
- *
10075
- * This source code is licensed under the MIT license found in the
10076
- * LICENSE file in the root directory of this source tree.
10077
- */
10078
-
10079
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
10080
-
10081
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
10082
-
10083
- var printWarning = function() {};
10084
-
10085
- if (process.env.NODE_ENV !== 'production') {
10086
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
10087
- var loggedTypeFailures = {};
10088
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
10089
-
10090
- printWarning = function(text) {
10091
- var message = 'Warning: ' + text;
10092
- if (typeof console !== 'undefined') {
10093
- console.error(message);
10094
- }
10095
- try {
10096
- // --- Welcome to debugging React ---
10097
- // This error was thrown as a convenience so that you can use this stack
10098
- // to find the callsite that caused this warning to fire.
10099
- throw new Error(message);
10100
- } catch (x) {}
10101
- };
10102
- }
10103
-
10104
- /**
10105
- * Assert that the values match with the type specs.
10106
- * Error messages are memorized and will only be shown once.
10107
- *
10108
- * @param {object} typeSpecs Map of name to a ReactPropType
10109
- * @param {object} values Runtime values that need to be type-checked
10110
- * @param {string} location e.g. "prop", "context", "child context"
10111
- * @param {string} componentName Name of the component for error messages.
10112
- * @param {?Function} getStack Returns the component stack.
10113
- * @private
10114
- */
10115
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
10116
- if (process.env.NODE_ENV !== 'production') {
10117
- for (var typeSpecName in typeSpecs) {
10118
- if (has(typeSpecs, typeSpecName)) {
10119
- var error;
10120
- // Prop type validation may throw. In case they do, we don't want to
10121
- // fail the render phase where it didn't fail before. So we log it.
10122
- // After these have been cleaned up, we'll let them throw.
10123
- try {
10124
- // This is intentionally an invariant that gets caught. It's the same
10125
- // behavior as without this statement except with a better message.
10126
- if (typeof typeSpecs[typeSpecName] !== 'function') {
10127
- var err = Error(
10128
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
10129
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
10130
- );
10131
- err.name = 'Invariant Violation';
10132
- throw err;
10133
- }
10134
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
10135
- } catch (ex) {
10136
- error = ex;
10137
- }
10138
- if (error && !(error instanceof Error)) {
10139
- printWarning(
10140
- (componentName || 'React class') + ': type specification of ' +
10141
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
10142
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
10143
- 'You may have forgotten to pass an argument to the type checker ' +
10144
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
10145
- 'shape all require an argument).'
10146
- );
10147
- }
10148
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
10149
- // Only monitor this failure once because there tends to be a lot of the
10150
- // same error.
10151
- loggedTypeFailures[error.message] = true;
10152
-
10153
- var stack = getStack ? getStack() : '';
10154
-
10155
- printWarning(
10156
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
10157
- );
10158
- }
10159
- }
10160
- }
10161
- }
10162
- }
10163
-
10164
- /**
10165
- * Resets warning cache when testing.
10166
- *
10167
- * @private
10168
- */
10169
- checkPropTypes.resetWarningCache = function() {
10170
- if (process.env.NODE_ENV !== 'production') {
10171
- loggedTypeFailures = {};
10172
- }
10173
- };
10174
-
10175
- var checkPropTypes_1 = checkPropTypes;
10176
-
10177
- var react_development = createCommonjsModule(function (module, exports) {
10178
-
10179
-
10180
-
10181
- if (process.env.NODE_ENV !== "production") {
10182
- (function() {
10183
-
10184
- var _assign = objectAssign;
10185
- var checkPropTypes = checkPropTypes_1;
10186
-
10187
- var ReactVersion = '16.14.0';
10188
-
10189
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
10190
- // nor polyfill, then a plain number is used for performance.
10191
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
10192
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
10193
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
10194
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
10195
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
10196
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
10197
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
10198
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
10199
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
10200
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
10201
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
10202
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
10203
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
10204
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
10205
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
10206
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
10207
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
10208
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
10209
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
10210
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
10211
- function getIteratorFn(maybeIterable) {
10212
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
10213
- return null;
10214
- }
10215
-
10216
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
10217
-
10218
- if (typeof maybeIterator === 'function') {
10219
- return maybeIterator;
10220
- }
10221
-
10222
- return null;
10223
- }
10224
-
10225
- /**
10226
- * Keeps track of the current dispatcher.
10227
- */
10228
- var ReactCurrentDispatcher = {
10229
- /**
10230
- * @internal
10231
- * @type {ReactComponent}
10232
- */
10233
- current: null
10234
- };
10235
-
10236
- /**
10237
- * Keeps track of the current batch's configuration such as how long an update
10238
- * should suspend for if it needs to.
10239
- */
10240
- var ReactCurrentBatchConfig = {
10241
- suspense: null
10242
- };
10243
-
10244
- /**
10245
- * Keeps track of the current owner.
10246
- *
10247
- * The current owner is the component who should own any components that are
10248
- * currently being constructed.
10249
- */
10250
- var ReactCurrentOwner = {
10251
- /**
10252
- * @internal
10253
- * @type {ReactComponent}
10254
- */
10255
- current: null
10256
- };
10257
-
10258
- var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
10259
- function describeComponentFrame (name, source, ownerName) {
10260
- var sourceInfo = '';
10261
-
10262
- if (source) {
10263
- var path = source.fileName;
10264
- var fileName = path.replace(BEFORE_SLASH_RE, '');
10265
-
10266
- {
10267
- // In DEV, include code for a common special case:
10268
- // prefer "folder/index.js" instead of just "index.js".
10269
- if (/^index\./.test(fileName)) {
10270
- var match = path.match(BEFORE_SLASH_RE);
10271
-
10272
- if (match) {
10273
- var pathBeforeSlash = match[1];
10274
-
10275
- if (pathBeforeSlash) {
10276
- var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
10277
- fileName = folderName + '/' + fileName;
10278
- }
10279
- }
10280
- }
10281
- }
10282
-
10283
- sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
10284
- } else if (ownerName) {
10285
- sourceInfo = ' (created by ' + ownerName + ')';
10286
- }
10287
-
10288
- return '\n in ' + (name || 'Unknown') + sourceInfo;
10289
- }
10290
-
10291
- var Resolved = 1;
10292
- function refineResolvedLazyComponent(lazyComponent) {
10293
- return lazyComponent._status === Resolved ? lazyComponent._result : null;
10294
- }
10295
-
10296
- function getWrappedName(outerType, innerType, wrapperName) {
10297
- var functionName = innerType.displayName || innerType.name || '';
10298
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
10299
- }
10300
-
10301
- function getComponentName(type) {
10302
- if (type == null) {
10303
- // Host root, text node or just invalid type.
10304
- return null;
10305
- }
10306
-
10307
- {
10308
- if (typeof type.tag === 'number') {
10309
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
10310
- }
10311
- }
10312
-
10313
- if (typeof type === 'function') {
10314
- return type.displayName || type.name || null;
10315
- }
10316
-
10317
- if (typeof type === 'string') {
10318
- return type;
10319
- }
10320
-
10321
- switch (type) {
10322
- case REACT_FRAGMENT_TYPE:
10323
- return 'Fragment';
10324
-
10325
- case REACT_PORTAL_TYPE:
10326
- return 'Portal';
10327
-
10328
- case REACT_PROFILER_TYPE:
10329
- return "Profiler";
10330
-
10331
- case REACT_STRICT_MODE_TYPE:
10332
- return 'StrictMode';
10333
-
10334
- case REACT_SUSPENSE_TYPE:
10335
- return 'Suspense';
10336
-
10337
- case REACT_SUSPENSE_LIST_TYPE:
10338
- return 'SuspenseList';
10339
- }
10340
-
10341
- if (typeof type === 'object') {
10342
- switch (type.$$typeof) {
10343
- case REACT_CONTEXT_TYPE:
10344
- return 'Context.Consumer';
10345
-
10346
- case REACT_PROVIDER_TYPE:
10347
- return 'Context.Provider';
10348
-
10349
- case REACT_FORWARD_REF_TYPE:
10350
- return getWrappedName(type, type.render, 'ForwardRef');
10351
-
10352
- case REACT_MEMO_TYPE:
10353
- return getComponentName(type.type);
10354
-
10355
- case REACT_BLOCK_TYPE:
10356
- return getComponentName(type.render);
10357
-
10358
- case REACT_LAZY_TYPE:
10359
- {
10360
- var thenable = type;
10361
- var resolvedThenable = refineResolvedLazyComponent(thenable);
10362
-
10363
- if (resolvedThenable) {
10364
- return getComponentName(resolvedThenable);
10365
- }
10366
-
10367
- break;
10368
- }
10369
- }
10370
- }
10371
-
10372
- return null;
10373
- }
10374
-
10375
- var ReactDebugCurrentFrame = {};
10376
- var currentlyValidatingElement = null;
10377
- function setCurrentlyValidatingElement(element) {
10378
- {
10379
- currentlyValidatingElement = element;
10380
- }
10381
- }
10382
-
10383
- {
10384
- // Stack implementation injected by the current renderer.
10385
- ReactDebugCurrentFrame.getCurrentStack = null;
10386
-
10387
- ReactDebugCurrentFrame.getStackAddendum = function () {
10388
- var stack = ''; // Add an extra top frame while an element is being validated
10389
-
10390
- if (currentlyValidatingElement) {
10391
- var name = getComponentName(currentlyValidatingElement.type);
10392
- var owner = currentlyValidatingElement._owner;
10393
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
10394
- } // Delegate to the injected renderer-specific implementation
10395
-
10396
-
10397
- var impl = ReactDebugCurrentFrame.getCurrentStack;
10398
-
10399
- if (impl) {
10400
- stack += impl() || '';
10401
- }
10402
-
10403
- return stack;
10404
- };
10405
- }
10406
-
10407
- /**
10408
- * Used by act() to track whether you're inside an act() scope.
10409
- */
10410
- var IsSomeRendererActing = {
10411
- current: false
10412
- };
10413
-
10414
- var ReactSharedInternals = {
10415
- ReactCurrentDispatcher: ReactCurrentDispatcher,
10416
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
10417
- ReactCurrentOwner: ReactCurrentOwner,
10418
- IsSomeRendererActing: IsSomeRendererActing,
10419
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
10420
- assign: _assign
10421
- };
10422
-
10423
- {
10424
- _assign(ReactSharedInternals, {
10425
- // These should not be included in production.
10426
- ReactDebugCurrentFrame: ReactDebugCurrentFrame,
10427
- // Shim for React DOM 16.0.0 which still destructured (but not used) this.
10428
- // TODO: remove in React 17.0.
10429
- ReactComponentTreeHook: {}
10430
- });
10431
- }
10432
-
10433
- // by calls to these methods by a Babel plugin.
10434
- //
10435
- // In PROD (or in packages without access to React internals),
10436
- // they are left as they are instead.
10437
-
10438
- function warn(format) {
10439
- {
10440
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
10441
- args[_key - 1] = arguments[_key];
10442
- }
10443
-
10444
- printWarning('warn', format, args);
10445
- }
10446
- }
10447
- function error(format) {
10448
- {
10449
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
10450
- args[_key2 - 1] = arguments[_key2];
10451
- }
10452
-
10453
- printWarning('error', format, args);
10454
- }
10455
- }
10456
-
10457
- function printWarning(level, format, args) {
10458
- // When changing this logic, you might want to also
10459
- // update consoleWithStackDev.www.js as well.
10460
- {
10461
- var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
10462
-
10463
- if (!hasExistingStack) {
10464
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
10465
- var stack = ReactDebugCurrentFrame.getStackAddendum();
10466
-
10467
- if (stack !== '') {
10468
- format += '%s';
10469
- args = args.concat([stack]);
10470
- }
10471
- }
10472
-
10473
- var argsWithFormat = args.map(function (item) {
10474
- return '' + item;
10475
- }); // Careful: RN currently depends on this prefix
10476
-
10477
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
10478
- // breaks IE9: https://github.com/facebook/react/issues/13610
10479
- // eslint-disable-next-line react-internal/no-production-logging
10480
-
10481
- Function.prototype.apply.call(console[level], console, argsWithFormat);
10482
-
10483
- try {
10484
- // --- Welcome to debugging React ---
10485
- // This error was thrown as a convenience so that you can use this stack
10486
- // to find the callsite that caused this warning to fire.
10487
- var argIndex = 0;
10488
- var message = 'Warning: ' + format.replace(/%s/g, function () {
10489
- return args[argIndex++];
10490
- });
10491
- throw new Error(message);
10492
- } catch (x) {}
10493
- }
10494
- }
10495
-
10496
- var didWarnStateUpdateForUnmountedComponent = {};
10497
-
10498
- function warnNoop(publicInstance, callerName) {
10499
- {
10500
- var _constructor = publicInstance.constructor;
10501
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
10502
- var warningKey = componentName + "." + callerName;
10503
-
10504
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
10505
- return;
10506
- }
10507
-
10508
- error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
10509
-
10510
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
10511
- }
10512
- }
10513
- /**
10514
- * This is the abstract API for an update queue.
10515
- */
10516
-
10517
-
10518
- var ReactNoopUpdateQueue = {
10519
- /**
10520
- * Checks whether or not this composite component is mounted.
10521
- * @param {ReactClass} publicInstance The instance we want to test.
10522
- * @return {boolean} True if mounted, false otherwise.
10523
- * @protected
10524
- * @final
10525
- */
10526
- isMounted: function (publicInstance) {
10527
- return false;
10528
- },
10529
-
10530
- /**
10531
- * Forces an update. This should only be invoked when it is known with
10532
- * certainty that we are **not** in a DOM transaction.
10533
- *
10534
- * You may want to call this when you know that some deeper aspect of the
10535
- * component's state has changed but `setState` was not called.
10536
- *
10537
- * This will not invoke `shouldComponentUpdate`, but it will invoke
10538
- * `componentWillUpdate` and `componentDidUpdate`.
10539
- *
10540
- * @param {ReactClass} publicInstance The instance that should rerender.
10541
- * @param {?function} callback Called after component is updated.
10542
- * @param {?string} callerName name of the calling function in the public API.
10543
- * @internal
10544
- */
10545
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
10546
- warnNoop(publicInstance, 'forceUpdate');
10547
- },
10548
-
10549
- /**
10550
- * Replaces all of the state. Always use this or `setState` to mutate state.
10551
- * You should treat `this.state` as immutable.
10552
- *
10553
- * There is no guarantee that `this.state` will be immediately updated, so
10554
- * accessing `this.state` after calling this method may return the old value.
10555
- *
10556
- * @param {ReactClass} publicInstance The instance that should rerender.
10557
- * @param {object} completeState Next state.
10558
- * @param {?function} callback Called after component is updated.
10559
- * @param {?string} callerName name of the calling function in the public API.
10560
- * @internal
10561
- */
10562
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
10563
- warnNoop(publicInstance, 'replaceState');
10564
- },
10565
-
10566
- /**
10567
- * Sets a subset of the state. This only exists because _pendingState is
10568
- * internal. This provides a merging strategy that is not available to deep
10569
- * properties which is confusing. TODO: Expose pendingState or don't use it
10570
- * during the merge.
10571
- *
10572
- * @param {ReactClass} publicInstance The instance that should rerender.
10573
- * @param {object} partialState Next partial state to be merged with state.
10574
- * @param {?function} callback Called after component is updated.
10575
- * @param {?string} Name of the calling function in the public API.
10576
- * @internal
10577
- */
10578
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
10579
- warnNoop(publicInstance, 'setState');
10580
- }
10581
- };
10582
-
10583
- var emptyObject = {};
10584
-
10585
- {
10586
- Object.freeze(emptyObject);
10587
- }
10588
- /**
10589
- * Base class helpers for the updating state of a component.
10590
- */
10591
-
10592
-
10593
- function Component(props, context, updater) {
10594
- this.props = props;
10595
- this.context = context; // If a component has string refs, we will assign a different object later.
10596
-
10597
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
10598
- // renderer.
10599
-
10600
- this.updater = updater || ReactNoopUpdateQueue;
10601
- }
10602
-
10603
- Component.prototype.isReactComponent = {};
10604
- /**
10605
- * Sets a subset of the state. Always use this to mutate
10606
- * state. You should treat `this.state` as immutable.
10607
- *
10608
- * There is no guarantee that `this.state` will be immediately updated, so
10609
- * accessing `this.state` after calling this method may return the old value.
10610
- *
10611
- * There is no guarantee that calls to `setState` will run synchronously,
10612
- * as they may eventually be batched together. You can provide an optional
10613
- * callback that will be executed when the call to setState is actually
10614
- * completed.
10615
- *
10616
- * When a function is provided to setState, it will be called at some point in
10617
- * the future (not synchronously). It will be called with the up to date
10618
- * component arguments (state, props, context). These values can be different
10619
- * from this.* because your function may be called after receiveProps but before
10620
- * shouldComponentUpdate, and this new state, props, and context will not yet be
10621
- * assigned to this.
10622
- *
10623
- * @param {object|function} partialState Next partial state or function to
10624
- * produce next partial state to be merged with current state.
10625
- * @param {?function} callback Called after state is updated.
10626
- * @final
10627
- * @protected
10628
- */
10629
-
10630
- Component.prototype.setState = function (partialState, callback) {
10631
- if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
10632
- {
10633
- throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
10634
- }
10635
- }
10636
-
10637
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
10638
- };
10639
- /**
10640
- * Forces an update. This should only be invoked when it is known with
10641
- * certainty that we are **not** in a DOM transaction.
10642
- *
10643
- * You may want to call this when you know that some deeper aspect of the
10644
- * component's state has changed but `setState` was not called.
10645
- *
10646
- * This will not invoke `shouldComponentUpdate`, but it will invoke
10647
- * `componentWillUpdate` and `componentDidUpdate`.
10648
- *
10649
- * @param {?function} callback Called after update is complete.
10650
- * @final
10651
- * @protected
10652
- */
10653
-
10654
-
10655
- Component.prototype.forceUpdate = function (callback) {
10656
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
10657
- };
10658
- /**
10659
- * Deprecated APIs. These APIs used to exist on classic React classes but since
10660
- * we would like to deprecate them, we're not going to move them over to this
10661
- * modern base class. Instead, we define a getter that warns if it's accessed.
10662
- */
10663
-
10664
-
10665
- {
10666
- var deprecatedAPIs = {
10667
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
10668
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
10669
- };
10670
-
10671
- var defineDeprecationWarning = function (methodName, info) {
10672
- Object.defineProperty(Component.prototype, methodName, {
10673
- get: function () {
10674
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
10675
-
10676
- return undefined;
10677
- }
10678
- });
10679
- };
10680
-
10681
- for (var fnName in deprecatedAPIs) {
10682
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
10683
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
10684
- }
10685
- }
10686
- }
10687
-
10688
- function ComponentDummy() {}
10689
-
10690
- ComponentDummy.prototype = Component.prototype;
10691
- /**
10692
- * Convenience component with default shallow equality check for sCU.
10693
- */
10694
-
10695
- function PureComponent(props, context, updater) {
10696
- this.props = props;
10697
- this.context = context; // If a component has string refs, we will assign a different object later.
10698
-
10699
- this.refs = emptyObject;
10700
- this.updater = updater || ReactNoopUpdateQueue;
10701
- }
10702
-
10703
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
10704
- pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
10705
-
10706
- _assign(pureComponentPrototype, Component.prototype);
10707
-
10708
- pureComponentPrototype.isPureReactComponent = true;
10709
-
10710
- // an immutable object with a single mutable value
10711
- function createRef() {
10712
- var refObject = {
10713
- current: null
10714
- };
10715
-
10716
- {
10717
- Object.seal(refObject);
10718
- }
10719
-
10720
- return refObject;
10721
- }
10722
-
10723
- var hasOwnProperty = Object.prototype.hasOwnProperty;
10724
- var RESERVED_PROPS = {
10725
- key: true,
10726
- ref: true,
10727
- __self: true,
10728
- __source: true
10729
- };
10730
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
10731
-
10732
- {
10733
- didWarnAboutStringRefs = {};
10734
- }
10735
-
10736
- function hasValidRef(config) {
10737
- {
10738
- if (hasOwnProperty.call(config, 'ref')) {
10739
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
10740
-
10741
- if (getter && getter.isReactWarning) {
10742
- return false;
10743
- }
10744
- }
10745
- }
10746
-
10747
- return config.ref !== undefined;
10748
- }
10749
-
10750
- function hasValidKey(config) {
10751
- {
10752
- if (hasOwnProperty.call(config, 'key')) {
10753
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
10754
-
10755
- if (getter && getter.isReactWarning) {
10756
- return false;
10757
- }
10758
- }
10759
- }
10760
-
10761
- return config.key !== undefined;
10762
- }
10763
-
10764
- function defineKeyPropWarningGetter(props, displayName) {
10765
- var warnAboutAccessingKey = function () {
10766
- {
10767
- if (!specialPropKeyWarningShown) {
10768
- specialPropKeyWarningShown = true;
10769
-
10770
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
10771
- }
10772
- }
10773
- };
10774
-
10775
- warnAboutAccessingKey.isReactWarning = true;
10776
- Object.defineProperty(props, 'key', {
10777
- get: warnAboutAccessingKey,
10778
- configurable: true
10779
- });
10780
- }
10781
-
10782
- function defineRefPropWarningGetter(props, displayName) {
10783
- var warnAboutAccessingRef = function () {
10784
- {
10785
- if (!specialPropRefWarningShown) {
10786
- specialPropRefWarningShown = true;
10787
-
10788
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
10789
- }
10790
- }
10791
- };
10792
-
10793
- warnAboutAccessingRef.isReactWarning = true;
10794
- Object.defineProperty(props, 'ref', {
10795
- get: warnAboutAccessingRef,
10796
- configurable: true
10797
- });
10798
- }
10799
-
10800
- function warnIfStringRefCannotBeAutoConverted(config) {
10801
- {
10802
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
10803
- var componentName = getComponentName(ReactCurrentOwner.current.type);
10804
-
10805
- if (!didWarnAboutStringRefs[componentName]) {
10806
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
10807
-
10808
- didWarnAboutStringRefs[componentName] = true;
10809
- }
10810
- }
10811
- }
10812
- }
10813
- /**
10814
- * Factory method to create a new React element. This no longer adheres to
10815
- * the class pattern, so do not use new to call it. Also, instanceof check
10816
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
10817
- * if something is a React Element.
10818
- *
10819
- * @param {*} type
10820
- * @param {*} props
10821
- * @param {*} key
10822
- * @param {string|object} ref
10823
- * @param {*} owner
10824
- * @param {*} self A *temporary* helper to detect places where `this` is
10825
- * different from the `owner` when React.createElement is called, so that we
10826
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
10827
- * functions, and as long as `this` and owner are the same, there will be no
10828
- * change in behavior.
10829
- * @param {*} source An annotation object (added by a transpiler or otherwise)
10830
- * indicating filename, line number, and/or other information.
10831
- * @internal
10832
- */
10833
-
10834
-
10835
- var ReactElement = function (type, key, ref, self, source, owner, props) {
10836
- var element = {
10837
- // This tag allows us to uniquely identify this as a React Element
10838
- $$typeof: REACT_ELEMENT_TYPE,
10839
- // Built-in properties that belong on the element
10840
- type: type,
10841
- key: key,
10842
- ref: ref,
10843
- props: props,
10844
- // Record the component responsible for creating this element.
10845
- _owner: owner
10846
- };
10847
-
10848
- {
10849
- // The validation flag is currently mutative. We put it on
10850
- // an external backing store so that we can freeze the whole object.
10851
- // This can be replaced with a WeakMap once they are implemented in
10852
- // commonly used development environments.
10853
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
10854
- // the validation flag non-enumerable (where possible, which should
10855
- // include every environment we run tests in), so the test framework
10856
- // ignores it.
10857
-
10858
- Object.defineProperty(element._store, 'validated', {
10859
- configurable: false,
10860
- enumerable: false,
10861
- writable: true,
10862
- value: false
10863
- }); // self and source are DEV only properties.
10864
-
10865
- Object.defineProperty(element, '_self', {
10866
- configurable: false,
10867
- enumerable: false,
10868
- writable: false,
10869
- value: self
10870
- }); // Two elements created in two different places should be considered
10871
- // equal for testing purposes and therefore we hide it from enumeration.
10872
-
10873
- Object.defineProperty(element, '_source', {
10874
- configurable: false,
10875
- enumerable: false,
10876
- writable: false,
10877
- value: source
10878
- });
10879
-
10880
- if (Object.freeze) {
10881
- Object.freeze(element.props);
10882
- Object.freeze(element);
10883
- }
10884
- }
10885
-
10886
- return element;
10887
- };
10888
- /**
10889
- * Create and return a new ReactElement of the given type.
10890
- * See https://reactjs.org/docs/react-api.html#createelement
10891
- */
10892
-
10893
- function createElement(type, config, children) {
10894
- var propName; // Reserved names are extracted
10895
-
10896
- var props = {};
10897
- var key = null;
10898
- var ref = null;
10899
- var self = null;
10900
- var source = null;
10901
-
10902
- if (config != null) {
10903
- if (hasValidRef(config)) {
10904
- ref = config.ref;
10905
-
10906
- {
10907
- warnIfStringRefCannotBeAutoConverted(config);
10908
- }
10909
- }
10910
-
10911
- if (hasValidKey(config)) {
10912
- key = '' + config.key;
10913
- }
10914
-
10915
- self = config.__self === undefined ? null : config.__self;
10916
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
10917
-
10918
- for (propName in config) {
10919
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
10920
- props[propName] = config[propName];
10921
- }
10922
- }
10923
- } // Children can be more than one argument, and those are transferred onto
10924
- // the newly allocated props object.
10925
-
10926
-
10927
- var childrenLength = arguments.length - 2;
10928
-
10929
- if (childrenLength === 1) {
10930
- props.children = children;
10931
- } else if (childrenLength > 1) {
10932
- var childArray = Array(childrenLength);
10933
-
10934
- for (var i = 0; i < childrenLength; i++) {
10935
- childArray[i] = arguments[i + 2];
10936
- }
10937
-
10938
- {
10939
- if (Object.freeze) {
10940
- Object.freeze(childArray);
10941
- }
10942
- }
10943
-
10944
- props.children = childArray;
10945
- } // Resolve default props
10946
-
10947
-
10948
- if (type && type.defaultProps) {
10949
- var defaultProps = type.defaultProps;
10950
-
10951
- for (propName in defaultProps) {
10952
- if (props[propName] === undefined) {
10953
- props[propName] = defaultProps[propName];
10954
- }
10955
- }
10956
- }
10957
-
10958
- {
10959
- if (key || ref) {
10960
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
10961
-
10962
- if (key) {
10963
- defineKeyPropWarningGetter(props, displayName);
10964
- }
10965
-
10966
- if (ref) {
10967
- defineRefPropWarningGetter(props, displayName);
10968
- }
10969
- }
10970
- }
10971
-
10972
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
10973
- }
10974
- function cloneAndReplaceKey(oldElement, newKey) {
10975
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
10976
- return newElement;
10977
- }
10978
- /**
10979
- * Clone and return a new ReactElement using element as the starting point.
10980
- * See https://reactjs.org/docs/react-api.html#cloneelement
10981
- */
10982
-
10983
- function cloneElement(element, config, children) {
10984
- if (!!(element === null || element === undefined)) {
10985
- {
10986
- throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
10987
- }
10988
- }
10989
-
10990
- var propName; // Original props are copied
10991
-
10992
- var props = _assign({}, element.props); // Reserved names are extracted
10993
-
10994
-
10995
- var key = element.key;
10996
- var ref = element.ref; // Self is preserved since the owner is preserved.
10997
-
10998
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
10999
- // transpiler, and the original source is probably a better indicator of the
11000
- // true owner.
11001
-
11002
- var source = element._source; // Owner will be preserved, unless ref is overridden
11003
-
11004
- var owner = element._owner;
11005
-
11006
- if (config != null) {
11007
- if (hasValidRef(config)) {
11008
- // Silently steal the ref from the parent.
11009
- ref = config.ref;
11010
- owner = ReactCurrentOwner.current;
11011
- }
11012
-
11013
- if (hasValidKey(config)) {
11014
- key = '' + config.key;
11015
- } // Remaining properties override existing props
11016
-
11017
-
11018
- var defaultProps;
11019
-
11020
- if (element.type && element.type.defaultProps) {
11021
- defaultProps = element.type.defaultProps;
11022
- }
11023
-
11024
- for (propName in config) {
11025
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
11026
- if (config[propName] === undefined && defaultProps !== undefined) {
11027
- // Resolve default props
11028
- props[propName] = defaultProps[propName];
11029
- } else {
11030
- props[propName] = config[propName];
11031
- }
11032
- }
11033
- }
11034
- } // Children can be more than one argument, and those are transferred onto
11035
- // the newly allocated props object.
11036
-
11037
-
11038
- var childrenLength = arguments.length - 2;
11039
-
11040
- if (childrenLength === 1) {
11041
- props.children = children;
11042
- } else if (childrenLength > 1) {
11043
- var childArray = Array(childrenLength);
11044
-
11045
- for (var i = 0; i < childrenLength; i++) {
11046
- childArray[i] = arguments[i + 2];
11047
- }
11048
-
11049
- props.children = childArray;
11050
- }
11051
-
11052
- return ReactElement(element.type, key, ref, self, source, owner, props);
11053
- }
11054
- /**
11055
- * Verifies the object is a ReactElement.
11056
- * See https://reactjs.org/docs/react-api.html#isvalidelement
11057
- * @param {?object} object
11058
- * @return {boolean} True if `object` is a ReactElement.
11059
- * @final
11060
- */
11061
-
11062
- function isValidElement(object) {
11063
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
11064
- }
11065
-
11066
- var SEPARATOR = '.';
11067
- var SUBSEPARATOR = ':';
11068
- /**
11069
- * Escape and wrap key so it is safe to use as a reactid
11070
- *
11071
- * @param {string} key to be escaped.
11072
- * @return {string} the escaped key.
11073
- */
11074
-
11075
- function escape(key) {
11076
- var escapeRegex = /[=:]/g;
11077
- var escaperLookup = {
11078
- '=': '=0',
11079
- ':': '=2'
11080
- };
11081
- var escapedString = ('' + key).replace(escapeRegex, function (match) {
11082
- return escaperLookup[match];
11083
- });
11084
- return '$' + escapedString;
11085
- }
11086
- /**
11087
- * TODO: Test that a single child and an array with one item have the same key
11088
- * pattern.
11089
- */
11090
-
11091
-
11092
- var didWarnAboutMaps = false;
11093
- var userProvidedKeyEscapeRegex = /\/+/g;
11094
-
11095
- function escapeUserProvidedKey(text) {
11096
- return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
11097
- }
11098
-
11099
- var POOL_SIZE = 10;
11100
- var traverseContextPool = [];
11101
-
11102
- function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
11103
- if (traverseContextPool.length) {
11104
- var traverseContext = traverseContextPool.pop();
11105
- traverseContext.result = mapResult;
11106
- traverseContext.keyPrefix = keyPrefix;
11107
- traverseContext.func = mapFunction;
11108
- traverseContext.context = mapContext;
11109
- traverseContext.count = 0;
11110
- return traverseContext;
11111
- } else {
11112
- return {
11113
- result: mapResult,
11114
- keyPrefix: keyPrefix,
11115
- func: mapFunction,
11116
- context: mapContext,
11117
- count: 0
11118
- };
11119
- }
11120
- }
11121
-
11122
- function releaseTraverseContext(traverseContext) {
11123
- traverseContext.result = null;
11124
- traverseContext.keyPrefix = null;
11125
- traverseContext.func = null;
11126
- traverseContext.context = null;
11127
- traverseContext.count = 0;
11128
-
11129
- if (traverseContextPool.length < POOL_SIZE) {
11130
- traverseContextPool.push(traverseContext);
11131
- }
11132
- }
11133
- /**
11134
- * @param {?*} children Children tree container.
11135
- * @param {!string} nameSoFar Name of the key path so far.
11136
- * @param {!function} callback Callback to invoke with each child found.
11137
- * @param {?*} traverseContext Used to pass information throughout the traversal
11138
- * process.
11139
- * @return {!number} The number of children in this subtree.
11140
- */
11141
-
11142
-
11143
- function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
11144
- var type = typeof children;
11145
-
11146
- if (type === 'undefined' || type === 'boolean') {
11147
- // All of the above are perceived as null.
11148
- children = null;
11149
- }
11150
-
11151
- var invokeCallback = false;
11152
-
11153
- if (children === null) {
11154
- invokeCallback = true;
11155
- } else {
11156
- switch (type) {
11157
- case 'string':
11158
- case 'number':
11159
- invokeCallback = true;
11160
- break;
11161
-
11162
- case 'object':
11163
- switch (children.$$typeof) {
11164
- case REACT_ELEMENT_TYPE:
11165
- case REACT_PORTAL_TYPE:
11166
- invokeCallback = true;
11167
- }
11168
-
11169
- }
11170
- }
11171
-
11172
- if (invokeCallback) {
11173
- callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
11174
- // so that it's consistent if the number of children grows.
11175
- nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
11176
- return 1;
11177
- }
11178
-
11179
- var child;
11180
- var nextName;
11181
- var subtreeCount = 0; // Count of children found in the current subtree.
11182
-
11183
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
11184
-
11185
- if (Array.isArray(children)) {
11186
- for (var i = 0; i < children.length; i++) {
11187
- child = children[i];
11188
- nextName = nextNamePrefix + getComponentKey(child, i);
11189
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
11190
- }
11191
- } else {
11192
- var iteratorFn = getIteratorFn(children);
11193
-
11194
- if (typeof iteratorFn === 'function') {
11195
-
11196
- {
11197
- // Warn about using Maps as children
11198
- if (iteratorFn === children.entries) {
11199
- if (!didWarnAboutMaps) {
11200
- warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
11201
- }
11202
-
11203
- didWarnAboutMaps = true;
11204
- }
11205
- }
11206
-
11207
- var iterator = iteratorFn.call(children);
11208
- var step;
11209
- var ii = 0;
11210
-
11211
- while (!(step = iterator.next()).done) {
11212
- child = step.value;
11213
- nextName = nextNamePrefix + getComponentKey(child, ii++);
11214
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
11215
- }
11216
- } else if (type === 'object') {
11217
- var addendum = '';
11218
-
11219
- {
11220
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
11221
- }
11222
-
11223
- var childrenString = '' + children;
11224
-
11225
- {
11226
- {
11227
- throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
11228
- }
11229
- }
11230
- }
11231
- }
11232
-
11233
- return subtreeCount;
11234
- }
11235
- /**
11236
- * Traverses children that are typically specified as `props.children`, but
11237
- * might also be specified through attributes:
11238
- *
11239
- * - `traverseAllChildren(this.props.children, ...)`
11240
- * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
11241
- *
11242
- * The `traverseContext` is an optional argument that is passed through the
11243
- * entire traversal. It can be used to store accumulations or anything else that
11244
- * the callback might find relevant.
11245
- *
11246
- * @param {?*} children Children tree object.
11247
- * @param {!function} callback To invoke upon traversing each child.
11248
- * @param {?*} traverseContext Context for traversal.
11249
- * @return {!number} The number of children in this subtree.
11250
- */
11251
-
11252
-
11253
- function traverseAllChildren(children, callback, traverseContext) {
11254
- if (children == null) {
11255
- return 0;
11256
- }
11257
-
11258
- return traverseAllChildrenImpl(children, '', callback, traverseContext);
11259
- }
11260
- /**
11261
- * Generate a key string that identifies a component within a set.
11262
- *
11263
- * @param {*} component A component that could contain a manual key.
11264
- * @param {number} index Index that is used if a manual key is not provided.
11265
- * @return {string}
11266
- */
11267
-
11268
-
11269
- function getComponentKey(component, index) {
11270
- // Do some typechecking here since we call this blindly. We want to ensure
11271
- // that we don't block potential future ES APIs.
11272
- if (typeof component === 'object' && component !== null && component.key != null) {
11273
- // Explicit key
11274
- return escape(component.key);
11275
- } // Implicit key determined by the index in the set
11276
-
11277
-
11278
- return index.toString(36);
11279
- }
11280
-
11281
- function forEachSingleChild(bookKeeping, child, name) {
11282
- var func = bookKeeping.func,
11283
- context = bookKeeping.context;
11284
- func.call(context, child, bookKeeping.count++);
11285
- }
11286
- /**
11287
- * Iterates through children that are typically specified as `props.children`.
11288
- *
11289
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
11290
- *
11291
- * The provided forEachFunc(child, index) will be called for each
11292
- * leaf child.
11293
- *
11294
- * @param {?*} children Children tree container.
11295
- * @param {function(*, int)} forEachFunc
11296
- * @param {*} forEachContext Context for forEachContext.
11297
- */
11298
-
11299
-
11300
- function forEachChildren(children, forEachFunc, forEachContext) {
11301
- if (children == null) {
11302
- return children;
11303
- }
11304
-
11305
- var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
11306
- traverseAllChildren(children, forEachSingleChild, traverseContext);
11307
- releaseTraverseContext(traverseContext);
11308
- }
11309
-
11310
- function mapSingleChildIntoContext(bookKeeping, child, childKey) {
11311
- var result = bookKeeping.result,
11312
- keyPrefix = bookKeeping.keyPrefix,
11313
- func = bookKeeping.func,
11314
- context = bookKeeping.context;
11315
- var mappedChild = func.call(context, child, bookKeeping.count++);
11316
-
11317
- if (Array.isArray(mappedChild)) {
11318
- mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
11319
- return c;
11320
- });
11321
- } else if (mappedChild != null) {
11322
- if (isValidElement(mappedChild)) {
11323
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
11324
- // traverseAllChildren used to do for objects as children
11325
- keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
11326
- }
11327
-
11328
- result.push(mappedChild);
11329
- }
11330
- }
11331
-
11332
- function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
11333
- var escapedPrefix = '';
11334
-
11335
- if (prefix != null) {
11336
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
11337
- }
11338
-
11339
- var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
11340
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
11341
- releaseTraverseContext(traverseContext);
11342
- }
11343
- /**
11344
- * Maps children that are typically specified as `props.children`.
11345
- *
11346
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
11347
- *
11348
- * The provided mapFunction(child, key, index) will be called for each
11349
- * leaf child.
11350
- *
11351
- * @param {?*} children Children tree container.
11352
- * @param {function(*, int)} func The map function.
11353
- * @param {*} context Context for mapFunction.
11354
- * @return {object} Object containing the ordered map of results.
11355
- */
11356
-
11357
-
11358
- function mapChildren(children, func, context) {
11359
- if (children == null) {
11360
- return children;
11361
- }
11362
-
11363
- var result = [];
11364
- mapIntoWithKeyPrefixInternal(children, result, null, func, context);
11365
- return result;
11366
- }
11367
- /**
11368
- * Count the number of children that are typically specified as
11369
- * `props.children`.
11370
- *
11371
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
11372
- *
11373
- * @param {?*} children Children tree container.
11374
- * @return {number} The number of children.
11375
- */
11376
-
11377
-
11378
- function countChildren(children) {
11379
- return traverseAllChildren(children, function () {
11380
- return null;
11381
- }, null);
11382
- }
11383
- /**
11384
- * Flatten a children object (typically specified as `props.children`) and
11385
- * return an array with appropriately re-keyed children.
11386
- *
11387
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
11388
- */
11389
-
11390
-
11391
- function toArray(children) {
11392
- var result = [];
11393
- mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
11394
- return child;
11395
- });
11396
- return result;
11397
- }
11398
- /**
11399
- * Returns the first child in a collection of children and verifies that there
11400
- * is only one child in the collection.
11401
- *
11402
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
11403
- *
11404
- * The current implementation of this function assumes that a single child gets
11405
- * passed without a wrapper, but the purpose of this helper function is to
11406
- * abstract away the particular structure of children.
11407
- *
11408
- * @param {?object} children Child collection structure.
11409
- * @return {ReactElement} The first and only `ReactElement` contained in the
11410
- * structure.
11411
- */
11412
-
11413
-
11414
- function onlyChild(children) {
11415
- if (!isValidElement(children)) {
11416
- {
11417
- throw Error( "React.Children.only expected to receive a single React element child." );
11418
- }
11419
- }
11420
-
11421
- return children;
11422
- }
11423
-
11424
- function createContext(defaultValue, calculateChangedBits) {
11425
- if (calculateChangedBits === undefined) {
11426
- calculateChangedBits = null;
11427
- } else {
11428
- {
11429
- if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
11430
- error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
11431
- }
11432
- }
11433
- }
11434
-
11435
- var context = {
11436
- $$typeof: REACT_CONTEXT_TYPE,
11437
- _calculateChangedBits: calculateChangedBits,
11438
- // As a workaround to support multiple concurrent renderers, we categorize
11439
- // some renderers as primary and others as secondary. We only expect
11440
- // there to be two concurrent renderers at most: React Native (primary) and
11441
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
11442
- // Secondary renderers store their context values on separate fields.
11443
- _currentValue: defaultValue,
11444
- _currentValue2: defaultValue,
11445
- // Used to track how many concurrent renderers this context currently
11446
- // supports within in a single renderer. Such as parallel server rendering.
11447
- _threadCount: 0,
11448
- // These are circular
11449
- Provider: null,
11450
- Consumer: null
11451
- };
11452
- context.Provider = {
11453
- $$typeof: REACT_PROVIDER_TYPE,
11454
- _context: context
11455
- };
11456
- var hasWarnedAboutUsingNestedContextConsumers = false;
11457
- var hasWarnedAboutUsingConsumerProvider = false;
11458
-
11459
- {
11460
- // A separate object, but proxies back to the original context object for
11461
- // backwards compatibility. It has a different $$typeof, so we can properly
11462
- // warn for the incorrect usage of Context as a Consumer.
11463
- var Consumer = {
11464
- $$typeof: REACT_CONTEXT_TYPE,
11465
- _context: context,
11466
- _calculateChangedBits: context._calculateChangedBits
11467
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
11468
-
11469
- Object.defineProperties(Consumer, {
11470
- Provider: {
11471
- get: function () {
11472
- if (!hasWarnedAboutUsingConsumerProvider) {
11473
- hasWarnedAboutUsingConsumerProvider = true;
11474
-
11475
- error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
11476
- }
11477
-
11478
- return context.Provider;
11479
- },
11480
- set: function (_Provider) {
11481
- context.Provider = _Provider;
11482
- }
11483
- },
11484
- _currentValue: {
11485
- get: function () {
11486
- return context._currentValue;
11487
- },
11488
- set: function (_currentValue) {
11489
- context._currentValue = _currentValue;
11490
- }
11491
- },
11492
- _currentValue2: {
11493
- get: function () {
11494
- return context._currentValue2;
11495
- },
11496
- set: function (_currentValue2) {
11497
- context._currentValue2 = _currentValue2;
11498
- }
11499
- },
11500
- _threadCount: {
11501
- get: function () {
11502
- return context._threadCount;
11503
- },
11504
- set: function (_threadCount) {
11505
- context._threadCount = _threadCount;
11506
- }
11507
- },
11508
- Consumer: {
11509
- get: function () {
11510
- if (!hasWarnedAboutUsingNestedContextConsumers) {
11511
- hasWarnedAboutUsingNestedContextConsumers = true;
11512
-
11513
- error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
11514
- }
11515
-
11516
- return context.Consumer;
11517
- }
11518
- }
11519
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
11520
-
11521
- context.Consumer = Consumer;
11522
- }
11523
-
11524
- {
11525
- context._currentRenderer = null;
11526
- context._currentRenderer2 = null;
11527
- }
11528
-
11529
- return context;
11530
- }
11531
-
11532
- function lazy(ctor) {
11533
- var lazyType = {
11534
- $$typeof: REACT_LAZY_TYPE,
11535
- _ctor: ctor,
11536
- // React uses these fields to store the result.
11537
- _status: -1,
11538
- _result: null
11539
- };
11540
-
11541
- {
11542
- // In production, this would just set it on the object.
11543
- var defaultProps;
11544
- var propTypes;
11545
- Object.defineProperties(lazyType, {
11546
- defaultProps: {
11547
- configurable: true,
11548
- get: function () {
11549
- return defaultProps;
11550
- },
11551
- set: function (newDefaultProps) {
11552
- error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
11553
-
11554
- defaultProps = newDefaultProps; // Match production behavior more closely:
11555
-
11556
- Object.defineProperty(lazyType, 'defaultProps', {
11557
- enumerable: true
11558
- });
11559
- }
11560
- },
11561
- propTypes: {
11562
- configurable: true,
11563
- get: function () {
11564
- return propTypes;
11565
- },
11566
- set: function (newPropTypes) {
11567
- error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
11568
-
11569
- propTypes = newPropTypes; // Match production behavior more closely:
11570
-
11571
- Object.defineProperty(lazyType, 'propTypes', {
11572
- enumerable: true
11573
- });
11574
- }
11575
- }
11576
- });
11577
- }
11578
-
11579
- return lazyType;
11580
- }
11581
-
11582
- function forwardRef(render) {
11583
- {
11584
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
11585
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
11586
- } else if (typeof render !== 'function') {
11587
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
11588
- } else {
11589
- if (render.length !== 0 && render.length !== 2) {
11590
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
11591
- }
11592
- }
11593
-
11594
- if (render != null) {
11595
- if (render.defaultProps != null || render.propTypes != null) {
11596
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
11597
- }
11598
- }
11599
- }
11600
-
11601
- return {
11602
- $$typeof: REACT_FORWARD_REF_TYPE,
11603
- render: render
11604
- };
11605
- }
11606
-
11607
- function isValidElementType(type) {
11608
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
11609
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
11610
- }
11611
-
11612
- function memo(type, compare) {
11613
- {
11614
- if (!isValidElementType(type)) {
11615
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
11616
- }
11617
- }
11618
-
11619
- return {
11620
- $$typeof: REACT_MEMO_TYPE,
11621
- type: type,
11622
- compare: compare === undefined ? null : compare
11623
- };
11624
- }
11625
-
11626
- function resolveDispatcher() {
11627
- var dispatcher = ReactCurrentDispatcher.current;
11628
-
11629
- if (!(dispatcher !== null)) {
11630
- {
11631
- throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
11632
- }
11633
- }
11634
-
11635
- return dispatcher;
11636
- }
11637
-
11638
- function useContext(Context, unstable_observedBits) {
11639
- var dispatcher = resolveDispatcher();
11640
-
11641
- {
11642
- if (unstable_observedBits !== undefined) {
11643
- error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
11644
- } // TODO: add a more generic warning for invalid values.
11645
-
11646
-
11647
- if (Context._context !== undefined) {
11648
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
11649
- // and nobody should be using this in existing code.
11650
-
11651
- if (realContext.Consumer === Context) {
11652
- error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
11653
- } else if (realContext.Provider === Context) {
11654
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
11655
- }
11656
- }
11657
- }
11658
-
11659
- return dispatcher.useContext(Context, unstable_observedBits);
11660
- }
11661
- function useState(initialState) {
11662
- var dispatcher = resolveDispatcher();
11663
- return dispatcher.useState(initialState);
11664
- }
11665
- function useReducer(reducer, initialArg, init) {
11666
- var dispatcher = resolveDispatcher();
11667
- return dispatcher.useReducer(reducer, initialArg, init);
11668
- }
11669
- function useRef(initialValue) {
11670
- var dispatcher = resolveDispatcher();
11671
- return dispatcher.useRef(initialValue);
11672
- }
11673
- function useEffect(create, deps) {
11674
- var dispatcher = resolveDispatcher();
11675
- return dispatcher.useEffect(create, deps);
11676
- }
11677
- function useLayoutEffect(create, deps) {
11678
- var dispatcher = resolveDispatcher();
11679
- return dispatcher.useLayoutEffect(create, deps);
11680
- }
11681
- function useCallback(callback, deps) {
11682
- var dispatcher = resolveDispatcher();
11683
- return dispatcher.useCallback(callback, deps);
11684
- }
11685
- function useMemo(create, deps) {
11686
- var dispatcher = resolveDispatcher();
11687
- return dispatcher.useMemo(create, deps);
11688
- }
11689
- function useImperativeHandle(ref, create, deps) {
11690
- var dispatcher = resolveDispatcher();
11691
- return dispatcher.useImperativeHandle(ref, create, deps);
11692
- }
11693
- function useDebugValue(value, formatterFn) {
11694
- {
11695
- var dispatcher = resolveDispatcher();
11696
- return dispatcher.useDebugValue(value, formatterFn);
11697
- }
11698
- }
11699
-
11700
- var propTypesMisspellWarningShown;
11701
-
11702
- {
11703
- propTypesMisspellWarningShown = false;
11704
- }
11705
-
11706
- function getDeclarationErrorAddendum() {
11707
- if (ReactCurrentOwner.current) {
11708
- var name = getComponentName(ReactCurrentOwner.current.type);
11709
-
11710
- if (name) {
11711
- return '\n\nCheck the render method of `' + name + '`.';
11712
- }
11713
- }
11714
-
11715
- return '';
11716
- }
11717
-
11718
- function getSourceInfoErrorAddendum(source) {
11719
- if (source !== undefined) {
11720
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
11721
- var lineNumber = source.lineNumber;
11722
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
11723
- }
11724
-
11725
- return '';
11726
- }
11727
-
11728
- function getSourceInfoErrorAddendumForProps(elementProps) {
11729
- if (elementProps !== null && elementProps !== undefined) {
11730
- return getSourceInfoErrorAddendum(elementProps.__source);
11731
- }
11732
-
11733
- return '';
11734
- }
11735
- /**
11736
- * Warn if there's no key explicitly set on dynamic arrays of children or
11737
- * object keys are not valid. This allows us to keep track of children between
11738
- * updates.
11739
- */
11740
-
11741
-
11742
- var ownerHasKeyUseWarning = {};
11743
-
11744
- function getCurrentComponentErrorInfo(parentType) {
11745
- var info = getDeclarationErrorAddendum();
11746
-
11747
- if (!info) {
11748
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
11749
-
11750
- if (parentName) {
11751
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
11752
- }
11753
- }
11754
-
11755
- return info;
11756
- }
11757
- /**
11758
- * Warn if the element doesn't have an explicit key assigned to it.
11759
- * This element is in an array. The array could grow and shrink or be
11760
- * reordered. All children that haven't already been validated are required to
11761
- * have a "key" property assigned to it. Error statuses are cached so a warning
11762
- * will only be shown once.
11763
- *
11764
- * @internal
11765
- * @param {ReactElement} element Element that requires a key.
11766
- * @param {*} parentType element's parent's type.
11767
- */
11768
-
11769
-
11770
- function validateExplicitKey(element, parentType) {
11771
- if (!element._store || element._store.validated || element.key != null) {
11772
- return;
11773
- }
11774
-
11775
- element._store.validated = true;
11776
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
11777
-
11778
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
11779
- return;
11780
- }
11781
-
11782
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
11783
- // property, it may be the creator of the child that's responsible for
11784
- // assigning it a key.
11785
-
11786
- var childOwner = '';
11787
-
11788
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
11789
- // Give the component that originally created this child.
11790
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
11791
- }
11792
-
11793
- setCurrentlyValidatingElement(element);
11794
-
11795
- {
11796
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
11797
- }
11798
-
11799
- setCurrentlyValidatingElement(null);
11800
- }
11801
- /**
11802
- * Ensure that every element either is passed in a static location, in an
11803
- * array with an explicit keys property defined, or in an object literal
11804
- * with valid key property.
11805
- *
11806
- * @internal
11807
- * @param {ReactNode} node Statically passed child of any type.
11808
- * @param {*} parentType node's parent's type.
11809
- */
11810
-
11811
-
11812
- function validateChildKeys(node, parentType) {
11813
- if (typeof node !== 'object') {
11814
- return;
11815
- }
11816
-
11817
- if (Array.isArray(node)) {
11818
- for (var i = 0; i < node.length; i++) {
11819
- var child = node[i];
11820
-
11821
- if (isValidElement(child)) {
11822
- validateExplicitKey(child, parentType);
11823
- }
11824
- }
11825
- } else if (isValidElement(node)) {
11826
- // This element was passed in a valid location.
11827
- if (node._store) {
11828
- node._store.validated = true;
11829
- }
11830
- } else if (node) {
11831
- var iteratorFn = getIteratorFn(node);
11832
-
11833
- if (typeof iteratorFn === 'function') {
11834
- // Entry iterators used to provide implicit keys,
11835
- // but now we print a separate warning for them later.
11836
- if (iteratorFn !== node.entries) {
11837
- var iterator = iteratorFn.call(node);
11838
- var step;
11839
-
11840
- while (!(step = iterator.next()).done) {
11841
- if (isValidElement(step.value)) {
11842
- validateExplicitKey(step.value, parentType);
11843
- }
11844
- }
11845
- }
11846
- }
11847
- }
11848
- }
11849
- /**
11850
- * Given an element, validate that its props follow the propTypes definition,
11851
- * provided by the type.
11852
- *
11853
- * @param {ReactElement} element
11854
- */
11855
-
11856
-
11857
- function validatePropTypes(element) {
11858
- {
11859
- var type = element.type;
11860
-
11861
- if (type === null || type === undefined || typeof type === 'string') {
11862
- return;
11863
- }
11864
-
11865
- var name = getComponentName(type);
11866
- var propTypes;
11867
-
11868
- if (typeof type === 'function') {
11869
- propTypes = type.propTypes;
11870
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
11871
- // Inner props are checked in the reconciler.
11872
- type.$$typeof === REACT_MEMO_TYPE)) {
11873
- propTypes = type.propTypes;
11874
- } else {
11875
- return;
11876
- }
11877
-
11878
- if (propTypes) {
11879
- setCurrentlyValidatingElement(element);
11880
- checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
11881
- setCurrentlyValidatingElement(null);
11882
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
11883
- propTypesMisspellWarningShown = true;
11884
-
11885
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
11886
- }
11887
-
11888
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
11889
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
11890
- }
11891
- }
11892
- }
11893
- /**
11894
- * Given a fragment, validate that it can only be provided with fragment props
11895
- * @param {ReactElement} fragment
11896
- */
11897
-
11898
-
11899
- function validateFragmentProps(fragment) {
11900
- {
11901
- setCurrentlyValidatingElement(fragment);
11902
- var keys = Object.keys(fragment.props);
11903
-
11904
- for (var i = 0; i < keys.length; i++) {
11905
- var key = keys[i];
11906
-
11907
- if (key !== 'children' && key !== 'key') {
11908
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
11909
-
11910
- break;
11911
- }
11912
- }
11913
-
11914
- if (fragment.ref !== null) {
11915
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
11916
- }
11917
-
11918
- setCurrentlyValidatingElement(null);
11919
- }
11920
- }
11921
- function createElementWithValidation(type, props, children) {
11922
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
11923
- // succeed and there will likely be errors in render.
11924
-
11925
- if (!validType) {
11926
- var info = '';
11927
-
11928
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
11929
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
11930
- }
11931
-
11932
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
11933
-
11934
- if (sourceInfo) {
11935
- info += sourceInfo;
11936
- } else {
11937
- info += getDeclarationErrorAddendum();
11938
- }
11939
-
11940
- var typeString;
11941
-
11942
- if (type === null) {
11943
- typeString = 'null';
11944
- } else if (Array.isArray(type)) {
11945
- typeString = 'array';
11946
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
11947
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
11948
- info = ' Did you accidentally export a JSX literal instead of a component?';
11949
- } else {
11950
- typeString = typeof type;
11951
- }
11952
-
11953
- {
11954
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
11955
- }
11956
- }
11957
-
11958
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
11959
- // TODO: Drop this when these are no longer allowed as the type argument.
11960
-
11961
- if (element == null) {
11962
- return element;
11963
- } // Skip key warning if the type isn't valid since our key validation logic
11964
- // doesn't expect a non-string/function type and can throw confusing errors.
11965
- // We don't want exception behavior to differ between dev and prod.
11966
- // (Rendering will throw with a helpful message and as soon as the type is
11967
- // fixed, the key warnings will appear.)
11968
-
11969
-
11970
- if (validType) {
11971
- for (var i = 2; i < arguments.length; i++) {
11972
- validateChildKeys(arguments[i], type);
11973
- }
11974
- }
11975
-
11976
- if (type === REACT_FRAGMENT_TYPE) {
11977
- validateFragmentProps(element);
11978
- } else {
11979
- validatePropTypes(element);
11980
- }
11981
-
11982
- return element;
11983
- }
11984
- var didWarnAboutDeprecatedCreateFactory = false;
11985
- function createFactoryWithValidation(type) {
11986
- var validatedFactory = createElementWithValidation.bind(null, type);
11987
- validatedFactory.type = type;
11988
-
11989
- {
11990
- if (!didWarnAboutDeprecatedCreateFactory) {
11991
- didWarnAboutDeprecatedCreateFactory = true;
11992
-
11993
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
11994
- } // Legacy hook: remove it
11995
-
11996
-
11997
- Object.defineProperty(validatedFactory, 'type', {
11998
- enumerable: false,
11999
- get: function () {
12000
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
12001
-
12002
- Object.defineProperty(this, 'type', {
12003
- value: type
12004
- });
12005
- return type;
12006
- }
12007
- });
12008
- }
12009
-
12010
- return validatedFactory;
12011
- }
12012
- function cloneElementWithValidation(element, props, children) {
12013
- var newElement = cloneElement.apply(this, arguments);
12014
-
12015
- for (var i = 2; i < arguments.length; i++) {
12016
- validateChildKeys(arguments[i], newElement.type);
12017
- }
12018
-
12019
- validatePropTypes(newElement);
12020
- return newElement;
12021
- }
12022
-
12023
- {
12024
-
12025
- try {
12026
- var frozenObject = Object.freeze({});
12027
- var testMap = new Map([[frozenObject, null]]);
12028
- var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
12029
- // https://github.com/rollup/rollup/issues/1771
12030
- // TODO: we can remove these if Rollup fixes the bug.
12031
-
12032
- testMap.set(0, 0);
12033
- testSet.add(0);
12034
- } catch (e) {
12035
- }
12036
- }
12037
-
12038
- var createElement$1 = createElementWithValidation ;
12039
- var cloneElement$1 = cloneElementWithValidation ;
12040
- var createFactory = createFactoryWithValidation ;
12041
- var Children = {
12042
- map: mapChildren,
12043
- forEach: forEachChildren,
12044
- count: countChildren,
12045
- toArray: toArray,
12046
- only: onlyChild
12047
- };
12048
-
12049
- exports.Children = Children;
12050
- exports.Component = Component;
12051
- exports.Fragment = REACT_FRAGMENT_TYPE;
12052
- exports.Profiler = REACT_PROFILER_TYPE;
12053
- exports.PureComponent = PureComponent;
12054
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
12055
- exports.Suspense = REACT_SUSPENSE_TYPE;
12056
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
12057
- exports.cloneElement = cloneElement$1;
12058
- exports.createContext = createContext;
12059
- exports.createElement = createElement$1;
12060
- exports.createFactory = createFactory;
12061
- exports.createRef = createRef;
12062
- exports.forwardRef = forwardRef;
12063
- exports.isValidElement = isValidElement;
12064
- exports.lazy = lazy;
12065
- exports.memo = memo;
12066
- exports.useCallback = useCallback;
12067
- exports.useContext = useContext;
12068
- exports.useDebugValue = useDebugValue;
12069
- exports.useEffect = useEffect;
12070
- exports.useImperativeHandle = useImperativeHandle;
12071
- exports.useLayoutEffect = useLayoutEffect;
12072
- exports.useMemo = useMemo;
12073
- exports.useReducer = useReducer;
12074
- exports.useRef = useRef;
12075
- exports.useState = useState;
12076
- exports.version = ReactVersion;
12077
- })();
12078
- }
12079
- });
12080
-
12081
- var react = createCommonjsModule(function (module) {
12082
-
12083
- if (process.env.NODE_ENV === 'production') {
12084
- module.exports = react_production_min;
12085
- } else {
12086
- module.exports = react_development;
12087
- }
12088
- });
12089
-
12090
9935
  var dateFormatSettings = ["DD MMM yyyy", "DD/MM/yyyy", "MMM DD yyyy", "MM/DD/yyyy", "yyyy/MM/DD"];
12091
9936
  var generateDateFormat = function generateDateFormat(settingValue) {
12092
9937
  switch (settingValue) {
@@ -12102,6 +9947,8 @@ var generateDateFormat = function generateDateFormat(settingValue) {
12102
9947
  }
12103
9948
  };
12104
9949
  var formatDate = function formatDate(date, _ref, formatMore) {
9950
+ var _ref2;
9951
+
12105
9952
  var timeZone = _ref.timeZone,
12106
9953
  _ref$dateFormat = _ref.dateFormat,
12107
9954
  dateFormat = _ref$dateFormat === void 0 ? dateFormatSettings[0] : _ref$dateFormat;
@@ -12116,80 +9963,54 @@ var formatDate = function formatDate(date, _ref, formatMore) {
12116
9963
  d = d.tz(timeZone);
12117
9964
  }
12118
9965
 
12119
- return d.format(generateDateFormat(dateFormat) + " " + formatMore || "");
9966
+ return d.format((_ref2 = generateDateFormat(dateFormat) + " " + formatMore || "") === null || _ref2 === void 0 ? void 0 : _ref2.trim());
12120
9967
  };
12121
9968
 
12122
- var getTax1 = function getTax1(item, rtl) {
12123
- if (rtl === void 0) {
12124
- rtl = false;
12125
- }
12126
-
9969
+ var getTax1 = function getTax1(item) {
12127
9970
  var enableTax1 = "";
12128
9971
 
12129
9972
  if (item.enableTax1) {
12130
- if (rtl) {
12131
- enableTax1 = (item.taxRate1 || 0) + "% " + (item.taxCode1 || "Tax1");
12132
- } else {
12133
- enableTax1 = (item.taxCode1 || "Tax1") + " " + (item.taxRate1 || 0) + "%";
12134
- }
9973
+ enableTax1 = (item.taxRate1 || 0) + "% " + (item.taxCode1 || "Tax1");
12135
9974
  } else if (item.enableTax2) {
12136
9975
  enableTax1 = "";
12137
9976
  } else if (item.taxInclusive) {
12138
- if (rtl) {
12139
- enableTax1 = "0% " + (item.taxCode1 || "Tax1");
12140
- } else {
12141
- enableTax1 = (item.taxCode1 || "Tax1") + " 0%";
12142
- }
9977
+ enableTax1 = "0% " + (item.taxCode1 || "Tax1");
12143
9978
  }
12144
9979
 
12145
9980
  return enableTax1;
12146
9981
  };
12147
9982
 
12148
- var getTax2 = function getTax2(item, rtl) {
12149
- if (rtl === void 0) {
12150
- rtl = false;
12151
- }
12152
-
9983
+ var getTax2 = function getTax2(item) {
12153
9984
  if (!item.enableTax2) return "";
12154
9985
  var enableTax2 = "";
12155
9986
  var firstString = item !== null && item !== void 0 && item.enableTax1 ? " &" : "";
12156
-
12157
- if (rtl) {
12158
- enableTax2 = firstString.concat(" " + (item.taxRate2 || 0) + "% " + (item.taxCode2 || "Second Tax"));
12159
- } else {
12160
- enableTax2 = firstString.concat(" " + (item.taxCode2 || " Second Tax") + " " + (item.taxRate2 || 0) + "%");
12161
- }
12162
-
9987
+ enableTax2 = firstString.concat(" " + (item.taxRate2 || 0) + "% " + (item.taxCode2 || " Second Tax"));
12163
9988
  return enableTax2;
12164
9989
  };
12165
9990
 
12166
- var getTaxTitle = function getTaxTitle(item, isShowZero, rtl) {
9991
+ var getTaxTitle = function getTaxTitle(item, isShowZero) {
12167
9992
  if (isShowZero === void 0) {
12168
9993
  isShowZero = false;
12169
9994
  }
12170
9995
 
12171
- if (rtl === void 0) {
12172
- rtl = false;
12173
- }
12174
-
12175
9996
  if (!item.enableTax1 && !item.enableTax2 && !isShowZero) {
12176
9997
  return "Add Tax";
12177
9998
  }
12178
9999
 
12179
10000
  var enableTax1 = "";
12180
10001
  var enableTax2 = "";
12181
- var taxInclusive = item.taxInclusive ? " inclusive " : " exclusive ";
10002
+ var taxInclusive = item.taxInclusive ? " including " : " excluding ";
12182
10003
 
12183
10004
  if (!isShowZero) {
12184
- enableTax1 = getTax1(item, rtl);
12185
- enableTax2 = getTax2(item, rtl);
10005
+ enableTax1 = getTax1(item);
10006
+ enableTax2 = getTax2(item);
12186
10007
  } else {
12187
10008
  if (item.enableTax1 && item.taxRate1 > 0) {
12188
- enableTax1 = getTax1(item, rtl);
10009
+ enableTax1 = getTax1(item);
12189
10010
  }
12190
10011
 
12191
10012
  if (item.enableTax2 && item.taxRate2 > 0) {
12192
- enableTax2 = getTax2(item, rtl);
10013
+ enableTax2 = getTax2(item);
12193
10014
  }
12194
10015
 
12195
10016
  if (!enableTax1 && !enableTax2) {
@@ -12197,17 +10018,13 @@ var getTaxTitle = function getTaxTitle(item, isShowZero, rtl) {
12197
10018
  }
12198
10019
  }
12199
10020
 
12200
- if (rtl) {
12201
- return (taxInclusive + enableTax1 + enableTax2).trim();
12202
- }
12203
-
12204
- return (enableTax1 + enableTax2 + taxInclusive).trim();
10021
+ return (taxInclusive + enableTax1 + enableTax2).trim();
12205
10022
  };
12206
10023
  var endDate = function endDate(proposal, company) {
12207
- if (proposal.endDate !== null) {
12208
- return formatDate(proposal.endDate, company);
12209
- } else if (proposal.endType === "fixed_length") {
12210
- return formatDate(moment(proposal.startDate).add(proposal.contractLength, "month"), company);
10024
+ if ((proposal === null || proposal === void 0 ? void 0 : proposal.endDate) !== null) {
10025
+ return formatDate(proposal === null || proposal === void 0 ? void 0 : proposal.endDate, company);
10026
+ } else if ((proposal === null || proposal === void 0 ? void 0 : proposal.endType) === "fixed_length") {
10027
+ return formatDate(moment(proposal === null || proposal === void 0 ? void 0 : proposal.startDate).add(proposal === null || proposal === void 0 ? void 0 : proposal.contractLength, "month"), company);
12211
10028
  }
12212
10029
  };
12213
10030
 
@@ -12289,6 +10106,22 @@ var getObjectInject = function getObjectInject(arr, objectDefine) {
12289
10106
  return object;
12290
10107
  };
12291
10108
 
10109
+ var LIMIT_LENGTH = 20;
10110
+ var LIMIT_PROPOSAL_TITLE = 50;
10111
+ var getShortName = function getShortName(name, limit) {
10112
+ if (limit === void 0) {
10113
+ limit = LIMIT_LENGTH;
10114
+ }
10115
+
10116
+ var _name = name;
10117
+
10118
+ if ((name === null || name === void 0 ? void 0 : name.length) > limit) {
10119
+ _name = name.slice(0, limit).concat('...');
10120
+ }
10121
+
10122
+ return _name;
10123
+ };
10124
+
12292
10125
  var SECTION_DEFINE = [{
12293
10126
  termHeading: '',
12294
10127
  termContent: 'The following terms and conditions form the Terms of Services between <b>{companyName} (Supplier)</b> and <b>{customerName} (Customer)</b>. Please review the following terms carefully before accepting this Proposal.',
@@ -12304,31 +10137,37 @@ var language = {
12304
10137
  };
12305
10138
  var contractHtml = (function (props) {
12306
10139
  var proposal = props.proposal,
12307
- company = props.company,
10140
+ realTimeCompany = props.company,
12308
10141
  contractor = props.contractor;
12309
10142
  var lang = language[(props === null || props === void 0 ? void 0 : props.lang) || "en"];
12310
10143
  var customer = (proposal === null || proposal === void 0 ? void 0 : proposal.customer) || {};
10144
+ var frozenCompany = proposal === null || proposal === void 0 ? void 0 : proposal.company;
12311
10145
  var items = ((proposal === null || proposal === void 0 ? void 0 : proposal.serviceItems) || []).filter(function (item) {
12312
10146
  return !!(item !== null && item !== void 0 && item.name);
12313
10147
  });
12314
10148
  var sections = ((proposal === null || proposal === void 0 ? void 0 : proposal.termsAndConditions) || []).filter(function (item) {
12315
10149
  return !(item !== null && item !== void 0 && item.isTermHidden);
12316
10150
  });
10151
+
10152
+ var company = _extends({}, realTimeCompany, frozenCompany, {
10153
+ dateFormat: realTimeCompany.dateFormat || frozenCompany.dateFormat
10154
+ });
10155
+
12317
10156
  var sectionsDefine = SECTION_DEFINE;
12318
10157
  var objectDefine = {
12319
10158
  customerName: (customer === null || customer === void 0 ? void 0 : customer.companyName) || "Customer Name",
12320
10159
  companyName: (company === null || company === void 0 ? void 0 : company.name) || " Supplier Name"
12321
10160
  };
12322
- var styles = "<style>\n .pageBreak {\n page-break-inside: avoid;\n }\n #proposal-generator {\n background-color: #ffffff;\n max-width: 21cm;\n padding: 8px;\n }\n #proposal-generator hr {\n display: block;\n height: 1px;\n background: transparent;\n width: 100%;\n border: none;\n border-top: solid 2px #f0f3fb;\n margin: 16px 0;\n }\n #proposal-generator span, p, b {\n line-height: 1.5;\n }\n #proposal-generator b {\n font-size: 16px;\n font-weight: 700;\n }\n #proposal-generator table {\n width: 100%;\n }\n #proposal-generator section:not(:first-child) {\n margin-top: 40px;\n }\n #proposal-generator .section-title {\n font-size: 18px;\n font-weight: 700;\n color: #263238;\n }\n #proposal-generator .proposal-title {\n margin-bottom: 16px;\n }\n #proposal-generator .contact-title {\n font-size: 24px;\n }\n #proposal-generator .table-details {\n margin: 16px 0;\n }\n #proposal-generator .table-details tr td {\n width: 50%;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .agreement-date {\n margin-bottom: 16px;\n }\n #proposal-generator .table-service {\n border-collapse: collapse;\n }\n #proposal-generator .table-service tr {\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: 1px solid rgb(221, 221, 221);\n }\n #proposal-generator .table-service tr td {\n width: 50%;\n padding: 8px;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .table-agreement tr td {\n padding-top: 24px;\n page-break-inside: avoid;\n }\n @print {\n #proposal-generator {\n padding: 0;\n }\n }\n @media only screen and (max-width: 480px) {\n #proposal-generator{\n background-color: #ffffff;\n max-width: 21cm;\n padding: 20px;\n }\n #proposal-generator .table-details tr td {\n width: 100%;\n display: block;\n margin:10px 0px;\n }\n }\n @font-face {\n font-family: 'journal';\n src: local('journal'), url(data:font/ttf;base64," + fontJournal + ") format('truetype');\n }\n \n .signature {\n font-family: 'journal', sans-serif;\n font-size: 40px;\n font-weight: 600;\n color: #595959;\n }\n </style>";
10161
+ var styles = "<style>\n .pageBreak {\n page-break-inside: avoid;\n }\n #proposal-generator {\n background-color: #ffffff;\n max-width: 21cm;\n padding: 8px;\n }\n #proposal-generator hr {\n display: block;\n height: 1px;\n background: transparent;\n width: 100%;\n border: none;\n border-top: solid 2px #f0f3fb;\n margin: 16px 0;\n }\n #proposal-generator span, p, b {\n line-height: 1.5;\n }\n #proposal-generator b {\n font-size: 16px;\n font-weight: 700;\n }\n #proposal-generator table {\n width: 100%;\n }\n #proposal-generator section:not(:first-child) {\n margin-top: 40px;\n }\n #proposal-generator .section-title {\n font-size: 18px;\n font-weight: 700;\n color: #263238;\n }\n #proposal-generator .proposal-title {\n margin-bottom: 16px;\n }\n #proposal-generator .contact-title {\n font-size: 24px;\n }\n #proposal-generator .table-details {\n margin: 16px 0;\n }\n #proposal-generator .table-details tr td {\n width: 50%;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .agreement-date {\n margin-bottom: 16px;\n }\n #proposal-generator .table-service {\n border-collapse: collapse;\n }\n #proposal-generator .table-service tr {\n padding-top: 10px;\n padding-bottom: 10px;\n border-bottom: 1px solid rgb(221, 221, 221);\n }\n #proposal-generator .table-service tr td {\n width: 50%;\n padding: 8px;\n vertical-align: top;\n word-break: break-word;\n page-break-inside: avoid;\n }\n #proposal-generator .table-agreement tr td {\n padding-top: 24px;\n page-break-inside: avoid;\n }\n @print {\n #proposal-generator {\n padding: 0;\n }\n }\n @media only screen and (max-width: 480px) {\n #proposal-generator{\n background-color: #ffffff;\n max-width: 21cm;\n padding: 20px;\n }\n #proposal-generator .table-details tr td {\n width: 100%;\n display: block;\n margin:10px 0px;\n }\n }\n @font-face {\n font-family: 'journal';\n src: local('journal'), url(data:font/ttf;base64," + fontJournal + ") format('truetype');\n }\n \n .signature {\n font-family: 'journal', sans-serif;\n font-size: 40px;\n font-weight: 600;\n color: #595959;\n }\n .hidden-text {\n overflow: 'hidden',\n text-overflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }\n </style>";
12323
10162
  var sectionHeader = "<section>";
12324
10163
  sectionHeader += "<h2 class=\"section-title contact-title\">" + ((lang === null || lang === void 0 ? void 0 : lang.service_agreement) || "") + "</h2>";
12325
10164
  sectionHeader += "<hr />";
12326
10165
  sectionHeader += "</section>";
12327
10166
  var sectionUserInfo = "<section>";
12328
- sectionUserInfo += "<h5 class=\"section-title proposal-title\">" + ((proposal === null || proposal === void 0 ? void 0 : proposal.title) || "") + "</h5>";
10167
+ sectionUserInfo += "<h5 class=\"section-title proposal-title hidden-text\">" + getShortName((proposal === null || proposal === void 0 ? void 0 : proposal.title) || "", LIMIT_PROPOSAL_TITLE) + "</h5>";
12329
10168
  sectionUserInfo += "<span>" + ((lang === null || lang === void 0 ? void 0 : lang.details_line_1) || "") + "</span>";
12330
10169
  sectionUserInfo += "<br />";
12331
- sectionUserInfo += "<span>" + (lang === null || lang === void 0 ? void 0 : lang.details_line_2(proposal !== null && proposal !== void 0 && proposal.expirationDate ? formatDate(proposal.expirationDate, company || {}) : "")) + "</span>";
10170
+ sectionUserInfo += "<span>" + (lang === null || lang === void 0 ? void 0 : lang.details_line_2(proposal !== null && proposal !== void 0 && proposal.expirationDate ? formatDate(proposal.expirationDate, company || {}) : formatDate(new Date(), company || {}))) + "</span>";
12332
10171
  sectionUserInfo += '<table class="table-details"><tbody><tr><td>';
12333
10172
  sectionUserInfo += "<b>" + ((lang === null || lang === void 0 ? void 0 : lang.supplier_details) || "") + "</b>";
12334
10173
 
@@ -12399,9 +10238,13 @@ var contractHtml = (function (props) {
12399
10238
 
12400
10239
  if (it.billingType !== "none") {
12401
10240
  sectionServices += "<b>" + FormatCurrency$2(((it === null || it === void 0 ? void 0 : it.price) || 0) * ((it === null || it === void 0 ? void 0 : it.quantity) || 0), (company === null || company === void 0 ? void 0 : company.currency) || "USD", (company === null || company === void 0 ? void 0 : company.language) || "en", (company === null || company === void 0 ? void 0 : company.currencyFormat) || "") + "</b>";
12402
- sectionServices += !!taxTitle && " " + taxTitle + "</br>";
12403
- sectionServices += "<b>" + lang.quantity + ": " + (it.quantity || 0) + "</b></br>";
12404
- sectionServices += "<b>" + lang.total + " " + FormatCurrency$2(it.totalAmount || 0, (company === null || company === void 0 ? void 0 : company.currency) || "USD", (company === null || company === void 0 ? void 0 : company.language) || "en", (company === null || company === void 0 ? void 0 : company.currencyFormat) || "") + "</b></br>";
10241
+ sectionServices += " " + taxTitle;
10242
+ sectionServices += "</br>";
10243
+
10244
+ if (it.quantity > 1) {
10245
+ sectionServices += FormatCurrency$2((it === null || it === void 0 ? void 0 : it.price) || 0, (company === null || company === void 0 ? void 0 : company.currency) || "USD", (company === null || company === void 0 ? void 0 : company.language) || "en", (company === null || company === void 0 ? void 0 : company.currencyFormat) || "");
10246
+ sectionServices += " x " + (it.quantity || 0) + "</br>";
10247
+ }
12405
10248
  }
12406
10249
 
12407
10250
  if (it.name) {
@@ -12409,7 +10252,11 @@ var contractHtml = (function (props) {
12409
10252
  }
12410
10253
 
12411
10254
  if (it.description) {
12412
- sectionServices += "<p>" + it.description + "</p>";
10255
+ var _it$description;
10256
+
10257
+ sectionServices += "<div>";
10258
+ sectionServices += "" + (it === null || it === void 0 ? void 0 : (_it$description = it.description) === null || _it$description === void 0 ? void 0 : _it$description.replace(/(?:\r\n|\r|\n)/g, "<br />"));
10259
+ sectionServices += "</div>";
12413
10260
  }
12414
10261
 
12415
10262
  sectionServices += '</td><td align="right">';