@feedmepos/mf-connect 0.1.88-prod → 0.1.90-prod

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 (101) hide show
  1. package/dist/{Analytic-DH7MUeMg.js → Analytic-BMwxfYv_.js} +11 -11
  2. package/dist/{App-BvOPZUJF.js → App-D_SZawqp.js} +7 -7
  3. package/dist/{Bin-CWAeC7oL.js → Bin-Dd1a25j_.js} +8 -8
  4. package/dist/{Broadcast-Vpm-osZ1.js → Broadcast-UAp6rjTh.js} +8 -8
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-v9vJnYoW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CFe8C9fR.js} +7 -7
  6. package/dist/{Card--1s6c8KY.js → Card-CQuGfckK.js} +19 -19
  7. package/dist/{Collections-CEP5FIKv.js → Collections-oWvNX_oo.js} +8 -8
  8. package/dist/{Credit-B6jG7J-g.js → Credit-tGCTd7QC.js} +8 -8
  9. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CQebWG2S.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7h5K6lN.js} +33 -33
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-I7kWbSCC.js → EffectSheet.vue_vue_type_style_index_0_lang-BvIk7GMj.js} +6 -6
  11. package/dist/{Experience-CbDjWVOA.js → Experience-D6w2OyuS.js} +8 -8
  12. package/dist/{FileSaver.min-BYIWYkDq.js → FileSaver.min-9I0Uce_o.js} +1 -1
  13. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  14. package/dist/{Game-IHq538Bo.js → Game-Bj8mS5qz.js} +9 -9
  15. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BcDVLOQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-D3B7IMDV.js} +1 -1
  16. package/dist/{Index-D9n_K2ME.js → Index-Dsexv-ef.js} +10 -10
  17. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-qsD4oq17.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CmB12mvX.js} +1 -1
  18. package/dist/{MainLayout-Bc70mjxN.js → MainLayout-o1wQv9lH.js} +1 -1
  19. package/dist/{Marketing-CpKGEo3O.js → Marketing-Dz0sk_DR.js} +6 -6
  20. package/dist/{Member-hrhNxwha.js → Member-rFVgJTbb.js} +12 -12
  21. package/dist/{MemberList-n8QLDF4q.js → MemberList-BpnL4Fbw.js} +436 -441
  22. package/dist/{MemberTransactions-j9hVfdXy.js → MemberTransactions-ouq288EU.js} +1 -1
  23. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BqZzvVzE.js → MessageInput.vue_vue_type_script_setup_true_lang-wSeJMwF7.js} +9 -9
  24. package/dist/{Mission-C8RMYHS3.js → Mission-D1KR53bD.js} +9 -9
  25. package/dist/{Overview-BCV9GgGm.js → Overview-B5bzlo0A.js} +19 -19
  26. package/dist/{Point-D0FZORv-.js → Point-DTifJVdo.js} +8 -8
  27. package/dist/{Promotion-BTGNqPNj.js → Promotion-DAtAw5kG.js} +9 -9
  28. package/dist/{Queue-C7GqeBJW.js → Queue-DBnvPuuW.js} +11 -11
  29. package/dist/{Record-BeBFQIEI.js → Record-DI-q_FuN.js} +9 -9
  30. package/dist/{Reward-Kg5NPKOW.js → Reward-C9CxDqz_.js} +16 -16
  31. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CM10gZbi.js → RewardGroup.vue_vue_type_script_setup_true_lang-BBE5Ymqj.js} +12 -12
  32. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-I6R4IoFi.js → RuleGroup.vue_vue_type_script_setup_true_lang-DNM6f0iG.js} +15 -15
  33. package/dist/{Segment-CedyZCDq.js → Segment-B0Oy6ajr.js} +25 -25
  34. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DClugt2g.js → SelectItems.vue_vue_type_script_setup_true_lang-Be6Ykmkc.js} +2 -2
  35. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CYLrSMH0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-MARrd7Nr.js} +13 -13
  36. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-w9sbHf1G.js +226 -0
  37. package/dist/Setting-BUfHh3b6.js +2028 -0
  38. package/dist/{SettingAdvertisements-QtQravAS.js → SettingAdvertisements-D2qWdId7.js} +12 -12
  39. package/dist/{Store-Dg_Yt9y4.js → Store-mNM5AzFJ.js} +22 -22
  40. package/dist/{StoreRewards-D2Yjoezr.js → StoreRewards-D4-c0EPM.js} +15 -15
  41. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-tk42owGe.js +1118 -0
  42. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DoAu3ED_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C65gN2Gd.js} +5 -3
  43. package/dist/{Tier-I0cBxFGl.js → Tier-swAmEa8-.js} +22 -22
  44. package/dist/{Title-DkOrhFzS.js → Title-BQQBoFOx.js} +21 -21
  45. package/dist/{Transaction-DpkU2Z6k.js → Transaction-BCjSkDrw.js} +2 -2
  46. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DhriFqY7.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-IDqjTwZt.js} +6 -6
  47. package/dist/{Voucher-D3IusL1Y.js → Voucher-BAGLTdGv.js} +12 -12
  48. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjbJ9RtI.js → VoucherEditor.vue_vue_type_script_setup_true_lang-7CKmTEVm.js} +12 -12
  49. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CfDMVHu8.js → ZodTextField.vue_vue_type_script_setup_true_lang-B_0BhFd7.js} +2 -2
  50. package/dist/{app-B4ceipxD.js → app-Dij-Gw3J.js} +49 -45
  51. package/dist/app.js +1 -1
  52. package/dist/{business--9g8v1Jk.js → business-BPttWtAG.js} +1 -1
  53. package/dist/{campaign-DDyRrYaq.js → campaign-DVQC46G6.js} +8 -8
  54. package/dist/{campaign-CHNmre5g.js → campaign-PkE8sv2w.js} +1 -1
  55. package/dist/{campaign.enum-B60QwrsD.js → campaign.enum-D6sGv-i6.js} +1 -1
  56. package/dist/{campaign.fn-DkT_XzKV.js → campaign.fn-CKpORxQM.js} +169 -169
  57. package/dist/{collectible.enum-CXihiAPI.js → collectible.enum-MjUCS47s.js} +1 -1
  58. package/dist/{collection.fn-135DMEWY.js → collection.fn-BgLy48_a.js} +2 -2
  59. package/dist/{dto-CFddY1Mk.js → dto-Cr1_4S0y.js} +4 -4
  60. package/dist/{effect-CAbTi9gd.js → effect-CZOUmaXH.js} +1 -1
  61. package/dist/{email-addresses-DabtIvSg.js → email-addresses-DgPF09-i.js} +2 -2
  62. package/dist/{export-Cnb1qaSr.js → export-BGwLWDbw.js} +3 -3
  63. package/dist/{helper-TmvjXMkn.js → helper-BpGjM57Y.js} +1 -1
  64. package/dist/{index-H-ZlVzI4.js → index-8Mt35h00.js} +3 -3
  65. package/dist/{index-DvfZn-AO.js → index-AGdd55s3.js} +3 -3
  66. package/dist/{index-DRSol6ON.js → index-BzNxgycz.js} +1 -1
  67. package/dist/{index-BOZq4xp0.js → index-C2b2PGqB.js} +3 -3
  68. package/dist/{index-DYfvKVuf.js → index-CZbs1ScI.js} +1 -1
  69. package/dist/index-CsjJKy32.js +85 -0
  70. package/dist/{index-DhzPWYCm.js → index-D3jQoHcb.js} +23 -12
  71. package/dist/{index-C71oKRli.js → index-DG88MQyX.js} +1 -1
  72. package/dist/{index-CLvNN2TN.js → index-DVtnOY4x.js} +6 -6
  73. package/dist/{index-DE6QO1GD.js → index-DjEcMAQl.js} +1 -1
  74. package/dist/{index-CR6n1KJO.js → index-Dx04wWQ2.js} +4 -4
  75. package/dist/{index-CGZ7y8Nw.js → index-dSK3QWJX.js} +1 -1
  76. package/dist/{index-BB3m_Vvq.js → index-qGQhKrNH.js} +5 -3
  77. package/dist/{index.esm2017-DFzo1fgU.js → index.esm2017-BnCWqavv.js} +1 -1
  78. package/dist/{loading-Bxz_czvo.js → loading-kCbpDTvS.js} +1 -1
  79. package/dist/{lodash-BxKnmCIx.js → lodash-C4AZ3S-J.js} +1 -1
  80. package/dist/{membership-8JAQtDJg.js → membership-D2-ldXWY.js} +3 -3
  81. package/dist/{money-Diy9s426.js → money-BueaFHxA.js} +1 -1
  82. package/dist/{number-X7dL-fLQ.js → number-DQbzn_l_.js} +1 -1
  83. package/dist/{objectid-YtPYacEi.js → objectid-B_jNHjAd.js} +5 -5
  84. package/dist/{plugins-BZVsan_J.js → plugins-D5Na7PGX.js} +3 -3
  85. package/dist/{reward-DBMDUfD_.js → reward-DJqNxI9u.js} +1 -1
  86. package/dist/{rule-D7c4bEcg.js → rule-CHRKj3Qt.js} +3 -3
  87. package/dist/{rule-builder-CsB4hJee.js → rule-builder-CEZ2VxtL.js} +1 -1
  88. package/dist/{template-B1BsXMbV.js → template-BFhV6iql.js} +7 -7
  89. package/dist/{timezone-3lPXoGaK.js → timezone-BQhT-oxQ.js} +5 -3
  90. package/dist/{trigger-CCc-xwrQ.js → trigger-nhg31Cm2.js} +5 -5
  91. package/dist/usePagination-z6Io9pE3.js +220 -0
  92. package/dist/{user-DPbEx8dH.js → user-uP7Z7WUa.js} +1 -1
  93. package/dist/{vue-i18n-DpB0kfM3.js → vue-i18n-DYzNH5z4.js} +258 -258
  94. package/dist/{xlsx-CmTsMcSJ.js → xlsx-DTeYpknU.js} +1 -1
  95. package/dist/{zod-DvaskSX-.js → zod-YWGh4sc1.js} +1 -1
  96. package/package.json +1 -1
  97. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-D6zlvgMa.js +0 -148
  98. package/dist/Setting-CkieobUB.js +0 -1989
  99. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CLaGyjd9.js +0 -1016
  100. package/dist/index-D83ZCuxk.js +0 -76
  101. package/dist/usePagination-RN_u8hW4.js +0 -223
@@ -1,1989 +0,0 @@
1
- import { defineComponent as Me, ref as O, computed as K, onMounted as Qe, resolveComponent as L, openBlock as x, createBlock as le, withCtx as Y, createElementVNode as h, createVNode as S, unref as c, isRef as Xe, createElementBlock as oe, Fragment as pe, toDisplayString as B, createTextVNode as Q, renderList as _t, createCommentVNode as ye } from "vue";
2
- import { h as Et } from "./moment-D7p2TMB-.js";
3
- import { Z as Ke } from "./zod-DvaskSX-.js";
4
- import { useDialog as Ze } from "@feedmepos/ui-library";
5
- import { u as At } from "./loading-Bxz_czvo.js";
6
- import { u as Bt } from "./app-wDQR6dpb.js";
7
- import { u as Ae, l as We } from "./business--9g8v1Jk.js";
8
- import { u as et } from "./membership-8JAQtDJg.js";
9
- import { P as Pt } from "./index-DvfZn-AO.js";
10
- import { s as St, k as It } from "./index-CR6n1KJO.js";
11
- import { _ as Mt } from "./ImageInput.vue_vue_type_script_setup_true_lang-BcDVLOQ_.js";
12
- import { a as tt, p as Tt, f as se } from "./plugins-BZVsan_J.js";
13
- import { _ as Nt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DoAu3ED_.js";
14
- import { u as nt } from "./vue-i18n-DpB0kfM3.js";
15
- import { M as Ut, _ as Lt } from "./MessageInput.vue_vue_type_script_setup_true_lang-BqZzvVzE.js";
16
- import { useCoreStore as Ft } from "@feedmepos/mf-common";
17
- import { useRouter as Rt } from "vue-router";
18
- import { R as kt } from "./app-B4ceipxD.js";
19
- import { m as Ye } from "./index-DRSol6ON.js";
20
- import { S as je } from "./index-BB3m_Vvq.js";
21
- import { o as Dt } from "./objectId-dwaoBfJX.js";
22
- import { a as Vt } from "./object-qECH92oz.js";
23
- var ee = {}, $t = function() {
24
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
25
- }, ot = {}, F = {};
26
- let Te;
27
- const xt = [
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
- F.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
- F.getSymbolTotalCodewords = function(e) {
77
- return xt[e];
78
- };
79
- F.getBCHDigit = function(t) {
80
- let e = 0;
81
- for (; t !== 0; )
82
- e++, t >>>= 1;
83
- return e;
84
- };
85
- F.setToSJISFunction = function(e) {
86
- if (typeof e != "function")
87
- throw new Error('"toSJISFunc" is not a valid function.');
88
- Te = e;
89
- };
90
- F.isKanjiModeEnabled = function() {
91
- return typeof Te < "u";
92
- };
93
- F.toSJIS = function(e) {
94
- return Te(e);
95
- };
96
- var ue = {};
97
- (function(t) {
98
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
99
- function e(r) {
100
- if (typeof r != "string")
101
- throw new Error("Param is not a string");
102
- switch (r.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: " + r);
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, n) {
122
- if (t.isValid(s))
123
- return s;
124
- try {
125
- return e(s);
126
- } catch {
127
- return n;
128
- }
129
- };
130
- })(ue);
131
- function st() {
132
- this.buffer = [], this.length = 0;
133
- }
134
- st.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 r = 0; r < e; r++)
141
- this.putBit((t >>> e - r - 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 zt = st;
152
- function te(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
- te.prototype.set = function(t, e, r, s) {
158
- const n = t * this.size + e;
159
- this.data[n] = r, s && (this.reservedBit[n] = !0);
160
- };
161
- te.prototype.get = function(t, e) {
162
- return this.data[t * this.size + e];
163
- };
164
- te.prototype.xor = function(t, e, r) {
165
- this.data[t * this.size + e] ^= r;
166
- };
167
- te.prototype.isReserved = function(t, e) {
168
- return this.reservedBit[t * this.size + e];
169
- };
170
- var Ht = te, rt = {};
171
- (function(t) {
172
- const e = F.getSymbolSize;
173
- t.getRowColCoords = function(s) {
174
- if (s === 1) return [];
175
- const n = Math.floor(s / 7) + 2, o = e(s), i = o === 145 ? 26 : Math.ceil((o - 13) / (2 * n - 2)) * 2, a = [o - 7];
176
- for (let l = 1; l < n - 1; l++)
177
- a[l] = a[l - 1] - i;
178
- return a.push(6), a.reverse();
179
- }, t.getPositions = function(s) {
180
- const n = [], o = t.getRowColCoords(s), i = o.length;
181
- for (let a = 0; a < i; a++)
182
- for (let l = 0; l < i; l++)
183
- a === 0 && l === 0 || // top-left
184
- a === 0 && l === i - 1 || // bottom-left
185
- a === i - 1 && l === 0 || n.push([o[a], o[l]]);
186
- return n;
187
- };
188
- })(rt);
189
- var it = {};
190
- const Ot = F.getSymbolSize, Je = 7;
191
- it.getPositions = function(e) {
192
- const r = Ot(e);
193
- return [
194
- // top-left
195
- [0, 0],
196
- // top-right
197
- [r - Je, 0],
198
- // bottom-left
199
- [0, r - Je]
200
- ];
201
- };
202
- var lt = {};
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(n) {
221
- return n != null && n !== "" && !isNaN(n) && n >= 0 && n <= 7;
222
- }, t.from = function(n) {
223
- return t.isValid(n) ? parseInt(n, 10) : void 0;
224
- }, t.getPenaltyN1 = function(n) {
225
- const o = n.size;
226
- let i = 0, a = 0, l = 0, u = null, f = null;
227
- for (let E = 0; E < o; E++) {
228
- a = l = 0, u = f = null;
229
- for (let g = 0; g < o; g++) {
230
- let m = n.get(E, g);
231
- m === u ? a++ : (a >= 5 && (i += e.N1 + (a - 5)), u = m, a = 1), m = n.get(g, E), m === f ? l++ : (l >= 5 && (i += e.N1 + (l - 5)), f = m, l = 1);
232
- }
233
- a >= 5 && (i += e.N1 + (a - 5)), l >= 5 && (i += e.N1 + (l - 5));
234
- }
235
- return i;
236
- }, t.getPenaltyN2 = function(n) {
237
- const o = n.size;
238
- let i = 0;
239
- for (let a = 0; a < o - 1; a++)
240
- for (let l = 0; l < o - 1; l++) {
241
- const u = n.get(a, l) + n.get(a, l + 1) + n.get(a + 1, l) + n.get(a + 1, l + 1);
242
- (u === 4 || u === 0) && i++;
243
- }
244
- return i * e.N2;
245
- }, t.getPenaltyN3 = function(n) {
246
- const o = n.size;
247
- let i = 0, a = 0, l = 0;
248
- for (let u = 0; u < o; u++) {
249
- a = l = 0;
250
- for (let f = 0; f < o; f++)
251
- a = a << 1 & 2047 | n.get(u, f), f >= 10 && (a === 1488 || a === 93) && i++, l = l << 1 & 2047 | n.get(f, u), f >= 10 && (l === 1488 || l === 93) && i++;
252
- }
253
- return i * e.N3;
254
- }, t.getPenaltyN4 = function(n) {
255
- let o = 0;
256
- const i = n.data.length;
257
- for (let l = 0; l < i; l++) o += n.data[l];
258
- return Math.abs(Math.ceil(o * 100 / i / 5) - 10) * e.N4;
259
- };
260
- function r(s, n, o) {
261
- switch (s) {
262
- case t.Patterns.PATTERN000:
263
- return (n + o) % 2 === 0;
264
- case t.Patterns.PATTERN001:
265
- return n % 2 === 0;
266
- case t.Patterns.PATTERN010:
267
- return o % 3 === 0;
268
- case t.Patterns.PATTERN011:
269
- return (n + o) % 3 === 0;
270
- case t.Patterns.PATTERN100:
271
- return (Math.floor(n / 2) + Math.floor(o / 3)) % 2 === 0;
272
- case t.Patterns.PATTERN101:
273
- return n * o % 2 + n * o % 3 === 0;
274
- case t.Patterns.PATTERN110:
275
- return (n * o % 2 + n * o % 3) % 2 === 0;
276
- case t.Patterns.PATTERN111:
277
- return (n * o % 3 + (n + o) % 2) % 2 === 0;
278
- default:
279
- throw new Error("bad maskPattern:" + s);
280
- }
281
- }
282
- t.applyMask = function(n, o) {
283
- const i = o.size;
284
- for (let a = 0; a < i; a++)
285
- for (let l = 0; l < i; l++)
286
- o.isReserved(l, a) || o.xor(l, a, r(n, l, a));
287
- }, t.getBestMask = function(n, o) {
288
- const i = Object.keys(t.Patterns).length;
289
- let a = 0, l = 1 / 0;
290
- for (let u = 0; u < i; u++) {
291
- o(u), t.applyMask(u, n);
292
- const f = t.getPenaltyN1(n) + t.getPenaltyN2(n) + t.getPenaltyN3(n) + t.getPenaltyN4(n);
293
- t.applyMask(u, n), f < l && (l = f, a = u);
294
- }
295
- return a;
296
- };
297
- })(lt);
298
- var de = {};
299
- const z = ue, re = [
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
- ], ie = [
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
- de.getBlocksCount = function(e, r) {
625
- switch (r) {
626
- case z.L:
627
- return re[(e - 1) * 4 + 0];
628
- case z.M:
629
- return re[(e - 1) * 4 + 1];
630
- case z.Q:
631
- return re[(e - 1) * 4 + 2];
632
- case z.H:
633
- return re[(e - 1) * 4 + 3];
634
- default:
635
- return;
636
- }
637
- };
638
- de.getTotalCodewordsCount = function(e, r) {
639
- switch (r) {
640
- case z.L:
641
- return ie[(e - 1) * 4 + 0];
642
- case z.M:
643
- return ie[(e - 1) * 4 + 1];
644
- case z.Q:
645
- return ie[(e - 1) * 4 + 2];
646
- case z.H:
647
- return ie[(e - 1) * 4 + 3];
648
- default:
649
- return;
650
- }
651
- };
652
- var at = {}, fe = {};
653
- const Z = new Uint8Array(512), ae = new Uint8Array(256);
654
- (function() {
655
- let e = 1;
656
- for (let r = 0; r < 255; r++)
657
- Z[r] = e, ae[e] = r, e <<= 1, e & 256 && (e ^= 285);
658
- for (let r = 255; r < 512; r++)
659
- Z[r] = Z[r - 255];
660
- })();
661
- fe.log = function(e) {
662
- if (e < 1) throw new Error("log(" + e + ")");
663
- return ae[e];
664
- };
665
- fe.exp = function(e) {
666
- return Z[e];
667
- };
668
- fe.mul = function(e, r) {
669
- return e === 0 || r === 0 ? 0 : Z[ae[e] + ae[r]];
670
- };
671
- (function(t) {
672
- const e = fe;
673
- t.mul = function(s, n) {
674
- const o = new Uint8Array(s.length + n.length - 1);
675
- for (let i = 0; i < s.length; i++)
676
- for (let a = 0; a < n.length; a++)
677
- o[i + a] ^= e.mul(s[i], n[a]);
678
- return o;
679
- }, t.mod = function(s, n) {
680
- let o = new Uint8Array(s);
681
- for (; o.length - n.length >= 0; ) {
682
- const i = o[0];
683
- for (let l = 0; l < n.length; l++)
684
- o[l] ^= e.mul(n[l], i);
685
- let a = 0;
686
- for (; a < o.length && o[a] === 0; ) a++;
687
- o = o.slice(a);
688
- }
689
- return o;
690
- }, t.generateECPolynomial = function(s) {
691
- let n = new Uint8Array([1]);
692
- for (let o = 0; o < s; o++)
693
- n = t.mul(n, new Uint8Array([1, e.exp(o)]));
694
- return n;
695
- };
696
- })(at);
697
- const ct = at;
698
- function Ne(t) {
699
- this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
700
- }
701
- Ne.prototype.initialize = function(e) {
702
- this.degree = e, this.genPoly = ct.generateECPolynomial(this.degree);
703
- };
704
- Ne.prototype.encode = function(e) {
705
- if (!this.genPoly)
706
- throw new Error("Encoder not initialized");
707
- const r = new Uint8Array(e.length + this.degree);
708
- r.set(e);
709
- const s = ct.mod(r, this.genPoly), n = this.degree - s.length;
710
- if (n > 0) {
711
- const o = new Uint8Array(this.degree);
712
- return o.set(s, n), o;
713
- }
714
- return s;
715
- };
716
- var Kt = Ne, ut = {}, H = {}, Ue = {};
717
- Ue.isValid = function(e) {
718
- return !isNaN(e) && e >= 1 && e <= 40;
719
- };
720
- var D = {};
721
- const dt = "[0-9]+", Yt = "[A-Z $%*+\\-./:]+";
722
- let W = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
723
- W = W.replace(/u/g, "\\u");
724
- const jt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + W + `)(?:.|[\r
725
- ]))+`;
726
- D.KANJI = new RegExp(W, "g");
727
- D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
728
- D.BYTE = new RegExp(jt, "g");
729
- D.NUMERIC = new RegExp(dt, "g");
730
- D.ALPHANUMERIC = new RegExp(Yt, "g");
731
- const Jt = new RegExp("^" + W + "$"), qt = new RegExp("^" + dt + "$"), Gt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
732
- D.testKanji = function(e) {
733
- return Jt.test(e);
734
- };
735
- D.testNumeric = function(e) {
736
- return qt.test(e);
737
- };
738
- D.testAlphanumeric = function(e) {
739
- return Gt.test(e);
740
- };
741
- (function(t) {
742
- const e = Ue, r = D;
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(o, i) {
762
- if (!o.ccBits) throw new Error("Invalid mode: " + o);
763
- if (!e.isValid(i))
764
- throw new Error("Invalid version: " + i);
765
- return i >= 1 && i < 10 ? o.ccBits[0] : i < 27 ? o.ccBits[1] : o.ccBits[2];
766
- }, t.getBestModeForData = function(o) {
767
- return r.testNumeric(o) ? t.NUMERIC : r.testAlphanumeric(o) ? t.ALPHANUMERIC : r.testKanji(o) ? t.KANJI : t.BYTE;
768
- }, t.toString = function(o) {
769
- if (o && o.id) return o.id;
770
- throw new Error("Invalid mode");
771
- }, t.isValid = function(o) {
772
- return o && o.bit && o.ccBits;
773
- };
774
- function s(n) {
775
- if (typeof n != "string")
776
- throw new Error("Param is not a string");
777
- switch (n.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: " + n);
788
- }
789
- }
790
- t.from = function(o, i) {
791
- if (t.isValid(o))
792
- return o;
793
- try {
794
- return s(o);
795
- } catch {
796
- return i;
797
- }
798
- };
799
- })(H);
800
- (function(t) {
801
- const e = F, r = de, s = ue, n = H, o = Ue, i = 7973, a = e.getBCHDigit(i);
802
- function l(g, m, b) {
803
- for (let _ = 1; _ <= 40; _++)
804
- if (m <= t.getCapacity(_, b, g))
805
- return _;
806
- }
807
- function u(g, m) {
808
- return n.getCharCountIndicator(g, m) + 4;
809
- }
810
- function f(g, m) {
811
- let b = 0;
812
- return g.forEach(function(_) {
813
- const I = u(_.mode, m);
814
- b += I + _.getBitsLength();
815
- }), b;
816
- }
817
- function E(g, m) {
818
- for (let b = 1; b <= 40; b++)
819
- if (f(g, b) <= t.getCapacity(b, m, n.MIXED))
820
- return b;
821
- }
822
- t.from = function(m, b) {
823
- return o.isValid(m) ? parseInt(m, 10) : b;
824
- }, t.getCapacity = function(m, b, _) {
825
- if (!o.isValid(m))
826
- throw new Error("Invalid QR Code version");
827
- typeof _ > "u" && (_ = n.BYTE);
828
- const I = e.getSymbolTotalCodewords(m), d = r.getTotalCodewordsCount(m, b), C = (I - d) * 8;
829
- if (_ === n.MIXED) return C;
830
- const w = C - u(_, m);
831
- switch (_) {
832
- case n.NUMERIC:
833
- return Math.floor(w / 10 * 3);
834
- case n.ALPHANUMERIC:
835
- return Math.floor(w / 11 * 2);
836
- case n.KANJI:
837
- return Math.floor(w / 13);
838
- case n.BYTE:
839
- default:
840
- return Math.floor(w / 8);
841
- }
842
- }, t.getBestVersionForData = function(m, b) {
843
- let _;
844
- const I = s.from(b, s.M);
845
- if (Array.isArray(m)) {
846
- if (m.length > 1)
847
- return E(m, I);
848
- if (m.length === 0)
849
- return 1;
850
- _ = m[0];
851
- } else
852
- _ = m;
853
- return l(_.mode, _.getLength(), I);
854
- }, t.getEncodedBits = function(m) {
855
- if (!o.isValid(m) || m < 7)
856
- throw new Error("Invalid QR Code version");
857
- let b = m << 12;
858
- for (; e.getBCHDigit(b) - a >= 0; )
859
- b ^= i << e.getBCHDigit(b) - a;
860
- return m << 12 | b;
861
- };
862
- })(ut);
863
- var ft = {};
864
- const Be = F, mt = 1335, Qt = 21522, qe = Be.getBCHDigit(mt);
865
- ft.getEncodedBits = function(e, r) {
866
- const s = e.bit << 3 | r;
867
- let n = s << 10;
868
- for (; Be.getBCHDigit(n) - qe >= 0; )
869
- n ^= mt << Be.getBCHDigit(n) - qe;
870
- return (s << 10 | n) ^ Qt;
871
- };
872
- var gt = {};
873
- const Xt = H;
874
- function j(t) {
875
- this.mode = Xt.NUMERIC, this.data = t.toString();
876
- }
877
- j.getBitsLength = function(e) {
878
- return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
879
- };
880
- j.prototype.getLength = function() {
881
- return this.data.length;
882
- };
883
- j.prototype.getBitsLength = function() {
884
- return j.getBitsLength(this.data.length);
885
- };
886
- j.prototype.write = function(e) {
887
- let r, s, n;
888
- for (r = 0; r + 3 <= this.data.length; r += 3)
889
- s = this.data.substr(r, 3), n = parseInt(s, 10), e.put(n, 10);
890
- const o = this.data.length - r;
891
- o > 0 && (s = this.data.substr(r), n = parseInt(s, 10), e.put(n, o * 3 + 1));
892
- };
893
- var Zt = j;
894
- const Wt = H, we = [
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 J(t) {
942
- this.mode = Wt.ALPHANUMERIC, this.data = t;
943
- }
944
- J.getBitsLength = function(e) {
945
- return 11 * Math.floor(e / 2) + 6 * (e % 2);
946
- };
947
- J.prototype.getLength = function() {
948
- return this.data.length;
949
- };
950
- J.prototype.getBitsLength = function() {
951
- return J.getBitsLength(this.data.length);
952
- };
953
- J.prototype.write = function(e) {
954
- let r;
955
- for (r = 0; r + 2 <= this.data.length; r += 2) {
956
- let s = we.indexOf(this.data[r]) * 45;
957
- s += we.indexOf(this.data[r + 1]), e.put(s, 11);
958
- }
959
- this.data.length % 2 && e.put(we.indexOf(this.data[r]), 6);
960
- };
961
- var en = J, tn = function(e) {
962
- for (var r = [], s = e.length, n = 0; n < s; n++) {
963
- var o = e.charCodeAt(n);
964
- if (o >= 55296 && o <= 56319 && s > n + 1) {
965
- var i = e.charCodeAt(n + 1);
966
- i >= 56320 && i <= 57343 && (o = (o - 55296) * 1024 + i - 56320 + 65536, n += 1);
967
- }
968
- if (o < 128) {
969
- r.push(o);
970
- continue;
971
- }
972
- if (o < 2048) {
973
- r.push(o >> 6 | 192), r.push(o & 63 | 128);
974
- continue;
975
- }
976
- if (o < 55296 || o >= 57344 && o < 65536) {
977
- r.push(o >> 12 | 224), r.push(o >> 6 & 63 | 128), r.push(o & 63 | 128);
978
- continue;
979
- }
980
- if (o >= 65536 && o <= 1114111) {
981
- r.push(o >> 18 | 240), r.push(o >> 12 & 63 | 128), r.push(o >> 6 & 63 | 128), r.push(o & 63 | 128);
982
- continue;
983
- }
984
- r.push(239, 191, 189);
985
- }
986
- return new Uint8Array(r).buffer;
987
- };
988
- const nn = tn, on = H;
989
- function q(t) {
990
- this.mode = on.BYTE, typeof t == "string" && (t = nn(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, r = this.data.length; e < r; e++)
1003
- t.put(this.data[e], 8);
1004
- };
1005
- var sn = q;
1006
- const rn = H, ln = F;
1007
- function G(t) {
1008
- this.mode = rn.KANJI, this.data = t;
1009
- }
1010
- G.getBitsLength = function(e) {
1011
- return e * 13;
1012
- };
1013
- G.prototype.getLength = function() {
1014
- return this.data.length;
1015
- };
1016
- G.prototype.getBitsLength = function() {
1017
- return G.getBitsLength(this.data.length);
1018
- };
1019
- G.prototype.write = function(t) {
1020
- let e;
1021
- for (e = 0; e < this.data.length; e++) {
1022
- let r = ln.toSJIS(this.data[e]);
1023
- if (r >= 33088 && r <= 40956)
1024
- r -= 33088;
1025
- else if (r >= 57408 && r <= 60351)
1026
- r -= 49472;
1027
- else
1028
- throw new Error(
1029
- "Invalid SJIS character: " + this.data[e] + `
1030
- Make sure your charset is UTF-8`
1031
- );
1032
- r = (r >>> 8 & 255) * 192 + (r & 255), t.put(r, 13);
1033
- }
1034
- };
1035
- var an = G, ht = { exports: {} };
1036
- (function(t) {
1037
- var e = {
1038
- single_source_shortest_paths: function(r, s, n) {
1039
- var o = {}, i = {};
1040
- i[s] = 0;
1041
- var a = e.PriorityQueue.make();
1042
- a.push(s, 0);
1043
- for (var l, u, f, E, g, m, b, _, I; !a.empty(); ) {
1044
- l = a.pop(), u = l.value, E = l.cost, g = r[u] || {};
1045
- for (f in g)
1046
- g.hasOwnProperty(f) && (m = g[f], b = E + m, _ = i[f], I = typeof i[f] > "u", (I || _ > b) && (i[f] = b, a.push(f, b), o[f] = u));
1047
- }
1048
- if (typeof n < "u" && typeof i[n] > "u") {
1049
- var d = ["Could not find a path from ", s, " to ", n, "."].join("");
1050
- throw new Error(d);
1051
- }
1052
- return o;
1053
- },
1054
- extract_shortest_path_from_predecessor_list: function(r, s) {
1055
- for (var n = [], o = s; o; )
1056
- n.push(o), r[o], o = r[o];
1057
- return n.reverse(), n;
1058
- },
1059
- find_path: function(r, s, n) {
1060
- var o = e.single_source_shortest_paths(r, s, n);
1061
- return e.extract_shortest_path_from_predecessor_list(
1062
- o,
1063
- n
1064
- );
1065
- },
1066
- /**
1067
- * A very naive priority queue implementation.
1068
- */
1069
- PriorityQueue: {
1070
- make: function(r) {
1071
- var s = e.PriorityQueue, n = {}, o;
1072
- r = r || {};
1073
- for (o in s)
1074
- s.hasOwnProperty(o) && (n[o] = s[o]);
1075
- return n.queue = [], n.sorter = r.sorter || s.default_sorter, n;
1076
- },
1077
- default_sorter: function(r, s) {
1078
- return r.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(r, s) {
1085
- var n = { value: r, cost: s };
1086
- this.queue.push(n), 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
- })(ht);
1101
- var cn = ht.exports;
1102
- (function(t) {
1103
- const e = H, r = Zt, s = en, n = sn, o = an, i = D, a = F, l = cn;
1104
- function u(d) {
1105
- return unescape(encodeURIComponent(d)).length;
1106
- }
1107
- function f(d, C, w) {
1108
- const y = [];
1109
- let P;
1110
- for (; (P = d.exec(w)) !== null; )
1111
- y.push({
1112
- data: P[0],
1113
- index: P.index,
1114
- mode: C,
1115
- length: P[0].length
1116
- });
1117
- return y;
1118
- }
1119
- function E(d) {
1120
- const C = f(i.NUMERIC, e.NUMERIC, d), w = f(i.ALPHANUMERIC, e.ALPHANUMERIC, d);
1121
- let y, P;
1122
- return a.isKanjiModeEnabled() ? (y = f(i.BYTE, e.BYTE, d), P = f(i.KANJI, e.KANJI, d)) : (y = f(i.BYTE_KANJI, e.BYTE, d), P = []), C.concat(w, y, P).sort(function(T, U) {
1123
- return T.index - U.index;
1124
- }).map(function(T) {
1125
- return {
1126
- data: T.data,
1127
- mode: T.mode,
1128
- length: T.length
1129
- };
1130
- });
1131
- }
1132
- function g(d, C) {
1133
- switch (C) {
1134
- case e.NUMERIC:
1135
- return r.getBitsLength(d);
1136
- case e.ALPHANUMERIC:
1137
- return s.getBitsLength(d);
1138
- case e.KANJI:
1139
- return o.getBitsLength(d);
1140
- case e.BYTE:
1141
- return n.getBitsLength(d);
1142
- }
1143
- }
1144
- function m(d) {
1145
- return d.reduce(function(C, w) {
1146
- const y = C.length - 1 >= 0 ? C[C.length - 1] : null;
1147
- return y && y.mode === w.mode ? (C[C.length - 1].data += w.data, C) : (C.push(w), C);
1148
- }, []);
1149
- }
1150
- function b(d) {
1151
- const C = [];
1152
- for (let w = 0; w < d.length; w++) {
1153
- const y = d[w];
1154
- switch (y.mode) {
1155
- case e.NUMERIC:
1156
- C.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
- C.push([
1164
- y,
1165
- { data: y.data, mode: e.BYTE, length: y.length }
1166
- ]);
1167
- break;
1168
- case e.KANJI:
1169
- C.push([
1170
- y,
1171
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1172
- ]);
1173
- break;
1174
- case e.BYTE:
1175
- C.push([
1176
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1177
- ]);
1178
- }
1179
- }
1180
- return C;
1181
- }
1182
- function _(d, C) {
1183
- const w = {}, y = { start: {} };
1184
- let P = ["start"];
1185
- for (let M = 0; M < d.length; M++) {
1186
- const T = d[M], U = [];
1187
- for (let k = 0; k < T.length; k++) {
1188
- const A = T[k], p = "" + M + k;
1189
- U.push(p), w[p] = { node: A, lastCount: 0 }, y[p] = {};
1190
- for (let V = 0; V < P.length; V++) {
1191
- const N = P[V];
1192
- w[N] && w[N].node.mode === A.mode ? (y[N][p] = g(w[N].lastCount + A.length, A.mode) - g(w[N].lastCount, A.mode), w[N].lastCount += A.length) : (w[N] && (w[N].lastCount = A.length), y[N][p] = g(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, C));
1193
- }
1194
- }
1195
- P = U;
1196
- }
1197
- for (let M = 0; M < P.length; M++)
1198
- y[P[M]].end = 0;
1199
- return { map: y, table: w };
1200
- }
1201
- function I(d, C) {
1202
- let w;
1203
- const y = e.getBestModeForData(d);
1204
- if (w = e.from(C, y), w !== e.BYTE && w.bit < y.bit)
1205
- throw new Error('"' + d + '" cannot be encoded with mode ' + e.toString(w) + `.
1206
- Suggested mode is: ` + e.toString(y));
1207
- switch (w === e.KANJI && !a.isKanjiModeEnabled() && (w = e.BYTE), w) {
1208
- case e.NUMERIC:
1209
- return new r(d);
1210
- case e.ALPHANUMERIC:
1211
- return new s(d);
1212
- case e.KANJI:
1213
- return new o(d);
1214
- case e.BYTE:
1215
- return new n(d);
1216
- }
1217
- }
1218
- t.fromArray = function(C) {
1219
- return C.reduce(function(w, y) {
1220
- return typeof y == "string" ? w.push(I(y, null)) : y.data && w.push(I(y.data, y.mode)), w;
1221
- }, []);
1222
- }, t.fromString = function(C, w) {
1223
- const y = E(C, a.isKanjiModeEnabled()), P = b(y), M = _(P, w), T = l.find_path(M.map, "start", "end"), U = [];
1224
- for (let k = 1; k < T.length - 1; k++)
1225
- U.push(M.table[T[k]].node);
1226
- return t.fromArray(m(U));
1227
- }, t.rawSplit = function(C) {
1228
- return t.fromArray(
1229
- E(C, a.isKanjiModeEnabled())
1230
- );
1231
- };
1232
- })(gt);
1233
- const me = F, be = ue, un = zt, dn = Ht, fn = rt, mn = it, Pe = lt, Se = de, gn = Kt, ce = ut, hn = ft, pn = H, Ce = gt;
1234
- function yn(t, e) {
1235
- const r = t.size, s = mn.getPositions(e);
1236
- for (let n = 0; n < s.length; n++) {
1237
- const o = s[n][0], i = s[n][1];
1238
- for (let a = -1; a <= 7; a++)
1239
- if (!(o + a <= -1 || r <= o + a))
1240
- for (let l = -1; l <= 7; l++)
1241
- i + l <= -1 || r <= i + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? t.set(o + a, i + l, !0, !0) : t.set(o + a, i + l, !1, !0));
1242
- }
1243
- }
1244
- function wn(t) {
1245
- const e = t.size;
1246
- for (let r = 8; r < e - 8; r++) {
1247
- const s = r % 2 === 0;
1248
- t.set(r, 6, s, !0), t.set(6, r, s, !0);
1249
- }
1250
- }
1251
- function bn(t, e) {
1252
- const r = fn.getPositions(e);
1253
- for (let s = 0; s < r.length; s++) {
1254
- const n = r[s][0], o = r[s][1];
1255
- for (let i = -2; i <= 2; i++)
1256
- for (let a = -2; a <= 2; a++)
1257
- i === -2 || i === 2 || a === -2 || a === 2 || i === 0 && a === 0 ? t.set(n + i, o + a, !0, !0) : t.set(n + i, o + a, !1, !0);
1258
- }
1259
- }
1260
- function Cn(t, e) {
1261
- const r = t.size, s = ce.getEncodedBits(e);
1262
- let n, o, i;
1263
- for (let a = 0; a < 18; a++)
1264
- n = Math.floor(a / 3), o = a % 3 + r - 8 - 3, i = (s >> a & 1) === 1, t.set(n, o, i, !0), t.set(o, n, i, !0);
1265
- }
1266
- function ve(t, e, r) {
1267
- const s = t.size, n = hn.getEncodedBits(e, r);
1268
- let o, i;
1269
- for (o = 0; o < 15; o++)
1270
- i = (n >> o & 1) === 1, o < 6 ? t.set(o, 8, i, !0) : o < 8 ? t.set(o + 1, 8, i, !0) : t.set(s - 15 + o, 8, i, !0), o < 8 ? t.set(8, s - o - 1, i, !0) : o < 9 ? t.set(8, 15 - o - 1 + 1, i, !0) : t.set(8, 15 - o - 1, i, !0);
1271
- t.set(s - 8, 8, 1, !0);
1272
- }
1273
- function vn(t, e) {
1274
- const r = t.size;
1275
- let s = -1, n = r - 1, o = 7, i = 0;
1276
- for (let a = r - 1; a > 0; a -= 2)
1277
- for (a === 6 && a--; ; ) {
1278
- for (let l = 0; l < 2; l++)
1279
- if (!t.isReserved(n, a - l)) {
1280
- let u = !1;
1281
- i < e.length && (u = (e[i] >>> o & 1) === 1), t.set(n, a - l, u), o--, o === -1 && (i++, o = 7);
1282
- }
1283
- if (n += s, n < 0 || r <= n) {
1284
- n -= s, s = -s;
1285
- break;
1286
- }
1287
- }
1288
- }
1289
- function _n(t, e, r) {
1290
- const s = new un();
1291
- r.forEach(function(l) {
1292
- s.put(l.mode.bit, 4), s.put(l.getLength(), pn.getCharCountIndicator(l.mode, t)), l.write(s);
1293
- });
1294
- const n = me.getSymbolTotalCodewords(t), o = Se.getTotalCodewordsCount(t, e), i = (n - o) * 8;
1295
- for (s.getLengthInBits() + 4 <= i && s.put(0, 4); s.getLengthInBits() % 8 !== 0; )
1296
- s.putBit(0);
1297
- const a = (i - s.getLengthInBits()) / 8;
1298
- for (let l = 0; l < a; l++)
1299
- s.put(l % 2 ? 17 : 236, 8);
1300
- return En(s, t, e);
1301
- }
1302
- function En(t, e, r) {
1303
- const s = me.getSymbolTotalCodewords(e), n = Se.getTotalCodewordsCount(e, r), o = s - n, i = Se.getBlocksCount(e, r), a = s % i, l = i - a, u = Math.floor(s / i), f = Math.floor(o / i), E = f + 1, g = u - f, m = new gn(g);
1304
- let b = 0;
1305
- const _ = new Array(i), I = new Array(i);
1306
- let d = 0;
1307
- const C = new Uint8Array(t.buffer);
1308
- for (let T = 0; T < i; T++) {
1309
- const U = T < l ? f : E;
1310
- _[T] = C.slice(b, b + U), I[T] = m.encode(_[T]), b += U, d = Math.max(d, U);
1311
- }
1312
- const w = new Uint8Array(s);
1313
- let y = 0, P, M;
1314
- for (P = 0; P < d; P++)
1315
- for (M = 0; M < i; M++)
1316
- P < _[M].length && (w[y++] = _[M][P]);
1317
- for (P = 0; P < g; P++)
1318
- for (M = 0; M < i; M++)
1319
- w[y++] = I[M][P];
1320
- return w;
1321
- }
1322
- function An(t, e, r, s) {
1323
- let n;
1324
- if (Array.isArray(t))
1325
- n = Ce.fromArray(t);
1326
- else if (typeof t == "string") {
1327
- let u = e;
1328
- if (!u) {
1329
- const f = Ce.rawSplit(t);
1330
- u = ce.getBestVersionForData(f, r);
1331
- }
1332
- n = Ce.fromString(t, u || 40);
1333
- } else
1334
- throw new Error("Invalid data");
1335
- const o = ce.getBestVersionForData(n, r);
1336
- if (!o)
1337
- throw new Error("The amount of data is too big to be stored in a QR Code");
1338
- if (!e)
1339
- e = o;
1340
- else if (e < o)
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: ` + o + `.
1345
- `
1346
- );
1347
- const i = _n(e, r, n), a = me.getSymbolSize(e), l = new dn(a);
1348
- return yn(l, e), wn(l), bn(l, e), ve(l, r, 0), e >= 7 && Cn(l, e), vn(l, i), isNaN(s) && (s = Pe.getBestMask(
1349
- l,
1350
- ve.bind(null, l, r)
1351
- )), Pe.applyMask(s, l), ve(l, r, s), {
1352
- modules: l,
1353
- version: e,
1354
- errorCorrectionLevel: r,
1355
- maskPattern: s,
1356
- segments: n
1357
- };
1358
- }
1359
- ot.create = function(e, r) {
1360
- if (typeof e > "u" || e === "")
1361
- throw new Error("No input text");
1362
- let s = be.M, n, o;
1363
- return typeof r < "u" && (s = be.from(r.errorCorrectionLevel, be.M), n = ce.from(r.version), o = Pe.from(r.maskPattern), r.toSJISFunc && me.setToSJISFunction(r.toSJISFunc)), An(e, n, s, o);
1364
- };
1365
- var pt = {}, Le = {};
1366
- (function(t) {
1367
- function e(r) {
1368
- if (typeof r == "number" && (r = r.toString()), typeof r != "string")
1369
- throw new Error("Color should be defined as hex string");
1370
- let s = r.slice().replace("#", "").split("");
1371
- if (s.length < 3 || s.length === 5 || s.length > 8)
1372
- throw new Error("Invalid hex color: " + r);
1373
- (s.length === 3 || s.length === 4) && (s = Array.prototype.concat.apply([], s.map(function(o) {
1374
- return [o, o];
1375
- }))), s.length === 6 && s.push("F", "F");
1376
- const n = parseInt(s.join(""), 16);
1377
- return {
1378
- r: n >> 24 & 255,
1379
- g: n >> 16 & 255,
1380
- b: n >> 8 & 255,
1381
- a: n & 255,
1382
- hex: "#" + s.slice(0, 6).join("")
1383
- };
1384
- }
1385
- t.getOptions = function(s) {
1386
- s || (s = {}), s.color || (s.color = {});
1387
- const n = typeof s.margin > "u" || s.margin === null || s.margin < 0 ? 4 : s.margin, o = s.width && s.width >= 21 ? s.width : void 0, i = s.scale || 4;
1388
- return {
1389
- width: o,
1390
- scale: o ? 4 : i,
1391
- margin: n,
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, n) {
1400
- return n.width && n.width >= s + n.margin * 2 ? n.width / (s + n.margin * 2) : n.scale;
1401
- }, t.getImageWidth = function(s, n) {
1402
- const o = t.getScale(s, n);
1403
- return Math.floor((s + n.margin * 2) * o);
1404
- }, t.qrToImageData = function(s, n, o) {
1405
- const i = n.modules.size, a = n.modules.data, l = t.getScale(i, o), u = Math.floor((i + o.margin * 2) * l), f = o.margin * l, E = [o.color.light, o.color.dark];
1406
- for (let g = 0; g < u; g++)
1407
- for (let m = 0; m < u; m++) {
1408
- let b = (g * u + m) * 4, _ = o.color.light;
1409
- if (g >= f && m >= f && g < u - f && m < u - f) {
1410
- const I = Math.floor((g - f) / l), d = Math.floor((m - f) / l);
1411
- _ = E[a[I * i + d] ? 1 : 0];
1412
- }
1413
- s[b++] = _.r, s[b++] = _.g, s[b++] = _.b, s[b] = _.a;
1414
- }
1415
- };
1416
- })(Le);
1417
- (function(t) {
1418
- const e = Le;
1419
- function r(n, o, i) {
1420
- n.clearRect(0, 0, o.width, o.height), o.style || (o.style = {}), o.height = i, o.width = i, o.style.height = i + "px", o.style.width = i + "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(o, i, a) {
1430
- let l = a, u = i;
1431
- typeof l > "u" && (!i || !i.getContext) && (l = i, i = void 0), i || (u = s()), l = e.getOptions(l);
1432
- const f = e.getImageWidth(o.modules.size, l), E = u.getContext("2d"), g = E.createImageData(f, f);
1433
- return e.qrToImageData(g.data, o, l), r(E, u, f), E.putImageData(g, 0, 0), u;
1434
- }, t.renderToDataURL = function(o, i, a) {
1435
- let l = a;
1436
- typeof l > "u" && (!i || !i.getContext) && (l = i, i = void 0), l || (l = {});
1437
- const u = t.render(o, i, l), f = l.type || "image/png", E = l.rendererOpts || {};
1438
- return u.toDataURL(f, E.quality);
1439
- };
1440
- })(pt);
1441
- var yt = {};
1442
- const Bn = Le;
1443
- function Ge(t, e) {
1444
- const r = t.a / 255, s = e + '="' + t.hex + '"';
1445
- return r < 1 ? s + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : s;
1446
- }
1447
- function _e(t, e, r) {
1448
- let s = t + e;
1449
- return typeof r < "u" && (s += " " + r), s;
1450
- }
1451
- function Pn(t, e, r) {
1452
- let s = "", n = 0, o = !1, i = 0;
1453
- for (let a = 0; a < t.length; a++) {
1454
- const l = Math.floor(a % e), u = Math.floor(a / e);
1455
- !l && !o && (o = !0), t[a] ? (i++, a > 0 && l > 0 && t[a - 1] || (s += o ? _e("M", l + r, 0.5 + u + r) : _e("m", n, 0), n = 0, o = !1), l + 1 < e && t[a + 1] || (s += _e("h", i), i = 0)) : n++;
1456
- }
1457
- return s;
1458
- }
1459
- yt.render = function(e, r, s) {
1460
- const n = Bn.getOptions(r), o = e.modules.size, i = e.modules.data, a = o + n.margin * 2, l = n.color.light.a ? "<path " + Ge(n.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", u = "<path " + Ge(n.color.dark, "stroke") + ' d="' + Pn(i, o, n.margin) + '"/>', f = 'viewBox="0 0 ' + a + " " + a + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (n.width ? 'width="' + n.width + '" height="' + n.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + l + u + `</svg>
1461
- `;
1462
- return typeof s == "function" && s(null, g), g;
1463
- };
1464
- const Sn = $t, Ie = ot, wt = pt, In = yt;
1465
- function Fe(t, e, r, s, n) {
1466
- const o = [].slice.call(arguments, 1), i = o.length, a = typeof o[i - 1] == "function";
1467
- if (!a && !Sn())
1468
- throw new Error("Callback required as last argument");
1469
- if (a) {
1470
- if (i < 2)
1471
- throw new Error("Too few arguments provided");
1472
- i === 2 ? (n = r, r = e, e = s = void 0) : i === 3 && (e.getContext && typeof n > "u" ? (n = s, s = void 0) : (n = s, s = r, r = e, e = void 0));
1473
- } else {
1474
- if (i < 1)
1475
- throw new Error("Too few arguments provided");
1476
- return i === 1 ? (r = e, e = s = void 0) : i === 2 && !e.getContext && (s = r, r = e, e = void 0), new Promise(function(l, u) {
1477
- try {
1478
- const f = Ie.create(r, s);
1479
- l(t(f, e, s));
1480
- } catch (f) {
1481
- u(f);
1482
- }
1483
- });
1484
- }
1485
- try {
1486
- const l = Ie.create(r, s);
1487
- n(null, t(l, e, s));
1488
- } catch (l) {
1489
- n(l);
1490
- }
1491
- }
1492
- ee.create = Ie.create;
1493
- ee.toCanvas = Fe.bind(null, wt.render);
1494
- ee.toDataURL = Fe.bind(null, wt.renderToDataURL);
1495
- ee.toString = Fe.bind(null, function(t, e, r) {
1496
- return In.render(t, r);
1497
- });
1498
- async function Mn(t, e = 350) {
1499
- try {
1500
- return await ee.toDataURL(t, {
1501
- width: e,
1502
- margin: 0
1503
- });
1504
- } catch (r) {
1505
- console.error(r);
1506
- }
1507
- }
1508
- var Tn = { 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 Nn = { class: "flex items-start" }, Un = { class: "flex flex-col gap-16 mt-16" }, Ln = ["src"], Fn = /* @__PURE__ */ Me({
1510
- __name: "LinkDeviceDialog",
1511
- setup(t) {
1512
- const e = Ae(), r = et(), s = Ze(), n = O(), o = O(), i = Tn.crmUrl, a = O(), l = K(() => r.membership), u = K(() => {
1513
- var g, m;
1514
- return `https://${(g = l.value) != null && g.url ? l.value.url : (m = l.value) == null ? void 0 : m.business}.${i}`;
1515
- });
1516
- async function f(g) {
1517
- const m = await We.getOtp(g);
1518
- return `${u.value}?link-device=${m.otp}`;
1519
- }
1520
- async function E(g) {
1521
- const m = await f(g);
1522
- a.value = m, n.value = await Mn(m);
1523
- }
1524
- return Qe(async () => {
1525
- if (await e.readLocations(), !e.locations.length) {
1526
- s.close();
1527
- return;
1528
- }
1529
- const g = e.locations[0]._id;
1530
- o.value = g, await E(g);
1531
- }), (g, m) => {
1532
- const b = L("FmIcon"), _ = L("FmSelect"), I = L("FmButton"), d = L("FmCard");
1533
- return x(), le(d, { class: "p-24 max-w-[350px]" }, {
1534
- default: Y(() => [
1535
- h("div", Nn, [
1536
- m[3] || (m[3] = h("div", null, [
1537
- h("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1538
- h("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1539
- ], -1)),
1540
- S(b, {
1541
- name: "close",
1542
- onClick: m[0] || (m[0] = (C) => c(s).close()),
1543
- class: "cursor-pointer"
1544
- })
1545
- ]),
1546
- h("div", Un, [
1547
- S(_, {
1548
- modelValue: c(o),
1549
- "onUpdate:modelValue": [
1550
- m[1] || (m[1] = (C) => Xe(o) ? o.value = C : null),
1551
- E
1552
- ],
1553
- label: "Select Location",
1554
- items: c(e).locationItems.filter((C) => !!C.value)
1555
- }, null, 8, ["modelValue", "items"]),
1556
- h("img", {
1557
- src: c(n),
1558
- class: "aspect-square w-full"
1559
- }, null, 8, Ln),
1560
- S(I, {
1561
- class: "mx-auto",
1562
- variant: "plain",
1563
- icon: "content_copy",
1564
- onClick: m[2] || (m[2] = (C) => c(tt)(c(a)))
1565
- })
1566
- ])
1567
- ]),
1568
- _: 1
1569
- });
1570
- };
1571
- }
1572
- }), X = "__ALL__", Rn = /* @__PURE__ */ Me({
1573
- __name: "AllowedPhoneCountriesSelect",
1574
- props: {
1575
- modelValue: {}
1576
- },
1577
- emits: ["update:modelValue"],
1578
- setup(t, { emit: e }) {
1579
- const { t: r } = nt(), s = t, n = e, o = Pt.map((f) => ({
1580
- label: `${f.name} (${f.phoneCode})`,
1581
- value: f.phoneCode
1582
- })), i = K(() => [
1583
- {
1584
- label: r("connect.setting.allowedPhoneCountries.allCountries"),
1585
- value: X
1586
- },
1587
- ...o
1588
- ]), a = K(() => {
1589
- const f = s.modelValue;
1590
- return Array.isArray(f) && f.length === 0;
1591
- }), l = K({
1592
- get() {
1593
- const f = s.modelValue;
1594
- return f == null ? [X] : f.length === 0 ? [] : [...f];
1595
- },
1596
- set(f) {
1597
- const E = l.value;
1598
- if (f.filter((m) => !E.includes(m)).includes(X))
1599
- n("update:modelValue", null);
1600
- else {
1601
- const m = f.filter((b) => b !== X);
1602
- m.length === 0 && !a.value ? n("update:modelValue", null) : n("update:modelValue", m);
1603
- }
1604
- }
1605
- }), u = K(() => a.value ? r("connect.setting.allowedPhoneCountries.helper.noneAllowed") : l.value.includes(X) || l.value.length === 0 ? r("connect.setting.allowedPhoneCountries.helper.allAllowed") : r("connect.setting.allowedPhoneCountries.helper.selectedOnly"));
1606
- return (f, E) => {
1607
- const g = L("FmSelect");
1608
- return x(), le(g, {
1609
- modelValue: c(l),
1610
- "onUpdate:modelValue": E[0] || (E[0] = (m) => Xe(l) ? l.value = m : null),
1611
- label: c(r)("connect.setting.allowedPhoneCountries.label"),
1612
- items: c(i),
1613
- multiselect: "",
1614
- searchable: "",
1615
- searchTarget: "label",
1616
- placeholder: c(r)("connect.setting.allowedPhoneCountries.placeholder"),
1617
- "helper-text": c(u)
1618
- }, null, 8, ["modelValue", "label", "items", "placeholder", "helper-text"]);
1619
- };
1620
- }
1621
- });
1622
- var Ee = { 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/" };
1623
- const kn = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Dn = { class: "fm-typo-en-title-md-800" }, Vn = {
1624
- key: 0,
1625
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1626
- }, $n = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, xn = { class: "fm-typo-en-title-sm-800" }, zn = { class: "space-y-24" }, Hn = { class: "space-y-8" }, On = { class: "fm-typo-en-title-sm-800" }, Kn = { class: "fm-typo-body-lg-400" }, Yn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, jn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Jn = { class: "space-y-8" }, qn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Gn = { class: "fm-typo-en-body-lg-600" }, Qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Xn = { class: "space-y-8" }, Zn = { class: "space-y-8" }, Wn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = { class: "space-y-8" }, to = { class: "fm-typo-en-title-sm-800" }, no = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, oo = { class: "space-y-8" }, so = { class: "fm-typo-en-title-sm-800" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, io = { class: "space-y-8" }, lo = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, ao = { class: "space-y-8" }, co = { class: "fm-typo-en-title-sm-800" }, uo = { class: "space-y-8" }, fo = { class: "fm-typo-en-title-sm-800" }, mo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, go = { class: "flex justify-end pb-24" }, ho = { class: "col-span-1 space-y-8 xs:hidden" }, po = { class: "fm-typo-en-body-lg-600" }, yo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, wo = { class: "fm-typo-en-body-lg-600" }, bo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Co = { class: "fm-typo-en-body-lg-600" }, vo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _o = { class: "fm-typo-en-body-lg-600" }, Eo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ao = { class: "fm-typo-en-body-lg-600" }, Jo = /* @__PURE__ */ Me({
1627
- __name: "Setting",
1628
- setup(t) {
1629
- const e = Rt(), r = Bt(), s = Ft(), n = Ae(), o = et(), { global: i, minor: a } = At, l = Ze(), u = O(), f = O([]), E = O(null), g = St, m = [
1630
- (A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1631
- (A) => !A || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(A) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
1632
- ], b = Ee.appUrl, _ = K(() => {
1633
- var A;
1634
- return `https://${(A = u.value) == null ? void 0 : A.business}.${b}`;
1635
- }), I = O(), { t: d } = nt(), C = s.currentCountry.value || "MY", w = [
1636
- "user.name",
1637
- "user.gender",
1638
- "user.birthday",
1639
- "user.phoneNumber",
1640
- "membership.url"
1641
- ].filter(
1642
- (A) => {
1643
- var p;
1644
- return !((p = Ut[C]) != null && p.includes(A));
1645
- }
1646
- );
1647
- async function y() {
1648
- l.open({
1649
- title: "",
1650
- dialogComponent: Fn,
1651
- closeButton: !1
1652
- });
1653
- }
1654
- async function P(A) {
1655
- await Tt.remove(
1656
- "Are you sure you want to unlink this device?",
1657
- "Unlink device",
1658
- "Unlink"
1659
- ) && await a(
1660
- async () => {
1661
- await We.unregisterDevice(A), await n.readLocationDevices();
1662
- },
1663
- {
1664
- message: "Unlinking device",
1665
- successMessage: "Unlinked device successfully"
1666
- }
1667
- );
1668
- }
1669
- async function M() {
1670
- await a(
1671
- async () => {
1672
- var V;
1673
- const A = Vt(u.value);
1674
- A.welcomeMessage && !((V = A.welcomeMessage) != null && V.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1675
- const p = It.parse(A);
1676
- I.value === null && p.image ? await se.delete(se.coverImagePath()) : I.value && (p.image = await se.update(
1677
- se.coverImagePath(),
1678
- I.value
1679
- )), await Ye.update(p), await o.readMembership(), u.value = o.membership;
1680
- },
1681
- {
1682
- message: "Updating membership",
1683
- successMessage: "Membership updated successfully"
1684
- }
1685
- );
1686
- }
1687
- async function T() {
1688
- const A = await Ye.getEmailAddresses();
1689
- console.log(A), f.value = A, E.value = A.find((p) => p.default.includes("Marketing"));
1690
- }
1691
- async function U() {
1692
- window.open(
1693
- `${Ee.licensePortalUrl}business/${je.businessId}/settings`,
1694
- "_blank"
1695
- );
1696
- }
1697
- async function k() {
1698
- const A = `${Ee.licensePortalUrl}settings?businessId=${je.businessId}`;
1699
- console.log("Opening", A), window.open(A, "_blank");
1700
- }
1701
- return Qe(async () => {
1702
- await i(async () => {
1703
- await n.readPremium(), await n.readLocations(), await n.readLocationDevices(), await o.readMembership(), await T(), u.value = o.membership;
1704
- });
1705
- }), (A, p) => {
1706
- var De, Ve, $e, xe, ze, He, Oe;
1707
- const V = L("FmPageHead"), N = L("FmButton"), ne = L("FmTextField"), ge = L("FmCard"), Re = L("FmPill"), bt = L("FmSelect"), ke = L("FmSwitch"), Ct = L("FmMenuDivider");
1708
- return x(), oe(pe, null, [
1709
- S(V, {
1710
- title: c(d)("connect.setting.title"),
1711
- class: "xs:hidden"
1712
- }, null, 8, ["title"]),
1713
- h("div", kn, [
1714
- h("div", Dn, B(c(d)("connect.setting.basicInfo.title")), 1),
1715
- S(N, {
1716
- icon: "info",
1717
- variant: "tertiary"
1718
- })
1719
- ]),
1720
- c(u) ? (x(), oe("div", Vn, [
1721
- h("div", $n, [
1722
- h("div", xn, B(c(d)("connect.setting.basicInfo.title")), 1),
1723
- h("div", zn, [
1724
- S(ne, {
1725
- label: c(d)("connect.setting.basicInfo.membershipTitle"),
1726
- modelValue: c(u).name,
1727
- "onUpdate:modelValue": p[0] || (p[0] = (v) => c(u).name = v)
1728
- }, null, 8, ["label", "modelValue"]),
1729
- S(ne, {
1730
- disabled: !0,
1731
- "model-value": c(u).business,
1732
- rules: m,
1733
- required: !0,
1734
- label: c(d)("connect.setting.basicInfo.memberAppUrl"),
1735
- "helper-text": c(_),
1736
- placeholder: c(u).business.toString(),
1737
- "onUpdate:modelValue": p[2] || (p[2] = (v) => c(u).url = v)
1738
- }, {
1739
- prepend: Y(() => [...p[14] || (p[14] = [
1740
- Q(" https:// ", -1)
1741
- ])]),
1742
- append: Y(() => [
1743
- Q(" ." + B(c(b)) + " ", 1),
1744
- S(N, {
1745
- icon: "content_copy",
1746
- variant: "tertiary",
1747
- onClick: p[1] || (p[1] = (v) => c(tt)(c(_)))
1748
- })
1749
- ]),
1750
- _: 1
1751
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1752
- S(Mt, {
1753
- label: "Cover image",
1754
- class: "w-2/3 xs:w-full",
1755
- "image-fit": "cover",
1756
- "aspect-ratio": "3/1",
1757
- thumbnail: c(u).image || void 0,
1758
- "onUpdate:file": p[3] || (p[3] = async (v) => {
1759
- I.value = v, v || (c(u).image = null);
1760
- })
1761
- }, null, 8, ["thumbnail"]),
1762
- h("div", Hn, [
1763
- h("div", On, B(c(d)("connect.setting.counterApp.title")), 1),
1764
- S(N, {
1765
- variant: "plain",
1766
- icon: "link",
1767
- label: c(d)("connect.setting.counterApp.linkDevice"),
1768
- onClick: y
1769
- }, null, 8, ["label"]),
1770
- (x(!0), oe(pe, null, _t(c(n).locationDevices, (v, R) => (x(), le(ge, {
1771
- key: R,
1772
- variant: "outlined",
1773
- class: "flex items-center justify-between px-16 py-12"
1774
- }, {
1775
- default: Y(() => [
1776
- h("div", null, [
1777
- h("p", Kn, B(v.name || `Device ${v._id}`), 1),
1778
- h("p", Yn, B(c(d)("connect.setting.counterApp.device.activationDate")) + " " + B(c(Et)(c(Dt)(v._id.toString())).format(
1779
- "D MMM YYYY"
1780
- )), 1),
1781
- h("p", jn, B(c(d)("connect.setting.counterApp.device.linkedLocation")) + " " + B(c(n).locations.find(($) => $._id == v.location).name), 1)
1782
- ]),
1783
- S(N, {
1784
- icon: "link_off",
1785
- variant: "tertiary",
1786
- onClick: ($) => P(v._id)
1787
- }, null, 8, ["onClick"])
1788
- ]),
1789
- _: 2
1790
- }, 1024))), 128))
1791
- ]),
1792
- h("div", Jn, [
1793
- h("div", qn, [
1794
- Q(B(c(d)("connect.setting.advertisement.title")) + " ", 1),
1795
- S(Re, { variant: "premium" })
1796
- ]),
1797
- S(ge, {
1798
- variant: "outlined",
1799
- class: "p-16 flex items-center justify-between"
1800
- }, {
1801
- default: Y(() => {
1802
- var v;
1803
- return [
1804
- h("div", null, [
1805
- h("div", Gn, B(c(d)("connect.setting.advertisement.manageAd")), 1),
1806
- h("div", Qn, B(c(d)("connect.setting.advertisement.activeAdsShowing", {
1807
- count: ((v = c(u).advertisements) == null ? void 0 : v.length) ?? 0
1808
- })), 1)
1809
- ]),
1810
- S(N, {
1811
- label: c(d)("connect.setting.advertisement.manage"),
1812
- icon: "arrow_forward",
1813
- "icon-position": "right",
1814
- disabled: !c(n).isPremium,
1815
- onClick: p[4] || (p[4] = (R) => c(e).push({
1816
- name: c(kt)["$connect-SETTING_ADVERTISEMENTS"]
1817
- }))
1818
- }, null, 8, ["label", "disabled"])
1819
- ];
1820
- }),
1821
- _: 1
1822
- })
1823
- ]),
1824
- h("div", Xn, [
1825
- p[15] || (p[15] = h("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1826
- S(ne, {
1827
- "model-value": ((De = c(u)) == null ? void 0 : De.brand) || "",
1828
- "max-length": 15,
1829
- label: c(d)("connect.setting.sms.brandName"),
1830
- "show-word-count": "",
1831
- "helper-text": c(d)("connect.setting.sms.messageFormat", {
1832
- brand: ((Ve = c(u)) == null ? void 0 : Ve.brand) || ""
1833
- }),
1834
- "onUpdate:modelValue": p[5] || (p[5] = (v) => c(u).brand = v)
1835
- }, null, 8, ["model-value", "label", "helper-text"]),
1836
- S(Lt, {
1837
- modelValue: c(u).welcomeMessage,
1838
- "onUpdate:modelValue": p[6] || (p[6] = (v) => c(u).welcomeMessage = v),
1839
- variables: c(w),
1840
- placeholder: c(d)("connect.setting.sms.welcomeMessage")
1841
- }, null, 8, ["modelValue", "variables", "placeholder"])
1842
- ]),
1843
- h("div", Zn, [
1844
- p[16] || (p[16] = h("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1845
- h("div", Wn, B(c(d)("connect.setting.email.description")), 1),
1846
- c(f).length ? ye("", !0) : (x(), le(N, {
1847
- key: 0,
1848
- onClick: U,
1849
- label: c(d)("connect.setting.email.addNewAddress")
1850
- }, null, 8, ["label"])),
1851
- c(f).length ? (x(), oe(pe, { key: 1 }, [
1852
- S(bt, {
1853
- "model-value": ((xe = ($e = c(u)) == null ? void 0 : $e.email) == null ? void 0 : xe.from) || null,
1854
- label: c(d)("connect.setting.email.fromAddress"),
1855
- items: c(f).map((v) => ({
1856
- label: v.emailAddress,
1857
- value: v.emailAddress
1858
- })),
1859
- placeholder: c(E) ? c(E).emailAddress : c(d)("connect.setting.email.noAddressAvailable"),
1860
- "onUpdate:modelValue": p[7] || (p[7] = (v) => {
1861
- var R, $;
1862
- (R = c(u)) != null && R.email || (c(u).email = {
1863
- from: v,
1864
- name: ($ = c(f).find((he) => he.emailAddress == v)) == null ? void 0 : $.name
1865
- }), c(u).email.from = v || null;
1866
- }),
1867
- rules: [c(Ke).ruleAtPath(c(g), "email.from")]
1868
- }, null, 8, ["model-value", "label", "items", "placeholder", "rules"]),
1869
- S(ne, {
1870
- "model-value": ((He = (ze = c(u)) == null ? void 0 : ze.email) == null ? void 0 : He.name) || null,
1871
- label: c(d)("connect.setting.email.senderName"),
1872
- disabled: "",
1873
- placeholder: ((Oe = c(E)) == null ? void 0 : Oe.name) || null,
1874
- "onUpdate:modelValue": p[8] || (p[8] = (v) => {
1875
- var R;
1876
- (R = c(u)) != null && R.email || (c(u).email = {
1877
- name: v
1878
- }), c(u).email.name = v || null;
1879
- }),
1880
- rules: [c(Ke).ruleAtPath(c(g), "email.name")]
1881
- }, null, 8, ["model-value", "label", "placeholder", "rules"])
1882
- ], 64)) : ye("", !0)
1883
- ]),
1884
- h("div", eo, [
1885
- h("div", to, B(c(d)("connect.setting.whatsapp.title")), 1),
1886
- h("div", no, B(c(d)("connect.setting.whatsapp.description")), 1),
1887
- S(N, {
1888
- label: c(d)("connect.setting.whatsapp.manageChannel"),
1889
- icon: "open_in_new",
1890
- onClick: p[9] || (p[9] = (v) => k())
1891
- }, null, 8, ["label"])
1892
- ]),
1893
- h("div", oo, [
1894
- h("div", so, [
1895
- Q(B(c(d)("connect.setting.freeCredit.title")) + " ", 1),
1896
- h("span", ro, B(c(d)("connect.setting.freeCredit.posVersion")), 1)
1897
- ]),
1898
- S(ke, {
1899
- "model-value": c(u).freeCreditAsDiscount ?? !1,
1900
- "onUpdate:modelValue": p[10] || (p[10] = (v) => c(u).freeCreditAsDiscount = v),
1901
- label: c(d)("connect.setting.freeCredit.title"),
1902
- sublabel: c(d)("connect.setting.freeCredit.description"),
1903
- "label-placement": "right",
1904
- value: ""
1905
- }, null, 8, ["model-value", "label", "sublabel"])
1906
- ]),
1907
- h("div", io, [
1908
- h("div", lo, [
1909
- Q(B(c(d)("connect.setting.memberCard.title")) + " ", 1),
1910
- S(Re, { variant: "premium" })
1911
- ]),
1912
- S(ke, {
1913
- "model-value": c(u).cardEnable ?? !1,
1914
- "onUpdate:modelValue": p[11] || (p[11] = (v) => c(u).cardEnable = v),
1915
- label: "",
1916
- sublabel: c(d)("connect.setting.memberCard.description"),
1917
- "label-placement": "right",
1918
- value: "",
1919
- disabled: !c(n).isPremium
1920
- }, null, 8, ["model-value", "sublabel", "disabled"])
1921
- ]),
1922
- h("div", ao, [
1923
- h("div", co, B(c(d)("connect.setting.location.title")), 1),
1924
- S(Nt, {
1925
- label: c(d)("connect.setting.location.selectLabel"),
1926
- "model-value": c(u).targetLocation ?? null,
1927
- "onUpdate:modelValue": p[12] || (p[12] = (v) => c(u).targetLocation = v)
1928
- }, null, 8, ["label", "model-value"])
1929
- ]),
1930
- h("div", uo, [
1931
- h("div", fo, B(c(d)("connect.setting.allowedPhoneCountries.title")), 1),
1932
- h("div", mo, B(c(d)("connect.setting.allowedPhoneCountries.description")), 1),
1933
- S(Rn, {
1934
- modelValue: c(u).allowedPhoneCountries,
1935
- "onUpdate:modelValue": p[13] || (p[13] = (v) => c(u).allowedPhoneCountries = v)
1936
- }, null, 8, ["modelValue"])
1937
- ]),
1938
- h("div", go, [
1939
- S(N, {
1940
- label: c(d)("connect.setting.action.update"),
1941
- type: "button",
1942
- onClick: M,
1943
- disabled: !!c(r).loadingQueue.length,
1944
- loading: !!c(r).loadingQueue.length
1945
- }, null, 8, ["label", "disabled", "loading"])
1946
- ])
1947
- ])
1948
- ]),
1949
- h("div", ho, [
1950
- S(ge, {
1951
- variant: "outlined",
1952
- class: "flex flex-col p-24 gap-8"
1953
- }, {
1954
- default: Y(() => {
1955
- var v, R, $;
1956
- return [
1957
- h("div", po, B(c(d)("connect.setting.summary.title")), 1),
1958
- S(Ct, { class: "my-4" }),
1959
- h("div", null, [
1960
- h("div", yo, B(c(d)("connect.setting.summary.name")), 1),
1961
- h("div", wo, B(c(u).name), 1)
1962
- ]),
1963
- h("div", null, [
1964
- h("div", bo, B(c(d)("connect.setting.summary.advertisement")), 1),
1965
- h("div", Co, B((((v = c(u).advertisements) == null ? void 0 : v.length) ?? 0) || c(d)("connect.setting.summary.noAds")), 1)
1966
- ]),
1967
- h("div", null, [
1968
- h("div", vo, B(c(d)("connect.setting.summary.freeCredit")), 1),
1969
- h("div", _o, B(c(u).freeCreditAsDiscount ? c(d)("connect.setting.summary.enabled") : c(d)("connect.setting.summary.disabled")), 1)
1970
- ]),
1971
- h("div", null, [
1972
- h("div", Eo, B(c(d)("connect.setting.summary.locations")), 1),
1973
- h("div", Ao, B(!c(u).targetLocation || c(u).targetLocation.length == c(Ae)().locations.length ? c(d)("connect.setting.summary.allLocations") : ($ = (R = c(u)) == null ? void 0 : R.targetLocation) == null ? void 0 : $.map(
1974
- (he) => c(n).locations.find((vt) => vt._id == he).name
1975
- ).join(", ")), 1)
1976
- ])
1977
- ];
1978
- }),
1979
- _: 1
1980
- })
1981
- ])
1982
- ])) : ye("", !0)
1983
- ], 64);
1984
- };
1985
- }
1986
- });
1987
- export {
1988
- Jo as default
1989
- };