@feedmepos/mf-connect 0.1.38-beta.31 → 0.1.38-beta.33

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 (97) hide show
  1. package/dist/{Analytic-C_nMR1Be.js → Analytic-B1hvdnhQ.js} +13 -13
  2. package/dist/{App-s6O0r91S.js → App-BCjFwtVu.js} +7 -7
  3. package/dist/{AuditLogs-BcVkpvGw.js → AuditLogs-DwOzstOt.js} +9 -9
  4. package/dist/{Bin-C5g9jHoQ.js → Bin-BgnnzoZS.js} +8 -8
  5. package/dist/{Broadcast-JPTVWDJC.js → Broadcast-DqSOAE01.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CloO2B7A.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CBMG8_Sk.js} +6 -6
  7. package/dist/{Card-Dgj6yukn.js → Card-A9CkhfVY.js} +17 -17
  8. package/dist/{Collections-D-aFYRCq.js → Collections-BgnFnaWo.js} +6 -6
  9. package/dist/{Credit-BZcRB9Wj.js → Credit-a_OpuZJM.js} +9 -9
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DnPPICf0.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CNBh1Id6.js} +32 -32
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DbSiVLaJ.js → EffectSheet.vue_vue_type_style_index_0_lang-oao_UwRf.js} +6 -6
  13. package/dist/{Experience-DHQPxVv3.js → Experience-CpGj9JqO.js} +9 -9
  14. package/dist/{Game-C1XnMgil.js → Game-D0e3MyPK.js} +10 -10
  15. package/dist/{Grab-BbHccgZO.js → Grab-Exo0vj4b.js} +9 -9
  16. package/dist/{Index-DYZsN2H3.js → Index-DU0reBq4.js} +10 -10
  17. package/dist/{Marketing-DnsPHYpt.js → Marketing-BZtDNsA-.js} +6 -6
  18. package/dist/{Member-rkdV1fVo.js → Member-D8buIkBR.js} +10 -10
  19. package/dist/{MemberList-QaB13bxO.js → MemberList-CDwYfTlS.js} +81 -80
  20. package/dist/{MemberTransactions-Dw5qHQVW.js → MemberTransactions-DRkpizb_.js} +1 -1
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DGyv0LMu.js → MessageInput.vue_vue_type_script_setup_true_lang-VzyI4O5z.js} +7 -7
  22. package/dist/{Mission-B7rAzf6O.js → Mission-BTzIK2Yx.js} +10 -10
  23. package/dist/{Overview-Cg4Szz05.js → Overview-CMkljRYt.js} +18 -18
  24. package/dist/{Point-DuKS8-0D.js → Point-DGPLd8z-.js} +9 -9
  25. package/dist/Promotion-D8K2pFnv.js +359 -0
  26. package/dist/{Queue-BZONVNCP.js → Queue-CySghWZm.js} +10 -10
  27. package/dist/{Record-jNEahJNC.js → Record-CxloqLoN.js} +8 -8
  28. package/dist/{Reward-VS6C6NQO.js → Reward-DxvFaqzm.js} +15 -15
  29. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D4KMGgkv.js → RewardGroup.vue_vue_type_script_setup_true_lang-WOC3rplt.js} +11 -11
  30. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cb-WJA0i.js → RuleGroup.vue_vue_type_script_setup_true_lang-C4zhGkBY.js} +165 -165
  31. package/dist/{Segment-DK5tqeOF.js → Segment-DKD6P0cE.js} +22 -22
  32. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-AYAwO37B.js → SelectItems.vue_vue_type_script_setup_true_lang-bpblaVLq.js} +2 -2
  33. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-K8js6fbo.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1g0fHPV.js} +11 -11
  34. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-lcPHPa4K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CSR5EuVO.js} +3 -3
  35. package/dist/Setting-khHGWePA.js +1929 -0
  36. package/dist/SettingAdvertisements-DJHKjE95.js +264 -0
  37. package/dist/{Store-DqFW5hr_.js → Store-0cJJpCIV.js} +19 -19
  38. package/dist/{StoreRewards-g-3WtxwG.js → StoreRewards-CV8XStEA.js} +13 -13
  39. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DNT4PWgl.js → StoreTransactions.vue_vue_type_script_setup_true_lang-Bqw4ayC4.js} +20 -20
  40. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CXYnNSta.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BprUyeOJ.js} +1 -1
  41. package/dist/{Tier-SHij9zKX.js → Tier-BgahD6Rs.js} +124 -120
  42. package/dist/{Title-_2JVV1rW.js → Title-DKGqu5SL.js} +19 -19
  43. package/dist/{Transaction-BHLb6hZN.js → Transaction-Bu-Zaa-_.js} +2 -2
  44. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DolBmHzN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-cDZZz9DR.js} +7 -7
  45. package/dist/{Voucher-CJk8ZuCA.js → Voucher-sko-4yOv.js} +13 -13
  46. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BviU3rz6.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DVlYxnyk.js} +10 -10
  47. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-R4Xcn7gl.js → ZodTextField.vue_vue_type_script_setup_true_lang-CeNxiT5A.js} +1 -1
  48. package/dist/{app-D9ygZVP0.js → app-B06WmmlS.js} +58 -52
  49. package/dist/{app-BpcIC6Ud.js → app-DivOpQ--.js} +1 -1
  50. package/dist/app.js +1 -1
  51. package/dist/{business-CzJxdKc-.js → business-ClV-3_wH.js} +1 -1
  52. package/dist/{campaign-s_7F9I6R.js → campaign-C-DtV5gs.js} +2 -2
  53. package/dist/{campaign-RKjwSpJk.js → campaign-ChCAqzSE.js} +9 -9
  54. package/dist/{campaign.enum-BlGYJ6p4.js → campaign.enum-HJvL6WCW.js} +1 -1
  55. package/dist/{campaign.fn-aH0pz1jU.js → campaign.fn-FkHPIhXx.js} +30 -30
  56. package/dist/{collectible.enum-DYV8J5Mg.js → collectible.enum-DlxRyJMy.js} +1 -1
  57. package/dist/{collection.fn-lLG_rLyd.js → collection.fn-DmYKiZsL.js} +2 -2
  58. package/dist/{dto-Cx-z2h2_.js → dto-BKG9T2I2.js} +4 -4
  59. package/dist/{effect-DV2GiHqM.js → effect-qQUWG0In.js} +1 -1
  60. package/dist/{email-addresses-DTfbKDsC.js → email-addresses-Dqyt8I7s.js} +1 -1
  61. package/dist/{export-hHjutAC3.js → export-CUcU1l-K.js} +3 -3
  62. package/dist/{helper-oy_DH4P5.js → helper-Bxi0o7m8.js} +1 -1
  63. package/dist/{index-BA6oC2L9.js → index-B5SrWi06.js} +3 -3
  64. package/dist/{index-DJlZYwDo.js → index-B94mBxiL.js} +1 -1
  65. package/dist/{index-B79nkieV.js → index-BAv3BkZY.js} +1023 -1023
  66. package/dist/{index-Ba05Naif.js → index-BEN3tBqd.js} +4 -6
  67. package/dist/{index-CycW9ri6.js → index-BL_1CL4C.js} +3 -3
  68. package/dist/{index-B1C5UjP5.js → index-BWq6tQbu.js} +1 -1
  69. package/dist/{index-CtxtD8HE.js → index-C06Q7hpx.js} +1 -1
  70. package/dist/{index-ClgsfK3Y.js → index-Ct2-fiN2.js} +1 -1
  71. package/dist/{index-D8JDdV2w.js → index-DdekcTG4.js} +1 -1
  72. package/dist/{index-BoRTW-dI.js → index-Dhh1sEG_.js} +8 -7
  73. package/dist/{index-CV_3mltA.js → index-DlK01rGI.js} +1 -1
  74. package/dist/{index-sSxaqeIi.js → index-DzELBV8R.js} +4 -1
  75. package/dist/{index-8t9y1bUZ.js → index-TKz_0Ysa.js} +1 -1
  76. package/dist/{index-CUGS4y58.js → index-UjD7i6Rs.js} +412 -389
  77. package/dist/{index.esm2017-B3-oEraK.js → index.esm2017-DHCRXeWh.js} +1 -1
  78. package/dist/{loading-D98ofaCB.js → loading-B_UZCyhK.js} +1 -1
  79. package/dist/{membership-CwbI7ZrE.js → membership-_kM8eXz7.js} +3 -3
  80. package/dist/{money-D5cHxcPB.js → money-CoVA-srK.js} +1 -1
  81. package/dist/{number-CPEEKMZZ.js → number-YRitPV2s.js} +1 -1
  82. package/dist/{objectid-Be_atBnH.js → objectid-C1na7D-x.js} +5 -5
  83. package/dist/{plugins-B55BRo5q.js → plugins-CRzS5EeK.js} +2 -2
  84. package/dist/{reward-xrTcTYjt.js → reward-BzSjQxTf.js} +1 -1
  85. package/dist/{rule-w89XmfIg.js → rule-BTgu7Yg-.js} +3 -3
  86. package/dist/rule-builder-DqxBZKm0.js +102 -0
  87. package/dist/{template-Bt_auQZW.js → template-Cb_6r-V_.js} +4 -4
  88. package/dist/{timezone-BcBn2Kb_.js → timezone-_t4BbV7Q.js} +1 -1
  89. package/dist/{trigger-D_6mNiva.js → trigger-B0ldNAaK.js} +4 -4
  90. package/dist/{user-B6YOJ_7r.js → user-B4J6WtQq.js} +1 -1
  91. package/dist/{vue-i18n-QvFKKqSt.js → vue-i18n-c1uC6tyM.js} +2 -2
  92. package/dist/{xlsx-Dr9Ctrs4.js → xlsx-BRAFCQ59.js} +1 -1
  93. package/package.json +1 -1
  94. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  95. package/dist/Promotion-CFtLq-LB.js +0 -289
  96. package/dist/Setting-BtiUlWRc.js +0 -1947
  97. package/dist/rule-builder-NTDBB2kj.js +0 -93
@@ -0,0 +1,1929 @@
1
+ import { defineComponent as Ge, ref as O, computed as Ee, onMounted as qe, resolveComponent as L, openBlock as H, createBlock as Ae, withCtx as K, createElementVNode as h, createVNode as S, unref as d, isRef as bt, createElementBlock as te, Fragment as he, toDisplayString as R, createTextVNode as q, createCommentVNode as ne, renderList as vt } from "vue";
2
+ import { h as Ct } from "./moment-D7p2TMB-.js";
3
+ import { Z as He } from "./zod-Bg2FbC-D.js";
4
+ import { useDialog as Qe } from "@feedmepos/ui-library";
5
+ import { u as Et } from "./loading-B_UZCyhK.js";
6
+ import { u as At } from "./app-wDQR6dpb.js";
7
+ import { u as Be, l as We } from "./business-ClV-3_wH.js";
8
+ import { u as Xe } from "./membership-_kM8eXz7.js";
9
+ import "./index-BAv3BkZY.js";
10
+ import { s as Bt, k as Mt } from "./index-UjD7i6Rs.js";
11
+ import { a as Ze, p as St, f as oe } from "./plugins-CRzS5EeK.js";
12
+ import { _ as It } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-BprUyeOJ.js";
13
+ import { M as _t, _ as Tt } from "./MessageInput.vue_vue_type_script_setup_true_lang-VzyI4O5z.js";
14
+ import { u as Pt } from "./vue-i18n-c1uC6tyM.js";
15
+ import { useCoreStore as Nt } from "@feedmepos/mf-common";
16
+ import { useRouter as Ut } from "vue-router";
17
+ import { R as Rt } from "./app-B06WmmlS.js";
18
+ import { m as Oe } from "./index-B94mBxiL.js";
19
+ import { S as Ke } from "./index-BL_1CL4C.js";
20
+ import { o as Lt } from "./objectId-dwaoBfJX.js";
21
+ import { a as Ft } from "./object-qECH92oz.js";
22
+ var X = {}, kt = function() {
23
+ return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
24
+ }, et = {}, U = {};
25
+ let Te;
26
+ const Dt = [
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
+ U.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
+ U.getSymbolTotalCodewords = function(e) {
76
+ return Dt[e];
77
+ };
78
+ U.getBCHDigit = function(t) {
79
+ let e = 0;
80
+ for (; t !== 0; )
81
+ e++, t >>>= 1;
82
+ return e;
83
+ };
84
+ U.setToSJISFunction = function(e) {
85
+ if (typeof e != "function")
86
+ throw new Error('"toSJISFunc" is not a valid function.');
87
+ Te = e;
88
+ };
89
+ U.isKanjiModeEnabled = function() {
90
+ return typeof Te < "u";
91
+ };
92
+ U.toSJIS = function(e) {
93
+ return Te(e);
94
+ };
95
+ var ae = {};
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
+ })(ae);
130
+ function tt() {
131
+ this.buffer = [], this.length = 0;
132
+ }
133
+ tt.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 Vt = tt;
151
+ function Z(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
+ Z.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
+ Z.prototype.get = function(t, e) {
161
+ return this.data[t * this.size + e];
162
+ };
163
+ Z.prototype.xor = function(t, e, i) {
164
+ this.data[t * this.size + e] ^= i;
165
+ };
166
+ Z.prototype.isReserved = function(t, e) {
167
+ return this.reservedBit[t * this.size + e];
168
+ };
169
+ var $t = Z, nt = {};
170
+ (function(t) {
171
+ const e = U.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, a = [n - 7];
175
+ for (let l = 1; l < o - 1; l++)
176
+ a[l] = a[l - 1] - s;
177
+ return a.push(6), a.reverse();
178
+ }, t.getPositions = function(r) {
179
+ const o = [], n = t.getRowColCoords(r), s = n.length;
180
+ for (let a = 0; a < s; a++)
181
+ for (let l = 0; l < s; l++)
182
+ a === 0 && l === 0 || // top-left
183
+ a === 0 && l === s - 1 || // bottom-left
184
+ a === s - 1 && l === 0 || o.push([n[a], n[l]]);
185
+ return o;
186
+ };
187
+ })(nt);
188
+ var ot = {};
189
+ const xt = U.getSymbolSize, Ye = 7;
190
+ ot.getPositions = function(e) {
191
+ const i = xt(e);
192
+ return [
193
+ // top-left
194
+ [0, 0],
195
+ // top-right
196
+ [i - Ye, 0],
197
+ // bottom-left
198
+ [0, i - Ye]
199
+ ];
200
+ };
201
+ var rt = {};
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, a = 0, l = 0, c = null, m = null;
226
+ for (let B = 0; B < n; B++) {
227
+ a = l = 0, c = m = null;
228
+ for (let g = 0; g < n; g++) {
229
+ let f = o.get(B, g);
230
+ f === c ? a++ : (a >= 5 && (s += e.N1 + (a - 5)), c = f, a = 1), f = o.get(g, B), f === m ? l++ : (l >= 5 && (s += e.N1 + (l - 5)), m = f, l = 1);
231
+ }
232
+ a >= 5 && (s += e.N1 + (a - 5)), l >= 5 && (s += e.N1 + (l - 5));
233
+ }
234
+ return s;
235
+ }, t.getPenaltyN2 = function(o) {
236
+ const n = o.size;
237
+ let s = 0;
238
+ for (let a = 0; a < n - 1; a++)
239
+ for (let l = 0; l < n - 1; l++) {
240
+ const c = o.get(a, l) + o.get(a, l + 1) + o.get(a + 1, l) + o.get(a + 1, l + 1);
241
+ (c === 4 || c === 0) && s++;
242
+ }
243
+ return s * e.N2;
244
+ }, t.getPenaltyN3 = function(o) {
245
+ const n = o.size;
246
+ let s = 0, a = 0, l = 0;
247
+ for (let c = 0; c < n; c++) {
248
+ a = l = 0;
249
+ for (let m = 0; m < n; m++)
250
+ a = a << 1 & 2047 | o.get(c, m), m >= 10 && (a === 1488 || a === 93) && s++, l = l << 1 & 2047 | o.get(m, c), m >= 10 && (l === 1488 || l === 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 l = 0; l < s; l++) n += o.data[l];
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 a = 0; a < s; a++)
284
+ for (let l = 0; l < s; l++)
285
+ n.isReserved(l, a) || n.xor(l, a, i(o, l, a));
286
+ }, t.getBestMask = function(o, n) {
287
+ const s = Object.keys(t.Patterns).length;
288
+ let a = 0, l = 1 / 0;
289
+ for (let c = 0; c < s; c++) {
290
+ n(c), t.applyMask(c, o);
291
+ const m = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
292
+ t.applyMask(c, o), m < l && (l = m, a = c);
293
+ }
294
+ return a;
295
+ };
296
+ })(rt);
297
+ var ce = {};
298
+ const x = ae, re = [
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
+ ], ie = [
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
+ ce.getBlocksCount = function(e, i) {
624
+ switch (i) {
625
+ case x.L:
626
+ return re[(e - 1) * 4 + 0];
627
+ case x.M:
628
+ return re[(e - 1) * 4 + 1];
629
+ case x.Q:
630
+ return re[(e - 1) * 4 + 2];
631
+ case x.H:
632
+ return re[(e - 1) * 4 + 3];
633
+ default:
634
+ return;
635
+ }
636
+ };
637
+ ce.getTotalCodewordsCount = function(e, i) {
638
+ switch (i) {
639
+ case x.L:
640
+ return ie[(e - 1) * 4 + 0];
641
+ case x.M:
642
+ return ie[(e - 1) * 4 + 1];
643
+ case x.Q:
644
+ return ie[(e - 1) * 4 + 2];
645
+ case x.H:
646
+ return ie[(e - 1) * 4 + 3];
647
+ default:
648
+ return;
649
+ }
650
+ };
651
+ var it = {}, ue = {};
652
+ const Q = new Uint8Array(512), se = new Uint8Array(256);
653
+ (function() {
654
+ let e = 1;
655
+ for (let i = 0; i < 255; i++)
656
+ Q[i] = e, se[e] = i, e <<= 1, e & 256 && (e ^= 285);
657
+ for (let i = 255; i < 512; i++)
658
+ Q[i] = Q[i - 255];
659
+ })();
660
+ ue.log = function(e) {
661
+ if (e < 1) throw new Error("log(" + e + ")");
662
+ return se[e];
663
+ };
664
+ ue.exp = function(e) {
665
+ return Q[e];
666
+ };
667
+ ue.mul = function(e, i) {
668
+ return e === 0 || i === 0 ? 0 : Q[se[e] + se[i]];
669
+ };
670
+ (function(t) {
671
+ const e = ue;
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 a = 0; a < o.length; a++)
676
+ n[s + a] ^= e.mul(r[s], o[a]);
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 l = 0; l < o.length; l++)
683
+ n[l] ^= e.mul(o[l], s);
684
+ let a = 0;
685
+ for (; a < n.length && n[a] === 0; ) a++;
686
+ n = n.slice(a);
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
+ })(it);
696
+ const st = it;
697
+ function Pe(t) {
698
+ this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
699
+ }
700
+ Pe.prototype.initialize = function(e) {
701
+ this.degree = e, this.genPoly = st.generateECPolynomial(this.degree);
702
+ };
703
+ Pe.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 = st.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 zt = Pe, lt = {}, z = {}, Ne = {};
716
+ Ne.isValid = function(e) {
717
+ return !isNaN(e) && e >= 1 && e <= 40;
718
+ };
719
+ var D = {};
720
+ const at = "[0-9]+", Ht = "[A-Z $%*+\\-./:]+";
721
+ let W = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
722
+ W = W.replace(/u/g, "\\u");
723
+ const Ot = "(?:(?![A-Z0-9 $%*+\\-./:]|" + W + `)(?:.|[\r
724
+ ]))+`;
725
+ D.KANJI = new RegExp(W, "g");
726
+ D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
727
+ D.BYTE = new RegExp(Ot, "g");
728
+ D.NUMERIC = new RegExp(at, "g");
729
+ D.ALPHANUMERIC = new RegExp(Ht, "g");
730
+ const Kt = new RegExp("^" + W + "$"), Yt = new RegExp("^" + at + "$"), Jt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
731
+ D.testKanji = function(e) {
732
+ return Kt.test(e);
733
+ };
734
+ D.testNumeric = function(e) {
735
+ return Yt.test(e);
736
+ };
737
+ D.testAlphanumeric = function(e) {
738
+ return Jt.test(e);
739
+ };
740
+ (function(t) {
741
+ const e = Ne, 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 = U, i = ce, r = ae, o = z, n = Ne, s = 7973, a = e.getBCHDigit(s);
801
+ function l(g, f, v) {
802
+ for (let C = 1; C <= 40; C++)
803
+ if (f <= t.getCapacity(C, v, g))
804
+ return C;
805
+ }
806
+ function c(g, f) {
807
+ return o.getCharCountIndicator(g, f) + 4;
808
+ }
809
+ function m(g, f) {
810
+ let v = 0;
811
+ return g.forEach(function(C) {
812
+ const _ = c(C.mode, f);
813
+ v += _ + C.getBitsLength();
814
+ }), v;
815
+ }
816
+ function B(g, f) {
817
+ for (let v = 1; v <= 40; v++)
818
+ if (m(g, v) <= t.getCapacity(v, f, o.MIXED))
819
+ return v;
820
+ }
821
+ t.from = function(f, v) {
822
+ return n.isValid(f) ? parseInt(f, 10) : v;
823
+ }, t.getCapacity = function(f, v, C) {
824
+ if (!n.isValid(f))
825
+ throw new Error("Invalid QR Code version");
826
+ typeof C > "u" && (C = o.BYTE);
827
+ const _ = e.getSymbolTotalCodewords(f), p = i.getTotalCodewordsCount(f, v), b = (_ - p) * 8;
828
+ if (C === o.MIXED) return b;
829
+ const w = b - c(C, f);
830
+ switch (C) {
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(f, v) {
842
+ let C;
843
+ const _ = r.from(v, r.M);
844
+ if (Array.isArray(f)) {
845
+ if (f.length > 1)
846
+ return B(f, _);
847
+ if (f.length === 0)
848
+ return 1;
849
+ C = f[0];
850
+ } else
851
+ C = f;
852
+ return l(C.mode, C.getLength(), _);
853
+ }, t.getEncodedBits = function(f) {
854
+ if (!n.isValid(f) || f < 7)
855
+ throw new Error("Invalid QR Code version");
856
+ let v = f << 12;
857
+ for (; e.getBCHDigit(v) - a >= 0; )
858
+ v ^= s << e.getBCHDigit(v) - a;
859
+ return f << 12 | v;
860
+ };
861
+ })(lt);
862
+ var ct = {};
863
+ const Me = U, ut = 1335, jt = 21522, Je = Me.getBCHDigit(ut);
864
+ ct.getEncodedBits = function(e, i) {
865
+ const r = e.bit << 3 | i;
866
+ let o = r << 10;
867
+ for (; Me.getBCHDigit(o) - Je >= 0; )
868
+ o ^= ut << Me.getBCHDigit(o) - Je;
869
+ return (r << 10 | o) ^ jt;
870
+ };
871
+ var dt = {};
872
+ const Gt = z;
873
+ function Y(t) {
874
+ this.mode = Gt.NUMERIC, this.data = t.toString();
875
+ }
876
+ Y.getBitsLength = function(e) {
877
+ return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
878
+ };
879
+ Y.prototype.getLength = function() {
880
+ return this.data.length;
881
+ };
882
+ Y.prototype.getBitsLength = function() {
883
+ return Y.getBitsLength(this.data.length);
884
+ };
885
+ Y.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 qt = Y;
893
+ const Qt = z, pe = [
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 = Qt.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 = pe.indexOf(this.data[i]) * 45;
956
+ r += pe.indexOf(this.data[i + 1]), e.put(r, 11);
957
+ }
958
+ this.data.length % 2 && e.put(pe.indexOf(this.data[i]), 6);
959
+ };
960
+ var Wt = J, Xt = 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 Zt = Xt, en = z;
988
+ function j(t) {
989
+ this.mode = en.BYTE, typeof t == "string" && (t = Zt(t)), this.data = new Uint8Array(t);
990
+ }
991
+ j.getBitsLength = function(e) {
992
+ return e * 8;
993
+ };
994
+ j.prototype.getLength = function() {
995
+ return this.data.length;
996
+ };
997
+ j.prototype.getBitsLength = function() {
998
+ return j.getBitsLength(this.data.length);
999
+ };
1000
+ j.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 tn = j;
1005
+ const nn = z, on = U;
1006
+ function G(t) {
1007
+ this.mode = nn.KANJI, this.data = t;
1008
+ }
1009
+ G.getBitsLength = function(e) {
1010
+ return e * 13;
1011
+ };
1012
+ G.prototype.getLength = function() {
1013
+ return this.data.length;
1014
+ };
1015
+ G.prototype.getBitsLength = function() {
1016
+ return G.getBitsLength(this.data.length);
1017
+ };
1018
+ G.prototype.write = function(t) {
1019
+ let e;
1020
+ for (e = 0; e < this.data.length; e++) {
1021
+ let i = on.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 rn = G, ft = { 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 a = e.PriorityQueue.make();
1041
+ a.push(r, 0);
1042
+ for (var l, c, m, B, g, f, v, C, _; !a.empty(); ) {
1043
+ l = a.pop(), c = l.value, B = l.cost, g = i[c] || {};
1044
+ for (m in g)
1045
+ g.hasOwnProperty(m) && (f = g[m], v = B + f, C = s[m], _ = typeof s[m] > "u", (_ || C > v) && (s[m] = v, a.push(m, v), n[m] = c));
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
+ })(ft);
1100
+ var sn = ft.exports;
1101
+ (function(t) {
1102
+ const e = z, i = qt, r = Wt, o = tn, n = rn, s = D, a = U, l = sn;
1103
+ function c(p) {
1104
+ return unescape(encodeURIComponent(p)).length;
1105
+ }
1106
+ function m(p, b, w) {
1107
+ const y = [];
1108
+ let M;
1109
+ for (; (M = p.exec(w)) !== null; )
1110
+ y.push({
1111
+ data: M[0],
1112
+ index: M.index,
1113
+ mode: b,
1114
+ length: M[0].length
1115
+ });
1116
+ return y;
1117
+ }
1118
+ function B(p) {
1119
+ const b = m(s.NUMERIC, e.NUMERIC, p), w = m(s.ALPHANUMERIC, e.ALPHANUMERIC, p);
1120
+ let y, M;
1121
+ return a.isKanjiModeEnabled() ? (y = m(s.BYTE, e.BYTE, p), M = m(s.KANJI, e.KANJI, p)) : (y = m(s.BYTE_KANJI, e.BYTE, p), M = []), b.concat(w, y, M).sort(function(T, N) {
1122
+ return T.index - N.index;
1123
+ }).map(function(T) {
1124
+ return {
1125
+ data: T.data,
1126
+ mode: T.mode,
1127
+ length: T.length
1128
+ };
1129
+ });
1130
+ }
1131
+ function g(p, b) {
1132
+ switch (b) {
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 f(p) {
1144
+ return p.reduce(function(b, w) {
1145
+ const y = b.length - 1 >= 0 ? b[b.length - 1] : null;
1146
+ return y && y.mode === w.mode ? (b[b.length - 1].data += w.data, b) : (b.push(w), b);
1147
+ }, []);
1148
+ }
1149
+ function v(p) {
1150
+ const b = [];
1151
+ for (let w = 0; w < p.length; w++) {
1152
+ const y = p[w];
1153
+ switch (y.mode) {
1154
+ case e.NUMERIC:
1155
+ b.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
+ b.push([
1163
+ y,
1164
+ { data: y.data, mode: e.BYTE, length: y.length }
1165
+ ]);
1166
+ break;
1167
+ case e.KANJI:
1168
+ b.push([
1169
+ y,
1170
+ { data: y.data, mode: e.BYTE, length: c(y.data) }
1171
+ ]);
1172
+ break;
1173
+ case e.BYTE:
1174
+ b.push([
1175
+ { data: y.data, mode: e.BYTE, length: c(y.data) }
1176
+ ]);
1177
+ }
1178
+ }
1179
+ return b;
1180
+ }
1181
+ function C(p, b) {
1182
+ const w = {}, y = { start: {} };
1183
+ let M = ["start"];
1184
+ for (let I = 0; I < p.length; I++) {
1185
+ const T = p[I], N = [];
1186
+ for (let k = 0; k < T.length; k++) {
1187
+ const A = T[k], u = "" + I + k;
1188
+ N.push(u), w[u] = { node: A, lastCount: 0 }, y[u] = {};
1189
+ for (let V = 0; V < M.length; V++) {
1190
+ const P = M[V];
1191
+ w[P] && w[P].node.mode === A.mode ? (y[P][u] = g(w[P].lastCount + A.length, A.mode) - g(w[P].lastCount, A.mode), w[P].lastCount += A.length) : (w[P] && (w[P].lastCount = A.length), y[P][u] = g(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, b));
1192
+ }
1193
+ }
1194
+ M = N;
1195
+ }
1196
+ for (let I = 0; I < M.length; I++)
1197
+ y[M[I]].end = 0;
1198
+ return { map: y, table: w };
1199
+ }
1200
+ function _(p, b) {
1201
+ let w;
1202
+ const y = e.getBestModeForData(p);
1203
+ if (w = e.from(b, 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 && !a.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(b) {
1218
+ return b.reduce(function(w, y) {
1219
+ return typeof y == "string" ? w.push(_(y, null)) : y.data && w.push(_(y.data, y.mode)), w;
1220
+ }, []);
1221
+ }, t.fromString = function(b, w) {
1222
+ const y = B(b, a.isKanjiModeEnabled()), M = v(y), I = C(M, w), T = l.find_path(I.map, "start", "end"), N = [];
1223
+ for (let k = 1; k < T.length - 1; k++)
1224
+ N.push(I.table[T[k]].node);
1225
+ return t.fromArray(f(N));
1226
+ }, t.rawSplit = function(b) {
1227
+ return t.fromArray(
1228
+ B(b, a.isKanjiModeEnabled())
1229
+ );
1230
+ };
1231
+ })(dt);
1232
+ const de = U, ye = ae, ln = Vt, an = $t, cn = nt, un = ot, Se = rt, Ie = ce, dn = zt, le = lt, fn = ct, mn = z, we = dt;
1233
+ function gn(t, e) {
1234
+ const i = t.size, r = un.getPositions(e);
1235
+ for (let o = 0; o < r.length; o++) {
1236
+ const n = r[o][0], s = r[o][1];
1237
+ for (let a = -1; a <= 7; a++)
1238
+ if (!(n + a <= -1 || i <= n + a))
1239
+ for (let l = -1; l <= 7; l++)
1240
+ s + l <= -1 || i <= s + 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(n + a, s + l, !0, !0) : t.set(n + a, s + l, !1, !0));
1241
+ }
1242
+ }
1243
+ function hn(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 pn(t, e) {
1251
+ const i = cn.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 a = -2; a <= 2; a++)
1256
+ s === -2 || s === 2 || a === -2 || a === 2 || s === 0 && a === 0 ? t.set(o + s, n + a, !0, !0) : t.set(o + s, n + a, !1, !0);
1257
+ }
1258
+ }
1259
+ function yn(t, e) {
1260
+ const i = t.size, r = le.getEncodedBits(e);
1261
+ let o, n, s;
1262
+ for (let a = 0; a < 18; a++)
1263
+ o = Math.floor(a / 3), n = a % 3 + i - 8 - 3, s = (r >> a & 1) === 1, t.set(o, n, s, !0), t.set(n, o, s, !0);
1264
+ }
1265
+ function be(t, e, i) {
1266
+ const r = t.size, o = fn.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 wn(t, e) {
1273
+ const i = t.size;
1274
+ let r = -1, o = i - 1, n = 7, s = 0;
1275
+ for (let a = i - 1; a > 0; a -= 2)
1276
+ for (a === 6 && a--; ; ) {
1277
+ for (let l = 0; l < 2; l++)
1278
+ if (!t.isReserved(o, a - l)) {
1279
+ let c = !1;
1280
+ s < e.length && (c = (e[s] >>> n & 1) === 1), t.set(o, a - l, c), 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 bn(t, e, i) {
1289
+ const r = new ln();
1290
+ i.forEach(function(l) {
1291
+ r.put(l.mode.bit, 4), r.put(l.getLength(), mn.getCharCountIndicator(l.mode, t)), l.write(r);
1292
+ });
1293
+ const o = de.getSymbolTotalCodewords(t), n = Ie.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 a = (s - r.getLengthInBits()) / 8;
1297
+ for (let l = 0; l < a; l++)
1298
+ r.put(l % 2 ? 17 : 236, 8);
1299
+ return vn(r, t, e);
1300
+ }
1301
+ function vn(t, e, i) {
1302
+ const r = de.getSymbolTotalCodewords(e), o = Ie.getTotalCodewordsCount(e, i), n = r - o, s = Ie.getBlocksCount(e, i), a = r % s, l = s - a, c = Math.floor(r / s), m = Math.floor(n / s), B = m + 1, g = c - m, f = new dn(g);
1303
+ let v = 0;
1304
+ const C = new Array(s), _ = new Array(s);
1305
+ let p = 0;
1306
+ const b = new Uint8Array(t.buffer);
1307
+ for (let T = 0; T < s; T++) {
1308
+ const N = T < l ? m : B;
1309
+ C[T] = b.slice(v, v + N), _[T] = f.encode(C[T]), v += N, p = Math.max(p, N);
1310
+ }
1311
+ const w = new Uint8Array(r);
1312
+ let y = 0, M, I;
1313
+ for (M = 0; M < p; M++)
1314
+ for (I = 0; I < s; I++)
1315
+ M < C[I].length && (w[y++] = C[I][M]);
1316
+ for (M = 0; M < g; M++)
1317
+ for (I = 0; I < s; I++)
1318
+ w[y++] = _[I][M];
1319
+ return w;
1320
+ }
1321
+ function Cn(t, e, i, r) {
1322
+ let o;
1323
+ if (Array.isArray(t))
1324
+ o = we.fromArray(t);
1325
+ else if (typeof t == "string") {
1326
+ let c = e;
1327
+ if (!c) {
1328
+ const m = we.rawSplit(t);
1329
+ c = le.getBestVersionForData(m, i);
1330
+ }
1331
+ o = we.fromString(t, c || 40);
1332
+ } else
1333
+ throw new Error("Invalid data");
1334
+ const n = le.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 = bn(e, i, o), a = de.getSymbolSize(e), l = new an(a);
1347
+ return gn(l, e), hn(l), pn(l, e), be(l, i, 0), e >= 7 && yn(l, e), wn(l, s), isNaN(r) && (r = Se.getBestMask(
1348
+ l,
1349
+ be.bind(null, l, i)
1350
+ )), Se.applyMask(r, l), be(l, i, r), {
1351
+ modules: l,
1352
+ version: e,
1353
+ errorCorrectionLevel: i,
1354
+ maskPattern: r,
1355
+ segments: o
1356
+ };
1357
+ }
1358
+ et.create = function(e, i) {
1359
+ if (typeof e > "u" || e === "")
1360
+ throw new Error("No input text");
1361
+ let r = ye.M, o, n;
1362
+ return typeof i < "u" && (r = ye.from(i.errorCorrectionLevel, ye.M), o = le.from(i.version), n = Se.from(i.maskPattern), i.toSJISFunc && de.setToSJISFunction(i.toSJISFunc)), Cn(e, o, r, n);
1363
+ };
1364
+ var mt = {}, Ue = {};
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, a = o.modules.data, l = t.getScale(s, n), c = Math.floor((s + n.margin * 2) * l), m = n.margin * l, B = [n.color.light, n.color.dark];
1405
+ for (let g = 0; g < c; g++)
1406
+ for (let f = 0; f < c; f++) {
1407
+ let v = (g * c + f) * 4, C = n.color.light;
1408
+ if (g >= m && f >= m && g < c - m && f < c - m) {
1409
+ const _ = Math.floor((g - m) / l), p = Math.floor((f - m) / l);
1410
+ C = B[a[_ * s + p] ? 1 : 0];
1411
+ }
1412
+ r[v++] = C.r, r[v++] = C.g, r[v++] = C.b, r[v] = C.a;
1413
+ }
1414
+ };
1415
+ })(Ue);
1416
+ (function(t) {
1417
+ const e = Ue;
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, a) {
1429
+ let l = a, c = s;
1430
+ typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (c = r()), l = e.getOptions(l);
1431
+ const m = e.getImageWidth(n.modules.size, l), B = c.getContext("2d"), g = B.createImageData(m, m);
1432
+ return e.qrToImageData(g.data, n, l), i(B, c, m), B.putImageData(g, 0, 0), c;
1433
+ }, t.renderToDataURL = function(n, s, a) {
1434
+ let l = a;
1435
+ typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
1436
+ const c = t.render(n, s, l), m = l.type || "image/png", B = l.rendererOpts || {};
1437
+ return c.toDataURL(m, B.quality);
1438
+ };
1439
+ })(mt);
1440
+ var gt = {};
1441
+ const En = Ue;
1442
+ function je(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 ve(t, e, i) {
1447
+ let r = t + e;
1448
+ return typeof i < "u" && (r += " " + i), r;
1449
+ }
1450
+ function An(t, e, i) {
1451
+ let r = "", o = 0, n = !1, s = 0;
1452
+ for (let a = 0; a < t.length; a++) {
1453
+ const l = Math.floor(a % e), c = Math.floor(a / e);
1454
+ !l && !n && (n = !0), t[a] ? (s++, a > 0 && l > 0 && t[a - 1] || (r += n ? ve("M", l + i, 0.5 + c + i) : ve("m", o, 0), o = 0, n = !1), l + 1 < e && t[a + 1] || (r += ve("h", s), s = 0)) : o++;
1455
+ }
1456
+ return r;
1457
+ }
1458
+ gt.render = function(e, i, r) {
1459
+ const o = En.getOptions(i), n = e.modules.size, s = e.modules.data, a = n + o.margin * 2, l = o.color.light.a ? "<path " + je(o.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", c = "<path " + je(o.color.dark, "stroke") + ' d="' + An(s, n, o.margin) + '"/>', m = 'viewBox="0 0 ' + a + " " + a + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + m + ' shape-rendering="crispEdges">' + l + c + `</svg>
1460
+ `;
1461
+ return typeof r == "function" && r(null, g), g;
1462
+ };
1463
+ const Bn = kt, _e = et, ht = mt, Mn = gt;
1464
+ function Re(t, e, i, r, o) {
1465
+ const n = [].slice.call(arguments, 1), s = n.length, a = typeof n[s - 1] == "function";
1466
+ if (!a && !Bn())
1467
+ throw new Error("Callback required as last argument");
1468
+ if (a) {
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(l, c) {
1476
+ try {
1477
+ const m = _e.create(i, r);
1478
+ l(t(m, e, r));
1479
+ } catch (m) {
1480
+ c(m);
1481
+ }
1482
+ });
1483
+ }
1484
+ try {
1485
+ const l = _e.create(i, r);
1486
+ o(null, t(l, e, r));
1487
+ } catch (l) {
1488
+ o(l);
1489
+ }
1490
+ }
1491
+ X.create = _e.create;
1492
+ X.toCanvas = Re.bind(null, ht.render);
1493
+ X.toDataURL = Re.bind(null, ht.renderToDataURL);
1494
+ X.toString = Re.bind(null, function(t, e, i) {
1495
+ return Mn.render(t, i);
1496
+ });
1497
+ async function Sn(t, e = 350) {
1498
+ try {
1499
+ return await X.toDataURL(t, {
1500
+ width: e,
1501
+ margin: 0
1502
+ });
1503
+ } catch (i) {
1504
+ console.error(i);
1505
+ }
1506
+ }
1507
+ var In = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1508
+ const _n = { class: "flex items-start" }, Tn = { class: "flex flex-col gap-16 mt-16" }, Pn = ["src"], Nn = /* @__PURE__ */ Ge({
1509
+ __name: "LinkDeviceDialog",
1510
+ setup(t) {
1511
+ const e = Be(), i = Xe(), r = Qe(), o = O(), n = O(), s = In.crmUrl, a = O(), l = Ee(() => i.membership), c = Ee(() => {
1512
+ var g, f;
1513
+ return `https://${(g = l.value) != null && g.url ? l.value.url : (f = l.value) == null ? void 0 : f.business}.${s}`;
1514
+ });
1515
+ async function m(g) {
1516
+ const f = await We.getOtp(g);
1517
+ return `${c.value}?link-device=${f.otp}`;
1518
+ }
1519
+ async function B(g) {
1520
+ const f = await m(g);
1521
+ a.value = f, o.value = await Sn(f);
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, f) => {
1531
+ const v = L("FmIcon"), C = L("FmSelect"), _ = L("FmButton"), p = L("FmCard");
1532
+ return H(), Ae(p, { class: "p-24 max-w-[350px]" }, {
1533
+ default: K(() => [
1534
+ h("div", _n, [
1535
+ f[3] || (f[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
+ S(v, {
1540
+ name: "close",
1541
+ onClick: f[0] || (f[0] = (b) => d(r).close()),
1542
+ class: "cursor-pointer"
1543
+ })
1544
+ ]),
1545
+ h("div", Tn, [
1546
+ S(C, {
1547
+ modelValue: d(n),
1548
+ "onUpdate:modelValue": [
1549
+ f[1] || (f[1] = (b) => bt(n) ? n.value = b : null),
1550
+ B
1551
+ ],
1552
+ label: "Select Location",
1553
+ items: d(e).locationItems.filter((b) => !!b.value)
1554
+ }, null, 8, ["modelValue", "items"]),
1555
+ h("img", {
1556
+ src: d(o),
1557
+ class: "aspect-square w-full"
1558
+ }, null, 8, Pn),
1559
+ S(_, {
1560
+ class: "mx-auto",
1561
+ variant: "plain",
1562
+ icon: "content_copy",
1563
+ onClick: f[2] || (f[2] = (b) => d(Ze)(d(a)))
1564
+ })
1565
+ ])
1566
+ ]),
1567
+ _: 1
1568
+ });
1569
+ };
1570
+ }
1571
+ });
1572
+ var Ce = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
1573
+ const Un = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, Rn = { class: "fm-typo-en-title-md-800" }, Ln = {
1574
+ key: 0,
1575
+ class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
1576
+ }, Fn = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, kn = { class: "fm-typo-en-title-sm-800" }, Dn = { class: "space-y-24" }, Vn = { class: "space-y-8" }, $n = { class: "fm-typo-en-title-sm-800" }, xn = { class: "fm-typo-body-lg-400" }, zn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Hn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, On = { class: "space-y-8" }, Kn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Yn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Jn = { class: "space-y-8" }, jn = { class: "space-y-8" }, Gn = { class: "space-y-8" }, qn = { class: "space-y-8" }, Qn = { class: "space-y-8" }, Wn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, Xn = { class: "space-y-8" }, Zn = { class: "space-y-8" }, eo = { class: "flex justify-end pb-24" }, to = { class: "col-span-1 space-y-8 xs:hidden" }, no = { class: "fm-typo-en-body-lg-600" }, oo = { class: "fm-typo-en-body-lg-600" }, ro = { class: "fm-typo-en-body-lg-600" }, io = { class: "fm-typo-en-body-lg-600" }, _o = /* @__PURE__ */ Ge({
1577
+ __name: "Setting",
1578
+ setup(t) {
1579
+ const e = Ut(), i = At(), r = Nt(), o = Be(), n = Xe(), { global: s, minor: a } = Et, l = Qe(), c = O(), m = O([]), B = O(null), g = Bt, f = [
1580
+ (A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
1581
+ (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"
1582
+ ], v = Ce.appUrl, C = Ee(() => {
1583
+ var A;
1584
+ return `https://${(A = c.value) == null ? void 0 : A.business}.${v}`;
1585
+ }), _ = O(), { t: p } = Pt(), b = r.currentCountry.value || "MY", w = [
1586
+ "user.name",
1587
+ "user.gender",
1588
+ "user.birthday",
1589
+ "user.phoneNumber",
1590
+ "membership.url"
1591
+ ].filter(
1592
+ (A) => {
1593
+ var u;
1594
+ return !((u = _t[b]) != null && u.includes(A));
1595
+ }
1596
+ );
1597
+ async function y() {
1598
+ l.open({
1599
+ title: "",
1600
+ dialogComponent: Nn,
1601
+ closeButton: !1
1602
+ });
1603
+ }
1604
+ async function M(A) {
1605
+ await St.remove(
1606
+ "Are you sure you want to unlink this device?",
1607
+ "Unlink device",
1608
+ "Unlink"
1609
+ ) && await a(
1610
+ async () => {
1611
+ await We.unregisterDevice(A), await o.readLocationDevices();
1612
+ },
1613
+ {
1614
+ message: "Unlinking device",
1615
+ successMessage: "Unlinked device successfully"
1616
+ }
1617
+ );
1618
+ }
1619
+ async function I() {
1620
+ await a(
1621
+ async () => {
1622
+ var V;
1623
+ const A = Ft(c.value);
1624
+ console.log(c.value), A.welcomeMessage && !((V = A.welcomeMessage) != null && V.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership"), console.log("Cleaned data", A);
1625
+ const u = Mt.parse(A);
1626
+ _.value === null && u.image ? await oe.delete(oe.coverImagePath()) : _.value && (u.image = await oe.update(
1627
+ oe.coverImagePath(),
1628
+ _.value
1629
+ )), await Oe.update(u), await n.readMembership(), c.value = n.membership;
1630
+ },
1631
+ {
1632
+ message: "Updating membership",
1633
+ successMessage: "Membership updated successfully"
1634
+ }
1635
+ );
1636
+ }
1637
+ async function T() {
1638
+ const A = await Oe.getEmailAddresses();
1639
+ console.log(A), m.value = A, B.value = A.find((u) => u.default.includes("Marketing"));
1640
+ }
1641
+ async function N() {
1642
+ window.open(
1643
+ `${Ce.licensePortalUrl}business/${Ke.businessId}/settings`,
1644
+ "_blank"
1645
+ );
1646
+ }
1647
+ async function k() {
1648
+ const A = `${Ce.licensePortalUrl}settings?businessId=${Ke.businessId}`;
1649
+ console.log("Opening", A), window.open(A, "_blank");
1650
+ }
1651
+ return qe(async () => {
1652
+ await s(async () => {
1653
+ await o.readPremium(), await o.readLocations(), await o.readLocationDevices(), await n.readMembership(), await T(), c.value = n.membership;
1654
+ });
1655
+ }), (A, u) => {
1656
+ var Fe, ke, De, Ve, $e, xe, ze;
1657
+ const V = L("FmPageHead"), P = L("FmButton"), ee = L("FmTextField"), fe = L("FmCard"), Le = L("FmPill"), pt = L("FmSelect"), me = L("FmSwitch"), yt = L("FmMenuDivider");
1658
+ return H(), te(he, null, [
1659
+ S(V, {
1660
+ title: d(p)("connect.setting.title"),
1661
+ class: "xs:hidden"
1662
+ }, null, 8, ["title"]),
1663
+ h("div", Un, [
1664
+ h("div", Rn, R(d(p)("connect.setting.basicInfo.title")), 1),
1665
+ S(P, {
1666
+ icon: "info",
1667
+ variant: "tertiary"
1668
+ })
1669
+ ]),
1670
+ d(c) ? (H(), te("div", Ln, [
1671
+ h("div", Fn, [
1672
+ h("div", kn, R(d(p)("connect.setting.basicInfo.title")), 1),
1673
+ h("div", Dn, [
1674
+ S(ee, {
1675
+ label: d(p)("connect.setting.basicInfo.membershipTitle"),
1676
+ modelValue: d(c).name,
1677
+ "onUpdate:modelValue": u[0] || (u[0] = (E) => d(c).name = E)
1678
+ }, null, 8, ["label", "modelValue"]),
1679
+ S(ee, {
1680
+ disabled: !0,
1681
+ "model-value": d(c).business,
1682
+ rules: f,
1683
+ required: !0,
1684
+ label: d(p)("connect.setting.basicInfo.memberAppUrl"),
1685
+ "helper-text": d(C),
1686
+ placeholder: d(c).business.toString(),
1687
+ "onUpdate:modelValue": u[2] || (u[2] = (E) => d(c).url = E)
1688
+ }, {
1689
+ prepend: K(() => [...u[14] || (u[14] = [
1690
+ q(" https:// ", -1)
1691
+ ])]),
1692
+ append: K(() => [
1693
+ q(" ." + R(d(v)) + " ", 1),
1694
+ S(P, {
1695
+ icon: "content_copy",
1696
+ variant: "tertiary",
1697
+ onClick: u[1] || (u[1] = (E) => d(Ze)(d(C)))
1698
+ })
1699
+ ]),
1700
+ _: 1
1701
+ }, 8, ["model-value", "label", "helper-text", "placeholder"]),
1702
+ ne("", !0),
1703
+ h("div", Vn, [
1704
+ h("div", $n, R(d(p)("connect.setting.counterApp.title")), 1),
1705
+ S(P, {
1706
+ variant: "plain",
1707
+ icon: "link",
1708
+ label: d(p)("connect.setting.counterApp.linkDevice"),
1709
+ onClick: y
1710
+ }, null, 8, ["label"]),
1711
+ (H(!0), te(he, null, vt(d(o).locationDevices, (E, F) => (H(), Ae(fe, {
1712
+ key: F,
1713
+ variant: "outlined",
1714
+ class: "flex items-center justify-between px-16 py-12"
1715
+ }, {
1716
+ default: K(() => [
1717
+ h("div", null, [
1718
+ h("p", xn, R(E.name || `Device ${E._id}`), 1),
1719
+ h("p", zn, " Activation date: " + R(d(Ct)(d(Lt)(E._id.toString())).format(
1720
+ "D MMM YYYY"
1721
+ )), 1),
1722
+ h("p", Hn, " Linked location: " + R(d(o).locations.find(($) => $._id == E.location).name), 1)
1723
+ ]),
1724
+ S(P, {
1725
+ icon: "link_off",
1726
+ variant: "tertiary",
1727
+ onClick: ($) => M(E._id)
1728
+ }, null, 8, ["onClick"])
1729
+ ]),
1730
+ _: 2
1731
+ }, 1024))), 128))
1732
+ ]),
1733
+ h("div", On, [
1734
+ h("div", Kn, [
1735
+ u[15] || (u[15] = q(" Advertisement ", -1)),
1736
+ S(Le, { variant: "premium" })
1737
+ ]),
1738
+ S(fe, {
1739
+ variant: "outlined",
1740
+ class: "p-16 flex items-center justify-between"
1741
+ }, {
1742
+ default: K(() => {
1743
+ var E;
1744
+ return [
1745
+ h("div", null, [
1746
+ u[16] || (u[16] = h("div", { class: "fm-typo-en-body-lg-600" }, "Manage Advertisements", -1)),
1747
+ h("div", Yn, R(((E = d(c).advertisements) == null ? void 0 : E.length) ?? 0) + " active ad(s) showing on FeedMe ordering app ", 1)
1748
+ ]),
1749
+ S(P, {
1750
+ label: "Manage",
1751
+ icon: "arrow_forward",
1752
+ "icon-position": "right",
1753
+ disabled: !d(o).isPremium,
1754
+ onClick: u[4] || (u[4] = (F) => d(e).push({
1755
+ name: d(Rt)["$connect-SETTING_ADVERTISEMENTS"]
1756
+ }))
1757
+ }, null, 8, ["disabled"])
1758
+ ];
1759
+ }),
1760
+ _: 1
1761
+ })
1762
+ ]),
1763
+ h("div", Jn, [
1764
+ u[17] || (u[17] = h("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
1765
+ S(ee, {
1766
+ "model-value": ((Fe = d(c)) == null ? void 0 : Fe.brand) || "",
1767
+ "max-length": 15,
1768
+ label: "Brand Name",
1769
+ "show-word-count": "",
1770
+ "helper-text": `RM 0 ${((ke = d(c)) == null ? void 0 : ke.brand) || ""}: YOUR CUSTOMER MESSAGE`,
1771
+ "onUpdate:modelValue": u[5] || (u[5] = (E) => d(c).brand = E)
1772
+ }, null, 8, ["model-value", "helper-text"]),
1773
+ S(Tt, {
1774
+ modelValue: d(c).welcomeMessage,
1775
+ "onUpdate:modelValue": u[6] || (u[6] = (E) => d(c).welcomeMessage = E),
1776
+ variables: d(w),
1777
+ placeholder: "Hi there, you have been invited to join membership"
1778
+ }, null, 8, ["modelValue", "variables"])
1779
+ ]),
1780
+ h("div", jn, [
1781
+ u[18] || (u[18] = h("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
1782
+ u[19] || (u[19] = 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)),
1783
+ d(m).length ? ne("", !0) : (H(), Ae(P, {
1784
+ key: 0,
1785
+ onClick: N,
1786
+ label: "Add new email address"
1787
+ })),
1788
+ d(m).length ? (H(), te(he, { key: 1 }, [
1789
+ S(pt, {
1790
+ "model-value": ((Ve = (De = d(c)) == null ? void 0 : De.email) == null ? void 0 : Ve.from) || null,
1791
+ label: "From Address",
1792
+ items: d(m).map((E) => ({
1793
+ label: E.emailAddress,
1794
+ value: E.emailAddress
1795
+ })),
1796
+ placeholder: d(B) ? d(B).emailAddress : "No email address available",
1797
+ "onUpdate:modelValue": u[7] || (u[7] = (E) => {
1798
+ var F, $;
1799
+ (F = d(c)) != null && F.email || (d(c).email = {
1800
+ from: E,
1801
+ name: ($ = d(m).find((ge) => ge.emailAddress == E)) == null ? void 0 : $.name
1802
+ }), d(c).email.from = E || null;
1803
+ }),
1804
+ rules: [d(He).ruleAtPath(d(g), "email.from")]
1805
+ }, null, 8, ["model-value", "items", "placeholder", "rules"]),
1806
+ S(ee, {
1807
+ "model-value": ((xe = ($e = d(c)) == null ? void 0 : $e.email) == null ? void 0 : xe.name) || null,
1808
+ label: "Sender name",
1809
+ disabled: "",
1810
+ placeholder: ((ze = d(B)) == null ? void 0 : ze.name) || null,
1811
+ "onUpdate:modelValue": u[8] || (u[8] = (E) => {
1812
+ var F;
1813
+ (F = d(c)) != null && F.email || (d(c).email = {
1814
+ name: E
1815
+ }), d(c).email.name = E || null;
1816
+ }),
1817
+ rules: [d(He).ruleAtPath(d(g), "email.name")]
1818
+ }, null, 8, ["model-value", "placeholder", "rules"])
1819
+ ], 64)) : ne("", !0)
1820
+ ]),
1821
+ h("div", Gn, [
1822
+ u[20] || (u[20] = h("div", { class: "fm-typo-en-title-sm-800" }, "Whatsapp Channel", -1)),
1823
+ u[21] || (u[21] = 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)),
1824
+ S(P, {
1825
+ label: "Manage Whatsapp Channel",
1826
+ icon: "open_in_new",
1827
+ onClick: u[9] || (u[9] = (E) => k())
1828
+ })
1829
+ ]),
1830
+ h("div", qn, [
1831
+ u[22] || (u[22] = h("div", { class: "fm-typo-en-title-sm-800" }, [
1832
+ q(" Free Credit as Discount "),
1833
+ h("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
1834
+ ], -1)),
1835
+ S(me, {
1836
+ "model-value": d(c).freeCreditAsDiscount ?? !1,
1837
+ "onUpdate:modelValue": u[10] || (u[10] = (E) => d(c).freeCreditAsDiscount = E),
1838
+ label: "Free Credit as Discount",
1839
+ sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
1840
+ "label-placement": "right",
1841
+ value: ""
1842
+ }, null, 8, ["model-value"])
1843
+ ]),
1844
+ h("div", Qn, [
1845
+ h("div", Wn, [
1846
+ u[23] || (u[23] = q(" Member Card ", -1)),
1847
+ S(Le, { variant: "premium" })
1848
+ ]),
1849
+ S(me, {
1850
+ "model-value": d(c).cardEnable ?? !1,
1851
+ "onUpdate:modelValue": u[11] || (u[11] = (E) => d(c).cardEnable = E),
1852
+ label: "",
1853
+ sublabel: "Allow member to bind card via member app",
1854
+ "label-placement": "right",
1855
+ value: "",
1856
+ disabled: !d(o).isPremium
1857
+ }, null, 8, ["model-value", "disabled"])
1858
+ ]),
1859
+ h("div", Xn, [
1860
+ u[24] || (u[24] = h("div", { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, " Auto Revert Reward ", -1)),
1861
+ S(me, {
1862
+ "model-value": d(c).autoRevertReward ?? !1,
1863
+ "onUpdate:modelValue": u[12] || (u[12] = (E) => d(c).autoRevertReward = E),
1864
+ label: "",
1865
+ sublabel: "When enabled, rewards are automatically revert when if a refund is processed in POS",
1866
+ "label-placement": "right",
1867
+ value: ""
1868
+ }, null, 8, ["model-value"])
1869
+ ]),
1870
+ h("div", Zn, [
1871
+ u[25] || (u[25] = h("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
1872
+ S(It, {
1873
+ label: "Select restaurant",
1874
+ "model-value": d(c).targetLocation ?? null,
1875
+ "onUpdate:modelValue": u[13] || (u[13] = (E) => d(c).targetLocation = E)
1876
+ }, null, 8, ["model-value"])
1877
+ ]),
1878
+ h("div", eo, [
1879
+ S(P, {
1880
+ label: "Update",
1881
+ type: "button",
1882
+ onClick: I,
1883
+ disabled: !!d(i).loadingQueue.length,
1884
+ loading: !!d(i).loadingQueue.length
1885
+ }, null, 8, ["disabled", "loading"])
1886
+ ])
1887
+ ])
1888
+ ]),
1889
+ h("div", to, [
1890
+ S(fe, {
1891
+ variant: "outlined",
1892
+ class: "flex flex-col p-24 gap-8"
1893
+ }, {
1894
+ default: K(() => {
1895
+ var E, F, $;
1896
+ return [
1897
+ u[30] || (u[30] = h("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
1898
+ S(yt, { class: "my-4" }),
1899
+ h("div", null, [
1900
+ u[26] || (u[26] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
1901
+ h("div", no, R(d(c).name), 1)
1902
+ ]),
1903
+ h("div", null, [
1904
+ u[27] || (u[27] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
1905
+ h("div", oo, R((((E = d(c).advertisements) == null ? void 0 : E.length) ?? 0) || "No advertisments"), 1)
1906
+ ]),
1907
+ h("div", null, [
1908
+ u[28] || (u[28] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
1909
+ h("div", ro, R(d(c).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
1910
+ ]),
1911
+ h("div", null, [
1912
+ u[29] || (u[29] = h("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
1913
+ h("div", io, R(!d(c).targetLocation || d(c).targetLocation.length == d(Be)().locations.length ? "All locations" : ($ = (F = d(c)) == null ? void 0 : F.targetLocation) == null ? void 0 : $.map(
1914
+ (ge) => d(o).locations.find((wt) => wt._id == ge).name
1915
+ ).join(", ")), 1)
1916
+ ])
1917
+ ];
1918
+ }),
1919
+ _: 1
1920
+ })
1921
+ ])
1922
+ ])) : ne("", !0)
1923
+ ], 64);
1924
+ };
1925
+ }
1926
+ });
1927
+ export {
1928
+ _o as default
1929
+ };