@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.51
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.
- package/dist/Analytic-DP8oPOug.js +427 -0
- package/dist/{App-C8Qfnkhz.js → App-DSFvQRnz.js} +441 -420
- package/dist/AuditLogs-YSw2xsZw.js +1885 -0
- package/dist/Bin-Da_eermT.js +166 -0
- package/dist/{Broadcast-BK-1MQkL.js → Broadcast-DoNlWo4j.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DItda2cA.js} +6 -8
- package/dist/Card-CbxtYecE.js +896 -0
- package/dist/{Collections-TA4iW1r0.js → Collections-p1UhWf85.js} +27 -31
- package/dist/{Credit-Df9iFQjZ.js → Credit-DQta1iUA.js} +17 -16
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-BN5MFZTx.js} +6 -6
- package/dist/{Experience-ByLFXKn6.js → Experience-BnwKk_PO.js} +26 -25
- package/dist/{Game-B6Ez0pfW.js → Game-_4Hj3Yyt.js} +21 -20
- package/dist/Index-Bmz1R6hW.js +259 -0
- package/dist/Marketing-D0V260mx.js +20071 -0
- package/dist/{Member-TobP1ISp.js → Member-BIEihOp5.js} +4 -4
- package/dist/MemberList-C4EbD7jO.js +1598 -0
- package/dist/MemberTransactions-DvYurEaZ.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-vGMke4sb.js} +6 -6
- package/dist/{Mission-D9uTVo0G.js → Mission-C6gKiY9l.js} +97 -84
- package/dist/Overview-xqu1_7-7.js +1078 -0
- package/dist/{Point-4rDr-53e.js → Point-C02Z0_w5.js} +26 -25
- package/dist/{Promotion-BKO_dtQk.js → Promotion-BBfa32MT.js} +55 -48
- package/dist/Record-Bcj2D0fP.js +340 -0
- package/dist/Reward-BMvRwWnr.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-gt0h6XDa.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CPw-z0L1.js +1637 -0
- package/dist/Segment-BpkWm7ah.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-_t32qpAQ.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWNF7Srw.js +147 -0
- package/dist/{Setting-B7oISD0D.js → Setting-QEqA9Sjr.js} +610 -586
- package/dist/Store-Bb5Qh_fa.js +1744 -0
- package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-CqmFv4KN.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-SGMgGM-I.js +939 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bd63YQLw.js} +1 -1
- package/dist/{Tier-DkxdNj-K.js → Tier-BG4EQUN4.js} +327 -318
- package/dist/{Title-VFpCOsMO.js → Title-CLZYAG35.js} +199 -184
- package/dist/{Transaction-BgKD8n2L.js → Transaction-DxKmtuW2.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DWqf1lcK.js +130 -0
- package/dist/Voucher-BiBkN12U.js +353 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bv6ro9Ul.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-DaN1_uKj.js} +1 -1
- package/dist/{app-DA-t-2Zt.js → app-BDYHz7bx.js} +1 -1
- package/dist/{app-DUl5dav5.js → app-BToiZpVg.js} +1758 -1496
- package/dist/app.js +1 -1
- package/dist/{business-CeCitOY4.js → business-Cdck2Mo8.js} +1 -1
- package/dist/{campaign-CcLM6e4s.js → campaign-U0MVzGkd.js} +2 -2
- package/dist/campaign-V6y28epS.js +1810 -0
- package/dist/campaign.enum-C2ZHkwav.js +20 -0
- package/dist/campaign.fn-C8hqL7sq.js +758 -0
- package/dist/collectible.enum-DPFWrwtU.js +19 -0
- package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUtvp8Q7.js} +2 -2
- package/dist/dto-CO3dr-5e.js +214 -0
- package/dist/{effect-Dt7rXOBy.js → effect-CTIglwNj.js} +9 -9
- package/dist/email-addresses-fTprqBTm.js +705 -0
- package/dist/{export-CyioiboQ.js → export-BNfnVhxu.js} +5 -5
- package/dist/{helper-FA_9AhGV.js → helper-BB4sHiiB.js} +1 -1
- package/dist/index-BZjpXQbO.js +32 -0
- package/dist/index-BnJgi3GR.js +54 -0
- package/dist/{index-DLN4Kzz_.js → index-BpmAtLiE.js} +1 -1
- package/dist/{index-igxrd5jC.js → index-ByUriI6F.js} +1500 -1479
- package/dist/{index-BiFueJiF.js → index-CUDAo9HK.js} +259 -193
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-DbbO3wip.js → index-DHEtLTYr.js} +48 -4
- package/dist/{index-CCdXvb92.js → index-DTnTvdIA.js} +1 -1
- package/dist/{index-CyNdsVrw.js → index-DbzMtv9Z.js} +1 -1
- package/dist/index-DwbN8FHi.js +44 -0
- package/dist/index-czQ4GAtE.js +115 -0
- package/dist/{index-C20XBD7G.js → index-fkBcbLFu.js} +2192 -931
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index-wzNzbg46.js +29000 -0
- package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-OtiYpLFF.js} +33 -33
- package/dist/loading-D_NOvElg.js +71 -0
- package/dist/{membership-DFiY8aVd.js → membership-6M1ftDbz.js} +54 -46
- package/dist/money-D6phwlff.js +15 -0
- package/dist/number-CT9IX-wU.js +12 -0
- package/dist/objectid-DtS-zHmd.js +145 -0
- package/dist/{loading-CZ0fiViM.js → plugins-CFv-0uV9.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-B2aqMThx.js +36 -0
- package/dist/{rule-C3e1xTqN.js → rule-DxUsHy8Q.js} +180 -177
- package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-BqkRAa1C.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-C2OKWd_e.js → template-5OZEG9e3.js} +5 -5
- package/dist/trigger-D7aLiQDF.js +144 -0
- package/dist/user-CMYgbV2m.js +54 -0
- package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-Cad7169E.js} +216 -216
- package/dist/{xlsx-CtXdl3ls.js → xlsx-rV-XTyJC.js} +1 -1
- package/package.json +9 -7
- package/dist/Analytic-C_ZFR5jh.js +0 -622
- package/dist/Card-C7dUFJKe.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
- package/dist/Marketing-BaqZUeVI.js +0 -316
- package/dist/MemberList-B9cutmEh.js +0 -1733
- package/dist/MemberTransactions-DRHA7AOF.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
- package/dist/Segment-Dj8nc3AE.js +0 -437
- package/dist/Store-CJ3wcohQ.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
- package/dist/Voucher-BbTLt8Pt.js +0 -490
- package/dist/dto-CRJma6eX.js +0 -2770
- package/dist/index-B1e0LtDe.js +0 -99
- package/dist/index-Be2ZYDy_.js +0 -298
- package/dist/index-CDkITvze.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DPP5F3bT.js +0 -206
- package/dist/index-Dbo3DDwp.js +0 -29193
- package/dist/money-D8hUEfP4.js +0 -15
- package/dist/number-DL3GAeVt.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
3
|
-
import { Z as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
1
|
+
import { defineComponent as qe, ref as z, computed as ce, onMounted as Ge, resolveComponent as D, openBlock as x, createBlock as ue, withCtx as W, createElementVNode as b, createVNode as I, unref as u, isRef as Qe, createElementBlock as Y, Fragment as ie, toDisplayString as V, createTextVNode as Z, renderList as $e, createCommentVNode as se } from "vue";
|
|
2
|
+
import { h as bt } from "./moment-BWErdI6_.js";
|
|
3
|
+
import { Z as ze } from "./zod-Bg2FbC-D.js";
|
|
4
|
+
import { useDialog as Xe } from "@feedmepos/ui-library";
|
|
5
|
+
import { u as vt } from "./loading-D_NOvElg.js";
|
|
6
|
+
import { u as Ct } from "./app-wDQR6dpb.js";
|
|
7
|
+
import { u as Ae, l as Ze } from "./business-Cdck2Mo8.js";
|
|
8
|
+
import { u as We } from "./membership-6M1ftDbz.js";
|
|
9
|
+
import { a as et, p as Et, f as j } from "./plugins-CFv-0uV9.js";
|
|
10
|
+
import { q as At, h as Bt } from "./index-fkBcbLFu.js";
|
|
11
|
+
import { _ as He } from "./ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js";
|
|
12
|
+
import { _ as _t } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-Bd63YQLw.js";
|
|
13
|
+
import { _ as Mt } from "./MessageInput.vue_vue_type_script_setup_true_lang-vGMke4sb.js";
|
|
14
|
+
import { u as St } from "./vue-i18n-Cad7169E.js";
|
|
15
|
+
import { m as Ke } from "./index-DHEtLTYr.js";
|
|
16
|
+
import { S as It } from "./index-wzNzbg46.js";
|
|
17
|
+
import { o as Pt } from "./objectId-dwaoBfJX.js";
|
|
18
|
+
import { a as Tt } from "./object-qECH92oz.js";
|
|
19
|
+
var ne = {}, Nt = function() {
|
|
18
20
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
19
|
-
},
|
|
20
|
-
let
|
|
21
|
-
const
|
|
21
|
+
}, tt = {}, F = {};
|
|
22
|
+
let Ie;
|
|
23
|
+
const Ut = [
|
|
22
24
|
0,
|
|
23
25
|
// Not used
|
|
24
26
|
26,
|
|
@@ -62,32 +64,32 @@ const At = [
|
|
|
62
64
|
3532,
|
|
63
65
|
3706
|
|
64
66
|
];
|
|
65
|
-
|
|
67
|
+
F.getSymbolSize = function(e) {
|
|
66
68
|
if (!e) throw new Error('"version" cannot be null or undefined');
|
|
67
69
|
if (e < 1 || e > 40) throw new Error('"version" should be in range from 1 to 40');
|
|
68
70
|
return e * 4 + 17;
|
|
69
71
|
};
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
+
F.getSymbolTotalCodewords = function(e) {
|
|
73
|
+
return Ut[e];
|
|
72
74
|
};
|
|
73
|
-
|
|
75
|
+
F.getBCHDigit = function(t) {
|
|
74
76
|
let e = 0;
|
|
75
77
|
for (; t !== 0; )
|
|
76
78
|
e++, t >>>= 1;
|
|
77
79
|
return e;
|
|
78
80
|
};
|
|
79
|
-
|
|
81
|
+
F.setToSJISFunction = function(e) {
|
|
80
82
|
if (typeof e != "function")
|
|
81
83
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
82
|
-
|
|
84
|
+
Ie = e;
|
|
83
85
|
};
|
|
84
|
-
|
|
85
|
-
return typeof
|
|
86
|
+
F.isKanjiModeEnabled = function() {
|
|
87
|
+
return typeof Ie < "u";
|
|
86
88
|
};
|
|
87
|
-
|
|
88
|
-
return
|
|
89
|
+
F.toSJIS = function(e) {
|
|
90
|
+
return Ie(e);
|
|
89
91
|
};
|
|
90
|
-
var
|
|
92
|
+
var me = {};
|
|
91
93
|
(function(t) {
|
|
92
94
|
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
93
95
|
function e(i) {
|
|
@@ -121,11 +123,11 @@ var ue = {};
|
|
|
121
123
|
return o;
|
|
122
124
|
}
|
|
123
125
|
};
|
|
124
|
-
})(
|
|
125
|
-
function
|
|
126
|
+
})(me);
|
|
127
|
+
function nt() {
|
|
126
128
|
this.buffer = [], this.length = 0;
|
|
127
129
|
}
|
|
128
|
-
|
|
130
|
+
nt.prototype = {
|
|
129
131
|
get: function(t) {
|
|
130
132
|
const e = Math.floor(t / 8);
|
|
131
133
|
return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
|
|
@@ -142,28 +144,28 @@ Qe.prototype = {
|
|
|
142
144
|
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
143
145
|
}
|
|
144
146
|
};
|
|
145
|
-
var
|
|
146
|
-
function
|
|
147
|
+
var Lt = nt;
|
|
148
|
+
function oe(t) {
|
|
147
149
|
if (!t || t < 1)
|
|
148
150
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
149
151
|
this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
|
|
150
152
|
}
|
|
151
|
-
|
|
153
|
+
oe.prototype.set = function(t, e, i, r) {
|
|
152
154
|
const o = t * this.size + e;
|
|
153
155
|
this.data[o] = i, r && (this.reservedBit[o] = !0);
|
|
154
156
|
};
|
|
155
|
-
|
|
157
|
+
oe.prototype.get = function(t, e) {
|
|
156
158
|
return this.data[t * this.size + e];
|
|
157
159
|
};
|
|
158
|
-
|
|
160
|
+
oe.prototype.xor = function(t, e, i) {
|
|
159
161
|
this.data[t * this.size + e] ^= i;
|
|
160
162
|
};
|
|
161
|
-
|
|
163
|
+
oe.prototype.isReserved = function(t, e) {
|
|
162
164
|
return this.reservedBit[t * this.size + e];
|
|
163
165
|
};
|
|
164
|
-
var
|
|
166
|
+
var Ft = oe, ot = {};
|
|
165
167
|
(function(t) {
|
|
166
|
-
const e =
|
|
168
|
+
const e = F.getSymbolSize;
|
|
167
169
|
t.getRowColCoords = function(r) {
|
|
168
170
|
if (r === 1) return [];
|
|
169
171
|
const o = Math.floor(r / 7) + 2, n = e(r), l = n === 145 ? 26 : Math.ceil((n - 13) / (2 * o - 2)) * 2, s = [n - 7];
|
|
@@ -179,21 +181,21 @@ var Mt = te, We = {};
|
|
|
179
181
|
s === l - 1 && a === 0 || o.push([n[s], n[a]]);
|
|
180
182
|
return o;
|
|
181
183
|
};
|
|
182
|
-
})(
|
|
183
|
-
var
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
const i =
|
|
184
|
+
})(ot);
|
|
185
|
+
var rt = {};
|
|
186
|
+
const Rt = F.getSymbolSize, Oe = 7;
|
|
187
|
+
rt.getPositions = function(e) {
|
|
188
|
+
const i = Rt(e);
|
|
187
189
|
return [
|
|
188
190
|
// top-left
|
|
189
191
|
[0, 0],
|
|
190
192
|
// top-right
|
|
191
|
-
[i -
|
|
193
|
+
[i - Oe, 0],
|
|
192
194
|
// bottom-left
|
|
193
|
-
[0, i -
|
|
195
|
+
[0, i - Oe]
|
|
194
196
|
];
|
|
195
197
|
};
|
|
196
|
-
var
|
|
198
|
+
var it = {};
|
|
197
199
|
(function(t) {
|
|
198
200
|
t.Patterns = {
|
|
199
201
|
PATTERN000: 0,
|
|
@@ -217,12 +219,12 @@ var Ze = {};
|
|
|
217
219
|
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
218
220
|
}, t.getPenaltyN1 = function(o) {
|
|
219
221
|
const n = o.size;
|
|
220
|
-
let l = 0, s = 0, a = 0,
|
|
222
|
+
let l = 0, s = 0, a = 0, f = null, m = null;
|
|
221
223
|
for (let B = 0; B < n; B++) {
|
|
222
|
-
s = a = 0,
|
|
223
|
-
for (let
|
|
224
|
-
let d = o.get(B,
|
|
225
|
-
d ===
|
|
224
|
+
s = a = 0, f = m = null;
|
|
225
|
+
for (let g = 0; g < n; g++) {
|
|
226
|
+
let d = o.get(B, g);
|
|
227
|
+
d === f ? s++ : (s >= 5 && (l += e.N1 + (s - 5)), f = d, s = 1), d = o.get(g, B), d === m ? a++ : (a >= 5 && (l += e.N1 + (a - 5)), m = d, a = 1);
|
|
226
228
|
}
|
|
227
229
|
s >= 5 && (l += e.N1 + (s - 5)), a >= 5 && (l += e.N1 + (a - 5));
|
|
228
230
|
}
|
|
@@ -232,17 +234,17 @@ var Ze = {};
|
|
|
232
234
|
let l = 0;
|
|
233
235
|
for (let s = 0; s < n - 1; s++)
|
|
234
236
|
for (let a = 0; a < n - 1; a++) {
|
|
235
|
-
const
|
|
236
|
-
(
|
|
237
|
+
const f = o.get(s, a) + o.get(s, a + 1) + o.get(s + 1, a) + o.get(s + 1, a + 1);
|
|
238
|
+
(f === 4 || f === 0) && l++;
|
|
237
239
|
}
|
|
238
240
|
return l * e.N2;
|
|
239
241
|
}, t.getPenaltyN3 = function(o) {
|
|
240
242
|
const n = o.size;
|
|
241
243
|
let l = 0, s = 0, a = 0;
|
|
242
|
-
for (let
|
|
244
|
+
for (let f = 0; f < n; f++) {
|
|
243
245
|
s = a = 0;
|
|
244
|
-
for (let
|
|
245
|
-
s = s << 1 & 2047 | o.get(
|
|
246
|
+
for (let m = 0; m < n; m++)
|
|
247
|
+
s = s << 1 & 2047 | o.get(f, m), m >= 10 && (s === 1488 || s === 93) && l++, a = a << 1 & 2047 | o.get(m, f), m >= 10 && (a === 1488 || a === 93) && l++;
|
|
246
248
|
}
|
|
247
249
|
return l * e.N3;
|
|
248
250
|
}, t.getPenaltyN4 = function(o) {
|
|
@@ -281,16 +283,16 @@ var Ze = {};
|
|
|
281
283
|
}, t.getBestMask = function(o, n) {
|
|
282
284
|
const l = Object.keys(t.Patterns).length;
|
|
283
285
|
let s = 0, a = 1 / 0;
|
|
284
|
-
for (let
|
|
285
|
-
n(
|
|
286
|
-
const
|
|
287
|
-
t.applyMask(
|
|
286
|
+
for (let f = 0; f < l; f++) {
|
|
287
|
+
n(f), t.applyMask(f, o);
|
|
288
|
+
const m = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
|
|
289
|
+
t.applyMask(f, o), m < a && (a = m, s = f);
|
|
288
290
|
}
|
|
289
291
|
return s;
|
|
290
292
|
};
|
|
291
|
-
})(
|
|
292
|
-
var
|
|
293
|
-
const
|
|
293
|
+
})(it);
|
|
294
|
+
var ge = {};
|
|
295
|
+
const H = me, le = [
|
|
294
296
|
// L M Q H
|
|
295
297
|
1,
|
|
296
298
|
1,
|
|
@@ -452,7 +454,7 @@ const z = ue, re = [
|
|
|
452
454
|
49,
|
|
453
455
|
68,
|
|
454
456
|
81
|
|
455
|
-
],
|
|
457
|
+
], ae = [
|
|
456
458
|
// L M Q H
|
|
457
459
|
7,
|
|
458
460
|
10,
|
|
@@ -615,55 +617,55 @@ const z = ue, re = [
|
|
|
615
617
|
2040,
|
|
616
618
|
2430
|
|
617
619
|
];
|
|
618
|
-
|
|
620
|
+
ge.getBlocksCount = function(e, i) {
|
|
619
621
|
switch (i) {
|
|
620
|
-
case
|
|
621
|
-
return
|
|
622
|
-
case
|
|
623
|
-
return
|
|
624
|
-
case
|
|
625
|
-
return
|
|
626
|
-
case
|
|
627
|
-
return
|
|
622
|
+
case H.L:
|
|
623
|
+
return le[(e - 1) * 4 + 0];
|
|
624
|
+
case H.M:
|
|
625
|
+
return le[(e - 1) * 4 + 1];
|
|
626
|
+
case H.Q:
|
|
627
|
+
return le[(e - 1) * 4 + 2];
|
|
628
|
+
case H.H:
|
|
629
|
+
return le[(e - 1) * 4 + 3];
|
|
628
630
|
default:
|
|
629
631
|
return;
|
|
630
632
|
}
|
|
631
633
|
};
|
|
632
|
-
|
|
634
|
+
ge.getTotalCodewordsCount = function(e, i) {
|
|
633
635
|
switch (i) {
|
|
634
|
-
case
|
|
635
|
-
return
|
|
636
|
-
case
|
|
637
|
-
return
|
|
638
|
-
case
|
|
639
|
-
return
|
|
640
|
-
case
|
|
641
|
-
return
|
|
636
|
+
case H.L:
|
|
637
|
+
return ae[(e - 1) * 4 + 0];
|
|
638
|
+
case H.M:
|
|
639
|
+
return ae[(e - 1) * 4 + 1];
|
|
640
|
+
case H.Q:
|
|
641
|
+
return ae[(e - 1) * 4 + 2];
|
|
642
|
+
case H.H:
|
|
643
|
+
return ae[(e - 1) * 4 + 3];
|
|
642
644
|
default:
|
|
643
645
|
return;
|
|
644
646
|
}
|
|
645
647
|
};
|
|
646
|
-
var
|
|
647
|
-
const
|
|
648
|
+
var st = {}, he = {};
|
|
649
|
+
const ee = new Uint8Array(512), de = new Uint8Array(256);
|
|
648
650
|
(function() {
|
|
649
651
|
let e = 1;
|
|
650
652
|
for (let i = 0; i < 255; i++)
|
|
651
|
-
|
|
653
|
+
ee[i] = e, de[e] = i, e <<= 1, e & 256 && (e ^= 285);
|
|
652
654
|
for (let i = 255; i < 512; i++)
|
|
653
|
-
|
|
655
|
+
ee[i] = ee[i - 255];
|
|
654
656
|
})();
|
|
655
|
-
|
|
657
|
+
he.log = function(e) {
|
|
656
658
|
if (e < 1) throw new Error("log(" + e + ")");
|
|
657
|
-
return
|
|
659
|
+
return de[e];
|
|
658
660
|
};
|
|
659
|
-
|
|
660
|
-
return
|
|
661
|
+
he.exp = function(e) {
|
|
662
|
+
return ee[e];
|
|
661
663
|
};
|
|
662
|
-
|
|
663
|
-
return e === 0 || i === 0 ? 0 :
|
|
664
|
+
he.mul = function(e, i) {
|
|
665
|
+
return e === 0 || i === 0 ? 0 : ee[de[e] + de[i]];
|
|
664
666
|
};
|
|
665
667
|
(function(t) {
|
|
666
|
-
const e =
|
|
668
|
+
const e = he;
|
|
667
669
|
t.mul = function(r, o) {
|
|
668
670
|
const n = new Uint8Array(r.length + o.length - 1);
|
|
669
671
|
for (let l = 0; l < r.length; l++)
|
|
@@ -687,53 +689,53 @@ de.mul = function(e, i) {
|
|
|
687
689
|
o = t.mul(o, new Uint8Array([1, e.exp(n)]));
|
|
688
690
|
return o;
|
|
689
691
|
};
|
|
690
|
-
})(
|
|
691
|
-
const
|
|
692
|
-
function
|
|
692
|
+
})(st);
|
|
693
|
+
const lt = st;
|
|
694
|
+
function Pe(t) {
|
|
693
695
|
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
694
696
|
}
|
|
695
|
-
|
|
696
|
-
this.degree = e, this.genPoly =
|
|
697
|
+
Pe.prototype.initialize = function(e) {
|
|
698
|
+
this.degree = e, this.genPoly = lt.generateECPolynomial(this.degree);
|
|
697
699
|
};
|
|
698
|
-
|
|
700
|
+
Pe.prototype.encode = function(e) {
|
|
699
701
|
if (!this.genPoly)
|
|
700
702
|
throw new Error("Encoder not initialized");
|
|
701
703
|
const i = new Uint8Array(e.length + this.degree);
|
|
702
704
|
i.set(e);
|
|
703
|
-
const r =
|
|
705
|
+
const r = lt.mod(i, this.genPoly), o = this.degree - r.length;
|
|
704
706
|
if (o > 0) {
|
|
705
707
|
const n = new Uint8Array(this.degree);
|
|
706
708
|
return n.set(r, o), n;
|
|
707
709
|
}
|
|
708
710
|
return r;
|
|
709
711
|
};
|
|
710
|
-
var
|
|
711
|
-
|
|
712
|
+
var Dt = Pe, at = {}, K = {}, Te = {};
|
|
713
|
+
Te.isValid = function(e) {
|
|
712
714
|
return !isNaN(e) && e >= 1 && e <= 40;
|
|
713
715
|
};
|
|
714
|
-
var
|
|
715
|
-
const
|
|
716
|
-
let
|
|
717
|
-
|
|
718
|
-
const
|
|
716
|
+
var $ = {};
|
|
717
|
+
const ut = "[0-9]+", kt = "[A-Z $%*+\\-./:]+";
|
|
718
|
+
let te = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
719
|
+
te = te.replace(/u/g, "\\u");
|
|
720
|
+
const Vt = "(?:(?![A-Z0-9 $%*+\\-./:]|" + te + `)(?:.|[\r
|
|
719
721
|
]))+`;
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
return
|
|
722
|
+
$.KANJI = new RegExp(te, "g");
|
|
723
|
+
$.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
724
|
+
$.BYTE = new RegExp(Vt, "g");
|
|
725
|
+
$.NUMERIC = new RegExp(ut, "g");
|
|
726
|
+
$.ALPHANUMERIC = new RegExp(kt, "g");
|
|
727
|
+
const xt = new RegExp("^" + te + "$"), $t = new RegExp("^" + ut + "$"), zt = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
728
|
+
$.testKanji = function(e) {
|
|
729
|
+
return xt.test(e);
|
|
728
730
|
};
|
|
729
|
-
|
|
730
|
-
return
|
|
731
|
+
$.testNumeric = function(e) {
|
|
732
|
+
return $t.test(e);
|
|
731
733
|
};
|
|
732
|
-
|
|
733
|
-
return
|
|
734
|
+
$.testAlphanumeric = function(e) {
|
|
735
|
+
return zt.test(e);
|
|
734
736
|
};
|
|
735
737
|
(function(t) {
|
|
736
|
-
const e =
|
|
738
|
+
const e = Te, i = $;
|
|
737
739
|
t.NUMERIC = {
|
|
738
740
|
id: "Numeric",
|
|
739
741
|
bit: 1,
|
|
@@ -790,102 +792,102 @@ D.testAlphanumeric = function(e) {
|
|
|
790
792
|
return l;
|
|
791
793
|
}
|
|
792
794
|
};
|
|
793
|
-
})(
|
|
795
|
+
})(K);
|
|
794
796
|
(function(t) {
|
|
795
|
-
const e =
|
|
796
|
-
function a(
|
|
797
|
+
const e = F, i = ge, r = me, o = K, n = Te, l = 7973, s = e.getBCHDigit(l);
|
|
798
|
+
function a(g, d, v) {
|
|
797
799
|
for (let C = 1; C <= 40; C++)
|
|
798
|
-
if (d <= t.getCapacity(C,
|
|
800
|
+
if (d <= t.getCapacity(C, v, g))
|
|
799
801
|
return C;
|
|
800
802
|
}
|
|
801
|
-
function
|
|
802
|
-
return o.getCharCountIndicator(
|
|
803
|
+
function f(g, d) {
|
|
804
|
+
return o.getCharCountIndicator(g, d) + 4;
|
|
803
805
|
}
|
|
804
|
-
function g
|
|
805
|
-
let
|
|
806
|
-
return
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
}),
|
|
806
|
+
function m(g, d) {
|
|
807
|
+
let v = 0;
|
|
808
|
+
return g.forEach(function(C) {
|
|
809
|
+
const M = f(C.mode, d);
|
|
810
|
+
v += M + C.getBitsLength();
|
|
811
|
+
}), v;
|
|
810
812
|
}
|
|
811
|
-
function B(
|
|
812
|
-
for (let
|
|
813
|
-
if (g
|
|
814
|
-
return
|
|
813
|
+
function B(g, d) {
|
|
814
|
+
for (let v = 1; v <= 40; v++)
|
|
815
|
+
if (m(g, v) <= t.getCapacity(v, d, o.MIXED))
|
|
816
|
+
return v;
|
|
815
817
|
}
|
|
816
|
-
t.from = function(d,
|
|
817
|
-
return n.isValid(d) ? parseInt(d, 10) :
|
|
818
|
-
}, t.getCapacity = function(d,
|
|
818
|
+
t.from = function(d, v) {
|
|
819
|
+
return n.isValid(d) ? parseInt(d, 10) : v;
|
|
820
|
+
}, t.getCapacity = function(d, v, C) {
|
|
819
821
|
if (!n.isValid(d))
|
|
820
822
|
throw new Error("Invalid QR Code version");
|
|
821
823
|
typeof C > "u" && (C = o.BYTE);
|
|
822
|
-
const
|
|
823
|
-
if (C === o.MIXED) return
|
|
824
|
-
const
|
|
824
|
+
const M = e.getSymbolTotalCodewords(d), p = i.getTotalCodewordsCount(d, v), h = (M - p) * 8;
|
|
825
|
+
if (C === o.MIXED) return h;
|
|
826
|
+
const w = h - f(C, d);
|
|
825
827
|
switch (C) {
|
|
826
828
|
case o.NUMERIC:
|
|
827
|
-
return Math.floor(
|
|
829
|
+
return Math.floor(w / 10 * 3);
|
|
828
830
|
case o.ALPHANUMERIC:
|
|
829
|
-
return Math.floor(
|
|
831
|
+
return Math.floor(w / 11 * 2);
|
|
830
832
|
case o.KANJI:
|
|
831
|
-
return Math.floor(
|
|
833
|
+
return Math.floor(w / 13);
|
|
832
834
|
case o.BYTE:
|
|
833
835
|
default:
|
|
834
|
-
return Math.floor(
|
|
836
|
+
return Math.floor(w / 8);
|
|
835
837
|
}
|
|
836
|
-
}, t.getBestVersionForData = function(d,
|
|
838
|
+
}, t.getBestVersionForData = function(d, v) {
|
|
837
839
|
let C;
|
|
838
|
-
const
|
|
840
|
+
const M = r.from(v, r.M);
|
|
839
841
|
if (Array.isArray(d)) {
|
|
840
842
|
if (d.length > 1)
|
|
841
|
-
return B(d,
|
|
843
|
+
return B(d, M);
|
|
842
844
|
if (d.length === 0)
|
|
843
845
|
return 1;
|
|
844
846
|
C = d[0];
|
|
845
847
|
} else
|
|
846
848
|
C = d;
|
|
847
|
-
return a(C.mode, C.getLength(),
|
|
849
|
+
return a(C.mode, C.getLength(), M);
|
|
848
850
|
}, t.getEncodedBits = function(d) {
|
|
849
851
|
if (!n.isValid(d) || d < 7)
|
|
850
852
|
throw new Error("Invalid QR Code version");
|
|
851
|
-
let
|
|
852
|
-
for (; e.getBCHDigit(
|
|
853
|
-
|
|
854
|
-
return d << 12 |
|
|
853
|
+
let v = d << 12;
|
|
854
|
+
for (; e.getBCHDigit(v) - s >= 0; )
|
|
855
|
+
v ^= l << e.getBCHDigit(v) - s;
|
|
856
|
+
return d << 12 | v;
|
|
855
857
|
};
|
|
856
|
-
})(
|
|
857
|
-
var
|
|
858
|
-
const
|
|
859
|
-
|
|
858
|
+
})(at);
|
|
859
|
+
var ct = {};
|
|
860
|
+
const Be = F, dt = 1335, Ht = 21522, Ye = Be.getBCHDigit(dt);
|
|
861
|
+
ct.getEncodedBits = function(e, i) {
|
|
860
862
|
const r = e.bit << 3 | i;
|
|
861
863
|
let o = r << 10;
|
|
862
|
-
for (;
|
|
863
|
-
o ^=
|
|
864
|
-
return (r << 10 | o) ^
|
|
864
|
+
for (; Be.getBCHDigit(o) - Ye >= 0; )
|
|
865
|
+
o ^= dt << Be.getBCHDigit(o) - Ye;
|
|
866
|
+
return (r << 10 | o) ^ Ht;
|
|
865
867
|
};
|
|
866
|
-
var
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
this.mode =
|
|
868
|
+
var ft = {};
|
|
869
|
+
const Kt = K;
|
|
870
|
+
function J(t) {
|
|
871
|
+
this.mode = Kt.NUMERIC, this.data = t.toString();
|
|
870
872
|
}
|
|
871
|
-
|
|
873
|
+
J.getBitsLength = function(e) {
|
|
872
874
|
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
873
875
|
};
|
|
874
|
-
|
|
876
|
+
J.prototype.getLength = function() {
|
|
875
877
|
return this.data.length;
|
|
876
878
|
};
|
|
877
|
-
|
|
878
|
-
return
|
|
879
|
+
J.prototype.getBitsLength = function() {
|
|
880
|
+
return J.getBitsLength(this.data.length);
|
|
879
881
|
};
|
|
880
|
-
|
|
882
|
+
J.prototype.write = function(e) {
|
|
881
883
|
let i, r, o;
|
|
882
884
|
for (i = 0; i + 3 <= this.data.length; i += 3)
|
|
883
885
|
r = this.data.substr(i, 3), o = parseInt(r, 10), e.put(o, 10);
|
|
884
886
|
const n = this.data.length - i;
|
|
885
887
|
n > 0 && (r = this.data.substr(i), o = parseInt(r, 10), e.put(o, n * 3 + 1));
|
|
886
888
|
};
|
|
887
|
-
var
|
|
888
|
-
const
|
|
889
|
+
var Ot = J;
|
|
890
|
+
const Yt = K, we = [
|
|
889
891
|
"0",
|
|
890
892
|
"1",
|
|
891
893
|
"2",
|
|
@@ -932,27 +934,27 @@ const kt = $, ge = [
|
|
|
932
934
|
"/",
|
|
933
935
|
":"
|
|
934
936
|
];
|
|
935
|
-
function
|
|
936
|
-
this.mode =
|
|
937
|
+
function q(t) {
|
|
938
|
+
this.mode = Yt.ALPHANUMERIC, this.data = t;
|
|
937
939
|
}
|
|
938
|
-
|
|
940
|
+
q.getBitsLength = function(e) {
|
|
939
941
|
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
940
942
|
};
|
|
941
|
-
|
|
943
|
+
q.prototype.getLength = function() {
|
|
942
944
|
return this.data.length;
|
|
943
945
|
};
|
|
944
|
-
|
|
945
|
-
return
|
|
946
|
+
q.prototype.getBitsLength = function() {
|
|
947
|
+
return q.getBitsLength(this.data.length);
|
|
946
948
|
};
|
|
947
|
-
|
|
949
|
+
q.prototype.write = function(e) {
|
|
948
950
|
let i;
|
|
949
951
|
for (i = 0; i + 2 <= this.data.length; i += 2) {
|
|
950
|
-
let r =
|
|
951
|
-
r +=
|
|
952
|
+
let r = we.indexOf(this.data[i]) * 45;
|
|
953
|
+
r += we.indexOf(this.data[i + 1]), e.put(r, 11);
|
|
952
954
|
}
|
|
953
|
-
this.data.length % 2 && e.put(
|
|
955
|
+
this.data.length % 2 && e.put(we.indexOf(this.data[i]), 6);
|
|
954
956
|
};
|
|
955
|
-
var
|
|
957
|
+
var jt = q, Jt = function(e) {
|
|
956
958
|
for (var i = [], r = e.length, o = 0; o < r; o++) {
|
|
957
959
|
var n = e.charCodeAt(o);
|
|
958
960
|
if (n >= 55296 && n <= 56319 && r > o + 1) {
|
|
@@ -979,41 +981,41 @@ var Vt = Y, xt = function(e) {
|
|
|
979
981
|
}
|
|
980
982
|
return new Uint8Array(i).buffer;
|
|
981
983
|
};
|
|
982
|
-
const
|
|
983
|
-
function
|
|
984
|
-
this.mode =
|
|
984
|
+
const qt = Jt, Gt = K;
|
|
985
|
+
function G(t) {
|
|
986
|
+
this.mode = Gt.BYTE, typeof t == "string" && (t = qt(t)), this.data = new Uint8Array(t);
|
|
985
987
|
}
|
|
986
|
-
|
|
988
|
+
G.getBitsLength = function(e) {
|
|
987
989
|
return e * 8;
|
|
988
990
|
};
|
|
989
|
-
|
|
991
|
+
G.prototype.getLength = function() {
|
|
990
992
|
return this.data.length;
|
|
991
993
|
};
|
|
992
|
-
|
|
993
|
-
return
|
|
994
|
+
G.prototype.getBitsLength = function() {
|
|
995
|
+
return G.getBitsLength(this.data.length);
|
|
994
996
|
};
|
|
995
|
-
|
|
997
|
+
G.prototype.write = function(t) {
|
|
996
998
|
for (let e = 0, i = this.data.length; e < i; e++)
|
|
997
999
|
t.put(this.data[e], 8);
|
|
998
1000
|
};
|
|
999
|
-
var
|
|
1000
|
-
const
|
|
1001
|
-
function
|
|
1002
|
-
this.mode =
|
|
1001
|
+
var Qt = G;
|
|
1002
|
+
const Xt = K, Zt = F;
|
|
1003
|
+
function Q(t) {
|
|
1004
|
+
this.mode = Xt.KANJI, this.data = t;
|
|
1003
1005
|
}
|
|
1004
|
-
|
|
1006
|
+
Q.getBitsLength = function(e) {
|
|
1005
1007
|
return e * 13;
|
|
1006
1008
|
};
|
|
1007
|
-
|
|
1009
|
+
Q.prototype.getLength = function() {
|
|
1008
1010
|
return this.data.length;
|
|
1009
1011
|
};
|
|
1010
|
-
|
|
1011
|
-
return
|
|
1012
|
+
Q.prototype.getBitsLength = function() {
|
|
1013
|
+
return Q.getBitsLength(this.data.length);
|
|
1012
1014
|
};
|
|
1013
|
-
|
|
1015
|
+
Q.prototype.write = function(t) {
|
|
1014
1016
|
let e;
|
|
1015
1017
|
for (e = 0; e < this.data.length; e++) {
|
|
1016
|
-
let i =
|
|
1018
|
+
let i = Zt.toSJIS(this.data[e]);
|
|
1017
1019
|
if (i >= 33088 && i <= 40956)
|
|
1018
1020
|
i -= 33088;
|
|
1019
1021
|
else if (i >= 57408 && i <= 60351)
|
|
@@ -1026,7 +1028,7 @@ Make sure your charset is UTF-8`
|
|
|
1026
1028
|
i = (i >>> 8 & 255) * 192 + (i & 255), t.put(i, 13);
|
|
1027
1029
|
}
|
|
1028
1030
|
};
|
|
1029
|
-
var
|
|
1031
|
+
var Wt = Q, mt = { exports: {} };
|
|
1030
1032
|
(function(t) {
|
|
1031
1033
|
var e = {
|
|
1032
1034
|
single_source_shortest_paths: function(i, r, o) {
|
|
@@ -1034,10 +1036,10 @@ var Yt = J, lt = { exports: {} };
|
|
|
1034
1036
|
l[r] = 0;
|
|
1035
1037
|
var s = e.PriorityQueue.make();
|
|
1036
1038
|
s.push(r, 0);
|
|
1037
|
-
for (var a,
|
|
1038
|
-
a = s.pop(),
|
|
1039
|
-
for (
|
|
1040
|
-
|
|
1039
|
+
for (var a, f, m, B, g, d, v, C, M; !s.empty(); ) {
|
|
1040
|
+
a = s.pop(), f = a.value, B = a.cost, g = i[f] || {};
|
|
1041
|
+
for (m in g)
|
|
1042
|
+
g.hasOwnProperty(m) && (d = g[m], v = B + d, C = l[m], M = typeof l[m] > "u", (M || C > v) && (l[m] = v, s.push(m, v), n[m] = f));
|
|
1041
1043
|
}
|
|
1042
1044
|
if (typeof o < "u" && typeof l[o] > "u") {
|
|
1043
1045
|
var p = ["Could not find a path from ", r, " to ", o, "."].join("");
|
|
@@ -1091,40 +1093,40 @@ var Yt = J, lt = { exports: {} };
|
|
|
1091
1093
|
}
|
|
1092
1094
|
};
|
|
1093
1095
|
t.exports = e;
|
|
1094
|
-
})(
|
|
1095
|
-
var
|
|
1096
|
+
})(mt);
|
|
1097
|
+
var en = mt.exports;
|
|
1096
1098
|
(function(t) {
|
|
1097
|
-
const e =
|
|
1098
|
-
function
|
|
1099
|
+
const e = K, i = Ot, r = jt, o = Qt, n = Wt, l = $, s = F, a = en;
|
|
1100
|
+
function f(p) {
|
|
1099
1101
|
return unescape(encodeURIComponent(p)).length;
|
|
1100
1102
|
}
|
|
1101
|
-
function
|
|
1102
|
-
const
|
|
1103
|
-
let
|
|
1104
|
-
for (; (
|
|
1105
|
-
|
|
1106
|
-
data:
|
|
1107
|
-
index:
|
|
1108
|
-
mode:
|
|
1109
|
-
length:
|
|
1103
|
+
function m(p, h, w) {
|
|
1104
|
+
const y = [];
|
|
1105
|
+
let _;
|
|
1106
|
+
for (; (_ = p.exec(w)) !== null; )
|
|
1107
|
+
y.push({
|
|
1108
|
+
data: _[0],
|
|
1109
|
+
index: _.index,
|
|
1110
|
+
mode: h,
|
|
1111
|
+
length: _[0].length
|
|
1110
1112
|
});
|
|
1111
|
-
return
|
|
1113
|
+
return y;
|
|
1112
1114
|
}
|
|
1113
1115
|
function B(p) {
|
|
1114
|
-
const
|
|
1115
|
-
let
|
|
1116
|
-
return s.isKanjiModeEnabled() ? (
|
|
1117
|
-
return
|
|
1118
|
-
}).map(function(
|
|
1116
|
+
const h = m(l.NUMERIC, e.NUMERIC, p), w = m(l.ALPHANUMERIC, e.ALPHANUMERIC, p);
|
|
1117
|
+
let y, _;
|
|
1118
|
+
return s.isKanjiModeEnabled() ? (y = m(l.BYTE, e.BYTE, p), _ = m(l.KANJI, e.KANJI, p)) : (y = m(l.BYTE_KANJI, e.BYTE, p), _ = []), h.concat(w, y, _).sort(function(P, A) {
|
|
1119
|
+
return P.index - A.index;
|
|
1120
|
+
}).map(function(P) {
|
|
1119
1121
|
return {
|
|
1120
|
-
data:
|
|
1121
|
-
mode:
|
|
1122
|
-
length:
|
|
1122
|
+
data: P.data,
|
|
1123
|
+
mode: P.mode,
|
|
1124
|
+
length: P.length
|
|
1123
1125
|
};
|
|
1124
1126
|
});
|
|
1125
1127
|
}
|
|
1126
|
-
function
|
|
1127
|
-
switch (
|
|
1128
|
+
function g(p, h) {
|
|
1129
|
+
switch (h) {
|
|
1128
1130
|
case e.NUMERIC:
|
|
1129
1131
|
return i.getBitsLength(p);
|
|
1130
1132
|
case e.ALPHANUMERIC:
|
|
@@ -1136,69 +1138,69 @@ var jt = lt.exports;
|
|
|
1136
1138
|
}
|
|
1137
1139
|
}
|
|
1138
1140
|
function d(p) {
|
|
1139
|
-
return p.reduce(function(
|
|
1140
|
-
const
|
|
1141
|
-
return
|
|
1141
|
+
return p.reduce(function(h, w) {
|
|
1142
|
+
const y = h.length - 1 >= 0 ? h[h.length - 1] : null;
|
|
1143
|
+
return y && y.mode === w.mode ? (h[h.length - 1].data += w.data, h) : (h.push(w), h);
|
|
1142
1144
|
}, []);
|
|
1143
1145
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const
|
|
1146
|
-
for (let
|
|
1147
|
-
const
|
|
1148
|
-
switch (
|
|
1146
|
+
function v(p) {
|
|
1147
|
+
const h = [];
|
|
1148
|
+
for (let w = 0; w < p.length; w++) {
|
|
1149
|
+
const y = p[w];
|
|
1150
|
+
switch (y.mode) {
|
|
1149
1151
|
case e.NUMERIC:
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
{ data:
|
|
1153
|
-
{ data:
|
|
1152
|
+
h.push([
|
|
1153
|
+
y,
|
|
1154
|
+
{ data: y.data, mode: e.ALPHANUMERIC, length: y.length },
|
|
1155
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1154
1156
|
]);
|
|
1155
1157
|
break;
|
|
1156
1158
|
case e.ALPHANUMERIC:
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
{ data:
|
|
1159
|
+
h.push([
|
|
1160
|
+
y,
|
|
1161
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1160
1162
|
]);
|
|
1161
1163
|
break;
|
|
1162
1164
|
case e.KANJI:
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
{ data:
|
|
1165
|
+
h.push([
|
|
1166
|
+
y,
|
|
1167
|
+
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1166
1168
|
]);
|
|
1167
1169
|
break;
|
|
1168
1170
|
case e.BYTE:
|
|
1169
|
-
|
|
1170
|
-
{ data:
|
|
1171
|
+
h.push([
|
|
1172
|
+
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1171
1173
|
]);
|
|
1172
1174
|
}
|
|
1173
1175
|
}
|
|
1174
|
-
return
|
|
1176
|
+
return h;
|
|
1175
1177
|
}
|
|
1176
|
-
function C(p,
|
|
1177
|
-
const
|
|
1178
|
-
let
|
|
1179
|
-
for (let
|
|
1180
|
-
const
|
|
1181
|
-
for (let
|
|
1182
|
-
const
|
|
1183
|
-
|
|
1184
|
-
for (let
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1178
|
+
function C(p, h) {
|
|
1179
|
+
const w = {}, y = { start: {} };
|
|
1180
|
+
let _ = ["start"];
|
|
1181
|
+
for (let S = 0; S < p.length; S++) {
|
|
1182
|
+
const P = p[S], A = [];
|
|
1183
|
+
for (let c = 0; c < P.length; c++) {
|
|
1184
|
+
const U = P[c], L = "" + S + c;
|
|
1185
|
+
A.push(L), w[L] = { node: U, lastCount: 0 }, y[L] = {};
|
|
1186
|
+
for (let R = 0; R < _.length; R++) {
|
|
1187
|
+
const N = _[R];
|
|
1188
|
+
w[N] && w[N].node.mode === U.mode ? (y[N][L] = g(w[N].lastCount + U.length, U.mode) - g(w[N].lastCount, U.mode), w[N].lastCount += U.length) : (w[N] && (w[N].lastCount = U.length), y[N][L] = g(U.length, U.mode) + 4 + e.getCharCountIndicator(U.mode, h));
|
|
1187
1189
|
}
|
|
1188
1190
|
}
|
|
1189
|
-
|
|
1191
|
+
_ = A;
|
|
1190
1192
|
}
|
|
1191
|
-
for (let
|
|
1192
|
-
|
|
1193
|
-
return { map:
|
|
1193
|
+
for (let S = 0; S < _.length; S++)
|
|
1194
|
+
y[_[S]].end = 0;
|
|
1195
|
+
return { map: y, table: w };
|
|
1194
1196
|
}
|
|
1195
|
-
function
|
|
1196
|
-
let
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1199
|
-
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(
|
|
1200
|
-
Suggested mode is: ` + e.toString(
|
|
1201
|
-
switch (
|
|
1197
|
+
function M(p, h) {
|
|
1198
|
+
let w;
|
|
1199
|
+
const y = e.getBestModeForData(p);
|
|
1200
|
+
if (w = e.from(h, y), w !== e.BYTE && w.bit < y.bit)
|
|
1201
|
+
throw new Error('"' + p + '" cannot be encoded with mode ' + e.toString(w) + `.
|
|
1202
|
+
Suggested mode is: ` + e.toString(y));
|
|
1203
|
+
switch (w === e.KANJI && !s.isKanjiModeEnabled() && (w = e.BYTE), w) {
|
|
1202
1204
|
case e.NUMERIC:
|
|
1203
1205
|
return new i(p);
|
|
1204
1206
|
case e.ALPHANUMERIC:
|
|
@@ -1209,24 +1211,24 @@ var jt = lt.exports;
|
|
|
1209
1211
|
return new o(p);
|
|
1210
1212
|
}
|
|
1211
1213
|
}
|
|
1212
|
-
t.fromArray = function(
|
|
1213
|
-
return
|
|
1214
|
-
return typeof
|
|
1214
|
+
t.fromArray = function(h) {
|
|
1215
|
+
return h.reduce(function(w, y) {
|
|
1216
|
+
return typeof y == "string" ? w.push(M(y, null)) : y.data && w.push(M(y.data, y.mode)), w;
|
|
1215
1217
|
}, []);
|
|
1216
|
-
}, t.fromString = function(
|
|
1217
|
-
const
|
|
1218
|
-
for (let
|
|
1219
|
-
|
|
1220
|
-
return t.fromArray(d(
|
|
1221
|
-
}, t.rawSplit = function(
|
|
1218
|
+
}, t.fromString = function(h, w) {
|
|
1219
|
+
const y = B(h, s.isKanjiModeEnabled()), _ = v(y), S = C(_, w), P = a.find_path(S.map, "start", "end"), A = [];
|
|
1220
|
+
for (let c = 1; c < P.length - 1; c++)
|
|
1221
|
+
A.push(S.table[P[c]].node);
|
|
1222
|
+
return t.fromArray(d(A));
|
|
1223
|
+
}, t.rawSplit = function(h) {
|
|
1222
1224
|
return t.fromArray(
|
|
1223
|
-
B(
|
|
1225
|
+
B(h, s.isKanjiModeEnabled())
|
|
1224
1226
|
);
|
|
1225
1227
|
};
|
|
1226
|
-
})(
|
|
1227
|
-
const
|
|
1228
|
-
function
|
|
1229
|
-
const i = t.size, r =
|
|
1228
|
+
})(ft);
|
|
1229
|
+
const pe = F, be = me, tn = Lt, nn = Ft, on = ot, rn = rt, _e = it, Me = ge, sn = Dt, fe = at, ln = ct, an = K, ve = ft;
|
|
1230
|
+
function un(t, e) {
|
|
1231
|
+
const i = t.size, r = rn.getPositions(e);
|
|
1230
1232
|
for (let o = 0; o < r.length; o++) {
|
|
1231
1233
|
const n = r[o][0], l = r[o][1];
|
|
1232
1234
|
for (let s = -1; s <= 7; s++)
|
|
@@ -1235,15 +1237,15 @@ function en(t, e) {
|
|
|
1235
1237
|
l + a <= -1 || i <= l + a || (s >= 0 && s <= 6 && (a === 0 || a === 6) || a >= 0 && a <= 6 && (s === 0 || s === 6) || s >= 2 && s <= 4 && a >= 2 && a <= 4 ? t.set(n + s, l + a, !0, !0) : t.set(n + s, l + a, !1, !0));
|
|
1236
1238
|
}
|
|
1237
1239
|
}
|
|
1238
|
-
function
|
|
1240
|
+
function cn(t) {
|
|
1239
1241
|
const e = t.size;
|
|
1240
1242
|
for (let i = 8; i < e - 8; i++) {
|
|
1241
1243
|
const r = i % 2 === 0;
|
|
1242
1244
|
t.set(i, 6, r, !0), t.set(6, i, r, !0);
|
|
1243
1245
|
}
|
|
1244
1246
|
}
|
|
1245
|
-
function
|
|
1246
|
-
const i =
|
|
1247
|
+
function dn(t, e) {
|
|
1248
|
+
const i = on.getPositions(e);
|
|
1247
1249
|
for (let r = 0; r < i.length; r++) {
|
|
1248
1250
|
const o = i[r][0], n = i[r][1];
|
|
1249
1251
|
for (let l = -2; l <= 2; l++)
|
|
@@ -1251,28 +1253,28 @@ function nn(t, e) {
|
|
|
1251
1253
|
l === -2 || l === 2 || s === -2 || s === 2 || l === 0 && s === 0 ? t.set(o + l, n + s, !0, !0) : t.set(o + l, n + s, !1, !0);
|
|
1252
1254
|
}
|
|
1253
1255
|
}
|
|
1254
|
-
function
|
|
1255
|
-
const i = t.size, r =
|
|
1256
|
+
function fn(t, e) {
|
|
1257
|
+
const i = t.size, r = fe.getEncodedBits(e);
|
|
1256
1258
|
let o, n, l;
|
|
1257
1259
|
for (let s = 0; s < 18; s++)
|
|
1258
1260
|
o = Math.floor(s / 3), n = s % 3 + i - 8 - 3, l = (r >> s & 1) === 1, t.set(o, n, l, !0), t.set(n, o, l, !0);
|
|
1259
1261
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const r = t.size, o =
|
|
1262
|
+
function Ce(t, e, i) {
|
|
1263
|
+
const r = t.size, o = ln.getEncodedBits(e, i);
|
|
1262
1264
|
let n, l;
|
|
1263
1265
|
for (n = 0; n < 15; n++)
|
|
1264
1266
|
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);
|
|
1265
1267
|
t.set(r - 8, 8, 1, !0);
|
|
1266
1268
|
}
|
|
1267
|
-
function
|
|
1269
|
+
function mn(t, e) {
|
|
1268
1270
|
const i = t.size;
|
|
1269
1271
|
let r = -1, o = i - 1, n = 7, l = 0;
|
|
1270
1272
|
for (let s = i - 1; s > 0; s -= 2)
|
|
1271
1273
|
for (s === 6 && s--; ; ) {
|
|
1272
1274
|
for (let a = 0; a < 2; a++)
|
|
1273
1275
|
if (!t.isReserved(o, s - a)) {
|
|
1274
|
-
let
|
|
1275
|
-
l < e.length && (
|
|
1276
|
+
let f = !1;
|
|
1277
|
+
l < e.length && (f = (e[l] >>> n & 1) === 1), t.set(o, s - a, f), n--, n === -1 && (l++, n = 7);
|
|
1276
1278
|
}
|
|
1277
1279
|
if (o += r, o < 0 || i <= o) {
|
|
1278
1280
|
o -= r, r = -r;
|
|
@@ -1280,53 +1282,53 @@ function rn(t, e) {
|
|
|
1280
1282
|
}
|
|
1281
1283
|
}
|
|
1282
1284
|
}
|
|
1283
|
-
function
|
|
1284
|
-
const r = new
|
|
1285
|
+
function gn(t, e, i) {
|
|
1286
|
+
const r = new tn();
|
|
1285
1287
|
i.forEach(function(a) {
|
|
1286
|
-
r.put(a.mode.bit, 4), r.put(a.getLength(),
|
|
1288
|
+
r.put(a.mode.bit, 4), r.put(a.getLength(), an.getCharCountIndicator(a.mode, t)), a.write(r);
|
|
1287
1289
|
});
|
|
1288
|
-
const o =
|
|
1290
|
+
const o = pe.getSymbolTotalCodewords(t), n = Me.getTotalCodewordsCount(t, e), l = (o - n) * 8;
|
|
1289
1291
|
for (r.getLengthInBits() + 4 <= l && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
|
|
1290
1292
|
r.putBit(0);
|
|
1291
1293
|
const s = (l - r.getLengthInBits()) / 8;
|
|
1292
1294
|
for (let a = 0; a < s; a++)
|
|
1293
1295
|
r.put(a % 2 ? 17 : 236, 8);
|
|
1294
|
-
return
|
|
1296
|
+
return hn(r, t, e);
|
|
1295
1297
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const r =
|
|
1298
|
-
let
|
|
1299
|
-
const C = new Array(l),
|
|
1298
|
+
function hn(t, e, i) {
|
|
1299
|
+
const r = pe.getSymbolTotalCodewords(e), o = Me.getTotalCodewordsCount(e, i), n = r - o, l = Me.getBlocksCount(e, i), s = r % l, a = l - s, f = Math.floor(r / l), m = Math.floor(n / l), B = m + 1, g = f - m, d = new sn(g);
|
|
1300
|
+
let v = 0;
|
|
1301
|
+
const C = new Array(l), M = new Array(l);
|
|
1300
1302
|
let p = 0;
|
|
1301
|
-
const
|
|
1302
|
-
for (let
|
|
1303
|
-
const
|
|
1304
|
-
C[
|
|
1303
|
+
const h = new Uint8Array(t.buffer);
|
|
1304
|
+
for (let P = 0; P < l; P++) {
|
|
1305
|
+
const A = P < a ? m : B;
|
|
1306
|
+
C[P] = h.slice(v, v + A), M[P] = d.encode(C[P]), v += A, p = Math.max(p, A);
|
|
1305
1307
|
}
|
|
1306
|
-
const
|
|
1307
|
-
let
|
|
1308
|
-
for (
|
|
1309
|
-
for (
|
|
1310
|
-
|
|
1311
|
-
for (
|
|
1312
|
-
for (
|
|
1313
|
-
y
|
|
1314
|
-
return
|
|
1308
|
+
const w = new Uint8Array(r);
|
|
1309
|
+
let y = 0, _, S;
|
|
1310
|
+
for (_ = 0; _ < p; _++)
|
|
1311
|
+
for (S = 0; S < l; S++)
|
|
1312
|
+
_ < C[S].length && (w[y++] = C[S][_]);
|
|
1313
|
+
for (_ = 0; _ < g; _++)
|
|
1314
|
+
for (S = 0; S < l; S++)
|
|
1315
|
+
w[y++] = M[S][_];
|
|
1316
|
+
return w;
|
|
1315
1317
|
}
|
|
1316
|
-
function
|
|
1318
|
+
function pn(t, e, i, r) {
|
|
1317
1319
|
let o;
|
|
1318
1320
|
if (Array.isArray(t))
|
|
1319
|
-
o =
|
|
1321
|
+
o = ve.fromArray(t);
|
|
1320
1322
|
else if (typeof t == "string") {
|
|
1321
|
-
let
|
|
1322
|
-
if (!
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1323
|
+
let f = e;
|
|
1324
|
+
if (!f) {
|
|
1325
|
+
const m = ve.rawSplit(t);
|
|
1326
|
+
f = fe.getBestVersionForData(m, i);
|
|
1325
1327
|
}
|
|
1326
|
-
o =
|
|
1328
|
+
o = ve.fromString(t, f || 40);
|
|
1327
1329
|
} else
|
|
1328
1330
|
throw new Error("Invalid data");
|
|
1329
|
-
const n =
|
|
1331
|
+
const n = fe.getBestVersionForData(o, i);
|
|
1330
1332
|
if (!n)
|
|
1331
1333
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1332
1334
|
if (!e)
|
|
@@ -1338,11 +1340,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1338
1340
|
Minimum version required to store current data is: ` + n + `.
|
|
1339
1341
|
`
|
|
1340
1342
|
);
|
|
1341
|
-
const l =
|
|
1342
|
-
return
|
|
1343
|
+
const l = gn(e, i, o), s = pe.getSymbolSize(e), a = new nn(s);
|
|
1344
|
+
return un(a, e), cn(a), dn(a, e), Ce(a, i, 0), e >= 7 && fn(a, e), mn(a, l), isNaN(r) && (r = _e.getBestMask(
|
|
1343
1345
|
a,
|
|
1344
|
-
|
|
1345
|
-
)),
|
|
1346
|
+
Ce.bind(null, a, i)
|
|
1347
|
+
)), _e.applyMask(r, a), Ce(a, i, r), {
|
|
1346
1348
|
modules: a,
|
|
1347
1349
|
version: e,
|
|
1348
1350
|
errorCorrectionLevel: i,
|
|
@@ -1350,13 +1352,13 @@ Minimum version required to store current data is: ` + n + `.
|
|
|
1350
1352
|
segments: o
|
|
1351
1353
|
};
|
|
1352
1354
|
}
|
|
1353
|
-
|
|
1355
|
+
tt.create = function(e, i) {
|
|
1354
1356
|
if (typeof e > "u" || e === "")
|
|
1355
1357
|
throw new Error("No input text");
|
|
1356
|
-
let r =
|
|
1357
|
-
return typeof i < "u" && (r =
|
|
1358
|
+
let r = be.M, o, n;
|
|
1359
|
+
return typeof i < "u" && (r = be.from(i.errorCorrectionLevel, be.M), o = fe.from(i.version), n = _e.from(i.maskPattern), i.toSJISFunc && pe.setToSJISFunction(i.toSJISFunc)), pn(e, o, r, n);
|
|
1358
1360
|
};
|
|
1359
|
-
var
|
|
1361
|
+
var gt = {}, Ne = {};
|
|
1360
1362
|
(function(t) {
|
|
1361
1363
|
function e(i) {
|
|
1362
1364
|
if (typeof i == "number" && (i = i.toString()), typeof i != "string")
|
|
@@ -1396,20 +1398,20 @@ var at = {}, Ie = {};
|
|
|
1396
1398
|
const n = t.getScale(r, o);
|
|
1397
1399
|
return Math.floor((r + o.margin * 2) * n);
|
|
1398
1400
|
}, t.qrToImageData = function(r, o, n) {
|
|
1399
|
-
const l = o.modules.size, s = o.modules.data, a = t.getScale(l, n),
|
|
1400
|
-
for (let
|
|
1401
|
-
for (let d = 0; d <
|
|
1402
|
-
let
|
|
1403
|
-
if (
|
|
1404
|
-
const
|
|
1405
|
-
C = B[s[
|
|
1401
|
+
const l = o.modules.size, s = o.modules.data, a = t.getScale(l, n), f = Math.floor((l + n.margin * 2) * a), m = n.margin * a, B = [n.color.light, n.color.dark];
|
|
1402
|
+
for (let g = 0; g < f; g++)
|
|
1403
|
+
for (let d = 0; d < f; d++) {
|
|
1404
|
+
let v = (g * f + d) * 4, C = n.color.light;
|
|
1405
|
+
if (g >= m && d >= m && g < f - m && d < f - m) {
|
|
1406
|
+
const M = Math.floor((g - m) / a), p = Math.floor((d - m) / a);
|
|
1407
|
+
C = B[s[M * l + p] ? 1 : 0];
|
|
1406
1408
|
}
|
|
1407
|
-
r[
|
|
1409
|
+
r[v++] = C.r, r[v++] = C.g, r[v++] = C.b, r[v] = C.a;
|
|
1408
1410
|
}
|
|
1409
1411
|
};
|
|
1410
|
-
})(
|
|
1412
|
+
})(Ne);
|
|
1411
1413
|
(function(t) {
|
|
1412
|
-
const e =
|
|
1414
|
+
const e = Ne;
|
|
1413
1415
|
function i(o, n, l) {
|
|
1414
1416
|
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";
|
|
1415
1417
|
}
|
|
@@ -1421,44 +1423,44 @@ var at = {}, Ie = {};
|
|
|
1421
1423
|
}
|
|
1422
1424
|
}
|
|
1423
1425
|
t.render = function(n, l, s) {
|
|
1424
|
-
let a = s,
|
|
1425
|
-
typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), l || (
|
|
1426
|
-
const
|
|
1427
|
-
return e.qrToImageData(
|
|
1426
|
+
let a = s, f = l;
|
|
1427
|
+
typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), l || (f = r()), a = e.getOptions(a);
|
|
1428
|
+
const m = e.getImageWidth(n.modules.size, a), B = f.getContext("2d"), g = B.createImageData(m, m);
|
|
1429
|
+
return e.qrToImageData(g.data, n, a), i(B, f, m), B.putImageData(g, 0, 0), f;
|
|
1428
1430
|
}, t.renderToDataURL = function(n, l, s) {
|
|
1429
1431
|
let a = s;
|
|
1430
1432
|
typeof a > "u" && (!l || !l.getContext) && (a = l, l = void 0), a || (a = {});
|
|
1431
|
-
const
|
|
1432
|
-
return
|
|
1433
|
+
const f = t.render(n, l, a), m = a.type || "image/png", B = a.rendererOpts || {};
|
|
1434
|
+
return f.toDataURL(m, B.quality);
|
|
1433
1435
|
};
|
|
1434
|
-
})(
|
|
1435
|
-
var
|
|
1436
|
-
const
|
|
1437
|
-
function
|
|
1436
|
+
})(gt);
|
|
1437
|
+
var ht = {};
|
|
1438
|
+
const yn = Ne;
|
|
1439
|
+
function je(t, e) {
|
|
1438
1440
|
const i = t.a / 255, r = e + '="' + t.hex + '"';
|
|
1439
1441
|
return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
|
|
1440
1442
|
}
|
|
1441
|
-
function
|
|
1443
|
+
function Ee(t, e, i) {
|
|
1442
1444
|
let r = t + e;
|
|
1443
1445
|
return typeof i < "u" && (r += " " + i), r;
|
|
1444
1446
|
}
|
|
1445
|
-
function
|
|
1447
|
+
function wn(t, e, i) {
|
|
1446
1448
|
let r = "", o = 0, n = !1, l = 0;
|
|
1447
1449
|
for (let s = 0; s < t.length; s++) {
|
|
1448
|
-
const a = Math.floor(s % e),
|
|
1449
|
-
!a && !n && (n = !0), t[s] ? (l++, s > 0 && a > 0 && t[s - 1] || (r += n ?
|
|
1450
|
+
const a = Math.floor(s % e), f = Math.floor(s / e);
|
|
1451
|
+
!a && !n && (n = !0), t[s] ? (l++, s > 0 && a > 0 && t[s - 1] || (r += n ? Ee("M", a + i, 0.5 + f + i) : Ee("m", o, 0), o = 0, n = !1), a + 1 < e && t[s + 1] || (r += Ee("h", l), l = 0)) : o++;
|
|
1450
1452
|
}
|
|
1451
1453
|
return r;
|
|
1452
1454
|
}
|
|
1453
|
-
|
|
1454
|
-
const o =
|
|
1455
|
+
ht.render = function(e, i, r) {
|
|
1456
|
+
const o = yn.getOptions(i), n = e.modules.size, l = e.modules.data, s = n + o.margin * 2, a = o.color.light.a ? "<path " + je(o.color.light, "fill") + ' d="M0 0h' + s + "v" + s + 'H0z"/>' : "", f = "<path " + je(o.color.dark, "stroke") + ' d="' + wn(l, n, o.margin) + '"/>', m = 'viewBox="0 0 ' + s + " " + s + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + m + ' shape-rendering="crispEdges">' + a + f + `</svg>
|
|
1455
1457
|
`;
|
|
1456
|
-
return typeof r == "function" && r(null,
|
|
1458
|
+
return typeof r == "function" && r(null, g), g;
|
|
1457
1459
|
};
|
|
1458
|
-
const
|
|
1459
|
-
function
|
|
1460
|
+
const bn = Nt, Se = tt, pt = gt, vn = ht;
|
|
1461
|
+
function Ue(t, e, i, r, o) {
|
|
1460
1462
|
const n = [].slice.call(arguments, 1), l = n.length, s = typeof n[l - 1] == "function";
|
|
1461
|
-
if (!s && !
|
|
1463
|
+
if (!s && !bn())
|
|
1462
1464
|
throw new Error("Callback required as last argument");
|
|
1463
1465
|
if (s) {
|
|
1464
1466
|
if (l < 2)
|
|
@@ -1467,31 +1469,31 @@ function Te(t, e, i, r, o) {
|
|
|
1467
1469
|
} else {
|
|
1468
1470
|
if (l < 1)
|
|
1469
1471
|
throw new Error("Too few arguments provided");
|
|
1470
|
-
return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(a,
|
|
1472
|
+
return l === 1 ? (i = e, e = r = void 0) : l === 2 && !e.getContext && (r = i, i = e, e = void 0), new Promise(function(a, f) {
|
|
1471
1473
|
try {
|
|
1472
|
-
const
|
|
1473
|
-
a(t(
|
|
1474
|
-
} catch (
|
|
1475
|
-
m
|
|
1474
|
+
const m = Se.create(i, r);
|
|
1475
|
+
a(t(m, e, r));
|
|
1476
|
+
} catch (m) {
|
|
1477
|
+
f(m);
|
|
1476
1478
|
}
|
|
1477
1479
|
});
|
|
1478
1480
|
}
|
|
1479
1481
|
try {
|
|
1480
|
-
const a =
|
|
1482
|
+
const a = Se.create(i, r);
|
|
1481
1483
|
o(null, t(a, e, r));
|
|
1482
1484
|
} catch (a) {
|
|
1483
1485
|
o(a);
|
|
1484
1486
|
}
|
|
1485
1487
|
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
return
|
|
1488
|
+
ne.create = Se.create;
|
|
1489
|
+
ne.toCanvas = Ue.bind(null, pt.render);
|
|
1490
|
+
ne.toDataURL = Ue.bind(null, pt.renderToDataURL);
|
|
1491
|
+
ne.toString = Ue.bind(null, function(t, e, i) {
|
|
1492
|
+
return vn.render(t, i);
|
|
1491
1493
|
});
|
|
1492
|
-
async function
|
|
1494
|
+
async function Cn(t, e = 350) {
|
|
1493
1495
|
try {
|
|
1494
|
-
return await
|
|
1496
|
+
return await ne.toDataURL(t, {
|
|
1495
1497
|
width: e,
|
|
1496
1498
|
margin: 0
|
|
1497
1499
|
});
|
|
@@ -1499,63 +1501,63 @@ async function mn(t, e = 350) {
|
|
|
1499
1501
|
console.error(i);
|
|
1500
1502
|
}
|
|
1501
1503
|
}
|
|
1502
|
-
var
|
|
1503
|
-
const
|
|
1504
|
+
var En = { 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" };
|
|
1505
|
+
const An = { class: "flex items-start" }, Bn = { class: "flex flex-col gap-16 mt-16" }, _n = ["src"], Mn = /* @__PURE__ */ qe({
|
|
1504
1506
|
__name: "LinkDeviceDialog",
|
|
1505
1507
|
setup(t) {
|
|
1506
|
-
const e =
|
|
1507
|
-
var
|
|
1508
|
-
return `https://${(
|
|
1508
|
+
const e = Ae(), i = We(), r = Xe(), o = z(), n = z(), l = En.crmUrl, s = z(), a = ce(() => i.membership), f = ce(() => {
|
|
1509
|
+
var g, d;
|
|
1510
|
+
return `https://${(g = a.value) != null && g.url ? a.value.url : (d = a.value) == null ? void 0 : d.business}.${l}`;
|
|
1509
1511
|
});
|
|
1510
|
-
async function g
|
|
1511
|
-
const d = await
|
|
1512
|
-
return `${
|
|
1512
|
+
async function m(g) {
|
|
1513
|
+
const d = await Ze.getOtp(g);
|
|
1514
|
+
return `${f.value}?link-device=${d.otp}`;
|
|
1513
1515
|
}
|
|
1514
|
-
async function B(
|
|
1515
|
-
const d = await g
|
|
1516
|
-
s.value = d, o.value = await
|
|
1516
|
+
async function B(g) {
|
|
1517
|
+
const d = await m(g);
|
|
1518
|
+
s.value = d, o.value = await Cn(d);
|
|
1517
1519
|
}
|
|
1518
|
-
return
|
|
1520
|
+
return Ge(async () => {
|
|
1519
1521
|
if (await e.readLocations(), !e.locations.length) {
|
|
1520
1522
|
r.close();
|
|
1521
1523
|
return;
|
|
1522
1524
|
}
|
|
1523
|
-
const
|
|
1524
|
-
n.value =
|
|
1525
|
-
}), (
|
|
1526
|
-
const
|
|
1527
|
-
return x(),
|
|
1525
|
+
const g = e.locations[0]._id;
|
|
1526
|
+
n.value = g, await B(g);
|
|
1527
|
+
}), (g, d) => {
|
|
1528
|
+
const v = D("FmIcon"), C = D("FmSelect"), M = D("FmButton"), p = D("FmCard");
|
|
1529
|
+
return x(), ue(p, { class: "p-24 max-w-[350px]" }, {
|
|
1528
1530
|
default: W(() => [
|
|
1529
|
-
b("div",
|
|
1531
|
+
b("div", An, [
|
|
1530
1532
|
d[3] || (d[3] = b("div", null, [
|
|
1531
1533
|
b("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1532
1534
|
b("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1533
1535
|
], -1)),
|
|
1534
|
-
|
|
1536
|
+
I(v, {
|
|
1535
1537
|
name: "close",
|
|
1536
|
-
onClick: d[0] || (d[0] = (
|
|
1538
|
+
onClick: d[0] || (d[0] = (h) => u(r).close()),
|
|
1537
1539
|
class: "cursor-pointer"
|
|
1538
1540
|
})
|
|
1539
1541
|
]),
|
|
1540
|
-
b("div",
|
|
1541
|
-
|
|
1542
|
-
modelValue:
|
|
1542
|
+
b("div", Bn, [
|
|
1543
|
+
I(C, {
|
|
1544
|
+
modelValue: u(n),
|
|
1543
1545
|
"onUpdate:modelValue": [
|
|
1544
|
-
d[1] || (d[1] = (
|
|
1546
|
+
d[1] || (d[1] = (h) => Qe(n) ? n.value = h : null),
|
|
1545
1547
|
B
|
|
1546
1548
|
],
|
|
1547
1549
|
label: "Select Location",
|
|
1548
|
-
items:
|
|
1550
|
+
items: u(e).locationItems.filter((h) => !!h.value)
|
|
1549
1551
|
}, null, 8, ["modelValue", "items"]),
|
|
1550
1552
|
b("img", {
|
|
1551
|
-
src:
|
|
1553
|
+
src: u(o),
|
|
1552
1554
|
class: "aspect-square w-full"
|
|
1553
|
-
}, null, 8,
|
|
1554
|
-
|
|
1555
|
+
}, null, 8, _n),
|
|
1556
|
+
I(M, {
|
|
1555
1557
|
class: "mx-auto",
|
|
1556
1558
|
variant: "plain",
|
|
1557
1559
|
icon: "content_copy",
|
|
1558
|
-
onClick: d[2] || (d[2] = (
|
|
1560
|
+
onClick: d[2] || (d[2] = (h) => u(et)(u(s)))
|
|
1559
1561
|
})
|
|
1560
1562
|
])
|
|
1561
1563
|
]),
|
|
@@ -1564,38 +1566,38 @@ const hn = { class: "flex items-start" }, pn = { class: "flex flex-col gap-16 mt
|
|
|
1564
1566
|
};
|
|
1565
1567
|
}
|
|
1566
1568
|
});
|
|
1567
|
-
var
|
|
1568
|
-
const
|
|
1569
|
+
var Je = { 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" };
|
|
1570
|
+
const Sn = { class: "hidden xs:flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, In = { class: "fm-typo-en-title-md-800" }, Pn = {
|
|
1569
1571
|
key: 0,
|
|
1570
1572
|
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
1571
|
-
},
|
|
1573
|
+
}, Tn = { class: "col-span-2 flex flex-col xs:col-span-3" }, Nn = { class: "fm-typo-en-title-sm-800" }, Un = { class: "space-y-24" }, Ln = { class: "space-y-8" }, Fn = { class: "fm-typo-en-title-sm-800" }, Rn = { class: "fm-typo-body-lg-400" }, Dn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, kn = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, Vn = { class: "space-y-8" }, xn = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, $n = { class: "space-y-8" }, zn = { class: "space-y-8" }, Hn = { class: "space-y-8" }, 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: "flex justify-end pb-24" }, Jn = { class: "col-span-1 space-y-8 xs:hidden" }, qn = { class: "fm-typo-en-body-lg-600" }, Gn = { class: "fm-typo-en-body-lg-600" }, Qn = { class: "fm-typo-en-body-lg-600" }, Xn = { class: "fm-typo-en-body-lg-600" }, yo = /* @__PURE__ */ qe({
|
|
1572
1574
|
__name: "Setting",
|
|
1573
1575
|
setup(t) {
|
|
1574
|
-
const e =
|
|
1575
|
-
(
|
|
1576
|
-
(
|
|
1577
|
-
],
|
|
1578
|
-
var
|
|
1579
|
-
return `https://${(
|
|
1580
|
-
}),
|
|
1581
|
-
var
|
|
1582
|
-
return Math.min((((
|
|
1583
|
-
}), { t:
|
|
1584
|
-
async function
|
|
1576
|
+
const e = Ct(), i = Ae(), r = We(), { global: o, minor: n } = vt, l = Xe(), s = z(), a = z(!1), f = z([]), m = z(null), B = At, g = [
|
|
1577
|
+
(A) => !A || A.length >= 6 || "Invalid URL format, please enter at least 6 characters",
|
|
1578
|
+
(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"
|
|
1579
|
+
], d = Je.appUrl, v = ce(() => {
|
|
1580
|
+
var A;
|
|
1581
|
+
return `https://${(A = s.value) == null ? void 0 : A.business}.${d}`;
|
|
1582
|
+
}), C = z(), M = z([]), p = ce(() => {
|
|
1583
|
+
var A, c;
|
|
1584
|
+
return Math.min((((c = (A = s.value) == null ? void 0 : A.advertisements) == null ? void 0 : c.length) ?? 0) + 1, 5);
|
|
1585
|
+
}), { t: h } = St();
|
|
1586
|
+
async function w() {
|
|
1585
1587
|
l.open({
|
|
1586
1588
|
title: "",
|
|
1587
|
-
dialogComponent:
|
|
1589
|
+
dialogComponent: Mn,
|
|
1588
1590
|
closeButton: !1
|
|
1589
1591
|
});
|
|
1590
1592
|
}
|
|
1591
|
-
async function
|
|
1592
|
-
await
|
|
1593
|
+
async function y(A) {
|
|
1594
|
+
await Et.remove(
|
|
1593
1595
|
"Are you sure you want to unlink this device?",
|
|
1594
1596
|
"Unlink device",
|
|
1595
1597
|
"Unlink"
|
|
1596
1598
|
) && await n(
|
|
1597
1599
|
async () => {
|
|
1598
|
-
await
|
|
1600
|
+
await Ze.unregisterDevice(A), await i.readLocationDevices();
|
|
1599
1601
|
},
|
|
1600
1602
|
{
|
|
1601
1603
|
message: "Unlinking device",
|
|
@@ -1603,26 +1605,26 @@ const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1603
1605
|
}
|
|
1604
1606
|
);
|
|
1605
1607
|
}
|
|
1606
|
-
async function
|
|
1608
|
+
async function _() {
|
|
1607
1609
|
await n(
|
|
1608
1610
|
async () => {
|
|
1609
|
-
var
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
const
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
)), a.value ?
|
|
1617
|
-
new Array(
|
|
1618
|
-
var
|
|
1619
|
-
const N =
|
|
1620
|
-
return N ? await
|
|
1621
|
-
|
|
1611
|
+
var U;
|
|
1612
|
+
const A = Tt(s.value);
|
|
1613
|
+
A.welcomeMessage && !((U = A.welcomeMessage) != null && U.content) && (A.welcomeMessage.content = "Hi there, you have been invited to join our membership");
|
|
1614
|
+
const c = Bt.parse(A);
|
|
1615
|
+
C.value === null && c.image ? await j.delete(j.coverImagePath()) : C.value && (c.image = await j.update(
|
|
1616
|
+
j.coverImagePath(),
|
|
1617
|
+
C.value
|
|
1618
|
+
)), a.value ? c.advertisements = (await Promise.all(
|
|
1619
|
+
new Array(p.value - 1).fill(null).map(async (L, R) => {
|
|
1620
|
+
var X;
|
|
1621
|
+
const N = M.value[R];
|
|
1622
|
+
return N ? await j.update(
|
|
1623
|
+
j.advertisementPath(R, N),
|
|
1622
1624
|
N
|
|
1623
|
-
) : (
|
|
1625
|
+
) : (X = c.advertisements) == null ? void 0 : X[R];
|
|
1624
1626
|
})
|
|
1625
|
-
)).filter((
|
|
1627
|
+
)).filter((L) => L) : c.advertisements = [], await Ke.update(c), await r.readMembership(), s.value = r.membership;
|
|
1626
1628
|
},
|
|
1627
1629
|
{
|
|
1628
1630
|
message: "Updating membership",
|
|
@@ -1630,147 +1632,157 @@ const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1630
1632
|
}
|
|
1631
1633
|
);
|
|
1632
1634
|
}
|
|
1633
|
-
|
|
1635
|
+
async function S() {
|
|
1636
|
+
const A = await Ke.getEmailAddresses();
|
|
1637
|
+
console.log(A), f.value = A, m.value = A.find((c) => c.default.includes("Marketing"));
|
|
1638
|
+
}
|
|
1639
|
+
async function P() {
|
|
1640
|
+
window.open(
|
|
1641
|
+
`${Je.licensePortalUrl}business/${It.businessId}/settings`,
|
|
1642
|
+
"_blank"
|
|
1643
|
+
);
|
|
1644
|
+
}
|
|
1645
|
+
return Ge(async () => {
|
|
1634
1646
|
await o(async () => {
|
|
1635
|
-
var
|
|
1636
|
-
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), s.value = r.membership, a.value = (((
|
|
1647
|
+
var A, c;
|
|
1648
|
+
await i.readPremium(), await i.readLocations(), await i.readLocationDevices(), await r.readMembership(), await S(), s.value = r.membership, a.value = (((A = s.value.advertisements) == null ? void 0 : A.length) ?? 0) > 0, M.value = ((c = s.value.advertisements) == null ? void 0 : c.map(() => null)) ?? [];
|
|
1637
1649
|
});
|
|
1638
|
-
}), (
|
|
1639
|
-
var
|
|
1640
|
-
const
|
|
1641
|
-
return x(),
|
|
1642
|
-
|
|
1643
|
-
title:
|
|
1650
|
+
}), (A, c) => {
|
|
1651
|
+
var Le, Fe, Re, De, ke, Ve, xe;
|
|
1652
|
+
const U = D("FmPageHead"), L = D("FmButton"), R = D("FmTextField"), N = D("FmCard"), X = D("FmPill"), ye = D("FmSwitch"), yt = D("FmSelect"), wt = D("FmMenuDivider");
|
|
1653
|
+
return x(), Y(ie, null, [
|
|
1654
|
+
I(U, {
|
|
1655
|
+
title: u(h)("connect.setting.title"),
|
|
1644
1656
|
class: "xs:hidden"
|
|
1645
1657
|
}, null, 8, ["title"]),
|
|
1646
|
-
b("div",
|
|
1647
|
-
b("div",
|
|
1648
|
-
|
|
1658
|
+
b("div", Sn, [
|
|
1659
|
+
b("div", In, V(u(h)("connect.setting.basicInfo.title")), 1),
|
|
1660
|
+
I(L, {
|
|
1649
1661
|
icon: "info",
|
|
1650
1662
|
variant: "tertiary"
|
|
1651
1663
|
})
|
|
1652
1664
|
]),
|
|
1653
|
-
|
|
1654
|
-
b("div",
|
|
1655
|
-
b("div",
|
|
1656
|
-
b("div",
|
|
1657
|
-
|
|
1658
|
-
label:
|
|
1659
|
-
modelValue:
|
|
1660
|
-
"onUpdate:modelValue":
|
|
1665
|
+
u(s) ? (x(), Y("div", Pn, [
|
|
1666
|
+
b("div", Tn, [
|
|
1667
|
+
b("div", Nn, V(u(h)("connect.setting.basicInfo.title")), 1),
|
|
1668
|
+
b("div", Un, [
|
|
1669
|
+
I(R, {
|
|
1670
|
+
label: u(h)("connect.setting.basicInfo.membershipTitle"),
|
|
1671
|
+
modelValue: u(s).name,
|
|
1672
|
+
"onUpdate:modelValue": c[0] || (c[0] = (E) => u(s).name = E)
|
|
1661
1673
|
}, null, 8, ["label", "modelValue"]),
|
|
1662
|
-
|
|
1674
|
+
I(R, {
|
|
1663
1675
|
disabled: !0,
|
|
1664
|
-
"model-value":
|
|
1676
|
+
"model-value": u(s).business,
|
|
1665
1677
|
rules: g,
|
|
1666
1678
|
required: !0,
|
|
1667
|
-
label:
|
|
1668
|
-
"helper-text":
|
|
1669
|
-
placeholder:
|
|
1670
|
-
"onUpdate:modelValue":
|
|
1679
|
+
label: u(h)("connect.setting.basicInfo.memberAppUrl"),
|
|
1680
|
+
"helper-text": u(v),
|
|
1681
|
+
placeholder: u(s).business.toString(),
|
|
1682
|
+
"onUpdate:modelValue": c[2] || (c[2] = (E) => u(s).url = E)
|
|
1671
1683
|
}, {
|
|
1672
|
-
prepend: W(() =>
|
|
1673
|
-
|
|
1684
|
+
prepend: W(() => c[12] || (c[12] = [
|
|
1685
|
+
Z(" https:// ")
|
|
1674
1686
|
])),
|
|
1675
1687
|
append: W(() => [
|
|
1676
|
-
|
|
1677
|
-
|
|
1688
|
+
Z(" ." + V(u(d)) + " ", 1),
|
|
1689
|
+
I(L, {
|
|
1678
1690
|
icon: "content_copy",
|
|
1679
1691
|
variant: "tertiary",
|
|
1680
|
-
onClick:
|
|
1692
|
+
onClick: c[1] || (c[1] = (E) => u(et)(u(v)))
|
|
1681
1693
|
})
|
|
1682
1694
|
]),
|
|
1683
1695
|
_: 1
|
|
1684
1696
|
}, 8, ["model-value", "label", "helper-text", "placeholder"]),
|
|
1685
|
-
|
|
1697
|
+
I(He, {
|
|
1686
1698
|
label: "Cover image",
|
|
1687
1699
|
class: "w-2/3 xs:w-full",
|
|
1688
1700
|
"image-fit": "cover",
|
|
1689
1701
|
"aspect-ratio": "3/1",
|
|
1690
|
-
thumbnail:
|
|
1691
|
-
"onUpdate:file":
|
|
1692
|
-
|
|
1702
|
+
thumbnail: u(s).image || void 0,
|
|
1703
|
+
"onUpdate:file": c[3] || (c[3] = async (E) => {
|
|
1704
|
+
C.value = E, E || (u(s).image = null);
|
|
1693
1705
|
})
|
|
1694
1706
|
}, null, 8, ["thumbnail"]),
|
|
1695
|
-
b("div",
|
|
1696
|
-
b("div",
|
|
1697
|
-
|
|
1707
|
+
b("div", Ln, [
|
|
1708
|
+
b("div", Fn, V(u(h)("connect.setting.counterApp.title")), 1),
|
|
1709
|
+
I(L, {
|
|
1698
1710
|
variant: "plain",
|
|
1699
1711
|
icon: "link",
|
|
1700
|
-
label:
|
|
1701
|
-
onClick:
|
|
1712
|
+
label: u(h)("connect.setting.counterApp.linkDevice"),
|
|
1713
|
+
onClick: w
|
|
1702
1714
|
}, null, 8, ["label"]),
|
|
1703
|
-
(x(!0),
|
|
1715
|
+
(x(!0), Y(ie, null, $e(u(i).locationDevices, (E, T) => (x(), ue(N, {
|
|
1704
1716
|
key: T,
|
|
1705
1717
|
variant: "outlined",
|
|
1706
1718
|
class: "flex items-center justify-between px-16 py-12"
|
|
1707
1719
|
}, {
|
|
1708
1720
|
default: W(() => [
|
|
1709
1721
|
b("div", null, [
|
|
1710
|
-
b("p",
|
|
1711
|
-
b("p",
|
|
1722
|
+
b("p", Rn, V(E.name || `Device ${E._id}`), 1),
|
|
1723
|
+
b("p", Dn, " Activation date: " + V(u(bt)(u(Pt)(E._id.toString())).format(
|
|
1712
1724
|
"D MMM YYYY"
|
|
1713
1725
|
)), 1),
|
|
1714
|
-
b("p",
|
|
1726
|
+
b("p", kn, " Linked location: " + V(u(i).locations.find((k) => k._id == E.location).name), 1)
|
|
1715
1727
|
]),
|
|
1716
|
-
|
|
1728
|
+
I(L, {
|
|
1717
1729
|
icon: "link_off",
|
|
1718
1730
|
variant: "tertiary",
|
|
1719
|
-
onClick: (
|
|
1731
|
+
onClick: (k) => y(E._id)
|
|
1720
1732
|
}, null, 8, ["onClick"])
|
|
1721
1733
|
]),
|
|
1722
1734
|
_: 2
|
|
1723
1735
|
}, 1024))), 128))
|
|
1724
1736
|
]),
|
|
1725
|
-
b("div",
|
|
1726
|
-
b("div",
|
|
1727
|
-
|
|
1728
|
-
|
|
1737
|
+
b("div", Vn, [
|
|
1738
|
+
b("div", xn, [
|
|
1739
|
+
c[13] || (c[13] = Z(" Advertisement ")),
|
|
1740
|
+
I(X, { variant: "premium" })
|
|
1729
1741
|
]),
|
|
1730
|
-
|
|
1731
|
-
modelValue:
|
|
1732
|
-
"onUpdate:modelValue":
|
|
1742
|
+
I(ye, {
|
|
1743
|
+
modelValue: u(a),
|
|
1744
|
+
"onUpdate:modelValue": c[4] || (c[4] = (E) => Qe(a) ? a.value = E : null),
|
|
1733
1745
|
label: "Advertisement",
|
|
1734
1746
|
sublabel: "This will be show on FeedMe ordering app",
|
|
1735
1747
|
"label-placement": "right",
|
|
1736
|
-
disabled: !
|
|
1748
|
+
disabled: !u(i).isPremium,
|
|
1737
1749
|
value: ""
|
|
1738
1750
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1739
|
-
|
|
1751
|
+
u(a) ? (x(), Y("div", {
|
|
1740
1752
|
class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
|
|
1741
|
-
key:
|
|
1753
|
+
key: u(p)
|
|
1742
1754
|
}, [
|
|
1743
|
-
(x(!0),
|
|
1744
|
-
var
|
|
1745
|
-
return x(),
|
|
1755
|
+
(x(!0), Y(ie, null, $e(u(p), (E, T) => {
|
|
1756
|
+
var k, O;
|
|
1757
|
+
return x(), ue(He, {
|
|
1746
1758
|
class: "w-[200px]",
|
|
1747
1759
|
"image-fit": "cover",
|
|
1748
1760
|
label: "",
|
|
1749
1761
|
"aspect-ratio": "2/3",
|
|
1750
|
-
thumbnail: (
|
|
1762
|
+
thumbnail: (O = (k = u(s)) == null ? void 0 : k.advertisements) == null ? void 0 : O[T],
|
|
1751
1763
|
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
1752
1764
|
"recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
|
|
1753
|
-
file:
|
|
1754
|
-
"onUpdate:file": (
|
|
1755
|
-
|
|
1765
|
+
file: u(M)[T] ?? void 0,
|
|
1766
|
+
"onUpdate:file": (re) => {
|
|
1767
|
+
u(s).advertisements || (u(s).advertisements = []), re ? (u(s).advertisements[T] = "", u(M)[T] = re) : (u(s).advertisements.splice(T, 1), u(M).splice(T, 1));
|
|
1756
1768
|
}
|
|
1757
1769
|
}, null, 8, ["thumbnail", "file", "onUpdate:file"]);
|
|
1758
1770
|
}), 256))
|
|
1759
|
-
])) :
|
|
1771
|
+
])) : se("", !0)
|
|
1760
1772
|
]),
|
|
1761
|
-
b("div",
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
"model-value": ((
|
|
1773
|
+
b("div", $n, [
|
|
1774
|
+
c[14] || (c[14] = b("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
|
|
1775
|
+
I(R, {
|
|
1776
|
+
"model-value": ((Le = u(s)) == null ? void 0 : Le.brand) || "",
|
|
1765
1777
|
"max-length": 15,
|
|
1766
1778
|
label: "Brand Name",
|
|
1767
1779
|
"show-word-count": "",
|
|
1768
|
-
"helper-text": `RM 0 ${((
|
|
1769
|
-
"onUpdate:modelValue":
|
|
1780
|
+
"helper-text": `RM 0 ${((Fe = u(s)) == null ? void 0 : Fe.brand) || ""}: YOUR CUSTOMER MESSAGE`,
|
|
1781
|
+
"onUpdate:modelValue": c[5] || (c[5] = (E) => u(s).brand = E)
|
|
1770
1782
|
}, null, 8, ["model-value", "helper-text"]),
|
|
1771
|
-
|
|
1772
|
-
modelValue:
|
|
1773
|
-
"onUpdate:modelValue":
|
|
1783
|
+
I(Mt, {
|
|
1784
|
+
modelValue: u(s).welcomeMessage,
|
|
1785
|
+
"onUpdate:modelValue": c[6] || (c[6] = (E) => u(s).welcomeMessage = E),
|
|
1774
1786
|
variables: [
|
|
1775
1787
|
"user.name",
|
|
1776
1788
|
"user.gender",
|
|
@@ -1781,109 +1793,121 @@ const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1781
1793
|
placeholder: "Hi there, you have been invited to join membership"
|
|
1782
1794
|
}, null, 8, ["modelValue"])
|
|
1783
1795
|
]),
|
|
1784
|
-
b("div",
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
(
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
}),
|
|
1810
|
-
|
|
1811
|
-
|
|
1796
|
+
b("div", zn, [
|
|
1797
|
+
c[15] || (c[15] = b("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
|
|
1798
|
+
c[16] || (c[16] = b("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Email address that will be used to send email broadcast ", -1)),
|
|
1799
|
+
u(f).length ? se("", !0) : (x(), ue(L, {
|
|
1800
|
+
key: 0,
|
|
1801
|
+
onClick: P,
|
|
1802
|
+
label: "Add new email address"
|
|
1803
|
+
})),
|
|
1804
|
+
u(f).length ? (x(), Y(ie, { key: 1 }, [
|
|
1805
|
+
I(yt, {
|
|
1806
|
+
"model-value": ((De = (Re = u(s)) == null ? void 0 : Re.email) == null ? void 0 : De.from) || null,
|
|
1807
|
+
label: "From Address",
|
|
1808
|
+
items: u(f).map((E) => ({
|
|
1809
|
+
label: E.emailAddress,
|
|
1810
|
+
value: E.emailAddress
|
|
1811
|
+
})),
|
|
1812
|
+
placeholder: u(m) ? u(m).emailAddress : "No email address available",
|
|
1813
|
+
"onUpdate:modelValue": c[7] || (c[7] = (E) => {
|
|
1814
|
+
var T, k;
|
|
1815
|
+
(T = u(s)) != null && T.email || (u(s).email = {
|
|
1816
|
+
from: E,
|
|
1817
|
+
name: (k = u(f).find((O) => O.emailAddress == E)) == null ? void 0 : k.name
|
|
1818
|
+
}), u(s).email.from = E || null;
|
|
1819
|
+
}),
|
|
1820
|
+
rules: [u(ze).ruleAtPath(u(B), "email.from")]
|
|
1821
|
+
}, null, 8, ["model-value", "items", "placeholder", "rules"]),
|
|
1822
|
+
I(R, {
|
|
1823
|
+
"model-value": ((Ve = (ke = u(s)) == null ? void 0 : ke.email) == null ? void 0 : Ve.name) || null,
|
|
1824
|
+
label: "Sender name",
|
|
1825
|
+
disabled: "",
|
|
1826
|
+
placeholder: ((xe = u(m)) == null ? void 0 : xe.name) || null,
|
|
1827
|
+
"onUpdate:modelValue": c[8] || (c[8] = (E) => {
|
|
1828
|
+
var T;
|
|
1829
|
+
(T = u(s)) != null && T.email || (u(s).email = {
|
|
1830
|
+
name: E
|
|
1831
|
+
}), u(s).email.name = E || null;
|
|
1832
|
+
}),
|
|
1833
|
+
rules: [u(ze).ruleAtPath(u(B), "email.name")]
|
|
1834
|
+
}, null, 8, ["model-value", "placeholder", "rules"])
|
|
1835
|
+
], 64)) : se("", !0)
|
|
1812
1836
|
]),
|
|
1813
|
-
b("div",
|
|
1814
|
-
|
|
1815
|
-
|
|
1837
|
+
b("div", Hn, [
|
|
1838
|
+
c[17] || (c[17] = b("div", { class: "fm-typo-en-title-sm-800" }, [
|
|
1839
|
+
Z(" Free Credit as Discount "),
|
|
1816
1840
|
b("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1817
1841
|
], -1)),
|
|
1818
|
-
|
|
1819
|
-
"model-value":
|
|
1820
|
-
"onUpdate:modelValue":
|
|
1842
|
+
I(ye, {
|
|
1843
|
+
"model-value": u(s).freeCreditAsDiscount ?? !1,
|
|
1844
|
+
"onUpdate:modelValue": c[9] || (c[9] = (E) => u(s).freeCreditAsDiscount = E),
|
|
1821
1845
|
label: "Free Credit as Discount",
|
|
1822
1846
|
sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
|
|
1823
1847
|
"label-placement": "right",
|
|
1824
1848
|
value: ""
|
|
1825
1849
|
}, null, 8, ["model-value"])
|
|
1826
1850
|
]),
|
|
1827
|
-
b("div",
|
|
1828
|
-
b("div",
|
|
1829
|
-
|
|
1830
|
-
|
|
1851
|
+
b("div", Kn, [
|
|
1852
|
+
b("div", On, [
|
|
1853
|
+
c[18] || (c[18] = Z(" Member Card ")),
|
|
1854
|
+
I(X, { variant: "premium" })
|
|
1831
1855
|
]),
|
|
1832
|
-
|
|
1833
|
-
"model-value":
|
|
1834
|
-
"onUpdate:modelValue":
|
|
1856
|
+
I(ye, {
|
|
1857
|
+
"model-value": u(s).cardEnable ?? !1,
|
|
1858
|
+
"onUpdate:modelValue": c[10] || (c[10] = (E) => u(s).cardEnable = E),
|
|
1835
1859
|
label: "",
|
|
1836
1860
|
sublabel: "Allow member to bind card via member app",
|
|
1837
1861
|
"label-placement": "right",
|
|
1838
1862
|
value: "",
|
|
1839
|
-
disabled: !
|
|
1863
|
+
disabled: !u(i).isPremium
|
|
1840
1864
|
}, null, 8, ["model-value", "disabled"])
|
|
1841
1865
|
]),
|
|
1842
|
-
b("div",
|
|
1843
|
-
|
|
1844
|
-
|
|
1866
|
+
b("div", Yn, [
|
|
1867
|
+
c[19] || (c[19] = b("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
|
|
1868
|
+
I(_t, {
|
|
1845
1869
|
label: "Select restaurant",
|
|
1846
|
-
"model-value":
|
|
1847
|
-
"onUpdate:modelValue":
|
|
1870
|
+
"model-value": u(s).targetLocation ?? null,
|
|
1871
|
+
"onUpdate:modelValue": c[11] || (c[11] = (E) => u(s).targetLocation = E)
|
|
1848
1872
|
}, null, 8, ["model-value"])
|
|
1849
1873
|
]),
|
|
1850
|
-
b("div",
|
|
1851
|
-
|
|
1874
|
+
b("div", jn, [
|
|
1875
|
+
I(L, {
|
|
1852
1876
|
label: "Update",
|
|
1853
1877
|
type: "button",
|
|
1854
|
-
onClick:
|
|
1855
|
-
disabled: !!
|
|
1856
|
-
loading: !!
|
|
1878
|
+
onClick: _,
|
|
1879
|
+
disabled: !!u(e).loadingQueue.length,
|
|
1880
|
+
loading: !!u(e).loadingQueue.length
|
|
1857
1881
|
}, null, 8, ["disabled", "loading"])
|
|
1858
1882
|
])
|
|
1859
1883
|
])
|
|
1860
1884
|
]),
|
|
1861
|
-
b("div",
|
|
1862
|
-
|
|
1885
|
+
b("div", Jn, [
|
|
1886
|
+
I(N, {
|
|
1863
1887
|
variant: "outlined",
|
|
1864
1888
|
class: "flex flex-col p-24 gap-8"
|
|
1865
1889
|
}, {
|
|
1866
1890
|
default: W(() => {
|
|
1867
|
-
var E, T,
|
|
1891
|
+
var E, T, k;
|
|
1868
1892
|
return [
|
|
1869
|
-
|
|
1870
|
-
|
|
1893
|
+
c[24] || (c[24] = b("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
|
|
1894
|
+
I(wt, { class: "my-4" }),
|
|
1871
1895
|
b("div", null, [
|
|
1872
|
-
|
|
1873
|
-
b("div",
|
|
1896
|
+
c[20] || (c[20] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1)),
|
|
1897
|
+
b("div", qn, V(u(s).name), 1)
|
|
1874
1898
|
]),
|
|
1875
1899
|
b("div", null, [
|
|
1876
|
-
|
|
1877
|
-
b("div",
|
|
1900
|
+
c[21] || (c[21] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1)),
|
|
1901
|
+
b("div", Gn, V((((E = u(s).advertisements) == null ? void 0 : E.length) ?? 0) || "No advertisments"), 1)
|
|
1878
1902
|
]),
|
|
1879
1903
|
b("div", null, [
|
|
1880
|
-
|
|
1881
|
-
b("div",
|
|
1904
|
+
c[22] || (c[22] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1)),
|
|
1905
|
+
b("div", Qn, V(u(s).freeCreditAsDiscount ? "Enabled" : "Disabled"), 1)
|
|
1882
1906
|
]),
|
|
1883
1907
|
b("div", null, [
|
|
1884
|
-
|
|
1885
|
-
b("div",
|
|
1886
|
-
(
|
|
1908
|
+
c[23] || (c[23] = b("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1)),
|
|
1909
|
+
b("div", Xn, V(!u(s).targetLocation || u(s).targetLocation.length == u(Ae)().locations.length ? "All locations" : (k = (T = u(s)) == null ? void 0 : T.targetLocation) == null ? void 0 : k.map(
|
|
1910
|
+
(O) => u(i).locations.find((re) => re._id == O).name
|
|
1887
1911
|
).join(", ")), 1)
|
|
1888
1912
|
])
|
|
1889
1913
|
];
|
|
@@ -1891,11 +1915,11 @@ const vn = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1891
1915
|
_: 1
|
|
1892
1916
|
})
|
|
1893
1917
|
])
|
|
1894
|
-
])) :
|
|
1918
|
+
])) : se("", !0)
|
|
1895
1919
|
], 64);
|
|
1896
1920
|
};
|
|
1897
1921
|
}
|
|
1898
1922
|
});
|
|
1899
1923
|
export {
|
|
1900
|
-
|
|
1924
|
+
yo as default
|
|
1901
1925
|
};
|