@feedmepos/mf-connect 0.1.115-prod → 0.1.117-dev

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 (153) hide show
  1. package/README.md +64 -1
  2. package/dist/{App-CvtSY8ZO.js → App-BpcsgH7K.js} +444 -427
  3. package/dist/AuditLogs-BNnUiVnD.js +2016 -0
  4. package/dist/{Bin-B3gS9QVZ.js → Bin-Cm0wjQeR.js} +8 -8
  5. package/dist/{Broadcast-DAeb-HaN.js → Broadcast-BoJaHqnO.js} +22 -21
  6. package/dist/{CampaignAnalytic-BfTaHVem.js → CampaignAnalytic-Eg4xZW0B.js} +7 -7
  7. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js} +9 -9
  8. package/dist/{Card-JFeVIwFs.js → Card-BfkMcFaG.js} +25 -24
  9. package/dist/{Collections-xcDpEhIm.js → Collections-RXmxQbII.js} +197 -185
  10. package/dist/{Credit-C9HJZjDS.js → Credit-CsRPM1jv.js} +21 -20
  11. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js → DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js} +1 -1
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +4442 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js → EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js} +32 -32
  14. package/dist/{Experience-DszS8gto.js → Experience-BC8Pj-v9.js} +32 -31
  15. package/dist/{FileSaver.min-CFVQKaC-.js → FileSaver.min-DzmoQFA0.js} +1 -1
  16. package/dist/{Game-DhgeN7E2.js → Game-DJXNHFBs.js} +19 -18
  17. package/dist/{GiftCardSetup-CWm6IhrS.js → GiftCardSetup-_0n8lU-t.js} +75 -75
  18. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js} +7 -7
  19. package/dist/{Goals-DtRVierH.js → Goals-DSZwKpds.js} +4 -4
  20. package/dist/Grab-DDc7e-AC.js +301 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js → ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js} +1 -1
  22. package/dist/{Index-DFRcu_qE.js → Index-Cbi0bquE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js → LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js} +1 -1
  25. package/dist/{LoyaltyDashboard-BWHKDPzk.js → LoyaltyDashboard-fK90c27A.js} +15 -15
  26. package/dist/MainLayout-Bf-l9yL4.js +4 -0
  27. package/dist/{MainLayout-BmpNNAiE.js → MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js} +5 -4
  28. package/dist/Marketing-B7cZGsO-.js +269 -0
  29. package/dist/MarketingMaterialEdit-5IcV2ct6.js +1037 -0
  30. package/dist/{Member-xEzrBW_p.js → Member-BGTrRVdq.js} +7 -7
  31. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js} +43 -50
  32. package/dist/{MemberImportHistory-CEQpBBF8.js → MemberImportHistory--FxkTJmu.js} +7 -7
  33. package/dist/{MemberList-CCvzkHv8.js → MemberList-EjY5dgwt.js} +103 -105
  34. package/dist/{MemberTransactions-Bmh39J2W.js → MemberTransactions-Oia7LIFK.js} +1 -1
  35. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js → MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js} +14 -14
  36. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js} +1 -1
  37. package/dist/{Mission-CpUo2Bgw.js → Mission-BFHYb4aT.js} +22 -21
  38. package/dist/{Overview-DcDZmDXA.js → Overview-BVNyQxFL.js} +23 -22
  39. package/dist/{Overview-CwQqQ1Tn.js → Overview-d5U37aot.js} +145 -144
  40. package/dist/{Point-CUNQsQIx.js → Point-CXkqH02Z.js} +22 -21
  41. package/dist/{Promotion-Cqdim7aW.js → Promotion-DdxNvlOO.js} +137 -131
  42. package/dist/{Queue-CNBVh1UG.js → Queue-C96oNKyP.js} +46 -45
  43. package/dist/{Record-BYwz4l4o.js → Record-Bj2e2Y4i.js} +9 -9
  44. package/dist/{Review-CqLcZFj8.js → Review-CJK5S1oI.js} +2 -2
  45. package/dist/ReviewFacebookCallback-ChG7TRy5.js +225 -0
  46. package/dist/{ReviewGoogleCallback-Dg8R7QlO.js → ReviewGoogleCallback-Dmk4VyGA.js} +5 -5
  47. package/dist/{Reward-M8GZ8eHq.js → Reward-Dh2YI0Xb.js} +29 -29
  48. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js → RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js} +16 -15
  49. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +1923 -0
  50. package/dist/{Segment-CrMi6xrp.js → Segment-FYvtCkqH.js} +304 -305
  51. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js} +31 -30
  52. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js} +4 -4
  53. package/dist/Setting-CUAWjCqa.js +574 -0
  54. package/dist/{SettingAdvertisements-Dh7v4c1D.js → SettingAdvertisements-COIQwUD6.js} +12 -12
  55. package/dist/Settings-D2gFPvmW.js +286 -0
  56. package/dist/{Store-CV-BmK5b.js → Store-BAXwiyvx.js} +31 -30
  57. package/dist/{StoreRewards-DPhSLvSZ.js → StoreRewards-2mUavtUg.js} +15 -15
  58. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +1319 -0
  59. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +7007 -0
  60. package/dist/{Tier-ChvYps23.js → Tier-BmAOzRHL.js} +2576 -687
  61. package/dist/{Title-v-Ivswr1.js → Title-DMxiUg30.js} +94 -92
  62. package/dist/{Transaction-CRqE1Ix0.js → Transaction-CF6hXEpN.js} +2 -2
  63. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js} +26 -26
  64. package/dist/{Voucher-Bg8FOuzD.js → Voucher-DrtITxq-.js} +19 -19
  65. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js} +16 -16
  66. package/dist/WhatsappAccount-Bb0Y7ikk.js +159 -0
  67. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js +39 -0
  68. package/dist/WhatsappBot-DNvvaPey.js +876 -0
  69. package/dist/WhatsappBotLogs-C8M-1pvv.js +372 -0
  70. package/dist/WhatsappBotSettings-D6egqUyU.js +705 -0
  71. package/dist/WhatsappLayout-DeQTPuF6.js +21 -0
  72. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +253 -0
  73. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js → ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js} +2 -2
  74. package/dist/{app-DdNKsn2Q.js → app-BjdLqYQq.js} +8879 -7107
  75. package/dist/app.js +4 -3
  76. package/dist/{base.export-R97FrSQL.js → base.export-B68z5BF6.js} +2 -2
  77. package/dist/browser-BSAOEeIM.js +1478 -0
  78. package/dist/{business-Ce8vq3wQ.js → business-D9fgkHxb.js} +1 -1
  79. package/dist/{campaign-C19If7bW.js → campaign-Dw_ujovr.js} +121 -94
  80. package/dist/{campaign-BTllt2LH.js → campaign-eMaPX8r6.js} +31 -25
  81. package/dist/{campaign.enum-9CCbalR4.js → campaign.enum-Dx-Zo68Q.js} +3 -2
  82. package/dist/{campaign.fn-B4g03h0A.js → campaign.fn-DFjGNvmN.js} +78 -78
  83. package/dist/{collectible.enum-MvqF7mSg.js → collectible.enum-Liy2wH3s.js} +1 -1
  84. package/dist/{collection.fn-CR0bD33S.js → collection.fn-CCOWtB-c.js} +2 -2
  85. package/dist/{currency-DmlguGIM.js → currency-CTLKReFC.js} +1 -1
  86. package/dist/duplicateCampaign-BcpBfUGL.js +51 -0
  87. package/dist/{effect-Dx3zfl28.js → effect-CTI1ZH57.js} +1 -1
  88. package/dist/{email-addresses-De5PGOY4.js → email-addresses-B74e3bnB.js} +2 -2
  89. package/dist/{feature-flag-CD9V1V0h.js → feature-flag-DVdEaChJ.js} +182 -166
  90. package/dist/google-BQK68wbe.js +5 -0
  91. package/dist/{helper-CEiv7SaO.js → helper-as9K-piK.js} +1 -1
  92. package/dist/{index-CBJy9bxB.js → index-3LjKJhQa.js} +1 -1
  93. package/dist/{index-BW6eb3n6.js → index-8mBfDn3M.js} +611 -252
  94. package/dist/{index-D4d3l0gw.js → index-B0h0iYWP.js} +8 -7
  95. package/dist/{index-BAXKd9Gg.js → index-BEKMTiFb.js} +198 -198
  96. package/dist/{index-B8yWVB8P.js → index-BW7FoVEA.js} +4 -3
  97. package/dist/{index-BVdYxi3l.js → index-B_wRpO02.js} +29 -15
  98. package/dist/{index-B8meeQoD.js → index-Ba719MYq.js} +1 -1
  99. package/dist/{index-BDPnyro2.js → index-BbVbqe4Y.js} +19 -6
  100. package/dist/{index-CqOCJTeR.js → index-BhTrG89b.js} +390 -232
  101. package/dist/index-C-iwb2Ln.js +109 -0
  102. package/dist/{index-CPODug8b.js → index-C5V6u2Qd.js} +2700 -2613
  103. package/dist/{index-CWUrODxL.js → index-CHU3UePP.js} +1 -1
  104. package/dist/{index-IZRfmmde.js → index-CQxkDpX0.js} +683 -581
  105. package/dist/{index-DT3S00_Y.js → index-CWLOcQ6j.js} +11 -10
  106. package/dist/index-C_H8jFYf.js +2743 -0
  107. package/dist/{index-__UT3_Ey.js → index-Ckz6u3ac.js} +2 -2
  108. package/dist/{index-BYI9ttxy.js → index-Czg-2Ni0.js} +8028 -10767
  109. package/dist/{index-xct3mnu8.js → index-DKI8401o.js} +7 -7
  110. package/dist/{index-649OZ_e1.js → index-DcZiikOH.js} +2 -2
  111. package/dist/{index-BquSqx6K.js → index-QHqcSN2q.js} +4 -4
  112. package/dist/{index-BR9h5DTI.js → index-TAoQpeLQ.js} +1 -1
  113. package/dist/index-wsCCqwdr.js +74 -0
  114. package/dist/{index.esm2017-AVbZ9btd.js → index.esm2017-DL6rTGDW.js} +177 -177
  115. package/dist/{loading-BvHm1m3K.js → loading-x6IScY4K.js} +1 -1
  116. package/dist/{lodash-Dvrceo7x.js → lodash-nwnDizYo.js} +1 -1
  117. package/dist/{member-import-c9avpiSS.js → member-import-C-b01Tyd.js} +6 -5
  118. package/dist/{membership-D-pZS634.js → membership-DfarOMtO.js} +3 -3
  119. package/dist/{money-D4skwMkD.js → money-CFn-jR4W.js} +1 -1
  120. package/dist/{number-DJ6ncfT6.js → number-CSlyDL2x.js} +1 -1
  121. package/dist/objectid-zcT6ESET.js +145 -0
  122. package/dist/{onboarding-t7R1d3h-.js → onboarding-DyaFaaF2.js} +25 -25
  123. package/dist/{onboardingSetup-lTaJc0oT.js → onboardingSetup-DQt91O9f.js} +2 -2
  124. package/dist/{plugins-DQNOWwRC.js → plugins-DEHr0UOe.js} +3 -3
  125. package/dist/{MarketingMaterialEdit-x3c_N7Gs.js → remy-icon-BhUGu2NI.js} +2 -1031
  126. package/dist/{reward-BK150pjm.js → reward-Du_Pv-4p.js} +1 -1
  127. package/dist/{rule-COcdAnUu.js → rule-DfqmQTVK.js} +572 -492
  128. package/dist/style.css +1 -1
  129. package/dist/template-CcbNF4PF.js +188 -0
  130. package/dist/{timezone-BP6UC4KL.js → timezone-_4tabIaK.js} +1 -1
  131. package/dist/{transaction.fn-BY0hzon0.js → transaction.fn-C46PHwCV.js} +2 -2
  132. package/dist/{trigger-DVBjVPbN.js → trigger-Dipr6btC.js} +8 -8
  133. package/dist/useMarketingMaterialActions-BAw2ZjeF.js +125 -0
  134. package/dist/{usePagination-QT552XyF.js → usePagination-D6RZ18zS.js} +1 -1
  135. package/dist/{user-CmAxNc7T.js → user-BCexQj3Q.js} +1 -1
  136. package/dist/vue-i18n-DXvyTCZf.js +2365 -0
  137. package/dist/{xlsx-DAczoc8y.js → xlsx-BTxt_Jg6.js} +224 -224
  138. package/dist/{zod-Aj-GuVQL.js → zod-T4wMYjWT.js} +1 -1
  139. package/package.json +6 -2
  140. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +0 -3494
  141. package/dist/Marketing-BKK45Eve.js +0 -236
  142. package/dist/ReviewFacebookCallback-DbSCILNN.js +0 -238
  143. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +0 -1883
  144. package/dist/Setting-BnFRI0Se.js +0 -2037
  145. package/dist/Settings-BvT8_tkQ.js +0 -179
  146. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +0 -1264
  147. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +0 -142
  148. package/dist/google-C3S8u0mT.js +0 -4
  149. package/dist/objectid-DEMM_jdR.js +0 -145
  150. package/dist/rule-builder-Deufb6h_.js +0 -102
  151. package/dist/template-DeebIqJ_.js +0 -236
  152. package/dist/useMarketingMaterialActions-DpQCQHFI.js +0 -96
  153. package/dist/vue-i18n-Cze706-f.js +0 -2365
@@ -1,2037 +0,0 @@
1
- import { defineComponent as Fe, ref as $, computed as j, onMounted as Ze, resolveComponent as N, openBlock as U, createBlock as te, withCtx as H, createElementVNode as p, createVNode as P, unref as c, isRef as Pe, watch as At, createElementBlock as x, toDisplayString as B, Fragment as Z, renderList as Me, createTextVNode as W, createCommentVNode as ye } from "vue";
2
- import { h as Bt } from "./moment-D7p2TMB-.js";
3
- import { Z as qe } from "./zod-Aj-GuVQL.js";
4
- import { useDialog as et } from "@feedmepos/ui-library";
5
- import { u as Pt } from "./loading-BvHm1m3K.js";
6
- import { u as Mt } from "./app-wDQR6dpb.js";
7
- import { u as Se, l as tt } from "./business-Ce8vq3wQ.js";
8
- import { u as nt } from "./membership-D-pZS634.js";
9
- import { P as we } from "./index-BYI9ttxy.js";
10
- import { m as St, b as It } from "./index-CqOCJTeR.js";
11
- import { _ as Tt } from "./ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js";
12
- import { c as ot, p as Nt, f as re } from "./plugins-DQNOWwRC.js";
13
- import { p as Ut, r as Ft, _ as Lt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js";
14
- import { u as st } from "./vue-i18n-Cze706-f.js";
15
- import { M as kt, a as Rt } from "./MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js";
16
- import { useCoreStore as Dt } from "@feedmepos/mf-common";
17
- import { useRouter as Vt } from "vue-router";
18
- import { R as xt } from "./app-DdNKsn2Q.js";
19
- import { m as be } from "./index-BDPnyro2.js";
20
- import { S as Ge } from "./index-xct3mnu8.js";
21
- import { o as $t } from "./objectId-dwaoBfJX.js";
22
- import { a as zt } from "./object-BYyQ0PZp.js";
23
- var oe = {}, Ht = function() {
24
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
25
- }, it = {}, k = {};
26
- let Le;
27
- const Kt = [
28
- 0,
29
- // Not used
30
- 26,
31
- 44,
32
- 70,
33
- 100,
34
- 134,
35
- 172,
36
- 196,
37
- 242,
38
- 292,
39
- 346,
40
- 404,
41
- 466,
42
- 532,
43
- 581,
44
- 655,
45
- 733,
46
- 815,
47
- 901,
48
- 991,
49
- 1085,
50
- 1156,
51
- 1258,
52
- 1364,
53
- 1474,
54
- 1588,
55
- 1706,
56
- 1828,
57
- 1921,
58
- 2051,
59
- 2185,
60
- 2323,
61
- 2465,
62
- 2611,
63
- 2761,
64
- 2876,
65
- 3034,
66
- 3196,
67
- 3362,
68
- 3532,
69
- 3706
70
- ];
71
- k.getSymbolSize = function(e) {
72
- if (!e) throw new Error('"version" cannot be null or undefined');
73
- if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
74
- return e * 4 + 17;
75
- };
76
- k.getSymbolTotalCodewords = function(e) {
77
- return Kt[e];
78
- };
79
- k.getBCHDigit = function(t) {
80
- let e = 0;
81
- for (; t !== 0; )
82
- e++, t >>>= 1;
83
- return e;
84
- };
85
- k.setToSJISFunction = function(e) {
86
- if (typeof e != "function")
87
- throw new Error('"toSJISFunc" is not a valid function.');
88
- Le = e;
89
- };
90
- k.isKanjiModeEnabled = function() {
91
- return typeof Le < "u";
92
- };
93
- k.toSJIS = function(e) {
94
- return Le(e);
95
- };
96
- var de = {};
97
- (function(t) {
98
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
99
- function e(i) {
100
- if (typeof i != "string")
101
- throw new Error("Param is not a string");
102
- switch (i.toLowerCase()) {
103
- case "l":
104
- case "low":
105
- return t.L;
106
- case "m":
107
- case "medium":
108
- return t.M;
109
- case "q":
110
- case "quartile":
111
- return t.Q;
112
- case "h":
113
- case "high":
114
- return t.H;
115
- default:
116
- throw new Error("Unknown EC Level: " + i);
117
- }
118
- }
119
- t.isValid = function(s) {
120
- return s && typeof s.bit < "u" && s.bit >= 0 && s.bit < 4;
121
- }, t.from = function(s, o) {
122
- if (t.isValid(s))
123
- return s;
124
- try {
125
- return e(s);
126
- } catch {
127
- return o;
128
- }
129
- };
130
- })(de);
131
- function rt() {
132
- this.buffer = [], this.length = 0;
133
- }
134
- rt.prototype = {
135
- get: function(t) {
136
- const e = Math.floor(t / 8);
137
- return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
138
- },
139
- put: function(t, e) {
140
- for (let i = 0; i < e; i++)
141
- this.putBit((t >>> e - i - 1 & 1) === 1);
142
- },
143
- getLengthInBits: function() {
144
- return this.length;
145
- },
146
- putBit: function(t) {
147
- const e = Math.floor(this.length / 8);
148
- this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
149
- }
150
- };
151
- var Ot = rt;
152
- function se(t) {
153
- if (!t || t < 1)
154
- throw new Error("BitMatrix size must be defined and greater than 0");
155
- this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
156
- }
157
- se.prototype.set = function(t, e, i, s) {
158
- const o = t * this.size + e;
159
- this.data[o] = i, s && (this.reservedBit[o] = !0);
160
- };
161
- se.prototype.get = function(t, e) {
162
- return this.data[t * this.size + e];
163
- };
164
- se.prototype.xor = function(t, e, i) {
165
- this.data[t * this.size + e] ^= i;
166
- };
167
- se.prototype.isReserved = function(t, e) {
168
- return this.reservedBit[t * this.size + e];
169
- };
170
- var Yt = se, lt = {};
171
- (function(t) {
172
- const e = k.getSymbolSize;
173
- t.getRowColCoords = function(s) {
174
- if (s === 1) return [];
175
- const o = Math.floor(s / 7) + 2, n = e(s), r = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, l = [n - 7];
176
- for (let a = 1; a < o - 1; a++)
177
- l[a] = l[a - 1] - r;
178
- return l.push(6), l.reverse();
179
- }, t.getPositions = function(s) {
180
- const o = [], n = t.getRowColCoords(s), r = n.length;
181
- for (let l = 0; l < r; l++)
182
- for (let a = 0; a < r; a++)
183
- l === 0 && a === 0 || // top-left
184
- l === 0 && a === r - 1 || // bottom-left
185
- l === r - 1 && a === 0 || o.push([n[l], n[a]]);
186
- return o;
187
- };
188
- })(lt);
189
- var at = {};
190
- const Jt = k.getSymbolSize, Qe = 7;
191
- at.getPositions = function(e) {
192
- const i = Jt(e);
193
- return [
194
- // top-left
195
- [0, 0],
196
- // top-right
197
- [i - Qe, 0],
198
- // bottom-left
199
- [0, i - Qe]
200
- ];
201
- };
202
- var ct = {};
203
- (function(t) {
204
- t.Patterns = {
205
- PATTERN000: 0,
206
- PATTERN001: 1,
207
- PATTERN010: 2,
208
- PATTERN011: 3,
209
- PATTERN100: 4,
210
- PATTERN101: 5,
211
- PATTERN110: 6,
212
- PATTERN111: 7
213
- };
214
- const e = {
215
- N1: 3,
216
- N2: 3,
217
- N3: 40,
218
- N4: 10
219
- };
220
- t.isValid = function(o) {
221
- return o != null && o !== "" && !isNaN(o) && o >= 0 && o <= 7;
222
- }, t.from = function(o) {
223
- return t.isValid(o) ? parseInt(o, 10) : void 0;
224
- }, t.getPenaltyN1 = function(o) {
225
- const n = o.size;
226
- let r = 0, l = 0, a = 0, u = null, g = null;
227
- for (let A = 0; A < n; A++) {
228
- l = a = 0, u = g = null;
229
- for (let m = 0; m < n; m++) {
230
- let f = o.get(A, m);
231
- f === u ? l++ : (l >= 5 && (r += e.N1 + (l - 5)), u = f, l = 1), f = o.get(m, A), f === g ? a++ : (a >= 5 && (r += e.N1 + (a - 5)), g = f, a = 1);
232
- }
233
- l >= 5 && (r += e.N1 + (l - 5)), a >= 5 && (r += e.N1 + (a - 5));
234
- }
235
- return r;
236
- }, t.getPenaltyN2 = function(o) {
237
- const n = o.size;
238
- let r = 0;
239
- for (let l = 0; l < n - 1; l++)
240
- for (let a = 0; a < n - 1; a++) {
241
- const u = o.get(l, a) + o.get(l, a + 1) + o.get(l + 1, a) + o.get(l + 1, a + 1);
242
- (u === 4 || u === 0) && r++;
243
- }
244
- return r * e.N2;
245
- }, t.getPenaltyN3 = function(o) {
246
- const n = o.size;
247
- let r = 0, l = 0, a = 0;
248
- for (let u = 0; u < n; u++) {
249
- l = a = 0;
250
- for (let g = 0; g < n; g++)
251
- l = l << 1 & 2047 | o.get(u, g), g >= 10 && (l === 1488 || l === 93) && r++, a = a << 1 & 2047 | o.get(g, u), g >= 10 && (a === 1488 || a === 93) && r++;
252
- }
253
- return r * e.N3;
254
- }, t.getPenaltyN4 = function(o) {
255
- let n = 0;
256
- const r = o.data.length;
257
- for (let a = 0; a < r; a++) n += o.data[a];
258
- return Math.abs(Math.ceil(n * 100 / r / 5) - 10) * e.N4;
259
- };
260
- function i(s, o, n) {
261
- switch (s) {
262
- case t.Patterns.PATTERN000:
263
- return (o + n) % 2 === 0;
264
- case t.Patterns.PATTERN001:
265
- return o % 2 === 0;
266
- case t.Patterns.PATTERN010:
267
- return n % 3 === 0;
268
- case t.Patterns.PATTERN011:
269
- return (o + n) % 3 === 0;
270
- case t.Patterns.PATTERN100:
271
- return (Math.floor(o / 2) + Math.floor(n / 3)) % 2 === 0;
272
- case t.Patterns.PATTERN101:
273
- return o * n % 2 + o * n % 3 === 0;
274
- case t.Patterns.PATTERN110:
275
- return (o * n % 2 + o * n % 3) % 2 === 0;
276
- case t.Patterns.PATTERN111:
277
- return (o * n % 3 + (o + n) % 2) % 2 === 0;
278
- default:
279
- throw new Error("bad maskPattern:" + s);
280
- }
281
- }
282
- t.applyMask = function(o, n) {
283
- const r = n.size;
284
- for (let l = 0; l < r; l++)
285
- for (let a = 0; a < r; a++)
286
- n.isReserved(a, l) || n.xor(a, l, i(o, a, l));
287
- }, t.getBestMask = function(o, n) {
288
- const r = Object.keys(t.Patterns).length;
289
- let l = 0, a = 1 / 0;
290
- for (let u = 0; u < r; u++) {
291
- n(u), t.applyMask(u, o);
292
- const g = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
293
- t.applyMask(u, o), g < a && (a = g, l = u);
294
- }
295
- return l;
296
- };
297
- })(ct);
298
- var fe = {};
299
- const Y = de, le = [
300
- // L M Q H
301
- 1,
302
- 1,
303
- 1,
304
- 1,
305
- 1,
306
- 1,
307
- 1,
308
- 1,
309
- 1,
310
- 1,
311
- 2,
312
- 2,
313
- 1,
314
- 2,
315
- 2,
316
- 4,
317
- 1,
318
- 2,
319
- 4,
320
- 4,
321
- 2,
322
- 4,
323
- 4,
324
- 4,
325
- 2,
326
- 4,
327
- 6,
328
- 5,
329
- 2,
330
- 4,
331
- 6,
332
- 6,
333
- 2,
334
- 5,
335
- 8,
336
- 8,
337
- 4,
338
- 5,
339
- 8,
340
- 8,
341
- 4,
342
- 5,
343
- 8,
344
- 11,
345
- 4,
346
- 8,
347
- 10,
348
- 11,
349
- 4,
350
- 9,
351
- 12,
352
- 16,
353
- 4,
354
- 9,
355
- 16,
356
- 16,
357
- 6,
358
- 10,
359
- 12,
360
- 18,
361
- 6,
362
- 10,
363
- 17,
364
- 16,
365
- 6,
366
- 11,
367
- 16,
368
- 19,
369
- 6,
370
- 13,
371
- 18,
372
- 21,
373
- 7,
374
- 14,
375
- 21,
376
- 25,
377
- 8,
378
- 16,
379
- 20,
380
- 25,
381
- 8,
382
- 17,
383
- 23,
384
- 25,
385
- 9,
386
- 17,
387
- 23,
388
- 34,
389
- 9,
390
- 18,
391
- 25,
392
- 30,
393
- 10,
394
- 20,
395
- 27,
396
- 32,
397
- 12,
398
- 21,
399
- 29,
400
- 35,
401
- 12,
402
- 23,
403
- 34,
404
- 37,
405
- 12,
406
- 25,
407
- 34,
408
- 40,
409
- 13,
410
- 26,
411
- 35,
412
- 42,
413
- 14,
414
- 28,
415
- 38,
416
- 45,
417
- 15,
418
- 29,
419
- 40,
420
- 48,
421
- 16,
422
- 31,
423
- 43,
424
- 51,
425
- 17,
426
- 33,
427
- 45,
428
- 54,
429
- 18,
430
- 35,
431
- 48,
432
- 57,
433
- 19,
434
- 37,
435
- 51,
436
- 60,
437
- 19,
438
- 38,
439
- 53,
440
- 63,
441
- 20,
442
- 40,
443
- 56,
444
- 66,
445
- 21,
446
- 43,
447
- 59,
448
- 70,
449
- 22,
450
- 45,
451
- 62,
452
- 74,
453
- 24,
454
- 47,
455
- 65,
456
- 77,
457
- 25,
458
- 49,
459
- 68,
460
- 81
461
- ], ae = [
462
- // L M Q H
463
- 7,
464
- 10,
465
- 13,
466
- 17,
467
- 10,
468
- 16,
469
- 22,
470
- 28,
471
- 15,
472
- 26,
473
- 36,
474
- 44,
475
- 20,
476
- 36,
477
- 52,
478
- 64,
479
- 26,
480
- 48,
481
- 72,
482
- 88,
483
- 36,
484
- 64,
485
- 96,
486
- 112,
487
- 40,
488
- 72,
489
- 108,
490
- 130,
491
- 48,
492
- 88,
493
- 132,
494
- 156,
495
- 60,
496
- 110,
497
- 160,
498
- 192,
499
- 72,
500
- 130,
501
- 192,
502
- 224,
503
- 80,
504
- 150,
505
- 224,
506
- 264,
507
- 96,
508
- 176,
509
- 260,
510
- 308,
511
- 104,
512
- 198,
513
- 288,
514
- 352,
515
- 120,
516
- 216,
517
- 320,
518
- 384,
519
- 132,
520
- 240,
521
- 360,
522
- 432,
523
- 144,
524
- 280,
525
- 408,
526
- 480,
527
- 168,
528
- 308,
529
- 448,
530
- 532,
531
- 180,
532
- 338,
533
- 504,
534
- 588,
535
- 196,
536
- 364,
537
- 546,
538
- 650,
539
- 224,
540
- 416,
541
- 600,
542
- 700,
543
- 224,
544
- 442,
545
- 644,
546
- 750,
547
- 252,
548
- 476,
549
- 690,
550
- 816,
551
- 270,
552
- 504,
553
- 750,
554
- 900,
555
- 300,
556
- 560,
557
- 810,
558
- 960,
559
- 312,
560
- 588,
561
- 870,
562
- 1050,
563
- 336,
564
- 644,
565
- 952,
566
- 1110,
567
- 360,
568
- 700,
569
- 1020,
570
- 1200,
571
- 390,
572
- 728,
573
- 1050,
574
- 1260,
575
- 420,
576
- 784,
577
- 1140,
578
- 1350,
579
- 450,
580
- 812,
581
- 1200,
582
- 1440,
583
- 480,
584
- 868,
585
- 1290,
586
- 1530,
587
- 510,
588
- 924,
589
- 1350,
590
- 1620,
591
- 540,
592
- 980,
593
- 1440,
594
- 1710,
595
- 570,
596
- 1036,
597
- 1530,
598
- 1800,
599
- 570,
600
- 1064,
601
- 1590,
602
- 1890,
603
- 600,
604
- 1120,
605
- 1680,
606
- 1980,
607
- 630,
608
- 1204,
609
- 1770,
610
- 2100,
611
- 660,
612
- 1260,
613
- 1860,
614
- 2220,
615
- 720,
616
- 1316,
617
- 1950,
618
- 2310,
619
- 750,
620
- 1372,
621
- 2040,
622
- 2430
623
- ];
624
- fe.getBlocksCount = function(e, i) {
625
- switch (i) {
626
- case Y.L:
627
- return le[(e - 1) * 4 + 0];
628
- case Y.M:
629
- return le[(e - 1) * 4 + 1];
630
- case Y.Q:
631
- return le[(e - 1) * 4 + 2];
632
- case Y.H:
633
- return le[(e - 1) * 4 + 3];
634
- default:
635
- return;
636
- }
637
- };
638
- fe.getTotalCodewordsCount = function(e, i) {
639
- switch (i) {
640
- case Y.L:
641
- return ae[(e - 1) * 4 + 0];
642
- case Y.M:
643
- return ae[(e - 1) * 4 + 1];
644
- case Y.Q:
645
- return ae[(e - 1) * 4 + 2];
646
- case Y.H:
647
- return ae[(e - 1) * 4 + 3];
648
- default:
649
- return;
650
- }
651
- };
652
- var ut = {}, me = {};
653
- const ee = new Uint8Array(512), ce = new Uint8Array(256);
654
- (function() {
655
- let e = 1;
656
- for (let i = 0; i < 255; i++)
657
- ee[i] = e, ce[e] = i, e <<= 1, e & 256 && (e ^= 285);
658
- for (let i = 255; i < 512; i++)
659
- ee[i] = ee[i - 255];
660
- })();
661
- me.log = function(e) {
662
- if (e < 1) throw new Error("log(" + e + ")");
663
- return ce[e];
664
- };
665
- me.exp = function(e) {
666
- return ee[e];
667
- };
668
- me.mul = function(e, i) {
669
- return e === 0 || i === 0 ? 0 : ee[ce[e] + ce[i]];
670
- };
671
- (function(t) {
672
- const e = me;
673
- t.mul = function(s, o) {
674
- const n = new Uint8Array(s.length + o.length - 1);
675
- for (let r = 0; r < s.length; r++)
676
- for (let l = 0; l < o.length; l++)
677
- n[r + l] ^= e.mul(s[r], o[l]);
678
- return n;
679
- }, t.mod = function(s, o) {
680
- let n = new Uint8Array(s);
681
- for (; n.length - o.length >= 0; ) {
682
- const r = n[0];
683
- for (let a = 0; a < o.length; a++)
684
- n[a] ^= e.mul(o[a], r);
685
- let l = 0;
686
- for (; l < n.length && n[l] === 0; ) l++;
687
- n = n.slice(l);
688
- }
689
- return n;
690
- }, t.generateECPolynomial = function(s) {
691
- let o = new Uint8Array([1]);
692
- for (let n = 0; n < s; n++)
693
- o = t.mul(o, new Uint8Array([1, e.exp(n)]));
694
- return o;
695
- };
696
- })(ut);
697
- const dt = ut;
698
- function ke(t) {
699
- this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
700
- }
701
- ke.prototype.initialize = function(e) {
702
- this.degree = e, this.genPoly = dt.generateECPolynomial(this.degree);
703
- };
704
- ke.prototype.encode = function(e) {
705
- if (!this.genPoly)
706
- throw new Error("Encoder not initialized");
707
- const i = new Uint8Array(e.length + this.degree);
708
- i.set(e);
709
- const s = dt.mod(i, this.genPoly), o = this.degree - s.length;
710
- if (o > 0) {
711
- const n = new Uint8Array(this.degree);
712
- return n.set(s, o), n;
713
- }
714
- return s;
715
- };
716
- var jt = ke, ft = {}, J = {}, Re = {};
717
- Re.isValid = function(e) {
718
- return !isNaN(e) && e >= 1 && e <= 40;
719
- };
720
- var z = {};
721
- const mt = "[0-9]+", qt = "[A-Z $%*+\\-./:]+";
722
- let ne = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
723
- ne = ne.replace(/u/g, "\\u");
724
- const Gt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ne + `)(?:.|[\r
725
- ]))+`;
726
- z.KANJI = new RegExp(ne, "g");
727
- z.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
728
- z.BYTE = new RegExp(Gt, "g");
729
- z.NUMERIC = new RegExp(mt, "g");
730
- z.ALPHANUMERIC = new RegExp(qt, "g");
731
- const Qt = new RegExp("^" + ne + "$"), Xt = new RegExp("^" + mt + "$"), Wt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
732
- z.testKanji = function(e) {
733
- return Qt.test(e);
734
- };
735
- z.testNumeric = function(e) {
736
- return Xt.test(e);
737
- };
738
- z.testAlphanumeric = function(e) {
739
- return Wt.test(e);
740
- };
741
- (function(t) {
742
- const e = Re, i = z;
743
- t.NUMERIC = {
744
- id: "Numeric",
745
- bit: 1,
746
- ccBits: [10, 12, 14]
747
- }, t.ALPHANUMERIC = {
748
- id: "Alphanumeric",
749
- bit: 2,
750
- ccBits: [9, 11, 13]
751
- }, t.BYTE = {
752
- id: "Byte",
753
- bit: 4,
754
- ccBits: [8, 16, 16]
755
- }, t.KANJI = {
756
- id: "Kanji",
757
- bit: 8,
758
- ccBits: [8, 10, 12]
759
- }, t.MIXED = {
760
- bit: -1
761
- }, t.getCharCountIndicator = function(n, r) {
762
- if (!n.ccBits) throw new Error("Invalid mode: " + n);
763
- if (!e.isValid(r))
764
- throw new Error("Invalid version: " + r);
765
- return r >= 1 && r < 10 ? n.ccBits[0] : r < 27 ? n.ccBits[1] : n.ccBits[2];
766
- }, t.getBestModeForData = function(n) {
767
- return i.testNumeric(n) ? t.NUMERIC : i.testAlphanumeric(n) ? t.ALPHANUMERIC : i.testKanji(n) ? t.KANJI : t.BYTE;
768
- }, t.toString = function(n) {
769
- if (n && n.id) return n.id;
770
- throw new Error("Invalid mode");
771
- }, t.isValid = function(n) {
772
- return n && n.bit && n.ccBits;
773
- };
774
- function s(o) {
775
- if (typeof o != "string")
776
- throw new Error("Param is not a string");
777
- switch (o.toLowerCase()) {
778
- case "numeric":
779
- return t.NUMERIC;
780
- case "alphanumeric":
781
- return t.ALPHANUMERIC;
782
- case "kanji":
783
- return t.KANJI;
784
- case "byte":
785
- return t.BYTE;
786
- default:
787
- throw new Error("Unknown mode: " + o);
788
- }
789
- }
790
- t.from = function(n, r) {
791
- if (t.isValid(n))
792
- return n;
793
- try {
794
- return s(n);
795
- } catch {
796
- return r;
797
- }
798
- };
799
- })(J);
800
- (function(t) {
801
- const e = k, i = fe, s = de, o = J, n = Re, r = 7973, l = e.getBCHDigit(r);
802
- function a(m, f, w) {
803
- for (let C = 1; C <= 40; C++)
804
- if (f <= t.getCapacity(C, w, m))
805
- return C;
806
- }
807
- function u(m, f) {
808
- return o.getCharCountIndicator(m, f) + 4;
809
- }
810
- function g(m, f) {
811
- let w = 0;
812
- return m.forEach(function(C) {
813
- const M = u(C.mode, f);
814
- w += M + C.getBitsLength();
815
- }), w;
816
- }
817
- function A(m, f) {
818
- for (let w = 1; w <= 40; w++)
819
- if (g(m, w) <= t.getCapacity(w, f, o.MIXED))
820
- return w;
821
- }
822
- t.from = function(f, w) {
823
- return n.isValid(f) ? parseInt(f, 10) : w;
824
- }, t.getCapacity = function(f, w, C) {
825
- if (!n.isValid(f))
826
- throw new Error("Invalid QR Code version");
827
- typeof C > "u" && (C = o.BYTE);
828
- const M = e.getSymbolTotalCodewords(f), d = i.getTotalCodewordsCount(f, w), v = (M - d) * 8;
829
- if (C === o.MIXED) return v;
830
- const h = v - u(C, f);
831
- switch (C) {
832
- case o.NUMERIC:
833
- return Math.floor(h / 10 * 3);
834
- case o.ALPHANUMERIC:
835
- return Math.floor(h / 11 * 2);
836
- case o.KANJI:
837
- return Math.floor(h / 13);
838
- case o.BYTE:
839
- default:
840
- return Math.floor(h / 8);
841
- }
842
- }, t.getBestVersionForData = function(f, w) {
843
- let C;
844
- const M = s.from(w, s.M);
845
- if (Array.isArray(f)) {
846
- if (f.length > 1)
847
- return A(f, M);
848
- if (f.length === 0)
849
- return 1;
850
- C = f[0];
851
- } else
852
- C = f;
853
- return a(C.mode, C.getLength(), M);
854
- }, t.getEncodedBits = function(f) {
855
- if (!n.isValid(f) || f < 7)
856
- throw new Error("Invalid QR Code version");
857
- let w = f << 12;
858
- for (; e.getBCHDigit(w) - l >= 0; )
859
- w ^= r << e.getBCHDigit(w) - l;
860
- return f << 12 | w;
861
- };
862
- })(ft);
863
- var gt = {};
864
- const Ie = k, ht = 1335, Zt = 21522, Xe = Ie.getBCHDigit(ht);
865
- gt.getEncodedBits = function(e, i) {
866
- const s = e.bit << 3 | i;
867
- let o = s << 10;
868
- for (; Ie.getBCHDigit(o) - Xe >= 0; )
869
- o ^= ht << Ie.getBCHDigit(o) - Xe;
870
- return (s << 10 | o) ^ Zt;
871
- };
872
- var pt = {};
873
- const en = J;
874
- function q(t) {
875
- this.mode = en.NUMERIC, this.data = t.toString();
876
- }
877
- q.getBitsLength = function(e) {
878
- return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
879
- };
880
- q.prototype.getLength = function() {
881
- return this.data.length;
882
- };
883
- q.prototype.getBitsLength = function() {
884
- return q.getBitsLength(this.data.length);
885
- };
886
- q.prototype.write = function(e) {
887
- let i, s, o;
888
- for (i = 0; i + 3 <= this.data.length; i += 3)
889
- s = this.data.substr(i, 3), o = parseInt(s, 10), e.put(o, 10);
890
- const n = this.data.length - i;
891
- n > 0 && (s = this.data.substr(i), o = parseInt(s, 10), e.put(o, n * 3 + 1));
892
- };
893
- var tn = q;
894
- const nn = J, Ce = [
895
- "0",
896
- "1",
897
- "2",
898
- "3",
899
- "4",
900
- "5",
901
- "6",
902
- "7",
903
- "8",
904
- "9",
905
- "A",
906
- "B",
907
- "C",
908
- "D",
909
- "E",
910
- "F",
911
- "G",
912
- "H",
913
- "I",
914
- "J",
915
- "K",
916
- "L",
917
- "M",
918
- "N",
919
- "O",
920
- "P",
921
- "Q",
922
- "R",
923
- "S",
924
- "T",
925
- "U",
926
- "V",
927
- "W",
928
- "X",
929
- "Y",
930
- "Z",
931
- " ",
932
- "$",
933
- "%",
934
- "*",
935
- "+",
936
- "-",
937
- ".",
938
- "/",
939
- ":"
940
- ];
941
- function G(t) {
942
- this.mode = nn.ALPHANUMERIC, this.data = t;
943
- }
944
- G.getBitsLength = function(e) {
945
- return 11 * Math.floor(e / 2) + 6 * (e % 2);
946
- };
947
- G.prototype.getLength = function() {
948
- return this.data.length;
949
- };
950
- G.prototype.getBitsLength = function() {
951
- return G.getBitsLength(this.data.length);
952
- };
953
- G.prototype.write = function(e) {
954
- let i;
955
- for (i = 0; i + 2 <= this.data.length; i += 2) {
956
- let s = Ce.indexOf(this.data[i]) * 45;
957
- s += Ce.indexOf(this.data[i + 1]), e.put(s, 11);
958
- }
959
- this.data.length % 2 && e.put(Ce.indexOf(this.data[i]), 6);
960
- };
961
- var on = G, sn = function(e) {
962
- for (var i = [], s = e.length, o = 0; o < s; o++) {
963
- var n = e.charCodeAt(o);
964
- if (n >= 55296 && n <= 56319 && s > o + 1) {
965
- var r = e.charCodeAt(o + 1);
966
- r >= 56320 && r <= 57343 && (n = (n - 55296) * 1024 + r - 56320 + 65536, o += 1);
967
- }
968
- if (n < 128) {
969
- i.push(n);
970
- continue;
971
- }
972
- if (n < 2048) {
973
- i.push(n >> 6 | 192), i.push(n & 63 | 128);
974
- continue;
975
- }
976
- if (n < 55296 || n >= 57344 && n < 65536) {
977
- i.push(n >> 12 | 224), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
978
- continue;
979
- }
980
- if (n >= 65536 && n <= 1114111) {
981
- i.push(n >> 18 | 240), i.push(n >> 12 & 63 | 128), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
982
- continue;
983
- }
984
- i.push(239, 191, 189);
985
- }
986
- return new Uint8Array(i).buffer;
987
- };
988
- const rn = sn, ln = J;
989
- function Q(t) {
990
- this.mode = ln.BYTE, typeof t == "string" && (t = rn(t)), this.data = new Uint8Array(t);
991
- }
992
- Q.getBitsLength = function(e) {
993
- return e * 8;
994
- };
995
- Q.prototype.getLength = function() {
996
- return this.data.length;
997
- };
998
- Q.prototype.getBitsLength = function() {
999
- return Q.getBitsLength(this.data.length);
1000
- };
1001
- Q.prototype.write = function(t) {
1002
- for (let e = 0, i = this.data.length; e < i; e++)
1003
- t.put(this.data[e], 8);
1004
- };
1005
- var an = Q;
1006
- const cn = J, un = k;
1007
- function X(t) {
1008
- this.mode = cn.KANJI, this.data = t;
1009
- }
1010
- X.getBitsLength = function(e) {
1011
- return e * 13;
1012
- };
1013
- X.prototype.getLength = function() {
1014
- return this.data.length;
1015
- };
1016
- X.prototype.getBitsLength = function() {
1017
- return X.getBitsLength(this.data.length);
1018
- };
1019
- X.prototype.write = function(t) {
1020
- let e;
1021
- for (e = 0; e < this.data.length; e++) {
1022
- let i = un.toSJIS(this.data[e]);
1023
- if (i >= 33088 && i <= 40956)
1024
- i -= 33088;
1025
- else if (i >= 57408 && i <= 60351)
1026
- i -= 49472;
1027
- else
1028
- throw new Error(
1029
- "Invalid SJIS character: " + this.data[e] + `
1030
- Make sure your charset is UTF-8`
1031
- );
1032
- i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
1033
- }
1034
- };
1035
- var dn = X, yt = { exports: {} };
1036
- (function(t) {
1037
- var e = {
1038
- single_source_shortest_paths: function(i, s, o) {
1039
- var n = {}, r = {};
1040
- r[s] = 0;
1041
- var l = e.PriorityQueue.make();
1042
- l.push(s, 0);
1043
- for (var a, u, g, A, m, f, w, C, M; !l.empty(); ) {
1044
- a = l.pop(), u = a.value, A = a.cost, m = i[u] || {};
1045
- for (g in m)
1046
- m.hasOwnProperty(g) && (f = m[g], w = A + f, C = r[g], M = typeof r[g] > "u", (M || C > w) && (r[g] = w, l.push(g, w), n[g] = u));
1047
- }
1048
- if (typeof o < "u" && typeof r[o] > "u") {
1049
- var d = ["Could not find a path from ", s, " to ", o, "."].join("");
1050
- throw new Error(d);
1051
- }
1052
- return n;
1053
- },
1054
- extract_shortest_path_from_predecessor_list: function(i, s) {
1055
- for (var o = [], n = s; n; )
1056
- o.push(n), i[n], n = i[n];
1057
- return o.reverse(), o;
1058
- },
1059
- find_path: function(i, s, o) {
1060
- var n = e.single_source_shortest_paths(i, s, o);
1061
- return e.extract_shortest_path_from_predecessor_list(
1062
- n,
1063
- o
1064
- );
1065
- },
1066
- /**
1067
- * A very naive priority queue implementation.
1068
- */
1069
- PriorityQueue: {
1070
- make: function(i) {
1071
- var s = e.PriorityQueue, o = {}, n;
1072
- i = i || {};
1073
- for (n in s)
1074
- s.hasOwnProperty(n) && (o[n] = s[n]);
1075
- return o.queue = [], o.sorter = i.sorter || s.default_sorter, o;
1076
- },
1077
- default_sorter: function(i, s) {
1078
- return i.cost - s.cost;
1079
- },
1080
- /**
1081
- * Add a new item to the queue and ensure the highest priority element
1082
- * is at the front of the queue.
1083
- */
1084
- push: function(i, s) {
1085
- var o = { value: i, cost: s };
1086
- this.queue.push(o), this.queue.sort(this.sorter);
1087
- },
1088
- /**
1089
- * Return the highest priority element in the queue.
1090
- */
1091
- pop: function() {
1092
- return this.queue.shift();
1093
- },
1094
- empty: function() {
1095
- return this.queue.length === 0;
1096
- }
1097
- }
1098
- };
1099
- t.exports = e;
1100
- })(yt);
1101
- var fn = yt.exports;
1102
- (function(t) {
1103
- const e = J, i = tn, s = on, o = an, n = dn, r = z, l = k, a = fn;
1104
- function u(d) {
1105
- return unescape(encodeURIComponent(d)).length;
1106
- }
1107
- function g(d, v, h) {
1108
- const y = [];
1109
- let S;
1110
- for (; (S = d.exec(h)) !== null; )
1111
- y.push({
1112
- data: S[0],
1113
- index: S.index,
1114
- mode: v,
1115
- length: S[0].length
1116
- });
1117
- return y;
1118
- }
1119
- function A(d) {
1120
- const v = g(r.NUMERIC, e.NUMERIC, d), h = g(r.ALPHANUMERIC, e.ALPHANUMERIC, d);
1121
- let y, S;
1122
- return l.isKanjiModeEnabled() ? (y = g(r.BYTE, e.BYTE, d), S = g(r.KANJI, e.KANJI, d)) : (y = g(r.BYTE_KANJI, e.BYTE, d), S = []), v.concat(h, y, S).sort(function(T, L) {
1123
- return T.index - L.index;
1124
- }).map(function(T) {
1125
- return {
1126
- data: T.data,
1127
- mode: T.mode,
1128
- length: T.length
1129
- };
1130
- });
1131
- }
1132
- function m(d, v) {
1133
- switch (v) {
1134
- case e.NUMERIC:
1135
- return i.getBitsLength(d);
1136
- case e.ALPHANUMERIC:
1137
- return s.getBitsLength(d);
1138
- case e.KANJI:
1139
- return n.getBitsLength(d);
1140
- case e.BYTE:
1141
- return o.getBitsLength(d);
1142
- }
1143
- }
1144
- function f(d) {
1145
- return d.reduce(function(v, h) {
1146
- const y = v.length - 1 >= 0 ? v[v.length - 1] : null;
1147
- return y && y.mode === h.mode ? (v[v.length - 1].data += h.data, v) : (v.push(h), v);
1148
- }, []);
1149
- }
1150
- function w(d) {
1151
- const v = [];
1152
- for (let h = 0; h < d.length; h++) {
1153
- const y = d[h];
1154
- switch (y.mode) {
1155
- case e.NUMERIC:
1156
- v.push([
1157
- y,
1158
- { data: y.data, mode: e.ALPHANUMERIC, length: y.length },
1159
- { data: y.data, mode: e.BYTE, length: y.length }
1160
- ]);
1161
- break;
1162
- case e.ALPHANUMERIC:
1163
- v.push([
1164
- y,
1165
- { data: y.data, mode: e.BYTE, length: y.length }
1166
- ]);
1167
- break;
1168
- case e.KANJI:
1169
- v.push([
1170
- y,
1171
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1172
- ]);
1173
- break;
1174
- case e.BYTE:
1175
- v.push([
1176
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1177
- ]);
1178
- }
1179
- }
1180
- return v;
1181
- }
1182
- function C(d, v) {
1183
- const h = {}, y = { start: {} };
1184
- let S = ["start"];
1185
- for (let I = 0; I < d.length; I++) {
1186
- const T = d[I], L = [];
1187
- for (let V = 0; V < T.length; V++) {
1188
- const R = T[V], E = "" + I + V;
1189
- L.push(E), h[E] = { node: R, lastCount: 0 }, y[E] = {};
1190
- for (let b = 0; b < S.length; b++) {
1191
- const F = S[b];
1192
- h[F] && h[F].node.mode === R.mode ? (y[F][E] = m(h[F].lastCount + R.length, R.mode) - m(h[F].lastCount, R.mode), h[F].lastCount += R.length) : (h[F] && (h[F].lastCount = R.length), y[F][E] = m(R.length, R.mode) + 4 + e.getCharCountIndicator(R.mode, v));
1193
- }
1194
- }
1195
- S = L;
1196
- }
1197
- for (let I = 0; I < S.length; I++)
1198
- y[S[I]].end = 0;
1199
- return { map: y, table: h };
1200
- }
1201
- function M(d, v) {
1202
- let h;
1203
- const y = e.getBestModeForData(d);
1204
- if (h = e.from(v, y), h !== e.BYTE && h.bit < y.bit)
1205
- throw new Error('"' + d + '" cannot be encoded with mode ' + e.toString(h) + `.
1206
- Suggested mode is: ` + e.toString(y));
1207
- switch (h === e.KANJI && !l.isKanjiModeEnabled() && (h = e.BYTE), h) {
1208
- case e.NUMERIC:
1209
- return new i(d);
1210
- case e.ALPHANUMERIC:
1211
- return new s(d);
1212
- case e.KANJI:
1213
- return new n(d);
1214
- case e.BYTE:
1215
- return new o(d);
1216
- }
1217
- }
1218
- t.fromArray = function(v) {
1219
- return v.reduce(function(h, y) {
1220
- return typeof y == "string" ? h.push(M(y, null)) : y.data && h.push(M(y.data, y.mode)), h;
1221
- }, []);
1222
- }, t.fromString = function(v, h) {
1223
- const y = A(v, l.isKanjiModeEnabled()), S = w(y), I = C(S, h), T = a.find_path(I.map, "start", "end"), L = [];
1224
- for (let V = 1; V < T.length - 1; V++)
1225
- L.push(I.table[T[V]].node);
1226
- return t.fromArray(f(L));
1227
- }, t.rawSplit = function(v) {
1228
- return t.fromArray(
1229
- A(v, l.isKanjiModeEnabled())
1230
- );
1231
- };
1232
- })(pt);
1233
- const ge = k, ve = de, mn = Ot, gn = Yt, hn = lt, pn = at, Te = ct, Ne = fe, yn = jt, ue = ft, wn = gt, bn = J, _e = pt;
1234
- function Cn(t, e) {
1235
- const i = t.size, s = pn.getPositions(e);
1236
- for (let o = 0; o < s.length; o++) {
1237
- const n = s[o][0], r = s[o][1];
1238
- for (let l = -1; l <= 7; l++)
1239
- if (!(n + l <= -1 || i <= n + l))
1240
- for (let a = -1; a <= 7; a++)
1241
- r + a <= -1 || i <= r + a || (l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 2 && l <= 4 && a >= 2 && a <= 4 ? t.set(n + l, r + a, !0, !0) : t.set(n + l, r + a, !1, !0));
1242
- }
1243
- }
1244
- function vn(t) {
1245
- const e = t.size;
1246
- for (let i = 8; i < e - 8; i++) {
1247
- const s = i % 2 === 0;
1248
- t.set(i, 6, s, !0), t.set(6, i, s, !0);
1249
- }
1250
- }
1251
- function _n(t, e) {
1252
- const i = hn.getPositions(e);
1253
- for (let s = 0; s < i.length; s++) {
1254
- const o = i[s][0], n = i[s][1];
1255
- for (let r = -2; r <= 2; r++)
1256
- for (let l = -2; l <= 2; l++)
1257
- r === -2 || r === 2 || l === -2 || l === 2 || r === 0 && l === 0 ? t.set(o + r, n + l, !0, !0) : t.set(o + r, n + l, !1, !0);
1258
- }
1259
- }
1260
- function En(t, e) {
1261
- const i = t.size, s = ue.getEncodedBits(e);
1262
- let o, n, r;
1263
- for (let l = 0; l < 18; l++)
1264
- o = Math.floor(l / 3), n = l % 3 + i - 8 - 3, r = (s >> l & 1) === 1, t.set(o, n, r, !0), t.set(n, o, r, !0);
1265
- }
1266
- function Ee(t, e, i) {
1267
- const s = t.size, o = wn.getEncodedBits(e, i);
1268
- let n, r;
1269
- for (n = 0; n < 15; n++)
1270
- r = (o >> n & 1) === 1, n < 6 ? t.set(n, 8, r, !0) : n < 8 ? t.set(n + 1, 8, r, !0) : t.set(s - 15 + n, 8, r, !0), n < 8 ? t.set(8, s - n - 1, r, !0) : n < 9 ? t.set(8, 15 - n - 1 + 1, r, !0) : t.set(8, 15 - n - 1, r, !0);
1271
- t.set(s - 8, 8, 1, !0);
1272
- }
1273
- function An(t, e) {
1274
- const i = t.size;
1275
- let s = -1, o = i - 1, n = 7, r = 0;
1276
- for (let l = i - 1; l > 0; l -= 2)
1277
- for (l === 6 && l--; ; ) {
1278
- for (let a = 0; a < 2; a++)
1279
- if (!t.isReserved(o, l - a)) {
1280
- let u = !1;
1281
- r < e.length && (u = (e[r] >>> n & 1) === 1), t.set(o, l - a, u), n--, n === -1 && (r++, n = 7);
1282
- }
1283
- if (o += s, o < 0 || i <= o) {
1284
- o -= s, s = -s;
1285
- break;
1286
- }
1287
- }
1288
- }
1289
- function Bn(t, e, i) {
1290
- const s = new mn();
1291
- i.forEach(function(a) {
1292
- s.put(a.mode.bit, 4), s.put(a.getLength(), bn.getCharCountIndicator(a.mode, t)), a.write(s);
1293
- });
1294
- const o = ge.getSymbolTotalCodewords(t), n = Ne.getTotalCodewordsCount(t, e), r = (o - n) * 8;
1295
- for (s.getLengthInBits() + 4 <= r && s.put(0, 4); s.getLengthInBits() % 8 !== 0; )
1296
- s.putBit(0);
1297
- const l = (r - s.getLengthInBits()) / 8;
1298
- for (let a = 0; a < l; a++)
1299
- s.put(a % 2 ? 17 : 236, 8);
1300
- return Pn(s, t, e);
1301
- }
1302
- function Pn(t, e, i) {
1303
- const s = ge.getSymbolTotalCodewords(e), o = Ne.getTotalCodewordsCount(e, i), n = s - o, r = Ne.getBlocksCount(e, i), l = s % r, a = r - l, u = Math.floor(s / r), g = Math.floor(n / r), A = g + 1, m = u - g, f = new yn(m);
1304
- let w = 0;
1305
- const C = new Array(r), M = new Array(r);
1306
- let d = 0;
1307
- const v = new Uint8Array(t.buffer);
1308
- for (let T = 0; T < r; T++) {
1309
- const L = T < a ? g : A;
1310
- C[T] = v.slice(w, w + L), M[T] = f.encode(C[T]), w += L, d = Math.max(d, L);
1311
- }
1312
- const h = new Uint8Array(s);
1313
- let y = 0, S, I;
1314
- for (S = 0; S < d; S++)
1315
- for (I = 0; I < r; I++)
1316
- S < C[I].length && (h[y++] = C[I][S]);
1317
- for (S = 0; S < m; S++)
1318
- for (I = 0; I < r; I++)
1319
- h[y++] = M[I][S];
1320
- return h;
1321
- }
1322
- function Mn(t, e, i, s) {
1323
- let o;
1324
- if (Array.isArray(t))
1325
- o = _e.fromArray(t);
1326
- else if (typeof t == "string") {
1327
- let u = e;
1328
- if (!u) {
1329
- const g = _e.rawSplit(t);
1330
- u = ue.getBestVersionForData(g, i);
1331
- }
1332
- o = _e.fromString(t, u || 40);
1333
- } else
1334
- throw new Error("Invalid data");
1335
- const n = ue.getBestVersionForData(o, i);
1336
- if (!n)
1337
- throw new Error("The amount of data is too big to be stored in a QR Code");
1338
- if (!e)
1339
- e = n;
1340
- else if (e < n)
1341
- throw new Error(
1342
- `
1343
- The chosen QR Code version cannot contain this amount of data.
1344
- Minimum version required to store current data is: ` + n + `.
1345
- `
1346
- );
1347
- const r = Bn(e, i, o), l = ge.getSymbolSize(e), a = new gn(l);
1348
- return Cn(a, e), vn(a), _n(a, e), Ee(a, i, 0), e >= 7 && En(a, e), An(a, r), isNaN(s) && (s = Te.getBestMask(
1349
- a,
1350
- Ee.bind(null, a, i)
1351
- )), Te.applyMask(s, a), Ee(a, i, s), {
1352
- modules: a,
1353
- version: e,
1354
- errorCorrectionLevel: i,
1355
- maskPattern: s,
1356
- segments: o
1357
- };
1358
- }
1359
- it.create = function(e, i) {
1360
- if (typeof e > "u" || e === "")
1361
- throw new Error("No input text");
1362
- let s = ve.M, o, n;
1363
- return typeof i < "u" && (s = ve.from(i.errorCorrectionLevel, ve.M), o = ue.from(i.version), n = Te.from(i.maskPattern), i.toSJISFunc && ge.setToSJISFunction(i.toSJISFunc)), Mn(e, o, s, n);
1364
- };
1365
- var wt = {}, De = {};
1366
- (function(t) {
1367
- function e(i) {
1368
- if (typeof i == "number" && (i = i.toString()), typeof i != "string")
1369
- throw new Error("Color should be defined as hex string");
1370
- let s = i.slice().replace("#", "").split("");
1371
- if (s.length < 3 || s.length === 5 || s.length > 8)
1372
- throw new Error("Invalid hex color: " + i);
1373
- (s.length === 3 || s.length === 4) && (s = Array.prototype.concat.apply([], s.map(function(n) {
1374
- return [n, n];
1375
- }))), s.length === 6 && s.push("F", "F");
1376
- const o = parseInt(s.join(""), 16);
1377
- return {
1378
- r: o >> 24 & 255,
1379
- g: o >> 16 & 255,
1380
- b: o >> 8 & 255,
1381
- a: o & 255,
1382
- hex: "#" + s.slice(0, 6).join("")
1383
- };
1384
- }
1385
- t.getOptions = function(s) {
1386
- s || (s = {}), s.color || (s.color = {});
1387
- const o = typeof s.margin > "u" || s.margin === null || s.margin < 0 ? 4 : s.margin, n = s.width && s.width >= 21 ? s.width : void 0, r = s.scale || 4;
1388
- return {
1389
- width: n,
1390
- scale: n ? 4 : r,
1391
- margin: o,
1392
- color: {
1393
- dark: e(s.color.dark || "#000000ff"),
1394
- light: e(s.color.light || "#ffffffff")
1395
- },
1396
- type: s.type,
1397
- rendererOpts: s.rendererOpts || {}
1398
- };
1399
- }, t.getScale = function(s, o) {
1400
- return o.width && o.width >= s + o.margin * 2 ? o.width / (s + o.margin * 2) : o.scale;
1401
- }, t.getImageWidth = function(s, o) {
1402
- const n = t.getScale(s, o);
1403
- return Math.floor((s + o.margin * 2) * n);
1404
- }, t.qrToImageData = function(s, o, n) {
1405
- const r = o.modules.size, l = o.modules.data, a = t.getScale(r, n), u = Math.floor((r + n.margin * 2) * a), g = n.margin * a, A = [n.color.light, n.color.dark];
1406
- for (let m = 0; m < u; m++)
1407
- for (let f = 0; f < u; f++) {
1408
- let w = (m * u + f) * 4, C = n.color.light;
1409
- if (m >= g && f >= g && m < u - g && f < u - g) {
1410
- const M = Math.floor((m - g) / a), d = Math.floor((f - g) / a);
1411
- C = A[l[M * r + d] ? 1 : 0];
1412
- }
1413
- s[w++] = C.r, s[w++] = C.g, s[w++] = C.b, s[w] = C.a;
1414
- }
1415
- };
1416
- })(De);
1417
- (function(t) {
1418
- const e = De;
1419
- function i(o, n, r) {
1420
- o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = r, n.width = r, n.style.height = r + "px", n.style.width = r + "px";
1421
- }
1422
- function s() {
1423
- try {
1424
- return document.createElement("canvas");
1425
- } catch {
1426
- throw new Error("You need to specify a canvas element");
1427
- }
1428
- }
1429
- t.render = function(n, r, l) {
1430
- let a = l, u = r;
1431
- typeof a > "u" && (!r || !r.getContext) && (a = r, r = void 0), r || (u = s()), a = e.getOptions(a);
1432
- const g = e.getImageWidth(n.modules.size, a), A = u.getContext("2d"), m = A.createImageData(g, g);
1433
- return e.qrToImageData(m.data, n, a), i(A, u, g), A.putImageData(m, 0, 0), u;
1434
- }, t.renderToDataURL = function(n, r, l) {
1435
- let a = l;
1436
- typeof a > "u" && (!r || !r.getContext) && (a = r, r = void 0), a || (a = {});
1437
- const u = t.render(n, r, a), g = a.type || "image/png", A = a.rendererOpts || {};
1438
- return u.toDataURL(g, A.quality);
1439
- };
1440
- })(wt);
1441
- var bt = {};
1442
- const Sn = De;
1443
- function We(t, e) {
1444
- const i = t.a / 255, s = e + '="' + t.hex + '"';
1445
- return i < 1 ? s + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : s;
1446
- }
1447
- function Ae(t, e, i) {
1448
- let s = t + e;
1449
- return typeof i < "u" && (s += " " + i), s;
1450
- }
1451
- function In(t, e, i) {
1452
- let s = "", o = 0, n = !1, r = 0;
1453
- for (let l = 0; l < t.length; l++) {
1454
- const a = Math.floor(l % e), u = Math.floor(l / e);
1455
- !a && !n && (n = !0), t[l] ? (r++, l > 0 && a > 0 && t[l - 1] || (s += n ? Ae("M", a + i, 0.5 + u + i) : Ae("m", o, 0), o = 0, n = !1), a + 1 < e && t[l + 1] || (s += Ae("h", r), r = 0)) : o++;
1456
- }
1457
- return s;
1458
- }
1459
- bt.render = function(e, i, s) {
1460
- const o = Sn.getOptions(i), n = e.modules.size, r = e.modules.data, l = n + o.margin * 2, a = o.color.light.a ? "<path " + We(o.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", u = "<path " + We(o.color.dark, "stroke") + ' d="' + In(r, n, o.margin) + '"/>', g = 'viewBox="0 0 ' + l + " " + l + '"', m = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + g + ' shape-rendering="crispEdges">' + a + u + `</svg>
1461
- `;
1462
- return typeof s == "function" && s(null, m), m;
1463
- };
1464
- const Tn = Ht, Ue = it, Ct = wt, Nn = bt;
1465
- function Ve(t, e, i, s, o) {
1466
- const n = [].slice.call(arguments, 1), r = n.length, l = typeof n[r - 1] == "function";
1467
- if (!l && !Tn())
1468
- throw new Error("Callback required as last argument");
1469
- if (l) {
1470
- if (r < 2)
1471
- throw new Error("Too few arguments provided");
1472
- r === 2 ? (o = i, i = e, e = s = void 0) : r === 3 && (e.getContext && typeof o > "u" ? (o = s, s = void 0) : (o = s, s = i, i = e, e = void 0));
1473
- } else {
1474
- if (r < 1)
1475
- throw new Error("Too few arguments provided");
1476
- return r === 1 ? (i = e, e = s = void 0) : r === 2 && !e.getContext && (s = i, i = e, e = void 0), new Promise(function(a, u) {
1477
- try {
1478
- const g = Ue.create(i, s);
1479
- a(t(g, e, s));
1480
- } catch (g) {
1481
- u(g);
1482
- }
1483
- });
1484
- }
1485
- try {
1486
- const a = Ue.create(i, s);
1487
- o(null, t(a, e, s));
1488
- } catch (a) {
1489
- o(a);
1490
- }
1491
- }
1492
- oe.create = Ue.create;
1493
- oe.toCanvas = Ve.bind(null, Ct.render);
1494
- oe.toDataURL = Ve.bind(null, Ct.renderToDataURL);
1495
- oe.toString = Ve.bind(null, function(t, e, i) {
1496
- return Nn.render(t, i);
1497
- });
1498
- async function Un(t, e = 350) {
1499
- try {
1500
- return await oe.toDataURL(t, {
1501
- width: e,
1502
- margin: 0
1503
- });
1504
- } catch (i) {
1505
- console.error(i);
1506
- }
1507
- }
1508
- var Fn = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
1509
- const Ln = { class: "flex items-start" }, kn = { class: "flex flex-col gap-16 mt-16" }, Rn = ["src"], Dn = /* @__PURE__ */ Fe({
1510
- __name: "LinkDeviceDialog",
1511
- setup(t) {
1512
- const e = Se(), i = nt(), s = et(), o = $(), n = $(), r = Fn.crmUrl, l = $(), a = j(() => i.membership), u = j(() => {
1513
- var m, f;
1514
- return `https://${(m = a.value) != null && m.url ? a.value.url : (f = a.value) == null ? void 0 : f.business}.${r}`;
1515
- });
1516
- async function g(m) {
1517
- const f = await tt.getOtp(m);
1518
- return `${u.value}?link-device=${f.otp}`;
1519
- }
1520
- async function A(m) {
1521
- const f = await g(m);
1522
- l.value = f, o.value = await Un(f);
1523
- }
1524
- return Ze(async () => {
1525
- if (await e.readLocations(), !e.locations.length) {
1526
- s.close();
1527
- return;
1528
- }
1529
- const m = e.locations[0]._id;
1530
- n.value = m, await A(m);
1531
- }), (m, f) => {
1532
- const w = N("FmIcon"), C = N("FmSelect"), M = N("FmButton"), d = N("FmCard");
1533
- return U(), te(d, { class: "p-24 max-w-[350px]" }, {
1534
- default: H(() => [
1535
- p("div", Ln, [
1536
- f[3] || (f[3] = p("div", null, [
1537
- p("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1538
- p("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1539
- ], -1)),
1540
- P(w, {
1541
- name: "close",
1542
- onClick: f[0] || (f[0] = (v) => c(s).close()),
1543
- class: "cursor-pointer"
1544
- })
1545
- ]),
1546
- p("div", kn, [
1547
- P(C, {
1548
- modelValue: c(n),
1549
- "onUpdate:modelValue": [
1550
- f[1] || (f[1] = (v) => Pe(n) ? n.value = v : null),
1551
- A
1552
- ],
1553
- label: "Select Location",
1554
- items: c(e).locationItems.filter((v) => !!v.value)
1555
- }, null, 8, ["modelValue", "items"]),
1556
- p("img", {
1557
- src: c(o),
1558
- class: "aspect-square w-full"
1559
- }, null, 8, Rn),
1560
- P(M, {
1561
- class: "mx-auto",
1562
- variant: "plain",
1563
- icon: "content_copy",
1564
- onClick: f[2] || (f[2] = (v) => c(ot)(c(l)))
1565
- })
1566
- ])
1567
- ]),
1568
- _: 1
1569
- });
1570
- };
1571
- }
1572
- }), Vn = { class: "space-y-4" }, xn = { key: 0 }, $n = { key: 1 }, zn = { key: 2 }, Hn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Kn = /* @__PURE__ */ Fe({
1573
- __name: "AllowedPhoneCountriesSelect",
1574
- props: {
1575
- modelValue: {}
1576
- },
1577
- emits: ["update:modelValue"],
1578
- setup(t, { emit: e }) {
1579
- const { t: i } = st(), s = t, o = e, n = [...new Set(we.map((m) => m.phoneCode))], r = $(""), l = $(!1), a = j(() => {
1580
- const m = r.value.toLowerCase();
1581
- return we.filter(
1582
- (f) => f.name.toLowerCase().includes(m) || f.phoneCode.toLowerCase().includes(m)
1583
- );
1584
- });
1585
- function u(m, f) {
1586
- const w = m ? Ut([...s.modelValue || []], f) : Ft(s.modelValue || n, f);
1587
- o("update:modelValue", w);
1588
- }
1589
- const g = j(() => {
1590
- var w;
1591
- const f = ((w = s.modelValue) == null ? void 0 : w.slice(0, 5).map(
1592
- (C) => {
1593
- var M;
1594
- return ((M = we.find((d) => d.phoneCode === C)) == null ? void 0 : M.name) || C;
1595
- }
1596
- )) || [];
1597
- return s.modelValue && s.modelValue.length > 5 && f.push(`+${s.modelValue.length - 5} more`), f;
1598
- }), A = j(() => {
1599
- const m = s.modelValue;
1600
- return Array.isArray(m) && m.length === 0 ? i("connect.setting.allowedPhoneCountries.helper.noneAllowed") : m == null ? i("connect.setting.allowedPhoneCountries.helper.allAllowed") : i("connect.setting.allowedPhoneCountries.helper.selectedOnly");
1601
- });
1602
- return At(l, (m) => {
1603
- m && (r.value = "");
1604
- }), (m, f) => {
1605
- const w = N("FmChip"), C = N("FmField"), M = N("FmTextField"), d = N("FmCheckbox"), v = N("FmMenu");
1606
- return U(), x("div", Vn, [
1607
- P(v, {
1608
- modelValue: c(l),
1609
- "onUpdate:modelValue": f[2] || (f[2] = (h) => Pe(l) ? l.value = h : null),
1610
- onMenuChanged: f[3] || (f[3] = (h) => l.value = h),
1611
- placement: "top-end"
1612
- }, {
1613
- "menu-button": H(() => [
1614
- P(C, {
1615
- "append-icon": c(l) ? "expand_more" : "expand_less",
1616
- class: "!h-auto"
1617
- }, {
1618
- default: H(() => [
1619
- t.modelValue ? t.modelValue.length ? (U(), x("div", zn, [
1620
- (U(!0), x(Z, null, Me(c(g), (h, y) => (U(), te(w, {
1621
- key: y,
1622
- label: h,
1623
- class: "max-w-[130px] text-ellipsis"
1624
- }, null, 8, ["label"]))), 128))
1625
- ])) : (U(), x("div", $n, B(c(i)("connect.setting.allowedPhoneCountries.noCountries")), 1)) : (U(), x("div", xn, B(c(i)("connect.setting.allowedPhoneCountries.allCountries")), 1))
1626
- ]),
1627
- _: 1
1628
- }, 8, ["append-icon"])
1629
- ]),
1630
- default: H(() => [
1631
- P(M, {
1632
- modelValue: c(r),
1633
- "onUpdate:modelValue": f[0] || (f[0] = (h) => Pe(r) ? r.value = h : null),
1634
- placeholder: c(i)("connect.setting.allowedPhoneCountries.searchCountries"),
1635
- class: "my-8"
1636
- }, null, 8, ["modelValue", "placeholder"]),
1637
- P(d, {
1638
- class: "my-8",
1639
- value: null,
1640
- indeterminate: t.modelValue != null && t.modelValue.length > 0 && t.modelValue.length < n.length,
1641
- label: c(i)("connect.setting.allowedPhoneCountries.allCountries"),
1642
- "model-value": t.modelValue == null || t.modelValue.length === n.length,
1643
- "onUpdate:modelValue": f[1] || (f[1] = (h) => o("update:modelValue", h ? null : []))
1644
- }, null, 8, ["indeterminate", "label", "model-value"]),
1645
- (U(!0), x(Z, null, Me(c(a), (h) => (U(), te(d, {
1646
- class: "my-8",
1647
- key: h.iso2,
1648
- value: h.phoneCode,
1649
- label: `${h.name} (${h.phoneCode})`,
1650
- "model-value": !t.modelValue || t.modelValue.includes(h.phoneCode),
1651
- "onUpdate:modelValue": (y) => u(y, h.phoneCode)
1652
- }, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
1653
- ]),
1654
- _: 1
1655
- }, 8, ["modelValue"]),
1656
- p("div", Hn, B(c(A)), 1)
1657
- ]);
1658
- };
1659
- }
1660
- });
1661
- var Be = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
1662
- const On = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Yn = { class: "fm-typo-en-title-md-800" }, Jn = {
1663
- key: 0,
1664
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1665
- }, jn = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, qn = { class: "fm-typo-en-title-sm-800" }, Gn = { class: "space-y-24" }, Qn = { class: "space-y-8" }, Xn = { class: "fm-typo-en-title-sm-800" }, Wn = { class: "fm-typo-body-lg-400" }, Zn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, eo = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, to = { class: "space-y-8" }, no = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, oo = { class: "fm-typo-en-body-lg-600" }, so = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, io = { class: "space-y-8" }, ro = { class: "space-y-8" }, lo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ao = { class: "space-y-8" }, co = { class: "fm-typo-en-title-sm-800" }, uo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, fo = { class: "space-y-8" }, mo = { class: "fm-typo-en-title-sm-800" }, go = { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, ho = { class: "space-y-8" }, po = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, yo = { class: "space-y-8" }, wo = { class: "fm-typo-en-title-sm-800" }, bo = { class: "space-y-8" }, Co = { class: "fm-typo-en-title-sm-800" }, vo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _o = { class: "flex justify-end pb-24" }, Eo = { class: "col-span-1 space-y-8 xs:hidden" }, Ao = { class: "fm-typo-en-body-lg-600" }, Bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Po = { class: "fm-typo-en-body-lg-600" }, Mo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, So = { class: "fm-typo-en-body-lg-600" }, Io = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, To = { class: "fm-typo-en-body-lg-600" }, No = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Uo = { class: "fm-typo-en-body-lg-600" }, ts = /* @__PURE__ */ Fe({
1666
- __name: "Setting",
1667
- setup(t) {
1668
- const e = Vt(), i = Mt(), s = Dt(), o = Se(), n = nt(), { global: r, minor: l } = Pt, a = et(), u = $(), g = $([]), A = $(null), m = St, f = [
1669
- (E) => !E || E.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1670
- (E) => !E || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(E) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
1671
- ], w = Be.appUrl, C = j(() => {
1672
- var E;
1673
- return `https://${(E = u.value) == null ? void 0 : E.business}.${w}/user?join=true`;
1674
- }), M = $(), { t: d } = st(), v = s.currentCountry.value || "MY", h = [
1675
- "user.name",
1676
- "user.gender",
1677
- "user.birthday",
1678
- "user.phoneNumber",
1679
- "membership.url"
1680
- ].filter(
1681
- (E) => {
1682
- var b;
1683
- return !((b = kt[v]) != null && b.includes(E));
1684
- }
1685
- ), y = $(
1686
- d("connect.setting.sms.welcomeMessage")
1687
- );
1688
- async function S() {
1689
- a.open({
1690
- title: "",
1691
- dialogComponent: Dn,
1692
- closeButton: !1
1693
- });
1694
- }
1695
- async function I(E) {
1696
- await Nt.remove(
1697
- "Are you sure you want to unlink this device?",
1698
- "Unlink device",
1699
- "Unlink"
1700
- ) && await l(
1701
- async () => {
1702
- await tt.unregisterDevice(E), await o.readLocationDevices();
1703
- },
1704
- {
1705
- message: "Unlinking device",
1706
- successMessage: "Unlinked device successfully"
1707
- }
1708
- );
1709
- }
1710
- async function T() {
1711
- await l(
1712
- async () => {
1713
- var F;
1714
- const E = zt(u.value);
1715
- E.welcomeMessage && !((F = E.welcomeMessage) != null && F.content) && (E.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1716
- const b = It.parse(E);
1717
- M.value === null && b.image ? await re.delete(re.coverImagePath()) : M.value && (b.image = await re.update(
1718
- re.coverImagePath(),
1719
- M.value
1720
- )), await be.update(b), await n.readMembership(), u.value = n.membership;
1721
- },
1722
- {
1723
- message: "Updating membership",
1724
- successMessage: "Membership updated successfully"
1725
- }
1726
- );
1727
- }
1728
- async function L() {
1729
- const E = await be.getEmailAddresses();
1730
- console.log(E), g.value = E, A.value = E.find((b) => b.default.includes("Marketing"));
1731
- }
1732
- async function V() {
1733
- window.open(
1734
- `${Be.licensePortalUrl}business/${Ge.businessId}/settings`,
1735
- "_blank"
1736
- );
1737
- }
1738
- async function R() {
1739
- const E = `${Be.licensePortalUrl}settings?businessId=${Ge.businessId}`;
1740
- console.log("Opening", E), window.open(E, "_blank");
1741
- }
1742
- return Ze(async () => {
1743
- await r(async () => {
1744
- await o.readPremium(), await o.readLocations(), await o.readLocationDevices(), await n.readMembership(), await L(), u.value = n.membership;
1745
- try {
1746
- const { content: E } = await be.getDefaultWelcomeMessage();
1747
- E && (y.value = E);
1748
- } catch (E) {
1749
- console.error("Failed to load default welcome message", E);
1750
- }
1751
- });
1752
- }), (E, b) => {
1753
- var ze, He, Ke, Oe, Ye, Je, je;
1754
- const F = N("FmPageHead"), K = N("FmButton"), ie = N("FmTextField"), he = N("FmCard"), xe = N("FmPill"), vt = N("FmSelect"), $e = N("FmSwitch"), _t = N("FmMenuDivider");
1755
- return U(), x(Z, null, [
1756
- P(F, {
1757
- title: c(d)("connect.setting.title"),
1758
- class: "xs:hidden"
1759
- }, null, 8, ["title"]),
1760
- p("div", On, [
1761
- p("div", Yn, B(c(d)("connect.setting.basicInfo.title")), 1),
1762
- P(K, {
1763
- icon: "info",
1764
- variant: "tertiary"
1765
- })
1766
- ]),
1767
- c(u) ? (U(), x("div", Jn, [
1768
- p("div", jn, [
1769
- p("div", qn, B(c(d)("connect.setting.basicInfo.title")), 1),
1770
- p("div", Gn, [
1771
- P(ie, {
1772
- label: c(d)("connect.setting.basicInfo.membershipTitle"),
1773
- modelValue: c(u).name,
1774
- "onUpdate:modelValue": b[0] || (b[0] = (_) => c(u).name = _)
1775
- }, null, 8, ["label", "modelValue"]),
1776
- P(ie, {
1777
- disabled: !0,
1778
- "model-value": c(u).business,
1779
- rules: f,
1780
- required: !0,
1781
- label: c(d)("connect.setting.basicInfo.memberAppUrl"),
1782
- "helper-text": c(C),
1783
- placeholder: c(u).business.toString(),
1784
- "onUpdate:modelValue": b[2] || (b[2] = (_) => c(u).url = _)
1785
- }, {
1786
- prepend: H(() => [...b[14] || (b[14] = [
1787
- W(" https:// ", -1)
1788
- ])]),
1789
- append: H(() => [
1790
- W(" ." + B(c(w)) + " ", 1),
1791
- P(K, {
1792
- icon: "content_copy",
1793
- variant: "tertiary",
1794
- onClick: b[1] || (b[1] = (_) => c(ot)(c(C)))
1795
- })
1796
- ]),
1797
- _: 1
1798
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1799
- P(Tt, {
1800
- label: "Cover image",
1801
- class: "w-2/3 xs:w-full",
1802
- "image-fit": "cover",
1803
- "aspect-ratio": "3/1",
1804
- thumbnail: c(u).image || void 0,
1805
- "onUpdate:file": b[3] || (b[3] = async (_) => {
1806
- M.value = _, _ || (c(u).image = null);
1807
- })
1808
- }, null, 8, ["thumbnail"]),
1809
- p("div", Qn, [
1810
- p("div", Xn, B(c(d)("connect.setting.counterApp.title")), 1),
1811
- P(K, {
1812
- variant: "plain",
1813
- icon: "link",
1814
- label: c(d)("connect.setting.counterApp.linkDevice"),
1815
- onClick: S
1816
- }, null, 8, ["label"]),
1817
- (U(!0), x(Z, null, Me(c(o).locationDevices, (_, D) => (U(), te(he, {
1818
- key: D,
1819
- variant: "outlined",
1820
- class: "flex items-center justify-between px-16 py-12"
1821
- }, {
1822
- default: H(() => [
1823
- p("div", null, [
1824
- p("p", Wn, B(_.name || `Device ${_._id}`), 1),
1825
- p("p", Zn, B(c(d)("connect.setting.counterApp.device.activationDate")) + " " + B(c(Bt)(c($t)(_._id.toString())).format(
1826
- "D MMM YYYY"
1827
- )), 1),
1828
- p("p", eo, B(c(d)("connect.setting.counterApp.device.linkedLocation")) + " " + B(c(o).locations.find((O) => O._id == _.location).name), 1)
1829
- ]),
1830
- P(K, {
1831
- icon: "link_off",
1832
- variant: "tertiary",
1833
- onClick: (O) => I(_._id)
1834
- }, null, 8, ["onClick"])
1835
- ]),
1836
- _: 2
1837
- }, 1024))), 128))
1838
- ]),
1839
- p("div", to, [
1840
- p("div", no, [
1841
- W(B(c(d)("connect.setting.advertisement.title")) + " ", 1),
1842
- P(xe, { variant: "premium" })
1843
- ]),
1844
- P(he, {
1845
- variant: "outlined",
1846
- class: "p-16 flex items-center justify-between"
1847
- }, {
1848
- default: H(() => {
1849
- var _;
1850
- return [
1851
- p("div", null, [
1852
- p("div", oo, B(c(d)("connect.setting.advertisement.manageAd")), 1),
1853
- p("div", so, B(c(d)("connect.setting.advertisement.activeAdsShowing", {
1854
- count: ((_ = c(u).advertisements) == null ? void 0 : _.length) ?? 0
1855
- })), 1)
1856
- ]),
1857
- P(K, {
1858
- label: c(d)("connect.setting.advertisement.manage"),
1859
- icon: "arrow_forward",
1860
- "icon-position": "right",
1861
- disabled: !c(o).isPremium,
1862
- onClick: b[4] || (b[4] = (D) => c(e).push({
1863
- name: c(xt)["$connect-SETTING_ADVERTISEMENTS"]
1864
- }))
1865
- }, null, 8, ["label", "disabled"])
1866
- ];
1867
- }),
1868
- _: 1
1869
- })
1870
- ]),
1871
- p("div", io, [
1872
- b[15] || (b[15] = p("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1873
- P(ie, {
1874
- "model-value": ((ze = c(u)) == null ? void 0 : ze.brand) || "",
1875
- "max-length": 15,
1876
- label: c(d)("connect.setting.sms.brandName"),
1877
- "show-word-count": "",
1878
- "helper-text": c(d)("connect.setting.sms.messageFormat", {
1879
- brand: ((He = c(u)) == null ? void 0 : He.brand) || ""
1880
- }),
1881
- "onUpdate:modelValue": b[5] || (b[5] = (_) => c(u).brand = _)
1882
- }, null, 8, ["model-value", "label", "helper-text"]),
1883
- P(Rt, {
1884
- modelValue: c(u).welcomeMessage,
1885
- "onUpdate:modelValue": b[6] || (b[6] = (_) => c(u).welcomeMessage = _),
1886
- "hide-credit-card": !0,
1887
- variables: c(h),
1888
- placeholder: c(y)
1889
- }, null, 8, ["modelValue", "variables", "placeholder"])
1890
- ]),
1891
- p("div", ro, [
1892
- b[16] || (b[16] = p("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1893
- p("div", lo, B(c(d)("connect.setting.email.description")), 1),
1894
- c(g).length ? ye("", !0) : (U(), te(K, {
1895
- key: 0,
1896
- onClick: V,
1897
- label: c(d)("connect.setting.email.addNewAddress")
1898
- }, null, 8, ["label"])),
1899
- c(g).length ? (U(), x(Z, { key: 1 }, [
1900
- P(vt, {
1901
- "model-value": ((Oe = (Ke = c(u)) == null ? void 0 : Ke.email) == null ? void 0 : Oe.from) || null,
1902
- label: c(d)("connect.setting.email.fromAddress"),
1903
- items: c(g).map((_) => ({
1904
- label: _.emailAddress,
1905
- value: _.emailAddress
1906
- })),
1907
- placeholder: c(A) ? c(A).emailAddress : c(d)("connect.setting.email.noAddressAvailable"),
1908
- "onUpdate:modelValue": b[7] || (b[7] = (_) => {
1909
- var D, O;
1910
- (D = c(u)) != null && D.email || (c(u).email = {
1911
- from: _,
1912
- name: (O = c(g).find((pe) => pe.emailAddress == _)) == null ? void 0 : O.name
1913
- }), c(u).email.from = _ || null;
1914
- }),
1915
- rules: [c(qe).ruleAtPath(c(m), "email.from")]
1916
- }, null, 8, ["model-value", "label", "items", "placeholder", "rules"]),
1917
- P(ie, {
1918
- "model-value": ((Je = (Ye = c(u)) == null ? void 0 : Ye.email) == null ? void 0 : Je.name) || null,
1919
- label: c(d)("connect.setting.email.senderName"),
1920
- disabled: "",
1921
- placeholder: ((je = c(A)) == null ? void 0 : je.name) || null,
1922
- "onUpdate:modelValue": b[8] || (b[8] = (_) => {
1923
- var D;
1924
- (D = c(u)) != null && D.email || (c(u).email = {
1925
- name: _
1926
- }), c(u).email.name = _ || null;
1927
- }),
1928
- rules: [c(qe).ruleAtPath(c(m), "email.name")]
1929
- }, null, 8, ["model-value", "label", "placeholder", "rules"])
1930
- ], 64)) : ye("", !0)
1931
- ]),
1932
- p("div", ao, [
1933
- p("div", co, B(c(d)("connect.setting.whatsapp.title")), 1),
1934
- p("div", uo, B(c(d)("connect.setting.whatsapp.description")), 1),
1935
- P(K, {
1936
- label: c(d)("connect.setting.whatsapp.manageChannel"),
1937
- icon: "open_in_new",
1938
- onClick: b[9] || (b[9] = (_) => R())
1939
- }, null, 8, ["label"])
1940
- ]),
1941
- p("div", fo, [
1942
- p("div", mo, [
1943
- W(B(c(d)("connect.setting.freeCredit.title")) + " ", 1),
1944
- p("span", go, B(c(d)("connect.setting.freeCredit.posVersion")), 1)
1945
- ]),
1946
- P($e, {
1947
- "model-value": c(u).freeCreditAsDiscount ?? !1,
1948
- "onUpdate:modelValue": b[10] || (b[10] = (_) => c(u).freeCreditAsDiscount = _),
1949
- label: c(d)("connect.setting.freeCredit.title"),
1950
- sublabel: c(d)("connect.setting.freeCredit.description"),
1951
- "label-placement": "right",
1952
- value: ""
1953
- }, null, 8, ["model-value", "label", "sublabel"])
1954
- ]),
1955
- p("div", ho, [
1956
- p("div", po, [
1957
- W(B(c(d)("connect.setting.memberCard.title")) + " ", 1),
1958
- P(xe, { variant: "premium" })
1959
- ]),
1960
- P($e, {
1961
- "model-value": c(u).cardEnable ?? !1,
1962
- "onUpdate:modelValue": b[11] || (b[11] = (_) => c(u).cardEnable = _),
1963
- label: "",
1964
- sublabel: c(d)("connect.setting.memberCard.description"),
1965
- "label-placement": "right",
1966
- value: "",
1967
- disabled: !c(o).isPremium
1968
- }, null, 8, ["model-value", "sublabel", "disabled"])
1969
- ]),
1970
- p("div", yo, [
1971
- p("div", wo, B(c(d)("connect.setting.location.title")), 1),
1972
- P(Lt, {
1973
- label: c(d)("connect.setting.location.selectLabel"),
1974
- "model-value": c(u).targetLocation ?? null,
1975
- "onUpdate:modelValue": b[12] || (b[12] = (_) => c(u).targetLocation = _)
1976
- }, null, 8, ["label", "model-value"])
1977
- ]),
1978
- p("div", bo, [
1979
- p("div", Co, B(c(d)("connect.setting.allowedPhoneCountries.title")), 1),
1980
- p("div", vo, B(c(d)("connect.setting.allowedPhoneCountries.description")), 1),
1981
- P(Kn, {
1982
- modelValue: c(u).allowedPhoneCountries,
1983
- "onUpdate:modelValue": b[13] || (b[13] = (_) => c(u).allowedPhoneCountries = _)
1984
- }, null, 8, ["modelValue"])
1985
- ]),
1986
- p("div", _o, [
1987
- P(K, {
1988
- label: c(d)("connect.setting.action.update"),
1989
- type: "button",
1990
- onClick: T,
1991
- disabled: !!c(i).loadingQueue.length,
1992
- loading: !!c(i).loadingQueue.length
1993
- }, null, 8, ["label", "disabled", "loading"])
1994
- ])
1995
- ])
1996
- ]),
1997
- p("div", Eo, [
1998
- P(he, {
1999
- variant: "outlined",
2000
- class: "flex flex-col p-24 gap-8"
2001
- }, {
2002
- default: H(() => {
2003
- var _, D, O;
2004
- return [
2005
- p("div", Ao, B(c(d)("connect.setting.summary.title")), 1),
2006
- P(_t, { class: "my-4" }),
2007
- p("div", null, [
2008
- p("div", Bo, B(c(d)("connect.setting.summary.name")), 1),
2009
- p("div", Po, B(c(u).name), 1)
2010
- ]),
2011
- p("div", null, [
2012
- p("div", Mo, B(c(d)("connect.setting.summary.advertisement")), 1),
2013
- p("div", So, B((((_ = c(u).advertisements) == null ? void 0 : _.length) ?? 0) || c(d)("connect.setting.summary.noAds")), 1)
2014
- ]),
2015
- p("div", null, [
2016
- p("div", Io, B(c(d)("connect.setting.summary.freeCredit")), 1),
2017
- p("div", To, B(c(u).freeCreditAsDiscount ? c(d)("connect.setting.summary.enabled") : c(d)("connect.setting.summary.disabled")), 1)
2018
- ]),
2019
- p("div", null, [
2020
- p("div", No, B(c(d)("connect.setting.summary.locations")), 1),
2021
- p("div", Uo, B(!c(u).targetLocation || c(u).targetLocation.length == c(Se)().locations.length ? c(d)("connect.setting.summary.allLocations") : (O = (D = c(u)) == null ? void 0 : D.targetLocation) == null ? void 0 : O.map(
2022
- (pe) => c(o).locations.find((Et) => Et._id == pe).name
2023
- ).join(", ")), 1)
2024
- ])
2025
- ];
2026
- }),
2027
- _: 1
2028
- })
2029
- ])
2030
- ])) : ye("", !0)
2031
- ], 64);
2032
- };
2033
- }
2034
- });
2035
- export {
2036
- ts as default
2037
- };