@feedmepos/mf-connect 0.1.98-beta.72 → 0.1.98-beta.74

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 (123) hide show
  1. package/dist/{App-DpYceiwG.js → App-COUNgNnC.js} +493 -474
  2. package/dist/{AuditLogs-CG98b2qE.js → AuditLogs-CY45tdqr.js} +14 -13
  3. package/dist/{Bin-vdipv2fF.js → Bin-COrX2Oq4.js} +8 -8
  4. package/dist/{Broadcast-ChwVqheE.js → Broadcast-BQxJ8Edf.js} +89 -86
  5. package/dist/{CampaignAnalytic-4PHO849x.js → CampaignAnalytic-CSYrBckT.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DmnN4pjm.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DQUQxU1_.js} +7 -6
  7. package/dist/{Card-B6ol3PQw.js → Card-62iX4uef.js} +24 -23
  8. package/dist/{Collections-DodNIUr1.js → Collections-BxexBaGi.js} +8 -8
  9. package/dist/{Credit-CJQyAZYw.js → Credit-B5fLK5ot.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang--FqHJ7Ez.js → DateRangeChip.vue_vue_type_script_setup_true_lang-C738fOnK.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CloubCwR.js} +547 -497
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js → EffectSheet.vue_vue_type_style_index_0_lang-tFwP9_hm.js} +6 -6
  13. package/dist/{Experience-iLAKddx_.js → Experience-BReFp_Dz.js} +87 -84
  14. package/dist/{FileSaver.min-w_ExQ0py.js → FileSaver.min-o09GwL8H.js} +1 -1
  15. package/dist/{Game-DWdUbsAg.js → Game-DTDVEBrO.js} +13 -13
  16. package/dist/{GiftCardSetup-DnQ5vwxu.js → GiftCardSetup-CP7Pdqcb.js} +10 -10
  17. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-DzV35QnL.js +417 -0
  18. package/dist/Goals-BNspliQP.js +244 -0
  19. package/dist/{Grab-CFLRHs5w.js → Grab-C3xNIYzE.js} +9 -9
  20. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js → ImageInput.vue_vue_type_script_setup_true_lang-BidKqIgw.js} +1 -1
  21. package/dist/{Index-CUy4z2tS.js → Index-CRlr03xg.js} +10 -10
  22. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-hKJ41Fe_.js → LocationPicker.vue_vue_type_script_setup_true_lang-_YyfSHpE.js} +1 -1
  23. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BDmtqTVC.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CMfRL6Ef.js} +1 -1
  24. package/dist/{LoyaltyDashboard-C5o7KriA.js → LoyaltyDashboard-BQpKd2JC.js} +1213 -1170
  25. package/dist/{MainLayout-Dt0ywph3.js → MainLayout-BIVZ2S6v.js} +3 -3
  26. package/dist/{Marketing-BHwxzBZ0.js → Marketing-8SvgFvTs.js} +4 -4
  27. package/dist/{MarketingMaterialEdit-B6k4ceGx.js → MarketingMaterialEdit-DXaM4RKu.js} +6 -6
  28. package/dist/{Member-DcPZfTj6.js → Member-DucF8ody.js} +7 -7
  29. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CiiBrlHY.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CMQ1b_BI.js} +26 -25
  30. package/dist/{MemberImportHistory-DmPMuu1g.js → MemberImportHistory-BB-pNBDA.js} +7 -7
  31. package/dist/{MemberList-f9JejfNW.js → MemberList-CazaLinm.js} +14 -14
  32. package/dist/{MemberTransactions-D1YSXeX-.js → MemberTransactions-0PaBQaYk.js} +1 -1
  33. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js → MessageInput.vue_vue_type_script_setup_true_lang-Dv2rIoW2.js} +10 -10
  34. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-m7ytg0ok.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DWn3ajhn.js} +1 -1
  35. package/dist/{Mission-BaaEl5BV.js → Mission-DxH1u9Ps.js} +84 -81
  36. package/dist/{Overview-CviY55Gs.js → Overview-BcDJv-LJ.js} +4 -4
  37. package/dist/{Overview-fx-0E3b8.js → Overview-vepmOail.js} +22 -21
  38. package/dist/{Point-BfqtflbC.js → Point-LgZ_UrwI.js} +108 -99
  39. package/dist/{Promotion-Be2ogRYt.js → Promotion-CC6Drl2T.js} +96 -93
  40. package/dist/{Queue-CLSUL-Cx.js → Queue-CeYuqidN.js} +14 -13
  41. package/dist/{Record-CpTMQT7B.js → Record-B17ZYsb5.js} +9 -9
  42. package/dist/{Review-DzSDx7dY.js → Review-D6yhv3J7.js} +2 -2
  43. package/dist/{ReviewFacebookCallback-CvbPJADM.js → ReviewFacebookCallback-BAB4epr8.js} +5 -5
  44. package/dist/{ReviewGoogleCallback-DJlqMbh3.js → ReviewGoogleCallback-CZccpOLv.js} +5 -5
  45. package/dist/{Reward-DJOmd6Z5.js → Reward-PdgtYMnB.js} +16 -16
  46. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DY9fYxwc.js → RewardGroup.vue_vue_type_script_setup_true_lang-CiVHQa5M.js} +25 -24
  47. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js → RuleGroup.vue_vue_type_script_setup_true_lang-_rUcf5lG.js} +16 -15
  48. package/dist/{Segment-G6xmeEaq.js → Segment-DVK6xqb9.js} +27 -26
  49. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CiR-d0s-.js} +16 -15
  50. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWP5sGT7.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CkPnwcE1.js} +4 -4
  51. package/dist/{Setting-CKp441AW.js → Setting-D9x8t85J.js} +14 -14
  52. package/dist/{SettingAdvertisements-C4Uf-DgK.js → SettingAdvertisements-VUfOdSPw.js} +12 -12
  53. package/dist/{Settings-CTvMVwp6.js → Settings-B_cbux1z.js} +5 -5
  54. package/dist/{Store-Bzei6Xev.js → Store-BmMCgHeP.js} +28 -27
  55. package/dist/{StoreRewards-DMQNIpF5.js → StoreRewards-D_TSVQMf.js} +15 -15
  56. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-mm1jbcvo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-qMRV_p8H.js} +29 -28
  57. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DKOE5bcU.js} +2 -2
  58. package/dist/{Tier-BN32RwYr.js → Tier-BNQ_RmZV.js} +914 -922
  59. package/dist/{Title-BIhgfRUI.js → Title-DHicIYnB.js} +24 -23
  60. package/dist/{Transaction-CPjA7IN9.js → Transaction-B57Begy_.js} +2 -2
  61. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cw852iqb.js} +6 -6
  62. package/dist/Voucher-DIZfWgdX.js +837 -0
  63. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BhYXVG4z.js} +12 -12
  64. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Ce9xPwqA.js → ZodTextField.vue_vue_type_script_setup_true_lang-RnvpoPAb.js} +2 -2
  65. package/dist/{app-DAtx6aZ4.js → app-D59Y5Pmz.js} +1698 -1374
  66. package/dist/app.js +1 -1
  67. package/dist/{base.export-BtRC4aWM.js → base.export-Bp2NvmoR.js} +2 -2
  68. package/dist/{business-BZUIs8Ub.js → business-CZnoeYYk.js} +1 -1
  69. package/dist/{campaign-B6I6PuY4.js → campaign-C0od4X1k.js} +2 -2
  70. package/dist/{campaign-DKjBjV2k.js → campaign-CXR35buF.js} +103 -101
  71. package/dist/{campaign.enum-BQy3e845.js → campaign.enum-DlrjqgBa.js} +1 -1
  72. package/dist/{campaign.fn--qVJ3jeH.js → campaign.fn-bEy0au5e.js} +39 -39
  73. package/dist/{collectible.enum-vcvRFGl0.js → collectible.enum-Czi69PBO.js} +1 -1
  74. package/dist/{collection.fn-C3bMPBkC.js → collection.fn-DzPeFXPq.js} +2 -2
  75. package/dist/{currency--R6VPInw.js → currency-DktN5oXx.js} +1 -1
  76. package/dist/{duplicateCampaign-aIsX9cCi.js → duplicateCampaign-Dc_9ZYk5.js} +2 -2
  77. package/dist/{effect-CbjmtRph.js → effect-KY41iVGx.js} +1 -1
  78. package/dist/{email-addresses-DZKMnoKf.js → email-addresses-CRGGbqZn.js} +2 -2
  79. package/dist/{helper-BGqw2-RO.js → helper-BT8y_Hpb.js} +1 -1
  80. package/dist/{index-DcA0B-Y5.js → index-0awpDQm_.js} +1109 -32
  81. package/dist/{index-C22GPEM-.js → index-11j23Lx1.js} +1 -1
  82. package/dist/{index-CVvSd60O.js → index-377HHaUi.js} +1 -1
  83. package/dist/{index-CXL5WAH0.js → index-B30DDvin.js} +3 -3
  84. package/dist/{index-CVYbfRGO.js → index-BE8jnf9X.js} +1 -1
  85. package/dist/{index-FnsjvtSo.js → index-BWR1QjWQ.js} +5 -5
  86. package/dist/{index-v8Zv-2ko.js → index-BZnzbUL3.js} +10 -9
  87. package/dist/{index-Bb4TieR_.js → index-BhJpa8K-.js} +3 -3
  88. package/dist/{index-kkhrPH6s.js → index-BzKHBymK.js} +2 -2
  89. package/dist/{index-D-P90w8K.js → index-CMJp7VdE.js} +1 -1
  90. package/dist/{index-7TKoSEJ2.js → index-CTPFlKiY.js} +1124 -1124
  91. package/dist/{index-D_o9LsHU.js → index-CTe-H50U.js} +3 -3
  92. package/dist/{index-LnCoUCnx.js → index-CYgzVl3H.js} +3 -3
  93. package/dist/index-ClNPGM0y.js +166 -0
  94. package/dist/{index-LlFZ5kxi.js → index-D-V84VLW.js} +131 -119
  95. package/dist/{index-BbpqZrkB.js → index-D2FgYlbx.js} +1 -1
  96. package/dist/{index-ClP7Xy6Q.js → index-DiicsY5E.js} +1 -1
  97. package/dist/{index-BWlfW4Kr.js → index-E4B5H1FX.js} +2 -2
  98. package/dist/{index-B9DM5Vuv.js → index-G8qEVB7S.js} +2 -2
  99. package/dist/{index.esm2017-DO7bbE7J.js → index.esm2017-DKzsf5EJ.js} +1 -1
  100. package/dist/{loading-CzWOx4tE.js → loading-AuVL4WdD.js} +1 -1
  101. package/dist/{lodash-B_gr6Ayu.js → lodash-Bm8ZbAXg.js} +1 -1
  102. package/dist/{member-import-BxCrd9tq.js → member-import-Kq5CMrPF.js} +1 -1
  103. package/dist/{membership-ILB4aB4h.js → membership-8f9xLURB.js} +3 -3
  104. package/dist/{money-CpIK1N_r.js → money-JRN61MHj.js} +1 -1
  105. package/dist/{number-leVwmDCm.js → number-Dd6DRScj.js} +1 -1
  106. package/dist/{objectid-8hKuNcMN.js → objectid-_tuwJN_b.js} +2 -2
  107. package/dist/onboarding-DOPR1c3u.js +129 -0
  108. package/dist/onboardingSetup-DOR-OW92.js +17 -0
  109. package/dist/{plugins-DLIgnFIF.js → plugins-DPFr2tq7.js} +3 -3
  110. package/dist/{reward-DqT0zF01.js → reward-B-yDjlsA.js} +1 -1
  111. package/dist/{rule-DBtMGLxD.js → rule-DRN4bolS.js} +19 -18
  112. package/dist/{template-CYKGCWY4.js → template-7UtS_hVI.js} +6 -6
  113. package/dist/{timezone-Brs5nrTL.js → timezone-BmZfPTab.js} +1 -1
  114. package/dist/{transaction.fn-0ZZcVp-j.js → transaction.fn-C9WOWjoC.js} +2 -2
  115. package/dist/{trigger-LhNre1L9.js → trigger-BDKxlupM.js} +5 -5
  116. package/dist/{useMarketingMaterialActions-DbDRMmhM.js → useMarketingMaterialActions-DJ7__20D.js} +3 -3
  117. package/dist/{usePagination-DmZX0V64.js → usePagination-Czb6ZvSX.js} +1 -1
  118. package/dist/{user-CBPsvnx9.js → user-C-y46MEn.js} +1 -1
  119. package/dist/{vue-i18n-BPeSHE3c.js → vue-i18n-l6QdWh8z.js} +339 -339
  120. package/dist/{xlsx-Cm3vGmLN.js → xlsx-Dbm5Y1eY.js} +1 -1
  121. package/dist/{zod-GTEcy37q.js → zod-DciqV0cq.js} +1 -1
  122. package/package.json +1 -1
  123. package/dist/Voucher-CGJtn9bC.js +0 -444
@@ -1,45 +1,46 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, createVNode, unref, createCommentVNode, computed, onMounted, toDisplayString, createBlock, withCtx, Fragment, renderList, withModifiers, isRef, createTextVNode, normalizeClass, watchEffect, resolveDynamicComponent, toRefs, normalizeStyle, createSlots } from "vue";
2
- import { _ } from "./lodash-B_gr6Ayu.js";
3
- import { S as S6, f as Zh, z as z$1 } from "./app-DAtx6aZ4.js";
4
- import { Z as ZodHelper } from "./zod-GTEcy37q.js";
5
- import { F as FdoObjectId, z } from "./index-Bb4TieR_.js";
6
- import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-FnsjvtSo.js";
7
- import { F as FdtoCollectibleConfig } from "./index-LnCoUCnx.js";
8
- import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-DcA0B-Y5.js";
9
- import { g as F_APP_INBOX_DESTINATION, A as APP_INBOX_BODY_LIMIT, t as toDelivery, h as toLegacyMessage } from "./index-7TKoSEJ2.js";
10
- import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as addChannel, j as setMode, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-DKjBjV2k.js";
11
- import { u as useMembershipStore } from "./membership-ILB4aB4h.js";
12
- import { u as useBusinessStore } from "./business-BZUIs8Ub.js";
2
+ import { _ } from "./lodash-Bm8ZbAXg.js";
3
+ import { S as S6, f as Zh, z as z$1 } from "./app-D59Y5Pmz.js";
4
+ import { Z as ZodHelper } from "./zod-DciqV0cq.js";
5
+ import { F as FdoObjectId, z } from "./index-BhJpa8K-.js";
6
+ import { e as FdoGroup, F as F_RUNNABLE_CAMPAIGN_TYPE, f as FdtoRunnableCampaign, g as FdoCreditLoyaltyReward, h as FdtoRandomReward, i as F_MISSION_TYPE, j as FdoThresholdCreditReward, k as FdtoThresholdReward, l as FdoMission } from "./index-BWR1QjWQ.js";
7
+ import { F as FdtoCollectibleConfig } from "./index-CYgzVl3H.js";
8
+ import { a as isRuleGroup, R as RuleBuilder, s as stripRruleDtstartExceptSchedule, i as isRuleEntry, T as TEMPLATES } from "./index-0awpDQm_.js";
9
+ import { A as APP_INBOX_BODY_LIMIT, g as FdoBroadcastUrl, h as F_PUSH_DESTINATION, t as toDelivery, i as toLegacyMessage } from "./index-CTPFlKiY.js";
10
+ import { e as CHANNEL_DISPLAY_ORDER, i as isPaidChannel, f as isChannelComplete, h as addChannel, j as setMode, k as hasDraft, l as setPrimaryChannel, r as removeChannel, m as moveChannel, n as setChannelContent, o as getCampaignSummaryObject, p as normaliseBroadcastDelivery } from "./campaign-CXR35buF.js";
11
+ import { u as useMembershipStore } from "./membership-8f9xLURB.js";
12
+ import { u as useBusinessStore } from "./business-CZnoeYYk.js";
13
13
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
14
14
  import { h as hooks } from "./moment-D7p2TMB-.js";
15
- import { f as featureVersionMapping } from "./campaign.enum-BQy3e845.js";
16
- import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js";
17
- import { b as _sfc_main$A, a as _sfc_main$D, _ as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js";
18
- import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js";
19
- import { c as core, S as SvcConfig } from "./index-B9DM5Vuv.js";
20
- import { p as prompt, f as firebaseStorage } from "./plugins-DLIgnFIF.js";
15
+ import { f as featureVersionMapping } from "./campaign.enum-DlrjqgBa.js";
16
+ import { _ as _sfc_main$C } from "./ImageInput.vue_vue_type_script_setup_true_lang-BidKqIgw.js";
17
+ import { b as _sfc_main$A, a as _sfc_main$D, _ as _sfc_main$F } from "./EffectSheet.vue_vue_type_style_index_0_lang-tFwP9_hm.js";
18
+ import { _ as _sfc_main$E } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DKOE5bcU.js";
19
+ import { c as core, S as SvcConfig } from "./index-G8qEVB7S.js";
20
+ import { p as prompt, f as firebaseStorage } from "./plugins-DPFr2tq7.js";
21
21
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-CHgC5LLL.js";
22
- import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js";
23
- import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js";
24
- import { u as useI18n } from "./vue-i18n-BPeSHE3c.js";
25
- import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-LhNre1L9.js";
26
- import { D as DEFAULT_MESSAGE_VARIABLES, b as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, a as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js";
22
+ import { _ as _sfc_main$G } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-Cw852iqb.js";
23
+ import { a as _sfc_main$u, _ as _sfc_main$y } from "./RuleGroup.vue_vue_type_script_setup_true_lang-_rUcf5lG.js";
24
+ import { u as useI18n } from "./vue-i18n-l6QdWh8z.js";
25
+ import { T as TypeToTriggerOptions, _ as _sfc_main$H, b as _sfc_main$I } from "./trigger-BDKxlupM.js";
26
+ import { D as DEFAULT_MESSAGE_VARIABLES, b as _sfc_main$v, g as getSmsMessageMetrics, _ as _sfc_main$w, a as _sfc_main$x } from "./MessageInput.vue_vue_type_script_setup_true_lang-Dv2rIoW2.js";
27
27
  import { useCoreStore } from "@feedmepos/mf-common";
28
- import { c as campaignApi } from "./index-kkhrPH6s.js";
29
- import { m as membershipApi } from "./index-D_o9LsHU.js";
30
- import { m as moment } from "./index-CVYbfRGO.js";
31
- import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-DBtMGLxD.js";
32
- import { C as CountryTimezone } from "./timezone-Brs5nrTL.js";
33
- import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js";
34
- import "./index-LlFZ5kxi.js";
35
- import "./index-CXL5WAH0.js";
36
- import { a as F_GAME_TYPE } from "./collectible.enum-vcvRFGl0.js";
37
- import { u as useLoading } from "./loading-CzWOx4tE.js";
38
- import { i as initCollectibleConfig } from "./helper-BGqw2-RO.js";
39
- import { C as CollectionUtils } from "./collection.fn-C3bMPBkC.js";
28
+ import { c as campaignApi } from "./index-BzKHBymK.js";
29
+ import { m as membershipApi } from "./index-CTe-H50U.js";
30
+ import { m as moment } from "./index-BE8jnf9X.js";
31
+ import { c as calculateNextScheduleAt, R as RRule, S as SummarizeRrule, g as getRruleAnchorDate } from "./rule-DRN4bolS.js";
32
+ import { C as CountryTimezone } from "./timezone-BmZfPTab.js";
33
+ import { _ as _sfc_main$z, a as _sfc_main$B } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BhYXVG4z.js";
34
+ import "./index-D-V84VLW.js";
35
+ import "./index-B30DDvin.js";
36
+ import "./index-ClNPGM0y.js";
37
+ import { a as F_GAME_TYPE } from "./collectible.enum-Czi69PBO.js";
38
+ import { u as useLoading } from "./loading-AuVL4WdD.js";
39
+ import { i as initCollectibleConfig } from "./helper-BT8y_Hpb.js";
40
+ import { C as CollectionUtils } from "./collection.fn-DzPeFXPq.js";
40
41
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
41
42
  import { useDialog } from "@feedmepos/ui-library";
42
- import { u as useCampaignStore } from "./campaign-B6I6PuY4.js";
43
+ import { u as useCampaignStore } from "./campaign-C0od4X1k.js";
43
44
  import { a as cleanPF } from "./object-BYyQ0PZp.js";
44
45
  function campaignRefinement(e, s) {
45
46
  var i, c;
@@ -124,8 +125,8 @@ function campaignRefinement(e, s) {
124
125
  }
125
126
  ];
126
127
  n.length == l.length && n.every((r) => l.some((p) => {
127
- const h = RuleBuilder.simplify(p);
128
- return h.property === r.property && r.operator.includes(h.operator);
128
+ const v = RuleBuilder.simplify(p);
129
+ return v.property === r.property && r.operator.includes(v.operator);
129
130
  })) || s.addIssue({
130
131
  code: "custom",
131
132
  path: ["campaign", "event", "rule"],
@@ -352,7 +353,7 @@ const _hoisted_1$r = {
352
353
  d("confirm", a);
353
354
  }
354
355
  return (a, r) => {
355
- const p = resolveComponent("FmIcon"), h = resolveComponent("FmButton");
356
+ const p = resolveComponent("FmIcon"), v = resolveComponent("FmButton");
356
357
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
357
358
  createElementVNode("div", _hoisted_2$n, [
358
359
  createElementVNode("div", _hoisted_3$k, [
@@ -362,7 +363,7 @@ const _hoisted_1$r = {
362
363
  }),
363
364
  r[0] || (r[0] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Items", -1))
364
365
  ]),
365
- createVNode(h, {
366
+ createVNode(v, {
366
367
  icon: "close",
367
368
  variant: "tertiary",
368
369
  onClick: l
@@ -380,12 +381,12 @@ const _hoisted_1$r = {
380
381
  }, null, 8, ["initial-value", "filter-items"])
381
382
  ]),
382
383
  createElementVNode("div", _hoisted_5$g, [
383
- createVNode(h, {
384
+ createVNode(v, {
384
385
  variant: "secondary",
385
386
  label: "Cancel",
386
387
  onClick: l
387
388
  }),
388
- createVNode(h, {
389
+ createVNode(v, {
389
390
  variant: "primary",
390
391
  label: "Confirm Selection",
391
392
  onClick: c
@@ -397,7 +398,7 @@ const _hoisted_1$r = {
397
398
  }), _hoisted_1$q = {
398
399
  key: 0,
399
400
  class: "bg-fm-color-neutral-gray-50 border border-fm-color-neutral-gray-200 rounded-8 p-16 space-y-16"
400
- }, _hoisted_2$m = { class: "flex items-center justify-between" }, _hoisted_3$j = { class: "flex items-center gap-8" }, _hoisted_4$i = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$f = { class: "flex gap-8 items-center" }, _hoisted_6$b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$a = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$8 = { class: "flex items-center gap-12" }, _hoisted_9$8 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$8 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$6 = {
401
+ }, _hoisted_2$m = { class: "flex items-center justify-between" }, _hoisted_3$j = { class: "flex items-center gap-8" }, _hoisted_4$i = { class: "flex gap-16 items-center flex-wrap" }, _hoisted_5$f = { class: "flex gap-8 items-center" }, _hoisted_6$b = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_7$a = { class: "bg-white border border-fm-color-neutral-gray-200 rounded-8 max-h-[300px] overflow-y-auto" }, _hoisted_8$9 = { class: "flex items-center gap-12" }, _hoisted_9$9 = { class: "fm-typo-en-body-md-600" }, _hoisted_10$8 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_11$6 = {
401
402
  key: 1,
402
403
  class: "p-24 text-center"
403
404
  }, _hoisted_12$5 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_13$5 = { class: "flex justify-end gap-8 pt-8 border-t border-fm-color-neutral-gray-200" }, _sfc_main$s = /* @__PURE__ */ defineComponent({
@@ -432,10 +433,10 @@ const _hoisted_1$r = {
432
433
  }), onMounted(async () => {
433
434
  await i.store.getMenu(), p();
434
435
  });
435
- function h(u) {
436
+ function v(u) {
436
437
  c.value[u] = !c.value[u];
437
438
  }
438
- function y() {
439
+ function f() {
439
440
  const u = r.value === a.value.length;
440
441
  a.value.forEach((m) => {
441
442
  c.value[m.id] = !u;
@@ -446,18 +447,18 @@ const _hoisted_1$r = {
446
447
  c.value[u] = !1;
447
448
  });
448
449
  }
449
- function x() {
450
+ function k() {
450
451
  const u = Object.entries(c.value).filter(([, m]) => m).map(([m]) => m);
451
452
  d("confirm", u);
452
453
  }
453
- function f() {
454
+ function y() {
454
455
  d("cancel");
455
456
  }
456
- const v = computed(() => a.value.length > 0 && a.value.every(
457
+ const g = computed(() => a.value.length > 0 && a.value.every(
457
458
  (u) => c.value[u.id]
458
459
  ));
459
460
  return (u, m) => {
460
- const C = resolveComponent("FmIcon"), k = resolveComponent("FmButton"), $ = resolveComponent("FmTextField"), F = resolveComponent("FmCheckbox"), N = resolveComponent("FmListItem"), D = resolveComponent("FmList");
461
+ const C = resolveComponent("FmIcon"), x = resolveComponent("FmButton"), $ = resolveComponent("FmTextField"), F = resolveComponent("FmCheckbox"), N = resolveComponent("FmListItem"), D = resolveComponent("FmList");
461
462
  return e.visible ? (openBlock(), createElementBlock("div", _hoisted_1$q, [
462
463
  createElementVNode("div", _hoisted_2$m, [
463
464
  createElementVNode("div", _hoisted_3$j, [
@@ -467,23 +468,23 @@ const _hoisted_1$r = {
467
468
  }),
468
469
  m[2] || (m[2] = createElementVNode("h3", { class: "fm-typo-en-body-lg-600" }, "Select Categories", -1))
469
470
  ]),
470
- createVNode(k, {
471
+ createVNode(x, {
471
472
  icon: "close",
472
473
  variant: "tertiary",
473
- onClick: f
474
+ onClick: y
474
475
  })
475
476
  ]),
476
477
  m[3] || (m[3] = createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Choose which categories this discount applies to. The discount will be available for all items within the selected categories. ", -1)),
477
478
  createElementVNode("div", _hoisted_4$i, [
478
479
  createElementVNode("div", _hoisted_5$f, [
479
- createVNode(k, {
480
+ createVNode(x, {
480
481
  icon: "select_all",
481
482
  variant: "tertiary",
482
483
  size: "small",
483
- label: `${v.value ? "Deselect" : "Select"} All`,
484
- onClick: y
484
+ label: `${g.value ? "Deselect" : "Select"} All`,
485
+ onClick: f
485
486
  }, null, 8, ["label"]),
486
- createVNode(k, {
487
+ createVNode(x, {
487
488
  icon: "sync",
488
489
  variant: "tertiary",
489
490
  size: "small",
@@ -506,26 +507,26 @@ const _hoisted_1$r = {
506
507
  (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (w) => (openBlock(), createBlock(N, {
507
508
  key: w.id,
508
509
  clickable: !0,
509
- onClick: (O) => h(w.id)
510
+ onClick: (O) => v(w.id)
510
511
  }, {
511
512
  leading: withCtx(() => [
512
513
  createVNode(F, {
513
514
  "model-value": c.value[w.id] || !1,
514
515
  value: w.id,
515
- "onUpdate:modelValue": (O) => h(w.id),
516
+ "onUpdate:modelValue": (O) => v(w.id),
516
517
  onClick: m[1] || (m[1] = withModifiers(() => {
517
518
  }, ["stop"]))
518
519
  }, null, 8, ["model-value", "value", "onUpdate:modelValue"])
519
520
  ]),
520
521
  default: withCtx(() => [
521
- createElementVNode("div", _hoisted_8$8, [
522
+ createElementVNode("div", _hoisted_8$9, [
522
523
  createVNode(C, {
523
524
  name: "category",
524
525
  size: "sm",
525
526
  class: "text-fm-color-typo-secondary"
526
527
  }),
527
528
  createElementVNode("div", null, [
528
- createElementVNode("div", _hoisted_9$8, toDisplayString(w.name), 1),
529
+ createElementVNode("div", _hoisted_9$9, toDisplayString(w.name), 1),
529
530
  createElementVNode("div", _hoisted_10$8, " ID: " + toDisplayString(w.id), 1)
530
531
  ])
531
532
  ])
@@ -539,16 +540,16 @@ const _hoisted_1$r = {
539
540
  ]))
540
541
  ]),
541
542
  createElementVNode("div", _hoisted_13$5, [
542
- createVNode(k, {
543
+ createVNode(x, {
543
544
  variant: "secondary",
544
545
  label: "Cancel",
545
- onClick: f
546
+ onClick: y
546
547
  }),
547
- createVNode(k, {
548
+ createVNode(x, {
548
549
  variant: "primary",
549
550
  label: `Confirm Selection (${r.value})`,
550
551
  disabled: r.value === 0,
551
- onClick: x
552
+ onClick: k
552
553
  }, null, 8, ["label", "disabled"])
553
554
  ])
554
555
  ])) : createCommentVNode("", !0);
@@ -557,7 +558,7 @@ const _hoisted_1$r = {
557
558
  }), _hoisted_1$p = { class: "space-y-8" }, _hoisted_2$l = {
558
559
  key: 1,
559
560
  class: "border-1 rounded-md flex gap-16 items-center justify-between px-16 py-12"
560
- }, _hoisted_3$i = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$h = { class: "text-fm-color-typo-secondary" }, _hoisted_5$e = { key: 0 }, _hoisted_6$a = { class: "space-y-24" }, _hoisted_7$9 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$7 = { key: 0 }, _hoisted_9$7 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$7 = { key: 1 }, _hoisted_11$5 = { key: 2 }, _hoisted_12$4 = { key: 0 }, _hoisted_13$4 = { class: "space-y-8" }, _hoisted_14$4 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15$3 = { class: "flex items-center gap-8" }, _hoisted_16$2 = { class: "fm-typo-en-body-md-400" }, _hoisted_17$2 = { key: 3 }, _hoisted_18$2 = { key: 0 }, _hoisted_19$2 = { class: "space-y-8" }, _hoisted_20$2 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21$1 = { class: "flex items-center gap-8" }, _hoisted_22$1 = { class: "fm-typo-en-body-md-400" }, _hoisted_23$1 = {
561
+ }, _hoisted_3$i = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$h = { class: "text-fm-color-typo-secondary" }, _hoisted_5$e = { key: 0 }, _hoisted_6$a = { class: "space-y-24" }, _hoisted_7$9 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary mt-4" }, _hoisted_8$8 = { key: 0 }, _hoisted_9$8 = { class: "fm-typo-en-body-md-600 mb-8 block" }, _hoisted_10$7 = { key: 1 }, _hoisted_11$5 = { key: 2 }, _hoisted_12$4 = { key: 0 }, _hoisted_13$4 = { class: "space-y-8" }, _hoisted_14$4 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_15$3 = { class: "flex items-center gap-8" }, _hoisted_16$2 = { class: "fm-typo-en-body-md-400" }, _hoisted_17$2 = { key: 3 }, _hoisted_18$2 = { key: 0 }, _hoisted_19$2 = { class: "space-y-8" }, _hoisted_20$2 = { class: "flex items-center justify-between p-12 border border-fm-color-neutral-gray-200 fm-corner-radius-md" }, _hoisted_21$1 = { class: "flex items-center gap-8" }, _hoisted_22$1 = { class: "fm-typo-en-body-md-400" }, _hoisted_23$1 = {
561
562
  key: 0,
562
563
  class: "mt-16 p-12 bg-fm-color-feedback-error-light rounded-8 border border-fm-color-feedback-error-main"
563
564
  }, _hoisted_24$1 = { class: "flex items-center gap-8 mb-8 text-fm-color-system-error-300" }, _hoisted_25 = { class: "space-y-4" }, _hoisted_26 = { class: "flex gap-16" }, _sfc_main$r = /* @__PURE__ */ defineComponent({
@@ -585,16 +586,16 @@ const _hoisted_1$r = {
585
586
  });
586
587
  const r = computed(() => {
587
588
  var b;
588
- return !(!a.value.type || !((b = a.value.scope) != null && b.type) || y(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
589
+ return !(!a.value.type || !((b = a.value.scope) != null && b.type) || f(a.value.type) && (!a.value.value || a.value.value <= 0) || (a.value.scope.type === "items" || a.value.scope.type === "category") && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0));
589
590
  });
590
591
  async function p(b) {
591
592
  b.stopPropagation(), await prompt.remove("Are you sure you want to remove this discount?") && d("update:model-value", null);
592
593
  }
593
- function h() {
594
+ function v() {
594
595
  var b;
595
596
  return C(((b = a.value.scope) == null ? void 0 : b.type) || "order");
596
597
  }
597
- function y(b) {
598
+ function f(b) {
598
599
  return b && !["freeItem", "delivery"].includes(b);
599
600
  }
600
601
  function V(b) {
@@ -602,13 +603,13 @@ const _hoisted_1$r = {
602
603
  b
603
604
  );
604
605
  }
605
- function x(b) {
606
+ function k(b) {
606
607
  return b != null && b.includes("Percentage") ? "Discount percentage" : b != null && b.includes("FixPrice") ? "Bundle fixed price" : b === "percentage" ? "Discount percentage" : "Discount amount";
607
608
  }
608
- function f(b) {
609
+ function y(b) {
609
610
  return b != null && b.includes("Percentage") || b === "percentage" ? "10" : "5.00";
610
611
  }
611
- function v(b) {
612
+ function g(b) {
612
613
  return b != null && b.includes("Percentage") || b === "percentage" ? "%" : "$";
613
614
  }
614
615
  function u(b, B) {
@@ -629,7 +630,7 @@ const _hoisted_1$r = {
629
630
  }, b === "type") {
630
631
  const P = C(B);
631
632
  P.some(
632
- (g) => g.value === a.value.type
633
+ (h) => h.value === a.value.type
633
634
  ) || (a.value = {
634
635
  ...a.value,
635
636
  type: ((U = P[0]) == null ? void 0 : U.value) || "net",
@@ -686,7 +687,7 @@ const _hoisted_1$r = {
686
687
  ];
687
688
  }
688
689
  }
689
- function k(b) {
690
+ function x(b) {
690
691
  switch (b) {
691
692
  case "order":
692
693
  return "Applies to entire order. Available: Amount off, Percentage off, Delivery fee discount.";
@@ -713,7 +714,7 @@ const _hoisted_1$r = {
713
714
  return "No items selected";
714
715
  const B = i.menu.value;
715
716
  return B && b.length <= 3 ? b.map((P) => {
716
- const A = B.modules.item.find((g) => g._id === P);
717
+ const A = B.modules.item.find((h) => h._id === P);
717
718
  return A ? (A.name2 || A.name).trim() : `Item ${P}`;
718
719
  }).join(", ") : b.length === 1 ? "1 item selected" : `${b.length} items selected`;
719
720
  }
@@ -724,7 +725,7 @@ const _hoisted_1$r = {
724
725
  return "No categories selected";
725
726
  const B = i.menu.value;
726
727
  return B && b.length <= 3 ? b.map((P) => {
727
- const A = B.modules.category.find((g) => g._id === P);
728
+ const A = B.modules.category.find((h) => h._id === P);
728
729
  return A ? A.name : `Category ${P}`;
729
730
  }).join(", ") : b.length === 1 ? "1 category selected" : `${b.length} categories selected`;
730
731
  }
@@ -749,7 +750,7 @@ const _hoisted_1$r = {
749
750
  const G = computed(() => {
750
751
  var B, T, U;
751
752
  const b = [];
752
- return a.value.type || b.push("Discount type is required"), (B = a.value.scope) != null && B.type || b.push("Scope type is required"), y(a.value.type) && (!a.value.value || a.value.value <= 0) && b.push("Discount amount must be greater than 0"), ((T = a.value.scope) == null ? void 0 : T.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one item"), ((U = a.value.scope) == null ? void 0 : U.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one category"), b;
753
+ return a.value.type || b.push("Discount type is required"), (B = a.value.scope) != null && B.type || b.push("Scope type is required"), f(a.value.type) && (!a.value.value || a.value.value <= 0) && b.push("Discount amount must be greater than 0"), ((T = a.value.scope) == null ? void 0 : T.type) === "items" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one item"), ((U = a.value.scope) == null ? void 0 : U.type) === "category" && (!a.value.scope.objectIDs || a.value.scope.objectIDs.length === 0) && b.push("Please select at least one category"), b;
753
754
  });
754
755
  function Y() {
755
756
  d("update:model-value", a.value), c.value = !1;
@@ -760,8 +761,8 @@ const _hoisted_1$r = {
760
761
  { label: "Category discount", value: "category" }
761
762
  ];
762
763
  return (b, B) => {
763
- const T = resolveComponent("FmButton"), U = resolveComponent("FmSelect"), P = resolveComponent("FmStepperField"), A = resolveComponent("FmIcon"), g = resolveComponent("FmSideSheet");
764
- return openBlock(), createBlock(g, {
764
+ const T = resolveComponent("FmButton"), U = resolveComponent("FmSelect"), P = resolveComponent("FmStepperField"), A = resolveComponent("FmIcon"), h = resolveComponent("FmSideSheet");
765
+ return openBlock(), createBlock(h, {
765
766
  "max-width": 550,
766
767
  header: "Apply discount",
767
768
  modelValue: unref(c),
@@ -829,7 +830,7 @@ const _hoisted_1$r = {
829
830
  placeholder: "Select campaign type",
830
831
  items: Z
831
832
  }, null, 8, ["model-value"]),
832
- createElementVNode("div", _hoisted_7$9, toDisplayString(k((R = unref(a).scope) == null ? void 0 : R.type)), 1)
833
+ createElementVNode("div", _hoisted_7$9, toDisplayString(x((R = unref(a).scope) == null ? void 0 : R.type)), 1)
833
834
  ]),
834
835
  createElementVNode("div", null, [
835
836
  B[9] || (B[9] = createElementVNode("label", { class: "fm-typo-en-body-md-600 mb-8 block" }, "Discount type", -1)),
@@ -837,16 +838,16 @@ const _hoisted_1$r = {
837
838
  "model-value": unref(a).type,
838
839
  "onUpdate:modelValue": B[1] || (B[1] = (L) => u("type", L)),
839
840
  placeholder: "Select discount type",
840
- items: h()
841
+ items: v()
841
842
  }, null, 8, ["model-value", "items"])
842
843
  ]),
843
- y(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_8$7, [
844
- createElementVNode("label", _hoisted_9$7, toDisplayString(x(unref(a).type)), 1),
844
+ f(unref(a).type) ? (openBlock(), createElementBlock("div", _hoisted_8$8, [
845
+ createElementVNode("label", _hoisted_9$8, toDisplayString(k(unref(a).type)), 1),
845
846
  createVNode(P, {
846
847
  modelValue: unref(a).value,
847
848
  "onUpdate:modelValue": B[2] || (B[2] = (L) => unref(a).value = L),
848
- placeholder: f(unref(a).type),
849
- suffix: v(unref(a).type),
849
+ placeholder: y(unref(a).type),
850
+ suffix: g(unref(a).type),
850
851
  type: "number"
851
852
  }, null, 8, ["modelValue", "placeholder", "suffix"])
852
853
  ])) : createCommentVNode("", !0),
@@ -993,14 +994,14 @@ const _hoisted_1$r = {
993
994
  }
994
995
  }
995
996
  return (n, a) => {
996
- var h;
997
+ var v;
997
998
  const r = resolveComponent("FmRadio"), p = resolveComponent("FmRadioGroup");
998
999
  return openBlock(), createElementBlock("div", _hoisted_1$o, [
999
1000
  createVNode(p, {
1000
1001
  modelValue: unref(c),
1001
1002
  "onUpdate:modelValue": [
1002
- a[0] || (a[0] = (y) => isRef(c) ? c.value = y : null),
1003
- a[1] || (a[1] = (y) => l(y))
1003
+ a[0] || (a[0] = (f) => isRef(c) ? c.value = f : null),
1004
+ a[1] || (a[1] = (f) => l(f))
1004
1005
  ]
1005
1006
  }, {
1006
1007
  default: withCtx(() => [
@@ -1020,12 +1021,12 @@ const _hoisted_1$r = {
1020
1021
  class: "!mt-[0px]",
1021
1022
  "include-only": "trigger",
1022
1023
  "trigger-type": "SCHEDULE",
1023
- "model-value": ((h = e.modelValue) == null ? void 0 : h.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
1024
- "onUpdate:modelValue": a[2] || (a[2] = (y) => i(
1024
+ "model-value": ((v = e.modelValue) == null ? void 0 : v.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
1025
+ "onUpdate:modelValue": a[2] || (a[2] = (f) => i(
1025
1026
  "update:model-value",
1026
1027
  unref(RuleBuilder).setRuleToGroup(
1027
1028
  e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
1028
- y,
1029
+ f,
1029
1030
  "&&"
1030
1031
  )
1031
1032
  ))
@@ -1275,7 +1276,7 @@ const _hoisted_1$r = {
1275
1276
  ]);
1276
1277
  };
1277
1278
  }
1278
- }), _hoisted_1$l = { class: "flex flex-col gap-16" }, _hoisted_2$i = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$f = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$e = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$c = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$9 = { class: "flex items-center justify-between gap-8" }, _hoisted_7$8 = { class: "fm-typo-en-body-lg-400" }, _hoisted_8$6 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_9$6 = { class: "flex flex-col gap-8" }, _hoisted_10$6 = { class: "flex items-baseline justify-between" }, _hoisted_11$4 = { class: "fm-typo-en-body-lg-400" }, _hoisted_12$3 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_13$3 = { class: "min-w-[160px] flex-1" }, _hoisted_14$3 = { class: "min-w-[180px] flex-1" }, TITLE_LIMIT$1 = 40, PREVIEW_LIMIT = 120, MAX_BUTTONS = 2, TITLE_WARN_AT$1 = 34, PREVIEW_WARN_AT = 110, _sfc_main$l = /* @__PURE__ */ defineComponent({
1279
+ }), _hoisted_1$l = { class: "flex flex-col gap-16" }, _hoisted_2$i = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$f = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$e = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$c = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$9 = { class: "flex items-center justify-between gap-8" }, _hoisted_7$8 = { class: "fm-typo-en-body-lg-400" }, _hoisted_8$7 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_9$7 = { class: "flex flex-col gap-8" }, _hoisted_10$6 = { class: "flex items-baseline justify-between" }, _hoisted_11$4 = { class: "fm-typo-en-body-lg-400" }, _hoisted_12$3 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_13$3 = { class: "min-w-[160px] flex-1" }, _hoisted_14$3 = { class: "min-w-[180px] flex-1" }, TITLE_LIMIT$1 = 40, PREVIEW_LIMIT = 120, MAX_BUTTONS = 2, TITLE_WARN_AT$1 = 34, PREVIEW_WARN_AT = 110, _sfc_main$l = /* @__PURE__ */ defineComponent({
1279
1280
  __name: "AppInboxInput",
1280
1281
  props: {
1281
1282
  modelValue: {
@@ -1285,187 +1286,234 @@ const _hoisted_1$r = {
1285
1286
  variables: {
1286
1287
  type: Array,
1287
1288
  default: () => [...DEFAULT_MESSAGE_VARIABLES]
1289
+ },
1290
+ /** False until the form is submitted; broadcasts validate on submit. */
1291
+ showValidation: {
1292
+ type: Boolean,
1293
+ default: !0
1288
1294
  }
1289
1295
  },
1290
1296
  emits: ["update:model-value"],
1291
1297
  setup(e, { emit: s }) {
1292
- const { t: o } = useI18n(), d = e, i = s, c = F_APP_INBOX_DESTINATION.options;
1293
- function l(V) {
1298
+ const { t: o } = useI18n(), d = e, i = s;
1299
+ function c(V) {
1294
1300
  i("update:model-value", { ...d.modelValue, ...V });
1295
1301
  }
1296
- function n(V, x) {
1297
- return V >= x ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1302
+ function l(V, k) {
1303
+ return V >= k ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1298
1304
  }
1299
- const a = computed(() => d.modelValue.buttons ?? []), r = computed(() => {
1305
+ const n = computed(() => d.modelValue.buttons ?? []), a = computed(() => {
1300
1306
  var V;
1301
1307
  return ((V = d.modelValue.content) == null ? void 0 : V.length) ?? 0;
1302
1308
  });
1303
- function p(V, x) {
1304
- l({
1305
- buttons: a.value.map(
1306
- (f, v) => v === V ? { ...f, ...x } : f
1309
+ function r(V, k) {
1310
+ c({
1311
+ buttons: n.value.map(
1312
+ (y, g) => g === V ? { ...y, ...k } : y
1307
1313
  )
1308
1314
  });
1309
1315
  }
1310
- function h() {
1311
- a.value.length >= MAX_BUTTONS || l({ buttons: [...a.value, { label: "", destination: "NONE" }] });
1316
+ function p() {
1317
+ n.value.length >= MAX_BUTTONS || c({ buttons: [...n.value, { label: "", url: "" }] });
1312
1318
  }
1313
- function y(V) {
1314
- l({ buttons: a.value.filter((x, f) => f !== V) });
1319
+ function v(V) {
1320
+ var y;
1321
+ if (!d.showValidation) return { label: void 0, url: void 0 };
1322
+ const k = (y = V.url) == null ? void 0 : y.trim();
1323
+ return {
1324
+ label: V.label.trim() ? void 0 : o("connect.campaign.appInbox.buttonLabelRequired"),
1325
+ url: k ? FdoBroadcastUrl.safeParse(k).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.appInbox.buttonUrlRequired")
1326
+ };
1327
+ }
1328
+ function f(V) {
1329
+ c({ buttons: n.value.filter((k, y) => y !== V) });
1315
1330
  }
1316
- return (V, x) => {
1317
- const f = resolveComponent("FmTextField"), v = resolveComponent("FmSelect"), u = resolveComponent("FmButton");
1331
+ return (V, k) => {
1332
+ const y = resolveComponent("FmTextField"), g = resolveComponent("FmButton");
1318
1333
  return openBlock(), createElementBlock("div", _hoisted_1$l, [
1319
1334
  createElementVNode("div", null, [
1320
1335
  createElementVNode("div", _hoisted_2$i, [
1321
1336
  createElementVNode("span", _hoisted_3$f, toDisplayString(unref(o)("connect.campaign.appInbox.title")), 1),
1322
1337
  createElementVNode("span", {
1323
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.title.length, TITLE_WARN_AT$1)])
1338
+ class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.title.length, TITLE_WARN_AT$1)])
1324
1339
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT$1), 3)
1325
1340
  ]),
1326
- createVNode(f, {
1341
+ createVNode(y, {
1327
1342
  "model-value": e.modelValue.title,
1328
1343
  "max-length": TITLE_LIMIT$1,
1329
1344
  placeholder: unref(o)("connect.campaign.appInbox.titlePlaceholder"),
1330
- "onUpdate:modelValue": x[0] || (x[0] = (m) => l({ title: m }))
1345
+ "onUpdate:modelValue": k[0] || (k[0] = (u) => c({ title: u }))
1331
1346
  }, null, 8, ["model-value", "placeholder"])
1332
1347
  ]),
1333
1348
  createElementVNode("div", null, [
1334
1349
  createElementVNode("div", _hoisted_4$e, [
1335
1350
  createElementVNode("span", _hoisted_5$c, toDisplayString(unref(o)("connect.campaign.appInbox.previewText")), 1),
1336
1351
  createElementVNode("span", {
1337
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
1352
+ class: normalizeClass(["fm-typo-en-body-sm-400", l(e.modelValue.previewText.length, PREVIEW_WARN_AT)])
1338
1353
  }, toDisplayString(e.modelValue.previewText.length) + " / " + toDisplayString(PREVIEW_LIMIT), 3)
1339
1354
  ]),
1340
- createVNode(f, {
1355
+ createVNode(y, {
1341
1356
  "model-value": e.modelValue.previewText,
1342
1357
  "max-length": PREVIEW_LIMIT,
1343
1358
  placeholder: unref(o)("connect.campaign.appInbox.previewTextPlaceholder"),
1344
- "onUpdate:modelValue": x[1] || (x[1] = (m) => l({ previewText: m }))
1359
+ "onUpdate:modelValue": k[1] || (k[1] = (u) => c({ previewText: u }))
1345
1360
  }, null, 8, ["model-value", "placeholder"])
1346
1361
  ]),
1347
1362
  createElementVNode("div", _hoisted_6$9, [
1348
1363
  createElementVNode("div", null, [
1349
1364
  createElementVNode("div", _hoisted_7$8, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessage")), 1),
1350
- createElementVNode("div", _hoisted_8$6, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessageDescription")), 1),
1365
+ createElementVNode("div", _hoisted_8$7, toDisplayString(unref(o)("connect.campaign.appInbox.bodyMessageDescription")), 1),
1351
1366
  createElementVNode("div", {
1352
1367
  class: normalizeClass([
1353
1368
  "mt-[2px] fm-typo-en-body-sm-400",
1354
- unref(r) > unref(APP_INBOX_BODY_LIMIT) ? "text-fm-color-system-error-400" : "text-fm-color-typo-secondary"
1369
+ unref(a) > unref(APP_INBOX_BODY_LIMIT) ? "text-fm-color-system-error-400" : "text-fm-color-typo-secondary"
1355
1370
  ])
1356
- }, toDisplayString(unref(r)) + " / " + toDisplayString(unref(APP_INBOX_BODY_LIMIT)), 3)
1371
+ }, toDisplayString(unref(a)) + " / " + toDisplayString(unref(APP_INBOX_BODY_LIMIT)), 3)
1357
1372
  ]),
1358
1373
  createVNode(_sfc_main$v, {
1359
1374
  html: e.modelValue.content,
1360
1375
  variables: e.variables,
1361
1376
  "media-limit": 1,
1362
1377
  "button-label": unref(o)("connect.campaign.appInbox.editBodyMessage"),
1363
- "onUpdate:html": x[2] || (x[2] = (m) => l({ content: m.html }))
1378
+ "onUpdate:html": k[2] || (k[2] = (u) => c({ content: u.html }))
1364
1379
  }, null, 8, ["html", "variables", "button-label"])
1365
1380
  ]),
1366
- createElementVNode("div", _hoisted_9$6, [
1381
+ createElementVNode("div", _hoisted_9$7, [
1367
1382
  createElementVNode("div", _hoisted_10$6, [
1368
1383
  createElementVNode("span", _hoisted_11$4, toDisplayString(unref(o)("connect.campaign.appInbox.buttons")), 1),
1369
- createElementVNode("span", _hoisted_12$3, toDisplayString(unref(a).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
1384
+ createElementVNode("span", _hoisted_12$3, toDisplayString(unref(n).length) + " / " + toDisplayString(MAX_BUTTONS), 1)
1370
1385
  ]),
1371
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (m, C) => (openBlock(), createElementBlock("div", {
1372
- key: C,
1386
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (u, m) => (openBlock(), createElementBlock("div", {
1387
+ key: m,
1373
1388
  class: "flex flex-wrap items-start gap-8"
1374
1389
  }, [
1375
1390
  createElementVNode("div", _hoisted_13$3, [
1376
- createVNode(f, {
1377
- "model-value": m.label,
1391
+ createVNode(y, {
1392
+ "model-value": u.label,
1393
+ "max-length": 20,
1378
1394
  placeholder: unref(o)("connect.campaign.appInbox.buttonLabel"),
1379
- "onUpdate:modelValue": (k) => p(C, { label: k })
1380
- }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
1395
+ "helper-state": v(u).label ? "error" : "none",
1396
+ "helper-text": v(u).label,
1397
+ "onUpdate:modelValue": (C) => r(m, { label: C })
1398
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1381
1399
  ]),
1382
1400
  createElementVNode("div", _hoisted_14$3, [
1383
- createVNode(v, {
1384
- "model-value": m.destination,
1385
- items: unref(c).map((k) => ({
1386
- label: unref(o)(`connect.campaign.appInbox.destination.${k}`),
1387
- value: k
1388
- })),
1389
- "onUpdate:modelValue": (k) => p(C, { destination: k })
1390
- }, null, 8, ["model-value", "items", "onUpdate:modelValue"])
1401
+ createVNode(y, {
1402
+ "model-value": u.url ?? "",
1403
+ inputmode: "url",
1404
+ placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1405
+ "helper-state": v(u).url ? "error" : "none",
1406
+ "helper-text": v(u).url,
1407
+ "onUpdate:modelValue": (C) => r(m, { url: C.trim() })
1408
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text", "onUpdate:modelValue"])
1391
1409
  ]),
1392
- createVNode(u, {
1410
+ createVNode(g, {
1393
1411
  icon: "delete",
1394
1412
  "icon-color": "neutral-gray-400",
1395
1413
  variant: "tertiary",
1396
- onClick: (k) => y(C)
1414
+ onClick: (C) => f(m)
1397
1415
  }, null, 8, ["onClick"])
1398
1416
  ]))), 128)),
1399
- unref(a).length < MAX_BUTTONS ? (openBlock(), createBlock(u, {
1417
+ unref(n).length < MAX_BUTTONS ? (openBlock(), createBlock(g, {
1400
1418
  key: 0,
1401
1419
  variant: "tertiary",
1402
1420
  icon: "add",
1403
1421
  label: unref(o)("connect.campaign.appInbox.addButton"),
1404
- onClick: h
1422
+ onClick: p
1405
1423
  }, null, 8, ["label"])) : createCommentVNode("", !0)
1406
1424
  ])
1407
1425
  ]);
1408
1426
  };
1409
1427
  }
1410
- }), _hoisted_1$k = { class: "flex flex-col gap-16" }, _hoisted_2$h = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$d = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$b = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$8 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_7$7 = { class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, TITLE_LIMIT = 40, BODY_LIMIT = 120, TITLE_WARN_AT = 34, BODY_WARN_AT = 110, _sfc_main$k = /* @__PURE__ */ defineComponent({
1428
+ }), _hoisted_1$k = { class: "flex flex-col gap-16" }, _hoisted_2$h = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_3$e = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_4$d = { class: "mb-[6px] flex items-baseline justify-between" }, _hoisted_5$b = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_6$8 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _hoisted_7$7 = {
1429
+ key: 0,
1430
+ class: "mt-4 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
1431
+ }, _hoisted_8$6 = {
1432
+ key: 1,
1433
+ class: "mt-12"
1434
+ }, _hoisted_9$6 = { class: "mb-[6px] fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, TITLE_LIMIT = 40, BODY_LIMIT = 120, TITLE_WARN_AT = 34, BODY_WARN_AT = 110, _sfc_main$k = /* @__PURE__ */ defineComponent({
1411
1435
  __name: "PushInput",
1412
1436
  props: {
1413
1437
  modelValue: {
1414
1438
  type: Object,
1415
1439
  required: !0
1440
+ },
1441
+ /** False until the form is submitted; broadcasts validate on submit. */
1442
+ showValidation: {
1443
+ type: Boolean,
1444
+ default: !0
1416
1445
  }
1417
1446
  },
1418
1447
  emits: ["update:model-value"],
1419
1448
  setup(e, { emit: s }) {
1420
- const { t: o } = useI18n(), d = e, i = s, c = F_APP_INBOX_DESTINATION.options;
1421
- function l(a) {
1422
- i("update:model-value", { ...d.modelValue, ...a });
1449
+ const { t: o } = useI18n(), d = e, i = s, c = F_PUSH_DESTINATION.options, l = computed(() => d.modelValue.destination === "EXTERNAL"), n = computed(() => {
1450
+ var f;
1451
+ if (!d.showValidation || !l.value) return;
1452
+ const v = (f = d.modelValue.url) == null ? void 0 : f.trim();
1453
+ return v ? FdoBroadcastUrl.safeParse(v).success ? void 0 : o("connect.campaign.push.linkUrlInvalid") : o("connect.campaign.push.linkUrlRequired");
1454
+ });
1455
+ function a(v) {
1456
+ i("update:model-value", { ...d.modelValue, ...v });
1423
1457
  }
1424
- function n(a, r) {
1425
- return a >= r ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1458
+ function r(v) {
1459
+ a(v === "EXTERNAL" ? { destination: v } : { destination: v, url: null });
1426
1460
  }
1427
- return (a, r) => {
1428
- const p = resolveComponent("FmTextField"), h = resolveComponent("FmTextarea"), y = resolveComponent("FmSelect");
1461
+ function p(v, f) {
1462
+ return v >= f ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary";
1463
+ }
1464
+ return (v, f) => {
1465
+ const V = resolveComponent("FmTextField"), k = resolveComponent("FmTextarea"), y = resolveComponent("FmSelect");
1429
1466
  return openBlock(), createElementBlock("div", _hoisted_1$k, [
1430
1467
  createElementVNode("div", null, [
1431
1468
  createElementVNode("div", _hoisted_2$h, [
1432
1469
  createElementVNode("span", _hoisted_3$e, toDisplayString(unref(o)("connect.campaign.push.title")), 1),
1433
1470
  createElementVNode("span", {
1434
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.title.length, TITLE_WARN_AT)])
1471
+ class: normalizeClass(["fm-typo-en-body-sm-400", p(e.modelValue.title.length, TITLE_WARN_AT)])
1435
1472
  }, toDisplayString(e.modelValue.title.length) + " / " + toDisplayString(TITLE_LIMIT), 3)
1436
1473
  ]),
1437
- createVNode(p, {
1474
+ createVNode(V, {
1438
1475
  "model-value": e.modelValue.title,
1439
1476
  "max-length": TITLE_LIMIT,
1440
1477
  placeholder: unref(o)("connect.campaign.push.titlePlaceholder"),
1441
- "onUpdate:modelValue": r[0] || (r[0] = (V) => l({ title: V }))
1478
+ "onUpdate:modelValue": f[0] || (f[0] = (g) => a({ title: g }))
1442
1479
  }, null, 8, ["model-value", "placeholder"])
1443
1480
  ]),
1444
1481
  createElementVNode("div", null, [
1445
1482
  createElementVNode("div", _hoisted_4$d, [
1446
1483
  createElementVNode("span", _hoisted_5$b, toDisplayString(unref(o)("connect.campaign.push.body")), 1),
1447
1484
  createElementVNode("span", {
1448
- class: normalizeClass(["fm-typo-en-body-sm-400", n(e.modelValue.body.length, BODY_WARN_AT)])
1485
+ class: normalizeClass(["fm-typo-en-body-sm-400", p(e.modelValue.body.length, BODY_WARN_AT)])
1449
1486
  }, toDisplayString(e.modelValue.body.length) + " / " + toDisplayString(BODY_LIMIT), 3)
1450
1487
  ]),
1451
- createVNode(h, {
1488
+ createVNode(k, {
1452
1489
  "model-value": e.modelValue.body,
1453
1490
  "max-length": BODY_LIMIT,
1454
1491
  placeholder: unref(o)("connect.campaign.push.bodyPlaceholder"),
1455
- "onUpdate:modelValue": r[1] || (r[1] = (V) => l({ body: V }))
1492
+ "onUpdate:modelValue": f[1] || (f[1] = (g) => a({ body: g }))
1456
1493
  }, null, 8, ["model-value", "placeholder"])
1457
1494
  ]),
1458
1495
  createElementVNode("div", null, [
1459
1496
  createElementVNode("div", _hoisted_6$8, toDisplayString(unref(o)("connect.campaign.push.link")), 1),
1460
1497
  createVNode(y, {
1461
1498
  "model-value": e.modelValue.destination ?? "NONE",
1462
- items: unref(c).map((V) => ({
1463
- label: unref(o)(`connect.campaign.appInbox.destination.${V}`),
1464
- value: V
1499
+ items: unref(c).map((g) => ({
1500
+ label: unref(o)(`connect.campaign.appInbox.destination.${g}`),
1501
+ value: g
1465
1502
  })),
1466
- "onUpdate:modelValue": r[2] || (r[2] = (V) => l({ destination: V }))
1503
+ "onUpdate:modelValue": f[2] || (f[2] = (g) => r(g))
1467
1504
  }, null, 8, ["model-value", "items"]),
1468
- createElementVNode("div", _hoisted_7$7, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)
1505
+ unref(l) ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", _hoisted_7$7, toDisplayString(unref(o)("connect.campaign.push.linkHelper")), 1)),
1506
+ unref(l) ? (openBlock(), createElementBlock("div", _hoisted_8$6, [
1507
+ createElementVNode("div", _hoisted_9$6, toDisplayString(unref(o)("connect.campaign.push.linkUrl")), 1),
1508
+ createVNode(V, {
1509
+ "model-value": e.modelValue.url ?? "",
1510
+ inputmode: "url",
1511
+ placeholder: unref(o)("connect.campaign.push.linkUrlPlaceholder"),
1512
+ "helper-state": unref(n) ? "error" : "none",
1513
+ "helper-text": unref(n),
1514
+ "onUpdate:modelValue": f[3] || (f[3] = (g) => a({ url: g.trim() || null }))
1515
+ }, null, 8, ["model-value", "placeholder", "helper-state", "helper-text"])
1516
+ ])) : createCommentVNode("", !0)
1469
1517
  ])
1470
1518
  ]);
1471
1519
  };
@@ -1553,29 +1601,29 @@ const _hoisted_1$r = {
1553
1601
  ), c = computed(
1554
1602
  () => o.target === "SMS" || o.target === "WHATSAPP" ? o.content : void 0
1555
1603
  ), l = computed(() => {
1556
- var h, y;
1557
- const p = (y = (h = c.value) == null ? void 0 : h.content) == null ? void 0 : y.trim();
1604
+ var v, f;
1605
+ const p = (f = (v = c.value) == null ? void 0 : v.content) == null ? void 0 : f.trim();
1558
1606
  return p ? o.senderPrefix ? `${o.senderPrefix}${p}` : p : s("connect.campaign.broadcast.preview.emptyText");
1559
1607
  }), n = computed(() => {
1560
- var h;
1561
- const p = ((h = i.value) == null ? void 0 : h.content) ?? "";
1608
+ var v;
1609
+ const p = ((v = i.value) == null ? void 0 : v.content) ?? "";
1562
1610
  return p.trim() ? `<!doctype html><meta charset="utf-8"><base target="_blank"><style>
1563
1611
  html,body{margin:0;font:400 12px/1.5 Inter,system-ui,sans-serif;color:#1C1C1E;word-break:break-word}
1564
1612
  img{max-width:100%;height:auto}
1565
1613
  </style>${p}` : "";
1566
1614
  }), a = computed(() => {
1567
- const p = /* @__PURE__ */ new Date(), h = p.toLocaleDateString(void 0, {
1615
+ const p = /* @__PURE__ */ new Date(), v = p.toLocaleDateString(void 0, {
1568
1616
  weekday: "short",
1569
1617
  day: "2-digit",
1570
1618
  month: "short"
1571
- }), y = p.toLocaleTimeString(void 0, {
1619
+ }), f = p.toLocaleTimeString(void 0, {
1572
1620
  hour: "2-digit",
1573
1621
  minute: "2-digit"
1574
1622
  });
1575
- return `${h} · ${y}`;
1623
+ return `${v} · ${f}`;
1576
1624
  }), r = computed(() => o.target === "PUSH" ? s("connect.campaign.broadcast.preview.note.push") : o.target === "APP_INBOX" ? s("connect.campaign.broadcast.preview.note.inbox") : s("connect.campaign.broadcast.preview.note.text"));
1577
- return (p, h) => {
1578
- var y, V, x, f, v, u, m, C, k, $, F;
1625
+ return (p, v) => {
1626
+ var f, V, k, y, g, u, m, C, x, $, F;
1579
1627
  return e.target !== "EMAIL" ? (openBlock(), createElementBlock("div", _hoisted_1$i, [
1580
1628
  createElementVNode("div", _hoisted_2$f, toDisplayString(unref(s)("connect.campaign.broadcast.preview.title")), 1),
1581
1629
  createElementVNode("div", {
@@ -1595,15 +1643,15 @@ const _hoisted_1$r = {
1595
1643
  e.target === "PUSH" ? (openBlock(), createElementBlock("div", _hoisted_4$b, [
1596
1644
  createElementVNode("div", _hoisted_5$9, toDisplayString(unref(a)), 1),
1597
1645
  createElementVNode("div", _hoisted_6$6, [
1598
- createElementVNode("div", _hoisted_7$6, toDisplayString(((V = (y = unref(d)) == null ? void 0 : y.title) == null ? void 0 : V.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1599
- createElementVNode("div", _hoisted_8$5, toDisplayString(((f = (x = unref(d)) == null ? void 0 : x.body) == null ? void 0 : f.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1)
1646
+ createElementVNode("div", _hoisted_7$6, toDisplayString(((V = (f = unref(d)) == null ? void 0 : f.title) == null ? void 0 : V.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1647
+ createElementVNode("div", _hoisted_8$5, toDisplayString(((y = (k = unref(d)) == null ? void 0 : k.body) == null ? void 0 : y.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1)
1600
1648
  ])
1601
1649
  ])) : e.target === "APP_INBOX" ? (openBlock(), createElementBlock("div", _hoisted_9$5, [
1602
1650
  createElementVNode("div", _hoisted_10$5, toDisplayString(unref(s)("connect.campaign.broadcast.preview.inboxHeading")), 1),
1603
1651
  createElementVNode("div", _hoisted_11$3, [
1604
- createElementVNode("div", _hoisted_12$2, toDisplayString(((u = (v = unref(i)) == null ? void 0 : v.title) == null ? void 0 : u.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1652
+ createElementVNode("div", _hoisted_12$2, toDisplayString(((u = (g = unref(i)) == null ? void 0 : g.title) == null ? void 0 : u.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyTitle")), 1),
1605
1653
  createElementVNode("div", _hoisted_13$2, toDisplayString(((C = (m = unref(i)) == null ? void 0 : m.previewText) == null ? void 0 : C.trim()) || unref(s)("connect.campaign.broadcast.preview.emptyBody")), 1),
1606
- (k = unref(i)) != null && k.imageUrl ? (openBlock(), createElementBlock("img", {
1654
+ (x = unref(i)) != null && x.imageUrl ? (openBlock(), createElementBlock("img", {
1607
1655
  key: 0,
1608
1656
  src: unref(i).imageUrl,
1609
1657
  alt: "",
@@ -1682,7 +1730,7 @@ const _hoisted_1$r = {
1682
1730
  "icon-color": "neutral-gray-400",
1683
1731
  variant: "tertiary",
1684
1732
  disabled: p === 0,
1685
- onClick: (h) => i.$emit("move", r.channel, -1)
1733
+ onClick: (v) => i.$emit("move", r.channel, -1)
1686
1734
  }, null, 8, ["disabled", "onClick"])
1687
1735
  ], 8, _hoisted_11$2),
1688
1736
  createElementVNode("span", {
@@ -1694,7 +1742,7 @@ const _hoisted_1$r = {
1694
1742
  "icon-color": "neutral-gray-400",
1695
1743
  variant: "tertiary",
1696
1744
  disabled: p === e.rows.length - 1,
1697
- onClick: (h) => i.$emit("move", r.channel, 1)
1745
+ onClick: (v) => i.$emit("move", r.channel, 1)
1698
1746
  }, null, 8, ["disabled", "onClick"])
1699
1747
  ], 8, _hoisted_12$1),
1700
1748
  createElementVNode("span", {
@@ -1705,7 +1753,7 @@ const _hoisted_1$r = {
1705
1753
  icon: "delete",
1706
1754
  "icon-color": "neutral-gray-400",
1707
1755
  variant: "tertiary",
1708
- onClick: (h) => i.$emit("remove", r.channel)
1756
+ onClick: (v) => i.$emit("remove", r.channel)
1709
1757
  }, null, 8, ["onClick"])
1710
1758
  ], 8, _hoisted_13$1)
1711
1759
  ])
@@ -1783,41 +1831,41 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1783
1831
  emits: ["update:model-value"],
1784
1832
  setup(e, { emit: s }) {
1785
1833
  const { t: o } = useI18n(), d = useCoreStore(), i = useMembershipStore(), c = e, l = s, n = ref(!1), a = ref("SMS"), r = computed(() => {
1786
- const g = c.modelValue;
1787
- return g && "channels" in g ? g : toDelivery({ message: g });
1834
+ const h = c.modelValue;
1835
+ return h && "channels" in h ? h : toDelivery({ message: h });
1788
1836
  });
1789
- function p(g) {
1790
- l("update:model-value", g);
1837
+ function p(h) {
1838
+ l("update:model-value", h);
1791
1839
  }
1792
- function h(g) {
1793
- return o(`connect.campaign.broadcast.channel.${g}`);
1840
+ function v(h) {
1841
+ return o(`connect.campaign.broadcast.channel.${h}`);
1794
1842
  }
1795
- const y = {
1843
+ const f = {
1796
1844
  SMS: "chat",
1797
1845
  WHATSAPP: "chat",
1798
1846
  EMAIL: "mail",
1799
1847
  APP_INBOX: "inbox",
1800
1848
  PUSH: "notifications"
1801
1849
  };
1802
- function V(g) {
1803
- return y[g];
1850
+ function V(h) {
1851
+ return f[h];
1804
1852
  }
1805
- const x = computed(() => r.value.mode === "fallback"), f = computed(
1853
+ const k = computed(() => r.value.mode === "fallback"), y = computed(
1806
1854
  () => c.variables.filter(
1807
- (g) => c.triggerType == "SCHEDULE" ? !g.startsWith("transaction.") : !0
1855
+ (h) => c.triggerType == "SCHEDULE" ? !h.startsWith("transaction.") : !0
1808
1856
  )
1809
1857
  );
1810
- function v(g) {
1811
- return g === "WHATSAPP" ? n.value : !0;
1858
+ function g(h) {
1859
+ return h === "WHATSAPP" ? n.value : !0;
1812
1860
  }
1813
1861
  const u = ["fallback", "all"];
1814
- function m(g) {
1815
- g !== r.value.mode && p(setMode(r.value, g));
1862
+ function m(h) {
1863
+ h !== r.value.mode && p(setMode(r.value, h));
1816
1864
  }
1817
1865
  const C = ref(null);
1818
- function k(g) {
1866
+ function x(h) {
1819
1867
  var R;
1820
- const E = (R = C.value) == null ? void 0 : R[g];
1868
+ const E = (R = C.value) == null ? void 0 : R[h];
1821
1869
  return E ? new Intl.NumberFormat(void 0, {
1822
1870
  style: "currency",
1823
1871
  currency: E.currency,
@@ -1826,126 +1874,126 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1826
1874
  }).format(E.amount / 10 ** E.precision) : null;
1827
1875
  }
1828
1876
  const $ = computed(
1829
- () => CHANNEL_DISPLAY_ORDER.map((g) => {
1830
- const E = r.value.channels.includes(g), R = k(g);
1877
+ () => CHANNEL_DISPLAY_ORDER.map((h) => {
1878
+ const E = r.value.channels.includes(h), R = x(h);
1831
1879
  return {
1832
- channel: g,
1833
- label: h(g),
1880
+ channel: h,
1881
+ label: v(h),
1834
1882
  selected: E,
1835
- available: v(g),
1836
- rateNote: isPaidChannel(g) ? R ? o("connect.campaign.broadcast.perMessage", { price: R }) : null : o("connect.campaign.broadcast.freeChannel"),
1883
+ available: g(h),
1884
+ rateNote: isPaidChannel(h) ? R ? o("connect.campaign.broadcast.perMessage", { price: R }) : null : o("connect.campaign.broadcast.freeChannel"),
1837
1885
  // In fallback mode the grid is a radio for the primary channel, so only
1838
1886
  // the primary reads as checked; a fallback is tagged instead.
1839
- checked: x.value ? r.value.channels[0] === g : E,
1840
- usedAsFallback: x.value && r.value.channels.indexOf(g) > 0
1887
+ checked: k.value ? r.value.channels[0] === h : E,
1888
+ usedAsFallback: k.value && r.value.channels.indexOf(h) > 0
1841
1889
  };
1842
1890
  })
1843
1891
  );
1844
- async function F(g) {
1845
- if (v(g)) {
1846
- if (x.value) {
1847
- await N(g);
1892
+ async function F(h) {
1893
+ if (g(h)) {
1894
+ if (k.value) {
1895
+ await N(h);
1848
1896
  return;
1849
1897
  }
1850
- if (r.value.channels.includes(g)) {
1851
- await D(g);
1898
+ if (r.value.channels.includes(h)) {
1899
+ await D(h);
1852
1900
  return;
1853
1901
  }
1854
- p(addChannel(r.value, g, f.value));
1902
+ p(addChannel(r.value, h, y.value));
1855
1903
  }
1856
1904
  }
1857
- async function N(g) {
1905
+ async function N(h) {
1858
1906
  const E = r.value.channels[0];
1859
- E !== g && (E && hasDraft(r.value, E) && !await prompt.remove(
1907
+ E !== h && (E && hasDraft(r.value, E) && !await prompt.remove(
1860
1908
  o("connect.campaign.broadcast.replaceChannelConfirm", {
1861
- channel: h(E),
1862
- next: h(g)
1909
+ channel: v(E),
1910
+ next: v(h)
1863
1911
  })
1864
- ) || (p(setPrimaryChannel(r.value, g, f.value)), a.value = g));
1912
+ ) || (p(setPrimaryChannel(r.value, h, y.value)), a.value = h));
1865
1913
  }
1866
- async function D(g) {
1867
- if (hasDraft(r.value, g) && !await prompt.remove(
1914
+ async function D(h) {
1915
+ if (hasDraft(r.value, h) && !await prompt.remove(
1868
1916
  o("connect.campaign.broadcast.removeChannelConfirm", {
1869
- channel: h(g)
1917
+ channel: v(h)
1870
1918
  })
1871
1919
  ))
1872
1920
  return;
1873
- const E = removeChannel(r.value, g);
1874
- p(E), a.value === g && (a.value = E.channels[0] ?? "SMS");
1921
+ const E = removeChannel(r.value, h);
1922
+ p(E), a.value === h && (a.value = E.channels[0] ?? "SMS");
1875
1923
  }
1876
- function w(g, E) {
1877
- p(moveChannel(r.value, g, E));
1924
+ function w(h, E) {
1925
+ p(moveChannel(r.value, h, E));
1878
1926
  }
1879
1927
  const O = computed(
1880
- () => r.value.channels.slice(1).map((g, E) => ({
1881
- channel: g,
1882
- label: h(g),
1928
+ () => r.value.channels.slice(1).map((h, E) => ({
1929
+ channel: h,
1930
+ label: v(h),
1883
1931
  position: E + 2,
1884
- complete: !c.showValidation || isChannelComplete(r.value, g)
1932
+ complete: !c.showValidation || isChannelComplete(r.value, h)
1885
1933
  }))
1886
1934
  ), j = computed(
1887
1935
  () => CHANNEL_DISPLAY_ORDER.filter(
1888
- (g) => !r.value.channels.includes(g) && v(g)
1889
- ).map((g) => ({
1890
- channel: g,
1891
- label: h(g)
1936
+ (h) => !r.value.channels.includes(h) && g(h)
1937
+ ).map((h) => ({
1938
+ channel: h,
1939
+ label: v(h)
1892
1940
  }))
1893
1941
  ), I = computed(
1894
- () => r.value.channels.map((g, E) => ({
1895
- key: g,
1896
- label: h(g),
1897
- sub: x.value ? o(E === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached") : o("connect.campaign.broadcast.tab.sendsToEligible"),
1898
- complete: !c.showValidation || isChannelComplete(r.value, g),
1899
- step: x.value ? E + 1 : void 0,
1900
- connector: E === 0 ? void 0 : x.value ? "→" : "+"
1942
+ () => r.value.channels.map((h, E) => ({
1943
+ key: h,
1944
+ label: v(h),
1945
+ sub: k.value ? o(E === 0 ? "connect.campaign.broadcast.tab.firstAttempt" : "connect.campaign.broadcast.tab.ifNotReached") : o("connect.campaign.broadcast.tab.sendsToEligible"),
1946
+ complete: !c.showValidation || isChannelComplete(r.value, h),
1947
+ step: k.value ? E + 1 : void 0,
1948
+ connector: E === 0 ? void 0 : k.value ? "→" : "+"
1901
1949
  }))
1902
1950
  );
1903
1951
  watchEffect(() => {
1904
- const g = I.value.map((E) => E.key);
1905
- g.length && !g.includes(a.value) && (a.value = g[0]);
1952
+ const h = I.value.map((E) => E.key);
1953
+ h.length && !h.includes(a.value) && (a.value = h[0]);
1906
1954
  });
1907
1955
  const H = computed(() => a.value), q = computed(() => {
1908
- const g = H.value;
1909
- if (!(g === "APP_INBOX" || g === "PUSH"))
1910
- return r.value.content[g];
1956
+ const h = H.value;
1957
+ if (!(h === "APP_INBOX" || h === "PUSH"))
1958
+ return r.value.content[h];
1911
1959
  }), G = computed(
1912
1960
  () => r.value.content.APP_INBOX
1913
1961
  ), Y = computed(
1914
1962
  () => r.value.content.PUSH
1915
1963
  );
1916
- function Z(g) {
1917
- p(setChannelContent(r.value, "APP_INBOX", g));
1964
+ function Z(h) {
1965
+ p(setChannelContent(r.value, "APP_INBOX", h));
1918
1966
  }
1919
- function b(g) {
1920
- p(setChannelContent(r.value, "PUSH", g));
1967
+ function b(h) {
1968
+ p(setChannelContent(r.value, "PUSH", h));
1921
1969
  }
1922
- function B(g, E) {
1923
- g === "APP_INBOX" || g === "PUSH" || p(setChannelContent(r.value, g, { ...E, channel: g }));
1970
+ function B(h, E) {
1971
+ h === "APP_INBOX" || h === "PUSH" || p(setChannelContent(r.value, h, { ...E, channel: h }));
1924
1972
  }
1925
1973
  const T = computed(
1926
1974
  () => r.value.channels.filter(isPaidChannel)
1927
1975
  ), U = computed(() => {
1928
1976
  var E, R, M;
1929
- const g = ((E = i.membership) == null ? void 0 : E.brand) || ((M = (R = d.currentBusiness) == null ? void 0 : R.value) == null ? void 0 : M.name) || "";
1930
- return getSmsMessageMetrics({ brandName: g, content: "" }).prefix;
1977
+ const h = ((E = i.membership) == null ? void 0 : E.brand) || ((M = (R = d.currentBusiness) == null ? void 0 : R.value) == null ? void 0 : M.name) || "";
1978
+ return getSmsMessageMetrics({ brandName: h, content: "" }).prefix;
1931
1979
  }), P = `${define_appEndpoint_default.licensePortalUrl}settings?businessId=${SvcConfig.businessId}`;
1932
1980
  async function A() {
1933
1981
  try {
1934
- const g = await membershipApi.getWhatsappNumbers();
1935
- n.value = g.some(
1982
+ const h = await membershipApi.getWhatsappNumbers();
1983
+ n.value = h.some(
1936
1984
  (E) => {
1937
1985
  var R;
1938
1986
  return (R = E == null ? void 0 : E.default) == null ? void 0 : R.includes("Marketing");
1939
1987
  }
1940
1988
  );
1941
- } catch (g) {
1942
- console.error("Failed to fetch WhatsApp numbers:", g);
1989
+ } catch (h) {
1990
+ console.error("Failed to fetch WhatsApp numbers:", h);
1943
1991
  }
1944
1992
  }
1945
1993
  return onMounted(async () => {
1946
- const g = r.value.channels[0];
1947
- g && (a.value = g), campaignApi.readBroadcastCreditSummary().then((E) => C.value = E.prices).catch(() => C.value = null), await A();
1948
- }), (g, E) => {
1994
+ const h = r.value.channels[0];
1995
+ h && (a.value = h), campaignApi.readBroadcastCreditSummary().then((E) => C.value = E.prices).catch(() => C.value = null), await A();
1996
+ }), (h, E) => {
1949
1997
  const R = resolveComponent("FmIcon"), M = resolveComponent("FmCard");
1950
1998
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
1951
1999
  createElementVNode("div", _hoisted_2$d, [
@@ -1988,7 +2036,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
1988
2036
  ])) : createCommentVNode("", !0)
1989
2037
  ]),
1990
2038
  createElementVNode("div", _hoisted_10$3, [
1991
- createElementVNode("div", _hoisted_11$1, toDisplayString(unref(x) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
2039
+ createElementVNode("div", _hoisted_11$1, toDisplayString(unref(k) ? unref(o)("connect.campaign.broadcast.primaryChannel") : unref(o)("connect.campaign.broadcast.channels")), 1),
1992
2040
  createElementVNode("div", _hoisted_12, [
1993
2041
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref($), (S) => (openBlock(), createBlock(M, {
1994
2042
  key: S.channel,
@@ -2016,11 +2064,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2016
2064
  S.available ? (openBlock(), createElementBlock("span", {
2017
2065
  key: 0,
2018
2066
  class: normalizeClass(["flex h-[22px] w-[22px] flex-none items-center justify-center border-2 transition-colors", [
2019
- unref(x) ? "rounded-full" : "rounded-[4px]",
2067
+ unref(k) ? "rounded-full" : "rounded-[4px]",
2020
2068
  S.checked ? "border-fm-color-primary bg-fm-color-primary text-fm-color-typo-white" : "border-fm-color-neutral-gray-300 bg-fm-color-neutral-white"
2021
2069
  ]])
2022
2070
  }, [
2023
- S.checked && !unref(x) ? (openBlock(), createBlock(R, {
2071
+ S.checked && !unref(k) ? (openBlock(), createBlock(R, {
2024
2072
  key: 0,
2025
2073
  name: "check",
2026
2074
  size: "sm"
@@ -2047,13 +2095,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2047
2095
  }, 1032, ["class", "aria-disabled", "onClick"]))), 128))
2048
2096
  ]),
2049
2097
  e.showValidation && !unref(r).channels.length ? (openBlock(), createElementBlock("div", _hoisted_18, toDisplayString(unref(o)("connect.campaign.broadcast.selectChannelRequired")), 1)) : createCommentVNode("", !0),
2050
- unref(x) && unref(r).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2098
+ unref(k) && unref(r).channels.length ? (openBlock(), createBlock(_sfc_main$h, {
2051
2099
  key: 1,
2052
2100
  rows: unref(O),
2053
2101
  addable: unref(j),
2054
2102
  onMove: w,
2055
2103
  onRemove: D,
2056
- onAdd: E[1] || (E[1] = (S) => p(unref(addChannel)(unref(r), S, unref(f))))
2104
+ onAdd: E[1] || (E[1] = (S) => p(unref(addChannel)(unref(r), S, unref(y))))
2057
2105
  }, null, 8, ["rows", "addable"])) : createCommentVNode("", !0)
2058
2106
  ]),
2059
2107
  createElementVNode("div", _hoisted_19, [
@@ -2077,20 +2125,22 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2077
2125
  unref(a) === "PUSH" && unref(Y) ? (openBlock(), createBlock(_sfc_main$k, {
2078
2126
  key: 0,
2079
2127
  "model-value": unref(Y),
2128
+ "show-validation": e.showValidation,
2080
2129
  "onUpdate:modelValue": b
2081
- }, null, 8, ["model-value"])) : unref(a) === "APP_INBOX" && unref(G) ? (openBlock(), createBlock(_sfc_main$l, {
2130
+ }, null, 8, ["model-value", "show-validation"])) : unref(a) === "APP_INBOX" && unref(G) ? (openBlock(), createBlock(_sfc_main$l, {
2082
2131
  key: 1,
2083
2132
  "model-value": unref(G),
2084
- variables: unref(f),
2133
+ variables: unref(y),
2134
+ "show-validation": e.showValidation,
2085
2135
  "onUpdate:modelValue": Z
2086
- }, null, 8, ["model-value", "variables"])) : unref(a) !== "APP_INBOX" && unref(a) !== "PUSH" ? (openBlock(), createBlock(_sfc_main$x, {
2136
+ }, null, 8, ["model-value", "variables", "show-validation"])) : unref(a) !== "APP_INBOX" && unref(a) !== "PUSH" ? (openBlock(), createBlock(_sfc_main$x, {
2087
2137
  key: unref(a),
2088
2138
  "model-value": unref(q),
2089
2139
  "allow-email": !1,
2090
2140
  "allow-whatsapp": !1,
2091
2141
  "hide-credit-card": !0,
2092
2142
  "trigger-type": e.triggerType,
2093
- variables: unref(f),
2143
+ variables: unref(y),
2094
2144
  placeholder: e.placeholder,
2095
2145
  "onUpdate:modelValue": E[3] || (E[3] = (S) => B(unref(H), S))
2096
2146
  }, null, 8, ["model-value", "trigger-type", "variables", "placeholder"])) : createCommentVNode("", !0)
@@ -2133,14 +2183,14 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2133
2183
  (m) => isRuleEntry(m) && RuleBuilder.simplify(m).operator == "_rrule"
2134
2184
  ) ? "repeating" : "fixed";
2135
2185
  }
2136
- const a = ref(n()), r = ref(!1), p = ref(!1), h = computed(() => [
2186
+ const a = ref(n()), r = ref(!1), p = ref(!1), v = computed(() => [
2137
2187
  { label: o("connect.template.rule.schedule.fixed"), value: "fixed" },
2138
2188
  { label: o("connect.template.rule.schedule.repeating"), value: "repeating" }
2139
- ]), y = computed(() => {
2189
+ ]), f = computed(() => {
2140
2190
  const u = RuleBuilder.getRules(d.modelValue), m = u.find(
2141
- (k) => isRuleEntry(k) && RuleBuilder.simplify(k).property == "trigger.date"
2191
+ (x) => isRuleEntry(x) && RuleBuilder.simplify(x).property == "trigger.date"
2142
2192
  ), C = u.find(
2143
- (k) => isRuleEntry(k) && RuleBuilder.simplify(k).property == "trigger.time"
2193
+ (x) => isRuleEntry(x) && RuleBuilder.simplify(x).property == "trigger.time"
2144
2194
  );
2145
2195
  return {
2146
2196
  date: m ? RuleBuilder.simplify(m).equator : null,
@@ -2154,7 +2204,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2154
2204
  d.endDate ? new Date(d.endDate) : void 0
2155
2205
  )
2156
2206
  );
2157
- function x(u, m) {
2207
+ function k(u, m) {
2158
2208
  i(
2159
2209
  "update:model-value",
2160
2210
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
@@ -2166,18 +2216,18 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2166
2216
  watch(
2167
2217
  () => d.startDate,
2168
2218
  (u, m) => {
2169
- if (!u || u === m || a.value !== "repeating" || !y.value.date) return;
2170
- const C = RRule.fromString(y.value.date), k = new RRule({
2219
+ if (!u || u === m || a.value !== "repeating" || !f.value.date) return;
2220
+ const C = RRule.fromString(f.value.date), x = new RRule({
2171
2221
  ...C.origOptions,
2172
2222
  dtstart: new Date(u)
2173
2223
  }).toString();
2174
- k !== y.value.date && (x(k, y.value.time), p.value = !0);
2224
+ x !== f.value.date && (k(x, f.value.time), p.value = !0);
2175
2225
  }
2176
2226
  );
2177
- function f(u) {
2227
+ function y(u) {
2178
2228
  const m = u.value, C = getRruleAnchorDate({
2179
2229
  startDate: d.startDate ? new Date(d.startDate) : void 0
2180
- }), k = m == "fixed" ? [
2230
+ }), x = m == "fixed" ? [
2181
2231
  RuleBuilder.constructEntry(
2182
2232
  "trigger.date",
2183
2233
  "_isOnDate",
@@ -2204,11 +2254,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2204
2254
  "update:model-value",
2205
2255
  RuleBuilder.setRuleToGroup(
2206
2256
  RuleBuilder.scaffoldGroup("g_schedule"),
2207
- k
2257
+ x
2208
2258
  )
2209
2259
  ), a.value = m, p.value = !1;
2210
2260
  }
2211
- function v(u) {
2261
+ function g(u) {
2212
2262
  a.value == "fixed" ? i(
2213
2263
  "update:model-value",
2214
2264
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
@@ -2223,33 +2273,33 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2223
2273
  u.time
2224
2274
  )
2225
2275
  ])
2226
- ) : x(u.date, u.time), p.value = !1;
2276
+ ) : k(u.date, u.time), p.value = !1;
2227
2277
  }
2228
2278
  return (u, m) => {
2229
- const C = resolveComponent("FmButtonGroup"), k = resolveComponent("FmTimePicker"), $ = resolveComponent("FmIcon"), F = resolveComponent("FmTooltip"), N = resolveComponent("FmField"), D = resolveComponent("FmCard"), w = resolveComponent("FmPopover"), O = resolveComponent("FmDatePicker"), j = resolveComponent("FmHelperText");
2279
+ const C = resolveComponent("FmButtonGroup"), x = resolveComponent("FmTimePicker"), $ = resolveComponent("FmIcon"), F = resolveComponent("FmTooltip"), N = resolveComponent("FmField"), D = resolveComponent("FmCard"), w = resolveComponent("FmPopover"), O = resolveComponent("FmDatePicker"), j = resolveComponent("FmHelperText");
2230
2280
  return openBlock(), createElementBlock(Fragment, null, [
2231
2281
  createVNode(C, {
2232
- items: unref(h),
2233
- "model-value": unref(h).find((I) => I.value === unref(a)) ?? null,
2234
- "onUpdate:modelValue": f,
2282
+ items: unref(v),
2283
+ "model-value": unref(v).find((I) => I.value === unref(a)) ?? null,
2284
+ "onUpdate:modelValue": y,
2235
2285
  class: "mb-8"
2236
2286
  }, null, 8, ["items", "model-value"]),
2237
2287
  createElementVNode("div", _hoisted_1$f, [
2238
2288
  createElementVNode("div", _hoisted_2$c, [
2239
- createVNode(k, {
2289
+ createVNode(x, {
2240
2290
  label: unref(o)("connect.template.rule.schedule.notify_time"),
2241
- "model-value": unref(y).time,
2242
- "onUpdate:modelValue": m[0] || (m[0] = (I) => v({ date: unref(y).date, time: I })),
2243
- "helper-text": unref(y).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
2244
- "helper-state": unref(y).time ? void 0 : "error"
2291
+ "model-value": unref(f).time,
2292
+ "onUpdate:modelValue": m[0] || (m[0] = (I) => g({ date: unref(f).date, time: I })),
2293
+ "helper-text": unref(f).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
2294
+ "helper-state": unref(f).time ? void 0 : "error"
2245
2295
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]),
2246
2296
  unref(a) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$9, [
2247
2297
  createElementVNode("div", _hoisted_4$8, [
2248
2298
  createElementVNode("div", null, toDisplayString(unref(o)("connect.template.rule.schedule.notify_date")), 1),
2249
- unref(y).date ? (openBlock(), createBlock(F, {
2299
+ unref(f).date ? (openBlock(), createBlock(F, {
2250
2300
  key: 0,
2251
2301
  "z-index": 9999,
2252
- content: unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options)
2302
+ content: unref(SummarizeRrule)(unref(RRule).fromString(unref(f).date).options)
2253
2303
  }, {
2254
2304
  default: withCtx(() => [
2255
2305
  createVNode($, {
@@ -2268,11 +2318,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2268
2318
  "popover-button": withCtx(() => [
2269
2319
  createVNode(N, {
2270
2320
  class: "cursor-pointer",
2271
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2272
- "helper-state": unref(y).date ? void 0 : "error"
2321
+ "helper-text": unref(f).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2322
+ "helper-state": unref(f).date ? void 0 : "error"
2273
2323
  }, {
2274
2324
  default: withCtx(() => [
2275
- createElementVNode("div", _hoisted_5$6, toDisplayString(unref(y).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
2325
+ createElementVNode("div", _hoisted_5$6, toDisplayString(unref(f).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(f).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
2276
2326
  ]),
2277
2327
  _: 1
2278
2328
  }, 8, ["helper-text", "helper-state"])
@@ -2282,10 +2332,10 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2282
2332
  default: withCtx(() => [
2283
2333
  createVNode(_sfc_main$y, {
2284
2334
  "apply-button": !0,
2285
- "model-value": unref(y).date || "",
2335
+ "model-value": unref(f).date || "",
2286
2336
  "start-date": e.startDate ? new Date(e.startDate) : /* @__PURE__ */ new Date(),
2287
2337
  onCancel: m[1] || (m[1] = (I) => r.value = !1),
2288
- "onUpdate:modelValue": m[2] || (m[2] = (I) => (v({ date: I, time: unref(y).time }), r.value = !1))
2338
+ "onUpdate:modelValue": m[2] || (m[2] = (I) => (g({ date: I, time: unref(f).time }), r.value = !1))
2289
2339
  }, null, 8, ["model-value", "start-date"])
2290
2340
  ]),
2291
2341
  _: 1
@@ -2296,13 +2346,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2296
2346
  ])) : (openBlock(), createBlock(O, {
2297
2347
  key: 1,
2298
2348
  label: unref(o)("connect.template.rule.schedule.notify_date"),
2299
- "model-value": unref(y).date || "",
2300
- "onUpdate:modelValue": m[4] || (m[4] = (I) => v({ date: I, time: unref(y).time })),
2301
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2302
- "helper-state": unref(y).date ? void 0 : "error"
2349
+ "model-value": unref(f).date || "",
2350
+ "onUpdate:modelValue": m[4] || (m[4] = (I) => g({ date: I, time: unref(f).time })),
2351
+ "helper-text": unref(f).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
2352
+ "helper-state": unref(f).date ? void 0 : "error"
2303
2353
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]))
2304
2354
  ]),
2305
- unref(y).date && unref(y).time && unref(V) ? (openBlock(), createBlock(j, {
2355
+ unref(f).date && unref(f).time && unref(V) ? (openBlock(), createBlock(j, {
2306
2356
  key: 0,
2307
2357
  text: `${unref(moment)(unref(V)).isAfter(unref(moment)()) ? unref(o)("connect.template.rule.schedule.next_notification") : unref(o)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(V)).format("dddd, DD MMM YYYY")} at
2308
2358
  ${unref(moment)(unref(V)).format("hh:mmA")}(UTC${unref(moment).tz(unref(l)).format("Z")}) (${unref(moment)(unref(V)).fromNow()})`
@@ -2376,27 +2426,27 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2376
2426
  emits: ["update:model-value"],
2377
2427
  setup(e, { expose: s, emit: o }) {
2378
2428
  const d = useMembershipStore(), { minor: i } = useLoading, c = ref(!1), l = ref(), n = ref(), a = ref(0), r = computed(() => {
2379
- var f;
2380
- return ((f = d.loyaltyRewards.items.find(
2381
- (v) => {
2429
+ var y;
2430
+ return ((y = d.loyaltyRewards.items.find(
2431
+ (g) => {
2382
2432
  var u;
2383
- return v.value === ((u = l.value) == null ? void 0 : u.collectible);
2433
+ return g.value === ((u = l.value) == null ? void 0 : u.collectible);
2384
2434
  }
2385
- )) == null ? void 0 : f.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
2435
+ )) == null ? void 0 : y.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
2386
2436
  }), p = computed(() => {
2387
- const x = r.value.safeParse(l.value);
2388
- return x.success ? [] : x.error.errors;
2437
+ const k = r.value.safeParse(l.value);
2438
+ return k.success ? [] : k.error.errors;
2389
2439
  });
2390
- function h(x, f, v) {
2391
- x && (l.value = f, a.value = v), c.value = x;
2440
+ function v(k, y, g) {
2441
+ k && (l.value = y, a.value = g), c.value = k;
2392
2442
  }
2393
- const y = o;
2443
+ const f = o;
2394
2444
  async function V() {
2395
- const x = r.value.safeParse(l.value);
2396
- x.success && (await i(
2445
+ const k = r.value.safeParse(l.value);
2446
+ k.success && (await i(
2397
2447
  async () => {
2398
- x.data.type === "VOUCHER" && n.value && (x.data.collectibleConfig.image = await firebaseStorage.update(
2399
- x.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2448
+ k.data.type === "VOUCHER" && n.value && (k.data.collectibleConfig.image = await firebaseStorage.update(
2449
+ k.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, n.value),
2400
2450
  n.value
2401
2451
  ));
2402
2452
  },
@@ -2404,18 +2454,18 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2404
2454
  message: "Uploading reward image",
2405
2455
  successMessage: "Reward image updated"
2406
2456
  }
2407
- ), y("update:model-value", x.data, a.value));
2457
+ ), f("update:model-value", k.data, a.value));
2408
2458
  }
2409
2459
  return s({
2410
- showSheet: h
2411
- }), (x, f) => {
2412
- const v = resolveComponent("FmSelect"), u = resolveComponent("FmStepperField"), m = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
2460
+ showSheet: v
2461
+ }), (k, y) => {
2462
+ const g = resolveComponent("FmSelect"), u = resolveComponent("FmStepperField"), m = resolveComponent("FmButton"), C = resolveComponent("FmSideSheet");
2413
2463
  return openBlock(), createBlock(C, {
2414
2464
  "max-width": 560,
2415
2465
  modelValue: unref(c),
2416
2466
  "onUpdate:modelValue": [
2417
- f[9] || (f[9] = (k) => isRef(c) ? c.value = k : null),
2418
- f[10] || (f[10] = (k) => c.value = k)
2467
+ y[9] || (y[9] = (x) => isRef(c) ? c.value = x : null),
2468
+ y[10] || (y[10] = (x) => c.value = x)
2419
2469
  ],
2420
2470
  header: "Edit reward",
2421
2471
  "dismiss-away": ""
@@ -2427,21 +2477,21 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2427
2477
  type: "button",
2428
2478
  disabled: unref(p).length > 0,
2429
2479
  label: "Confirm",
2430
- onClick: f[7] || (f[7] = (k) => V())
2480
+ onClick: y[7] || (y[7] = (x) => V())
2431
2481
  }, null, 8, ["disabled"]),
2432
2482
  createVNode(m, {
2433
2483
  variant: "secondary",
2434
2484
  type: "button",
2435
2485
  label: "Cancel",
2436
- onClick: f[8] || (f[8] = (k) => c.value = !1)
2486
+ onClick: y[8] || (y[8] = (x) => c.value = !1)
2437
2487
  })
2438
2488
  ])
2439
2489
  ]),
2440
2490
  default: withCtx(() => {
2441
- var k, $, F;
2491
+ var x, $, F;
2442
2492
  return [
2443
2493
  unref(l) ? (openBlock(), createElementBlock("div", _hoisted_1$d, [
2444
- createVNode(v, {
2494
+ createVNode(g, {
2445
2495
  label: "Reward Type",
2446
2496
  items: [
2447
2497
  { label: "No Reward", value: "NO_REWARD" },
@@ -2449,7 +2499,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2449
2499
  { label: "Loyalty", value: "LOYALTY" }
2450
2500
  ],
2451
2501
  "model-value": unref(l).type,
2452
- "onUpdate:modelValue": f[0] || (f[0] = (N) => {
2502
+ "onUpdate:modelValue": y[0] || (y[0] = (N) => {
2453
2503
  N == "NO_REWARD" ? l.value = {
2454
2504
  type: "NO_REWARD",
2455
2505
  collectible: null,
@@ -2482,31 +2532,31 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2482
2532
  };
2483
2533
  })
2484
2534
  }, null, 8, ["model-value"]),
2485
- unref(l).type == "LOYALTY" ? (openBlock(), createBlock(v, {
2535
+ unref(l).type == "LOYALTY" ? (openBlock(), createBlock(g, {
2486
2536
  key: 0,
2487
2537
  label: "Loyalty type",
2488
2538
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "collectible", [unref(l).type])],
2489
2539
  items: unref(d).loyaltyRewards.items,
2490
2540
  "model-value": unref(l).collectible,
2491
- "onUpdate:modelValue": f[1] || (f[1] = (N) => unref(l).collectible = N)
2541
+ "onUpdate:modelValue": y[1] || (y[1] = (N) => unref(l).collectible = N)
2492
2542
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
2493
2543
  createVNode(u, {
2494
2544
  label: "Weight",
2495
2545
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "weight", [unref(l).type])],
2496
2546
  "model-value": unref(l).weight,
2497
- "onUpdate:modelValue": f[2] || (f[2] = (N) => l.value = {
2547
+ "onUpdate:modelValue": y[2] || (y[2] = (N) => l.value = {
2498
2548
  ...unref(l),
2499
2549
  weight: N
2500
2550
  })
2501
2551
  }, null, 8, ["rules", "model-value"]),
2502
2552
  unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2503
- ((k = unref(d).loyaltyRewards.items.find(
2553
+ ((x = unref(d).loyaltyRewards.items.find(
2504
2554
  (N) => {
2505
2555
  var D;
2506
2556
  return N.value === ((D = unref(l)) == null ? void 0 : D.collectible);
2507
2557
  }
2508
- )) == null ? void 0 : k.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2509
- f[11] || (f[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2558
+ )) == null ? void 0 : x.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2559
+ y[11] || (y[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
2510
2560
  createVNode(_sfc_main$z, {
2511
2561
  class: "mt-[-8px]",
2512
2562
  rules: [
@@ -2516,13 +2566,13 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2516
2566
  "error-text": unref(ZodHelper).helperText(unref(p), "earningOption"),
2517
2567
  "fixed-type": !0,
2518
2568
  "model-value": unref(l).earningOption,
2519
- "onUpdate:modelValue": f[3] || (f[3] = (N) => l.value = {
2569
+ "onUpdate:modelValue": y[3] || (y[3] = (N) => l.value = {
2520
2570
  ...unref(l),
2521
2571
  earningOption: N
2522
2572
  })
2523
2573
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])
2524
2574
  ], 64)) : createCommentVNode("", !0),
2525
- f[12] || (f[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2575
+ y[12] || (y[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
2526
2576
  createVNode(_sfc_main$A, {
2527
2577
  type: unref(l).type === "LOYALTY" ? "custom" : "range",
2528
2578
  "for-credit": unref(l).type === "LOYALTY" && (($ = unref(d).loyaltyRewards.items.find(
@@ -2534,7 +2584,7 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2534
2584
  class: "!gap-24",
2535
2585
  rules: [unref(ZodHelper).ruleAtPath(unref(r), "validityOption", [unref(l).type])],
2536
2586
  "model-value": unref(l).validityOption,
2537
- "onUpdate:modelValue": f[4] || (f[4] = (N) => l.value = {
2587
+ "onUpdate:modelValue": y[4] || (y[4] = (N) => l.value = {
2538
2588
  ...unref(l),
2539
2589
  validityOption: N
2540
2590
  })
@@ -2544,11 +2594,11 @@ const _hoisted_1$g = { class: "flex flex-col gap-[28px]" }, _hoisted_2$d = { cla
2544
2594
  key: 2,
2545
2595
  "reward-image": unref(n),
2546
2596
  "model-value": ((F = unref(l)) == null ? void 0 : F.collectibleConfig) ?? void 0,
2547
- "onUpdate:modelValue": f[5] || (f[5] = (N) => l.value = {
2597
+ "onUpdate:modelValue": y[5] || (y[5] = (N) => l.value = {
2548
2598
  ...unref(l),
2549
2599
  collectibleConfig: N
2550
2600
  }),
2551
- "onUpdate:rewardImage": f[6] || (f[6] = (N) => n.value = N)
2601
+ "onUpdate:rewardImage": y[6] || (y[6] = (N) => n.value = N)
2552
2602
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
2553
2603
  createVNode(JsonViewer, { json: unref(p) }, null, 8, ["json"])
2554
2604
  ])) : createCommentVNode("", !0)
@@ -2579,35 +2629,35 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2579
2629
  emits: ["update:model-value"],
2580
2630
  setup(e, { emit: s }) {
2581
2631
  const o = e, d = s, i = useMembershipStore(), { t: c } = useI18n(), l = z$1.array(z$1.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), n = computed(() => o.modelValue ?? []), a = computed(() => {
2582
- const f = l.safeParse(n.value);
2583
- return f.success ? [] : f.error.errors;
2632
+ const y = l.safeParse(n.value);
2633
+ return y.success ? [] : y.error.errors;
2584
2634
  }), r = ref();
2585
- function p(f, v) {
2635
+ function p(y, g) {
2586
2636
  var m;
2587
2637
  const u = [...n.value];
2588
- u[v] = f, (m = r.value) == null || m.showSheet(!1), d("update:model-value", u);
2638
+ u[g] = y, (m = r.value) == null || m.showSheet(!1), d("update:model-value", u);
2589
2639
  }
2590
- function h(f) {
2591
- const v = f.type == "VOUCHER" ? f.collectibleConfig : i.collectibles.find(
2592
- (C) => C._id.toString() == f.collectible
2593
- ), u = CollectionUtils.formattedType((v == null ? void 0 : v.name) || ""), m = f.weight;
2640
+ function v(y) {
2641
+ const g = y.type == "VOUCHER" ? y.collectibleConfig : i.collectibles.find(
2642
+ (C) => C._id.toString() == y.collectible
2643
+ ), u = CollectionUtils.formattedType((g == null ? void 0 : g.name) || ""), m = y.weight;
2594
2644
  return {
2595
2645
  label: isNullOrEmpty(u) ? "NO REWARD" : u,
2596
- sublabel: `${m} (${(m / n.value.reduce((C, k) => C + k.weight, 0) * 100).toFixed(2)}%)`
2646
+ sublabel: `${m} (${(m / n.value.reduce((C, x) => C + x.weight, 0) * 100).toFixed(2)}%)`
2597
2647
  };
2598
2648
  }
2599
- function y(f) {
2649
+ function f(y) {
2600
2650
  var u;
2601
- const v = [...n.value];
2602
- (u = r.value) == null || u.showSheet(!0, v[f], f);
2651
+ const g = [...n.value];
2652
+ (u = r.value) == null || u.showSheet(!0, g[y], y);
2603
2653
  }
2604
- function V(f) {
2605
- const v = [...n.value];
2606
- v.splice(f, 1), d("update:model-value", v);
2654
+ function V(y) {
2655
+ const g = [...n.value];
2656
+ g.splice(y, 1), d("update:model-value", g);
2607
2657
  }
2608
- function x() {
2609
- var f;
2610
- (f = r.value) == null || f.showSheet(
2658
+ function k() {
2659
+ var y;
2660
+ (y = r.value) == null || y.showSheet(
2611
2661
  !0,
2612
2662
  {
2613
2663
  type: "NO_REWARD",
@@ -2617,28 +2667,28 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2617
2667
  n.value.length
2618
2668
  );
2619
2669
  }
2620
- return (f, v) => {
2670
+ return (y, g) => {
2621
2671
  const u = resolveComponent("FmButton"), m = resolveComponent("FmCard"), C = resolveComponent("FmHelperText");
2622
2672
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
2623
2673
  createElementVNode("div", _hoisted_2$9, toDisplayString(unref(c)("connect.template.configure_reward_type")), 1),
2624
2674
  createVNode(u, {
2625
2675
  label: unref(c)("connect.campaign.rewardPool.addReward"),
2626
- onClick: v[0] || (v[0] = (k) => x()),
2676
+ onClick: g[0] || (g[0] = (x) => k()),
2627
2677
  variant: "plain",
2628
2678
  icon: "add"
2629
2679
  }, null, 8, ["label"]),
2630
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (k, $) => (openBlock(), createBlock(m, {
2680
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(n), (x, $) => (openBlock(), createBlock(m, {
2631
2681
  key: $,
2632
2682
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
2633
2683
  variant: "outlined",
2634
- onClick: (F) => y($)
2684
+ onClick: (F) => f($)
2635
2685
  }, {
2636
2686
  default: withCtx(() => {
2637
2687
  var F;
2638
2688
  return [
2639
2689
  createElementVNode("div", null, [
2640
- createElementVNode("div", _hoisted_3$7, toDisplayString(k.type == "LOYALTY" ? (F = k == null ? void 0 : k.earningOption) == null ? void 0 : F.amount : "") + " " + toDisplayString(h(k).label), 1),
2641
- createElementVNode("div", _hoisted_4$6, toDisplayString(h(k).sublabel), 1)
2690
+ createElementVNode("div", _hoisted_3$7, toDisplayString(x.type == "LOYALTY" ? (F = x == null ? void 0 : x.earningOption) == null ? void 0 : F.amount : "") + " " + toDisplayString(v(x).label), 1),
2691
+ createElementVNode("div", _hoisted_4$6, toDisplayString(v(x).sublabel), 1)
2642
2692
  ]),
2643
2693
  createVNode(u, {
2644
2694
  icon: "delete",
@@ -2649,9 +2699,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2649
2699
  }),
2650
2700
  _: 2
2651
2701
  }, 1032, ["onClick"]))), 128)),
2652
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter((k) => k.path.join(".") == ""), (k) => (openBlock(), createBlock(C, {
2653
- key: k.message,
2654
- text: k.message,
2702
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter((x) => x.path.join(".") == ""), (x) => (openBlock(), createBlock(C, {
2703
+ key: x.message,
2704
+ text: x.message,
2655
2705
  state: "error"
2656
2706
  }, null, 8, ["text"]))), 128)),
2657
2707
  createVNode(_sfc_main$d, {
@@ -2682,33 +2732,33 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2682
2732
  }
2683
2733
  ]);
2684
2734
  return (l, n) => {
2685
- var h, y, V;
2735
+ var v, f, V;
2686
2736
  const a = resolveComponent("FmSwitch"), r = resolveComponent("FmCard"), p = resolveComponent("FmHelperText");
2687
2737
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
2688
2738
  createVNode(a, {
2689
2739
  label: unref(o)("connect.template.promotion_game.enable"),
2690
- "model-value": !!((h = e.modelValue) != null && h.gameType),
2691
- "onUpdate:modelValue": n[0] || (n[0] = (x) => x ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
2740
+ "model-value": !!((v = e.modelValue) != null && v.gameType),
2741
+ "onUpdate:modelValue": n[0] || (n[0] = (k) => k ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
2692
2742
  }, null, 8, ["label", "model-value"]),
2693
- ((y = e.modelValue) == null ? void 0 : y.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
2694
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (x) => {
2695
- var f, v;
2743
+ ((f = e.modelValue) == null ? void 0 : f.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
2744
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (k) => {
2745
+ var y, g;
2696
2746
  return openBlock(), createBlock(r, {
2697
2747
  variant: "outlined",
2698
2748
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
2699
2749
  "col-span-2": unref(c).length == 1,
2700
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((f = e.modelValue) == null ? void 0 : f.gameType) == x.value,
2701
- "hover:bg-fm-color-opacity-sm": ((v = e.modelValue) == null ? void 0 : v.gameType) != x.value
2750
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((y = e.modelValue) == null ? void 0 : y.gameType) == k.value,
2751
+ "hover:bg-fm-color-opacity-sm": ((g = e.modelValue) == null ? void 0 : g.gameType) != k.value
2702
2752
  }]),
2703
2753
  onClick: () => {
2704
2754
  var u;
2705
- ((u = d.modelValue) == null ? void 0 : u.gameType) != x.value && i("update:model-value", { gameType: x.value });
2755
+ ((u = d.modelValue) == null ? void 0 : u.gameType) != k.value && i("update:model-value", { gameType: k.value });
2706
2756
  },
2707
- key: x.value
2757
+ key: k.value
2708
2758
  }, {
2709
2759
  default: withCtx(() => [
2710
- createElementVNode("div", _hoisted_3$6, toDisplayString(x.label), 1),
2711
- createElementVNode("div", _hoisted_4$5, toDisplayString(x.description), 1)
2760
+ createElementVNode("div", _hoisted_3$6, toDisplayString(k.label), 1),
2761
+ createElementVNode("div", _hoisted_4$5, toDisplayString(k.description), 1)
2712
2762
  ]),
2713
2763
  _: 2
2714
2764
  }, 1032, ["class", "onClick"]);
@@ -2740,11 +2790,11 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2740
2790
  setup(e, { emit: s }) {
2741
2791
  const { t: o } = useI18n(), d = e, i = s, c = ref(d.modelValue ?? {}), l = ref(
2742
2792
  (() => {
2743
- const h = {};
2744
- return c.value.workingHour && Object.keys(c.value.workingHour).forEach((y) => {
2745
- const V = c.value.workingHour[y];
2746
- V && "periods" in V && Array.isArray(V.periods) ? h[y] = V.periods : Array.isArray(V) && (h[y] = V);
2747
- }), h;
2793
+ const v = {};
2794
+ return c.value.workingHour && Object.keys(c.value.workingHour).forEach((f) => {
2795
+ const V = c.value.workingHour[f];
2796
+ V && "periods" in V && Array.isArray(V.periods) ? v[f] = V.periods : Array.isArray(V) && (v[f] = V);
2797
+ }), v;
2748
2798
  })()
2749
2799
  ), n = [
2750
2800
  { key: "mon", label: "Monday" },
@@ -2754,30 +2804,30 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2754
2804
  { key: "fri", label: "Friday" },
2755
2805
  { key: "sat", label: "Saturday" },
2756
2806
  { key: "sun", label: "Sunday" }
2757
- ], a = (h) => {
2758
- l.value[h] || (l.value[h] = []), l.value[h].push({
2807
+ ], a = (v) => {
2808
+ l.value[v] || (l.value[v] = []), l.value[v].push({
2759
2809
  startTime: "00:00",
2760
2810
  endTime: "23:59"
2761
2811
  }), p();
2762
- }, r = (h, y) => {
2763
- l.value[h] && l.value[h].length > y && (l.value[h].splice(y, 1), l.value[h].length === 0 && delete l.value[h], p());
2812
+ }, r = (v, f) => {
2813
+ l.value[v] && l.value[v].length > f && (l.value[v].splice(f, 1), l.value[v].length === 0 && delete l.value[v], p());
2764
2814
  }, p = () => {
2765
- const h = Object.keys(l.value).reduce(
2766
- (y, V) => (l.value[V] && l.value[V].length > 0 && (y[V] = {
2815
+ const v = Object.keys(l.value).reduce(
2816
+ (f, V) => (l.value[V] && l.value[V].length > 0 && (f[V] = {
2767
2817
  periods: l.value[V]
2768
- }), y),
2818
+ }), f),
2769
2819
  {}
2770
2820
  );
2771
- c.value.workingHour = Object.keys(h).length > 0 ? h : void 0;
2821
+ c.value.workingHour = Object.keys(v).length > 0 ? v : void 0;
2772
2822
  };
2773
- return watch(c, () => i("update:model-value", c.value), { deep: !0 }), watch(l, p, { deep: !0 }), (h, y) => {
2774
- const V = resolveComponent("FmSelect"), x = resolveComponent("FmStepperField"), f = resolveComponent("FmCheckbox"), v = resolveComponent("FmTimePicker"), u = resolveComponent("FmButton");
2823
+ return watch(c, () => i("update:model-value", c.value), { deep: !0 }), watch(l, p, { deep: !0 }), (v, f) => {
2824
+ const V = resolveComponent("FmSelect"), k = resolveComponent("FmStepperField"), y = resolveComponent("FmCheckbox"), g = resolveComponent("FmTimePicker"), u = resolveComponent("FmButton");
2775
2825
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
2776
2826
  createElementVNode("div", _hoisted_2$7, [
2777
2827
  createVNode(V, {
2778
2828
  label: unref(o)("connect.template.eaterType"),
2779
2829
  modelValue: unref(c).eaterType,
2780
- "onUpdate:modelValue": y[0] || (y[0] = (m) => unref(c).eaterType = m),
2830
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => unref(c).eaterType = m),
2781
2831
  items: [
2782
2832
  { label: unref(o)("connect.template.allEaters"), value: "all" },
2783
2833
  { label: unref(o)("connect.template.newEatersOnly"), value: "new" },
@@ -2788,9 +2838,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2788
2838
  ],
2789
2839
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "eaterType")]
2790
2840
  }, null, 8, ["label", "modelValue", "items", "rules"]),
2791
- createVNode(x, {
2841
+ createVNode(k, {
2792
2842
  modelValue: unref(c).minBasketAmount,
2793
- "onUpdate:modelValue": y[1] || (y[1] = (m) => unref(c).minBasketAmount = m),
2843
+ "onUpdate:modelValue": f[1] || (f[1] = (m) => unref(c).minBasketAmount = m),
2794
2844
  "show-steppers": !1,
2795
2845
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "minBasketAmount")]
2796
2846
  }, {
@@ -2804,9 +2854,9 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2804
2854
  ]),
2805
2855
  _: 1
2806
2856
  }, 8, ["modelValue", "rules"]),
2807
- createVNode(x, {
2857
+ createVNode(k, {
2808
2858
  modelValue: unref(c).bundleQuantity,
2809
- "onUpdate:modelValue": y[2] || (y[2] = (m) => unref(c).bundleQuantity = m),
2859
+ "onUpdate:modelValue": f[2] || (f[2] = (m) => unref(c).bundleQuantity = m),
2810
2860
  "show-steppers": !1,
2811
2861
  rules: [unref(ZodHelper).ruleAtPath(e.schema, "bundleQuantity")]
2812
2862
  }, {
@@ -2829,7 +2879,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2829
2879
  class: "space-y-2"
2830
2880
  }, [
2831
2881
  createElementVNode("div", _hoisted_6$3, [
2832
- createVNode(f, {
2882
+ createVNode(y, {
2833
2883
  label: m.label,
2834
2884
  "model-value": !!(unref(l)[m.key] && unref(l)[m.key].length > 0),
2835
2885
  "onUpdate:modelValue": (C) => {
@@ -2838,30 +2888,30 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
2838
2888
  }, null, 8, ["label", "model-value", "onUpdate:modelValue"])
2839
2889
  ]),
2840
2890
  unref(l)[m.key] && unref(l)[m.key].length > 0 ? (openBlock(), createElementBlock("div", _hoisted_7$3, [
2841
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[m.key] || [], (C, k) => (openBlock(), createElementBlock("div", {
2842
- key: k,
2891
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l)[m.key] || [], (C, x) => (openBlock(), createElementBlock("div", {
2892
+ key: x,
2843
2893
  class: "flex items-center space-x-2 w-100"
2844
2894
  }, [
2845
- createVNode(v, {
2895
+ createVNode(g, {
2846
2896
  "model-value": C.startTime || "",
2847
2897
  "onUpdate:modelValue": ($) => {
2848
- unref(l)[m.key] && unref(l)[m.key][k] && (unref(l)[m.key][k].startTime = $ || "", p());
2898
+ unref(l)[m.key] && unref(l)[m.key][x] && (unref(l)[m.key][x].startTime = $ || "", p());
2849
2899
  }
2850
2900
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2851
- y[3] || (y[3] = createElementVNode("span", null, "to", -1)),
2852
- createVNode(v, {
2901
+ f[3] || (f[3] = createElementVNode("span", null, "to", -1)),
2902
+ createVNode(g, {
2853
2903
  "model-value": C.endTime || "",
2854
2904
  "onUpdate:modelValue": ($) => {
2855
- unref(l)[m.key] && unref(l)[m.key][k] && (unref(l)[m.key][k].endTime = $ || "", p());
2905
+ unref(l)[m.key] && unref(l)[m.key][x] && (unref(l)[m.key][x].endTime = $ || "", p());
2856
2906
  }
2857
2907
  }, null, 8, ["model-value", "onUpdate:modelValue"]),
2858
2908
  createVNode(u, {
2859
2909
  variant: "tertiary",
2860
2910
  size: "sm",
2861
- onClick: ($) => r(m.key, k),
2911
+ onClick: ($) => r(m.key, x),
2862
2912
  icon: "close"
2863
2913
  }, null, 8, ["onClick"]),
2864
- k === 0 ? (openBlock(), createBlock(u, {
2914
+ x === 0 ? (openBlock(), createBlock(u, {
2865
2915
  key: 0,
2866
2916
  onClick: ($) => a(m.key),
2867
2917
  icon: "add",
@@ -3025,20 +3075,20 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3025
3075
  return m.value === ((C = n.value) == null ? void 0 : C.collectible);
3026
3076
  }
3027
3077
  )) == null ? void 0 : u.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
3028
- }), h = computed(() => {
3029
- const v = p.value.safeParse(n.value);
3030
- return v.success ? [] : v.error.errors;
3078
+ }), v = computed(() => {
3079
+ const g = p.value.safeParse(n.value);
3080
+ return g.success ? [] : g.error.errors;
3031
3081
  });
3032
- function y(v, u, m) {
3033
- v && (n.value = u, r.value = m), l.value = v;
3082
+ function f(g, u, m) {
3083
+ g && (n.value = u, r.value = m), l.value = g;
3034
3084
  }
3035
3085
  const V = o;
3036
- async function x() {
3037
- const v = p.value.safeParse(n.value);
3038
- v.success && (await c(
3086
+ async function k() {
3087
+ const g = p.value.safeParse(n.value);
3088
+ g.success && (await c(
3039
3089
  async () => {
3040
- v.data.type === "VOUCHER" && a.value && (v.data.collectibleConfig.image = await firebaseStorage.update(
3041
- v.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3090
+ g.data.type === "VOUCHER" && a.value && (g.data.collectibleConfig.image = await firebaseStorage.update(
3091
+ g.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, a.value),
3042
3092
  a.value
3043
3093
  ));
3044
3094
  },
@@ -3046,13 +3096,13 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3046
3096
  message: "Uploading reward image",
3047
3097
  successMessage: "Reward image updated"
3048
3098
  }
3049
- ), V("update:model-value", v.data, r.value));
3099
+ ), V("update:model-value", g.data, r.value));
3050
3100
  }
3051
- const f = ref();
3101
+ const y = ref();
3052
3102
  return s({
3053
- showSheet: y
3054
- }), (v, u) => {
3055
- const m = resolveComponent("FmStepperField"), C = resolveComponent("FmSelect"), k = resolveComponent("FmForm"), $ = resolveComponent("FmButton"), F = resolveComponent("FmSideSheet");
3103
+ showSheet: f
3104
+ }), (g, u) => {
3105
+ const m = resolveComponent("FmStepperField"), C = resolveComponent("FmSelect"), x = resolveComponent("FmForm"), $ = resolveComponent("FmButton"), F = resolveComponent("FmSideSheet");
3056
3106
  return openBlock(), createBlock(F, {
3057
3107
  "max-width": 560,
3058
3108
  modelValue: unref(l),
@@ -3069,10 +3119,10 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3069
3119
  variant: "primary",
3070
3120
  type: "button",
3071
3121
  label: "Confirm",
3072
- disabled: unref(h).length > 0,
3122
+ disabled: unref(v).length > 0,
3073
3123
  onClick: u[8] || (u[8] = async () => {
3074
3124
  var N;
3075
- return (N = unref(f)) == null ? void 0 : N.validateInputs();
3125
+ return (N = unref(y)) == null ? void 0 : N.validateInputs();
3076
3126
  })
3077
3127
  }, null, 8, ["disabled"]),
3078
3128
  createVNode($, {
@@ -3085,12 +3135,12 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3085
3135
  ]),
3086
3136
  default: withCtx(() => [
3087
3137
  createVNode(JsonViewer, { json: unref(n) }, null, 8, ["json"]),
3088
- unref(n) ? (openBlock(), createBlock(k, {
3138
+ unref(n) ? (openBlock(), createBlock(x, {
3089
3139
  key: 0,
3090
3140
  class: "flex flex-col gap-y-24",
3091
3141
  ref_key: "formRef",
3092
- ref: f,
3093
- onValidationSuccess: u[7] || (u[7] = (N) => x())
3142
+ ref: y,
3143
+ onValidationSuccess: u[7] || (u[7] = (N) => k())
3094
3144
  }, {
3095
3145
  default: withCtx(() => {
3096
3146
  var N, D;
@@ -3162,8 +3212,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3162
3212
  createVNode(_sfc_main$z, {
3163
3213
  class: "mt-[-8px]",
3164
3214
  rules: [unref(ZodHelper).ruleAtPath(unref(p), "earningOption", [unref(n).type])],
3165
- "helper-state": unref(ZodHelper).helperState(unref(h), "earningOption"),
3166
- "error-text": unref(ZodHelper).helperText(unref(h), "earningOption"),
3215
+ "helper-state": unref(ZodHelper).helperState(unref(v), "earningOption"),
3216
+ "error-text": unref(ZodHelper).helperText(unref(v), "earningOption"),
3167
3217
  "fixed-type": !0,
3168
3218
  "model-value": unref(n).earningOption,
3169
3219
  "onUpdate:modelValue": u[3] || (u[3] = (w) => n.value = {
@@ -3198,7 +3248,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3198
3248
  }),
3199
3249
  "onUpdate:rewardImage": u[6] || (u[6] = (w) => a.value = w)
3200
3250
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
3201
- createVNode(JsonViewer, { json: unref(h) }, null, 8, ["json"])
3251
+ createVNode(JsonViewer, { json: unref(v) }, null, 8, ["json"])
3202
3252
  ];
3203
3253
  }),
3204
3254
  _: 1
@@ -3244,7 +3294,7 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3244
3294
  ),
3245
3295
  outline: unref(d) < p,
3246
3296
  key: p,
3247
- name: unref(i).some((h) => h === p) ? "featured_seasonal_and_gifts" : "check_circle"
3297
+ name: unref(i).some((v) => v === p) ? "featured_seasonal_and_gifts" : "check_circle"
3248
3298
  }, null, 8, ["class", "outline", "name"]))), 128))
3249
3299
  ])) : (openBlock(), createElementBlock("div", {
3250
3300
  key: 1,
@@ -3254,8 +3304,8 @@ const _hoisted_1$c = { class: "space-y-16" }, _hoisted_2$9 = { class: "fm-typo-e
3254
3304
  class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
3255
3305
  style: normalizeStyle({ width: unref(c) + "%" })
3256
3306
  }, null, 4),
3257
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (p, h) => (openBlock(), createElementBlock("div", {
3258
- key: h,
3307
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (p, v) => (openBlock(), createElementBlock("div", {
3308
+ key: v,
3259
3309
  class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
3260
3310
  style: normalizeStyle({ left: l(p) + "%" })
3261
3311
  }, [
@@ -3298,44 +3348,44 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3298
3348
  emits: ["update:model-value"],
3299
3349
  setup(e, { emit: s }) {
3300
3350
  const { t: o } = useI18n(), d = e, i = s, c = useMembershipStore(), l = z$1.array(z$1.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), n = computed(
3301
- () => d.modelValue.sort((v, u) => v.threshold - u.threshold) ?? []
3351
+ () => d.modelValue.sort((g, u) => g.threshold - u.threshold) ?? []
3302
3352
  ), a = computed(() => {
3303
- const v = l.safeParse(n.value);
3304
- return v.success ? [] : v.error.errors;
3353
+ const g = l.safeParse(n.value);
3354
+ return g.success ? [] : g.error.errors;
3305
3355
  }), r = ref();
3306
- function p(v, u) {
3356
+ function p(g, u) {
3307
3357
  var C;
3308
3358
  const m = [...n.value];
3309
- m[u] = v, (C = r.value) == null || C.showSheet(!1), i("update:model-value", m);
3359
+ m[u] = g, (C = r.value) == null || C.showSheet(!1), i("update:model-value", m);
3310
3360
  }
3311
- function h(v) {
3312
- const u = v.type == "VOUCHER" ? v.collectibleConfig : c.collectibles.find(
3313
- (k) => k._id.toString() == v.collectible
3314
- ), m = CollectionUtils.formattedType((u == null ? void 0 : u.name) || ""), C = v.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3315
- threshold: v.threshold,
3316
- amount: v.earningOption.amount
3361
+ function v(g) {
3362
+ const u = g.type == "VOUCHER" ? g.collectibleConfig : c.collectibles.find(
3363
+ (x) => x._id.toString() == g.collectible
3364
+ ), m = CollectionUtils.formattedType((u == null ? void 0 : u.name) || ""), C = g.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
3365
+ threshold: g.threshold,
3366
+ amount: g.earningOption.amount
3317
3367
  }) : o("connect.template.mission_pool.reward_sublabel_per_spend", {
3318
- threshold: v.threshold,
3319
- amount: v.earningOption.amount,
3320
- every: v.earningOption.every
3368
+ threshold: g.threshold,
3369
+ amount: g.earningOption.amount,
3370
+ every: g.earningOption.every
3321
3371
  });
3322
3372
  return {
3323
3373
  label: isNullOrEmpty(m) ? o("connect.template.mission_pool.no_reward") : m,
3324
3374
  sublabel: C
3325
3375
  };
3326
3376
  }
3327
- function y(v) {
3377
+ function f(g) {
3328
3378
  var m;
3329
3379
  const u = [...n.value];
3330
- (m = r.value) == null || m.showSheet(!0, u[v], v);
3380
+ (m = r.value) == null || m.showSheet(!0, u[g], g);
3331
3381
  }
3332
- function V(v) {
3382
+ function V(g) {
3333
3383
  const u = [...n.value];
3334
- u.splice(v, 1), i("update:model-value", u);
3384
+ u.splice(g, 1), i("update:model-value", u);
3335
3385
  }
3336
- function x() {
3337
- var v;
3338
- (v = r.value) == null || v.showSheet(
3386
+ function k() {
3387
+ var g;
3388
+ (g = r.value) == null || g.showSheet(
3339
3389
  !0,
3340
3390
  {
3341
3391
  type: "LOYALTY",
@@ -3352,21 +3402,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3352
3402
  n.value.length
3353
3403
  );
3354
3404
  }
3355
- function f(v) {
3405
+ function y(g) {
3356
3406
  var u, m;
3357
- return v.type == "VOUCHER" ? (u = v.collectibleConfig) == null ? void 0 : u.name : sentenceCase(
3407
+ return g.type == "VOUCHER" ? (u = g.collectibleConfig) == null ? void 0 : u.name : sentenceCase(
3358
3408
  ((m = c.loyaltyRewards.items.find(
3359
- (C) => C.value == v.collectible
3409
+ (C) => C.value == g.collectible
3360
3410
  )) == null ? void 0 : m.label) || ""
3361
3411
  );
3362
3412
  }
3363
- return (v, u) => {
3364
- const m = resolveComponent("FmButton"), C = resolveComponent("FmCard"), k = resolveComponent("FmHelperText");
3413
+ return (g, u) => {
3414
+ const m = resolveComponent("FmButton"), C = resolveComponent("FmCard"), x = resolveComponent("FmHelperText");
3365
3415
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
3366
3416
  createElementVNode("div", _hoisted_2$3, toDisplayString(unref(o)("connect.template.configure_reward_customer")), 1),
3367
3417
  createVNode(m, {
3368
3418
  label: unref(o)("connect.template.mission_pool.add_reward"),
3369
- onClick: u[0] || (u[0] = ($) => x()),
3419
+ onClick: u[0] || (u[0] = ($) => k()),
3370
3420
  variant: "plain",
3371
3421
  icon: "add"
3372
3422
  }, null, 8, ["label"]),
@@ -3374,12 +3424,12 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3374
3424
  key: F,
3375
3425
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
3376
3426
  variant: "outlined",
3377
- onClick: (N) => y(F)
3427
+ onClick: (N) => f(F)
3378
3428
  }, {
3379
3429
  default: withCtx(() => [
3380
3430
  createElementVNode("div", null, [
3381
- createElementVNode("div", _hoisted_3$3, toDisplayString(h($).label), 1),
3382
- createElementVNode("div", _hoisted_4$2, toDisplayString(h($).sublabel), 1)
3431
+ createElementVNode("div", _hoisted_3$3, toDisplayString(v($).label), 1),
3432
+ createElementVNode("div", _hoisted_4$2, toDisplayString(v($).sublabel), 1)
3383
3433
  ]),
3384
3434
  createVNode(m, {
3385
3435
  icon: "delete",
@@ -3389,7 +3439,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3389
3439
  ]),
3390
3440
  _: 2
3391
3441
  }, 1032, ["onClick"]))), 128)),
3392
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter(($) => $.path.join(".") == ""), ($) => (openBlock(), createBlock(k, {
3442
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a).filter(($) => $.path.join(".") == ""), ($) => (openBlock(), createBlock(x, {
3393
3443
  key: $.message,
3394
3444
  text: $.message,
3395
3445
  state: "error"
@@ -3405,7 +3455,7 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3405
3455
  return [
3406
3456
  createElementVNode("div", _hoisted_6$2, [
3407
3457
  createElementVNode("div", null, [
3408
- createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString((($ = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : $.earningOption.amount) > 1 ? (F = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : F.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? f(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3458
+ createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString((($ = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : $.earningOption.amount) > 1 ? (F = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : F.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? y(e.modelValue[e.modelValue.length - 1]) : ""), 1),
3409
3459
  createElementVNode("div", _hoisted_8$2, toDisplayString(unref(o)("connect.template.mission_pool.earn_stamp")), 1)
3410
3460
  ])
3411
3461
  ]),
@@ -3454,35 +3504,35 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3454
3504
  }
3455
3505
  ]), l = s;
3456
3506
  return (n, a) => {
3457
- var h;
3507
+ var v;
3458
3508
  const r = resolveComponent("FmCard"), p = resolveComponent("FmStepperField");
3459
3509
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
3460
3510
  createElementVNode("div", _hoisted_2$2, [
3461
3511
  createElementVNode("div", _hoisted_3$2, toDisplayString(unref(o)("connect.campaign.mission.missionType")), 1),
3462
3512
  createElementVNode("div", _hoisted_4$1, toDisplayString(unref(o)("connect.template.select_game")), 1),
3463
3513
  createElementVNode("div", _hoisted_5$1, [
3464
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (y) => {
3465
- var V, x;
3514
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(c), (f) => {
3515
+ var V, k;
3466
3516
  return openBlock(), createBlock(r, {
3467
3517
  variant: "outlined",
3468
3518
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
3469
3519
  "col-span-2": unref(c).length == 1,
3470
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = e.modelValue) == null ? void 0 : V.type) == y.value,
3471
- "hover:bg-fm-color-opacity-sm": ((x = e.modelValue) == null ? void 0 : x.type) != y.value
3520
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((V = e.modelValue) == null ? void 0 : V.type) == f.value,
3521
+ "hover:bg-fm-color-opacity-sm": ((k = e.modelValue) == null ? void 0 : k.type) != f.value
3472
3522
  }]),
3473
3523
  onClick: () => {
3474
- var f, v;
3475
- ((f = e.modelValue) == null ? void 0 : f.type) != y.value && l("update:model-value", {
3524
+ var y, g;
3525
+ ((y = e.modelValue) == null ? void 0 : y.type) != f.value && l("update:model-value", {
3476
3526
  ...e.modelValue,
3477
- type: y.value,
3478
- end: ((v = e.modelValue) == null ? void 0 : v.end) || 1
3527
+ type: f.value,
3528
+ end: ((g = e.modelValue) == null ? void 0 : g.end) || 1
3479
3529
  });
3480
3530
  },
3481
- key: y.value
3531
+ key: f.value
3482
3532
  }, {
3483
3533
  default: withCtx(() => [
3484
- createElementVNode("div", _hoisted_6$1, toDisplayString(y.label), 1),
3485
- createElementVNode("div", _hoisted_7$1, toDisplayString(y.description), 1)
3534
+ createElementVNode("div", _hoisted_6$1, toDisplayString(f.label), 1),
3535
+ createElementVNode("div", _hoisted_7$1, toDisplayString(f.description), 1)
3486
3536
  ]),
3487
3537
  _: 2
3488
3538
  }, 1032, ["class", "onClick"]);
@@ -3494,13 +3544,13 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
3494
3544
  createElementVNode("div", _hoisted_10$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequiredDescription")), 1),
3495
3545
  createVNode(p, {
3496
3546
  label: unref(o)("connect.campaign.mission.maximumToCollect"),
3497
- "model-value": ((h = e.modelValue) == null ? void 0 : h.end) || null,
3498
- "onUpdate:modelValue": a[0] || (a[0] = (y) => {
3547
+ "model-value": ((v = e.modelValue) == null ? void 0 : v.end) || null,
3548
+ "onUpdate:modelValue": a[0] || (a[0] = (f) => {
3499
3549
  var V;
3500
3550
  return l("update:model-value", {
3501
3551
  ...e.modelValue,
3502
3552
  type: ((V = e.modelValue) == null ? void 0 : V.type) || "STAMP",
3503
- end: y
3553
+ end: f
3504
3554
  });
3505
3555
  }),
3506
3556
  "helper-text": unref(ZodHelper).helperText(unref(i), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
@@ -3554,12 +3604,12 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3554
3604
  function l(p) {
3555
3605
  switch (i.field.type) {
3556
3606
  case "timeframe":
3557
- const h = p.startDate ? hooks(p.startDate).startOf("day").toISOString() : void 0, y = p.endDate ? hooks(p.endDate).endOf("day").toISOString() : void 0;
3607
+ const v = p.startDate ? hooks(p.startDate).startOf("day").toISOString() : void 0, f = p.endDate ? hooks(p.endDate).endOf("day").toISOString() : void 0;
3558
3608
  c("update:model-value", {
3559
3609
  type: "timeframe",
3560
3610
  property: "__now",
3561
- start: h,
3562
- end: y
3611
+ start: v,
3612
+ end: f
3563
3613
  });
3564
3614
  break;
3565
3615
  case "image": {
@@ -3603,10 +3653,10 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3603
3653
  d(i.field.label_locale, i.field.label ?? "")
3604
3654
  ) : void 0
3605
3655
  }));
3606
- return (p, h) => {
3607
- var u, m, C, k, $;
3608
- const y = resolveComponent("FmTextField"), V = resolveComponent("FmStepperField"), x = resolveComponent("FmTextarea"), f = resolveComponent("FmHelperText"), v = resolveComponent("FmSwitch");
3609
- return e.field.type === "text" ? (openBlock(), createBlock(y, {
3656
+ return (p, v) => {
3657
+ var u, m, C, x, $;
3658
+ const f = resolveComponent("FmTextField"), V = resolveComponent("FmStepperField"), k = resolveComponent("FmTextarea"), y = resolveComponent("FmHelperText"), g = resolveComponent("FmSwitch");
3659
+ return e.field.type === "text" ? (openBlock(), createBlock(f, {
3610
3660
  key: 0,
3611
3661
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3612
3662
  "label-mark": unref(r).labelMark,
@@ -3628,7 +3678,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3628
3678
  "helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
3629
3679
  "helper-text": e.field.isRuleChildren ? e.helperText : void 0
3630
3680
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
3631
- ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(x, {
3681
+ ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(k, {
3632
3682
  key: 2,
3633
3683
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3634
3684
  "label-mark": unref(r).labelMark,
@@ -3636,7 +3686,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3636
3686
  "model-value": unref(n),
3637
3687
  "onUpdate:modelValue": l,
3638
3688
  "show-word-count": "",
3639
- "max-length": ($ = (k = (C = (m = (u = unref(r)) == null ? void 0 : u.unwrapped) == null ? void 0 : m._def) == null ? void 0 : C.checks) == null ? void 0 : k.find((F) => F.kind == "max")) == null ? void 0 : $.value
3689
+ "max-length": ($ = (x = (C = (m = (u = unref(r)) == null ? void 0 : u.unwrapped) == null ? void 0 : m._def) == null ? void 0 : C.checks) == null ? void 0 : x.find((F) => F.kind == "max")) == null ? void 0 : $.value
3640
3690
  }, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$o, {
3641
3691
  key: 3,
3642
3692
  "campaign-type": e.extras,
@@ -3648,7 +3698,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3648
3698
  "model-value": unref(n),
3649
3699
  "onUpdate:modelValue": l
3650
3700
  }, null, 8, ["model-value"]),
3651
- createVNode(f, {
3701
+ createVNode(y, {
3652
3702
  class: "!mt-[8px]",
3653
3703
  text: unref(ZodHelper).helperText(a(), ""),
3654
3704
  state: unref(ZodHelper).helperState(a(), "")
@@ -3664,7 +3714,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3664
3714
  (openBlock(), createBlock(resolveDynamicComponent(unref(r).zodLabel)))
3665
3715
  ]),
3666
3716
  _: 1
3667
- }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(v, {
3717
+ }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(g, {
3668
3718
  key: 6,
3669
3719
  label: unref(d)(e.field.label_locale, e.field.label ?? ""),
3670
3720
  "label-placement": "right",
@@ -3700,7 +3750,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3700
3750
  "onUpdate:modelValue": l,
3701
3751
  "can-set-auto-apply": e.field.property == "campaign.effect"
3702
3752
  }, null, 8, ["model-value", "can-set-auto-apply"]),
3703
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(f, {
3753
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(y, {
3704
3754
  key: 0,
3705
3755
  class: "!mt-[8px]",
3706
3756
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3711,7 +3761,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3711
3761
  "model-value": unref(n),
3712
3762
  "onUpdate:modelValue": l
3713
3763
  }, null, 8, ["model-value"]),
3714
- unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(f, {
3764
+ unref(n) ? createCommentVNode("", !0) : (openBlock(), createBlock(y, {
3715
3765
  key: 0,
3716
3766
  class: "!mt-[8px]",
3717
3767
  text: unref(o)("connect.campaign.common.effect_required"),
@@ -3783,7 +3833,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3783
3833
  "start-date": e.extras.start,
3784
3834
  "end-date": e.extras.end
3785
3835
  }, null, 8, ["model-value", "start-date", "end-date"]),
3786
- e.helperText ? (openBlock(), createBlock(f, {
3836
+ e.helperText ? (openBlock(), createBlock(y, {
3787
3837
  key: 0,
3788
3838
  class: "!mt-[8px]",
3789
3839
  text: e.helperText,
@@ -3794,14 +3844,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3794
3844
  "model-value": unref(n),
3795
3845
  "onUpdate:modelValue": l
3796
3846
  }, null, 8, ["model-value"]),
3797
- e.helperText ? (openBlock(), createBlock(f, {
3847
+ e.helperText ? (openBlock(), createBlock(y, {
3798
3848
  key: 0,
3799
3849
  class: "!mt-[8px]",
3800
3850
  text: e.helperText,
3801
3851
  state: "error"
3802
3852
  }, null, 8, ["text"])) : createCommentVNode("", !0)
3803
3853
  ], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
3804
- e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(f, {
3854
+ e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(n).rules.g_time).length > 0 ? (openBlock(), createBlock(y, {
3805
3855
  key: 0,
3806
3856
  state: "warning",
3807
3857
  text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
@@ -3810,7 +3860,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3810
3860
  "model-value": unref(n),
3811
3861
  "onUpdate:modelValue": l
3812
3862
  }, null, 8, ["model-value"]),
3813
- e.helperText ? (openBlock(), createBlock(f, {
3863
+ e.helperText ? (openBlock(), createBlock(y, {
3814
3864
  key: 1,
3815
3865
  class: "!mt-[8px]",
3816
3866
  text: e.helperText,
@@ -3821,7 +3871,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3821
3871
  "model-value": unref(n),
3822
3872
  "onUpdate:modelValue": l
3823
3873
  }, null, 8, ["model-value"]),
3824
- e.helperText ? (openBlock(), createBlock(f, {
3874
+ e.helperText ? (openBlock(), createBlock(y, {
3825
3875
  key: 0,
3826
3876
  class: "!mt-[8px]",
3827
3877
  text: e.helperText,
@@ -3832,7 +3882,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3832
3882
  "model-value": unref(n),
3833
3883
  "onUpdate:modelValue": l
3834
3884
  }, null, 8, ["model-value"]),
3835
- e.helperText ? (openBlock(), createBlock(f, {
3885
+ e.helperText ? (openBlock(), createBlock(y, {
3836
3886
  key: 0,
3837
3887
  class: "!mt-[8px]",
3838
3888
  text: e.helperText,
@@ -3843,7 +3893,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3843
3893
  "model-value": unref(n),
3844
3894
  "onUpdate:modelValue": l
3845
3895
  }, null, 8, ["model-value"]),
3846
- e.helperText ? (openBlock(), createBlock(f, {
3896
+ e.helperText ? (openBlock(), createBlock(y, {
3847
3897
  key: 0,
3848
3898
  class: "!mt-[8px]",
3849
3899
  text: e.helperText,
@@ -3854,7 +3904,7 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
3854
3904
  "model-value": unref(n),
3855
3905
  "onUpdate:modelValue": l
3856
3906
  }, null, 8, ["model-value"]),
3857
- e.helperText ? (openBlock(), createBlock(f, {
3907
+ e.helperText ? (openBlock(), createBlock(y, {
3858
3908
  key: 0,
3859
3909
  class: "!mt-[8px]",
3860
3910
  text: e.helperText,
@@ -4021,14 +4071,14 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4021
4071
  return;
4022
4072
  }
4023
4073
  if (_.set(data.value, e, s), e == "campaign.event.type") {
4024
- const h = ((c = (i = (d = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : d.campaign) == null ? void 0 : i.event) == null ? void 0 : c.rule) ? _.cloneDeep({
4074
+ const v = ((c = (i = (d = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : d.campaign) == null ? void 0 : i.event) == null ? void 0 : c.rule) ? _.cloneDeep({
4025
4075
  ...(r = (a = (n = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : n.campaign) == null ? void 0 : a.event) == null ? void 0 : r.rule
4026
4076
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
4027
4077
  RuleBuilder.scaffoldGroup("g_schedule"),
4028
4078
  RuleBuilder.scaffoldGroup("g_time"),
4029
4079
  RuleBuilder.scaffoldGroup("g_user"),
4030
4080
  RuleBuilder.scaffoldGroup("g_bill")
4031
- ]), y = RuleBuilder.setRuleToGroup(
4081
+ ]), f = RuleBuilder.setRuleToGroup(
4032
4082
  RuleBuilder.scaffoldGroup("g_schedule"),
4033
4083
  [
4034
4084
  RuleBuilder.constructEntry(
@@ -4041,13 +4091,13 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4041
4091
  "&&"
4042
4092
  );
4043
4093
  if (s != "SCHEDULE") {
4044
- _.set(data.value, "campaign.event.rule", h);
4094
+ _.set(data.value, "campaign.event.rule", v);
4045
4095
  return;
4046
4096
  }
4047
4097
  _.set(
4048
4098
  data.value,
4049
4099
  "campaign.event.rule",
4050
- RuleBuilder.setRuleToGroup(h, y)
4100
+ RuleBuilder.setRuleToGroup(v, f)
4051
4101
  );
4052
4102
  }
4053
4103
  e == "campaign.notify" && s == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
@@ -4221,9 +4271,9 @@ const _hoisted_1$2 = { key: 29 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
4221
4271
  disabled: isDisable(r),
4222
4272
  "campaign-type": unref(campaignType),
4223
4273
  "show-validation": unref(showValidation),
4224
- "onUpdate:modelValue": (h) => onUpdateProperty(r.property, h),
4225
- "onUpdate:file": async (h, y) => {
4226
- const V = await onUpdateFile(h, y);
4274
+ "onUpdate:modelValue": (v) => onUpdateProperty(r.property, v),
4275
+ "onUpdate:file": async (v, f) => {
4276
+ const V = await onUpdateFile(v, f);
4227
4277
  onUpdateProperty(r.property, V || "");
4228
4278
  },
4229
4279
  schema: unref(ZodHelper).typeAtPath(