@feedmepos/mf-connect 0.1.103-prod → 0.1.105-beta.1

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 (128) hide show
  1. package/dist/{App-WQh18XPc.js → App-CsGCNHBx.js} +44 -43
  2. package/dist/{Bin-IbjpWo35.js → Bin-CEzJQ2fp.js} +8 -8
  3. package/dist/{Broadcast-BijdkG1f.js → Broadcast-DinQIuUI.js} +11 -11
  4. package/dist/CampaignAnalytic-B9ecowKf.js +1826 -0
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D_YHOQWW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfVohrMN.js} +6 -6
  6. package/dist/{Card-Bp8BecBk.js → Card-y413-t0y.js} +19 -19
  7. package/dist/{Collections-QlS-tKVT.js → Collections-BryT5ufr.js} +21 -21
  8. package/dist/{Credit-D77lPO5s.js → Credit-BVqcBVPd.js} +118 -93
  9. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B9XP8UeF.js +53 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DA6dCw8Y.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DenseCvA.js} +815 -609
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DLSOD5uV.js → EffectSheet.vue_vue_type_style_index_0_lang-CzDCUJ51.js} +12 -12
  12. package/dist/{Experience-DzbJiEkB.js → Experience-BIf25_au.js} +109 -84
  13. package/dist/{FileSaver.min-DMdx33O6.js → FileSaver.min-DcDxTlEv.js} +1 -1
  14. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  15. package/dist/Game-CPFwbnwg.js +355 -0
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B8sYzU76.js → ImageInput.vue_vue_type_script_setup_true_lang-D1_02khe.js} +1 -1
  17. package/dist/{Index-BrH7zJgF.js → Index-9d6DE1WI.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BdnOZYPt.js → LocationPicker.vue_vue_type_script_setup_true_lang-DVqpfwuC.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Zm2-QRhl.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CY7T4ZrE.js} +1 -1
  20. package/dist/LoyaltyDashboard-L-dd3bBX.js +2865 -0
  21. package/dist/{MainLayout-D0w3tXfh.js → MainLayout-B0hVJj0s.js} +3 -3
  22. package/dist/{Marketing-Bj4eecVJ.js → Marketing-CzQOE5-T.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-BwrUAQ5g.js → MarketingMaterialEdit-CpnMbm4V.js} +6 -6
  24. package/dist/Member-BPXOBKnT.js +649 -0
  25. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-W-sQlF8i.js +1286 -0
  26. package/dist/MemberImportHistory-l5sPRJhS.js +187 -0
  27. package/dist/MemberList-BaFdqz1y.js +336 -0
  28. package/dist/{MemberTransactions-B1vwo1rI.js → MemberTransactions-BnzHspeV.js} +1 -1
  29. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-l8vxv1iA.js → MessageInput.vue_vue_type_script_setup_true_lang-Tn7i0ON5.js} +13 -13
  30. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Dk5jBNjr.js +40 -0
  31. package/dist/Mission-DwnJVGqw.js +359 -0
  32. package/dist/{Overview-CB0ZUJrT.js → Overview-Bkk6uY8w.js} +5 -5
  33. package/dist/{Overview-Dmga8twr.js → Overview-DxxN2iR6.js} +54 -54
  34. package/dist/Point-CF3bo1z2.js +287 -0
  35. package/dist/Promotion-BK_vpI2V.js +417 -0
  36. package/dist/{Queue-C3YE5GyB.js → Queue-BV3LRLDX.js} +47 -47
  37. package/dist/{Record-BmOaeVjS.js → Record-BsPu-3k0.js} +10 -10
  38. package/dist/{Review-BxkuBAsN.js → Review-Dbx2GIDF.js} +2 -2
  39. package/dist/{ReviewFacebookCallback-Cea69Y-B.js → ReviewFacebookCallback-4XmFbOgX.js} +5 -5
  40. package/dist/{ReviewGoogleCallback-BYb4WfJu.js → ReviewGoogleCallback-D8ZHqblT.js} +5 -5
  41. package/dist/{Reward-Dtrl4mTA.js → Reward-L350gxt_.js} +17 -17
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-sF1tR7Xt.js → RewardGroup.vue_vue_type_script_setup_true_lang-C83AonvA.js} +12 -12
  43. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-cVQnjaRr.js → RuleGroup.vue_vue_type_script_setup_true_lang-C1ZmO0v3.js} +279 -286
  44. package/dist/{Segment-Cp-6-rVY.js → Segment-BYiiwMUQ.js} +71 -71
  45. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4LpGMJI.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-UcQB3IId.js} +12 -12
  46. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-24LPf74Z.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DekalcJe.js} +4 -4
  47. package/dist/{Setting-BJ8tKVyJ.js → Setting-eSozeH-1.js} +59 -59
  48. package/dist/{SettingAdvertisements-CVN2-ow-.js → SettingAdvertisements-kpV1JOcA.js} +13 -13
  49. package/dist/{Settings-C1cZ4Ul9.js → Settings-I0ImYOOQ.js} +5 -5
  50. package/dist/{Store-CPOnmTss.js → Store-C8QSVLw_.js} +24 -24
  51. package/dist/{StoreRewards-v5eeYGVK.js → StoreRewards-C70avm1_.js} +16 -16
  52. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BeeUp_g7.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CSPdPLsO.js} +327 -386
  53. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-KpT7bdu4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-WYa8H6Cw.js} +2 -2
  54. package/dist/{Tier-I99UH0xV.js → Tier-CZZDn7iP.js} +23 -23
  55. package/dist/{Title-CMRp4pX_.js → Title-BvljZZSL.js} +22 -22
  56. package/dist/{Transaction-B8qt8Ye0.js → Transaction-DXLXu8I9.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-QeAi2nrG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Dwge_i6h.js} +6 -6
  58. package/dist/{Voucher-BOHAMVZe.js → Voucher-DIdx7Ot3.js} +153 -131
  59. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BmPhkmd-.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D_UeSwP6.js} +115 -121
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-ZCpWiXGk.js → ZodTextField.vue_vue_type_script_setup_true_lang-DY6VnVJA.js} +2 -2
  61. package/dist/{app-CGvP2lXl.js → app-DIqUapcm.js} +27807 -25649
  62. package/dist/app.js +1 -1
  63. package/dist/{business-BzmZPBOG.js → business-xP99MCox.js} +5 -5
  64. package/dist/{campaign-CJZlkuiR.js → campaign-C4MOBm91.js} +49 -48
  65. package/dist/{campaign-BmwtMiFP.js → campaign-PkzGqdYO.js} +2 -2
  66. package/dist/{campaign.enum-DumeHZOS.js → campaign.enum-BUclGILF.js} +1 -1
  67. package/dist/{campaign.fn-D0CbtE4k.js → campaign.fn-DJVXo9cD.js} +81 -81
  68. package/dist/{collectible.enum-nrHykvO1.js → collectible.enum-B_YepKWT.js} +1 -1
  69. package/dist/{collection.fn-DiyFyUl7.js → collection.fn-DAkP3LJ8.js} +2 -2
  70. package/dist/{effect-BnIGzzLo.js → effect-DrJYnZ16.js} +1 -1
  71. package/dist/{email-addresses-tjXJdzCY.js → email-addresses-DYXMxvqS.js} +2 -2
  72. package/dist/{export-Ck8ycGxw.js → export-0Jq4Vo5Y.js} +3 -3
  73. package/dist/{helper-BHgAkmrz.js → helper-CG763cr5.js} +1 -1
  74. package/dist/{index-cnFHwNFy.js → index-5Ms90cPU.js} +1 -1
  75. package/dist/{index-dVfpSXT7.js → index-8e6lLivz.js} +3 -3
  76. package/dist/{index-qIrN5YA8.js → index-BA3CoioK.js} +10 -10
  77. package/dist/{index-VJrNyZUx.js → index-BFuyvvVh.js} +1 -1
  78. package/dist/{index-BBU2_kd6.js → index-BHEZDY8s.js} +3 -3
  79. package/dist/{index-4PxwTlfE.js → index-BQdlKlsg.js} +9 -9
  80. package/dist/{index-W-l8HyOk.js → index-ByvnSHRv.js} +18 -2
  81. package/dist/{index-B-yKEua7.js → index-CB1OaNpY.js} +5 -5
  82. package/dist/{index-Cnkr1PfZ.js → index-CFRM165i.js} +6 -6
  83. package/dist/{index-CMGtT4mp.js → index-CU3Wrg9t.js} +1 -1
  84. package/dist/index-CuVAmjYs.js +137 -0
  85. package/dist/{index-BwZ8iuRW.js → index-D5zLX78G.js} +1 -1
  86. package/dist/{index-DHCiP2WT.js → index-DJRR8jk8.js} +1 -1
  87. package/dist/{index-mF4DrbA_.js → index-JPLeqrlu.js} +680 -680
  88. package/dist/{index-BozgrjRA.js → index-VZk5ArC3.js} +10 -9
  89. package/dist/{timezone-xffU-pT6.js → index-tPhZ8CGt.js} +105 -122
  90. package/dist/{index.esm2017-BbfP9mo3.js → index.esm2017-DuXfdRdC.js} +130 -130
  91. package/dist/{loading-B89df4lM.js → loading-DwS6f7JW.js} +1 -1
  92. package/dist/{lodash-CNIdP6dH.js → lodash-Bqpt7DBE.js} +1 -1
  93. package/dist/member-import-BaHtDv3F.js +187 -0
  94. package/dist/{membership-xRz6MrAl.js → membership-AYipXBeR.js} +3 -3
  95. package/dist/{money-CrfU06vj.js → money-BtRy4sUv.js} +1 -1
  96. package/dist/{number-DAcFWa0g.js → number-KwWSNC_F.js} +1 -1
  97. package/dist/object-BYyQ0PZp.js +18 -0
  98. package/dist/objectid-D6VZ6WZS.js +145 -0
  99. package/dist/{plugins-BAOJz-5e.js → plugins-B9HEUuta.js} +87 -87
  100. package/dist/{reward-DV1PXPKT.js → reward-ktfRKJP7.js} +1 -1
  101. package/dist/{rule-BZBeYy7D.js → rule-Bm4V-BxA.js} +3 -3
  102. package/dist/{rule-builder-BuBh_voP.js → rule-builder-KkxzK5K-.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/{template-D_4yac6N.js → template-Z0h3NgI8.js} +7 -7
  105. package/dist/timezone-BxeR2L3i.js +20 -0
  106. package/dist/transaction.fn-rwxZJxCB.js +64 -0
  107. package/dist/{trigger-De4OtE_Z.js → trigger-woxMK7-q.js} +5 -5
  108. package/dist/{useMarketingMaterialActions-CR-3UVH-.js → useMarketingMaterialActions-BCckL9jC.js} +3 -3
  109. package/dist/{usePagination-Cz1z0Cox.js → usePagination-ChnknACA.js} +1 -1
  110. package/dist/{user-83vF8U4p.js → user-C-uStXdl.js} +1 -1
  111. package/dist/{vue-i18n-miVa3rNb.js → vue-i18n-DMRuXVEL.js} +307 -307
  112. package/dist/{xlsx-Cs6dDN_G.js → xlsx-DIVka-fb.js} +224 -224
  113. package/dist/{zod-BgYRWcOQ.js → zod-hoW-zibE.js} +1 -1
  114. package/package.json +4 -3
  115. package/dist/Analytic-Dcw2QZ7k.js +0 -427
  116. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  117. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  118. package/dist/Game-tQP4LYyf.js +0 -330
  119. package/dist/Member-D75eeIZY.js +0 -280
  120. package/dist/MemberList-BeZ9rqzr.js +0 -1602
  121. package/dist/Mission-J6_fYNS7.js +0 -334
  122. package/dist/Point-DWZ9xDIG.js +0 -262
  123. package/dist/Promotion-Ql-Dn2Uc.js +0 -392
  124. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BhdPS29D.js +0 -181
  125. package/dist/dto-CBpbRIlX.js +0 -216
  126. package/dist/index-D-Fz1BGi.js +0 -85
  127. package/dist/object-qECH92oz.js +0 -26
  128. package/dist/objectid-D0AHYrGl.js +0 -145
@@ -1,43 +1,249 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createCommentVNode, computed, createElementVNode, toDisplayString, Fragment, renderList, normalizeClass, toRefs, normalizeStyle, resolveDynamicComponent, createSlots } from "vue";
2
- import { _ } from "./lodash-CNIdP6dH.js";
3
- import { z } from "./app-CGvP2lXl.js";
4
- import { Z as ZodHelper } from "./zod-BgYRWcOQ.js";
5
- import { c as campaignRefinement, C as CampaignDtos, a as campaignTransform } from "./dto-CBpbRIlX.js";
6
- import { u as useMembershipStore } from "./membership-xRz6MrAl.js";
7
- import { u as useBusinessStore } from "./business-BzmZPBOG.js";
8
- import "./index-4PxwTlfE.js";
9
- import { R as RuleBuilder, a as isRuleEntry } from "./rule-builder-BuBh_voP.js";
2
+ import { _ } from "./lodash-Bqpt7DBE.js";
3
+ import { z as z$1 } from "./app-DIqUapcm.js";
4
+ import { Z as ZodHelper } from "./zod-hoW-zibE.js";
5
+ import { F as FdoObjectId, z } from "./index-CB1OaNpY.js";
6
+ import { x as FdoGroup, a as F_RUNNABLE_CAMPAIGN_TYPE, y as FdtoRunnableCampaign, z as FdoCreditLoyaltyReward, A as FdtoRandomReward, B as F_MISSION_TYPE, C as FdoThresholdCreditReward, E as FdtoThresholdReward, G as FdoMission } from "./index-JPLeqrlu.js";
7
+ import { F as FdtoCollectibleConfig } from "./index-BQdlKlsg.js";
8
+ import { i as isRuleGroup, R as RuleBuilder, a as isRuleEntry } from "./rule-builder-KkxzK5K-.js";
9
+ import { u as useMembershipStore } from "./membership-AYipXBeR.js";
10
+ import { u as useBusinessStore } from "./business-xP99MCox.js";
10
11
  import { J as JsonViewer } from "./JsonViewer-v8_C7l5N.js";
11
12
  import { h as hooks } from "./moment-D7p2TMB-.js";
12
- import { f as featureVersionMapping } from "./campaign.enum-DumeHZOS.js";
13
- import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-B8sYzU76.js";
14
- import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-DLSOD5uV.js";
15
- import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-KpT7bdu4.js";
16
- import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-QeAi2nrG.js";
17
- import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-cVQnjaRr.js";
18
- import { p as prompt, f as firebaseStorage } from "./plugins-BAOJz-5e.js";
19
- import { u as useI18n } from "./vue-i18n-miVa3rNb.js";
20
- import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-De4OtE_Z.js";
21
- import { a as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-l8vxv1iA.js";
22
- import { C as CountryTimezone, m as moment } from "./timezone-xffU-pT6.js";
23
- import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-BZBeYy7D.js";
13
+ import { f as featureVersionMapping } from "./campaign.enum-BUclGILF.js";
14
+ import { _ as _sfc_main$o } from "./ImageInput.vue_vue_type_script_setup_true_lang-D1_02khe.js";
15
+ import { b as _sfc_main$m, a as _sfc_main$p, _ as _sfc_main$r } from "./EffectSheet.vue_vue_type_style_index_0_lang-CzDCUJ51.js";
16
+ import { _ as _sfc_main$q } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-WYa8H6Cw.js";
17
+ import { _ as _sfc_main$t } from "./UserRuleGroup.vue_vue_type_script_setup_true_lang-Dwge_i6h.js";
18
+ import { _ as _sfc_main$j, a as _sfc_main$k } from "./RuleGroup.vue_vue_type_script_setup_true_lang-C1ZmO0v3.js";
19
+ import { p as prompt, f as firebaseStorage } from "./plugins-B9HEUuta.js";
20
+ import { u as useI18n } from "./vue-i18n-DMRuXVEL.js";
21
+ import { T as TypeToTriggerOptions, _ as _sfc_main$u, b as _sfc_main$v } from "./trigger-woxMK7-q.js";
22
+ import { a as _sfc_main$s } from "./MessageInput.vue_vue_type_script_setup_true_lang-Tn7i0ON5.js";
23
+ import { m as moment } from "./index-tPhZ8CGt.js";
24
+ import { c as calculateNextScheduleAt, S as SummarizeRrule, R as RRule } from "./rule-Bm4V-BxA.js";
24
25
  import { useCoreStore } from "@feedmepos/mf-common";
25
- import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-BmPhkmd-.js";
26
- import { w as FdoCreditLoyaltyReward, x as FdtoRandomReward, y as F_MISSION_TYPE, z as FdoThresholdCreditReward, A as FdtoThresholdReward, B as FdoMission } from "./index-mF4DrbA_.js";
27
- import "./index-B-yKEua7.js";
28
- import { T as TEMPLATES } from "./index-qIrN5YA8.js";
29
- import "./index-dVfpSXT7.js";
30
- import { a as F_GAME_TYPE } from "./collectible.enum-nrHykvO1.js";
31
- import { u as useLoading } from "./loading-B89df4lM.js";
32
- import { i as initCollectibleConfig } from "./helper-BHgAkmrz.js";
33
- import { C as CollectionUtils } from "./collection.fn-DiyFyUl7.js";
26
+ import { C as CountryTimezone } from "./timezone-BxeR2L3i.js";
27
+ import { _ as _sfc_main$l, a as _sfc_main$n } from "./VoucherEditor.vue_vue_type_script_setup_true_lang-D_UeSwP6.js";
28
+ import { T as TEMPLATES } from "./index-BA3CoioK.js";
29
+ import "./index-8e6lLivz.js";
30
+ import { a as F_GAME_TYPE } from "./collectible.enum-B_YepKWT.js";
31
+ import { u as useLoading } from "./loading-DwS6f7JW.js";
32
+ import { i as initCollectibleConfig } from "./helper-CG763cr5.js";
33
+ import { C as CollectionUtils } from "./collection.fn-DAkP3LJ8.js";
34
34
  import { s as sentenceCase$1 } from "./index-CuvNtC_M.js";
35
- import { c as getCampaignSummaryObject } from "./campaign-CJZlkuiR.js";
35
+ import { c as getCampaignSummaryObject } from "./campaign-C4MOBm91.js";
36
36
  import { useDialog } from "@feedmepos/ui-library";
37
- import { u as useCampaignStore } from "./campaign-BmwtMiFP.js";
38
- import { S as SvcConfig } from "./index-BozgrjRA.js";
39
- import { a as cleanPF } from "./object-qECH92oz.js";
40
- const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
37
+ import { u as useCampaignStore } from "./campaign-PkzGqdYO.js";
38
+ import { S as SvcConfig } from "./index-VZk5ArC3.js";
39
+ import { a as cleanPF } from "./object-BYyQ0PZp.js";
40
+ function campaignRefinement(e, r) {
41
+ var i, m;
42
+ if (!e) return;
43
+ const l = e.campaign;
44
+ if (!l) return;
45
+ const s = l.event.rule;
46
+ if (!s || !isRuleGroup(s)) {
47
+ r.addIssue({
48
+ code: "custom",
49
+ path: ["campaign", "event", "rule"],
50
+ params: {
51
+ i18n: "connectZodCustom:campaign.rule_required",
52
+ type: l.event.type
53
+ }
54
+ });
55
+ return;
56
+ }
57
+ switch (l.type) {
58
+ case "MISSION": {
59
+ l.earningOption.amount > l.mission.end && r.addIssue({
60
+ code: "custom",
61
+ path: ["campaign", "earningOption"],
62
+ params: {
63
+ i18n: "connectZodCustom:campaign.earning_amount_exceed",
64
+ max: l.mission.end
65
+ }
66
+ });
67
+ break;
68
+ }
69
+ case "CREDIT": {
70
+ const n = (i = l.config) == null ? void 0 : i.validityOption;
71
+ (!n || ["validForDay", "validBefore"].every((u) => n[u] == null)) && r.addIssue({
72
+ code: "custom",
73
+ path: ["campaign", "config", "validityOption"],
74
+ params: {
75
+ i18n: "connectZodCustom:campaign.credit_validity_required"
76
+ }
77
+ });
78
+ }
79
+ }
80
+ switch (l.event.type) {
81
+ case "BILL_COMPLETED":
82
+ l.type === "MISSION" && l.rewards.length && (l.rewards.forEach((n, o) => {
83
+ (n.threshold < 0 || n.threshold > l.mission.end) && r.addIssue({
84
+ code: "custom",
85
+ path: ["campaign", "rewards", o, "threshold"],
86
+ params: {
87
+ i18n: "connectZodCustom:campaign.reward_threshold_range"
88
+ }
89
+ });
90
+ }), (m = l.config) != null && m.validityOption.followFirstReceive || r.addIssue({
91
+ code: "custom",
92
+ path: ["campaign", "config", "validityOption"],
93
+ params: {
94
+ i18n: "connectZodCustom:campaign.mission_first_receive"
95
+ }
96
+ }));
97
+ break;
98
+ case "SCHEDULE": {
99
+ if (!s.rules.g_schedule) {
100
+ r.addIssue({
101
+ code: "custom",
102
+ path: ["campaign", "event", "rule"],
103
+ params: {
104
+ i18n: "connectZodCustom:campaign.schedule_period_required"
105
+ },
106
+ fatal: !0
107
+ });
108
+ return;
109
+ }
110
+ const n = RuleBuilder.getRules(
111
+ s.rules.g_schedule
112
+ ), o = [
113
+ {
114
+ property: "trigger.date",
115
+ operator: ["_isOnDate", "_rrule"]
116
+ },
117
+ {
118
+ property: "trigger.time",
119
+ operator: ["_isOnTime"]
120
+ }
121
+ ];
122
+ o.length == n.length && o.every((a) => n.some((f) => {
123
+ const y = RuleBuilder.simplify(f);
124
+ return y.property === a.property && a.operator.includes(y.operator);
125
+ })) || r.addIssue({
126
+ code: "custom",
127
+ path: ["campaign", "event", "rule"],
128
+ params: {
129
+ i18n: "connectZodCustom:campaign.active_period_invalid"
130
+ }
131
+ });
132
+ break;
133
+ }
134
+ default: {
135
+ "earningOption" in l && l.earningOption.type != "FIXED" && r.addIssue({
136
+ code: "custom",
137
+ path: ["campaign", "earningOption"],
138
+ params: {
139
+ i18n: "connectZodCustom:campaign.fixed_earning_required"
140
+ }
141
+ });
142
+ break;
143
+ }
144
+ }
145
+ }
146
+ function campaignTransform(e) {
147
+ var l;
148
+ if (e.campaign.type === "VOUCHER" && "configs" in e) {
149
+ const s = e.configs;
150
+ s.extras.targetLocation = e.campaign.targetLocation;
151
+ const i = Math.max(
152
+ e.campaign.earningOption.amount,
153
+ s.options.maxUse ?? 1
154
+ );
155
+ e.campaign.earningOption.amount = i, s.options.maxUse = i, e.campaign.earningOption = {
156
+ type: "FIXED",
157
+ amount: 1
158
+ };
159
+ }
160
+ if (e.campaign.type == "MISSION" && "configs" in e) {
161
+ const s = e.configs;
162
+ s.options.validityOption = (l = e.campaign.config) == null ? void 0 : l.validityOption;
163
+ }
164
+ const r = e.campaign.event;
165
+ return r.type != "BILL_COMPLETED" && r.rule && isRuleGroup(r.rule) && (r.rule = RuleBuilder.removeEntry(r.rule, "g_bill"), e.campaign.event = r), e;
166
+ }
167
+ function GenerateCampaignReq(e) {
168
+ const r = FdtoRunnableCampaign.optionsMap.get(e).extend({
169
+ _id: FdoObjectId.optional(),
170
+ collectible: z.string().nullish()
171
+ });
172
+ switch (e) {
173
+ case "VOUCHER":
174
+ return z.object({
175
+ campaign: r,
176
+ templateId: FdoObjectId,
177
+ configs: FdtoCollectibleConfig,
178
+ updateCollections: z.boolean().optional(),
179
+ code: z.string().optional()
180
+ });
181
+ case "PROMOTION":
182
+ return z.object({
183
+ campaign: r,
184
+ templateId: FdoObjectId
185
+ });
186
+ case "POINT":
187
+ return z.object({
188
+ campaign: r,
189
+ templateId: FdoObjectId
190
+ });
191
+ case "CREDIT":
192
+ return z.object({
193
+ campaign: r,
194
+ templateId: FdoObjectId
195
+ });
196
+ case "BROADCAST":
197
+ return z.object({
198
+ campaign: r,
199
+ templateId: FdoObjectId
200
+ });
201
+ case "COIN":
202
+ return z.object({
203
+ campaign: r,
204
+ templateId: FdoObjectId
205
+ });
206
+ case "REWARD_POOL":
207
+ return z.object({
208
+ campaign: r,
209
+ templateId: FdoObjectId,
210
+ updateCollections: z.boolean().optional()
211
+ });
212
+ case "GAME":
213
+ return z.object({
214
+ campaign: r,
215
+ configs: FdtoCollectibleConfig,
216
+ templateId: FdoObjectId,
217
+ updateCollections: z.boolean().optional()
218
+ });
219
+ case "MISSION":
220
+ return z.object({
221
+ campaign: r,
222
+ configs: FdtoCollectibleConfig,
223
+ templateId: FdoObjectId,
224
+ updateCollections: z.boolean().optional()
225
+ });
226
+ default:
227
+ throw new Error("Not implemented");
228
+ }
229
+ }
230
+ FdoGroup.extend({
231
+ _id: FdoObjectId.optional(),
232
+ name: z.string().min(1).max(300),
233
+ business: FdoObjectId.optional(),
234
+ campaigns: z.array(FdoObjectId).optional()
235
+ });
236
+ const CampaignDtos = {
237
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.VOUCHER]: GenerateCampaignReq("VOUCHER"),
238
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.PROMOTION]: GenerateCampaignReq("PROMOTION"),
239
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.POINT]: GenerateCampaignReq("POINT"),
240
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.CREDIT]: GenerateCampaignReq("CREDIT"),
241
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.BROADCAST]: GenerateCampaignReq("BROADCAST"),
242
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.COIN]: GenerateCampaignReq("COIN"),
243
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.REWARD_POOL]: GenerateCampaignReq("REWARD_POOL"),
244
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.GAME]: GenerateCampaignReq("GAME"),
245
+ [F_RUNNABLE_CAMPAIGN_TYPE.enum.MISSION]: GenerateCampaignReq("MISSION")
246
+ }, _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defineComponent({
41
247
  __name: "TimeRuleGroup",
42
248
  props: {
43
249
  modelValue: {
@@ -47,79 +253,79 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
47
253
  }
48
254
  },
49
255
  emits: ["update:model-value"],
50
- setup(e, { emit: m }) {
51
- const { t: o } = useI18n(), i = e, s = m, p = ref(
52
- !i.modelValue || !i.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(i.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
256
+ setup(e, { emit: r }) {
257
+ const { t: l } = useI18n(), s = e, i = r, m = ref(
258
+ !s.modelValue || !s.modelValue.rules.g_time ? "all_time" : RuleBuilder.getRules(s.modelValue.rules.g_time).length > 0 ? "custom" : "all_time"
53
259
  );
54
- watch(p, async (l, u) => {
260
+ watch(m, async (o, u) => {
55
261
  var a;
56
- if (u == "custom" && l == "all_time" && RuleBuilder.getRules((a = i.modelValue) == null ? void 0 : a.rules.g_time).length > 0) {
262
+ if (u == "custom" && o == "all_time" && RuleBuilder.getRules((a = s.modelValue) == null ? void 0 : a.rules.g_time).length > 0) {
57
263
  const f = await prompt.confirm(
58
- o("connect.template.rule.time.confirm_remove"),
59
- o("connect.common.confirm"),
60
- o("connect.common.confirm"),
61
- o("connect.common.cancel")
264
+ l("connect.template.rule.time.confirm_remove"),
265
+ l("connect.common.confirm"),
266
+ l("connect.common.confirm"),
267
+ l("connect.common.cancel")
62
268
  );
63
- f && s(
269
+ f && i(
64
270
  "update:model-value",
65
271
  RuleBuilder.setRuleToGroup(
66
- i.modelValue ?? RuleBuilder.scaffoldGroup(),
272
+ s.modelValue ?? RuleBuilder.scaffoldGroup(),
67
273
  RuleBuilder.scaffoldGroup("g_time")
68
274
  )
69
- ), p.value = f ? l : u;
275
+ ), m.value = f ? o : u;
70
276
  }
71
277
  });
72
- async function n(l) {
278
+ async function n(o) {
73
279
  var u;
74
- if (l == "custom" && RuleBuilder.getRules((u = i.modelValue) == null ? void 0 : u.rules.g_time).length > 0) {
280
+ if (o == "custom" && RuleBuilder.getRules((u = s.modelValue) == null ? void 0 : u.rules.g_time).length > 0) {
75
281
  if (!await prompt.confirm(
76
- o("connect.template.rule.time.confirm_remove"),
77
- o("connect.common.confirm"),
78
- o("connect.common.confirm"),
79
- o("connect.common.cancel")
282
+ l("connect.template.rule.time.confirm_remove"),
283
+ l("connect.common.confirm"),
284
+ l("connect.common.confirm"),
285
+ l("connect.common.cancel")
80
286
  )) {
81
- p.value = "all_time";
287
+ m.value = "all_time";
82
288
  return;
83
289
  }
84
- s(
290
+ i(
85
291
  "update:model-value",
86
292
  RuleBuilder.setRuleToGroup(
87
- i.modelValue ?? RuleBuilder.scaffoldGroup(),
293
+ s.modelValue ?? RuleBuilder.scaffoldGroup(),
88
294
  RuleBuilder.scaffoldGroup("g_time")
89
295
  )
90
296
  );
91
297
  }
92
298
  }
93
- return (l, u) => {
299
+ return (o, u) => {
94
300
  var y;
95
301
  const a = resolveComponent("FmRadio"), f = resolveComponent("FmRadioGroup");
96
302
  return openBlock(), createElementBlock("div", _hoisted_1$g, [
97
303
  createVNode(f, {
98
- modelValue: unref(p),
304
+ modelValue: unref(m),
99
305
  "onUpdate:modelValue": [
100
- u[0] || (u[0] = (v) => isRef(p) ? p.value = v : null),
306
+ u[0] || (u[0] = (v) => isRef(m) ? m.value = v : null),
101
307
  u[1] || (u[1] = (v) => n(v))
102
308
  ]
103
309
  }, {
104
310
  default: withCtx(() => [
105
311
  createVNode(a, {
106
- label: unref(o)("connect.template.rule.time.all_time"),
312
+ label: unref(l)("connect.template.rule.time.all_time"),
107
313
  value: "all_time"
108
314
  }, null, 8, ["label"]),
109
315
  createVNode(a, {
110
- label: unref(o)("connect.template.rule.time.custom"),
316
+ label: unref(l)("connect.template.rule.time.custom"),
111
317
  value: "custom"
112
318
  }, null, 8, ["label"])
113
319
  ]),
114
320
  _: 1
115
321
  }, 8, ["modelValue"]),
116
- unref(p) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
322
+ unref(m) == "custom" ? (openBlock(), createBlock(_sfc_main$j, {
117
323
  key: 0,
118
324
  class: "!mt-[0px]",
119
325
  "include-only": "trigger",
120
326
  "trigger-type": "SCHEDULE",
121
327
  "model-value": ((y = e.modelValue) == null ? void 0 : y.rules.g_time) ?? unref(RuleBuilder).scaffoldGroup("g_time"),
122
- "onUpdate:modelValue": u[2] || (u[2] = (v) => s(
328
+ "onUpdate:modelValue": u[2] || (u[2] = (v) => i(
123
329
  "update:model-value",
124
330
  unref(RuleBuilder).setRuleToGroup(
125
331
  e.modelValue ?? unref(RuleBuilder).scaffoldGroup(),
@@ -139,29 +345,29 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
139
345
  }
140
346
  },
141
347
  emits: ["update:model-value"],
142
- setup(e, { emit: m }) {
143
- const { t: o } = useI18n(), i = e, s = m, p = computed(() => {
144
- const { property: n, operator: l, equator: u } = RuleBuilder.simplify(
145
- i.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
348
+ setup(e, { emit: r }) {
349
+ const { t: l } = useI18n(), s = e, i = r, m = computed(() => {
350
+ const { property: n, operator: o, equator: u } = RuleBuilder.simplify(
351
+ s.modelValue ?? RuleBuilder.constructEntry("user.birthday", "_isDay", {
146
352
  op: "before",
147
353
  x: 1
148
354
  })
149
355
  );
150
356
  return {
151
357
  property: n,
152
- operator: l,
358
+ operator: o,
153
359
  equator: u
154
360
  };
155
361
  });
156
- return (n, l) => {
362
+ return (n, o) => {
157
363
  const u = resolveComponent("FmRadio"), a = resolveComponent("FmStepperField");
158
364
  return openBlock(), createElementBlock("div", null, [
159
365
  createVNode(u, {
160
- label: unref(o)("connect.template.rule.birthday.on_birthday"),
366
+ label: unref(l)("connect.template.rule.birthday.on_birthday"),
161
367
  value: "_isRange-day",
162
- "model-value": `${unref(p).operator}-${unref(p).equator.unit}`,
163
- "onUpdate:modelValue": l[0] || (l[0] = () => {
164
- s(
368
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
369
+ "onUpdate:modelValue": o[0] || (o[0] = () => {
370
+ i(
165
371
  "update:model-value",
166
372
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
167
373
  op: "this",
@@ -172,11 +378,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
172
378
  })
173
379
  }, null, 8, ["label", "model-value"]),
174
380
  createVNode(u, {
175
- label: unref(o)("connect.template.rule.birthday.days_before"),
381
+ label: unref(l)("connect.template.rule.birthday.days_before"),
176
382
  value: "_isDay",
177
- "model-value": unref(p).operator,
178
- "onUpdate:modelValue": l[1] || (l[1] = () => {
179
- s(
383
+ "model-value": unref(m).operator,
384
+ "onUpdate:modelValue": o[1] || (o[1] = () => {
385
+ i(
180
386
  "update:model-value",
181
387
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
182
388
  op: "after",
@@ -186,12 +392,12 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
186
392
  );
187
393
  })
188
394
  }, null, 8, ["label", "model-value"]),
189
- unref(p).operator == "_isDay" ? (openBlock(), createBlock(a, {
395
+ unref(m).operator == "_isDay" ? (openBlock(), createBlock(a, {
190
396
  key: 0,
191
- label: unref(o)("connect.template.rule.birthday.days_before_label"),
397
+ label: unref(l)("connect.template.rule.birthday.days_before_label"),
192
398
  "show-steppers": !1,
193
- "model-value": unref(p).equator.x,
194
- "onUpdate:modelValue": l[2] || (l[2] = (f) => s(
399
+ "model-value": unref(m).equator.x,
400
+ "onUpdate:modelValue": o[2] || (o[2] = (f) => i(
195
401
  "update:model-value",
196
402
  unref(RuleBuilder).constructEntry("user.birthday", "_isDay", {
197
403
  op: "after",
@@ -201,11 +407,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
201
407
  ))
202
408
  }, null, 8, ["label", "model-value"])) : createCommentVNode("", !0),
203
409
  createVNode(u, {
204
- label: unref(o)("connect.template.rule.birthday.in_birthday_week"),
410
+ label: unref(l)("connect.template.rule.birthday.in_birthday_week"),
205
411
  value: "_isRange-week",
206
- "model-value": `${unref(p).operator}-${unref(p).equator.unit}`,
207
- "onUpdate:modelValue": l[3] || (l[3] = () => {
208
- s(
412
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
413
+ "onUpdate:modelValue": o[3] || (o[3] = () => {
414
+ i(
209
415
  "update:model-value",
210
416
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
211
417
  op: "this",
@@ -216,11 +422,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
216
422
  })
217
423
  }, null, 8, ["label", "model-value"]),
218
424
  createVNode(u, {
219
- label: unref(o)("connect.template.rule.birthday.in_birthday_month"),
425
+ label: unref(l)("connect.template.rule.birthday.in_birthday_month"),
220
426
  value: "_isRange-month",
221
- "model-value": `${unref(p).operator}-${unref(p).equator.unit}`,
222
- "onUpdate:modelValue": l[4] || (l[4] = () => {
223
- s(
427
+ "model-value": `${unref(m).operator}-${unref(m).equator.unit}`,
428
+ "onUpdate:modelValue": o[4] || (o[4] = () => {
429
+ i(
224
430
  "update:model-value",
225
431
  unref(RuleBuilder).constructEntry("user.birthday", "_isRange", {
226
432
  op: "this",
@@ -249,25 +455,25 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
249
455
  }
250
456
  },
251
457
  emits: ["update:model-value"],
252
- setup(e, { emit: m }) {
253
- const { t: o } = useI18n(), i = e, s = m, p = computed(() => i.disabled ? TypeToTriggerOptions[i.campaignType].filter(
254
- (n) => n.value == i.modelValue
255
- ) : TypeToTriggerOptions[i.campaignType]);
256
- return (n, l) => {
458
+ setup(e, { emit: r }) {
459
+ const { t: l } = useI18n(), s = e, i = r, m = computed(() => s.disabled ? TypeToTriggerOptions[s.campaignType].filter(
460
+ (n) => n.value == s.modelValue
461
+ ) : TypeToTriggerOptions[s.campaignType]);
462
+ return (n, o) => {
257
463
  const u = resolveComponent("FmCard");
258
464
  return openBlock(), createElementBlock("div", _hoisted_1$f, [
259
- createElementVNode("div", _hoisted_2$c, toDisplayString(unref(o)("connect.campaign.trigger.description")), 1),
465
+ createElementVNode("div", _hoisted_2$c, toDisplayString(unref(l)("connect.campaign.trigger.description")), 1),
260
466
  createElementVNode("div", _hoisted_3$a, [
261
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (a) => (openBlock(), createBlock(u, {
467
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (a) => (openBlock(), createBlock(u, {
262
468
  variant: "outlined",
263
- disabled: i.disabled,
469
+ disabled: s.disabled,
264
470
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
265
- "col-span-3": unref(p).length == 1,
471
+ "col-span-3": unref(m).length == 1,
266
472
  "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == a.value,
267
473
  "hover:bg-fm-color-opacity-sm": e.modelValue != a.value
268
474
  }]),
269
475
  onClick: () => {
270
- i.modelValue != a.value && !i.disabled && s("update:model-value", a.value);
476
+ s.modelValue != a.value && !s.disabled && i("update:model-value", a.value);
271
477
  },
272
478
  key: a.name
273
479
  }, {
@@ -294,14 +500,14 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
294
500
  }
295
501
  },
296
502
  emits: ["update:model-value"],
297
- setup(e, { emit: m }) {
298
- const o = m;
299
- return (i, s) => {
300
- const p = resolveComponent("FmButton"), n = resolveComponent("FmField"), l = resolveComponent("FmDatePicker");
301
- return openBlock(), createBlock(l, {
503
+ setup(e, { emit: r }) {
504
+ const l = r;
505
+ return (s, i) => {
506
+ const m = resolveComponent("FmButton"), n = resolveComponent("FmField"), o = resolveComponent("FmDatePicker");
507
+ return openBlock(), createBlock(o, {
302
508
  label: e.label,
303
509
  "model-value": e.modelValue || "",
304
- "onUpdate:modelValue": s[1] || (s[1] = (u) => o("update:model-value", u))
510
+ "onUpdate:modelValue": i[1] || (i[1] = (u) => l("update:model-value", u))
305
511
  }, {
306
512
  "trigger-button": withCtx(({ opened: u }) => [
307
513
  createVNode(n, {
@@ -310,11 +516,11 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
310
516
  "icon-outlined": !u
311
517
  }, {
312
518
  append: withCtx(() => [
313
- e.modelValue ? (openBlock(), createBlock(p, {
519
+ e.modelValue ? (openBlock(), createBlock(m, {
314
520
  key: 0,
315
521
  variant: "tertiary",
316
522
  icon: "clear",
317
- onClick: s[0] || (s[0] = (a) => (a.stopPropagation(), o("update:model-value", null)))
523
+ onClick: i[0] || (i[0] = (a) => (a.stopPropagation(), l("update:model-value", null)))
318
524
  })) : createCommentVNode("", !0)
319
525
  ]),
320
526
  default: withCtx(() => [
@@ -338,32 +544,32 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
338
544
  }
339
545
  },
340
546
  emits: ["update:model-value"],
341
- setup(e, { emit: m }) {
342
- const { t: o } = useI18n(), i = m;
343
- return (s, p) => {
344
- var n, l;
547
+ setup(e, { emit: r }) {
548
+ const { t: l } = useI18n(), s = r;
549
+ return (i, m) => {
550
+ var n, o;
345
551
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
346
552
  createElementVNode("div", _hoisted_2$b, [
347
553
  createVNode(_sfc_main$f, {
348
554
  "model-value": ((n = e.modelValue) == null ? void 0 : n.startDate) ?? null,
349
- label: unref(o)("connect.common.startDate"),
350
- "onUpdate:modelValue": p[0] || (p[0] = (u) => {
555
+ label: unref(l)("connect.common.startDate"),
556
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => {
351
557
  var a;
352
- return i("update:model-value", {
558
+ return s("update:model-value", {
353
559
  startDate: u,
354
560
  endDate: ((a = e.modelValue) == null ? void 0 : a.endDate) ?? null
355
561
  });
356
562
  })
357
563
  }, null, 8, ["model-value", "label"])
358
564
  ]),
359
- createElementVNode("div", _hoisted_3$9, toDisplayString(unref(o)("connect.common.to")), 1),
565
+ createElementVNode("div", _hoisted_3$9, toDisplayString(unref(l)("connect.common.to")), 1),
360
566
  createElementVNode("div", _hoisted_4$8, [
361
567
  createVNode(_sfc_main$f, {
362
- "model-value": ((l = e.modelValue) == null ? void 0 : l.endDate) ?? null,
363
- label: unref(o)("connect.common.endDate"),
364
- "onUpdate:modelValue": p[1] || (p[1] = (u) => {
568
+ "model-value": ((o = e.modelValue) == null ? void 0 : o.endDate) ?? null,
569
+ label: unref(l)("connect.common.endDate"),
570
+ "onUpdate:modelValue": m[1] || (m[1] = (u) => {
365
571
  var a;
366
- return i("update:model-value", {
572
+ return s("update:model-value", {
367
573
  startDate: ((a = e.modelValue) == null ? void 0 : a.startDate) ?? null,
368
574
  endDate: u
369
575
  });
@@ -391,39 +597,39 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
391
597
  }
392
598
  },
393
599
  emits: ["update:model-value"],
394
- setup(e, { emit: m }) {
395
- const { t: o } = useI18n(), i = e, s = m, p = useCoreStore(), n = computed(
396
- () => CountryTimezone[p.currentCountry.value || "MY"]
600
+ setup(e, { emit: r }) {
601
+ const { t: l } = useI18n(), s = e, i = r, m = useCoreStore(), n = computed(
602
+ () => CountryTimezone[m.currentCountry.value || "MY"]
397
603
  );
398
- function l() {
399
- const c = RuleBuilder.getRules(i.modelValue);
400
- return c.length == 0 ? "fixed" : c.some(
401
- (r) => isRuleEntry(r) && RuleBuilder.simplify(r).operator == "_rrule"
604
+ function o() {
605
+ const d = RuleBuilder.getRules(s.modelValue);
606
+ return d.length == 0 ? "fixed" : d.some(
607
+ (c) => isRuleEntry(c) && RuleBuilder.simplify(c).operator == "_rrule"
402
608
  ) ? "repeating" : "fixed";
403
609
  }
404
- const u = ref(l()), a = ref(!1), f = computed(() => [
405
- { label: o("connect.template.rule.schedule.fixed"), value: "fixed" },
406
- { label: o("connect.template.rule.schedule.repeating"), value: "repeating" }
610
+ const u = ref(o()), a = ref(!1), f = computed(() => [
611
+ { label: l("connect.template.rule.schedule.fixed"), value: "fixed" },
612
+ { label: l("connect.template.rule.schedule.repeating"), value: "repeating" }
407
613
  ]), y = computed(() => {
408
- const c = RuleBuilder.getRules(i.modelValue), r = c.find(
614
+ const d = RuleBuilder.getRules(s.modelValue), c = d.find(
409
615
  (g) => isRuleEntry(g) && RuleBuilder.simplify(g).property == "trigger.date"
410
- ), d = c.find(
616
+ ), p = d.find(
411
617
  (g) => isRuleEntry(g) && RuleBuilder.simplify(g).property == "trigger.time"
412
618
  );
413
619
  return {
414
- date: r ? RuleBuilder.simplify(r).equator : null,
415
- time: d ? RuleBuilder.simplify(d).equator : null
620
+ date: c ? RuleBuilder.simplify(c).equator : null,
621
+ time: p ? RuleBuilder.simplify(p).equator : null
416
622
  };
417
623
  }), v = computed(
418
624
  () => calculateNextScheduleAt(
419
- i.modelValue,
625
+ s.modelValue,
420
626
  /* @__PURE__ */ new Date(),
421
- i.startDate ? new Date(i.startDate) : void 0,
422
- i.endDate ? new Date(i.endDate) : void 0
627
+ s.startDate ? new Date(s.startDate) : void 0,
628
+ s.endDate ? new Date(s.endDate) : void 0
423
629
  )
424
630
  );
425
- function C(c) {
426
- const r = c.value, d = r == "fixed" ? [
631
+ function x(d) {
632
+ const c = d.value, p = c == "fixed" ? [
427
633
  RuleBuilder.constructEntry(
428
634
  "trigger.date",
429
635
  "_isOnDate",
@@ -438,66 +644,66 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
438
644
  ),
439
645
  RuleBuilder.constructEntry("trigger.time", "_isOnTime", "00:00")
440
646
  ];
441
- s(
647
+ i(
442
648
  "update:model-value",
443
649
  RuleBuilder.setRuleToGroup(
444
650
  RuleBuilder.scaffoldGroup("g_schedule"),
445
- d
651
+ p
446
652
  )
447
- ), u.value = r;
653
+ ), u.value = c;
448
654
  }
449
- function b(c) {
450
- u.value == "fixed" ? s(
655
+ function b(d) {
656
+ u.value == "fixed" ? i(
451
657
  "update:model-value",
452
658
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
453
659
  RuleBuilder.constructEntry(
454
660
  "trigger.date",
455
661
  "_isOnDate",
456
- c.date
662
+ d.date
457
663
  ),
458
664
  RuleBuilder.constructEntry(
459
665
  "trigger.time",
460
666
  "_isOnTime",
461
- c.time
667
+ d.time
462
668
  )
463
669
  ])
464
- ) : s(
670
+ ) : i(
465
671
  "update:model-value",
466
672
  RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup("g_schedule"), [
467
673
  RuleBuilder.constructEntry(
468
674
  "trigger.date",
469
675
  "_rrule",
470
- c.date
676
+ d.date
471
677
  ),
472
678
  RuleBuilder.constructEntry(
473
679
  "trigger.time",
474
680
  "_isOnTime",
475
- c.time
681
+ d.time
476
682
  )
477
683
  ])
478
684
  );
479
685
  }
480
- return (c, r) => {
481
- const d = resolveComponent("FmButtonGroup"), g = resolveComponent("FmTimePicker"), k = resolveComponent("FmIcon"), V = resolveComponent("FmTooltip"), x = resolveComponent("FmField"), B = resolveComponent("FmCard"), h = resolveComponent("FmPopover"), R = resolveComponent("FmDatePicker"), S = resolveComponent("FmHelperText");
686
+ return (d, c) => {
687
+ const p = resolveComponent("FmButtonGroup"), g = resolveComponent("FmTimePicker"), k = resolveComponent("FmIcon"), V = resolveComponent("FmTooltip"), C = resolveComponent("FmField"), B = resolveComponent("FmCard"), h = resolveComponent("FmPopover"), S = resolveComponent("FmDatePicker"), E = resolveComponent("FmHelperText");
482
688
  return openBlock(), createElementBlock(Fragment, null, [
483
- createVNode(d, {
689
+ createVNode(p, {
484
690
  items: unref(f),
485
- "model-value": unref(f).find((E) => E.value === unref(u)) ?? null,
486
- "onUpdate:modelValue": C,
691
+ "model-value": unref(f).find((R) => R.value === unref(u)) ?? null,
692
+ "onUpdate:modelValue": x,
487
693
  class: "mb-8"
488
694
  }, null, 8, ["items", "model-value"]),
489
695
  createElementVNode("div", _hoisted_1$d, [
490
696
  createElementVNode("div", _hoisted_2$a, [
491
697
  createVNode(g, {
492
- label: unref(o)("connect.template.rule.schedule.notify_time"),
698
+ label: unref(l)("connect.template.rule.schedule.notify_time"),
493
699
  "model-value": unref(y).time,
494
- "onUpdate:modelValue": r[0] || (r[0] = (E) => b({ date: unref(y).date, time: E })),
495
- "helper-text": unref(y).time ? void 0 : unref(o)("connect.template.rule.schedule.time_required"),
700
+ "onUpdate:modelValue": c[0] || (c[0] = (R) => b({ date: unref(y).date, time: R })),
701
+ "helper-text": unref(y).time ? void 0 : unref(l)("connect.template.rule.schedule.time_required"),
496
702
  "helper-state": unref(y).time ? void 0 : "error"
497
703
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]),
498
704
  unref(u) == "repeating" ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
499
705
  createElementVNode("div", _hoisted_4$7, [
500
- createElementVNode("div", null, toDisplayString(unref(o)("connect.template.rule.schedule.notify_date")), 1),
706
+ createElementVNode("div", null, toDisplayString(unref(l)("connect.template.rule.schedule.notify_date")), 1),
501
707
  unref(y).date ? (openBlock(), createBlock(V, {
502
708
  key: 0,
503
709
  "z-index": 9999,
@@ -515,16 +721,16 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
515
721
  ]),
516
722
  createVNode(h, {
517
723
  "show-popover": unref(a),
518
- onPopoverChanged: r[3] || (r[3] = (E) => a.value = E)
724
+ onPopoverChanged: c[3] || (c[3] = (R) => a.value = R)
519
725
  }, {
520
726
  "popover-button": withCtx(() => [
521
- createVNode(x, {
727
+ createVNode(C, {
522
728
  class: "cursor-pointer",
523
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
729
+ "helper-text": unref(y).date ? void 0 : unref(l)("connect.template.rule.schedule.date_required"),
524
730
  "helper-state": unref(y).date ? void 0 : "error"
525
731
  }, {
526
732
  default: withCtx(() => [
527
- createElementVNode("div", _hoisted_5$5, toDisplayString(unref(y).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options) : unref(o)("connect.template.rule.schedule.set_repeating_date")), 1)
733
+ createElementVNode("div", _hoisted_5$5, toDisplayString(unref(y).date ? unref(SummarizeRrule)(unref(RRule).fromString(unref(y).date).options) : unref(l)("connect.template.rule.schedule.set_repeating_date")), 1)
528
734
  ]),
529
735
  _: 1
530
736
  }, 8, ["helper-text", "helper-state"])
@@ -535,8 +741,8 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
535
741
  createVNode(_sfc_main$k, {
536
742
  "apply-button": !0,
537
743
  "model-value": unref(y).date || "",
538
- onCancel: r[1] || (r[1] = (E) => a.value = !1),
539
- "onUpdate:modelValue": r[2] || (r[2] = (E) => (b({ date: E, time: unref(y).time }), a.value = !1))
744
+ onCancel: c[1] || (c[1] = (R) => a.value = !1),
745
+ "onUpdate:modelValue": c[2] || (c[2] = (R) => (b({ date: R, time: unref(y).time }), a.value = !1))
540
746
  }, null, 8, ["model-value"])
541
747
  ]),
542
748
  _: 1
@@ -544,18 +750,18 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
544
750
  ]),
545
751
  _: 1
546
752
  }, 8, ["show-popover"])
547
- ])) : (openBlock(), createBlock(R, {
753
+ ])) : (openBlock(), createBlock(S, {
548
754
  key: 1,
549
- label: unref(o)("connect.template.rule.schedule.notify_date"),
755
+ label: unref(l)("connect.template.rule.schedule.notify_date"),
550
756
  "model-value": unref(y).date || "",
551
- "onUpdate:modelValue": r[4] || (r[4] = (E) => b({ date: E, time: unref(y).time })),
552
- "helper-text": unref(y).date ? void 0 : unref(o)("connect.template.rule.schedule.date_required"),
757
+ "onUpdate:modelValue": c[4] || (c[4] = (R) => b({ date: R, time: unref(y).time })),
758
+ "helper-text": unref(y).date ? void 0 : unref(l)("connect.template.rule.schedule.date_required"),
553
759
  "helper-state": unref(y).date ? void 0 : "error"
554
760
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"]))
555
761
  ]),
556
- unref(y).date && unref(y).time && unref(v) ? (openBlock(), createBlock(S, {
762
+ unref(y).date && unref(y).time && unref(v) ? (openBlock(), createBlock(E, {
557
763
  key: 0,
558
- 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
764
+ text: `${unref(moment)(unref(v)).isAfter(unref(moment)()) ? unref(l)("connect.template.rule.schedule.next_notification") : unref(l)("connect.template.rule.schedule.last_trigger_on")} ${unref(moment)(unref(v)).format("dddd, DD MMM YYYY")} at
559
765
  ${unref(moment)(unref(v)).format("hh:mmA")}(UTC${unref(moment).tz(unref(n)).format("Z")}) (${unref(moment)(unref(v)).fromNow()})`
560
766
  }, null, 8, ["text"])) : createCommentVNode("", !0)
561
767
  ])
@@ -570,37 +776,37 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
570
776
  }
571
777
  },
572
778
  emits: ["update:model-value"],
573
- setup(e, { emit: m }) {
574
- const { t: o } = useI18n(), i = e, s = m, p = computed(
779
+ setup(e, { emit: r }) {
780
+ const { t: l } = useI18n(), s = e, i = r, m = computed(
575
781
  () => [
576
782
  {
577
- label: o("connect.campaign.gameType.option.FORTUNE_WHEEL.label"),
578
- description: o("connect.campaign.gameType.option.FORTUNE_WHEEL.description"),
783
+ label: l("connect.campaign.gameType.option.FORTUNE_WHEEL.label"),
784
+ description: l("connect.campaign.gameType.option.FORTUNE_WHEEL.description"),
579
785
  value: F_GAME_TYPE.enum.FORTUNE_WHEEL,
580
786
  hidden: !1
581
787
  },
582
788
  {
583
- label: o("connect.campaign.gameType.option.ROCK_PAPER_SCISSORS.label"),
584
- description: o("connect.campaign.gameType.option.ROCK_PAPER_SCISSORS.description"),
789
+ label: l("connect.campaign.gameType.option.ROCK_PAPER_SCISSORS.label"),
790
+ description: l("connect.campaign.gameType.option.ROCK_PAPER_SCISSORS.description"),
585
791
  value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS,
586
792
  hidden: !0
587
793
  }
588
794
  ].filter((n) => !n.hidden)
589
795
  );
590
- return (n, l) => {
796
+ return (n, o) => {
591
797
  const u = resolveComponent("FmCard");
592
798
  return openBlock(), createElementBlock("div", _hoisted_1$c, [
593
- createElementVNode("div", _hoisted_2$9, toDisplayString(unref(o)("connect.template.select_game")), 1),
799
+ createElementVNode("div", _hoisted_2$9, toDisplayString(unref(l)("connect.template.select_game")), 1),
594
800
  createElementVNode("div", _hoisted_3$7, [
595
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (a) => (openBlock(), createBlock(u, {
801
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (a) => (openBlock(), createBlock(u, {
596
802
  variant: "outlined",
597
803
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
598
- "col-span-2": unref(p).length == 1,
804
+ "col-span-2": unref(m).length == 1,
599
805
  "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == a.value,
600
806
  "hover:bg-fm-color-opacity-sm": e.modelValue != a.value
601
807
  }]),
602
808
  onClick: () => {
603
- i.modelValue != a.value && s("update:model-value", a.value);
809
+ s.modelValue != a.value && i("update:model-value", a.value);
604
810
  },
605
811
  key: a.value
606
812
  }, {
@@ -620,30 +826,30 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
620
826
  }, _hoisted_2$8 = { class: "flex gap-8 items-center justify-start" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
621
827
  __name: "EditRewardPoolSheet",
622
828
  emits: ["update:model-value"],
623
- setup(e, { expose: m, emit: o }) {
624
- const i = useMembershipStore(), { minor: s } = useLoading, p = ref(!1), n = ref(), l = ref(), u = ref(0), a = computed(() => {
625
- var c;
626
- return ((c = i.loyaltyRewards.items.find(
627
- (r) => {
628
- var d;
629
- return r.value === ((d = n.value) == null ? void 0 : d.collectible);
829
+ setup(e, { expose: r, emit: l }) {
830
+ const s = useMembershipStore(), { minor: i } = useLoading, m = ref(!1), n = ref(), o = ref(), u = ref(0), a = computed(() => {
831
+ var d;
832
+ return ((d = s.loyaltyRewards.items.find(
833
+ (c) => {
834
+ var p;
835
+ return c.value === ((p = n.value) == null ? void 0 : p.collectible);
630
836
  }
631
- )) == null ? void 0 : c.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
837
+ )) == null ? void 0 : d.raw.type) === "CREDIT" ? FdoCreditLoyaltyReward : FdtoRandomReward;
632
838
  }), f = computed(() => {
633
839
  const b = a.value.safeParse(n.value);
634
840
  return b.success ? [] : b.error.errors;
635
841
  });
636
- function y(b, c, r) {
637
- b && (n.value = c, u.value = r), p.value = b;
842
+ function y(b, d, c) {
843
+ b && (n.value = d, u.value = c), m.value = b;
638
844
  }
639
- const v = o;
640
- async function C() {
845
+ const v = l;
846
+ async function x() {
641
847
  const b = a.value.safeParse(n.value);
642
- b.success && (await s(
848
+ b.success && (await i(
643
849
  async () => {
644
- b.data.type === "VOUCHER" && l.value && (b.data.collectibleConfig.image = await firebaseStorage.update(
645
- b.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, l.value),
646
- l.value
850
+ b.data.type === "VOUCHER" && o.value && (b.data.collectibleConfig.image = await firebaseStorage.update(
851
+ b.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, o.value),
852
+ o.value
647
853
  ));
648
854
  },
649
855
  {
@@ -652,16 +858,16 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
652
858
  }
653
859
  ), v("update:model-value", b.data, u.value));
654
860
  }
655
- return m({
861
+ return r({
656
862
  showSheet: y
657
- }), (b, c) => {
658
- const r = resolveComponent("FmSelect"), d = resolveComponent("FmStepperField"), g = resolveComponent("FmButton"), k = resolveComponent("FmSideSheet");
863
+ }), (b, d) => {
864
+ const c = resolveComponent("FmSelect"), p = resolveComponent("FmStepperField"), g = resolveComponent("FmButton"), k = resolveComponent("FmSideSheet");
659
865
  return openBlock(), createBlock(k, {
660
866
  "max-width": 560,
661
- modelValue: unref(p),
867
+ modelValue: unref(m),
662
868
  "onUpdate:modelValue": [
663
- c[9] || (c[9] = (V) => isRef(p) ? p.value = V : null),
664
- c[10] || (c[10] = (V) => p.value = V)
869
+ d[9] || (d[9] = (V) => isRef(m) ? m.value = V : null),
870
+ d[10] || (d[10] = (V) => m.value = V)
665
871
  ],
666
872
  header: "Edit reward",
667
873
  "dismiss-away": ""
@@ -673,21 +879,21 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
673
879
  type: "button",
674
880
  disabled: unref(f).length > 0,
675
881
  label: "Confirm",
676
- onClick: c[7] || (c[7] = (V) => C())
882
+ onClick: d[7] || (d[7] = (V) => x())
677
883
  }, null, 8, ["disabled"]),
678
884
  createVNode(g, {
679
885
  variant: "secondary",
680
886
  type: "button",
681
887
  label: "Cancel",
682
- onClick: c[8] || (c[8] = (V) => p.value = !1)
888
+ onClick: d[8] || (d[8] = (V) => m.value = !1)
683
889
  })
684
890
  ])
685
891
  ]),
686
892
  default: withCtx(() => {
687
- var V, x, B;
893
+ var V, C, B;
688
894
  return [
689
895
  unref(n) ? (openBlock(), createElementBlock("div", _hoisted_1$b, [
690
- createVNode(r, {
896
+ createVNode(c, {
691
897
  label: "Reward Type",
692
898
  items: [
693
899
  { label: "No Reward", value: "NO_REWARD" },
@@ -695,7 +901,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
695
901
  { label: "Loyalty", value: "LOYALTY" }
696
902
  ],
697
903
  "model-value": unref(n).type,
698
- "onUpdate:modelValue": c[0] || (c[0] = (h) => {
904
+ "onUpdate:modelValue": d[0] || (d[0] = (h) => {
699
905
  h == "NO_REWARD" ? n.value = {
700
906
  type: "NO_REWARD",
701
907
  collectible: null,
@@ -715,7 +921,7 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
715
921
  },
716
922
  weight: 1
717
923
  } : n.value = {
718
- collectible: unref(i).loyaltyRewards.raw[0]._id,
924
+ collectible: unref(s).loyaltyRewards.raw[0]._id,
719
925
  type: "LOYALTY",
720
926
  earningOption: {
721
927
  amount: 1,
@@ -728,31 +934,31 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
728
934
  };
729
935
  })
730
936
  }, null, 8, ["model-value"]),
731
- unref(n).type == "LOYALTY" ? (openBlock(), createBlock(r, {
937
+ unref(n).type == "LOYALTY" ? (openBlock(), createBlock(c, {
732
938
  key: 0,
733
939
  label: "Loyalty type",
734
940
  rules: [unref(ZodHelper).ruleAtPath(unref(a), "collectible", [unref(n).type])],
735
- items: unref(i).loyaltyRewards.items,
941
+ items: unref(s).loyaltyRewards.items,
736
942
  "model-value": unref(n).collectible,
737
- "onUpdate:modelValue": c[1] || (c[1] = (h) => unref(n).collectible = h)
943
+ "onUpdate:modelValue": d[1] || (d[1] = (h) => unref(n).collectible = h)
738
944
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
739
- createVNode(d, {
945
+ createVNode(p, {
740
946
  label: "Weight",
741
947
  rules: [unref(ZodHelper).ruleAtPath(unref(a), "weight", [unref(n).type])],
742
948
  "model-value": unref(n).weight,
743
- "onUpdate:modelValue": c[2] || (c[2] = (h) => n.value = {
949
+ "onUpdate:modelValue": d[2] || (d[2] = (h) => n.value = {
744
950
  ...unref(n),
745
951
  weight: h
746
952
  })
747
953
  }, null, 8, ["rules", "model-value"]),
748
954
  unref(n).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
749
- ((V = unref(i).loyaltyRewards.items.find(
955
+ ((V = unref(s).loyaltyRewards.items.find(
750
956
  (h) => {
751
- var R;
752
- return h.value === ((R = unref(n)) == null ? void 0 : R.collectible);
957
+ var S;
958
+ return h.value === ((S = unref(n)) == null ? void 0 : S.collectible);
753
959
  }
754
960
  )) == null ? void 0 : V.raw.type) !== "TITLE" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
755
- c[11] || (c[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
961
+ d[11] || (d[11] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
756
962
  createVNode(_sfc_main$l, {
757
963
  class: "mt-[-8px]",
758
964
  rules: [
@@ -762,25 +968,25 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
762
968
  "error-text": unref(ZodHelper).helperText(unref(f), "earningOption"),
763
969
  "fixed-type": !0,
764
970
  "model-value": unref(n).earningOption,
765
- "onUpdate:modelValue": c[3] || (c[3] = (h) => n.value = {
971
+ "onUpdate:modelValue": d[3] || (d[3] = (h) => n.value = {
766
972
  ...unref(n),
767
973
  earningOption: h
768
974
  })
769
975
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"])
770
976
  ], 64)) : createCommentVNode("", !0),
771
- c[12] || (c[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
977
+ d[12] || (d[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Validity option", -1)),
772
978
  createVNode(_sfc_main$m, {
773
979
  type: unref(n).type === "LOYALTY" ? "custom" : "range",
774
- "for-credit": unref(n).type === "LOYALTY" && ((x = unref(i).loyaltyRewards.items.find(
980
+ "for-credit": unref(n).type === "LOYALTY" && ((C = unref(s).loyaltyRewards.items.find(
775
981
  (h) => {
776
- var R;
777
- return h.value === ((R = unref(n)) == null ? void 0 : R.collectible);
982
+ var S;
983
+ return h.value === ((S = unref(n)) == null ? void 0 : S.collectible);
778
984
  }
779
- )) == null ? void 0 : x.raw.type) === "CREDIT",
985
+ )) == null ? void 0 : C.raw.type) === "CREDIT",
780
986
  class: "!gap-24",
781
987
  rules: [unref(ZodHelper).ruleAtPath(unref(a), "validityOption", [unref(n).type])],
782
988
  "model-value": unref(n).validityOption,
783
- "onUpdate:modelValue": c[4] || (c[4] = (h) => n.value = {
989
+ "onUpdate:modelValue": d[4] || (d[4] = (h) => n.value = {
784
990
  ...unref(n),
785
991
  validityOption: h
786
992
  })
@@ -788,13 +994,13 @@ const _hoisted_1$g = { class: "space-y-24" }, _sfc_main$i = /* @__PURE__ */ defi
788
994
  ], 64)) : createCommentVNode("", !0),
789
995
  unref(n).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$n, {
790
996
  key: 2,
791
- "reward-image": unref(l),
997
+ "reward-image": unref(o),
792
998
  "model-value": ((B = unref(n)) == null ? void 0 : B.collectibleConfig) ?? void 0,
793
- "onUpdate:modelValue": c[5] || (c[5] = (h) => n.value = {
999
+ "onUpdate:modelValue": d[5] || (d[5] = (h) => n.value = {
794
1000
  ...unref(n),
795
1001
  collectibleConfig: h
796
1002
  }),
797
- "onUpdate:rewardImage": c[6] || (c[6] = (h) => l.value = h)
1003
+ "onUpdate:rewardImage": d[6] || (d[6] = (h) => o.value = h)
798
1004
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
799
1005
  createVNode(JsonViewer, { json: unref(f) }, null, 8, ["json"])
800
1006
  ])) : createCommentVNode("", !0)
@@ -823,61 +1029,61 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
823
1029
  }
824
1030
  },
825
1031
  emits: ["update:model-value"],
826
- setup(e, { emit: m }) {
827
- const o = e, i = m, s = useMembershipStore(), { t: p } = useI18n(), n = z.array(z.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), l = computed(() => o.modelValue ?? []), u = computed(() => {
828
- const c = n.safeParse(l.value);
829
- return c.success ? [] : c.error.errors;
1032
+ setup(e, { emit: r }) {
1033
+ const l = e, s = r, i = useMembershipStore(), { t: m } = useI18n(), n = z$1.array(z$1.lazy(() => FdtoRandomReward)).min(1, "Requires at least 1 reward"), o = computed(() => l.modelValue ?? []), u = computed(() => {
1034
+ const d = n.safeParse(o.value);
1035
+ return d.success ? [] : d.error.errors;
830
1036
  }), a = ref();
831
- function f(c, r) {
1037
+ function f(d, c) {
832
1038
  var g;
833
- const d = [...l.value];
834
- d[r] = c, (g = a.value) == null || g.showSheet(!1), i("update:model-value", d);
1039
+ const p = [...o.value];
1040
+ p[c] = d, (g = a.value) == null || g.showSheet(!1), s("update:model-value", p);
835
1041
  }
836
- function y(c) {
837
- const r = c.type == "VOUCHER" ? c.collectibleConfig : s.collectibles.find(
838
- (k) => k._id.toString() == c.collectible
839
- ), d = CollectionUtils.formattedType((r == null ? void 0 : r.name) || ""), g = c.weight;
1042
+ function y(d) {
1043
+ const c = d.type == "VOUCHER" ? d.collectibleConfig : i.collectibles.find(
1044
+ (k) => k._id.toString() == d.collectible
1045
+ ), p = CollectionUtils.formattedType((c == null ? void 0 : c.name) || ""), g = d.weight;
840
1046
  return {
841
- label: isNullOrEmpty(d) ? "NO REWARD" : d,
842
- sublabel: `${g} (${(g / l.value.reduce((k, V) => k + V.weight, 0) * 100).toFixed(2)}%)`
1047
+ label: isNullOrEmpty(p) ? "NO REWARD" : p,
1048
+ sublabel: `${g} (${(g / o.value.reduce((k, V) => k + V.weight, 0) * 100).toFixed(2)}%)`
843
1049
  };
844
1050
  }
845
- function v(c) {
846
- var d;
847
- const r = [...l.value];
848
- (d = a.value) == null || d.showSheet(!0, r[c], c);
1051
+ function v(d) {
1052
+ var p;
1053
+ const c = [...o.value];
1054
+ (p = a.value) == null || p.showSheet(!0, c[d], d);
849
1055
  }
850
- function C(c) {
851
- const r = [...l.value];
852
- r.splice(c, 1), i("update:model-value", r);
1056
+ function x(d) {
1057
+ const c = [...o.value];
1058
+ c.splice(d, 1), s("update:model-value", c);
853
1059
  }
854
1060
  function b() {
855
- var c;
856
- (c = a.value) == null || c.showSheet(
1061
+ var d;
1062
+ (d = a.value) == null || d.showSheet(
857
1063
  !0,
858
1064
  {
859
1065
  type: "NO_REWARD",
860
1066
  collectible: null,
861
1067
  weight: 1
862
1068
  },
863
- l.value.length
1069
+ o.value.length
864
1070
  );
865
1071
  }
866
- return (c, r) => {
867
- const d = resolveComponent("FmButton"), g = resolveComponent("FmCard"), k = resolveComponent("FmHelperText");
1072
+ return (d, c) => {
1073
+ const p = resolveComponent("FmButton"), g = resolveComponent("FmCard"), k = resolveComponent("FmHelperText");
868
1074
  return openBlock(), createElementBlock("div", _hoisted_1$a, [
869
- createElementVNode("div", _hoisted_2$7, toDisplayString(unref(p)("connect.template.configure_reward_type")), 1),
870
- createVNode(d, {
871
- label: unref(p)("connect.campaign.rewardPool.addReward"),
872
- onClick: r[0] || (r[0] = (V) => b()),
1075
+ createElementVNode("div", _hoisted_2$7, toDisplayString(unref(m)("connect.template.configure_reward_type")), 1),
1076
+ createVNode(p, {
1077
+ label: unref(m)("connect.campaign.rewardPool.addReward"),
1078
+ onClick: c[0] || (c[0] = (V) => b()),
873
1079
  variant: "plain",
874
1080
  icon: "add"
875
1081
  }, null, 8, ["label"]),
876
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l), (V, x) => (openBlock(), createBlock(g, {
877
- key: x,
1082
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (V, C) => (openBlock(), createBlock(g, {
1083
+ key: C,
878
1084
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
879
1085
  variant: "outlined",
880
- onClick: (B) => v(x)
1086
+ onClick: (B) => v(C)
881
1087
  }, {
882
1088
  default: withCtx(() => {
883
1089
  var B;
@@ -886,10 +1092,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
886
1092
  createElementVNode("div", _hoisted_3$6, toDisplayString(V.type == "LOYALTY" ? (B = V == null ? void 0 : V.earningOption) == null ? void 0 : B.amount : "") + " " + toDisplayString(y(V).label), 1),
887
1093
  createElementVNode("div", _hoisted_4$5, toDisplayString(y(V).sublabel), 1)
888
1094
  ]),
889
- createVNode(d, {
1095
+ createVNode(p, {
890
1096
  icon: "delete",
891
1097
  variant: "tertiary",
892
- onClick: (h) => (h.stopPropagation(), C(x))
1098
+ onClick: (h) => (h.stopPropagation(), x(C))
893
1099
  }, null, 8, ["onClick"])
894
1100
  ];
895
1101
  }),
@@ -919,36 +1125,36 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
919
1125
  }
920
1126
  },
921
1127
  emits: ["update:model-value"],
922
- setup(e, { emit: m }) {
923
- const { t: o } = useI18n(), i = e, s = m, p = computed(() => [
1128
+ setup(e, { emit: r }) {
1129
+ const { t: l } = useI18n(), s = e, i = r, m = computed(() => [
924
1130
  {
925
- label: o("connect.template.promotion_game.rock_paper_scissors.label"),
926
- description: o("connect.template.promotion_game.rock_paper_scissors.description"),
1131
+ label: l("connect.template.promotion_game.rock_paper_scissors.label"),
1132
+ description: l("connect.template.promotion_game.rock_paper_scissors.description"),
927
1133
  value: F_GAME_TYPE.enum.ROCK_PAPER_SCISSORS
928
1134
  }
929
1135
  ]);
930
- return (n, l) => {
931
- var y, v, C;
1136
+ return (n, o) => {
1137
+ var y, v, x;
932
1138
  const u = resolveComponent("FmSwitch"), a = resolveComponent("FmCard"), f = resolveComponent("FmHelperText");
933
1139
  return openBlock(), createElementBlock("div", _hoisted_1$9, [
934
1140
  createVNode(u, {
935
- label: unref(o)("connect.template.promotion_game.enable"),
1141
+ label: unref(l)("connect.template.promotion_game.enable"),
936
1142
  "model-value": !!((y = e.modelValue) != null && y.gameType),
937
- "onUpdate:modelValue": l[0] || (l[0] = (b) => b ? s("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : s("update:model-value", null))
1143
+ "onUpdate:modelValue": o[0] || (o[0] = (b) => b ? i("update:model-value", { gameType: "ROCK_PAPER_SCISSORS" }) : i("update:model-value", null))
938
1144
  }, null, 8, ["label", "model-value"]),
939
1145
  ((v = e.modelValue) == null ? void 0 : v.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
940
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (b) => {
941
- var c, r;
1146
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (b) => {
1147
+ var d, c;
942
1148
  return openBlock(), createBlock(a, {
943
1149
  variant: "outlined",
944
1150
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
945
- "col-span-2": unref(p).length == 1,
946
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((c = e.modelValue) == null ? void 0 : c.gameType) == b.value,
947
- "hover:bg-fm-color-opacity-sm": ((r = e.modelValue) == null ? void 0 : r.gameType) != b.value
1151
+ "col-span-2": unref(m).length == 1,
1152
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((d = e.modelValue) == null ? void 0 : d.gameType) == b.value,
1153
+ "hover:bg-fm-color-opacity-sm": ((c = e.modelValue) == null ? void 0 : c.gameType) != b.value
948
1154
  }]),
949
1155
  onClick: () => {
950
- var d;
951
- ((d = i.modelValue) == null ? void 0 : d.gameType) != b.value && s("update:model-value", { gameType: b.value });
1156
+ var p;
1157
+ ((p = s.modelValue) == null ? void 0 : p.gameType) != b.value && i("update:model-value", { gameType: b.value });
952
1158
  },
953
1159
  key: b.value
954
1160
  }, {
@@ -960,9 +1166,9 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
960
1166
  }, 1032, ["class", "onClick"]);
961
1167
  }), 128))
962
1168
  ])) : createCommentVNode("", !0),
963
- ((C = e.modelValue) == null ? void 0 : C.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(f, {
1169
+ ((x = e.modelValue) == null ? void 0 : x.gameType) == "ROCK_PAPER_SCISSORS" ? (openBlock(), createBlock(f, {
964
1170
  key: 1,
965
- text: unref(o)("connect.template.promotion_game.rock_paper_scissors.warning"),
1171
+ text: unref(l)("connect.template.promotion_game.rock_paper_scissors.warning"),
966
1172
  state: "warning"
967
1173
  }, null, 8, ["text"])) : createCommentVNode("", !0)
968
1174
  ]);
@@ -976,33 +1182,33 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
976
1182
  }
977
1183
  },
978
1184
  emits: ["update:model-value"],
979
- setup(e, { emit: m }) {
980
- const { t: o } = useI18n(), i = e, s = m, p = computed(() => [
1185
+ setup(e, { emit: r }) {
1186
+ const { t: l } = useI18n(), s = e, i = r, m = computed(() => [
981
1187
  {
982
- label: o("connect.campaign.mission.typeOption.STAMP.label"),
983
- description: o("connect.campaign.mission.typeOption.STAMP.description"),
1188
+ label: l("connect.campaign.mission.typeOption.STAMP.label"),
1189
+ description: l("connect.campaign.mission.typeOption.STAMP.description"),
984
1190
  value: F_MISSION_TYPE.enum.STAMP
985
1191
  },
986
1192
  {
987
- label: o("connect.campaign.mission.typeOption.PROGRESSIVE.label"),
988
- description: o("connect.campaign.mission.typeOption.PROGRESSIVE.description"),
1193
+ label: l("connect.campaign.mission.typeOption.PROGRESSIVE.label"),
1194
+ description: l("connect.campaign.mission.typeOption.PROGRESSIVE.description"),
989
1195
  value: F_MISSION_TYPE.enum.PROGRESSIVE
990
1196
  }
991
1197
  ]);
992
- return (n, l) => {
1198
+ return (n, o) => {
993
1199
  const u = resolveComponent("FmCard");
994
1200
  return openBlock(), createElementBlock("div", _hoisted_1$8, [
995
- createElementVNode("div", _hoisted_2$5, toDisplayString(unref(o)("connect.template.select_game")), 1),
1201
+ createElementVNode("div", _hoisted_2$5, toDisplayString(unref(l)("connect.template.select_game")), 1),
996
1202
  createElementVNode("div", _hoisted_3$4, [
997
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (a) => (openBlock(), createBlock(u, {
1203
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (a) => (openBlock(), createBlock(u, {
998
1204
  variant: "outlined",
999
1205
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
1000
- "col-span-2": unref(p).length == 1,
1206
+ "col-span-2": unref(m).length == 1,
1001
1207
  "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": e.modelValue == a.value,
1002
1208
  "hover:bg-fm-color-opacity-sm": e.modelValue != a.value
1003
1209
  }]),
1004
1210
  onClick: () => {
1005
- i.modelValue != a.value && s("update:model-value", a.value);
1211
+ s.modelValue != a.value && i("update:model-value", a.value);
1006
1212
  },
1007
1213
  key: a.value
1008
1214
  }, {
@@ -1030,16 +1236,16 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1030
1236
  }
1031
1237
  },
1032
1238
  emits: ["update:model-value"],
1033
- setup(e, { emit: m }) {
1034
- const o = m;
1035
- return (i, s) => {
1036
- const p = resolveComponent("FmStepperField");
1239
+ setup(e, { emit: r }) {
1240
+ const l = r;
1241
+ return (s, i) => {
1242
+ const m = resolveComponent("FmStepperField");
1037
1243
  return openBlock(), createElementBlock("div", _hoisted_1$7, [
1038
- s[1] || (s[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1)),
1039
- createVNode(p, {
1244
+ i[1] || (i[1] = createElementVNode("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Input the total number of stamps needed to complete the mission ", -1)),
1245
+ createVNode(m, {
1040
1246
  label: "Maximum to collect",
1041
1247
  "model-value": e.modelValue || null,
1042
- "onUpdate:modelValue": s[0] || (s[0] = (n) => o("update:model-value", n)),
1248
+ "onUpdate:modelValue": i[0] || (i[0] = (n) => l("update:model-value", n)),
1043
1249
  "helper-text": e.helperText || "Set the threshold required for reward eligibility",
1044
1250
  "helper-state": e.helperState || "none"
1045
1251
  }, null, 8, ["model-value", "helper-text", "helper-state"])
@@ -1055,29 +1261,29 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1055
1261
  }
1056
1262
  },
1057
1263
  emits: ["update:model-value"],
1058
- setup(e, { expose: m, emit: o }) {
1059
- const i = e, s = useMembershipStore(), { minor: p } = useLoading, n = ref(!1), l = ref(), u = ref(), a = ref(0), f = computed(() => {
1060
- var d;
1061
- return ((d = s.loyaltyRewards.items.find(
1264
+ setup(e, { expose: r, emit: l }) {
1265
+ const s = e, i = useMembershipStore(), { minor: m } = useLoading, n = ref(!1), o = ref(), u = ref(), a = ref(0), f = computed(() => {
1266
+ var p;
1267
+ return ((p = i.loyaltyRewards.items.find(
1062
1268
  (g) => {
1063
1269
  var k;
1064
- return g.value === ((k = l.value) == null ? void 0 : k.collectible);
1270
+ return g.value === ((k = o.value) == null ? void 0 : k.collectible);
1065
1271
  }
1066
- )) == null ? void 0 : d.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
1272
+ )) == null ? void 0 : p.raw.type) === "CREDIT" ? FdoThresholdCreditReward : FdtoThresholdReward;
1067
1273
  }), y = computed(() => {
1068
- const r = f.value.safeParse(l.value);
1069
- return r.success ? [] : r.error.errors;
1274
+ const c = f.value.safeParse(o.value);
1275
+ return c.success ? [] : c.error.errors;
1070
1276
  });
1071
- function v(r, d, g) {
1072
- r && (l.value = d, a.value = g), n.value = r;
1277
+ function v(c, p, g) {
1278
+ c && (o.value = p, a.value = g), n.value = c;
1073
1279
  }
1074
- const C = o;
1280
+ const x = l;
1075
1281
  async function b() {
1076
- const r = f.value.safeParse(l.value);
1077
- r.success && (await p(
1282
+ const c = f.value.safeParse(o.value);
1283
+ c.success && (await m(
1078
1284
  async () => {
1079
- r.data.type === "VOUCHER" && u.value && (r.data.collectibleConfig.image = await firebaseStorage.update(
1080
- r.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, u.value),
1285
+ c.data.type === "VOUCHER" && u.value && (c.data.collectibleConfig.image = await firebaseStorage.update(
1286
+ c.data.collectibleConfig.image || firebaseStorage.collectibleImagePath(void 0, u.value),
1081
1287
  u.value
1082
1288
  ));
1083
1289
  },
@@ -1085,70 +1291,70 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1085
1291
  message: "Uploading reward image",
1086
1292
  successMessage: "Reward image updated"
1087
1293
  }
1088
- ), C("update:model-value", r.data, a.value));
1294
+ ), x("update:model-value", c.data, a.value));
1089
1295
  }
1090
- const c = ref();
1091
- return m({
1296
+ const d = ref();
1297
+ return r({
1092
1298
  showSheet: v
1093
- }), (r, d) => {
1094
- const g = resolveComponent("FmStepperField"), k = resolveComponent("FmSelect"), V = resolveComponent("FmForm"), x = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
1299
+ }), (c, p) => {
1300
+ const g = resolveComponent("FmStepperField"), k = resolveComponent("FmSelect"), V = resolveComponent("FmForm"), C = resolveComponent("FmButton"), B = resolveComponent("FmSideSheet");
1095
1301
  return openBlock(), createBlock(B, {
1096
1302
  "max-width": 560,
1097
1303
  modelValue: unref(n),
1098
1304
  "onUpdate:modelValue": [
1099
- d[10] || (d[10] = (h) => isRef(n) ? n.value = h : null),
1100
- d[11] || (d[11] = (h) => n.value = h)
1305
+ p[10] || (p[10] = (h) => isRef(n) ? n.value = h : null),
1306
+ p[11] || (p[11] = (h) => n.value = h)
1101
1307
  ],
1102
1308
  header: "Edit reward",
1103
1309
  "dismiss-away": ""
1104
1310
  }, {
1105
1311
  "side-sheet-footer": withCtx(() => [
1106
1312
  createElementVNode("div", _hoisted_1$6, [
1107
- createVNode(x, {
1313
+ createVNode(C, {
1108
1314
  variant: "primary",
1109
1315
  type: "button",
1110
1316
  label: "Confirm",
1111
1317
  disabled: unref(y).length > 0,
1112
- onClick: d[8] || (d[8] = async () => {
1318
+ onClick: p[8] || (p[8] = async () => {
1113
1319
  var h;
1114
- return (h = unref(c)) == null ? void 0 : h.validateInputs();
1320
+ return (h = unref(d)) == null ? void 0 : h.validateInputs();
1115
1321
  })
1116
1322
  }, null, 8, ["disabled"]),
1117
- createVNode(x, {
1323
+ createVNode(C, {
1118
1324
  variant: "secondary",
1119
1325
  type: "button",
1120
1326
  label: "Cancel",
1121
- onClick: d[9] || (d[9] = (h) => n.value = !1)
1327
+ onClick: p[9] || (p[9] = (h) => n.value = !1)
1122
1328
  })
1123
1329
  ])
1124
1330
  ]),
1125
1331
  default: withCtx(() => [
1126
- createVNode(JsonViewer, { json: unref(l) }, null, 8, ["json"]),
1127
- unref(l) ? (openBlock(), createBlock(V, {
1332
+ createVNode(JsonViewer, { json: unref(o) }, null, 8, ["json"]),
1333
+ unref(o) ? (openBlock(), createBlock(V, {
1128
1334
  key: 0,
1129
1335
  class: "flex flex-col gap-y-24",
1130
1336
  ref_key: "formRef",
1131
- ref: c,
1132
- onValidationSuccess: d[7] || (d[7] = (h) => b())
1337
+ ref: d,
1338
+ onValidationSuccess: p[7] || (p[7] = (h) => b())
1133
1339
  }, {
1134
1340
  default: withCtx(() => {
1135
- var h, R;
1341
+ var h, S;
1136
1342
  return [
1137
- unref(l).type ? (openBlock(), createBlock(g, {
1343
+ unref(o).type ? (openBlock(), createBlock(g, {
1138
1344
  key: 0,
1139
1345
  label: "Threshold",
1140
1346
  rules: [
1141
1347
  unref(ZodHelper).toRule(
1142
- unref(z).number().min(1).max(
1143
- i.maxThreshold,
1144
- `Number cannot be more than ${i.maxThreshold}`
1348
+ unref(z$1).number().min(1).max(
1349
+ s.maxThreshold,
1350
+ `Number cannot be more than ${s.maxThreshold}`
1145
1351
  )
1146
1352
  )
1147
1353
  ],
1148
- "model-value": unref(l).threshold,
1149
- "onUpdate:modelValue": d[0] || (d[0] = (S) => l.value = {
1150
- ...unref(l),
1151
- threshold: S
1354
+ "model-value": unref(o).threshold,
1355
+ "onUpdate:modelValue": p[0] || (p[0] = (E) => o.value = {
1356
+ ...unref(o),
1357
+ threshold: E
1152
1358
  })
1153
1359
  }, null, 8, ["rules", "model-value"])) : createCommentVNode("", !0),
1154
1360
  createVNode(k, {
@@ -1157,10 +1363,10 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1157
1363
  { label: "Voucher", value: "VOUCHER" },
1158
1364
  { label: "Loyalty", value: "LOYALTY" }
1159
1365
  ],
1160
- "model-value": unref(l).type,
1161
- "onUpdate:modelValue": d[1] || (d[1] = (S) => {
1162
- var E, $;
1163
- S === "VOUCHER" ? l.value = {
1366
+ "model-value": unref(o).type,
1367
+ "onUpdate:modelValue": p[1] || (p[1] = (E) => {
1368
+ var R, N;
1369
+ E === "VOUCHER" ? o.value = {
1164
1370
  collectible: null,
1165
1371
  type: "VOUCHER",
1166
1372
  collectibleConfig: unref(initCollectibleConfig)("VOUCHER", {
@@ -1173,9 +1379,9 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1173
1379
  validityOption: {
1174
1380
  validForDay: 7
1175
1381
  },
1176
- threshold: (E = unref(l)) == null ? void 0 : E.threshold
1177
- } : l.value = {
1178
- collectible: unref(s).loyaltyRewards.raw[0]._id,
1382
+ threshold: (R = unref(o)) == null ? void 0 : R.threshold
1383
+ } : o.value = {
1384
+ collectible: unref(i).loyaltyRewards.raw[0]._id,
1179
1385
  type: "LOYALTY",
1180
1386
  earningOption: {
1181
1387
  amount: 1,
@@ -1184,58 +1390,58 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1184
1390
  validityOption: {
1185
1391
  validForDay: 7
1186
1392
  },
1187
- threshold: ($ = unref(l)) == null ? void 0 : $.threshold
1393
+ threshold: (N = unref(o)) == null ? void 0 : N.threshold
1188
1394
  };
1189
1395
  })
1190
1396
  }, null, 8, ["model-value"]),
1191
- unref(l).type == "LOYALTY" ? (openBlock(), createBlock(k, {
1397
+ unref(o).type == "LOYALTY" ? (openBlock(), createBlock(k, {
1192
1398
  key: 1,
1193
1399
  label: "Loyalty type",
1194
- rules: [unref(ZodHelper).ruleAtPath(unref(f), "collectible", [unref(l).type])],
1195
- items: unref(s).loyaltyRewards.items,
1196
- "model-value": unref(l).collectible,
1197
- "onUpdate:modelValue": d[2] || (d[2] = (S) => unref(l).collectible = S)
1400
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "collectible", [unref(o).type])],
1401
+ items: unref(i).loyaltyRewards.items,
1402
+ "model-value": unref(o).collectible,
1403
+ "onUpdate:modelValue": p[2] || (p[2] = (E) => unref(o).collectible = E)
1198
1404
  }, null, 8, ["rules", "items", "model-value"])) : createCommentVNode("", !0),
1199
- unref(l).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1200
- d[12] || (d[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
1405
+ unref(o).type === "LOYALTY" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
1406
+ p[12] || (p[12] = createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Earning option", -1)),
1201
1407
  createVNode(_sfc_main$l, {
1202
1408
  class: "mt-[-8px]",
1203
- rules: [unref(ZodHelper).ruleAtPath(unref(f), "earningOption", [unref(l).type])],
1409
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "earningOption", [unref(o).type])],
1204
1410
  "helper-state": unref(ZodHelper).helperState(unref(y), "earningOption"),
1205
1411
  "error-text": unref(ZodHelper).helperText(unref(y), "earningOption"),
1206
1412
  "fixed-type": !0,
1207
- "model-value": unref(l).earningOption,
1208
- "onUpdate:modelValue": d[3] || (d[3] = (S) => l.value = {
1209
- ...unref(l),
1210
- earningOption: S
1413
+ "model-value": unref(o).earningOption,
1414
+ "onUpdate:modelValue": p[3] || (p[3] = (E) => o.value = {
1415
+ ...unref(o),
1416
+ earningOption: E
1211
1417
  })
1212
1418
  }, null, 8, ["rules", "helper-state", "error-text", "model-value"]),
1213
1419
  createVNode(_sfc_main$m, {
1214
1420
  class: "!gap-24",
1215
- type: unref(l).type === "LOYALTY" ? "custom" : "range",
1216
- "for-credit": unref(l).type === "LOYALTY" && ((h = unref(s).loyaltyRewards.items.find(
1217
- (S) => {
1218
- var E;
1219
- return S.value === ((E = unref(l)) == null ? void 0 : E.collectible);
1421
+ type: unref(o).type === "LOYALTY" ? "custom" : "range",
1422
+ "for-credit": unref(o).type === "LOYALTY" && ((h = unref(i).loyaltyRewards.items.find(
1423
+ (E) => {
1424
+ var R;
1425
+ return E.value === ((R = unref(o)) == null ? void 0 : R.collectible);
1220
1426
  }
1221
1427
  )) == null ? void 0 : h.raw.type) === "CREDIT",
1222
- rules: [unref(ZodHelper).ruleAtPath(unref(f), "validityOption", [unref(l).type])],
1223
- "model-value": unref(l).validityOption,
1224
- "onUpdate:modelValue": d[4] || (d[4] = (S) => l.value = {
1225
- ...unref(l),
1226
- validityOption: S
1428
+ rules: [unref(ZodHelper).ruleAtPath(unref(f), "validityOption", [unref(o).type])],
1429
+ "model-value": unref(o).validityOption,
1430
+ "onUpdate:modelValue": p[4] || (p[4] = (E) => o.value = {
1431
+ ...unref(o),
1432
+ validityOption: E
1227
1433
  })
1228
1434
  }, null, 8, ["type", "for-credit", "rules", "model-value"])
1229
1435
  ], 64)) : createCommentVNode("", !0),
1230
- unref(l).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$n, {
1436
+ unref(o).type === "VOUCHER" ? (openBlock(), createBlock(_sfc_main$n, {
1231
1437
  key: 3,
1232
1438
  "reward-image": unref(u),
1233
- "model-value": ((R = unref(l)) == null ? void 0 : R.collectibleConfig) ?? void 0,
1234
- "onUpdate:modelValue": d[5] || (d[5] = (S) => l.value = {
1235
- ...unref(l),
1236
- collectibleConfig: S
1439
+ "model-value": ((S = unref(o)) == null ? void 0 : S.collectibleConfig) ?? void 0,
1440
+ "onUpdate:modelValue": p[5] || (p[5] = (E) => o.value = {
1441
+ ...unref(o),
1442
+ collectibleConfig: E
1237
1443
  }),
1238
- "onUpdate:rewardImage": d[6] || (d[6] = (S) => u.value = S)
1444
+ "onUpdate:rewardImage": p[6] || (p[6] = (E) => u.value = E)
1239
1445
  }, null, 8, ["reward-image", "model-value"])) : createCommentVNode("", !0),
1240
1446
  createVNode(JsonViewer, { json: unref(y) }, null, 8, ["json"])
1241
1447
  ];
@@ -1271,19 +1477,19 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1271
1477
  }
1272
1478
  },
1273
1479
  setup(e) {
1274
- const m = e, { maxRange: o, currentRange: i, markers: s } = toRefs(m), p = computed(
1275
- () => Math.min(i.value / o.value * 100, 100)
1276
- ), n = (l) => l / o.value * 100;
1277
- return (l, u) => {
1480
+ const r = e, { maxRange: l, currentRange: s, markers: i } = toRefs(r), m = computed(
1481
+ () => Math.min(s.value / l.value * 100, 100)
1482
+ ), n = (o) => o / l.value * 100;
1483
+ return (o, u) => {
1278
1484
  const a = resolveComponent("FmIcon");
1279
1485
  return e.type === "STAMP" ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
1280
- (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(o), 40), (f) => (openBlock(), createBlock(a, {
1486
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(Math.min(unref(l), 40), (f) => (openBlock(), createBlock(a, {
1281
1487
  class: normalizeClass(
1282
- unref(i) >= f ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
1488
+ unref(s) >= f ? "text-fm-color-primary" : "text-fm-color-neutral-gray-200"
1283
1489
  ),
1284
- outline: unref(i) < f,
1490
+ outline: unref(s) < f,
1285
1491
  key: f,
1286
- name: unref(s).some((y) => y === f) ? "featured_seasonal_and_gifts" : "check_circle"
1492
+ name: unref(i).some((y) => y === f) ? "featured_seasonal_and_gifts" : "check_circle"
1287
1493
  }, null, 8, ["class", "outline", "name"]))), 128))
1288
1494
  ])) : (openBlock(), createElementBlock("div", {
1289
1495
  key: 1,
@@ -1291,9 +1497,9 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1291
1497
  }, [
1292
1498
  createElementVNode("div", {
1293
1499
  class: normalizeClass(["bg-fm-color-primary", "absolute top-0 left-0 h-full rounded-lg"]),
1294
- style: normalizeStyle({ width: unref(p) + "%" })
1500
+ style: normalizeStyle({ width: unref(m) + "%" })
1295
1501
  }, null, 4),
1296
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(s), (f, y) => (openBlock(), createElementBlock("div", {
1502
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(i), (f, y) => (openBlock(), createElementBlock("div", {
1297
1503
  key: y,
1298
1504
  class: "absolute -top-1.5 flex flex-col items-center -translate-x-1/2",
1299
1505
  style: normalizeStyle({ left: n(f) + "%" })
@@ -1310,16 +1516,16 @@ const _hoisted_1$a = { class: "space-y-16" }, _hoisted_2$7 = { class: "fm-typo-e
1310
1516
  }
1311
1517
  }), isObject = (e) => e !== null && typeof e == "object";
1312
1518
  function changeKeysFactory(e) {
1313
- return function m(o, i = 1, s) {
1314
- if (i === 0 || !isObject(o))
1315
- return o;
1316
- if (Array.isArray(o))
1317
- return o.map((n) => m(n, i - 1, s));
1318
- const p = Object.create(Object.getPrototypeOf(o));
1319
- return Object.keys(o).forEach((n) => {
1320
- const l = o[n], u = e(n, s), a = m(l, i - 1, s);
1321
- p[u] = a;
1322
- }), p;
1519
+ return function r(l, s = 1, i) {
1520
+ if (s === 0 || !isObject(l))
1521
+ return l;
1522
+ if (Array.isArray(l))
1523
+ return l.map((n) => r(n, s - 1, i));
1524
+ const m = Object.create(Object.getPrototypeOf(l));
1525
+ return Object.keys(l).forEach((n) => {
1526
+ const o = l[n], u = e(n, i), a = r(o, s - 1, i);
1527
+ m[u] = a;
1528
+ }), m;
1323
1529
  };
1324
1530
  }
1325
1531
  const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class: "space-y-16" }, _hoisted_2$3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$3 = { class: "fm-typo-en-body-lg-400" }, _hoisted_4$2 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _hoisted_5$2 = { class: "fm-typo-en-title-sm-800" }, _hoisted_6$2 = { class: "flex items-center gap-4" }, _hoisted_7$2 = { class: "fm-typo-en-body-lg-600" }, _hoisted_8$2 = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _hoisted_9$2 = { class: "flex items-center gap-16" }, _hoisted_10$2 = { key: 0 }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
@@ -1335,50 +1541,50 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1335
1541
  }
1336
1542
  },
1337
1543
  emits: ["update:model-value"],
1338
- setup(e, { emit: m }) {
1339
- const { t: o } = useI18n(), i = e, s = m, p = useMembershipStore(), n = z.array(z.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), l = computed(
1340
- () => i.modelValue.sort((r, d) => r.threshold - d.threshold) ?? []
1544
+ setup(e, { emit: r }) {
1545
+ const { t: l } = useI18n(), s = e, i = r, m = useMembershipStore(), n = z$1.array(z$1.lazy(() => FdtoThresholdReward)).min(1, "Requires at least 1 reward"), o = computed(
1546
+ () => s.modelValue.sort((c, p) => c.threshold - p.threshold) ?? []
1341
1547
  ), u = computed(() => {
1342
- const r = n.safeParse(l.value);
1343
- return r.success ? [] : r.error.errors;
1548
+ const c = n.safeParse(o.value);
1549
+ return c.success ? [] : c.error.errors;
1344
1550
  }), a = ref();
1345
- function f(r, d) {
1551
+ function f(c, p) {
1346
1552
  var k;
1347
- const g = [...l.value];
1348
- g[d] = r, (k = a.value) == null || k.showSheet(!1), s("update:model-value", g);
1553
+ const g = [...o.value];
1554
+ g[p] = c, (k = a.value) == null || k.showSheet(!1), i("update:model-value", g);
1349
1555
  }
1350
- function y(r) {
1351
- const d = r.type == "VOUCHER" ? r.collectibleConfig : p.collectibles.find(
1352
- (V) => V._id.toString() == r.collectible
1353
- ), g = CollectionUtils.formattedType((d == null ? void 0 : d.name) || ""), k = r.earningOption.type == "FIXED" ? o("connect.template.mission_pool.reward_sublabel_fixed", {
1354
- threshold: r.threshold,
1355
- amount: r.earningOption.amount
1356
- }) : o("connect.template.mission_pool.reward_sublabel_per_spend", {
1357
- threshold: r.threshold,
1358
- amount: r.earningOption.amount,
1359
- every: r.earningOption.every
1556
+ function y(c) {
1557
+ const p = c.type == "VOUCHER" ? c.collectibleConfig : m.collectibles.find(
1558
+ (V) => V._id.toString() == c.collectible
1559
+ ), g = CollectionUtils.formattedType((p == null ? void 0 : p.name) || ""), k = c.earningOption.type == "FIXED" ? l("connect.template.mission_pool.reward_sublabel_fixed", {
1560
+ threshold: c.threshold,
1561
+ amount: c.earningOption.amount
1562
+ }) : l("connect.template.mission_pool.reward_sublabel_per_spend", {
1563
+ threshold: c.threshold,
1564
+ amount: c.earningOption.amount,
1565
+ every: c.earningOption.every
1360
1566
  });
1361
1567
  return {
1362
- label: isNullOrEmpty(g) ? o("connect.template.mission_pool.no_reward") : g,
1568
+ label: isNullOrEmpty(g) ? l("connect.template.mission_pool.no_reward") : g,
1363
1569
  sublabel: k
1364
1570
  };
1365
1571
  }
1366
- function v(r) {
1572
+ function v(c) {
1367
1573
  var g;
1368
- const d = [...l.value];
1369
- (g = a.value) == null || g.showSheet(!0, d[r], r);
1574
+ const p = [...o.value];
1575
+ (g = a.value) == null || g.showSheet(!0, p[c], c);
1370
1576
  }
1371
- function C(r) {
1372
- const d = [...l.value];
1373
- d.splice(r, 1), s("update:model-value", d);
1577
+ function x(c) {
1578
+ const p = [...o.value];
1579
+ p.splice(c, 1), i("update:model-value", p);
1374
1580
  }
1375
1581
  function b() {
1376
- var r;
1377
- (r = a.value) == null || r.showSheet(
1582
+ var c;
1583
+ (c = a.value) == null || c.showSheet(
1378
1584
  !0,
1379
1585
  {
1380
1586
  type: "LOYALTY",
1381
- collectible: p.loyaltyRewards.items[0].value,
1587
+ collectible: m.loyaltyRewards.items[0].value,
1382
1588
  threshold: null,
1383
1589
  validityOption: {
1384
1590
  validForDay: 7
@@ -1388,28 +1594,28 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1388
1594
  amount: 1
1389
1595
  }
1390
1596
  },
1391
- l.value.length
1597
+ o.value.length
1392
1598
  );
1393
1599
  }
1394
- function c(r) {
1395
- var d, g;
1396
- return r.type == "VOUCHER" ? (d = r.collectibleConfig) == null ? void 0 : d.name : sentenceCase(
1397
- ((g = p.loyaltyRewards.items.find(
1398
- (k) => k.value == r.collectible
1600
+ function d(c) {
1601
+ var p, g;
1602
+ return c.type == "VOUCHER" ? (p = c.collectibleConfig) == null ? void 0 : p.name : sentenceCase(
1603
+ ((g = m.loyaltyRewards.items.find(
1604
+ (k) => k.value == c.collectible
1399
1605
  )) == null ? void 0 : g.label) || ""
1400
1606
  );
1401
1607
  }
1402
- return (r, d) => {
1608
+ return (c, p) => {
1403
1609
  const g = resolveComponent("FmButton"), k = resolveComponent("FmCard"), V = resolveComponent("FmHelperText");
1404
1610
  return openBlock(), createElementBlock("div", _hoisted_1$4, [
1405
- createElementVNode("div", _hoisted_2$3, toDisplayString(unref(o)("connect.template.configure_reward_customer")), 1),
1611
+ createElementVNode("div", _hoisted_2$3, toDisplayString(unref(l)("connect.template.configure_reward_customer")), 1),
1406
1612
  createVNode(g, {
1407
- label: unref(o)("connect.template.mission_pool.add_reward"),
1408
- onClick: d[0] || (d[0] = (x) => b()),
1613
+ label: unref(l)("connect.template.mission_pool.add_reward"),
1614
+ onClick: p[0] || (p[0] = (C) => b()),
1409
1615
  variant: "plain",
1410
1616
  icon: "add"
1411
1617
  }, null, 8, ["label"]),
1412
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l), (x, B) => (openBlock(), createBlock(k, {
1618
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(o), (C, B) => (openBlock(), createBlock(k, {
1413
1619
  key: B,
1414
1620
  class: "px-16 py-12 flex items-center justify-between cursor-pointer",
1415
1621
  variant: "outlined",
@@ -1417,35 +1623,35 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1417
1623
  }, {
1418
1624
  default: withCtx(() => [
1419
1625
  createElementVNode("div", null, [
1420
- createElementVNode("div", _hoisted_3$3, toDisplayString(y(x).label), 1),
1421
- createElementVNode("div", _hoisted_4$2, toDisplayString(y(x).sublabel), 1)
1626
+ createElementVNode("div", _hoisted_3$3, toDisplayString(y(C).label), 1),
1627
+ createElementVNode("div", _hoisted_4$2, toDisplayString(y(C).sublabel), 1)
1422
1628
  ]),
1423
1629
  createVNode(g, {
1424
1630
  icon: "delete",
1425
1631
  variant: "tertiary",
1426
- onClick: (h) => (h.stopPropagation(), C(B))
1632
+ onClick: (h) => (h.stopPropagation(), x(B))
1427
1633
  }, null, 8, ["onClick"])
1428
1634
  ]),
1429
1635
  _: 2
1430
1636
  }, 1032, ["onClick"]))), 128)),
1431
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).filter((x) => x.path.join(".") == ""), (x) => (openBlock(), createBlock(V, {
1432
- key: x.message,
1433
- text: x.message,
1637
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(u).filter((C) => C.path.join(".") == ""), (C) => (openBlock(), createBlock(V, {
1638
+ key: C.message,
1639
+ text: C.message,
1434
1640
  state: "error"
1435
1641
  }, null, 8, ["text"]))), 128)),
1436
- createElementVNode("div", _hoisted_5$2, toDisplayString(unref(o)("connect.template.mission_pool.preview")), 1),
1642
+ createElementVNode("div", _hoisted_5$2, toDisplayString(unref(l)("connect.template.mission_pool.preview")), 1),
1437
1643
  (openBlock(), createBlock(k, {
1438
1644
  key: 0,
1439
1645
  variant: "outlined",
1440
1646
  class: "p-24 space-y-16 w-fit"
1441
1647
  }, {
1442
1648
  default: withCtx(() => {
1443
- var x, B;
1649
+ var C, B;
1444
1650
  return [
1445
1651
  createElementVNode("div", _hoisted_6$2, [
1446
1652
  createElementVNode("div", null, [
1447
- createElementVNode("div", _hoisted_7$2, toDisplayString(unref(o)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString(((x = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : x.earningOption.amount) > 1 ? (B = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : B.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? c(e.modelValue[e.modelValue.length - 1]) : ""), 1),
1448
- createElementVNode("div", _hoisted_8$2, toDisplayString(unref(o)("connect.template.mission_pool.earn_stamp")), 1)
1653
+ createElementVNode("div", _hoisted_7$2, toDisplayString(unref(l)("connect.template.mission_pool.collect_stamps", { end: e.mission.end })) + " " + toDisplayString(((C = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : C.earningOption.amount) > 1 ? (B = e.modelValue[e.modelValue.length - 1]) == null ? void 0 : B.earningOption.amount : "") + " " + toDisplayString(e.modelValue[e.modelValue.length - 1] ? d(e.modelValue[e.modelValue.length - 1]) : ""), 1),
1654
+ createElementVNode("div", _hoisted_8$2, toDisplayString(unref(l)("connect.template.mission_pool.earn_stamp")), 1)
1449
1655
  ])
1450
1656
  ]),
1451
1657
  createElementVNode("div", _hoisted_9$2, [
@@ -1476,45 +1682,45 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1476
1682
  modelValue: Object
1477
1683
  },
1478
1684
  emits: ["update:model-value"],
1479
- setup(e, { emit: m }) {
1480
- const { t: o } = useI18n(), i = e, s = computed(() => {
1481
- const l = FdoMission.safeParse(i.modelValue);
1482
- return l.success ? [] : l.error.errors;
1483
- }), p = computed(() => [
1685
+ setup(e, { emit: r }) {
1686
+ const { t: l } = useI18n(), s = e, i = computed(() => {
1687
+ const o = FdoMission.safeParse(s.modelValue);
1688
+ return o.success ? [] : o.error.errors;
1689
+ }), m = computed(() => [
1484
1690
  {
1485
- label: o("connect.campaign.mission.typeOption.STAMP.label"),
1486
- description: o("connect.campaign.mission.typeOption.STAMP.description"),
1691
+ label: l("connect.campaign.mission.typeOption.STAMP.label"),
1692
+ description: l("connect.campaign.mission.typeOption.STAMP.description"),
1487
1693
  value: F_MISSION_TYPE.enum.STAMP
1488
1694
  },
1489
1695
  {
1490
- label: o("connect.campaign.mission.typeOption.PROGRESSIVE.label"),
1491
- description: o("connect.campaign.mission.typeOption.PROGRESSIVE.description"),
1696
+ label: l("connect.campaign.mission.typeOption.PROGRESSIVE.label"),
1697
+ description: l("connect.campaign.mission.typeOption.PROGRESSIVE.description"),
1492
1698
  value: F_MISSION_TYPE.enum.PROGRESSIVE
1493
1699
  }
1494
- ]), n = m;
1495
- return (l, u) => {
1700
+ ]), n = r;
1701
+ return (o, u) => {
1496
1702
  var y;
1497
1703
  const a = resolveComponent("FmCard"), f = resolveComponent("FmStepperField");
1498
1704
  return openBlock(), createElementBlock("div", _hoisted_1$3, [
1499
1705
  createElementVNode("div", _hoisted_2$2, [
1500
- createElementVNode("div", _hoisted_3$2, toDisplayString(unref(o)("connect.campaign.mission.missionType")), 1),
1501
- createElementVNode("div", _hoisted_4$1, toDisplayString(unref(o)("connect.template.select_game")), 1),
1706
+ createElementVNode("div", _hoisted_3$2, toDisplayString(unref(l)("connect.campaign.mission.missionType")), 1),
1707
+ createElementVNode("div", _hoisted_4$1, toDisplayString(unref(l)("connect.template.select_game")), 1),
1502
1708
  createElementVNode("div", _hoisted_5$1, [
1503
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (v) => {
1504
- var C, b;
1709
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(m), (v) => {
1710
+ var x, b;
1505
1711
  return openBlock(), createBlock(a, {
1506
1712
  variant: "outlined",
1507
1713
  class: normalizeClass(["p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3", {
1508
- "col-span-2": unref(p).length == 1,
1509
- "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((C = e.modelValue) == null ? void 0 : C.type) == v.value,
1714
+ "col-span-2": unref(m).length == 1,
1715
+ "border-fm-color-primary bg-fm-color-system-warning-100 hover:border-[var(--fm-color-system-orange-300)]": ((x = e.modelValue) == null ? void 0 : x.type) == v.value,
1510
1716
  "hover:bg-fm-color-opacity-sm": ((b = e.modelValue) == null ? void 0 : b.type) != v.value
1511
1717
  }]),
1512
1718
  onClick: () => {
1513
- var c, r;
1514
- ((c = e.modelValue) == null ? void 0 : c.type) != v.value && n("update:model-value", {
1719
+ var d, c;
1720
+ ((d = e.modelValue) == null ? void 0 : d.type) != v.value && n("update:model-value", {
1515
1721
  ...e.modelValue,
1516
1722
  type: v.value,
1517
- end: ((r = e.modelValue) == null ? void 0 : r.end) || 1
1723
+ end: ((c = e.modelValue) == null ? void 0 : c.end) || 1
1518
1724
  });
1519
1725
  },
1520
1726
  key: v.value
@@ -1529,21 +1735,21 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1529
1735
  ])
1530
1736
  ]),
1531
1737
  createElementVNode("div", _hoisted_8$1, [
1532
- createElementVNode("div", _hoisted_9$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequired")), 1),
1533
- createElementVNode("div", _hoisted_10$1, toDisplayString(unref(o)("connect.campaign.mission.collectionsRequiredDescription")), 1),
1738
+ createElementVNode("div", _hoisted_9$1, toDisplayString(unref(l)("connect.campaign.mission.collectionsRequired")), 1),
1739
+ createElementVNode("div", _hoisted_10$1, toDisplayString(unref(l)("connect.campaign.mission.collectionsRequiredDescription")), 1),
1534
1740
  createVNode(f, {
1535
- label: unref(o)("connect.campaign.mission.maximumToCollect"),
1741
+ label: unref(l)("connect.campaign.mission.maximumToCollect"),
1536
1742
  "model-value": ((y = e.modelValue) == null ? void 0 : y.end) || null,
1537
1743
  "onUpdate:modelValue": u[0] || (u[0] = (v) => {
1538
- var C;
1744
+ var x;
1539
1745
  return n("update:model-value", {
1540
1746
  ...e.modelValue,
1541
- type: ((C = e.modelValue) == null ? void 0 : C.type) || "STAMP",
1747
+ type: ((x = e.modelValue) == null ? void 0 : x.type) || "STAMP",
1542
1748
  end: v
1543
1749
  });
1544
1750
  }),
1545
- "helper-text": unref(ZodHelper).helperText(unref(s), "end") || unref(o)("connect.campaign.mission.thresholdHelperText"),
1546
- "helper-state": unref(ZodHelper).helperState(unref(s), "end") || "none"
1751
+ "helper-text": unref(ZodHelper).helperText(unref(i), "end") || unref(l)("connect.campaign.mission.thresholdHelperText"),
1752
+ "helper-state": unref(ZodHelper).helperState(unref(i), "end") || "none"
1547
1753
  }, null, 8, ["label", "model-value", "helper-text", "helper-state"])
1548
1754
  ])
1549
1755
  ]);
@@ -1551,11 +1757,11 @@ const sentenceCase = changeKeysFactory(sentenceCase$1), _hoisted_1$4 = { class:
1551
1757
  }
1552
1758
  });
1553
1759
  function useLocaleText() {
1554
- const { locale: e, t: m } = useI18n();
1555
- function o(i, s) {
1556
- return i ? i[e.value] ?? i["en-US"] ?? m(s) : m(s);
1760
+ const { locale: e, t: r } = useI18n();
1761
+ function l(s, i) {
1762
+ return s ? s[e.value] ?? s["en-US"] ?? r(i) : r(i);
1557
1763
  }
1558
- return { getLocaleText: o };
1764
+ return { getLocaleText: l };
1559
1765
  }
1560
1766
  const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
1561
1767
  __name: "TemplateInput",
@@ -1583,13 +1789,13 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1583
1789
  }
1584
1790
  },
1585
1791
  emits: ["update:model-value", "update:file"],
1586
- setup(e, { emit: m }) {
1587
- const { t: o } = useI18n(), { getLocaleText: i } = useLocaleText(), s = e, p = m;
1792
+ setup(e, { emit: r }) {
1793
+ const { t: l } = useI18n(), { getLocaleText: s } = useLocaleText(), i = e, m = r;
1588
1794
  function n(f) {
1589
- switch (s.field.type) {
1795
+ switch (i.field.type) {
1590
1796
  case "timeframe":
1591
1797
  const y = f.startDate ? hooks(f.startDate).startOf("day").toISOString() : void 0, v = f.endDate ? hooks(f.endDate).endOf("day").toISOString() : void 0;
1592
- p("update:model-value", {
1798
+ m("update:model-value", {
1593
1799
  type: "timeframe",
1594
1800
  property: "__now",
1595
1801
  start: y,
@@ -1597,66 +1803,66 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1597
1803
  });
1598
1804
  break;
1599
1805
  case "image": {
1600
- p(
1806
+ m(
1601
1807
  "update:file",
1602
1808
  f,
1603
- l.value || firebaseStorage.collectibleImagePath(void 0, f)
1809
+ o.value || firebaseStorage.collectibleImagePath(void 0, f)
1604
1810
  );
1605
1811
  break;
1606
1812
  }
1607
1813
  default:
1608
- p("update:model-value", f);
1814
+ m("update:model-value", f);
1609
1815
  break;
1610
1816
  }
1611
1817
  }
1612
- const l = computed(() => {
1613
- switch (s.field.type) {
1818
+ const o = computed(() => {
1819
+ switch (i.field.type) {
1614
1820
  case "timeframe": {
1615
- const f = s.modelValue;
1821
+ const f = i.modelValue;
1616
1822
  return {
1617
1823
  startDate: f != null && f.start ? hooks(f == null ? void 0 : f.start).format("YYYY-MM-DD") : null,
1618
1824
  endDate: f != null && f.end ? hooks(f == null ? void 0 : f.end).format("YYYY-MM-DD") : null
1619
1825
  };
1620
1826
  }
1621
1827
  default:
1622
- return s.modelValue;
1828
+ return i.modelValue;
1623
1829
  }
1624
1830
  });
1625
1831
  function u() {
1626
1832
  if (!a.value.schema) return [];
1627
- const f = a.value.schema.safeParse(s.modelValue);
1833
+ const f = a.value.schema.safeParse(i.modelValue);
1628
1834
  return f.success ? [] : f.error.errors;
1629
1835
  }
1630
1836
  const a = computed(() => ({
1631
- schema: s.schema,
1632
- unwrapped: s.schema ? ZodHelper.unwrap(s.schema) : void 0,
1633
- rules: s.schema ? [ZodHelper.ruleAtPath(s.schema, "")] : void 0,
1634
- labelMark: s.schema && ZodHelper.isRequired(s.schema) == !1 ? "optional" : void 0,
1635
- zodLabel: s.schema ? ZodHelper.toInputLabel(
1636
- s.schema,
1637
- i(s.field.label_locale, s.field.label ?? "")
1837
+ schema: i.schema,
1838
+ unwrapped: i.schema ? ZodHelper.unwrap(i.schema) : void 0,
1839
+ rules: i.schema ? [ZodHelper.ruleAtPath(i.schema, "")] : void 0,
1840
+ labelMark: i.schema && ZodHelper.isRequired(i.schema) == !1 ? "optional" : void 0,
1841
+ zodLabel: i.schema ? ZodHelper.toInputLabel(
1842
+ i.schema,
1843
+ s(i.field.label_locale, i.field.label ?? "")
1638
1844
  ) : void 0
1639
1845
  }));
1640
1846
  return (f, y) => {
1641
- var d, g, k, V, x;
1642
- const v = resolveComponent("FmTextField"), C = resolveComponent("FmStepperField"), b = resolveComponent("FmTextarea"), c = resolveComponent("FmHelperText"), r = resolveComponent("FmSwitch");
1847
+ var p, g, k, V, C;
1848
+ const v = resolveComponent("FmTextField"), x = resolveComponent("FmStepperField"), b = resolveComponent("FmTextarea"), d = resolveComponent("FmHelperText"), c = resolveComponent("FmSwitch");
1643
1849
  return e.field.type === "text" ? (openBlock(), createBlock(v, {
1644
1850
  key: 0,
1645
- label: unref(i)(e.field.label_locale, e.field.label ?? ""),
1851
+ label: unref(s)(e.field.label_locale, e.field.label ?? ""),
1646
1852
  "label-mark": unref(a).labelMark,
1647
1853
  rules: unref(a).rules,
1648
- "model-value": unref(l),
1854
+ "model-value": unref(o),
1649
1855
  "onUpdate:modelValue": n,
1650
1856
  "helper-state": e.helperText ? "error" : void 0,
1651
1857
  "helper-text": e.helperText
1652
1858
  }, null, 8, ["label", "label-mark", "rules", "model-value", "helper-state", "helper-text"])) : e.field.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1653
1859
  createVNode(JsonViewer, {
1654
- json: { schema: unref(a).unwrapped, props: s }
1860
+ json: { schema: unref(a).unwrapped, props: i }
1655
1861
  }, null, 8, ["json"]),
1656
- createVNode(C, {
1657
- label: unref(i)(e.field.label_locale, e.field.label ?? ""),
1862
+ createVNode(x, {
1863
+ label: unref(s)(e.field.label_locale, e.field.label ?? ""),
1658
1864
  "label-mark": e.field.isRuleChildren ? void 0 : unref(a).labelMark,
1659
- "model-value": unref(l),
1865
+ "model-value": unref(o),
1660
1866
  rules: e.field.isRuleChildren ? [] : unref(a).rules,
1661
1867
  "onUpdate:modelValue": n,
1662
1868
  "helper-state": e.field.isRuleChildren && e.helperText ? "error" : void 0,
@@ -1664,32 +1870,32 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1664
1870
  }, null, 8, ["label", "label-mark", "model-value", "rules", "helper-state", "helper-text"])
1665
1871
  ], 64)) : e.field.type === "textarea" ? (openBlock(), createBlock(b, {
1666
1872
  key: 2,
1667
- label: unref(i)(e.field.label_locale, e.field.label ?? ""),
1873
+ label: unref(s)(e.field.label_locale, e.field.label ?? ""),
1668
1874
  "label-mark": unref(a).labelMark,
1669
1875
  rules: unref(a).rules,
1670
- "model-value": unref(l),
1876
+ "model-value": unref(o),
1671
1877
  "onUpdate:modelValue": n,
1672
1878
  "show-word-count": "",
1673
- "max-length": (x = (V = (k = (g = (d = unref(a)) == null ? void 0 : d.unwrapped) == null ? void 0 : g._def) == null ? void 0 : k.checks) == null ? void 0 : V.find((B) => B.kind == "max")) == null ? void 0 : x.value
1879
+ "max-length": (C = (V = (k = (g = (p = unref(a)) == null ? void 0 : p.unwrapped) == null ? void 0 : g._def) == null ? void 0 : k.checks) == null ? void 0 : V.find((B) => B.kind == "max")) == null ? void 0 : C.value
1674
1880
  }, null, 8, ["label", "label-mark", "rules", "model-value", "max-length"])) : e.field.type === "trigger" ? (openBlock(), createBlock(_sfc_main$g, {
1675
1881
  key: 3,
1676
1882
  "campaign-type": e.extras,
1677
- "model-value": unref(l),
1883
+ "model-value": unref(o),
1678
1884
  disabled: e.disabled,
1679
1885
  "onUpdate:modelValue": n
1680
1886
  }, null, 8, ["campaign-type", "model-value", "disabled"])) : e.field.type === "timeframe" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1681
1887
  createVNode(_sfc_main$e, {
1682
- "model-value": unref(l),
1888
+ "model-value": unref(o),
1683
1889
  "onUpdate:modelValue": n
1684
1890
  }, null, 8, ["model-value"]),
1685
- createVNode(c, {
1891
+ createVNode(d, {
1686
1892
  class: "!mt-[8px]",
1687
1893
  text: unref(ZodHelper).helperText(u(), ""),
1688
1894
  state: unref(ZodHelper).helperState(u(), "")
1689
1895
  }, null, 8, ["text", "state"])
1690
1896
  ], 64)) : e.field.type === "image" ? (openBlock(), createBlock(_sfc_main$o, {
1691
1897
  key: 5,
1692
- thumbnail: unref(l),
1898
+ thumbnail: unref(o),
1693
1899
  "aspect-ratio": "16 / 9",
1694
1900
  class: "w-1/2 xs:w-2/3",
1695
1901
  "onUpdate:file": n
@@ -1698,95 +1904,95 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1698
1904
  (openBlock(), createBlock(resolveDynamicComponent(unref(a).zodLabel)))
1699
1905
  ]),
1700
1906
  _: 1
1701
- }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(r, {
1907
+ }, 8, ["thumbnail"])) : e.field.type === "switch" ? (openBlock(), createBlock(c, {
1702
1908
  key: 6,
1703
- label: unref(i)(e.field.label_locale, e.field.label ?? ""),
1909
+ label: unref(s)(e.field.label_locale, e.field.label ?? ""),
1704
1910
  "label-placement": "right",
1705
1911
  sublabel: e.field.property == "campaign.notify" ? "Notify customer when customer receives the reward" : void 0,
1706
1912
  "label-mark": unref(a).labelMark,
1707
1913
  rules: unref(a).rules,
1708
- "model-value": unref(l),
1914
+ "model-value": unref(o),
1709
1915
  "onUpdate:modelValue": n
1710
1916
  }, null, 8, ["label", "sublabel", "label-mark", "rules", "model-value"])) : e.field.type === "collectible_options" ? (openBlock(), createBlock(_sfc_main$p, {
1711
1917
  key: 7,
1712
- "model-value": unref(l),
1918
+ "model-value": unref(o),
1713
1919
  "onUpdate:modelValue": n,
1714
1920
  "no-campaign": !1,
1715
1921
  schema: unref(a).schema,
1716
1922
  "is-mission": e.extras === "MISSION"
1717
1923
  }, null, 8, ["model-value", "schema", "is-mission"])) : e.field.type === "target_location" ? (openBlock(), createBlock(_sfc_main$q, {
1718
1924
  key: 8,
1719
- "model-value": unref(l),
1925
+ "model-value": unref(o),
1720
1926
  "onUpdate:modelValue": n
1721
1927
  }, null, 8, ["model-value"])) : e.field.type == "effect" ? (openBlock(), createElementBlock(Fragment, { key: 9 }, [
1722
1928
  createVNode(_sfc_main$r, {
1723
- "model-value": unref(l),
1929
+ "model-value": unref(o),
1724
1930
  "onUpdate:modelValue": n,
1725
1931
  "can-set-auto-apply": e.field.property == "campaign.effect"
1726
1932
  }, null, 8, ["model-value", "can-set-auto-apply"]),
1727
- unref(l) ? createCommentVNode("", !0) : (openBlock(), createBlock(c, {
1933
+ unref(o) ? createCommentVNode("", !0) : (openBlock(), createBlock(d, {
1728
1934
  key: 0,
1729
1935
  class: "!mt-[8px]",
1730
- text: unref(o)("connect.campaign.common.effect_required"),
1936
+ text: unref(l)("connect.campaign.common.effect_required"),
1731
1937
  state: "error"
1732
1938
  }, null, 8, ["text"]))
1733
1939
  ], 64)) : e.field.type === "message" ? (openBlock(), createBlock(_sfc_main$s, {
1734
1940
  key: 10,
1735
1941
  "allow-email": !0,
1736
1942
  "allow-whatsapp": !0,
1737
- "model-value": unref(l),
1943
+ "model-value": unref(o),
1738
1944
  "onUpdate:modelValue": n,
1739
1945
  "helper-text": unref(ZodHelper).helperText(u(), ""),
1740
1946
  "trigger-type": e.field.extras,
1741
1947
  "helper-state": unref(ZodHelper).helperState(u(), "")
1742
1948
  }, null, 8, ["model-value", "helper-text", "trigger-type", "helper-state"])) : e.field.type === "earning_option" ? (openBlock(), createBlock(_sfc_main$l, {
1743
1949
  key: 11,
1744
- "model-value": unref(l),
1950
+ "model-value": unref(o),
1745
1951
  "onUpdate:modelValue": n,
1746
1952
  extras: e.extras,
1747
1953
  "error-text": e.helperText
1748
1954
  }, null, 8, ["model-value", "extras", "error-text"])) : e.field.type === "validity_option" ? (openBlock(), createBlock(_sfc_main$m, {
1749
1955
  key: 12,
1750
1956
  type: "custom",
1751
- "model-value": unref(l),
1957
+ "model-value": unref(o),
1752
1958
  "onUpdate:modelValue": n,
1753
1959
  "helper-text": e.helperText || unref(ZodHelper).helperText(u(), ""),
1754
- "for-credit": s.campaignType === "CREDIT"
1960
+ "for-credit": i.campaignType === "CREDIT"
1755
1961
  }, null, 8, ["model-value", "helper-text", "for-credit"])) : e.field.type === "game_type" ? (openBlock(), createBlock(_sfc_main$c, {
1756
1962
  key: 13,
1757
- "model-value": unref(l),
1963
+ "model-value": unref(o),
1758
1964
  "onUpdate:modelValue": n
1759
1965
  }, null, 8, ["model-value"])) : e.field.type === "reward_pool" ? (openBlock(), createBlock(_sfc_main$a, {
1760
1966
  key: 14,
1761
- "model-value": unref(l),
1967
+ "model-value": unref(o),
1762
1968
  "onUpdate:modelValue": n
1763
1969
  }, null, 8, ["model-value"])) : e.field.type === "mission" ? (openBlock(), createBlock(_sfc_main$3, {
1764
1970
  key: 15,
1765
- "model-value": unref(l),
1971
+ "model-value": unref(o),
1766
1972
  "onUpdate:modelValue": n
1767
1973
  }, null, 8, ["model-value"])) : e.field.type === "mission_type" ? (openBlock(), createBlock(_sfc_main$8, {
1768
1974
  key: 16,
1769
- "model-value": unref(l),
1975
+ "model-value": unref(o),
1770
1976
  "onUpdate:modelValue": n
1771
1977
  }, null, 8, ["model-value"])) : e.field.type === "mission_end" ? (openBlock(), createBlock(_sfc_main$7, {
1772
1978
  key: 17,
1773
- "model-value": unref(l),
1979
+ "model-value": unref(o),
1774
1980
  "onUpdate:modelValue": n,
1775
1981
  "helper-text": unref(ZodHelper).helperText(u(), ""),
1776
1982
  "helper-state": unref(ZodHelper).helperState(u(), "")
1777
1983
  }, null, 8, ["model-value", "helper-text", "helper-state"])) : e.field.type === "mission_pool" ? (openBlock(), createBlock(_sfc_main$4, {
1778
1984
  key: 18,
1779
- "model-value": unref(l),
1985
+ "model-value": unref(o),
1780
1986
  "onUpdate:modelValue": n,
1781
1987
  mission: e.extras.mission
1782
1988
  }, null, 8, ["model-value", "mission"])) : e.field.type === "rule_schedule" ? (openBlock(), createElementBlock(Fragment, { key: 19 }, [
1783
1989
  createVNode(_sfc_main$d, {
1784
- "model-value": unref(l),
1990
+ "model-value": unref(o),
1785
1991
  "onUpdate:modelValue": n,
1786
1992
  "start-date": e.extras.start,
1787
1993
  "end-date": e.extras.end
1788
1994
  }, null, 8, ["model-value", "start-date", "end-date"]),
1789
- e.helperText ? (openBlock(), createBlock(c, {
1995
+ e.helperText ? (openBlock(), createBlock(d, {
1790
1996
  key: 0,
1791
1997
  class: "!mt-[8px]",
1792
1998
  text: e.helperText,
@@ -1794,26 +2000,26 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1794
2000
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1795
2001
  ], 64)) : e.field.type === "rule_user" ? (openBlock(), createElementBlock(Fragment, { key: 20 }, [
1796
2002
  createVNode(_sfc_main$t, {
1797
- "model-value": unref(l),
2003
+ "model-value": unref(o),
1798
2004
  "onUpdate:modelValue": n
1799
2005
  }, null, 8, ["model-value"]),
1800
- e.helperText ? (openBlock(), createBlock(c, {
2006
+ e.helperText ? (openBlock(), createBlock(d, {
1801
2007
  key: 0,
1802
2008
  class: "!mt-[8px]",
1803
2009
  text: e.helperText,
1804
2010
  state: "error"
1805
2011
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1806
2012
  ], 64)) : e.field.type === "rule_time" ? (openBlock(), createElementBlock(Fragment, { key: 21 }, [
1807
- e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(l).rules.g_time).length > 0 ? (openBlock(), createBlock(c, {
2013
+ e.extras == "PROMOTION" && unref(RuleBuilder).getRules(unref(o).rules.g_time).length > 0 ? (openBlock(), createBlock(d, {
1808
2014
  key: 0,
1809
2015
  state: "warning",
1810
2016
  text: `Time based rule only work for POS >= v${unref(featureVersionMapping).TIME_BASED_PROMOTION}`
1811
2017
  }, null, 8, ["text"])) : createCommentVNode("", !0),
1812
2018
  createVNode(_sfc_main$i, {
1813
- "model-value": unref(l),
2019
+ "model-value": unref(o),
1814
2020
  "onUpdate:modelValue": n
1815
2021
  }, null, 8, ["model-value"]),
1816
- e.helperText ? (openBlock(), createBlock(c, {
2022
+ e.helperText ? (openBlock(), createBlock(d, {
1817
2023
  key: 1,
1818
2024
  class: "!mt-[8px]",
1819
2025
  text: e.helperText,
@@ -1821,10 +2027,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1821
2027
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1822
2028
  ], 64)) : e.field.type === "rule_bill" ? (openBlock(), createElementBlock(Fragment, { key: 22 }, [
1823
2029
  createVNode(_sfc_main$u, {
1824
- "model-value": unref(l),
2030
+ "model-value": unref(o),
1825
2031
  "onUpdate:modelValue": n
1826
2032
  }, null, 8, ["model-value"]),
1827
- e.helperText ? (openBlock(), createBlock(c, {
2033
+ e.helperText ? (openBlock(), createBlock(d, {
1828
2034
  key: 0,
1829
2035
  class: "!mt-[8px]",
1830
2036
  text: e.helperText,
@@ -1832,10 +2038,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1832
2038
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1833
2039
  ], 64)) : e.field.type === "rule_feedback" ? (openBlock(), createElementBlock(Fragment, { key: 23 }, [
1834
2040
  createVNode(_sfc_main$v, {
1835
- "model-value": unref(l),
2041
+ "model-value": unref(o),
1836
2042
  "onUpdate:modelValue": n
1837
2043
  }, null, 8, ["model-value"]),
1838
- e.helperText ? (openBlock(), createBlock(c, {
2044
+ e.helperText ? (openBlock(), createBlock(d, {
1839
2045
  key: 0,
1840
2046
  class: "!mt-[8px]",
1841
2047
  text: e.helperText,
@@ -1843,10 +2049,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1843
2049
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1844
2050
  ], 64)) : e.field.type === "rule_birthday" ? (openBlock(), createElementBlock(Fragment, { key: 24 }, [
1845
2051
  createVNode(_sfc_main$h, {
1846
- "model-value": unref(l),
2052
+ "model-value": unref(o),
1847
2053
  "onUpdate:modelValue": n
1848
2054
  }, null, 8, ["model-value"]),
1849
- e.helperText ? (openBlock(), createBlock(c, {
2055
+ e.helperText ? (openBlock(), createBlock(d, {
1850
2056
  key: 0,
1851
2057
  class: "!mt-[8px]",
1852
2058
  text: e.helperText,
@@ -1854,16 +2060,16 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1854
2060
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1855
2061
  ], 64)) : e.field.type === "promotion_game_type" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
1856
2062
  createVNode(_sfc_main$9, {
1857
- "model-value": unref(l),
2063
+ "model-value": unref(o),
1858
2064
  "onUpdate:modelValue": n
1859
2065
  }, null, 8, ["model-value"]),
1860
- e.helperText ? (openBlock(), createBlock(c, {
2066
+ e.helperText ? (openBlock(), createBlock(d, {
1861
2067
  key: 0,
1862
2068
  class: "!mt-[8px]",
1863
2069
  text: e.helperText,
1864
2070
  state: "error"
1865
2071
  }, null, 8, ["text"])) : createCommentVNode("", !0)
1866
- ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(s.field), 1));
2072
+ ], 64)) : (openBlock(), createElementBlock("pre", _hoisted_1$2, toDisplayString(i.field), 1));
1867
2073
  };
1868
2074
  }
1869
2075
  }), _hoisted_1$1 = { class: "fm-typo-en-body-lg-600" }, _hoisted_2$1 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _hoisted_3$1 = { class: "fm-typo-en-body-lg-600" }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
@@ -1875,23 +2081,23 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1875
2081
  }
1876
2082
  },
1877
2083
  setup(e) {
1878
- const { t: m, te: o } = useI18n();
1879
- return (i, s) => {
1880
- const p = resolveComponent("FmCard");
1881
- return openBlock(), createBlock(p, {
2084
+ const { t: r, te: l } = useI18n();
2085
+ return (s, i) => {
2086
+ const m = resolveComponent("FmCard");
2087
+ return openBlock(), createBlock(m, {
1882
2088
  variant: "outlined",
1883
2089
  class: "p-16 space-y-8"
1884
2090
  }, {
1885
2091
  default: withCtx(() => [
1886
- createElementVNode("div", _hoisted_1$1, toDisplayString(unref(m)("connect.campaign.common.summary")), 1),
1887
- s[0] || (s[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
1888
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (n, l) => (openBlock(), createElementBlock("div", {
2092
+ createElementVNode("div", _hoisted_1$1, toDisplayString(unref(r)("connect.campaign.common.summary")), 1),
2093
+ i[0] || (i[0] = createElementVNode("div", { class: "h-[1px] bg-fm-color-neutral-gray-100 w-full" }, null, -1)),
2094
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(getCampaignSummaryObject)(e.data), (n, o) => (openBlock(), createElementBlock("div", {
1889
2095
  class: "space-y-4",
1890
- key: l
2096
+ key: o
1891
2097
  }, [
1892
2098
  n ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1893
- createElementVNode("div", _hoisted_2$1, toDisplayString(unref(m)(`${l}`)), 1),
1894
- createElementVNode("div", _hoisted_3$1, toDisplayString(unref(o)(`${n}`) ? unref(m)(`${n}`) : n), 1)
2099
+ createElementVNode("div", _hoisted_2$1, toDisplayString(unref(r)(`${o}`)), 1),
2100
+ createElementVNode("div", _hoisted_3$1, toDisplayString(unref(l)(`${n}`) ? unref(r)(`${n}`) : n), 1)
1895
2101
  ], 64)) : createCommentVNode("", !0)
1896
2102
  ]))), 128))
1897
2103
  ]),
@@ -1906,33 +2112,33 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1906
2112
  __name: "EditCampaignSheet",
1907
2113
  emits: ["submit:model-value"],
1908
2114
  setup(__props, { expose: __expose, emit: __emit }) {
1909
- const Dialog = useDialog(), sheetVisible = ref(!1), { t } = useI18n(), { getLocaleText } = useLocaleText(), currentStep = ref(1), data = ref(), schema = ref(z.any()), template = ref(
2115
+ const Dialog = useDialog(), sheetVisible = ref(!1), { t } = useI18n(), { getLocaleText } = useLocaleText(), currentStep = ref(1), data = ref(), schema = ref(z$1.any()), template = ref(
1910
2116
  TEMPLATES.VOUCHER
1911
2117
  ), { minor } = useLoading, isLoading = ref(!1), sheetTitle = ref("Create Campaign"), campaignType = ref("VOUCHER");
1912
2118
  async function showSheet(visible, type, campaign, selectedTemplate) {
1913
- var e, m, o;
2119
+ var e, r, l;
1914
2120
  if (sheetVisible.value = visible, campaignType.value = type, visible == !0) {
1915
2121
  try {
1916
2122
  isLoading.value = visible, await useMembershipStore().readRewards(), await useBusinessStore().readLocations(), await useMembershipStore().readSegments(), await useMembershipStore().readMembership();
1917
2123
  } catch {
1918
2124
  } finally {
1919
- await new Promise((i) => setTimeout(i, 120)), isLoading.value = !1;
2125
+ await new Promise((s) => setTimeout(s, 120)), isLoading.value = !1;
1920
2126
  }
1921
- template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((i, s) => {
1922
- var p;
1923
- if (i.campaign.type === "VOUCHER" && i.campaign.code) {
1924
- const n = (p = i.campaign._id) == null ? void 0 : p.toString();
2127
+ template.value = selectedTemplate ?? TEMPLATES[type], schema.value = CampaignDtos[type], type === "VOUCHER" && (await useCampaignStore().read(), schema.value = schema.value.superRefine((s, i) => {
2128
+ var m;
2129
+ if (s.campaign.type === "VOUCHER" && s.campaign.code) {
2130
+ const n = (m = s.campaign._id) == null ? void 0 : m.toString();
1925
2131
  useCampaignStore().campaigns.voucher.some(
1926
- (l) => l.code === i.campaign.code && l._id.toString() !== n
1927
- ) && s.addIssue({
2132
+ (o) => o.code === s.campaign.code && o._id.toString() !== n
2133
+ ) && i.addIssue({
1928
2134
  code: "custom",
1929
2135
  message: "Code already exists, please use another code",
1930
2136
  path: ["campaign", "code"]
1931
2137
  });
1932
2138
  }
1933
2139
  })), data.value = campaign != null ? { ...campaign, templateId: (e = campaign.template) == null ? void 0 : e._id } : _.cloneDeep({
1934
- ...(m = template.value) == null ? void 0 : m.defaultValue
1935
- }), "configs" in data.value && typeof data.value.configs == "string" && (data.value.configs = eval(data.value.configs)), data.value = cleanPF(data.value), data.value.templateId = SvcConfig.getBusinessId(), data.value.campaign.business = SvcConfig.getBusinessId(), data.value.campaign.templateId = SvcConfig.getBusinessId(), "configs" in data.value && (data.value.configs.business = SvcConfig.getBusinessId()), currentStep.value = 1, sheetTitle.value = (o = campaign == null ? void 0 : campaign.campaign) != null && o._id ? t("connect.campaign.common.edit_campaign_title", {
2140
+ ...(r = template.value) == null ? void 0 : r.defaultValue
2141
+ }), "configs" in data.value && typeof data.value.configs == "string" && (data.value.configs = eval(data.value.configs)), data.value = cleanPF(data.value), data.value.templateId = SvcConfig.getBusinessId(), data.value.campaign.business = SvcConfig.getBusinessId(), data.value.campaign.templateId = SvcConfig.getBusinessId(), "configs" in data.value && (data.value.configs.business = SvcConfig.getBusinessId()), currentStep.value = 1, sheetTitle.value = (l = campaign == null ? void 0 : campaign.campaign) != null && l._id ? t("connect.campaign.common.edit_campaign_title", {
1936
2142
  typeName: t(`connect.campaign.common.typeName.${type}`)
1937
2143
  }) : t("connect.campaign.common.create_campaign_title", {
1938
2144
  typeName: t(`connect.campaign.common.typeName.${type}`)
@@ -1962,11 +2168,11 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1962
2168
  return e.success ? [] : e.error.errors;
1963
2169
  });
1964
2170
  function stepErrors(e = currentStep.value - 1) {
1965
- const m = template.value.steps[e].groups.flatMap(
1966
- (o) => o.fields.map((i) => i.property)
2171
+ const r = template.value.steps[e].groups.flatMap(
2172
+ (l) => l.fields.map((s) => s.property)
1967
2173
  );
1968
2174
  return errors.value.filter(
1969
- (o) => m.some((i) => o.path.join(".").includes(i))
2175
+ (l) => r.some((s) => l.path.join(".").includes(s))
1970
2176
  );
1971
2177
  }
1972
2178
  __expose({ showSheet });
@@ -1979,11 +2185,11 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
1979
2185
  }
1980
2186
  });
1981
2187
  }
1982
- function onUpdateProperty(e, m) {
1983
- var o, i, s, p, n, l, u, a;
1984
- if (_.set(data.value, e, m), e == "campaign.event.type") {
1985
- const y = ((p = (s = (i = (o = template.value) == null ? void 0 : o.defaultValue) == null ? void 0 : i.campaign) == null ? void 0 : s.event) == null ? void 0 : p.rule) ? _.cloneDeep({
1986
- ...(a = (u = (l = (n = template.value) == null ? void 0 : n.defaultValue) == null ? void 0 : l.campaign) == null ? void 0 : u.event) == null ? void 0 : a.rule
2188
+ function onUpdateProperty(e, r) {
2189
+ var l, s, i, m, n, o, u, a;
2190
+ if (_.set(data.value, e, r), e == "campaign.event.type") {
2191
+ const y = ((m = (i = (s = (l = template.value) == null ? void 0 : l.defaultValue) == null ? void 0 : s.campaign) == null ? void 0 : i.event) == null ? void 0 : m.rule) ? _.cloneDeep({
2192
+ ...(a = (u = (o = (n = template.value) == null ? void 0 : n.defaultValue) == null ? void 0 : o.campaign) == null ? void 0 : u.event) == null ? void 0 : a.rule
1987
2193
  }) : RuleBuilder.setRuleToGroup(RuleBuilder.scaffoldGroup(), [
1988
2194
  RuleBuilder.scaffoldGroup("g_schedule"),
1989
2195
  RuleBuilder.scaffoldGroup("g_time"),
@@ -2001,7 +2207,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2001
2207
  ],
2002
2208
  "&&"
2003
2209
  );
2004
- if (m != "SCHEDULE") {
2210
+ if (r != "SCHEDULE") {
2005
2211
  _.set(data.value, "campaign.event.rule", y);
2006
2212
  return;
2007
2213
  }
@@ -2011,19 +2217,19 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2011
2217
  RuleBuilder.setRuleToGroup(y, v)
2012
2218
  );
2013
2219
  }
2014
- e == "campaign.notify" && m == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
2220
+ e == "campaign.notify" && r == !1 && _.set(data.value, "campaign.notifyMessage", void 0);
2015
2221
  }
2016
- async function onUpdateFile(e, m) {
2017
- return e ? await minor(async () => firebaseStorage.update(m, e), {
2222
+ async function onUpdateFile(e, r) {
2223
+ return e ? await minor(async () => firebaseStorage.update(r, e), {
2018
2224
  message: `${e ? "Uploading" : "Removing"} file`,
2019
2225
  successMessage: `File ${e ? "uploaded" : "removed"} successfully`
2020
2226
  }) : "";
2021
2227
  }
2022
2228
  function isDisable(e) {
2023
- var m, o;
2229
+ var r, l;
2024
2230
  switch (e == null ? void 0 : e.property) {
2025
2231
  case "campaign.event.type":
2026
- return ((o = (m = data.value) == null ? void 0 : m.campaign) == null ? void 0 : o._id) || !1;
2232
+ return ((l = (r = data.value) == null ? void 0 : r.campaign) == null ? void 0 : l._id) || !1;
2027
2233
  default:
2028
2234
  return !1;
2029
2235
  }
@@ -2032,26 +2238,26 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2032
2238
  const e = schema.value.superRefine(campaignRefinement).transform(campaignTransform).safeParse(data.value);
2033
2239
  e.success && (emits("submit:model-value", cleanPF(JSON.parse(JSON.stringify(e.data)))), sheetVisible.value = !1);
2034
2240
  }
2035
- return (e, m) => {
2036
- const o = resolveComponent("FmButton"), i = resolveComponent("FmStep"), s = resolveComponent("FmStepper"), p = resolveComponent("FmCard"), n = resolveComponent("FmTopSheet");
2241
+ return (e, r) => {
2242
+ const l = resolveComponent("FmButton"), s = resolveComponent("FmStep"), i = resolveComponent("FmStepper"), m = resolveComponent("FmCard"), n = resolveComponent("FmTopSheet");
2037
2243
  return openBlock(), createBlock(n, {
2038
2244
  "fullscreen-size": "lg",
2039
2245
  modelValue: unref(sheetVisible),
2040
2246
  "onUpdate:modelValue": [
2041
- m[7] || (m[7] = (l) => isRef(sheetVisible) ? sheetVisible.value = l : null),
2042
- m[8] || (m[8] = (l) => sheetVisible.value = l)
2247
+ r[7] || (r[7] = (o) => isRef(sheetVisible) ? sheetVisible.value = o : null),
2248
+ r[8] || (r[8] = (o) => sheetVisible.value = o)
2043
2249
  ]
2044
2250
  }, createSlots({
2045
2251
  "top-sheet-header": withCtx(() => [
2046
2252
  createElementVNode("div", _hoisted_1, [
2047
2253
  createElementVNode("div", null, toDisplayString(unref(sheetTitle)), 1),
2048
2254
  createElementVNode("div", _hoisted_2, [
2049
- createVNode(o, {
2050
- onClick: m[0] || (m[0] = (l) => hideSheet()),
2255
+ createVNode(l, {
2256
+ onClick: r[0] || (r[0] = (o) => hideSheet()),
2051
2257
  label: unref(t)("connect.campaign.common.cancel"),
2052
2258
  variant: "tertiary"
2053
2259
  }, null, 8, ["label"]),
2054
- createVNode(o, {
2260
+ createVNode(l, {
2055
2261
  onClick: onSubmit,
2056
2262
  label: unref(t)("connect.campaign.common.save"),
2057
2263
  disabled: unref(errors).length > 0
@@ -2067,7 +2273,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2067
2273
  createElementVNode("div", _hoisted_9, [
2068
2274
  createElementVNode("div", _hoisted_10, [
2069
2275
  createElementVNode("div", _hoisted_11, [
2070
- m[9] || (m[9] = createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
2276
+ r[9] || (r[9] = createElementVNode("div", { class: "col-span-2 space-y-80 xs:col-span-3 xs:px-16 xs:pt-16" }, [
2071
2277
  createElementVNode("div", { class: "flex-1 space-y-6 py-1" }, [
2072
2278
  createElementVNode("div", { class: "h-32 bg-fm-color-neutral-gray-100 rounded" }),
2073
2279
  createElementVNode("div", { class: "h-[80px] bg-fm-color-neutral-gray-100 rounded" }),
@@ -2089,7 +2295,7 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2089
2295
  ])
2090
2296
  ])
2091
2297
  ], -1)),
2092
- createVNode(p, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
2298
+ createVNode(m, { class: "h-[150px] bg-fm-color-neutral-gray-100" })
2093
2299
  ])
2094
2300
  ])
2095
2301
  ])
@@ -2099,16 +2305,16 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2099
2305
  name: "default",
2100
2306
  fn: withCtx(() => [
2101
2307
  unref(data) ? (openBlock(), createElementBlock("div", _hoisted_3, [
2102
- createVNode(s, {
2308
+ createVNode(i, {
2103
2309
  modelValue: unref(currentStep),
2104
- "onUpdate:modelValue": m[1] || (m[1] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2310
+ "onUpdate:modelValue": r[1] || (r[1] = (o) => isRef(currentStep) ? currentStep.value = o : null),
2105
2311
  orientation: "horizontal",
2106
2312
  class: "xs:hidden mx-[-24px] mt-16 mb-24 flex-1"
2107
2313
  }, {
2108
2314
  default: withCtx(() => [
2109
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, u) => (openBlock(), createBlock(i, {
2110
- key: l.name,
2111
- title: unref(getLocaleText)(l.name_locale, l.name),
2315
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, u) => (openBlock(), createBlock(s, {
2316
+ key: o.name,
2317
+ title: unref(getLocaleText)(o.name_locale, o.name),
2112
2318
  value: u + 1,
2113
2319
  error: () => stepErrors(u).length > 0,
2114
2320
  complete: () => u + 1 <= unref(currentStep)
@@ -2117,22 +2323,22 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2117
2323
  _: 1
2118
2324
  }, 8, ["modelValue"]),
2119
2325
  createElementVNode("div", _hoisted_4, [
2120
- createVNode(o, {
2326
+ createVNode(l, {
2121
2327
  icon: "close",
2122
2328
  variant: "tertiary",
2123
- onClick: m[2] || (m[2] = (l) => sheetVisible.value = !1)
2329
+ onClick: r[2] || (r[2] = (o) => sheetVisible.value = !1)
2124
2330
  }),
2125
- createVNode(s, {
2331
+ createVNode(i, {
2126
2332
  modelValue: unref(currentStep),
2127
- "onUpdate:modelValue": m[3] || (m[3] = (l) => isRef(currentStep) ? currentStep.value = l : null),
2333
+ "onUpdate:modelValue": r[3] || (r[3] = (o) => isRef(currentStep) ? currentStep.value = o : null),
2128
2334
  orientation: "horizontal",
2129
2335
  class: "flex-1"
2130
2336
  }, {
2131
2337
  default: withCtx(() => [
2132
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (l, u) => (openBlock(), createBlock(i, {
2133
- key: l.name,
2338
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps, (o, u) => (openBlock(), createBlock(s, {
2339
+ key: o.name,
2134
2340
  title: unref(sheetTitle),
2135
- description: unref(getLocaleText)(l.name_locale, l.name),
2341
+ description: unref(getLocaleText)(o.name_locale, o.name),
2136
2342
  value: u + 1,
2137
2343
  error: () => stepErrors(u).length > 0,
2138
2344
  complete: () => u + 1 <= unref(currentStep) && stepErrors(unref(currentStep) - 1).length == 0
@@ -2140,10 +2346,10 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2140
2346
  ]),
2141
2347
  _: 1
2142
2348
  }, 8, ["modelValue"]),
2143
- createVNode(o, {
2349
+ createVNode(l, {
2144
2350
  icon: "info",
2145
2351
  variant: "tertiary",
2146
- onClick: m[4] || (m[4] = () => showSummaryDialog())
2352
+ onClick: r[4] || (r[4] = () => showSummaryDialog())
2147
2353
  })
2148
2354
  ]),
2149
2355
  createElementVNode("div", _hoisted_5, [
@@ -2152,22 +2358,22 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2152
2358
  json: {
2153
2359
  data: unref(data),
2154
2360
  errors: unref(errors).map(
2155
- (l) => `${l.path.join(".")} - ${l.message}`
2361
+ (o) => `${o.path.join(".")} - ${o.message}`
2156
2362
  ),
2157
2363
  stepErrors: stepErrors().map(
2158
- (l) => `${l.path.join(".")} - ${l.message}`
2364
+ (o) => `${o.path.join(".")} - ${o.message}`
2159
2365
  ),
2160
2366
  schema: unref(schema)
2161
2367
  }
2162
2368
  }, null, 8, ["json"]),
2163
2369
  (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(template).steps[unref(currentStep) - 1].groups.filter(
2164
- (l) => l.fields.length && (!l.condition || (Array.isArray(l.condition) ? l.condition.every((u) => unref(_).get(unref(data), u.property) == u.value == (u.not != !0)) : unref(_).get(unref(data), l.condition.property) == l.condition.value == (l.condition.not != !0)))
2165
- ), (l, u) => (openBlock(), createElementBlock("div", {
2370
+ (o) => o.fields.length && (!o.condition || (Array.isArray(o.condition) ? o.condition.every((u) => unref(_).get(unref(data), u.property) == u.value == (u.not != !0)) : unref(_).get(unref(data), o.condition.property) == o.condition.value == (o.condition.not != !0)))
2371
+ ), (o, u) => (openBlock(), createElementBlock("div", {
2166
2372
  key: u,
2167
2373
  class: "space-y-24"
2168
2374
  }, [
2169
- createElementVNode("div", _hoisted_7, toDisplayString(unref(getLocaleText)(l.name_locale, l.name ?? "")), 1),
2170
- (openBlock(!0), createElementBlock(Fragment, null, renderList(l.fields, (a, f) => (openBlock(), createElementBlock("div", { key: f }, [
2375
+ createElementVNode("div", _hoisted_7, toDisplayString(unref(getLocaleText)(o.name_locale, o.name ?? "")), 1),
2376
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(o.fields, (a, f) => (openBlock(), createElementBlock("div", { key: f }, [
2171
2377
  (openBlock(), createBlock(_sfc_main$2, {
2172
2378
  key: f,
2173
2379
  field: a,
@@ -2176,8 +2382,8 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2176
2382
  "campaign-type": unref(campaignType),
2177
2383
  "onUpdate:modelValue": (y) => onUpdateProperty(a.property, y),
2178
2384
  "onUpdate:file": async (y, v) => {
2179
- const C = await onUpdateFile(y, v);
2180
- onUpdateProperty(a.property, C || "");
2385
+ const x = await onUpdateFile(y, v);
2386
+ onUpdateProperty(a.property, x || "");
2181
2387
  },
2182
2388
  schema: unref(ZodHelper).typeAtPath(
2183
2389
  unref(schema),
@@ -2191,16 +2397,16 @@ const _hoisted_1$2 = { key: 26 }, _sfc_main$2 = /* @__PURE__ */ defineComponent(
2191
2397
  ]))), 128))
2192
2398
  ]))), 128)),
2193
2399
  createElementVNode("div", _hoisted_8, [
2194
- createVNode(o, {
2400
+ createVNode(l, {
2195
2401
  label: unref(t)("connect.common.back"),
2196
2402
  variant: "tertiary",
2197
2403
  disabled: unref(currentStep) == 1,
2198
- onClick: m[5] || (m[5] = (l) => currentStep.value--)
2404
+ onClick: r[5] || (r[5] = (o) => currentStep.value--)
2199
2405
  }, null, 8, ["label", "disabled"]),
2200
- createVNode(o, {
2406
+ createVNode(l, {
2201
2407
  disabled: unref(currentStep) - 1 < unref(template).steps.length - 1 ? stepErrors().length > 0 : unref(errors).length > 0,
2202
2408
  label: unref(currentStep) - 1 < unref(template).steps.length - 1 ? unref(t)("connect.common.next") : unref(t)("connect.common.submit"),
2203
- onClick: m[6] || (m[6] = (l) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
2409
+ onClick: r[6] || (r[6] = (o) => unref(currentStep) - 1 < unref(template).steps.length - 1 ? currentStep.value++ : onSubmit())
2204
2410
  }, null, 8, ["disabled", "label"])
2205
2411
  ])
2206
2412
  ]),