@feedmepos/mf-settings 0.0.46 → 0.0.47-beta.1
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/Business-8451860e.js +3888 -0
- package/dist/{CreateBusiness-ed6d2516.js → CreateBusiness-c7f0a889.js} +6 -6
- package/dist/FoodCourt-06d425bb.js +47799 -0
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-6845f4ee.js +395 -0
- package/dist/app-d536d9c8.js +52126 -0
- package/dist/app.js +8 -5
- package/dist/apps/mf-settings/src/View/Tagging.vue.d.ts +2 -0
- package/dist/apps/mf-settings/src/api/business.d.ts +4 -1
- package/dist/apps/mf-settings/src/api/restaurant.d.ts +3 -2
- package/dist/apps/mf-settings/src/app.d.ts +58 -0
- package/dist/apps/mf-settings/src/components/business/RestaurantForm.vue.d.ts +1 -1
- package/dist/apps/mf-settings/src/components/tagging/TaggingForm.vue.d.ts +39 -0
- package/dist/apps/mf-settings/src/manager/restaurant.d.ts +1 -1
- package/dist/apps/mf-settings/src/store/attributeSettings.d.ts +83 -0
- package/dist/apps/mf-settings/tsconfig.app.tsbuildinfo +1 -1
- package/dist/rules-c9fa22f8.js +13 -0
- package/package.json +5 -3
- package/dist/Business-1799fd57.js +0 -3945
- package/dist/FoodCourt-781332fc.js +0 -71720
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-ad4c3c44.js +0 -456
- package/dist/app-db5d61e5.js +0 -36654
- package/dist/business-8414e321.js +0 -29
- package/dist/loading-09824466.js +0 -2385
|
@@ -1,3945 +0,0 @@
|
|
|
1
|
-
var Pr = Object.defineProperty;
|
|
2
|
-
var Sr = (t, e, r) => e in t ? Pr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var Ke = (t, e, r) => (Sr(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import { ref as re, computed as z, defineComponent as W, resolveComponent as K, openBlock as x, createBlock as Q, Teleport as Tr, createVNode as S, Transition as Lr, withCtx as G, normalizeClass as Y, normalizeStyle as Ne, withKeys as Nr, createElementVNode as $, toDisplayString as U, renderSlot as ne, createElementBlock as D, Fragment as se, renderList as me, createCommentVNode as le, createTextVNode as Ce, h as ke, unref as E, watch as rt, onMounted as nr, onUnmounted as Cr, toRaw as $t, reactive as lt, nextTick as sr, onBeforeUnmount as kr, normalizeProps as xr, guardReactiveProps as Vr, withModifiers as xe, getCurrentInstance as Fr, isRef as Et } from "vue";
|
|
5
|
-
import { c as jr, g as ar, a as Ve, b as ve, d as Mr, e as Ur, f as ut, h as qe, r as ze, i as Dr, u as Br, j as Gr, k as Kr } from "./app-db5d61e5.js";
|
|
6
|
-
import { useCoreStore as fe, useI18n as pe } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as or, useDialogChild as qr, useSnackbar as ct, useBreakpoints as ir, components as lr } from "@feedmepos/ui-library";
|
|
8
|
-
import { c as ge, D as dt, u as ur, _ as zr, a as Hr, b as Xr, d as He } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-ad4c3c44.js";
|
|
9
|
-
import { _ as cr, r as ce, b as Yr } from "./business-8414e321.js";
|
|
10
|
-
import { b as Xe, a as Ye, g as dr, u as fr } from "./loading-09824466.js";
|
|
11
|
-
import "@feedmepos/mf-mdm";
|
|
12
|
-
import "vue-router";
|
|
13
|
-
import "@feedmepos/mf-e-invoice";
|
|
14
|
-
import "pinia";
|
|
15
|
-
var Wr = {};
|
|
16
|
-
(function(t) {
|
|
17
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), function(e) {
|
|
18
|
-
e.SLOT_SALE = "SLOT_SALE";
|
|
19
|
-
}(t.ReportWidgetType || (t.ReportWidgetType = {})), function(e) {
|
|
20
|
-
e.v2 = "v2", e.v3 = "v3", e.v4 = "v4";
|
|
21
|
-
}(t.MENU_VERSION || (t.MENU_VERSION = {})), function(e) {
|
|
22
|
-
e.Polygon = "Polygon";
|
|
23
|
-
}(t.GeometryType || (t.GeometryType = {})), function(e) {
|
|
24
|
-
e.stock = "stock", e.discovery = "discovery", e.pickup = "pickup", e.delivery = "delivery", e.foodpanda = "foodpanda", e.deliveryIntegration = "deliveryIntegration", e.kds = "kds", e.ods = "ods";
|
|
25
|
-
}(t.RestaurantFeature || (t.RestaurantFeature = {})), function(e) {
|
|
26
|
-
e.alpha = "alpha", e.beta = "beta", e.latest = "latest";
|
|
27
|
-
}(t.RestaurantChannel || (t.RestaurantChannel = {})), function(e) {
|
|
28
|
-
e.pickup = "pickup", e.delivery = "delivery";
|
|
29
|
-
}(t.DiscoveryType || (t.DiscoveryType = {})), function(e) {
|
|
30
|
-
e.new = "NEW", e.pending = "PENDING", e.approved = "APPROVED";
|
|
31
|
-
}(t.PAYOUT_ACCOUNT_STATUS || (t.PAYOUT_ACCOUNT_STATUS = {})), function(e) {
|
|
32
|
-
e.maybank = "MAYBANK", e.cimbBank = "CIMB_BANK", e.rhbBank = "RHB_BANK", e.bankIslam = "BANK_ISLAM", e.bankMuamalat = "BANK_MUAMALAT", e.bankRakyat = "BANK_RAKYAT", e.bankSimpananNasional = "BANK_SIMPANAN_NASIONAL", e.citiBank = "CITIBANK", e.hongLeongBank = "HONG_LEONG_BANK", e.hsbcBank = "HSBC_BANK", e.ocbcBank = "OCBC_BANK", e.publicBank = "PUBLIC_BANK", e.affinBank = "AFFIN_BANK", e.amBank = "AMBANK", e.agroBank = "AGRO_BANK", e.allianceBank = "ALLIANCE_BANK", e.alRajhiBank = "AL_RAJHI_BANK", e.bankOfChina = "BANK_OF_CHINA", e.bankOfAmerica = "BANK_OF_AMERICA", e.bankOfTokyoMitsubishiUFJ = "BANK_OF_TOKYO_MITSUBISHI_UFJ", e.bnpParibas = "BNP_PARIBAS", e.deutscheBank = "DEUTSCHE_BANK", e.industrialCommercialBankOfChina = "INDUSTRIAL_COMMERCIAL_BANK_OF_CHINA", e.jpMorganChaseBank = "JP_MORGAN_CHASE_BANK", e.kuwaitFinanceHouse = "KUWAIT_FINANCE_HOUSE", e.mizuhoBank = "MIZUHO_BANK", e.standardCharteredBank = "STANDARD_CHARTERED_BANK", e.sumitomoMitsuiBankingCorporation = "SUMITOMO_MITSUI_BANKING_CORPORATION", e.theRoyalBankOfScotland = "THE_ROYAL_BANK_OF_SCOTLAND", e.unitedOverseasBank = "UNITED_OVERSEAS_BANK";
|
|
33
|
-
}(t.BankName || (t.BankName = {})), function(e) {
|
|
34
|
-
e.current = "CURRENT_ACCOUNT", e.saving = "SAVING_ACCOUNT";
|
|
35
|
-
}(t.BankType || (t.BankType = {})), function(e) {
|
|
36
|
-
e[e.maybank = 100002270] = "maybank", e[e.cimbBank = 100002050] = "cimbBank", e[e.rhbBank = 100002186] = "rhbBank", e[e.bankIslam = 100002458] = "bankIslam", e[e.bankMuamalat = 100002458] = "bankMuamalat", e[e.bankRakyat = 100016020] = "bankRakyat", e[e.bankSimpananNasional = 100016017] = "bankSimpananNasional", e[e.citiBank = 100002173] = "citiBank", e[e.hongLeongBank = 100002241] = "hongLeongBank", e[e.hsbcBank = 100002225] = "hsbcBank", e[e.ocbcBank = 100002296] = "ocbcBank", e[e.publicBank = 100002335] = "publicBank", e[e.affinBank = 100002322] = "affinBank", e[e.amBank = 100002089] = "amBank", e[e.agroBank = 100033061] = "agroBank", e[e.allianceBank = 100002128] = "allianceBank", e[e.alRajhiBank = 100003509] = "alRajhiBank", e[e.bankOfChina = 100002429] = "bankOfChina", e[e.bankOfAmerica = 100002076] = "bankOfAmerica", e[e.bankOfTokyoMitsubishiUFJ = 100002102] = "bankOfTokyoMitsubishiUFJ", e[e.bnpParibas = 100002636] = "bnpParibas", e[e.deutscheBank = 100002199] = "deutscheBank", e[e.industrialCommercialBankOfChina = 100002597] = "industrialCommercialBankOfChina", e[e.jpMorganChaseBank = 100002157] = "jpMorganChaseBank", e[e.kuwaitFinanceHouse = 100003460] = "kuwaitFinanceHouse", e[e.mizuhoBank = 100002610] = "mizuhoBank", e[e.standardCharteredBank = 100002144] = "standardCharteredBank", e[e.sumitomoMitsuiBankingCorporation = 100002623] = "sumitomoMitsuiBankingCorporation", e[e.unitedOverseasBank = 100002267] = "unitedOverseasBank";
|
|
37
|
-
}(t.BankRouting || (t.BankRouting = {})), function(e) {
|
|
38
|
-
e.maybank = "MBBEMYKL", e.cimbBank = "CIBBMYKL", e.rhbBank = "RHBBMYKL", e.bankIslam = "BIMBMYKL", e.bankMuamalat = "BMMBMYKL", e.bankRakyat = "BKRMMYKL", e.bankSimpananNasional = "BSNAMYK1", e.citiBank = "CITIMYKL", e.hongLeongBank = "HLBBMYKL", e.hsbcBank = "HBMBMYKL", e.ocbcBank = "OCBCMYKL", e.publicBank = "PBBEMYKL", e.affinBank = "PHBMMYKL", e.amBank = "ARBKMYKL", e.agroBank = "AGOBMYKL", e.allianceBank = "MFBBMYKL", e.alRajhiBank = "RJHIMYKL", e.bankOfChina = "BKCHMYKL", e.bankOfAmerica = "BOFAMY2X", e.bankOfTokyoMitsubishiUFJ = "BOTKMYKX", e.bnpParibas = "BNPAMYKL", e.deutscheBank = "DEUTMYKL", e.industrialCommercialBankOfChina = "ICBKMYKL", e.jpMorganChaseBank = "CHASMYKX", e.kuwaitFinanceHouse = "KFHOMYKL", e.mizuhoBank = "MHCBMYKA", e.standardCharteredBank = "SCBLMYKX", e.sumitomoMitsuiBankingCorporation = "SMBCMYKL", e.unitedOverseasBank = "UOVBMYKL";
|
|
39
|
-
}(t.BankSwiftCode || (t.BankSwiftCode = {})), function(e) {
|
|
40
|
-
e.grab = "Grab", e.merchant = "Merchant", e.partner = "Partner";
|
|
41
|
-
}(t.GF_CAMPAIGN_CREATED_BY || (t.GF_CAMPAIGN_CREATED_BY = {})), function(e) {
|
|
42
|
-
e.all = "all", e.new = "new";
|
|
43
|
-
}(t.GF_CAMPAIGN_EATER_TYPE || (t.GF_CAMPAIGN_EATER_TYPE = {})), function(e) {
|
|
44
|
-
e.net = "net", e.percentage = "percentage", e.delivery = "delivery", e.freeItem = "freeItem";
|
|
45
|
-
}(t.GF_CAMPAIGN_DISCOUNT_TYPE || (t.GF_CAMPAIGN_DISCOUNT_TYPE = {})), function(e) {
|
|
46
|
-
e.order = "order", e.items = "items";
|
|
47
|
-
}(t.GF_CAMPAIGN_SCOPE_TYPE || (t.GF_CAMPAIGN_SCOPE_TYPE = {}));
|
|
48
|
-
})(Wr);
|
|
49
|
-
var mr = { exports: {} };
|
|
50
|
-
(function(t, e) {
|
|
51
|
-
(function(r, n) {
|
|
52
|
-
t.exports = n();
|
|
53
|
-
})(jr, function() {
|
|
54
|
-
return function(r) {
|
|
55
|
-
var n = {};
|
|
56
|
-
function s(o) {
|
|
57
|
-
if (n[o])
|
|
58
|
-
return n[o].exports;
|
|
59
|
-
var i = n[o] = { i: o, l: !1, exports: {} };
|
|
60
|
-
return r[o].call(i.exports, i, i.exports, s), i.l = !0, i.exports;
|
|
61
|
-
}
|
|
62
|
-
return s.m = r, s.c = n, s.d = function(o, i, m) {
|
|
63
|
-
s.o(o, i) || Object.defineProperty(o, i, { enumerable: !0, get: m });
|
|
64
|
-
}, s.r = function(o) {
|
|
65
|
-
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(o, "__esModule", { value: !0 });
|
|
66
|
-
}, s.t = function(o, i) {
|
|
67
|
-
if (1 & i && (o = s(o)), 8 & i || 4 & i && typeof o == "object" && o && o.__esModule)
|
|
68
|
-
return o;
|
|
69
|
-
var m = /* @__PURE__ */ Object.create(null);
|
|
70
|
-
if (s.r(m), Object.defineProperty(m, "default", { enumerable: !0, value: o }), 2 & i && typeof o != "string")
|
|
71
|
-
for (var f in o)
|
|
72
|
-
s.d(
|
|
73
|
-
m,
|
|
74
|
-
f,
|
|
75
|
-
(function(c) {
|
|
76
|
-
return o[c];
|
|
77
|
-
}).bind(null, f)
|
|
78
|
-
);
|
|
79
|
-
return m;
|
|
80
|
-
}, s.n = function(o) {
|
|
81
|
-
var i = o && o.__esModule ? function() {
|
|
82
|
-
return o.default;
|
|
83
|
-
} : function() {
|
|
84
|
-
return o;
|
|
85
|
-
};
|
|
86
|
-
return s.d(i, "a", i), i;
|
|
87
|
-
}, s.o = function(o, i) {
|
|
88
|
-
return Object.prototype.hasOwnProperty.call(o, i);
|
|
89
|
-
}, s.p = "", s(s.s = 0);
|
|
90
|
-
}([
|
|
91
|
-
function(r, n, s) {
|
|
92
|
-
r.exports = s(1);
|
|
93
|
-
},
|
|
94
|
-
function(r, n, s) {
|
|
95
|
-
function o(a) {
|
|
96
|
-
return (o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(l) {
|
|
97
|
-
return typeof l;
|
|
98
|
-
} : function(l) {
|
|
99
|
-
return l && typeof Symbol == "function" && l.constructor === Symbol && l !== Symbol.prototype ? "symbol" : typeof l;
|
|
100
|
-
})(a);
|
|
101
|
-
}
|
|
102
|
-
function i(a) {
|
|
103
|
-
var l = "[object " + a + "]";
|
|
104
|
-
return function(v) {
|
|
105
|
-
return Object.prototype.toString.call(v) === l;
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
s.r(n), s.d(n, "default", function() {
|
|
109
|
-
return Z;
|
|
110
|
-
}), s.d(n, "compare", function() {
|
|
111
|
-
return M;
|
|
112
|
-
}), s.d(n, "comparable", function() {
|
|
113
|
-
return H;
|
|
114
|
-
});
|
|
115
|
-
var m = i("Array"), f = i("Object"), c = i("Function");
|
|
116
|
-
function b(a, l) {
|
|
117
|
-
return c(a.get) ? a.get(l) : a[l];
|
|
118
|
-
}
|
|
119
|
-
function d(a) {
|
|
120
|
-
return function(l, v) {
|
|
121
|
-
if (!m(v) || !v.length)
|
|
122
|
-
return a(l, v);
|
|
123
|
-
for (var w = 0, R = v.length; w < R; w++)
|
|
124
|
-
if (a(l, b(v, w)))
|
|
125
|
-
return !0;
|
|
126
|
-
return !1;
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function T(a) {
|
|
130
|
-
return function(l, v) {
|
|
131
|
-
if (!m(v) || !v.length)
|
|
132
|
-
return a(l, v);
|
|
133
|
-
for (var w = 0, R = v.length; w < R; w++)
|
|
134
|
-
if (!a(l, b(v, w)))
|
|
135
|
-
return !1;
|
|
136
|
-
return !0;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function g(a, l, v, w) {
|
|
140
|
-
return a.validate(a.options, l, v, w);
|
|
141
|
-
}
|
|
142
|
-
var h = {
|
|
143
|
-
$eq: d(function(a, l) {
|
|
144
|
-
return a(l);
|
|
145
|
-
}),
|
|
146
|
-
$ne: T(function(a, l) {
|
|
147
|
-
return a(l);
|
|
148
|
-
}),
|
|
149
|
-
$gt: d(function(a, l) {
|
|
150
|
-
return a(l);
|
|
151
|
-
}),
|
|
152
|
-
$gte: d(function(a, l) {
|
|
153
|
-
return a(l);
|
|
154
|
-
}),
|
|
155
|
-
$lt: d(function(a, l) {
|
|
156
|
-
return a(l);
|
|
157
|
-
}),
|
|
158
|
-
$lte: d(function(a, l) {
|
|
159
|
-
return a(l);
|
|
160
|
-
}),
|
|
161
|
-
$mod: d(function(a, l) {
|
|
162
|
-
return a(l);
|
|
163
|
-
}),
|
|
164
|
-
$in: function(a, l) {
|
|
165
|
-
return a(l);
|
|
166
|
-
},
|
|
167
|
-
$nin: function(a, l) {
|
|
168
|
-
return a(l);
|
|
169
|
-
},
|
|
170
|
-
$not: function(a, l, v, w) {
|
|
171
|
-
return a(l, v, w);
|
|
172
|
-
},
|
|
173
|
-
$type: function(a, l) {
|
|
174
|
-
return a(l);
|
|
175
|
-
},
|
|
176
|
-
$all: function(a, l, v, w) {
|
|
177
|
-
return h.$and(a, l, v, w);
|
|
178
|
-
},
|
|
179
|
-
$size: function(a, l) {
|
|
180
|
-
return !!l && a === l.length;
|
|
181
|
-
},
|
|
182
|
-
$or: function(a, l, v, w) {
|
|
183
|
-
for (var R = 0, u = a.length; R < u; R++)
|
|
184
|
-
if (g(b(a, R), l, v, w))
|
|
185
|
-
return !0;
|
|
186
|
-
return !1;
|
|
187
|
-
},
|
|
188
|
-
$nor: function(a, l, v, w) {
|
|
189
|
-
return !h.$or(a, l, v, w);
|
|
190
|
-
},
|
|
191
|
-
$and: function(a, l, v, w) {
|
|
192
|
-
for (var R = 0, u = a.length; R < u; R++)
|
|
193
|
-
if (!g(b(a, R), l, v, w))
|
|
194
|
-
return !1;
|
|
195
|
-
return !0;
|
|
196
|
-
},
|
|
197
|
-
$regex: d(function(a, l) {
|
|
198
|
-
return typeof l == "string" && a.test(l);
|
|
199
|
-
}),
|
|
200
|
-
$where: function(a, l, v, w) {
|
|
201
|
-
return a.call(l, l, v, w);
|
|
202
|
-
},
|
|
203
|
-
$elemMatch: function(a, l, v, w) {
|
|
204
|
-
return m(l) ? !!~function(R, u) {
|
|
205
|
-
for (var p = 0; p < R.length; p++)
|
|
206
|
-
if (b(R, p), g(u, b(R, p)))
|
|
207
|
-
return p;
|
|
208
|
-
return -1;
|
|
209
|
-
}(l, a) : g(a, l, v, w);
|
|
210
|
-
},
|
|
211
|
-
$exists: function(a, l, v, w) {
|
|
212
|
-
return w.hasOwnProperty(v) === a;
|
|
213
|
-
}
|
|
214
|
-
}, O = {
|
|
215
|
-
$eq: function(a, l, v) {
|
|
216
|
-
var w = v.comparable, R = v.compare;
|
|
217
|
-
return a instanceof RegExp ? d(function(u) {
|
|
218
|
-
return typeof u == "string" && a.test(u);
|
|
219
|
-
}) : a instanceof Function ? d(a) : m(a) && !a.length ? d(function(u) {
|
|
220
|
-
return m(u) && !u.length;
|
|
221
|
-
}) : d(
|
|
222
|
-
a === null ? function(u) {
|
|
223
|
-
return u == null;
|
|
224
|
-
} : function(u) {
|
|
225
|
-
return R(w(u), w(a)) === 0;
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
},
|
|
229
|
-
$gt: function(a, l, v) {
|
|
230
|
-
var w = v.comparable, R = v.compare;
|
|
231
|
-
return function(u) {
|
|
232
|
-
return R(w(u), w(a)) > 0;
|
|
233
|
-
};
|
|
234
|
-
},
|
|
235
|
-
$gte: function(a, l, v) {
|
|
236
|
-
var w = v.comparable, R = v.compare;
|
|
237
|
-
return function(u) {
|
|
238
|
-
return R(w(u), w(a)) >= 0;
|
|
239
|
-
};
|
|
240
|
-
},
|
|
241
|
-
$lt: function(a, l, v) {
|
|
242
|
-
var w = v.comparable, R = v.compare;
|
|
243
|
-
return function(u) {
|
|
244
|
-
return R(w(u), w(a)) < 0;
|
|
245
|
-
};
|
|
246
|
-
},
|
|
247
|
-
$lte: function(a, l, v) {
|
|
248
|
-
var w = v.comparable, R = v.compare;
|
|
249
|
-
return function(u) {
|
|
250
|
-
return R(w(u), w(a)) <= 0;
|
|
251
|
-
};
|
|
252
|
-
},
|
|
253
|
-
$in: function(a, l, v) {
|
|
254
|
-
var w = v.comparable;
|
|
255
|
-
return function(R) {
|
|
256
|
-
if (!(R instanceof Array)) {
|
|
257
|
-
var u = w(R);
|
|
258
|
-
if (u === R && o(R) === "object") {
|
|
259
|
-
for (_ = a.length; _--; )
|
|
260
|
-
if (String(a[_]) === String(R) && String(R) !== "[object Object]")
|
|
261
|
-
return !0;
|
|
262
|
-
}
|
|
263
|
-
if (u === void 0) {
|
|
264
|
-
for (_ = a.length; _--; )
|
|
265
|
-
if (a[_] == null)
|
|
266
|
-
return !0;
|
|
267
|
-
}
|
|
268
|
-
for (_ = a.length; _--; ) {
|
|
269
|
-
var p = g(J(b(a, _), v), u, _, a);
|
|
270
|
-
if (p && String(p) !== "[object Object]" && String(u) !== "[object Object]")
|
|
271
|
-
return !0;
|
|
272
|
-
}
|
|
273
|
-
return !!~a.indexOf(u);
|
|
274
|
-
}
|
|
275
|
-
for (var _ = R.length; _--; )
|
|
276
|
-
if (~a.indexOf(w(b(R, _))))
|
|
277
|
-
return !0;
|
|
278
|
-
return !1;
|
|
279
|
-
};
|
|
280
|
-
},
|
|
281
|
-
$nin: function(a, l, v) {
|
|
282
|
-
var w = O.$in(a, l, v);
|
|
283
|
-
return function(R, u, p, _) {
|
|
284
|
-
return !w(R, u, p, _);
|
|
285
|
-
};
|
|
286
|
-
},
|
|
287
|
-
$mod: function(a) {
|
|
288
|
-
return function(l) {
|
|
289
|
-
return l % a[0] == a[1];
|
|
290
|
-
};
|
|
291
|
-
},
|
|
292
|
-
$ne: function(a, l, v) {
|
|
293
|
-
var w = O.$eq(a, l, v);
|
|
294
|
-
return T(function(R, u, p, _) {
|
|
295
|
-
return !w(R, u, p, _);
|
|
296
|
-
});
|
|
297
|
-
},
|
|
298
|
-
$and: function(a, l, v) {
|
|
299
|
-
return a.map(I(v));
|
|
300
|
-
},
|
|
301
|
-
$all: function(a, l, v) {
|
|
302
|
-
return O.$and(a, l, v);
|
|
303
|
-
},
|
|
304
|
-
$or: function(a, l, v) {
|
|
305
|
-
return a.map(I(v));
|
|
306
|
-
},
|
|
307
|
-
$nor: function(a, l, v) {
|
|
308
|
-
return a.map(I(v));
|
|
309
|
-
},
|
|
310
|
-
$not: function(a, l, v) {
|
|
311
|
-
var w = I(v)(a);
|
|
312
|
-
return function(R, u, p) {
|
|
313
|
-
return !g(w, R, u, p);
|
|
314
|
-
};
|
|
315
|
-
},
|
|
316
|
-
$type: function(a) {
|
|
317
|
-
return function(l, v, w) {
|
|
318
|
-
return l != null && (l instanceof a || l.constructor == a);
|
|
319
|
-
};
|
|
320
|
-
},
|
|
321
|
-
$regex: function(a, l) {
|
|
322
|
-
return new RegExp(a, l.$options);
|
|
323
|
-
},
|
|
324
|
-
$where: function(a) {
|
|
325
|
-
if (typeof a == "function")
|
|
326
|
-
return a;
|
|
327
|
-
throw new Error(
|
|
328
|
-
'In CSP mode, sift does not support strings in "$where" condition'
|
|
329
|
-
);
|
|
330
|
-
},
|
|
331
|
-
$elemMatch: function(a, l, v) {
|
|
332
|
-
return I(v)(a);
|
|
333
|
-
},
|
|
334
|
-
$exists: function(a) {
|
|
335
|
-
return !!a;
|
|
336
|
-
}
|
|
337
|
-
};
|
|
338
|
-
function N(a, l) {
|
|
339
|
-
return { options: a, validate: l };
|
|
340
|
-
}
|
|
341
|
-
function C(a, l) {
|
|
342
|
-
var v = a.keyPath, w = a.child, R = a.query, u = [];
|
|
343
|
-
if (function k(V, B, X, q, ue) {
|
|
344
|
-
if (X === B.length || V == null)
|
|
345
|
-
return void ue.push([V, B[X - 1], q]);
|
|
346
|
-
var _t = b(B, X);
|
|
347
|
-
if (m(V) && isNaN(Number(_t)))
|
|
348
|
-
for (var Ge = 0, Or = V.length; Ge < Or; Ge++)
|
|
349
|
-
k(b(V, Ge), B, X, V, ue);
|
|
350
|
-
else
|
|
351
|
-
k(b(V, _t), B, X + 1, V, ue);
|
|
352
|
-
}(l, v, 0, l, u), u.length === 1) {
|
|
353
|
-
var p = u[0];
|
|
354
|
-
return g(w, p[0], p[1], p[2]);
|
|
355
|
-
}
|
|
356
|
-
for (var _ = R && R.$ne !== void 0, A = _, P = 0; P < u.length; P++) {
|
|
357
|
-
var y = u[P], L = g(w, y[0], y[1], y[2]);
|
|
358
|
-
_ ? A &= L : A |= L;
|
|
359
|
-
}
|
|
360
|
-
return A;
|
|
361
|
-
}
|
|
362
|
-
function F(a, l, v) {
|
|
363
|
-
return N({ keyPath: a, child: l, query: v }, C);
|
|
364
|
-
}
|
|
365
|
-
function I(a) {
|
|
366
|
-
var l = a.comparable, v = a.expressions, w = function(p) {
|
|
367
|
-
var _;
|
|
368
|
-
return (!p || !(_ = p) || _.constructor !== Object && _.constructor !== Array && _.constructor.toString() !== "function Object() { [native code] }" && _.constructor.toString() !== "function Array() { [native code] }" || _.toJSON) && (p = { $eq: p }), p;
|
|
369
|
-
}, R = function(p) {
|
|
370
|
-
p = l(p);
|
|
371
|
-
var _ = [];
|
|
372
|
-
for (var A in p) {
|
|
373
|
-
var P = p[A];
|
|
374
|
-
if (A !== "$options") {
|
|
375
|
-
var y = h[A] || a && v && v[A];
|
|
376
|
-
if (y)
|
|
377
|
-
O[A] && (P = O[A](P, p, a)), _.push(N(l(P), y));
|
|
378
|
-
else {
|
|
379
|
-
if (A.charCodeAt(0) === 36)
|
|
380
|
-
throw new Error("Unknown operation " + A);
|
|
381
|
-
var L = A.split(".");
|
|
382
|
-
_.push(F(L, u(P), P));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return _.length === 1 ? _[0] : N(_, h.$and);
|
|
387
|
-
}, u = function(p) {
|
|
388
|
-
return p = w(p), function _(A, P) {
|
|
389
|
-
if (!f(A))
|
|
390
|
-
return P;
|
|
391
|
-
for (var y in A)
|
|
392
|
-
P.push(y), _(A[y], P);
|
|
393
|
-
return P;
|
|
394
|
-
}(p, []).join(",").search(/[$.]/) === -1 ? N(p, j) : R(p);
|
|
395
|
-
};
|
|
396
|
-
return function(p) {
|
|
397
|
-
return R(w(p));
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
function j(a, l) {
|
|
401
|
-
if (Object.prototype.toString.call(a) !== Object.prototype.toString.call(l))
|
|
402
|
-
return !1;
|
|
403
|
-
if (f(a)) {
|
|
404
|
-
if (Object.keys(a).length !== Object.keys(l).length)
|
|
405
|
-
return !1;
|
|
406
|
-
for (var v in a)
|
|
407
|
-
if (!j(a[v], l[v]))
|
|
408
|
-
return !1;
|
|
409
|
-
return !0;
|
|
410
|
-
}
|
|
411
|
-
if (m(a)) {
|
|
412
|
-
if (a.length !== l.length)
|
|
413
|
-
return !1;
|
|
414
|
-
for (var w = 0, R = a.length; w < R; w++)
|
|
415
|
-
if (!j(a[w], l[w]))
|
|
416
|
-
return !1;
|
|
417
|
-
return !0;
|
|
418
|
-
}
|
|
419
|
-
return a === l;
|
|
420
|
-
}
|
|
421
|
-
function J(a, l) {
|
|
422
|
-
var v = I(l)(a);
|
|
423
|
-
return l && l.select && (v = {
|
|
424
|
-
options: v,
|
|
425
|
-
validate: function(w, R, u, p) {
|
|
426
|
-
return g(w, R && l.select(R), u, p);
|
|
427
|
-
}
|
|
428
|
-
}), v;
|
|
429
|
-
}
|
|
430
|
-
function Z(a, l) {
|
|
431
|
-
var v = J(a, l = Object.assign({ compare: M, comparable: H }, l));
|
|
432
|
-
return function(w, R, u) {
|
|
433
|
-
return g(v, w, R, u);
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
function M(a, l) {
|
|
437
|
-
if (j(a, l))
|
|
438
|
-
return 0;
|
|
439
|
-
if (o(a) === o(l)) {
|
|
440
|
-
if (a > l)
|
|
441
|
-
return 1;
|
|
442
|
-
if (a < l)
|
|
443
|
-
return -1;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function H(a) {
|
|
447
|
-
return a instanceof Date ? a.getTime() : m(a) ? a.map(H) : a && typeof a.toJSON == "function" ? a.toJSON() : a;
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
]);
|
|
451
|
-
});
|
|
452
|
-
})(mr);
|
|
453
|
-
var Jr = mr.exports;
|
|
454
|
-
const Zr = /* @__PURE__ */ ar(Jr);
|
|
455
|
-
function wt(t, e) {
|
|
456
|
-
for (var r = 0; r < e.length; r++) {
|
|
457
|
-
var n = e[r];
|
|
458
|
-
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
function Qr(t, e, r) {
|
|
462
|
-
return e && wt(t.prototype, e), r && wt(t, r), t;
|
|
463
|
-
}
|
|
464
|
-
function en(t, e) {
|
|
465
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, t.__proto__ = e;
|
|
466
|
-
}
|
|
467
|
-
function nt(t) {
|
|
468
|
-
return nt = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
|
|
469
|
-
return r.__proto__ || Object.getPrototypeOf(r);
|
|
470
|
-
}, nt(t);
|
|
471
|
-
}
|
|
472
|
-
function Fe(t, e) {
|
|
473
|
-
return Fe = Object.setPrototypeOf || function(n, s) {
|
|
474
|
-
return n.__proto__ = s, n;
|
|
475
|
-
}, Fe(t, e);
|
|
476
|
-
}
|
|
477
|
-
function tn() {
|
|
478
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
479
|
-
return !1;
|
|
480
|
-
if (typeof Proxy == "function")
|
|
481
|
-
return !0;
|
|
482
|
-
try {
|
|
483
|
-
return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
484
|
-
})), !0;
|
|
485
|
-
} catch {
|
|
486
|
-
return !1;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
function Le(t, e, r) {
|
|
490
|
-
return tn() ? Le = Reflect.construct : Le = function(s, o, i) {
|
|
491
|
-
var m = [null];
|
|
492
|
-
m.push.apply(m, o);
|
|
493
|
-
var f = Function.bind.apply(s, m), c = new f();
|
|
494
|
-
return i && Fe(c, i.prototype), c;
|
|
495
|
-
}, Le.apply(null, arguments);
|
|
496
|
-
}
|
|
497
|
-
function rn(t) {
|
|
498
|
-
return Function.toString.call(t).indexOf("[native code]") !== -1;
|
|
499
|
-
}
|
|
500
|
-
function st(t) {
|
|
501
|
-
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
502
|
-
return st = function(n) {
|
|
503
|
-
if (n === null || !rn(n))
|
|
504
|
-
return n;
|
|
505
|
-
if (typeof n != "function")
|
|
506
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
507
|
-
if (typeof e < "u") {
|
|
508
|
-
if (e.has(n))
|
|
509
|
-
return e.get(n);
|
|
510
|
-
e.set(n, s);
|
|
511
|
-
}
|
|
512
|
-
function s() {
|
|
513
|
-
return Le(n, arguments, nt(this).constructor);
|
|
514
|
-
}
|
|
515
|
-
return s.prototype = Object.create(n.prototype, {
|
|
516
|
-
constructor: {
|
|
517
|
-
value: s,
|
|
518
|
-
enumerable: !1,
|
|
519
|
-
writable: !0,
|
|
520
|
-
configurable: !0
|
|
521
|
-
}
|
|
522
|
-
}), Fe(s, n);
|
|
523
|
-
}, st(t);
|
|
524
|
-
}
|
|
525
|
-
function Rt(t) {
|
|
526
|
-
if (t === void 0)
|
|
527
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
528
|
-
return t;
|
|
529
|
-
}
|
|
530
|
-
var pr = function(e) {
|
|
531
|
-
return 'Cannot execute "' + e.action + '" on "' + e.subjectName + '"';
|
|
532
|
-
}, Re = pr, nn = /* @__PURE__ */ function(t) {
|
|
533
|
-
en(e, t), e.setDefaultMessage = function(s) {
|
|
534
|
-
s === null ? Re = pr : Re = typeof s == "string" ? function() {
|
|
535
|
-
return s;
|
|
536
|
-
} : s;
|
|
537
|
-
}, e.from = function(s) {
|
|
538
|
-
var o = new this("");
|
|
539
|
-
return Object.defineProperty(o, "ability", {
|
|
540
|
-
value: s
|
|
541
|
-
}), o;
|
|
542
|
-
};
|
|
543
|
-
function e(n, s) {
|
|
544
|
-
var o;
|
|
545
|
-
return s === void 0 && (s = {}), o = t.call(this, n) || this, o._setMetadata(s), o.message = n || Re(Rt(o)), o._customMessage = null, typeof Error.captureStackTrace == "function" && (o.name = o.constructor.name, Error.captureStackTrace(Rt(o), o.constructor)), o;
|
|
546
|
-
}
|
|
547
|
-
var r = e.prototype;
|
|
548
|
-
return r.setMessage = function(s) {
|
|
549
|
-
return this._customMessage = s, this;
|
|
550
|
-
}, r.throwUnlessCan = function(s, o, i) {
|
|
551
|
-
if (!this.ability)
|
|
552
|
-
throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
|
|
553
|
-
var m = this.ability.relevantRuleFor(s, o, i);
|
|
554
|
-
if (!(m && !m.inverted)) {
|
|
555
|
-
this._setMetadata({
|
|
556
|
-
action: s,
|
|
557
|
-
subject: o,
|
|
558
|
-
field: i,
|
|
559
|
-
subjectName: this.ability.subjectName(o)
|
|
560
|
-
});
|
|
561
|
-
var f = m ? m.reason : "";
|
|
562
|
-
throw this.message = this._customMessage || f || Re(this), this;
|
|
563
|
-
}
|
|
564
|
-
}, r._setMetadata = function(s) {
|
|
565
|
-
this.subject = s.subject, this.subjectName = s.subjectName, this.action = s.action, this.field = s.field;
|
|
566
|
-
}, e;
|
|
567
|
-
}(st(Error));
|
|
568
|
-
function at(t) {
|
|
569
|
-
return Array.isArray(t) ? t : [t];
|
|
570
|
-
}
|
|
571
|
-
function sn(t) {
|
|
572
|
-
if (!t || typeof t == "string")
|
|
573
|
-
return t;
|
|
574
|
-
var e = typeof t == "object" ? t.constructor : t;
|
|
575
|
-
return e.modelName || e.name;
|
|
576
|
-
}
|
|
577
|
-
function an(t) {
|
|
578
|
-
return JSON.parse(JSON.stringify(t));
|
|
579
|
-
}
|
|
580
|
-
var on = /[-/\\^$+?.()|[\]{}]/g, ln = /\.?\*+\.?/g, un = /\*+/, cn = /\./g;
|
|
581
|
-
function dn(t, e, r) {
|
|
582
|
-
var n = r[0] === "*" || t[0] === "." && t[t.length - 1] === "." ? "+" : "*", s = t.indexOf("**") === -1 ? "[^.]" : ".", o = t.replace(cn, "\\$&").replace(un, s + n);
|
|
583
|
-
return e + t.length === r.length ? "(?:" + o + ")?" : o;
|
|
584
|
-
}
|
|
585
|
-
function fn(t, e, r) {
|
|
586
|
-
return t === "." && (r[e - 1] === "*" || r[e + 1] === "*") ? t : "\\" + t;
|
|
587
|
-
}
|
|
588
|
-
function mn(t) {
|
|
589
|
-
var e = t.map(function(n) {
|
|
590
|
-
return n.replace(on, fn).replace(ln, dn);
|
|
591
|
-
}), r = e.length > 1 ? "(?:" + e.join("|") + ")" : e[0];
|
|
592
|
-
return new RegExp("^" + r + "$");
|
|
593
|
-
}
|
|
594
|
-
var pn = /* @__PURE__ */ function() {
|
|
595
|
-
function t(r) {
|
|
596
|
-
this.actions = r.actions || r.action, this.subject = r.subject, this.fields = !r.fields || r.fields.length === 0 ? void 0 : at(r.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
597
|
-
writable: !0
|
|
598
|
-
}), this.inverted = !!r.inverted, this.conditions = r.conditions, Object.defineProperty(this, "_matches", {
|
|
599
|
-
writable: !0,
|
|
600
|
-
value: this.conditions ? Zr(this.conditions) : void 0
|
|
601
|
-
}), this.reason = r.reason;
|
|
602
|
-
}
|
|
603
|
-
var e = t.prototype;
|
|
604
|
-
return e.matches = function(n) {
|
|
605
|
-
return this._matches ? typeof n == "string" ? !this.inverted : this._matches(n) : !0;
|
|
606
|
-
}, e.isRelevantFor = function(n, s) {
|
|
607
|
-
return this.fields ? s ? this.matchesField(s) : !this.inverted : !0;
|
|
608
|
-
}, e.matchesField = function(n) {
|
|
609
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : mn(this.fields)), this._fieldsPattern === null || n.indexOf("*") !== -1 ? this.fields.indexOf(n) !== -1 : this._fieldsPattern.test(n);
|
|
610
|
-
}, t;
|
|
611
|
-
}(), te = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), It = {
|
|
612
|
-
crud: ["create", "read", "update", "delete"]
|
|
613
|
-
};
|
|
614
|
-
function At(t, e) {
|
|
615
|
-
return t === e || Array.isArray(e) && e.indexOf(t) !== -1;
|
|
616
|
-
}
|
|
617
|
-
var hn = /* @__PURE__ */ function() {
|
|
618
|
-
t.addAlias = function(n, s) {
|
|
619
|
-
if (n === "manage" || At("manage", s))
|
|
620
|
-
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
621
|
-
if (At(n, s))
|
|
622
|
-
throw new Error("Attempt to alias action to itself: " + n + " -> " + s.toString());
|
|
623
|
-
return It[n] = s, this;
|
|
624
|
-
};
|
|
625
|
-
function t(r, n) {
|
|
626
|
-
n === void 0 && (n = {}), Object.defineProperty(this, "subjectName", {
|
|
627
|
-
value: n.subjectName || sn
|
|
628
|
-
}), this[te] = {
|
|
629
|
-
RuleType: n.RuleType || pn,
|
|
630
|
-
originalRules: r || [],
|
|
631
|
-
hasPerFieldRules: !1,
|
|
632
|
-
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
633
|
-
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
634
|
-
events: {},
|
|
635
|
-
aliases: an(It)
|
|
636
|
-
}, this.update(r);
|
|
637
|
-
}
|
|
638
|
-
var e = t.prototype;
|
|
639
|
-
return e.update = function(n) {
|
|
640
|
-
if (!Array.isArray(n))
|
|
641
|
-
return this;
|
|
642
|
-
var s = {
|
|
643
|
-
rules: n,
|
|
644
|
-
ability: this
|
|
645
|
-
};
|
|
646
|
-
this.emit("update", s), this[te].originalRules = n.slice(0), this[te].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
647
|
-
var o = this.buildIndexFor(n);
|
|
648
|
-
return process.env.NODE_ENV !== "production" && o.isAllInverted && n.length && console.warn("[casl]: Ability contains only inverted rules. That means user will not be able to do any actions. This will be changed to Error throw in the next major version"), this[te].indexedRules = o.rules, this[te].hasPerFieldRules = o.hasPerFieldRules, this.emit("updated", s), this;
|
|
649
|
-
}, e.buildIndexFor = function(n) {
|
|
650
|
-
for (var s = /* @__PURE__ */ Object.create(null), o = this[te].RuleType, i = !0, m = !1, f = 0; f < n.length; f++) {
|
|
651
|
-
var c = new o(n[f]), b = this.expandActions(c.actions), d = at(c.subject), T = n.length - f - 1;
|
|
652
|
-
i = !!(i && c.inverted), !m && c.fields && (m = !0);
|
|
653
|
-
for (var g = 0; g < d.length; g++) {
|
|
654
|
-
var h = d[g];
|
|
655
|
-
s[h] = s[h] || /* @__PURE__ */ Object.create(null);
|
|
656
|
-
for (var O = 0; O < b.length; O++) {
|
|
657
|
-
var N = b[O];
|
|
658
|
-
s[h][N] = s[h][N] || /* @__PURE__ */ Object.create(null), s[h][N][T] = c;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
return {
|
|
663
|
-
isAllInverted: i,
|
|
664
|
-
hasPerFieldRules: m,
|
|
665
|
-
rules: s
|
|
666
|
-
};
|
|
667
|
-
}, e.expandActions = function(n) {
|
|
668
|
-
for (var s = this[te].aliases, o = at(n), i = 0; i < o.length; ) {
|
|
669
|
-
var m = o[i++];
|
|
670
|
-
s.hasOwnProperty(m) && (o = o.concat(s[m]));
|
|
671
|
-
}
|
|
672
|
-
return o;
|
|
673
|
-
}, e.can = function(n, s, o) {
|
|
674
|
-
if (o && typeof o != "string")
|
|
675
|
-
throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
|
|
676
|
-
var i = this.relevantRuleFor(n, s, o);
|
|
677
|
-
return !!i && !i.inverted;
|
|
678
|
-
}, e.relevantRuleFor = function(n, s, o) {
|
|
679
|
-
for (var i = this.rulesFor(n, s, o), m = 0; m < i.length; m++)
|
|
680
|
-
if (i[m].matches(s))
|
|
681
|
-
return i[m];
|
|
682
|
-
return null;
|
|
683
|
-
}, e.possibleRulesFor = function(n, s) {
|
|
684
|
-
var o = this.subjectName(s), i = this[te].mergedRules, m = o + "_" + n;
|
|
685
|
-
return i[m] || (i[m] = this.mergeRulesFor(n, o)), i[m];
|
|
686
|
-
}, e.mergeRulesFor = function(n, s) {
|
|
687
|
-
var o = this[te].indexedRules, i = [s, "all"].reduce(function(m, f) {
|
|
688
|
-
var c = o[f];
|
|
689
|
-
return c ? Object.assign(m, c[n], c.manage) : m;
|
|
690
|
-
}, []);
|
|
691
|
-
return i.filter(Boolean);
|
|
692
|
-
}, e.rulesFor = function(n, s, o) {
|
|
693
|
-
var i = this.possibleRulesFor(n, s);
|
|
694
|
-
return this[te].hasPerFieldRules ? i.filter(function(m) {
|
|
695
|
-
return m.isRelevantFor(s, o);
|
|
696
|
-
}) : i;
|
|
697
|
-
}, e.cannot = function() {
|
|
698
|
-
return !this.can.apply(this, arguments);
|
|
699
|
-
}, e.throwUnlessCan = function() {
|
|
700
|
-
var n;
|
|
701
|
-
console.warn(`
|
|
702
|
-
Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
|
|
703
|
-
Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
|
|
704
|
-
`.trim()), (n = nn.from(this)).throwUnlessCan.apply(n, arguments);
|
|
705
|
-
}, e.on = function(n, s) {
|
|
706
|
-
var o = this[te].events, i = !0;
|
|
707
|
-
return o[n] || (o[n] = []), o[n].push(s), function() {
|
|
708
|
-
if (i) {
|
|
709
|
-
var m = o[n].indexOf(s);
|
|
710
|
-
o[n].splice(m, 1), i = !1;
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
}, e.emit = function(n, s) {
|
|
714
|
-
var o = this[te].events[n];
|
|
715
|
-
o && o.slice(0).forEach(function(i) {
|
|
716
|
-
return i(s);
|
|
717
|
-
});
|
|
718
|
-
}, Qr(t, [{
|
|
719
|
-
key: "rules",
|
|
720
|
-
get: function() {
|
|
721
|
-
return this[te].originalRules;
|
|
722
|
-
}
|
|
723
|
-
}]), t;
|
|
724
|
-
}(), ye;
|
|
725
|
-
((t) => {
|
|
726
|
-
((e) => {
|
|
727
|
-
e[e.feedMe = 0] = "feedMe", e[e.business = 1] = "business", e[e.restaurant = 2] = "restaurant";
|
|
728
|
-
})(t.Level || (t.Level = {})), ((e) => {
|
|
729
|
-
e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete";
|
|
730
|
-
})(t.Action || (t.Action = {}));
|
|
731
|
-
})(ye || (ye = {}));
|
|
732
|
-
((t) => {
|
|
733
|
-
((e) => {
|
|
734
|
-
((r) => {
|
|
735
|
-
r.all = "all", r.restaurant = "restaurant", r.business = "business", r.delivery = "delivery", r.agent = "agent";
|
|
736
|
-
})(e.Feedme || (e.Feedme = {})), ((r) => {
|
|
737
|
-
r.quota = "quota", r.owner = "owner";
|
|
738
|
-
})(e.FeedmeBusinessField || (e.FeedmeBusinessField = {})), ((r) => {
|
|
739
|
-
r.profile = "business::profile", r.restaurant = "business::restaurant", r.menu = "business::menu", r.promotion = "business::promotion", r.voucher = "business::voucher", r.membership = "business::membership", r.stock = "business::stock", r.permission = "business::permission", r.role = "business::role";
|
|
740
|
-
})(e.Business || (e.Business = {})), ((r) => {
|
|
741
|
-
r.restaurant = "restaurant";
|
|
742
|
-
})(e.Restaurant || (e.Restaurant = {}));
|
|
743
|
-
})(t.Subject || (t.Subject = {}));
|
|
744
|
-
})(ye || (ye = {}));
|
|
745
|
-
function vn(t, e) {
|
|
746
|
-
const n = fe().sessionUser.value;
|
|
747
|
-
if (!n)
|
|
748
|
-
return;
|
|
749
|
-
const { isAdmin: s } = n.role, o = n.permissions, i = e.filter((m) => m.businessId === t._id).length;
|
|
750
|
-
return t.restaurantQuota > i && ((n == null ? void 0 : n.id) === t.ownerId || s) && new hn(o).can(
|
|
751
|
-
ye.Action.manage,
|
|
752
|
-
ye.Subject.Feedme.all
|
|
753
|
-
);
|
|
754
|
-
}
|
|
755
|
-
const bn = (t) => {
|
|
756
|
-
const e = re(t || "");
|
|
757
|
-
function r(o) {
|
|
758
|
-
return `${o}`.trim().toLowerCase();
|
|
759
|
-
}
|
|
760
|
-
const n = z(() => r(e.value));
|
|
761
|
-
function s(o) {
|
|
762
|
-
return n.value ? o.some((i) => r(i).includes(n.value)) : !0;
|
|
763
|
-
}
|
|
764
|
-
return { searchKey: e, filter: s };
|
|
765
|
-
};
|
|
766
|
-
function Ot(t = "no name") {
|
|
767
|
-
return {
|
|
768
|
-
name: t,
|
|
769
|
-
address: {
|
|
770
|
-
line1: "",
|
|
771
|
-
line2: "",
|
|
772
|
-
state: "",
|
|
773
|
-
city: "",
|
|
774
|
-
postcode: "",
|
|
775
|
-
country: "",
|
|
776
|
-
coordinates: []
|
|
777
|
-
},
|
|
778
|
-
phoneNo: "",
|
|
779
|
-
regNo: "",
|
|
780
|
-
email: ""
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
|
-
function Pt() {
|
|
784
|
-
return Ee({
|
|
785
|
-
line1: "",
|
|
786
|
-
line2: "",
|
|
787
|
-
city: "",
|
|
788
|
-
postcode: "",
|
|
789
|
-
state: "",
|
|
790
|
-
country: "",
|
|
791
|
-
coordinates: []
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
function Ee(t) {
|
|
795
|
-
return {
|
|
796
|
-
...t,
|
|
797
|
-
get formatted() {
|
|
798
|
-
const { line1: e, line2: r, postcode: n, city: s, state: o, country: i } = t;
|
|
799
|
-
return [e, r || "", n, s, o, i].map((m) => m.replace(/,\s*$/, "")).filter((m) => !!m.trim()).join(", ");
|
|
800
|
-
},
|
|
801
|
-
get isValidPostcode() {
|
|
802
|
-
const e = Number.parseInt(t.postcode);
|
|
803
|
-
return !isNaN(e);
|
|
804
|
-
},
|
|
805
|
-
get isValid() {
|
|
806
|
-
const e = ["line2"];
|
|
807
|
-
return Object.keys(t).filter((r) => !e.includes(r)).every((r) => !!t[r]);
|
|
808
|
-
},
|
|
809
|
-
get isValidCoordinate() {
|
|
810
|
-
return (t.coordinates || []).length === 2;
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
const gn = {
|
|
815
|
-
class: /* @__PURE__ */ Y([
|
|
816
|
-
"flex items-center",
|
|
817
|
-
"px-24 pt-16 pb-8",
|
|
818
|
-
"border-b border-fm-color-neutral-gray-100",
|
|
819
|
-
"space-x-4"
|
|
820
|
-
])
|
|
821
|
-
}, yn = { class: "fm-typo-en-title-sm-600 mr-auto" }, _n = {
|
|
822
|
-
class: /* @__PURE__ */ Y(["flex flex-col", "flex-1 overflow-scroll", "w-full", "px-24"])
|
|
823
|
-
}, $n = /* @__PURE__ */ W({
|
|
824
|
-
__name: "FullScreenForm",
|
|
825
|
-
props: {
|
|
826
|
-
show: { type: Boolean },
|
|
827
|
-
title: {},
|
|
828
|
-
primaryAction: {},
|
|
829
|
-
secondaryActions: {},
|
|
830
|
-
zIndex: { default: 50 }
|
|
831
|
-
},
|
|
832
|
-
emits: ["onPrimary", "onCancel"],
|
|
833
|
-
setup(t, { emit: e }) {
|
|
834
|
-
const r = e, n = () => {
|
|
835
|
-
r("onPrimary");
|
|
836
|
-
}, s = () => {
|
|
837
|
-
r("onCancel");
|
|
838
|
-
};
|
|
839
|
-
return (o, i) => {
|
|
840
|
-
const m = K("fm-button"), f = K("fm-form");
|
|
841
|
-
return x(), Q(Tr, { to: "body" }, [
|
|
842
|
-
S(Lr, { name: "fade" }, {
|
|
843
|
-
default: G(() => [
|
|
844
|
-
o.show ? (x(), Q(f, {
|
|
845
|
-
key: 0,
|
|
846
|
-
"blame-form-child-on-validation-failed": "",
|
|
847
|
-
class: Y(["fixed inset-0", "flex flex-col", "w-screen h-dvh", "bg-fm-color-neutral-white"]),
|
|
848
|
-
style: Ne({ zIndex: o.zIndex }),
|
|
849
|
-
tabindex: "-1",
|
|
850
|
-
onValidationSuccess: n,
|
|
851
|
-
onKeyup: Nr(s, ["esc"])
|
|
852
|
-
}, {
|
|
853
|
-
default: G(() => [
|
|
854
|
-
$("div", gn, [
|
|
855
|
-
$("p", yn, U(o.title), 1),
|
|
856
|
-
ne(o.$slots, "append-title", {}, void 0, !0),
|
|
857
|
-
(x(!0), D(se, null, me(o.secondaryActions, (c) => (x(), Q(m, {
|
|
858
|
-
label: c.label,
|
|
859
|
-
variant: "tertiary",
|
|
860
|
-
onClick: c.click
|
|
861
|
-
}, null, 8, ["label", "onClick"]))), 256)),
|
|
862
|
-
S(m, {
|
|
863
|
-
label: o.primaryAction.label,
|
|
864
|
-
type: "submit",
|
|
865
|
-
variant: "primary"
|
|
866
|
-
}, null, 8, ["label"])
|
|
867
|
-
]),
|
|
868
|
-
$("div", _n, [
|
|
869
|
-
ne(o.$slots, "default", {}, void 0, !0)
|
|
870
|
-
])
|
|
871
|
-
]),
|
|
872
|
-
_: 3
|
|
873
|
-
}, 8, ["style"])) : le("", !0)
|
|
874
|
-
]),
|
|
875
|
-
_: 3
|
|
876
|
-
})
|
|
877
|
-
]);
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
const En = /* @__PURE__ */ cr($n, [["__scopeId", "data-v-5b5c7179"]]), wn = { class: "fm-typo-en-body-lg-600" }, Rn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, St = /* @__PURE__ */ W({
|
|
882
|
-
__name: "FormLabel",
|
|
883
|
-
props: {
|
|
884
|
-
label: {},
|
|
885
|
-
optional: { type: Boolean, default: !1 },
|
|
886
|
-
subLabel: {}
|
|
887
|
-
},
|
|
888
|
-
setup(t) {
|
|
889
|
-
const e = t, r = z(() => e.optional && !e.subLabel ? "(optional)" : e.subLabel);
|
|
890
|
-
return (n, s) => (x(), D("p", wn, [
|
|
891
|
-
Ce(U(n.label) + " ", 1),
|
|
892
|
-
$("span", Rn, U(r.value), 1)
|
|
893
|
-
]));
|
|
894
|
-
}
|
|
895
|
-
}), In = { class: "space-y-4" }, An = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, On = { class: "fm-typo-en-body-lg-600" }, Tt = /* @__PURE__ */ W({
|
|
896
|
-
__name: "InfoBasic",
|
|
897
|
-
props: {
|
|
898
|
-
name: {
|
|
899
|
-
type: String,
|
|
900
|
-
required: !0
|
|
901
|
-
},
|
|
902
|
-
value: {
|
|
903
|
-
type: String,
|
|
904
|
-
required: !0
|
|
905
|
-
}
|
|
906
|
-
},
|
|
907
|
-
setup(t) {
|
|
908
|
-
return (e, r) => (x(), D("div", In, [
|
|
909
|
-
$("div", An, U(t.name), 1),
|
|
910
|
-
$("div", On, U(t.value), 1)
|
|
911
|
-
]));
|
|
912
|
-
}
|
|
913
|
-
}), Pn = {}, Sn = { class: "py-4" };
|
|
914
|
-
function Tn(t, e) {
|
|
915
|
-
return x(), D("div", Sn, e[0] || (e[0] = [
|
|
916
|
-
$("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
|
|
917
|
-
]));
|
|
918
|
-
}
|
|
919
|
-
const Ln = /* @__PURE__ */ cr(Pn, [["render", Tn]]), Nn = {
|
|
920
|
-
key: 0,
|
|
921
|
-
class: "ml-40 w-[320px] fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4"
|
|
922
|
-
}, Cn = { class: "fm-typo-en-title-sm-600" }, Lt = /* @__PURE__ */ W({
|
|
923
|
-
__name: "Summary",
|
|
924
|
-
props: {
|
|
925
|
-
title: {},
|
|
926
|
-
variant: {},
|
|
927
|
-
items: {}
|
|
928
|
-
},
|
|
929
|
-
setup(t) {
|
|
930
|
-
const e = t, r = or();
|
|
931
|
-
function n() {
|
|
932
|
-
r.open({
|
|
933
|
-
title: e.title,
|
|
934
|
-
contentComponent: ke("div", { class: "space-y-4" }, [
|
|
935
|
-
...e.items.map(
|
|
936
|
-
(s) => ke(Tt, {
|
|
937
|
-
name: s.name,
|
|
938
|
-
value: s.value || "--"
|
|
939
|
-
})
|
|
940
|
-
)
|
|
941
|
-
])
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
return (s, o) => {
|
|
945
|
-
const i = K("FmButton");
|
|
946
|
-
return e.variant === "full" ? (x(), D("div", Nn, [
|
|
947
|
-
$("div", Cn, U(s.title), 1),
|
|
948
|
-
S(Ln),
|
|
949
|
-
(x(!0), D(se, null, me(s.items, (m) => (x(), Q(Tt, {
|
|
950
|
-
key: m.name,
|
|
951
|
-
name: m.name,
|
|
952
|
-
value: m.value || "--"
|
|
953
|
-
}, null, 8, ["name", "value"]))), 128))
|
|
954
|
-
])) : (x(), Q(i, {
|
|
955
|
-
key: 1,
|
|
956
|
-
icon: "info",
|
|
957
|
-
variant: "tertiary",
|
|
958
|
-
onClick: n
|
|
959
|
-
}));
|
|
960
|
-
};
|
|
961
|
-
}
|
|
962
|
-
}), kn = {
|
|
963
|
-
key: 0,
|
|
964
|
-
class: "space-y-4"
|
|
965
|
-
}, xn = { class: "fm-typo-en-body-lg-600" }, Vn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Fn = {
|
|
966
|
-
class: /* @__PURE__ */ Y(["absolute inset-0", "h-full w-full", "rounded-md overflow-hidden"])
|
|
967
|
-
}, jn = {
|
|
968
|
-
class: /* @__PURE__ */ Y(["relative z-0", "w-full h-full", "overflow-hidden"])
|
|
969
|
-
}, Mn = ["src"], Un = { class: "fm-typo-en-body-lg-600" }, Dn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, be = /* @__PURE__ */ W({
|
|
970
|
-
__name: "ImageDropField",
|
|
971
|
-
props: {
|
|
972
|
-
label: {},
|
|
973
|
-
subLabel: {},
|
|
974
|
-
modelValue: {},
|
|
975
|
-
previousUrl: {},
|
|
976
|
-
width: { default: 323 },
|
|
977
|
-
height: { default: 216 },
|
|
978
|
-
canDelete: { type: Boolean, default: !0 }
|
|
979
|
-
},
|
|
980
|
-
emits: ["update:model-value", "reset:model-value"],
|
|
981
|
-
setup(t, { emit: e }) {
|
|
982
|
-
const r = t, n = e, s = z(() => r.modelValue ? URL.createObjectURL(r.modelValue) : r.previousUrl);
|
|
983
|
-
return (o, i) => {
|
|
984
|
-
const m = K("fm-icon"), f = K("fm-drop-field");
|
|
985
|
-
return s.value ? (x(), D("div", kn, [
|
|
986
|
-
$("p", xn, [
|
|
987
|
-
Ce(U(r.label) + " ", 1),
|
|
988
|
-
$("span", Vn, U(o.subLabel), 1)
|
|
989
|
-
]),
|
|
990
|
-
$("div", {
|
|
991
|
-
class: Y(["relative", "border-2 border-dashed border-fm-color-neutral-gray-300 rounded-md"]),
|
|
992
|
-
style: Ne({ width: `${r.width}px`, height: `${r.height}px` })
|
|
993
|
-
}, [
|
|
994
|
-
$("div", Fn, [
|
|
995
|
-
$("div", jn, [
|
|
996
|
-
$("img", {
|
|
997
|
-
class: Y(["h-full w-full", "object-cover"]),
|
|
998
|
-
src: s.value,
|
|
999
|
-
alt: "product image"
|
|
1000
|
-
}, null, 8, Mn)
|
|
1001
|
-
])
|
|
1002
|
-
]),
|
|
1003
|
-
o.canDelete ? (x(), D("button", {
|
|
1004
|
-
key: 0,
|
|
1005
|
-
class: Y([
|
|
1006
|
-
"absolute top-12 right-12 z-10",
|
|
1007
|
-
"w-24 h-24 rounded-[50%]",
|
|
1008
|
-
"bg-fm-color-neutral-white"
|
|
1009
|
-
]),
|
|
1010
|
-
type: "button",
|
|
1011
|
-
onClick: i[0] || (i[0] = (c) => n("reset:model-value"))
|
|
1012
|
-
}, [
|
|
1013
|
-
S(m, { name: "close" })
|
|
1014
|
-
])) : le("", !0)
|
|
1015
|
-
], 4)
|
|
1016
|
-
])) : (x(), Q(f, {
|
|
1017
|
-
key: 1,
|
|
1018
|
-
accept: ".jpg, .jpeg, .png, .gif",
|
|
1019
|
-
style: Ne({ width: `${r.width}px`, height: `${r.height}px` }),
|
|
1020
|
-
onFileUpload: i[1] || (i[1] = (c) => n("update:model-value", c))
|
|
1021
|
-
}, {
|
|
1022
|
-
label: G(() => [
|
|
1023
|
-
$("p", Un, [
|
|
1024
|
-
Ce(U(r.label) + " ", 1),
|
|
1025
|
-
$("span", Dn, U(r.subLabel), 1)
|
|
1026
|
-
])
|
|
1027
|
-
]),
|
|
1028
|
-
"accept-text": G(() => i[2] || (i[2] = [
|
|
1029
|
-
$("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Accepts .jpg, .jpeg, .png, .gif ", -1)
|
|
1030
|
-
])),
|
|
1031
|
-
_: 1
|
|
1032
|
-
}, 8, ["style"]));
|
|
1033
|
-
};
|
|
1034
|
-
}
|
|
1035
|
-
}), Bn = { class: "space-y-24" }, Gn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Kn = { class: "flex-1" }, qn = { class: "flex-1" }, zn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Hn = { class: "flex-1" }, Xn = { class: "flex-1" }, Yn = { class: "flex gap-16 xs:flex-col xs:gap-24" }, Wn = { class: "flex-1" }, Jn = { class: "flex-1" }, Zn = /* @__PURE__ */ W({
|
|
1036
|
-
__name: "RestaurantAddress",
|
|
1037
|
-
props: {
|
|
1038
|
-
modelValue: {
|
|
1039
|
-
type: Object,
|
|
1040
|
-
required: !0
|
|
1041
|
-
}
|
|
1042
|
-
},
|
|
1043
|
-
emits: ["update:model-value"],
|
|
1044
|
-
setup(t, { emit: e }) {
|
|
1045
|
-
const { t: r } = pe();
|
|
1046
|
-
Pt();
|
|
1047
|
-
const n = t, s = e, o = z(() => ge(n.modelValue || Pt()));
|
|
1048
|
-
function i(f) {
|
|
1049
|
-
return (f || "").toString();
|
|
1050
|
-
}
|
|
1051
|
-
function m(f) {
|
|
1052
|
-
s("update:model-value", f(o.value));
|
|
1053
|
-
}
|
|
1054
|
-
return (f, c) => {
|
|
1055
|
-
const b = K("FmTextField");
|
|
1056
|
-
return x(), D("div", Bn, [
|
|
1057
|
-
$("div", Gn, [
|
|
1058
|
-
$("div", Kn, [
|
|
1059
|
-
S(b, {
|
|
1060
|
-
"model-value": o.value.line1,
|
|
1061
|
-
label: E(r)("settings.address.line1"),
|
|
1062
|
-
"label-mark": "required",
|
|
1063
|
-
rules: [E(ce)],
|
|
1064
|
-
"onUpdate:modelValue": c[0] || (c[0] = (d) => m((T) => ({ ...T, line1: i(d) })))
|
|
1065
|
-
}, null, 8, ["model-value", "label", "rules"])
|
|
1066
|
-
]),
|
|
1067
|
-
$("div", qn, [
|
|
1068
|
-
S(b, {
|
|
1069
|
-
"model-value": o.value.line2,
|
|
1070
|
-
label: E(r)("settings.address.line2"),
|
|
1071
|
-
"onUpdate:modelValue": c[1] || (c[1] = (d) => m((T) => ({ ...T, line2: i(d) })))
|
|
1072
|
-
}, null, 8, ["model-value", "label"])
|
|
1073
|
-
])
|
|
1074
|
-
]),
|
|
1075
|
-
$("div", zn, [
|
|
1076
|
-
$("div", Hn, [
|
|
1077
|
-
S(b, {
|
|
1078
|
-
"model-value": o.value.city,
|
|
1079
|
-
rules: [E(ce)],
|
|
1080
|
-
label: E(r)("settings.address.city"),
|
|
1081
|
-
"label-mark": "required",
|
|
1082
|
-
"onUpdate:modelValue": c[2] || (c[2] = (d) => m((T) => ({ ...T, city: i(d) })))
|
|
1083
|
-
}, null, 8, ["model-value", "rules", "label"])
|
|
1084
|
-
]),
|
|
1085
|
-
$("div", Xn, [
|
|
1086
|
-
S(b, {
|
|
1087
|
-
"model-value": o.value.postcode,
|
|
1088
|
-
label: E(r)("settings.address.postal_code"),
|
|
1089
|
-
"label-mark": "required",
|
|
1090
|
-
rules: [E(ce)],
|
|
1091
|
-
"onUpdate:modelValue": c[3] || (c[3] = (d) => m((T) => ({ ...T, postcode: i(d) })))
|
|
1092
|
-
}, null, 8, ["model-value", "label", "rules"])
|
|
1093
|
-
])
|
|
1094
|
-
]),
|
|
1095
|
-
$("div", Yn, [
|
|
1096
|
-
$("div", Wn, [
|
|
1097
|
-
S(b, {
|
|
1098
|
-
"model-value": o.value.state,
|
|
1099
|
-
label: E(r)("settings.address.state"),
|
|
1100
|
-
"label-mark": "required",
|
|
1101
|
-
rules: [E(ce)],
|
|
1102
|
-
"onUpdate:modelValue": c[4] || (c[4] = (d) => m((T) => ({ ...T, state: i(d) })))
|
|
1103
|
-
}, null, 8, ["model-value", "label", "rules"])
|
|
1104
|
-
]),
|
|
1105
|
-
$("div", Jn, [
|
|
1106
|
-
S(b, {
|
|
1107
|
-
"model-value": o.value.country,
|
|
1108
|
-
label: E(r)("settings.address.country"),
|
|
1109
|
-
"label-mark": "required",
|
|
1110
|
-
rules: [E(ce)],
|
|
1111
|
-
"onUpdate:modelValue": c[5] || (c[5] = (d) => m((T) => ({ ...T, country: i(d) })))
|
|
1112
|
-
}, null, 8, ["model-value", "label", "rules"])
|
|
1113
|
-
])
|
|
1114
|
-
])
|
|
1115
|
-
]);
|
|
1116
|
-
};
|
|
1117
|
-
}
|
|
1118
|
-
}), Qn = /* @__PURE__ */ W({
|
|
1119
|
-
__name: "GoogleMap",
|
|
1120
|
-
props: {
|
|
1121
|
-
markers: {
|
|
1122
|
-
type: Array,
|
|
1123
|
-
default: () => []
|
|
1124
|
-
},
|
|
1125
|
-
polygons: {
|
|
1126
|
-
type: Array,
|
|
1127
|
-
default: () => []
|
|
1128
|
-
},
|
|
1129
|
-
zoom: {
|
|
1130
|
-
type: Number,
|
|
1131
|
-
default: 14
|
|
1132
|
-
},
|
|
1133
|
-
editable: {
|
|
1134
|
-
type: Boolean,
|
|
1135
|
-
default: !1
|
|
1136
|
-
},
|
|
1137
|
-
center: {
|
|
1138
|
-
type: Object,
|
|
1139
|
-
default: Ve.jb
|
|
1140
|
-
}
|
|
1141
|
-
},
|
|
1142
|
-
emits: ["map-click", "marker-change", "polygon-change", "polygon-right-click"],
|
|
1143
|
-
setup(t, { expose: e, emit: r }) {
|
|
1144
|
-
const n = t, s = r;
|
|
1145
|
-
e({
|
|
1146
|
-
setCenter: (a) => {
|
|
1147
|
-
var l;
|
|
1148
|
-
(l = i.value) == null || l.setCenter(a);
|
|
1149
|
-
}
|
|
1150
|
-
});
|
|
1151
|
-
const o = re(), i = re(null), m = [];
|
|
1152
|
-
function f(a) {
|
|
1153
|
-
return {
|
|
1154
|
-
lat: a.latLng.lat(),
|
|
1155
|
-
lng: a.latLng.lng()
|
|
1156
|
-
};
|
|
1157
|
-
}
|
|
1158
|
-
function c(a, l, v) {
|
|
1159
|
-
const w = ve().maps.event.addListener(a, l, v);
|
|
1160
|
-
m.push(w);
|
|
1161
|
-
}
|
|
1162
|
-
const b = re([]);
|
|
1163
|
-
function d(a, l, v) {
|
|
1164
|
-
c(a, l, v);
|
|
1165
|
-
}
|
|
1166
|
-
function T(a) {
|
|
1167
|
-
g(null), b.value = a.map((l, v) => {
|
|
1168
|
-
const w = ve(), R = new w.maps.Marker({
|
|
1169
|
-
position: l,
|
|
1170
|
-
draggable: !0
|
|
1171
|
-
});
|
|
1172
|
-
return d(R, "dragend", (u) => {
|
|
1173
|
-
s("marker-change", { index: v, position: f(u) });
|
|
1174
|
-
}), R;
|
|
1175
|
-
}), g(i.value);
|
|
1176
|
-
}
|
|
1177
|
-
function g(a) {
|
|
1178
|
-
b.value.map((l) => $t(l).setMap(a));
|
|
1179
|
-
}
|
|
1180
|
-
const h = re([]);
|
|
1181
|
-
function O(a, l, v) {
|
|
1182
|
-
c(a, l, v);
|
|
1183
|
-
}
|
|
1184
|
-
function N(a, l, v) {
|
|
1185
|
-
c(a, l, v);
|
|
1186
|
-
}
|
|
1187
|
-
function C(a) {
|
|
1188
|
-
return h.value[a].getPath().getArray().map(({ lat: v, lng: w }) => ({
|
|
1189
|
-
lat: v(),
|
|
1190
|
-
lng: w()
|
|
1191
|
-
}));
|
|
1192
|
-
}
|
|
1193
|
-
function F(a) {
|
|
1194
|
-
const l = C(a);
|
|
1195
|
-
s("polygon-change", { index: a, path: l });
|
|
1196
|
-
}
|
|
1197
|
-
function I(a, l) {
|
|
1198
|
-
const w = C(a).filter((R, u) => u !== l);
|
|
1199
|
-
s("polygon-change", { index: a, path: w });
|
|
1200
|
-
}
|
|
1201
|
-
function j(a, l) {
|
|
1202
|
-
l.vertex !== void 0 ? I(a, l.vertex) : s("polygon-right-click", a);
|
|
1203
|
-
}
|
|
1204
|
-
function J(a) {
|
|
1205
|
-
Z(null), h.value = a.map((l, v) => {
|
|
1206
|
-
const w = ve(), R = new w.maps.Polygon({
|
|
1207
|
-
paths: l.paths,
|
|
1208
|
-
strokeColor: l.strokeColor,
|
|
1209
|
-
fillColor: l.fillColor,
|
|
1210
|
-
fillOpacity: 0.5,
|
|
1211
|
-
editable: n.editable
|
|
1212
|
-
});
|
|
1213
|
-
return O(R, "contextmenu", (u) => j(v, u)), R.getPaths().forEach((u) => {
|
|
1214
|
-
N(u, "insert_at", () => F(v)), N(u, "set_at", () => F(v));
|
|
1215
|
-
}), R;
|
|
1216
|
-
}), Z(i.value);
|
|
1217
|
-
}
|
|
1218
|
-
function Z(a) {
|
|
1219
|
-
h.value.map((l) => $t(l).setMap(a));
|
|
1220
|
-
}
|
|
1221
|
-
function M(a, l, v) {
|
|
1222
|
-
c(a, l, v);
|
|
1223
|
-
}
|
|
1224
|
-
function H() {
|
|
1225
|
-
const a = ve().maps.Map;
|
|
1226
|
-
i.value = new a(o.value, {
|
|
1227
|
-
center: n.center,
|
|
1228
|
-
zoom: n.zoom,
|
|
1229
|
-
mapTypeControl: !1,
|
|
1230
|
-
streetViewControl: !1,
|
|
1231
|
-
draggable: !0,
|
|
1232
|
-
scrollwheel: !0
|
|
1233
|
-
}), M(i.value, "click", (l) => s("map-click", f(l)));
|
|
1234
|
-
}
|
|
1235
|
-
return rt(() => n.markers, T, { deep: !0 }), rt(() => n.polygons, J, { deep: !0 }), nr(() => {
|
|
1236
|
-
!o.value || !ve() || (H(), T(n.markers), J(n.polygons));
|
|
1237
|
-
}), Cr(() => {
|
|
1238
|
-
m.forEach((a) => a.remove());
|
|
1239
|
-
}), (a, l) => (x(), D("div", {
|
|
1240
|
-
ref_key: "mapRef",
|
|
1241
|
-
ref: o,
|
|
1242
|
-
class: "map app-map"
|
|
1243
|
-
}, null, 512));
|
|
1244
|
-
}
|
|
1245
|
-
}), es = { class: "space-y-24" }, ts = { class: "flex flex-row gap-8" }, rs = { class: "flex gap-8" }, ns = { class: "flex gap-8" }, ss = /* @__PURE__ */ W({
|
|
1246
|
-
__name: "CoordinateDialog",
|
|
1247
|
-
props: {
|
|
1248
|
-
address: {
|
|
1249
|
-
type: String,
|
|
1250
|
-
required: !0
|
|
1251
|
-
},
|
|
1252
|
-
coordinate: {
|
|
1253
|
-
type: Object,
|
|
1254
|
-
default: void 0
|
|
1255
|
-
}
|
|
1256
|
-
},
|
|
1257
|
-
setup(t) {
|
|
1258
|
-
const { t: e } = pe(), r = t, { emitData: n } = qr(), s = lt(
|
|
1259
|
-
ge(r.coordinate ? r.coordinate : Ve.jb)
|
|
1260
|
-
);
|
|
1261
|
-
function o({ position: i }) {
|
|
1262
|
-
s.lat = i.lat, s.lng = i.lng, n(s);
|
|
1263
|
-
}
|
|
1264
|
-
return n(s), (i, m) => (x(), D("div", es, [
|
|
1265
|
-
$("div", null, [
|
|
1266
|
-
$("div", ts, [
|
|
1267
|
-
$("div", null, U(E(e)("settings.coordinate_dialog.address")) + ":", 1),
|
|
1268
|
-
$("div", null, U(t.address || "--"), 1)
|
|
1269
|
-
]),
|
|
1270
|
-
$("div", rs, [
|
|
1271
|
-
$("div", null, U(E(e)("settings.coordinate_dialog.latitude")) + ":", 1),
|
|
1272
|
-
$("div", null, U(s.lat), 1)
|
|
1273
|
-
]),
|
|
1274
|
-
$("div", ns, [
|
|
1275
|
-
$("div", null, U(E(e)("settings.coordinate_dialog.longitude")) + ":", 1),
|
|
1276
|
-
$("div", null, U(s.lng), 1)
|
|
1277
|
-
])
|
|
1278
|
-
]),
|
|
1279
|
-
S(Qn, {
|
|
1280
|
-
class: "w-full",
|
|
1281
|
-
style: { height: "300px" },
|
|
1282
|
-
editable: "",
|
|
1283
|
-
center: s,
|
|
1284
|
-
markers: [s],
|
|
1285
|
-
onMarkerChange: o,
|
|
1286
|
-
onMapClick: m[0] || (m[0] = (f) => o({ position: f }))
|
|
1287
|
-
}, null, 8, ["center", "markers"])
|
|
1288
|
-
]));
|
|
1289
|
-
}
|
|
1290
|
-
}), as = /* @__PURE__ */ W({
|
|
1291
|
-
__name: "CoordinateInput",
|
|
1292
|
-
props: {
|
|
1293
|
-
modelValue: {
|
|
1294
|
-
type: Array,
|
|
1295
|
-
default: void 0
|
|
1296
|
-
},
|
|
1297
|
-
address: {
|
|
1298
|
-
type: Object,
|
|
1299
|
-
required: !0
|
|
1300
|
-
},
|
|
1301
|
-
required: {
|
|
1302
|
-
type: Boolean,
|
|
1303
|
-
default: !1
|
|
1304
|
-
}
|
|
1305
|
-
},
|
|
1306
|
-
emits: ["update:model-value"],
|
|
1307
|
-
setup(t, { emit: e }) {
|
|
1308
|
-
const { t: r } = pe(), n = t, s = e, o = or(), i = z(() => {
|
|
1309
|
-
const d = n.modelValue || [];
|
|
1310
|
-
return d.length < 2 ? null : Mr(d);
|
|
1311
|
-
}), m = z(() => i.value ? `${i.value.lat}, ${i.value.lng}` : "");
|
|
1312
|
-
async function f() {
|
|
1313
|
-
const d = ve().maps.Geocoder, T = new d();
|
|
1314
|
-
let g = i.value;
|
|
1315
|
-
g || await new Promise((h) => {
|
|
1316
|
-
n.address.formatted ? T.geocode({ address: n.address.formatted }, (O) => {
|
|
1317
|
-
var C;
|
|
1318
|
-
const N = (C = O == null ? void 0 : O[0]) == null ? void 0 : C.geometry;
|
|
1319
|
-
g = N ? { lng: N.location.lng(), lat: N.location.lat() } : Ve.jb, h(!0);
|
|
1320
|
-
}) : (g = Ve.jb, h(!0));
|
|
1321
|
-
}), o.open({
|
|
1322
|
-
contentComponent: ss,
|
|
1323
|
-
contentComponentProps: {
|
|
1324
|
-
address: n.address.formatted,
|
|
1325
|
-
coordinate: g
|
|
1326
|
-
},
|
|
1327
|
-
title: r("settings.coordinate_input.dialog.title"),
|
|
1328
|
-
primaryActions: {
|
|
1329
|
-
text: r("settings.coordinate_input.dialog.confirm"),
|
|
1330
|
-
variant: "primary",
|
|
1331
|
-
close: !0
|
|
1332
|
-
},
|
|
1333
|
-
secondaryActions: {
|
|
1334
|
-
text: r("settings.coordinate_input.dialog.delete"),
|
|
1335
|
-
variant: "destructive",
|
|
1336
|
-
close: !0
|
|
1337
|
-
}
|
|
1338
|
-
}).onPrimary(async (h) => {
|
|
1339
|
-
const O = h ? Ur(h) : [];
|
|
1340
|
-
b(), s("update:model-value", O);
|
|
1341
|
-
}).onSecondary(() => {
|
|
1342
|
-
b(), s("update:model-value", []);
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
const c = re(!1);
|
|
1346
|
-
function b() {
|
|
1347
|
-
c.value = !1;
|
|
1348
|
-
}
|
|
1349
|
-
return (d, T) => {
|
|
1350
|
-
const g = K("FmIcon"), h = K("FmField"), O = K("FmFormGroup");
|
|
1351
|
-
return x(), Q(O, {
|
|
1352
|
-
modelValue: i.value,
|
|
1353
|
-
"onUpdate:modelValue": T[0] || (T[0] = (N) => i.value = N),
|
|
1354
|
-
label: E(r)("settings.coordinate_input.title")
|
|
1355
|
-
}, {
|
|
1356
|
-
default: G(() => [
|
|
1357
|
-
S(h, {
|
|
1358
|
-
class: "cursor-pointer",
|
|
1359
|
-
onClick: f
|
|
1360
|
-
}, {
|
|
1361
|
-
prepend: G(() => [
|
|
1362
|
-
ne(d.$slots, "prepend")
|
|
1363
|
-
]),
|
|
1364
|
-
append: G(() => [
|
|
1365
|
-
S(g, {
|
|
1366
|
-
class: "text-fm-color-neutral-gray-400",
|
|
1367
|
-
name: "location_on",
|
|
1368
|
-
outline: "",
|
|
1369
|
-
size: "md"
|
|
1370
|
-
})
|
|
1371
|
-
]),
|
|
1372
|
-
default: G(() => [
|
|
1373
|
-
ne(d.$slots, "default", {}, () => [
|
|
1374
|
-
$("div", {
|
|
1375
|
-
class: Y([[i.value ? "text-fm-color-typo-primary" : "text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1376
|
-
}, U(i.value ? m.value : E(r)("settings.coordinate_input.not_set")), 3)
|
|
1377
|
-
])
|
|
1378
|
-
]),
|
|
1379
|
-
_: 3
|
|
1380
|
-
})
|
|
1381
|
-
]),
|
|
1382
|
-
_: 3
|
|
1383
|
-
}, 8, ["modelValue", "label"]);
|
|
1384
|
-
};
|
|
1385
|
-
}
|
|
1386
|
-
}), os = { class: "w-[140px] pt-16" }, is = { class: "pl-32" }, ls = {
|
|
1387
|
-
key: 1,
|
|
1388
|
-
class: "flex gap-8 items-center my-8"
|
|
1389
|
-
}, us = /* @__PURE__ */ W({
|
|
1390
|
-
__name: "OperationHoursInput",
|
|
1391
|
-
props: {
|
|
1392
|
-
modelValue: {
|
|
1393
|
-
type: Object,
|
|
1394
|
-
default: void 0
|
|
1395
|
-
},
|
|
1396
|
-
title: {
|
|
1397
|
-
type: String,
|
|
1398
|
-
required: !1
|
|
1399
|
-
}
|
|
1400
|
-
},
|
|
1401
|
-
emits: ["update:model-value"],
|
|
1402
|
-
setup(t, { emit: e }) {
|
|
1403
|
-
const r = t, n = e, s = ct(), { t: o } = pe();
|
|
1404
|
-
dt().startOf("week");
|
|
1405
|
-
const i = z(
|
|
1406
|
-
() => [
|
|
1407
|
-
o("settings.operation_hours.mon"),
|
|
1408
|
-
o("settings.operation_hours.tue"),
|
|
1409
|
-
o("settings.operation_hours.wed"),
|
|
1410
|
-
o("settings.operation_hours.thu"),
|
|
1411
|
-
o("settings.operation_hours.fri"),
|
|
1412
|
-
o("settings.operation_hours.sat"),
|
|
1413
|
-
o("settings.operation_hours.sun")
|
|
1414
|
-
].map((C, F) => ({
|
|
1415
|
-
key: F.toString(),
|
|
1416
|
-
label: C,
|
|
1417
|
-
value: F < 6 ? F + 1 : 0,
|
|
1418
|
-
// key of OperatingHours, since data start from sunday, UI start from monday
|
|
1419
|
-
slot: `checkbox-${F}-end`
|
|
1420
|
-
}))
|
|
1421
|
-
), m = z(
|
|
1422
|
-
() => r.modelValue ? Object.values(r.modelValue) : Array.from(Array(7)).map(() => ({
|
|
1423
|
-
enable: !1,
|
|
1424
|
-
hours: []
|
|
1425
|
-
}))
|
|
1426
|
-
), f = z(() => Object.values(m.value).map((C) => C.hours)), c = z(() => m.value.reduce((C, F, I) => (F.hours.length > 0 && C.push(I), C), []));
|
|
1427
|
-
function b() {
|
|
1428
|
-
return { start: "00:00", end: "23:59" };
|
|
1429
|
-
}
|
|
1430
|
-
function d(C) {
|
|
1431
|
-
const F = c.value.find((j) => !C.includes(j));
|
|
1432
|
-
if (F !== void 0) {
|
|
1433
|
-
N((j) => (j[F].enable = !1, j[F].hours = [], j));
|
|
1434
|
-
return;
|
|
1435
|
-
}
|
|
1436
|
-
const I = C.find((j) => !c.value.includes(j));
|
|
1437
|
-
I !== void 0 && m.value[I].hours.length === 0 && N((j) => (j[I].enable = !0, j[I].hours = [b()], j));
|
|
1438
|
-
}
|
|
1439
|
-
function T(C) {
|
|
1440
|
-
N((F) => (F[C].hours.push(b()), F));
|
|
1441
|
-
}
|
|
1442
|
-
function g(C, F) {
|
|
1443
|
-
f.value[C].length > 1 ? N((I) => (I[C].hours.splice(F, 1), I)) : s.open({ title: o("settings.operation_hours.cannot_remove_last"), type: "error" });
|
|
1444
|
-
}
|
|
1445
|
-
function h(C, F, I) {
|
|
1446
|
-
I && N((j) => (j[C].hours[F].start = I, j));
|
|
1447
|
-
}
|
|
1448
|
-
function O(C, F, I) {
|
|
1449
|
-
I && N((j) => (j[C].hours[F].end = I, j));
|
|
1450
|
-
}
|
|
1451
|
-
function N(C) {
|
|
1452
|
-
const F = C(ge(m.value)), I = {
|
|
1453
|
-
0: F[0],
|
|
1454
|
-
1: F[1],
|
|
1455
|
-
2: F[2],
|
|
1456
|
-
3: F[3],
|
|
1457
|
-
4: F[4],
|
|
1458
|
-
5: F[5],
|
|
1459
|
-
6: F[6]
|
|
1460
|
-
};
|
|
1461
|
-
n("update:model-value", I);
|
|
1462
|
-
}
|
|
1463
|
-
return (C, F) => {
|
|
1464
|
-
const I = K("FmCheckbox"), j = K("FmTimePicker"), J = K("FmButton"), Z = K("FmField");
|
|
1465
|
-
return x(), D("div", null, [
|
|
1466
|
-
(x(!0), D(se, null, me(i.value, (M) => (x(), D("div", {
|
|
1467
|
-
key: M.value,
|
|
1468
|
-
class: "flex flex-col items-start"
|
|
1469
|
-
}, [
|
|
1470
|
-
$("div", os, [
|
|
1471
|
-
S(I, {
|
|
1472
|
-
"model-value": c.value,
|
|
1473
|
-
label: M.label,
|
|
1474
|
-
value: M.value,
|
|
1475
|
-
"onUpdate:modelValue": d
|
|
1476
|
-
}, null, 8, ["model-value", "label", "value"])
|
|
1477
|
-
]),
|
|
1478
|
-
$("div", is, [
|
|
1479
|
-
$("div", null, [
|
|
1480
|
-
c.value.includes(M.value) ? (x(!0), D(se, { key: 0 }, me(f.value[M.value], (H, a) => (x(), D("div", {
|
|
1481
|
-
key: a,
|
|
1482
|
-
class: "flex items-center gap-8"
|
|
1483
|
-
}, [
|
|
1484
|
-
S(j, {
|
|
1485
|
-
"model-value": H.start,
|
|
1486
|
-
"onUpdate:modelValue": (l) => h(M.value, a, l)
|
|
1487
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1488
|
-
$("span", {
|
|
1489
|
-
class: Y([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
1490
|
-
}, U(E(o)("settings.operation_hours.to")), 1),
|
|
1491
|
-
S(j, {
|
|
1492
|
-
"model-value": H.end,
|
|
1493
|
-
"onUpdate:modelValue": (l) => O(M.value, a, l)
|
|
1494
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]),
|
|
1495
|
-
S(J, {
|
|
1496
|
-
icon: "close",
|
|
1497
|
-
variant: "tertiary",
|
|
1498
|
-
onClick: (l) => g(M.value, a)
|
|
1499
|
-
}, null, 8, ["onClick"]),
|
|
1500
|
-
S(J, {
|
|
1501
|
-
class: Y(a === 0 ? "" : "invisible"),
|
|
1502
|
-
icon: "add",
|
|
1503
|
-
color: "primary",
|
|
1504
|
-
variant: "secondary",
|
|
1505
|
-
onClick: (l) => T(M.value)
|
|
1506
|
-
}, null, 8, ["class", "onClick"])
|
|
1507
|
-
]))), 128)) : (x(), D("div", ls, [
|
|
1508
|
-
S(Z, null, {
|
|
1509
|
-
default: G(() => [
|
|
1510
|
-
$("div", {
|
|
1511
|
-
class: Y([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1512
|
-
}, U(E(o)("settings.operation_hours.close")), 1)
|
|
1513
|
-
]),
|
|
1514
|
-
_: 1
|
|
1515
|
-
}),
|
|
1516
|
-
$("span", {
|
|
1517
|
-
class: Y([["text-fm-color-typo-tertiary"], "fm-typo-en-body-lg-400"])
|
|
1518
|
-
}, U(E(o)("settings.operation_hours.to")), 1),
|
|
1519
|
-
S(Z, null, {
|
|
1520
|
-
default: G(() => [
|
|
1521
|
-
$("div", {
|
|
1522
|
-
class: Y([["text-fm-color-typo-tertiary"], "break-all fm-typo-en-body-lg-400 line-clamp-1"])
|
|
1523
|
-
}, U(E(o)("settings.operation_hours.close")), 1)
|
|
1524
|
-
]),
|
|
1525
|
-
_: 1
|
|
1526
|
-
})
|
|
1527
|
-
]))
|
|
1528
|
-
])
|
|
1529
|
-
])
|
|
1530
|
-
]))), 128))
|
|
1531
|
-
]);
|
|
1532
|
-
};
|
|
1533
|
-
}
|
|
1534
|
-
}), hr = new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/), vr = [
|
|
1535
|
-
"home",
|
|
1536
|
-
"app",
|
|
1537
|
-
"about",
|
|
1538
|
-
"tnc",
|
|
1539
|
-
"terms-and-conditions",
|
|
1540
|
-
"redirection",
|
|
1541
|
-
"redirect",
|
|
1542
|
-
"auth",
|
|
1543
|
-
"login",
|
|
1544
|
-
"logout",
|
|
1545
|
-
"register",
|
|
1546
|
-
"user",
|
|
1547
|
-
"discovery",
|
|
1548
|
-
"discover",
|
|
1549
|
-
"order",
|
|
1550
|
-
"orders",
|
|
1551
|
-
"membership",
|
|
1552
|
-
"memberships",
|
|
1553
|
-
"member",
|
|
1554
|
-
"members",
|
|
1555
|
-
"benefit",
|
|
1556
|
-
"benefits",
|
|
1557
|
-
"reward",
|
|
1558
|
-
"rewards",
|
|
1559
|
-
"voucher",
|
|
1560
|
-
"vouchers",
|
|
1561
|
-
"search",
|
|
1562
|
-
"restaurant",
|
|
1563
|
-
"restaurants",
|
|
1564
|
-
"business",
|
|
1565
|
-
"businesses",
|
|
1566
|
-
"dine",
|
|
1567
|
-
"profile",
|
|
1568
|
-
"scan",
|
|
1569
|
-
"scanner",
|
|
1570
|
-
"menu",
|
|
1571
|
-
"cart",
|
|
1572
|
-
"me",
|
|
1573
|
-
"v",
|
|
1574
|
-
"active-orders",
|
|
1575
|
-
"qr",
|
|
1576
|
-
"setting",
|
|
1577
|
-
"settings",
|
|
1578
|
-
"error",
|
|
1579
|
-
"supportdetails",
|
|
1580
|
-
"support-details",
|
|
1581
|
-
"stacks",
|
|
1582
|
-
"imulus",
|
|
1583
|
-
"github",
|
|
1584
|
-
"twitter",
|
|
1585
|
-
"facebook",
|
|
1586
|
-
"google",
|
|
1587
|
-
"apple",
|
|
1588
|
-
"about",
|
|
1589
|
-
"account",
|
|
1590
|
-
"activate",
|
|
1591
|
-
"add",
|
|
1592
|
-
"admin",
|
|
1593
|
-
"administrator",
|
|
1594
|
-
"api",
|
|
1595
|
-
"app",
|
|
1596
|
-
"apps",
|
|
1597
|
-
"archive",
|
|
1598
|
-
"archives",
|
|
1599
|
-
"auth",
|
|
1600
|
-
"blog",
|
|
1601
|
-
"cache",
|
|
1602
|
-
"cancel",
|
|
1603
|
-
"careers",
|
|
1604
|
-
"cart",
|
|
1605
|
-
"changelog",
|
|
1606
|
-
"checkout",
|
|
1607
|
-
"codereview",
|
|
1608
|
-
"compare",
|
|
1609
|
-
"config",
|
|
1610
|
-
"configuration",
|
|
1611
|
-
"connect",
|
|
1612
|
-
"contact",
|
|
1613
|
-
"create",
|
|
1614
|
-
"delete",
|
|
1615
|
-
"direct_messages",
|
|
1616
|
-
"documentation",
|
|
1617
|
-
"download",
|
|
1618
|
-
"downloads",
|
|
1619
|
-
"edit",
|
|
1620
|
-
"email",
|
|
1621
|
-
"employment",
|
|
1622
|
-
"enterprise",
|
|
1623
|
-
"faq",
|
|
1624
|
-
"favorites",
|
|
1625
|
-
"feed",
|
|
1626
|
-
"feedback",
|
|
1627
|
-
"feeds",
|
|
1628
|
-
"fleet",
|
|
1629
|
-
"fleets",
|
|
1630
|
-
"follow",
|
|
1631
|
-
"followers",
|
|
1632
|
-
"following",
|
|
1633
|
-
"friend",
|
|
1634
|
-
"friends",
|
|
1635
|
-
"gist",
|
|
1636
|
-
"group",
|
|
1637
|
-
"groups",
|
|
1638
|
-
"help",
|
|
1639
|
-
"home",
|
|
1640
|
-
"hosting",
|
|
1641
|
-
"hostmaster",
|
|
1642
|
-
"idea",
|
|
1643
|
-
"ideas",
|
|
1644
|
-
"index",
|
|
1645
|
-
"info",
|
|
1646
|
-
"invitations",
|
|
1647
|
-
"invite",
|
|
1648
|
-
"is",
|
|
1649
|
-
"it",
|
|
1650
|
-
"job",
|
|
1651
|
-
"jobs",
|
|
1652
|
-
"json",
|
|
1653
|
-
"language",
|
|
1654
|
-
"languages",
|
|
1655
|
-
"lists",
|
|
1656
|
-
"login",
|
|
1657
|
-
"logout",
|
|
1658
|
-
"logs",
|
|
1659
|
-
"mail",
|
|
1660
|
-
"map",
|
|
1661
|
-
"maps",
|
|
1662
|
-
"mine",
|
|
1663
|
-
"mis",
|
|
1664
|
-
"news",
|
|
1665
|
-
"oauth",
|
|
1666
|
-
"oauth_clients",
|
|
1667
|
-
"offers",
|
|
1668
|
-
"openid",
|
|
1669
|
-
"order",
|
|
1670
|
-
"orders",
|
|
1671
|
-
"organizations",
|
|
1672
|
-
"plans",
|
|
1673
|
-
"popular",
|
|
1674
|
-
"post",
|
|
1675
|
-
"postmaster",
|
|
1676
|
-
"privacy",
|
|
1677
|
-
"projects",
|
|
1678
|
-
"put",
|
|
1679
|
-
"recruitment",
|
|
1680
|
-
"register",
|
|
1681
|
-
"remove",
|
|
1682
|
-
"replies",
|
|
1683
|
-
"root",
|
|
1684
|
-
"rss",
|
|
1685
|
-
"sales",
|
|
1686
|
-
"save",
|
|
1687
|
-
"search",
|
|
1688
|
-
"security",
|
|
1689
|
-
"sessions",
|
|
1690
|
-
"settings",
|
|
1691
|
-
"shop",
|
|
1692
|
-
"signup",
|
|
1693
|
-
"sitemap",
|
|
1694
|
-
"ssl",
|
|
1695
|
-
"ssladmin",
|
|
1696
|
-
"ssladministrator",
|
|
1697
|
-
"sslwebmaster",
|
|
1698
|
-
"status",
|
|
1699
|
-
"stories",
|
|
1700
|
-
"styleguide",
|
|
1701
|
-
"subscribe",
|
|
1702
|
-
"subscriptions",
|
|
1703
|
-
"support",
|
|
1704
|
-
"sysadmin",
|
|
1705
|
-
"sysadministrator",
|
|
1706
|
-
"terms",
|
|
1707
|
-
"tour",
|
|
1708
|
-
"translations",
|
|
1709
|
-
"trends",
|
|
1710
|
-
"unfollow",
|
|
1711
|
-
"unsubscribe",
|
|
1712
|
-
"update",
|
|
1713
|
-
"url",
|
|
1714
|
-
"user",
|
|
1715
|
-
"weather",
|
|
1716
|
-
"webmaster",
|
|
1717
|
-
"widget",
|
|
1718
|
-
"widgets",
|
|
1719
|
-
"wiki",
|
|
1720
|
-
"ww",
|
|
1721
|
-
"www",
|
|
1722
|
-
"wwww",
|
|
1723
|
-
"xfn",
|
|
1724
|
-
"xml",
|
|
1725
|
-
"xmpp",
|
|
1726
|
-
"yaml",
|
|
1727
|
-
"yml",
|
|
1728
|
-
"chinese",
|
|
1729
|
-
"mandarin",
|
|
1730
|
-
"spanish",
|
|
1731
|
-
"english",
|
|
1732
|
-
"bengali",
|
|
1733
|
-
"hindi",
|
|
1734
|
-
"portuguese",
|
|
1735
|
-
"russian",
|
|
1736
|
-
"japanese",
|
|
1737
|
-
"german",
|
|
1738
|
-
"wu",
|
|
1739
|
-
"javanese",
|
|
1740
|
-
"korean",
|
|
1741
|
-
"french",
|
|
1742
|
-
"vietnamese",
|
|
1743
|
-
"telugu",
|
|
1744
|
-
"chinese",
|
|
1745
|
-
"marathi",
|
|
1746
|
-
"tamil",
|
|
1747
|
-
"turkish",
|
|
1748
|
-
"urdu",
|
|
1749
|
-
"min-nan",
|
|
1750
|
-
"jinyu",
|
|
1751
|
-
"gujarati",
|
|
1752
|
-
"polish",
|
|
1753
|
-
"arabic",
|
|
1754
|
-
"ukrainian",
|
|
1755
|
-
"italian",
|
|
1756
|
-
"xiang",
|
|
1757
|
-
"malayalam",
|
|
1758
|
-
"hakka",
|
|
1759
|
-
"kannada",
|
|
1760
|
-
"oriya",
|
|
1761
|
-
"panjabi",
|
|
1762
|
-
"sunda",
|
|
1763
|
-
"panjabi",
|
|
1764
|
-
"romanian",
|
|
1765
|
-
"bhojpuri",
|
|
1766
|
-
"azerbaijani",
|
|
1767
|
-
"farsi",
|
|
1768
|
-
"maithili",
|
|
1769
|
-
"hausa",
|
|
1770
|
-
"arabic",
|
|
1771
|
-
"burmese",
|
|
1772
|
-
"serbo-croatian",
|
|
1773
|
-
"gan",
|
|
1774
|
-
"awadhi",
|
|
1775
|
-
"thai",
|
|
1776
|
-
"dutch",
|
|
1777
|
-
"yoruba",
|
|
1778
|
-
"sindhi",
|
|
1779
|
-
"ac",
|
|
1780
|
-
"ad",
|
|
1781
|
-
"ae",
|
|
1782
|
-
"af",
|
|
1783
|
-
"ag",
|
|
1784
|
-
"ai",
|
|
1785
|
-
"al",
|
|
1786
|
-
"am",
|
|
1787
|
-
"an",
|
|
1788
|
-
"ao",
|
|
1789
|
-
"aq",
|
|
1790
|
-
"ar",
|
|
1791
|
-
"as",
|
|
1792
|
-
"at",
|
|
1793
|
-
"au",
|
|
1794
|
-
"aw",
|
|
1795
|
-
"ax",
|
|
1796
|
-
"az",
|
|
1797
|
-
"ba",
|
|
1798
|
-
"bb",
|
|
1799
|
-
"bd",
|
|
1800
|
-
"be",
|
|
1801
|
-
"bf",
|
|
1802
|
-
"bg",
|
|
1803
|
-
"bh",
|
|
1804
|
-
"bi",
|
|
1805
|
-
"bj",
|
|
1806
|
-
"bm",
|
|
1807
|
-
"bn",
|
|
1808
|
-
"bo",
|
|
1809
|
-
"br",
|
|
1810
|
-
"bs",
|
|
1811
|
-
"bt",
|
|
1812
|
-
"bv",
|
|
1813
|
-
"bw",
|
|
1814
|
-
"by",
|
|
1815
|
-
"bz",
|
|
1816
|
-
"ca",
|
|
1817
|
-
"cc",
|
|
1818
|
-
"cd",
|
|
1819
|
-
"cf",
|
|
1820
|
-
"cg",
|
|
1821
|
-
"ch",
|
|
1822
|
-
"ci",
|
|
1823
|
-
"ck",
|
|
1824
|
-
"cl",
|
|
1825
|
-
"cm",
|
|
1826
|
-
"cn",
|
|
1827
|
-
"co",
|
|
1828
|
-
"cr",
|
|
1829
|
-
"cs",
|
|
1830
|
-
"cu",
|
|
1831
|
-
"cv",
|
|
1832
|
-
"cx",
|
|
1833
|
-
"cy",
|
|
1834
|
-
"cz",
|
|
1835
|
-
"dd",
|
|
1836
|
-
"de",
|
|
1837
|
-
"dj",
|
|
1838
|
-
"dk",
|
|
1839
|
-
"dm",
|
|
1840
|
-
"do",
|
|
1841
|
-
"dz",
|
|
1842
|
-
"ec",
|
|
1843
|
-
"ee",
|
|
1844
|
-
"eg",
|
|
1845
|
-
"eh",
|
|
1846
|
-
"er",
|
|
1847
|
-
"es",
|
|
1848
|
-
"et",
|
|
1849
|
-
"eu",
|
|
1850
|
-
"fi",
|
|
1851
|
-
"fj",
|
|
1852
|
-
"fk",
|
|
1853
|
-
"fm",
|
|
1854
|
-
"fo",
|
|
1855
|
-
"fr",
|
|
1856
|
-
"ga",
|
|
1857
|
-
"gb",
|
|
1858
|
-
"gd",
|
|
1859
|
-
"ge",
|
|
1860
|
-
"gf",
|
|
1861
|
-
"gg",
|
|
1862
|
-
"gh",
|
|
1863
|
-
"gi",
|
|
1864
|
-
"gl",
|
|
1865
|
-
"gm",
|
|
1866
|
-
"gn",
|
|
1867
|
-
"gp",
|
|
1868
|
-
"gq",
|
|
1869
|
-
"gr",
|
|
1870
|
-
"gs",
|
|
1871
|
-
"gt",
|
|
1872
|
-
"gu",
|
|
1873
|
-
"gw",
|
|
1874
|
-
"gy",
|
|
1875
|
-
"hk",
|
|
1876
|
-
"hm",
|
|
1877
|
-
"hn",
|
|
1878
|
-
"hr",
|
|
1879
|
-
"ht",
|
|
1880
|
-
"hu",
|
|
1881
|
-
"id",
|
|
1882
|
-
"ie",
|
|
1883
|
-
"il",
|
|
1884
|
-
"im",
|
|
1885
|
-
"in",
|
|
1886
|
-
"io",
|
|
1887
|
-
"iq",
|
|
1888
|
-
"ir",
|
|
1889
|
-
"is",
|
|
1890
|
-
"it",
|
|
1891
|
-
"je",
|
|
1892
|
-
"jm",
|
|
1893
|
-
"jo",
|
|
1894
|
-
"jp",
|
|
1895
|
-
"ke",
|
|
1896
|
-
"kg",
|
|
1897
|
-
"kh",
|
|
1898
|
-
"ki",
|
|
1899
|
-
"km",
|
|
1900
|
-
"kn",
|
|
1901
|
-
"kp",
|
|
1902
|
-
"kr",
|
|
1903
|
-
"kw",
|
|
1904
|
-
"ky",
|
|
1905
|
-
"kz",
|
|
1906
|
-
"la",
|
|
1907
|
-
"lb",
|
|
1908
|
-
"lc",
|
|
1909
|
-
"li",
|
|
1910
|
-
"lk",
|
|
1911
|
-
"lr",
|
|
1912
|
-
"ls",
|
|
1913
|
-
"lt",
|
|
1914
|
-
"lu",
|
|
1915
|
-
"lv",
|
|
1916
|
-
"ly",
|
|
1917
|
-
"ma",
|
|
1918
|
-
"mc",
|
|
1919
|
-
"md",
|
|
1920
|
-
"me",
|
|
1921
|
-
"mg",
|
|
1922
|
-
"mh",
|
|
1923
|
-
"mk",
|
|
1924
|
-
"ml",
|
|
1925
|
-
"mm",
|
|
1926
|
-
"mn",
|
|
1927
|
-
"mo",
|
|
1928
|
-
"mp",
|
|
1929
|
-
"mq",
|
|
1930
|
-
"mr",
|
|
1931
|
-
"ms",
|
|
1932
|
-
"mt",
|
|
1933
|
-
"mu",
|
|
1934
|
-
"mv",
|
|
1935
|
-
"mw",
|
|
1936
|
-
"mx",
|
|
1937
|
-
"my",
|
|
1938
|
-
"mz",
|
|
1939
|
-
"na",
|
|
1940
|
-
"nc",
|
|
1941
|
-
"ne",
|
|
1942
|
-
"nf",
|
|
1943
|
-
"ng",
|
|
1944
|
-
"ni",
|
|
1945
|
-
"nl",
|
|
1946
|
-
"no",
|
|
1947
|
-
"np",
|
|
1948
|
-
"nr",
|
|
1949
|
-
"nu",
|
|
1950
|
-
"nz",
|
|
1951
|
-
"om",
|
|
1952
|
-
"pa",
|
|
1953
|
-
"pe",
|
|
1954
|
-
"pf",
|
|
1955
|
-
"pg",
|
|
1956
|
-
"ph",
|
|
1957
|
-
"pk",
|
|
1958
|
-
"pl",
|
|
1959
|
-
"pm",
|
|
1960
|
-
"pn",
|
|
1961
|
-
"pr",
|
|
1962
|
-
"ps",
|
|
1963
|
-
"pt",
|
|
1964
|
-
"pw",
|
|
1965
|
-
"py",
|
|
1966
|
-
"qa",
|
|
1967
|
-
"re",
|
|
1968
|
-
"ro",
|
|
1969
|
-
"rs",
|
|
1970
|
-
"ru",
|
|
1971
|
-
"rw",
|
|
1972
|
-
"sa",
|
|
1973
|
-
"sb",
|
|
1974
|
-
"sc",
|
|
1975
|
-
"sd",
|
|
1976
|
-
"se",
|
|
1977
|
-
"sg",
|
|
1978
|
-
"sh",
|
|
1979
|
-
"si",
|
|
1980
|
-
"sj",
|
|
1981
|
-
"sk",
|
|
1982
|
-
"sl",
|
|
1983
|
-
"sm",
|
|
1984
|
-
"sn",
|
|
1985
|
-
"so",
|
|
1986
|
-
"sr",
|
|
1987
|
-
"ss",
|
|
1988
|
-
"st",
|
|
1989
|
-
"su",
|
|
1990
|
-
"sv",
|
|
1991
|
-
"sy",
|
|
1992
|
-
"sz",
|
|
1993
|
-
"tc",
|
|
1994
|
-
"td",
|
|
1995
|
-
"tf",
|
|
1996
|
-
"tg",
|
|
1997
|
-
"th",
|
|
1998
|
-
"tj",
|
|
1999
|
-
"tk",
|
|
2000
|
-
"tl",
|
|
2001
|
-
"tm",
|
|
2002
|
-
"tn",
|
|
2003
|
-
"to",
|
|
2004
|
-
"tp",
|
|
2005
|
-
"tr",
|
|
2006
|
-
"tt",
|
|
2007
|
-
"tv",
|
|
2008
|
-
"tw",
|
|
2009
|
-
"tz",
|
|
2010
|
-
"ua",
|
|
2011
|
-
"ug",
|
|
2012
|
-
"uk",
|
|
2013
|
-
"us",
|
|
2014
|
-
"uy",
|
|
2015
|
-
"uz",
|
|
2016
|
-
"va",
|
|
2017
|
-
"vc",
|
|
2018
|
-
"ve",
|
|
2019
|
-
"vg",
|
|
2020
|
-
"vi",
|
|
2021
|
-
"vn",
|
|
2022
|
-
"vu",
|
|
2023
|
-
"wf",
|
|
2024
|
-
"ws",
|
|
2025
|
-
"ye",
|
|
2026
|
-
"yt",
|
|
2027
|
-
"yu",
|
|
2028
|
-
"za",
|
|
2029
|
-
"zm",
|
|
2030
|
-
"zw"
|
|
2031
|
-
];
|
|
2032
|
-
var ot = { exports: {} };
|
|
2033
|
-
const cs = "2.0.0", br = 256, ds = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
2034
|
-
9007199254740991, fs = 16, ms = br - 6, ps = [
|
|
2035
|
-
"major",
|
|
2036
|
-
"premajor",
|
|
2037
|
-
"minor",
|
|
2038
|
-
"preminor",
|
|
2039
|
-
"patch",
|
|
2040
|
-
"prepatch",
|
|
2041
|
-
"prerelease"
|
|
2042
|
-
];
|
|
2043
|
-
var je = {
|
|
2044
|
-
MAX_LENGTH: br,
|
|
2045
|
-
MAX_SAFE_COMPONENT_LENGTH: fs,
|
|
2046
|
-
MAX_SAFE_BUILD_LENGTH: ms,
|
|
2047
|
-
MAX_SAFE_INTEGER: ds,
|
|
2048
|
-
RELEASE_TYPES: ps,
|
|
2049
|
-
SEMVER_SPEC_VERSION: cs,
|
|
2050
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
2051
|
-
FLAG_LOOSE: 2
|
|
2052
|
-
};
|
|
2053
|
-
const hs = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...t) => console.error("SEMVER", ...t) : () => {
|
|
2054
|
-
};
|
|
2055
|
-
var Me = hs;
|
|
2056
|
-
(function(t, e) {
|
|
2057
|
-
const {
|
|
2058
|
-
MAX_SAFE_COMPONENT_LENGTH: r,
|
|
2059
|
-
MAX_SAFE_BUILD_LENGTH: n,
|
|
2060
|
-
MAX_LENGTH: s
|
|
2061
|
-
} = je, o = Me;
|
|
2062
|
-
e = t.exports = {};
|
|
2063
|
-
const i = e.re = [], m = e.safeRe = [], f = e.src = [], c = e.t = {};
|
|
2064
|
-
let b = 0;
|
|
2065
|
-
const d = "[a-zA-Z0-9-]", T = [
|
|
2066
|
-
["\\s", 1],
|
|
2067
|
-
["\\d", s],
|
|
2068
|
-
[d, n]
|
|
2069
|
-
], g = (O) => {
|
|
2070
|
-
for (const [N, C] of T)
|
|
2071
|
-
O = O.split(`${N}*`).join(`${N}{0,${C}}`).split(`${N}+`).join(`${N}{1,${C}}`);
|
|
2072
|
-
return O;
|
|
2073
|
-
}, h = (O, N, C) => {
|
|
2074
|
-
const F = g(N), I = b++;
|
|
2075
|
-
o(O, I, N), c[O] = I, f[I] = N, i[I] = new RegExp(N, C ? "g" : void 0), m[I] = new RegExp(F, C ? "g" : void 0);
|
|
2076
|
-
};
|
|
2077
|
-
h("NUMERICIDENTIFIER", "0|[1-9]\\d*"), h("NUMERICIDENTIFIERLOOSE", "\\d+"), h("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${d}*`), h("MAINVERSION", `(${f[c.NUMERICIDENTIFIER]})\\.(${f[c.NUMERICIDENTIFIER]})\\.(${f[c.NUMERICIDENTIFIER]})`), h("MAINVERSIONLOOSE", `(${f[c.NUMERICIDENTIFIERLOOSE]})\\.(${f[c.NUMERICIDENTIFIERLOOSE]})\\.(${f[c.NUMERICIDENTIFIERLOOSE]})`), h("PRERELEASEIDENTIFIER", `(?:${f[c.NUMERICIDENTIFIER]}|${f[c.NONNUMERICIDENTIFIER]})`), h("PRERELEASEIDENTIFIERLOOSE", `(?:${f[c.NUMERICIDENTIFIERLOOSE]}|${f[c.NONNUMERICIDENTIFIER]})`), h("PRERELEASE", `(?:-(${f[c.PRERELEASEIDENTIFIER]}(?:\\.${f[c.PRERELEASEIDENTIFIER]})*))`), h("PRERELEASELOOSE", `(?:-?(${f[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[c.PRERELEASEIDENTIFIERLOOSE]})*))`), h("BUILDIDENTIFIER", `${d}+`), h("BUILD", `(?:\\+(${f[c.BUILDIDENTIFIER]}(?:\\.${f[c.BUILDIDENTIFIER]})*))`), h("FULLPLAIN", `v?${f[c.MAINVERSION]}${f[c.PRERELEASE]}?${f[c.BUILD]}?`), h("FULL", `^${f[c.FULLPLAIN]}$`), h("LOOSEPLAIN", `[v=\\s]*${f[c.MAINVERSIONLOOSE]}${f[c.PRERELEASELOOSE]}?${f[c.BUILD]}?`), h("LOOSE", `^${f[c.LOOSEPLAIN]}$`), h("GTLT", "((?:<|>)?=?)"), h("XRANGEIDENTIFIERLOOSE", `${f[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), h("XRANGEIDENTIFIER", `${f[c.NUMERICIDENTIFIER]}|x|X|\\*`), h("XRANGEPLAIN", `[v=\\s]*(${f[c.XRANGEIDENTIFIER]})(?:\\.(${f[c.XRANGEIDENTIFIER]})(?:\\.(${f[c.XRANGEIDENTIFIER]})(?:${f[c.PRERELEASE]})?${f[c.BUILD]}?)?)?`), h("XRANGEPLAINLOOSE", `[v=\\s]*(${f[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[c.XRANGEIDENTIFIERLOOSE]})(?:${f[c.PRERELEASELOOSE]})?${f[c.BUILD]}?)?)?`), h("XRANGE", `^${f[c.GTLT]}\\s*${f[c.XRANGEPLAIN]}$`), h("XRANGELOOSE", `^${f[c.GTLT]}\\s*${f[c.XRANGEPLAINLOOSE]}$`), h("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), h("COERCE", `${f[c.COERCEPLAIN]}(?:$|[^\\d])`), h("COERCEFULL", f[c.COERCEPLAIN] + `(?:${f[c.PRERELEASE]})?(?:${f[c.BUILD]})?(?:$|[^\\d])`), h("COERCERTL", f[c.COERCE], !0), h("COERCERTLFULL", f[c.COERCEFULL], !0), h("LONETILDE", "(?:~>?)"), h("TILDETRIM", `(\\s*)${f[c.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", h("TILDE", `^${f[c.LONETILDE]}${f[c.XRANGEPLAIN]}$`), h("TILDELOOSE", `^${f[c.LONETILDE]}${f[c.XRANGEPLAINLOOSE]}$`), h("LONECARET", "(?:\\^)"), h("CARETTRIM", `(\\s*)${f[c.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", h("CARET", `^${f[c.LONECARET]}${f[c.XRANGEPLAIN]}$`), h("CARETLOOSE", `^${f[c.LONECARET]}${f[c.XRANGEPLAINLOOSE]}$`), h("COMPARATORLOOSE", `^${f[c.GTLT]}\\s*(${f[c.LOOSEPLAIN]})$|^$`), h("COMPARATOR", `^${f[c.GTLT]}\\s*(${f[c.FULLPLAIN]})$|^$`), h("COMPARATORTRIM", `(\\s*)${f[c.GTLT]}\\s*(${f[c.LOOSEPLAIN]}|${f[c.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", h("HYPHENRANGE", `^\\s*(${f[c.XRANGEPLAIN]})\\s+-\\s+(${f[c.XRANGEPLAIN]})\\s*$`), h("HYPHENRANGELOOSE", `^\\s*(${f[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[c.XRANGEPLAINLOOSE]})\\s*$`), h("STAR", "(<|>)?=?\\s*\\*"), h("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), h("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
2078
|
-
})(ot, ot.exports);
|
|
2079
|
-
var we = ot.exports;
|
|
2080
|
-
const vs = Object.freeze({ loose: !0 }), bs = Object.freeze({}), gs = (t) => t ? typeof t != "object" ? vs : t : bs;
|
|
2081
|
-
var ft = gs;
|
|
2082
|
-
const Nt = /^[0-9]+$/, gr = (t, e) => {
|
|
2083
|
-
const r = Nt.test(t), n = Nt.test(e);
|
|
2084
|
-
return r && n && (t = +t, e = +e), t === e ? 0 : r && !n ? -1 : n && !r ? 1 : t < e ? -1 : 1;
|
|
2085
|
-
}, ys = (t, e) => gr(e, t);
|
|
2086
|
-
var yr = {
|
|
2087
|
-
compareIdentifiers: gr,
|
|
2088
|
-
rcompareIdentifiers: ys
|
|
2089
|
-
};
|
|
2090
|
-
const Ie = Me, { MAX_LENGTH: Ct, MAX_SAFE_INTEGER: Ae } = je, { safeRe: kt, t: xt } = we, _s = ft, { compareIdentifiers: he } = yr;
|
|
2091
|
-
let $s = class ie {
|
|
2092
|
-
constructor(e, r) {
|
|
2093
|
-
if (r = _s(r), e instanceof ie) {
|
|
2094
|
-
if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease)
|
|
2095
|
-
return e;
|
|
2096
|
-
e = e.version;
|
|
2097
|
-
} else if (typeof e != "string")
|
|
2098
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
|
|
2099
|
-
if (e.length > Ct)
|
|
2100
|
-
throw new TypeError(
|
|
2101
|
-
`version is longer than ${Ct} characters`
|
|
2102
|
-
);
|
|
2103
|
-
Ie("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
|
|
2104
|
-
const n = e.trim().match(r.loose ? kt[xt.LOOSE] : kt[xt.FULL]);
|
|
2105
|
-
if (!n)
|
|
2106
|
-
throw new TypeError(`Invalid Version: ${e}`);
|
|
2107
|
-
if (this.raw = e, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > Ae || this.major < 0)
|
|
2108
|
-
throw new TypeError("Invalid major version");
|
|
2109
|
-
if (this.minor > Ae || this.minor < 0)
|
|
2110
|
-
throw new TypeError("Invalid minor version");
|
|
2111
|
-
if (this.patch > Ae || this.patch < 0)
|
|
2112
|
-
throw new TypeError("Invalid patch version");
|
|
2113
|
-
n[4] ? this.prerelease = n[4].split(".").map((s) => {
|
|
2114
|
-
if (/^[0-9]+$/.test(s)) {
|
|
2115
|
-
const o = +s;
|
|
2116
|
-
if (o >= 0 && o < Ae)
|
|
2117
|
-
return o;
|
|
2118
|
-
}
|
|
2119
|
-
return s;
|
|
2120
|
-
}) : this.prerelease = [], this.build = n[5] ? n[5].split(".") : [], this.format();
|
|
2121
|
-
}
|
|
2122
|
-
format() {
|
|
2123
|
-
return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
|
|
2124
|
-
}
|
|
2125
|
-
toString() {
|
|
2126
|
-
return this.version;
|
|
2127
|
-
}
|
|
2128
|
-
compare(e) {
|
|
2129
|
-
if (Ie("SemVer.compare", this.version, this.options, e), !(e instanceof ie)) {
|
|
2130
|
-
if (typeof e == "string" && e === this.version)
|
|
2131
|
-
return 0;
|
|
2132
|
-
e = new ie(e, this.options);
|
|
2133
|
-
}
|
|
2134
|
-
return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
|
|
2135
|
-
}
|
|
2136
|
-
compareMain(e) {
|
|
2137
|
-
return e instanceof ie || (e = new ie(e, this.options)), he(this.major, e.major) || he(this.minor, e.minor) || he(this.patch, e.patch);
|
|
2138
|
-
}
|
|
2139
|
-
comparePre(e) {
|
|
2140
|
-
if (e instanceof ie || (e = new ie(e, this.options)), this.prerelease.length && !e.prerelease.length)
|
|
2141
|
-
return -1;
|
|
2142
|
-
if (!this.prerelease.length && e.prerelease.length)
|
|
2143
|
-
return 1;
|
|
2144
|
-
if (!this.prerelease.length && !e.prerelease.length)
|
|
2145
|
-
return 0;
|
|
2146
|
-
let r = 0;
|
|
2147
|
-
do {
|
|
2148
|
-
const n = this.prerelease[r], s = e.prerelease[r];
|
|
2149
|
-
if (Ie("prerelease compare", r, n, s), n === void 0 && s === void 0)
|
|
2150
|
-
return 0;
|
|
2151
|
-
if (s === void 0)
|
|
2152
|
-
return 1;
|
|
2153
|
-
if (n === void 0)
|
|
2154
|
-
return -1;
|
|
2155
|
-
if (n === s)
|
|
2156
|
-
continue;
|
|
2157
|
-
return he(n, s);
|
|
2158
|
-
} while (++r);
|
|
2159
|
-
}
|
|
2160
|
-
compareBuild(e) {
|
|
2161
|
-
e instanceof ie || (e = new ie(e, this.options));
|
|
2162
|
-
let r = 0;
|
|
2163
|
-
do {
|
|
2164
|
-
const n = this.build[r], s = e.build[r];
|
|
2165
|
-
if (Ie("build compare", r, n, s), n === void 0 && s === void 0)
|
|
2166
|
-
return 0;
|
|
2167
|
-
if (s === void 0)
|
|
2168
|
-
return 1;
|
|
2169
|
-
if (n === void 0)
|
|
2170
|
-
return -1;
|
|
2171
|
-
if (n === s)
|
|
2172
|
-
continue;
|
|
2173
|
-
return he(n, s);
|
|
2174
|
-
} while (++r);
|
|
2175
|
-
}
|
|
2176
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
2177
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
2178
|
-
inc(e, r, n) {
|
|
2179
|
-
switch (e) {
|
|
2180
|
-
case "premajor":
|
|
2181
|
-
this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", r, n);
|
|
2182
|
-
break;
|
|
2183
|
-
case "preminor":
|
|
2184
|
-
this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", r, n);
|
|
2185
|
-
break;
|
|
2186
|
-
case "prepatch":
|
|
2187
|
-
this.prerelease.length = 0, this.inc("patch", r, n), this.inc("pre", r, n);
|
|
2188
|
-
break;
|
|
2189
|
-
case "prerelease":
|
|
2190
|
-
this.prerelease.length === 0 && this.inc("patch", r, n), this.inc("pre", r, n);
|
|
2191
|
-
break;
|
|
2192
|
-
case "major":
|
|
2193
|
-
(this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
|
|
2194
|
-
break;
|
|
2195
|
-
case "minor":
|
|
2196
|
-
(this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
|
|
2197
|
-
break;
|
|
2198
|
-
case "patch":
|
|
2199
|
-
this.prerelease.length === 0 && this.patch++, this.prerelease = [];
|
|
2200
|
-
break;
|
|
2201
|
-
case "pre": {
|
|
2202
|
-
const s = Number(n) ? 1 : 0;
|
|
2203
|
-
if (!r && n === !1)
|
|
2204
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
2205
|
-
if (this.prerelease.length === 0)
|
|
2206
|
-
this.prerelease = [s];
|
|
2207
|
-
else {
|
|
2208
|
-
let o = this.prerelease.length;
|
|
2209
|
-
for (; --o >= 0; )
|
|
2210
|
-
typeof this.prerelease[o] == "number" && (this.prerelease[o]++, o = -2);
|
|
2211
|
-
if (o === -1) {
|
|
2212
|
-
if (r === this.prerelease.join(".") && n === !1)
|
|
2213
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
2214
|
-
this.prerelease.push(s);
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
|
-
if (r) {
|
|
2218
|
-
let o = [r, s];
|
|
2219
|
-
n === !1 && (o = [r]), he(this.prerelease[0], r) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = o) : this.prerelease = o;
|
|
2220
|
-
}
|
|
2221
|
-
break;
|
|
2222
|
-
}
|
|
2223
|
-
default:
|
|
2224
|
-
throw new Error(`invalid increment argument: ${e}`);
|
|
2225
|
-
}
|
|
2226
|
-
return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
|
|
2227
|
-
}
|
|
2228
|
-
};
|
|
2229
|
-
var ee = $s;
|
|
2230
|
-
const Vt = ee, Es = (t, e, r = !1) => {
|
|
2231
|
-
if (t instanceof Vt)
|
|
2232
|
-
return t;
|
|
2233
|
-
try {
|
|
2234
|
-
return new Vt(t, e);
|
|
2235
|
-
} catch (n) {
|
|
2236
|
-
if (!r)
|
|
2237
|
-
return null;
|
|
2238
|
-
throw n;
|
|
2239
|
-
}
|
|
2240
|
-
};
|
|
2241
|
-
var _e = Es;
|
|
2242
|
-
const ws = _e, Rs = (t, e) => {
|
|
2243
|
-
const r = ws(t, e);
|
|
2244
|
-
return r ? r.version : null;
|
|
2245
|
-
};
|
|
2246
|
-
var Is = Rs;
|
|
2247
|
-
const As = _e, Os = (t, e) => {
|
|
2248
|
-
const r = As(t.trim().replace(/^[=v]+/, ""), e);
|
|
2249
|
-
return r ? r.version : null;
|
|
2250
|
-
};
|
|
2251
|
-
var Ps = Os;
|
|
2252
|
-
const Ft = ee, Ss = (t, e, r, n, s) => {
|
|
2253
|
-
typeof r == "string" && (s = n, n = r, r = void 0);
|
|
2254
|
-
try {
|
|
2255
|
-
return new Ft(
|
|
2256
|
-
t instanceof Ft ? t.version : t,
|
|
2257
|
-
r
|
|
2258
|
-
).inc(e, n, s).version;
|
|
2259
|
-
} catch {
|
|
2260
|
-
return null;
|
|
2261
|
-
}
|
|
2262
|
-
};
|
|
2263
|
-
var Ts = Ss;
|
|
2264
|
-
const jt = _e, Ls = (t, e) => {
|
|
2265
|
-
const r = jt(t, null, !0), n = jt(e, null, !0), s = r.compare(n);
|
|
2266
|
-
if (s === 0)
|
|
2267
|
-
return null;
|
|
2268
|
-
const o = s > 0, i = o ? r : n, m = o ? n : r, f = !!i.prerelease.length;
|
|
2269
|
-
if (!!m.prerelease.length && !f)
|
|
2270
|
-
return !m.patch && !m.minor ? "major" : i.patch ? "patch" : i.minor ? "minor" : "major";
|
|
2271
|
-
const b = f ? "pre" : "";
|
|
2272
|
-
return r.major !== n.major ? b + "major" : r.minor !== n.minor ? b + "minor" : r.patch !== n.patch ? b + "patch" : "prerelease";
|
|
2273
|
-
};
|
|
2274
|
-
var Ns = Ls;
|
|
2275
|
-
const Cs = ee, ks = (t, e) => new Cs(t, e).major;
|
|
2276
|
-
var xs = ks;
|
|
2277
|
-
const Vs = ee, Fs = (t, e) => new Vs(t, e).minor;
|
|
2278
|
-
var js = Fs;
|
|
2279
|
-
const Ms = ee, Us = (t, e) => new Ms(t, e).patch;
|
|
2280
|
-
var Ds = Us;
|
|
2281
|
-
const Bs = _e, Gs = (t, e) => {
|
|
2282
|
-
const r = Bs(t, e);
|
|
2283
|
-
return r && r.prerelease.length ? r.prerelease : null;
|
|
2284
|
-
};
|
|
2285
|
-
var Ks = Gs;
|
|
2286
|
-
const Mt = ee, qs = (t, e, r) => new Mt(t, r).compare(new Mt(e, r));
|
|
2287
|
-
var ae = qs;
|
|
2288
|
-
const zs = ae, Hs = (t, e, r) => zs(e, t, r);
|
|
2289
|
-
var Xs = Hs;
|
|
2290
|
-
const Ys = ae, Ws = (t, e) => Ys(t, e, !0);
|
|
2291
|
-
var Js = Ws;
|
|
2292
|
-
const Ut = ee, Zs = (t, e, r) => {
|
|
2293
|
-
const n = new Ut(t, r), s = new Ut(e, r);
|
|
2294
|
-
return n.compare(s) || n.compareBuild(s);
|
|
2295
|
-
};
|
|
2296
|
-
var mt = Zs;
|
|
2297
|
-
const Qs = mt, ea = (t, e) => t.sort((r, n) => Qs(r, n, e));
|
|
2298
|
-
var ta = ea;
|
|
2299
|
-
const ra = mt, na = (t, e) => t.sort((r, n) => ra(n, r, e));
|
|
2300
|
-
var sa = na;
|
|
2301
|
-
const aa = ae, oa = (t, e, r) => aa(t, e, r) > 0;
|
|
2302
|
-
var Ue = oa;
|
|
2303
|
-
const ia = ae, la = (t, e, r) => ia(t, e, r) < 0;
|
|
2304
|
-
var pt = la;
|
|
2305
|
-
const ua = ae, ca = (t, e, r) => ua(t, e, r) === 0;
|
|
2306
|
-
var _r = ca;
|
|
2307
|
-
const da = ae, fa = (t, e, r) => da(t, e, r) !== 0;
|
|
2308
|
-
var $r = fa;
|
|
2309
|
-
const ma = ae, pa = (t, e, r) => ma(t, e, r) >= 0;
|
|
2310
|
-
var ht = pa;
|
|
2311
|
-
const ha = ae, va = (t, e, r) => ha(t, e, r) <= 0;
|
|
2312
|
-
var vt = va;
|
|
2313
|
-
const ba = _r, ga = $r, ya = Ue, _a = ht, $a = pt, Ea = vt, wa = (t, e, r, n) => {
|
|
2314
|
-
switch (e) {
|
|
2315
|
-
case "===":
|
|
2316
|
-
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t === r;
|
|
2317
|
-
case "!==":
|
|
2318
|
-
return typeof t == "object" && (t = t.version), typeof r == "object" && (r = r.version), t !== r;
|
|
2319
|
-
case "":
|
|
2320
|
-
case "=":
|
|
2321
|
-
case "==":
|
|
2322
|
-
return ba(t, r, n);
|
|
2323
|
-
case "!=":
|
|
2324
|
-
return ga(t, r, n);
|
|
2325
|
-
case ">":
|
|
2326
|
-
return ya(t, r, n);
|
|
2327
|
-
case ">=":
|
|
2328
|
-
return _a(t, r, n);
|
|
2329
|
-
case "<":
|
|
2330
|
-
return $a(t, r, n);
|
|
2331
|
-
case "<=":
|
|
2332
|
-
return Ea(t, r, n);
|
|
2333
|
-
default:
|
|
2334
|
-
throw new TypeError(`Invalid operator: ${e}`);
|
|
2335
|
-
}
|
|
2336
|
-
};
|
|
2337
|
-
var Er = wa;
|
|
2338
|
-
const Ra = ee, Ia = _e, { safeRe: Oe, t: Pe } = we, Aa = (t, e) => {
|
|
2339
|
-
if (t instanceof Ra)
|
|
2340
|
-
return t;
|
|
2341
|
-
if (typeof t == "number" && (t = String(t)), typeof t != "string")
|
|
2342
|
-
return null;
|
|
2343
|
-
e = e || {};
|
|
2344
|
-
let r = null;
|
|
2345
|
-
if (!e.rtl)
|
|
2346
|
-
r = t.match(e.includePrerelease ? Oe[Pe.COERCEFULL] : Oe[Pe.COERCE]);
|
|
2347
|
-
else {
|
|
2348
|
-
const f = e.includePrerelease ? Oe[Pe.COERCERTLFULL] : Oe[Pe.COERCERTL];
|
|
2349
|
-
let c;
|
|
2350
|
-
for (; (c = f.exec(t)) && (!r || r.index + r[0].length !== t.length); )
|
|
2351
|
-
(!r || c.index + c[0].length !== r.index + r[0].length) && (r = c), f.lastIndex = c.index + c[1].length + c[2].length;
|
|
2352
|
-
f.lastIndex = -1;
|
|
2353
|
-
}
|
|
2354
|
-
if (r === null)
|
|
2355
|
-
return null;
|
|
2356
|
-
const n = r[2], s = r[3] || "0", o = r[4] || "0", i = e.includePrerelease && r[5] ? `-${r[5]}` : "", m = e.includePrerelease && r[6] ? `+${r[6]}` : "";
|
|
2357
|
-
return Ia(`${n}.${s}.${o}${i}${m}`, e);
|
|
2358
|
-
};
|
|
2359
|
-
var Oa = Aa;
|
|
2360
|
-
class Pa {
|
|
2361
|
-
constructor() {
|
|
2362
|
-
this.max = 1e3, this.map = /* @__PURE__ */ new Map();
|
|
2363
|
-
}
|
|
2364
|
-
get(e) {
|
|
2365
|
-
const r = this.map.get(e);
|
|
2366
|
-
if (r !== void 0)
|
|
2367
|
-
return this.map.delete(e), this.map.set(e, r), r;
|
|
2368
|
-
}
|
|
2369
|
-
delete(e) {
|
|
2370
|
-
return this.map.delete(e);
|
|
2371
|
-
}
|
|
2372
|
-
set(e, r) {
|
|
2373
|
-
if (!this.delete(e) && r !== void 0) {
|
|
2374
|
-
if (this.map.size >= this.max) {
|
|
2375
|
-
const s = this.map.keys().next().value;
|
|
2376
|
-
this.delete(s);
|
|
2377
|
-
}
|
|
2378
|
-
this.map.set(e, r);
|
|
2379
|
-
}
|
|
2380
|
-
return this;
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
var Sa = Pa, We, Dt;
|
|
2384
|
-
function oe() {
|
|
2385
|
-
if (Dt)
|
|
2386
|
-
return We;
|
|
2387
|
-
Dt = 1;
|
|
2388
|
-
const t = /\s+/g;
|
|
2389
|
-
class e {
|
|
2390
|
-
constructor(p, _) {
|
|
2391
|
-
if (_ = s(_), p instanceof e)
|
|
2392
|
-
return p.loose === !!_.loose && p.includePrerelease === !!_.includePrerelease ? p : new e(p.raw, _);
|
|
2393
|
-
if (p instanceof o)
|
|
2394
|
-
return this.raw = p.value, this.set = [[p]], this.formatted = void 0, this;
|
|
2395
|
-
if (this.options = _, this.loose = !!_.loose, this.includePrerelease = !!_.includePrerelease, this.raw = p.trim().replace(t, " "), this.set = this.raw.split("||").map((A) => this.parseRange(A.trim())).filter((A) => A.length), !this.set.length)
|
|
2396
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
2397
|
-
if (this.set.length > 1) {
|
|
2398
|
-
const A = this.set[0];
|
|
2399
|
-
if (this.set = this.set.filter((P) => !O(P[0])), this.set.length === 0)
|
|
2400
|
-
this.set = [A];
|
|
2401
|
-
else if (this.set.length > 1) {
|
|
2402
|
-
for (const P of this.set)
|
|
2403
|
-
if (P.length === 1 && N(P[0])) {
|
|
2404
|
-
this.set = [P];
|
|
2405
|
-
break;
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
this.formatted = void 0;
|
|
2410
|
-
}
|
|
2411
|
-
get range() {
|
|
2412
|
-
if (this.formatted === void 0) {
|
|
2413
|
-
this.formatted = "";
|
|
2414
|
-
for (let p = 0; p < this.set.length; p++) {
|
|
2415
|
-
p > 0 && (this.formatted += "||");
|
|
2416
|
-
const _ = this.set[p];
|
|
2417
|
-
for (let A = 0; A < _.length; A++)
|
|
2418
|
-
A > 0 && (this.formatted += " "), this.formatted += _[A].toString().trim();
|
|
2419
|
-
}
|
|
2420
|
-
}
|
|
2421
|
-
return this.formatted;
|
|
2422
|
-
}
|
|
2423
|
-
format() {
|
|
2424
|
-
return this.range;
|
|
2425
|
-
}
|
|
2426
|
-
toString() {
|
|
2427
|
-
return this.range;
|
|
2428
|
-
}
|
|
2429
|
-
parseRange(p) {
|
|
2430
|
-
const A = ((this.options.includePrerelease && g) | (this.options.loose && h)) + ":" + p, P = n.get(A);
|
|
2431
|
-
if (P)
|
|
2432
|
-
return P;
|
|
2433
|
-
const y = this.options.loose, L = y ? f[c.HYPHENRANGELOOSE] : f[c.HYPHENRANGE];
|
|
2434
|
-
p = p.replace(L, w(this.options.includePrerelease)), i("hyphen replace", p), p = p.replace(f[c.COMPARATORTRIM], b), i("comparator trim", p), p = p.replace(f[c.TILDETRIM], d), i("tilde trim", p), p = p.replace(f[c.CARETTRIM], T), i("caret trim", p);
|
|
2435
|
-
let k = p.split(" ").map((q) => F(q, this.options)).join(" ").split(/\s+/).map((q) => v(q, this.options));
|
|
2436
|
-
y && (k = k.filter((q) => (i("loose invalid filter", q, this.options), !!q.match(f[c.COMPARATORLOOSE])))), i("range list", k);
|
|
2437
|
-
const V = /* @__PURE__ */ new Map(), B = k.map((q) => new o(q, this.options));
|
|
2438
|
-
for (const q of B) {
|
|
2439
|
-
if (O(q))
|
|
2440
|
-
return [q];
|
|
2441
|
-
V.set(q.value, q);
|
|
2442
|
-
}
|
|
2443
|
-
V.size > 1 && V.has("") && V.delete("");
|
|
2444
|
-
const X = [...V.values()];
|
|
2445
|
-
return n.set(A, X), X;
|
|
2446
|
-
}
|
|
2447
|
-
intersects(p, _) {
|
|
2448
|
-
if (!(p instanceof e))
|
|
2449
|
-
throw new TypeError("a Range is required");
|
|
2450
|
-
return this.set.some((A) => C(A, _) && p.set.some((P) => C(P, _) && A.every((y) => P.every((L) => y.intersects(L, _)))));
|
|
2451
|
-
}
|
|
2452
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
2453
|
-
test(p) {
|
|
2454
|
-
if (!p)
|
|
2455
|
-
return !1;
|
|
2456
|
-
if (typeof p == "string")
|
|
2457
|
-
try {
|
|
2458
|
-
p = new m(p, this.options);
|
|
2459
|
-
} catch {
|
|
2460
|
-
return !1;
|
|
2461
|
-
}
|
|
2462
|
-
for (let _ = 0; _ < this.set.length; _++)
|
|
2463
|
-
if (R(this.set[_], p, this.options))
|
|
2464
|
-
return !0;
|
|
2465
|
-
return !1;
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
We = e;
|
|
2469
|
-
const r = Sa, n = new r(), s = ft, o = De(), i = Me, m = ee, {
|
|
2470
|
-
safeRe: f,
|
|
2471
|
-
t: c,
|
|
2472
|
-
comparatorTrimReplace: b,
|
|
2473
|
-
tildeTrimReplace: d,
|
|
2474
|
-
caretTrimReplace: T
|
|
2475
|
-
} = we, { FLAG_INCLUDE_PRERELEASE: g, FLAG_LOOSE: h } = je, O = (u) => u.value === "<0.0.0-0", N = (u) => u.value === "", C = (u, p) => {
|
|
2476
|
-
let _ = !0;
|
|
2477
|
-
const A = u.slice();
|
|
2478
|
-
let P = A.pop();
|
|
2479
|
-
for (; _ && A.length; )
|
|
2480
|
-
_ = A.every((y) => P.intersects(y, p)), P = A.pop();
|
|
2481
|
-
return _;
|
|
2482
|
-
}, F = (u, p) => (i("comp", u, p), u = Z(u, p), i("caret", u), u = j(u, p), i("tildes", u), u = H(u, p), i("xrange", u), u = l(u, p), i("stars", u), u), I = (u) => !u || u.toLowerCase() === "x" || u === "*", j = (u, p) => u.trim().split(/\s+/).map((_) => J(_, p)).join(" "), J = (u, p) => {
|
|
2483
|
-
const _ = p.loose ? f[c.TILDELOOSE] : f[c.TILDE];
|
|
2484
|
-
return u.replace(_, (A, P, y, L, k) => {
|
|
2485
|
-
i("tilde", u, A, P, y, L, k);
|
|
2486
|
-
let V;
|
|
2487
|
-
return I(P) ? V = "" : I(y) ? V = `>=${P}.0.0 <${+P + 1}.0.0-0` : I(L) ? V = `>=${P}.${y}.0 <${P}.${+y + 1}.0-0` : k ? (i("replaceTilde pr", k), V = `>=${P}.${y}.${L}-${k} <${P}.${+y + 1}.0-0`) : V = `>=${P}.${y}.${L} <${P}.${+y + 1}.0-0`, i("tilde return", V), V;
|
|
2488
|
-
});
|
|
2489
|
-
}, Z = (u, p) => u.trim().split(/\s+/).map((_) => M(_, p)).join(" "), M = (u, p) => {
|
|
2490
|
-
i("caret", u, p);
|
|
2491
|
-
const _ = p.loose ? f[c.CARETLOOSE] : f[c.CARET], A = p.includePrerelease ? "-0" : "";
|
|
2492
|
-
return u.replace(_, (P, y, L, k, V) => {
|
|
2493
|
-
i("caret", u, P, y, L, k, V);
|
|
2494
|
-
let B;
|
|
2495
|
-
return I(y) ? B = "" : I(L) ? B = `>=${y}.0.0${A} <${+y + 1}.0.0-0` : I(k) ? y === "0" ? B = `>=${y}.${L}.0${A} <${y}.${+L + 1}.0-0` : B = `>=${y}.${L}.0${A} <${+y + 1}.0.0-0` : V ? (i("replaceCaret pr", V), y === "0" ? L === "0" ? B = `>=${y}.${L}.${k}-${V} <${y}.${L}.${+k + 1}-0` : B = `>=${y}.${L}.${k}-${V} <${y}.${+L + 1}.0-0` : B = `>=${y}.${L}.${k}-${V} <${+y + 1}.0.0-0`) : (i("no pr"), y === "0" ? L === "0" ? B = `>=${y}.${L}.${k}${A} <${y}.${L}.${+k + 1}-0` : B = `>=${y}.${L}.${k}${A} <${y}.${+L + 1}.0-0` : B = `>=${y}.${L}.${k} <${+y + 1}.0.0-0`), i("caret return", B), B;
|
|
2496
|
-
});
|
|
2497
|
-
}, H = (u, p) => (i("replaceXRanges", u, p), u.split(/\s+/).map((_) => a(_, p)).join(" ")), a = (u, p) => {
|
|
2498
|
-
u = u.trim();
|
|
2499
|
-
const _ = p.loose ? f[c.XRANGELOOSE] : f[c.XRANGE];
|
|
2500
|
-
return u.replace(_, (A, P, y, L, k, V) => {
|
|
2501
|
-
i("xRange", u, A, P, y, L, k, V);
|
|
2502
|
-
const B = I(y), X = B || I(L), q = X || I(k), ue = q;
|
|
2503
|
-
return P === "=" && ue && (P = ""), V = p.includePrerelease ? "-0" : "", B ? P === ">" || P === "<" ? A = "<0.0.0-0" : A = "*" : P && ue ? (X && (L = 0), k = 0, P === ">" ? (P = ">=", X ? (y = +y + 1, L = 0, k = 0) : (L = +L + 1, k = 0)) : P === "<=" && (P = "<", X ? y = +y + 1 : L = +L + 1), P === "<" && (V = "-0"), A = `${P + y}.${L}.${k}${V}`) : X ? A = `>=${y}.0.0${V} <${+y + 1}.0.0-0` : q && (A = `>=${y}.${L}.0${V} <${y}.${+L + 1}.0-0`), i("xRange return", A), A;
|
|
2504
|
-
});
|
|
2505
|
-
}, l = (u, p) => (i("replaceStars", u, p), u.trim().replace(f[c.STAR], "")), v = (u, p) => (i("replaceGTE0", u, p), u.trim().replace(f[p.includePrerelease ? c.GTE0PRE : c.GTE0], "")), w = (u) => (p, _, A, P, y, L, k, V, B, X, q, ue) => (I(A) ? _ = "" : I(P) ? _ = `>=${A}.0.0${u ? "-0" : ""}` : I(y) ? _ = `>=${A}.${P}.0${u ? "-0" : ""}` : L ? _ = `>=${_}` : _ = `>=${_}${u ? "-0" : ""}`, I(B) ? V = "" : I(X) ? V = `<${+B + 1}.0.0-0` : I(q) ? V = `<${B}.${+X + 1}.0-0` : ue ? V = `<=${B}.${X}.${q}-${ue}` : u ? V = `<${B}.${X}.${+q + 1}-0` : V = `<=${V}`, `${_} ${V}`.trim()), R = (u, p, _) => {
|
|
2506
|
-
for (let A = 0; A < u.length; A++)
|
|
2507
|
-
if (!u[A].test(p))
|
|
2508
|
-
return !1;
|
|
2509
|
-
if (p.prerelease.length && !_.includePrerelease) {
|
|
2510
|
-
for (let A = 0; A < u.length; A++)
|
|
2511
|
-
if (i(u[A].semver), u[A].semver !== o.ANY && u[A].semver.prerelease.length > 0) {
|
|
2512
|
-
const P = u[A].semver;
|
|
2513
|
-
if (P.major === p.major && P.minor === p.minor && P.patch === p.patch)
|
|
2514
|
-
return !0;
|
|
2515
|
-
}
|
|
2516
|
-
return !1;
|
|
2517
|
-
}
|
|
2518
|
-
return !0;
|
|
2519
|
-
};
|
|
2520
|
-
return We;
|
|
2521
|
-
}
|
|
2522
|
-
var Je, Bt;
|
|
2523
|
-
function De() {
|
|
2524
|
-
if (Bt)
|
|
2525
|
-
return Je;
|
|
2526
|
-
Bt = 1;
|
|
2527
|
-
const t = Symbol("SemVer ANY");
|
|
2528
|
-
class e {
|
|
2529
|
-
static get ANY() {
|
|
2530
|
-
return t;
|
|
2531
|
-
}
|
|
2532
|
-
constructor(b, d) {
|
|
2533
|
-
if (d = r(d), b instanceof e) {
|
|
2534
|
-
if (b.loose === !!d.loose)
|
|
2535
|
-
return b;
|
|
2536
|
-
b = b.value;
|
|
2537
|
-
}
|
|
2538
|
-
b = b.trim().split(/\s+/).join(" "), i("comparator", b, d), this.options = d, this.loose = !!d.loose, this.parse(b), this.semver === t ? this.value = "" : this.value = this.operator + this.semver.version, i("comp", this);
|
|
2539
|
-
}
|
|
2540
|
-
parse(b) {
|
|
2541
|
-
const d = this.options.loose ? n[s.COMPARATORLOOSE] : n[s.COMPARATOR], T = b.match(d);
|
|
2542
|
-
if (!T)
|
|
2543
|
-
throw new TypeError(`Invalid comparator: ${b}`);
|
|
2544
|
-
this.operator = T[1] !== void 0 ? T[1] : "", this.operator === "=" && (this.operator = ""), T[2] ? this.semver = new m(T[2], this.options.loose) : this.semver = t;
|
|
2545
|
-
}
|
|
2546
|
-
toString() {
|
|
2547
|
-
return this.value;
|
|
2548
|
-
}
|
|
2549
|
-
test(b) {
|
|
2550
|
-
if (i("Comparator.test", b, this.options.loose), this.semver === t || b === t)
|
|
2551
|
-
return !0;
|
|
2552
|
-
if (typeof b == "string")
|
|
2553
|
-
try {
|
|
2554
|
-
b = new m(b, this.options);
|
|
2555
|
-
} catch {
|
|
2556
|
-
return !1;
|
|
2557
|
-
}
|
|
2558
|
-
return o(b, this.operator, this.semver, this.options);
|
|
2559
|
-
}
|
|
2560
|
-
intersects(b, d) {
|
|
2561
|
-
if (!(b instanceof e))
|
|
2562
|
-
throw new TypeError("a Comparator is required");
|
|
2563
|
-
return this.operator === "" ? this.value === "" ? !0 : new f(b.value, d).test(this.value) : b.operator === "" ? b.value === "" ? !0 : new f(this.value, d).test(b.semver) : (d = r(d), d.includePrerelease && (this.value === "<0.0.0-0" || b.value === "<0.0.0-0") || !d.includePrerelease && (this.value.startsWith("<0.0.0") || b.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && b.operator.startsWith(">") || this.operator.startsWith("<") && b.operator.startsWith("<") || this.semver.version === b.semver.version && this.operator.includes("=") && b.operator.includes("=") || o(this.semver, "<", b.semver, d) && this.operator.startsWith(">") && b.operator.startsWith("<") || o(this.semver, ">", b.semver, d) && this.operator.startsWith("<") && b.operator.startsWith(">")));
|
|
2564
|
-
}
|
|
2565
|
-
}
|
|
2566
|
-
Je = e;
|
|
2567
|
-
const r = ft, { safeRe: n, t: s } = we, o = Er, i = Me, m = ee, f = oe();
|
|
2568
|
-
return Je;
|
|
2569
|
-
}
|
|
2570
|
-
const Ta = oe(), La = (t, e, r) => {
|
|
2571
|
-
try {
|
|
2572
|
-
e = new Ta(e, r);
|
|
2573
|
-
} catch {
|
|
2574
|
-
return !1;
|
|
2575
|
-
}
|
|
2576
|
-
return e.test(t);
|
|
2577
|
-
};
|
|
2578
|
-
var Be = La;
|
|
2579
|
-
const Na = oe(), Ca = (t, e) => new Na(t, e).set.map((r) => r.map((n) => n.value).join(" ").trim().split(" "));
|
|
2580
|
-
var ka = Ca;
|
|
2581
|
-
const xa = ee, Va = oe(), Fa = (t, e, r) => {
|
|
2582
|
-
let n = null, s = null, o = null;
|
|
2583
|
-
try {
|
|
2584
|
-
o = new Va(e, r);
|
|
2585
|
-
} catch {
|
|
2586
|
-
return null;
|
|
2587
|
-
}
|
|
2588
|
-
return t.forEach((i) => {
|
|
2589
|
-
o.test(i) && (!n || s.compare(i) === -1) && (n = i, s = new xa(n, r));
|
|
2590
|
-
}), n;
|
|
2591
|
-
};
|
|
2592
|
-
var ja = Fa;
|
|
2593
|
-
const Ma = ee, Ua = oe(), Da = (t, e, r) => {
|
|
2594
|
-
let n = null, s = null, o = null;
|
|
2595
|
-
try {
|
|
2596
|
-
o = new Ua(e, r);
|
|
2597
|
-
} catch {
|
|
2598
|
-
return null;
|
|
2599
|
-
}
|
|
2600
|
-
return t.forEach((i) => {
|
|
2601
|
-
o.test(i) && (!n || s.compare(i) === 1) && (n = i, s = new Ma(n, r));
|
|
2602
|
-
}), n;
|
|
2603
|
-
};
|
|
2604
|
-
var Ba = Da;
|
|
2605
|
-
const Ze = ee, Ga = oe(), Gt = Ue, Ka = (t, e) => {
|
|
2606
|
-
t = new Ga(t, e);
|
|
2607
|
-
let r = new Ze("0.0.0");
|
|
2608
|
-
if (t.test(r) || (r = new Ze("0.0.0-0"), t.test(r)))
|
|
2609
|
-
return r;
|
|
2610
|
-
r = null;
|
|
2611
|
-
for (let n = 0; n < t.set.length; ++n) {
|
|
2612
|
-
const s = t.set[n];
|
|
2613
|
-
let o = null;
|
|
2614
|
-
s.forEach((i) => {
|
|
2615
|
-
const m = new Ze(i.semver.version);
|
|
2616
|
-
switch (i.operator) {
|
|
2617
|
-
case ">":
|
|
2618
|
-
m.prerelease.length === 0 ? m.patch++ : m.prerelease.push(0), m.raw = m.format();
|
|
2619
|
-
case "":
|
|
2620
|
-
case ">=":
|
|
2621
|
-
(!o || Gt(m, o)) && (o = m);
|
|
2622
|
-
break;
|
|
2623
|
-
case "<":
|
|
2624
|
-
case "<=":
|
|
2625
|
-
break;
|
|
2626
|
-
default:
|
|
2627
|
-
throw new Error(`Unexpected operation: ${i.operator}`);
|
|
2628
|
-
}
|
|
2629
|
-
}), o && (!r || Gt(r, o)) && (r = o);
|
|
2630
|
-
}
|
|
2631
|
-
return r && t.test(r) ? r : null;
|
|
2632
|
-
};
|
|
2633
|
-
var qa = Ka;
|
|
2634
|
-
const za = oe(), Ha = (t, e) => {
|
|
2635
|
-
try {
|
|
2636
|
-
return new za(t, e).range || "*";
|
|
2637
|
-
} catch {
|
|
2638
|
-
return null;
|
|
2639
|
-
}
|
|
2640
|
-
};
|
|
2641
|
-
var Xa = Ha;
|
|
2642
|
-
const Ya = ee, wr = De(), { ANY: Wa } = wr, Ja = oe(), Za = Be, Kt = Ue, qt = pt, Qa = vt, eo = ht, to = (t, e, r, n) => {
|
|
2643
|
-
t = new Ya(t, n), e = new Ja(e, n);
|
|
2644
|
-
let s, o, i, m, f;
|
|
2645
|
-
switch (r) {
|
|
2646
|
-
case ">":
|
|
2647
|
-
s = Kt, o = Qa, i = qt, m = ">", f = ">=";
|
|
2648
|
-
break;
|
|
2649
|
-
case "<":
|
|
2650
|
-
s = qt, o = eo, i = Kt, m = "<", f = "<=";
|
|
2651
|
-
break;
|
|
2652
|
-
default:
|
|
2653
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
2654
|
-
}
|
|
2655
|
-
if (Za(t, e, n))
|
|
2656
|
-
return !1;
|
|
2657
|
-
for (let c = 0; c < e.set.length; ++c) {
|
|
2658
|
-
const b = e.set[c];
|
|
2659
|
-
let d = null, T = null;
|
|
2660
|
-
if (b.forEach((g) => {
|
|
2661
|
-
g.semver === Wa && (g = new wr(">=0.0.0")), d = d || g, T = T || g, s(g.semver, d.semver, n) ? d = g : i(g.semver, T.semver, n) && (T = g);
|
|
2662
|
-
}), d.operator === m || d.operator === f || (!T.operator || T.operator === m) && o(t, T.semver))
|
|
2663
|
-
return !1;
|
|
2664
|
-
if (T.operator === f && i(t, T.semver))
|
|
2665
|
-
return !1;
|
|
2666
|
-
}
|
|
2667
|
-
return !0;
|
|
2668
|
-
};
|
|
2669
|
-
var bt = to;
|
|
2670
|
-
const ro = bt, no = (t, e, r) => ro(t, e, ">", r);
|
|
2671
|
-
var so = no;
|
|
2672
|
-
const ao = bt, oo = (t, e, r) => ao(t, e, "<", r);
|
|
2673
|
-
var io = oo;
|
|
2674
|
-
const zt = oe(), lo = (t, e, r) => (t = new zt(t, r), e = new zt(e, r), t.intersects(e, r));
|
|
2675
|
-
var uo = lo;
|
|
2676
|
-
const co = Be, fo = ae;
|
|
2677
|
-
var mo = (t, e, r) => {
|
|
2678
|
-
const n = [];
|
|
2679
|
-
let s = null, o = null;
|
|
2680
|
-
const i = t.sort((b, d) => fo(b, d, r));
|
|
2681
|
-
for (const b of i)
|
|
2682
|
-
co(b, e, r) ? (o = b, s || (s = b)) : (o && n.push([s, o]), o = null, s = null);
|
|
2683
|
-
s && n.push([s, null]);
|
|
2684
|
-
const m = [];
|
|
2685
|
-
for (const [b, d] of n)
|
|
2686
|
-
b === d ? m.push(b) : !d && b === i[0] ? m.push("*") : d ? b === i[0] ? m.push(`<=${d}`) : m.push(`${b} - ${d}`) : m.push(`>=${b}`);
|
|
2687
|
-
const f = m.join(" || "), c = typeof e.raw == "string" ? e.raw : String(e);
|
|
2688
|
-
return f.length < c.length ? f : e;
|
|
2689
|
-
};
|
|
2690
|
-
const Ht = oe(), gt = De(), { ANY: Qe } = gt, $e = Be, yt = ae, po = (t, e, r = {}) => {
|
|
2691
|
-
if (t === e)
|
|
2692
|
-
return !0;
|
|
2693
|
-
t = new Ht(t, r), e = new Ht(e, r);
|
|
2694
|
-
let n = !1;
|
|
2695
|
-
e:
|
|
2696
|
-
for (const s of t.set) {
|
|
2697
|
-
for (const o of e.set) {
|
|
2698
|
-
const i = vo(s, o, r);
|
|
2699
|
-
if (n = n || i !== null, i)
|
|
2700
|
-
continue e;
|
|
2701
|
-
}
|
|
2702
|
-
if (n)
|
|
2703
|
-
return !1;
|
|
2704
|
-
}
|
|
2705
|
-
return !0;
|
|
2706
|
-
}, ho = [new gt(">=0.0.0-0")], Xt = [new gt(">=0.0.0")], vo = (t, e, r) => {
|
|
2707
|
-
if (t === e)
|
|
2708
|
-
return !0;
|
|
2709
|
-
if (t.length === 1 && t[0].semver === Qe) {
|
|
2710
|
-
if (e.length === 1 && e[0].semver === Qe)
|
|
2711
|
-
return !0;
|
|
2712
|
-
r.includePrerelease ? t = ho : t = Xt;
|
|
2713
|
-
}
|
|
2714
|
-
if (e.length === 1 && e[0].semver === Qe) {
|
|
2715
|
-
if (r.includePrerelease)
|
|
2716
|
-
return !0;
|
|
2717
|
-
e = Xt;
|
|
2718
|
-
}
|
|
2719
|
-
const n = /* @__PURE__ */ new Set();
|
|
2720
|
-
let s, o;
|
|
2721
|
-
for (const g of t)
|
|
2722
|
-
g.operator === ">" || g.operator === ">=" ? s = Yt(s, g, r) : g.operator === "<" || g.operator === "<=" ? o = Wt(o, g, r) : n.add(g.semver);
|
|
2723
|
-
if (n.size > 1)
|
|
2724
|
-
return null;
|
|
2725
|
-
let i;
|
|
2726
|
-
if (s && o) {
|
|
2727
|
-
if (i = yt(s.semver, o.semver, r), i > 0)
|
|
2728
|
-
return null;
|
|
2729
|
-
if (i === 0 && (s.operator !== ">=" || o.operator !== "<="))
|
|
2730
|
-
return null;
|
|
2731
|
-
}
|
|
2732
|
-
for (const g of n) {
|
|
2733
|
-
if (s && !$e(g, String(s), r) || o && !$e(g, String(o), r))
|
|
2734
|
-
return null;
|
|
2735
|
-
for (const h of e)
|
|
2736
|
-
if (!$e(g, String(h), r))
|
|
2737
|
-
return !1;
|
|
2738
|
-
return !0;
|
|
2739
|
-
}
|
|
2740
|
-
let m, f, c, b, d = o && !r.includePrerelease && o.semver.prerelease.length ? o.semver : !1, T = s && !r.includePrerelease && s.semver.prerelease.length ? s.semver : !1;
|
|
2741
|
-
d && d.prerelease.length === 1 && o.operator === "<" && d.prerelease[0] === 0 && (d = !1);
|
|
2742
|
-
for (const g of e) {
|
|
2743
|
-
if (b = b || g.operator === ">" || g.operator === ">=", c = c || g.operator === "<" || g.operator === "<=", s) {
|
|
2744
|
-
if (T && g.semver.prerelease && g.semver.prerelease.length && g.semver.major === T.major && g.semver.minor === T.minor && g.semver.patch === T.patch && (T = !1), g.operator === ">" || g.operator === ">=") {
|
|
2745
|
-
if (m = Yt(s, g, r), m === g && m !== s)
|
|
2746
|
-
return !1;
|
|
2747
|
-
} else if (s.operator === ">=" && !$e(s.semver, String(g), r))
|
|
2748
|
-
return !1;
|
|
2749
|
-
}
|
|
2750
|
-
if (o) {
|
|
2751
|
-
if (d && g.semver.prerelease && g.semver.prerelease.length && g.semver.major === d.major && g.semver.minor === d.minor && g.semver.patch === d.patch && (d = !1), g.operator === "<" || g.operator === "<=") {
|
|
2752
|
-
if (f = Wt(o, g, r), f === g && f !== o)
|
|
2753
|
-
return !1;
|
|
2754
|
-
} else if (o.operator === "<=" && !$e(o.semver, String(g), r))
|
|
2755
|
-
return !1;
|
|
2756
|
-
}
|
|
2757
|
-
if (!g.operator && (o || s) && i !== 0)
|
|
2758
|
-
return !1;
|
|
2759
|
-
}
|
|
2760
|
-
return !(s && c && !o && i !== 0 || o && b && !s && i !== 0 || T || d);
|
|
2761
|
-
}, Yt = (t, e, r) => {
|
|
2762
|
-
if (!t)
|
|
2763
|
-
return e;
|
|
2764
|
-
const n = yt(t.semver, e.semver, r);
|
|
2765
|
-
return n > 0 ? t : n < 0 || e.operator === ">" && t.operator === ">=" ? e : t;
|
|
2766
|
-
}, Wt = (t, e, r) => {
|
|
2767
|
-
if (!t)
|
|
2768
|
-
return e;
|
|
2769
|
-
const n = yt(t.semver, e.semver, r);
|
|
2770
|
-
return n < 0 ? t : n > 0 || e.operator === "<" && t.operator === "<=" ? e : t;
|
|
2771
|
-
};
|
|
2772
|
-
var bo = po;
|
|
2773
|
-
const et = we, Jt = je, go = ee, Zt = yr, yo = _e, _o = Is, $o = Ps, Eo = Ts, wo = Ns, Ro = xs, Io = js, Ao = Ds, Oo = Ks, Po = ae, So = Xs, To = Js, Lo = mt, No = ta, Co = sa, ko = Ue, xo = pt, Vo = _r, Fo = $r, jo = ht, Mo = vt, Uo = Er, Do = Oa, Bo = De(), Go = oe(), Ko = Be, qo = ka, zo = ja, Ho = Ba, Xo = qa, Yo = Xa, Wo = bt, Jo = so, Zo = io, Qo = uo, ei = mo, ti = bo;
|
|
2774
|
-
var ri = {
|
|
2775
|
-
parse: yo,
|
|
2776
|
-
valid: _o,
|
|
2777
|
-
clean: $o,
|
|
2778
|
-
inc: Eo,
|
|
2779
|
-
diff: wo,
|
|
2780
|
-
major: Ro,
|
|
2781
|
-
minor: Io,
|
|
2782
|
-
patch: Ao,
|
|
2783
|
-
prerelease: Oo,
|
|
2784
|
-
compare: Po,
|
|
2785
|
-
rcompare: So,
|
|
2786
|
-
compareLoose: To,
|
|
2787
|
-
compareBuild: Lo,
|
|
2788
|
-
sort: No,
|
|
2789
|
-
rsort: Co,
|
|
2790
|
-
gt: ko,
|
|
2791
|
-
lt: xo,
|
|
2792
|
-
eq: Vo,
|
|
2793
|
-
neq: Fo,
|
|
2794
|
-
gte: jo,
|
|
2795
|
-
lte: Mo,
|
|
2796
|
-
cmp: Uo,
|
|
2797
|
-
coerce: Do,
|
|
2798
|
-
Comparator: Bo,
|
|
2799
|
-
Range: Go,
|
|
2800
|
-
satisfies: Ko,
|
|
2801
|
-
toComparators: qo,
|
|
2802
|
-
maxSatisfying: zo,
|
|
2803
|
-
minSatisfying: Ho,
|
|
2804
|
-
minVersion: Xo,
|
|
2805
|
-
validRange: Yo,
|
|
2806
|
-
outside: Wo,
|
|
2807
|
-
gtr: Jo,
|
|
2808
|
-
ltr: Zo,
|
|
2809
|
-
intersects: Qo,
|
|
2810
|
-
simplifyRange: ei,
|
|
2811
|
-
subset: ti,
|
|
2812
|
-
SemVer: go,
|
|
2813
|
-
re: et.re,
|
|
2814
|
-
src: et.src,
|
|
2815
|
-
tokens: et.t,
|
|
2816
|
-
SEMVER_SPEC_VERSION: Jt.SEMVER_SPEC_VERSION,
|
|
2817
|
-
RELEASE_TYPES: Jt.RELEASE_TYPES,
|
|
2818
|
-
compareIdentifiers: Zt.compareIdentifiers,
|
|
2819
|
-
rcompareIdentifiers: Zt.rcompareIdentifiers
|
|
2820
|
-
};
|
|
2821
|
-
const Qt = /* @__PURE__ */ ar(ri);
|
|
2822
|
-
var it = /* @__PURE__ */ ((t) => (t[t.menuV3 = 0] = "menuV3", t[t.applyEffectOnOrder = 1] = "applyEffectOnOrder", t[t.nestedAddon = 2] = "nestedAddon", t[t.feedmeDelivery = 3] = "feedmeDelivery", t[t.taxAndServiceChargeV4 = 4] = "taxAndServiceChargeV4", t[t.itemCombo = 5] = "itemCombo", t[t.itemTakeaway = 6] = "itemTakeaway", t[t.transferInventory = 7] = "transferInventory", t[t.qrEPayment = 8] = "qrEPayment", t[t.deliveryIntegration = 9] = "deliveryIntegration", t[t.rmsPayment = 10] = "rmsPayment", t[t.queue = 11] = "queue", t[t.paymentVoucher = 12] = "paymentVoucher", t))(it || {});
|
|
2823
|
-
const Rr = {
|
|
2824
|
-
0: "3.0.0-alpha",
|
|
2825
|
-
1: "3.5.0-alpha",
|
|
2826
|
-
2: "4.0.0-alpha",
|
|
2827
|
-
4: "4.0.0-alpha",
|
|
2828
|
-
5: "4.1.0-alpha",
|
|
2829
|
-
// TODO: #475 make sure current pos version
|
|
2830
|
-
6: "4.3.10-alpha",
|
|
2831
|
-
7: "4.5.0-alpha",
|
|
2832
|
-
8: "6.9.0-alpha",
|
|
2833
|
-
9: "6.11.0-alpha",
|
|
2834
|
-
3: "6.12.0-alpha",
|
|
2835
|
-
10: "6.21.0-alpha",
|
|
2836
|
-
11: "6.21.0-alpha",
|
|
2837
|
-
12: "6.31.0-alpha"
|
|
2838
|
-
};
|
|
2839
|
-
function ni(t, e) {
|
|
2840
|
-
return Qt.valid(e) && Qt.gte(e, Rr[t]);
|
|
2841
|
-
}
|
|
2842
|
-
function si(t) {
|
|
2843
|
-
return Rr[t].replace("-alpha", "");
|
|
2844
|
-
}
|
|
2845
|
-
function ai({ posVersion: t, payoutAccount: e }) {
|
|
2846
|
-
return !!t && ni(it.qrEPayment, t) ? !e || !e.enable ? "Payout account is required" : e.status !== ut.F_PAYOUT_ACCOUNT_STATUS.enum.APPROVED ? "Payout account under review" : !0 : `For POS ${si(it.qrEPayment)} or above`;
|
|
2847
|
-
}
|
|
2848
|
-
function Ir(t) {
|
|
2849
|
-
return {
|
|
2850
|
-
id: t._id,
|
|
2851
|
-
...t,
|
|
2852
|
-
profile: {
|
|
2853
|
-
...t.profile,
|
|
2854
|
-
address: Ee(t.profile.address)
|
|
2855
|
-
},
|
|
2856
|
-
allowEPayment: ai(t)
|
|
2857
|
-
};
|
|
2858
|
-
}
|
|
2859
|
-
function Se(t) {
|
|
2860
|
-
return Ir(dr(t));
|
|
2861
|
-
}
|
|
2862
|
-
async function er(t) {
|
|
2863
|
-
const e = dr(t), r = [];
|
|
2864
|
-
for (const n of e)
|
|
2865
|
-
r.push(await Ir(n));
|
|
2866
|
-
return r;
|
|
2867
|
-
}
|
|
2868
|
-
const Ar = {
|
|
2869
|
-
async readRestaurant(t) {
|
|
2870
|
-
return await Se(await Xe().get(`/restaurants/${t}`));
|
|
2871
|
-
},
|
|
2872
|
-
async readRestaurants() {
|
|
2873
|
-
return await er(await Ye().get("/restaurants"));
|
|
2874
|
-
},
|
|
2875
|
-
async readRestaurantsByBusiness() {
|
|
2876
|
-
return await er(await Ye().get("/restaurant-list"));
|
|
2877
|
-
},
|
|
2878
|
-
async createRestaurant(t) {
|
|
2879
|
-
return await Se(await Ye().post("/restaurants", t));
|
|
2880
|
-
},
|
|
2881
|
-
async updateRestaurantProfile(t, e) {
|
|
2882
|
-
return await Se(
|
|
2883
|
-
await Xe().put(`/restaurants/${t}/profile`, e)
|
|
2884
|
-
);
|
|
2885
|
-
},
|
|
2886
|
-
async updatePayoutAccount(t, e) {
|
|
2887
|
-
return await Se(
|
|
2888
|
-
await Xe().put(`/restaurants/${t}/payout-account`, e)
|
|
2889
|
-
);
|
|
2890
|
-
}
|
|
2891
|
-
}, tt = {
|
|
2892
|
-
async get(t, e) {
|
|
2893
|
-
const r = qe(void 0, e), n = ze(r, t);
|
|
2894
|
-
return await (await Dr(n)).text();
|
|
2895
|
-
},
|
|
2896
|
-
async update(t, e, r) {
|
|
2897
|
-
const n = qe(void 0, r), s = ze(n, t);
|
|
2898
|
-
return await Br(s, e), await Gr(s);
|
|
2899
|
-
},
|
|
2900
|
-
async delete(t, e) {
|
|
2901
|
-
const r = qe(void 0, e), n = ze(r, t);
|
|
2902
|
-
await Kr(n);
|
|
2903
|
-
}
|
|
2904
|
-
}, de = {
|
|
2905
|
-
async get(t) {
|
|
2906
|
-
return await tt.get(t);
|
|
2907
|
-
},
|
|
2908
|
-
async update(t, e, r) {
|
|
2909
|
-
return await tt.update(t, e);
|
|
2910
|
-
},
|
|
2911
|
-
async delete(t) {
|
|
2912
|
-
await tt.delete(t);
|
|
2913
|
-
}
|
|
2914
|
-
};
|
|
2915
|
-
class oi {
|
|
2916
|
-
constructor(e, r) {
|
|
2917
|
-
Ke(this, "restaurant");
|
|
2918
|
-
Ke(this, "data");
|
|
2919
|
-
this.restaurant = e, this.data = r;
|
|
2920
|
-
}
|
|
2921
|
-
generateUrl(e) {
|
|
2922
|
-
const r = e === "normal" ? dt().toISOString() : "photo";
|
|
2923
|
-
return `restaurant/${this.restaurant.id}/${e}/${r}`;
|
|
2924
|
-
}
|
|
2925
|
-
async manageThumbnail() {
|
|
2926
|
-
const { newThumbnailPhoto: e, thumbnailPhoto: r } = this.data;
|
|
2927
|
-
if (e) {
|
|
2928
|
-
const s = await de.update(this.generateUrl("thumbnail"), e, {
|
|
2929
|
-
includedTime: !0
|
|
2930
|
-
});
|
|
2931
|
-
this.data.thumbnailPhoto = s;
|
|
2932
|
-
return;
|
|
2933
|
-
}
|
|
2934
|
-
const n = this.restaurant.profile.thumbnailPhoto;
|
|
2935
|
-
n && !r && (await de.delete(n), this.data.thumbnailPhoto = void 0);
|
|
2936
|
-
}
|
|
2937
|
-
async manageCover() {
|
|
2938
|
-
const { newCoverPhoto: e, coverPhoto: r } = this.data;
|
|
2939
|
-
if (e) {
|
|
2940
|
-
const s = await de.update(this.generateUrl("cover"), e, {
|
|
2941
|
-
includedTime: !0
|
|
2942
|
-
});
|
|
2943
|
-
this.data.coverPhoto = s;
|
|
2944
|
-
return;
|
|
2945
|
-
}
|
|
2946
|
-
const n = this.restaurant.profile.coverPhoto;
|
|
2947
|
-
n && !r && (await de.delete(n), this.data.coverPhoto = void 0);
|
|
2948
|
-
}
|
|
2949
|
-
async manageCarousels() {
|
|
2950
|
-
const e = this.data.newPhotos || [];
|
|
2951
|
-
for (const r of e) {
|
|
2952
|
-
const n = await de.update(this.generateUrl("normal"), r);
|
|
2953
|
-
this.data.photos = [...this.data.photos || [], n];
|
|
2954
|
-
}
|
|
2955
|
-
}
|
|
2956
|
-
async run() {
|
|
2957
|
-
return await this.manageThumbnail(), await this.manageCover(), await this.manageCarousels(), this.data;
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
async function tr(t, e) {
|
|
2961
|
-
const r = new oi(t, e);
|
|
2962
|
-
await r.run(), await Ar.updateRestaurantProfile(t.id, r.data), await fe().readRestaurants();
|
|
2963
|
-
}
|
|
2964
|
-
const ii = () => {
|
|
2965
|
-
const t = fe();
|
|
2966
|
-
return {
|
|
2967
|
-
async createRestaurant(e, r) {
|
|
2968
|
-
const n = await Ar.createRestaurant({
|
|
2969
|
-
businessId: e,
|
|
2970
|
-
features: [],
|
|
2971
|
-
profile: r
|
|
2972
|
-
});
|
|
2973
|
-
await tr(n, r), await t.readRestaurants();
|
|
2974
|
-
},
|
|
2975
|
-
async updateRestaurantProfile(e, r) {
|
|
2976
|
-
await tr(e, r);
|
|
2977
|
-
}
|
|
2978
|
-
};
|
|
2979
|
-
};
|
|
2980
|
-
function li(t) {
|
|
2981
|
-
const e = re({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
2982
|
-
function r() {
|
|
2983
|
-
if (t.value) {
|
|
2984
|
-
const n = t.value.getBoundingClientRect();
|
|
2985
|
-
e.value = {
|
|
2986
|
-
top: n.top,
|
|
2987
|
-
bottom: n.bottom,
|
|
2988
|
-
left: n.left,
|
|
2989
|
-
right: n.right
|
|
2990
|
-
};
|
|
2991
|
-
}
|
|
2992
|
-
}
|
|
2993
|
-
return rt(t, async (n) => {
|
|
2994
|
-
n && (await sr(), r());
|
|
2995
|
-
}), nr(() => {
|
|
2996
|
-
window.addEventListener("resize", r);
|
|
2997
|
-
}), kr(() => {
|
|
2998
|
-
window.removeEventListener("resize", r);
|
|
2999
|
-
}), e;
|
|
3000
|
-
}
|
|
3001
|
-
const ui = /* @__PURE__ */ W({
|
|
3002
|
-
__name: "FormColumn",
|
|
3003
|
-
props: {
|
|
3004
|
-
shrinkable: { type: Boolean }
|
|
3005
|
-
},
|
|
3006
|
-
setup(t) {
|
|
3007
|
-
return (e, r) => (x(), D("div", {
|
|
3008
|
-
class: Y(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
|
|
3009
|
-
}, [
|
|
3010
|
-
ne(e.$slots, "default")
|
|
3011
|
-
], 2));
|
|
3012
|
-
}
|
|
3013
|
-
}), ci = {
|
|
3014
|
-
key: 0,
|
|
3015
|
-
class: "flex flex-row justify-between items-center"
|
|
3016
|
-
}, di = { class: "space-y-4" }, fi = { class: "fm-typo-en-title-sm-600" }, mi = {
|
|
3017
|
-
key: 0,
|
|
3018
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
3019
|
-
}, Te = /* @__PURE__ */ W({
|
|
3020
|
-
__name: "FormSection",
|
|
3021
|
-
props: {
|
|
3022
|
-
title: {},
|
|
3023
|
-
subTitle: {},
|
|
3024
|
-
shrinkable: { type: Boolean }
|
|
3025
|
-
},
|
|
3026
|
-
setup(t) {
|
|
3027
|
-
return (e, r) => (x(), D("div", {
|
|
3028
|
-
class: Y(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
|
|
3029
|
-
}, [
|
|
3030
|
-
e.title ? (x(), D("div", ci, [
|
|
3031
|
-
$("div", di, [
|
|
3032
|
-
$("p", fi, U(e.title), 1),
|
|
3033
|
-
e.subTitle ? (x(), D("p", mi, U(e.subTitle), 1)) : le("", !0)
|
|
3034
|
-
]),
|
|
3035
|
-
ne(e.$slots, "append-title")
|
|
3036
|
-
])) : le("", !0),
|
|
3037
|
-
S(ui, { shrinkable: e.shrinkable }, {
|
|
3038
|
-
default: G(() => [
|
|
3039
|
-
ne(e.$slots, "default")
|
|
3040
|
-
]),
|
|
3041
|
-
_: 3
|
|
3042
|
-
}, 8, ["shrinkable"])
|
|
3043
|
-
], 2));
|
|
3044
|
-
}
|
|
3045
|
-
}), pi = { class: "flex justify-center" }, hi = { class: "space-y-24" }, vi = { class: "space-y-24" }, bi = { class: "flex gap-16 xs:flex-col xs:gap-24" }, gi = { class: "flex-1" }, yi = { class: "flex-1" }, _i = { class: "space-y-24" }, $i = { class: "space-y-24" }, Ei = { class: "space-y-8" }, wi = { class: "space-y-24" }, rr = /* @__PURE__ */ W({
|
|
3046
|
-
__name: "RestaurantForm",
|
|
3047
|
-
props: {
|
|
3048
|
-
restaurantId: {
|
|
3049
|
-
type: String,
|
|
3050
|
-
default: void 0
|
|
3051
|
-
},
|
|
3052
|
-
restaurant: {
|
|
3053
|
-
type: Object
|
|
3054
|
-
},
|
|
3055
|
-
initialValue: {
|
|
3056
|
-
type: Object,
|
|
3057
|
-
default: void 0
|
|
3058
|
-
},
|
|
3059
|
-
enableFeedmeExpress: {
|
|
3060
|
-
type: Boolean,
|
|
3061
|
-
required: !0
|
|
3062
|
-
}
|
|
3063
|
-
},
|
|
3064
|
-
setup(t, { expose: e }) {
|
|
3065
|
-
const r = t, { restaurants: n, currentBusiness: s } = fe(), o = ct(), i = fr(o), { copyTextToClipboard: m } = ur(), f = re(!1), c = (R, u) => {
|
|
3066
|
-
f.value = !f.value;
|
|
3067
|
-
}, b = z(() => {
|
|
3068
|
-
var R;
|
|
3069
|
-
return (R = r.restaurant) == null ? void 0 : R.profile;
|
|
3070
|
-
}), d = lt(
|
|
3071
|
-
b.value ? ge(b.value) : {
|
|
3072
|
-
...Ot(),
|
|
3073
|
-
address: Ee(Ot().address),
|
|
3074
|
-
legalName: "",
|
|
3075
|
-
sstRegNo: "",
|
|
3076
|
-
description: "",
|
|
3077
|
-
url: "",
|
|
3078
|
-
thumbnailPhoto: void 0,
|
|
3079
|
-
coverPhoto: void 0,
|
|
3080
|
-
newThumbnailPhoto: void 0,
|
|
3081
|
-
newCoverPhoto: void 0,
|
|
3082
|
-
newPhotos: [],
|
|
3083
|
-
operatingHours: {
|
|
3084
|
-
0: {
|
|
3085
|
-
enable: !1,
|
|
3086
|
-
hours: []
|
|
3087
|
-
},
|
|
3088
|
-
1: {
|
|
3089
|
-
enable: !1,
|
|
3090
|
-
hours: []
|
|
3091
|
-
},
|
|
3092
|
-
2: {
|
|
3093
|
-
enable: !1,
|
|
3094
|
-
hours: []
|
|
3095
|
-
},
|
|
3096
|
-
3: {
|
|
3097
|
-
enable: !1,
|
|
3098
|
-
hours: []
|
|
3099
|
-
},
|
|
3100
|
-
4: {
|
|
3101
|
-
enable: !1,
|
|
3102
|
-
hours: []
|
|
3103
|
-
},
|
|
3104
|
-
5: {
|
|
3105
|
-
enable: !1,
|
|
3106
|
-
hours: []
|
|
3107
|
-
},
|
|
3108
|
-
6: {
|
|
3109
|
-
enable: !1,
|
|
3110
|
-
hours: []
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
), T = "https://feedmedev.cc/", g = z(() => fe().currentCountry.value), { t: h } = pe(), O = re(
|
|
3115
|
-
r.restaurantId ? h("settings.business.restaurant.form.title.update") : h("settings.business.restaurant.form.title.add")
|
|
3116
|
-
), N = z(() => Ee(d.address)), C = z(() => N.value.formatted);
|
|
3117
|
-
function F(R) {
|
|
3118
|
-
var u;
|
|
3119
|
-
if (typeof R == "string") {
|
|
3120
|
-
const p = (u = n.value.find((_) => _._id === R)) == null ? void 0 : u.profile.operatingHours;
|
|
3121
|
-
p ? d.operatingHours = ge(p) : o.open({
|
|
3122
|
-
title: h("settings.business.restaurant.form.sections.operation_hours.invalid"),
|
|
3123
|
-
type: "error"
|
|
3124
|
-
});
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
function I() {
|
|
3128
|
-
const R = T + (d.url || r.restaurantId);
|
|
3129
|
-
m(R);
|
|
3130
|
-
}
|
|
3131
|
-
function j() {
|
|
3132
|
-
d.thumbnailPhoto = void 0, d.newThumbnailPhoto = void 0;
|
|
3133
|
-
}
|
|
3134
|
-
function J() {
|
|
3135
|
-
d.coverPhoto = void 0, d.newCoverPhoto = void 0;
|
|
3136
|
-
}
|
|
3137
|
-
function Z(R) {
|
|
3138
|
-
d.newPhotos = d.newPhotos || [], d.newPhotos.push(R);
|
|
3139
|
-
}
|
|
3140
|
-
const M = ii();
|
|
3141
|
-
function H() {
|
|
3142
|
-
var R, u;
|
|
3143
|
-
if (c(), r.restaurantId) {
|
|
3144
|
-
if (!((R = s.value) != null && R.id))
|
|
3145
|
-
return;
|
|
3146
|
-
i.minor(async () => {
|
|
3147
|
-
var p, _;
|
|
3148
|
-
r.restaurant && (await M.updateRestaurantProfile(r.restaurant, {
|
|
3149
|
-
...d,
|
|
3150
|
-
url: ((p = d.url) == null ? void 0 : p.trim()) || null,
|
|
3151
|
-
code: ((_ = d.code) == null ? void 0 : _.trim()) || null
|
|
3152
|
-
}), h("settings.business.restaurant.form.message.updated"));
|
|
3153
|
-
});
|
|
3154
|
-
} else {
|
|
3155
|
-
if (!((u = s.value) != null && u.id))
|
|
3156
|
-
return;
|
|
3157
|
-
i.minor(async () => {
|
|
3158
|
-
var p, _;
|
|
3159
|
-
await M.createRestaurant(s.value.id, {
|
|
3160
|
-
...d,
|
|
3161
|
-
url: ((p = d.url) == null ? void 0 : p.trim()) || null,
|
|
3162
|
-
code: ((_ = d.code) == null ? void 0 : _.trim()) || null
|
|
3163
|
-
}), h("settings.business.restaurant.form.message.created");
|
|
3164
|
-
});
|
|
3165
|
-
}
|
|
3166
|
-
}
|
|
3167
|
-
const a = z(() => ({
|
|
3168
|
-
title: h("settings.business.restaurant.form.summary.title"),
|
|
3169
|
-
items: [
|
|
3170
|
-
{
|
|
3171
|
-
name: h("settings.business.restaurant.form.summary.name"),
|
|
3172
|
-
value: d.name
|
|
3173
|
-
},
|
|
3174
|
-
{
|
|
3175
|
-
name: h("settings.business.restaurant.form.summary.legal_name"),
|
|
3176
|
-
value: d.legalName
|
|
3177
|
-
},
|
|
3178
|
-
{
|
|
3179
|
-
name: h("settings.business.restaurant.form.summary.contact"),
|
|
3180
|
-
value: d.phoneNo
|
|
3181
|
-
},
|
|
3182
|
-
{
|
|
3183
|
-
name: h("settings.business.restaurant.form.summary.address"),
|
|
3184
|
-
value: C.value
|
|
3185
|
-
}
|
|
3186
|
-
]
|
|
3187
|
-
})), { isAtMost: l } = ir();
|
|
3188
|
-
z(() => l("sm"));
|
|
3189
|
-
const v = re(null), w = li(v);
|
|
3190
|
-
return e({ trigger: c }), (R, u) => {
|
|
3191
|
-
const p = K("FmTextField"), _ = K("FmPhoneNumber"), A = K("FmTextarea"), P = K("FmButton");
|
|
3192
|
-
return x(), D(se, null, [
|
|
3193
|
-
ne(R.$slots, "trigger", xr(Vr({
|
|
3194
|
-
trigger: c
|
|
3195
|
-
}))),
|
|
3196
|
-
S(En, {
|
|
3197
|
-
title: O.value,
|
|
3198
|
-
show: f.value,
|
|
3199
|
-
"primary-action": { label: E(h)("common.save") },
|
|
3200
|
-
"secondary-actions": [
|
|
3201
|
-
{ label: E(h)("settings.business.restaurant.actions.discard"), click: () => f.value = !1 }
|
|
3202
|
-
],
|
|
3203
|
-
onOnPrimary: H,
|
|
3204
|
-
onOnCancel: u[16] || (u[16] = (y) => f.value = !1)
|
|
3205
|
-
}, {
|
|
3206
|
-
"append-title": G(() => [
|
|
3207
|
-
E(l)("sm") ? (x(), Q(Lt, {
|
|
3208
|
-
key: 0,
|
|
3209
|
-
variant: "dialog",
|
|
3210
|
-
title: a.value.title,
|
|
3211
|
-
items: a.value.items
|
|
3212
|
-
}, null, 8, ["title", "items"])) : le("", !0)
|
|
3213
|
-
]),
|
|
3214
|
-
default: G(() => [
|
|
3215
|
-
$("div", pi, [
|
|
3216
|
-
$("div", {
|
|
3217
|
-
ref_key: "formWrapper",
|
|
3218
|
-
ref: v,
|
|
3219
|
-
class: "py-24 pr-[400px] w-[1150px] xs:pr-0 sm:pr-0 xs:w-full"
|
|
3220
|
-
}, [
|
|
3221
|
-
E(l)("sm") ? le("", !0) : (x(), Q(Lt, {
|
|
3222
|
-
key: 0,
|
|
3223
|
-
class: "fixed",
|
|
3224
|
-
style: Ne({
|
|
3225
|
-
top: "85px",
|
|
3226
|
-
left: E(w).right - 400 + "px"
|
|
3227
|
-
}),
|
|
3228
|
-
variant: "full",
|
|
3229
|
-
title: a.value.title,
|
|
3230
|
-
items: a.value.items
|
|
3231
|
-
}, null, 8, ["style", "title", "items"])),
|
|
3232
|
-
$("div", hi, [
|
|
3233
|
-
S(Te, {
|
|
3234
|
-
title: E(h)("settings.business.restaurant.form.sections.basic_info.title")
|
|
3235
|
-
}, {
|
|
3236
|
-
default: G(() => {
|
|
3237
|
-
var y, L;
|
|
3238
|
-
return [
|
|
3239
|
-
$("div", vi, [
|
|
3240
|
-
$("div", null, [
|
|
3241
|
-
S(p, {
|
|
3242
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.code.label"),
|
|
3243
|
-
modelValue: d.code,
|
|
3244
|
-
"onUpdate:modelValue": u[0] || (u[0] = (k) => d.code = k),
|
|
3245
|
-
"label-mark": "optional",
|
|
3246
|
-
"helper-text": E(h)("settings.business.restaurant.form.sections.basic_info.code.helper"),
|
|
3247
|
-
disabled: ((y = b.value) == null ? void 0 : y.code) !== void 0 && ((L = b.value) == null ? void 0 : L.code) !== null
|
|
3248
|
-
}, null, 8, ["label", "modelValue", "helper-text", "disabled"])
|
|
3249
|
-
]),
|
|
3250
|
-
$("div", null, [
|
|
3251
|
-
S(p, {
|
|
3252
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.name.label"),
|
|
3253
|
-
modelValue: d.name,
|
|
3254
|
-
"onUpdate:modelValue": u[1] || (u[1] = (k) => d.name = k),
|
|
3255
|
-
"label-mark": "required",
|
|
3256
|
-
rules: [E(ce)]
|
|
3257
|
-
}, null, 8, ["label", "modelValue", "rules"])
|
|
3258
|
-
]),
|
|
3259
|
-
$("div", null, [
|
|
3260
|
-
S(p, {
|
|
3261
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.legal_name.label"),
|
|
3262
|
-
modelValue: d.legalName,
|
|
3263
|
-
"onUpdate:modelValue": u[2] || (u[2] = (k) => d.legalName = k),
|
|
3264
|
-
"label-mark": "required",
|
|
3265
|
-
rules: [E(ce)]
|
|
3266
|
-
}, null, 8, ["label", "modelValue", "rules"])
|
|
3267
|
-
]),
|
|
3268
|
-
$("div", null, [
|
|
3269
|
-
S(p, {
|
|
3270
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.reg_no.label"),
|
|
3271
|
-
modelValue: d.regNo,
|
|
3272
|
-
"onUpdate:modelValue": u[3] || (u[3] = (k) => d.regNo = k),
|
|
3273
|
-
"label-mark": "required",
|
|
3274
|
-
rules: [E(ce)]
|
|
3275
|
-
}, null, 8, ["label", "modelValue", "rules"])
|
|
3276
|
-
]),
|
|
3277
|
-
$("div", null, [
|
|
3278
|
-
S(p, {
|
|
3279
|
-
modelValue: d.sstRegNo,
|
|
3280
|
-
"onUpdate:modelValue": u[4] || (u[4] = (k) => d.sstRegNo = k),
|
|
3281
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.tax_no.label"),
|
|
3282
|
-
"label-mark": "optional"
|
|
3283
|
-
}, null, 8, ["modelValue", "label"])
|
|
3284
|
-
]),
|
|
3285
|
-
$("div", bi, [
|
|
3286
|
-
$("div", gi, [
|
|
3287
|
-
S(_, {
|
|
3288
|
-
class: "w-full",
|
|
3289
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.contact.label"),
|
|
3290
|
-
modelValue: d.phoneNo,
|
|
3291
|
-
"onUpdate:modelValue": u[5] || (u[5] = (k) => d.phoneNo = k),
|
|
3292
|
-
"label-mark": "optional"
|
|
3293
|
-
}, null, 8, ["label", "modelValue"])
|
|
3294
|
-
]),
|
|
3295
|
-
$("div", yi, [
|
|
3296
|
-
S(p, {
|
|
3297
|
-
class: "w-full",
|
|
3298
|
-
modelValue: d.email,
|
|
3299
|
-
"onUpdate:modelValue": u[6] || (u[6] = (k) => d.email = k),
|
|
3300
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.email.label"),
|
|
3301
|
-
"label-mark": "optional"
|
|
3302
|
-
}, null, 8, ["modelValue", "label"])
|
|
3303
|
-
])
|
|
3304
|
-
]),
|
|
3305
|
-
$("div", null, [
|
|
3306
|
-
S(be, {
|
|
3307
|
-
label: E(h)("settings.business.restaurant.form.sections.basic_info.image.label"),
|
|
3308
|
-
"sub-label": E(h)("settings.business.restaurant.form.sections.basic_info.image.optional"),
|
|
3309
|
-
"previous-url": d.thumbnailPhoto,
|
|
3310
|
-
modelValue: d.newThumbnailPhoto,
|
|
3311
|
-
"onUpdate:modelValue": u[7] || (u[7] = (k) => d.newThumbnailPhoto = k),
|
|
3312
|
-
"onReset:modelValue": j
|
|
3313
|
-
}, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
|
|
3314
|
-
])
|
|
3315
|
-
])
|
|
3316
|
-
];
|
|
3317
|
-
}),
|
|
3318
|
-
_: 1
|
|
3319
|
-
}, 8, ["title"]),
|
|
3320
|
-
u[17] || (u[17] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3321
|
-
S(Te, {
|
|
3322
|
-
title: E(h)("settings.business.restaurant.form.sections.address.title")
|
|
3323
|
-
}, {
|
|
3324
|
-
default: G(() => [
|
|
3325
|
-
$("div", _i, [
|
|
3326
|
-
S(Zn, {
|
|
3327
|
-
modelValue: d.address,
|
|
3328
|
-
"onUpdate:modelValue": u[8] || (u[8] = (y) => d.address = y)
|
|
3329
|
-
}, null, 8, ["modelValue"]),
|
|
3330
|
-
S(as, {
|
|
3331
|
-
address: N.value,
|
|
3332
|
-
modelValue: d.address.coordinates,
|
|
3333
|
-
"onUpdate:modelValue": u[9] || (u[9] = (y) => d.address.coordinates = y)
|
|
3334
|
-
}, null, 8, ["address", "modelValue"])
|
|
3335
|
-
])
|
|
3336
|
-
]),
|
|
3337
|
-
_: 1
|
|
3338
|
-
}, 8, ["title"]),
|
|
3339
|
-
u[18] || (u[18] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3340
|
-
S(Te, {
|
|
3341
|
-
title: E(h)("settings.business.restaurant.form.sections.operation_hours.title")
|
|
3342
|
-
}, {
|
|
3343
|
-
default: G(() => [
|
|
3344
|
-
$("div", $i, [
|
|
3345
|
-
$("div", Ei, [
|
|
3346
|
-
S(St, {
|
|
3347
|
-
label: E(h)("settings.business.restaurant.form.sections.operation_hours.copy_with"),
|
|
3348
|
-
optional: !1
|
|
3349
|
-
}, null, 8, ["label"]),
|
|
3350
|
-
S(zr, {
|
|
3351
|
-
class: "w-[320px]",
|
|
3352
|
-
"exclude-restaurants": [t.restaurantId ?? ""],
|
|
3353
|
-
"model-value": "",
|
|
3354
|
-
"onUpdate:modelValue": u[10] || (u[10] = (y) => F(y))
|
|
3355
|
-
}, null, 8, ["exclude-restaurants"]),
|
|
3356
|
-
S(us, {
|
|
3357
|
-
modelValue: d.operatingHours,
|
|
3358
|
-
"onUpdate:modelValue": u[11] || (u[11] = (y) => d.operatingHours = y)
|
|
3359
|
-
}, null, 8, ["modelValue"])
|
|
3360
|
-
])
|
|
3361
|
-
])
|
|
3362
|
-
]),
|
|
3363
|
-
_: 1
|
|
3364
|
-
}, 8, ["title"]),
|
|
3365
|
-
u[19] || (u[19] = $("div", { class: "w-full h-[2px] bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3366
|
-
S(Te, {
|
|
3367
|
-
title: E(h)("settings.business.restaurant.form.sections.branding.title")
|
|
3368
|
-
}, {
|
|
3369
|
-
default: G(() => [
|
|
3370
|
-
$("div", wi, [
|
|
3371
|
-
S(A, {
|
|
3372
|
-
label: E(h)("settings.business.restaurant.form.sections.branding.description"),
|
|
3373
|
-
"model-value": d.description ?? "",
|
|
3374
|
-
"onUpdate:modelValue": u[12] || (u[12] = (y) => d.description = y)
|
|
3375
|
-
}, null, 8, ["label", "model-value"]),
|
|
3376
|
-
S(p, {
|
|
3377
|
-
label: E(h)("settings.business.restaurant.form.sections.branding.url.label"),
|
|
3378
|
-
placeholder: t.restaurantId,
|
|
3379
|
-
"model-value": d.url,
|
|
3380
|
-
"onUpdate:modelValue": u[13] || (u[13] = (y) => d.url = y),
|
|
3381
|
-
rules: [
|
|
3382
|
-
(y) => {
|
|
3383
|
-
var L;
|
|
3384
|
-
return !y || ((L = b.value) == null ? void 0 : L.url) == d.url || g.value == E(ut.F_COUNTRY).enum.MY || E(h)("settings.business.restaurant.form.sections.branding.url.errors.disabled");
|
|
3385
|
-
},
|
|
3386
|
-
(y) => !y || E(hr).test(y) || E(h)("settings.business.restaurant.form.sections.branding.url.errors.invalid"),
|
|
3387
|
-
(y) => !y || !E(vr).includes(y) || E(h)("settings.business.restaurant.form.sections.branding.url.errors.reserved")
|
|
3388
|
-
]
|
|
3389
|
-
}, {
|
|
3390
|
-
prepend: G(() => [
|
|
3391
|
-
$("span", null, U(T))
|
|
3392
|
-
]),
|
|
3393
|
-
append: G(() => [
|
|
3394
|
-
S(P, {
|
|
3395
|
-
variant: "tertiary",
|
|
3396
|
-
icon: "file_copy",
|
|
3397
|
-
"text-color": "neutral-gray-400",
|
|
3398
|
-
onClick: I
|
|
3399
|
-
})
|
|
3400
|
-
]),
|
|
3401
|
-
_: 1
|
|
3402
|
-
}, 8, ["label", "placeholder", "model-value", "rules"]),
|
|
3403
|
-
$("div", null, [
|
|
3404
|
-
S(be, {
|
|
3405
|
-
label: E(h)("settings.business.form.cover_photo.label"),
|
|
3406
|
-
"previous-url": d.coverPhoto,
|
|
3407
|
-
modelValue: d.newCoverPhoto,
|
|
3408
|
-
"onUpdate:modelValue": u[14] || (u[14] = (y) => d.newCoverPhoto = y),
|
|
3409
|
-
"onReset:modelValue": J
|
|
3410
|
-
}, null, 8, ["label", "previous-url", "modelValue"])
|
|
3411
|
-
]),
|
|
3412
|
-
$("div", null, [
|
|
3413
|
-
S(St, {
|
|
3414
|
-
label: E(h)("settings.business.restaurant.form.sections.branding.carousel_photos.label")
|
|
3415
|
-
}, null, 8, ["label"]),
|
|
3416
|
-
(x(!0), D(se, null, me(d.photos || [], (y, L) => (x(), Q(be, {
|
|
3417
|
-
key: L,
|
|
3418
|
-
"previous-url": y,
|
|
3419
|
-
"model-value": void 0,
|
|
3420
|
-
"onReset:modelValue": (k) => {
|
|
3421
|
-
var V;
|
|
3422
|
-
return (V = d.photos) == null ? void 0 : V.splice(L, 1);
|
|
3423
|
-
}
|
|
3424
|
-
}, null, 8, ["previous-url", "onReset:modelValue"]))), 128)),
|
|
3425
|
-
(x(!0), D(se, null, me(d.newPhotos || [], (y, L) => {
|
|
3426
|
-
var k;
|
|
3427
|
-
return x(), Q(be, {
|
|
3428
|
-
key: L,
|
|
3429
|
-
"model-value": ((k = d.newPhotos) == null ? void 0 : k[L]) || void 0,
|
|
3430
|
-
"previous-url": void 0,
|
|
3431
|
-
"onReset:modelValue": (V) => {
|
|
3432
|
-
var B;
|
|
3433
|
-
return (B = d.photos) == null ? void 0 : B.splice(L, 1);
|
|
3434
|
-
}
|
|
3435
|
-
}, null, 8, ["model-value", "onReset:modelValue"]);
|
|
3436
|
-
}), 128)),
|
|
3437
|
-
S(be, {
|
|
3438
|
-
"model-value": void 0,
|
|
3439
|
-
"previous-url": void 0,
|
|
3440
|
-
"onUpdate:modelValue": u[15] || (u[15] = (y) => Z(y))
|
|
3441
|
-
})
|
|
3442
|
-
])
|
|
3443
|
-
])
|
|
3444
|
-
]),
|
|
3445
|
-
_: 1
|
|
3446
|
-
}, 8, ["title"])
|
|
3447
|
-
])
|
|
3448
|
-
], 512)
|
|
3449
|
-
])
|
|
3450
|
-
]),
|
|
3451
|
-
_: 1
|
|
3452
|
-
}, 8, ["title", "show", "primary-action", "secondary-actions"])
|
|
3453
|
-
], 64);
|
|
3454
|
-
};
|
|
3455
|
-
}
|
|
3456
|
-
}), Ri = { class: "fm-typo-en-title-md-600" }, Ii = { class: "pt-8 space-y-24" }, Ai = { class: "flex gap-8 items-center justify-start" }, Oi = /* @__PURE__ */ W({
|
|
3457
|
-
__name: "BusinessForm",
|
|
3458
|
-
props: {
|
|
3459
|
-
businessId: {
|
|
3460
|
-
type: String,
|
|
3461
|
-
required: !0
|
|
3462
|
-
},
|
|
3463
|
-
initialValue: {
|
|
3464
|
-
type: Object,
|
|
3465
|
-
default: void 0
|
|
3466
|
-
}
|
|
3467
|
-
},
|
|
3468
|
-
setup(t, { expose: e }) {
|
|
3469
|
-
const r = t, n = ct(), s = fr(n), o = "https://feedmedev.cc", i = lt(
|
|
3470
|
-
r.initialValue ? ge(r.initialValue) : {
|
|
3471
|
-
thumbnail: void 0,
|
|
3472
|
-
name: "",
|
|
3473
|
-
url: void 0,
|
|
3474
|
-
newThumbnail: void 0
|
|
3475
|
-
}
|
|
3476
|
-
);
|
|
3477
|
-
z(() => i.newThumbnail ? URL.createObjectURL(i.newThumbnail) : i.thumbnail);
|
|
3478
|
-
const m = z(() => fe().currentCountry.value), f = re(!1), c = re(!1), b = (h) => {
|
|
3479
|
-
c.value = !c.value;
|
|
3480
|
-
};
|
|
3481
|
-
function d() {
|
|
3482
|
-
i.thumbnail = void 0, i.newThumbnail = void 0;
|
|
3483
|
-
}
|
|
3484
|
-
const T = async () => {
|
|
3485
|
-
const h = i;
|
|
3486
|
-
await s.minor(async () => {
|
|
3487
|
-
var C, F, I;
|
|
3488
|
-
if (h.newThumbnail) {
|
|
3489
|
-
const j = await de.update(
|
|
3490
|
-
`business/${r.businessId}/thumbnail/${dt().toISOString()}.png`,
|
|
3491
|
-
h.newThumbnail
|
|
3492
|
-
);
|
|
3493
|
-
h.thumbnail = j, (C = r.initialValue) != null && C.thumbnail && await de.delete(r.initialValue.thumbnail);
|
|
3494
|
-
} else
|
|
3495
|
-
(F = r.initialValue) != null && F.thumbnail && !h.thumbnail && await de.delete((I = r.initialValue) == null ? void 0 : I.thumbnail);
|
|
3496
|
-
const O = await Yr.updateBusinessProfile(r.businessId, h), N = fe().currentBusiness;
|
|
3497
|
-
N.value = { ...N.value, ...O }, b();
|
|
3498
|
-
});
|
|
3499
|
-
};
|
|
3500
|
-
e({
|
|
3501
|
-
show: c,
|
|
3502
|
-
trigger: b
|
|
3503
|
-
});
|
|
3504
|
-
const { t: g } = pe();
|
|
3505
|
-
return (h, O) => {
|
|
3506
|
-
const N = K("FmTextField"), C = K("fm-button"), F = K("fm-side-sheet");
|
|
3507
|
-
return x(), D(se, null, [
|
|
3508
|
-
ne(h.$slots, "default", { trigger: b }),
|
|
3509
|
-
S(F, {
|
|
3510
|
-
id: "unit-form",
|
|
3511
|
-
modelValue: c.value,
|
|
3512
|
-
"onUpdate:modelValue": O[4] || (O[4] = (I) => c.value = I),
|
|
3513
|
-
"is-container": E(lr).FmForm,
|
|
3514
|
-
"is-container-props": {
|
|
3515
|
-
onValidationSuccess: T,
|
|
3516
|
-
blameFormChildOnValidationFailed: !0
|
|
3517
|
-
},
|
|
3518
|
-
"max-width": 560,
|
|
3519
|
-
"z-index": 100
|
|
3520
|
-
}, {
|
|
3521
|
-
"side-sheet-header": G(() => [
|
|
3522
|
-
$("p", Ri, U(E(g)("settings.business.form.title")), 1)
|
|
3523
|
-
]),
|
|
3524
|
-
"side-sheet-footer": G(() => [
|
|
3525
|
-
$("div", Ai, [
|
|
3526
|
-
S(C, {
|
|
3527
|
-
label: E(g)("common.update"),
|
|
3528
|
-
loading: f.value,
|
|
3529
|
-
size: "lg",
|
|
3530
|
-
type: "submit",
|
|
3531
|
-
variant: "primary"
|
|
3532
|
-
}, null, 8, ["label", "loading"]),
|
|
3533
|
-
S(C, {
|
|
3534
|
-
label: E(g)("common.cancel"),
|
|
3535
|
-
size: "lg",
|
|
3536
|
-
variant: "tertiary",
|
|
3537
|
-
onClick: O[3] || (O[3] = () => c.value = !1)
|
|
3538
|
-
}, null, 8, ["label"])
|
|
3539
|
-
])
|
|
3540
|
-
]),
|
|
3541
|
-
default: G(() => [
|
|
3542
|
-
$("div", Ii, [
|
|
3543
|
-
$("div", null, [
|
|
3544
|
-
S(be, {
|
|
3545
|
-
label: E(g)("settings.business.form.cover_photo.label"),
|
|
3546
|
-
"sub-label": E(g)("settings.business.form.cover_photo.optional"),
|
|
3547
|
-
"previous-url": i.thumbnail,
|
|
3548
|
-
modelValue: i.newThumbnail,
|
|
3549
|
-
"onUpdate:modelValue": O[0] || (O[0] = (I) => i.newThumbnail = I),
|
|
3550
|
-
"onReset:modelValue": d
|
|
3551
|
-
}, null, 8, ["label", "sub-label", "previous-url", "modelValue"])
|
|
3552
|
-
]),
|
|
3553
|
-
$("div", null, [
|
|
3554
|
-
S(N, {
|
|
3555
|
-
label: E(g)("settings.business.form.name"),
|
|
3556
|
-
modelValue: i.name,
|
|
3557
|
-
"onUpdate:modelValue": O[1] || (O[1] = (I) => i.name = I)
|
|
3558
|
-
}, null, 8, ["label", "modelValue"])
|
|
3559
|
-
]),
|
|
3560
|
-
$("div", null, [
|
|
3561
|
-
S(N, {
|
|
3562
|
-
label: E(g)("settings.business.form.url.label"),
|
|
3563
|
-
"model-value": i.url || "",
|
|
3564
|
-
"onUpdate:modelValue": O[2] || (O[2] = (I) => i.url = I),
|
|
3565
|
-
placeholder: t.businessId,
|
|
3566
|
-
rules: [
|
|
3567
|
-
(I) => {
|
|
3568
|
-
var j;
|
|
3569
|
-
return !I || ((j = t.initialValue) == null ? void 0 : j.url) == i.url || m.value == E(ut.F_COUNTRY).enum.MY || E(g)("settings.business.form.url.errors.disabled");
|
|
3570
|
-
},
|
|
3571
|
-
(I) => !I || E(hr).test(I) || E(g)("settings.business.form.url.errors.format"),
|
|
3572
|
-
(I) => !I || !E(vr).includes(I) || E(g)("settings.business.form.url.errors.reserved")
|
|
3573
|
-
]
|
|
3574
|
-
}, {
|
|
3575
|
-
prepend: G(() => [
|
|
3576
|
-
$("span", null, U(E(o) + "/"), 1)
|
|
3577
|
-
]),
|
|
3578
|
-
_: 1
|
|
3579
|
-
}, 8, ["label", "model-value", "placeholder", "rules"])
|
|
3580
|
-
])
|
|
3581
|
-
])
|
|
3582
|
-
]),
|
|
3583
|
-
_: 1
|
|
3584
|
-
}, 8, ["modelValue", "is-container", "is-container-props"])
|
|
3585
|
-
], 64);
|
|
3586
|
-
};
|
|
3587
|
-
}
|
|
3588
|
-
});
|
|
3589
|
-
function Pi(t) {
|
|
3590
|
-
return ke(
|
|
3591
|
-
"div",
|
|
3592
|
-
{
|
|
3593
|
-
class: "flex justify-end"
|
|
3594
|
-
},
|
|
3595
|
-
t.map(({ name: e, onClick: r }) => ke(lr.FmButton, {
|
|
3596
|
-
icon: e,
|
|
3597
|
-
outline: !0,
|
|
3598
|
-
variant: "tertiary",
|
|
3599
|
-
iconColor: "neutral-gray-400",
|
|
3600
|
-
onClick: xe(r, ["stop", "prevent"])
|
|
3601
|
-
}))
|
|
3602
|
-
);
|
|
3603
|
-
}
|
|
3604
|
-
const Si = /* @__PURE__ */ W({
|
|
3605
|
-
__name: "BottomSheetMenu",
|
|
3606
|
-
setup(t) {
|
|
3607
|
-
const e = re(!1);
|
|
3608
|
-
async function r() {
|
|
3609
|
-
await sr(), e.value = !e.value;
|
|
3610
|
-
}
|
|
3611
|
-
return (n, s) => {
|
|
3612
|
-
const o = K("FmButton"), i = K("FmBottomSheet");
|
|
3613
|
-
return x(), Q(i, {
|
|
3614
|
-
modelValue: e.value,
|
|
3615
|
-
"onUpdate:modelValue": s[1] || (s[1] = (m) => e.value = m),
|
|
3616
|
-
"dismiss-away": "",
|
|
3617
|
-
"no-header": "",
|
|
3618
|
-
"z-index": 110
|
|
3619
|
-
}, {
|
|
3620
|
-
"bottom-sheet-button": G(() => [
|
|
3621
|
-
n.$slots.button ? le("", !0) : (x(), Q(o, {
|
|
3622
|
-
key: 0,
|
|
3623
|
-
icon: "more_vert",
|
|
3624
|
-
variant: "tertiary",
|
|
3625
|
-
onClick: xe(r, ["stop"])
|
|
3626
|
-
})),
|
|
3627
|
-
ne(n.$slots, "button")
|
|
3628
|
-
]),
|
|
3629
|
-
default: G(() => [
|
|
3630
|
-
$("div", {
|
|
3631
|
-
onClick: s[0] || (s[0] = (m) => e.value = !1)
|
|
3632
|
-
}, [
|
|
3633
|
-
ne(n.$slots, "default")
|
|
3634
|
-
])
|
|
3635
|
-
]),
|
|
3636
|
-
_: 3
|
|
3637
|
-
}, 8, ["modelValue"]);
|
|
3638
|
-
};
|
|
3639
|
-
}
|
|
3640
|
-
}), Ti = { class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100" }, Li = /* @__PURE__ */ W({
|
|
3641
|
-
__name: "BottomSheetMenuItem",
|
|
3642
|
-
props: {
|
|
3643
|
-
label: {},
|
|
3644
|
-
icon: {},
|
|
3645
|
-
disabled: { type: Boolean },
|
|
3646
|
-
itemClass: {}
|
|
3647
|
-
},
|
|
3648
|
-
setup(t) {
|
|
3649
|
-
const e = t;
|
|
3650
|
-
return (r, n) => {
|
|
3651
|
-
const s = K("FmIcon");
|
|
3652
|
-
return x(), D("div", Ti, [
|
|
3653
|
-
r.$slots.content ? le("", !0) : (x(), D("div", {
|
|
3654
|
-
key: 0,
|
|
3655
|
-
class: Y(["flex items-center", {
|
|
3656
|
-
"text-fm-color-typo-disabled": e.disabled,
|
|
3657
|
-
"cursor-pointer": !e.disabled,
|
|
3658
|
-
"cursor-not-allowed": e.disabled,
|
|
3659
|
-
[e.itemClass || ""]: e.itemClass && !e.disabled
|
|
3660
|
-
}])
|
|
3661
|
-
}, [
|
|
3662
|
-
r.icon ? (x(), Q(s, {
|
|
3663
|
-
key: 0,
|
|
3664
|
-
name: r.icon
|
|
3665
|
-
}, null, 8, ["name"])) : le("", !0),
|
|
3666
|
-
Ce(" " + U(r.label), 1)
|
|
3667
|
-
], 2)),
|
|
3668
|
-
ne(r.$slots, "content")
|
|
3669
|
-
]);
|
|
3670
|
-
};
|
|
3671
|
-
}
|
|
3672
|
-
}), Ni = { class: "fm-typo-cn-body-md-400 text-fm-color-typo-secondary xs:flex xs:flex-col" }, Ci = { class: "flex flex-1" }, ki = {
|
|
3673
|
-
key: 0,
|
|
3674
|
-
class: "flex gap-8"
|
|
3675
|
-
}, xi = {
|
|
3676
|
-
key: 0,
|
|
3677
|
-
class: "space-y-4"
|
|
3678
|
-
}, Vi = { class: "fm-typo-en-body-md-600" }, Fi = {
|
|
3679
|
-
key: 0,
|
|
3680
|
-
class: "space-y-8"
|
|
3681
|
-
}, ji = { class: "flex justify-end" }, Mi = { class: "flex-1 pb-64 overflow-auto divide-y divide-fm-color-neutral-gray-100" }, Ui = { key: 0 }, Di = ["onClick"], Bi = { class: "flex justify-between items-center" }, Gi = { class: "fm-typo-en-body-lg-600" }, Ki = { class: "flex gap-8" }, qi = { class: "text-fm-color-typo-secondary" }, zi = { class: "text-fm-color-typo-secondary" }, Hi = { class: "text-fm-color-typo-secondary" }, ol = /* @__PURE__ */ W({
|
|
3682
|
-
__name: "Business",
|
|
3683
|
-
setup(t) {
|
|
3684
|
-
const { searchKey: e, filter: r } = bn(), { copyTextToClipboard: n } = ur(), s = ir(), o = z(() => s.breakpoints.value.xs), { t: i } = pe(), m = z(() => {
|
|
3685
|
-
const { currentBusiness: h, restaurants: O } = fe(), N = h.value;
|
|
3686
|
-
if (!N)
|
|
3687
|
-
return null;
|
|
3688
|
-
const { id: C, name: F, thumbnail: I, url: j } = N, J = O.value.filter((M) => M.managable).map((M) => {
|
|
3689
|
-
var p;
|
|
3690
|
-
const { _id: H, profile: a } = M, { name: l, email: v, phoneNo: w, address: R, sstRegNo: u } = {
|
|
3691
|
-
...a,
|
|
3692
|
-
address: Ee(a.address)
|
|
3693
|
-
};
|
|
3694
|
-
return {
|
|
3695
|
-
id: H,
|
|
3696
|
-
code: ((p = M.profile) == null ? void 0 : p.code) || "--",
|
|
3697
|
-
name: l,
|
|
3698
|
-
email: v,
|
|
3699
|
-
phone: w,
|
|
3700
|
-
address: R.formatted,
|
|
3701
|
-
withSST: !!u,
|
|
3702
|
-
doc: M
|
|
3703
|
-
};
|
|
3704
|
-
});
|
|
3705
|
-
return {
|
|
3706
|
-
id: C,
|
|
3707
|
-
name: F,
|
|
3708
|
-
thumbnail: I,
|
|
3709
|
-
url: `https://feedmedev.cc/${j || C}`,
|
|
3710
|
-
doc: N,
|
|
3711
|
-
canCreateRestaurant: vn(N, O.value),
|
|
3712
|
-
restaurants: J.filter(
|
|
3713
|
-
({ code: M, name: H, address: a, phone: l, email: v }) => r([M, H, a, l, v])
|
|
3714
|
-
)
|
|
3715
|
-
};
|
|
3716
|
-
}), f = z(() => [
|
|
3717
|
-
{
|
|
3718
|
-
header: i("settings.business.restaurant.code"),
|
|
3719
|
-
accessorKey: "code",
|
|
3720
|
-
enableSorting: !1
|
|
3721
|
-
},
|
|
3722
|
-
{
|
|
3723
|
-
header: i("settings.business.restaurant.title"),
|
|
3724
|
-
accessorKey: "name",
|
|
3725
|
-
enableSorting: !1
|
|
3726
|
-
},
|
|
3727
|
-
{
|
|
3728
|
-
header: i("settings.business.restaurant.address"),
|
|
3729
|
-
accessorKey: "address",
|
|
3730
|
-
size: 200,
|
|
3731
|
-
enableSorting: !1
|
|
3732
|
-
},
|
|
3733
|
-
{
|
|
3734
|
-
header: i("settings.business.restaurant.contact"),
|
|
3735
|
-
accessorKey: "phone",
|
|
3736
|
-
enableSorting: !1
|
|
3737
|
-
},
|
|
3738
|
-
{
|
|
3739
|
-
header: i("settings.business.restaurant.email"),
|
|
3740
|
-
accessorKey: "email",
|
|
3741
|
-
enableSorting: !1
|
|
3742
|
-
},
|
|
3743
|
-
{
|
|
3744
|
-
header: i("settings.business.restaurant.tax.title"),
|
|
3745
|
-
enableSorting: !1,
|
|
3746
|
-
cell: (h) => {
|
|
3747
|
-
var N;
|
|
3748
|
-
const O = h.row.original;
|
|
3749
|
-
return (N = O.doc.profile.sstRegNo) != null && N.length ? O.doc.profile.sstRegNo : i("settings.business.restaurant.tax.not_set");
|
|
3750
|
-
}
|
|
3751
|
-
},
|
|
3752
|
-
{
|
|
3753
|
-
id: "action",
|
|
3754
|
-
header: "",
|
|
3755
|
-
size: 80,
|
|
3756
|
-
cell: (h) => {
|
|
3757
|
-
const O = h.row.original;
|
|
3758
|
-
return Pi([
|
|
3759
|
-
{
|
|
3760
|
-
name: "edit",
|
|
3761
|
-
onClick: () => g(O)
|
|
3762
|
-
},
|
|
3763
|
-
{
|
|
3764
|
-
name: "file_copy",
|
|
3765
|
-
onClick: () => {
|
|
3766
|
-
n(O.id);
|
|
3767
|
-
}
|
|
3768
|
-
}
|
|
3769
|
-
]);
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
]);
|
|
3773
|
-
function c() {
|
|
3774
|
-
var h;
|
|
3775
|
-
n(((h = m.value) == null ? void 0 : h.url) || "");
|
|
3776
|
-
}
|
|
3777
|
-
function b() {
|
|
3778
|
-
if (!m.value)
|
|
3779
|
-
return;
|
|
3780
|
-
const { name: h, url: O, thumbnail: N } = m.value.doc;
|
|
3781
|
-
He(d, Oi, {
|
|
3782
|
-
businessId: m.value.id,
|
|
3783
|
-
initialValue: {
|
|
3784
|
-
name: h,
|
|
3785
|
-
url: O,
|
|
3786
|
-
thumbnail: N
|
|
3787
|
-
}
|
|
3788
|
-
});
|
|
3789
|
-
}
|
|
3790
|
-
const d = Fr();
|
|
3791
|
-
function T() {
|
|
3792
|
-
He(d, rr, {
|
|
3793
|
-
enableFeedmeExpress: !1
|
|
3794
|
-
});
|
|
3795
|
-
}
|
|
3796
|
-
function g(h) {
|
|
3797
|
-
var O;
|
|
3798
|
-
He(d, rr, {
|
|
3799
|
-
restaurantId: h.id,
|
|
3800
|
-
restaurant: h.doc,
|
|
3801
|
-
enableFeedmeExpress: ((O = h.doc.feedmeDelivery) == null ? void 0 : O.enable) || !1
|
|
3802
|
-
});
|
|
3803
|
-
}
|
|
3804
|
-
return (h, O) => {
|
|
3805
|
-
var Z;
|
|
3806
|
-
const N = K("FmSpacer"), C = K("FmButton"), F = K("FmTooltip"), I = K("FmSearch"), j = K("FmTable"), J = K("FmCircularProgress");
|
|
3807
|
-
return x(), Q(Hr, {
|
|
3808
|
-
heading: ((Z = m.value) == null ? void 0 : Z.name) || "--"
|
|
3809
|
-
}, {
|
|
3810
|
-
"sub-heading": G(() => {
|
|
3811
|
-
var M;
|
|
3812
|
-
return [
|
|
3813
|
-
$("div", Ni, [
|
|
3814
|
-
$("span", null, U(E(i)("settings.business.url")) + ": ", 1),
|
|
3815
|
-
$("span", {
|
|
3816
|
-
class: "cursor-pointer xs:w-max-[200px] truncate",
|
|
3817
|
-
onClick: c
|
|
3818
|
-
}, U((M = m.value) == null ? void 0 : M.url), 1)
|
|
3819
|
-
])
|
|
3820
|
-
];
|
|
3821
|
-
}),
|
|
3822
|
-
"append-heading": G(() => [
|
|
3823
|
-
$("div", Ci, [
|
|
3824
|
-
S(N),
|
|
3825
|
-
o.value ? (x(), D(se, { key: 1 }, [
|
|
3826
|
-
S(Xr, {
|
|
3827
|
-
onClick: T,
|
|
3828
|
-
label: E(i)("settings.business.add_restaurant"),
|
|
3829
|
-
"prepend-icon": "add"
|
|
3830
|
-
}, null, 8, ["label"]),
|
|
3831
|
-
S(Si, null, {
|
|
3832
|
-
default: G(() => [
|
|
3833
|
-
S(Li, {
|
|
3834
|
-
label: E(i)("common.edit"),
|
|
3835
|
-
onClick: b
|
|
3836
|
-
}, null, 8, ["label"])
|
|
3837
|
-
]),
|
|
3838
|
-
_: 1
|
|
3839
|
-
})
|
|
3840
|
-
], 64)) : (x(), D("div", ki, [
|
|
3841
|
-
S(C, {
|
|
3842
|
-
onClick: b,
|
|
3843
|
-
variant: "secondary",
|
|
3844
|
-
label: E(i)("common.edit")
|
|
3845
|
-
}, null, 8, ["label"]),
|
|
3846
|
-
S(F, {
|
|
3847
|
-
variant: "rich",
|
|
3848
|
-
placement: "left",
|
|
3849
|
-
"z-index": 100
|
|
3850
|
-
}, {
|
|
3851
|
-
content: G(() => {
|
|
3852
|
-
var M;
|
|
3853
|
-
return [
|
|
3854
|
-
(M = m.value) != null && M.canCreateRestaurant ? le("", !0) : (x(), D("div", xi, [
|
|
3855
|
-
$("p", Vi, U(E(i)("settings.business.quota.limit_title")), 1),
|
|
3856
|
-
$("p", null, U(E(i)("settings.business.quota.limit_message")), 1)
|
|
3857
|
-
]))
|
|
3858
|
-
];
|
|
3859
|
-
}),
|
|
3860
|
-
default: G(() => {
|
|
3861
|
-
var M;
|
|
3862
|
-
return [
|
|
3863
|
-
S(C, {
|
|
3864
|
-
onClick: T,
|
|
3865
|
-
label: E(i)("settings.business.add_restaurant"),
|
|
3866
|
-
disabled: !((M = m.value) != null && M.canCreateRestaurant),
|
|
3867
|
-
"prepend-icon": "add"
|
|
3868
|
-
}, null, 8, ["label", "disabled"])
|
|
3869
|
-
];
|
|
3870
|
-
}),
|
|
3871
|
-
_: 1
|
|
3872
|
-
})
|
|
3873
|
-
]))
|
|
3874
|
-
])
|
|
3875
|
-
]),
|
|
3876
|
-
default: G(() => {
|
|
3877
|
-
var M, H;
|
|
3878
|
-
return [
|
|
3879
|
-
o.value ? (x(), D(se, { key: 1 }, [
|
|
3880
|
-
S(I, {
|
|
3881
|
-
class: "my-8 mx-16",
|
|
3882
|
-
modelValue: E(e),
|
|
3883
|
-
"onUpdate:modelValue": O[2] || (O[2] = (a) => Et(e) ? e.value = a : null),
|
|
3884
|
-
placeholder: E(i)("settings.business.search_restaurants")
|
|
3885
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
3886
|
-
$("div", Mi, [
|
|
3887
|
-
m.value ? (x(!0), D(se, { key: 1 }, me((H = m.value) == null ? void 0 : H.restaurants, (a) => {
|
|
3888
|
-
var l;
|
|
3889
|
-
return x(), D("div", {
|
|
3890
|
-
key: a.id,
|
|
3891
|
-
class: "py-12 px-16 space-y-4",
|
|
3892
|
-
onClick: (v) => g(a)
|
|
3893
|
-
}, [
|
|
3894
|
-
$("div", Bi, [
|
|
3895
|
-
$("div", Gi, U(a.name), 1),
|
|
3896
|
-
$("div", Ki, [
|
|
3897
|
-
S(C, {
|
|
3898
|
-
icon: "edit",
|
|
3899
|
-
"text-color": "neutral-gray-400",
|
|
3900
|
-
variant: "tertiary",
|
|
3901
|
-
onClick: xe((v) => g(a), ["stop"])
|
|
3902
|
-
}, null, 8, ["onClick"]),
|
|
3903
|
-
S(C, {
|
|
3904
|
-
icon: "file_copy",
|
|
3905
|
-
"text-color": "neutral-gray-400",
|
|
3906
|
-
variant: "tertiary",
|
|
3907
|
-
onClick: xe((v) => E(n)(a.id), ["stop"])
|
|
3908
|
-
}, null, 8, ["onClick"])
|
|
3909
|
-
])
|
|
3910
|
-
]),
|
|
3911
|
-
$("div", qi, U(E(i)("settings.business.restaurant.contact")) + ": " + U(a.phone), 1),
|
|
3912
|
-
$("div", zi, U(E(i)("settings.business.restaurant.email")) + ": " + U(a.email), 1),
|
|
3913
|
-
$("div", Hi, U(E(i)("settings.business.restaurant.tax.title")) + ": " + U((l = a.doc.profile.sstRegNo) != null && l.length ? a.doc.profile.sstRegNo : E(i)("settings.business.restaurant.tax.not_set")), 1)
|
|
3914
|
-
], 8, Di);
|
|
3915
|
-
}), 128)) : (x(), D("div", Ui, [
|
|
3916
|
-
S(J, { size: "lg" })
|
|
3917
|
-
]))
|
|
3918
|
-
])
|
|
3919
|
-
], 64)) : (x(), D("div", Fi, [
|
|
3920
|
-
$("div", ji, [
|
|
3921
|
-
S(I, {
|
|
3922
|
-
class: "w-[320px]",
|
|
3923
|
-
modelValue: E(e),
|
|
3924
|
-
"onUpdate:modelValue": O[0] || (O[0] = (a) => Et(e) ? e.value = a : null),
|
|
3925
|
-
placeholder: E(i)("settings.business.search_restaurants")
|
|
3926
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
3927
|
-
]),
|
|
3928
|
-
S(j, {
|
|
3929
|
-
"column-defs": f.value,
|
|
3930
|
-
"row-data": ((M = m.value) == null ? void 0 : M.restaurants) || [],
|
|
3931
|
-
"shrink-at": !1,
|
|
3932
|
-
loading: !m.value,
|
|
3933
|
-
onRowClick: O[1] || (O[1] = (a) => g(a.original))
|
|
3934
|
-
}, null, 8, ["column-defs", "row-data", "loading"])
|
|
3935
|
-
]))
|
|
3936
|
-
];
|
|
3937
|
-
}),
|
|
3938
|
-
_: 1
|
|
3939
|
-
}, 8, ["heading"]);
|
|
3940
|
-
};
|
|
3941
|
-
}
|
|
3942
|
-
});
|
|
3943
|
-
export {
|
|
3944
|
-
ol as default
|
|
3945
|
-
};
|