@infuro/cms-core 1.0.62 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/admin.cjs +4 -4
  2. package/dist/admin.js +4 -4
  3. package/dist/api.cjs +38 -38
  4. package/dist/api.js +6 -6
  5. package/dist/{chunk-NMYGQWHV.js → chunk-3VZAAQUV.js} +18 -5
  6. package/dist/{chunk-R6Q67HAS.js → chunk-77YWLP4X.js} +19 -19
  7. package/dist/{chunk-AXMP2U43.cjs → chunk-7L556RGL.cjs} +3 -3
  8. package/dist/{chunk-6LV36PCL.js → chunk-BWOITUNI.js} +7 -6
  9. package/dist/{chunk-QA5C477U.cjs → chunk-CJEOH6QC.cjs} +64 -64
  10. package/dist/{chunk-6XAVZE4I.js → chunk-DTUL3Q5L.js} +1 -1
  11. package/dist/{chunk-TWTISTZB.cjs → chunk-EWXG4E74.cjs} +14 -13
  12. package/dist/{chunk-CTIEAHQL.cjs → chunk-JLDHK2QE.cjs} +18 -5
  13. package/dist/{chunk-GZGFNVTK.js → chunk-KAOHOHCA.js} +55 -40
  14. package/dist/{chunk-HMLVPIJR.js → chunk-MWEK7N3F.js} +1 -1
  15. package/dist/{chunk-LRD4CGOG.cjs → chunk-MXABMVF7.cjs} +4 -4
  16. package/dist/{chunk-LVQSG25Y.cjs → chunk-RHYVNRYG.cjs} +1 -1
  17. package/dist/{chunk-YW7EF7K7.js → chunk-RXTUSF3R.js} +2 -2
  18. package/dist/{chunk-ZPAPCGCR.cjs → chunk-YVP4NQII.cjs} +56 -41
  19. package/dist/{email-queue-J7DXYNCE.cjs → email-queue-VTYL2KFA.cjs} +7 -7
  20. package/dist/{email-queue-65PQAG4C.js → email-queue-YPRSVG56.js} +3 -3
  21. package/dist/{email-service-RDOTY3CO.cjs → email-service-ATCPJFWG.cjs} +7 -7
  22. package/dist/{email-service-F7HA4X63.js → email-service-DPKVQOKP.js} +2 -2
  23. package/dist/{emit-order-notification-trigger-K7URAZHJ.cjs → emit-order-notification-trigger-WI4HGMKH.cjs} +3 -3
  24. package/dist/{emit-order-notification-trigger-MD7EBODC.js → emit-order-notification-trigger-XVG2B5ZF.js} +1 -1
  25. package/dist/{erp-order-invoice-MYFCXOCY.js → erp-order-invoice-3UGWLICU.js} +2 -2
  26. package/dist/{erp-order-invoice-C5GZCOBM.cjs → erp-order-invoice-KJYJNWMG.cjs} +6 -6
  27. package/dist/index.cjs +246 -245
  28. package/dist/index.d.cts +8 -2
  29. package/dist/index.d.ts +8 -2
  30. package/dist/index.js +15 -14
  31. package/dist/{order-completion-otp-handlers-4EOLYLAP.cjs → order-completion-otp-handlers-IMMQGHDR.cjs} +6 -6
  32. package/dist/{order-completion-otp-handlers-3NTOGEA5.js → order-completion-otp-handlers-WGM7HWG4.js} +4 -4
  33. package/dist/{order-notification-dispatcher-X2XM5VUY.cjs → order-notification-dispatcher-5TUFCDU7.cjs} +10 -10
  34. package/dist/{order-notification-dispatcher-IYMOS4VY.js → order-notification-dispatcher-JKFQJYGG.js} +5 -5
  35. package/package.json +1 -1
@@ -3,13 +3,13 @@
3
3
  var chunkWFMVD567_cjs = require('./chunk-WFMVD567.cjs');
4
4
  var chunkXQ3QUHWR_cjs = require('./chunk-XQ3QUHWR.cjs');
5
5
  var chunkHY3AXLOI_cjs = require('./chunk-HY3AXLOI.cjs');
6
- var chunkTWTISTZB_cjs = require('./chunk-TWTISTZB.cjs');
6
+ var chunkEWXG4E74_cjs = require('./chunk-EWXG4E74.cjs');
7
7
  var chunkH3IVLIPR_cjs = require('./chunk-H3IVLIPR.cjs');
8
8
  var chunk7NMT3GBR_cjs = require('./chunk-7NMT3GBR.cjs');
9
- var chunkLRD4CGOG_cjs = require('./chunk-LRD4CGOG.cjs');
10
- var chunkAXMP2U43_cjs = require('./chunk-AXMP2U43.cjs');
9
+ var chunkMXABMVF7_cjs = require('./chunk-MXABMVF7.cjs');
10
+ var chunk7L556RGL_cjs = require('./chunk-7L556RGL.cjs');
11
11
  var chunkUPLVMVRX_cjs = require('./chunk-UPLVMVRX.cjs');
12
- var chunkCTIEAHQL_cjs = require('./chunk-CTIEAHQL.cjs');
12
+ var chunkJLDHK2QE_cjs = require('./chunk-JLDHK2QE.cjs');
13
13
  var chunk3DZRIZOD_cjs = require('./chunk-3DZRIZOD.cjs');
14
14
  var chunkTJ2MIQUT_cjs = require('./chunk-TJ2MIQUT.cjs');
15
15
  var chunk4U6DATGZ_cjs = require('./chunk-4U6DATGZ.cjs');
@@ -5239,7 +5239,7 @@ function createCrudHandler(dataSource, entityMap, options) {
5239
5239
  const orderIdForNotify = created.id;
5240
5240
  const finalCreatedStatus = String(created.status ?? createdStatus ?? "pending").toLowerCase();
5241
5241
  const initialPayStatus = String(persistBody.paymentStatus ?? body.paymentStatus ?? "unpaid").toLowerCase();
5242
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
5242
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
5243
5243
  if (finalCreatedStatus === "pending") {
5244
5244
  if (initialPayStatus === "failed") {
5245
5245
  fireOrderNotificationTrigger("payment_failed", orderIdForNotify, {
@@ -6323,7 +6323,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
6323
6323
  const payments = Array.isArray(updatedOrder.payments) ? updatedOrder.payments : [];
6324
6324
  const bodyPayStatus = rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null ? String(rawBody.paymentStatus).toLowerCase() : null;
6325
6325
  const curPayStatus = bodyPayStatus || String(payments[0]?.status || "unpaid").toLowerCase();
6326
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
6326
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
6327
6327
  if (newStatus === "pending") {
6328
6328
  if (curPayStatus === "failed") {
6329
6329
  fireOrderNotificationTrigger("payment_failed", updatedOrder.id, {
@@ -6980,7 +6980,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
6980
6980
  });
6981
6981
  }
6982
6982
  if (ordStatus === "pending" || ordStatus === "confirmed") {
6983
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
6983
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
6984
6984
  fireOrderNotificationTrigger("order_placed", pOrder, {
6985
6985
  dataSource,
6986
6986
  entityMap
@@ -6994,7 +6994,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
6994
6994
  }
6995
6995
  }
6996
6996
  } else if (newPayStatus === "failed") {
6997
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
6997
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
6998
6998
  fireOrderNotificationTrigger("payment_failed", pOrder, {
6999
6999
  dataSource,
7000
7000
  entityMap
@@ -7002,7 +7002,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
7002
7002
  }).catch(() => {
7003
7003
  });
7004
7004
  } else if (newPayStatus === "refunded") {
7005
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
7005
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
7006
7006
  fireOrderNotificationTrigger("payment_refund_initiated", pOrder, {
7007
7007
  dataSource,
7008
7008
  entityMap
@@ -7132,7 +7132,7 @@ function createCrudByIdHandler(dataSource, entityMap, options) {
7132
7132
  const payments = Array.isArray(ord.payments) ? ord.payments : [];
7133
7133
  const bodyPayStatus = rawBody && typeof rawBody === "object" && rawBody.paymentStatus != null ? String(rawBody.paymentStatus).toLowerCase() : null;
7134
7134
  const curPayStatus = bodyPayStatus || String(payments[0]?.status || "unpaid").toLowerCase();
7135
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
7135
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
7136
7136
  if (newStatus === "pending") {
7137
7137
  if (curPayStatus === "failed") {
7138
7138
  fireOrderNotificationTrigger("payment_failed", ord.id, {
@@ -10251,7 +10251,7 @@ function createFormSubmissionHandler(config) {
10251
10251
  label: f.label && String(f.label).trim() || `Field ${f.id}`,
10252
10252
  value: formatSubmissionFieldValue(data[String(f.id)])
10253
10253
  }));
10254
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
10254
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
10255
10255
  to,
10256
10256
  templateName: "formSubmission",
10257
10257
  ctx: {
@@ -10305,7 +10305,7 @@ function createUsersApiHandlers(config) {
10305
10305
  try {
10306
10306
  const cms = await getCms();
10307
10307
  const companyDetails = getCompanyDetails ? await getCompanyDetails() : {};
10308
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
10308
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
10309
10309
  to: toEmail,
10310
10310
  templateName: "invite",
10311
10311
  ctx: {
@@ -11578,7 +11578,7 @@ function createChatHandlers(config) {
11578
11578
  const notifyEmailAgent = await findLlmAgentByScope(dataSource, entityMap, LLM_AGENT_SCOPE_EMAIL_INTENT_CHATBOT, {
11579
11579
  enabledOnly: false
11580
11580
  });
11581
- const emailTool = chunkTWTISTZB_cjs.resolveChatEmailToolSettings(llmSettings, {
11581
+ const emailTool = chunkEWXG4E74_cjs.resolveChatEmailToolSettings(llmSettings, {
11582
11582
  chatbotValidationRules: agentRow?.validationRules ?? null,
11583
11583
  notifyAgent: notifyEmailAgent ? {
11584
11584
  systemInstruction: notifyEmailAgent.systemInstruction,
@@ -11588,7 +11588,7 @@ function createChatHandlers(config) {
11588
11588
  const emailPlugin2 = cms.getPlugin("email");
11589
11589
  const convLeadSent = conv.leadEmailSentAt;
11590
11590
  const chatAgentFn = llm.chatAgent?.bind(llm);
11591
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline check", {
11591
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline check", {
11592
11592
  conversationId,
11593
11593
  enabled: emailTool.enabled,
11594
11594
  intentCount: emailTool.intents.length,
@@ -11602,27 +11602,27 @@ function createChatHandlers(config) {
11602
11602
  mergedPromptIncludesNotify: Boolean(notifyEmailAgent?.systemInstruction?.trim())
11603
11603
  });
11604
11604
  if (!emailTool.enabled) {
11605
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11605
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11606
11606
  conversationId,
11607
11607
  reason: "email_tool_disabled"
11608
11608
  });
11609
11609
  } else if (emailTool.intents.length === 0) {
11610
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11610
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11611
11611
  conversationId,
11612
11612
  reason: "no_intents_configured"
11613
11613
  });
11614
11614
  } else if (!emailPlugin2) {
11615
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11615
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11616
11616
  conversationId,
11617
11617
  reason: "email_plugin_missing"
11618
11618
  });
11619
11619
  } else if (!chatAgentFn) {
11620
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11620
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11621
11621
  conversationId,
11622
11622
  reason: "llm_chat_agent_unavailable"
11623
11623
  });
11624
11624
  } else if (convLeadSent) {
11625
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11625
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11626
11626
  conversationId,
11627
11627
  reason: "lead_email_already_sent",
11628
11628
  leadEmailSentAt: convLeadSent
@@ -11635,7 +11635,7 @@ function createChatHandlers(config) {
11635
11635
  }
11636
11636
  });
11637
11637
  if (!contactRow) {
11638
- console.warn(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11638
+ console.warn(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline skipped", {
11639
11639
  conversationId,
11640
11640
  reason: "contact_not_found",
11641
11641
  contactId
@@ -11643,7 +11643,7 @@ function createChatHandlers(config) {
11643
11643
  } else {
11644
11644
  const c = contactRow;
11645
11645
  try {
11646
- const intent = await chunkTWTISTZB_cjs.detectChatLeadIntent({
11646
+ const intent = await chunkEWXG4E74_cjs.detectChatLeadIntent({
11647
11647
  chatAgent: chatAgentFn
11648
11648
  }, {
11649
11649
  settings: emailTool,
@@ -11657,15 +11657,15 @@ function createChatHandlers(config) {
11657
11657
  model: agentRow?.model?.trim() || notifyEmailAgent?.model?.trim() || void 0
11658
11658
  });
11659
11659
  if (!intent.intent || !intent.emailTo) {
11660
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "no email sent", {
11660
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "no email sent", {
11661
11661
  conversationId,
11662
11662
  reason: intent.intent ? "missing_email_to" : "no_intent_match",
11663
11663
  intentLabel: intent.intentLabel,
11664
11664
  classifierReason: intent.reason
11665
11665
  });
11666
11666
  } else {
11667
- const intentRecipients = chunkTWTISTZB_cjs.parseIntentRecipientEmails(intent.emailTo);
11668
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "intent matched \u2014 sending", {
11667
+ const intentRecipients = chunkEWXG4E74_cjs.parseIntentRecipientEmails(intent.emailTo);
11668
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "intent matched \u2014 sending", {
11669
11669
  conversationId,
11670
11670
  intent: intent.intent,
11671
11671
  emailTo: intent.emailTo,
@@ -11674,8 +11674,8 @@ function createChatHandlers(config) {
11674
11674
  });
11675
11675
  const emailSettings = await loadSettingsGroupMap(dataSource, entityMap, "email");
11676
11676
  const brandingSettings = await loadSettingsGroupMap(dataSource, entityMap, "branding");
11677
- const companyDetails = chunkCTIEAHQL_cjs.mergeEmailLayoutCompanyDetails(brandingSettings, emailSettings);
11678
- const leadResult = await chunkTWTISTZB_cjs.sendChatLeadEmail(cms, emailSettings, brandingSettings, {
11677
+ const companyDetails = chunkJLDHK2QE_cjs.mergeEmailLayoutCompanyDetails(brandingSettings, emailSettings);
11678
+ const leadResult = await chunkEWXG4E74_cjs.sendChatLeadEmail(cms, emailSettings, brandingSettings, {
11679
11679
  contactName: String(c.name ?? "").trim() || "Visitor",
11680
11680
  contactEmail: String(c.email ?? "").trim(),
11681
11681
  contactPhone: c.phone ?? null,
@@ -11683,7 +11683,7 @@ function createChatHandlers(config) {
11683
11683
  latestMessage: message,
11684
11684
  intentCode: intent.intent,
11685
11685
  intentReason: intent.intentLabel || intent.reason,
11686
- transcript: chunkTWTISTZB_cjs.buildTranscriptForLeadEmail(history, message),
11686
+ transcript: chunkEWXG4E74_cjs.buildTranscriptForLeadEmail(history, message),
11687
11687
  companyDetails,
11688
11688
  recipients: intentRecipients.length > 0 ? intentRecipients : void 0
11689
11689
  });
@@ -11691,13 +11691,13 @@ function createChatHandlers(config) {
11691
11691
  await convRepo().update(conversationId, {
11692
11692
  leadEmailSentAt: /* @__PURE__ */ new Date()
11693
11693
  });
11694
- console.info(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "lead email recorded", {
11694
+ console.info(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "lead email recorded", {
11695
11695
  conversationId,
11696
11696
  sent: true,
11697
11697
  recipients: leadResult.recipients
11698
11698
  });
11699
11699
  } else {
11700
- console.warn(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "lead email not sent", {
11700
+ console.warn(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "lead email not sent", {
11701
11701
  conversationId,
11702
11702
  sent: false,
11703
11703
  error: leadResult.error ?? "unknown",
@@ -11706,7 +11706,7 @@ function createChatHandlers(config) {
11706
11706
  }
11707
11707
  }
11708
11708
  } catch (intentErr) {
11709
- console.warn(chunkTWTISTZB_cjs.CHAT_EMAIL_LOG, "pipeline error", {
11709
+ console.warn(chunkEWXG4E74_cjs.CHAT_EMAIL_LOG, "pipeline error", {
11710
11710
  conversationId,
11711
11711
  error: intentErr instanceof Error ? intentErr.message : String(intentErr)
11712
11712
  });
@@ -11723,7 +11723,7 @@ function createChatHandlers(config) {
11723
11723
  });
11724
11724
  if (agentRow && llm.chatAgent) {
11725
11725
  const fromAgent = llmAgentToChatAgentOptions(agentRow);
11726
- const systemPrompt = chunkTWTISTZB_cjs.buildChatbotSystemPromptWithEmailTool(fromAgent.systemPrompt, parsedValidation.guardrailsForPrompt, emailTool);
11726
+ const systemPrompt = chunkEWXG4E74_cjs.buildChatbotSystemPromptWithEmailTool(fromAgent.systemPrompt, parsedValidation.guardrailsForPrompt, emailTool);
11727
11727
  const res = await llm.chatAgent({
11728
11728
  ...fromAgent,
11729
11729
  systemPrompt: systemPrompt || void 0,
@@ -11744,7 +11744,7 @@ ${contextParts.join("\n\n")}` : "";
11744
11744
  agentRow.systemInstruction?.trim(),
11745
11745
  ragSystem
11746
11746
  ].filter(Boolean).join("\n\n");
11747
- systemContent = chunkTWTISTZB_cjs.buildChatbotSystemPromptWithEmailTool(mergedBase || defaultSystem, parsedValidation.guardrailsForPrompt, emailTool) || defaultSystem;
11747
+ systemContent = chunkEWXG4E74_cjs.buildChatbotSystemPromptWithEmailTool(mergedBase || defaultSystem, parsedValidation.guardrailsForPrompt, emailTool) || defaultSystem;
11748
11748
  } else {
11749
11749
  systemContent = ragSystem || defaultSystem;
11750
11750
  }
@@ -12999,7 +12999,7 @@ function createDeviceTokensHandlers(config) {
12999
12999
  const title = body.title?.trim() || "Test Push Notification";
13000
13000
  const msgBody = body.body?.trim() || "Firebase Push Notification setup is working!";
13001
13001
  if (!token || token === "validate" || token === "validate_only") {
13002
- const valRes = await chunkTWTISTZB_cjs.validateFcmCredentials(dataSource, entityMap);
13002
+ const valRes = await chunkEWXG4E74_cjs.validateFcmCredentials(dataSource, entityMap);
13003
13003
  if (!valRes.success) {
13004
13004
  return json({
13005
13005
  success: false,
@@ -13016,7 +13016,7 @@ function createDeviceTokensHandlers(config) {
13016
13016
  clientEmail: valRes.clientEmail
13017
13017
  });
13018
13018
  }
13019
- const res = await chunkTWTISTZB_cjs.sendFcmPushNotification(dataSource, entityMap, {
13019
+ const res = await chunkEWXG4E74_cjs.sendFcmPushNotification(dataSource, entityMap, {
13020
13020
  token,
13021
13021
  title,
13022
13022
  body: msgBody,
@@ -14010,8 +14010,8 @@ async function sendVendorOnboardEmails(input, deps) {
14010
14010
  getSuperAdminEmails(deps),
14011
14011
  getVendorEmails(deps)
14012
14012
  ]);
14013
- const companyDetails = chunkCTIEAHQL_cjs.mergeEmailLayoutCompanyDetails(branding, emailSettings);
14014
- const configuredNotify = chunkTWTISTZB_cjs.parseEmailRecipientsFromConfig(emailSettings.salesTeamEmails ?? emailSettings.salesTeamEmail);
14013
+ const companyDetails = chunkJLDHK2QE_cjs.mergeEmailLayoutCompanyDetails(branding, emailSettings);
14014
+ const configuredNotify = chunkEWXG4E74_cjs.parseEmailRecipientsFromConfig(emailSettings.salesTeamEmails ?? emailSettings.salesTeamEmail);
14015
14015
  const ownerEmail = input.ownerEmail?.trim() || "";
14016
14016
  const ownerEmailLower = ownerEmail.toLowerCase();
14017
14017
  const sendToOwner = input.sendToOwner !== false;
@@ -14021,7 +14021,7 @@ async function sendVendorOnboardEmails(input, deps) {
14021
14021
  ];
14022
14022
  const notifyEmails = Array.from(new Set(combined.map((e) => e.trim().toLowerCase()).filter((e) => e && e !== ownerEmailLower && !vendorEmailSet.has(e))));
14023
14023
  const cms = await deps.getCms();
14024
- await chunkLRD4CGOG_cjs.queueVendorOnboardEmails(cms, {
14024
+ await chunkMXABMVF7_cjs.queueVendorOnboardEmails(cms, {
14025
14025
  vendorName: input.vendorName,
14026
14026
  vendorSlug: input.vendorSlug,
14027
14027
  ownerName: input.ownerName,
@@ -28637,11 +28637,11 @@ function whatsappPlugin(config = {}) {
28637
28637
  db = await settingsLoader?.() ?? {};
28638
28638
  } catch {
28639
28639
  }
28640
- if (!chunkTWTISTZB_cjs.isWhatsAppPluginEnabled(db)) {
28640
+ if (!chunkEWXG4E74_cjs.isWhatsAppPluginEnabled(db)) {
28641
28641
  context.logger.warn("WhatsApp plugin skipped: disabled in Plugins \u2192 WhatsApp");
28642
28642
  return null;
28643
28643
  }
28644
- const svc = new chunkTWTISTZB_cjs.WhatsAppService(env, staticRest, settingsLoader, getMessageTemplateRow);
28644
+ const svc = new chunkEWXG4E74_cjs.WhatsAppService(env, staticRest, settingsLoader, getMessageTemplateRow);
28645
28645
  return {
28646
28646
  send: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((opts) => svc.send(opts), "send")
28647
28647
  };
@@ -28714,7 +28714,7 @@ function createMessageTemplateRowLoader(dataSource, entityMap) {
28714
28714
  }
28715
28715
  chunkUSNT2KNT_cjs.__name(createMessageTemplateRowLoader, "createMessageTemplateRowLoader");
28716
28716
  function registerMessagingQueueProcessors(cms, entityMap) {
28717
- chunkLRD4CGOG_cjs.registerEmailQueueProcessor(cms, {
28717
+ chunkMXABMVF7_cjs.registerEmailQueueProcessor(cms, {
28718
28718
  getDataSource: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name(async () => cms.dataSource, "getDataSource"),
28719
28719
  entityMap
28720
28720
  });
@@ -28747,7 +28747,7 @@ async function ensureMessagingPluginsOnCms(base, options) {
28747
28747
  }
28748
28748
  if (!cms.getPlugin("email")) {
28749
28749
  try {
28750
- const instance = await chunkTWTISTZB_cjs.emailPlugin({
28750
+ const instance = await chunkEWXG4E74_cjs.emailPlugin({
28751
28751
  type: "SMTP",
28752
28752
  from: config.SMTP_FROM ?? "no-reply@localhost",
28753
28753
  to: config.SMTP_TO ?? ""
@@ -28788,7 +28788,7 @@ function messagingPlugins(options) {
28788
28788
  const config = options.config ?? (typeof process !== "undefined" ? process.env : {});
28789
28789
  return [
28790
28790
  queuePlugin(),
28791
- chunkTWTISTZB_cjs.emailPlugin({
28791
+ chunkEWXG4E74_cjs.emailPlugin({
28792
28792
  type: "SMTP",
28793
28793
  from: config.SMTP_FROM ?? "no-reply@localhost",
28794
28794
  to: config.SMTP_TO ?? ""
@@ -28922,7 +28922,7 @@ function createCmsApiHandler(config) {
28922
28922
  } : void 0;
28923
28923
  const entityMap = withLlmKnowledgeEntityFallbacks(rawEntityMap);
28924
28924
  if (getCms) {
28925
- chunkTWTISTZB_cjs.initWhatsappTriggerDispatcher({
28925
+ chunkEWXG4E74_cjs.initWhatsappTriggerDispatcher({
28926
28926
  dataSource,
28927
28927
  entityMap,
28928
28928
  getCms
@@ -29015,7 +29015,7 @@ function createCmsApiHandler(config) {
29015
29015
  companyDetails
29016
29016
  };
29017
29017
  if (queue) {
29018
- const { queueEmail: queueEmail2 } = await import('./email-queue-J7DXYNCE.cjs');
29018
+ const { queueEmail: queueEmail2 } = await import('./email-queue-VTYL2KFA.cjs');
29019
29019
  await queueEmail2(cms, {
29020
29020
  to: opts.to,
29021
29021
  templateName: "passwordReset",
@@ -30315,7 +30315,7 @@ function createCmsApiHandler(config) {
30315
30315
  const pe = await requireEntityPermissionEffective(req, "orders", "read");
30316
30316
  if (pe) return pe;
30317
30317
  const cms = await getCms();
30318
- const { streamOrderInvoicePdf: streamOrderInvoicePdf2 } = await import('./erp-order-invoice-C5GZCOBM.cjs');
30318
+ const { streamOrderInvoicePdf: streamOrderInvoicePdf2 } = await import('./erp-order-invoice-KJYJNWMG.cjs');
30319
30319
  const oid = Number(path2[1]);
30320
30320
  if (!Number.isFinite(oid)) return config.json({
30321
30321
  error: "Invalid id"
@@ -30697,7 +30697,7 @@ function createCmsApiHandler(config) {
30697
30697
  status: 400
30698
30698
  });
30699
30699
  }
30700
- const { resendOrderNotification } = await import('./order-notification-dispatcher-X2XM5VUY.cjs');
30700
+ const { resendOrderNotification } = await import('./order-notification-dispatcher-5TUFCDU7.cjs');
30701
30701
  const result = await resendOrderNotification(triggerKey, orderId, {
30702
30702
  dataSource,
30703
30703
  entityMap,
@@ -30796,7 +30796,7 @@ function createCmsApiHandler(config) {
30796
30796
  status: "cancelled"
30797
30797
  });
30798
30798
  const fireOrderCancelledNotification = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((refundAmount) => {
30799
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
30799
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
30800
30800
  fireOrderNotificationTrigger("order_cancelled", orderId, {
30801
30801
  dataSource,
30802
30802
  entityMap
@@ -31041,7 +31041,7 @@ function createCmsApiHandler(config) {
31041
31041
  }, {
31042
31042
  status: 400
31043
31043
  });
31044
- const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-4EOLYLAP.cjs');
31044
+ const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-IMMQGHDR.cjs');
31045
31045
  const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
31046
31046
  return handlers.getChannels(req, orderId);
31047
31047
  }
@@ -31056,7 +31056,7 @@ function createCmsApiHandler(config) {
31056
31056
  }, {
31057
31057
  status: 400
31058
31058
  });
31059
- const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-4EOLYLAP.cjs');
31059
+ const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-IMMQGHDR.cjs');
31060
31060
  const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
31061
31061
  return handlers.sendOtp(req, orderId);
31062
31062
  }
@@ -31071,7 +31071,7 @@ function createCmsApiHandler(config) {
31071
31071
  }, {
31072
31072
  status: 400
31073
31073
  });
31074
- const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-4EOLYLAP.cjs');
31074
+ const { createOrderCompletionOtpHandlers } = await import('./order-completion-otp-handlers-IMMQGHDR.cjs');
31075
31075
  const handlers = createOrderCompletionOtpHandlers(dataSource, entityMap, getCms);
31076
31076
  return handlers.verifyOtp(req, orderId);
31077
31077
  }
@@ -31519,12 +31519,12 @@ async function refreshOrderFromErp(cms, dataSource, entityMap, submission, order
31519
31519
  const r1 = await submission.postErpReadAction("get-order-status", {
31520
31520
  platformOrderId: refId
31521
31521
  });
31522
- const d1 = r1.ok ? chunkAXMP2U43_cjs.unwrapErpReadData(r1.json) : null;
31522
+ const d1 = r1.ok ? chunk7L556RGL_cjs.unwrapErpReadData(r1.json) : null;
31523
31523
  if (d1) {
31524
31524
  const mapped = mapErpSaleStatusToOrderStatus(typeof d1.status === "string" ? d1.status : typeof d1.orderStatus === "string" ? d1.orderStatus : typeof d1.state === "string" ? d1.state : void 0);
31525
31525
  if (mapped) newStatus = mapped;
31526
- fulfillment = chunkAXMP2U43_cjs.mapErpPayloadToFulfillment(d1);
31527
- const refs = chunkAXMP2U43_cjs.extractChildOrderRefsFromSalePayload(d1);
31526
+ fulfillment = chunk7L556RGL_cjs.mapErpPayloadToFulfillment(d1);
31527
+ const refs = chunk7L556RGL_cjs.extractChildOrderRefsFromSalePayload(d1);
31528
31528
  if (refs.length) {
31529
31529
  await ensureChildOrdersFromRefs(orderRepo, order, refs, order.contactId, String(order.currency || "INR"));
31530
31530
  }
@@ -31532,16 +31532,16 @@ async function refreshOrderFromErp(cms, dataSource, entityMap, submission, order
31532
31532
  const r2 = await submission.postErpReadAction("get-fulfillment-status", {
31533
31533
  platformOrderId: refId
31534
31534
  });
31535
- const d2 = r2.ok ? chunkAXMP2U43_cjs.unwrapErpReadData(r2.json) : null;
31535
+ const d2 = r2.ok ? chunk7L556RGL_cjs.unwrapErpReadData(r2.json) : null;
31536
31536
  if (d2) {
31537
- fulfillment = deepMergeFulfillment(fulfillment, chunkAXMP2U43_cjs.mapErpPayloadToFulfillment(d2));
31537
+ fulfillment = deepMergeFulfillment(fulfillment, chunk7L556RGL_cjs.mapErpPayloadToFulfillment(d2));
31538
31538
  }
31539
31539
  const r3 = await submission.postErpReadAction("get-invoice", {
31540
31540
  platformOrderId: refId
31541
31541
  });
31542
- const d3 = r3.ok ? chunkAXMP2U43_cjs.unwrapErpReadData(r3.json) : null;
31542
+ const d3 = r3.ok ? chunk7L556RGL_cjs.unwrapErpReadData(r3.json) : null;
31543
31543
  if (d3) {
31544
- invoiceNumber = chunkAXMP2U43_cjs.mapErpPayloadToInvoiceNumber(d3);
31544
+ invoiceNumber = chunk7L556RGL_cjs.mapErpPayloadToInvoiceNumber(d3);
31545
31545
  invoiceId = pickInvoiceId(d3);
31546
31546
  }
31547
31547
  const oid = order.id;
@@ -31577,10 +31577,10 @@ async function refreshOrderFromErp(cms, dataSource, entityMap, submission, order
31577
31577
  const r = await submission.postErpReadAction("get-return-status", {
31578
31578
  platformReturnId
31579
31579
  });
31580
- const d = r.ok ? chunkAXMP2U43_cjs.unwrapErpReadData(r.json) : null;
31580
+ const d = r.ok ? chunk7L556RGL_cjs.unwrapErpReadData(r.json) : null;
31581
31581
  if (!d) return;
31582
31582
  const mapped = mapErpSaleStatusToOrderStatus(typeof d.status === "string" ? d.status : typeof d.returnStatus === "string" ? d.returnStatus : void 0);
31583
- const fulfillment = chunkAXMP2U43_cjs.mapErpPayloadToFulfillment(d);
31583
+ const fulfillment = chunk7L556RGL_cjs.mapErpPayloadToFulfillment(d);
31584
31584
  const patch = {};
31585
31585
  if (fulfillment !== void 0) patch.fulfillment = fulfillment;
31586
31586
  const nextMeta = Object.keys(patch).length ? mergeOrderMetadataPatch(meta, patch) : meta;
@@ -31703,7 +31703,7 @@ function createStorefrontApiHandler(config) {
31703
31703
  const otpPepper = config.otpPepper;
31704
31704
  const defaultPhoneCc = config.defaultPhoneCountryCode;
31705
31705
  function fireOrderPlacedNotification(orderId, isPaid) {
31706
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
31706
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
31707
31707
  fireOrderNotificationTrigger("order_placed", orderId, {
31708
31708
  dataSource,
31709
31709
  entityMap
@@ -33396,7 +33396,7 @@ function createStorefrontApiHandler(config) {
33396
33396
  status: 503
33397
33397
  });
33398
33398
  const companyDetails = getCompanyDetails ? await getCompanyDetails() : {};
33399
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
33399
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
33400
33400
  to: identifier,
33401
33401
  templateName: "otp",
33402
33402
  ctx: {
@@ -33621,7 +33621,7 @@ function createStorefrontApiHandler(config) {
33621
33621
  const companyDetails = getCompanyDetails ? await getCompanyDetails() : {};
33622
33622
  const base = (publicSiteUrl || "").replace(/\/$/, "").trim() || "http://localhost:3000";
33623
33623
  const verifyEmailUrl = `${base}/verify-email?token=${encodeURIComponent(rawToken)}`;
33624
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
33624
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
33625
33625
  to: email,
33626
33626
  templateName: "signup",
33627
33627
  ctx: {
@@ -34433,7 +34433,7 @@ function createStorefrontApiHandler(config) {
34433
34433
  status: 400
34434
34434
  });
34435
34435
  const cms = await getCms();
34436
- return chunkAXMP2U43_cjs.streamOrderInvoicePdf(cms, dataSource, entityMap, orderId, {
34436
+ return chunk7L556RGL_cjs.streamOrderInvoicePdf(cms, dataSource, entityMap, orderId, {
34437
34437
  ownerContactId: contact.id
34438
34438
  });
34439
34439
  }
@@ -34640,7 +34640,7 @@ function createStorefrontApiHandler(config) {
34640
34640
  } catch {
34641
34641
  }
34642
34642
  try {
34643
- void import('./emit-order-notification-trigger-K7URAZHJ.cjs').then(({ fireOrderNotificationTrigger }) => {
34643
+ void import('./emit-order-notification-trigger-WI4HGMKH.cjs').then(({ fireOrderNotificationTrigger }) => {
34644
34644
  fireOrderNotificationTrigger("order_cancelled", orderId, {
34645
34645
  dataSource,
34646
34646
  entityMap
@@ -90,7 +90,7 @@ async function emitOrderNotificationTrigger(triggerKey, orderId, deps, extra) {
90
90
  };
91
91
  if (listenerCount === 0) {
92
92
  try {
93
- const { dispatchOrderNotificationDirectly } = await import('./order-notification-dispatcher-IYMOS4VY.js');
93
+ const { dispatchOrderNotificationDirectly } = await import('./order-notification-dispatcher-JKFQJYGG.js');
94
94
  await dispatchOrderNotificationDirectly(triggerKey, triggerPayload, deps.dataSource, deps.entityMap);
95
95
  } catch (err) {
96
96
  console.error("[notification-triggers] direct dispatch failed", {
@@ -2,9 +2,9 @@
2
2
 
3
3
  var chunkH3IVLIPR_cjs = require('./chunk-H3IVLIPR.cjs');
4
4
  var chunkUEE4PTTB_cjs = require('./chunk-UEE4PTTB.cjs');
5
- var chunkZPAPCGCR_cjs = require('./chunk-ZPAPCGCR.cjs');
6
- var chunkLRD4CGOG_cjs = require('./chunk-LRD4CGOG.cjs');
7
- var chunkCTIEAHQL_cjs = require('./chunk-CTIEAHQL.cjs');
5
+ var chunkYVP4NQII_cjs = require('./chunk-YVP4NQII.cjs');
6
+ var chunkMXABMVF7_cjs = require('./chunk-MXABMVF7.cjs');
7
+ var chunkJLDHK2QE_cjs = require('./chunk-JLDHK2QE.cjs');
8
8
  var chunkOOTLNH63_cjs = require('./chunk-OOTLNH63.cjs');
9
9
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
10
10
  var crypto = require('crypto');
@@ -1010,14 +1010,14 @@ async function sendChatLeadEmail(cms, emailSettings, brandingSettings, input) {
1010
1010
  recipients,
1011
1011
  source: input.recipients?.length ? "intent_email_to" : "crm_or_smtp_fallback"
1012
1012
  });
1013
- const companyDetails = chunkCTIEAHQL_cjs.mergeEmailLayoutCompanyDetails(brandingSettings, emailSettings);
1013
+ const companyDetails = chunkJLDHK2QE_cjs.mergeEmailLayoutCompanyDetails(brandingSettings, emailSettings);
1014
1014
  const ctx = {
1015
1015
  ...input,
1016
1016
  companyDetails: input.companyDetails ?? companyDetails
1017
1017
  };
1018
1018
  let anySent = false;
1019
1019
  for (const to of recipients) {
1020
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
1020
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
1021
1021
  to,
1022
1022
  templateName: "chatLead",
1023
1023
  ctx
@@ -1092,7 +1092,7 @@ function emailPlugin(config) {
1092
1092
  context.logger.warn("Email plugin skipped: AWS SES requires AWS_SES_REGION or AWS_REGION");
1093
1093
  return void 0;
1094
1094
  }
1095
- if (type === "AWS" && merged.region && merged.user && merged.password && !chunkZPAPCGCR_cjs.sesRegionSupportsSmtp(merged.region)) {
1095
+ if (type === "AWS" && merged.region && merged.user && merged.password && !chunkYVP4NQII_cjs.sesRegionSupportsSmtp(merged.region)) {
1096
1096
  context.logger.warn(`Email plugin: region ${merged.region} has no SES SMTP endpoint (ENOTFOUND). Set AWS_SES_REGION=ap-south-1 and create SMTP credentials in that SES region.`);
1097
1097
  }
1098
1098
  if (type === "AWS" && !(merged.user && merged.password || merged.accessKeyId && merged.secretAccessKey)) {
@@ -1107,13 +1107,13 @@ function emailPlugin(config) {
1107
1107
  context.logger.warn("Email plugin skipped: SMTP_TYPE=SMTP requires SMTP_HOST (or use SMTP_TYPE=AWS with AWS_REGION and SES SMTP credentials)");
1108
1108
  return void 0;
1109
1109
  }
1110
- const resolvedHost = type === "AWS" && merged.region ? merged.host || chunkZPAPCGCR_cjs.sesSmtpHost(merged.region) : merged.host;
1110
+ const resolvedHost = type === "AWS" && merged.region ? merged.host || chunkYVP4NQII_cjs.sesSmtpHost(merged.region) : merged.host;
1111
1111
  context.logger.info("Email plugin initialized", {
1112
1112
  type,
1113
1113
  host: resolvedHost,
1114
1114
  region: merged.region
1115
1115
  });
1116
- return new chunkZPAPCGCR_cjs.EmailService(merged);
1116
+ return new chunkYVP4NQII_cjs.EmailService(merged);
1117
1117
  }
1118
1118
  };
1119
1119
  }
@@ -1779,11 +1779,12 @@ chunkUSNT2KNT_cjs.__name(formatBodyForEmailHtml, "formatBodyForEmailHtml");
1779
1779
  async function sendEmailForTrigger(triggerKey, orderId, audienceType, variables, contactEmail, dataSource, entityMap, getCms) {
1780
1780
  const template = await loadBoundTemplate(triggerKey, "email", audienceType, dataSource, entityMap);
1781
1781
  if (!template) return;
1782
- const [branding, emailSettings] = await Promise.all([
1782
+ const [branding, emailSettings, storeSettings] = await Promise.all([
1783
1783
  getSettingsGroup(dataSource, entityMap, "branding"),
1784
- getSettingsGroup(dataSource, entityMap, "email")
1784
+ getSettingsGroup(dataSource, entityMap, "email"),
1785
+ getSettingsGroup(dataSource, entityMap, "store")
1785
1786
  ]);
1786
- const companyDetails = chunkCTIEAHQL_cjs.mergeEmailLayoutCompanyDetails(branding, emailSettings);
1787
+ const companyDetails = chunkJLDHK2QE_cjs.mergeEmailLayoutCompanyDetails(branding, emailSettings, storeSettings);
1787
1788
  const templateContent = (template.body ?? "") + (template.subject ?? "");
1788
1789
  const shouldAttachInvoice = /\{\{\s*(invoiceAttachment|invoicePdf|invoice|attachInvoice)\s*\}\}/i.test(templateContent);
1789
1790
  const cleanVariables = {
@@ -1797,12 +1798,12 @@ async function sendEmailForTrigger(triggerKey, orderId, audienceType, variables,
1797
1798
  const subject = chunkOOTLNH63_cjs.applyTemplateVars(template.subject ?? "Order update", cleanVariables);
1798
1799
  const rawBody = chunkOOTLNH63_cjs.applyTemplateVars(template.body, cleanVariables);
1799
1800
  const bodyHtml = formatBodyForEmailHtml(rawBody);
1800
- const html = chunkZPAPCGCR_cjs.renderLayout({
1801
+ const html = chunkYVP4NQII_cjs.renderLayout({
1801
1802
  bodyHtml,
1802
1803
  companyDetails
1803
1804
  });
1804
1805
  const cms = await getCms();
1805
- await chunkLRD4CGOG_cjs.queueEmail(cms, {
1806
+ await chunkMXABMVF7_cjs.queueEmail(cms, {
1806
1807
  to: contactEmail,
1807
1808
  subject,
1808
1809
  html,
@@ -38,16 +38,29 @@ function parseSocialLinksJson(raw) {
38
38
  }
39
39
  }
40
40
  chunkUSNT2KNT_cjs.__name(parseSocialLinksJson, "parseSocialLinksJson");
41
- function mergeEmailLayoutCompanyDetails(branding, emailSettings) {
41
+ function absolutizeEmailAssetUrl(url) {
42
+ const t = url?.trim();
43
+ if (!t) return void 0;
44
+ if (/^(https?:|cid:|data:)/i.test(t)) return t;
45
+ const base = (process.env.NEXTAUTH_URL || process.env.NEXT_PUBLIC_APP_URL || process.env.APP_URL || "").trim().replace(/\/$/, "");
46
+ if (!base) return t;
47
+ return `${base}${t.startsWith("/") ? t : `/${t}`}`;
48
+ }
49
+ chunkUSNT2KNT_cjs.__name(absolutizeEmailAssetUrl, "absolutizeEmailAssetUrl");
50
+ function mergeEmailLayoutCompanyDetails(branding, emailSettings, storeSettings) {
42
51
  const fromBranding = getCompanyDetailsFromSettings(branding);
43
52
  const pick = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((emailVal, fallback) => {
44
53
  const t = emailVal?.trim();
45
54
  return t || fallback?.trim() || void 0;
46
55
  }, "pick");
47
- const logoUrl = pick(emailSettings.logoUrl ?? emailSettings.emailLogoUrl, fromBranding.logoUrl);
48
- const companyName = pick(emailSettings.companyName ?? emailSettings.emailCompanyName, fromBranding.companyName);
49
- const supportEmail = pick(emailSettings.supportEmail ?? emailSettings.emailSupportEmail, fromBranding.supportEmail);
50
- const supportPhone = pick(emailSettings.supportPhone, void 0);
56
+ const storeLogo = storeSettings?.invoiceLogoUrl || storeSettings?.companyLogo || storeSettings?.logo || "";
57
+ const storeName = storeSettings?.companyName || storeSettings?.storeName || "";
58
+ const storeEmail = storeSettings?.companyEmail || "";
59
+ const storePhone = storeSettings?.companyPhone || "";
60
+ const logoUrl = absolutizeEmailAssetUrl(pick(emailSettings.logoUrl ?? emailSettings.emailLogoUrl, fromBranding.logoUrl || storeLogo));
61
+ const companyName = pick(emailSettings.companyName ?? emailSettings.emailCompanyName, fromBranding.companyName || storeName);
62
+ const supportEmail = pick(emailSettings.supportEmail ?? emailSettings.emailSupportEmail, fromBranding.supportEmail || storeEmail);
63
+ const supportPhone = pick(emailSettings.supportPhone, storePhone || void 0);
51
64
  const footerDisclaimer = pick(emailSettings.footerDisclaimer, void 0);
52
65
  const followUsTitle = pick(emailSettings.followUsTitle, "Follow Us") || "Follow Us";
53
66
  const socialFromEmail = parseSocialLinksJson(emailSettings.socialLinks);