@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.2
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-BjSfI2Ff.js +761 -0
- package/dist/{App-Bpo0XZSs.js → App-D11A2JY1.js} +364 -352
- package/dist/AuditLogs-DWCFYoRg.js +1887 -0
- package/dist/{Bin-ohZ2CZZR.js → Bin-9wV4Ah3M.js} +8 -8
- package/dist/{Broadcast-D5x0_-zC.js → Broadcast-I3BtSk8V.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js} +18 -18
- package/dist/{Card-BM-Lrm5y.js → Card-CqALG5RM.js} +159 -159
- package/dist/{Collections-Cr4aoJer.js → Collections-rg3SzoUb.js} +103 -91
- package/dist/{Credit-DzDVFv4H.js → Credit-BNn1sYZv.js} +74 -74
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js} +491 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js} +91 -89
- package/dist/{Experience-CjaDdbvZ.js → Experience-D_Qm8SUj.js} +41 -41
- package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
- package/dist/{Game-BuiTygow.js → Game-CKXgXm6Q.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{Index-CQGzUU-w.js → Index-D4DGfUHd.js} +10 -10
- package/dist/Marketing-Dn9A1vgH.js +20073 -0
- package/dist/Member-B55vWHDd.js +279 -0
- package/dist/MemberList-BWTG9Ohy.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-CP5EI-W0.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +60279 -0
- package/dist/{Mission-BtypT2uF.js → Mission-CFvhROuB.js} +21 -21
- package/dist/{Overview-Be7bUtRO.js → Overview-4273yNwL.js} +335 -335
- package/dist/{Point-Bw4lnLqp.js → Point-B_-_C919.js} +41 -41
- package/dist/Promotion-D2S3COxk.js +289 -0
- package/dist/{Queue-CpPEVgn8.js → Queue-BmS1Oi-C.js} +52 -52
- package/dist/{Record-DQq4P69i.js → Record-DRBl0M8g.js} +9 -9
- package/dist/{Reward-DJH0eM8u.js → Reward-8056NmfK.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js} +635 -548
- package/dist/Segment-Bzq-pyhc.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js} +3 -3
- package/dist/{Setting-GRIUo7vg.js → Setting-BrJfYoru.js} +432 -432
- package/dist/{Store-H0UDQpln.js → Store-Bpl_4yZW.js} +211 -211
- package/dist/StoreRewards-Cu7n7Pjz.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js} +1 -1
- package/dist/{Tier-CJufQcIz.js → Tier-_LnXg3n6.js} +106 -106
- package/dist/{Title-BBMgGUld.js → Title-B7AGStvx.js} +133 -131
- package/dist/{Transaction-DsucPnfp.js → Transaction-Chxv6V7u.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js} +6 -6
- package/dist/{Voucher-BPvxKO_w.js → Voucher-C5z2kOq9.js} +153 -123
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js} +1 -1
- package/dist/{app-D3MT1deX.js → app-7cvPyHJ7.js} +164 -125
- package/dist/{app-Bo0JpadQ.js → app-BVojNX0w.js} +1 -1
- package/dist/app.js +4 -3
- package/dist/business-CmxV69wT.js +79 -0
- package/dist/{campaign-Z3l7BoMg.js → campaign-CT_cNJEL.js} +9 -9
- package/dist/{campaign-j1c3ou7l.js → campaign-Dq5C_no-.js} +5 -3
- package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-dp7yHKzF.js} +1 -1
- package/dist/campaign.fn-BYZgKDN7.js +758 -0
- package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-DxbB4DxT.js} +1 -1
- package/dist/{collection.fn-Bz38mGMa.js → collection.fn-CNZRdUgy.js} +2 -2
- package/dist/{dto-D648NN4s.js → dto-CT9zZbv9.js} +4 -4
- package/dist/{effect-DbMAmVSR.js → effect-FIlOEC4H.js} +1 -1
- package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Ba7xImfX.js} +1 -1
- package/dist/{export-cTZf8Avd.js → export-uzjZFNF9.js} +3 -3
- package/dist/{helper-BYyfcLqw.js → helper-D4sAZde0.js} +1 -1
- package/dist/{index-BIaCtk8e.js → index-B9pl4zRZ.js} +192 -79
- package/dist/{index-B4MqsaBz.js → index-BI3m1Ehv.js} +3 -3
- package/dist/{index-E-0tTd0_.js → index-BXz54M1s.js} +1 -1
- package/dist/{index-BMl2KZts.js → index-BjU8LVUC.js} +11447 -10969
- package/dist/index-CH3z92VV.js +31 -0
- package/dist/{index-BTb8I_eB.js → index-CNJLP3D5.js} +1 -1
- package/dist/{index-BrKXRxe_.js → index-CONvJfKv.js} +1 -1
- package/dist/index-CS3Jmojj.js +32260 -0
- package/dist/{index-CTPMbFf5.js → index-CUfS9Kp1.js} +10 -9
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-nF9iYTlh.js → index-CvBcve-r.js} +1 -1
- package/dist/index-CwsMG2cV.js +56 -0
- package/dist/{index-B3p0hmIV.js → index-D5rvMvzx.js} +1 -1
- package/dist/{index-CvoShC5J.js → index-DNxa8Rqx.js} +536 -461
- package/dist/{index-DPBHiqsJ.js → index-l2F5MnLF.js} +1 -1
- package/dist/{index.esm2017-DFYwde30.js → index.esm2017-ATcsD5N4.js} +127 -127
- package/dist/{loading-vUArhX_O.js → loading-BWGQSrCB.js} +1 -1
- package/dist/{membership-BHKv29yt.js → membership-Cc4OZ8-U.js} +3 -3
- package/dist/{money-Bl3_QRkE.js → money-D7p8nfun.js} +1 -1
- package/dist/{number-hh_S9w7k.js → number-CMJjC4qz.js} +1 -1
- package/dist/objectid-D5T27iny.js +145 -0
- package/dist/{plugins-CVes2wzE.js → plugins-eQis66QR.js} +2 -2
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/{reward-ANZOdWzf.js → reward-DrnzbG20.js} +1 -1
- package/dist/{rule-BvFk5bQg.js → rule-CtRxkYXB.js} +3 -3
- package/dist/{rule-builder-BSN777PN.js → rule-builder-Di9RIYHF.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-Dh9lDLs_.js → template-C3UfY0v5.js} +64 -64
- package/dist/{trigger-C7THbt7R.js → trigger-C9U7Zgad.js} +7 -7
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/{user-DtNR9JY2.js → user-D7n9yYmO.js} +1 -1
- package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-Bz45zC04.js} +387 -387
- package/dist/{xlsx-7u9SB0oa.js → xlsx-D4S4qbcZ.js} +226 -226
- package/package.json +9 -3
- package/dist/Analytic-CavR2bzs.js +0 -427
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-BSspYuhg.js +0 -319
- package/dist/Member-B4S0UNGq.js +0 -287
- package/dist/MemberList-CfnUJ3mh.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
- package/dist/Promotion-Bg6x0rAh.js +0 -255
- package/dist/Segment-BLB4VWNJ.js +0 -882
- package/dist/StoreRewards--TNIFaCo.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
- package/dist/business-DMALI7ZO.js +0 -78
- package/dist/campaign.fn-rsRhHYZP.js +0 -758
- package/dist/index-BsCGyJMY.js +0 -29566
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DFKmjCG1.js +0 -44
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/objectid-CEyMlMge.js +0 -145
|
@@ -1,21 +1,21 @@
|
|
|
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
|
|
2
|
-
import { h as
|
|
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
3
|
import { Z as Oe } from "./zod-Bg2FbC-D.js";
|
|
4
4
|
import { useDialog as et } from "@feedmepos/ui-library";
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as nt } from "./membership-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { s as
|
|
11
|
-
import { _ as Ye } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { a as ot, p as
|
|
13
|
-
import { _ as It } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { M as Pt, _ as Tt } from "./MessageInput.vue_vue_type_script_setup_true_lang-
|
|
15
|
-
import { u as Nt } from "./vue-i18n-
|
|
5
|
+
import { u as At } from "./loading-BWGQSrCB.js";
|
|
6
|
+
import { u as Bt } from "./app-wDQR6dpb.js";
|
|
7
|
+
import { u as Se, l as tt } from "./business-CmxV69wT.js";
|
|
8
|
+
import { u as nt } from "./membership-Cc4OZ8-U.js";
|
|
9
|
+
import "./index-CS3Jmojj.js";
|
|
10
|
+
import { s as Mt, k as St } from "./index-DNxa8Rqx.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-eQis66QR.js";
|
|
13
|
+
import { _ as It } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js";
|
|
14
|
+
import { M as Pt, _ as Tt } from "./MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js";
|
|
15
|
+
import { u as Nt } from "./vue-i18n-Bz45zC04.js";
|
|
16
16
|
import { useCoreStore as Ut } from "@feedmepos/mf-common";
|
|
17
|
-
import { m as je } from "./index-
|
|
18
|
-
import { S as Lt } from "./index-
|
|
17
|
+
import { m as je } from "./index-l2F5MnLF.js";
|
|
18
|
+
import { S as Lt } from "./index-BjU8LVUC.js";
|
|
19
19
|
import { o as Ft } from "./objectId-dwaoBfJX.js";
|
|
20
20
|
import { a as Rt } from "./object-qECH92oz.js";
|
|
21
21
|
var ie = {}, kt = function() {
|
|
@@ -170,23 +170,23 @@ var xt = se, st = {};
|
|
|
170
170
|
const e = L.getSymbolSize;
|
|
171
171
|
t.getRowColCoords = function(r) {
|
|
172
172
|
if (r === 1) return [];
|
|
173
|
-
const o = Math.floor(r / 7) + 2, n = e(r),
|
|
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
174
|
for (let s = 1; s < o - 1; s++)
|
|
175
|
-
|
|
176
|
-
return
|
|
175
|
+
a[s] = a[s - 1] - l;
|
|
176
|
+
return a.push(6), a.reverse();
|
|
177
177
|
}, t.getPositions = function(r) {
|
|
178
|
-
const o = [], n = t.getRowColCoords(r),
|
|
179
|
-
for (let
|
|
180
|
-
for (let s = 0; s <
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
184
|
return o;
|
|
185
185
|
};
|
|
186
186
|
})(st);
|
|
187
|
-
var
|
|
187
|
+
var lt = {};
|
|
188
188
|
const $t = L.getSymbolSize, Je = 7;
|
|
189
|
-
|
|
189
|
+
lt.getPositions = function(e) {
|
|
190
190
|
const i = $t(e);
|
|
191
191
|
return [
|
|
192
192
|
// top-left
|
|
@@ -197,7 +197,7 @@ at.getPositions = function(e) {
|
|
|
197
197
|
[0, i - Je]
|
|
198
198
|
];
|
|
199
199
|
};
|
|
200
|
-
var
|
|
200
|
+
var at = {};
|
|
201
201
|
(function(t) {
|
|
202
202
|
t.Patterns = {
|
|
203
203
|
PATTERN000: 0,
|
|
@@ -221,39 +221,39 @@ var lt = {};
|
|
|
221
221
|
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
222
222
|
}, t.getPenaltyN1 = function(o) {
|
|
223
223
|
const n = o.size;
|
|
224
|
-
let
|
|
225
|
-
for (let
|
|
226
|
-
|
|
227
|
-
for (let
|
|
228
|
-
let d = o.get(
|
|
229
|
-
d ===
|
|
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
230
|
}
|
|
231
|
-
|
|
231
|
+
a >= 5 && (l += e.N1 + (a - 5)), s >= 5 && (l += e.N1 + (s - 5));
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return l;
|
|
234
234
|
}, t.getPenaltyN2 = function(o) {
|
|
235
235
|
const n = o.size;
|
|
236
|
-
let
|
|
237
|
-
for (let
|
|
236
|
+
let l = 0;
|
|
237
|
+
for (let a = 0; a < n - 1; a++)
|
|
238
238
|
for (let s = 0; s < n - 1; s++) {
|
|
239
|
-
const
|
|
240
|
-
(
|
|
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
241
|
}
|
|
242
|
-
return
|
|
242
|
+
return l * e.N2;
|
|
243
243
|
}, t.getPenaltyN3 = function(o) {
|
|
244
244
|
const n = o.size;
|
|
245
|
-
let
|
|
246
|
-
for (let
|
|
247
|
-
|
|
248
|
-
for (let
|
|
249
|
-
|
|
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
250
|
}
|
|
251
|
-
return
|
|
251
|
+
return l * e.N3;
|
|
252
252
|
}, t.getPenaltyN4 = function(o) {
|
|
253
253
|
let n = 0;
|
|
254
|
-
const
|
|
255
|
-
for (let s = 0; s <
|
|
256
|
-
return Math.abs(Math.ceil(n * 100 /
|
|
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
257
|
};
|
|
258
258
|
function i(r, o, n) {
|
|
259
259
|
switch (r) {
|
|
@@ -278,21 +278,21 @@ var lt = {};
|
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
t.applyMask = function(o, n) {
|
|
281
|
-
const
|
|
282
|
-
for (let
|
|
283
|
-
for (let s = 0; s <
|
|
284
|
-
n.isReserved(s,
|
|
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
285
|
}, t.getBestMask = function(o, n) {
|
|
286
|
-
const
|
|
287
|
-
let
|
|
288
|
-
for (let
|
|
289
|
-
n(
|
|
290
|
-
const
|
|
291
|
-
t.applyMask(
|
|
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
292
|
}
|
|
293
|
-
return
|
|
293
|
+
return a;
|
|
294
294
|
};
|
|
295
|
-
})(
|
|
295
|
+
})(at);
|
|
296
296
|
var ye = {};
|
|
297
297
|
const O = pe, ue = [
|
|
298
298
|
// L M Q H
|
|
@@ -670,19 +670,19 @@ we.mul = function(e, i) {
|
|
|
670
670
|
const e = we;
|
|
671
671
|
t.mul = function(r, o) {
|
|
672
672
|
const n = new Uint8Array(r.length + o.length - 1);
|
|
673
|
-
for (let
|
|
674
|
-
for (let
|
|
675
|
-
n[
|
|
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
676
|
return n;
|
|
677
677
|
}, t.mod = function(r, o) {
|
|
678
678
|
let n = new Uint8Array(r);
|
|
679
679
|
for (; n.length - o.length >= 0; ) {
|
|
680
|
-
const
|
|
680
|
+
const l = n[0];
|
|
681
681
|
for (let s = 0; s < o.length; s++)
|
|
682
|
-
n[s] ^= e.mul(o[s],
|
|
683
|
-
let
|
|
684
|
-
for (;
|
|
685
|
-
n = n.slice(
|
|
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
686
|
}
|
|
687
687
|
return n;
|
|
688
688
|
}, t.generateECPolynomial = function(r) {
|
|
@@ -756,11 +756,11 @@ $.testAlphanumeric = function(e) {
|
|
|
756
756
|
ccBits: [8, 10, 12]
|
|
757
757
|
}, t.MIXED = {
|
|
758
758
|
bit: -1
|
|
759
|
-
}, t.getCharCountIndicator = function(n,
|
|
759
|
+
}, t.getCharCountIndicator = function(n, l) {
|
|
760
760
|
if (!n.ccBits) throw new Error("Invalid mode: " + n);
|
|
761
|
-
if (!e.isValid(
|
|
762
|
-
throw new Error("Invalid version: " +
|
|
763
|
-
return
|
|
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
764
|
}, t.getBestModeForData = function(n) {
|
|
765
765
|
return i.testNumeric(n) ? t.NUMERIC : i.testAlphanumeric(n) ? t.ALPHANUMERIC : i.testKanji(n) ? t.KANJI : t.BYTE;
|
|
766
766
|
}, t.toString = function(n) {
|
|
@@ -785,36 +785,36 @@ $.testAlphanumeric = function(e) {
|
|
|
785
785
|
throw new Error("Unknown mode: " + o);
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
|
-
t.from = function(n,
|
|
788
|
+
t.from = function(n, l) {
|
|
789
789
|
if (t.isValid(n))
|
|
790
790
|
return n;
|
|
791
791
|
try {
|
|
792
792
|
return r(n);
|
|
793
793
|
} catch {
|
|
794
|
-
return
|
|
794
|
+
return l;
|
|
795
795
|
}
|
|
796
796
|
};
|
|
797
797
|
})(Y);
|
|
798
798
|
(function(t) {
|
|
799
|
-
const e = L, i = ye, r = pe, o = Y, n = Le,
|
|
800
|
-
function s(
|
|
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
801
|
for (let C = 1; C <= 40; C++)
|
|
802
|
-
if (d <= t.getCapacity(C, v,
|
|
802
|
+
if (d <= t.getCapacity(C, v, g))
|
|
803
803
|
return C;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
806
|
-
return o.getCharCountIndicator(
|
|
805
|
+
function f(g, d) {
|
|
806
|
+
return o.getCharCountIndicator(g, d) + 4;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function m(g, d) {
|
|
809
809
|
let v = 0;
|
|
810
|
-
return
|
|
811
|
-
const
|
|
812
|
-
v +=
|
|
810
|
+
return g.forEach(function(C) {
|
|
811
|
+
const S = f(C.mode, d);
|
|
812
|
+
v += S + C.getBitsLength();
|
|
813
813
|
}), v;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
815
|
+
function B(g, d) {
|
|
816
816
|
for (let v = 1; v <= 40; v++)
|
|
817
|
-
if (
|
|
817
|
+
if (m(g, v) <= t.getCapacity(v, d, o.MIXED))
|
|
818
818
|
return v;
|
|
819
819
|
}
|
|
820
820
|
t.from = function(d, v) {
|
|
@@ -823,48 +823,48 @@ $.testAlphanumeric = function(e) {
|
|
|
823
823
|
if (!n.isValid(d))
|
|
824
824
|
throw new Error("Invalid QR Code version");
|
|
825
825
|
typeof C > "u" && (C = o.BYTE);
|
|
826
|
-
const
|
|
826
|
+
const S = e.getSymbolTotalCodewords(d), p = i.getTotalCodewordsCount(d, v), b = (S - p) * 8;
|
|
827
827
|
if (C === o.MIXED) return b;
|
|
828
|
-
const
|
|
828
|
+
const h = b - f(C, d);
|
|
829
829
|
switch (C) {
|
|
830
830
|
case o.NUMERIC:
|
|
831
|
-
return Math.floor(
|
|
831
|
+
return Math.floor(h / 10 * 3);
|
|
832
832
|
case o.ALPHANUMERIC:
|
|
833
|
-
return Math.floor(
|
|
833
|
+
return Math.floor(h / 11 * 2);
|
|
834
834
|
case o.KANJI:
|
|
835
|
-
return Math.floor(
|
|
835
|
+
return Math.floor(h / 13);
|
|
836
836
|
case o.BYTE:
|
|
837
837
|
default:
|
|
838
|
-
return Math.floor(
|
|
838
|
+
return Math.floor(h / 8);
|
|
839
839
|
}
|
|
840
840
|
}, t.getBestVersionForData = function(d, v) {
|
|
841
841
|
let C;
|
|
842
|
-
const
|
|
842
|
+
const S = r.from(v, r.M);
|
|
843
843
|
if (Array.isArray(d)) {
|
|
844
844
|
if (d.length > 1)
|
|
845
|
-
return
|
|
845
|
+
return B(d, S);
|
|
846
846
|
if (d.length === 0)
|
|
847
847
|
return 1;
|
|
848
848
|
C = d[0];
|
|
849
849
|
} else
|
|
850
850
|
C = d;
|
|
851
|
-
return s(C.mode, C.getLength(),
|
|
851
|
+
return s(C.mode, C.getLength(), S);
|
|
852
852
|
}, t.getEncodedBits = function(d) {
|
|
853
853
|
if (!n.isValid(d) || d < 7)
|
|
854
854
|
throw new Error("Invalid QR Code version");
|
|
855
855
|
let v = d << 12;
|
|
856
|
-
for (; e.getBCHDigit(v) -
|
|
857
|
-
v ^=
|
|
856
|
+
for (; e.getBCHDigit(v) - a >= 0; )
|
|
857
|
+
v ^= l << e.getBCHDigit(v) - a;
|
|
858
858
|
return d << 12 | v;
|
|
859
859
|
};
|
|
860
860
|
})(dt);
|
|
861
861
|
var mt = {};
|
|
862
|
-
const
|
|
862
|
+
const _e = L, gt = 1335, Jt = 21522, qe = _e.getBCHDigit(gt);
|
|
863
863
|
mt.getEncodedBits = function(e, i) {
|
|
864
864
|
const r = e.bit << 3 | i;
|
|
865
865
|
let o = r << 10;
|
|
866
|
-
for (;
|
|
867
|
-
o ^= gt <<
|
|
866
|
+
for (; _e.getBCHDigit(o) - qe >= 0; )
|
|
867
|
+
o ^= gt << _e.getBCHDigit(o) - qe;
|
|
868
868
|
return (r << 10 | o) ^ Jt;
|
|
869
869
|
};
|
|
870
870
|
var ht = {};
|
|
@@ -960,8 +960,8 @@ var Xt = X, Zt = function(e) {
|
|
|
960
960
|
for (var i = [], r = e.length, o = 0; o < r; o++) {
|
|
961
961
|
var n = e.charCodeAt(o);
|
|
962
962
|
if (n >= 55296 && n <= 56319 && r > o + 1) {
|
|
963
|
-
var
|
|
964
|
-
|
|
963
|
+
var l = e.charCodeAt(o + 1);
|
|
964
|
+
l >= 56320 && l <= 57343 && (n = (n - 55296) * 1024 + l - 56320 + 65536, o += 1);
|
|
965
965
|
}
|
|
966
966
|
if (n < 128) {
|
|
967
967
|
i.push(n);
|
|
@@ -1034,18 +1034,18 @@ var rn = W, pt = { exports: {} };
|
|
|
1034
1034
|
(function(t) {
|
|
1035
1035
|
var e = {
|
|
1036
1036
|
single_source_shortest_paths: function(i, r, o) {
|
|
1037
|
-
var n = {},
|
|
1038
|
-
|
|
1039
|
-
var
|
|
1040
|
-
|
|
1041
|
-
for (var s,
|
|
1042
|
-
s =
|
|
1043
|
-
for (
|
|
1044
|
-
|
|
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
1045
|
}
|
|
1046
|
-
if (typeof o < "u" && typeof
|
|
1047
|
-
var
|
|
1048
|
-
throw new Error(
|
|
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
1049
|
}
|
|
1050
1050
|
return n;
|
|
1051
1051
|
},
|
|
@@ -1098,26 +1098,26 @@ var rn = W, pt = { exports: {} };
|
|
|
1098
1098
|
})(pt);
|
|
1099
1099
|
var sn = pt.exports;
|
|
1100
1100
|
(function(t) {
|
|
1101
|
-
const e = Y, i = Gt, r = Xt, o = tn, n = rn,
|
|
1102
|
-
function
|
|
1103
|
-
return unescape(encodeURIComponent(
|
|
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
1104
|
}
|
|
1105
|
-
function
|
|
1106
|
-
const
|
|
1107
|
-
let
|
|
1108
|
-
for (; (
|
|
1109
|
-
|
|
1110
|
-
data:
|
|
1111
|
-
index:
|
|
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
1112
|
mode: b,
|
|
1113
|
-
length:
|
|
1113
|
+
length: M[0].length
|
|
1114
1114
|
});
|
|
1115
|
-
return
|
|
1115
|
+
return y;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const b =
|
|
1119
|
-
let
|
|
1120
|
-
return
|
|
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
1121
|
return P.index - U.index;
|
|
1122
1122
|
}).map(function(P) {
|
|
1123
1123
|
return {
|
|
@@ -1127,116 +1127,116 @@ var sn = pt.exports;
|
|
|
1127
1127
|
};
|
|
1128
1128
|
});
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function g(p, b) {
|
|
1131
1131
|
switch (b) {
|
|
1132
1132
|
case e.NUMERIC:
|
|
1133
|
-
return i.getBitsLength(
|
|
1133
|
+
return i.getBitsLength(p);
|
|
1134
1134
|
case e.ALPHANUMERIC:
|
|
1135
|
-
return r.getBitsLength(
|
|
1135
|
+
return r.getBitsLength(p);
|
|
1136
1136
|
case e.KANJI:
|
|
1137
|
-
return n.getBitsLength(
|
|
1137
|
+
return n.getBitsLength(p);
|
|
1138
1138
|
case e.BYTE:
|
|
1139
|
-
return o.getBitsLength(
|
|
1139
|
+
return o.getBitsLength(p);
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
function d(
|
|
1143
|
-
return
|
|
1144
|
-
const
|
|
1145
|
-
return
|
|
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
1146
|
}, []);
|
|
1147
1147
|
}
|
|
1148
|
-
function v(
|
|
1148
|
+
function v(p) {
|
|
1149
1149
|
const b = [];
|
|
1150
|
-
for (let
|
|
1151
|
-
const
|
|
1152
|
-
switch (
|
|
1150
|
+
for (let h = 0; h < p.length; h++) {
|
|
1151
|
+
const y = p[h];
|
|
1152
|
+
switch (y.mode) {
|
|
1153
1153
|
case e.NUMERIC:
|
|
1154
1154
|
b.push([
|
|
1155
|
-
|
|
1156
|
-
{ data:
|
|
1157
|
-
{ data:
|
|
1155
|
+
y,
|
|
1156
|
+
{ data: y.data, mode: e.ALPHANUMERIC, length: y.length },
|
|
1157
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1158
1158
|
]);
|
|
1159
1159
|
break;
|
|
1160
1160
|
case e.ALPHANUMERIC:
|
|
1161
1161
|
b.push([
|
|
1162
|
-
|
|
1163
|
-
{ data:
|
|
1162
|
+
y,
|
|
1163
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1164
1164
|
]);
|
|
1165
1165
|
break;
|
|
1166
1166
|
case e.KANJI:
|
|
1167
1167
|
b.push([
|
|
1168
|
-
|
|
1169
|
-
{ data:
|
|
1168
|
+
y,
|
|
1169
|
+
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1170
1170
|
]);
|
|
1171
1171
|
break;
|
|
1172
1172
|
case e.BYTE:
|
|
1173
1173
|
b.push([
|
|
1174
|
-
{ data:
|
|
1174
|
+
{ data: y.data, mode: e.BYTE, length: f(y.data) }
|
|
1175
1175
|
]);
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
return b;
|
|
1179
1179
|
}
|
|
1180
|
-
function C(
|
|
1181
|
-
const
|
|
1182
|
-
let
|
|
1183
|
-
for (let
|
|
1184
|
-
const P =
|
|
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
1185
|
for (let V = 0; V < P.length; V++) {
|
|
1186
|
-
const F = P[V],
|
|
1187
|
-
U.push(
|
|
1188
|
-
for (let
|
|
1189
|
-
const N =
|
|
1190
|
-
|
|
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
1191
|
}
|
|
1192
1192
|
}
|
|
1193
|
-
|
|
1193
|
+
M = U;
|
|
1194
1194
|
}
|
|
1195
|
-
for (let
|
|
1196
|
-
|
|
1197
|
-
return { map:
|
|
1195
|
+
for (let _ = 0; _ < M.length; _++)
|
|
1196
|
+
y[M[_]].end = 0;
|
|
1197
|
+
return { map: y, table: h };
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
let
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
throw new Error('"' +
|
|
1204
|
-
Suggested mode is: ` + e.toString(
|
|
1205
|
-
switch (
|
|
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
1206
|
case e.NUMERIC:
|
|
1207
|
-
return new i(
|
|
1207
|
+
return new i(p);
|
|
1208
1208
|
case e.ALPHANUMERIC:
|
|
1209
|
-
return new r(
|
|
1209
|
+
return new r(p);
|
|
1210
1210
|
case e.KANJI:
|
|
1211
|
-
return new n(
|
|
1211
|
+
return new n(p);
|
|
1212
1212
|
case e.BYTE:
|
|
1213
|
-
return new o(
|
|
1213
|
+
return new o(p);
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
1216
|
t.fromArray = function(b) {
|
|
1217
|
-
return b.reduce(function(
|
|
1218
|
-
return typeof
|
|
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
1219
|
}, []);
|
|
1220
|
-
}, t.fromString = function(b,
|
|
1221
|
-
const
|
|
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
1222
|
for (let V = 1; V < P.length - 1; V++)
|
|
1223
|
-
U.push(
|
|
1223
|
+
U.push(_.table[P[V]].node);
|
|
1224
1224
|
return t.fromArray(d(U));
|
|
1225
1225
|
}, t.rawSplit = function(b) {
|
|
1226
1226
|
return t.fromArray(
|
|
1227
|
-
|
|
1227
|
+
B(b, a.isKanjiModeEnabled())
|
|
1228
1228
|
);
|
|
1229
1229
|
};
|
|
1230
1230
|
})(ht);
|
|
1231
|
-
const be = L,
|
|
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
1232
|
function gn(t, e) {
|
|
1233
1233
|
const i = t.size, r = un.getPositions(e);
|
|
1234
1234
|
for (let o = 0; o < r.length; o++) {
|
|
1235
|
-
const n = r[o][0],
|
|
1236
|
-
for (let
|
|
1237
|
-
if (!(n +
|
|
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
1238
|
for (let s = -1; s <= 7; s++)
|
|
1239
|
-
|
|
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
1240
|
}
|
|
1241
1241
|
}
|
|
1242
1242
|
function hn(t) {
|
|
@@ -1250,33 +1250,33 @@ function pn(t, e) {
|
|
|
1250
1250
|
const i = cn.getPositions(e);
|
|
1251
1251
|
for (let r = 0; r < i.length; r++) {
|
|
1252
1252
|
const o = i[r][0], n = i[r][1];
|
|
1253
|
-
for (let
|
|
1254
|
-
for (let
|
|
1255
|
-
|
|
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
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
function yn(t, e) {
|
|
1259
1259
|
const i = t.size, r = he.getEncodedBits(e);
|
|
1260
|
-
let o, n,
|
|
1261
|
-
for (let
|
|
1262
|
-
o = Math.floor(
|
|
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
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function Be(t, e, i) {
|
|
1265
1265
|
const r = t.size, o = fn.getEncodedBits(e, i);
|
|
1266
|
-
let n,
|
|
1266
|
+
let n, l;
|
|
1267
1267
|
for (n = 0; n < 15; n++)
|
|
1268
|
-
|
|
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
1269
|
t.set(r - 8, 8, 1, !0);
|
|
1270
1270
|
}
|
|
1271
1271
|
function wn(t, e) {
|
|
1272
1272
|
const i = t.size;
|
|
1273
|
-
let r = -1, o = i - 1, n = 7,
|
|
1274
|
-
for (let
|
|
1275
|
-
for (
|
|
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
1276
|
for (let s = 0; s < 2; s++)
|
|
1277
|
-
if (!t.isReserved(o,
|
|
1278
|
-
let
|
|
1279
|
-
|
|
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
1280
|
}
|
|
1281
1281
|
if (o += r, o < 0 || i <= o) {
|
|
1282
1282
|
o -= r, r = -r;
|
|
@@ -1285,49 +1285,49 @@ function wn(t, e) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
1287
|
function bn(t, e, i) {
|
|
1288
|
-
const r = new
|
|
1288
|
+
const r = new ln();
|
|
1289
1289
|
i.forEach(function(s) {
|
|
1290
1290
|
r.put(s.mode.bit, 4), r.put(s.getLength(), mn.getCharCountIndicator(s.mode, t)), s.write(r);
|
|
1291
1291
|
});
|
|
1292
|
-
const o = be.getSymbolTotalCodewords(t), n = Pe.getTotalCodewordsCount(t, e),
|
|
1293
|
-
for (r.getLengthInBits() + 4 <=
|
|
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
1294
|
r.putBit(0);
|
|
1295
|
-
const
|
|
1296
|
-
for (let s = 0; s <
|
|
1295
|
+
const a = (l - r.getLengthInBits()) / 8;
|
|
1296
|
+
for (let s = 0; s < a; s++)
|
|
1297
1297
|
r.put(s % 2 ? 17 : 236, 8);
|
|
1298
1298
|
return vn(r, t, e);
|
|
1299
1299
|
}
|
|
1300
1300
|
function vn(t, e, i) {
|
|
1301
|
-
const r = be.getSymbolTotalCodewords(e), o = Pe.getTotalCodewordsCount(e, i), n = r - o,
|
|
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
1302
|
let v = 0;
|
|
1303
|
-
const C = new Array(
|
|
1304
|
-
let
|
|
1303
|
+
const C = new Array(l), S = new Array(l);
|
|
1304
|
+
let p = 0;
|
|
1305
1305
|
const b = new Uint8Array(t.buffer);
|
|
1306
|
-
for (let P = 0; P <
|
|
1307
|
-
const U = P < s ?
|
|
1308
|
-
C[P] = b.slice(v, v + U),
|
|
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
1309
|
}
|
|
1310
|
-
const
|
|
1311
|
-
let
|
|
1312
|
-
for (
|
|
1313
|
-
for (
|
|
1314
|
-
|
|
1315
|
-
for (
|
|
1316
|
-
for (
|
|
1317
|
-
|
|
1318
|
-
return
|
|
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
1319
|
}
|
|
1320
1320
|
function Cn(t, e, i, r) {
|
|
1321
1321
|
let o;
|
|
1322
1322
|
if (Array.isArray(t))
|
|
1323
|
-
o =
|
|
1323
|
+
o = Ae.fromArray(t);
|
|
1324
1324
|
else if (typeof t == "string") {
|
|
1325
|
-
let
|
|
1326
|
-
if (!
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1325
|
+
let f = e;
|
|
1326
|
+
if (!f) {
|
|
1327
|
+
const m = Ae.rawSplit(t);
|
|
1328
|
+
f = he.getBestVersionForData(m, i);
|
|
1329
1329
|
}
|
|
1330
|
-
o =
|
|
1330
|
+
o = Ae.fromString(t, f || 40);
|
|
1331
1331
|
} else
|
|
1332
1332
|
throw new Error("Invalid data");
|
|
1333
1333
|
const n = he.getBestVersionForData(o, i);
|
|
@@ -1342,11 +1342,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1342
1342
|
Minimum version required to store current data is: ` + n + `.
|
|
1343
1343
|
`
|
|
1344
1344
|
);
|
|
1345
|
-
const
|
|
1346
|
-
return gn(s, e), hn(s), pn(s, e),
|
|
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
1347
|
s,
|
|
1348
|
-
|
|
1349
|
-
)), Ie.applyMask(r, s),
|
|
1348
|
+
Be.bind(null, s, i)
|
|
1349
|
+
)), Ie.applyMask(r, s), Be(s, i, r), {
|
|
1350
1350
|
modules: s,
|
|
1351
1351
|
version: e,
|
|
1352
1352
|
errorCorrectionLevel: i,
|
|
@@ -1357,8 +1357,8 @@ Minimum version required to store current data is: ` + n + `.
|
|
|
1357
1357
|
rt.create = function(e, i) {
|
|
1358
1358
|
if (typeof e > "u" || e === "")
|
|
1359
1359
|
throw new Error("No input text");
|
|
1360
|
-
let r =
|
|
1361
|
-
return typeof i < "u" && (r =
|
|
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
1362
|
};
|
|
1363
1363
|
var yt = {}, Fe = {};
|
|
1364
1364
|
(function(t) {
|
|
@@ -1382,10 +1382,10 @@ var yt = {}, Fe = {};
|
|
|
1382
1382
|
}
|
|
1383
1383
|
t.getOptions = function(r) {
|
|
1384
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,
|
|
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
1386
|
return {
|
|
1387
1387
|
width: n,
|
|
1388
|
-
scale: n ? 4 :
|
|
1388
|
+
scale: n ? 4 : l,
|
|
1389
1389
|
margin: o,
|
|
1390
1390
|
color: {
|
|
1391
1391
|
dark: e(r.color.dark || "#000000ff"),
|
|
@@ -1400,13 +1400,13 @@ var yt = {}, Fe = {};
|
|
|
1400
1400
|
const n = t.getScale(r, o);
|
|
1401
1401
|
return Math.floor((r + o.margin * 2) * n);
|
|
1402
1402
|
}, t.qrToImageData = function(r, o, n) {
|
|
1403
|
-
const
|
|
1404
|
-
for (let
|
|
1405
|
-
for (let d = 0; d <
|
|
1406
|
-
let v = (
|
|
1407
|
-
if (
|
|
1408
|
-
const
|
|
1409
|
-
C =
|
|
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
1410
|
}
|
|
1411
1411
|
r[v++] = C.r, r[v++] = C.g, r[v++] = C.b, r[v] = C.a;
|
|
1412
1412
|
}
|
|
@@ -1414,8 +1414,8 @@ var yt = {}, Fe = {};
|
|
|
1414
1414
|
})(Fe);
|
|
1415
1415
|
(function(t) {
|
|
1416
1416
|
const e = Fe;
|
|
1417
|
-
function i(o, n,
|
|
1418
|
-
o.clearRect(0, 0, n.width, n.height), n.style || (n.style = {}), n.height =
|
|
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
1419
|
}
|
|
1420
1420
|
function r() {
|
|
1421
1421
|
try {
|
|
@@ -1424,59 +1424,59 @@ var yt = {}, Fe = {};
|
|
|
1424
1424
|
throw new Error("You need to specify a canvas element");
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
|
-
t.render = function(n,
|
|
1428
|
-
let s =
|
|
1429
|
-
typeof s > "u" && (!
|
|
1430
|
-
const
|
|
1431
|
-
return e.qrToImageData(
|
|
1432
|
-
}, t.renderToDataURL = function(n,
|
|
1433
|
-
let s =
|
|
1434
|
-
typeof s > "u" && (!
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
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
1437
|
};
|
|
1438
1438
|
})(yt);
|
|
1439
1439
|
var wt = {};
|
|
1440
|
-
const
|
|
1440
|
+
const En = Fe;
|
|
1441
1441
|
function Ge(t, e) {
|
|
1442
1442
|
const i = t.a / 255, r = e + '="' + t.hex + '"';
|
|
1443
1443
|
return i < 1 ? r + " " + e + '-opacity="' + i.toFixed(2).slice(1) + '"' : r;
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function Me(t, e, i) {
|
|
1446
1446
|
let r = t + e;
|
|
1447
1447
|
return typeof i < "u" && (r += " " + i), r;
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1450
|
-
let r = "", o = 0, n = !1,
|
|
1451
|
-
for (let
|
|
1452
|
-
const s = Math.floor(
|
|
1453
|
-
!s && !n && (n = !0), t[
|
|
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
1454
|
}
|
|
1455
1455
|
return r;
|
|
1456
1456
|
}
|
|
1457
1457
|
wt.render = function(e, i, r) {
|
|
1458
|
-
const o =
|
|
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
1459
|
`;
|
|
1460
|
-
return typeof r == "function" && r(null,
|
|
1460
|
+
return typeof r == "function" && r(null, g), g;
|
|
1461
1461
|
};
|
|
1462
|
-
const
|
|
1462
|
+
const Bn = kt, Te = rt, bt = yt, Mn = wt;
|
|
1463
1463
|
function Re(t, e, i, r, o) {
|
|
1464
|
-
const n = [].slice.call(arguments, 1),
|
|
1465
|
-
if (!
|
|
1464
|
+
const n = [].slice.call(arguments, 1), l = n.length, a = typeof n[l - 1] == "function";
|
|
1465
|
+
if (!a && !Bn())
|
|
1466
1466
|
throw new Error("Callback required as last argument");
|
|
1467
|
-
if (
|
|
1468
|
-
if (
|
|
1467
|
+
if (a) {
|
|
1468
|
+
if (l < 2)
|
|
1469
1469
|
throw new Error("Too few arguments provided");
|
|
1470
|
-
|
|
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
1471
|
} else {
|
|
1472
|
-
if (
|
|
1472
|
+
if (l < 1)
|
|
1473
1473
|
throw new Error("Too few arguments provided");
|
|
1474
|
-
return
|
|
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
1475
|
try {
|
|
1476
|
-
const
|
|
1477
|
-
s(t(
|
|
1478
|
-
} catch (
|
|
1479
|
-
|
|
1476
|
+
const m = Te.create(i, r);
|
|
1477
|
+
s(t(m, e, r));
|
|
1478
|
+
} catch (m) {
|
|
1479
|
+
f(m);
|
|
1480
1480
|
}
|
|
1481
1481
|
});
|
|
1482
1482
|
}
|
|
@@ -1491,9 +1491,9 @@ ie.create = Te.create;
|
|
|
1491
1491
|
ie.toCanvas = Re.bind(null, bt.render);
|
|
1492
1492
|
ie.toDataURL = Re.bind(null, bt.renderToDataURL);
|
|
1493
1493
|
ie.toString = Re.bind(null, function(t, e, i) {
|
|
1494
|
-
return
|
|
1494
|
+
return Mn.render(t, i);
|
|
1495
1495
|
});
|
|
1496
|
-
async function
|
|
1496
|
+
async function Sn(t, e = 350) {
|
|
1497
1497
|
try {
|
|
1498
1498
|
return await ie.toDataURL(t, {
|
|
1499
1499
|
width: e,
|
|
@@ -1503,50 +1503,50 @@ async function Mn(t, e = 350) {
|
|
|
1503
1503
|
console.error(i);
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
var
|
|
1507
|
-
const In = { class: "flex items-start" }, Pn = /* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
1509
|
-
/* @__PURE__ */ w("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
1510
|
-
], -1), Tn = { class: "flex flex-col gap-16 mt-16" }, Nn = ["src"], Un = /* @__PURE__ */ Xe({
|
|
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({
|
|
1511
1508
|
__name: "LinkDeviceDialog",
|
|
1512
1509
|
setup(t) {
|
|
1513
|
-
const e =
|
|
1514
|
-
var
|
|
1515
|
-
return `https://${(
|
|
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}`;
|
|
1516
1513
|
});
|
|
1517
|
-
async function
|
|
1518
|
-
const d = await tt.getOtp(
|
|
1519
|
-
return `${
|
|
1514
|
+
async function m(g) {
|
|
1515
|
+
const d = await tt.getOtp(g);
|
|
1516
|
+
return `${f.value}?link-device=${d.otp}`;
|
|
1520
1517
|
}
|
|
1521
|
-
async function
|
|
1522
|
-
const d = await
|
|
1523
|
-
|
|
1518
|
+
async function B(g) {
|
|
1519
|
+
const d = await m(g);
|
|
1520
|
+
a.value = d, o.value = await Sn(d);
|
|
1524
1521
|
}
|
|
1525
1522
|
return Ze(async () => {
|
|
1526
1523
|
if (await e.readLocations(), !e.locations.length) {
|
|
1527
1524
|
r.close();
|
|
1528
1525
|
return;
|
|
1529
1526
|
}
|
|
1530
|
-
const
|
|
1531
|
-
n.value =
|
|
1532
|
-
}), (
|
|
1533
|
-
const v = R("FmIcon"), C = R("FmSelect"),
|
|
1534
|
-
return x(), fe(
|
|
1535
|
-
default:
|
|
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(() => [
|
|
1536
1533
|
w("div", In, [
|
|
1537
|
-
|
|
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
1538
|
I(v, {
|
|
1539
1539
|
name: "close",
|
|
1540
1540
|
onClick: d[0] || (d[0] = (b) => c(r).close()),
|
|
1541
1541
|
class: "cursor-pointer"
|
|
1542
1542
|
})
|
|
1543
1543
|
]),
|
|
1544
|
-
w("div",
|
|
1544
|
+
w("div", Pn, [
|
|
1545
1545
|
I(C, {
|
|
1546
1546
|
modelValue: c(n),
|
|
1547
1547
|
"onUpdate:modelValue": [
|
|
1548
1548
|
d[1] || (d[1] = (b) => We(n) ? n.value = b : null),
|
|
1549
|
-
|
|
1549
|
+
B
|
|
1550
1550
|
],
|
|
1551
1551
|
label: "Select Location",
|
|
1552
1552
|
items: c(e).locationItems.filter((b) => !!b.value)
|
|
@@ -1554,12 +1554,12 @@ const In = { class: "flex items-start" }, Pn = /* @__PURE__ */ w("div", null, [
|
|
|
1554
1554
|
w("img", {
|
|
1555
1555
|
src: c(o),
|
|
1556
1556
|
class: "aspect-square w-full"
|
|
1557
|
-
}, null, 8,
|
|
1558
|
-
I(
|
|
1557
|
+
}, null, 8, Tn),
|
|
1558
|
+
I(S, {
|
|
1559
1559
|
class: "mx-auto",
|
|
1560
1560
|
variant: "plain",
|
|
1561
1561
|
icon: "content_copy",
|
|
1562
|
-
onClick: d[2] || (d[2] = (b) => c(ot)(c(
|
|
1562
|
+
onClick: d[2] || (d[2] = (b) => c(ot)(c(a)))
|
|
1563
1563
|
})
|
|
1564
1564
|
])
|
|
1565
1565
|
]),
|
|
@@ -1568,52 +1568,49 @@ const In = { class: "flex items-start" }, Pn = /* @__PURE__ */ w("div", null, [
|
|
|
1568
1568
|
};
|
|
1569
1569
|
}
|
|
1570
1570
|
});
|
|
1571
|
-
var Qe = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.
|
|
1572
|
-
const
|
|
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
1573
|
key: 0,
|
|
1574
1574
|
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
1575
|
-
},
|
|
1576
|
-
/* @__PURE__ */ ne(" Free Credit as Discount "),
|
|
1577
|
-
/* @__PURE__ */ w("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, "*POS v6.56 or above")
|
|
1578
|
-
], -1), Wn = { class: "space-y-8" }, eo = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, to = { class: "space-y-8" }, no = /* @__PURE__ */ w("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1), oo = { class: "flex justify-end pb-24" }, ro = { class: "col-span-1 space-y-8 xs:hidden" }, io = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1), so = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Name ", -1), ao = { class: "fm-typo-en-body-lg-600" }, lo = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Advertisement ", -1), co = { class: "fm-typo-en-body-lg-600" }, uo = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Free Credit as Discount ", -1), fo = { class: "fm-typo-en-body-lg-600" }, mo = /* @__PURE__ */ w("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, " Activated locations ", -1), go = { class: "fm-typo-en-body-lg-600" }, Ro = /* @__PURE__ */ Xe({
|
|
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({
|
|
1579
1576
|
__name: "Setting",
|
|
1580
1577
|
setup(t) {
|
|
1581
|
-
const e =
|
|
1582
|
-
(
|
|
1583
|
-
(
|
|
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"
|
|
1584
1581
|
], v = Qe.appUrl, C = me(() => {
|
|
1585
|
-
var
|
|
1586
|
-
return `https://${(
|
|
1587
|
-
}),
|
|
1588
|
-
var
|
|
1589
|
-
return Math.min((((
|
|
1590
|
-
}), { t:
|
|
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 = [
|
|
1591
1588
|
"user.name",
|
|
1592
1589
|
"user.gender",
|
|
1593
1590
|
"user.birthday",
|
|
1594
1591
|
"user.phoneNumber",
|
|
1595
1592
|
"membership.url"
|
|
1596
1593
|
].filter(
|
|
1597
|
-
(
|
|
1598
|
-
var
|
|
1599
|
-
return !((
|
|
1594
|
+
(A) => {
|
|
1595
|
+
var u;
|
|
1596
|
+
return !((u = Pt[y]) != null && u.includes(A));
|
|
1600
1597
|
}
|
|
1601
1598
|
);
|
|
1602
|
-
async function
|
|
1603
|
-
|
|
1599
|
+
async function _() {
|
|
1600
|
+
a.open({
|
|
1604
1601
|
title: "",
|
|
1605
|
-
dialogComponent:
|
|
1602
|
+
dialogComponent: Nn,
|
|
1606
1603
|
closeButton: !1
|
|
1607
1604
|
});
|
|
1608
1605
|
}
|
|
1609
|
-
async function P(
|
|
1610
|
-
await
|
|
1606
|
+
async function P(A) {
|
|
1607
|
+
await _t.remove(
|
|
1611
1608
|
"Are you sure you want to unlink this device?",
|
|
1612
1609
|
"Unlink device",
|
|
1613
1610
|
"Unlink"
|
|
1614
|
-
) && await
|
|
1611
|
+
) && await l(
|
|
1615
1612
|
async () => {
|
|
1616
|
-
await tt.unregisterDevice(
|
|
1613
|
+
await tt.unregisterDevice(A), await r.readLocationDevices();
|
|
1617
1614
|
},
|
|
1618
1615
|
{
|
|
1619
1616
|
message: "Unlinking device",
|
|
@@ -1622,25 +1619,25 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1622
1619
|
);
|
|
1623
1620
|
}
|
|
1624
1621
|
async function U() {
|
|
1625
|
-
await
|
|
1622
|
+
await l(
|
|
1626
1623
|
async () => {
|
|
1627
1624
|
var N;
|
|
1628
|
-
const
|
|
1629
|
-
|
|
1630
|
-
const
|
|
1631
|
-
|
|
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(
|
|
1632
1629
|
G.coverImagePath(),
|
|
1633
|
-
|
|
1634
|
-
)),
|
|
1630
|
+
S.value
|
|
1631
|
+
)), f.value ? u.advertisements = (await Promise.all(
|
|
1635
1632
|
new Array(b.value - 1).fill(null).map(async (z, K) => {
|
|
1636
1633
|
var ee;
|
|
1637
|
-
const j =
|
|
1634
|
+
const j = p.value[K];
|
|
1638
1635
|
return j ? await G.update(
|
|
1639
1636
|
G.advertisementPath(K, j),
|
|
1640
1637
|
j
|
|
1641
|
-
) : (ee =
|
|
1638
|
+
) : (ee = u.advertisements) == null ? void 0 : ee[K];
|
|
1642
1639
|
})
|
|
1643
|
-
)).filter((z) => z) :
|
|
1640
|
+
)).filter((z) => z) : u.advertisements = [], await je.update(u), await o.readMembership(), s.value = o.membership;
|
|
1644
1641
|
},
|
|
1645
1642
|
{
|
|
1646
1643
|
message: "Updating membership",
|
|
@@ -1649,8 +1646,8 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1649
1646
|
);
|
|
1650
1647
|
}
|
|
1651
1648
|
async function V() {
|
|
1652
|
-
const
|
|
1653
|
-
console.log(
|
|
1649
|
+
const A = await je.getEmailAddresses();
|
|
1650
|
+
console.log(A), m.value = A, B.value = A.find((u) => u.default.includes("Marketing"));
|
|
1654
1651
|
}
|
|
1655
1652
|
async function F() {
|
|
1656
1653
|
window.open(
|
|
@@ -1660,52 +1657,52 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1660
1657
|
}
|
|
1661
1658
|
return Ze(async () => {
|
|
1662
1659
|
await n(async () => {
|
|
1663
|
-
var
|
|
1664
|
-
await r.readPremium(), await r.readLocations(), await r.readLocationDevices(), await o.readMembership(), await V(), s.value = o.membership,
|
|
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)) ?? [];
|
|
1665
1662
|
});
|
|
1666
|
-
}), (
|
|
1663
|
+
}), (A, u) => {
|
|
1667
1664
|
var ke, De, Ve, xe, $e, ze, He;
|
|
1668
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");
|
|
1669
|
-
return x(), q(
|
|
1666
|
+
return x(), q(ae, null, [
|
|
1670
1667
|
I(N, {
|
|
1671
|
-
title: c(
|
|
1668
|
+
title: c(h)("connect.setting.title"),
|
|
1672
1669
|
class: "xs:hidden"
|
|
1673
1670
|
}, null, 8, ["title"]),
|
|
1674
|
-
w("div",
|
|
1675
|
-
w("div",
|
|
1671
|
+
w("div", Un, [
|
|
1672
|
+
w("div", Ln, D(c(h)("connect.setting.basicInfo.title")), 1),
|
|
1676
1673
|
I(z, {
|
|
1677
1674
|
icon: "info",
|
|
1678
1675
|
variant: "tertiary"
|
|
1679
1676
|
})
|
|
1680
1677
|
]),
|
|
1681
|
-
c(s) ? (x(), q("div",
|
|
1682
|
-
w("div",
|
|
1683
|
-
w("div",
|
|
1684
|
-
w("div",
|
|
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, [
|
|
1685
1682
|
I(K, {
|
|
1686
|
-
label: c(
|
|
1683
|
+
label: c(h)("connect.setting.basicInfo.membershipTitle"),
|
|
1687
1684
|
modelValue: c(s).name,
|
|
1688
|
-
"onUpdate:modelValue":
|
|
1685
|
+
"onUpdate:modelValue": u[0] || (u[0] = (E) => c(s).name = E)
|
|
1689
1686
|
}, null, 8, ["label", "modelValue"]),
|
|
1690
1687
|
I(K, {
|
|
1691
1688
|
disabled: !0,
|
|
1692
1689
|
"model-value": c(s).business,
|
|
1693
1690
|
rules: d,
|
|
1694
1691
|
required: !0,
|
|
1695
|
-
label: c(
|
|
1692
|
+
label: c(h)("connect.setting.basicInfo.memberAppUrl"),
|
|
1696
1693
|
"helper-text": c(C),
|
|
1697
1694
|
placeholder: c(s).business.toString(),
|
|
1698
|
-
"onUpdate:modelValue":
|
|
1695
|
+
"onUpdate:modelValue": u[2] || (u[2] = (E) => c(s).url = E)
|
|
1699
1696
|
}, {
|
|
1700
|
-
prepend:
|
|
1701
|
-
|
|
1702
|
-
]),
|
|
1703
|
-
append:
|
|
1704
|
-
|
|
1697
|
+
prepend: ne(() => u[12] || (u[12] = [
|
|
1698
|
+
te(" https:// ")
|
|
1699
|
+
])),
|
|
1700
|
+
append: ne(() => [
|
|
1701
|
+
te(" ." + D(c(v)) + " ", 1),
|
|
1705
1702
|
I(z, {
|
|
1706
1703
|
icon: "content_copy",
|
|
1707
1704
|
variant: "tertiary",
|
|
1708
|
-
onClick:
|
|
1705
|
+
onClick: u[1] || (u[1] = (E) => c(ot)(c(C)))
|
|
1709
1706
|
})
|
|
1710
1707
|
]),
|
|
1711
1708
|
_: 1
|
|
@@ -1716,59 +1713,59 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1716
1713
|
"image-fit": "cover",
|
|
1717
1714
|
"aspect-ratio": "3/1",
|
|
1718
1715
|
thumbnail: c(s).image || void 0,
|
|
1719
|
-
"onUpdate:file":
|
|
1720
|
-
|
|
1716
|
+
"onUpdate:file": u[3] || (u[3] = async (E) => {
|
|
1717
|
+
S.value = E, E || (c(s).image = null);
|
|
1721
1718
|
})
|
|
1722
1719
|
}, null, 8, ["thumbnail"]),
|
|
1723
|
-
w("div",
|
|
1724
|
-
w("div",
|
|
1720
|
+
w("div", Vn, [
|
|
1721
|
+
w("div", xn, D(c(h)("connect.setting.counterApp.title")), 1),
|
|
1725
1722
|
I(z, {
|
|
1726
1723
|
variant: "plain",
|
|
1727
1724
|
icon: "link",
|
|
1728
|
-
label: c(
|
|
1729
|
-
onClick:
|
|
1725
|
+
label: c(h)("connect.setting.counterApp.linkDevice"),
|
|
1726
|
+
onClick: _
|
|
1730
1727
|
}, null, 8, ["label"]),
|
|
1731
|
-
(x(!0), q(
|
|
1728
|
+
(x(!0), q(ae, null, Ke(c(r).locationDevices, (E, T) => (x(), fe(j, {
|
|
1732
1729
|
key: T,
|
|
1733
1730
|
variant: "outlined",
|
|
1734
1731
|
class: "flex items-center justify-between px-16 py-12"
|
|
1735
1732
|
}, {
|
|
1736
|
-
default:
|
|
1733
|
+
default: ne(() => [
|
|
1737
1734
|
w("div", null, [
|
|
1738
|
-
w("p",
|
|
1739
|
-
w("p",
|
|
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(
|
|
1740
1737
|
"D MMM YYYY"
|
|
1741
1738
|
)), 1),
|
|
1742
|
-
w("p",
|
|
1739
|
+
w("p", Hn, " Linked location: " + D(c(r).locations.find((k) => k._id == E.location).name), 1)
|
|
1743
1740
|
]),
|
|
1744
1741
|
I(z, {
|
|
1745
1742
|
icon: "link_off",
|
|
1746
1743
|
variant: "tertiary",
|
|
1747
|
-
onClick: (k) => P(
|
|
1744
|
+
onClick: (k) => P(E._id)
|
|
1748
1745
|
}, null, 8, ["onClick"])
|
|
1749
1746
|
]),
|
|
1750
1747
|
_: 2
|
|
1751
1748
|
}, 1024))), 128))
|
|
1752
1749
|
]),
|
|
1753
|
-
w("div",
|
|
1754
|
-
w("div",
|
|
1755
|
-
|
|
1750
|
+
w("div", Kn, [
|
|
1751
|
+
w("div", On, [
|
|
1752
|
+
u[13] || (u[13] = te(" Advertisement ")),
|
|
1756
1753
|
I(ee, { variant: "premium" })
|
|
1757
1754
|
]),
|
|
1758
1755
|
I(ve, {
|
|
1759
|
-
modelValue: c(
|
|
1760
|
-
"onUpdate:modelValue":
|
|
1756
|
+
modelValue: c(f),
|
|
1757
|
+
"onUpdate:modelValue": u[4] || (u[4] = (E) => We(f) ? f.value = E : null),
|
|
1761
1758
|
label: "Advertisement",
|
|
1762
1759
|
sublabel: "This will be show on FeedMe ordering app",
|
|
1763
1760
|
"label-placement": "right",
|
|
1764
1761
|
disabled: !c(r).isPremium,
|
|
1765
1762
|
value: ""
|
|
1766
1763
|
}, null, 8, ["modelValue", "disabled"]),
|
|
1767
|
-
c(
|
|
1764
|
+
c(f) ? (x(), q("div", {
|
|
1768
1765
|
class: "flex items-center gap-8 flex-wrap xs:grid xs:grid-cols-2 xs:overflow-x-scroll xs:w-full",
|
|
1769
1766
|
key: c(b)
|
|
1770
1767
|
}, [
|
|
1771
|
-
(x(!0), q(
|
|
1768
|
+
(x(!0), q(ae, null, Ke(c(b), (E, T) => {
|
|
1772
1769
|
var k, J;
|
|
1773
1770
|
return x(), fe(Ye, {
|
|
1774
1771
|
class: "w-[200px]",
|
|
@@ -1778,91 +1775,94 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1778
1775
|
thumbnail: (J = (k = c(s)) == null ? void 0 : k.advertisements) == null ? void 0 : J[T],
|
|
1779
1776
|
accept: ".png, .jpg, .jpeg, .mp4, .gif",
|
|
1780
1777
|
"recommended-size": "Recommended 4:5 ratio / 1080px x 1350px",
|
|
1781
|
-
file: c(
|
|
1782
|
-
"onUpdate:file": (
|
|
1783
|
-
c(s).advertisements || (c(s).advertisements = []),
|
|
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));
|
|
1784
1781
|
}
|
|
1785
1782
|
}, null, 8, ["thumbnail", "file", "onUpdate:file"]);
|
|
1786
1783
|
}), 256))
|
|
1787
1784
|
])) : ce("", !0)
|
|
1788
1785
|
]),
|
|
1789
|
-
w("div",
|
|
1790
|
-
|
|
1786
|
+
w("div", Yn, [
|
|
1787
|
+
u[14] || (u[14] = w("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
|
|
1791
1788
|
I(K, {
|
|
1792
1789
|
"model-value": ((ke = c(s)) == null ? void 0 : ke.brand) || "",
|
|
1793
1790
|
"max-length": 15,
|
|
1794
1791
|
label: "Brand Name",
|
|
1795
1792
|
"show-word-count": "",
|
|
1796
1793
|
"helper-text": `RM 0 ${((De = c(s)) == null ? void 0 : De.brand) || ""}: YOUR CUSTOMER MESSAGE`,
|
|
1797
|
-
"onUpdate:modelValue":
|
|
1794
|
+
"onUpdate:modelValue": u[5] || (u[5] = (E) => c(s).brand = E)
|
|
1798
1795
|
}, null, 8, ["model-value", "helper-text"]),
|
|
1799
1796
|
I(Tt, {
|
|
1800
1797
|
modelValue: c(s).welcomeMessage,
|
|
1801
|
-
"onUpdate:modelValue":
|
|
1802
|
-
variables: c(
|
|
1798
|
+
"onUpdate:modelValue": u[6] || (u[6] = (E) => c(s).welcomeMessage = E),
|
|
1799
|
+
variables: c(M),
|
|
1803
1800
|
placeholder: "Hi there, you have been invited to join membership"
|
|
1804
1801
|
}, null, 8, ["modelValue", "variables"])
|
|
1805
1802
|
]),
|
|
1806
|
-
w("div",
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
c(
|
|
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, {
|
|
1810
1807
|
key: 0,
|
|
1811
1808
|
onClick: F,
|
|
1812
1809
|
label: "Add new email address"
|
|
1813
1810
|
})),
|
|
1814
|
-
c(
|
|
1811
|
+
c(m).length ? (x(), q(ae, { key: 1 }, [
|
|
1815
1812
|
I(vt, {
|
|
1816
1813
|
"model-value": ((xe = (Ve = c(s)) == null ? void 0 : Ve.email) == null ? void 0 : xe.from) || null,
|
|
1817
1814
|
label: "From Address",
|
|
1818
|
-
items: c(
|
|
1819
|
-
label:
|
|
1820
|
-
value:
|
|
1815
|
+
items: c(m).map((E) => ({
|
|
1816
|
+
label: E.emailAddress,
|
|
1817
|
+
value: E.emailAddress
|
|
1821
1818
|
})),
|
|
1822
|
-
placeholder: c(
|
|
1823
|
-
"onUpdate:modelValue":
|
|
1819
|
+
placeholder: c(B) ? c(B).emailAddress : "No email address available",
|
|
1820
|
+
"onUpdate:modelValue": u[7] || (u[7] = (E) => {
|
|
1824
1821
|
var T, k;
|
|
1825
1822
|
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1826
|
-
from:
|
|
1827
|
-
name: (k = c(
|
|
1828
|
-
}), c(s).email.from =
|
|
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;
|
|
1829
1826
|
}),
|
|
1830
|
-
rules: [c(Oe).ruleAtPath(c(
|
|
1827
|
+
rules: [c(Oe).ruleAtPath(c(g), "email.from")]
|
|
1831
1828
|
}, null, 8, ["model-value", "items", "placeholder", "rules"]),
|
|
1832
1829
|
I(K, {
|
|
1833
1830
|
"model-value": ((ze = ($e = c(s)) == null ? void 0 : $e.email) == null ? void 0 : ze.name) || null,
|
|
1834
1831
|
label: "Sender name",
|
|
1835
1832
|
disabled: "",
|
|
1836
|
-
placeholder: ((He = c(
|
|
1837
|
-
"onUpdate:modelValue":
|
|
1833
|
+
placeholder: ((He = c(B)) == null ? void 0 : He.name) || null,
|
|
1834
|
+
"onUpdate:modelValue": u[8] || (u[8] = (E) => {
|
|
1838
1835
|
var T;
|
|
1839
1836
|
(T = c(s)) != null && T.email || (c(s).email = {
|
|
1840
|
-
name:
|
|
1841
|
-
}), c(s).email.name =
|
|
1837
|
+
name: E
|
|
1838
|
+
}), c(s).email.name = E || null;
|
|
1842
1839
|
}),
|
|
1843
|
-
rules: [c(Oe).ruleAtPath(c(
|
|
1840
|
+
rules: [c(Oe).ruleAtPath(c(g), "email.name")]
|
|
1844
1841
|
}, null, 8, ["model-value", "placeholder", "rules"])
|
|
1845
1842
|
], 64)) : ce("", !0)
|
|
1846
1843
|
]),
|
|
1847
|
-
w("div",
|
|
1848
|
-
|
|
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
1849
|
I(ve, {
|
|
1850
1850
|
"model-value": c(s).freeCreditAsDiscount ?? !1,
|
|
1851
|
-
"onUpdate:modelValue":
|
|
1851
|
+
"onUpdate:modelValue": u[9] || (u[9] = (E) => c(s).freeCreditAsDiscount = E),
|
|
1852
1852
|
label: "Free Credit as Discount",
|
|
1853
1853
|
sublabel: "When enabled, this will allow free credit to be used as discount in the bill (POS >=v6.56)",
|
|
1854
1854
|
"label-placement": "right",
|
|
1855
1855
|
value: ""
|
|
1856
1856
|
}, null, 8, ["model-value"])
|
|
1857
1857
|
]),
|
|
1858
|
-
w("div",
|
|
1859
|
-
w("div",
|
|
1860
|
-
|
|
1858
|
+
w("div", qn, [
|
|
1859
|
+
w("div", Gn, [
|
|
1860
|
+
u[18] || (u[18] = te(" Member Card ")),
|
|
1861
1861
|
I(ee, { variant: "premium" })
|
|
1862
1862
|
]),
|
|
1863
1863
|
I(ve, {
|
|
1864
1864
|
"model-value": c(s).cardEnable ?? !1,
|
|
1865
|
-
"onUpdate:modelValue":
|
|
1865
|
+
"onUpdate:modelValue": u[10] || (u[10] = (E) => c(s).cardEnable = E),
|
|
1866
1866
|
label: "",
|
|
1867
1867
|
sublabel: "Allow member to bind card via member app",
|
|
1868
1868
|
"label-placement": "right",
|
|
@@ -1870,15 +1870,15 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1870
1870
|
disabled: !c(r).isPremium
|
|
1871
1871
|
}, null, 8, ["model-value", "disabled"])
|
|
1872
1872
|
]),
|
|
1873
|
-
w("div",
|
|
1874
|
-
|
|
1873
|
+
w("div", Qn, [
|
|
1874
|
+
u[19] || (u[19] = w("div", { class: "fm-typo-en-title-sm-800" }, "Activation Location", -1)),
|
|
1875
1875
|
I(It, {
|
|
1876
1876
|
label: "Select restaurant",
|
|
1877
1877
|
"model-value": c(s).targetLocation ?? null,
|
|
1878
|
-
"onUpdate:modelValue":
|
|
1878
|
+
"onUpdate:modelValue": u[11] || (u[11] = (E) => c(s).targetLocation = E)
|
|
1879
1879
|
}, null, 8, ["model-value"])
|
|
1880
1880
|
]),
|
|
1881
|
-
w("div",
|
|
1881
|
+
w("div", Xn, [
|
|
1882
1882
|
I(z, {
|
|
1883
1883
|
label: "Update",
|
|
1884
1884
|
type: "button",
|
|
@@ -1889,32 +1889,32 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1889
1889
|
])
|
|
1890
1890
|
])
|
|
1891
1891
|
]),
|
|
1892
|
-
w("div",
|
|
1892
|
+
w("div", Zn, [
|
|
1893
1893
|
I(j, {
|
|
1894
1894
|
variant: "outlined",
|
|
1895
1895
|
class: "flex flex-col p-24 gap-8"
|
|
1896
1896
|
}, {
|
|
1897
|
-
default:
|
|
1898
|
-
var
|
|
1897
|
+
default: ne(() => {
|
|
1898
|
+
var E, T, k;
|
|
1899
1899
|
return [
|
|
1900
|
-
|
|
1900
|
+
u[24] || (u[24] = w("div", { class: "fm-typo-en-body-lg-600" }, "Loyalty setting summary", -1)),
|
|
1901
1901
|
I(Ct, { class: "my-4" }),
|
|
1902
1902
|
w("div", null, [
|
|
1903
|
-
|
|
1904
|
-
w("div",
|
|
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
1905
|
]),
|
|
1906
1906
|
w("div", null, [
|
|
1907
|
-
|
|
1908
|
-
w("div",
|
|
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
1909
|
]),
|
|
1910
1910
|
w("div", null, [
|
|
1911
|
-
|
|
1912
|
-
w("div",
|
|
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
1913
|
]),
|
|
1914
1914
|
w("div", null, [
|
|
1915
|
-
|
|
1916
|
-
w("div",
|
|
1917
|
-
(J) => c(r).locations.find((
|
|
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
1918
|
).join(", ")), 1)
|
|
1919
1919
|
])
|
|
1920
1920
|
];
|
|
@@ -1928,5 +1928,5 @@ const Ln = { class: "hidden xs:flex items-center justify-between px-16 py-12 bor
|
|
|
1928
1928
|
}
|
|
1929
1929
|
});
|
|
1930
1930
|
export {
|
|
1931
|
-
|
|
1931
|
+
Bo as default
|
|
1932
1932
|
};
|