@bookipi/htmlgenerator 1.5.26 → 1.6.0

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.
@@ -11980,14 +11980,8 @@ var PaymentInstructions = function PaymentInstructions(_ref) {
11980
11980
 
11981
11981
  var COMPANY_KEYS = ['_id', 'fax', 'contactName', 'c', 'e', 'ph', 'tfn', 'la', 'cr', 'cf', 'tz', 'ls', 'doc', 'bn', 'tn', 'tn2', 'tp', 'tp2', 'ti', 'ttx', 't1d', 't2d', 'pi', 'p1', 'p2', 'p3', 'sg', 'a1', 'a2', 'a3', 'address', 'language', 'la', 'sc', 'sr', 'ai', 'ct', 'de', 'r_bs', 'r_tc', 'r_nt', 'r_deposit_due', 'r_ad', 'r_gt', 'r_po', 'r_bt', 'r_st', 'r_d', 'r_a', 'r_dc', 'r_ic', 'r_it', 'r_n', 'r_p', 'r_q', 'r_sb', 'r_sp', 'r_tt', 'r_pi', 'r_inv', 'r_est', 'r_crd', 'r_dd', 'df', 'lg', 'hasPaymentInstructionQRCode', 'updatedAt', 'payment_in_progress'];
11982
11982
 
11983
- var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'csd', 'tz', 'sent'];
11983
+ var DOCUMENT_KEYS = ['_id', 'ad', 'ty', 'cu', 'd', 'dd', 'rn', 'it', 'st', 'tx', 'tx2', 'tt', 'dc', 'dcp', 'dcpo', 'sp', 'sntx', 'tp', 'tp2', 'tn', 'tn2', 'tax1BaseAmount', 'tax2BaseAmount', 'ti', 'ttx', 't1d', 't2d', 'pm', 'sca', 'hangingAmount', 'depositAmount', 'um', 'shouldShowPaymentInstructions', 'customization', 'asi', 'no', 'proposal', 'd', 'rd', 'di', 'pon', 'pma', 'depositDue', 'noteHtml', 'nt', 'tc', 'sd', 'cs', 'a1', 'a2', 'a3', 't2di', 'dco', 'csd', 'tz', 'sent'];
11984
11984
 
11985
- var escapeHtml = function escapeHtml(str) {
11986
- if (str === void 0) {
11987
- str = '';
11988
- }
11989
- return String(str).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;');
11990
- };
11991
11985
  Object.fromEntries = Object.fromEntries || function (arr) {
11992
11986
  return arr.reduce(function (acc, curr) {
11993
11987
  acc[curr[0]] = curr[1];
@@ -13464,7 +13458,7 @@ var subscriptionInvoiceHtml = (function (_ref) {
13464
13458
  var color = isDiscount ? '#C81E1E' : 'inherit';
13465
13459
  var label = isDiscount ? defaultLang.discount + " (" + title + ")" : title;
13466
13460
  if (isDiscount && total === 0) return '';
13467
- return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">" + label + "</div>\n </div>\n <div style=\"font-size:16px;color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13461
+ return "\n <div class=\"invoice-order-item\">\n <div class=\"invoice-order-details\">\n <div>\n <div class=\"invoice-spacing invoice-body3\" style=\"color:" + color + ";\">" + label + "</div>\n " + (item.description && item.description !== item.name && item.description.trim() !== '' ? "<div class=\"invoice-item-details\">" + item.description + "</div>" : '') + "\n </div>\n <div style=\"font-size:16px;color:" + color + ";\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n ";
13468
13462
  };
13469
13463
  var renderItems = function renderItems(items) {
13470
13464
  var rendered = '';
@@ -13483,7 +13477,7 @@ var subscriptionInvoiceHtml = (function (_ref) {
13483
13477
  };
13484
13478
  var hasAddressLine = (address === null || address === void 0 ? void 0 : address.address1) || (address === null || address === void 0 ? void 0 : address.address2) || (address === null || address === void 0 ? void 0 : address.address3);
13485
13479
  var hasAddress = (address === null || address === void 0 ? void 0 : address.city) || (address === null || address === void 0 ? void 0 : address.zip) || (address === null || address === void 0 ? void 0 : address.country);
13486
- var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n <style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display:flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n .invoice-content {\n padding: 40px 30px;\n }\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n }\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n .invoice-body {\n color: color: rgb(15, 23, 42);\n font-size: 16px;\n }\n .invoice-company {\n text-align: right;\n }\n .invoice-spacing {\n margin-bottom: 4px;\n }\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n .invoice-subtitle4 {\n font-size: 10px;\n }\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n text-align: left;\n }\n .invoice-customer-email {\n margin-left: 8px;\n }\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n .invoice-tax {\n display: flex;\n justify-content:space-between;\n margin-top: 8px;\n }\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n .invoice-bill-to {\n display: none;\n }\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n .invoice-company {\n text-align: left;\n }\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n .invoice-header, .invoice-summary {\n margin-bottom: 20px;\n }\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n .invoice-content {\n padding: 20px 30px;\n }\n .invoice-bill-to {\n display: flex;\n }\n }\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n .footer-action {\n margin-bottom: 12px;\n }\n footer {\n margin: 30px 0;\n }\n footer p {\n margin-top: 0;\n }\n }\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n .bookipay-invoice {\n max-width: 100%;\n }\n @page { margin: 0; }\n body { margin: 1.6cm; }\n }\n </style>\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=\"" + vendorLogoUrl + "\" />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">" + vendorName + "</div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">" + defaultLang.invoiceNo + "</div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">" + date + "</div>\n </div>\n </div>\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems(invoiceItems) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">\n " + defaultLang.totalCharged + "</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n </div>\n <div class=\"invoice-footer invoice-subtitle2\" style=\"font-size: 12px;\">\n <img class=\"invoice-footer-logo\" src=\"" + vendorLogoUrl + "\" />\n <!-- TODO: Dynamic company info -->\n <p>\xA92023 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13480
+ var html = "\n " + (includeHtmlWrapper ? '<!DOCTYPE html>\n<html>\n<head>\n<meta charset="utf-8">\n<title>Invoice</title>' : '') + "\n <style>\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=Lato:wght@400;700&display=swap');\n .bookipay-invoice {\n width: 100%;\n max-width: 600px;\n background-color: white;\n display:flex;\n border-radius: 16px;\n flex-direction: column;\n overflow: hidden;\n font-family: 'Inter', sans-serif;\n line-height: 1.2;\n color: black;\n font-size: 16px;\n }\n .invoice-content {\n padding: 40px 30px;\n }\n .invoice-header {\n display: flex;\n padding: 10px;\n margin-bottom: 40px;\n justify-content: space-between;\n }\n .invoice-footer {\n padding: 30px 38px 40px;\n background-color: rgb(245, 246, 250);\n }\n .invoice-footer p {\n display: block;\n margin: 0;\n }\n .invoice-footer-logo {\n height: 20px;\n margin-bottom: 12px;\n }\n .invoice-logo {\n object-fit: contain;\n max-height: 52px;\n width: auto;\n height: auto;\n }\n .invoice-body {\n color: color: rgb(15, 23, 42);\n font-size: 16px;\n }\n .invoice-company {\n text-align: right;\n }\n .invoice-spacing {\n margin-bottom: 4px;\n }\n .invoice-semi-bold {\n color: rgb(15, 23, 42);\n font-weight: 600;\n font-size: 16px;\n }\n .invoice-bold {\n font-family: 'Lato', sans-serif;\n color: black;\n font-weight: 700;\n font-size: 20px;\n }\n .invoice-subtitle {\n color: rgba(0, 0, 0, 0.6);\n font-size: 14px;\n }\n .invoice-subtitle2 {\n color: rgb(147, 154, 172);\n font-size: 14px;\n }\n .invoice-subtitle3 {\n color: rgb(100, 116, 139);\n font-size: 14px;\n }\n .invoice-subtitle4 {\n font-size: 10px;\n }\n .invoice-summary {\n background-color: rgb(245, 246, 250);\n padding: 32px 24px;\n border-radius: 16px;\n margin-bottom: 40px;\n }\n .invoice-summary-total {\n display: flex;\n margin-top: 24px;\n flex-direction: column;\n }\n .invoice-summary-customer {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n text-align: left;\n }\n .invoice-customer-email {\n margin-left: 8px;\n }\n .invoice-order-header {\n padding: 8px 0;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.06);\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-container {\n display: flex;\n justify-content: space-between;\n }\n .invoice-order-item {\n padding: 12px 0px 5px;\n }\n .invoice-order-details {\n display: flex;\n justify-content: space-between;\n }\n .invoice-item-details {\n color: rgb(100, 116, 139);\n font-size: 14px;\n margin-top: 4px;\n }\n .invoice-tax {\n display: flex;\n justify-content:space-between;\n margin-top: 8px;\n }\n .invoice-payment {\n display: flex;\n padding: 12px 0px 16px;\n justify-content: space-between;\n border-top: 1px solid rgba(0, 0, 0, 0.06);\n margin-top: 15px;\n }\n .invoice-card {\n display: flex;\n padding: 8px 0px;\n }\n .invoice-card img {\n height: 24px;\n margin-right: 6px;\n }\n .invoice-bill-to {\n display: none;\n }\n @media (max-width: 600px) {\n .bookipay-invoice {\n border-radius: 0;\n }\n }\n @media (max-width: 799px) {\n .invoice-header {\n flex-direction: column;\n padding: 10px 0;\n }\n .invoice-company {\n text-align: left;\n }\n .invoice-logo {\n max-width: 100px;\n margin-bottom: 16px;\n }\n .invoice-header, .invoice-summary {\n margin-bottom: 20px;\n }\n .invoice-summary {\n margin-left: -30px;\n margin-right: -30px;\n border-radius: 0;\n padding: 32px 30px;\n }\n .invoice-content {\n padding: 20px 30px;\n }\n .invoice-bill-to {\n display: flex;\n }\n }\n @media (max-width: 399px) {\n .footer-actions {\n flex-direction: column;\n }\n .footer-action {\n margin-bottom: 12px;\n }\n footer {\n margin: 30px 0;\n }\n footer p {\n margin-top: 0;\n }\n }\n @media print {\n * {\n color-adjust: exact;\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n .invoice-footer {\n width: 100%;\n max-width: 100%;\n margin: 0;\n }\n .bookipay-invoice {\n max-width: 100%;\n }\n @page { margin: 0; }\n body { margin: 1.6cm; }\n }\n </style>\n <div class=\"bookipay-invoice\">\n <div class=\"invoice-content\">\n <div class=\"invoice-header\">\n <img class=\"invoice-logo\" src=\"" + vendorLogoUrl + "\" />\n <div class=\"invoice-company\">\n <div class=\"invoice-company-name invoice-semi-bold invoice-spacing\">" + vendorName + "</div>\n <div class=\"invoice-number invoice-subtitle invoice-spacing\">" + defaultLang.invoiceNo + "</div>\n <div class=\"invoice-date invoice-subtitle invoice-spacing\">" + date + "</div>\n </div>\n </div>\n <div class=\"invoice-summary\">\n <div class=\"invoice-summary-customer\">\n <div>\n <div class=\"invoice-bold invoice-spacing\">" + companyName + "</div>\n " + (businessNumber ? "<div class=\"invoice-subtitle2\">" + businessNumber + "</div>" : '') + "\n " + (hasAddressLine ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.address1, address.address2, address.address3]) + "\n </div>" : '') + "\n " + (hasAddress ? "<div class=\"invoice-subtitle2\">\n " + renderAddressItems([address.city, address.zip, address.country]) + "\n </div>" : '') + "\n </div>\n <div class=\"invoice-customer-email invoice-subtitle2\">" + email + "</div>\n </div>\n <div class=\"invoice-summary-total\">\n <div class=\"invoice-subtitle3 invoice-spacing\">\n " + defaultLang.total + "\n </div>\n <div class=\"invoice-summary-total-value invoice-bold invoice-spacing\">\n " + formatPrice(total, currency) + "\n </div>\n </div>\n </div>\n <div class=\"invoice-order\">\n <div class=\"invoice-order-header\">\n <div class=\"invoice-subtitle3\">" + defaultLang.item + "</div>\n <div class=\"invoice-subtitle3\">" + defaultLang.amount + "</div>\n </div>\n <div class=\"invoice-order-item-container\">\n " + renderItems(invoiceItems) + "\n <div class=\"invoice-payment\">\n <div class=\"invoice-bold\" style=\"font-size: 16px;\">\n " + defaultLang.totalCharged + "</div>\n <div class=\"invoice-body3\">\n <div class=\"invoice-bold invoice-spacing\" style=\"font-size: 18px;text-align: right;\">\n " + formatPrice(amountPaid, currency) + "\n </div>\n </div>\n </div>\n " + (cardBrand && cardNumber ? "\n <div class=\"invoice-card\">\n <img src=" + cardLogo + " alt=" + cardBrand + " />\n <div class=\"invoice-semi-bold\" style=\"font-weight: 400;\">\n " + (cardBrand.charAt(0).toUpperCase() + cardBrand.slice(1)) + " \u2022\u2022\u2022\u2022 " + cardNumber + "\n </div>\n </div>\n " : '') + "\n </div>\n </div>\n </div>\n <div class=\"invoice-footer invoice-subtitle2\" style=\"font-size: 12px;\">\n <img class=\"invoice-footer-logo\" src=\"" + vendorLogoUrl + "\" />\n <!-- TODO: Dynamic company info -->\n <p>\xA92023 Bookipi Pty Ltd.</p>\n <p>9 George St, North Strathfield NSW 2137, Australia</p>\n <p>ABN: 91617668185</p>\n </div>\n </div>\n " + (includeHtmlWrapper ? '</body></html>' : '') + "\n ";
13487
13481
  return {
13488
13482
  html: html
13489
13483
  };
@@ -13699,22 +13693,7 @@ var TaxTable = function TaxTable(_ref) {
13699
13693
  return '';
13700
13694
  }
13701
13695
  var taxName1 = document.tn;
13702
- var items = document.it || [];
13703
- var amountOf10Tax = items.reduce(function (acc, item) {
13704
- if (item.tx) {
13705
- return acc + item.t;
13706
- } else {
13707
- return acc;
13708
- }
13709
- }, 0);
13710
- var amountOf8Tax = items.reduce(function (acc, item) {
13711
- if (item.tx2) {
13712
- return acc + item.t;
13713
- } else {
13714
- return acc;
13715
- }
13716
- }, 0);
13717
- var taxTable = html$B(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n <div>", "</div>\n <div class=\"tax-table-wrapper mt-2 mb-5\">\n <table class=\"tax-table table table-sm\">\n <thead>\n <tr>\n <th>", "</th>\n <th>", "</th>\n <th>", "</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"border-top: none;\">\n ", "%", "\n </td>\n <td style=\"border-top: none;\">\n ", "\n </td>\n <td style=\"border-top: none;\">\n ", "\n </td>\n </tr>\n <tr>\n <td>\n ", "", "%", "\n </td>\n <td>\n ", "\n </td>\n <td>\n ", "\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n "])), defaultLang['reduced_tax_description'], defaultLang['tax_rate_category'], taxName1 || defaultLang['consumption_tax'], defaultLang['amount_of_tax'], document.tp, defaultLang['tax_subject'], FormatCurrencyJP(document.tx, company.cr, company.la, company.cf), FormatCurrencyJP(amountOf10Tax, company.cr, company.la, company.cf), defaultLang['reduced'], document.tp2, defaultLang['tax_subject'], FormatCurrencyJP(document.tx2, company.cr, company.la, company.cf), FormatCurrencyJP(amountOf8Tax, company.cr, company.la, company.cf));
13696
+ var taxTable = html$B(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n <div>", "</div>\n <div class=\"tax-table-wrapper mt-2 mb-5\">\n <table class=\"tax-table table table-sm\">\n <thead>\n <tr>\n <th>", "</th>\n <th>", "</th>\n <th>", "</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td style=\"border-top: none;\">\n ", "%", "\n </td>\n <td style=\"border-top: none;\">\n ", "\n </td>\n <td style=\"border-top: none;\">\n ", "\n </td>\n </tr>\n <tr>\n <td>\n ", "", "%", "\n </td>\n <td>\n ", "\n </td>\n <td>\n ", "\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n "])), defaultLang['reduced_tax_description'], defaultLang['tax_rate_category'], taxName1 || defaultLang['consumption_tax'], defaultLang['amount_of_tax'], document.tp, defaultLang['tax_subject'], FormatCurrencyJP(document.tx, company.cr, company.la, company.cf), FormatCurrencyJP(document.tax1BaseAmount || 0, company.cr, company.la, company.cf), defaultLang['reduced'], document.tp2, defaultLang['tax_subject'], FormatCurrencyJP(document.tx2, company.cr, company.la, company.cf), FormatCurrencyJP(document.tax2BaseAmount || 0, company.cr, company.la, company.cf));
13718
13697
  return taxTable;
13719
13698
  };
13720
13699
 
@@ -14087,324 +14066,5 @@ var InvoiceCompatHtml$1 = function InvoiceCompatHtml(_ref) {
14087
14066
  });
14088
14067
  };
14089
14068
 
14090
- var DEFAULT_IMAGE = 'https://s3.amazonaws.com/bookipi.com/assets/img/proposal-templates/member-placeholder.png';
14091
- var getImage = function getImage(imageSrc) {
14092
- return (imageSrc === null || imageSrc === void 0 ? void 0 : imageSrc.regular) || (imageSrc === null || imageSrc === void 0 ? void 0 : imageSrc.small) || DEFAULT_IMAGE;
14093
- };
14094
- var getFontResources = function getFontResources(fontFamily) {
14095
- var fam = (fontFamily || '').toString();
14096
- var resources = {
14097
- fontStack: '',
14098
- links: []
14099
- };
14100
- switch (fam) {
14101
- case 'Inter':
14102
- resources.fontStack = 'Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif';
14103
- resources.links.push('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
14104
- break;
14105
- case 'Castoro':
14106
- resources.fontStack = 'Castoro, Georgia, serif';
14107
- resources.links.push('https://fonts.googleapis.com/css2?family=Castoro:ital@0;1&display=swap');
14108
- break;
14109
- case 'Baloo':
14110
- resources.fontStack = 'Baloo, system-ui, -apple-system, Arial, sans-serif';
14111
- resources.links.push('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&display=swap');
14112
- break;
14113
- case 'Delius':
14114
- resources.fontStack = 'Delius, cursive, system-ui, -apple-system, Arial';
14115
- resources.links.push('https://fonts.googleapis.com/css2?family=Delius&display=swap');
14116
- break;
14117
- case 'ZCOOL KuaiLe':
14118
- resources.fontStack = '"ZCOOL KuaiLe", sans-serif';
14119
- resources.links.push('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&display=swap');
14120
- break;
14121
- default:
14122
- resources.fontStack = 'Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif';
14123
- resources.links.push('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
14124
- }
14125
- return resources;
14126
- };
14127
- var getThemeColors = function getThemeColors(theme) {
14128
- var colors = {
14129
- light: {
14130
- background: '#ffffff',
14131
- subtitle: '#111827',
14132
- text: '#111827',
14133
- title: '#111827'
14134
- },
14135
- dark: {
14136
- background: '#111827',
14137
- subtitle: '#ffffff',
14138
- text: '#ffffff',
14139
- title: '#ffffff'
14140
- }
14141
- };
14142
- return colors[theme] || colors.light;
14143
- };
14144
- var increaseHexColorIntensity = function increaseHexColorIntensity(hex, amount) {
14145
- if (amount === void 0) {
14146
- amount = 40;
14147
- }
14148
- if (typeof hex !== 'string' || !/^#?([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/.test(hex)) {
14149
- throw new Error('Invalid hex color format!');
14150
- }
14151
- var color = hex.replace('#', '');
14152
- if (color.length === 3) {
14153
- color = color.split('').map(function (c) {
14154
- return c + c;
14155
- }).join('');
14156
- }
14157
- var num = parseInt(color, 16);
14158
- var r = Math.min(255, (num >> 16) + amount);
14159
- var g = Math.min(255, (num >> 8 & 0x00ff) + amount);
14160
- var b = Math.min(255, (num & 0x0000ff) + amount);
14161
- return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
14162
- };
14163
-
14164
- var _templateObject$O, _templateObject2$p, _templateObject3$b, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7;
14165
- var html$L = String.raw;
14166
- var coverHtml = function coverHtml(_ref) {
14167
- var slide = _ref.slide,
14168
- customizationStyle = _ref.customizationStyle,
14169
- themeColors = _ref.themeColors;
14170
- var background = customizationStyle.background,
14171
- layout = customizationStyle.layout,
14172
- title = customizationStyle.title,
14173
- subtitle = customizationStyle.subtitle;
14174
- var titleAlignment = title.alignment,
14175
- titleName = title.name,
14176
- titlePosition = title.position;
14177
- var subtitleAlignment = subtitle.alignment,
14178
- subtitleName = subtitle.name,
14179
- subtitlePosition = subtitle.position;
14180
- var titleHtml = html$L(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n <h1\n class=\"cover-title\"\n style=\"font-size:40px; text-align: ", ";\"\n >\n ", "\n </h1>\n "])), titleAlignment || 'left', (slide === null || slide === void 0 ? void 0 : slide.title) || titleName);
14181
- var subtitleHtml = slide.subtitle ? html$L(_templateObject2$p || (_templateObject2$p = _taggedTemplateLiteralLoose(["\n <p\n class=\"cover-subtitle\"\n style=\"font-size:20px; text-align: ", ";\"\n >\n ", "\n </p>\n "])), subtitleAlignment || 'left', slide.subtitle || subtitleName) : '';
14182
- var topContent = "\n " + (titlePosition === 'top' ? titleHtml : '') + "\n " + (subtitlePosition === 'top' ? subtitleHtml : '') + "\n ";
14183
- var centerContent = "\n " + (titlePosition === 'center' ? titleHtml : '') + "\n " + (subtitlePosition === 'center' ? subtitleHtml : '') + "\n ";
14184
- var bottomContent = "\n " + (titlePosition === 'bottom' ? titleHtml : '') + "\n " + (subtitlePosition === 'bottom' ? subtitleHtml : '') + "\n ";
14185
- if (layout === 'split') {
14186
- var _background$left, _background$right, _background$left2, _background$right2, _background$right3;
14187
- var leftIsImage = ((_background$left = background.left) === null || _background$left === void 0 ? void 0 : _background$left.type) === 'image';
14188
- var rightIsImage = ((_background$right = background.right) === null || _background$right === void 0 ? void 0 : _background$right.type) === 'image';
14189
- var leftBgStyle = leftIsImage ? "background-image:url(" + escapeHtml(background.left.url) + ")" : (_background$left2 = background.left) !== null && _background$left2 !== void 0 && _background$left2.value ? "background:" + escapeHtml(background.left.value) : '';
14190
- var rightBgStyle = rightIsImage ? "background-image:url(" + escapeHtml(background.right.url) + ")" : (_background$right2 = background.right) !== null && _background$right2 !== void 0 && _background$right2.value ? "background:" + escapeHtml(background.right.value) : '';
14191
- var outerSplitStyle = '';
14192
- if (leftIsImage) {
14193
- outerSplitStyle = "background-image:url(" + escapeHtml(background.left.url) + ")";
14194
- } else if (rightIsImage) {
14195
- outerSplitStyle = "background-image:url(" + escapeHtml(background.right.url) + ")";
14196
- } else if ((_background$right3 = background.right) !== null && _background$right3 !== void 0 && _background$right3.value) {
14197
- outerSplitStyle = "background:" + escapeHtml(background.right.value);
14198
- } else {
14199
- outerSplitStyle = "background:" + escapeHtml(themeColors.background);
14200
- }
14201
- return html$L(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n <div class=\"slide split\" style=\"", "\">\n <!-- ensure theme background color sits behind split-inner as a reliable fallback -->\n <div\n class=\"slide-bg\"\n style=\"background-color:", "\"\n ></div>\n <div class=\"split-inner\">\n <div class=\"left-content\" style=\"", "\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n ", "\n </div>\n </div>\n "])), outerSplitStyle, escapeHtml(themeColors.background), leftBgStyle, topContent, centerContent, bottomContent, rightIsImage ? html$L(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["<div class=\"right-image\">\n <img src=\"", "\" alt=\"\" />\n </div>"])), escapeHtml(background.right.url)) : html$L(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["<div class=\"right-image\" style=\"", "\"></div>"])), rightBgStyle));
14202
- }
14203
- var isImage = background.type === 'image';
14204
- var hasOverlay = isImage && background.overlay;
14205
- var bgStyle = '';
14206
- if (isImage) {
14207
- bgStyle = "background-image:" + (hasOverlay ? "linear-gradient(" + escapeHtml(background.overlay) + "," + escapeHtml(background.overlay) + "), " : '') + "url(" + escapeHtml(background.value || '') + ")";
14208
- } else if (background.type === 'color') {
14209
- bgStyle = "background:" + escapeHtml(background.value || '');
14210
- } else {
14211
- bgStyle = '';
14212
- }
14213
- return html$L(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\" style=\"", "\">\n ", "\n <div class=\"cover-inner\">\n <div class=\"cover-row cover-top\">", "</div>\n <div class=\"cover-center\">\n <div style=\"width:100%\">", "</div>\n </div>\n <div class=\"cover-row cover-bottom\">", "</div>\n </div>\n </div>\n "])), bgStyle, isImage ? html$L(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["<img\n class=\"slide-bg\"\n src=\"", "\"\n />"])), escapeHtml(background.value || '')) : '', topContent, centerContent, bottomContent);
14214
- };
14215
-
14216
- var _templateObject$P, _templateObject2$q, _templateObject3$c, _templateObject4$2, _templateObject5$2, _templateObject6$2;
14217
- var html$M = String.raw;
14218
- var bulletHtml = function bulletHtml(_ref) {
14219
- var slide = _ref.slide,
14220
- _ref$customizationSty = _ref.customizationStyle,
14221
- customizationStyle = _ref$customizationSty === void 0 ? {} : _ref$customizationSty;
14222
- var items = (slide.bullets || []).slice(0, 3);
14223
- if (!items.length) {
14224
- return html$M(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), escapeHtml(slide.title));
14225
- }
14226
- var accentColor = customizationStyle.accentColor;
14227
- var markerBg = increaseHexColorIntensity(accentColor, 10);
14228
- var markerBorder = increaseHexColorIntensity(accentColor, 100);
14229
- var listItems = items.map(function (item) {
14230
- var title = (item === null || item === void 0 ? void 0 : item.title) || '';
14231
- var desc = (item === null || item === void 0 ? void 0 : item.description) || '';
14232
- return html$M(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px;\"\n >\n <span\n style=\"width:12px;height:12px;border-radius:50%;background:", ";border:3px solid ", ";position:relative;z-index:2;align-self:flex-start;display:block;flex-shrink:0;margin-bottom:8px;margin-left:8px;\"\n ></span>\n <div style=\"min-width:0;\">\n ", "\n ", "\n </div>\n </li>\n "])), escapeHtml(markerBg), escapeHtml(markerBorder), title ? html$M(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["<h3\n class=\"subtitle\"\n style=\"margin:0 0 6px;font-weight:600;\"\n >\n ", "\n </h3>"])), escapeHtml(title)) : '', desc ? html$M(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["<p\n class=\"text\"\n style=\"margin:0;color:var(--theme-text-color);\"\n >\n ", "\n </p>"])), escapeHtml(desc)) : '');
14233
- }).join('');
14234
- var ulHtml = html$M(_templateObject5$2 || (_templateObject5$2 = _taggedTemplateLiteralLoose(["<ul\n class=\"bullets-ul\"\n style=\"display:flex;gap:24px;list-style:none;padding:0;margin:16px 0 0;justify-content:center;width:auto;\"\n >\n ", "\n </ul>"])), listItems);
14235
- return html$M(_templateObject6$2 || (_templateObject6$2 = _taggedTemplateLiteralLoose(["<div class=\"slide slide--bullet\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])), escapeHtml(slide.title || ''), ulHtml);
14236
- };
14237
-
14238
- var _templateObject$Q, _templateObject2$r;
14239
- var html$N = String.raw;
14240
- var highlightTextHtml = function highlightTextHtml(_ref) {
14241
- var _ref$slide = _ref.slide,
14242
- slide = _ref$slide === void 0 ? {} : _ref$slide;
14243
- var paragraphs = String(slide.text || '').split('\n').map(function (p) {
14244
- return "<p>" + escapeHtml(p) + "</p>";
14245
- }).join('');
14246
- var contentStyle = 'height:100%;padding:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;box-sizing:border-box;';
14247
- var titleStyle = 'font-size:48px;margin:0 0 12px;text-align:center;';
14248
- var textWrapStyle = 'margin-top:16px;font-size:20px;text-align:center;';
14249
- return html$N(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\" style=\"", "\">\n <h1 class=\"title\" style=\"", "\">", "</h1>\n ", "\n </div>\n </div>\n "])), contentStyle, titleStyle, escapeHtml(slide.title), paragraphs ? html$N(_templateObject2$r || (_templateObject2$r = _taggedTemplateLiteralLoose(["<div class=\"text\" style=\"", "\">", "</div>"])), textWrapStyle, paragraphs) : '');
14250
- };
14251
-
14252
- var _templateObject$R, _templateObject2$s, _templateObject3$d, _templateObject4$3;
14253
- var html$O = String.raw;
14254
- var imagesHtml = function imagesHtml(_ref) {
14255
- var _ref$slide = _ref.slide,
14256
- slide = _ref$slide === void 0 ? {} : _ref$slide;
14257
- var rawSources = slide.imageSources || [];
14258
- var sources = rawSources.map(function (source) {
14259
- return getImage(source);
14260
- }).filter(Boolean);
14261
- if (!sources.length) {
14262
- return html$O(_templateObject$R || (_templateObject$R = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), escapeHtml(slide.title || ''));
14263
- }
14264
- if (sources.length === 1) {
14265
- var imgUrl = escapeHtml(sources[0] || '');
14266
- var alt = escapeHtml(slide.title || '');
14267
- return html$O(_templateObject2$s || (_templateObject2$s = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <img class=\"slide-bg\" src=\"", "\" alt=\"", "\" />\n </div>\n "])), imgUrl, alt);
14268
- }
14269
- var imagesRow = sources.map(function (src) {
14270
- var s = escapeHtml(src);
14271
- return html$O(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n <div\n style=\"flex:1;min-width:0;display:flex;align-items:center;justify-content:center;\"\n >\n <img\n src=\"", "\"\n style=\"width:100%;height:100%;object-fit:cover;display:block;\"\n />\n </div>\n "])), s);
14272
- }).join('');
14273
- return html$O(_templateObject4$3 || (_templateObject4$3 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"slide-bg\" style=\"display:flex;inset:0;position:absolute;\">\n ", "\n </div>\n </div>\n "])), imagesRow);
14274
- };
14275
-
14276
- var _templateObject$S, _templateObject2$t, _templateObject3$e, _templateObject4$4, _templateObject5$3;
14277
- var html$P = String.raw;
14278
- var processHtml = function processHtml(_ref) {
14279
- var slide = _ref.slide,
14280
- _ref$customizationSty = _ref.customizationStyle,
14281
- customizationStyle = _ref$customizationSty === void 0 ? {} : _ref$customizationSty,
14282
- customizationTheme = _ref.customizationTheme;
14283
- var items = (slide.steps || []).slice(0, 3);
14284
- if (!items.length) {
14285
- return html$P(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), escapeHtml(slide.title || ''));
14286
- }
14287
- var accentColor = customizationStyle.accentColor;
14288
- var markerBg = increaseHexColorIntensity(accentColor, 100);
14289
- var markerColor = increaseHexColorIntensity(accentColor, 10);
14290
- var borderColor = customizationTheme === 'dark' ? 'rgba(255,255,255,0.12)' : 'rgba(0,0,0,0.08)';
14291
- var listItems = items.map(function (item, index) {
14292
- var title = typeof item === 'string' ? '' : (item === null || item === void 0 ? void 0 : item.title) || '';
14293
- var desc = typeof item === 'string' ? item : (item === null || item === void 0 ? void 0 : item.description) || '';
14294
- return html$P(_templateObject2$t || (_templateObject2$t = _taggedTemplateLiteralLoose(["\n <li\n style=\"flex:1;display:flex;flex-direction:column;box-sizing:border-box;position:relative;\"\n >\n <span\n style=\"position:absolute;top:-16px;left:-4px;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:", ";color:", ";font-weight:700;transform:translateY(-50%);margin-bottom:16px;\"\n >\n ", "\n </span>\n <div>\n ", "\n ", "\n </div>\n </li>\n "])), escapeHtml(markerBg), escapeHtml(markerColor), String(index + 1), title ? html$P(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["<h3\n class=\"subtitle\"\n style=\"margin:0 0 6px;font-weight:600;\"\n >\n ", "\n </h3>"])), escapeHtml(title)) : '', desc ? html$P(_templateObject4$4 || (_templateObject4$4 = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"margin:0;padding:8px 0 0;\">\n ", "\n </p>"])), escapeHtml(desc)) : '');
14295
- }).join('');
14296
- return html$P(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n <div class=\"slide slide--process\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n <ul\n class=\"bullets-ul\"\n style=\"display:flex;gap:24px;list-style:none;padding:16px 0 0;margin:16px 0 0;justify-content:center;width:auto;border-top:1px solid ", ";\"\n >\n ", "\n </ul>\n </div>\n </div>\n "])), escapeHtml(slide.title), escapeHtml(borderColor), listItems);
14297
- };
14298
-
14299
- var _templateObject$T, _templateObject2$u, _templateObject3$f, _templateObject4$5;
14300
- var html$Q = String.raw;
14301
- var teamMemberHtml = function teamMemberHtml(_ref) {
14302
- var _ref$slide = _ref.slide,
14303
- slide = _ref$slide === void 0 ? {} : _ref$slide;
14304
- var members = (slide.teamMembers || []).slice(0, 3);
14305
- if (!members.length) {
14306
- return html$Q(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n </div>\n </div>\n "])), escapeHtml(slide.title || ''));
14307
- }
14308
- var isRow = members.length > 1;
14309
- var imageStyle = isRow ? 'height:auto;' : 'max-height:30%;';
14310
- var memberHtml = members.map(function (member) {
14311
- var name = (member === null || member === void 0 ? void 0 : member.name) || '';
14312
- var role = (member === null || member === void 0 ? void 0 : member.role) || '';
14313
- var bio = (member === null || member === void 0 ? void 0 : member.bio) || '';
14314
- var img = getImage(member === null || member === void 0 ? void 0 : member.imageSource) || '';
14315
- return html$Q(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n <div\n style=\"flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;box-sizing:border-box;\"\n >\n <span class=\"subtitle\" style=\"margin:0;font-weight:600;\"\n >", "</span\n >\n <span class=\"text\" style=\"margin:0;color:var(--theme-text-color);\"\n >", "</span\n >\n <div\n style=\"display:flex;flex-direction:column;align-items:flex-start;width:100%;\"\n >\n <img\n src=\"", "\"\n alt=\"", "-avatar\"\n style=\"border-radius:8px;flex-shrink:0;max-width:100%;", "object-fit:contain;\"\n />\n ", "\n </div>\n </div>\n "])), escapeHtml(name), escapeHtml(role), escapeHtml(img), escapeHtml(name), imageStyle, bio ? html$Q(_templateObject3$f || (_templateObject3$f = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"margin:0;text-align:left;\">\n ", "\n </p>"])), escapeHtml(bio)) : '');
14316
- }).join('');
14317
- return html$Q(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n <div class=\"slide\">\n <div class=\"content\" style=\"align-items:flex-start;\">\n <h2 class=\"title\" style=\"text-align:left;\">\n ", "\n </h2>\n <div style=\"display:flex;gap:24px;margin-top:16px;width:100%;\">\n ", "\n </div>\n </div>\n </div>\n "])), escapeHtml(slide.title || ''), memberHtml);
14318
- };
14319
-
14320
- var _templateObject$U, _templateObject2$v, _templateObject3$g, _templateObject4$6, _templateObject5$4;
14321
- var html$R = String.raw;
14322
- var textWithImageHtml = function textWithImageHtml(_ref) {
14323
- var _ref$slide = _ref.slide,
14324
- slide = _ref$slide === void 0 ? {} : _ref$slide,
14325
- themeColors = _ref.themeColors;
14326
- var rawImg = slide.imageSources[0];
14327
- if (!rawImg) {
14328
- return html$R(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["<div class=\"slide\">\n <div class=\"content\">\n <h2 class=\"title\">", "</h2>\n ", "\n </div>\n </div>"])), escapeHtml(slide.title || ''), slide.text ? html$R(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["<p class=\"text\">", "</p>"])), escapeHtml(slide.text)) : '');
14329
- }
14330
- var img = getImage(rawImg);
14331
- var imgUrl = escapeHtml(img);
14332
- var bg = escapeHtml(themeColors);
14333
- return html$R(_templateObject3$g || (_templateObject3$g = _taggedTemplateLiteralLoose(["<div class=\"slide split\">\n <div class=\"slide-bg\" style=\"background-color:", "\"></div>\n <div class=\"split-inner\">\n <div class=\"right-image\" style=\"width:50%;\">\n <img src=\"", "\" alt=\"\" />\n </div>\n <div class=\"left-content\" style=\"width:50%;box-sizing:border-box;\">\n ", "\n ", "\n </div>\n </div>\n </div>"])), bg, imgUrl, slide.title ? html$R(_templateObject4$6 || (_templateObject4$6 = _taggedTemplateLiteralLoose(["<h2 class=\"title\" style=\"text-align:left;margin:0 0 12px;\">\n ", "\n </h2>"])), escapeHtml(slide.title)) : '', slide.text ? html$R(_templateObject5$4 || (_templateObject5$4 = _taggedTemplateLiteralLoose(["<p class=\"text\" style=\"text-align:left;margin:0;\">\n ", "\n </p>"])), escapeHtml(slide.text)) : '');
14334
- };
14335
-
14336
- var _templateObject$V;
14337
- var html$S = String.raw;
14338
- var presentationStyle = function presentationStyle(_ref) {
14339
- var _ref$fontStack = _ref.fontStack,
14340
- fontStack = _ref$fontStack === void 0 ? 'Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif' : _ref$fontStack,
14341
- _ref$theme = _ref.theme,
14342
- theme = _ref$theme === void 0 ? {
14343
- background: '#ffffff',
14344
- title: '#111827',
14345
- subtitle: '#111827',
14346
- text: '#111827'
14347
- } : _ref$theme;
14348
- return html$S(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n <style>\n :root {\n --slide-width: 1600px;\n --slide-height: 900px;\n --rounded: 24px;\n --theme-bg: ", ";\n --theme-title-color: ", ";\n --theme-subtitle-color: ", ";\n --theme-text-color: ", ";\n --print-width: 29.7cm; /* A4 long side (landscape width) */\n --print-height: 21cm; /* A4 short side (landscape height) */\n }\n @page {\n size: var(--print-width) var(--print-height);\n margin: 0;\n }\n\n @media print {\n html,\n body {\n height: 100%;\n margin: 0 !important;\n padding: 0 !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slides-export {\n padding: 0 !important;\n margin: 0 !important;\n gap: 0 !important;\n align-items: stretch !important;\n display: block !important;\n }\n .slide {\n width: var(--print-width) !important;\n height: var(--print-height) !important;\n box-shadow: none !important;\n border-radius: 0 !important;\n overflow: hidden !important;\n margin: 0 !important;\n page-break-inside: avoid !important;\n break-inside: avoid !important;\n page-break-after: always !important;\n break-after: page !important;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide + .slide {\n page-break-before: always !important;\n break-before: page !important;\n }\n .slide:first-child {\n page-break-before: auto !important;\n }\n .slide:last-child {\n page-break-after: auto !important;\n }\n .slide-bg {\n position: absolute !important;\n inset: 0 !important;\n width: 100% !important;\n height: 100% !important;\n }\n .slide img.slide-bg,\n .right-image img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover !important;\n display: block !important;\n }\n * {\n -webkit-print-color-adjust: exact;\n print-color-adjust: exact;\n }\n }\n body {\n background: var(--theme-bg);\n margin: 0;\n padding: 0;\n }\n .slides-export {\n font-family: ", ";\n padding: 40px;\n display: flex;\n flex-direction: column;\n gap: 32px;\n align-items: center;\n }\n .slide {\n position: relative;\n width: var(--slide-width);\n height: var(--slide-height);\n border-radius: var(--rounded);\n background: var(--theme-bg);\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n page-break-inside: avoid;\n break-inside: avoid;\n page-break-after: always;\n break-after: page;\n -webkit-transform: none !important;\n transform: none !important;\n }\n .slide:last-child {\n page-break-after: auto;\n break-after: auto;\n }\n .slide.split {\n display: flex;\n }\n .split-inner {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n display: flex;\n }\n .cover-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n z-index: 1;\n }\n .cover-row {\n width: 100%;\n padding: 0 64px;\n box-sizing: border-box;\n }\n .cover-center {\n flex: 1 1 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 64px;\n box-sizing: border-box;\n }\n .cover-title {\n font-weight: 700;\n margin: 0 0 12px;\n font-size: 64px;\n color: var(--theme-title-color);\n }\n .cover-subtitle {\n margin: 0;\n font-size: 28px;\n color: var(--theme-subtitle-color);\n }\n .left-content {\n flex: 1 1 50%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n z-index: 1;\n }\n .right-image {\n width: 50%;\n min-width: 0;\n background-position: center;\n background-size: cover;\n z-index: 0;\n }\n .right-image img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n }\n .slide-bg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: cover;\n z-index: 0;\n }\n .content {\n position: relative;\n z-index: 1;\n width: 100%;\n box-sizing: border-box;\n padding: 40px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n }\n .page-number {\n position: absolute;\n top: 12px;\n right: 16px;\n font-size: 14px;\n color: var(--theme-subtitle-color);\n background: rgba(255,255,255,0.0);\n padding: 4px 8px;\n border-radius: 6px;\n z-index: 3;\n pointer-events: none;\n }\n .slide--bullet .content {\n align-items: flex-start;\n }\n .slide--bullet .subtitle,\n .slide--bullet .text {\n text-align: left;\n }\n .slide--bullet .bullets-ul {\n margin-top: 24px;\n }\n .slide--process .content {\n align-items: flex-start;\n }\n .slide--process .subtitle,\n .slide--process .text {\n text-align: left;\n }\n .slide--process .bullets-ul {\n margin-top: 24px;\n }\n .title {\n font-weight: 700;\n font-size: 36px;\n margin: 0 0 8px;\n text-align: center;\n color: var(--theme-title-color);\n }\n .subtitle {\n font-weight: 500;\n font-size: 28px;\n margin: 0;\n text-align: center;\n color: var(--theme-subtitle-color);\n }\n .text {\n font-size: 20px;\n margin-top: 12px;\n text-align: center;\n color: var(--theme-text-color);\n }\n .bullets {\n padding-left: 24px;\n font-size: 20px;\n }\n .image-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n }\n .image-wrapper img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n }\n @media (max-width: 1200px) {\n :root {\n --slide-width: 960px;\n --slide-height: 540px;\n }\n .title {\n font-size: 36px;\n }\n }\n @media (max-width: 720px) {\n :root {\n --slide-width: 360px;\n --slide-height: 640px;\n }\n .title {\n font-size: 28px;\n }\n }\n </style>\n"])), theme.background, theme.title, theme.subtitle, theme.text, fontStack);
14349
- };
14350
-
14351
- var _templateObject$W, _templateObject2$w, _templateObject3$h, _templateObject4$7, _templateObject5$5;
14352
- var htmlRaw$3 = String.raw;
14353
- var presentationHtml = function presentationHtml(_ref) {
14354
- var _ref$customizationSty = _ref.customizationStyle,
14355
- customizationStyle = _ref$customizationSty === void 0 ? {} : _ref$customizationSty,
14356
- _ref$customizationThe = _ref.customizationTheme,
14357
- customizationTheme = _ref$customizationThe === void 0 ? 'light' : _ref$customizationThe,
14358
- presentation = _ref.presentation;
14359
- var font = customizationStyle.font;
14360
- var _ref2 = presentation != null ? presentation : {},
14361
- slides = _ref2.slides,
14362
- metadata = _ref2.metadata;
14363
- slides = slides || [];
14364
- var showPageNumber = metadata === null || metadata === void 0 ? void 0 : metadata.showPageNumber;
14365
- if (!slides.length) {
14366
- return htmlRaw$3(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["<div>No slides available</div>"])));
14367
- }
14368
- slides = sanitize(slides);
14369
- var _getFontResources = getFontResources(font.family),
14370
- fontStack = _getFontResources.fontStack,
14371
- fontLinks = _getFontResources.links;
14372
- var themeColors = getThemeColors(customizationTheme);
14373
- var slideRenderers = {
14374
- bullet_points: bulletHtml,
14375
- cover: coverHtml,
14376
- highlight_text: highlightTextHtml,
14377
- images: imagesHtml,
14378
- process: processHtml,
14379
- team_member: teamMemberHtml,
14380
- text_with_image: textWithImageHtml
14381
- };
14382
- var withPageNumber = function withPageNumber(html, index) {
14383
- if (!showPageNumber) return html;
14384
- return html.replace(/(<div class="slide[^>]*>)/, "$1<div class=\"page-number\">" + (index + 1) + "</div>");
14385
- };
14386
- var innerContent = slides.map(function (slide, index) {
14387
- var renderer = slideRenderers[slide.type];
14388
- var rendered = renderer ? renderer({
14389
- customizationStyle: customizationStyle,
14390
- customizationTheme: customizationTheme,
14391
- slide: slide,
14392
- themeColors: themeColors
14393
- }) : htmlRaw$3(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteralLoose(["<div class=\"slide\"><div class=\"content\"><h2>", "</h2></div></div>"])), slide.title);
14394
- if (!rendered) {
14395
- rendered = htmlRaw$3(_templateObject3$h || (_templateObject3$h = _taggedTemplateLiteralLoose([""])));
14396
- }
14397
- return withPageNumber(rendered, index);
14398
- }).join('\n');
14399
- var css = presentationStyle({
14400
- fontStack: fontStack,
14401
- theme: themeColors
14402
- });
14403
- var fontLinkTags = fontLinks.map(function (href) {
14404
- return htmlRaw$3(_templateObject4$7 || (_templateObject4$7 = _taggedTemplateLiteralLoose(["<link rel=\"stylesheet\" href=\"", "\" />"])), href);
14405
- }).join('');
14406
- return htmlRaw$3(_templateObject5$5 || (_templateObject5$5 = _taggedTemplateLiteralLoose(["<!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n ", "\n ", "\n </head>\n <body>\n <div class=\"slides-export\">\n ", "\n </div>\n </body>\n </html>"])), fontLinkTags, css, innerContent);
14407
- };
14408
-
14409
- export { contractHtml as ContractHtml, InvoiceCompatHtml, InvoiceCompatHtml$1 as InvoiceCompatJapanHtml, invoiceHtml as InvoiceHtml, invoiceHtml$1 as InvoiceJapanHtml, presentationHtml as PresentationHtml, subscriptionInvoiceHtml as SubscriptionInvoiceHtml, renderOldLayout as invoiceHtmlWithDetails, renderNewLayout as invoiceHtmlWithDetailsNew, renderLayout as invoiceJapanHtmlWithDetails, renderLayout as renderJapanInvoice, renderNewLayout as renderNewInvoice, renderOldLayout as renderOldInvoice };
14069
+ export { contractHtml as ContractHtml, InvoiceCompatHtml, InvoiceCompatHtml$1 as InvoiceCompatJapanHtml, invoiceHtml as InvoiceHtml, invoiceHtml$1 as InvoiceJapanHtml, subscriptionInvoiceHtml as SubscriptionInvoiceHtml, renderOldLayout as invoiceHtmlWithDetails, renderNewLayout as invoiceHtmlWithDetailsNew, renderLayout as invoiceJapanHtmlWithDetails, renderLayout as renderJapanInvoice, renderNewLayout as renderNewInvoice, renderOldLayout as renderOldInvoice };
14410
14070
  //# sourceMappingURL=index.modern.js.map