@touchtech/web-navigation-menu 0.0.18-alpha.7 → 0.0.19-alpha.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/index.js +2 -2
- package/package.json +2 -2
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1227
- package/dist/index.mjs.map +0 -1
- package/dist/style.css +0 -1
package/dist/index.mjs
DELETED
|
@@ -1,1227 +0,0 @@
|
|
|
1
|
-
import be, { useContext as X, useState as le, useEffect as Ee, useMemo as y, useCallback as K, Fragment as Ot } from "react";
|
|
2
|
-
import { AnimatePresence as Dt, motion as Mt } from "framer-motion";
|
|
3
|
-
import { createPortal as kt } from "react-dom";
|
|
4
|
-
import { AuthContext as tt, userHasTenantAccess as M, Privileges as q } from "@touchtech/web-auth";
|
|
5
|
-
import { TenantIdContext as Te } from "@touchtech/web-tenant-id-provider";
|
|
6
|
-
import re from "classcat";
|
|
7
|
-
import { Image as Ft, Button as Se, Icon as ne, IconButton as Lt } from "@touchtech/baselayer-ui";
|
|
8
|
-
import { useApi as nt, createUrl as rt } from "@touchtech/web-api-client";
|
|
9
|
-
import Ut from "swr";
|
|
10
|
-
import { matchPath as Bt } from "react-router-dom";
|
|
11
|
-
import { useToggle as Ht } from "@touchtech/web-hooks";
|
|
12
|
-
var we = { exports: {} }, Q = {};
|
|
13
|
-
/**
|
|
14
|
-
* @license React
|
|
15
|
-
* react-jsx-runtime.production.min.js
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the MIT license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
var Je;
|
|
23
|
-
function $t() {
|
|
24
|
-
if (Je) return Q;
|
|
25
|
-
Je = 1;
|
|
26
|
-
var i = be, a = Symbol.for("react.element"), p = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, d = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
27
|
-
function b(o, m, x) {
|
|
28
|
-
var g, S = {}, R = null, j = null;
|
|
29
|
-
x !== void 0 && (R = "" + x), m.key !== void 0 && (R = "" + m.key), m.ref !== void 0 && (j = m.ref);
|
|
30
|
-
for (g in m) u.call(m, g) && !c.hasOwnProperty(g) && (S[g] = m[g]);
|
|
31
|
-
if (o && o.defaultProps) for (g in m = o.defaultProps, m) S[g] === void 0 && (S[g] = m[g]);
|
|
32
|
-
return { $$typeof: a, type: o, key: R, ref: j, props: S, _owner: d.current };
|
|
33
|
-
}
|
|
34
|
-
return Q.Fragment = p, Q.jsx = b, Q.jsxs = b, Q;
|
|
35
|
-
}
|
|
36
|
-
var ee = {};
|
|
37
|
-
/**
|
|
38
|
-
* @license React
|
|
39
|
-
* react-jsx-runtime.development.js
|
|
40
|
-
*
|
|
41
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the MIT license found in the
|
|
44
|
-
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/
|
|
46
|
-
var Ze;
|
|
47
|
-
function Wt() {
|
|
48
|
-
return Ze || (Ze = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
-
var i = be, a = Symbol.for("react.element"), p = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), o = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), L = Symbol.iterator, U = "@@iterator";
|
|
50
|
-
function B(e) {
|
|
51
|
-
if (e === null || typeof e != "object")
|
|
52
|
-
return null;
|
|
53
|
-
var t = L && e[L] || e[U];
|
|
54
|
-
return typeof t == "function" ? t : null;
|
|
55
|
-
}
|
|
56
|
-
var C = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
-
function h(e) {
|
|
58
|
-
{
|
|
59
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
60
|
-
n[s - 1] = arguments[s];
|
|
61
|
-
H("error", e, n);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function H(e, t, n) {
|
|
65
|
-
{
|
|
66
|
-
var s = C.ReactDebugCurrentFrame, v = s.getStackAddendum();
|
|
67
|
-
v !== "" && (t += "%s", n = n.concat([v]));
|
|
68
|
-
var _ = n.map(function(f) {
|
|
69
|
-
return String(f);
|
|
70
|
-
});
|
|
71
|
-
_.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, _);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
var Y = !1, J = !1, A = !1, ue = !1, st = !1, Ne;
|
|
75
|
-
Ne = Symbol.for("react.module.reference");
|
|
76
|
-
function it(e) {
|
|
77
|
-
return !!(typeof e == "string" || typeof e == "function" || e === u || e === c || st || e === d || e === x || e === g || ue || e === j || Y || J || A || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === S || e.$$typeof === b || e.$$typeof === o || e.$$typeof === m || // This needs to include all possible module reference object
|
|
78
|
-
// types supported by any Flight configuration anywhere since
|
|
79
|
-
// we don't know which Flight build this will end up being used
|
|
80
|
-
// with.
|
|
81
|
-
e.$$typeof === Ne || e.getModuleId !== void 0));
|
|
82
|
-
}
|
|
83
|
-
function ot(e, t, n) {
|
|
84
|
-
var s = e.displayName;
|
|
85
|
-
if (s)
|
|
86
|
-
return s;
|
|
87
|
-
var v = t.displayName || t.name || "";
|
|
88
|
-
return v !== "" ? n + "(" + v + ")" : n;
|
|
89
|
-
}
|
|
90
|
-
function Ce(e) {
|
|
91
|
-
return e.displayName || "Context";
|
|
92
|
-
}
|
|
93
|
-
function $(e) {
|
|
94
|
-
if (e == null)
|
|
95
|
-
return null;
|
|
96
|
-
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
97
|
-
return e.displayName || e.name || null;
|
|
98
|
-
if (typeof e == "string")
|
|
99
|
-
return e;
|
|
100
|
-
switch (e) {
|
|
101
|
-
case u:
|
|
102
|
-
return "Fragment";
|
|
103
|
-
case p:
|
|
104
|
-
return "Portal";
|
|
105
|
-
case c:
|
|
106
|
-
return "Profiler";
|
|
107
|
-
case d:
|
|
108
|
-
return "StrictMode";
|
|
109
|
-
case x:
|
|
110
|
-
return "Suspense";
|
|
111
|
-
case g:
|
|
112
|
-
return "SuspenseList";
|
|
113
|
-
}
|
|
114
|
-
if (typeof e == "object")
|
|
115
|
-
switch (e.$$typeof) {
|
|
116
|
-
case o:
|
|
117
|
-
var t = e;
|
|
118
|
-
return Ce(t) + ".Consumer";
|
|
119
|
-
case b:
|
|
120
|
-
var n = e;
|
|
121
|
-
return Ce(n._context) + ".Provider";
|
|
122
|
-
case m:
|
|
123
|
-
return ot(e, e.render, "ForwardRef");
|
|
124
|
-
case S:
|
|
125
|
-
var s = e.displayName || null;
|
|
126
|
-
return s !== null ? s : $(e.type) || "Memo";
|
|
127
|
-
case R: {
|
|
128
|
-
var v = e, _ = v._payload, f = v._init;
|
|
129
|
-
try {
|
|
130
|
-
return $(f(_));
|
|
131
|
-
} catch {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return null;
|
|
137
|
-
}
|
|
138
|
-
var W = Object.assign, Z = 0, Ie, ye, je, Ae, Pe, Oe, De;
|
|
139
|
-
function Me() {
|
|
140
|
-
}
|
|
141
|
-
Me.__reactDisabledLog = !0;
|
|
142
|
-
function ct() {
|
|
143
|
-
{
|
|
144
|
-
if (Z === 0) {
|
|
145
|
-
Ie = console.log, ye = console.info, je = console.warn, Ae = console.error, Pe = console.group, Oe = console.groupCollapsed, De = console.groupEnd;
|
|
146
|
-
var e = {
|
|
147
|
-
configurable: !0,
|
|
148
|
-
enumerable: !0,
|
|
149
|
-
value: Me,
|
|
150
|
-
writable: !0
|
|
151
|
-
};
|
|
152
|
-
Object.defineProperties(console, {
|
|
153
|
-
info: e,
|
|
154
|
-
log: e,
|
|
155
|
-
warn: e,
|
|
156
|
-
error: e,
|
|
157
|
-
group: e,
|
|
158
|
-
groupCollapsed: e,
|
|
159
|
-
groupEnd: e
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
Z++;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function lt() {
|
|
166
|
-
{
|
|
167
|
-
if (Z--, Z === 0) {
|
|
168
|
-
var e = {
|
|
169
|
-
configurable: !0,
|
|
170
|
-
enumerable: !0,
|
|
171
|
-
writable: !0
|
|
172
|
-
};
|
|
173
|
-
Object.defineProperties(console, {
|
|
174
|
-
log: W({}, e, {
|
|
175
|
-
value: Ie
|
|
176
|
-
}),
|
|
177
|
-
info: W({}, e, {
|
|
178
|
-
value: ye
|
|
179
|
-
}),
|
|
180
|
-
warn: W({}, e, {
|
|
181
|
-
value: je
|
|
182
|
-
}),
|
|
183
|
-
error: W({}, e, {
|
|
184
|
-
value: Ae
|
|
185
|
-
}),
|
|
186
|
-
group: W({}, e, {
|
|
187
|
-
value: Pe
|
|
188
|
-
}),
|
|
189
|
-
groupCollapsed: W({}, e, {
|
|
190
|
-
value: Oe
|
|
191
|
-
}),
|
|
192
|
-
groupEnd: W({}, e, {
|
|
193
|
-
value: De
|
|
194
|
-
})
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
Z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
var de = C.ReactCurrentDispatcher, fe;
|
|
201
|
-
function ae(e, t, n) {
|
|
202
|
-
{
|
|
203
|
-
if (fe === void 0)
|
|
204
|
-
try {
|
|
205
|
-
throw Error();
|
|
206
|
-
} catch (v) {
|
|
207
|
-
var s = v.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
-
fe = s && s[1] || "";
|
|
209
|
-
}
|
|
210
|
-
return `
|
|
211
|
-
` + fe + e;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
var pe = !1, se;
|
|
215
|
-
{
|
|
216
|
-
var ut = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
-
se = new ut();
|
|
218
|
-
}
|
|
219
|
-
function ke(e, t) {
|
|
220
|
-
if (!e || pe)
|
|
221
|
-
return "";
|
|
222
|
-
{
|
|
223
|
-
var n = se.get(e);
|
|
224
|
-
if (n !== void 0)
|
|
225
|
-
return n;
|
|
226
|
-
}
|
|
227
|
-
var s;
|
|
228
|
-
pe = !0;
|
|
229
|
-
var v = Error.prepareStackTrace;
|
|
230
|
-
Error.prepareStackTrace = void 0;
|
|
231
|
-
var _;
|
|
232
|
-
_ = de.current, de.current = null, ct();
|
|
233
|
-
try {
|
|
234
|
-
if (t) {
|
|
235
|
-
var f = function() {
|
|
236
|
-
throw Error();
|
|
237
|
-
};
|
|
238
|
-
if (Object.defineProperty(f.prototype, "props", {
|
|
239
|
-
set: function() {
|
|
240
|
-
throw Error();
|
|
241
|
-
}
|
|
242
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
243
|
-
try {
|
|
244
|
-
Reflect.construct(f, []);
|
|
245
|
-
} catch (P) {
|
|
246
|
-
s = P;
|
|
247
|
-
}
|
|
248
|
-
Reflect.construct(e, [], f);
|
|
249
|
-
} else {
|
|
250
|
-
try {
|
|
251
|
-
f.call();
|
|
252
|
-
} catch (P) {
|
|
253
|
-
s = P;
|
|
254
|
-
}
|
|
255
|
-
e.call(f.prototype);
|
|
256
|
-
}
|
|
257
|
-
} else {
|
|
258
|
-
try {
|
|
259
|
-
throw Error();
|
|
260
|
-
} catch (P) {
|
|
261
|
-
s = P;
|
|
262
|
-
}
|
|
263
|
-
e();
|
|
264
|
-
}
|
|
265
|
-
} catch (P) {
|
|
266
|
-
if (P && s && typeof P.stack == "string") {
|
|
267
|
-
for (var l = P.stack.split(`
|
|
268
|
-
`), N = s.stack.split(`
|
|
269
|
-
`), E = l.length - 1, w = N.length - 1; E >= 1 && w >= 0 && l[E] !== N[w]; )
|
|
270
|
-
w--;
|
|
271
|
-
for (; E >= 1 && w >= 0; E--, w--)
|
|
272
|
-
if (l[E] !== N[w]) {
|
|
273
|
-
if (E !== 1 || w !== 1)
|
|
274
|
-
do
|
|
275
|
-
if (E--, w--, w < 0 || l[E] !== N[w]) {
|
|
276
|
-
var I = `
|
|
277
|
-
` + l[E].replace(" at new ", " at ");
|
|
278
|
-
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, I), I;
|
|
279
|
-
}
|
|
280
|
-
while (E >= 1 && w >= 0);
|
|
281
|
-
break;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
} finally {
|
|
285
|
-
pe = !1, de.current = _, lt(), Error.prepareStackTrace = v;
|
|
286
|
-
}
|
|
287
|
-
var z = e ? e.displayName || e.name : "", Xe = z ? ae(z) : "";
|
|
288
|
-
return typeof e == "function" && se.set(e, Xe), Xe;
|
|
289
|
-
}
|
|
290
|
-
function dt(e, t, n) {
|
|
291
|
-
return ke(e, !1);
|
|
292
|
-
}
|
|
293
|
-
function ft(e) {
|
|
294
|
-
var t = e.prototype;
|
|
295
|
-
return !!(t && t.isReactComponent);
|
|
296
|
-
}
|
|
297
|
-
function ie(e, t, n) {
|
|
298
|
-
if (e == null)
|
|
299
|
-
return "";
|
|
300
|
-
if (typeof e == "function")
|
|
301
|
-
return ke(e, ft(e));
|
|
302
|
-
if (typeof e == "string")
|
|
303
|
-
return ae(e);
|
|
304
|
-
switch (e) {
|
|
305
|
-
case x:
|
|
306
|
-
return ae("Suspense");
|
|
307
|
-
case g:
|
|
308
|
-
return ae("SuspenseList");
|
|
309
|
-
}
|
|
310
|
-
if (typeof e == "object")
|
|
311
|
-
switch (e.$$typeof) {
|
|
312
|
-
case m:
|
|
313
|
-
return dt(e.render);
|
|
314
|
-
case S:
|
|
315
|
-
return ie(e.type, t, n);
|
|
316
|
-
case R: {
|
|
317
|
-
var s = e, v = s._payload, _ = s._init;
|
|
318
|
-
try {
|
|
319
|
-
return ie(_(v), t, n);
|
|
320
|
-
} catch {
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
return "";
|
|
325
|
-
}
|
|
326
|
-
var oe = Object.prototype.hasOwnProperty, Fe = {}, Le = C.ReactDebugCurrentFrame;
|
|
327
|
-
function ce(e) {
|
|
328
|
-
if (e) {
|
|
329
|
-
var t = e._owner, n = ie(e.type, e._source, t ? t.type : null);
|
|
330
|
-
Le.setExtraStackFrame(n);
|
|
331
|
-
} else
|
|
332
|
-
Le.setExtraStackFrame(null);
|
|
333
|
-
}
|
|
334
|
-
function pt(e, t, n, s, v) {
|
|
335
|
-
{
|
|
336
|
-
var _ = Function.call.bind(oe);
|
|
337
|
-
for (var f in e)
|
|
338
|
-
if (_(e, f)) {
|
|
339
|
-
var l = void 0;
|
|
340
|
-
try {
|
|
341
|
-
if (typeof e[f] != "function") {
|
|
342
|
-
var N = Error((s || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
343
|
-
throw N.name = "Invariant Violation", N;
|
|
344
|
-
}
|
|
345
|
-
l = e[f](t, f, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
|
-
} catch (E) {
|
|
347
|
-
l = E;
|
|
348
|
-
}
|
|
349
|
-
l && !(l instanceof Error) && (ce(v), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, f, typeof l), ce(null)), l instanceof Error && !(l.message in Fe) && (Fe[l.message] = !0, ce(v), h("Failed %s type: %s", n, l.message), ce(null));
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
var vt = Array.isArray;
|
|
354
|
-
function ve(e) {
|
|
355
|
-
return vt(e);
|
|
356
|
-
}
|
|
357
|
-
function _t(e) {
|
|
358
|
-
{
|
|
359
|
-
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
360
|
-
return n;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
function mt(e) {
|
|
364
|
-
try {
|
|
365
|
-
return Ue(e), !1;
|
|
366
|
-
} catch {
|
|
367
|
-
return !0;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
function Ue(e) {
|
|
371
|
-
return "" + e;
|
|
372
|
-
}
|
|
373
|
-
function Be(e) {
|
|
374
|
-
if (mt(e))
|
|
375
|
-
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", _t(e)), Ue(e);
|
|
376
|
-
}
|
|
377
|
-
var He = C.ReactCurrentOwner, ht = {
|
|
378
|
-
key: !0,
|
|
379
|
-
ref: !0,
|
|
380
|
-
__self: !0,
|
|
381
|
-
__source: !0
|
|
382
|
-
}, $e, We;
|
|
383
|
-
function gt(e) {
|
|
384
|
-
if (oe.call(e, "ref")) {
|
|
385
|
-
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
386
|
-
if (t && t.isReactWarning)
|
|
387
|
-
return !1;
|
|
388
|
-
}
|
|
389
|
-
return e.ref !== void 0;
|
|
390
|
-
}
|
|
391
|
-
function Et(e) {
|
|
392
|
-
if (oe.call(e, "key")) {
|
|
393
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
394
|
-
if (t && t.isReactWarning)
|
|
395
|
-
return !1;
|
|
396
|
-
}
|
|
397
|
-
return e.key !== void 0;
|
|
398
|
-
}
|
|
399
|
-
function wt(e, t) {
|
|
400
|
-
typeof e.ref == "string" && He.current;
|
|
401
|
-
}
|
|
402
|
-
function bt(e, t) {
|
|
403
|
-
{
|
|
404
|
-
var n = function() {
|
|
405
|
-
$e || ($e = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
406
|
-
};
|
|
407
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
408
|
-
get: n,
|
|
409
|
-
configurable: !0
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
function Tt(e, t) {
|
|
414
|
-
{
|
|
415
|
-
var n = function() {
|
|
416
|
-
We || (We = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
417
|
-
};
|
|
418
|
-
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
419
|
-
get: n,
|
|
420
|
-
configurable: !0
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
var St = function(e, t, n, s, v, _, f) {
|
|
425
|
-
var l = {
|
|
426
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
427
|
-
$$typeof: a,
|
|
428
|
-
// Built-in properties that belong on the element
|
|
429
|
-
type: e,
|
|
430
|
-
key: t,
|
|
431
|
-
ref: n,
|
|
432
|
-
props: f,
|
|
433
|
-
// Record the component responsible for creating this element.
|
|
434
|
-
_owner: _
|
|
435
|
-
};
|
|
436
|
-
return l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
437
|
-
configurable: !1,
|
|
438
|
-
enumerable: !1,
|
|
439
|
-
writable: !0,
|
|
440
|
-
value: !1
|
|
441
|
-
}), Object.defineProperty(l, "_self", {
|
|
442
|
-
configurable: !1,
|
|
443
|
-
enumerable: !1,
|
|
444
|
-
writable: !1,
|
|
445
|
-
value: s
|
|
446
|
-
}), Object.defineProperty(l, "_source", {
|
|
447
|
-
configurable: !1,
|
|
448
|
-
enumerable: !1,
|
|
449
|
-
writable: !1,
|
|
450
|
-
value: v
|
|
451
|
-
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
452
|
-
};
|
|
453
|
-
function xt(e, t, n, s, v) {
|
|
454
|
-
{
|
|
455
|
-
var _, f = {}, l = null, N = null;
|
|
456
|
-
n !== void 0 && (Be(n), l = "" + n), Et(t) && (Be(t.key), l = "" + t.key), gt(t) && (N = t.ref, wt(t, v));
|
|
457
|
-
for (_ in t)
|
|
458
|
-
oe.call(t, _) && !ht.hasOwnProperty(_) && (f[_] = t[_]);
|
|
459
|
-
if (e && e.defaultProps) {
|
|
460
|
-
var E = e.defaultProps;
|
|
461
|
-
for (_ in E)
|
|
462
|
-
f[_] === void 0 && (f[_] = E[_]);
|
|
463
|
-
}
|
|
464
|
-
if (l || N) {
|
|
465
|
-
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
466
|
-
l && bt(f, w), N && Tt(f, w);
|
|
467
|
-
}
|
|
468
|
-
return St(e, l, N, v, s, He.current, f);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
var _e = C.ReactCurrentOwner, qe = C.ReactDebugCurrentFrame;
|
|
472
|
-
function G(e) {
|
|
473
|
-
if (e) {
|
|
474
|
-
var t = e._owner, n = ie(e.type, e._source, t ? t.type : null);
|
|
475
|
-
qe.setExtraStackFrame(n);
|
|
476
|
-
} else
|
|
477
|
-
qe.setExtraStackFrame(null);
|
|
478
|
-
}
|
|
479
|
-
var me;
|
|
480
|
-
me = !1;
|
|
481
|
-
function he(e) {
|
|
482
|
-
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
483
|
-
}
|
|
484
|
-
function Ve() {
|
|
485
|
-
{
|
|
486
|
-
if (_e.current) {
|
|
487
|
-
var e = $(_e.current.type);
|
|
488
|
-
if (e)
|
|
489
|
-
return `
|
|
490
|
-
|
|
491
|
-
Check the render method of \`` + e + "`.";
|
|
492
|
-
}
|
|
493
|
-
return "";
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
function Rt(e) {
|
|
497
|
-
return "";
|
|
498
|
-
}
|
|
499
|
-
var Ye = {};
|
|
500
|
-
function Nt(e) {
|
|
501
|
-
{
|
|
502
|
-
var t = Ve();
|
|
503
|
-
if (!t) {
|
|
504
|
-
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
505
|
-
n && (t = `
|
|
506
|
-
|
|
507
|
-
Check the top-level render call using <` + n + ">.");
|
|
508
|
-
}
|
|
509
|
-
return t;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
function Ge(e, t) {
|
|
513
|
-
{
|
|
514
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
515
|
-
return;
|
|
516
|
-
e._store.validated = !0;
|
|
517
|
-
var n = Nt(t);
|
|
518
|
-
if (Ye[n])
|
|
519
|
-
return;
|
|
520
|
-
Ye[n] = !0;
|
|
521
|
-
var s = "";
|
|
522
|
-
e && e._owner && e._owner !== _e.current && (s = " It was passed a child from " + $(e._owner.type) + "."), G(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), G(null);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
function ze(e, t) {
|
|
526
|
-
{
|
|
527
|
-
if (typeof e != "object")
|
|
528
|
-
return;
|
|
529
|
-
if (ve(e))
|
|
530
|
-
for (var n = 0; n < e.length; n++) {
|
|
531
|
-
var s = e[n];
|
|
532
|
-
he(s) && Ge(s, t);
|
|
533
|
-
}
|
|
534
|
-
else if (he(e))
|
|
535
|
-
e._store && (e._store.validated = !0);
|
|
536
|
-
else if (e) {
|
|
537
|
-
var v = B(e);
|
|
538
|
-
if (typeof v == "function" && v !== e.entries)
|
|
539
|
-
for (var _ = v.call(e), f; !(f = _.next()).done; )
|
|
540
|
-
he(f.value) && Ge(f.value, t);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
function Ct(e) {
|
|
545
|
-
{
|
|
546
|
-
var t = e.type;
|
|
547
|
-
if (t == null || typeof t == "string")
|
|
548
|
-
return;
|
|
549
|
-
var n;
|
|
550
|
-
if (typeof t == "function")
|
|
551
|
-
n = t.propTypes;
|
|
552
|
-
else if (typeof t == "object" && (t.$$typeof === m || // Note: Memo only checks outer props here.
|
|
553
|
-
// Inner props are checked in the reconciler.
|
|
554
|
-
t.$$typeof === S))
|
|
555
|
-
n = t.propTypes;
|
|
556
|
-
else
|
|
557
|
-
return;
|
|
558
|
-
if (n) {
|
|
559
|
-
var s = $(t);
|
|
560
|
-
pt(n, e.props, "prop", s, e);
|
|
561
|
-
} else if (t.PropTypes !== void 0 && !me) {
|
|
562
|
-
me = !0;
|
|
563
|
-
var v = $(t);
|
|
564
|
-
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
565
|
-
}
|
|
566
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
function It(e) {
|
|
570
|
-
{
|
|
571
|
-
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
572
|
-
var s = t[n];
|
|
573
|
-
if (s !== "children" && s !== "key") {
|
|
574
|
-
G(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), G(null);
|
|
575
|
-
break;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
e.ref !== null && (G(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
function Ke(e, t, n, s, v, _) {
|
|
582
|
-
{
|
|
583
|
-
var f = it(e);
|
|
584
|
-
if (!f) {
|
|
585
|
-
var l = "";
|
|
586
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
587
|
-
var N = Rt();
|
|
588
|
-
N ? l += N : l += Ve();
|
|
589
|
-
var E;
|
|
590
|
-
e === null ? E = "null" : ve(e) ? E = "array" : e !== void 0 && e.$$typeof === a ? (E = "<" + ($(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, l);
|
|
591
|
-
}
|
|
592
|
-
var w = xt(e, t, n, v, _);
|
|
593
|
-
if (w == null)
|
|
594
|
-
return w;
|
|
595
|
-
if (f) {
|
|
596
|
-
var I = t.children;
|
|
597
|
-
if (I !== void 0)
|
|
598
|
-
if (s)
|
|
599
|
-
if (ve(I)) {
|
|
600
|
-
for (var z = 0; z < I.length; z++)
|
|
601
|
-
ze(I[z], e);
|
|
602
|
-
Object.freeze && Object.freeze(I);
|
|
603
|
-
} else
|
|
604
|
-
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
605
|
-
else
|
|
606
|
-
ze(I, e);
|
|
607
|
-
}
|
|
608
|
-
return e === u ? It(w) : Ct(w), w;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
function yt(e, t, n) {
|
|
612
|
-
return Ke(e, t, n, !0);
|
|
613
|
-
}
|
|
614
|
-
function jt(e, t, n) {
|
|
615
|
-
return Ke(e, t, n, !1);
|
|
616
|
-
}
|
|
617
|
-
var At = jt, Pt = yt;
|
|
618
|
-
ee.Fragment = u, ee.jsx = At, ee.jsxs = Pt;
|
|
619
|
-
}()), ee;
|
|
620
|
-
}
|
|
621
|
-
process.env.NODE_ENV === "production" ? we.exports = $t() : we.exports = Wt();
|
|
622
|
-
var r = we.exports;
|
|
623
|
-
const D = {
|
|
624
|
-
SHOWROOM: "/showroom",
|
|
625
|
-
SENDOUTS: "/sendouts",
|
|
626
|
-
SENDOUTS_CMS: "/sendouts-cms",
|
|
627
|
-
MARKETING_ENGINE: "/media",
|
|
628
|
-
USER_MANAGEMENT: "/users",
|
|
629
|
-
TENANTS: "/tenants",
|
|
630
|
-
DASHBOARD: "/dashboard",
|
|
631
|
-
DASHBOARD_CREATE_WORKSPACE_MODAL: "/dashboard/create-workspace",
|
|
632
|
-
CREATE_WORKSPACE: "/create-workspace",
|
|
633
|
-
SETTINGS: "/settings",
|
|
634
|
-
INSTORE_ADMIN: "/instore-admin",
|
|
635
|
-
SUPERADMIN: "/superadmin",
|
|
636
|
-
CMS: "/cms"
|
|
637
|
-
}, qt = 300, Vt = 300;
|
|
638
|
-
var F = /* @__PURE__ */ ((i) => (i.OPEN = "OPEN", i.HIDDEN = "HIDDEN", i.EXPANDED = "EXPANDED", i))(F || {});
|
|
639
|
-
const xe = be.createContext(
|
|
640
|
-
{}
|
|
641
|
-
);
|
|
642
|
-
function V() {
|
|
643
|
-
return X(xe);
|
|
644
|
-
}
|
|
645
|
-
function Yt({
|
|
646
|
-
children: i,
|
|
647
|
-
isOpen: a,
|
|
648
|
-
tenantServiceUrl: p,
|
|
649
|
-
onNavigationClose: u = () => {
|
|
650
|
-
}
|
|
651
|
-
}) {
|
|
652
|
-
const [d] = X(Te), [c, b] = le({
|
|
653
|
-
selectedTenantId: d,
|
|
654
|
-
currentPosition: "HIDDEN"
|
|
655
|
-
/* HIDDEN */
|
|
656
|
-
}), { user: o, authService: m, canSignOut: x } = X(tt);
|
|
657
|
-
Ee(() => {
|
|
658
|
-
if (a) {
|
|
659
|
-
b((A) => ({
|
|
660
|
-
...A,
|
|
661
|
-
selectedTenantId: d,
|
|
662
|
-
currentPosition: "OPEN"
|
|
663
|
-
/* OPEN */
|
|
664
|
-
}));
|
|
665
|
-
return;
|
|
666
|
-
}
|
|
667
|
-
b((A) => ({
|
|
668
|
-
...A,
|
|
669
|
-
currentPosition: "HIDDEN"
|
|
670
|
-
/* HIDDEN */
|
|
671
|
-
}));
|
|
672
|
-
}, [d, a, b]), Ee(() => {
|
|
673
|
-
a && m.refreshUser(300);
|
|
674
|
-
}, [m, a]);
|
|
675
|
-
const g = y(
|
|
676
|
-
() => o ? M(
|
|
677
|
-
o,
|
|
678
|
-
c.selectedTenantId,
|
|
679
|
-
q.MARKETING_ENGINE_APP
|
|
680
|
-
) : !1,
|
|
681
|
-
[c.selectedTenantId, o]
|
|
682
|
-
), S = y(
|
|
683
|
-
() => o ? M(
|
|
684
|
-
o,
|
|
685
|
-
c.selectedTenantId,
|
|
686
|
-
q.SHOWROOM_APP
|
|
687
|
-
) : !1,
|
|
688
|
-
[c.selectedTenantId, o]
|
|
689
|
-
), R = y(
|
|
690
|
-
() => o ? M(
|
|
691
|
-
o,
|
|
692
|
-
c.selectedTenantId,
|
|
693
|
-
q.SENDOUTS_APP
|
|
694
|
-
) : !1,
|
|
695
|
-
[c.selectedTenantId, o]
|
|
696
|
-
), j = y(
|
|
697
|
-
() => o ? M(
|
|
698
|
-
o,
|
|
699
|
-
c.selectedTenantId,
|
|
700
|
-
q.SENDOUTS_CMS_APP
|
|
701
|
-
) : !1,
|
|
702
|
-
[c.selectedTenantId, o]
|
|
703
|
-
), L = y(
|
|
704
|
-
() => o ? M(
|
|
705
|
-
o,
|
|
706
|
-
c.selectedTenantId,
|
|
707
|
-
q.USER_MANAGEMENT_APP
|
|
708
|
-
) : !1,
|
|
709
|
-
[c.selectedTenantId, o]
|
|
710
|
-
), U = y(
|
|
711
|
-
() => o ? M(
|
|
712
|
-
o,
|
|
713
|
-
c.selectedTenantId,
|
|
714
|
-
q.UNIVERSAL
|
|
715
|
-
) : !1,
|
|
716
|
-
[c.selectedTenantId, o]
|
|
717
|
-
), B = y(
|
|
718
|
-
() => o ? M(o, c.selectedTenantId, "settings-app") : !1,
|
|
719
|
-
[c.selectedTenantId, o]
|
|
720
|
-
), C = y(
|
|
721
|
-
() => o ? M(
|
|
722
|
-
o,
|
|
723
|
-
c.selectedTenantId,
|
|
724
|
-
q.INSTORE_ADMIN_APP
|
|
725
|
-
) : !1,
|
|
726
|
-
[c.selectedTenantId, o]
|
|
727
|
-
), h = K(
|
|
728
|
-
(A) => b((ue) => ({
|
|
729
|
-
...ue,
|
|
730
|
-
...A
|
|
731
|
-
})),
|
|
732
|
-
[]
|
|
733
|
-
), H = K(async () => {
|
|
734
|
-
x && await m.signOut();
|
|
735
|
-
}, [m, x]), Y = K(() => {
|
|
736
|
-
if (c.currentPosition === "OPEN") {
|
|
737
|
-
h({
|
|
738
|
-
currentPosition: "EXPANDED",
|
|
739
|
-
selectedTenantId: d
|
|
740
|
-
});
|
|
741
|
-
return;
|
|
742
|
-
}
|
|
743
|
-
if (c.currentPosition === "EXPANDED") {
|
|
744
|
-
h({
|
|
745
|
-
currentPosition: "OPEN"
|
|
746
|
-
/* OPEN */
|
|
747
|
-
});
|
|
748
|
-
return;
|
|
749
|
-
}
|
|
750
|
-
}, [d, h, c.currentPosition]), J = y(
|
|
751
|
-
() => ({
|
|
752
|
-
hasMarketingEngineAccess: g,
|
|
753
|
-
hasShowroomAccess: S,
|
|
754
|
-
hasSendoutsAccess: R,
|
|
755
|
-
hasCmsAccess: j,
|
|
756
|
-
hasUserManagementAccess: L,
|
|
757
|
-
hasUniversalAccess: U,
|
|
758
|
-
hasSettingsAccess: B,
|
|
759
|
-
hasInstoreAccess: C,
|
|
760
|
-
viewState: c,
|
|
761
|
-
updateViewState: h,
|
|
762
|
-
signOut: H,
|
|
763
|
-
toggleTenants: Y,
|
|
764
|
-
onNavigationClose: u,
|
|
765
|
-
tenantServiceUrl: p
|
|
766
|
-
}),
|
|
767
|
-
[
|
|
768
|
-
g,
|
|
769
|
-
R,
|
|
770
|
-
j,
|
|
771
|
-
S,
|
|
772
|
-
L,
|
|
773
|
-
U,
|
|
774
|
-
B,
|
|
775
|
-
C,
|
|
776
|
-
c,
|
|
777
|
-
h,
|
|
778
|
-
H,
|
|
779
|
-
Y,
|
|
780
|
-
u,
|
|
781
|
-
p
|
|
782
|
-
]
|
|
783
|
-
);
|
|
784
|
-
return /* @__PURE__ */ r.jsx(xe.Provider, { value: J, children: i });
|
|
785
|
-
}
|
|
786
|
-
const Gt = "_navigation_1esaw_1", zt = {
|
|
787
|
-
navigation: Gt
|
|
788
|
-
}, Kt = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.398438%200.399902L19.5984%2019.5999M0.398438%2019.5999L19.5984%200.399902'%20stroke='black'/%3e%3c/svg%3e", Xt = "data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%201.5999L10.4667%204.7999M7%201.5999L3.8%204.7999M7%201.5999L7%2011.7332M13.4%207.46657L13.4%2014.3999L0.600002%2014.3999L0.600002%207.46657'%20stroke='%232D2D33'/%3e%3c/svg%3e", Jt = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2046%2046'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3cg%20transform='matrix(1,0,0,1,-27,-27)'%3e%3cpath%20d='M73,50C73,37.3%2062.7,27%2050,27C37.3,27%2027,37.3%2027,50M30.9,50C30.9,39.5%2039.4,30.9%2050,30.9C60.6,30.9%2069.1,39.5%2069.1,50'%20style='fill-rule:nonzero;'%3e%3canimateTransform%20attributeName='transform'%20attributeType='XML'%20type='rotate'%20dur='1s'%20from='0%2050%2050'%20to='360%2050%2050'%20repeatCount='indefinite'%20/%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Zt = (i) => {
|
|
789
|
-
const a = i ?? void 0 ?? void 0;
|
|
790
|
-
if (!a)
|
|
791
|
-
throw new Error(
|
|
792
|
-
"TENANTS_SERVICE_URL or REACT_APP_TENANTS_SERVICE_URL must be set"
|
|
793
|
-
);
|
|
794
|
-
return rt(
|
|
795
|
-
a,
|
|
796
|
-
"/api/Subscriptions/create-customer-portal-session"
|
|
797
|
-
);
|
|
798
|
-
};
|
|
799
|
-
function Qt(i) {
|
|
800
|
-
const a = nt(), p = Zt(i), { viewState: u } = V(), [d] = X(Te);
|
|
801
|
-
return K(
|
|
802
|
-
async (b) => {
|
|
803
|
-
const o = b.replace(/^\//, "");
|
|
804
|
-
a.setHeader("tenant-id", u.selectedTenantId);
|
|
805
|
-
try {
|
|
806
|
-
return await a.post(
|
|
807
|
-
p,
|
|
808
|
-
o
|
|
809
|
-
);
|
|
810
|
-
} finally {
|
|
811
|
-
d && a.setHeader("tenant-id", d);
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
[a, p, u, d]
|
|
815
|
-
);
|
|
816
|
-
}
|
|
817
|
-
function en(i) {
|
|
818
|
-
const a = i ?? void 0 ?? void 0;
|
|
819
|
-
if (!a)
|
|
820
|
-
throw new Error(
|
|
821
|
-
"TENANTS_SERVICE_URL or REACT_APP_TENANTS_SERVICE_URL must be set"
|
|
822
|
-
);
|
|
823
|
-
return rt(a, "/api/Tenants/view");
|
|
824
|
-
}
|
|
825
|
-
function Re(i) {
|
|
826
|
-
const a = nt(), p = en(i), { data: u, error: d } = Ut(p, a.get);
|
|
827
|
-
return {
|
|
828
|
-
tenants: u ?? [],
|
|
829
|
-
isLoading: !u && !d,
|
|
830
|
-
error: d
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
function tn() {
|
|
834
|
-
const {
|
|
835
|
-
viewState: { selectedTenantId: i },
|
|
836
|
-
tenantServiceUrl: a
|
|
837
|
-
} = V(), { tenants: p } = Re(a);
|
|
838
|
-
return y(() => p.find((d) => d.id === i), [p, i]);
|
|
839
|
-
}
|
|
840
|
-
function nn({ layout: i }) {
|
|
841
|
-
const {
|
|
842
|
-
viewState: { selectedTenantId: a },
|
|
843
|
-
tenantServiceUrl: p
|
|
844
|
-
} = V(), { tenants: u } = Re(p), d = y(
|
|
845
|
-
() => u.find((c) => c.id === a),
|
|
846
|
-
[a, u]
|
|
847
|
-
);
|
|
848
|
-
return d ? /* @__PURE__ */ r.jsx(Ft, { src: d.logoUrl, layout: i }) : null;
|
|
849
|
-
}
|
|
850
|
-
const rn = "_tier_1cqnw_1", an = "_tier-header_1cqnw_12", sn = "_border_1cqnw_17", on = "_tier-main_1cqnw_21", cn = "_tier-footer_1cqnw_26", te = {
|
|
851
|
-
tier: rn,
|
|
852
|
-
tierHeader: an,
|
|
853
|
-
border: sn,
|
|
854
|
-
tierMain: on,
|
|
855
|
-
tierFooter: cn
|
|
856
|
-
};
|
|
857
|
-
function at({
|
|
858
|
-
children: i,
|
|
859
|
-
header: a,
|
|
860
|
-
footer: p,
|
|
861
|
-
className: u,
|
|
862
|
-
width: d,
|
|
863
|
-
showHeaderBorder: c
|
|
864
|
-
}) {
|
|
865
|
-
return /* @__PURE__ */ r.jsxs("div", { className: re([te.tier, u]), style: { width: d }, children: [
|
|
866
|
-
!!a && /* @__PURE__ */ r.jsx(
|
|
867
|
-
"div",
|
|
868
|
-
{
|
|
869
|
-
className: re([
|
|
870
|
-
te.tierHeader,
|
|
871
|
-
{ [te.border]: c }
|
|
872
|
-
]),
|
|
873
|
-
children: a
|
|
874
|
-
}
|
|
875
|
-
),
|
|
876
|
-
/* @__PURE__ */ r.jsx("div", { className: te.tierMain, children: i }),
|
|
877
|
-
!!p && /* @__PURE__ */ r.jsx("div", { className: te.tierFooter, children: p })
|
|
878
|
-
] });
|
|
879
|
-
}
|
|
880
|
-
const ln = "_navigation-button_1ckcy_1", un = "_active_1ckcy_15", Qe = {
|
|
881
|
-
navigationButton: ln,
|
|
882
|
-
active: un
|
|
883
|
-
};
|
|
884
|
-
function O({
|
|
885
|
-
children: i,
|
|
886
|
-
to: a,
|
|
887
|
-
hidden: p,
|
|
888
|
-
disabled: u,
|
|
889
|
-
onClick: d
|
|
890
|
-
}) {
|
|
891
|
-
const [c, b] = X(Te), [o, m] = le(!1), {
|
|
892
|
-
viewState: { selectedTenantId: x }
|
|
893
|
-
} = V();
|
|
894
|
-
Ee(() => {
|
|
895
|
-
const R = () => {
|
|
896
|
-
c !== x && o && b(x);
|
|
897
|
-
};
|
|
898
|
-
return window.addEventListener("unload", R), () => {
|
|
899
|
-
window.removeEventListener("unload", R);
|
|
900
|
-
};
|
|
901
|
-
}, [b, c, x, o]);
|
|
902
|
-
const g = K(() => {
|
|
903
|
-
if (d) {
|
|
904
|
-
d(m);
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
a && (m(!0), window.location.assign(a));
|
|
908
|
-
}, [a, d]), S = a ? !!Bt(`${a}/*`, window.location.pathname) && c === x : !1;
|
|
909
|
-
return p ? null : /* @__PURE__ */ r.jsx(
|
|
910
|
-
Se,
|
|
911
|
-
{
|
|
912
|
-
align: "left",
|
|
913
|
-
noBorder: !0,
|
|
914
|
-
className: re([Qe.navigationButton, { [Qe.active]: S }]),
|
|
915
|
-
noShadow: !0,
|
|
916
|
-
disabled: S || u,
|
|
917
|
-
onClick: g,
|
|
918
|
-
children: i
|
|
919
|
-
}
|
|
920
|
-
);
|
|
921
|
-
}
|
|
922
|
-
const dn = "_applications_1pwbq_1", fn = "_applications-header_1pwbq_7", pn = "_applications-header-brand_1pwbq_13", vn = "_applications-header-logo_1pwbq_21", _n = "_applications-header-close-icon_1pwbq_26", mn = "_applications-header-change-brand-button_1pwbq_32", hn = "_applications-main_1pwbq_47", gn = "_applications-main-content_1pwbq_51", En = "_applications-main-list_1pwbq_58", wn = "_applications-main-user_1pwbq_74", bn = "_applications-main-user-name_1pwbq_81", Tn = "_applications-main-user-email_1pwbq_82", Sn = "_applications-footer_1pwbq_101", xn = "_applications-footer-sign-out_1pwbq_109", Rn = "_applications-footer-sign-out-icon_1pwbq_115", Nn = "_applications-footer-sign-out-label_1pwbq_119", Cn = "_error-anim_1pwbq_161", In = "_error-text_1pwbq_169", T = {
|
|
923
|
-
applications: dn,
|
|
924
|
-
applicationsHeader: fn,
|
|
925
|
-
applicationsHeaderBrand: pn,
|
|
926
|
-
applicationsHeaderLogo: vn,
|
|
927
|
-
applicationsHeaderCloseIcon: _n,
|
|
928
|
-
applicationsHeaderChangeBrandButton: mn,
|
|
929
|
-
applicationsMain: hn,
|
|
930
|
-
applicationsMainContent: gn,
|
|
931
|
-
applicationsMainList: En,
|
|
932
|
-
applicationsMainUser: wn,
|
|
933
|
-
applicationsMainUserName: bn,
|
|
934
|
-
applicationsMainUserEmail: Tn,
|
|
935
|
-
applicationsFooter: Sn,
|
|
936
|
-
applicationsFooterSignOut: xn,
|
|
937
|
-
applicationsFooterSignOutIcon: Rn,
|
|
938
|
-
applicationsFooterSignOutLabel: Nn,
|
|
939
|
-
errorAnim: Cn,
|
|
940
|
-
errorText: In
|
|
941
|
-
}, yn = (i) => new Promise((a) => setTimeout(a, i));
|
|
942
|
-
function jn() {
|
|
943
|
-
const { user: i } = X(tt), {
|
|
944
|
-
signOut: a,
|
|
945
|
-
onNavigationClose: p,
|
|
946
|
-
toggleTenants: u,
|
|
947
|
-
hasShowroomAccess: d,
|
|
948
|
-
hasMarketingEngineAccess: c,
|
|
949
|
-
hasSendoutsAccess: b,
|
|
950
|
-
hasCmsAccess: o,
|
|
951
|
-
hasUserManagementAccess: m,
|
|
952
|
-
hasSettingsAccess: x,
|
|
953
|
-
hasUniversalAccess: g,
|
|
954
|
-
hasInstoreAccess: S,
|
|
955
|
-
tenantServiceUrl: R
|
|
956
|
-
} = V(), j = tn(), L = j && !!j.planName, [U, B] = le(!1), [C, h] = le(!1), H = Qt(R), Y = K(
|
|
957
|
-
async (J) => {
|
|
958
|
-
try {
|
|
959
|
-
h(!0);
|
|
960
|
-
const A = await H(window.location.pathname);
|
|
961
|
-
J(!0), window.location.assign(A.text);
|
|
962
|
-
} catch {
|
|
963
|
-
h(!1), B(!0), await yn(2500), B(!1);
|
|
964
|
-
}
|
|
965
|
-
},
|
|
966
|
-
[h, H]
|
|
967
|
-
);
|
|
968
|
-
return /* @__PURE__ */ r.jsx(
|
|
969
|
-
at,
|
|
970
|
-
{
|
|
971
|
-
className: T.applications,
|
|
972
|
-
width: Vt,
|
|
973
|
-
showHeaderBorder: !0,
|
|
974
|
-
header: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsHeader, children: [
|
|
975
|
-
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsHeaderBrand, children: [
|
|
976
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsHeaderLogo, children: /* @__PURE__ */ r.jsx(nn, {}) }),
|
|
977
|
-
/* @__PURE__ */ r.jsx(
|
|
978
|
-
"div",
|
|
979
|
-
{
|
|
980
|
-
className: T.applicationsHeaderCloseIcon,
|
|
981
|
-
onClick: p,
|
|
982
|
-
children: /* @__PURE__ */ r.jsx(ne, { src: Kt, size: "large" })
|
|
983
|
-
}
|
|
984
|
-
)
|
|
985
|
-
] }),
|
|
986
|
-
/* @__PURE__ */ r.jsx(
|
|
987
|
-
Se,
|
|
988
|
-
{
|
|
989
|
-
align: "left",
|
|
990
|
-
noBorder: !0,
|
|
991
|
-
transparent: !0,
|
|
992
|
-
className: T.applicationsHeaderChangeBrandButton,
|
|
993
|
-
onClick: u,
|
|
994
|
-
children: "Change brand"
|
|
995
|
-
}
|
|
996
|
-
)
|
|
997
|
-
] }),
|
|
998
|
-
footer: /* @__PURE__ */ r.jsx("div", { className: T.applicationsFooter, onClick: a, children: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsFooterSignOut, children: [
|
|
999
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsFooterSignOutIcon, children: /* @__PURE__ */ r.jsx(ne, { src: Xt, size: "medium" }) }),
|
|
1000
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsFooterSignOutLabel, children: "Sign out" })
|
|
1001
|
-
] }) }),
|
|
1002
|
-
children: /* @__PURE__ */ r.jsx("div", { className: T.applicationsMain, children: /* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainContent, children: [
|
|
1003
|
-
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainList, children: [
|
|
1004
|
-
/* @__PURE__ */ r.jsx(O, { to: D.DASHBOARD, children: "Dashboard" }),
|
|
1005
|
-
/* @__PURE__ */ r.jsx(O, { hidden: !d, to: D.SHOWROOM, children: "Presentations (Showroom)" }),
|
|
1006
|
-
/* @__PURE__ */ r.jsx(O, { hidden: !b, to: D.SENDOUTS, children: "Sendouts" }),
|
|
1007
|
-
/* @__PURE__ */ r.jsx(
|
|
1008
|
-
O,
|
|
1009
|
-
{
|
|
1010
|
-
hidden: !c,
|
|
1011
|
-
to: D.MARKETING_ENGINE,
|
|
1012
|
-
children: "Media Library"
|
|
1013
|
-
}
|
|
1014
|
-
),
|
|
1015
|
-
/* @__PURE__ */ r.jsx(
|
|
1016
|
-
O,
|
|
1017
|
-
{
|
|
1018
|
-
hidden: !S && !g,
|
|
1019
|
-
to: D.INSTORE_ADMIN,
|
|
1020
|
-
children: "Stores"
|
|
1021
|
-
}
|
|
1022
|
-
),
|
|
1023
|
-
/* @__PURE__ */ r.jsx(O, { hidden: !o, to: D.CMS, children: "Content Manager" }),
|
|
1024
|
-
/* @__PURE__ */ r.jsx(
|
|
1025
|
-
O,
|
|
1026
|
-
{
|
|
1027
|
-
hidden: !m,
|
|
1028
|
-
to: D.USER_MANAGEMENT,
|
|
1029
|
-
children: "Users"
|
|
1030
|
-
}
|
|
1031
|
-
),
|
|
1032
|
-
/* @__PURE__ */ r.jsx(
|
|
1033
|
-
O,
|
|
1034
|
-
{
|
|
1035
|
-
hidden: !g && !x,
|
|
1036
|
-
to: D.SETTINGS,
|
|
1037
|
-
children: "Settings"
|
|
1038
|
-
}
|
|
1039
|
-
),
|
|
1040
|
-
/* @__PURE__ */ r.jsxs(
|
|
1041
|
-
O,
|
|
1042
|
-
{
|
|
1043
|
-
disabled: C,
|
|
1044
|
-
onClick: Y,
|
|
1045
|
-
hidden: !g || !L,
|
|
1046
|
-
to: "#",
|
|
1047
|
-
children: [
|
|
1048
|
-
/* @__PURE__ */ r.jsx(
|
|
1049
|
-
"span",
|
|
1050
|
-
{
|
|
1051
|
-
className: re({
|
|
1052
|
-
[T.errorAnim]: U
|
|
1053
|
-
}),
|
|
1054
|
-
children: "Subscription"
|
|
1055
|
-
}
|
|
1056
|
-
),
|
|
1057
|
-
C ? /* @__PURE__ */ r.jsx(ne, { size: "xlarge", src: Jt, alt: "Loading" }) : ""
|
|
1058
|
-
]
|
|
1059
|
-
}
|
|
1060
|
-
),
|
|
1061
|
-
U ? /* @__PURE__ */ r.jsx("p", { className: T.errorText, children: "Unable to access subscription page" }) : null
|
|
1062
|
-
] }),
|
|
1063
|
-
i && /* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainUser, children: [
|
|
1064
|
-
/* @__PURE__ */ r.jsxs("div", { className: T.applicationsMainUserName, children: [
|
|
1065
|
-
i.firstName,
|
|
1066
|
-
" ",
|
|
1067
|
-
i.lastName
|
|
1068
|
-
] }),
|
|
1069
|
-
/* @__PURE__ */ r.jsx("div", { className: T.applicationsMainUserEmail, children: i.email })
|
|
1070
|
-
] })
|
|
1071
|
-
] }) })
|
|
1072
|
-
}
|
|
1073
|
-
);
|
|
1074
|
-
}
|
|
1075
|
-
const An = "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.00170906%207L13.0017%207M6.50171%2013.5L6.50171%200.5'%20stroke='%232D2D33'/%3e%3c/svg%3e", Pn = "data:image/svg+xml,%3csvg%20width='22'%20height='14'%20viewBox='0%200%2022%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.6001%207.00039L8.0001%2013.4004M1.6001%207.00039L8.0001%200.600391M1.6001%207.00039L21.6001%207.00039'%20stroke='%23262626'/%3e%3c/svg%3e", On = "_tenant-button_1m8mx_1", Dn = "_active_1m8mx_15", et = {
|
|
1076
|
-
tenantButton: On,
|
|
1077
|
-
active: Dn
|
|
1078
|
-
};
|
|
1079
|
-
function Mn({ tenant: i }) {
|
|
1080
|
-
const {
|
|
1081
|
-
viewState: { selectedTenantId: a },
|
|
1082
|
-
updateViewState: p
|
|
1083
|
-
} = V(), u = a === i.id;
|
|
1084
|
-
return /* @__PURE__ */ r.jsx(
|
|
1085
|
-
Se,
|
|
1086
|
-
{
|
|
1087
|
-
align: "left",
|
|
1088
|
-
noBorder: !0,
|
|
1089
|
-
className: re([et.tenantButton, { [et.active]: u }]),
|
|
1090
|
-
noShadow: !0,
|
|
1091
|
-
disabled: u,
|
|
1092
|
-
onClick: () => {
|
|
1093
|
-
p({
|
|
1094
|
-
selectedTenantId: i.id,
|
|
1095
|
-
currentPosition: F.OPEN
|
|
1096
|
-
});
|
|
1097
|
-
},
|
|
1098
|
-
children: i.label
|
|
1099
|
-
},
|
|
1100
|
-
i.id
|
|
1101
|
-
);
|
|
1102
|
-
}
|
|
1103
|
-
const kn = "_tenants_6vjyd_1", Fn = "_tenants-header_6vjyd_7", Ln = "_tenants-header-arrow-icon_6vjyd_11", Un = "_tenants-main_6vjyd_24", Bn = "_tenants-footer_6vjyd_42", Hn = "_tenants-footer-create-brand_6vjyd_50", $n = "_tenants-footer-create-brand-icon_6vjyd_56", Wn = "_tenants-footer-create-brand-label_6vjyd_60", k = {
|
|
1104
|
-
tenants: kn,
|
|
1105
|
-
tenantsHeader: Fn,
|
|
1106
|
-
tenantsHeaderArrowIcon: Ln,
|
|
1107
|
-
tenantsMain: Un,
|
|
1108
|
-
tenantsFooter: Bn,
|
|
1109
|
-
tenantsFooterCreateBrand: Hn,
|
|
1110
|
-
tenantsFooterCreateBrandIcon: $n,
|
|
1111
|
-
tenantsFooterCreateBrandLabel: Wn
|
|
1112
|
-
};
|
|
1113
|
-
function qn() {
|
|
1114
|
-
const { toggleTenants: i, tenantServiceUrl: a } = V(), { tenants: p } = Re(a);
|
|
1115
|
-
return /* @__PURE__ */ r.jsx("div", { className: k.tenants, children: /* @__PURE__ */ r.jsx(
|
|
1116
|
-
at,
|
|
1117
|
-
{
|
|
1118
|
-
width: qt,
|
|
1119
|
-
header: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeader, children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsHeaderArrowIcon, onClick: i, children: /* @__PURE__ */ r.jsx(ne, { src: Pn, size: "large" }) }) }),
|
|
1120
|
-
footer: /* @__PURE__ */ r.jsx(
|
|
1121
|
-
"div",
|
|
1122
|
-
{
|
|
1123
|
-
className: k.tenantsFooter,
|
|
1124
|
-
onClick: () => window.location.assign(D.CREATE_WORKSPACE),
|
|
1125
|
-
children: /* @__PURE__ */ r.jsxs("div", { className: k.tenantsFooterCreateBrand, children: [
|
|
1126
|
-
/* @__PURE__ */ r.jsx("div", { className: k.tenantsFooterCreateBrandIcon, children: /* @__PURE__ */ r.jsx(ne, { src: An, size: "medium" }) }),
|
|
1127
|
-
/* @__PURE__ */ r.jsx("div", { className: k.tenantsFooterCreateBrandLabel, children: "Create a brand workspace" })
|
|
1128
|
-
] })
|
|
1129
|
-
}
|
|
1130
|
-
),
|
|
1131
|
-
children: /* @__PURE__ */ r.jsx("div", { className: k.tenantsMain, children: p.map((u) => /* @__PURE__ */ r.jsx(Mn, { tenant: u }, u.id)) })
|
|
1132
|
-
}
|
|
1133
|
-
) });
|
|
1134
|
-
}
|
|
1135
|
-
const Vn = "_tiers_dtxbu_1", Yn = {
|
|
1136
|
-
tiers: Vn
|
|
1137
|
-
};
|
|
1138
|
-
function Gn() {
|
|
1139
|
-
return /* @__PURE__ */ r.jsxs("div", { className: Yn.tiers, children: [
|
|
1140
|
-
/* @__PURE__ */ r.jsx(jn, {}),
|
|
1141
|
-
/* @__PURE__ */ r.jsx(qn, {})
|
|
1142
|
-
] });
|
|
1143
|
-
}
|
|
1144
|
-
const ge = { ease: "easeOut", duration: 0.3 }, zn = {
|
|
1145
|
-
[F.HIDDEN]: {
|
|
1146
|
-
left: -600,
|
|
1147
|
-
transition: ge
|
|
1148
|
-
},
|
|
1149
|
-
[F.OPEN]: {
|
|
1150
|
-
left: -300,
|
|
1151
|
-
transition: ge
|
|
1152
|
-
},
|
|
1153
|
-
[F.EXPANDED]: { left: 0, transition: ge }
|
|
1154
|
-
};
|
|
1155
|
-
function Kn({
|
|
1156
|
-
isOpen: i,
|
|
1157
|
-
portalContainer: a = document.body,
|
|
1158
|
-
onClose: p,
|
|
1159
|
-
tenantServiceUrl: u
|
|
1160
|
-
}) {
|
|
1161
|
-
return (
|
|
1162
|
-
// Using framer-motion lib to animate the navigation component on mount/unmount
|
|
1163
|
-
// Also to prevent any api calls from being made when the navigation (Tiers component) is hidden
|
|
1164
|
-
/* @__PURE__ */ r.jsx(
|
|
1165
|
-
Yt,
|
|
1166
|
-
{
|
|
1167
|
-
onNavigationClose: p,
|
|
1168
|
-
isOpen: i,
|
|
1169
|
-
tenantServiceUrl: u,
|
|
1170
|
-
children: /* @__PURE__ */ r.jsx(xe.Consumer, { children: ({ viewState: { currentPosition: d } }) => kt(
|
|
1171
|
-
/* @__PURE__ */ r.jsx(Dt, { children: d !== F.HIDDEN && /* @__PURE__ */ r.jsx(
|
|
1172
|
-
Mt.div,
|
|
1173
|
-
{
|
|
1174
|
-
className: zt.navigation,
|
|
1175
|
-
initial: F.HIDDEN,
|
|
1176
|
-
variants: zn,
|
|
1177
|
-
animate: d,
|
|
1178
|
-
exit: F.HIDDEN,
|
|
1179
|
-
children: /* @__PURE__ */ r.jsx(Gn, {})
|
|
1180
|
-
}
|
|
1181
|
-
) }),
|
|
1182
|
-
a
|
|
1183
|
-
) })
|
|
1184
|
-
}
|
|
1185
|
-
)
|
|
1186
|
-
);
|
|
1187
|
-
}
|
|
1188
|
-
const Xn = "data:image/svg+xml,%3csvg%20width='14'%20height='15'%20viewBox='0%200%2014%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%201.5H14M0%205.5H14M0%209.5H14M0'%20stroke='black'/%3e%3c/svg%3e";
|
|
1189
|
-
function cr({
|
|
1190
|
-
size: i = "medium",
|
|
1191
|
-
alt: a = "Toggle navigation menu",
|
|
1192
|
-
src: p = Xn,
|
|
1193
|
-
portalContainer: u = document.body,
|
|
1194
|
-
tenantServiceUrl: d,
|
|
1195
|
-
...c
|
|
1196
|
-
}) {
|
|
1197
|
-
const [b, o] = Ht(!1);
|
|
1198
|
-
return /* @__PURE__ */ r.jsxs(Ot, { children: [
|
|
1199
|
-
/* @__PURE__ */ r.jsx(
|
|
1200
|
-
Lt,
|
|
1201
|
-
{
|
|
1202
|
-
size: i,
|
|
1203
|
-
alt: a,
|
|
1204
|
-
src: p,
|
|
1205
|
-
onClick: () => o(),
|
|
1206
|
-
...c
|
|
1207
|
-
}
|
|
1208
|
-
),
|
|
1209
|
-
/* @__PURE__ */ r.jsx(
|
|
1210
|
-
Kn,
|
|
1211
|
-
{
|
|
1212
|
-
isOpen: b,
|
|
1213
|
-
portalContainer: u,
|
|
1214
|
-
onClose: () => o(),
|
|
1215
|
-
tenantServiceUrl: d
|
|
1216
|
-
}
|
|
1217
|
-
)
|
|
1218
|
-
] });
|
|
1219
|
-
}
|
|
1220
|
-
export {
|
|
1221
|
-
Vt as APPLICATIONS_TIER_WIDTH,
|
|
1222
|
-
D as AppPaths,
|
|
1223
|
-
Kn as Navigation,
|
|
1224
|
-
cr as NavigationButton,
|
|
1225
|
-
qt as TENANTS_TIER_WIDTH
|
|
1226
|
-
};
|
|
1227
|
-
//# sourceMappingURL=index.mjs.map
|