@feedmepos/mf-connect 0.1.38-beta.69 → 0.1.38-beta.70

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 (103) hide show
  1. package/dist/{Analytic-CHjBLSET.js → Analytic-qVhEo_im.js} +14 -14
  2. package/dist/{App-C1xIj-B0.js → App-Ixv1jrHc.js} +7 -7
  3. package/dist/{AuditLogs-Dki6qsI-.js → AuditLogs-B2D62tMF.js} +9 -9
  4. package/dist/{Bin-ttFSC2lf.js → Bin-Lj7jtS9m.js} +8 -8
  5. package/dist/{Broadcast-Cz_pjrR6.js → Broadcast-BpP9VJsx.js} +10 -10
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-jQ8AgB-p.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
  7. package/dist/{Card-BaNfbyIP.js → Card-CjArjpou.js} +17 -17
  8. package/dist/{Collections-DZctA4hK.js → Collections-CFzUAHxz.js} +7 -7
  9. package/dist/{Credit-BYJWTi-b.js → Credit-D43x-T3d.js} +10 -10
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BXqC2jJb.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js} +33 -33
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cun-ghGF.js → EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js} +6 -6
  12. package/dist/{Experience-dWjLOoui.js → Experience-BaUbRoHV.js} +10 -10
  13. package/dist/{FileSaver.min-BZHXGiQH.js → FileSaver.min-BO_rbswB.js} +1 -1
  14. package/dist/{Game-DeXSmFww.js → Game-DaVqgPWQ.js} +11 -11
  15. package/dist/{GenerateMaterial-B_uWYDyj.js → GenerateMaterial-DJM8fZyl.js} +6 -6
  16. package/dist/{Grab-BKcVVW_I.js → Grab-CykZDrWI.js} +9 -9
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Bbx9DDzu.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +1 -1
  18. package/dist/{Index-CSb87tjr.js → Index-Do3WIIfM.js} +10 -10
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BCkKQUoM.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
  20. package/dist/{MainLayout-CpEOM8Wc.js → MainLayout-DD-OlYxZ.js} +1 -1
  21. package/dist/{Marketing-ClRXLCul.js → Marketing-C9bsnUaQ.js} +4 -4
  22. package/dist/{MarketingMaterialEdit-CJW-eGTF.js → MarketingMaterialEdit-CbSh8dpn.js} +4 -4
  23. package/dist/{Member-_oGCdXUL.js → Member-IcVRwAAS.js} +11 -11
  24. package/dist/{MemberList-C8m7EtI5.js → MemberList-C_A4PrQN.js} +25 -25
  25. package/dist/{MemberTransactions-COilUChO.js → MemberTransactions-CBoaY-gv.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-3awjwsoo.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +8 -8
  27. package/dist/{Mission-QhcGGV4d.js → Mission-COY_uhwz.js} +11 -11
  28. package/dist/{Overview-BAVHQHWB.js → Overview-DDSz2R4K.js} +18 -18
  29. package/dist/{Point-D0xZ5rrR.js → Point-C-KEwgx4.js} +10 -10
  30. package/dist/{Promotion-C4IE0Qbc.js → Promotion-BpW9qWzf.js} +11 -11
  31. package/dist/{Queue-DurTWu5p.js → Queue-CO32O8i6.js} +10 -10
  32. package/dist/{Record-CFMWd4O2.js → Record-BrT5DR9L.js} +9 -9
  33. package/dist/{Reward-CHqVLyQb.js → Reward-CbrEw-If.js} +16 -16
  34. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BOs0aSOO.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +11 -11
  35. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
  36. package/dist/{Segment-DLPq88Ky.js → Segment-Cu9_qwXc.js} +24 -24
  37. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3CO54II.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +2 -2
  38. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-LzGBxhRf.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
  39. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CL7fIjz8.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
  40. package/dist/Setting-CQKfb5b_.js +1999 -0
  41. package/dist/{SettingAdvertisements-DPzlV5EE.js → SettingAdvertisements-BxR6Gl-5.js} +11 -11
  42. package/dist/{Store-O1-8l-R3.js → Store-6TUpmqAr.js} +287 -283
  43. package/dist/{StoreRewards-l0gYOgXi.js → StoreRewards-BOThAOWU.js} +14 -14
  44. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-cQXkAOhr.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js} +19 -19
  45. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
  46. package/dist/{Tier-hKiEGb6o.js → Tier-MF-ad-xm.js} +23 -23
  47. package/dist/{Title-D-KimgP5.js → Title-MkjTHBzb.js} +20 -20
  48. package/dist/{Transaction-Cdd_JyrK.js → Transaction-trYJwTrc.js} +2 -2
  49. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CMW8EAdN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +6 -6
  50. package/dist/{Voucher-Dfc73Csg.js → Voucher-BD5dTdht.js} +14 -14
  51. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-T8H35FPU.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js} +12 -12
  52. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BZNmcUU3.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
  53. package/dist/{app-CPwdgRZv.js → app-CybjF-6Q.js} +550 -265
  54. package/dist/app.js +1 -1
  55. package/dist/{business-BaWiU14d.js → business-2hCbD0JX.js} +1 -1
  56. package/dist/{campaign-CjorwtX0.js → campaign-Bv-8uM2S.js} +2 -2
  57. package/dist/{campaign-CDz0jHT_.js → campaign-h1J8NTAo.js} +8 -8
  58. package/dist/{campaign.enum-DYEesXC5.js → campaign.enum-Dea0E4o1.js} +1 -1
  59. package/dist/{campaign.fn-DpVmqfwa.js → campaign.fn-DqxZMyu0.js} +3 -3
  60. package/dist/{collectible.enum-C4KUmspK.js → collectible.enum-DOyAoz4F.js} +1 -1
  61. package/dist/{collection.fn-DSYVoV0Q.js → collection.fn-DU2HuZod.js} +2 -2
  62. package/dist/{dto-Da7ErVjD.js → dto-CT65-FHY.js} +4 -4
  63. package/dist/{duplicateCampaign-9jH_zm0I.js → duplicateCampaign-YJGHvOqb.js} +2 -2
  64. package/dist/{effect-DU7hFznC.js → effect-XZ767UQ4.js} +1 -1
  65. package/dist/{email-addresses-DaG6NhSR.js → email-addresses-DSgkxSnV.js} +2 -2
  66. package/dist/{export-DQ7mAt1L.js → export-4gx5C9s9.js} +2 -2
  67. package/dist/{helper-DoitYM-F.js → helper-HOLsJca3.js} +1 -1
  68. package/dist/{index-BHXZzBnz.js → index-BO7N-s4K.js} +3 -3
  69. package/dist/{index-D4IBwcT5.js → index-BfRa1sI3.js} +3 -3
  70. package/dist/{index-DxSN3k9t.js → index-BnCtmlvU.js} +2 -2
  71. package/dist/{index-YFu3E6Ag.js → index-C5VvGYtP.js} +1 -1
  72. package/dist/{index-D1fonJ2y.js → index-CSzvYzf4.js} +4 -4
  73. package/dist/{index-BzjRqjaa.js → index-CrdkPXsx.js} +1 -1
  74. package/dist/{index-CDCOpWhV.js → index-CxE-VVlL.js} +1 -1
  75. package/dist/{index-Cq6KrPV_.js → index-Djenbz3F.js} +1 -1
  76. package/dist/{index-T4Vlp9cv.js → index-IHteBJ_D.js} +1 -1
  77. package/dist/{index-BkpmY2GE.js → index-dUhOAfj9.js} +6 -6
  78. package/dist/{index-CkZ9FtS6.js → index-wm4nGBB_.js} +3 -3
  79. package/dist/{index-CaZnCYlf.js → index-xTrAj026.js} +1 -1
  80. package/dist/{index-COWak_tY.js → index-yViT18i_.js} +1 -1
  81. package/dist/{index.esm2017-B4OXxsXJ.js → index.esm2017-Wq4FUMEv.js} +1 -1
  82. package/dist/{loading-DlBFOncH.js → loading-D22xapd8.js} +2 -2
  83. package/dist/{lodash-DYkOiP6W.js → lodash-HM6bxuWV.js} +1 -1
  84. package/dist/{membership-Ba48hky6.js → membership-CX464ZBI.js} +3 -3
  85. package/dist/{money-DzYV_AqB.js → money-B3cPZAZu.js} +1 -1
  86. package/dist/{number-DZhr2aQi.js → number-DT65dEZt.js} +1 -1
  87. package/dist/{objectid-lBGc5CTo.js → objectid-DZWw4iLL.js} +10 -10
  88. package/dist/{plugins-DnfvdXvl.js → plugins-D-4BlIGs.js} +3 -3
  89. package/dist/{reward-BDRlCjZq.js → reward-C6B-kn0X.js} +1 -1
  90. package/dist/{rule-CXgUDav7.js → rule-B94SrDX1.js} +3 -3
  91. package/dist/{rule-builder-K8ZRQKcJ.js → rule-builder-CQ3uHeX4.js} +1 -1
  92. package/dist/{template-B7SczDYk.js → template-CXB2Ez2S.js} +6 -6
  93. package/dist/{timezone-CVrjbFra.js → timezone-D3NuV-rx.js} +2 -2
  94. package/dist/{trigger-C07rM7Na.js → trigger-BsCVC_nU.js} +5 -5
  95. package/dist/{usePagination-dYbEzX5Y.js → usePagination-BOZ0-D67.js} +1 -1
  96. package/dist/{user-BSrjSLnx.js → user-Dxp7kluY.js} +1 -1
  97. package/dist/{vue-i18n-DBanfH9w.js → vue-i18n-DpCWu1gI.js} +2 -2
  98. package/dist/{xlsx-PsqFEjbr.js → xlsx-Cc2a2IL9.js} +440 -440
  99. package/dist/{zod-ph5Ab9oy.js → zod-BCSHGdXs.js} +1 -1
  100. package/package.json +1 -1
  101. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dyfa78rG.js +0 -1790
  102. package/dist/Setting-BTmw7C4E.js +0 -1992
  103. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BjawHGS0.js +0 -8093
@@ -1,1992 +0,0 @@
1
- import { defineComponent as Te, ref as O, computed as K, onMounted as Qe, resolveComponent as U, openBlock as x, createBlock as le, withCtx as Y, createElementVNode as h, createVNode as _, unref as d, isRef as We, createElementBlock as oe, Fragment as ye, toDisplayString as R, createTextVNode as Q, renderList as Ct, createCommentVNode as we } from "vue";
2
- import { h as Et } from "./moment-D7p2TMB-.js";
3
- import { Z as Ke } from "./zod-ph5Ab9oy.js";
4
- import { useDialog as Xe } from "@feedmepos/ui-library";
5
- import { u as At, m as Ye } from "./loading-DlBFOncH.js";
6
- import { u as Bt } from "./app-wDQR6dpb.js";
7
- import { u as Se, l as Ze } from "./business-BaWiU14d.js";
8
- import { u as et } from "./membership-Ba48hky6.js";
9
- import { P as St } from "./index-CkZ9FtS6.js";
10
- import { I as _t, k as Mt } from "./index-D1fonJ2y.js";
11
- import { _ as Pt } from "./ImageInput.vue_vue_type_script_setup_true_lang-Bbx9DDzu.js";
12
- import { a as tt, p as It, f as re } from "./plugins-DnfvdXvl.js";
13
- import { _ as Tt } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BjawHGS0.js";
14
- import { M as Nt, _ as Ut } from "./MessageInput.vue_vue_type_script_setup_true_lang-3awjwsoo.js";
15
- import { u as Lt } from "./vue-i18n-DBanfH9w.js";
16
- import { useCoreStore as Rt } from "@feedmepos/mf-common";
17
- import { useRouter as Ft } from "vue-router";
18
- import { R as kt } from "./app-CPwdgRZv.js";
19
- import { S as je } from "./index-DxSN3k9t.js";
20
- import { o as Dt } from "./objectId-dwaoBfJX.js";
21
- import { a as Vt } from "./object-qECH92oz.js";
22
- var ee = {}, $t = function() {
23
- return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
24
- }, nt = {}, L = {};
25
- let Ne;
26
- const xt = [
27
- 0,
28
- // Not used
29
- 26,
30
- 44,
31
- 70,
32
- 100,
33
- 134,
34
- 172,
35
- 196,
36
- 242,
37
- 292,
38
- 346,
39
- 404,
40
- 466,
41
- 532,
42
- 581,
43
- 655,
44
- 733,
45
- 815,
46
- 901,
47
- 991,
48
- 1085,
49
- 1156,
50
- 1258,
51
- 1364,
52
- 1474,
53
- 1588,
54
- 1706,
55
- 1828,
56
- 1921,
57
- 2051,
58
- 2185,
59
- 2323,
60
- 2465,
61
- 2611,
62
- 2761,
63
- 2876,
64
- 3034,
65
- 3196,
66
- 3362,
67
- 3532,
68
- 3706
69
- ];
70
- L.getSymbolSize = function(e) {
71
- if (!e) throw new Error('"version" cannot be null or undefined');
72
- if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
73
- return e * 4 + 17;
74
- };
75
- L.getSymbolTotalCodewords = function(e) {
76
- return xt[e];
77
- };
78
- L.getBCHDigit = function(t) {
79
- let e = 0;
80
- for (; t !== 0; )
81
- e++, t >>>= 1;
82
- return e;
83
- };
84
- L.setToSJISFunction = function(e) {
85
- if (typeof e != "function")
86
- throw new Error('"toSJISFunc" is not a valid function.');
87
- Ne = e;
88
- };
89
- L.isKanjiModeEnabled = function() {
90
- return typeof Ne < "u";
91
- };
92
- L.toSJIS = function(e) {
93
- return Ne(e);
94
- };
95
- var ce = {};
96
- (function(t) {
97
- t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
98
- function e(i) {
99
- if (typeof i != "string")
100
- throw new Error("Param is not a string");
101
- switch (i.toLowerCase()) {
102
- case "l":
103
- case "low":
104
- return t.L;
105
- case "m":
106
- case "medium":
107
- return t.M;
108
- case "q":
109
- case "quartile":
110
- return t.Q;
111
- case "h":
112
- case "high":
113
- return t.H;
114
- default:
115
- throw new Error("Unknown EC Level: " + i);
116
- }
117
- }
118
- t.isValid = function(r) {
119
- return r && typeof r.bit < "u" && r.bit >= 0 && r.bit < 4;
120
- }, t.from = function(r, o) {
121
- if (t.isValid(r))
122
- return r;
123
- try {
124
- return e(r);
125
- } catch {
126
- return o;
127
- }
128
- };
129
- })(ce);
130
- function ot() {
131
- this.buffer = [], this.length = 0;
132
- }
133
- ot.prototype = {
134
- get: function(t) {
135
- const e = Math.floor(t / 8);
136
- return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
137
- },
138
- put: function(t, e) {
139
- for (let i = 0; i < e; i++)
140
- this.putBit((t >>> e - i - 1 & 1) === 1);
141
- },
142
- getLengthInBits: function() {
143
- return this.length;
144
- },
145
- putBit: function(t) {
146
- const e = Math.floor(this.length / 8);
147
- this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
148
- }
149
- };
150
- var Ht = ot;
151
- function te(t) {
152
- if (!t || t < 1)
153
- throw new Error("BitMatrix size must be defined and greater than 0");
154
- this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
155
- }
156
- te.prototype.set = function(t, e, i, r) {
157
- const o = t * this.size + e;
158
- this.data[o] = i, r && (this.reservedBit[o] = !0);
159
- };
160
- te.prototype.get = function(t, e) {
161
- return this.data[t * this.size + e];
162
- };
163
- te.prototype.xor = function(t, e, i) {
164
- this.data[t * this.size + e] ^= i;
165
- };
166
- te.prototype.isReserved = function(t, e) {
167
- return this.reservedBit[t * this.size + e];
168
- };
169
- var zt = te, rt = {};
170
- (function(t) {
171
- const e = L.getSymbolSize;
172
- t.getRowColCoords = function(r) {
173
- if (r === 1) return [];
174
- const o = Math.floor(r / 7) + 2, n = e(r), s = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, l = [n - 7];
175
- for (let a = 1; a < o - 1; a++)
176
- l[a] = l[a - 1] - s;
177
- return l.push(6), l.reverse();
178
- }, t.getPositions = function(r) {
179
- const o = [], n = t.getRowColCoords(r), s = n.length;
180
- for (let l = 0; l < s; l++)
181
- for (let a = 0; a < s; a++)
182
- l === 0 && a === 0 || // top-left
183
- l === 0 && a === s - 1 || // bottom-left
184
- l === s - 1 && a === 0 || o.push([n[l], n[a]]);
185
- return o;
186
- };
187
- })(rt);
188
- var it = {};
189
- const Ot = L.getSymbolSize, Je = 7;
190
- it.getPositions = function(e) {
191
- const i = Ot(e);
192
- return [
193
- // top-left
194
- [0, 0],
195
- // top-right
196
- [i - Je, 0],
197
- // bottom-left
198
- [0, i - Je]
199
- ];
200
- };
201
- var st = {};
202
- (function(t) {
203
- t.Patterns = {
204
- PATTERN000: 0,
205
- PATTERN001: 1,
206
- PATTERN010: 2,
207
- PATTERN011: 3,
208
- PATTERN100: 4,
209
- PATTERN101: 5,
210
- PATTERN110: 6,
211
- PATTERN111: 7
212
- };
213
- const e = {
214
- N1: 3,
215
- N2: 3,
216
- N3: 40,
217
- N4: 10
218
- };
219
- t.isValid = function(o) {
220
- return o != null && o !== "" && !isNaN(o) && o >= 0 && o <= 7;
221
- }, t.from = function(o) {
222
- return t.isValid(o) ? parseInt(o, 10) : void 0;
223
- }, t.getPenaltyN1 = function(o) {
224
- const n = o.size;
225
- let s = 0, l = 0, a = 0, u = null, f = null;
226
- for (let B = 0; B < n; B++) {
227
- l = a = 0, u = f = null;
228
- for (let g = 0; g < n; g++) {
229
- let m = o.get(B, g);
230
- m === u ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), u = m, l = 1), m = o.get(g, B), m === f ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), f = m, a = 1);
231
- }
232
- l >= 5 && (s += e.N1 + (l - 5)), a >= 5 && (s += e.N1 + (a - 5));
233
- }
234
- return s;
235
- }, t.getPenaltyN2 = function(o) {
236
- const n = o.size;
237
- let s = 0;
238
- for (let l = 0; l < n - 1; l++)
239
- for (let a = 0; a < n - 1; a++) {
240
- const u = o.get(l, a) + o.get(l, a + 1) + o.get(l + 1, a) + o.get(l + 1, a + 1);
241
- (u === 4 || u === 0) && s++;
242
- }
243
- return s * e.N2;
244
- }, t.getPenaltyN3 = function(o) {
245
- const n = o.size;
246
- let s = 0, l = 0, a = 0;
247
- for (let u = 0; u < n; u++) {
248
- l = a = 0;
249
- for (let f = 0; f < n; f++)
250
- l = l << 1 & 2047 | o.get(u, f), f >= 10 && (l === 1488 || l === 93) && s++, a = a << 1 & 2047 | o.get(f, u), f >= 10 && (a === 1488 || a === 93) && s++;
251
- }
252
- return s * e.N3;
253
- }, t.getPenaltyN4 = function(o) {
254
- let n = 0;
255
- const s = o.data.length;
256
- for (let a = 0; a < s; a++) n += o.data[a];
257
- return Math.abs(Math.ceil(n * 100 / s / 5) - 10) * e.N4;
258
- };
259
- function i(r, o, n) {
260
- switch (r) {
261
- case t.Patterns.PATTERN000:
262
- return (o + n) % 2 === 0;
263
- case t.Patterns.PATTERN001:
264
- return o % 2 === 0;
265
- case t.Patterns.PATTERN010:
266
- return n % 3 === 0;
267
- case t.Patterns.PATTERN011:
268
- return (o + n) % 3 === 0;
269
- case t.Patterns.PATTERN100:
270
- return (Math.floor(o / 2) + Math.floor(n / 3)) % 2 === 0;
271
- case t.Patterns.PATTERN101:
272
- return o * n % 2 + o * n % 3 === 0;
273
- case t.Patterns.PATTERN110:
274
- return (o * n % 2 + o * n % 3) % 2 === 0;
275
- case t.Patterns.PATTERN111:
276
- return (o * n % 3 + (o + n) % 2) % 2 === 0;
277
- default:
278
- throw new Error("bad maskPattern:" + r);
279
- }
280
- }
281
- t.applyMask = function(o, n) {
282
- const s = n.size;
283
- for (let l = 0; l < s; l++)
284
- for (let a = 0; a < s; a++)
285
- n.isReserved(a, l) || n.xor(a, l, i(o, a, l));
286
- }, t.getBestMask = function(o, n) {
287
- const s = Object.keys(t.Patterns).length;
288
- let l = 0, a = 1 / 0;
289
- for (let u = 0; u < s; u++) {
290
- n(u), t.applyMask(u, o);
291
- const f = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
292
- t.applyMask(u, o), f < a && (a = f, l = u);
293
- }
294
- return l;
295
- };
296
- })(st);
297
- var de = {};
298
- const H = ce, ie = [
299
- // L M Q H
300
- 1,
301
- 1,
302
- 1,
303
- 1,
304
- 1,
305
- 1,
306
- 1,
307
- 1,
308
- 1,
309
- 1,
310
- 2,
311
- 2,
312
- 1,
313
- 2,
314
- 2,
315
- 4,
316
- 1,
317
- 2,
318
- 4,
319
- 4,
320
- 2,
321
- 4,
322
- 4,
323
- 4,
324
- 2,
325
- 4,
326
- 6,
327
- 5,
328
- 2,
329
- 4,
330
- 6,
331
- 6,
332
- 2,
333
- 5,
334
- 8,
335
- 8,
336
- 4,
337
- 5,
338
- 8,
339
- 8,
340
- 4,
341
- 5,
342
- 8,
343
- 11,
344
- 4,
345
- 8,
346
- 10,
347
- 11,
348
- 4,
349
- 9,
350
- 12,
351
- 16,
352
- 4,
353
- 9,
354
- 16,
355
- 16,
356
- 6,
357
- 10,
358
- 12,
359
- 18,
360
- 6,
361
- 10,
362
- 17,
363
- 16,
364
- 6,
365
- 11,
366
- 16,
367
- 19,
368
- 6,
369
- 13,
370
- 18,
371
- 21,
372
- 7,
373
- 14,
374
- 21,
375
- 25,
376
- 8,
377
- 16,
378
- 20,
379
- 25,
380
- 8,
381
- 17,
382
- 23,
383
- 25,
384
- 9,
385
- 17,
386
- 23,
387
- 34,
388
- 9,
389
- 18,
390
- 25,
391
- 30,
392
- 10,
393
- 20,
394
- 27,
395
- 32,
396
- 12,
397
- 21,
398
- 29,
399
- 35,
400
- 12,
401
- 23,
402
- 34,
403
- 37,
404
- 12,
405
- 25,
406
- 34,
407
- 40,
408
- 13,
409
- 26,
410
- 35,
411
- 42,
412
- 14,
413
- 28,
414
- 38,
415
- 45,
416
- 15,
417
- 29,
418
- 40,
419
- 48,
420
- 16,
421
- 31,
422
- 43,
423
- 51,
424
- 17,
425
- 33,
426
- 45,
427
- 54,
428
- 18,
429
- 35,
430
- 48,
431
- 57,
432
- 19,
433
- 37,
434
- 51,
435
- 60,
436
- 19,
437
- 38,
438
- 53,
439
- 63,
440
- 20,
441
- 40,
442
- 56,
443
- 66,
444
- 21,
445
- 43,
446
- 59,
447
- 70,
448
- 22,
449
- 45,
450
- 62,
451
- 74,
452
- 24,
453
- 47,
454
- 65,
455
- 77,
456
- 25,
457
- 49,
458
- 68,
459
- 81
460
- ], se = [
461
- // L M Q H
462
- 7,
463
- 10,
464
- 13,
465
- 17,
466
- 10,
467
- 16,
468
- 22,
469
- 28,
470
- 15,
471
- 26,
472
- 36,
473
- 44,
474
- 20,
475
- 36,
476
- 52,
477
- 64,
478
- 26,
479
- 48,
480
- 72,
481
- 88,
482
- 36,
483
- 64,
484
- 96,
485
- 112,
486
- 40,
487
- 72,
488
- 108,
489
- 130,
490
- 48,
491
- 88,
492
- 132,
493
- 156,
494
- 60,
495
- 110,
496
- 160,
497
- 192,
498
- 72,
499
- 130,
500
- 192,
501
- 224,
502
- 80,
503
- 150,
504
- 224,
505
- 264,
506
- 96,
507
- 176,
508
- 260,
509
- 308,
510
- 104,
511
- 198,
512
- 288,
513
- 352,
514
- 120,
515
- 216,
516
- 320,
517
- 384,
518
- 132,
519
- 240,
520
- 360,
521
- 432,
522
- 144,
523
- 280,
524
- 408,
525
- 480,
526
- 168,
527
- 308,
528
- 448,
529
- 532,
530
- 180,
531
- 338,
532
- 504,
533
- 588,
534
- 196,
535
- 364,
536
- 546,
537
- 650,
538
- 224,
539
- 416,
540
- 600,
541
- 700,
542
- 224,
543
- 442,
544
- 644,
545
- 750,
546
- 252,
547
- 476,
548
- 690,
549
- 816,
550
- 270,
551
- 504,
552
- 750,
553
- 900,
554
- 300,
555
- 560,
556
- 810,
557
- 960,
558
- 312,
559
- 588,
560
- 870,
561
- 1050,
562
- 336,
563
- 644,
564
- 952,
565
- 1110,
566
- 360,
567
- 700,
568
- 1020,
569
- 1200,
570
- 390,
571
- 728,
572
- 1050,
573
- 1260,
574
- 420,
575
- 784,
576
- 1140,
577
- 1350,
578
- 450,
579
- 812,
580
- 1200,
581
- 1440,
582
- 480,
583
- 868,
584
- 1290,
585
- 1530,
586
- 510,
587
- 924,
588
- 1350,
589
- 1620,
590
- 540,
591
- 980,
592
- 1440,
593
- 1710,
594
- 570,
595
- 1036,
596
- 1530,
597
- 1800,
598
- 570,
599
- 1064,
600
- 1590,
601
- 1890,
602
- 600,
603
- 1120,
604
- 1680,
605
- 1980,
606
- 630,
607
- 1204,
608
- 1770,
609
- 2100,
610
- 660,
611
- 1260,
612
- 1860,
613
- 2220,
614
- 720,
615
- 1316,
616
- 1950,
617
- 2310,
618
- 750,
619
- 1372,
620
- 2040,
621
- 2430
622
- ];
623
- de.getBlocksCount = function(e, i) {
624
- switch (i) {
625
- case H.L:
626
- return ie[(e - 1) * 4 + 0];
627
- case H.M:
628
- return ie[(e - 1) * 4 + 1];
629
- case H.Q:
630
- return ie[(e - 1) * 4 + 2];
631
- case H.H:
632
- return ie[(e - 1) * 4 + 3];
633
- default:
634
- return;
635
- }
636
- };
637
- de.getTotalCodewordsCount = function(e, i) {
638
- switch (i) {
639
- case H.L:
640
- return se[(e - 1) * 4 + 0];
641
- case H.M:
642
- return se[(e - 1) * 4 + 1];
643
- case H.Q:
644
- return se[(e - 1) * 4 + 2];
645
- case H.H:
646
- return se[(e - 1) * 4 + 3];
647
- default:
648
- return;
649
- }
650
- };
651
- var lt = {}, fe = {};
652
- const X = new Uint8Array(512), ae = new Uint8Array(256);
653
- (function() {
654
- let e = 1;
655
- for (let i = 0; i < 255; i++)
656
- X[i] = e, ae[e] = i, e <<= 1, e & 256 && (e ^= 285);
657
- for (let i = 255; i < 512; i++)
658
- X[i] = X[i - 255];
659
- })();
660
- fe.log = function(e) {
661
- if (e < 1) throw new Error("log(" + e + ")");
662
- return ae[e];
663
- };
664
- fe.exp = function(e) {
665
- return X[e];
666
- };
667
- fe.mul = function(e, i) {
668
- return e === 0 || i === 0 ? 0 : X[ae[e] + ae[i]];
669
- };
670
- (function(t) {
671
- const e = fe;
672
- t.mul = function(r, o) {
673
- const n = new Uint8Array(r.length + o.length - 1);
674
- for (let s = 0; s < r.length; s++)
675
- for (let l = 0; l < o.length; l++)
676
- n[s + l] ^= e.mul(r[s], o[l]);
677
- return n;
678
- }, t.mod = function(r, o) {
679
- let n = new Uint8Array(r);
680
- for (; n.length - o.length >= 0; ) {
681
- const s = n[0];
682
- for (let a = 0; a < o.length; a++)
683
- n[a] ^= e.mul(o[a], s);
684
- let l = 0;
685
- for (; l < n.length && n[l] === 0; ) l++;
686
- n = n.slice(l);
687
- }
688
- return n;
689
- }, t.generateECPolynomial = function(r) {
690
- let o = new Uint8Array([1]);
691
- for (let n = 0; n < r; n++)
692
- o = t.mul(o, new Uint8Array([1, e.exp(n)]));
693
- return o;
694
- };
695
- })(lt);
696
- const at = lt;
697
- function Ue(t) {
698
- this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
699
- }
700
- Ue.prototype.initialize = function(e) {
701
- this.degree = e, this.genPoly = at.generateECPolynomial(this.degree);
702
- };
703
- Ue.prototype.encode = function(e) {
704
- if (!this.genPoly)
705
- throw new Error("Encoder not initialized");
706
- const i = new Uint8Array(e.length + this.degree);
707
- i.set(e);
708
- const r = at.mod(i, this.genPoly), o = this.degree - r.length;
709
- if (o > 0) {
710
- const n = new Uint8Array(this.degree);
711
- return n.set(r, o), n;
712
- }
713
- return r;
714
- };
715
- var Kt = Ue, ut = {}, z = {}, Le = {};
716
- Le.isValid = function(e) {
717
- return !isNaN(e) && e >= 1 && e <= 40;
718
- };
719
- var D = {};
720
- const ct = "[0-9]+", Yt = "[A-Z $%*+\\-./:]+";
721
- let Z = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
722
- Z = Z.replace(/u/g, "\\u");
723
- const jt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Z + `)(?:.|[\r
724
- ]))+`;
725
- D.KANJI = new RegExp(Z, "g");
726
- D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
727
- D.BYTE = new RegExp(jt, "g");
728
- D.NUMERIC = new RegExp(ct, "g");
729
- D.ALPHANUMERIC = new RegExp(Yt, "g");
730
- const Jt = new RegExp("^" + Z + "$"), Gt = new RegExp("^" + ct + "$"), qt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
731
- D.testKanji = function(e) {
732
- return Jt.test(e);
733
- };
734
- D.testNumeric = function(e) {
735
- return Gt.test(e);
736
- };
737
- D.testAlphanumeric = function(e) {
738
- return qt.test(e);
739
- };
740
- (function(t) {
741
- const e = Le, i = D;
742
- t.NUMERIC = {
743
- id: "Numeric",
744
- bit: 1,
745
- ccBits: [10, 12, 14]
746
- }, t.ALPHANUMERIC = {
747
- id: "Alphanumeric",
748
- bit: 2,
749
- ccBits: [9, 11, 13]
750
- }, t.BYTE = {
751
- id: "Byte",
752
- bit: 4,
753
- ccBits: [8, 16, 16]
754
- }, t.KANJI = {
755
- id: "Kanji",
756
- bit: 8,
757
- ccBits: [8, 10, 12]
758
- }, t.MIXED = {
759
- bit: -1
760
- }, t.getCharCountIndicator = function(n, s) {
761
- if (!n.ccBits) throw new Error("Invalid mode: " + n);
762
- if (!e.isValid(s))
763
- throw new Error("Invalid version: " + s);
764
- return s >= 1 && s < 10 ? n.ccBits[0] : s < 27 ? n.ccBits[1] : n.ccBits[2];
765
- }, t.getBestModeForData = function(n) {
766
- return i.testNumeric(n) ? t.NUMERIC : i.testAlphanumeric(n) ? t.ALPHANUMERIC : i.testKanji(n) ? t.KANJI : t.BYTE;
767
- }, t.toString = function(n) {
768
- if (n && n.id) return n.id;
769
- throw new Error("Invalid mode");
770
- }, t.isValid = function(n) {
771
- return n && n.bit && n.ccBits;
772
- };
773
- function r(o) {
774
- if (typeof o != "string")
775
- throw new Error("Param is not a string");
776
- switch (o.toLowerCase()) {
777
- case "numeric":
778
- return t.NUMERIC;
779
- case "alphanumeric":
780
- return t.ALPHANUMERIC;
781
- case "kanji":
782
- return t.KANJI;
783
- case "byte":
784
- return t.BYTE;
785
- default:
786
- throw new Error("Unknown mode: " + o);
787
- }
788
- }
789
- t.from = function(n, s) {
790
- if (t.isValid(n))
791
- return n;
792
- try {
793
- return r(n);
794
- } catch {
795
- return s;
796
- }
797
- };
798
- })(z);
799
- (function(t) {
800
- const e = L, i = de, r = ce, o = z, n = Le, s = 7973, l = e.getBCHDigit(s);
801
- function a(g, m, C) {
802
- for (let E = 1; E <= 40; E++)
803
- if (m <= t.getCapacity(E, C, g))
804
- return E;
805
- }
806
- function u(g, m) {
807
- return o.getCharCountIndicator(g, m) + 4;
808
- }
809
- function f(g, m) {
810
- let C = 0;
811
- return g.forEach(function(E) {
812
- const M = u(E.mode, m);
813
- C += M + E.getBitsLength();
814
- }), C;
815
- }
816
- function B(g, m) {
817
- for (let C = 1; C <= 40; C++)
818
- if (f(g, C) <= t.getCapacity(C, m, o.MIXED))
819
- return C;
820
- }
821
- t.from = function(m, C) {
822
- return n.isValid(m) ? parseInt(m, 10) : C;
823
- }, t.getCapacity = function(m, C, E) {
824
- if (!n.isValid(m))
825
- throw new Error("Invalid QR Code version");
826
- typeof E > "u" && (E = o.BYTE);
827
- const M = e.getSymbolTotalCodewords(m), p = i.getTotalCodewordsCount(m, C), v = (M - p) * 8;
828
- if (E === o.MIXED) return v;
829
- const w = v - u(E, m);
830
- switch (E) {
831
- case o.NUMERIC:
832
- return Math.floor(w / 10 * 3);
833
- case o.ALPHANUMERIC:
834
- return Math.floor(w / 11 * 2);
835
- case o.KANJI:
836
- return Math.floor(w / 13);
837
- case o.BYTE:
838
- default:
839
- return Math.floor(w / 8);
840
- }
841
- }, t.getBestVersionForData = function(m, C) {
842
- let E;
843
- const M = r.from(C, r.M);
844
- if (Array.isArray(m)) {
845
- if (m.length > 1)
846
- return B(m, M);
847
- if (m.length === 0)
848
- return 1;
849
- E = m[0];
850
- } else
851
- E = m;
852
- return a(E.mode, E.getLength(), M);
853
- }, t.getEncodedBits = function(m) {
854
- if (!n.isValid(m) || m < 7)
855
- throw new Error("Invalid QR Code version");
856
- let C = m << 12;
857
- for (; e.getBCHDigit(C) - l >= 0; )
858
- C ^= s << e.getBCHDigit(C) - l;
859
- return m << 12 | C;
860
- };
861
- })(ut);
862
- var dt = {};
863
- const _e = L, ft = 1335, Qt = 21522, Ge = _e.getBCHDigit(ft);
864
- dt.getEncodedBits = function(e, i) {
865
- const r = e.bit << 3 | i;
866
- let o = r << 10;
867
- for (; _e.getBCHDigit(o) - Ge >= 0; )
868
- o ^= ft << _e.getBCHDigit(o) - Ge;
869
- return (r << 10 | o) ^ Qt;
870
- };
871
- var mt = {};
872
- const Wt = z;
873
- function j(t) {
874
- this.mode = Wt.NUMERIC, this.data = t.toString();
875
- }
876
- j.getBitsLength = function(e) {
877
- return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
878
- };
879
- j.prototype.getLength = function() {
880
- return this.data.length;
881
- };
882
- j.prototype.getBitsLength = function() {
883
- return j.getBitsLength(this.data.length);
884
- };
885
- j.prototype.write = function(e) {
886
- let i, r, o;
887
- for (i = 0; i + 3 <= this.data.length; i += 3)
888
- r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
889
- const n = this.data.length - i;
890
- n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
891
- };
892
- var Xt = j;
893
- const Zt = z, be = [
894
- "0",
895
- "1",
896
- "2",
897
- "3",
898
- "4",
899
- "5",
900
- "6",
901
- "7",
902
- "8",
903
- "9",
904
- "A",
905
- "B",
906
- "C",
907
- "D",
908
- "E",
909
- "F",
910
- "G",
911
- "H",
912
- "I",
913
- "J",
914
- "K",
915
- "L",
916
- "M",
917
- "N",
918
- "O",
919
- "P",
920
- "Q",
921
- "R",
922
- "S",
923
- "T",
924
- "U",
925
- "V",
926
- "W",
927
- "X",
928
- "Y",
929
- "Z",
930
- " ",
931
- "$",
932
- "%",
933
- "*",
934
- "+",
935
- "-",
936
- ".",
937
- "/",
938
- ":"
939
- ];
940
- function J(t) {
941
- this.mode = Zt.ALPHANUMERIC, this.data = t;
942
- }
943
- J.getBitsLength = function(e) {
944
- return 11 * Math.floor(e / 2) + 6 * (e % 2);
945
- };
946
- J.prototype.getLength = function() {
947
- return this.data.length;
948
- };
949
- J.prototype.getBitsLength = function() {
950
- return J.getBitsLength(this.data.length);
951
- };
952
- J.prototype.write = function(e) {
953
- let i;
954
- for (i = 0; i + 2 <= this.data.length; i += 2) {
955
- let r = be.indexOf(this.data[i]) * 45;
956
- r += be.indexOf(this.data[i + 1]), e.put(r, 11);
957
- }
958
- this.data.length % 2 && e.put(be.indexOf(this.data[i]), 6);
959
- };
960
- var en = J, tn = function(e) {
961
- for (var i = [], r = e.length, o = 0; o < r; o++) {
962
- var n = e.charCodeAt(o);
963
- if (n >= 55296 && n <= 56319 && r > o + 1) {
964
- var s = e.charCodeAt(o + 1);
965
- s >= 56320 && s <= 57343 && (n = (n - 55296) * 1024 + s - 56320 + 65536, o += 1);
966
- }
967
- if (n < 128) {
968
- i.push(n);
969
- continue;
970
- }
971
- if (n < 2048) {
972
- i.push(n >> 6 | 192), i.push(n & 63 | 128);
973
- continue;
974
- }
975
- if (n < 55296 || n >= 57344 && n < 65536) {
976
- i.push(n >> 12 | 224), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
977
- continue;
978
- }
979
- if (n >= 65536 && n <= 1114111) {
980
- i.push(n >> 18 | 240), i.push(n >> 12 & 63 | 128), i.push(n >> 6 & 63 | 128), i.push(n & 63 | 128);
981
- continue;
982
- }
983
- i.push(239, 191, 189);
984
- }
985
- return new Uint8Array(i).buffer;
986
- };
987
- const nn = tn, on = z;
988
- function G(t) {
989
- this.mode = on.BYTE, typeof t == "string" && (t = nn(t)), this.data = new Uint8Array(t);
990
- }
991
- G.getBitsLength = function(e) {
992
- return e * 8;
993
- };
994
- G.prototype.getLength = function() {
995
- return this.data.length;
996
- };
997
- G.prototype.getBitsLength = function() {
998
- return G.getBitsLength(this.data.length);
999
- };
1000
- G.prototype.write = function(t) {
1001
- for (let e = 0, i = this.data.length; e < i; e++)
1002
- t.put(this.data[e], 8);
1003
- };
1004
- var rn = G;
1005
- const sn = z, ln = L;
1006
- function q(t) {
1007
- this.mode = sn.KANJI, this.data = t;
1008
- }
1009
- q.getBitsLength = function(e) {
1010
- return e * 13;
1011
- };
1012
- q.prototype.getLength = function() {
1013
- return this.data.length;
1014
- };
1015
- q.prototype.getBitsLength = function() {
1016
- return q.getBitsLength(this.data.length);
1017
- };
1018
- q.prototype.write = function(t) {
1019
- let e;
1020
- for (e = 0; e < this.data.length; e++) {
1021
- let i = ln.toSJIS(this.data[e]);
1022
- if (i >= 33088 && i <= 40956)
1023
- i -= 33088;
1024
- else if (i >= 57408 && i <= 60351)
1025
- i -= 49472;
1026
- else
1027
- throw new Error(
1028
- "Invalid SJIS character: " + this.data[e] + `
1029
- Make sure your charset is UTF-8`
1030
- );
1031
- i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
1032
- }
1033
- };
1034
- var an = q, gt = { exports: {} };
1035
- (function(t) {
1036
- var e = {
1037
- single_source_shortest_paths: function(i, r, o) {
1038
- var n = {}, s = {};
1039
- s[r] = 0;
1040
- var l = e.PriorityQueue.make();
1041
- l.push(r, 0);
1042
- for (var a, u, f, B, g, m, C, E, M; !l.empty(); ) {
1043
- a = l.pop(), u = a.value, B = a.cost, g = i[u] || {};
1044
- for (f in g)
1045
- g.hasOwnProperty(f) && (m = g[f], C = B + m, E = s[f], M = typeof s[f] > "u", (M || E > C) && (s[f] = C, l.push(f, C), n[f] = u));
1046
- }
1047
- if (typeof o < "u" && typeof s[o] > "u") {
1048
- var p = ["Could not find a path from ", r, " to ", o, "."].join("");
1049
- throw new Error(p);
1050
- }
1051
- return n;
1052
- },
1053
- extract_shortest_path_from_predecessor_list: function(i, r) {
1054
- for (var o = [], n = r; n; )
1055
- o.push(n), i[n], n = i[n];
1056
- return o.reverse(), o;
1057
- },
1058
- find_path: function(i, r, o) {
1059
- var n = e.single_source_shortest_paths(i, r, o);
1060
- return e.extract_shortest_path_from_predecessor_list(
1061
- n,
1062
- o
1063
- );
1064
- },
1065
- /**
1066
- * A very naive priority queue implementation.
1067
- */
1068
- PriorityQueue: {
1069
- make: function(i) {
1070
- var r = e.PriorityQueue, o = {}, n;
1071
- i = i || {};
1072
- for (n in r)
1073
- r.hasOwnProperty(n) && (o[n] = r[n]);
1074
- return o.queue = [], o.sorter = i.sorter || r.default_sorter, o;
1075
- },
1076
- default_sorter: function(i, r) {
1077
- return i.cost - r.cost;
1078
- },
1079
- /**
1080
- * Add a new item to the queue and ensure the highest priority element
1081
- * is at the front of the queue.
1082
- */
1083
- push: function(i, r) {
1084
- var o = { value: i, cost: r };
1085
- this.queue.push(o), this.queue.sort(this.sorter);
1086
- },
1087
- /**
1088
- * Return the highest priority element in the queue.
1089
- */
1090
- pop: function() {
1091
- return this.queue.shift();
1092
- },
1093
- empty: function() {
1094
- return this.queue.length === 0;
1095
- }
1096
- }
1097
- };
1098
- t.exports = e;
1099
- })(gt);
1100
- var un = gt.exports;
1101
- (function(t) {
1102
- const e = z, i = Xt, r = en, o = rn, n = an, s = D, l = L, a = un;
1103
- function u(p) {
1104
- return unescape(encodeURIComponent(p)).length;
1105
- }
1106
- function f(p, v, w) {
1107
- const y = [];
1108
- let S;
1109
- for (; (S = p.exec(w)) !== null; )
1110
- y.push({
1111
- data: S[0],
1112
- index: S.index,
1113
- mode: v,
1114
- length: S[0].length
1115
- });
1116
- return y;
1117
- }
1118
- function B(p) {
1119
- const v = f(s.NUMERIC, e.NUMERIC, p), w = f(s.ALPHANUMERIC, e.ALPHANUMERIC, p);
1120
- let y, S;
1121
- return l.isKanjiModeEnabled() ? (y = f(s.BYTE, e.BYTE, p), S = f(s.KANJI, e.KANJI, p)) : (y = f(s.BYTE_KANJI, e.BYTE, p), S = []), v.concat(w, y, S).sort(function(I, N) {
1122
- return I.index - N.index;
1123
- }).map(function(I) {
1124
- return {
1125
- data: I.data,
1126
- mode: I.mode,
1127
- length: I.length
1128
- };
1129
- });
1130
- }
1131
- function g(p, v) {
1132
- switch (v) {
1133
- case e.NUMERIC:
1134
- return i.getBitsLength(p);
1135
- case e.ALPHANUMERIC:
1136
- return r.getBitsLength(p);
1137
- case e.KANJI:
1138
- return n.getBitsLength(p);
1139
- case e.BYTE:
1140
- return o.getBitsLength(p);
1141
- }
1142
- }
1143
- function m(p) {
1144
- return p.reduce(function(v, w) {
1145
- const y = v.length - 1 >= 0 ? v[v.length - 1] : null;
1146
- return y && y.mode === w.mode ? (v[v.length - 1].data += w.data, v) : (v.push(w), v);
1147
- }, []);
1148
- }
1149
- function C(p) {
1150
- const v = [];
1151
- for (let w = 0; w < p.length; w++) {
1152
- const y = p[w];
1153
- switch (y.mode) {
1154
- case e.NUMERIC:
1155
- v.push([
1156
- y,
1157
- { data: y.data, mode: e.ALPHANUMERIC, length: y.length },
1158
- { data: y.data, mode: e.BYTE, length: y.length }
1159
- ]);
1160
- break;
1161
- case e.ALPHANUMERIC:
1162
- v.push([
1163
- y,
1164
- { data: y.data, mode: e.BYTE, length: y.length }
1165
- ]);
1166
- break;
1167
- case e.KANJI:
1168
- v.push([
1169
- y,
1170
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1171
- ]);
1172
- break;
1173
- case e.BYTE:
1174
- v.push([
1175
- { data: y.data, mode: e.BYTE, length: u(y.data) }
1176
- ]);
1177
- }
1178
- }
1179
- return v;
1180
- }
1181
- function E(p, v) {
1182
- const w = {}, y = { start: {} };
1183
- let S = ["start"];
1184
- for (let P = 0; P < p.length; P++) {
1185
- const I = p[P], N = [];
1186
- for (let k = 0; k < I.length; k++) {
1187
- const A = I[k], c = "" + P + k;
1188
- N.push(c), w[c] = { node: A, lastCount: 0 }, y[c] = {};
1189
- for (let V = 0; V < S.length; V++) {
1190
- const T = S[V];
1191
- w[T] && w[T].node.mode === A.mode ? (y[T][c] = g(w[T].lastCount + A.length, A.mode) - g(w[T].lastCount, A.mode), w[T].lastCount += A.length) : (w[T] && (w[T].lastCount = A.length), y[T][c] = g(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, v));
1192
- }
1193
- }
1194
- S = N;
1195
- }
1196
- for (let P = 0; P < S.length; P++)
1197
- y[S[P]].end = 0;
1198
- return { map: y, table: w };
1199
- }
1200
- function M(p, v) {
1201
- let w;
1202
- const y = e.getBestModeForData(p);
1203
- if (w = e.from(v, y), w !== e.BYTE && w.bit < y.bit)
1204
- throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(w) + `.
1205
- Suggested mode is: ` + e.toString(y));
1206
- switch (w === e.KANJI && !l.isKanjiModeEnabled() && (w = e.BYTE), w) {
1207
- case e.NUMERIC:
1208
- return new i(p);
1209
- case e.ALPHANUMERIC:
1210
- return new r(p);
1211
- case e.KANJI:
1212
- return new n(p);
1213
- case e.BYTE:
1214
- return new o(p);
1215
- }
1216
- }
1217
- t.fromArray = function(v) {
1218
- return v.reduce(function(w, y) {
1219
- return typeof y == "string" ? w.push(M(y, null)) : y.data && w.push(M(y.data, y.mode)), w;
1220
- }, []);
1221
- }, t.fromString = function(v, w) {
1222
- const y = B(v, l.isKanjiModeEnabled()), S = C(y), P = E(S, w), I = a.find_path(P.map, "start", "end"), N = [];
1223
- for (let k = 1; k < I.length - 1; k++)
1224
- N.push(P.table[I[k]].node);
1225
- return t.fromArray(m(N));
1226
- }, t.rawSplit = function(v) {
1227
- return t.fromArray(
1228
- B(v, l.isKanjiModeEnabled())
1229
- );
1230
- };
1231
- })(mt);
1232
- const me = L, ve = ce, cn = Ht, dn = zt, fn = rt, mn = it, Me = st, Pe = de, gn = Kt, ue = ut, hn = dt, pn = z, Ce = mt;
1233
- function yn(t, e) {
1234
- const i = t.size, r = mn.getPositions(e);
1235
- for (let o = 0; o < r.length; o++) {
1236
- const n = r[o][0], s = r[o][1];
1237
- for (let l = -1; l <= 7; l++)
1238
- if (!(n + l <= -1 || i <= n + l))
1239
- for (let a = -1; a <= 7; a++)
1240
- s + a <= -1 || i <= s + 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, s + a, !0, !0) : t.set(n + l, s + a, !1, !0));
1241
- }
1242
- }
1243
- function wn(t) {
1244
- const e = t.size;
1245
- for (let i = 8; i < e - 8; i++) {
1246
- const r = i % 2 === 0;
1247
- t.set(i, 6, r, !0), t.set(6, i, r, !0);
1248
- }
1249
- }
1250
- function bn(t, e) {
1251
- const i = fn.getPositions(e);
1252
- for (let r = 0; r < i.length; r++) {
1253
- const o = i[r][0], n = i[r][1];
1254
- for (let s = -2; s <= 2; s++)
1255
- for (let l = -2; l <= 2; l++)
1256
- s === -2 || s === 2 || l === -2 || l === 2 || s === 0 && l === 0 ? t.set(o + s, n + l, !0, !0) : t.set(o + s, n + l, !1, !0);
1257
- }
1258
- }
1259
- function vn(t, e) {
1260
- const i = t.size, r = ue.getEncodedBits(e);
1261
- let o, n, s;
1262
- for (let l = 0; l < 18; l++)
1263
- o = Math.floor(l / 3), n = l % 3 + i - 8 - 3, s = (r >> l & 1) === 1, t.set(o, n, s, !0), t.set(n, o, s, !0);
1264
- }
1265
- function Ee(t, e, i) {
1266
- const r = t.size, o = hn.getEncodedBits(e, i);
1267
- let n, s;
1268
- for (n = 0; n < 15; n++)
1269
- s = (o >> n & 1) === 1, n < 6 ? t.set(n, 8, s, !0) : n < 8 ? t.set(n + 1, 8, s, !0) : t.set(r - 15 + n, 8, s, !0), n < 8 ? t.set(8, r - n - 1, s, !0) : n < 9 ? t.set(8, 15 - n - 1 + 1, s, !0) : t.set(8, 15 - n - 1, s, !0);
1270
- t.set(r - 8, 8, 1, !0);
1271
- }
1272
- function Cn(t, e) {
1273
- const i = t.size;
1274
- let r = -1, o = i - 1, n = 7, s = 0;
1275
- for (let l = i - 1; l > 0; l -= 2)
1276
- for (l === 6 && l--; ; ) {
1277
- for (let a = 0; a < 2; a++)
1278
- if (!t.isReserved(o, l - a)) {
1279
- let u = !1;
1280
- s < e.length && (u = (e[s] >>> n & 1) === 1), t.set(o, l - a, u), n--, n === -1 && (s++, n = 7);
1281
- }
1282
- if (o += r, o < 0 || i <= o) {
1283
- o -= r, r = -r;
1284
- break;
1285
- }
1286
- }
1287
- }
1288
- function En(t, e, i) {
1289
- const r = new cn();
1290
- i.forEach(function(a) {
1291
- r.put(a.mode.bit, 4), r.put(a.getLength(), pn.getCharCountIndicator(a.mode, t)), a.write(r);
1292
- });
1293
- const o = me.getSymbolTotalCodewords(t), n = Pe.getTotalCodewordsCount(t, e), s = (o - n) * 8;
1294
- for (r.getLengthInBits() + 4 <= s && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
1295
- r.putBit(0);
1296
- const l = (s - r.getLengthInBits()) / 8;
1297
- for (let a = 0; a < l; a++)
1298
- r.put(a % 2 ? 17 : 236, 8);
1299
- return An(r, t, e);
1300
- }
1301
- function An(t, e, i) {
1302
- const r = me.getSymbolTotalCodewords(e), o = Pe.getTotalCodewordsCount(e, i), n = r - o, s = Pe.getBlocksCount(e, i), l = r % s, a = s - l, u = Math.floor(r / s), f = Math.floor(n / s), B = f + 1, g = u - f, m = new gn(g);
1303
- let C = 0;
1304
- const E = new Array(s), M = new Array(s);
1305
- let p = 0;
1306
- const v = new Uint8Array(t.buffer);
1307
- for (let I = 0; I < s; I++) {
1308
- const N = I < a ? f : B;
1309
- E[I] = v.slice(C, C + N), M[I] = m.encode(E[I]), C += N, p = Math.max(p, N);
1310
- }
1311
- const w = new Uint8Array(r);
1312
- let y = 0, S, P;
1313
- for (S = 0; S < p; S++)
1314
- for (P = 0; P < s; P++)
1315
- S < E[P].length && (w[y++] = E[P][S]);
1316
- for (S = 0; S < g; S++)
1317
- for (P = 0; P < s; P++)
1318
- w[y++] = M[P][S];
1319
- return w;
1320
- }
1321
- function Bn(t, e, i, r) {
1322
- let o;
1323
- if (Array.isArray(t))
1324
- o = Ce.fromArray(t);
1325
- else if (typeof t == "string") {
1326
- let u = e;
1327
- if (!u) {
1328
- const f = Ce.rawSplit(t);
1329
- u = ue.getBestVersionForData(f, i);
1330
- }
1331
- o = Ce.fromString(t, u || 40);
1332
- } else
1333
- throw new Error("Invalid data");
1334
- const n = ue.getBestVersionForData(o, i);
1335
- if (!n)
1336
- throw new Error("The amount of data is too big to be stored in a QR Code");
1337
- if (!e)
1338
- e = n;
1339
- else if (e < n)
1340
- throw new Error(
1341
- `
1342
- The chosen QR Code version cannot contain this amount of data.
1343
- Minimum version required to store current data is: ` + n + `.
1344
- `
1345
- );
1346
- const s = En(e, i, o), l = me.getSymbolSize(e), a = new dn(l);
1347
- return yn(a, e), wn(a), bn(a, e), Ee(a, i, 0), e >= 7 && vn(a, e), Cn(a, s), isNaN(r) && (r = Me.getBestMask(
1348
- a,
1349
- Ee.bind(null, a, i)
1350
- )), Me.applyMask(r, a), Ee(a, i, r), {
1351
- modules: a,
1352
- version: e,
1353
- errorCorrectionLevel: i,
1354
- maskPattern: r,
1355
- segments: o
1356
- };
1357
- }
1358
- nt.create = function(e, i) {
1359
- if (typeof e > "u" || e === "")
1360
- throw new Error("No input text");
1361
- let r = ve.M, o, n;
1362
- return typeof i < "u" && (r = ve.from(i.errorCorrectionLevel, ve.M), o = ue.from(i.version), n = Me.from(i.maskPattern), i.toSJISFunc && me.setToSJISFunction(i.toSJISFunc)), Bn(e, o, r, n);
1363
- };
1364
- var ht = {}, Re = {};
1365
- (function(t) {
1366
- function e(i) {
1367
- if (typeof i == "number" && (i = i.toString()), typeof i != "string")
1368
- throw new Error("Color should be defined as hex string");
1369
- let r = i.slice().replace("#", "").split("");
1370
- if (r.length < 3 || r.length === 5 || r.length > 8)
1371
- throw new Error("Invalid hex color: " + i);
1372
- (r.length === 3 || r.length === 4) && (r = Array.prototype.concat.apply([], r.map(function(n) {
1373
- return [n, n];
1374
- }))), r.length === 6 && r.push("F", "F");
1375
- const o = parseInt(r.join(""), 16);
1376
- return {
1377
- r: o >> 24 & 255,
1378
- g: o >> 16 & 255,
1379
- b: o >> 8 & 255,
1380
- a: o & 255,
1381
- hex: "#" + r.slice(0, 6).join("")
1382
- };
1383
- }
1384
- t.getOptions = function(r) {
1385
- r || (r = {}), r.color || (r.color = {});
1386
- const o = typeof r.margin > "u" || r.margin === null || r.margin < 0 ? 4 : r.margin, n = r.width && r.width >= 21 ? r.width : void 0, s = r.scale || 4;
1387
- return {
1388
- width: n,
1389
- scale: n ? 4 : s,
1390
- margin: o,
1391
- color: {
1392
- dark: e(r.color.dark || "#000000ff"),
1393
- light: e(r.color.light || "#ffffffff")
1394
- },
1395
- type: r.type,
1396
- rendererOpts: r.rendererOpts || {}
1397
- };
1398
- }, t.getScale = function(r, o) {
1399
- return o.width && o.width >= r + o.margin * 2 ? o.width / (r + o.margin * 2) : o.scale;
1400
- }, t.getImageWidth = function(r, o) {
1401
- const n = t.getScale(r, o);
1402
- return Math.floor((r + o.margin * 2) * n);
1403
- }, t.qrToImageData = function(r, o, n) {
1404
- const s = o.modules.size, l = o.modules.data, a = t.getScale(s, n), u = Math.floor((s + n.margin * 2) * a), f = n.margin * a, B = [n.color.light, n.color.dark];
1405
- for (let g = 0; g < u; g++)
1406
- for (let m = 0; m < u; m++) {
1407
- let C = (g * u + m) * 4, E = n.color.light;
1408
- if (g >= f && m >= f && g < u - f && m < u - f) {
1409
- const M = Math.floor((g - f) / a), p = Math.floor((m - f) / a);
1410
- E = B[l[M * s + p] ? 1 : 0];
1411
- }
1412
- r[C++] = E.r, r[C++] = E.g, r[C++] = E.b, r[C] = E.a;
1413
- }
1414
- };
1415
- })(Re);
1416
- (function(t) {
1417
- const e = Re;
1418
- function i(o, n, s) {
1419
- o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height = s, n.width = s, n.style.height = s + "px", n.style.width = s + "px";
1420
- }
1421
- function r() {
1422
- try {
1423
- return document.createElement("canvas");
1424
- } catch {
1425
- throw new Error("You need to specify a canvas element");
1426
- }
1427
- }
1428
- t.render = function(n, s, l) {
1429
- let a = l, u = s;
1430
- typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), s || (u = r()), a = e.getOptions(a);
1431
- const f = e.getImageWidth(n.modules.size, a), B = u.getContext("2d"), g = B.createImageData(f, f);
1432
- return e.qrToImageData(g.data, n, a), i(B, u, f), B.putImageData(g, 0, 0), u;
1433
- }, t.renderToDataURL = function(n, s, l) {
1434
- let a = l;
1435
- typeof a > "u" && (!s || !s.getContext) && (a = s, s = void 0), a || (a = {});
1436
- const u = t.render(n, s, a), f = a.type || "image/png", B = a.rendererOpts || {};
1437
- return u.toDataURL(f, B.quality);
1438
- };
1439
- })(ht);
1440
- var pt = {};
1441
- const Sn = Re;
1442
- function qe(t, e) {
1443
- const i = t.a / 255, r = e + '="' + t.hex + '"';
1444
- return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
1445
- }
1446
- function Ae(t, e, i) {
1447
- let r = t + e;
1448
- return typeof i < "u" && (r += " " + i), r;
1449
- }
1450
- function _n(t, e, i) {
1451
- let r = "", o = 0, n = !1, s = 0;
1452
- for (let l = 0; l < t.length; l++) {
1453
- const a = Math.floor(l % e), u = Math.floor(l / e);
1454
- !a && !n && (n = !0), t[l] ? (s++, l > 0 && a > 0 && t[l - 1] || (r += n ? Ae("M", a + i, 0.5 + u + i) : Ae("m", o, 0), o = 0, n = !1), a + 1 < e && t[l + 1] || (r += Ae("h", s), s = 0)) : o++;
1455
- }
1456
- return r;
1457
- }
1458
- pt.render = function(e, i, r) {
1459
- const o = Sn.getOptions(i), n = e.modules.size, s = e.modules.data, l = n + o.margin * 2, a = o.color.light.a ? "<path " + qe(o.color.light, "fill") + ' d="M0 0h' + l + "v" + l + 'H0z"/>' : "", u = "<path " + qe(o.color.dark, "stroke") + ' d="' + _n(s, n, o.margin) + '"/>', f = 'viewBox="0 0 ' + l + " " + l + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + f + ' shape-rendering="crispEdges">' + a + u + `</svg>
1460
- `;
1461
- return typeof r == "function" && r(null, g), g;
1462
- };
1463
- const Mn = $t, Ie = nt, yt = ht, Pn = pt;
1464
- function Fe(t, e, i, r, o) {
1465
- const n = [].slice.call(arguments, 1), s = n.length, l = typeof n[s - 1] == "function";
1466
- if (!l && !Mn())
1467
- throw new Error("Callback required as last argument");
1468
- if (l) {
1469
- if (s < 2)
1470
- throw new Error("Too few arguments provided");
1471
- s === 2 ? (o = i, i = e, e = r = void 0) : s === 3 && (e.getContext && typeof o > "u" ? (o = r, r = void 0) : (o = r, r = i, i = e, e = void 0));
1472
- } else {
1473
- if (s < 1)
1474
- throw new Error("Too few arguments provided");
1475
- return s === 1 ? (i = e, e = r = void 0) : s === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(a, u) {
1476
- try {
1477
- const f = Ie.create(i, r);
1478
- a(t(f, e, r));
1479
- } catch (f) {
1480
- u(f);
1481
- }
1482
- });
1483
- }
1484
- try {
1485
- const a = Ie.create(i, r);
1486
- o(null, t(a, e, r));
1487
- } catch (a) {
1488
- o(a);
1489
- }
1490
- }
1491
- ee.create = Ie.create;
1492
- ee.toCanvas = Fe.bind(null, yt.render);
1493
- ee.toDataURL = Fe.bind(null, yt.renderToDataURL);
1494
- ee.toString = Fe.bind(null, function(t, e, i) {
1495
- return Pn.render(t, i);
1496
- });
1497
- async function In(t, e = 350) {
1498
- try {
1499
- return await ee.toDataURL(t, {
1500
- width: e,
1501
- margin: 0
1502
- });
1503
- } catch (i) {
1504
- console.error(i);
1505
- }
1506
- }
1507
- var Tn = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
1508
- const Nn = { class: "flex items-start" }, Un = { class: "flex flex-col gap-16 mt-16" }, Ln = ["src"], Rn = /* @__PURE__ */ Te({
1509
- __name: "LinkDeviceDialog",
1510
- setup(t) {
1511
- const e = Se(), i = et(), r = Xe(), o = O(), n = O(), s = Tn.crmUrl, l = O(), a = K(() => i.membership), u = K(() => {
1512
- var g, m;
1513
- return `https://${(g = a.value) != null && g.url ? a.value.url : (m = a.value) == null ? void 0 : m.business}.${s}`;
1514
- });
1515
- async function f(g) {
1516
- const m = await Ze.getOtp(g);
1517
- return `${u.value}?link-device=${m.otp}`;
1518
- }
1519
- async function B(g) {
1520
- const m = await f(g);
1521
- l.value = m, o.value = await In(m);
1522
- }
1523
- return Qe(async () => {
1524
- if (await e.readLocations(), !e.locations.length) {
1525
- r.close();
1526
- return;
1527
- }
1528
- const g = e.locations[0]._id;
1529
- n.value = g, await B(g);
1530
- }), (g, m) => {
1531
- const C = U("FmIcon"), E = U("FmSelect"), M = U("FmButton"), p = U("FmCard");
1532
- return x(), le(p, { class: "p-24 max-w-[350px]" }, {
1533
- default: Y(() => [
1534
- h("div", Nn, [
1535
- m[3] || (m[3] = h("div", null, [
1536
- h("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
1537
- h("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
1538
- ], -1)),
1539
- _(C, {
1540
- name: "close",
1541
- onClick: m[0] || (m[0] = (v) => d(r).close()),
1542
- class: "cursor-pointer"
1543
- })
1544
- ]),
1545
- h("div", Un, [
1546
- _(E, {
1547
- modelValue: d(n),
1548
- "onUpdate:modelValue": [
1549
- m[1] || (m[1] = (v) => We(n) ? n.value = v : null),
1550
- B
1551
- ],
1552
- label: "Select Location",
1553
- items: d(e).locationItems.filter((v) => !!v.value)
1554
- }, null, 8, ["modelValue", "items"]),
1555
- h("img", {
1556
- src: d(o),
1557
- class: "aspect-square w-full"
1558
- }, null, 8, Ln),
1559
- _(M, {
1560
- class: "mx-auto",
1561
- variant: "plain",
1562
- icon: "content_copy",
1563
- onClick: m[2] || (m[2] = (v) => d(tt)(d(l)))
1564
- })
1565
- ])
1566
- ]),
1567
- _: 1
1568
- });
1569
- };
1570
- }
1571
- }), W = "__ALL__", Fn = /* @__PURE__ */ Te({
1572
- __name: "AllowedPhoneCountriesSelect",
1573
- props: {
1574
- modelValue: {}
1575
- },
1576
- emits: ["update:modelValue"],
1577
- setup(t, { emit: e }) {
1578
- const i = t, r = e, o = St.map((u) => ({
1579
- label: `${u.name} (${u.phoneCode})`,
1580
- value: u.phoneCode
1581
- })), n = K(() => [
1582
- { label: "All location", value: W },
1583
- ...o
1584
- ]), s = K(() => {
1585
- const u = i.modelValue;
1586
- return Array.isArray(u) && u.length === 0;
1587
- }), l = K({
1588
- get() {
1589
- const u = i.modelValue;
1590
- return u == null ? [W] : u.length === 0 ? [] : [...u];
1591
- },
1592
- set(u) {
1593
- const f = l.value;
1594
- if (u.filter((g) => !f.includes(g)).includes(W))
1595
- r("update:modelValue", null);
1596
- else {
1597
- const g = u.filter((m) => m !== W);
1598
- g.length === 0 && !s.value ? r("update:modelValue", null) : r("update:modelValue", g);
1599
- }
1600
- }
1601
- }), a = K(() => s.value ? "No countries are allowed. Phone registration is disabled." : l.value.includes(W) || l.value.length === 0 ? "All countries are allowed. No restriction applied." : "Only selected countries will be allowed for phone registration.");
1602
- return (u, f) => {
1603
- const B = U("FmSelect");
1604
- return x(), le(B, {
1605
- modelValue: d(l),
1606
- "onUpdate:modelValue": f[0] || (f[0] = (g) => We(l) ? l.value = g : null),
1607
- label: "Allowed countries",
1608
- items: d(n),
1609
- multiselect: "",
1610
- searchable: "",
1611
- searchTarget: "label",
1612
- placeholder: "Search and select countries",
1613
- "helper-text": d(a)
1614
- }, null, 8, ["modelValue", "items", "helper-text"]);
1615
- };
1616
- }
1617
- });
1618
- var Be = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
1619
- 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 = {
1620
- key: 0,
1621
- class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1622
- }, $n = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, xn = { class: "fm-typo-en-title-sm-800" }, Hn = { class: "space-y-24" }, zn = { 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" }, Gn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, qn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Qn = { class: "space-y-8" }, Wn = { class: "space-y-8" }, Xn = { class: "space-y-8" }, Zn = { class: "space-y-8" }, eo = { class: "space-y-8" }, to = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, no = { class: "space-y-8" }, oo = { class: "space-y-8" }, ro = { class: "space-y-8" }, io = { class: "flex justify-end pb-24" }, so = { class: "col-span-1 space-y-8 xs:hidden" }, lo = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-lg-600" }, uo = { class: "fm-typo-en-body-lg-600" }, co = { class: "fm-typo-en-body-lg-600" }, Lo = /* @__PURE__ */ Te({
1623
- __name: "Setting",
1624
- setup(t) {
1625
- const e = Ft(), i = Bt(), r = Rt(), o = Se(), n = et(), { global: s, minor: l } = At, a = Xe(), u = O(), f = O([]), B = O(null), g = _t, m = [
1626
- (A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1627
- (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"
1628
- ], C = Be.appUrl, E = K(() => {
1629
- var A;
1630
- return `https://${(A = u.value) == null ? void 0 : A.business}.${C}`;
1631
- }), M = O(), { t: p } = Lt(), v = r.currentCountry.value || "MY", w = [
1632
- "user.name",
1633
- "user.gender",
1634
- "user.birthday",
1635
- "user.phoneNumber",
1636
- "membership.url"
1637
- ].filter(
1638
- (A) => {
1639
- var c;
1640
- return !((c = Nt[v]) != null && c.includes(A));
1641
- }
1642
- );
1643
- async function y() {
1644
- a.open({
1645
- title: "",
1646
- dialogComponent: Rn,
1647
- closeButton: !1
1648
- });
1649
- }
1650
- async function S(A) {
1651
- await It.remove(
1652
- "Are you sure you want to unlink this device?",
1653
- "Unlink device",
1654
- "Unlink"
1655
- ) && await l(
1656
- async () => {
1657
- await Ze.unregisterDevice(A), await o.readLocationDevices();
1658
- },
1659
- {
1660
- message: "Unlinking device",
1661
- successMessage: "Unlinked device successfully"
1662
- }
1663
- );
1664
- }
1665
- async function P() {
1666
- await l(
1667
- async () => {
1668
- var V;
1669
- const A = Vt(u.value);
1670
- console.log(u.value), A.welcomeMessage && !((V = A.welcomeMessage) != null && V.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
1671
- const c = Mt.parse(A);
1672
- M.value === null && c.image ? await re.delete(re.coverImagePath()) : M.value && (c.image = await re.update(
1673
- re.coverImagePath(),
1674
- M.value
1675
- )), await Ye.update(c), await n.readMembership(), u.value = n.membership;
1676
- },
1677
- {
1678
- message: "Updating membership",
1679
- successMessage: "Membership updated successfully"
1680
- }
1681
- );
1682
- }
1683
- async function I() {
1684
- const A = await Ye.getEmailAddresses();
1685
- console.log(A), f.value = A, B.value = A.find((c) => c.default.includes("Marketing"));
1686
- }
1687
- async function N() {
1688
- window.open(
1689
- `${Be.licensePortalUrl}business/${je.businessId}/settings`,
1690
- "_blank"
1691
- );
1692
- }
1693
- async function k() {
1694
- const A = `${Be.licensePortalUrl}settings?businessId=${je.businessId}`;
1695
- console.log("Opening", A), window.open(A, "_blank");
1696
- }
1697
- return Qe(async () => {
1698
- await s(async () => {
1699
- await o.readPremium(), await o.readLocations(), await o.readLocationDevices(), await n.readMembership(), await I(), u.value = n.membership;
1700
- });
1701
- }), (A, c) => {
1702
- var De, Ve, $e, xe, He, ze, Oe;
1703
- const V = U("FmPageHead"), T = U("FmButton"), ne = U("FmTextField"), ge = U("FmCard"), ke = U("FmPill"), wt = U("FmSelect"), he = U("FmSwitch"), bt = U("FmMenuDivider");
1704
- return x(), oe(ye, null, [
1705
- _(V, {
1706
- title: d(p)("connect.setting.title"),
1707
- class: "xs:hidden"
1708
- }, null, 8, ["title"]),
1709
- h("div", kn, [
1710
- h("div", Dn, R(d(p)("connect.setting.basicInfo.title")), 1),
1711
- _(T, {
1712
- icon: "info",
1713
- variant: "tertiary"
1714
- })
1715
- ]),
1716
- d(u) ? (x(), oe("div", Vn, [
1717
- h("div", $n, [
1718
- h("div", xn, R(d(p)("connect.setting.basicInfo.title")), 1),
1719
- h("div", Hn, [
1720
- _(ne, {
1721
- label: d(p)("connect.setting.basicInfo.membershipTitle"),
1722
- modelValue: d(u).name,
1723
- "onUpdate:modelValue": c[0] || (c[0] = (b) => d(u).name = b)
1724
- }, null, 8, ["label", "modelValue"]),
1725
- _(ne, {
1726
- disabled: !0,
1727
- "model-value": d(u).business,
1728
- rules: m,
1729
- required: !0,
1730
- label: d(p)("connect.setting.basicInfo.memberAppUrl"),
1731
- "helper-text": d(E),
1732
- placeholder: d(u).business.toString(),
1733
- "onUpdate:modelValue": c[2] || (c[2] = (b) => d(u).url = b)
1734
- }, {
1735
- prepend: Y(() => [...c[15] || (c[15] = [
1736
- Q(" https:// ", -1)
1737
- ])]),
1738
- append: Y(() => [
1739
- Q(" ." + R(d(C)) + " ", 1),
1740
- _(T, {
1741
- icon: "content_copy",
1742
- variant: "tertiary",
1743
- onClick: c[1] || (c[1] = (b) => d(tt)(d(E)))
1744
- })
1745
- ]),
1746
- _: 1
1747
- }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1748
- _(Pt, {
1749
- label: "Cover image",
1750
- class: "w-2/3 xs:w-full",
1751
- "image-fit": "cover",
1752
- "aspect-ratio": "3/1",
1753
- thumbnail: d(u).image || void 0,
1754
- "onUpdate:file": c[3] || (c[3] = async (b) => {
1755
- M.value = b, b || (d(u).image = null);
1756
- })
1757
- }, null, 8, ["thumbnail"]),
1758
- h("div", zn, [
1759
- h("div", On, R(d(p)("connect.setting.counterApp.title")), 1),
1760
- _(T, {
1761
- variant: "plain",
1762
- icon: "link",
1763
- label: d(p)("connect.setting.counterApp.linkDevice"),
1764
- onClick: y
1765
- }, null, 8, ["label"]),
1766
- (x(!0), oe(ye, null, Ct(d(o).locationDevices, (b, F) => (x(), le(ge, {
1767
- key: F,
1768
- variant: "outlined",
1769
- class: "flex items-center justify-between px-16 py-12"
1770
- }, {
1771
- default: Y(() => [
1772
- h("div", null, [
1773
- h("p", Kn, R(b.name || `Device ${b._id}`), 1),
1774
- h("p", Yn, " Activation date: " + R(d(Et)(d(Dt)(b._id.toString())).format(
1775
- "D MMM YYYY"
1776
- )), 1),
1777
- h("p", jn, " Linked location: " + R(d(o).locations.find(($) => $._id == b.location).name), 1)
1778
- ]),
1779
- _(T, {
1780
- icon: "link_off",
1781
- variant: "tertiary",
1782
- onClick: ($) => S(b._id)
1783
- }, null, 8, ["onClick"])
1784
- ]),
1785
- _: 2
1786
- }, 1024))), 128))
1787
- ]),
1788
- h("div", Jn, [
1789
- h("div", Gn, [
1790
- c[16] || (c[16] = Q(" Advertisement ", -1)),
1791
- _(ke, { variant: "premium" })
1792
- ]),
1793
- _(ge, {
1794
- variant: "outlined",
1795
- class: "p-16 flex items-center justify-between"
1796
- }, {
1797
- default: Y(() => {
1798
- var b;
1799
- return [
1800
- h("div", null, [
1801
- c[17] || (c[17] = h("div", { class: "fm-typo-en-body-lg-600" }, "Manage Advertisements", -1)),
1802
- h("div", qn, R(((b = d(u).advertisements) == null ? void 0 : b.length) ?? 0) + " active ad(s) showing on FeedMe ordering app ", 1)
1803
- ]),
1804
- _(T, {
1805
- label: "Manage",
1806
- icon: "arrow_forward",
1807
- "icon-position": "right",
1808
- disabled: !d(o).isPremium,
1809
- onClick: c[4] || (c[4] = (F) => d(e).push({
1810
- name: d(kt)["$connect-SETTING_ADVERTISEMENTS"]
1811
- }))
1812
- }, null, 8, ["disabled"])
1813
- ];
1814
- }),
1815
- _: 1
1816
- })
1817
- ]),
1818
- h("div", Qn, [
1819
- c[18] || (c[18] = h("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1820
- _(ne, {
1821
- "model-value": ((De = d(u)) == null ? void 0 : De.brand) || "",
1822
- "max-length": 15,
1823
- label: "Brand Name",
1824
- "show-word-count": "",
1825
- "helper-text": `RM 0 ${((Ve = d(u)) == null ? void 0 : Ve.brand) || ""}: YOUR CUSTOMER MESSAGE`,
1826
- "onUpdate:modelValue": c[5] || (c[5] = (b) => d(u).brand = b)
1827
- }, null, 8, ["model-value", "helper-text"]),
1828
- _(Ut, {
1829
- modelValue: d(u).welcomeMessage,
1830
- "onUpdate:modelValue": c[6] || (c[6] = (b) => d(u).welcomeMessage = b),
1831
- variables: d(w),
1832
- placeholder: "Hi there, you have been invited to join membership"
1833
- }, null, 8, ["modelValue", "variables"])
1834
- ]),
1835
- h("div", Wn, [
1836
- c[19] || (c[19] = h("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1837
- c[20] || (c[20] = h("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Email address that will be used to send email broadcast ", -1)),
1838
- d(f).length ? we("", !0) : (x(), le(T, {
1839
- key: 0,
1840
- onClick: N,
1841
- label: "Add new email address"
1842
- })),
1843
- d(f).length ? (x(), oe(ye, { key: 1 }, [
1844
- _(wt, {
1845
- "model-value": ((xe = ($e = d(u)) == null ? void 0 : $e.email) == null ? void 0 : xe.from) || null,
1846
- label: "From Address",
1847
- items: d(f).map((b) => ({
1848
- label: b.emailAddress,
1849
- value: b.emailAddress
1850
- })),
1851
- placeholder: d(B) ? d(B).emailAddress : "No email address available",
1852
- "onUpdate:modelValue": c[7] || (c[7] = (b) => {
1853
- var F, $;
1854
- (F = d(u)) != null && F.email || (d(u).email = {
1855
- from: b,
1856
- name: ($ = d(f).find((pe) => pe.emailAddress == b)) == null ? void 0 : $.name
1857
- }), d(u).email.from = b || null;
1858
- }),
1859
- rules: [d(Ke).ruleAtPath(d(g), "email.from")]
1860
- }, null, 8, ["model-value", "items", "placeholder", "rules"]),
1861
- _(ne, {
1862
- "model-value": ((ze = (He = d(u)) == null ? void 0 : He.email) == null ? void 0 : ze.name) || null,
1863
- label: "Sender name",
1864
- disabled: "",
1865
- placeholder: ((Oe = d(B)) == null ? void 0 : Oe.name) || null,
1866
- "onUpdate:modelValue": c[8] || (c[8] = (b) => {
1867
- var F;
1868
- (F = d(u)) != null && F.email || (d(u).email = {
1869
- name: b
1870
- }), d(u).email.name = b || null;
1871
- }),
1872
- rules: [d(Ke).ruleAtPath(d(g), "email.name")]
1873
- }, null, 8, ["model-value", "placeholder", "rules"])
1874
- ], 64)) : we("", !0)
1875
- ]),
1876
- h("div", Xn, [
1877
- c[21] || (c[21] = h("div", { class: "fm-typo-en-title-sm-800" }, "Whatsapp Channel", -1)),
1878
- c[22] || (c[22] = h("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Whatsapp phone number that will be used to send whatsapp broadcast ", -1)),
1879
- _(T, {
1880
- label: "Manage Whatsapp Channel",
1881
- icon: "open_in_new",
1882
- onClick: c[9] || (c[9] = (b) => k())
1883
- })
1884
- ]),
1885
- h("div", Zn, [
1886
- c[23] || (c[23] = h("div", { class: "fm-typo-en-title-sm-800" }, [
1887
- Q(" Free Credit as Discount "),
1888
- h("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
1889
- ], -1)),
1890
- _(he, {
1891
- "model-value": d(u).freeCreditAsDiscount ?? !1,
1892
- "onUpdate:modelValue": c[10] || (c[10] = (b) => d(u).freeCreditAsDiscount = b),
1893
- label: "Free Credit as Discount",
1894
- sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
1895
- "label-placement": "right",
1896
- value: ""
1897
- }, null, 8, ["model-value"])
1898
- ]),
1899
- h("div", eo, [
1900
- h("div", to, [
1901
- c[24] || (c[24] = Q(" Member Card ", -1)),
1902
- _(ke, { variant: "premium" })
1903
- ]),
1904
- _(he, {
1905
- "model-value": d(u).cardEnable ?? !1,
1906
- "onUpdate:modelValue": c[11] || (c[11] = (b) => d(u).cardEnable = b),
1907
- label: "",
1908
- sublabel: "Allow member to bind card via member app",
1909
- "label-placement": "right",
1910
- value: "",
1911
- disabled: !d(o).isPremium
1912
- }, null, 8, ["model-value", "disabled"])
1913
- ]),
1914
- h("div", no, [
1915
- c[25] || (c[25] = h("div", { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, " Auto Revert Reward ", -1)),
1916
- _(he, {
1917
- "model-value": d(u).autoRevertReward ?? !1,
1918
- "onUpdate:modelValue": c[12] || (c[12] = (b) => d(u).autoRevertReward = b),
1919
- label: "",
1920
- sublabel: "When enabled, rewards are automatically revert when if a refund is processed in POS",
1921
- "label-placement": "right",
1922
- value: ""
1923
- }, null, 8, ["model-value"])
1924
- ]),
1925
- h("div", oo, [
1926
- c[26] || (c[26] = h("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
1927
- _(Tt, {
1928
- label: "Select restaurant",
1929
- "model-value": d(u).targetLocation ?? null,
1930
- "onUpdate:modelValue": c[13] || (c[13] = (b) => d(u).targetLocation = b)
1931
- }, null, 8, ["model-value"])
1932
- ]),
1933
- h("div", ro, [
1934
- c[27] || (c[27] = h("div", { class: "fm-typo-en-title-sm-800" }, "Allowed Phone Countries", -1)),
1935
- c[28] || (c[28] = h("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Restricts phone numbers on POS invite/search, member registration, and kiosk membership entry. ", -1)),
1936
- _(Fn, {
1937
- modelValue: d(u).allowedPhoneCountries,
1938
- "onUpdate:modelValue": c[14] || (c[14] = (b) => d(u).allowedPhoneCountries = b)
1939
- }, null, 8, ["modelValue"])
1940
- ]),
1941
- h("div", io, [
1942
- _(T, {
1943
- label: "Update",
1944
- type: "button",
1945
- onClick: P,
1946
- disabled: !!d(i).loadingQueue.length,
1947
- loading: !!d(i).loadingQueue.length
1948
- }, null, 8, ["disabled", "loading"])
1949
- ])
1950
- ])
1951
- ]),
1952
- h("div", so, [
1953
- _(ge, {
1954
- variant: "outlined",
1955
- class: "flex flex-col p-24 gap-8"
1956
- }, {
1957
- default: Y(() => {
1958
- var b, F, $;
1959
- return [
1960
- c[33] || (c[33] = h("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
1961
- _(bt, { class: "my-4" }),
1962
- h("div", null, [
1963
- c[29] || (c[29] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
1964
- h("div", lo, R(d(u).name), 1)
1965
- ]),
1966
- h("div", null, [
1967
- c[30] || (c[30] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
1968
- h("div", ao, R((((b = d(u).advertisements) == null ? void 0 : b.length) ?? 0) || "No advertisments"), 1)
1969
- ]),
1970
- h("div", null, [
1971
- c[31] || (c[31] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
1972
- h("div", uo, R(d(u).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
1973
- ]),
1974
- h("div", null, [
1975
- c[32] || (c[32] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
1976
- h("div", co, R(!d(u).targetLocation || d(u).targetLocation.length == d(Se)().locations.length ? "All locations" : ($ = (F = d(u)) == null ? void 0 : F.targetLocation) == null ? void 0 : $.map(
1977
- (pe) => d(o).locations.find((vt) => vt._id == pe).name
1978
- ).join(", ")), 1)
1979
- ])
1980
- ];
1981
- }),
1982
- _: 1
1983
- })
1984
- ])
1985
- ])) : we("", !0)
1986
- ], 64);
1987
- };
1988
- }
1989
- });
1990
- export {
1991
- Lo as default
1992
- };