@feedmepos/mf-connect 0.1.0-beta.3 → 0.1.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-DLez3H4H.js +424 -0
- package/dist/{App-gzbM97vW.js → App-dkNRyYLR.js} +397 -384
- package/dist/{Broadcast-BwYZkTs0.js → Broadcast-DlAaBitD.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BtpiGQEs.js} +8 -8
- package/dist/Card-JpWEjzjP.js +897 -0
- package/dist/{Collections-Df6tlo8S.js → Collections-D5hUfDJo.js} +4 -4
- package/dist/{Credit-BPel8vA9.js → Credit-v3KdCFwT.js} +14 -14
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CE2Ar-Ll.js +2198 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js → EffectSheet.vue_vue_type_style_index_0_lang-C12m8EXP.js} +8 -8
- package/dist/{Experience-CPpz1Zwx.js → Experience-9A41fyZO.js} +8 -8
- package/dist/{Game-ByLblISC.js → Game-l1tUsePJ.js} +15 -15
- package/dist/Index-rF6OzGw_.js +255 -0
- package/dist/Marketing-6zS-6CS3.js +20070 -0
- package/dist/{Member-CCc_FEZY.js → Member-B5jPh0DM.js} +4 -4
- package/dist/MemberList-c2P1lToO.js +1045 -0
- package/dist/{MemberTransactions-DD5ahSbY.js → MemberTransactions-BiwAZyCP.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js → MessageInput.vue_vue_type_script_setup_true_lang-CYVOCazs.js} +2 -2
- package/dist/{Mission-VH4057I-.js → Mission-BM7abR6J.js} +98 -86
- package/dist/Overview-Drjb4oAW.js +1024 -0
- package/dist/{Point-Bu3IlpH4.js → Point-BP9YezdW.js} +23 -23
- package/dist/{Promotion-B45AOHis.js → Promotion-DiqlNOWk.js} +53 -47
- package/dist/Record-DJ2A1L-C.js +209 -0
- package/dist/Reward-DN6z6LXf.js +411 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CcbzCFUg.js +151 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CFD10xnG.js +1639 -0
- package/dist/Segment-Cm48eZrS.js +567 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-6XokSm7W.js +181 -0
- package/dist/{Setting-CF09eRQJ.js → Setting-3jXUi2cS.js} +8 -8
- package/dist/Store-Csditfe8.js +1745 -0
- package/dist/{StoreRewards-0iGExjqQ.js → StoreRewards-DOMxpeaj.js} +12 -12
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Csoobxol.js +957 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C8UhKTgD.js} +1 -1
- package/dist/{Tier-IaeWe7rM.js → Tier-BmhQYaPz.js} +318 -306
- package/dist/{Title-DD67Zxh5.js → Title-BJV4yLCu.js} +199 -183
- package/dist/{Transaction-BsPDnLzB.js → Transaction-DB81PNYL.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-wyCBPQRj.js +130 -0
- package/dist/{Voucher-M7JfcKo0.js → Voucher-B8nnAIUZ.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-B4zIOBh0.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js → ZodTextField.vue_vue_type_script_setup_true_lang-DvfcNsj9.js} +1 -1
- package/dist/{app-DwujUNP-.js → app-BYTkNtdY.js} +1 -1
- package/dist/{app-HFICF0vL.js → app-sD3N1iqR.js} +1285 -1283
- package/dist/app.js +1 -1
- package/dist/{business-BaF1QJXa.js → business-B6OFKNz4.js} +1 -1
- package/dist/{campaign-CTDtmAE9.js → campaign-DhumfBC6.js} +2 -2
- package/dist/collectible.enum-4Gywgj__.js +19 -0
- package/dist/{collection.fn-DMW03W4R.js → collection.fn-D-uexOQL.js} +2 -2
- package/dist/{dto-gpaNZHzQ.js → dto-b9jcbMWA.js} +78 -86
- package/dist/{effect-CBUmtwet.js → effect-CBN4vtSi.js} +9 -9
- package/dist/email-addresses-BqgJVUoG.js +705 -0
- package/dist/{export-Bdh_PbsW.js → export-D1kS_vMc.js} +3 -3
- package/dist/{helper-Cu9elRvl.js → helper-SbkTJZDm.js} +1 -1
- package/dist/index-BBBSm4kr.js +54 -0
- package/dist/index-BIs-Ed1-.js +29000 -0
- package/dist/{index-ogzk-Mj4.js → index-CBwwTcb5.js} +1 -1
- package/dist/{index-At6yms5t.js → index-CHg2swyg.js} +30 -26
- package/dist/index-Cd94xjeo.js +38 -0
- package/dist/{index-CArqG03W.js → index-Cehc8dyz.js} +39 -35
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-CtH2S49l.js → index-CxBG7i3n.js} +203 -195
- package/dist/{index-DrGrOgZB.js → index-DgJVPeks.js} +13 -1
- package/dist/{index-NXiDu42U.js → index-Dp-5hs3q.js} +1 -1
- package/dist/{index-Crw-Vgo5.js → index-DtX7V_mF.js} +1500 -1479
- package/dist/index-Hhxoo_Eg.js +1067 -0
- package/dist/{index-Ch6XwPzF.js → index-OCIxZJKd.js} +1 -1
- package/dist/{index-Dfdg2Q3E.js → index-wJ5e3mQa.js} +1 -1
- package/dist/{index.esm2017-CeJpvUbA.js → index.esm2017-Bl1OPd9N.js} +33 -33
- package/dist/{loading-Cn8ml_vy.js → loading-BghJIv3w.js} +591 -597
- package/dist/{membership-CX4AKMlH.js → membership-D532uzUJ.js} +51 -43
- package/dist/money-BJmDeENN.js +15 -0
- package/dist/number-E_LdkU9a.js +12 -0
- package/dist/objectid-DSB8jlsT.js +145 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-CiTzAsCd.js +36 -0
- package/dist/{rule-Cv83Y59R.js → rule-0MEHUef9.js} +180 -177
- package/dist/{rule-builder-Dew4yB5Q.js → rule-builder-BQZN0Bi4.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CSnbgM1o.js → template-2xDKWfij.js} +5 -5
- package/dist/trigger-BFmJQkCL.js +114 -0
- package/dist/user-B_diJ-ER.js +54 -0
- package/dist/{vue-i18n-CNH_IhVd.js → vue-i18n-D0S05G9j.js} +408 -408
- package/dist/{xlsx-D4DUZHix.js → xlsx-9pjTnN_k.js} +1 -1
- package/package.json +8 -7
- package/dist/Analytic-BC5BA6pN.js +0 -622
- package/dist/Card-CBYQGKwY.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js +0 -2809
- package/dist/Marketing-D0vm80e_.js +0 -316
- package/dist/MemberList-CrnipE9y.js +0 -1733
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js +0 -1753
- package/dist/Segment-ZWsp48aC.js +0 -437
- package/dist/Store-B_G6Dhmq.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js +0 -890
- package/dist/index-8MaN7rez.js +0 -762
- package/dist/index-BjdHxGDn.js +0 -298
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-RP0XOPRL.js +0 -29193
- package/dist/money-BTejgvKu.js +0 -15
- package/dist/number-Cen5TucC.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -0,0 +1,1693 @@
|
|
|
1
|
+
import "vue";
|
|
2
|
+
function be(e, t) {
|
|
3
|
+
return function() {
|
|
4
|
+
return e.apply(t, arguments);
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
const { toString: qe } = Object.prototype, { getPrototypeOf: Z } = Object, F = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = qe.call(t);
|
|
9
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), R = (e) => (e = e.toLowerCase(), (t) => F(t) === e), B = (e) => (t) => typeof t === e, { isArray: C } = Array, j = B("undefined");
|
|
11
|
+
function Me(e) {
|
|
12
|
+
return e !== null && !j(e) && e.constructor !== null && !j(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
|
+
}
|
|
14
|
+
const we = R("ArrayBuffer");
|
|
15
|
+
function ze(e) {
|
|
16
|
+
let t;
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && we(e.buffer), t;
|
|
18
|
+
}
|
|
19
|
+
const He = B("string"), O = B("function"), Ee = B("number"), I = (e) => e !== null && typeof e == "object", Je = (e) => e === !0 || e === !1, U = (e) => {
|
|
20
|
+
if (F(e) !== "object")
|
|
21
|
+
return !1;
|
|
22
|
+
const t = Z(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
24
|
+
}, $e = R("Date"), Ve = R("File"), Ge = R("Blob"), We = R("FileList"), Ke = (e) => I(e) && O(e.pipe), Xe = (e) => {
|
|
25
|
+
let t;
|
|
26
|
+
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = F(e)) === "formdata" || // detect form-data instance
|
|
27
|
+
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
28
|
+
}, Qe = R("URLSearchParams"), Ze = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
29
|
+
function x(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
30
|
+
if (e === null || typeof e > "u")
|
|
31
|
+
return;
|
|
32
|
+
let r, o;
|
|
33
|
+
if (typeof e != "object" && (e = [e]), C(e))
|
|
34
|
+
for (r = 0, o = e.length; r < o; r++)
|
|
35
|
+
t.call(null, e[r], r, e);
|
|
36
|
+
else {
|
|
37
|
+
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
38
|
+
let u;
|
|
39
|
+
for (r = 0; r < i; r++)
|
|
40
|
+
u = s[r], t.call(null, e[u], u, e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function Oe(e, t) {
|
|
44
|
+
t = t.toLowerCase();
|
|
45
|
+
const n = Object.keys(e);
|
|
46
|
+
let r = n.length, o;
|
|
47
|
+
for (; r-- > 0; )
|
|
48
|
+
if (o = n[r], t === o.toLowerCase())
|
|
49
|
+
return o;
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
const Se = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Re = (e) => !j(e) && e !== Se;
|
|
53
|
+
function G() {
|
|
54
|
+
const { caseless: e } = Re(this) && this || {}, t = {}, n = (r, o) => {
|
|
55
|
+
const s = e && Oe(t, o) || o;
|
|
56
|
+
U(t[s]) && U(r) ? t[s] = G(t[s], r) : U(r) ? t[s] = G({}, r) : C(r) ? t[s] = r.slice() : t[s] = r;
|
|
57
|
+
};
|
|
58
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
59
|
+
arguments[r] && x(arguments[r], n);
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
const Ye = (e, t, n, { allOwnKeys: r } = {}) => (x(t, (o, s) => {
|
|
63
|
+
n && O(o) ? e[s] = be(o, n) : e[s] = o;
|
|
64
|
+
}, { allOwnKeys: r }), e), et = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), tt = (e, t, n, r) => {
|
|
65
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
66
|
+
value: t.prototype
|
|
67
|
+
}), n && Object.assign(e.prototype, n);
|
|
68
|
+
}, nt = (e, t, n, r) => {
|
|
69
|
+
let o, s, i;
|
|
70
|
+
const u = {};
|
|
71
|
+
if (t = t || {}, e == null)
|
|
72
|
+
return t;
|
|
73
|
+
do {
|
|
74
|
+
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
75
|
+
i = o[s], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
|
|
76
|
+
e = n !== !1 && Z(e);
|
|
77
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
78
|
+
return t;
|
|
79
|
+
}, rt = (e, t, n) => {
|
|
80
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
81
|
+
const r = e.indexOf(t, n);
|
|
82
|
+
return r !== -1 && r === n;
|
|
83
|
+
}, ot = (e) => {
|
|
84
|
+
if (!e)
|
|
85
|
+
return null;
|
|
86
|
+
if (C(e))
|
|
87
|
+
return e;
|
|
88
|
+
let t = e.length;
|
|
89
|
+
if (!Ee(t))
|
|
90
|
+
return null;
|
|
91
|
+
const n = new Array(t);
|
|
92
|
+
for (; t-- > 0; )
|
|
93
|
+
n[t] = e[t];
|
|
94
|
+
return n;
|
|
95
|
+
}, st = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Z(Uint8Array)), it = (e, t) => {
|
|
96
|
+
const n = (e && e[Symbol.iterator]).call(e);
|
|
97
|
+
let r;
|
|
98
|
+
for (; (r = n.next()) && !r.done; ) {
|
|
99
|
+
const o = r.value;
|
|
100
|
+
t.call(e, o[0], o[1]);
|
|
101
|
+
}
|
|
102
|
+
}, at = (e, t) => {
|
|
103
|
+
let n;
|
|
104
|
+
const r = [];
|
|
105
|
+
for (; (n = e.exec(t)) !== null; )
|
|
106
|
+
r.push(n);
|
|
107
|
+
return r;
|
|
108
|
+
}, ct = R("HTMLFormElement"), ut = (e) => e.toLowerCase().replace(
|
|
109
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
110
|
+
function(t, n, r) {
|
|
111
|
+
return n.toUpperCase() + r;
|
|
112
|
+
}
|
|
113
|
+
), oe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), lt = R("RegExp"), ve = (e, t) => {
|
|
114
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
115
|
+
x(n, (o, s) => {
|
|
116
|
+
let i;
|
|
117
|
+
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
118
|
+
}), Object.defineProperties(e, r);
|
|
119
|
+
}, ft = (e) => {
|
|
120
|
+
ve(e, (t, n) => {
|
|
121
|
+
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
|
+
return !1;
|
|
123
|
+
const r = e[n];
|
|
124
|
+
if (O(r)) {
|
|
125
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
126
|
+
t.writable = !1;
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
t.set || (t.set = () => {
|
|
130
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}, dt = (e, t) => {
|
|
135
|
+
const n = {}, r = (o) => {
|
|
136
|
+
o.forEach((s) => {
|
|
137
|
+
n[s] = !0;
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
return C(e) ? r(e) : r(String(e).split(t)), n;
|
|
141
|
+
}, pt = () => {
|
|
142
|
+
}, ht = (e, t) => (e = +e, Number.isFinite(e) ? e : t), H = "abcdefghijklmnopqrstuvwxyz", se = "0123456789", Ae = {
|
|
143
|
+
DIGIT: se,
|
|
144
|
+
ALPHA: H,
|
|
145
|
+
ALPHA_DIGIT: H + H.toUpperCase() + se
|
|
146
|
+
}, mt = (e = 16, t = Ae.ALPHA_DIGIT) => {
|
|
147
|
+
let n = "";
|
|
148
|
+
const { length: r } = t;
|
|
149
|
+
for (; e--; )
|
|
150
|
+
n += t[Math.random() * r | 0];
|
|
151
|
+
return n;
|
|
152
|
+
};
|
|
153
|
+
function gt(e) {
|
|
154
|
+
return !!(e && O(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
|
+
}
|
|
156
|
+
const yt = (e) => {
|
|
157
|
+
const t = new Array(10), n = (r, o) => {
|
|
158
|
+
if (I(r)) {
|
|
159
|
+
if (t.indexOf(r) >= 0)
|
|
160
|
+
return;
|
|
161
|
+
if (!("toJSON" in r)) {
|
|
162
|
+
t[o] = r;
|
|
163
|
+
const s = C(r) ? [] : {};
|
|
164
|
+
return x(r, (i, u) => {
|
|
165
|
+
const d = n(i, o + 1);
|
|
166
|
+
!j(d) && (s[u] = d);
|
|
167
|
+
}), t[o] = void 0, s;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return r;
|
|
171
|
+
};
|
|
172
|
+
return n(e, 0);
|
|
173
|
+
}, bt = R("AsyncFunction"), wt = (e) => e && (I(e) || O(e)) && O(e.then) && O(e.catch), a = {
|
|
174
|
+
isArray: C,
|
|
175
|
+
isArrayBuffer: we,
|
|
176
|
+
isBuffer: Me,
|
|
177
|
+
isFormData: Xe,
|
|
178
|
+
isArrayBufferView: ze,
|
|
179
|
+
isString: He,
|
|
180
|
+
isNumber: Ee,
|
|
181
|
+
isBoolean: Je,
|
|
182
|
+
isObject: I,
|
|
183
|
+
isPlainObject: U,
|
|
184
|
+
isUndefined: j,
|
|
185
|
+
isDate: $e,
|
|
186
|
+
isFile: Ve,
|
|
187
|
+
isBlob: Ge,
|
|
188
|
+
isRegExp: lt,
|
|
189
|
+
isFunction: O,
|
|
190
|
+
isStream: Ke,
|
|
191
|
+
isURLSearchParams: Qe,
|
|
192
|
+
isTypedArray: st,
|
|
193
|
+
isFileList: We,
|
|
194
|
+
forEach: x,
|
|
195
|
+
merge: G,
|
|
196
|
+
extend: Ye,
|
|
197
|
+
trim: Ze,
|
|
198
|
+
stripBOM: et,
|
|
199
|
+
inherits: tt,
|
|
200
|
+
toFlatObject: nt,
|
|
201
|
+
kindOf: F,
|
|
202
|
+
kindOfTest: R,
|
|
203
|
+
endsWith: rt,
|
|
204
|
+
toArray: ot,
|
|
205
|
+
forEachEntry: it,
|
|
206
|
+
matchAll: at,
|
|
207
|
+
isHTMLForm: ct,
|
|
208
|
+
hasOwnProperty: oe,
|
|
209
|
+
hasOwnProp: oe,
|
|
210
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
211
|
+
reduceDescriptors: ve,
|
|
212
|
+
freezeMethods: ft,
|
|
213
|
+
toObjectSet: dt,
|
|
214
|
+
toCamelCase: ut,
|
|
215
|
+
noop: pt,
|
|
216
|
+
toFiniteNumber: ht,
|
|
217
|
+
findKey: Oe,
|
|
218
|
+
global: Se,
|
|
219
|
+
isContextDefined: Re,
|
|
220
|
+
ALPHABET: Ae,
|
|
221
|
+
generateString: mt,
|
|
222
|
+
isSpecCompliantForm: gt,
|
|
223
|
+
toJSONObject: yt,
|
|
224
|
+
isAsyncFn: bt,
|
|
225
|
+
isThenable: wt
|
|
226
|
+
};
|
|
227
|
+
function m(e, t, n, r, o) {
|
|
228
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o);
|
|
229
|
+
}
|
|
230
|
+
a.inherits(m, Error, {
|
|
231
|
+
toJSON: function() {
|
|
232
|
+
return {
|
|
233
|
+
// Standard
|
|
234
|
+
message: this.message,
|
|
235
|
+
name: this.name,
|
|
236
|
+
// Microsoft
|
|
237
|
+
description: this.description,
|
|
238
|
+
number: this.number,
|
|
239
|
+
// Mozilla
|
|
240
|
+
fileName: this.fileName,
|
|
241
|
+
lineNumber: this.lineNumber,
|
|
242
|
+
columnNumber: this.columnNumber,
|
|
243
|
+
stack: this.stack,
|
|
244
|
+
// Axios
|
|
245
|
+
config: a.toJSONObject(this.config),
|
|
246
|
+
code: this.code,
|
|
247
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
const Te = m.prototype, Ce = {};
|
|
252
|
+
[
|
|
253
|
+
"ERR_BAD_OPTION_VALUE",
|
|
254
|
+
"ERR_BAD_OPTION",
|
|
255
|
+
"ECONNABORTED",
|
|
256
|
+
"ETIMEDOUT",
|
|
257
|
+
"ERR_NETWORK",
|
|
258
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
259
|
+
"ERR_DEPRECATED",
|
|
260
|
+
"ERR_BAD_RESPONSE",
|
|
261
|
+
"ERR_BAD_REQUEST",
|
|
262
|
+
"ERR_CANCELED",
|
|
263
|
+
"ERR_NOT_SUPPORT",
|
|
264
|
+
"ERR_INVALID_URL"
|
|
265
|
+
// eslint-disable-next-line func-names
|
|
266
|
+
].forEach((e) => {
|
|
267
|
+
Ce[e] = { value: e };
|
|
268
|
+
});
|
|
269
|
+
Object.defineProperties(m, Ce);
|
|
270
|
+
Object.defineProperty(Te, "isAxiosError", { value: !0 });
|
|
271
|
+
m.from = (e, t, n, r, o, s) => {
|
|
272
|
+
const i = Object.create(Te);
|
|
273
|
+
return a.toFlatObject(e, i, function(u) {
|
|
274
|
+
return u !== Error.prototype;
|
|
275
|
+
}, (u) => u !== "isAxiosError"), m.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
276
|
+
};
|
|
277
|
+
const Et = null;
|
|
278
|
+
function W(e) {
|
|
279
|
+
return a.isPlainObject(e) || a.isArray(e);
|
|
280
|
+
}
|
|
281
|
+
function _e(e) {
|
|
282
|
+
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
283
|
+
}
|
|
284
|
+
function ie(e, t, n) {
|
|
285
|
+
return e ? e.concat(t).map(function(r, o) {
|
|
286
|
+
return r = _e(r), !n && o ? "[" + r + "]" : r;
|
|
287
|
+
}).join(n ? "." : "") : t;
|
|
288
|
+
}
|
|
289
|
+
function Ot(e) {
|
|
290
|
+
return a.isArray(e) && !e.some(W);
|
|
291
|
+
}
|
|
292
|
+
const St = a.toFlatObject(a, {}, null, function(e) {
|
|
293
|
+
return /^is[A-Z]/.test(e);
|
|
294
|
+
});
|
|
295
|
+
function q(e, t, n) {
|
|
296
|
+
if (!a.isObject(e))
|
|
297
|
+
throw new TypeError("target must be an object");
|
|
298
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
299
|
+
metaTokens: !0,
|
|
300
|
+
dots: !1,
|
|
301
|
+
indexes: !1
|
|
302
|
+
}, !1, function(h, l) {
|
|
303
|
+
return !a.isUndefined(l[h]);
|
|
304
|
+
});
|
|
305
|
+
const r = n.metaTokens, o = n.visitor || f, s = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
306
|
+
if (!a.isFunction(o))
|
|
307
|
+
throw new TypeError("visitor must be a function");
|
|
308
|
+
function d(h) {
|
|
309
|
+
if (h === null)
|
|
310
|
+
return "";
|
|
311
|
+
if (a.isDate(h))
|
|
312
|
+
return h.toISOString();
|
|
313
|
+
if (!u && a.isBlob(h))
|
|
314
|
+
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
315
|
+
return a.isArrayBuffer(h) || a.isTypedArray(h) ? u && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
316
|
+
}
|
|
317
|
+
function f(h, l, y) {
|
|
318
|
+
let w = h;
|
|
319
|
+
if (h && !y && typeof h == "object") {
|
|
320
|
+
if (a.endsWith(l, "{}"))
|
|
321
|
+
l = r ? l : l.slice(0, -2), h = JSON.stringify(h);
|
|
322
|
+
else if (a.isArray(h) && Ot(h) || (a.isFileList(h) || a.endsWith(l, "[]")) && (w = a.toArray(h)))
|
|
323
|
+
return l = _e(l), w.forEach(function(z, Ie) {
|
|
324
|
+
!(a.isUndefined(z) || z === null) && t.append(
|
|
325
|
+
// eslint-disable-next-line no-nested-ternary
|
|
326
|
+
i === !0 ? ie([l], Ie, s) : i === null ? l : l + "[]",
|
|
327
|
+
d(z)
|
|
328
|
+
);
|
|
329
|
+
}), !1;
|
|
330
|
+
}
|
|
331
|
+
return W(h) ? !0 : (t.append(ie(y, l, s), d(h)), !1);
|
|
332
|
+
}
|
|
333
|
+
const c = [], p = Object.assign(St, {
|
|
334
|
+
defaultVisitor: f,
|
|
335
|
+
convertValue: d,
|
|
336
|
+
isVisitable: W
|
|
337
|
+
});
|
|
338
|
+
function E(h, l) {
|
|
339
|
+
if (!a.isUndefined(h)) {
|
|
340
|
+
if (c.indexOf(h) !== -1)
|
|
341
|
+
throw Error("Circular reference detected in " + l.join("."));
|
|
342
|
+
c.push(h), a.forEach(h, function(y, w) {
|
|
343
|
+
(!(a.isUndefined(y) || y === null) && o.call(
|
|
344
|
+
t,
|
|
345
|
+
y,
|
|
346
|
+
a.isString(w) ? w.trim() : w,
|
|
347
|
+
l,
|
|
348
|
+
p
|
|
349
|
+
)) === !0 && E(y, l ? l.concat(w) : [w]);
|
|
350
|
+
}), c.pop();
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (!a.isObject(e))
|
|
354
|
+
throw new TypeError("data must be an object");
|
|
355
|
+
return E(e), t;
|
|
356
|
+
}
|
|
357
|
+
function ae(e) {
|
|
358
|
+
const t = {
|
|
359
|
+
"!": "%21",
|
|
360
|
+
"'": "%27",
|
|
361
|
+
"(": "%28",
|
|
362
|
+
")": "%29",
|
|
363
|
+
"~": "%7E",
|
|
364
|
+
"%20": "+",
|
|
365
|
+
"%00": "\0"
|
|
366
|
+
};
|
|
367
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
368
|
+
return t[n];
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
function Y(e, t) {
|
|
372
|
+
this._pairs = [], e && q(e, this, t);
|
|
373
|
+
}
|
|
374
|
+
const je = Y.prototype;
|
|
375
|
+
je.append = function(e, t) {
|
|
376
|
+
this._pairs.push([e, t]);
|
|
377
|
+
};
|
|
378
|
+
je.toString = function(e) {
|
|
379
|
+
const t = e ? function(n) {
|
|
380
|
+
return e.call(this, n, ae);
|
|
381
|
+
} : ae;
|
|
382
|
+
return this._pairs.map(function(n) {
|
|
383
|
+
return t(n[0]) + "=" + t(n[1]);
|
|
384
|
+
}, "").join("&");
|
|
385
|
+
};
|
|
386
|
+
function Rt(e) {
|
|
387
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
388
|
+
}
|
|
389
|
+
function xe(e, t, n) {
|
|
390
|
+
if (!t)
|
|
391
|
+
return e;
|
|
392
|
+
const r = n && n.encode || Rt, o = n && n.serialize;
|
|
393
|
+
let s;
|
|
394
|
+
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new Y(t, n).toString(r), s) {
|
|
395
|
+
const i = e.indexOf("#");
|
|
396
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
397
|
+
}
|
|
398
|
+
return e;
|
|
399
|
+
}
|
|
400
|
+
class ce {
|
|
401
|
+
constructor() {
|
|
402
|
+
this.handlers = [];
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Add a new interceptor to the stack
|
|
406
|
+
*
|
|
407
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
408
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
409
|
+
*
|
|
410
|
+
* @return {Number} An ID used to remove interceptor later
|
|
411
|
+
*/
|
|
412
|
+
use(t, n, r) {
|
|
413
|
+
return this.handlers.push({
|
|
414
|
+
fulfilled: t,
|
|
415
|
+
rejected: n,
|
|
416
|
+
synchronous: r ? r.synchronous : !1,
|
|
417
|
+
runWhen: r ? r.runWhen : null
|
|
418
|
+
}), this.handlers.length - 1;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Remove an interceptor from the stack
|
|
422
|
+
*
|
|
423
|
+
* @param {Number} id The ID that was returned by `use`
|
|
424
|
+
*
|
|
425
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
426
|
+
*/
|
|
427
|
+
eject(t) {
|
|
428
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Clear all interceptors from the stack
|
|
432
|
+
*
|
|
433
|
+
* @returns {void}
|
|
434
|
+
*/
|
|
435
|
+
clear() {
|
|
436
|
+
this.handlers && (this.handlers = []);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Iterate over all the registered interceptors
|
|
440
|
+
*
|
|
441
|
+
* This method is particularly useful for skipping over any
|
|
442
|
+
* interceptors that may have become `null` calling `eject`.
|
|
443
|
+
*
|
|
444
|
+
* @param {Function} fn The function to call for each interceptor
|
|
445
|
+
*
|
|
446
|
+
* @returns {void}
|
|
447
|
+
*/
|
|
448
|
+
forEach(t) {
|
|
449
|
+
a.forEach(this.handlers, function(n) {
|
|
450
|
+
n !== null && t(n);
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const Ne = {
|
|
455
|
+
silentJSONParsing: !0,
|
|
456
|
+
forcedJSONParsing: !0,
|
|
457
|
+
clarifyTimeoutError: !1
|
|
458
|
+
}, vt = typeof URLSearchParams < "u" ? URLSearchParams : Y, At = typeof FormData < "u" ? FormData : null, Tt = typeof Blob < "u" ? Blob : null, Ct = {
|
|
459
|
+
isBrowser: !0,
|
|
460
|
+
classes: {
|
|
461
|
+
URLSearchParams: vt,
|
|
462
|
+
FormData: At,
|
|
463
|
+
Blob: Tt
|
|
464
|
+
},
|
|
465
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
466
|
+
}, Pe = typeof window < "u" && typeof document < "u", _t = ((e) => Pe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), jt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
467
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
468
|
+
__proto__: null,
|
|
469
|
+
hasBrowserEnv: Pe,
|
|
470
|
+
hasStandardBrowserEnv: _t,
|
|
471
|
+
hasStandardBrowserWebWorkerEnv: jt
|
|
472
|
+
}, Symbol.toStringTag, { value: "Module" })), S = {
|
|
473
|
+
...xt,
|
|
474
|
+
...Ct
|
|
475
|
+
};
|
|
476
|
+
function Nt(e, t) {
|
|
477
|
+
return q(e, new S.classes.URLSearchParams(), Object.assign({
|
|
478
|
+
visitor: function(n, r, o, s) {
|
|
479
|
+
return S.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
480
|
+
}
|
|
481
|
+
}, t));
|
|
482
|
+
}
|
|
483
|
+
function Pt(e) {
|
|
484
|
+
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
485
|
+
}
|
|
486
|
+
function Ut(e) {
|
|
487
|
+
const t = {}, n = Object.keys(e);
|
|
488
|
+
let r;
|
|
489
|
+
const o = n.length;
|
|
490
|
+
let s;
|
|
491
|
+
for (r = 0; r < o; r++)
|
|
492
|
+
s = n[r], t[s] = e[s];
|
|
493
|
+
return t;
|
|
494
|
+
}
|
|
495
|
+
function Ue(e) {
|
|
496
|
+
function t(n, r, o, s) {
|
|
497
|
+
let i = n[s++];
|
|
498
|
+
if (i === "__proto__")
|
|
499
|
+
return !0;
|
|
500
|
+
const u = Number.isFinite(+i), d = s >= n.length;
|
|
501
|
+
return i = !i && a.isArray(o) ? o.length : i, d ? (a.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !u) : ((!o[i] || !a.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && a.isArray(o[i]) && (o[i] = Ut(o[i])), !u);
|
|
502
|
+
}
|
|
503
|
+
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
|
+
const n = {};
|
|
505
|
+
return a.forEachEntry(e, (r, o) => {
|
|
506
|
+
t(Pt(r), o, n, 0);
|
|
507
|
+
}), n;
|
|
508
|
+
}
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
function kt(e, t, n) {
|
|
512
|
+
if (a.isString(e))
|
|
513
|
+
try {
|
|
514
|
+
return (t || JSON.parse)(e), a.trim(e);
|
|
515
|
+
} catch (r) {
|
|
516
|
+
if (r.name !== "SyntaxError")
|
|
517
|
+
throw r;
|
|
518
|
+
}
|
|
519
|
+
return (0, JSON.stringify)(e);
|
|
520
|
+
}
|
|
521
|
+
const ee = {
|
|
522
|
+
transitional: Ne,
|
|
523
|
+
adapter: ["xhr", "http"],
|
|
524
|
+
transformRequest: [function(e, t) {
|
|
525
|
+
const n = t.getContentType() || "", r = n.indexOf("application/json") > -1, o = a.isObject(e);
|
|
526
|
+
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
527
|
+
return r && r ? JSON.stringify(Ue(e)) : e;
|
|
528
|
+
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e))
|
|
529
|
+
return e;
|
|
530
|
+
if (a.isArrayBufferView(e))
|
|
531
|
+
return e.buffer;
|
|
532
|
+
if (a.isURLSearchParams(e))
|
|
533
|
+
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
534
|
+
let s;
|
|
535
|
+
if (o) {
|
|
536
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
+
return Nt(e, this.formSerializer).toString();
|
|
538
|
+
if ((s = a.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
539
|
+
const i = this.env && this.env.FormData;
|
|
540
|
+
return q(
|
|
541
|
+
s ? { "files[]": e } : e,
|
|
542
|
+
i && new i(),
|
|
543
|
+
this.formSerializer
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return o || r ? (t.setContentType("application/json", !1), kt(e)) : e;
|
|
548
|
+
}],
|
|
549
|
+
transformResponse: [function(e) {
|
|
550
|
+
const t = this.transitional || ee.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
551
|
+
if (e && a.isString(e) && (n && !this.responseType || r)) {
|
|
552
|
+
const o = !(t && t.silentJSONParsing) && r;
|
|
553
|
+
try {
|
|
554
|
+
return JSON.parse(e);
|
|
555
|
+
} catch (s) {
|
|
556
|
+
if (o)
|
|
557
|
+
throw s.name === "SyntaxError" ? m.from(s, m.ERR_BAD_RESPONSE, this, null, this.response) : s;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
return e;
|
|
561
|
+
}],
|
|
562
|
+
/**
|
|
563
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
564
|
+
* timeout is not created.
|
|
565
|
+
*/
|
|
566
|
+
timeout: 0,
|
|
567
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
568
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
569
|
+
maxContentLength: -1,
|
|
570
|
+
maxBodyLength: -1,
|
|
571
|
+
env: {
|
|
572
|
+
FormData: S.classes.FormData,
|
|
573
|
+
Blob: S.classes.Blob
|
|
574
|
+
},
|
|
575
|
+
validateStatus: function(e) {
|
|
576
|
+
return e >= 200 && e < 300;
|
|
577
|
+
},
|
|
578
|
+
headers: {
|
|
579
|
+
common: {
|
|
580
|
+
Accept: "application/json, text/plain, */*",
|
|
581
|
+
"Content-Type": void 0
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
};
|
|
585
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
+
ee.headers[e] = {};
|
|
587
|
+
});
|
|
588
|
+
const te = ee, Dt = a.toObjectSet([
|
|
589
|
+
"age",
|
|
590
|
+
"authorization",
|
|
591
|
+
"content-length",
|
|
592
|
+
"content-type",
|
|
593
|
+
"etag",
|
|
594
|
+
"expires",
|
|
595
|
+
"from",
|
|
596
|
+
"host",
|
|
597
|
+
"if-modified-since",
|
|
598
|
+
"if-unmodified-since",
|
|
599
|
+
"last-modified",
|
|
600
|
+
"location",
|
|
601
|
+
"max-forwards",
|
|
602
|
+
"proxy-authorization",
|
|
603
|
+
"referer",
|
|
604
|
+
"retry-after",
|
|
605
|
+
"user-agent"
|
|
606
|
+
]), Lt = (e) => {
|
|
607
|
+
const t = {};
|
|
608
|
+
let n, r, o;
|
|
609
|
+
return e && e.split(`
|
|
610
|
+
`).forEach(function(s) {
|
|
611
|
+
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && Dt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
|
+
}), t;
|
|
613
|
+
}, ue = Symbol("internals");
|
|
614
|
+
function _(e) {
|
|
615
|
+
return e && String(e).trim().toLowerCase();
|
|
616
|
+
}
|
|
617
|
+
function k(e) {
|
|
618
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(k) : String(e);
|
|
619
|
+
}
|
|
620
|
+
function Ft(e) {
|
|
621
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
|
+
let r;
|
|
623
|
+
for (; r = n.exec(e); )
|
|
624
|
+
t[r[1]] = r[2];
|
|
625
|
+
return t;
|
|
626
|
+
}
|
|
627
|
+
const Bt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
628
|
+
function J(e, t, n, r, o) {
|
|
629
|
+
if (a.isFunction(r))
|
|
630
|
+
return r.call(this, t, n);
|
|
631
|
+
if (o && (t = n), !!a.isString(t)) {
|
|
632
|
+
if (a.isString(r))
|
|
633
|
+
return t.indexOf(r) !== -1;
|
|
634
|
+
if (a.isRegExp(r))
|
|
635
|
+
return r.test(t);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
function It(e) {
|
|
639
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
|
+
}
|
|
641
|
+
function qt(e, t) {
|
|
642
|
+
const n = a.toCamelCase(" " + t);
|
|
643
|
+
["get", "set", "has"].forEach((r) => {
|
|
644
|
+
Object.defineProperty(e, r + n, {
|
|
645
|
+
value: function(o, s, i) {
|
|
646
|
+
return this[r].call(this, t, o, s, i);
|
|
647
|
+
},
|
|
648
|
+
configurable: !0
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
class M {
|
|
653
|
+
constructor(t) {
|
|
654
|
+
t && this.set(t);
|
|
655
|
+
}
|
|
656
|
+
set(t, n, r) {
|
|
657
|
+
const o = this;
|
|
658
|
+
function s(u, d, f) {
|
|
659
|
+
const c = _(d);
|
|
660
|
+
if (!c)
|
|
661
|
+
throw new Error("header name must be a non-empty string");
|
|
662
|
+
const p = a.findKey(o, c);
|
|
663
|
+
(!p || o[p] === void 0 || f === !0 || f === void 0 && o[p] !== !1) && (o[p || d] = k(u));
|
|
664
|
+
}
|
|
665
|
+
const i = (u, d) => a.forEach(u, (f, c) => s(f, c, d));
|
|
666
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Bt(t) ? i(Lt(t), n) : t != null && s(n, t, r), this;
|
|
667
|
+
}
|
|
668
|
+
get(t, n) {
|
|
669
|
+
if (t = _(t), t) {
|
|
670
|
+
const r = a.findKey(this, t);
|
|
671
|
+
if (r) {
|
|
672
|
+
const o = this[r];
|
|
673
|
+
if (!n)
|
|
674
|
+
return o;
|
|
675
|
+
if (n === !0)
|
|
676
|
+
return Ft(o);
|
|
677
|
+
if (a.isFunction(n))
|
|
678
|
+
return n.call(this, o, r);
|
|
679
|
+
if (a.isRegExp(n))
|
|
680
|
+
return n.exec(o);
|
|
681
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
has(t, n) {
|
|
686
|
+
if (t = _(t), t) {
|
|
687
|
+
const r = a.findKey(this, t);
|
|
688
|
+
return !!(r && this[r] !== void 0 && (!n || J(this, this[r], r, n)));
|
|
689
|
+
}
|
|
690
|
+
return !1;
|
|
691
|
+
}
|
|
692
|
+
delete(t, n) {
|
|
693
|
+
const r = this;
|
|
694
|
+
let o = !1;
|
|
695
|
+
function s(i) {
|
|
696
|
+
if (i = _(i), i) {
|
|
697
|
+
const u = a.findKey(r, i);
|
|
698
|
+
u && (!n || J(r, r[u], u, n)) && (delete r[u], o = !0);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return a.isArray(t) ? t.forEach(s) : s(t), o;
|
|
702
|
+
}
|
|
703
|
+
clear(t) {
|
|
704
|
+
const n = Object.keys(this);
|
|
705
|
+
let r = n.length, o = !1;
|
|
706
|
+
for (; r--; ) {
|
|
707
|
+
const s = n[r];
|
|
708
|
+
(!t || J(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
709
|
+
}
|
|
710
|
+
return o;
|
|
711
|
+
}
|
|
712
|
+
normalize(t) {
|
|
713
|
+
const n = this, r = {};
|
|
714
|
+
return a.forEach(this, (o, s) => {
|
|
715
|
+
const i = a.findKey(r, s);
|
|
716
|
+
if (i) {
|
|
717
|
+
n[i] = k(o), delete n[s];
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
const u = t ? It(s) : String(s).trim();
|
|
721
|
+
u !== s && delete n[s], n[u] = k(o), r[u] = !0;
|
|
722
|
+
}), this;
|
|
723
|
+
}
|
|
724
|
+
concat(...t) {
|
|
725
|
+
return this.constructor.concat(this, ...t);
|
|
726
|
+
}
|
|
727
|
+
toJSON(t) {
|
|
728
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
729
|
+
return a.forEach(this, (r, o) => {
|
|
730
|
+
r != null && r !== !1 && (n[o] = t && a.isArray(r) ? r.join(", ") : r);
|
|
731
|
+
}), n;
|
|
732
|
+
}
|
|
733
|
+
[Symbol.iterator]() {
|
|
734
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
735
|
+
}
|
|
736
|
+
toString() {
|
|
737
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
738
|
+
`);
|
|
739
|
+
}
|
|
740
|
+
get [Symbol.toStringTag]() {
|
|
741
|
+
return "AxiosHeaders";
|
|
742
|
+
}
|
|
743
|
+
static from(t) {
|
|
744
|
+
return t instanceof this ? t : new this(t);
|
|
745
|
+
}
|
|
746
|
+
static concat(t, ...n) {
|
|
747
|
+
const r = new this(t);
|
|
748
|
+
return n.forEach((o) => r.set(o)), r;
|
|
749
|
+
}
|
|
750
|
+
static accessor(t) {
|
|
751
|
+
const n = (this[ue] = this[ue] = {
|
|
752
|
+
accessors: {}
|
|
753
|
+
}).accessors, r = this.prototype;
|
|
754
|
+
function o(s) {
|
|
755
|
+
const i = _(s);
|
|
756
|
+
n[i] || (qt(r, s), n[i] = !0);
|
|
757
|
+
}
|
|
758
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
M.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
762
|
+
a.reduceDescriptors(M.prototype, ({ value: e }, t) => {
|
|
763
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
|
+
return {
|
|
765
|
+
get: () => e,
|
|
766
|
+
set(r) {
|
|
767
|
+
this[n] = r;
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
});
|
|
771
|
+
a.freezeMethods(M);
|
|
772
|
+
const v = M;
|
|
773
|
+
function $(e, t) {
|
|
774
|
+
const n = this || te, r = t || n, o = v.from(r.headers);
|
|
775
|
+
let s = r.data;
|
|
776
|
+
return a.forEach(e, function(i) {
|
|
777
|
+
s = i.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
778
|
+
}), o.normalize(), s;
|
|
779
|
+
}
|
|
780
|
+
function ke(e) {
|
|
781
|
+
return !!(e && e.__CANCEL__);
|
|
782
|
+
}
|
|
783
|
+
function N(e, t, n) {
|
|
784
|
+
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
785
|
+
}
|
|
786
|
+
a.inherits(N, m, {
|
|
787
|
+
__CANCEL__: !0
|
|
788
|
+
});
|
|
789
|
+
function Mt(e, t, n) {
|
|
790
|
+
const r = n.config.validateStatus;
|
|
791
|
+
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
|
+
"Request failed with status code " + n.status,
|
|
793
|
+
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
794
|
+
n.config,
|
|
795
|
+
n.request,
|
|
796
|
+
n
|
|
797
|
+
));
|
|
798
|
+
}
|
|
799
|
+
const zt = S.hasStandardBrowserEnv ? (
|
|
800
|
+
// Standard browser envs support document.cookie
|
|
801
|
+
{
|
|
802
|
+
write(e, t, n, r, o, s) {
|
|
803
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
804
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
805
|
+
},
|
|
806
|
+
read(e) {
|
|
807
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
808
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
809
|
+
},
|
|
810
|
+
remove(e) {
|
|
811
|
+
this.write(e, "", Date.now() - 864e5);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
) : (
|
|
815
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
816
|
+
{
|
|
817
|
+
write() {
|
|
818
|
+
},
|
|
819
|
+
read() {
|
|
820
|
+
return null;
|
|
821
|
+
},
|
|
822
|
+
remove() {
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
function Ht(e) {
|
|
827
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
|
+
}
|
|
829
|
+
function Jt(e, t) {
|
|
830
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
|
+
}
|
|
832
|
+
function De(e, t) {
|
|
833
|
+
return e && !Ht(t) ? Jt(e, t) : t;
|
|
834
|
+
}
|
|
835
|
+
const $t = S.hasStandardBrowserEnv ? (
|
|
836
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
837
|
+
// whether the request URL is of the same origin as current location.
|
|
838
|
+
function() {
|
|
839
|
+
const e = /(msie|trident)/i.test(navigator.userAgent), t = document.createElement("a");
|
|
840
|
+
let n;
|
|
841
|
+
function r(o) {
|
|
842
|
+
let s = o;
|
|
843
|
+
return e && (t.setAttribute("href", s), s = t.href), t.setAttribute("href", s), {
|
|
844
|
+
href: t.href,
|
|
845
|
+
protocol: t.protocol ? t.protocol.replace(/:$/, "") : "",
|
|
846
|
+
host: t.host,
|
|
847
|
+
search: t.search ? t.search.replace(/^\?/, "") : "",
|
|
848
|
+
hash: t.hash ? t.hash.replace(/^#/, "") : "",
|
|
849
|
+
hostname: t.hostname,
|
|
850
|
+
port: t.port,
|
|
851
|
+
pathname: t.pathname.charAt(0) === "/" ? t.pathname : "/" + t.pathname
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
return n = r(window.location.href), function(o) {
|
|
855
|
+
const s = a.isString(o) ? r(o) : o;
|
|
856
|
+
return s.protocol === n.protocol && s.host === n.host;
|
|
857
|
+
};
|
|
858
|
+
}()
|
|
859
|
+
) : (
|
|
860
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
861
|
+
/* @__PURE__ */ function() {
|
|
862
|
+
return function() {
|
|
863
|
+
return !0;
|
|
864
|
+
};
|
|
865
|
+
}()
|
|
866
|
+
);
|
|
867
|
+
function Vt(e) {
|
|
868
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
|
+
return t && t[1] || "";
|
|
870
|
+
}
|
|
871
|
+
function Gt(e, t) {
|
|
872
|
+
e = e || 10;
|
|
873
|
+
const n = new Array(e), r = new Array(e);
|
|
874
|
+
let o = 0, s = 0, i;
|
|
875
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
876
|
+
const d = Date.now(), f = r[s];
|
|
877
|
+
i || (i = d), n[o] = u, r[o] = d;
|
|
878
|
+
let c = s, p = 0;
|
|
879
|
+
for (; c !== o; )
|
|
880
|
+
p += n[c++], c = c % e;
|
|
881
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), d - i < t)
|
|
882
|
+
return;
|
|
883
|
+
const E = f && d - f;
|
|
884
|
+
return E ? Math.round(p * 1e3 / E) : void 0;
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
function le(e, t) {
|
|
888
|
+
let n = 0;
|
|
889
|
+
const r = Gt(50, 250);
|
|
890
|
+
return (o) => {
|
|
891
|
+
const s = o.loaded, i = o.lengthComputable ? o.total : void 0, u = s - n, d = r(u), f = s <= i;
|
|
892
|
+
n = s;
|
|
893
|
+
const c = {
|
|
894
|
+
loaded: s,
|
|
895
|
+
total: i,
|
|
896
|
+
progress: i ? s / i : void 0,
|
|
897
|
+
bytes: u,
|
|
898
|
+
rate: d || void 0,
|
|
899
|
+
estimated: d && i && f ? (i - s) / d : void 0,
|
|
900
|
+
event: o
|
|
901
|
+
};
|
|
902
|
+
c[t ? "download" : "upload"] = !0, e(c);
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
const Wt = typeof XMLHttpRequest < "u", Kt = Wt && function(e) {
|
|
906
|
+
return new Promise(function(t, n) {
|
|
907
|
+
let r = e.data;
|
|
908
|
+
const o = v.from(e.headers).normalize();
|
|
909
|
+
let { responseType: s, withXSRFToken: i } = e, u;
|
|
910
|
+
function d() {
|
|
911
|
+
e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
|
|
912
|
+
}
|
|
913
|
+
let f;
|
|
914
|
+
if (a.isFormData(r)) {
|
|
915
|
+
if (S.hasStandardBrowserEnv || S.hasStandardBrowserWebWorkerEnv)
|
|
916
|
+
o.setContentType(!1);
|
|
917
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
918
|
+
const [l, ...y] = f ? f.split(";").map((w) => w.trim()).filter(Boolean) : [];
|
|
919
|
+
o.setContentType([l || "multipart/form-data", ...y].join("; "));
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
let c = new XMLHttpRequest();
|
|
923
|
+
if (e.auth) {
|
|
924
|
+
const l = e.auth.username || "", y = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
925
|
+
o.set("Authorization", "Basic " + btoa(l + ":" + y));
|
|
926
|
+
}
|
|
927
|
+
const p = De(e.baseURL, e.url);
|
|
928
|
+
c.open(e.method.toUpperCase(), xe(p, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
929
|
+
function E() {
|
|
930
|
+
if (!c)
|
|
931
|
+
return;
|
|
932
|
+
const l = v.from(
|
|
933
|
+
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
934
|
+
), y = {
|
|
935
|
+
data: !s || s === "text" || s === "json" ? c.responseText : c.response,
|
|
936
|
+
status: c.status,
|
|
937
|
+
statusText: c.statusText,
|
|
938
|
+
headers: l,
|
|
939
|
+
config: e,
|
|
940
|
+
request: c
|
|
941
|
+
};
|
|
942
|
+
Mt(function(w) {
|
|
943
|
+
t(w), d();
|
|
944
|
+
}, function(w) {
|
|
945
|
+
n(w), d();
|
|
946
|
+
}, y), c = null;
|
|
947
|
+
}
|
|
948
|
+
if ("onloadend" in c ? c.onloadend = E : c.onreadystatechange = function() {
|
|
949
|
+
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
950
|
+
}, c.onabort = function() {
|
|
951
|
+
c && (n(new m("Request aborted", m.ECONNABORTED, e, c)), c = null);
|
|
952
|
+
}, c.onerror = function() {
|
|
953
|
+
n(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
|
|
954
|
+
}, c.ontimeout = function() {
|
|
955
|
+
let l = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
956
|
+
const y = e.transitional || Ne;
|
|
957
|
+
e.timeoutErrorMessage && (l = e.timeoutErrorMessage), n(new m(
|
|
958
|
+
l,
|
|
959
|
+
y.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
|
+
e,
|
|
961
|
+
c
|
|
962
|
+
)), c = null;
|
|
963
|
+
}, S.hasStandardBrowserEnv && (i && a.isFunction(i) && (i = i(e)), i || i !== !1 && $t(p))) {
|
|
964
|
+
const l = e.xsrfHeaderName && e.xsrfCookieName && zt.read(e.xsrfCookieName);
|
|
965
|
+
l && o.set(e.xsrfHeaderName, l);
|
|
966
|
+
}
|
|
967
|
+
r === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(l, y) {
|
|
968
|
+
c.setRequestHeader(y, l);
|
|
969
|
+
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), s && s !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", le(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", le(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (l) => {
|
|
970
|
+
c && (n(!l || l.type ? new N(null, e, c) : l), c.abort(), c = null);
|
|
971
|
+
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
972
|
+
const h = Vt(p);
|
|
973
|
+
if (h && S.protocols.indexOf(h) === -1) {
|
|
974
|
+
n(new m("Unsupported protocol " + h + ":", m.ERR_BAD_REQUEST, e));
|
|
975
|
+
return;
|
|
976
|
+
}
|
|
977
|
+
c.send(r || null);
|
|
978
|
+
});
|
|
979
|
+
}, K = {
|
|
980
|
+
http: Et,
|
|
981
|
+
xhr: Kt
|
|
982
|
+
};
|
|
983
|
+
a.forEach(K, (e, t) => {
|
|
984
|
+
if (e) {
|
|
985
|
+
try {
|
|
986
|
+
Object.defineProperty(e, "name", { value: t });
|
|
987
|
+
} catch {
|
|
988
|
+
}
|
|
989
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
const fe = (e) => `- ${e}`, Xt = (e) => a.isFunction(e) || e === null || e === !1, Le = {
|
|
993
|
+
getAdapter: (e) => {
|
|
994
|
+
e = a.isArray(e) ? e : [e];
|
|
995
|
+
const { length: t } = e;
|
|
996
|
+
let n, r;
|
|
997
|
+
const o = {};
|
|
998
|
+
for (let s = 0; s < t; s++) {
|
|
999
|
+
n = e[s];
|
|
1000
|
+
let i;
|
|
1001
|
+
if (r = n, !Xt(n) && (r = K[(i = String(n)).toLowerCase()], r === void 0))
|
|
1002
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1003
|
+
if (r)
|
|
1004
|
+
break;
|
|
1005
|
+
o[i || "#" + s] = r;
|
|
1006
|
+
}
|
|
1007
|
+
if (!r) {
|
|
1008
|
+
const s = Object.entries(o).map(
|
|
1009
|
+
([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
|
+
);
|
|
1011
|
+
let i = t ? s.length > 1 ? `since :
|
|
1012
|
+
` + s.map(fe).join(`
|
|
1013
|
+
`) : " " + fe(s[0]) : "as no adapter specified";
|
|
1014
|
+
throw new m(
|
|
1015
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1016
|
+
"ERR_NOT_SUPPORT"
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
return r;
|
|
1020
|
+
},
|
|
1021
|
+
adapters: K
|
|
1022
|
+
};
|
|
1023
|
+
function V(e) {
|
|
1024
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
|
+
throw new N(null, e);
|
|
1026
|
+
}
|
|
1027
|
+
function de(e) {
|
|
1028
|
+
return V(e), e.headers = v.from(e.headers), e.data = $.call(
|
|
1029
|
+
e,
|
|
1030
|
+
e.transformRequest
|
|
1031
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Le.getAdapter(e.adapter || te.adapter)(e).then(function(t) {
|
|
1032
|
+
return V(e), t.data = $.call(
|
|
1033
|
+
e,
|
|
1034
|
+
e.transformResponse,
|
|
1035
|
+
t
|
|
1036
|
+
), t.headers = v.from(t.headers), t;
|
|
1037
|
+
}, function(t) {
|
|
1038
|
+
return ke(t) || (V(e), t && t.response && (t.response.data = $.call(
|
|
1039
|
+
e,
|
|
1040
|
+
e.transformResponse,
|
|
1041
|
+
t.response
|
|
1042
|
+
), t.response.headers = v.from(t.response.headers))), Promise.reject(t);
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
const pe = (e) => e instanceof v ? e.toJSON() : e;
|
|
1046
|
+
function T(e, t) {
|
|
1047
|
+
t = t || {};
|
|
1048
|
+
const n = {};
|
|
1049
|
+
function r(f, c, p) {
|
|
1050
|
+
return a.isPlainObject(f) && a.isPlainObject(c) ? a.merge.call({ caseless: p }, f, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
|
|
1051
|
+
}
|
|
1052
|
+
function o(f, c, p) {
|
|
1053
|
+
if (a.isUndefined(c)) {
|
|
1054
|
+
if (!a.isUndefined(f))
|
|
1055
|
+
return r(void 0, f, p);
|
|
1056
|
+
} else
|
|
1057
|
+
return r(f, c, p);
|
|
1058
|
+
}
|
|
1059
|
+
function s(f, c) {
|
|
1060
|
+
if (!a.isUndefined(c))
|
|
1061
|
+
return r(void 0, c);
|
|
1062
|
+
}
|
|
1063
|
+
function i(f, c) {
|
|
1064
|
+
if (a.isUndefined(c)) {
|
|
1065
|
+
if (!a.isUndefined(f))
|
|
1066
|
+
return r(void 0, f);
|
|
1067
|
+
} else
|
|
1068
|
+
return r(void 0, c);
|
|
1069
|
+
}
|
|
1070
|
+
function u(f, c, p) {
|
|
1071
|
+
if (p in t)
|
|
1072
|
+
return r(f, c);
|
|
1073
|
+
if (p in e)
|
|
1074
|
+
return r(void 0, f);
|
|
1075
|
+
}
|
|
1076
|
+
const d = {
|
|
1077
|
+
url: s,
|
|
1078
|
+
method: s,
|
|
1079
|
+
data: s,
|
|
1080
|
+
baseURL: i,
|
|
1081
|
+
transformRequest: i,
|
|
1082
|
+
transformResponse: i,
|
|
1083
|
+
paramsSerializer: i,
|
|
1084
|
+
timeout: i,
|
|
1085
|
+
timeoutMessage: i,
|
|
1086
|
+
withCredentials: i,
|
|
1087
|
+
withXSRFToken: i,
|
|
1088
|
+
adapter: i,
|
|
1089
|
+
responseType: i,
|
|
1090
|
+
xsrfCookieName: i,
|
|
1091
|
+
xsrfHeaderName: i,
|
|
1092
|
+
onUploadProgress: i,
|
|
1093
|
+
onDownloadProgress: i,
|
|
1094
|
+
decompress: i,
|
|
1095
|
+
maxContentLength: i,
|
|
1096
|
+
maxBodyLength: i,
|
|
1097
|
+
beforeRedirect: i,
|
|
1098
|
+
transport: i,
|
|
1099
|
+
httpAgent: i,
|
|
1100
|
+
httpsAgent: i,
|
|
1101
|
+
cancelToken: i,
|
|
1102
|
+
socketPath: i,
|
|
1103
|
+
responseEncoding: i,
|
|
1104
|
+
validateStatus: u,
|
|
1105
|
+
headers: (f, c) => o(pe(f), pe(c), !0)
|
|
1106
|
+
};
|
|
1107
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
1108
|
+
const c = d[f] || o, p = c(e[f], t[f], f);
|
|
1109
|
+
a.isUndefined(p) && c !== u || (n[f] = p);
|
|
1110
|
+
}), n;
|
|
1111
|
+
}
|
|
1112
|
+
const Fe = "1.6.5", ne = {};
|
|
1113
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
+
ne[e] = function(n) {
|
|
1115
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
|
+
};
|
|
1117
|
+
});
|
|
1118
|
+
const he = {};
|
|
1119
|
+
ne.transitional = function(e, t, n) {
|
|
1120
|
+
function r(o, s) {
|
|
1121
|
+
return "[Axios v" + Fe + "] Transitional option '" + o + "'" + s + (n ? ". " + n : "");
|
|
1122
|
+
}
|
|
1123
|
+
return (o, s, i) => {
|
|
1124
|
+
if (e === !1)
|
|
1125
|
+
throw new m(
|
|
1126
|
+
r(s, " has been removed" + (t ? " in " + t : "")),
|
|
1127
|
+
m.ERR_DEPRECATED
|
|
1128
|
+
);
|
|
1129
|
+
return t && !he[s] && (he[s] = !0, console.warn(
|
|
1130
|
+
r(
|
|
1131
|
+
s,
|
|
1132
|
+
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
1133
|
+
)
|
|
1134
|
+
)), e ? e(o, s, i) : !0;
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
function Qt(e, t, n) {
|
|
1138
|
+
if (typeof e != "object")
|
|
1139
|
+
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
|
+
const r = Object.keys(e);
|
|
1141
|
+
let o = r.length;
|
|
1142
|
+
for (; o-- > 0; ) {
|
|
1143
|
+
const s = r[o], i = t[s];
|
|
1144
|
+
if (i) {
|
|
1145
|
+
const u = e[s], d = u === void 0 || i(u, s, e);
|
|
1146
|
+
if (d !== !0)
|
|
1147
|
+
throw new m("option " + s + " must be " + d, m.ERR_BAD_OPTION_VALUE);
|
|
1148
|
+
continue;
|
|
1149
|
+
}
|
|
1150
|
+
if (n !== !0)
|
|
1151
|
+
throw new m("Unknown option " + s, m.ERR_BAD_OPTION);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
const X = {
|
|
1155
|
+
assertOptions: Qt,
|
|
1156
|
+
validators: ne
|
|
1157
|
+
}, A = X.validators;
|
|
1158
|
+
class L {
|
|
1159
|
+
constructor(t) {
|
|
1160
|
+
this.defaults = t, this.interceptors = {
|
|
1161
|
+
request: new ce(),
|
|
1162
|
+
response: new ce()
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Dispatch a request
|
|
1167
|
+
*
|
|
1168
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1169
|
+
* @param {?Object} config
|
|
1170
|
+
*
|
|
1171
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1172
|
+
*/
|
|
1173
|
+
request(t, n) {
|
|
1174
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = T(this.defaults, n);
|
|
1175
|
+
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1176
|
+
r !== void 0 && X.assertOptions(r, {
|
|
1177
|
+
silentJSONParsing: A.transitional(A.boolean),
|
|
1178
|
+
forcedJSONParsing: A.transitional(A.boolean),
|
|
1179
|
+
clarifyTimeoutError: A.transitional(A.boolean)
|
|
1180
|
+
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1181
|
+
serialize: o
|
|
1182
|
+
} : X.assertOptions(o, {
|
|
1183
|
+
encode: A.function,
|
|
1184
|
+
serialize: A.function
|
|
1185
|
+
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1186
|
+
let i = s && a.merge(
|
|
1187
|
+
s.common,
|
|
1188
|
+
s[n.method]
|
|
1189
|
+
);
|
|
1190
|
+
s && a.forEach(
|
|
1191
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1192
|
+
(l) => {
|
|
1193
|
+
delete s[l];
|
|
1194
|
+
}
|
|
1195
|
+
), n.headers = v.concat(i, s);
|
|
1196
|
+
const u = [];
|
|
1197
|
+
let d = !0;
|
|
1198
|
+
this.interceptors.request.forEach(function(l) {
|
|
1199
|
+
typeof l.runWhen == "function" && l.runWhen(n) === !1 || (d = d && l.synchronous, u.unshift(l.fulfilled, l.rejected));
|
|
1200
|
+
});
|
|
1201
|
+
const f = [];
|
|
1202
|
+
this.interceptors.response.forEach(function(l) {
|
|
1203
|
+
f.push(l.fulfilled, l.rejected);
|
|
1204
|
+
});
|
|
1205
|
+
let c, p = 0, E;
|
|
1206
|
+
if (!d) {
|
|
1207
|
+
const l = [de.bind(this), void 0];
|
|
1208
|
+
for (l.unshift.apply(l, u), l.push.apply(l, f), E = l.length, c = Promise.resolve(n); p < E; )
|
|
1209
|
+
c = c.then(l[p++], l[p++]);
|
|
1210
|
+
return c;
|
|
1211
|
+
}
|
|
1212
|
+
E = u.length;
|
|
1213
|
+
let h = n;
|
|
1214
|
+
for (p = 0; p < E; ) {
|
|
1215
|
+
const l = u[p++], y = u[p++];
|
|
1216
|
+
try {
|
|
1217
|
+
h = l(h);
|
|
1218
|
+
} catch (w) {
|
|
1219
|
+
y.call(this, w);
|
|
1220
|
+
break;
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
try {
|
|
1224
|
+
c = de.call(this, h);
|
|
1225
|
+
} catch (l) {
|
|
1226
|
+
return Promise.reject(l);
|
|
1227
|
+
}
|
|
1228
|
+
for (p = 0, E = f.length; p < E; )
|
|
1229
|
+
c = c.then(f[p++], f[p++]);
|
|
1230
|
+
return c;
|
|
1231
|
+
}
|
|
1232
|
+
getUri(t) {
|
|
1233
|
+
t = T(this.defaults, t);
|
|
1234
|
+
const n = De(t.baseURL, t.url);
|
|
1235
|
+
return xe(n, t.params, t.paramsSerializer);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1239
|
+
L.prototype[e] = function(t, n) {
|
|
1240
|
+
return this.request(T(n || {}, {
|
|
1241
|
+
method: e,
|
|
1242
|
+
url: t,
|
|
1243
|
+
data: (n || {}).data
|
|
1244
|
+
}));
|
|
1245
|
+
};
|
|
1246
|
+
});
|
|
1247
|
+
a.forEach(["post", "put", "patch"], function(e) {
|
|
1248
|
+
function t(n) {
|
|
1249
|
+
return function(r, o, s) {
|
|
1250
|
+
return this.request(T(s || {}, {
|
|
1251
|
+
method: e,
|
|
1252
|
+
headers: n ? {
|
|
1253
|
+
"Content-Type": "multipart/form-data"
|
|
1254
|
+
} : {},
|
|
1255
|
+
url: r,
|
|
1256
|
+
data: o
|
|
1257
|
+
}));
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
L.prototype[e] = t(), L.prototype[e + "Form"] = t(!0);
|
|
1261
|
+
});
|
|
1262
|
+
const D = L;
|
|
1263
|
+
class re {
|
|
1264
|
+
constructor(t) {
|
|
1265
|
+
if (typeof t != "function")
|
|
1266
|
+
throw new TypeError("executor must be a function.");
|
|
1267
|
+
let n;
|
|
1268
|
+
this.promise = new Promise(function(o) {
|
|
1269
|
+
n = o;
|
|
1270
|
+
});
|
|
1271
|
+
const r = this;
|
|
1272
|
+
this.promise.then((o) => {
|
|
1273
|
+
if (!r._listeners)
|
|
1274
|
+
return;
|
|
1275
|
+
let s = r._listeners.length;
|
|
1276
|
+
for (; s-- > 0; )
|
|
1277
|
+
r._listeners[s](o);
|
|
1278
|
+
r._listeners = null;
|
|
1279
|
+
}), this.promise.then = (o) => {
|
|
1280
|
+
let s;
|
|
1281
|
+
const i = new Promise((u) => {
|
|
1282
|
+
r.subscribe(u), s = u;
|
|
1283
|
+
}).then(o);
|
|
1284
|
+
return i.cancel = function() {
|
|
1285
|
+
r.unsubscribe(s);
|
|
1286
|
+
}, i;
|
|
1287
|
+
}, t(function(o, s, i) {
|
|
1288
|
+
r.reason || (r.reason = new N(o, s, i), n(r.reason));
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1293
|
+
*/
|
|
1294
|
+
throwIfRequested() {
|
|
1295
|
+
if (this.reason)
|
|
1296
|
+
throw this.reason;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Subscribe to the cancel signal
|
|
1300
|
+
*/
|
|
1301
|
+
subscribe(t) {
|
|
1302
|
+
if (this.reason) {
|
|
1303
|
+
t(this.reason);
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Unsubscribe from the cancel signal
|
|
1310
|
+
*/
|
|
1311
|
+
unsubscribe(t) {
|
|
1312
|
+
if (!this._listeners)
|
|
1313
|
+
return;
|
|
1314
|
+
const n = this._listeners.indexOf(t);
|
|
1315
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1319
|
+
* cancels the `CancelToken`.
|
|
1320
|
+
*/
|
|
1321
|
+
static source() {
|
|
1322
|
+
let t;
|
|
1323
|
+
return {
|
|
1324
|
+
token: new re(function(n) {
|
|
1325
|
+
t = n;
|
|
1326
|
+
}),
|
|
1327
|
+
cancel: t
|
|
1328
|
+
};
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
const Zt = re;
|
|
1332
|
+
function Yt(e) {
|
|
1333
|
+
return function(t) {
|
|
1334
|
+
return e.apply(null, t);
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
function en(e) {
|
|
1338
|
+
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
|
+
}
|
|
1340
|
+
const Q = {
|
|
1341
|
+
Continue: 100,
|
|
1342
|
+
SwitchingProtocols: 101,
|
|
1343
|
+
Processing: 102,
|
|
1344
|
+
EarlyHints: 103,
|
|
1345
|
+
Ok: 200,
|
|
1346
|
+
Created: 201,
|
|
1347
|
+
Accepted: 202,
|
|
1348
|
+
NonAuthoritativeInformation: 203,
|
|
1349
|
+
NoContent: 204,
|
|
1350
|
+
ResetContent: 205,
|
|
1351
|
+
PartialContent: 206,
|
|
1352
|
+
MultiStatus: 207,
|
|
1353
|
+
AlreadyReported: 208,
|
|
1354
|
+
ImUsed: 226,
|
|
1355
|
+
MultipleChoices: 300,
|
|
1356
|
+
MovedPermanently: 301,
|
|
1357
|
+
Found: 302,
|
|
1358
|
+
SeeOther: 303,
|
|
1359
|
+
NotModified: 304,
|
|
1360
|
+
UseProxy: 305,
|
|
1361
|
+
Unused: 306,
|
|
1362
|
+
TemporaryRedirect: 307,
|
|
1363
|
+
PermanentRedirect: 308,
|
|
1364
|
+
BadRequest: 400,
|
|
1365
|
+
Unauthorized: 401,
|
|
1366
|
+
PaymentRequired: 402,
|
|
1367
|
+
Forbidden: 403,
|
|
1368
|
+
NotFound: 404,
|
|
1369
|
+
MethodNotAllowed: 405,
|
|
1370
|
+
NotAcceptable: 406,
|
|
1371
|
+
ProxyAuthenticationRequired: 407,
|
|
1372
|
+
RequestTimeout: 408,
|
|
1373
|
+
Conflict: 409,
|
|
1374
|
+
Gone: 410,
|
|
1375
|
+
LengthRequired: 411,
|
|
1376
|
+
PreconditionFailed: 412,
|
|
1377
|
+
PayloadTooLarge: 413,
|
|
1378
|
+
UriTooLong: 414,
|
|
1379
|
+
UnsupportedMediaType: 415,
|
|
1380
|
+
RangeNotSatisfiable: 416,
|
|
1381
|
+
ExpectationFailed: 417,
|
|
1382
|
+
ImATeapot: 418,
|
|
1383
|
+
MisdirectedRequest: 421,
|
|
1384
|
+
UnprocessableEntity: 422,
|
|
1385
|
+
Locked: 423,
|
|
1386
|
+
FailedDependency: 424,
|
|
1387
|
+
TooEarly: 425,
|
|
1388
|
+
UpgradeRequired: 426,
|
|
1389
|
+
PreconditionRequired: 428,
|
|
1390
|
+
TooManyRequests: 429,
|
|
1391
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1392
|
+
UnavailableForLegalReasons: 451,
|
|
1393
|
+
InternalServerError: 500,
|
|
1394
|
+
NotImplemented: 501,
|
|
1395
|
+
BadGateway: 502,
|
|
1396
|
+
ServiceUnavailable: 503,
|
|
1397
|
+
GatewayTimeout: 504,
|
|
1398
|
+
HttpVersionNotSupported: 505,
|
|
1399
|
+
VariantAlsoNegotiates: 506,
|
|
1400
|
+
InsufficientStorage: 507,
|
|
1401
|
+
LoopDetected: 508,
|
|
1402
|
+
NotExtended: 510,
|
|
1403
|
+
NetworkAuthenticationRequired: 511
|
|
1404
|
+
};
|
|
1405
|
+
Object.entries(Q).forEach(([e, t]) => {
|
|
1406
|
+
Q[t] = e;
|
|
1407
|
+
});
|
|
1408
|
+
const tn = Q;
|
|
1409
|
+
function Be(e) {
|
|
1410
|
+
const t = new D(e), n = be(D.prototype.request, t);
|
|
1411
|
+
return a.extend(n, D.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
1412
|
+
return Be(T(e, r));
|
|
1413
|
+
}, n;
|
|
1414
|
+
}
|
|
1415
|
+
const g = Be(te);
|
|
1416
|
+
g.Axios = D;
|
|
1417
|
+
g.CanceledError = N;
|
|
1418
|
+
g.CancelToken = Zt;
|
|
1419
|
+
g.isCancel = ke;
|
|
1420
|
+
g.VERSION = Fe;
|
|
1421
|
+
g.toFormData = q;
|
|
1422
|
+
g.AxiosError = m;
|
|
1423
|
+
g.Cancel = g.CanceledError;
|
|
1424
|
+
g.all = function(e) {
|
|
1425
|
+
return Promise.all(e);
|
|
1426
|
+
};
|
|
1427
|
+
g.spread = Yt;
|
|
1428
|
+
g.isAxiosError = en;
|
|
1429
|
+
g.mergeConfig = T;
|
|
1430
|
+
g.AxiosHeaders = v;
|
|
1431
|
+
g.formToJSON = (e) => Ue(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
|
+
g.getAdapter = Le.getAdapter;
|
|
1433
|
+
g.HttpStatusCode = tn;
|
|
1434
|
+
g.default = g;
|
|
1435
|
+
let P;
|
|
1436
|
+
const nn = new Uint8Array(16);
|
|
1437
|
+
function rn() {
|
|
1438
|
+
if (!P && (P = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !P))
|
|
1439
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
1440
|
+
return P(nn);
|
|
1441
|
+
}
|
|
1442
|
+
const b = [];
|
|
1443
|
+
for (let e = 0; e < 256; ++e)
|
|
1444
|
+
b.push((e + 256).toString(16).slice(1));
|
|
1445
|
+
function on(e, t = 0) {
|
|
1446
|
+
return b[e[t + 0]] + b[e[t + 1]] + b[e[t + 2]] + b[e[t + 3]] + "-" + b[e[t + 4]] + b[e[t + 5]] + "-" + b[e[t + 6]] + b[e[t + 7]] + "-" + b[e[t + 8]] + b[e[t + 9]] + "-" + b[e[t + 10]] + b[e[t + 11]] + b[e[t + 12]] + b[e[t + 13]] + b[e[t + 14]] + b[e[t + 15]];
|
|
1447
|
+
}
|
|
1448
|
+
const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), me = {
|
|
1449
|
+
randomUUID: sn
|
|
1450
|
+
};
|
|
1451
|
+
function ge(e, t, n) {
|
|
1452
|
+
if (me.randomUUID && !t && !e)
|
|
1453
|
+
return me.randomUUID();
|
|
1454
|
+
e = e || {};
|
|
1455
|
+
const r = e.random || (e.rng || rn)();
|
|
1456
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, on(r);
|
|
1457
|
+
}
|
|
1458
|
+
class ye {
|
|
1459
|
+
constructor(t, n, r) {
|
|
1460
|
+
this._callback = n, this.remove = r, this.event = t;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
class an {
|
|
1464
|
+
constructor() {
|
|
1465
|
+
this.logs = [], this.responseListeners = {}, this.clickListeners = {};
|
|
1466
|
+
}
|
|
1467
|
+
validateContext() {
|
|
1468
|
+
if (!this.context)
|
|
1469
|
+
throw new Error("failed to initialize remy client, run remyClient.init(...)");
|
|
1470
|
+
}
|
|
1471
|
+
onResponse(t, n) {
|
|
1472
|
+
const r = ge();
|
|
1473
|
+
return this.responseListeners[r] = new ye(t, n, () => {
|
|
1474
|
+
delete this.responseListeners[r];
|
|
1475
|
+
}), this.responseListeners[r];
|
|
1476
|
+
}
|
|
1477
|
+
onClick(t, n) {
|
|
1478
|
+
const r = ge();
|
|
1479
|
+
return this.clickListeners[r] = new ye(t, n, () => {
|
|
1480
|
+
delete this.clickListeners[r];
|
|
1481
|
+
}), this.clickListeners[r];
|
|
1482
|
+
}
|
|
1483
|
+
_chatboxResponse(t) {
|
|
1484
|
+
Object.values(this.responseListeners).forEach((n) => {
|
|
1485
|
+
var r;
|
|
1486
|
+
((r = t.data) == null ? void 0 : r.event) === event && n._callback(t);
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
_chatboxClick(t, n) {
|
|
1490
|
+
Object.values(this.clickListeners).forEach((r) => {
|
|
1491
|
+
t === r.event && r._callback(n);
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
init(t) {
|
|
1495
|
+
this.context = t, this.client = g.create({
|
|
1496
|
+
baseURL: t.dev ? "https://remy-dev.feedmeapi.com" : "https://remy.feedmeapi.com"
|
|
1497
|
+
}), this.setToken(t.token);
|
|
1498
|
+
}
|
|
1499
|
+
setToken(t) {
|
|
1500
|
+
this.validateContext(), this.client.defaults.headers.common.Authorization = `Bearer ${t}`;
|
|
1501
|
+
}
|
|
1502
|
+
setChatbox(t) {
|
|
1503
|
+
this.chatbox = t;
|
|
1504
|
+
}
|
|
1505
|
+
clear() {
|
|
1506
|
+
var t;
|
|
1507
|
+
(t = this.chatbox) == null || t.clear();
|
|
1508
|
+
}
|
|
1509
|
+
log({ message: t, query: n, value: r }) {
|
|
1510
|
+
this.logs.push({ timestamp: (/* @__PURE__ */ new Date()).toISOString(), message: t, query: n, value: r });
|
|
1511
|
+
}
|
|
1512
|
+
async query({ action: t, path: n, body: r, params: o }, s) {
|
|
1513
|
+
var i, u;
|
|
1514
|
+
this.validateContext();
|
|
1515
|
+
const d = s <= 2 ? this.client : this.client;
|
|
1516
|
+
switch (t) {
|
|
1517
|
+
case "get":
|
|
1518
|
+
case "delete":
|
|
1519
|
+
return (i = await d[t](`v${s}/${n}`, { params: o })) == null ? void 0 : i.data;
|
|
1520
|
+
case "post":
|
|
1521
|
+
case "put":
|
|
1522
|
+
return (u = await d[t](`v${s}/${n}`, r, { params: o })) == null ? void 0 : u.data;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
async integrateChatbox(t, n) {
|
|
1526
|
+
let r = {
|
|
1527
|
+
message: "",
|
|
1528
|
+
data: null
|
|
1529
|
+
};
|
|
1530
|
+
const o = async () => (r = await n(), r);
|
|
1531
|
+
return this.chatbox ? await this.chatbox.ask(t, o) : await o(), r;
|
|
1532
|
+
}
|
|
1533
|
+
async getItemIngredients(t) {
|
|
1534
|
+
const n = {
|
|
1535
|
+
action: "get",
|
|
1536
|
+
path: "items/ingredients",
|
|
1537
|
+
params: { item_name: t.name }
|
|
1538
|
+
}, r = `Suggest ingredients for ${t.name}`;
|
|
1539
|
+
this.log({ message: r, query: n });
|
|
1540
|
+
const o = await this.integrateChatbox(r, async () => ({
|
|
1541
|
+
message: "",
|
|
1542
|
+
data: {
|
|
1543
|
+
value: (await this.query(n, 1)).map((s) => ({ label: s, value: s })),
|
|
1544
|
+
event: "SUGGEST_ITEM_INGREDIENT",
|
|
1545
|
+
action: "selection"
|
|
1546
|
+
}
|
|
1547
|
+
})) || [];
|
|
1548
|
+
return this.log({ message: o == null ? void 0 : o.message, value: o == null ? void 0 : o.data }), o;
|
|
1549
|
+
}
|
|
1550
|
+
async getItemDescription(t) {
|
|
1551
|
+
const n = {
|
|
1552
|
+
action: "get",
|
|
1553
|
+
path: "items/description",
|
|
1554
|
+
params: { item_name: t.name }
|
|
1555
|
+
}, r = `Suggest description for ${t.name}`;
|
|
1556
|
+
this.log({ message: r, query: n });
|
|
1557
|
+
const o = await this.integrateChatbox(r, async () => {
|
|
1558
|
+
const s = await this.query(n, 2);
|
|
1559
|
+
return {
|
|
1560
|
+
message: s.description_list.map((i) => `${i.language_code}: ${i.description}`).join(`
|
|
1561
|
+
|
|
1562
|
+
`),
|
|
1563
|
+
data: {
|
|
1564
|
+
value: s.description_list.map((i) => ({
|
|
1565
|
+
label: i.language_code,
|
|
1566
|
+
value: i.description
|
|
1567
|
+
})),
|
|
1568
|
+
event: "SUGGEST_ITEM_DESCRIPTION",
|
|
1569
|
+
action: "selection"
|
|
1570
|
+
}
|
|
1571
|
+
};
|
|
1572
|
+
});
|
|
1573
|
+
return this.log({ message: o == null ? void 0 : o.message, value: o == null ? void 0 : o.data }), o;
|
|
1574
|
+
}
|
|
1575
|
+
async getMarketingMaterialHeadline(t) {
|
|
1576
|
+
var n;
|
|
1577
|
+
const r = {
|
|
1578
|
+
action: "post",
|
|
1579
|
+
path: "marketing/headline",
|
|
1580
|
+
body: {
|
|
1581
|
+
campaignName: (n = t.campaign) == null ? void 0 : n.name
|
|
1582
|
+
}
|
|
1583
|
+
}, o = await this.query(r, 2);
|
|
1584
|
+
return ((o == null ? void 0 : o.headlines) || []).map((s) => ({
|
|
1585
|
+
language: s.language_code,
|
|
1586
|
+
content: s.headline
|
|
1587
|
+
}));
|
|
1588
|
+
}
|
|
1589
|
+
async getMarketingMaterialCaption(t) {
|
|
1590
|
+
var n, r;
|
|
1591
|
+
const o = {
|
|
1592
|
+
action: "post",
|
|
1593
|
+
path: "marketing/caption",
|
|
1594
|
+
body: {
|
|
1595
|
+
business: t.business,
|
|
1596
|
+
keyword: t.keyword,
|
|
1597
|
+
campaignName: (n = t.campaign) == null ? void 0 : n.name,
|
|
1598
|
+
campaignDescription: (r = t.campaign) == null ? void 0 : r.description
|
|
1599
|
+
}
|
|
1600
|
+
}, s = await this.query(o, 2);
|
|
1601
|
+
return ((s == null ? void 0 : s.captions_list) || []).map((i) => ({
|
|
1602
|
+
language: i.language_code,
|
|
1603
|
+
content: i.caption
|
|
1604
|
+
}));
|
|
1605
|
+
}
|
|
1606
|
+
async getMarketingMaterialThemes() {
|
|
1607
|
+
const t = {
|
|
1608
|
+
action: "get",
|
|
1609
|
+
path: "marketing-materials/themes"
|
|
1610
|
+
};
|
|
1611
|
+
return await this.query(t, 3);
|
|
1612
|
+
}
|
|
1613
|
+
async getMarketingMaterialFontStyles() {
|
|
1614
|
+
const t = {
|
|
1615
|
+
action: "get",
|
|
1616
|
+
path: "marketing-materials/font-styles"
|
|
1617
|
+
};
|
|
1618
|
+
return await this.query(t, 3);
|
|
1619
|
+
}
|
|
1620
|
+
async getMarketingMaterialAssets(t) {
|
|
1621
|
+
const n = new FormData();
|
|
1622
|
+
t.businessId && n.append("businessId", t.businessId);
|
|
1623
|
+
for (const o of t.themes)
|
|
1624
|
+
n.append("themes[]", o);
|
|
1625
|
+
n.append("image", t.image, "image.jpg"), t.seedCount && n.append("seedCount", t.seedCount.toString());
|
|
1626
|
+
const r = {
|
|
1627
|
+
action: "post",
|
|
1628
|
+
path: "marketing-materials/images",
|
|
1629
|
+
body: n
|
|
1630
|
+
};
|
|
1631
|
+
return await this.query(r, 3);
|
|
1632
|
+
}
|
|
1633
|
+
async getMenuImages(t) {
|
|
1634
|
+
const n = new FormData();
|
|
1635
|
+
t.businessId && n.append("businessId", t.businessId), n.append("image", t.image, "image.jpg");
|
|
1636
|
+
const r = {
|
|
1637
|
+
action: "post",
|
|
1638
|
+
path: "menu/images",
|
|
1639
|
+
body: n
|
|
1640
|
+
};
|
|
1641
|
+
return await this.query(r, 3);
|
|
1642
|
+
}
|
|
1643
|
+
async getItemPricing(t) {
|
|
1644
|
+
const n = {
|
|
1645
|
+
action: "get",
|
|
1646
|
+
path: "items/pricing",
|
|
1647
|
+
params: {
|
|
1648
|
+
item_name: t.name,
|
|
1649
|
+
lat: t.lat || 4.210484,
|
|
1650
|
+
lon: t.lon || 101.975769
|
|
1651
|
+
}
|
|
1652
|
+
}, r = `Suggest pricing for ${t.name}`;
|
|
1653
|
+
this.log({ message: r, query: n });
|
|
1654
|
+
const o = await this.integrateChatbox(r, async () => {
|
|
1655
|
+
const s = await this.query(
|
|
1656
|
+
n,
|
|
1657
|
+
2
|
|
1658
|
+
);
|
|
1659
|
+
return s.suggested_pricing.sort((i, u) => i - u), {
|
|
1660
|
+
message: s.suggestion,
|
|
1661
|
+
data: {
|
|
1662
|
+
value: s.suggested_pricing.map((i) => ({
|
|
1663
|
+
label: i.toString(),
|
|
1664
|
+
value: i
|
|
1665
|
+
})),
|
|
1666
|
+
event: "SUGGEST_ITEM_PRICING",
|
|
1667
|
+
action: "selection"
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
});
|
|
1671
|
+
return this.log({ message: o == null ? void 0 : o.message, value: o == null ? void 0 : o.data }), o;
|
|
1672
|
+
}
|
|
1673
|
+
async autocompleteIngredient(t) {
|
|
1674
|
+
const n = {
|
|
1675
|
+
action: "get",
|
|
1676
|
+
path: "ingredients/autocomplete",
|
|
1677
|
+
params: { input: t.name }
|
|
1678
|
+
}, r = `Autocomplete ingredients for ${t.name}`;
|
|
1679
|
+
this.log({ message: r, query: n });
|
|
1680
|
+
const o = await this.integrateChatbox(r, async () => {
|
|
1681
|
+
const s = await this.query(n, 1);
|
|
1682
|
+
return {
|
|
1683
|
+
message: s || "",
|
|
1684
|
+
data: { value: s || "" }
|
|
1685
|
+
};
|
|
1686
|
+
});
|
|
1687
|
+
return this.log({ message: o == null ? void 0 : o.message, value: o == null ? void 0 : o.data }), o;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
const un = new an();
|
|
1691
|
+
export {
|
|
1692
|
+
un as Y
|
|
1693
|
+
};
|