@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-beta.81

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