@telia-ace/widget-runtime-flamingo 1.0.15 → 1.0.32
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/component-platform-factory.d.ts → component-platform-factory.d.ts} +0 -1
- package/{dist/context → context}/children.context.d.ts +0 -1
- package/{dist/context → context}/component-node.context.d.ts +0 -1
- package/{dist/context → context}/container.context.d.ts +0 -1
- package/{dist/context → context}/context.context.d.ts +0 -1
- package/{dist/context → context}/layout.context.d.ts +0 -1
- package/{dist/context → context}/properties.context.d.ts +0 -1
- package/{dist/controllers → controllers}/actions-controller.d.ts +0 -1
- package/{dist/core → core}/create-lit-component.d.ts +0 -1
- package/{dist/core → core}/get-render-state.d.ts +0 -1
- package/{dist/data-provider → data-provider}/data-provider.d.ts +0 -1
- package/{dist/data-provider → data-provider}/providers/guide-provider.plugin.d.ts +0 -1
- package/{dist/index-9688347a.js → index-5087564d.mjs} +1 -2
- package/index-6dd00f59.js +1 -0
- package/index-7a734709.mjs +3405 -0
- package/index-c94328c7.js +206 -0
- package/{dist/index.d.ts → index.d.ts} +0 -1
- package/index.js +1 -0
- package/{dist/index.js → index.mjs} +1 -2
- package/{dist/mixins → mixins}/widget-component.mixin.d.ts +0 -1
- package/package.json +10 -49
- package/render-42bea194.js +118 -0
- package/{dist/render-416c8c88.js → render-ad873416.mjs} +153 -160
- package/{dist/services.d.ts → services.d.ts} +0 -2
- package/{dist/ui → ui}/area.d.ts +0 -1
- package/{dist/ui → ui}/branding.d.ts +0 -1
- package/{dist/ui → ui}/get-css-props.d.ts +0 -1
- package/{dist/ui → ui}/get-layout-props.d.ts +0 -1
- package/{dist/ui → ui}/html-element-handlers.d.ts +0 -1
- package/{dist/ui → ui}/prepare-dom.d.ts +2 -2
- package/{dist/ui → ui}/render.d.ts +0 -2
- package/{dist/ui → ui}/trigger-component.d.ts +4 -2
- package/{dist/ui → ui}/view-outlet.d.ts +5 -2
- package/{dist/ui → ui}/wrapper.d.ts +0 -1
- package/{dist/widget.d.ts → widget.d.ts} +0 -1
- package/LICENSE.txt +0 -6
- package/README.md +0 -3
- package/dist/component-platform-factory.d.ts.map +0 -1
- package/dist/context/children.context.d.ts.map +0 -1
- package/dist/context/component-node.context.d.ts.map +0 -1
- package/dist/context/container.context.d.ts.map +0 -1
- package/dist/context/context.context.d.ts.map +0 -1
- package/dist/context/layout.context.d.ts.map +0 -1
- package/dist/context/properties.context.d.ts.map +0 -1
- package/dist/controllers/actions-controller.d.ts.map +0 -1
- package/dist/core/create-lit-component.d.ts.map +0 -1
- package/dist/core/get-render-state.d.ts.map +0 -1
- package/dist/data-provider/data-provider.d.ts.map +0 -1
- package/dist/data-provider/providers/guide-provider.plugin.d.ts.map +0 -1
- package/dist/index-79b338f7.js +0 -4870
- package/dist/index-79b338f7.js.map +0 -1
- package/dist/index-9688347a.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mixins/widget-component.mixin.d.ts.map +0 -1
- package/dist/render-416c8c88.js.map +0 -1
- package/dist/services.d.ts.map +0 -1
- package/dist/ui/area.d.ts.map +0 -1
- package/dist/ui/branding.d.ts.map +0 -1
- package/dist/ui/get-css-props.d.ts.map +0 -1
- package/dist/ui/get-layout-props.d.ts.map +0 -1
- package/dist/ui/html-element-handlers.d.ts.map +0 -1
- package/dist/ui/index.d.ts +0 -2
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/prepare-dom.d.ts.map +0 -1
- package/dist/ui/render.d.ts.map +0 -1
- package/dist/ui/trigger-component.d.ts.map +0 -1
- package/dist/ui/view-outlet.d.ts.map +0 -1
- package/dist/ui/wrapper.d.ts.map +0 -1
- package/dist/widget.d.ts.map +0 -1
package/dist/index-79b338f7.js
DELETED
|
@@ -1,4870 +0,0 @@
|
|
|
1
|
-
var qr = Object.defineProperty, Jr = Object.defineProperties;
|
|
2
|
-
var Kr = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var un = Object.getOwnPropertySymbols, Gr = Object.getPrototypeOf, Yr = Object.prototype.hasOwnProperty, Zr = Object.prototype.propertyIsEnumerable, Qr = Reflect.get;
|
|
4
|
-
var dn = (n, t, e) => t in n ? qr(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, tt = (n, t) => {
|
|
5
|
-
for (var e in t || (t = {}))
|
|
6
|
-
Yr.call(t, e) && dn(n, e, t[e]);
|
|
7
|
-
if (un)
|
|
8
|
-
for (var e of un(t))
|
|
9
|
-
Zr.call(t, e) && dn(n, e, t[e]);
|
|
10
|
-
return n;
|
|
11
|
-
}, Mt = (n, t) => Jr(n, Kr(t));
|
|
12
|
-
var pn = (n, t, e) => Qr(Gr(n), e, t);
|
|
13
|
-
var B = (n, t, e) => new Promise((r, s) => {
|
|
14
|
-
var i = (c) => {
|
|
15
|
-
try {
|
|
16
|
-
a(e.next(c));
|
|
17
|
-
} catch (h) {
|
|
18
|
-
s(h);
|
|
19
|
-
}
|
|
20
|
-
}, o = (c) => {
|
|
21
|
-
try {
|
|
22
|
-
a(e.throw(c));
|
|
23
|
-
} catch (h) {
|
|
24
|
-
s(h);
|
|
25
|
-
}
|
|
26
|
-
}, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, o);
|
|
27
|
-
a((e = e.apply(n, t)).next());
|
|
28
|
-
});
|
|
29
|
-
const Pe = (n, t, e, ...r) => {
|
|
30
|
-
const s = `[${n.get("$environment").name || "webprovisions"}] ${e}`;
|
|
31
|
-
switch (t) {
|
|
32
|
-
case "info":
|
|
33
|
-
console.info(s, ...r);
|
|
34
|
-
break;
|
|
35
|
-
case "warning":
|
|
36
|
-
console.warn(s, ...r);
|
|
37
|
-
break;
|
|
38
|
-
case "error":
|
|
39
|
-
console.error(s, ...r);
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}, Xr = (n) => {
|
|
43
|
-
const t = n.container || n;
|
|
44
|
-
return {
|
|
45
|
-
info: (e, ...r) => Pe(t, "info", e, ...r),
|
|
46
|
-
warn: (e, ...r) => Pe(t, "warning", e, ...r),
|
|
47
|
-
error: (e, ...r) => Pe(t, "error", e, ...r)
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
var he = /* @__PURE__ */ ((n) => (n.Implementation = "implementation", n.Widget = "widget", n))(he || {}), mt = /* @__PURE__ */ ((n) => (n.Pre = "pre", n.Post = "post", n))(mt || {});
|
|
51
|
-
const ts = (n, t, e, r) => {
|
|
52
|
-
try {
|
|
53
|
-
const s = new t(e, r);
|
|
54
|
-
return {
|
|
55
|
-
name: n,
|
|
56
|
-
invoke: (i, o) => {
|
|
57
|
-
let a;
|
|
58
|
-
return s[i] && (a = s[i].call(s, o)), Promise.resolve(a);
|
|
59
|
-
},
|
|
60
|
-
getInstance: () => s
|
|
61
|
-
};
|
|
62
|
-
} catch (s) {
|
|
63
|
-
if (s.message && s.message.indexOf("is not a constructor") >= 0)
|
|
64
|
-
return {
|
|
65
|
-
name: n,
|
|
66
|
-
invoke: (i) => {
|
|
67
|
-
let o;
|
|
68
|
-
return i === "initialize" && (o = t(e, r)), Promise.resolve(o);
|
|
69
|
-
},
|
|
70
|
-
getInstance: () => t
|
|
71
|
-
};
|
|
72
|
-
throw s;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
function gn(n, t) {
|
|
76
|
-
return typeof n == "undefined" ? t : n;
|
|
77
|
-
}
|
|
78
|
-
let es = class {
|
|
79
|
-
constructor(t = {}) {
|
|
80
|
-
this.part = t;
|
|
81
|
-
}
|
|
82
|
-
createCommand(t, e, r) {
|
|
83
|
-
let s;
|
|
84
|
-
typeof e == "function" ? s = {
|
|
85
|
-
scope: he.Widget,
|
|
86
|
-
stage: mt.Post,
|
|
87
|
-
defaultArgs: void 0,
|
|
88
|
-
handlerResolver: e
|
|
89
|
-
} : s = {
|
|
90
|
-
scope: gn(e.scope, he.Widget),
|
|
91
|
-
stage: gn(e.stage, mt.Post),
|
|
92
|
-
defaultArgs: e.defaultArgs,
|
|
93
|
-
handlerResolver: r
|
|
94
|
-
};
|
|
95
|
-
let i = this.part;
|
|
96
|
-
const o = t.split(".");
|
|
97
|
-
return o.forEach((a, c) => {
|
|
98
|
-
c === o.length - 1 ? i[a] || (i[a] = () => s) : i = this.part[a] = this.part[a] || {};
|
|
99
|
-
}), this;
|
|
100
|
-
}
|
|
101
|
-
get() {
|
|
102
|
-
return this.part;
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
const Xe = (n) => {
|
|
106
|
-
const t = new es({});
|
|
107
|
-
return n(t), t.get();
|
|
108
|
-
};
|
|
109
|
-
Xe((n) => {
|
|
110
|
-
n.createCommand(
|
|
111
|
-
"types.register",
|
|
112
|
-
{ scope: he.Implementation, stage: mt.Pre },
|
|
113
|
-
(t) => (e, r) => {
|
|
114
|
-
t.container.get("$types")[e] = r;
|
|
115
|
-
}
|
|
116
|
-
).createCommand(
|
|
117
|
-
"type",
|
|
118
|
-
{ stage: mt.Pre },
|
|
119
|
-
(t) => (e) => {
|
|
120
|
-
t.container.register("$type", e);
|
|
121
|
-
}
|
|
122
|
-
).createCommand(
|
|
123
|
-
"settings",
|
|
124
|
-
{ stage: mt.Pre, defaultArgs: [null] },
|
|
125
|
-
(t) => (e) => {
|
|
126
|
-
t.events.dispatch(
|
|
127
|
-
"settings:change",
|
|
128
|
-
e,
|
|
129
|
-
{ bubbles: !0 }
|
|
130
|
-
), t.container.register("$settings", e);
|
|
131
|
-
}
|
|
132
|
-
).createCommand(
|
|
133
|
-
"plugin",
|
|
134
|
-
{ stage: mt.Pre },
|
|
135
|
-
(t) => (e, r, s) => {
|
|
136
|
-
const { container: i } = t;
|
|
137
|
-
let o = null, a = e, c = r;
|
|
138
|
-
typeof e == "string" && (o = e, a = r, c = s);
|
|
139
|
-
const h = (l) => {
|
|
140
|
-
const { transformPluginSettings: u } = t.container.get("$environmentOptions"), d = u ? u(
|
|
141
|
-
c || {},
|
|
142
|
-
o,
|
|
143
|
-
t.container,
|
|
144
|
-
a
|
|
145
|
-
) : r;
|
|
146
|
-
try {
|
|
147
|
-
const p = ts(
|
|
148
|
-
o,
|
|
149
|
-
a,
|
|
150
|
-
i,
|
|
151
|
-
d
|
|
152
|
-
);
|
|
153
|
-
i.get("$plugins").push(p), l && p.invoke("initialize", null);
|
|
154
|
-
} catch (p) {
|
|
155
|
-
Xr(t).warn("Error when initializing plugin", p);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
t.container.get("$instance") ? h(!0) : t.events.subscribeOnce("widget:instance-created", () => h(!1));
|
|
159
|
-
}
|
|
160
|
-
).createCommand(
|
|
161
|
-
"container.register",
|
|
162
|
-
(t) => (e, r) => {
|
|
163
|
-
t.container.register(e, r);
|
|
164
|
-
}
|
|
165
|
-
).createCommand(
|
|
166
|
-
"container.registerAsync",
|
|
167
|
-
(t) => (e, r) => {
|
|
168
|
-
t.container.registerAsync(e, r);
|
|
169
|
-
}
|
|
170
|
-
).createCommand(
|
|
171
|
-
"container.registerFactory",
|
|
172
|
-
(t) => (e, r) => {
|
|
173
|
-
t.container.registerFactory(e, r);
|
|
174
|
-
}
|
|
175
|
-
).createCommand(
|
|
176
|
-
"container.touch",
|
|
177
|
-
(t) => (e, r) => {
|
|
178
|
-
t.container.touch(e, r);
|
|
179
|
-
}
|
|
180
|
-
).createCommand(
|
|
181
|
-
"csp",
|
|
182
|
-
{},
|
|
183
|
-
(t) => (e) => {
|
|
184
|
-
t.container.register("csp", e);
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
});
|
|
188
|
-
var nr = /* @__PURE__ */ ((n) => (n.Activating = "activating", n.Loading = "loading", n.Activated = "activated", n.Deactivating = "deactivating", n.Deactivated = "deactivated", n))(nr || {});
|
|
189
|
-
let ns = class {
|
|
190
|
-
/**
|
|
191
|
-
* Creates a new `Widget` instance.
|
|
192
|
-
* @param container The `Container` instance to base the widget upon.
|
|
193
|
-
*/
|
|
194
|
-
constructor(t) {
|
|
195
|
-
this.container = t, this.widget = t.get("$widget"), this.settings = t.get("$settings"), this.events = this.widget.events, this.widget.events.subscribe("settings:change", (e, r) => {
|
|
196
|
-
this.settings = r;
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
var fn = Object.getOwnPropertySymbols, rs = Object.prototype.hasOwnProperty, ss = Object.prototype.propertyIsEnumerable, is = (n, t) => {
|
|
201
|
-
var e = {};
|
|
202
|
-
for (var r in n)
|
|
203
|
-
rs.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
|
|
204
|
-
if (n != null && fn)
|
|
205
|
-
for (var r of fn(n))
|
|
206
|
-
t.indexOf(r) < 0 && ss.call(n, r) && (e[r] = n[r]);
|
|
207
|
-
return e;
|
|
208
|
-
};
|
|
209
|
-
function os(n = {}) {
|
|
210
|
-
const t = n, {
|
|
211
|
-
phrase: e = "",
|
|
212
|
-
category: r,
|
|
213
|
-
guideCategory: s,
|
|
214
|
-
contactCategory: i,
|
|
215
|
-
take: o,
|
|
216
|
-
connectionKey: a,
|
|
217
|
-
accordion: c,
|
|
218
|
-
id: h,
|
|
219
|
-
uriName: l,
|
|
220
|
-
sorting: u,
|
|
221
|
-
tag: d,
|
|
222
|
-
tagId: p,
|
|
223
|
-
tagTitle: b
|
|
224
|
-
} = t, v = is(t, [
|
|
225
|
-
"phrase",
|
|
226
|
-
"category",
|
|
227
|
-
"guideCategory",
|
|
228
|
-
"contactCategory",
|
|
229
|
-
"take",
|
|
230
|
-
"connectionKey",
|
|
231
|
-
"accordion",
|
|
232
|
-
"id",
|
|
233
|
-
"uriName",
|
|
234
|
-
"sorting",
|
|
235
|
-
"tag",
|
|
236
|
-
"tagId",
|
|
237
|
-
"tagTitle"
|
|
238
|
-
]), g = {};
|
|
239
|
-
return Object.keys(v).forEach((E) => {
|
|
240
|
-
typeof n[E] == "string" && (g[E] = n[E]);
|
|
241
|
-
}), typeof e == "string" && e.length && (g.phrase = e), e === null && (g.phrase = e), typeof s == "string" && s !== "0" && (g.guideCategory = s), typeof s == "number" && s !== 0 && (g.guideCategory = s), typeof s == "object" && s !== null && (typeof s.id == "string" && s.id !== "0" && (g.guideCategory = s.id), typeof s.id == "number" && s.id !== 0 && (g.guideCategory = s.id)), typeof i == "string" && i !== "0" && (g.contactCategory = i), typeof i == "number" && i !== 0 && (g.contactCategory = i), typeof i == "object" && i !== null && (typeof i.id == "string" && i.id !== "0" && (g.contactCategory = i.id), typeof i.id == "number" && i.id !== 0 && (g.contactCategory = i.id)), typeof r == "string" && r !== "0" && (g.category = r), typeof r == "number" && r !== 0 && (g.category = r), typeof r == "object" && r !== null && (typeof r.id == "string" && r.id !== "0" && (g.category = r.id), typeof r.id == "number" && r.id !== 0 && (g.category = r.id)), h && (g.id = h), l && (+g.category || +g.guideCategory || +g.guide || +g.contactCategory || +g.contactMethod) && (g.uriName = l), a && (g.connectionKey = a), o && (g.take = o), u && (g.sorting = u), typeof c == "string" && c.length > 0 && (g.accordion = c), typeof d == "string" && d !== "0" && (g.tag = d), typeof d == "number" && d !== 0 && (g.tag = d), Array.isArray(d) && d.length && (g.tag = d), (typeof p == "string" || typeof p == "number") && (g.tagId = p), typeof b == "string" && (g.tagTitle = b), typeof g.tag == "string" && (g.tag = g.tag.split(",")), g;
|
|
242
|
-
}
|
|
243
|
-
const be = (n, t, ...e) => typeof t == "string" ? n(`[humany] ${t}`, ...e) : n(t, ...e), Rt = class {
|
|
244
|
-
constructor() {
|
|
245
|
-
this.keys = [], this.log = (t, ...e) => this.lookup(t, () => Rt.log(...e)), this.warn = (t, ...e) => this.lookup(t, () => Rt.warn(...e)), this.error = (t, ...e) => this.lookup(t, () => Rt.error(...e)), this.info = (t, ...e) => this.lookup(t, () => Rt.info(...e));
|
|
246
|
-
}
|
|
247
|
-
lookup(t, e) {
|
|
248
|
-
this.keys.indexOf(t) === -1 && (this.keys.push(t), e());
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
let I = Rt;
|
|
252
|
-
I.log = (...n) => be(console.log, ...n);
|
|
253
|
-
I.warn = (...n) => be(console.warn, ...n);
|
|
254
|
-
I.error = (...n) => be(console.error, ...n);
|
|
255
|
-
I.info = (...n) => be(console.info, ...n);
|
|
256
|
-
const rr = (n) => {
|
|
257
|
-
let t = {}, e, r;
|
|
258
|
-
if (typeof n != "object" || n === null)
|
|
259
|
-
return n;
|
|
260
|
-
t = Array.isArray(n) ? [] : {};
|
|
261
|
-
for (r in n)
|
|
262
|
-
e = n[r], t[r] = typeof e == "object" && e !== null ? rr(e) : e;
|
|
263
|
-
return t;
|
|
264
|
-
}, as = rr;
|
|
265
|
-
function mn(n) {
|
|
266
|
-
let t = 0;
|
|
267
|
-
if (n.length === 0)
|
|
268
|
-
return t.toString();
|
|
269
|
-
for (let e = 0; e < n.length; e++) {
|
|
270
|
-
const r = n.charCodeAt(e);
|
|
271
|
-
t = (t << 5) - t + r, t = t & t;
|
|
272
|
-
}
|
|
273
|
-
return t.toString();
|
|
274
|
-
}
|
|
275
|
-
let cs = class {
|
|
276
|
-
constructor(t, e) {
|
|
277
|
-
this.lockWarningTime = t, this.lockErrorTime = e, this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
|
|
278
|
-
}
|
|
279
|
-
add(t, e, r, s) {
|
|
280
|
-
this.tasks.push({ task: t, resolve: e, reject: r, done: s }), this.next();
|
|
281
|
-
}
|
|
282
|
-
next() {
|
|
283
|
-
this.current = this.current.then(() => {
|
|
284
|
-
const t = this.tasks.shift();
|
|
285
|
-
if (t) {
|
|
286
|
-
let e;
|
|
287
|
-
const r = setTimeout(() => {
|
|
288
|
-
process.env.NODE_ENV !== "production" && I.warn(
|
|
289
|
-
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
290
|
-
t
|
|
291
|
-
), e = setTimeout(() => {
|
|
292
|
-
t.reject("lock timeout exceeded");
|
|
293
|
-
}, this.lockErrorTime);
|
|
294
|
-
}, this.lockWarningTime), s = Promise.resolve(t.task()).then((i) => (clearTimeout(r), clearTimeout(e), i));
|
|
295
|
-
return Promise.resolve(s).then(this.next).then(
|
|
296
|
-
() => s.then((i) => {
|
|
297
|
-
t.done(), t.resolve(i);
|
|
298
|
-
})
|
|
299
|
-
).catch((i) => (t.done(), t.reject(i), this.next()));
|
|
300
|
-
}
|
|
301
|
-
return Promise.resolve();
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
const Gt = /* @__PURE__ */ new WeakMap();
|
|
306
|
-
function X(n, t = 5e3, e = 1e3) {
|
|
307
|
-
return Gt.has(n) || Gt.set(n, new cs(t, e)), (r) => new Promise((s, i) => {
|
|
308
|
-
const o = Gt.get(n);
|
|
309
|
-
o.add(r, s, i, () => {
|
|
310
|
-
o.tasks.length || Gt.delete(n);
|
|
311
|
-
});
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
const hs = (n, t) => {
|
|
315
|
-
const e = () => t.querySelectorAll("[data-loading=true]").length > 0, r = (() => {
|
|
316
|
-
let s = !1;
|
|
317
|
-
return () => {
|
|
318
|
-
s || (n.get("$widget").events.dispatch("widget:data-loaded", {
|
|
319
|
-
element: t
|
|
320
|
-
}), s = !0);
|
|
321
|
-
};
|
|
322
|
-
})();
|
|
323
|
-
if (!e())
|
|
324
|
-
return r();
|
|
325
|
-
new MutationObserver((s, i) => {
|
|
326
|
-
s.find(
|
|
327
|
-
(o) => o.type === "attributes" && o.attributeName === "data-loading"
|
|
328
|
-
) && !e() && (i.disconnect(), r());
|
|
329
|
-
}).observe(t, {
|
|
330
|
-
attributes: !0,
|
|
331
|
-
childList: !0,
|
|
332
|
-
subtree: !0
|
|
333
|
-
});
|
|
334
|
-
}, ls = (n, t) => {
|
|
335
|
-
n.get("$widget").container.getAsync("components").then((e) => {
|
|
336
|
-
e.events.subscribeOnce("components:component-model-initialized", () => {
|
|
337
|
-
let r = e.nodes.visible.reduce(
|
|
338
|
-
(i, o) => (!o.name || !o.type || o.type === "view" || o.type === "root" || o.attributes.layout.size === "none" || t.querySelector(`[data-name="${o.name}"]`) || i.push(o.name), i),
|
|
339
|
-
[]
|
|
340
|
-
), s = !1;
|
|
341
|
-
new MutationObserver((i, o) => {
|
|
342
|
-
i.forEach((a) => {
|
|
343
|
-
if (a.addedNodes) {
|
|
344
|
-
const c = Array.from(
|
|
345
|
-
a.addedNodes
|
|
346
|
-
).reduce((h, l) => {
|
|
347
|
-
const u = l.getAttribute && l.getAttribute("data-name");
|
|
348
|
-
return u && r.indexOf(u) > -1 && h.push(u), h;
|
|
349
|
-
}, []);
|
|
350
|
-
r = r.filter((h) => c.indexOf(h) === -1), !s && r.length === 0 && (s = !0, hs(n, t), o.disconnect());
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}).observe(t, {
|
|
354
|
-
attributes: !1,
|
|
355
|
-
characterData: !1,
|
|
356
|
-
childList: !0,
|
|
357
|
-
subtree: !0,
|
|
358
|
-
attributeOldValue: !1,
|
|
359
|
-
characterDataOldValue: !1
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
});
|
|
363
|
-
}, us = ls, ds = (n = {}) => (Object.keys(n).forEach((t) => {
|
|
364
|
-
(n[t] === null || typeof n[t] == "undefined") && delete n[t];
|
|
365
|
-
}), n), $t = ds, vn = (n, t) => {
|
|
366
|
-
let e = !0;
|
|
367
|
-
return Object.keys(n).length !== Object.keys(t).length || Object.keys(n).some((r) => !Object.keys(t).some((s) => r === s)) ? !1 : (Object.keys(n).forEach((r) => {
|
|
368
|
-
if (e) {
|
|
369
|
-
const s = typeof n[r] == "undefined" ? "" : n[r], i = typeof t[r] == "undefined" ? "" : t[r];
|
|
370
|
-
e = s.toString() === i.toString();
|
|
371
|
-
}
|
|
372
|
-
}), e);
|
|
373
|
-
}, ot = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
374
|
-
function qt() {
|
|
375
|
-
return ot() + ot() + "-" + ot() + "-" + ot() + "-" + ot() + "-" + ot() + ot() + ot();
|
|
376
|
-
}
|
|
377
|
-
var ps = Object.defineProperty, gs = Object.defineProperties, fs = Object.getOwnPropertyDescriptors, yn = Object.getOwnPropertySymbols, ms = Object.prototype.hasOwnProperty, vs = Object.prototype.propertyIsEnumerable, bn = (n, t, e) => t in n ? ps(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, ys = (n, t) => {
|
|
378
|
-
for (var e in t || (t = {}))
|
|
379
|
-
ms.call(t, e) && bn(n, e, t[e]);
|
|
380
|
-
if (yn)
|
|
381
|
-
for (var e of yn(t))
|
|
382
|
-
vs.call(t, e) && bn(n, e, t[e]);
|
|
383
|
-
return n;
|
|
384
|
-
}, bs = (n, t) => gs(n, fs(t));
|
|
385
|
-
class ws {
|
|
386
|
-
constructor(t) {
|
|
387
|
-
const { events: e } = t.get("$widget");
|
|
388
|
-
this.events = e.createChild(this);
|
|
389
|
-
}
|
|
390
|
-
action(t, e, r) {
|
|
391
|
-
this.events.dispatch("data:action", { action: e, value: r, target: t }, { bubbles: !0 });
|
|
392
|
-
}
|
|
393
|
-
subscribe(t, e) {
|
|
394
|
-
return this.events.subscribe(
|
|
395
|
-
"data:action",
|
|
396
|
-
(r, { action: s, value: i, target: o }) => t === o && e(t, s, i)
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
const sr = (n) => {
|
|
401
|
-
const t = [];
|
|
402
|
-
return [
|
|
403
|
-
(e, r) => {
|
|
404
|
-
t.push(n.subscribe(e, r));
|
|
405
|
-
},
|
|
406
|
-
() => {
|
|
407
|
-
t.forEach((e) => {
|
|
408
|
-
e();
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
];
|
|
412
|
-
};
|
|
413
|
-
let Nt = class {
|
|
414
|
-
constructor(t, e = []) {
|
|
415
|
-
this.platform = t, this.rules = e;
|
|
416
|
-
}
|
|
417
|
-
match(t) {
|
|
418
|
-
return this.rules.every((e) => !(e.id && e.id !== t.id || e.type && e.type !== t.type));
|
|
419
|
-
}
|
|
420
|
-
ofType(t) {
|
|
421
|
-
return this.rules.push({ type: t }), this;
|
|
422
|
-
}
|
|
423
|
-
withId(t) {
|
|
424
|
-
return this.rules.push({ id: t }), this;
|
|
425
|
-
}
|
|
426
|
-
select() {
|
|
427
|
-
return new $s(this.platform, this);
|
|
428
|
-
}
|
|
429
|
-
}, tn = class {
|
|
430
|
-
constructor(t, e, r) {
|
|
431
|
-
this.platform = t, this.node = e, this.actions = new we(
|
|
432
|
-
t,
|
|
433
|
-
new Nt(t).withId(e.id),
|
|
434
|
-
r
|
|
435
|
-
);
|
|
436
|
-
const [s, i] = sr(this.platform.events);
|
|
437
|
-
this.subscribe = s, this.unsubscribe = i;
|
|
438
|
-
}
|
|
439
|
-
properties(t) {
|
|
440
|
-
return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
|
|
441
|
-
}
|
|
442
|
-
context(t) {
|
|
443
|
-
return t && this.subscribe("components:context-changed", (e, { node: r }) => {
|
|
444
|
-
r === this.node && t(this.node.attributes.context);
|
|
445
|
-
}), this.node.attributes.context;
|
|
446
|
-
}
|
|
447
|
-
layout(t) {
|
|
448
|
-
return t && this.subscribe("components:layout-changed", (e, { node: r }) => {
|
|
449
|
-
r === this.node && t(this.node.attributes.layout);
|
|
450
|
-
}), this.node.attributes.layout;
|
|
451
|
-
}
|
|
452
|
-
writeProperties(t, e) {
|
|
453
|
-
this.node.writeProperties(t, e);
|
|
454
|
-
}
|
|
455
|
-
writeContext(t, e) {
|
|
456
|
-
this.node.writeProperties(t, e);
|
|
457
|
-
}
|
|
458
|
-
writeLayout(t, e) {
|
|
459
|
-
this.node.writeLayout(t, e);
|
|
460
|
-
}
|
|
461
|
-
dispose() {
|
|
462
|
-
this.unsubscribe(), this.actions.dispose();
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
class $s {
|
|
466
|
-
constructor(t, e, r = !0) {
|
|
467
|
-
this.platform = t, this.target = e, this.clearOnDispose = r, this.removes = [], this.actions = new we(this.platform, this.target);
|
|
468
|
-
}
|
|
469
|
-
writeProperties(t, e) {
|
|
470
|
-
this.removes.push(
|
|
471
|
-
this.platform.write({
|
|
472
|
-
options: e,
|
|
473
|
-
attributes: { properties: t },
|
|
474
|
-
target: this.target,
|
|
475
|
-
removable: this.clearOnDispose
|
|
476
|
-
})
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
writeContext(t, e) {
|
|
480
|
-
this.removes.push(
|
|
481
|
-
this.platform.write({
|
|
482
|
-
options: e,
|
|
483
|
-
attributes: { context: t },
|
|
484
|
-
target: this.target,
|
|
485
|
-
removable: this.clearOnDispose
|
|
486
|
-
})
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
writeLayout(t, e) {
|
|
490
|
-
this.removes.push(
|
|
491
|
-
this.platform.write({
|
|
492
|
-
options: e,
|
|
493
|
-
attributes: { layout: t },
|
|
494
|
-
target: this.target,
|
|
495
|
-
removable: this.clearOnDispose
|
|
496
|
-
})
|
|
497
|
-
);
|
|
498
|
-
}
|
|
499
|
-
dispose() {
|
|
500
|
-
this.removes.forEach((t) => {
|
|
501
|
-
t();
|
|
502
|
-
}), this.actions.dispose();
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
const Os = (n, t, e) => {
|
|
506
|
-
const r = n.concat(), s = (i, o, a) => {
|
|
507
|
-
let c = !0;
|
|
508
|
-
if (r.length) {
|
|
509
|
-
const h = r.shift(), l = (u, d) => (c = !1, s(u, Object.assign({}, o, d), a));
|
|
510
|
-
return Promise.resolve(h(i, l, a)).then((u) => bs(ys({}, u), {
|
|
511
|
-
cancelled: c
|
|
512
|
-
}));
|
|
513
|
-
}
|
|
514
|
-
return Promise.resolve({ data: i, cancelled: !1, options: o });
|
|
515
|
-
};
|
|
516
|
-
return s(t, {}, e);
|
|
517
|
-
};
|
|
518
|
-
let we = class {
|
|
519
|
-
constructor(t, e, r) {
|
|
520
|
-
this.platform = t, this.target = e, this.ns = r, this.subscriptions = [], this.create = this.create.bind(this);
|
|
521
|
-
}
|
|
522
|
-
create(t, e = () => {
|
|
523
|
-
}) {
|
|
524
|
-
const r = {
|
|
525
|
-
key: t,
|
|
526
|
-
fn: e,
|
|
527
|
-
target: this.target,
|
|
528
|
-
ns: this.ns
|
|
529
|
-
};
|
|
530
|
-
this.platform.actionsState.handlers.push(r);
|
|
531
|
-
const s = () => {
|
|
532
|
-
const i = this.platform.actionsState.handlers.indexOf(r);
|
|
533
|
-
i > -1 && this.platform.actionsState.handlers.splice(i, 1);
|
|
534
|
-
};
|
|
535
|
-
return this.subscriptions.push(s), s;
|
|
536
|
-
}
|
|
537
|
-
dispatch(t, e) {
|
|
538
|
-
const r = this.platform.nodes.all.concat(
|
|
539
|
-
this.platform.nodes.detached
|
|
540
|
-
), s = {}, i = this.platform.actionsState.handlers.filter(
|
|
541
|
-
(o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
|
|
542
|
-
);
|
|
543
|
-
return Promise.all(
|
|
544
|
-
i.map((o) => {
|
|
545
|
-
const a = r.filter(
|
|
546
|
-
(h) => o.target.match(h) && this.target.match(h)
|
|
547
|
-
), c = this.platform.actionsState.watchers.filter((h) => h.key === t && (!h.ns || !this.ns || h.ns === this.ns) && a.some((l) => h.target.match(l))).map((h) => h.fn);
|
|
548
|
-
return Promise.all(
|
|
549
|
-
a.map((h) => {
|
|
550
|
-
const l = new tn(
|
|
551
|
-
this.platform,
|
|
552
|
-
h,
|
|
553
|
-
this.ns
|
|
554
|
-
);
|
|
555
|
-
return Os(c, e, l).then((u) => {
|
|
556
|
-
const { data: d = {}, options: p, cancelled: b } = u;
|
|
557
|
-
return Promise.resolve(
|
|
558
|
-
b ? {} : o.fn(d, p, l)
|
|
559
|
-
).then((v) => {
|
|
560
|
-
s[h.id] = v;
|
|
561
|
-
});
|
|
562
|
-
});
|
|
563
|
-
})
|
|
564
|
-
);
|
|
565
|
-
})
|
|
566
|
-
).then(() => s);
|
|
567
|
-
}
|
|
568
|
-
watch(t, e) {
|
|
569
|
-
let r = t, s = this.ns;
|
|
570
|
-
const i = t.split(".");
|
|
571
|
-
i.length > 1 && (s = i[0], r = i.splice(1).join("."));
|
|
572
|
-
const o = {
|
|
573
|
-
fn: e,
|
|
574
|
-
target: this.target,
|
|
575
|
-
key: r,
|
|
576
|
-
ns: s
|
|
577
|
-
};
|
|
578
|
-
this.platform.actionsState.watchers.push(o);
|
|
579
|
-
const a = () => {
|
|
580
|
-
const c = this.platform.actionsState.watchers.indexOf(o);
|
|
581
|
-
c > -1 && this.platform.actionsState.watchers.splice(c, 1);
|
|
582
|
-
};
|
|
583
|
-
return this.subscriptions.push(a), a;
|
|
584
|
-
}
|
|
585
|
-
dispose() {
|
|
586
|
-
this.subscriptions.forEach((t) => t());
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
Xe((n) => {
|
|
590
|
-
n.createCommand("components", (t) => (e) => {
|
|
591
|
-
t.events.subscribeOnce("components:platform-created", (r, { platform: s }) => {
|
|
592
|
-
e.handlers && e.handlers.forEach(([i, o]) => {
|
|
593
|
-
s.addComponentHandler(i, o);
|
|
594
|
-
});
|
|
595
|
-
});
|
|
596
|
-
});
|
|
597
|
-
});
|
|
598
|
-
let qe = class {
|
|
599
|
-
constructor(t, e) {
|
|
600
|
-
this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = qt(), this.type = e, this.attributes = {
|
|
601
|
-
context: {},
|
|
602
|
-
properties: {},
|
|
603
|
-
layout: {},
|
|
604
|
-
tags: []
|
|
605
|
-
}, this.writeLayout({ size: "full", indent: 0 });
|
|
606
|
-
}
|
|
607
|
-
mount(t, e) {
|
|
608
|
-
let r = t.get("mounted-nodes");
|
|
609
|
-
return r || (r = /* @__PURE__ */ new Map(), t.register("mounted-nodes", r)), r.has(this) ? (process.env.NODE_ENV !== "production" && I.error("Trying to mount an already mounted component node.", this), () => {
|
|
610
|
-
}) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
|
|
611
|
-
r.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
appendChild(t, e = "default") {
|
|
615
|
-
if (t.parent) {
|
|
616
|
-
if (t.parent === this)
|
|
617
|
-
return;
|
|
618
|
-
t.parent.removeChild(t);
|
|
619
|
-
}
|
|
620
|
-
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].push(t), this.events.dispatch("components:node-appended", { node: t });
|
|
621
|
-
}
|
|
622
|
-
prependChild(t, e = "default") {
|
|
623
|
-
if (t.parent) {
|
|
624
|
-
if (t.parent === this)
|
|
625
|
-
return;
|
|
626
|
-
t.parent.removeChild(t);
|
|
627
|
-
}
|
|
628
|
-
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
|
|
629
|
-
}
|
|
630
|
-
touchProperties(t, e = {}, r) {
|
|
631
|
-
const s = [{ properties: t }, e];
|
|
632
|
-
return this.changesets.push(s), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
633
|
-
if (r) {
|
|
634
|
-
const i = this.changesets.indexOf(s);
|
|
635
|
-
i > -1 && (this.changesets.splice(i, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
writeProperties(t, e = {}, r) {
|
|
640
|
-
const s = [{ properties: t }, e];
|
|
641
|
-
return this.changesets.push(s), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
642
|
-
if (r) {
|
|
643
|
-
const i = this.changesets.indexOf(s);
|
|
644
|
-
i > -1 && (this.changesets.splice(i, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
writeLayout(t, e = {}, r) {
|
|
649
|
-
const s = [{ layout: t }, e];
|
|
650
|
-
return this.changesets.push(s), this.events.dispatch("components:set-layout", { node: this }), () => {
|
|
651
|
-
if (!r)
|
|
652
|
-
return;
|
|
653
|
-
const i = this.changesets.indexOf(s);
|
|
654
|
-
i > -1 && (this.changesets.splice(i, 1), this.events.dispatch("components:set-layout", { node: this }));
|
|
655
|
-
};
|
|
656
|
-
}
|
|
657
|
-
writeContext(t, e = {}, r) {
|
|
658
|
-
const s = [{ context: t }, e];
|
|
659
|
-
return this.changesets.push(s), this.events.dispatch("components:set-context", { node: this }), () => {
|
|
660
|
-
if (!r)
|
|
661
|
-
return;
|
|
662
|
-
const i = this.changesets.indexOf(s);
|
|
663
|
-
i > -1 && (this.changesets.splice(i, 1), this.events.dispatch("components:set-context", { node: this }));
|
|
664
|
-
};
|
|
665
|
-
}
|
|
666
|
-
getChildren(t = "default") {
|
|
667
|
-
const e = this.children[t] || [];
|
|
668
|
-
return e.reduce((r, s, i) => {
|
|
669
|
-
const { order: o = i } = s.attributes.layout;
|
|
670
|
-
return r[o] ? r.splice(o, 0, s) : r[o] = s, r;
|
|
671
|
-
}, Array(e.length));
|
|
672
|
-
}
|
|
673
|
-
remove() {
|
|
674
|
-
this.parent && this.parent.removeChild(this);
|
|
675
|
-
}
|
|
676
|
-
removeChild(t) {
|
|
677
|
-
Object.keys(this.children).forEach((e) => {
|
|
678
|
-
const r = this.children[e], s = r.indexOf(t);
|
|
679
|
-
s > -1 && (r.splice(s, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
|
|
680
|
-
}), delete t.parent;
|
|
681
|
-
}
|
|
682
|
-
};
|
|
683
|
-
const ir = (n, t, e) => {
|
|
684
|
-
for (let r = 0, s = n.length; r < s && e(n[r]) !== !0; r++) {
|
|
685
|
-
const i = t[n[r].id] || "default", o = n[r].getChildren(i);
|
|
686
|
-
ir(o, t, e);
|
|
687
|
-
}
|
|
688
|
-
}, $e = (n, t, e) => {
|
|
689
|
-
if (e(n) !== !0) {
|
|
690
|
-
const r = t[n.id] || "default", s = n.children[r];
|
|
691
|
-
ir(s, t, e);
|
|
692
|
-
}
|
|
693
|
-
}, ne = (n, t) => {
|
|
694
|
-
const e = [];
|
|
695
|
-
return $e(n, t, (r) => {
|
|
696
|
-
e.push(r);
|
|
697
|
-
}), e;
|
|
698
|
-
}, or = (n, t, e) => {
|
|
699
|
-
let r;
|
|
700
|
-
return $e(n, t, (s) => {
|
|
701
|
-
if (e(s))
|
|
702
|
-
return r = s, !0;
|
|
703
|
-
}), r;
|
|
704
|
-
};
|
|
705
|
-
let Es = class {
|
|
706
|
-
constructor(t, e, r) {
|
|
707
|
-
this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], r.subscribe("components:node-appended", (s, i) => {
|
|
708
|
-
this.all.push(i.node), this.visible = ne(t, e);
|
|
709
|
-
}), r.subscribe("components:node-removed", (s, i) => {
|
|
710
|
-
let o = this.all.indexOf(i.node);
|
|
711
|
-
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(i.node), o > -1 && this.visible.splice(o, 1), this.visible = ne(t, e);
|
|
712
|
-
}), r.subscribe("components:node-switched", (s, i) => {
|
|
713
|
-
this.visible = ne(t, e);
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
query(t = {}) {
|
|
717
|
-
const e = [];
|
|
718
|
-
return $e(this.root, this.switches, (r) => {
|
|
719
|
-
Object.keys(t).every((s) => t[s] === r[s]) && e.push(r);
|
|
720
|
-
}), e;
|
|
721
|
-
}
|
|
722
|
-
get(t) {
|
|
723
|
-
return or(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
|
|
724
|
-
}
|
|
725
|
-
}, xs = class {
|
|
726
|
-
constructor() {
|
|
727
|
-
this.handlers = /* @__PURE__ */ new Map();
|
|
728
|
-
}
|
|
729
|
-
add(t, e) {
|
|
730
|
-
this.handlers.set(t, e);
|
|
731
|
-
}
|
|
732
|
-
get(t) {
|
|
733
|
-
return this.handlers.get(t);
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
const _s = (n) => {
|
|
737
|
-
let t = n, e = 0;
|
|
738
|
-
for (; t.parent; )
|
|
739
|
-
e = e + 1, t = t.parent;
|
|
740
|
-
return e;
|
|
741
|
-
}, As = (n) => n.map(([t, e]) => [_s(t), t, e]).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]), Ce = (n) => n instanceof Date ? !1 : n && typeof n == "object" && !Array.isArray(n), et = (n, ...t) => {
|
|
742
|
-
if (!t.length)
|
|
743
|
-
return n;
|
|
744
|
-
const e = t.shift();
|
|
745
|
-
if (Ce(n) && Ce(e))
|
|
746
|
-
for (const r in e)
|
|
747
|
-
Ce(e[r]) ? (n[r] || Object.assign(n, { [r]: {} }), et(n[r], e[r])) : Object.assign(n, { [r]: e[r] });
|
|
748
|
-
return et(n, ...t);
|
|
749
|
-
}, Ps = (n, t) => !n || n === "all" ? !0 : n.some((e) => t.indexOf(e) > -1), Cs = (n, t) => {
|
|
750
|
-
let e = [], r = [], s;
|
|
751
|
-
const i = () => {
|
|
752
|
-
process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
|
|
753
|
-
const a = /* @__PURE__ */ new Map(), c = As(e.map((l, u) => [l, r[u]])), h = (l, u) => {
|
|
754
|
-
var d;
|
|
755
|
-
const p = a.get(l) || {}, b = u.context && !p.context, v = u.properties && !p.properties, g = u.layout && !p.layout;
|
|
756
|
-
a.set(l, {
|
|
757
|
-
context: p.context || b,
|
|
758
|
-
properties: p.properties || v,
|
|
759
|
-
layout: p.layout || g
|
|
760
|
-
}), v && (l.attributes.properties = {}), g && (l.attributes.layout = {}), b && (l.attributes.context = et({}, (d = l.parent) == null ? void 0 : d.attributes.context));
|
|
761
|
-
const E = [], R = [], F = [];
|
|
762
|
-
if (l.changesets.forEach((H) => {
|
|
763
|
-
const [k, U] = H;
|
|
764
|
-
Ps(U.breakpoints, n.breakpoints) && (v && (typeof k.properties == "function" ? E.push(
|
|
765
|
-
k.properties
|
|
766
|
-
) : et(l.attributes.properties, k.properties)), g && (typeof k.layout == "function" ? R.push(k.layout) : et(l.attributes.layout, k.layout)), b && (typeof k.context == "function" ? F.push(k.context) : et(l.attributes.context, k.context)));
|
|
767
|
-
}), E.forEach((H) => {
|
|
768
|
-
et(l.attributes.properties, H(l.attributes.properties));
|
|
769
|
-
}), R.forEach((H) => {
|
|
770
|
-
et(l.attributes.layout, H(l.attributes.layout));
|
|
771
|
-
}), F.forEach((H) => {
|
|
772
|
-
et(l.attributes.context, H(l.attributes.context));
|
|
773
|
-
}), b || u.recursive) {
|
|
774
|
-
const H = n.getBranch(l), k = u.recursive ? u : {
|
|
775
|
-
context: !!b
|
|
776
|
-
};
|
|
777
|
-
l.getChildren(H).forEach((U) => {
|
|
778
|
-
h(U, k);
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), c.forEach(([l, u]) => {
|
|
783
|
-
h(l, u);
|
|
784
|
-
}), e = [], r = [], t(a);
|
|
785
|
-
}, o = () => {
|
|
786
|
-
clearTimeout(s), s = setTimeout(i, 0);
|
|
787
|
-
};
|
|
788
|
-
return (a, c) => {
|
|
789
|
-
const h = e.indexOf(a);
|
|
790
|
-
if (h > -1) {
|
|
791
|
-
const l = r[h];
|
|
792
|
-
return c.context && (l.context = !0), c.properties && (l.properties = !0), c.layout && (l.layout = !0), c.recursive && (l.recursive = !0), o();
|
|
793
|
-
}
|
|
794
|
-
return e.push(a), r.push(c), o();
|
|
795
|
-
};
|
|
796
|
-
};
|
|
797
|
-
let Jt = class {
|
|
798
|
-
constructor(t, e = {}) {
|
|
799
|
-
this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new xs(), this.events = t.events.createChild(this);
|
|
800
|
-
const r = new qe(this.events, "root");
|
|
801
|
-
r.name = `root-${t.name}`, this.nodes = new Es(r, this.switches, this.events);
|
|
802
|
-
const s = this.processNode = Cs(this, (i) => {
|
|
803
|
-
const o = Array.from(i.keys());
|
|
804
|
-
process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
805
|
-
${o.map(
|
|
806
|
-
(a) => `${a.name || "<no name>"} (${a.id})
|
|
807
|
-
`
|
|
808
|
-
)}`), o.forEach((a) => {
|
|
809
|
-
const c = i.get(a);
|
|
810
|
-
a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), c != null && c.context && this.events.dispatch("components:context-changed", { node: a }), c != null && c.properties && this.events.dispatch("components:properties-changed", { node: a }), c != null && c.layout && this.events.dispatch("components:layout-changed", { node: a });
|
|
811
|
-
}), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
|
|
812
|
-
});
|
|
813
|
-
Promise.all(
|
|
814
|
-
Object.keys(e).map((i) => e[i].load(this))
|
|
815
|
-
), this.subscriptions.push(
|
|
816
|
-
this.events.subscribe(
|
|
817
|
-
"components:node-appended",
|
|
818
|
-
(i, o) => {
|
|
819
|
-
const { node: a } = o;
|
|
820
|
-
this.changesets.forEach((c) => {
|
|
821
|
-
const { changeset: h, target: l, removes: u } = c, [d, p] = h;
|
|
822
|
-
l.match(o.node) && (d.properties && u.push(a.writeProperties(d.properties, p)), d.context && u.push(a.writeContext(d.context, p)), d.layout && u.push(a.writeLayout(d.layout, p)));
|
|
823
|
-
});
|
|
824
|
-
}
|
|
825
|
-
)
|
|
826
|
-
), this.subscriptions.push(
|
|
827
|
-
this.events.subscribe(
|
|
828
|
-
"components:node-appended",
|
|
829
|
-
(i, o) => {
|
|
830
|
-
s(o.node, { properties: !0, context: !0 });
|
|
831
|
-
}
|
|
832
|
-
)
|
|
833
|
-
), this.subscriptions.push(
|
|
834
|
-
this.events.subscribe(
|
|
835
|
-
"components:set-properties",
|
|
836
|
-
(i, o) => {
|
|
837
|
-
s(o.node, { properties: !0 });
|
|
838
|
-
}
|
|
839
|
-
)
|
|
840
|
-
), this.subscriptions.push(
|
|
841
|
-
this.events.subscribe(
|
|
842
|
-
"components:set-context",
|
|
843
|
-
(i, o) => {
|
|
844
|
-
s(o.node, { properties: !0, context: !0 });
|
|
845
|
-
}
|
|
846
|
-
)
|
|
847
|
-
), this.subscriptions.push(
|
|
848
|
-
this.events.subscribe(
|
|
849
|
-
"components:set-indent",
|
|
850
|
-
(i, o) => {
|
|
851
|
-
s(o.node, { layout: !0 });
|
|
852
|
-
}
|
|
853
|
-
)
|
|
854
|
-
), this.subscriptions.push(
|
|
855
|
-
this.events.subscribe(
|
|
856
|
-
"components:set-layout",
|
|
857
|
-
(i, o) => {
|
|
858
|
-
s(o.node, { layout: !0 });
|
|
859
|
-
}
|
|
860
|
-
)
|
|
861
|
-
), this.subscriptions.push(
|
|
862
|
-
this.events.subscribe("components:node-switched", (i, { node: o, branch: a }) => {
|
|
863
|
-
s(o, {
|
|
864
|
-
layout: !0,
|
|
865
|
-
recursive: !0,
|
|
866
|
-
properties: !0,
|
|
867
|
-
context: !0
|
|
868
|
-
});
|
|
869
|
-
})
|
|
870
|
-
), this.subscriptions.push(
|
|
871
|
-
this.events.subscribe("components:node-removed", (i, { parentNode: o }) => {
|
|
872
|
-
s(o, { properties: !0 });
|
|
873
|
-
})
|
|
874
|
-
), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
|
|
875
|
-
}
|
|
876
|
-
static getInstance(t) {
|
|
877
|
-
return t.getAsync("components");
|
|
878
|
-
}
|
|
879
|
-
addBreakpoint(t) {
|
|
880
|
-
this.breakpoints.indexOf(t) === -1 && (this.breakpoints.push(t), this.processNode(this.nodes.root, {
|
|
881
|
-
context: !0,
|
|
882
|
-
properties: !0,
|
|
883
|
-
layout: !0,
|
|
884
|
-
recursive: !0
|
|
885
|
-
}));
|
|
886
|
-
}
|
|
887
|
-
removeBreakpoint(t) {
|
|
888
|
-
const e = this.breakpoints.indexOf(t);
|
|
889
|
-
e > -1 && (this.breakpoints.splice(e, 1), this.processNode(this.nodes.root, {
|
|
890
|
-
context: !0,
|
|
891
|
-
properties: !0,
|
|
892
|
-
layout: !0,
|
|
893
|
-
recursive: !0
|
|
894
|
-
}));
|
|
895
|
-
}
|
|
896
|
-
setSwitch(t, e) {
|
|
897
|
-
this.switches[t.id] = e, this.events.dispatch("components:node-switched", { node: t, branch: e });
|
|
898
|
-
}
|
|
899
|
-
getBranch(t) {
|
|
900
|
-
return this.switches[t.id];
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* Creates a `ComponentNode` of the specified type.
|
|
904
|
-
* @param type Type of node.
|
|
905
|
-
*/
|
|
906
|
-
createNode(t, e = {}) {
|
|
907
|
-
const r = new qe(this.events, t);
|
|
908
|
-
return e.detached && this.nodes.detached.push(r), r;
|
|
909
|
-
}
|
|
910
|
-
components() {
|
|
911
|
-
return new Nt(this);
|
|
912
|
-
}
|
|
913
|
-
actions(t, e) {
|
|
914
|
-
return new we(this, t, e);
|
|
915
|
-
}
|
|
916
|
-
write(t) {
|
|
917
|
-
const { provider: e, target: r, attributes: s, options: i = {}, removable: o } = t, a = t.key || qt(), c = { changeset: [s, i], target: r, removes: [] };
|
|
918
|
-
if (e) {
|
|
919
|
-
const h = this.providers[e];
|
|
920
|
-
h.write(a, r, s, i), c.removes.push(() => {
|
|
921
|
-
h.remove(a);
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
return this.changesets.push(c), this.nodes.all.forEach((h) => {
|
|
925
|
-
if (r.match(h)) {
|
|
926
|
-
let l = () => {
|
|
927
|
-
};
|
|
928
|
-
s.properties && (l = h.writeProperties(s.properties, i, o)), s.context && (l = h.writeContext(s.context, i, o)), s.layout && (l = h.writeContext(s.layout, i, o)), c.removes.push(l);
|
|
929
|
-
}
|
|
930
|
-
}), () => {
|
|
931
|
-
if (o) {
|
|
932
|
-
c.removes.forEach((l) => l());
|
|
933
|
-
const h = this.changesets.indexOf(c);
|
|
934
|
-
h > -1 && this.changesets.splice(h, 1);
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
addComponentHandler(t, e) {
|
|
939
|
-
this.customComponentHandler.add(t, e);
|
|
940
|
-
}
|
|
941
|
-
getComponentHandler(t) {
|
|
942
|
-
return this.customComponentHandler.get(t);
|
|
943
|
-
}
|
|
944
|
-
dispose() {
|
|
945
|
-
this.subscriptions.forEach((t) => t());
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
|
-
const Ss = (n) => {
|
|
949
|
-
if (Array.isArray(n)) {
|
|
950
|
-
const [t, ...e] = n;
|
|
951
|
-
return {
|
|
952
|
-
definitionId: t,
|
|
953
|
-
overrides: e
|
|
954
|
-
};
|
|
955
|
-
}
|
|
956
|
-
return {
|
|
957
|
-
definitionId: n,
|
|
958
|
-
overrides: []
|
|
959
|
-
};
|
|
960
|
-
}, le = (n, t, e, r, s, i) => {
|
|
961
|
-
e.forEach((o) => {
|
|
962
|
-
const a = Ss(o), c = r[a.definitionId];
|
|
963
|
-
if (a.definitionId === "view") {
|
|
964
|
-
const h = n.createNode("view");
|
|
965
|
-
h.name = "view", Object.keys(s).forEach((l) => {
|
|
966
|
-
const u = s[l];
|
|
967
|
-
le(n, h, [u.entry], r, s, l);
|
|
968
|
-
}), t.appendChild(h), a.overrides.forEach((l) => {
|
|
969
|
-
l.properties && h.writeProperties(l.properties, {
|
|
970
|
-
breakpoints: l.breakpoints
|
|
971
|
-
}), l.context && h.writeContext(l.context, { breakpoints: l.breakpoints }), l.layout && h.writeLayout(l.layout, { breakpoints: l.breakpoints });
|
|
972
|
-
});
|
|
973
|
-
} else if (n.getComponentHandler(c.type)) {
|
|
974
|
-
const h = n.getComponentHandler(c.type);
|
|
975
|
-
h && h(a, {
|
|
976
|
-
platform: n,
|
|
977
|
-
node: t,
|
|
978
|
-
references: e,
|
|
979
|
-
definitions: r,
|
|
980
|
-
views: s,
|
|
981
|
-
branch: i
|
|
982
|
-
});
|
|
983
|
-
} else {
|
|
984
|
-
const h = r[a.definitionId];
|
|
985
|
-
if (process.env.NODE_ENV !== "production" && !h) {
|
|
986
|
-
I.error(
|
|
987
|
-
`No definition found for component type '${a.definitionId}'.`
|
|
988
|
-
);
|
|
989
|
-
return;
|
|
990
|
-
}
|
|
991
|
-
const l = n.createNode(h.type);
|
|
992
|
-
l.name = a.definitionId, l.tags = h.tags || [], h.properties && l.writeProperties(h.properties), h.context && l.writeContext(h.context), h.layout && l.writeLayout(h.layout), t.appendChild(l, i), a.overrides.forEach((u) => {
|
|
993
|
-
const d = { breakpoints: u.breakpoints };
|
|
994
|
-
u.properties && l.writeProperties(u.properties, d), u.context && l.writeContext(u.context, d), u.layout && l.writeLayout(u.layout, d);
|
|
995
|
-
}), h.children && le(n, l, h.children, r, s);
|
|
996
|
-
}
|
|
997
|
-
});
|
|
998
|
-
}, ar = (n, t) => {
|
|
999
|
-
const { entry: e, components: r, breakpoints: s, views: i } = t, o = [];
|
|
1000
|
-
return Object.keys(s).forEach((a) => {
|
|
1001
|
-
const c = s[a], h = window.matchMedia(c);
|
|
1002
|
-
h.matches && n.breakpoints.push(a);
|
|
1003
|
-
const l = (u) => {
|
|
1004
|
-
u.matches ? n.addBreakpoint(a) : n.removeBreakpoint(a);
|
|
1005
|
-
};
|
|
1006
|
-
h.addListener(l), o.push(() => h.removeListener(l));
|
|
1007
|
-
}), le(n, n.nodes.root, [e], r, i), () => o.forEach((a) => {
|
|
1008
|
-
a();
|
|
1009
|
-
});
|
|
1010
|
-
}, Je = (n, t) => ({
|
|
1011
|
-
id: n.id,
|
|
1012
|
-
type: n.type,
|
|
1013
|
-
name: n.name,
|
|
1014
|
-
branch: t || "default"
|
|
1015
|
-
}), cr = (n, t, e, r = qt(), s = {}) => n.getAsync("components").then((i) => {
|
|
1016
|
-
let o;
|
|
1017
|
-
if (typeof t == "string") {
|
|
1018
|
-
const h = new Nt(i);
|
|
1019
|
-
h.ofType(t), o = h;
|
|
1020
|
-
} else
|
|
1021
|
-
o = t;
|
|
1022
|
-
const a = {}, c = (h) => {
|
|
1023
|
-
const l = a[h.id];
|
|
1024
|
-
return l ? Promise.resolve(l.controller) : Jt.getInstance(n).then((u) => new tn(u, h, r));
|
|
1025
|
-
};
|
|
1026
|
-
i.events.subscribe(
|
|
1027
|
-
"components:node-enter",
|
|
1028
|
-
(h, { node: l }) => {
|
|
1029
|
-
o.match(l) && c(l).then((u) => {
|
|
1030
|
-
Promise.resolve(e(u)).then((d) => {
|
|
1031
|
-
a[l.id] = {
|
|
1032
|
-
dispose: d,
|
|
1033
|
-
controller: u
|
|
1034
|
-
};
|
|
1035
|
-
});
|
|
1036
|
-
});
|
|
1037
|
-
}
|
|
1038
|
-
), i.events.subscribe(
|
|
1039
|
-
"components:node-exit",
|
|
1040
|
-
(h, { node: l }) => {
|
|
1041
|
-
const u = a[l.id];
|
|
1042
|
-
u && (u.dispose && u.dispose(), s.reuseController || (u.controller.dispose(), delete a[l.id]));
|
|
1043
|
-
}
|
|
1044
|
-
);
|
|
1045
|
-
});
|
|
1046
|
-
class ks {
|
|
1047
|
-
constructor(t) {
|
|
1048
|
-
this.aliases = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.logger = new I();
|
|
1049
|
-
const { events: e } = t.get("$widget");
|
|
1050
|
-
this.events = e;
|
|
1051
|
-
}
|
|
1052
|
-
getComponent(t) {
|
|
1053
|
-
const e = this.aliases.get(t), r = this.components.get(e || t) || null;
|
|
1054
|
-
return process.env.NODE_ENV !== "production" && (r || this.logger.warn(
|
|
1055
|
-
e || t,
|
|
1056
|
-
`Unable to resolve component: "${e || t}". You most likely forgot to register the required plugin for: ${e || t}.`
|
|
1057
|
-
)), r;
|
|
1058
|
-
}
|
|
1059
|
-
registerComponent(t, e) {
|
|
1060
|
-
return this.components.set(t, e), this.events.dispatch("component-resolver:resolve", t), () => {
|
|
1061
|
-
this.components.delete(t);
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
registerResolver(t, e) {
|
|
1065
|
-
return this.events.subscribe("component-resolver:resolve", (r, s) => {
|
|
1066
|
-
if (s === t) {
|
|
1067
|
-
const i = this.getComponent(t);
|
|
1068
|
-
e(i);
|
|
1069
|
-
}
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
registerAlias(t, e) {
|
|
1073
|
-
return this.aliases.set(t, e), this.events.dispatch("component-resolver:resolve", t), () => {
|
|
1074
|
-
this.aliases.delete(t);
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
var J = /* @__PURE__ */ ((n) => (n.open = "open", n.closed = "closed", n.hidden = "hidden", n))(J || {});
|
|
1079
|
-
const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1080
|
-
__proto__: null,
|
|
1081
|
-
ActionResolver: ws,
|
|
1082
|
-
ActionsController: we,
|
|
1083
|
-
ComponentNode: qe,
|
|
1084
|
-
ComponentNodeController: tn,
|
|
1085
|
-
ComponentPlatform: Jt,
|
|
1086
|
-
ComponentQuery: Nt,
|
|
1087
|
-
ComponentResolver: ks,
|
|
1088
|
-
WidgetRenderState: J,
|
|
1089
|
-
asDescriptor: Je,
|
|
1090
|
-
createChildren: le,
|
|
1091
|
-
createComponentModel: ar,
|
|
1092
|
-
createEventSubscriber: sr,
|
|
1093
|
-
extendComponent: cr,
|
|
1094
|
-
findComponent: or,
|
|
1095
|
-
findVisibleComponents: ne,
|
|
1096
|
-
traverseComponents: $e
|
|
1097
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1098
|
-
function hr(n) {
|
|
1099
|
-
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
1100
|
-
}
|
|
1101
|
-
var lr = function() {
|
|
1102
|
-
};
|
|
1103
|
-
process.env.NODE_ENV !== "production" && (lr = function(n, t, e) {
|
|
1104
|
-
var r = arguments.length;
|
|
1105
|
-
e = new Array(r > 2 ? r - 2 : 0);
|
|
1106
|
-
for (var s = 2; s < r; s++)
|
|
1107
|
-
e[s - 2] = arguments[s];
|
|
1108
|
-
if (t === void 0)
|
|
1109
|
-
throw new Error(
|
|
1110
|
-
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
1111
|
-
);
|
|
1112
|
-
if (t.length < 10 || /^[s\W]*$/.test(t))
|
|
1113
|
-
throw new Error(
|
|
1114
|
-
"The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: " + t
|
|
1115
|
-
);
|
|
1116
|
-
if (!n) {
|
|
1117
|
-
var i = 0, o = "Warning: " + t.replace(/%s/g, function() {
|
|
1118
|
-
return e[i++];
|
|
1119
|
-
});
|
|
1120
|
-
typeof console != "undefined" && console.error(o);
|
|
1121
|
-
try {
|
|
1122
|
-
throw new Error(o);
|
|
1123
|
-
} catch (a) {
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
});
|
|
1127
|
-
var Ns = lr;
|
|
1128
|
-
const nt = /* @__PURE__ */ hr(Ns);
|
|
1129
|
-
var Ls = function(n, t, e, r, s, i, o, a) {
|
|
1130
|
-
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
1131
|
-
throw new Error("invariant requires an error message argument");
|
|
1132
|
-
if (!n) {
|
|
1133
|
-
var c;
|
|
1134
|
-
if (t === void 0)
|
|
1135
|
-
c = new Error(
|
|
1136
|
-
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
1137
|
-
);
|
|
1138
|
-
else {
|
|
1139
|
-
var h = [e, r, s, i, o, a], l = 0;
|
|
1140
|
-
c = new Error(
|
|
1141
|
-
t.replace(/%s/g, function() {
|
|
1142
|
-
return h[l++];
|
|
1143
|
-
})
|
|
1144
|
-
), c.name = "Invariant Violation";
|
|
1145
|
-
}
|
|
1146
|
-
throw c.framesToPop = 1, c;
|
|
1147
|
-
}
|
|
1148
|
-
}, Ms = Ls;
|
|
1149
|
-
const Ds = /* @__PURE__ */ hr(Ms);
|
|
1150
|
-
function Yt(n) {
|
|
1151
|
-
return n.charAt(0) === "/";
|
|
1152
|
-
}
|
|
1153
|
-
function Se(n, t) {
|
|
1154
|
-
for (var e = t, r = e + 1, s = n.length; r < s; e += 1, r += 1)
|
|
1155
|
-
n[e] = n[r];
|
|
1156
|
-
n.pop();
|
|
1157
|
-
}
|
|
1158
|
-
function js(n) {
|
|
1159
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", e = n && n.split("/") || [], r = t && t.split("/") || [], s = n && Yt(n), i = t && Yt(t), o = s || i;
|
|
1160
|
-
if (n && Yt(n) ? r = e : e.length && (r.pop(), r = r.concat(e)), !r.length)
|
|
1161
|
-
return "/";
|
|
1162
|
-
var a = void 0;
|
|
1163
|
-
if (r.length) {
|
|
1164
|
-
var c = r[r.length - 1];
|
|
1165
|
-
a = c === "." || c === ".." || c === "";
|
|
1166
|
-
} else
|
|
1167
|
-
a = !1;
|
|
1168
|
-
for (var h = 0, l = r.length; l >= 0; l--) {
|
|
1169
|
-
var u = r[l];
|
|
1170
|
-
u === "." ? Se(r, l) : u === ".." ? (Se(r, l), h++) : h && (Se(r, l), h--);
|
|
1171
|
-
}
|
|
1172
|
-
if (!o)
|
|
1173
|
-
for (; h--; h)
|
|
1174
|
-
r.unshift("..");
|
|
1175
|
-
o && r[0] !== "" && (!r[0] || !Yt(r[0])) && r.unshift("");
|
|
1176
|
-
var d = r.join("/");
|
|
1177
|
-
return a && d.substr(-1) !== "/" && (d += "/"), d;
|
|
1178
|
-
}
|
|
1179
|
-
var Rs = function(t) {
|
|
1180
|
-
return t.charAt(0) === "/" ? t : "/" + t;
|
|
1181
|
-
}, ur = function(t, e) {
|
|
1182
|
-
return new RegExp("^" + e + "(\\/|\\?|#|$)", "i").test(t);
|
|
1183
|
-
}, Ts = function(t, e) {
|
|
1184
|
-
return ur(t, e) ? t.substr(e.length) : t;
|
|
1185
|
-
}, Is = function(t) {
|
|
1186
|
-
return t.charAt(t.length - 1) === "/" ? t.slice(0, -1) : t;
|
|
1187
|
-
}, Hs = function(t) {
|
|
1188
|
-
var e = t || "/", r = "", s = "", i = e.indexOf("#");
|
|
1189
|
-
i !== -1 && (s = e.substr(i), e = e.substr(0, i));
|
|
1190
|
-
var o = e.indexOf("?");
|
|
1191
|
-
return o !== -1 && (r = e.substr(o), e = e.substr(0, o)), {
|
|
1192
|
-
pathname: e,
|
|
1193
|
-
search: r === "?" ? "" : r,
|
|
1194
|
-
hash: s === "#" ? "" : s
|
|
1195
|
-
};
|
|
1196
|
-
}, dr = function(t) {
|
|
1197
|
-
var e = t.pathname, r = t.search, s = t.hash, i = e || "/";
|
|
1198
|
-
return r && r !== "?" && (i += r.charAt(0) === "?" ? r : "?" + r), s && s !== "#" && (i += s.charAt(0) === "#" ? s : "#" + s), i;
|
|
1199
|
-
}, Us = Object.assign || function(n) {
|
|
1200
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1201
|
-
var e = arguments[t];
|
|
1202
|
-
for (var r in e)
|
|
1203
|
-
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
|
|
1204
|
-
}
|
|
1205
|
-
return n;
|
|
1206
|
-
}, vt = function(t, e, r, s) {
|
|
1207
|
-
var i = void 0;
|
|
1208
|
-
typeof t == "string" ? (i = Hs(t), i.state = e) : (i = Us({}, t), i.pathname === void 0 && (i.pathname = ""), i.search ? i.search.charAt(0) !== "?" && (i.search = "?" + i.search) : i.search = "", i.hash ? i.hash.charAt(0) !== "#" && (i.hash = "#" + i.hash) : i.hash = "", e !== void 0 && i.state === void 0 && (i.state = e));
|
|
1209
|
-
try {
|
|
1210
|
-
i.pathname = decodeURI(i.pathname);
|
|
1211
|
-
} catch (o) {
|
|
1212
|
-
throw o instanceof URIError ? new URIError('Pathname "' + i.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.') : o;
|
|
1213
|
-
}
|
|
1214
|
-
return r && (i.key = r), s ? i.pathname ? i.pathname.charAt(0) !== "/" && (i.pathname = js(i.pathname, s.pathname)) : i.pathname = s.pathname : i.pathname || (i.pathname = "/"), i;
|
|
1215
|
-
}, pr = function() {
|
|
1216
|
-
var t = null, e = function(c) {
|
|
1217
|
-
return nt(t == null, "A history supports only one prompt at a time"), t = c, function() {
|
|
1218
|
-
t === c && (t = null);
|
|
1219
|
-
};
|
|
1220
|
-
}, r = function(c, h, l, u) {
|
|
1221
|
-
if (t != null) {
|
|
1222
|
-
var d = typeof t == "function" ? t(c, h) : t;
|
|
1223
|
-
typeof d == "string" ? typeof l == "function" ? l(d, u) : (nt(!1, "A history needs a getUserConfirmation function in order to use a prompt message"), u(!0)) : u(d !== !1);
|
|
1224
|
-
} else
|
|
1225
|
-
u(!0);
|
|
1226
|
-
}, s = [], i = function(c) {
|
|
1227
|
-
var h = !0, l = function() {
|
|
1228
|
-
h && c.apply(void 0, arguments);
|
|
1229
|
-
};
|
|
1230
|
-
return s.push(l), function() {
|
|
1231
|
-
h = !1, s = s.filter(function(u) {
|
|
1232
|
-
return u !== l;
|
|
1233
|
-
});
|
|
1234
|
-
};
|
|
1235
|
-
}, o = function() {
|
|
1236
|
-
for (var c = arguments.length, h = Array(c), l = 0; l < c; l++)
|
|
1237
|
-
h[l] = arguments[l];
|
|
1238
|
-
s.forEach(function(u) {
|
|
1239
|
-
return u.apply(void 0, h);
|
|
1240
|
-
});
|
|
1241
|
-
};
|
|
1242
|
-
return {
|
|
1243
|
-
setPrompt: e,
|
|
1244
|
-
confirmTransitionTo: r,
|
|
1245
|
-
appendListener: i,
|
|
1246
|
-
notifyListeners: o
|
|
1247
|
-
};
|
|
1248
|
-
}, Vs = !!(typeof window != "undefined" && window.document && window.document.createElement), wn = function(t, e, r) {
|
|
1249
|
-
return t.addEventListener ? t.addEventListener(e, r, !1) : t.attachEvent("on" + e, r);
|
|
1250
|
-
}, $n = function(t, e, r) {
|
|
1251
|
-
return t.removeEventListener ? t.removeEventListener(e, r, !1) : t.detachEvent("on" + e, r);
|
|
1252
|
-
}, Bs = function(t, e) {
|
|
1253
|
-
return e(window.confirm(t));
|
|
1254
|
-
}, zs = function() {
|
|
1255
|
-
var t = window.navigator.userAgent;
|
|
1256
|
-
return (t.indexOf("Android 2.") !== -1 || t.indexOf("Android 4.0") !== -1) && t.indexOf("Mobile Safari") !== -1 && t.indexOf("Chrome") === -1 && t.indexOf("Windows Phone") === -1 ? !1 : window.history && "pushState" in window.history;
|
|
1257
|
-
}, Ws = function() {
|
|
1258
|
-
return window.navigator.userAgent.indexOf("Trident") === -1;
|
|
1259
|
-
}, Fs = function(t) {
|
|
1260
|
-
return t.state === void 0 && navigator.userAgent.indexOf("CriOS") === -1;
|
|
1261
|
-
}, On = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1262
|
-
return typeof n;
|
|
1263
|
-
} : function(n) {
|
|
1264
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1265
|
-
}, qs = Object.assign || function(n) {
|
|
1266
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1267
|
-
var e = arguments[t];
|
|
1268
|
-
for (var r in e)
|
|
1269
|
-
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
|
|
1270
|
-
}
|
|
1271
|
-
return n;
|
|
1272
|
-
}, En = "popstate", xn = "hashchange", _n = function() {
|
|
1273
|
-
try {
|
|
1274
|
-
return window.history.state || {};
|
|
1275
|
-
} catch (t) {
|
|
1276
|
-
return {};
|
|
1277
|
-
}
|
|
1278
|
-
}, Js = function() {
|
|
1279
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1280
|
-
Ds(Vs, "Browser history needs a DOM");
|
|
1281
|
-
var e = window.history, r = zs(), s = !Ws(), i = t.forceRefresh, o = i === void 0 ? !1 : i, a = t.getUserConfirmation, c = a === void 0 ? Bs : a, h = t.keyLength, l = h === void 0 ? 6 : h, u = t.basename ? Is(Rs(t.basename)) : "", d = function(m) {
|
|
1282
|
-
var O = m || {}, L = O.key, M = O.state, K = window.location, G = K.pathname, it = K.search, Q = K.hash, q = G + it + Q;
|
|
1283
|
-
return nt(!u || ur(q, u), 'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "' + q + '" to begin with "' + u + '".'), u && (q = Ts(q, u)), vt(q, M, L);
|
|
1284
|
-
}, p = function() {
|
|
1285
|
-
return Math.random().toString(36).substr(2, l);
|
|
1286
|
-
}, b = pr(), v = function(m) {
|
|
1287
|
-
qs(A, m), A.length = e.length, b.notifyListeners(A.location, A.action);
|
|
1288
|
-
}, g = function(m) {
|
|
1289
|
-
Fs(m) || F(d(m.state));
|
|
1290
|
-
}, E = function() {
|
|
1291
|
-
F(d(_n()));
|
|
1292
|
-
}, R = !1, F = function(m) {
|
|
1293
|
-
if (R)
|
|
1294
|
-
R = !1, v();
|
|
1295
|
-
else {
|
|
1296
|
-
var O = "POP";
|
|
1297
|
-
b.confirmTransitionTo(m, O, c, function(L) {
|
|
1298
|
-
L ? v({ action: O, location: m }) : H(m);
|
|
1299
|
-
});
|
|
1300
|
-
}
|
|
1301
|
-
}, H = function(m) {
|
|
1302
|
-
var O = A.location, L = U.indexOf(O.key);
|
|
1303
|
-
L === -1 && (L = 0);
|
|
1304
|
-
var M = U.indexOf(m.key);
|
|
1305
|
-
M === -1 && (M = 0);
|
|
1306
|
-
var K = L - M;
|
|
1307
|
-
K && (R = !0, D(K));
|
|
1308
|
-
}, k = d(_n()), U = [k.key], x = function(m) {
|
|
1309
|
-
return u + dr(m);
|
|
1310
|
-
}, N = function(m, O) {
|
|
1311
|
-
nt(!((typeof m == "undefined" ? "undefined" : On(m)) === "object" && m.state !== void 0 && O !== void 0), "You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");
|
|
1312
|
-
var L = "PUSH", M = vt(m, O, p(), A.location);
|
|
1313
|
-
b.confirmTransitionTo(M, L, c, function(K) {
|
|
1314
|
-
if (K) {
|
|
1315
|
-
var G = x(M), it = M.key, Q = M.state;
|
|
1316
|
-
if (r)
|
|
1317
|
-
if (e.pushState({ key: it, state: Q }, null, G), o)
|
|
1318
|
-
window.location.href = G;
|
|
1319
|
-
else {
|
|
1320
|
-
var q = U.indexOf(A.location.key), ln = U.slice(0, q === -1 ? 0 : q + 1);
|
|
1321
|
-
ln.push(M.key), U = ln, v({ action: L, location: M });
|
|
1322
|
-
}
|
|
1323
|
-
else
|
|
1324
|
-
nt(Q === void 0, "Browser history cannot push state in browsers that do not support HTML5 history"), window.location.href = G;
|
|
1325
|
-
}
|
|
1326
|
-
});
|
|
1327
|
-
}, S = function(m, O) {
|
|
1328
|
-
nt(!((typeof m == "undefined" ? "undefined" : On(m)) === "object" && m.state !== void 0 && O !== void 0), "You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");
|
|
1329
|
-
var L = "REPLACE", M = vt(m, O, p(), A.location);
|
|
1330
|
-
b.confirmTransitionTo(M, L, c, function(K) {
|
|
1331
|
-
if (K) {
|
|
1332
|
-
var G = x(M), it = M.key, Q = M.state;
|
|
1333
|
-
if (r)
|
|
1334
|
-
if (e.replaceState({ key: it, state: Q }, null, G), o)
|
|
1335
|
-
window.location.replace(G);
|
|
1336
|
-
else {
|
|
1337
|
-
var q = U.indexOf(A.location.key);
|
|
1338
|
-
q !== -1 && (U[q] = M.key), v({ action: L, location: M });
|
|
1339
|
-
}
|
|
1340
|
-
else
|
|
1341
|
-
nt(Q === void 0, "Browser history cannot replace state in browsers that do not support HTML5 history"), window.location.replace(G);
|
|
1342
|
-
}
|
|
1343
|
-
});
|
|
1344
|
-
}, D = function(m) {
|
|
1345
|
-
e.go(m);
|
|
1346
|
-
}, z = function() {
|
|
1347
|
-
return D(-1);
|
|
1348
|
-
}, V = function() {
|
|
1349
|
-
return D(1);
|
|
1350
|
-
}, T = 0, f = function(m) {
|
|
1351
|
-
T += m, T === 1 ? (wn(window, En, g), s && wn(window, xn, E)) : T === 0 && ($n(window, En, g), s && $n(window, xn, E));
|
|
1352
|
-
}, w = !1, y = function() {
|
|
1353
|
-
var m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, O = b.setPrompt(m);
|
|
1354
|
-
return w || (f(1), w = !0), function() {
|
|
1355
|
-
return w && (w = !1, f(-1)), O();
|
|
1356
|
-
};
|
|
1357
|
-
}, $ = function(m) {
|
|
1358
|
-
var O = b.appendListener(m);
|
|
1359
|
-
return f(1), function() {
|
|
1360
|
-
f(-1), O();
|
|
1361
|
-
};
|
|
1362
|
-
}, A = {
|
|
1363
|
-
length: e.length,
|
|
1364
|
-
action: "POP",
|
|
1365
|
-
location: k,
|
|
1366
|
-
createHref: x,
|
|
1367
|
-
push: N,
|
|
1368
|
-
replace: S,
|
|
1369
|
-
go: D,
|
|
1370
|
-
goBack: z,
|
|
1371
|
-
goForward: V,
|
|
1372
|
-
block: y,
|
|
1373
|
-
listen: $
|
|
1374
|
-
};
|
|
1375
|
-
return A;
|
|
1376
|
-
}, An = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1377
|
-
return typeof n;
|
|
1378
|
-
} : function(n) {
|
|
1379
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1380
|
-
}, Ks = Object.assign || function(n) {
|
|
1381
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1382
|
-
var e = arguments[t];
|
|
1383
|
-
for (var r in e)
|
|
1384
|
-
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
|
|
1385
|
-
}
|
|
1386
|
-
return n;
|
|
1387
|
-
}, Pn = function(t, e, r) {
|
|
1388
|
-
return Math.min(Math.max(t, e), r);
|
|
1389
|
-
}, Gs = function() {
|
|
1390
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = t.getUserConfirmation, r = t.initialEntries, s = r === void 0 ? ["/"] : r, i = t.initialIndex, o = i === void 0 ? 0 : i, a = t.keyLength, c = a === void 0 ? 6 : a, h = pr(), l = function(S) {
|
|
1391
|
-
Ks(x, S), x.length = x.entries.length, h.notifyListeners(x.location, x.action);
|
|
1392
|
-
}, u = function() {
|
|
1393
|
-
return Math.random().toString(36).substr(2, c);
|
|
1394
|
-
}, d = Pn(o, 0, s.length - 1), p = s.map(function(N) {
|
|
1395
|
-
return typeof N == "string" ? vt(N, void 0, u()) : vt(N, void 0, N.key || u());
|
|
1396
|
-
}), b = dr, v = function(S, D) {
|
|
1397
|
-
nt(!((typeof S == "undefined" ? "undefined" : An(S)) === "object" && S.state !== void 0 && D !== void 0), "You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");
|
|
1398
|
-
var z = "PUSH", V = vt(S, D, u(), x.location);
|
|
1399
|
-
h.confirmTransitionTo(V, z, e, function(T) {
|
|
1400
|
-
if (T) {
|
|
1401
|
-
var f = x.index, w = f + 1, y = x.entries.slice(0);
|
|
1402
|
-
y.length > w ? y.splice(w, y.length - w, V) : y.push(V), l({
|
|
1403
|
-
action: z,
|
|
1404
|
-
location: V,
|
|
1405
|
-
index: w,
|
|
1406
|
-
entries: y
|
|
1407
|
-
});
|
|
1408
|
-
}
|
|
1409
|
-
});
|
|
1410
|
-
}, g = function(S, D) {
|
|
1411
|
-
nt(!((typeof S == "undefined" ? "undefined" : An(S)) === "object" && S.state !== void 0 && D !== void 0), "You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");
|
|
1412
|
-
var z = "REPLACE", V = vt(S, D, u(), x.location);
|
|
1413
|
-
h.confirmTransitionTo(V, z, e, function(T) {
|
|
1414
|
-
T && (x.entries[x.index] = V, l({ action: z, location: V }));
|
|
1415
|
-
});
|
|
1416
|
-
}, E = function(S) {
|
|
1417
|
-
var D = Pn(x.index + S, 0, x.entries.length - 1), z = "POP", V = x.entries[D];
|
|
1418
|
-
h.confirmTransitionTo(V, z, e, function(T) {
|
|
1419
|
-
T ? l({
|
|
1420
|
-
action: z,
|
|
1421
|
-
location: V,
|
|
1422
|
-
index: D
|
|
1423
|
-
}) : l();
|
|
1424
|
-
});
|
|
1425
|
-
}, R = function() {
|
|
1426
|
-
return E(-1);
|
|
1427
|
-
}, F = function() {
|
|
1428
|
-
return E(1);
|
|
1429
|
-
}, H = function(S) {
|
|
1430
|
-
var D = x.index + S;
|
|
1431
|
-
return D >= 0 && D < x.entries.length;
|
|
1432
|
-
}, k = function() {
|
|
1433
|
-
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
1434
|
-
return h.setPrompt(S);
|
|
1435
|
-
}, U = function(S) {
|
|
1436
|
-
return h.appendListener(S);
|
|
1437
|
-
}, x = {
|
|
1438
|
-
length: p.length,
|
|
1439
|
-
action: "POP",
|
|
1440
|
-
location: p[d],
|
|
1441
|
-
index: d,
|
|
1442
|
-
entries: p,
|
|
1443
|
-
createHref: b,
|
|
1444
|
-
push: v,
|
|
1445
|
-
replace: g,
|
|
1446
|
-
go: E,
|
|
1447
|
-
goBack: R,
|
|
1448
|
-
goForward: F,
|
|
1449
|
-
canGo: H,
|
|
1450
|
-
block: k,
|
|
1451
|
-
listen: U
|
|
1452
|
-
};
|
|
1453
|
-
return x;
|
|
1454
|
-
}, Ys = Object.defineProperty, Cn = Object.getOwnPropertySymbols, Zs = Object.prototype.hasOwnProperty, Qs = Object.prototype.propertyIsEnumerable, Sn = (n, t, e) => t in n ? Ys(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, xt = (n, t) => {
|
|
1455
|
-
for (var e in t || (t = {}))
|
|
1456
|
-
Zs.call(t, e) && Sn(n, e, t[e]);
|
|
1457
|
-
if (Cn)
|
|
1458
|
-
for (var e of Cn(t))
|
|
1459
|
-
Qs.call(t, e) && Sn(n, e, t[e]);
|
|
1460
|
-
return n;
|
|
1461
|
-
}, Zt = (n, t, e) => new Promise((r, s) => {
|
|
1462
|
-
var i = (c) => {
|
|
1463
|
-
try {
|
|
1464
|
-
a(e.next(c));
|
|
1465
|
-
} catch (h) {
|
|
1466
|
-
s(h);
|
|
1467
|
-
}
|
|
1468
|
-
}, o = (c) => {
|
|
1469
|
-
try {
|
|
1470
|
-
a(e.throw(c));
|
|
1471
|
-
} catch (h) {
|
|
1472
|
-
s(h);
|
|
1473
|
-
}
|
|
1474
|
-
}, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, o);
|
|
1475
|
-
a((e = e.apply(n, t)).next());
|
|
1476
|
-
}), P = /* @__PURE__ */ ((n) => (n.Cookie = "cookie", n.Local = "local", n.Session = "session", n))(P || {}), Lt = /* @__PURE__ */ ((n) => (n.Tenant = "tenant", n.Implementation = "implementation", n.Widget = "widget", n))(Lt || {}), C = /* @__PURE__ */ ((n) => (n.Necessary = "necessary", n.Functional = "functional", n.Analytical = "analytical", n.Marketing = "marketing", n))(C || {});
|
|
1477
|
-
const rt = (n, t, e, r = {}) => kn(n, e).then((s) => (process.env.NODE_ENV !== "production" && s && I.warn(
|
|
1478
|
-
`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
1479
|
-
Key: ${t}
|
|
1480
|
-
Category: ${JSON.stringify(e)}
|
|
1481
|
-
Options: ${JSON.stringify(r)}`
|
|
1482
|
-
), (i) => (sn(n), kn(n, e).then((o) => {
|
|
1483
|
-
if (o) {
|
|
1484
|
-
process.env.NODE_ENV !== "production" && I.warn(
|
|
1485
|
-
`storageWriter: Attempted to write to storage using unallowed category.
|
|
1486
|
-
Key: ${t}
|
|
1487
|
-
Category: ${JSON.stringify(e)}
|
|
1488
|
-
Value: ${JSON.stringify(i)}
|
|
1489
|
-
Options: ${JSON.stringify(r)}`
|
|
1490
|
-
);
|
|
1491
|
-
return;
|
|
1492
|
-
}
|
|
1493
|
-
const {
|
|
1494
|
-
scope: a = Lt.Widget,
|
|
1495
|
-
medium: c = P.Session,
|
|
1496
|
-
duration: h
|
|
1497
|
-
} = r, l = ti();
|
|
1498
|
-
return l[a][t] = rn(i, e, h), c === P.Cookie ? si(n, l) : oi(n, c, l);
|
|
1499
|
-
})))), Z = (n, t, e = P.Session) => (sn(n), typeof t == "undefined" ? (process.env.NODE_ENV !== "production" && I.warn("readStorage: Undefined key passed when reading storage. ", t, e), Promise.resolve(void 0)) : e === P.Cookie ? ri(n).then((r) => de(r, t)) : ii(n, e).then((r) => de(r, t))), Ct = (n) => !!Object.entries(n).filter(([t, e]) => typeof e != "undefined").length, ke = (n) => Object.entries(n).filter(([t, e]) => typeof e != "undefined").forEach(([t, { value: e }]) => {
|
|
1500
|
-
typeof e == "undefined" && delete n[t];
|
|
1501
|
-
}), gr = (n, t) => {
|
|
1502
|
-
const e = {
|
|
1503
|
-
tenant: xt(xt({}, n.tenant), t.tenant),
|
|
1504
|
-
implementation: xt(xt({}, n.implementation), t.implementation),
|
|
1505
|
-
widget: xt(xt({}, n.widget), t.widget)
|
|
1506
|
-
};
|
|
1507
|
-
return ke(e.tenant), ke(e.implementation), ke(e.widget), e;
|
|
1508
|
-
}, Xs = (n) => Object.entries(n).reduce((t, e) => {
|
|
1509
|
-
const [r, s] = e;
|
|
1510
|
-
return Object.entries(s).forEach((i) => {
|
|
1511
|
-
const [o, { expiration: a }] = i;
|
|
1512
|
-
a && t.push(a);
|
|
1513
|
-
}), t;
|
|
1514
|
-
}, []).slice().sort((t, e) => new Date(e).valueOf() - new Date(t).valueOf()).shift() || Ee(), Oe = (n) => {
|
|
1515
|
-
const {
|
|
1516
|
-
name: t,
|
|
1517
|
-
implementation: { name: e, tenant: r }
|
|
1518
|
-
} = n.get("$widget");
|
|
1519
|
-
return [
|
|
1520
|
-
`humany_${r}`,
|
|
1521
|
-
`humany_${mn(r + e)}`,
|
|
1522
|
-
`humany_${mn(r + e + t)}`
|
|
1523
|
-
];
|
|
1524
|
-
}, Ne = (n) => {
|
|
1525
|
-
const t = new RegExp(`(?:^|;)\\s?${n}=(.*?)(?:;|$)`, "i"), e = document.cookie.match(t);
|
|
1526
|
-
return e && e[1] && JSON.parse(e[1]) || void 0;
|
|
1527
|
-
}, Le = (n, t, e) => {
|
|
1528
|
-
const r = `${n}=${JSON.stringify(t).trim()}`, s = `expires=${new Date(e).toUTCString()}`, i = "path=/", o = "SameSite=None;Secure";
|
|
1529
|
-
return document.cookie = `${r}; ${s}; ${i}; ${o}`;
|
|
1530
|
-
}, nn = (n) => {
|
|
1531
|
-
const [t, e, r] = Oe(n), s = Ne(t) || {}, i = Ne(e) || {}, o = Ne(r) || {};
|
|
1532
|
-
return {
|
|
1533
|
-
tenant: s,
|
|
1534
|
-
implementation: i,
|
|
1535
|
-
widget: o
|
|
1536
|
-
};
|
|
1537
|
-
}, fr = (n, t) => {
|
|
1538
|
-
const e = nn(n), r = gr(e, t), [s, i, o] = Oe(n), { tenant: a, implementation: c, widget: h } = r, l = Xs(t), u = Ee({ days: -1 });
|
|
1539
|
-
Le(s, a, Ct(a) ? l : u), Le(
|
|
1540
|
-
i,
|
|
1541
|
-
c,
|
|
1542
|
-
Ct(c) ? l : u
|
|
1543
|
-
), Le(o, h, Ct(h) ? l : u);
|
|
1544
|
-
}, ue = (n, t) => {
|
|
1545
|
-
const [e, r, s] = Oe(n), i = t.getItem(e) || "{}", o = t.getItem(r) || "{}", a = t.getItem(s) || "{}";
|
|
1546
|
-
return {
|
|
1547
|
-
tenant: JSON.parse(i),
|
|
1548
|
-
implementation: JSON.parse(o),
|
|
1549
|
-
widget: JSON.parse(a)
|
|
1550
|
-
};
|
|
1551
|
-
}, Ke = (n, t, e) => {
|
|
1552
|
-
const r = ue(n, t), s = gr(r, e), [i, o, a] = Oe(n), { tenant: c, implementation: h, widget: l } = s;
|
|
1553
|
-
Ct(c) ? t.setItem(i, JSON.stringify(c)) : t.removeItem(i), Ct(h) ? t.setItem(o, JSON.stringify(h)) : t.removeItem(o), Ct(l) ? t.setItem(a, JSON.stringify(l)) : t.removeItem(a);
|
|
1554
|
-
}, ti = () => ({ tenant: {}, implementation: {}, widget: {} }), ei = (n) => n ? !!n && /* @__PURE__ */ new Date() > new Date(n) : !1, de = (n, t) => {
|
|
1555
|
-
const e = n.widget[t] || n.implementation[t] || n.tenant[t];
|
|
1556
|
-
return e == null ? void 0 : e.value;
|
|
1557
|
-
}, rn = (n, t, e) => e ? {
|
|
1558
|
-
value: n,
|
|
1559
|
-
category: t,
|
|
1560
|
-
expiration: typeof e == "object" ? Ee(e) : e
|
|
1561
|
-
} : {
|
|
1562
|
-
value: n,
|
|
1563
|
-
category: t
|
|
1564
|
-
}, re = (n, t) => {
|
|
1565
|
-
const e = as(n);
|
|
1566
|
-
return Object.entries(e).forEach(([r, s]) => {
|
|
1567
|
-
Object.entries(s).forEach(([i, o]) => {
|
|
1568
|
-
const { expiration: a, category: c } = o;
|
|
1569
|
-
(ei(a) || ni(t, c)) && (s[i] = rn(void 0, c, a));
|
|
1570
|
-
});
|
|
1571
|
-
}), e;
|
|
1572
|
-
}, kn = (n, t) => Z(n, "storagePolicy", P.Cookie).then(
|
|
1573
|
-
(e = [C.Necessary]) => !!t && e.indexOf(t) === -1
|
|
1574
|
-
), ni = (n = [C.Necessary], t) => !!t && n.indexOf(t) === -1, sn = (n) => {
|
|
1575
|
-
const t = nn(n), e = ue(n, window.localStorage), r = ue(n, sessionStorage), s = de(t, "storagePolicy"), [i, o, a] = [
|
|
1576
|
-
t,
|
|
1577
|
-
e,
|
|
1578
|
-
r
|
|
1579
|
-
].map((c) => re(c, s));
|
|
1580
|
-
fr(n, i), Ke(n, window.localStorage, o), Ke(n, window.sessionStorage, a);
|
|
1581
|
-
}, Ee = (n = { days: 30 }) => {
|
|
1582
|
-
const { days: t = 0, hours: e = 0, minutes: r = 0, seconds: s = 0 } = n, i = /* @__PURE__ */ new Date();
|
|
1583
|
-
return i.setTime(i.getTime() + e * 60 * 60 * 1e3), i.setTime(i.getTime() + t * 24 * 60 * 60 * 1e3), i.setTime(i.getTime() + r * 60 * 1e3), i.setTime(i.getTime() + s * 1e3), i.toISOString();
|
|
1584
|
-
}, ri = (n) => X(document)(() => nn(n)), si = (n, t) => X(document)(() => fr(n, t)), ii = (n, t) => {
|
|
1585
|
-
const e = t === P.Local ? window.localStorage : window.sessionStorage;
|
|
1586
|
-
return X(e)(() => ue(n, e));
|
|
1587
|
-
}, oi = (n, t, e) => {
|
|
1588
|
-
const r = t === P.Local ? window.localStorage : window.sessionStorage;
|
|
1589
|
-
return X(r)(() => Ke(n, r, e));
|
|
1590
|
-
};
|
|
1591
|
-
let se = class {
|
|
1592
|
-
constructor() {
|
|
1593
|
-
this.memory = {
|
|
1594
|
-
tenant: {},
|
|
1595
|
-
implementation: {},
|
|
1596
|
-
widget: {}
|
|
1597
|
-
};
|
|
1598
|
-
}
|
|
1599
|
-
setItem(t, e) {
|
|
1600
|
-
return Zt(this, arguments, function* (r, s, i = {}) {
|
|
1601
|
-
return X(this)(() => {
|
|
1602
|
-
const o = re(this.memory, [C.Necessary]), { scope: a = Lt.Tenant, expiration: c } = i;
|
|
1603
|
-
o[a][r] = rn(
|
|
1604
|
-
s,
|
|
1605
|
-
C.Necessary,
|
|
1606
|
-
(c == null ? void 0 : c.toISOString()) || Ee()
|
|
1607
|
-
), this.memory = o, process.env.NODE_ENV !== "production" && I.warn(
|
|
1608
|
-
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value stored temporarily in memory.
|
|
1609
|
-
Key: ${r}
|
|
1610
|
-
Value: ${JSON.stringify(s)}
|
|
1611
|
-
Options: ${JSON.stringify(i)}
|
|
1612
|
-
Memory: ${JSON.stringify(o)}`
|
|
1613
|
-
);
|
|
1614
|
-
});
|
|
1615
|
-
});
|
|
1616
|
-
}
|
|
1617
|
-
getItem(t) {
|
|
1618
|
-
return Zt(this, null, function* () {
|
|
1619
|
-
return X(this)(() => {
|
|
1620
|
-
const e = re(this.memory, [C.Necessary]);
|
|
1621
|
-
process.env.NODE_ENV !== "production" && I.warn(
|
|
1622
|
-
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value fetched from legacy memory storage.
|
|
1623
|
-
Key: ${t}
|
|
1624
|
-
Memory: ${JSON.stringify(e)}`
|
|
1625
|
-
);
|
|
1626
|
-
const r = de(e, t);
|
|
1627
|
-
return this.memory = e, r;
|
|
1628
|
-
});
|
|
1629
|
-
});
|
|
1630
|
-
}
|
|
1631
|
-
removeItem(t) {
|
|
1632
|
-
return Zt(this, null, function* () {
|
|
1633
|
-
return X(this)(() => {
|
|
1634
|
-
const e = re(this.memory, [C.Necessary]);
|
|
1635
|
-
delete e.tenant[t], delete e.implementation[t], delete e.widget[t], this.memory = e, process.env.NODE_ENV !== "production" && I.warn(
|
|
1636
|
-
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value removed from memory.
|
|
1637
|
-
Key: ${t}
|
|
1638
|
-
Memory: ${JSON.stringify(e)}`
|
|
1639
|
-
);
|
|
1640
|
-
});
|
|
1641
|
-
});
|
|
1642
|
-
}
|
|
1643
|
-
clear() {
|
|
1644
|
-
return Zt(this, null, function* () {
|
|
1645
|
-
return Promise.resolve();
|
|
1646
|
-
});
|
|
1647
|
-
}
|
|
1648
|
-
}, ai = class {
|
|
1649
|
-
constructor() {
|
|
1650
|
-
this.cookies = new se(), this.session = new se(), this.local = new se();
|
|
1651
|
-
}
|
|
1652
|
-
};
|
|
1653
|
-
const Me = (n, t, e, ...r) => {
|
|
1654
|
-
const s = `[${n.get("$environment").name || "webprovisions"}] ${e}`;
|
|
1655
|
-
switch (t) {
|
|
1656
|
-
case "info":
|
|
1657
|
-
console.info(s, ...r);
|
|
1658
|
-
break;
|
|
1659
|
-
case "warning":
|
|
1660
|
-
console.warn(s, ...r);
|
|
1661
|
-
break;
|
|
1662
|
-
case "error":
|
|
1663
|
-
console.error(s, ...r);
|
|
1664
|
-
break;
|
|
1665
|
-
}
|
|
1666
|
-
}, ci = (n) => {
|
|
1667
|
-
const t = n.container || n;
|
|
1668
|
-
return {
|
|
1669
|
-
info: (e, ...r) => Me(t, "info", e, ...r),
|
|
1670
|
-
warn: (e, ...r) => Me(t, "warning", e, ...r),
|
|
1671
|
-
error: (e, ...r) => Me(t, "error", e, ...r)
|
|
1672
|
-
};
|
|
1673
|
-
};
|
|
1674
|
-
var pe = /* @__PURE__ */ ((n) => (n.Implementation = "implementation", n.Widget = "widget", n))(pe || {}), yt = /* @__PURE__ */ ((n) => (n.Pre = "pre", n.Post = "post", n))(yt || {});
|
|
1675
|
-
const hi = (n, t, e, r) => {
|
|
1676
|
-
try {
|
|
1677
|
-
const s = new t(e, r);
|
|
1678
|
-
return {
|
|
1679
|
-
name: n,
|
|
1680
|
-
invoke: (i, o) => {
|
|
1681
|
-
let a;
|
|
1682
|
-
return s[i] && (a = s[i].call(s, o)), Promise.resolve(a);
|
|
1683
|
-
},
|
|
1684
|
-
getInstance: () => s
|
|
1685
|
-
};
|
|
1686
|
-
} catch (s) {
|
|
1687
|
-
if (s.message && s.message.indexOf("is not a constructor") >= 0)
|
|
1688
|
-
return {
|
|
1689
|
-
name: n,
|
|
1690
|
-
invoke: (i) => {
|
|
1691
|
-
let o;
|
|
1692
|
-
return i === "initialize" && (o = t(e, r)), Promise.resolve(o);
|
|
1693
|
-
},
|
|
1694
|
-
getInstance: () => t
|
|
1695
|
-
};
|
|
1696
|
-
throw s;
|
|
1697
|
-
}
|
|
1698
|
-
};
|
|
1699
|
-
function Nn(n, t) {
|
|
1700
|
-
return typeof n == "undefined" ? t : n;
|
|
1701
|
-
}
|
|
1702
|
-
let li = class {
|
|
1703
|
-
constructor(t = {}) {
|
|
1704
|
-
this.part = t;
|
|
1705
|
-
}
|
|
1706
|
-
createCommand(t, e, r) {
|
|
1707
|
-
let s;
|
|
1708
|
-
typeof e == "function" ? s = {
|
|
1709
|
-
scope: pe.Widget,
|
|
1710
|
-
stage: yt.Post,
|
|
1711
|
-
defaultArgs: void 0,
|
|
1712
|
-
handlerResolver: e
|
|
1713
|
-
} : s = {
|
|
1714
|
-
scope: Nn(e.scope, pe.Widget),
|
|
1715
|
-
stage: Nn(e.stage, yt.Post),
|
|
1716
|
-
defaultArgs: e.defaultArgs,
|
|
1717
|
-
handlerResolver: r
|
|
1718
|
-
};
|
|
1719
|
-
let i = this.part;
|
|
1720
|
-
const o = t.split(".");
|
|
1721
|
-
return o.forEach((a, c) => {
|
|
1722
|
-
c === o.length - 1 ? i[a] || (i[a] = () => s) : i = this.part[a] = this.part[a] || {};
|
|
1723
|
-
}), this;
|
|
1724
|
-
}
|
|
1725
|
-
get() {
|
|
1726
|
-
return this.part;
|
|
1727
|
-
}
|
|
1728
|
-
};
|
|
1729
|
-
const mr = (n) => {
|
|
1730
|
-
const t = new li({});
|
|
1731
|
-
return n(t), t.get();
|
|
1732
|
-
};
|
|
1733
|
-
mr((n) => {
|
|
1734
|
-
n.createCommand(
|
|
1735
|
-
"types.register",
|
|
1736
|
-
{ scope: pe.Implementation, stage: yt.Pre },
|
|
1737
|
-
(t) => (e, r) => {
|
|
1738
|
-
t.container.get("$types")[e] = r;
|
|
1739
|
-
}
|
|
1740
|
-
).createCommand(
|
|
1741
|
-
"type",
|
|
1742
|
-
{ stage: yt.Pre },
|
|
1743
|
-
(t) => (e) => {
|
|
1744
|
-
t.container.register("$type", e);
|
|
1745
|
-
}
|
|
1746
|
-
).createCommand(
|
|
1747
|
-
"settings",
|
|
1748
|
-
{ stage: yt.Pre, defaultArgs: [null] },
|
|
1749
|
-
(t) => (e) => {
|
|
1750
|
-
t.events.dispatch(
|
|
1751
|
-
"settings:change",
|
|
1752
|
-
e,
|
|
1753
|
-
{ bubbles: !0 }
|
|
1754
|
-
), t.container.register("$settings", e);
|
|
1755
|
-
}
|
|
1756
|
-
).createCommand(
|
|
1757
|
-
"plugin",
|
|
1758
|
-
{ stage: yt.Pre },
|
|
1759
|
-
(t) => (e, r, s) => {
|
|
1760
|
-
const { container: i } = t;
|
|
1761
|
-
let o = null, a = e, c = r;
|
|
1762
|
-
typeof e == "string" && (o = e, a = r, c = s);
|
|
1763
|
-
const h = (l) => {
|
|
1764
|
-
const { transformPluginSettings: u } = t.container.get("$environmentOptions"), d = u ? u(
|
|
1765
|
-
c || {},
|
|
1766
|
-
o,
|
|
1767
|
-
t.container,
|
|
1768
|
-
a
|
|
1769
|
-
) : r;
|
|
1770
|
-
try {
|
|
1771
|
-
const p = hi(
|
|
1772
|
-
o,
|
|
1773
|
-
a,
|
|
1774
|
-
i,
|
|
1775
|
-
d
|
|
1776
|
-
);
|
|
1777
|
-
i.get("$plugins").push(p), l && p.invoke("initialize", null);
|
|
1778
|
-
} catch (p) {
|
|
1779
|
-
ci(t).warn("Error when initializing plugin", p);
|
|
1780
|
-
}
|
|
1781
|
-
};
|
|
1782
|
-
t.container.get("$instance") ? h(!0) : t.events.subscribeOnce("widget:instance-created", () => h(!1));
|
|
1783
|
-
}
|
|
1784
|
-
).createCommand(
|
|
1785
|
-
"container.register",
|
|
1786
|
-
(t) => (e, r) => {
|
|
1787
|
-
t.container.register(e, r);
|
|
1788
|
-
}
|
|
1789
|
-
).createCommand(
|
|
1790
|
-
"container.registerAsync",
|
|
1791
|
-
(t) => (e, r) => {
|
|
1792
|
-
t.container.registerAsync(e, r);
|
|
1793
|
-
}
|
|
1794
|
-
).createCommand(
|
|
1795
|
-
"container.registerFactory",
|
|
1796
|
-
(t) => (e, r) => {
|
|
1797
|
-
t.container.registerFactory(e, r);
|
|
1798
|
-
}
|
|
1799
|
-
).createCommand(
|
|
1800
|
-
"container.touch",
|
|
1801
|
-
(t) => (e, r) => {
|
|
1802
|
-
t.container.touch(e, r);
|
|
1803
|
-
}
|
|
1804
|
-
).createCommand(
|
|
1805
|
-
"csp",
|
|
1806
|
-
{},
|
|
1807
|
-
(t) => (e) => {
|
|
1808
|
-
t.container.register("csp", e);
|
|
1809
|
-
}
|
|
1810
|
-
);
|
|
1811
|
-
});
|
|
1812
|
-
mr((n) => {
|
|
1813
|
-
n.createCommand("storage", (t) => (e = {}) => {
|
|
1814
|
-
const { consent: r } = e;
|
|
1815
|
-
if (typeof r != "undefined") {
|
|
1816
|
-
if (typeof r != "number" && typeof r != "string" && !Array.isArray(r)) {
|
|
1817
|
-
process.env.NODE_ENV !== "production" && I.warn(
|
|
1818
|
-
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1819
|
-
Passed consent: ${JSON.stringify(r)}`
|
|
1820
|
-
);
|
|
1821
|
-
return;
|
|
1822
|
-
}
|
|
1823
|
-
if (Array.isArray(r) && !r.every(
|
|
1824
|
-
(i) => typeof i == "number" || typeof i == "string"
|
|
1825
|
-
)) {
|
|
1826
|
-
process.env.NODE_ENV !== "production" && I.warn(
|
|
1827
|
-
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1828
|
-
Passed consent: ${JSON.stringify(r)}`
|
|
1829
|
-
);
|
|
1830
|
-
return;
|
|
1831
|
-
}
|
|
1832
|
-
const s = [
|
|
1833
|
-
C.Necessary,
|
|
1834
|
-
C.Functional,
|
|
1835
|
-
C.Analytical,
|
|
1836
|
-
C.Marketing
|
|
1837
|
-
].filter((i, o, a) => typeof r == "number" ? r > o : typeof r == "string" ? a.indexOf(r) + 1 > o : Array.isArray(r) ? r.findIndex((c) => c === o + 1 || c === i) > -1 : !0);
|
|
1838
|
-
return s.indexOf(C.Necessary) === -1 && (process.env.NODE_ENV !== "production" && I.warn(
|
|
1839
|
-
`storagePolicyConfigurationApi: passed consent does not include category: '${C.Necessary}'. Consent has to atleast include the '${C.Necessary}' category.
|
|
1840
|
-
Passed consent: ${JSON.stringify(r)}`
|
|
1841
|
-
), s.unshift(C.Necessary)), rt(
|
|
1842
|
-
t.container,
|
|
1843
|
-
"storagePolicy",
|
|
1844
|
-
C.Necessary,
|
|
1845
|
-
{
|
|
1846
|
-
medium: P.Cookie,
|
|
1847
|
-
scope: Lt.Tenant,
|
|
1848
|
-
duration: { days: 365 }
|
|
1849
|
-
}
|
|
1850
|
-
).then((i) => i(s)).then(() => {
|
|
1851
|
-
sn(t.container), t.events.dispatch("storage:policy-changed", s);
|
|
1852
|
-
});
|
|
1853
|
-
}
|
|
1854
|
-
});
|
|
1855
|
-
});
|
|
1856
|
-
const ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1857
|
-
__proto__: null,
|
|
1858
|
-
StorageCategory: C,
|
|
1859
|
-
StorageMedium: P,
|
|
1860
|
-
StorageProvider: ai,
|
|
1861
|
-
StorageScope: Lt,
|
|
1862
|
-
StorageService: se,
|
|
1863
|
-
createStorageWriter: rt,
|
|
1864
|
-
readStorage: Z
|
|
1865
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1866
|
-
var di = Object.defineProperty, pi = Object.defineProperties, gi = Object.getOwnPropertyDescriptors, ge = Object.getOwnPropertySymbols, vr = Object.prototype.hasOwnProperty, yr = Object.prototype.propertyIsEnumerable, Ln = (n, t, e) => t in n ? di(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, At = (n, t) => {
|
|
1867
|
-
for (var e in t || (t = {}))
|
|
1868
|
-
vr.call(t, e) && Ln(n, e, t[e]);
|
|
1869
|
-
if (ge)
|
|
1870
|
-
for (var e of ge(t))
|
|
1871
|
-
yr.call(t, e) && Ln(n, e, t[e]);
|
|
1872
|
-
return n;
|
|
1873
|
-
}, br = (n, t) => pi(n, gi(t)), fi = (n, t) => {
|
|
1874
|
-
var e = {};
|
|
1875
|
-
for (var r in n)
|
|
1876
|
-
vr.call(n, r) && t.indexOf(r) < 0 && (e[r] = n[r]);
|
|
1877
|
-
if (n != null && ge)
|
|
1878
|
-
for (var r of ge(n))
|
|
1879
|
-
t.indexOf(r) < 0 && yr.call(n, r) && (e[r] = n[r]);
|
|
1880
|
-
return e;
|
|
1881
|
-
};
|
|
1882
|
-
function wr(n) {
|
|
1883
|
-
if (n.__esModule)
|
|
1884
|
-
return n;
|
|
1885
|
-
var t = n.default;
|
|
1886
|
-
if (typeof t == "function") {
|
|
1887
|
-
var e = function r() {
|
|
1888
|
-
if (this instanceof r) {
|
|
1889
|
-
var s = [null];
|
|
1890
|
-
s.push.apply(s, arguments);
|
|
1891
|
-
var i = Function.bind.apply(t, s);
|
|
1892
|
-
return new i();
|
|
1893
|
-
}
|
|
1894
|
-
return t.apply(this, arguments);
|
|
1895
|
-
};
|
|
1896
|
-
e.prototype = t.prototype;
|
|
1897
|
-
} else
|
|
1898
|
-
e = {};
|
|
1899
|
-
return Object.defineProperty(e, "__esModule", { value: !0 }), Object.keys(n).forEach(function(r) {
|
|
1900
|
-
var s = Object.getOwnPropertyDescriptor(n, r);
|
|
1901
|
-
Object.defineProperty(e, r, s.get ? s : {
|
|
1902
|
-
enumerable: !0,
|
|
1903
|
-
get: function() {
|
|
1904
|
-
return n[r];
|
|
1905
|
-
}
|
|
1906
|
-
});
|
|
1907
|
-
}), e;
|
|
1908
|
-
}
|
|
1909
|
-
var $r = function() {
|
|
1910
|
-
};
|
|
1911
|
-
process.env.NODE_ENV !== "production" && ($r = function(n, t, e) {
|
|
1912
|
-
var r = arguments.length;
|
|
1913
|
-
e = new Array(r > 2 ? r - 2 : 0);
|
|
1914
|
-
for (var s = 2; s < r; s++)
|
|
1915
|
-
e[s - 2] = arguments[s];
|
|
1916
|
-
if (t === void 0)
|
|
1917
|
-
throw new Error(
|
|
1918
|
-
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
1919
|
-
);
|
|
1920
|
-
if (t.length < 10 || /^[s\W]*$/.test(t))
|
|
1921
|
-
throw new Error(
|
|
1922
|
-
"The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: " + t
|
|
1923
|
-
);
|
|
1924
|
-
if (!n) {
|
|
1925
|
-
var i = 0, o = "Warning: " + t.replace(/%s/g, function() {
|
|
1926
|
-
return e[i++];
|
|
1927
|
-
});
|
|
1928
|
-
typeof console != "undefined" && console.error(o);
|
|
1929
|
-
try {
|
|
1930
|
-
throw new Error(o);
|
|
1931
|
-
} catch (a) {
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
});
|
|
1935
|
-
var mi = $r, vi = mi, Mn = yi(vi);
|
|
1936
|
-
function yi(n) {
|
|
1937
|
-
return n && n.__esModule ? n : { default: n };
|
|
1938
|
-
}
|
|
1939
|
-
var bi = function() {
|
|
1940
|
-
var n = null, t = function(o) {
|
|
1941
|
-
return (0, Mn.default)(n == null, "A history supports only one prompt at a time"), n = o, function() {
|
|
1942
|
-
n === o && (n = null);
|
|
1943
|
-
};
|
|
1944
|
-
}, e = function(o, a, c, h) {
|
|
1945
|
-
if (n != null) {
|
|
1946
|
-
var l = typeof n == "function" ? n(o, a) : n;
|
|
1947
|
-
typeof l == "string" ? typeof c == "function" ? c(l, h) : ((0, Mn.default)(!1, "A history needs a getUserConfirmation function in order to use a prompt message"), h(!0)) : h(l !== !1);
|
|
1948
|
-
} else
|
|
1949
|
-
h(!0);
|
|
1950
|
-
}, r = [], s = function(o) {
|
|
1951
|
-
var a = !0, c = function() {
|
|
1952
|
-
a && o.apply(void 0, arguments);
|
|
1953
|
-
};
|
|
1954
|
-
return r.push(c), function() {
|
|
1955
|
-
a = !1, r = r.filter(function(h) {
|
|
1956
|
-
return h !== c;
|
|
1957
|
-
});
|
|
1958
|
-
};
|
|
1959
|
-
}, i = function() {
|
|
1960
|
-
for (var o = arguments.length, a = Array(o), c = 0; c < o; c++)
|
|
1961
|
-
a[c] = arguments[c];
|
|
1962
|
-
r.forEach(function(h) {
|
|
1963
|
-
return h.apply(void 0, a);
|
|
1964
|
-
});
|
|
1965
|
-
};
|
|
1966
|
-
return {
|
|
1967
|
-
setPrompt: t,
|
|
1968
|
-
confirmTransitionTo: e,
|
|
1969
|
-
appendListener: s,
|
|
1970
|
-
notifyListeners: i
|
|
1971
|
-
};
|
|
1972
|
-
}, Or = bi, Er;
|
|
1973
|
-
Er = function(n, t) {
|
|
1974
|
-
return t(window.confirm(n));
|
|
1975
|
-
};
|
|
1976
|
-
function Qt(n) {
|
|
1977
|
-
return n.charAt(0) === "/";
|
|
1978
|
-
}
|
|
1979
|
-
function De(n, t) {
|
|
1980
|
-
for (var e = t, r = e + 1, s = n.length; r < s; e += 1, r += 1)
|
|
1981
|
-
n[e] = n[r];
|
|
1982
|
-
n.pop();
|
|
1983
|
-
}
|
|
1984
|
-
function wi(n) {
|
|
1985
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", e = n && n.split("/") || [], r = t && t.split("/") || [], s = n && Qt(n), i = t && Qt(t), o = s || i;
|
|
1986
|
-
if (n && Qt(n) ? r = e : e.length && (r.pop(), r = r.concat(e)), !r.length)
|
|
1987
|
-
return "/";
|
|
1988
|
-
var a = void 0;
|
|
1989
|
-
if (r.length) {
|
|
1990
|
-
var c = r[r.length - 1];
|
|
1991
|
-
a = c === "." || c === ".." || c === "";
|
|
1992
|
-
} else
|
|
1993
|
-
a = !1;
|
|
1994
|
-
for (var h = 0, l = r.length; l >= 0; l--) {
|
|
1995
|
-
var u = r[l];
|
|
1996
|
-
u === "." ? De(r, l) : u === ".." ? (De(r, l), h++) : h && (De(r, l), h--);
|
|
1997
|
-
}
|
|
1998
|
-
if (!o)
|
|
1999
|
-
for (; h--; h)
|
|
2000
|
-
r.unshift("..");
|
|
2001
|
-
o && r[0] !== "" && (!r[0] || !Qt(r[0])) && r.unshift("");
|
|
2002
|
-
var d = r.join("/");
|
|
2003
|
-
return a && d.substr(-1) !== "/" && (d += "/"), d;
|
|
2004
|
-
}
|
|
2005
|
-
const $i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2006
|
-
__proto__: null,
|
|
2007
|
-
default: wi
|
|
2008
|
-
}, Symbol.toStringTag, { value: "Module" })), Oi = /* @__PURE__ */ wr($i);
|
|
2009
|
-
var Dn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
2010
|
-
return typeof n;
|
|
2011
|
-
} : function(n) {
|
|
2012
|
-
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
2013
|
-
};
|
|
2014
|
-
function ie(n, t) {
|
|
2015
|
-
if (n === t)
|
|
2016
|
-
return !0;
|
|
2017
|
-
if (n == null || t == null)
|
|
2018
|
-
return !1;
|
|
2019
|
-
if (Array.isArray(n))
|
|
2020
|
-
return Array.isArray(t) && n.length === t.length && n.every(function(c, h) {
|
|
2021
|
-
return ie(c, t[h]);
|
|
2022
|
-
});
|
|
2023
|
-
var e = typeof n == "undefined" ? "undefined" : Dn(n), r = typeof t == "undefined" ? "undefined" : Dn(t);
|
|
2024
|
-
if (e !== r)
|
|
2025
|
-
return !1;
|
|
2026
|
-
if (e === "object") {
|
|
2027
|
-
var s = n.valueOf(), i = t.valueOf();
|
|
2028
|
-
if (s !== n || i !== t)
|
|
2029
|
-
return ie(s, i);
|
|
2030
|
-
var o = Object.keys(n), a = Object.keys(t);
|
|
2031
|
-
return o.length !== a.length ? !1 : o.every(function(c) {
|
|
2032
|
-
return ie(n[c], t[c]);
|
|
2033
|
-
});
|
|
2034
|
-
}
|
|
2035
|
-
return !1;
|
|
2036
|
-
}
|
|
2037
|
-
const Ei = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2038
|
-
__proto__: null,
|
|
2039
|
-
default: ie
|
|
2040
|
-
}, Symbol.toStringTag, { value: "Module" })), xi = /* @__PURE__ */ wr(Ei);
|
|
2041
|
-
var st = {}, at, xr, Ge, Ut;
|
|
2042
|
-
st.__esModule = !0;
|
|
2043
|
-
Ut = st.addLeadingSlash = function(n) {
|
|
2044
|
-
return n.charAt(0) === "/" ? n : "/" + n;
|
|
2045
|
-
};
|
|
2046
|
-
Ge = st.stripLeadingSlash = function(n) {
|
|
2047
|
-
return n.charAt(0) === "/" ? n.substr(1) : n;
|
|
2048
|
-
};
|
|
2049
|
-
var _i = st.hasBasename = function(n, t) {
|
|
2050
|
-
return new RegExp("^" + t + "(\\/|\\?|#|$)", "i").test(n);
|
|
2051
|
-
};
|
|
2052
|
-
st.stripBasename = function(n, t) {
|
|
2053
|
-
return _i(n, t) ? n.substr(t.length) : n;
|
|
2054
|
-
};
|
|
2055
|
-
xr = st.stripTrailingSlash = function(n) {
|
|
2056
|
-
return n.charAt(n.length - 1) === "/" ? n.slice(0, -1) : n;
|
|
2057
|
-
};
|
|
2058
|
-
st.parsePath = function(n) {
|
|
2059
|
-
var t = n || "/", e = "", r = "", s = t.indexOf("#");
|
|
2060
|
-
s !== -1 && (r = t.substr(s), t = t.substr(0, s));
|
|
2061
|
-
var i = t.indexOf("?");
|
|
2062
|
-
return i !== -1 && (e = t.substr(i), t = t.substr(0, i)), {
|
|
2063
|
-
pathname: t,
|
|
2064
|
-
search: e === "?" ? "" : e,
|
|
2065
|
-
hash: r === "#" ? "" : r
|
|
2066
|
-
};
|
|
2067
|
-
};
|
|
2068
|
-
at = st.createPath = function(n) {
|
|
2069
|
-
var t = n.pathname, e = n.search, r = n.hash, s = t || "/";
|
|
2070
|
-
return e && e !== "?" && (s += e.charAt(0) === "?" ? e : "?" + e), r && r !== "#" && (s += r.charAt(0) === "#" ? r : "#" + r), s;
|
|
2071
|
-
};
|
|
2072
|
-
var xe, _r = xe = void 0, Ai = Object.assign || function(n) {
|
|
2073
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
2074
|
-
var e = arguments[t];
|
|
2075
|
-
for (var r in e)
|
|
2076
|
-
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
|
|
2077
|
-
}
|
|
2078
|
-
return n;
|
|
2079
|
-
}, Pi = Oi, Ci = Ar(Pi), Si = xi, ki = Ar(Si), Ni = st;
|
|
2080
|
-
function Ar(n) {
|
|
2081
|
-
return n && n.__esModule ? n : { default: n };
|
|
2082
|
-
}
|
|
2083
|
-
xe = function(n, t, e, r) {
|
|
2084
|
-
var s = void 0;
|
|
2085
|
-
typeof n == "string" ? (s = (0, Ni.parsePath)(n), s.state = t) : (s = Ai({}, n), s.pathname === void 0 && (s.pathname = ""), s.search ? s.search.charAt(0) !== "?" && (s.search = "?" + s.search) : s.search = "", s.hash ? s.hash.charAt(0) !== "#" && (s.hash = "#" + s.hash) : s.hash = "", t !== void 0 && s.state === void 0 && (s.state = t));
|
|
2086
|
-
try {
|
|
2087
|
-
s.pathname = decodeURI(s.pathname);
|
|
2088
|
-
} catch (i) {
|
|
2089
|
-
throw i instanceof URIError ? new URIError('Pathname "' + s.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.') : i;
|
|
2090
|
-
}
|
|
2091
|
-
return e && (s.key = e), r ? s.pathname ? s.pathname.charAt(0) !== "/" && (s.pathname = (0, Ci.default)(s.pathname, r.pathname)) : s.pathname = r.pathname : s.pathname || (s.pathname = "/"), s;
|
|
2092
|
-
};
|
|
2093
|
-
_r = function(n, t) {
|
|
2094
|
-
return n.pathname === t.pathname && n.search === t.search && n.hash === t.hash && n.key === t.key && (0, ki.default)(n.state, t.state);
|
|
2095
|
-
};
|
|
2096
|
-
const Pr = "/", Cr = "./", Li = new RegExp(
|
|
2097
|
-
[
|
|
2098
|
-
// Match escaped characters that would otherwise appear in future matches.
|
|
2099
|
-
// This allows the user to escape special characters that won't transform.
|
|
2100
|
-
"(\\\\.)",
|
|
2101
|
-
// Match Express-style parameters and un-named parameters with a prefix
|
|
2102
|
-
// and optional suffixes. Matches appear as:
|
|
2103
|
-
//
|
|
2104
|
-
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?"]
|
|
2105
|
-
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined]
|
|
2106
|
-
"(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"
|
|
2107
|
-
].join("|"),
|
|
2108
|
-
"g"
|
|
2109
|
-
), Sr = (n, t) => {
|
|
2110
|
-
const e = [];
|
|
2111
|
-
let r = 0, s = 0, i = "";
|
|
2112
|
-
const o = t && t.delimiter || Pr, a = t && t.delimiters || Cr;
|
|
2113
|
-
let c = !1, h;
|
|
2114
|
-
for (; (h = Li.exec(n)) !== null; ) {
|
|
2115
|
-
const l = h[0], u = h[1], d = h.index;
|
|
2116
|
-
if (i += n.slice(s, d), s = d + l.length, u) {
|
|
2117
|
-
i += u[1], c = !0;
|
|
2118
|
-
continue;
|
|
2119
|
-
}
|
|
2120
|
-
let p = "";
|
|
2121
|
-
const b = n[s], v = h[2], g = h[3], E = h[4], R = h[5];
|
|
2122
|
-
if (!c && i.length) {
|
|
2123
|
-
const N = i.length - 1;
|
|
2124
|
-
a.indexOf(i[N]) > -1 && (p = i[N], i = i.slice(0, N));
|
|
2125
|
-
}
|
|
2126
|
-
i && (e.push(i), i = "", c = !1);
|
|
2127
|
-
const F = p !== "" && b !== void 0 && b !== p, H = R === "+" || R === "*", k = R === "?" || R === "*", U = p || o, x = g || E;
|
|
2128
|
-
e.push({
|
|
2129
|
-
delimiter: U,
|
|
2130
|
-
optional: k,
|
|
2131
|
-
repeat: H,
|
|
2132
|
-
partial: F,
|
|
2133
|
-
name: v || r++,
|
|
2134
|
-
// tslint:disable-line:no-increment-decrement
|
|
2135
|
-
prefix: p,
|
|
2136
|
-
pattern: x ? ji(x) : "[^" + Tt(U) + "]+?"
|
|
2137
|
-
});
|
|
2138
|
-
}
|
|
2139
|
-
return (i || s < n.length) && e.push(i + n.substr(s)), e;
|
|
2140
|
-
}, Mi = (n, t) => Di(Sr(n, t)), Di = (n) => {
|
|
2141
|
-
const t = new Array(n.length);
|
|
2142
|
-
for (let e = 0; e < n.length; e++)
|
|
2143
|
-
typeof n[e] == "object" && (t[e] = new RegExp("^(?:" + n[e].pattern + ")$"));
|
|
2144
|
-
return function(e, r) {
|
|
2145
|
-
let s = "";
|
|
2146
|
-
const i = r && r.encode || encodeURIComponent;
|
|
2147
|
-
for (let o = 0; o < n.length; o++) {
|
|
2148
|
-
const a = n[o];
|
|
2149
|
-
if (typeof a == "string") {
|
|
2150
|
-
s += a;
|
|
2151
|
-
continue;
|
|
2152
|
-
}
|
|
2153
|
-
const c = e ? e[a.name] : void 0;
|
|
2154
|
-
let h;
|
|
2155
|
-
if (Array.isArray(c)) {
|
|
2156
|
-
if (!a.repeat)
|
|
2157
|
-
throw new TypeError(
|
|
2158
|
-
'Expected "' + a.name + '" to not repeat, but got array'
|
|
2159
|
-
);
|
|
2160
|
-
if (c.length === 0) {
|
|
2161
|
-
if (a.optional)
|
|
2162
|
-
continue;
|
|
2163
|
-
throw new TypeError('Expected "' + a.name + '" to not be empty');
|
|
2164
|
-
}
|
|
2165
|
-
for (let l = 0; l < c.length; l++) {
|
|
2166
|
-
if (h = i(c[l], a), !t[o].test(h))
|
|
2167
|
-
throw new TypeError(
|
|
2168
|
-
'Expected all "' + a.name + '" to match "' + a.pattern + '"'
|
|
2169
|
-
);
|
|
2170
|
-
s += (l === 0 ? a.prefix : a.delimiter) + h;
|
|
2171
|
-
}
|
|
2172
|
-
continue;
|
|
2173
|
-
}
|
|
2174
|
-
if (typeof c == "string" || typeof c == "number" || typeof c == "boolean") {
|
|
2175
|
-
if (h = i(String(c), a), !t[o].test(h))
|
|
2176
|
-
throw new TypeError(
|
|
2177
|
-
'Expected "' + a.name + '" to match "' + a.pattern + '", but got "' + h + '"'
|
|
2178
|
-
);
|
|
2179
|
-
s += a.prefix + h;
|
|
2180
|
-
continue;
|
|
2181
|
-
}
|
|
2182
|
-
if (a.optional) {
|
|
2183
|
-
a.partial && (s += a.prefix);
|
|
2184
|
-
continue;
|
|
2185
|
-
}
|
|
2186
|
-
throw new TypeError(
|
|
2187
|
-
'Expected "' + a.name + '" to be ' + (a.repeat ? "an array" : "a string")
|
|
2188
|
-
);
|
|
2189
|
-
}
|
|
2190
|
-
return s;
|
|
2191
|
-
};
|
|
2192
|
-
}, Tt = (n) => n.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1"), ji = (n) => n.replace(/([=!:$/()])/g, "\\$1"), kr = (n) => n && n.sensitive ? "" : "i", Ri = (n, t) => {
|
|
2193
|
-
if (!t)
|
|
2194
|
-
return n;
|
|
2195
|
-
const e = n.source.match(/\((?!\?)/g);
|
|
2196
|
-
if (e)
|
|
2197
|
-
for (let r = 0; r < e.length; r++)
|
|
2198
|
-
t.push({
|
|
2199
|
-
name: r,
|
|
2200
|
-
prefix: "",
|
|
2201
|
-
delimiter: "",
|
|
2202
|
-
optional: !1,
|
|
2203
|
-
repeat: !1,
|
|
2204
|
-
partial: !1,
|
|
2205
|
-
pattern: ""
|
|
2206
|
-
});
|
|
2207
|
-
return n;
|
|
2208
|
-
}, Ti = (n, t, e) => {
|
|
2209
|
-
const r = [];
|
|
2210
|
-
for (let s = 0; s < n.length; s++)
|
|
2211
|
-
r.push(Nr(n[s], t, e).source);
|
|
2212
|
-
return new RegExp("(?:" + r.join("|") + ")", kr(e));
|
|
2213
|
-
}, Ii = (n, t, e) => Hi(Sr(n, e), t, e), Hi = (n, t, e) => {
|
|
2214
|
-
e = e || {};
|
|
2215
|
-
const r = e.strict, s = e.end !== !1, i = Tt(e.delimiter || Pr), o = e.delimiters || Cr, a = [].concat(e.endsWith || []).map(Tt).concat("$").join("|");
|
|
2216
|
-
let c = "", h = !1;
|
|
2217
|
-
for (let l = 0; l < n.length; l++) {
|
|
2218
|
-
const u = n[l];
|
|
2219
|
-
if (typeof u == "string")
|
|
2220
|
-
c += Tt(u), h = l === n.length - 1 && o.indexOf(u[u.length - 1]) > -1;
|
|
2221
|
-
else {
|
|
2222
|
-
const d = Tt(u.prefix), p = u.repeat ? "(?:" + u.pattern + ")(?:" + d + "(?:" + u.pattern + "))*" : u.pattern;
|
|
2223
|
-
t && t.push(u), u.optional ? u.partial ? c += d + "(" + p + ")?" : c += "(?:" + d + "(" + p + "))?" : c += d + "(" + p + ")";
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
return s ? (r || (c += "(?:" + i + ")?"), c += a === "$" ? "$" : "(?=" + a + ")") : (r || (c += "(?:" + i + "(?=" + a + "))?"), h || (c += "(?=" + i + "|" + a + ")")), new RegExp("^" + c, kr(e));
|
|
2227
|
-
}, Nr = (n, t, e) => n instanceof RegExp ? Ri(n, t || []) : Array.isArray(n) ? Ti(n, t, e) : Ii(n, t, e), fe = Nr;
|
|
2228
|
-
var Y = /* @__PURE__ */ ((n) => (n.scopedHash = "scopedHash", n.hash = "hash", n.browser = "browser", n.memory = "memory", n))(Y || {}), ft = /* @__PURE__ */ ((n) => (n.storage = "storage", n.path = "path", n.initialPath = "initial", n))(ft || {});
|
|
2229
|
-
const It = (n, t) => {
|
|
2230
|
-
const e = [], r = fe(t, e).exec(n);
|
|
2231
|
-
if (!r)
|
|
2232
|
-
return {};
|
|
2233
|
-
const [s, ...i] = r;
|
|
2234
|
-
return e.reduce((o, a, c) => (o[a.name] = i[c], o), {});
|
|
2235
|
-
}, Ui = (n) => Object.keys(n).reduce((t, e) => {
|
|
2236
|
-
const r = typeof n[e] == "string" ? n[e].replace("&", "%20") : n[e];
|
|
2237
|
-
let s = `${e}=${r}`;
|
|
2238
|
-
return t.length > 1 && (s = "&".concat(s)), t.concat(s);
|
|
2239
|
-
}, "?"), je = (n, t) => {
|
|
2240
|
-
const e = t.find((r) => r.name === n);
|
|
2241
|
-
if (!e) {
|
|
2242
|
-
process.env.NODE_ENV !== "production" && I.warn(`Unable to find route with specified name: ${n}`);
|
|
2243
|
-
return;
|
|
2244
|
-
}
|
|
2245
|
-
return e;
|
|
2246
|
-
}, Lr = (n) => n.length ? n.slice(1).split("&").map((t) => t.split("=")).reduce((t, e) => {
|
|
2247
|
-
const [r, s] = e.map(encodeURI).map(decodeURIComponent);
|
|
2248
|
-
return br(At({}, t), { [r]: decodeURIComponent(s).replace("%20", "&") });
|
|
2249
|
-
}, {}) : {}, Vi = (n, t) => {
|
|
2250
|
-
const e = t.map((r) => oe(n, r)).reduce(
|
|
2251
|
-
(r, s) => {
|
|
2252
|
-
if (s === null)
|
|
2253
|
-
return r;
|
|
2254
|
-
const i = s.split("?")[1];
|
|
2255
|
-
let o = 0;
|
|
2256
|
-
if (i) {
|
|
2257
|
-
const a = Lr(`?${i}`);
|
|
2258
|
-
o = Object.keys(a).length;
|
|
2259
|
-
}
|
|
2260
|
-
return !r.path || r.count && o < r.count ? {
|
|
2261
|
-
count: o,
|
|
2262
|
-
path: s
|
|
2263
|
-
} : r;
|
|
2264
|
-
},
|
|
2265
|
-
{ count: void 0, path: void 0 }
|
|
2266
|
-
);
|
|
2267
|
-
return e ? e.path : t[0];
|
|
2268
|
-
}, oe = (n, t) => {
|
|
2269
|
-
const e = $t(n);
|
|
2270
|
-
if (Array.isArray(t)) {
|
|
2271
|
-
const c = Vi(e, t);
|
|
2272
|
-
if (!c)
|
|
2273
|
-
throw new Error("Unable to match path.");
|
|
2274
|
-
return c;
|
|
2275
|
-
}
|
|
2276
|
-
const r = Mi(t);
|
|
2277
|
-
let s = t;
|
|
2278
|
-
try {
|
|
2279
|
-
s = r(e);
|
|
2280
|
-
} catch (c) {
|
|
2281
|
-
return null;
|
|
2282
|
-
}
|
|
2283
|
-
const i = [];
|
|
2284
|
-
fe(t, i);
|
|
2285
|
-
const o = Object.keys(e).reduce((c, h) => (i.find((l) => l.name === h) || c.push(h), c), []), a = {};
|
|
2286
|
-
return o.forEach((c) => a[c] = e[c]), Object.keys(a).forEach((c) => a[c] === null && delete a[c]), Object.keys(a).length > 0 ? `${s}${Ui(a)}` : s;
|
|
2287
|
-
}, _t = (n, t) => {
|
|
2288
|
-
let e = n;
|
|
2289
|
-
return e.indexOf("?") > -1 && (e = e.substring(0, e.indexOf("?"))), e.indexOf(";") > -1 && (e = e.substring(0, e.indexOf(";"))), e === "" && (e = "/"), t.reduce((r, s) => {
|
|
2290
|
-
if (Array.isArray(s.path))
|
|
2291
|
-
return s.path.reduce((o, a) => fe(a, []).exec(e || "") && !o ? e : o, void 0) && !r ? s : r;
|
|
2292
|
-
if (!s.path)
|
|
2293
|
-
return r;
|
|
2294
|
-
const i = [];
|
|
2295
|
-
return fe(s.path, i).exec(e || "") && !r ? s : r;
|
|
2296
|
-
}, void 0);
|
|
2297
|
-
}, Bi = (n) => {
|
|
2298
|
-
let t = n.get("historyTransitionManager");
|
|
2299
|
-
return t || (t = Or(), n.parent && n.parent.register("historyTransitionManager", t)), t;
|
|
2300
|
-
}, Ht = (n, t = null) => n ? xe(t ? t(n) : n) : {
|
|
2301
|
-
pathname: "",
|
|
2302
|
-
search: "",
|
|
2303
|
-
hash: ""
|
|
2304
|
-
}, zi = (n, t) => {
|
|
2305
|
-
if ($t(n), $t(t), Object.keys(n).length !== Object.keys(t).length)
|
|
2306
|
-
return !1;
|
|
2307
|
-
if (Object.keys(n).length === 0 && Object.keys(t).length === 0)
|
|
2308
|
-
return !0;
|
|
2309
|
-
let e = !0;
|
|
2310
|
-
return Object.keys(t).forEach((r) => {
|
|
2311
|
-
t[r] !== n[r] && (e = !1);
|
|
2312
|
-
}), e;
|
|
2313
|
-
}, Wi = (n) => {
|
|
2314
|
-
if (typeof n.mode == "string") {
|
|
2315
|
-
if (n.mode === Y.memory)
|
|
2316
|
-
return !0;
|
|
2317
|
-
} else if (n.mode[1]) {
|
|
2318
|
-
const [t, { sticky: e }] = n.mode;
|
|
2319
|
-
if (t === Y.memory)
|
|
2320
|
-
return typeof e == "undefined" ? !0 : e;
|
|
2321
|
-
}
|
|
2322
|
-
return !1;
|
|
2323
|
-
}, Re = (n) => {
|
|
2324
|
-
const { views: t } = n.get("$settings"), e = Object.keys(t).reduce((r, s) => typeof t[s].path == "undefined" ? s : r, void 0);
|
|
2325
|
-
return e ? {
|
|
2326
|
-
name: e,
|
|
2327
|
-
params: {}
|
|
2328
|
-
} : null;
|
|
2329
|
-
}, jn = "hashchange", Fi = {
|
|
2330
|
-
hashbang: {
|
|
2331
|
-
encodePath: (n) => n.charAt(0) === "!" ? n : "!/" + Ge(n),
|
|
2332
|
-
decodePath: (n) => n.charAt(0) === "!" ? n.substr(1) : n
|
|
2333
|
-
},
|
|
2334
|
-
noslash: {
|
|
2335
|
-
encodePath: Ge,
|
|
2336
|
-
decodePath: Ut
|
|
2337
|
-
},
|
|
2338
|
-
slash: {
|
|
2339
|
-
encodePath: Ut,
|
|
2340
|
-
decodePath: Ut
|
|
2341
|
-
}
|
|
2342
|
-
}, ct = () => {
|
|
2343
|
-
const n = window.location.href, t = n.indexOf("#");
|
|
2344
|
-
return t === -1 ? "" : n.substring(t + 1);
|
|
2345
|
-
}, Rn = (n) => window.location.hash = n, Tn = (n) => {
|
|
2346
|
-
const t = window.location.href.indexOf("#");
|
|
2347
|
-
window.location.replace(
|
|
2348
|
-
window.location.href.slice(0, t >= 0 ? t : 0) + "#" + n
|
|
2349
|
-
);
|
|
2350
|
-
}, ae = (n = "") => {
|
|
2351
|
-
const t = n.replace(";", "?"), e = [
|
|
2352
|
-
{ from: /\;+/gi, to: "&" },
|
|
2353
|
-
{ from: /:+/gi, to: "=" }
|
|
2354
|
-
];
|
|
2355
|
-
let r = t;
|
|
2356
|
-
return e.forEach(({ to: s, from: i }) => {
|
|
2357
|
-
r = r.replace(i, s);
|
|
2358
|
-
}), r;
|
|
2359
|
-
}, qi = (n = {}) => {
|
|
2360
|
-
const t = window.history, { getUserConfirmation: e = Er, hashType: r = "slash" } = n, s = n.basename ? xr(Ut(n.basename)) : "", { encodePath: i } = Fi[r], o = () => {
|
|
2361
|
-
const f = ct(), w = l(f);
|
|
2362
|
-
return Ht(w, ae);
|
|
2363
|
-
}, a = n.transitionManager || Or(), c = (f) => {
|
|
2364
|
-
Object.assign(T, f), T.length = t.length, a.notifyListeners(T.location, T.action, n.widgetName);
|
|
2365
|
-
};
|
|
2366
|
-
let h = !1;
|
|
2367
|
-
const l = (f) => {
|
|
2368
|
-
const w = ($) => {
|
|
2369
|
-
function A(_, m) {
|
|
2370
|
-
const O = {};
|
|
2371
|
-
let L;
|
|
2372
|
-
for (; L = m.exec(_); )
|
|
2373
|
-
O[L[1]] = L[2];
|
|
2374
|
-
return O;
|
|
2375
|
-
}
|
|
2376
|
-
return A($, /([^#?&=]+)=([^&#]*)(?!.*?\#)/gi) || null;
|
|
2377
|
-
}, y = "humany-" + n.widgetName;
|
|
2378
|
-
return w(f)[y];
|
|
2379
|
-
}, u = () => {
|
|
2380
|
-
const f = o(), w = T.location;
|
|
2381
|
-
!h && _r(w, f) || d(f);
|
|
2382
|
-
}, d = (f) => {
|
|
2383
|
-
if (h)
|
|
2384
|
-
h = !1, c();
|
|
2385
|
-
else {
|
|
2386
|
-
const w = "POP";
|
|
2387
|
-
a.confirmTransitionTo(
|
|
2388
|
-
f,
|
|
2389
|
-
w,
|
|
2390
|
-
e,
|
|
2391
|
-
(y) => {
|
|
2392
|
-
y ? c({ action: w, location: f }) : p(f);
|
|
2393
|
-
}
|
|
2394
|
-
);
|
|
2395
|
-
}
|
|
2396
|
-
}, p = (f) => {
|
|
2397
|
-
const w = T.location;
|
|
2398
|
-
let y = g.lastIndexOf(at(w));
|
|
2399
|
-
y === -1 && (y = 0);
|
|
2400
|
-
let $ = g.lastIndexOf(at(f));
|
|
2401
|
-
$ === -1 && ($ = 0);
|
|
2402
|
-
const A = y - $;
|
|
2403
|
-
A && (h = !0, x(A));
|
|
2404
|
-
}, b = ct(), v = i(b);
|
|
2405
|
-
b !== v && Tn(v);
|
|
2406
|
-
let g = [];
|
|
2407
|
-
const E = o();
|
|
2408
|
-
E.pathname !== null && g.push(at(E));
|
|
2409
|
-
const R = (f = "") => {
|
|
2410
|
-
const w = [
|
|
2411
|
-
{ from: /\?+/gi, to: ";" },
|
|
2412
|
-
{ from: /\&+/gi, to: ";" },
|
|
2413
|
-
{ from: /\&+/gi, to: ";" },
|
|
2414
|
-
{ from: /=+/gi, to: ":" }
|
|
2415
|
-
];
|
|
2416
|
-
let y = f;
|
|
2417
|
-
return w.forEach(({ to: $, from: A }) => {
|
|
2418
|
-
y = y.replace(A, $);
|
|
2419
|
-
}), y;
|
|
2420
|
-
}, F = (f, w, y) => {
|
|
2421
|
-
let $ = "", A = !1;
|
|
2422
|
-
return f.split("&").forEach((_) => {
|
|
2423
|
-
const m = _.split("="), O = m[0], L = m[1];
|
|
2424
|
-
if (O === w) {
|
|
2425
|
-
if (A = !0, y === null)
|
|
2426
|
-
return;
|
|
2427
|
-
$.length > 0 && ($ += "&"), typeof y != "undefined" ? $ += O + "=" + y : $ += O;
|
|
2428
|
-
} else
|
|
2429
|
-
O && ($.length > 0 && ($ += "&"), $ += O + "=" + L);
|
|
2430
|
-
}), !A && y !== null && ($.length > 0 && ($ += "&"), typeof y != "undefined" ? $ += w + "=" + y : $ += w), $;
|
|
2431
|
-
}, H = (f) => {
|
|
2432
|
-
const w = f.pathname, y = R(f.search), $ = w + (y ? `;${y}` : ""), A = `humany-${n.widgetName}`, _ = ct();
|
|
2433
|
-
return `#${F(_, A, $).replace(";;", ";")}`;
|
|
2434
|
-
}, k = (f, w) => {
|
|
2435
|
-
const y = "PUSH", $ = Ht(f, ae), A = $.pathname, _ = R($.search), m = A + (_ ? `${_}` : ""), O = `humany-${n.widgetName}`, L = ct(), M = F(L, O, m);
|
|
2436
|
-
a.confirmTransitionTo($, y, e, (K) => {
|
|
2437
|
-
if (!K)
|
|
2438
|
-
return;
|
|
2439
|
-
const G = at($), it = i(M);
|
|
2440
|
-
if (ct() !== it) {
|
|
2441
|
-
Rn(it);
|
|
2442
|
-
const Q = g.lastIndexOf(at(T.location)), q = g.slice(0, Q === -1 ? 0 : Q + 1);
|
|
2443
|
-
q.push(G), g = q, c({ action: y, location: $ });
|
|
2444
|
-
} else
|
|
2445
|
-
c();
|
|
2446
|
-
});
|
|
2447
|
-
}, U = (f, w) => {
|
|
2448
|
-
const y = "REPLACE", $ = Ht(f, ae);
|
|
2449
|
-
a.confirmTransitionTo($, y, e, (A) => {
|
|
2450
|
-
if (!A)
|
|
2451
|
-
return;
|
|
2452
|
-
const _ = at($), m = i(s + _);
|
|
2453
|
-
ct() !== m && Tn(m);
|
|
2454
|
-
const O = g.indexOf(at(T.location));
|
|
2455
|
-
O !== -1 && (g[O] = _), c({ action: y, location: $ });
|
|
2456
|
-
});
|
|
2457
|
-
}, x = (f) => {
|
|
2458
|
-
t.go(f);
|
|
2459
|
-
}, N = () => x(-1), S = () => x(1);
|
|
2460
|
-
let D = 0;
|
|
2461
|
-
const z = (f) => {
|
|
2462
|
-
D += f, D === 1 ? window.addEventListener(jn, u) : D === 0 && window.removeEventListener(jn, u);
|
|
2463
|
-
};
|
|
2464
|
-
let V = !1;
|
|
2465
|
-
const T = {
|
|
2466
|
-
createHref: H,
|
|
2467
|
-
createLocation: Ht,
|
|
2468
|
-
push: k,
|
|
2469
|
-
replace: U,
|
|
2470
|
-
go: x,
|
|
2471
|
-
goBack: N,
|
|
2472
|
-
goForward: S,
|
|
2473
|
-
block: (f = !1) => {
|
|
2474
|
-
const w = a.setPrompt(f);
|
|
2475
|
-
return V || (z(1), V = !0), () => (V && (V = !1, z(-1)), w());
|
|
2476
|
-
},
|
|
2477
|
-
listen: (f) => {
|
|
2478
|
-
const w = a.appendListener(f);
|
|
2479
|
-
return z(1), () => {
|
|
2480
|
-
z(-1), w();
|
|
2481
|
-
};
|
|
2482
|
-
},
|
|
2483
|
-
stop: () => {
|
|
2484
|
-
const f = ct(), w = F(f, `humany-${n.widgetName}`, null), y = i(w);
|
|
2485
|
-
Rn(y);
|
|
2486
|
-
},
|
|
2487
|
-
length: t.length,
|
|
2488
|
-
action: "POP",
|
|
2489
|
-
location: E
|
|
2490
|
-
};
|
|
2491
|
-
return T;
|
|
2492
|
-
}, Mr = qi, Ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2493
|
-
__proto__: null,
|
|
2494
|
-
decodeSearch: ae,
|
|
2495
|
-
default: Mr,
|
|
2496
|
-
getHashPath: ct
|
|
2497
|
-
}, Symbol.toStringTag, { value: "Module" })), Ki = (n, t) => {
|
|
2498
|
-
const e = (s) => {
|
|
2499
|
-
function i(o, a) {
|
|
2500
|
-
const c = {};
|
|
2501
|
-
let h;
|
|
2502
|
-
for (; h = a.exec(o); )
|
|
2503
|
-
c[h[1]] = h[2];
|
|
2504
|
-
return c;
|
|
2505
|
-
}
|
|
2506
|
-
return i(s, /([^#?&=]+)=([^&#]*)(?!.*?\#)/gi) || null;
|
|
2507
|
-
}, r = `humany-${t}`;
|
|
2508
|
-
return e(n)[r];
|
|
2509
|
-
}, Gi = () => {
|
|
2510
|
-
const n = window.location.href, t = n.indexOf("#");
|
|
2511
|
-
return t === -1 ? "" : n.substring(t + 1);
|
|
2512
|
-
}, Yi = (n = "") => {
|
|
2513
|
-
const t = n.replace(";", "?"), e = [
|
|
2514
|
-
{ from: /\;+/gi, to: "&" },
|
|
2515
|
-
{ from: /:+/gi, to: "=" }
|
|
2516
|
-
];
|
|
2517
|
-
let r = t;
|
|
2518
|
-
return e.forEach(({ to: s, from: i }) => {
|
|
2519
|
-
r = r.replace(i, s);
|
|
2520
|
-
}), r;
|
|
2521
|
-
}, Zi = (n, t = null) => n ? xe(t ? t(n) : n) : {
|
|
2522
|
-
pathname: "",
|
|
2523
|
-
search: "",
|
|
2524
|
-
hash: ""
|
|
2525
|
-
}, Dr = (n) => {
|
|
2526
|
-
const t = Gi(), e = Ki(t, n);
|
|
2527
|
-
return Zi(e, Yi);
|
|
2528
|
-
}, on = (n) => {
|
|
2529
|
-
const { name: t } = n.get("$widget");
|
|
2530
|
-
return !!Dr(t).pathname;
|
|
2531
|
-
};
|
|
2532
|
-
Xe((n) => {
|
|
2533
|
-
n.createCommand("routing", (t) => (e) => {
|
|
2534
|
-
const r = {
|
|
2535
|
-
mode: e.mode
|
|
2536
|
-
};
|
|
2537
|
-
e.basePath && (r.basePath = e.basePath), t.container.register("routingSettings", r);
|
|
2538
|
-
});
|
|
2539
|
-
});
|
|
2540
|
-
const In = "routeData";
|
|
2541
|
-
class Qi {
|
|
2542
|
-
constructor(t, e) {
|
|
2543
|
-
this.container = t, this.steps = [], this.historyListenSubscription = () => {
|
|
2544
|
-
}, this.sticky = !1, this.storageWriter = null, this.widget = t.get("$widget");
|
|
2545
|
-
const r = e, { routes: s } = r, i = fi(r, ["routes"]);
|
|
2546
|
-
this.settings = At(At({}, i), t.get("routingSettings")), this.sticky = Wi(this.settings), this.storageMedium = this.sticky ? P.Local : P.Session, rt(t, In, C.Necessary, {
|
|
2547
|
-
medium: this.storageMedium
|
|
2548
|
-
}).then((o) => this.storageWriter = o), this.routes = s;
|
|
2549
|
-
}
|
|
2550
|
-
initialize() {
|
|
2551
|
-
return this.initialized = this.initialized || this.createHistory().then((t) => {
|
|
2552
|
-
this.history = t, this.location = t.location, this.historyListenSubscription = t.listen(
|
|
2553
|
-
(e, r, s) => this.handleLocationChange(e, s)
|
|
2554
|
-
);
|
|
2555
|
-
});
|
|
2556
|
-
}
|
|
2557
|
-
setMatch(t) {
|
|
2558
|
-
if (this.match = t, this.location) {
|
|
2559
|
-
const e = this.getRouteData(), r = {
|
|
2560
|
-
routeData: e,
|
|
2561
|
-
location: this.location
|
|
2562
|
-
}, s = this.steps[0], i = e.name === (s == null ? void 0 : s.routeData.name), o = vn(
|
|
2563
|
-
e.params,
|
|
2564
|
-
(s == null ? void 0 : s.routeData.params) || {}
|
|
2565
|
-
);
|
|
2566
|
-
(!i || !o) && (this.widget.events.dispatch("router:change", { next: r, previous: s }), this.steps.unshift(r), this.storageWriter && this.storageWriter(r.routeData), this.widget.events.dispatch("router:changed", { previous: s, current: r }));
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
onRouteChange(t) {
|
|
2570
|
-
return this.widget.events.subscribe("router:change", t);
|
|
2571
|
-
}
|
|
2572
|
-
isSticky() {
|
|
2573
|
-
return this.sticky;
|
|
2574
|
-
}
|
|
2575
|
-
/**
|
|
2576
|
-
* Generate a formatted path from string
|
|
2577
|
-
* @param routeName Name of route to generate path for
|
|
2578
|
-
* @param params Optional: route params
|
|
2579
|
-
*/
|
|
2580
|
-
generate(t, e = {}) {
|
|
2581
|
-
const r = je(t, this.routes);
|
|
2582
|
-
if (!r || !this.history)
|
|
2583
|
-
throw `No route found for ${t}`;
|
|
2584
|
-
const s = oe(e, r.path);
|
|
2585
|
-
if (!s)
|
|
2586
|
-
throw `Unable to generate path for "${t}".`;
|
|
2587
|
-
const i = Ht(s, this.settings.decodeSearch);
|
|
2588
|
-
let o = this.history.createHref(i);
|
|
2589
|
-
const { mode: a, basePath: c } = this.settings;
|
|
2590
|
-
return a === "browser" && c && (o = o.replace(c, "")), o.charAt(0) !== "/" && (o = `/${o}`), o;
|
|
2591
|
-
}
|
|
2592
|
-
/**
|
|
2593
|
-
* Navigate to path
|
|
2594
|
-
* @param routeName Route to navigate to
|
|
2595
|
-
* @param params Optional: route params
|
|
2596
|
-
*/
|
|
2597
|
-
navigate(t, e = {}) {
|
|
2598
|
-
const r = je(t, this.routes);
|
|
2599
|
-
if (!r || !this.history)
|
|
2600
|
-
return;
|
|
2601
|
-
const s = oe(e, r.path);
|
|
2602
|
-
if (!s)
|
|
2603
|
-
return;
|
|
2604
|
-
const i = this.getRouteData(), o = i && i.name === t && zi(i.params, e);
|
|
2605
|
-
if (this.steps[0] && o)
|
|
2606
|
-
return;
|
|
2607
|
-
const { decodeSearch: a } = this.settings, c = a ? a(s) : s;
|
|
2608
|
-
this.widget.events.dispatch("router:navigate", {
|
|
2609
|
-
decodedPath: c
|
|
2610
|
-
}), c.charAt(0) !== "/" ? this.history.push(`/${c}`) : this.history.push(c);
|
|
2611
|
-
}
|
|
2612
|
-
/**
|
|
2613
|
-
* Return true or false depending
|
|
2614
|
-
* on whether it is possible to navigate backwards
|
|
2615
|
-
*/
|
|
2616
|
-
hasBack() {
|
|
2617
|
-
if (this.steps.length > 1)
|
|
2618
|
-
return !0;
|
|
2619
|
-
const t = this.getRouteData(this.settings.initialPath), e = this.getRouteData(), r = e.name === t.name, s = vn(e.params, t.params);
|
|
2620
|
-
return !r || !s;
|
|
2621
|
-
}
|
|
2622
|
-
/**
|
|
2623
|
-
* Navigate to previous route
|
|
2624
|
-
*/
|
|
2625
|
-
goBack(t = 1) {
|
|
2626
|
-
if (this.steps.length < 2) {
|
|
2627
|
-
const e = this.getRouteData(this.settings.initialPath);
|
|
2628
|
-
e && e.name && (this.navigate(e.name, e.params), this.steps = []);
|
|
2629
|
-
} else {
|
|
2630
|
-
const e = t >= this.steps.length ? this.steps.length - 1 : t, { routeData: r } = this.steps[e];
|
|
2631
|
-
this.steps = [...this.steps.slice(e + 1)], this.navigate(r.name, os(r.params));
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
/**
|
|
2635
|
-
* Navigate to next route
|
|
2636
|
-
*/
|
|
2637
|
-
goForward() {
|
|
2638
|
-
this.history && this.history.goForward();
|
|
2639
|
-
}
|
|
2640
|
-
/**
|
|
2641
|
-
* Get the current location
|
|
2642
|
-
*/
|
|
2643
|
-
current() {
|
|
2644
|
-
return this.location;
|
|
2645
|
-
}
|
|
2646
|
-
/**
|
|
2647
|
-
* Get the initial route. If the defined initial route does not exist,
|
|
2648
|
-
* return the first defined route
|
|
2649
|
-
*/
|
|
2650
|
-
getInitialRoute() {
|
|
2651
|
-
const { name: t } = this.getRouteData(this.settings.initialPath);
|
|
2652
|
-
return this.routes.find((r) => r.name === t) || (this.routes.length > 0 ? this.routes[0] : (process.env.NODE_ENV !== "production" && I.warn("Unable to get initial route as no routes are defined."), null));
|
|
2653
|
-
}
|
|
2654
|
-
getRouteData(t) {
|
|
2655
|
-
const e = Re(this.container);
|
|
2656
|
-
if (t) {
|
|
2657
|
-
const r = _t(t, this.routes);
|
|
2658
|
-
return r ? {
|
|
2659
|
-
params: $t(It(t, r.path)),
|
|
2660
|
-
name: r.name
|
|
2661
|
-
} : e || {
|
|
2662
|
-
name: "",
|
|
2663
|
-
params: {}
|
|
2664
|
-
};
|
|
2665
|
-
}
|
|
2666
|
-
if (this.location) {
|
|
2667
|
-
const { pathname: r, search: s } = this.location;
|
|
2668
|
-
if (this.currentRoute = this.currentRoute || _t(r, this.routes), this.currentRoute) {
|
|
2669
|
-
const { path: i, name: o } = this.currentRoute;
|
|
2670
|
-
this.match || (this.match = {
|
|
2671
|
-
params: It(r, i),
|
|
2672
|
-
isExact: !0,
|
|
2673
|
-
path: i,
|
|
2674
|
-
url: r
|
|
2675
|
-
});
|
|
2676
|
-
const a = $t(At(At({}, this.match.params), s.length > 0 && Lr(s)));
|
|
2677
|
-
return {
|
|
2678
|
-
name: o,
|
|
2679
|
-
params: a
|
|
2680
|
-
};
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
return e || {
|
|
2684
|
-
name: "",
|
|
2685
|
-
params: {}
|
|
2686
|
-
};
|
|
2687
|
-
}
|
|
2688
|
-
dispose() {
|
|
2689
|
-
return this.historyListenSubscription(), this.stop();
|
|
2690
|
-
}
|
|
2691
|
-
/**
|
|
2692
|
-
* Setup and load the initial route based on router configuration
|
|
2693
|
-
*/
|
|
2694
|
-
setupInitialRoute() {
|
|
2695
|
-
return Z(this.container, In, this.storageMedium).then(
|
|
2696
|
-
(t) => {
|
|
2697
|
-
if (!this.location || !this.history)
|
|
2698
|
-
return;
|
|
2699
|
-
const { initialPath: e, mode: r } = this.settings;
|
|
2700
|
-
switch ((() => {
|
|
2701
|
-
const s = on(this.container);
|
|
2702
|
-
return r === Y.browser || s ? ft.path : r === Y.memory && t ? ft.storage : ft.initialPath;
|
|
2703
|
-
})()) {
|
|
2704
|
-
case ft.initialPath: {
|
|
2705
|
-
const s = this.getRouteData(e);
|
|
2706
|
-
return s && s.name ? this.navigate(s.name, s.params) : void 0;
|
|
2707
|
-
}
|
|
2708
|
-
case ft.path: {
|
|
2709
|
-
const { pathname: s } = this.location;
|
|
2710
|
-
if (this.currentRoute = _t(s, this.routes), this.currentRoute) {
|
|
2711
|
-
const { path: o } = this.currentRoute;
|
|
2712
|
-
return this.setMatch({
|
|
2713
|
-
params: It(s, o),
|
|
2714
|
-
isExact: !0,
|
|
2715
|
-
path: o,
|
|
2716
|
-
url: s
|
|
2717
|
-
});
|
|
2718
|
-
}
|
|
2719
|
-
const i = Re(this.container);
|
|
2720
|
-
return i ? this.setMatch({
|
|
2721
|
-
params: {},
|
|
2722
|
-
isExact: !0,
|
|
2723
|
-
path: i.name,
|
|
2724
|
-
url: s
|
|
2725
|
-
}) : void 0;
|
|
2726
|
-
}
|
|
2727
|
-
case ft.storage: {
|
|
2728
|
-
const { pathname: s } = this.location;
|
|
2729
|
-
this.currentRoute = _t(s, this.routes);
|
|
2730
|
-
const { name: i = "", params: o = {} } = t || {}, a = je(i, this.routes);
|
|
2731
|
-
if (a) {
|
|
2732
|
-
const c = oe(o, a.path);
|
|
2733
|
-
if (c)
|
|
2734
|
-
return this.history.push(c), this.location = br(At({}, this.location), { pathname: c }), this.currentRoute = _t(c, this.routes), this.setMatch({
|
|
2735
|
-
params: o,
|
|
2736
|
-
isExact: !0,
|
|
2737
|
-
path: a.path,
|
|
2738
|
-
url: c
|
|
2739
|
-
});
|
|
2740
|
-
}
|
|
2741
|
-
return;
|
|
2742
|
-
}
|
|
2743
|
-
}
|
|
2744
|
-
}
|
|
2745
|
-
);
|
|
2746
|
-
}
|
|
2747
|
-
start() {
|
|
2748
|
-
return this.setupInitialRoute();
|
|
2749
|
-
}
|
|
2750
|
-
stop() {
|
|
2751
|
-
return this.history && (this.settings.mode === Y.scopedHash && this.history.stop(), this.steps = [], this.storageWriter) ? this.storageWriter() : Promise.resolve();
|
|
2752
|
-
}
|
|
2753
|
-
handleLocationChange(t, e) {
|
|
2754
|
-
const { pathname: r } = t, { mode: s } = this.settings;
|
|
2755
|
-
if (r.indexOf("?") > -1 || r.indexOf(";") > -1 || s === Y.scopedHash && e !== this.widget.name)
|
|
2756
|
-
return;
|
|
2757
|
-
this.location = t, this.currentRoute = _t(r, this.routes);
|
|
2758
|
-
const i = Re(this.container);
|
|
2759
|
-
if (this.currentRoute) {
|
|
2760
|
-
const { path: o } = this.currentRoute;
|
|
2761
|
-
this.setMatch({
|
|
2762
|
-
params: It(r, o),
|
|
2763
|
-
isExact: !0,
|
|
2764
|
-
path: o,
|
|
2765
|
-
url: r
|
|
2766
|
-
});
|
|
2767
|
-
} else
|
|
2768
|
-
i && this.setMatch({
|
|
2769
|
-
params: {},
|
|
2770
|
-
isExact: !0,
|
|
2771
|
-
path: i.name,
|
|
2772
|
-
url: r
|
|
2773
|
-
});
|
|
2774
|
-
}
|
|
2775
|
-
createHistory() {
|
|
2776
|
-
return new Promise((t) => {
|
|
2777
|
-
const { mode: e, basePath: r } = this.settings;
|
|
2778
|
-
if (e === Y.scopedHash) {
|
|
2779
|
-
const s = this.widget.name, i = Bi(this.container);
|
|
2780
|
-
return Promise.resolve().then(() => Ji).then((o) => {
|
|
2781
|
-
const a = o.default({
|
|
2782
|
-
widgetName: s,
|
|
2783
|
-
transitionManager: i,
|
|
2784
|
-
hashType: "noslash"
|
|
2785
|
-
});
|
|
2786
|
-
return t(a);
|
|
2787
|
-
});
|
|
2788
|
-
}
|
|
2789
|
-
if (e === Y.memory)
|
|
2790
|
-
return t(Gs());
|
|
2791
|
-
if (e === Y.browser)
|
|
2792
|
-
return t(Js({ basename: r }));
|
|
2793
|
-
throw "RoutingService: History could not be created.";
|
|
2794
|
-
});
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
const Xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2798
|
-
__proto__: null,
|
|
2799
|
-
HistoryMode: Y,
|
|
2800
|
-
RoutingService: Qi,
|
|
2801
|
-
createHashHistory: Mr,
|
|
2802
|
-
getScopedHashDOMLocation: Dr,
|
|
2803
|
-
matchParams: It,
|
|
2804
|
-
onWidgetUrl: on
|
|
2805
|
-
}, Symbol.toStringTag, { value: "Module" })), Te = (n, t, e, ...r) => {
|
|
2806
|
-
const s = `[${n.get("$environment").name || "webprovisions"}] ${e}`;
|
|
2807
|
-
switch (t) {
|
|
2808
|
-
case "info":
|
|
2809
|
-
console.info(s, ...r);
|
|
2810
|
-
break;
|
|
2811
|
-
case "warning":
|
|
2812
|
-
console.warn(s, ...r);
|
|
2813
|
-
break;
|
|
2814
|
-
case "error":
|
|
2815
|
-
console.error(s, ...r);
|
|
2816
|
-
break;
|
|
2817
|
-
}
|
|
2818
|
-
}, to = (n) => {
|
|
2819
|
-
const t = n.container || n;
|
|
2820
|
-
return {
|
|
2821
|
-
info: (e, ...r) => Te(t, "info", e, ...r),
|
|
2822
|
-
warn: (e, ...r) => Te(t, "warning", e, ...r),
|
|
2823
|
-
error: (e, ...r) => Te(t, "error", e, ...r)
|
|
2824
|
-
};
|
|
2825
|
-
};
|
|
2826
|
-
var Bt = /* @__PURE__ */ ((n) => (n.Implementation = "implementation", n.Widget = "widget", n))(Bt || {}), ut = /* @__PURE__ */ ((n) => (n.Pre = "pre", n.Post = "post", n))(ut || {});
|
|
2827
|
-
const eo = (n, t, e, r) => {
|
|
2828
|
-
try {
|
|
2829
|
-
const s = new t(e, r);
|
|
2830
|
-
return {
|
|
2831
|
-
name: n,
|
|
2832
|
-
invoke: (i, o) => {
|
|
2833
|
-
let a;
|
|
2834
|
-
return s[i] && (a = s[i].call(s, o)), Promise.resolve(a);
|
|
2835
|
-
},
|
|
2836
|
-
getInstance: () => s
|
|
2837
|
-
};
|
|
2838
|
-
} catch (s) {
|
|
2839
|
-
if (s.message && s.message.indexOf("is not a constructor") >= 0)
|
|
2840
|
-
return {
|
|
2841
|
-
name: n,
|
|
2842
|
-
invoke: (i) => {
|
|
2843
|
-
let o;
|
|
2844
|
-
return i === "initialize" && (o = t(e, r)), Promise.resolve(o);
|
|
2845
|
-
},
|
|
2846
|
-
getInstance: () => t
|
|
2847
|
-
};
|
|
2848
|
-
throw s;
|
|
2849
|
-
}
|
|
2850
|
-
};
|
|
2851
|
-
function Hn(n, t) {
|
|
2852
|
-
return typeof n == "undefined" ? t : n;
|
|
2853
|
-
}
|
|
2854
|
-
class no {
|
|
2855
|
-
constructor(t = {}) {
|
|
2856
|
-
this.part = t;
|
|
2857
|
-
}
|
|
2858
|
-
createCommand(t, e, r) {
|
|
2859
|
-
let s;
|
|
2860
|
-
typeof e == "function" ? s = {
|
|
2861
|
-
scope: Bt.Widget,
|
|
2862
|
-
stage: ut.Post,
|
|
2863
|
-
defaultArgs: void 0,
|
|
2864
|
-
handlerResolver: e
|
|
2865
|
-
} : s = {
|
|
2866
|
-
scope: Hn(e.scope, Bt.Widget),
|
|
2867
|
-
stage: Hn(e.stage, ut.Post),
|
|
2868
|
-
defaultArgs: e.defaultArgs,
|
|
2869
|
-
handlerResolver: r
|
|
2870
|
-
};
|
|
2871
|
-
let i = this.part;
|
|
2872
|
-
const o = t.split(".");
|
|
2873
|
-
return o.forEach((a, c) => {
|
|
2874
|
-
c === o.length - 1 ? i[a] || (i[a] = () => s) : i = this.part[a] = this.part[a] || {};
|
|
2875
|
-
}), this;
|
|
2876
|
-
}
|
|
2877
|
-
get() {
|
|
2878
|
-
return this.part;
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
const jr = (n) => {
|
|
2882
|
-
const t = new no({});
|
|
2883
|
-
return n(t), t.get();
|
|
2884
|
-
};
|
|
2885
|
-
jr((n) => {
|
|
2886
|
-
n.createCommand(
|
|
2887
|
-
"types.register",
|
|
2888
|
-
{ scope: Bt.Implementation, stage: ut.Pre },
|
|
2889
|
-
(t) => (e, r) => {
|
|
2890
|
-
t.container.get("$types")[e] = r;
|
|
2891
|
-
}
|
|
2892
|
-
).createCommand(
|
|
2893
|
-
"type",
|
|
2894
|
-
{ stage: ut.Pre },
|
|
2895
|
-
(t) => (e) => {
|
|
2896
|
-
t.container.register("$type", e);
|
|
2897
|
-
}
|
|
2898
|
-
).createCommand(
|
|
2899
|
-
"settings",
|
|
2900
|
-
{ stage: ut.Pre, defaultArgs: [null] },
|
|
2901
|
-
(t) => (e) => {
|
|
2902
|
-
t.events.dispatch(
|
|
2903
|
-
"settings:change",
|
|
2904
|
-
e,
|
|
2905
|
-
{ bubbles: !0 }
|
|
2906
|
-
), t.container.register("$settings", e);
|
|
2907
|
-
}
|
|
2908
|
-
).createCommand(
|
|
2909
|
-
"plugin",
|
|
2910
|
-
{ stage: ut.Pre },
|
|
2911
|
-
(t) => (e, r, s) => {
|
|
2912
|
-
const { container: i } = t;
|
|
2913
|
-
let o = null, a = e, c = r;
|
|
2914
|
-
typeof e == "string" && (o = e, a = r, c = s);
|
|
2915
|
-
const h = (l) => {
|
|
2916
|
-
const { transformPluginSettings: u } = t.container.get("$environmentOptions"), d = u ? u(
|
|
2917
|
-
c || {},
|
|
2918
|
-
o,
|
|
2919
|
-
t.container,
|
|
2920
|
-
a
|
|
2921
|
-
) : r;
|
|
2922
|
-
try {
|
|
2923
|
-
const p = eo(
|
|
2924
|
-
o,
|
|
2925
|
-
a,
|
|
2926
|
-
i,
|
|
2927
|
-
d
|
|
2928
|
-
);
|
|
2929
|
-
i.get("$plugins").push(p), l && p.invoke("initialize", null);
|
|
2930
|
-
} catch (p) {
|
|
2931
|
-
to(t).warn("Error when initializing plugin", p);
|
|
2932
|
-
}
|
|
2933
|
-
};
|
|
2934
|
-
t.container.get("$instance") ? h(!0) : t.events.subscribeOnce("widget:instance-created", () => h(!1));
|
|
2935
|
-
}
|
|
2936
|
-
).createCommand(
|
|
2937
|
-
"container.register",
|
|
2938
|
-
(t) => (e, r) => {
|
|
2939
|
-
t.container.register(e, r);
|
|
2940
|
-
}
|
|
2941
|
-
).createCommand(
|
|
2942
|
-
"container.registerAsync",
|
|
2943
|
-
(t) => (e, r) => {
|
|
2944
|
-
t.container.registerAsync(e, r);
|
|
2945
|
-
}
|
|
2946
|
-
).createCommand(
|
|
2947
|
-
"container.registerFactory",
|
|
2948
|
-
(t) => (e, r) => {
|
|
2949
|
-
t.container.registerFactory(e, r);
|
|
2950
|
-
}
|
|
2951
|
-
).createCommand(
|
|
2952
|
-
"container.touch",
|
|
2953
|
-
(t) => (e, r) => {
|
|
2954
|
-
t.container.touch(e, r);
|
|
2955
|
-
}
|
|
2956
|
-
).createCommand(
|
|
2957
|
-
"csp",
|
|
2958
|
-
{},
|
|
2959
|
-
(t) => (e) => {
|
|
2960
|
-
t.container.register("csp", e);
|
|
2961
|
-
}
|
|
2962
|
-
);
|
|
2963
|
-
});
|
|
2964
|
-
function ro(n) {
|
|
2965
|
-
const t = {};
|
|
2966
|
-
return [].filter.call(n.attributes, (e) => /^data-/.test(e.name)).map((e) => e.name).forEach((e) => t[e.substr(5)] = n.getAttribute(e)), t;
|
|
2967
|
-
}
|
|
2968
|
-
const Un = (n, t, e) => {
|
|
2969
|
-
const r = ro(n);
|
|
2970
|
-
e({
|
|
2971
|
-
sourceDOMElement: n,
|
|
2972
|
-
eventType: t,
|
|
2973
|
-
data: r
|
|
2974
|
-
});
|
|
2975
|
-
};
|
|
2976
|
-
function Vn(n, t, e) {
|
|
2977
|
-
n.forEach((r) => {
|
|
2978
|
-
r.dataset.attached !== "true" && (t === "load" ? Un(r, t, e) : r.addEventListener(t, (s) => {
|
|
2979
|
-
s.preventDefault(), Un(r, t, e);
|
|
2980
|
-
}), r.dataset.monitored = "true");
|
|
2981
|
-
});
|
|
2982
|
-
}
|
|
2983
|
-
function so(n, t, e) {
|
|
2984
|
-
const r = n.container.get("bootstrapping.monitor");
|
|
2985
|
-
r && r.events.subscribe("bootstrap:trigger-elements-updated", (i, o) => {
|
|
2986
|
-
Vn(
|
|
2987
|
-
o.triggerElements,
|
|
2988
|
-
t,
|
|
2989
|
-
e
|
|
2990
|
-
);
|
|
2991
|
-
});
|
|
2992
|
-
const s = n.container.get("triggerElements");
|
|
2993
|
-
s && Vn(
|
|
2994
|
-
s,
|
|
2995
|
-
t,
|
|
2996
|
-
e
|
|
2997
|
-
);
|
|
2998
|
-
}
|
|
2999
|
-
jr((n) => {
|
|
3000
|
-
n.createCommand(
|
|
3001
|
-
"ready",
|
|
3002
|
-
{ scope: Bt.Implementation, stage: ut.Pre },
|
|
3003
|
-
(t) => (e) => {
|
|
3004
|
-
const { container: r } = t, s = r.owner;
|
|
3005
|
-
r.get("bootstrapping").ready ? e(s) : s.events.subscribeOnce("bootstrap:ready", () => {
|
|
3006
|
-
e(s);
|
|
3007
|
-
});
|
|
3008
|
-
}
|
|
3009
|
-
);
|
|
3010
|
-
});
|
|
3011
|
-
const io = (n) => {
|
|
3012
|
-
const t = (s, i) => {
|
|
3013
|
-
s && (i ? s.classList.add("ace-tabbing") : s.classList.remove("ace-tabbing"));
|
|
3014
|
-
}, e = (s) => {
|
|
3015
|
-
s.key === "Tab" ? t(n, !0) : s.key === "Enter" && document.activeElement && document.activeElement.classList.contains("ace-widget-trigger") || t(n, !1);
|
|
3016
|
-
}, r = (s) => {
|
|
3017
|
-
document.activeElement && document.activeElement.classList.contains("ace-widget-trigger") && document.activeElement.classList.contains("ace-tabbing") || t(n, !1);
|
|
3018
|
-
};
|
|
3019
|
-
return document.addEventListener("keydown", e), document.addEventListener("click", r), () => {
|
|
3020
|
-
document.removeEventListener("keydown", e), document.removeEventListener("click", r);
|
|
3021
|
-
};
|
|
3022
|
-
};
|
|
3023
|
-
function oo(n, t) {
|
|
3024
|
-
const {
|
|
3025
|
-
// symbol,
|
|
3026
|
-
widgetName: e,
|
|
3027
|
-
label: r = "",
|
|
3028
|
-
ariaLabel: s = "",
|
|
3029
|
-
tooltip: i = ""
|
|
3030
|
-
} = t;
|
|
3031
|
-
return n.classList.add("ace-widget-trigger"), n.classList.add(`ace-widget_${e}`), r.length && n.classList.add("trigger-has-text"), s.length && !n.getAttribute("aria-label") && n.setAttribute("aria-label", s), s.length && !n.getAttribute("tabindex") && n.setAttribute("tabindex", "0"), i.length && !n.getAttribute("title") && n.setAttribute("title", i), io(n);
|
|
3032
|
-
}
|
|
3033
|
-
function ao(n, t) {
|
|
3034
|
-
n instanceof HTMLElement ? (t && n.setAttribute("title", t), n.classList.remove("ace-trigger-active"), n.classList.remove("ace-trigger-loading")) : n instanceof Array && n.forEach((e) => {
|
|
3035
|
-
t && e.setAttribute("title", t), e.classList.remove("ace-trigger-active"), e.classList.remove("ace-trigger-loading");
|
|
3036
|
-
});
|
|
3037
|
-
}
|
|
3038
|
-
function co(n) {
|
|
3039
|
-
n instanceof HTMLElement ? (n.classList.remove("ace-trigger-active"), n.classList.add("ace-trigger-loading")) : n instanceof Array && n.forEach((t) => {
|
|
3040
|
-
t.classList.remove("ace-trigger-active"), t.classList.add("ace-trigger-loading");
|
|
3041
|
-
});
|
|
3042
|
-
}
|
|
3043
|
-
function Rr(n, t) {
|
|
3044
|
-
n instanceof HTMLElement ? (t && n.setAttribute("title", t), n.classList.add("ace-trigger-active"), n.classList.remove("ace-trigger-loading")) : n instanceof Array && n.forEach((e) => {
|
|
3045
|
-
t && e.setAttribute("title", t), e.classList.add("ace-trigger-active"), e.classList.remove("ace-trigger-loading");
|
|
3046
|
-
});
|
|
3047
|
-
}
|
|
3048
|
-
/**
|
|
3049
|
-
* @license
|
|
3050
|
-
* Copyright 2019 Google LLC
|
|
3051
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3052
|
-
*/
|
|
3053
|
-
const ce = window, an = ce.ShadowRoot && (ce.ShadyCSS === void 0 || ce.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, cn = Symbol(), Bn = /* @__PURE__ */ new WeakMap();
|
|
3054
|
-
let Tr = class {
|
|
3055
|
-
constructor(t, e, r) {
|
|
3056
|
-
if (this._$cssResult$ = !0, r !== cn)
|
|
3057
|
-
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
3058
|
-
this.cssText = t, this.t = e;
|
|
3059
|
-
}
|
|
3060
|
-
get styleSheet() {
|
|
3061
|
-
let t = this.o;
|
|
3062
|
-
const e = this.t;
|
|
3063
|
-
if (an && t === void 0) {
|
|
3064
|
-
const r = e !== void 0 && e.length === 1;
|
|
3065
|
-
r && (t = Bn.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Bn.set(e, t));
|
|
3066
|
-
}
|
|
3067
|
-
return t;
|
|
3068
|
-
}
|
|
3069
|
-
toString() {
|
|
3070
|
-
return this.cssText;
|
|
3071
|
-
}
|
|
3072
|
-
};
|
|
3073
|
-
const ho = (n) => new Tr(typeof n == "string" ? n : n + "", void 0, cn), Ir = (n, ...t) => {
|
|
3074
|
-
const e = n.length === 1 ? n[0] : t.reduce((r, s, i) => r + ((o) => {
|
|
3075
|
-
if (o._$cssResult$ === !0)
|
|
3076
|
-
return o.cssText;
|
|
3077
|
-
if (typeof o == "number")
|
|
3078
|
-
return o;
|
|
3079
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
3080
|
-
})(s) + n[i + 1], n[0]);
|
|
3081
|
-
return new Tr(e, n, cn);
|
|
3082
|
-
}, lo = (n, t) => {
|
|
3083
|
-
an ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
3084
|
-
const r = document.createElement("style"), s = ce.litNonce;
|
|
3085
|
-
s !== void 0 && r.setAttribute("nonce", s), r.textContent = e.cssText, n.appendChild(r);
|
|
3086
|
-
});
|
|
3087
|
-
}, zn = an ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
3088
|
-
let e = "";
|
|
3089
|
-
for (const r of t.cssRules)
|
|
3090
|
-
e += r.cssText;
|
|
3091
|
-
return ho(e);
|
|
3092
|
-
})(n) : n;
|
|
3093
|
-
/**
|
|
3094
|
-
* @license
|
|
3095
|
-
* Copyright 2017 Google LLC
|
|
3096
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3097
|
-
*/
|
|
3098
|
-
var Ie;
|
|
3099
|
-
const me = window, Wn = me.trustedTypes, uo = Wn ? Wn.emptyScript : "", Fn = me.reactiveElementPolyfillSupport, Ye = { toAttribute(n, t) {
|
|
3100
|
-
switch (t) {
|
|
3101
|
-
case Boolean:
|
|
3102
|
-
n = n ? uo : null;
|
|
3103
|
-
break;
|
|
3104
|
-
case Object:
|
|
3105
|
-
case Array:
|
|
3106
|
-
n = n == null ? n : JSON.stringify(n);
|
|
3107
|
-
}
|
|
3108
|
-
return n;
|
|
3109
|
-
}, fromAttribute(n, t) {
|
|
3110
|
-
let e = n;
|
|
3111
|
-
switch (t) {
|
|
3112
|
-
case Boolean:
|
|
3113
|
-
e = n !== null;
|
|
3114
|
-
break;
|
|
3115
|
-
case Number:
|
|
3116
|
-
e = n === null ? null : Number(n);
|
|
3117
|
-
break;
|
|
3118
|
-
case Object:
|
|
3119
|
-
case Array:
|
|
3120
|
-
try {
|
|
3121
|
-
e = JSON.parse(n);
|
|
3122
|
-
} catch (r) {
|
|
3123
|
-
e = null;
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
return e;
|
|
3127
|
-
} }, Hr = (n, t) => t !== n && (t == t || n == n), He = { attribute: !0, type: String, converter: Ye, reflect: !1, hasChanged: Hr }, Ze = "finalized";
|
|
3128
|
-
let Pt = class extends HTMLElement {
|
|
3129
|
-
constructor() {
|
|
3130
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
3131
|
-
}
|
|
3132
|
-
static addInitializer(t) {
|
|
3133
|
-
var e;
|
|
3134
|
-
this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
|
|
3135
|
-
}
|
|
3136
|
-
static get observedAttributes() {
|
|
3137
|
-
this.finalize();
|
|
3138
|
-
const t = [];
|
|
3139
|
-
return this.elementProperties.forEach((e, r) => {
|
|
3140
|
-
const s = this._$Ep(r, e);
|
|
3141
|
-
s !== void 0 && (this._$Ev.set(s, r), t.push(s));
|
|
3142
|
-
}), t;
|
|
3143
|
-
}
|
|
3144
|
-
static createProperty(t, e = He) {
|
|
3145
|
-
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
3146
|
-
const r = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, r, e);
|
|
3147
|
-
s !== void 0 && Object.defineProperty(this.prototype, t, s);
|
|
3148
|
-
}
|
|
3149
|
-
}
|
|
3150
|
-
static getPropertyDescriptor(t, e, r) {
|
|
3151
|
-
return { get() {
|
|
3152
|
-
return this[e];
|
|
3153
|
-
}, set(s) {
|
|
3154
|
-
const i = this[t];
|
|
3155
|
-
this[e] = s, this.requestUpdate(t, i, r);
|
|
3156
|
-
}, configurable: !0, enumerable: !0 };
|
|
3157
|
-
}
|
|
3158
|
-
static getPropertyOptions(t) {
|
|
3159
|
-
return this.elementProperties.get(t) || He;
|
|
3160
|
-
}
|
|
3161
|
-
static finalize() {
|
|
3162
|
-
if (this.hasOwnProperty(Ze))
|
|
3163
|
-
return !1;
|
|
3164
|
-
this[Ze] = !0;
|
|
3165
|
-
const t = Object.getPrototypeOf(this);
|
|
3166
|
-
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
3167
|
-
const e = this.properties, r = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
3168
|
-
for (const s of r)
|
|
3169
|
-
this.createProperty(s, e[s]);
|
|
3170
|
-
}
|
|
3171
|
-
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
3172
|
-
}
|
|
3173
|
-
static finalizeStyles(t) {
|
|
3174
|
-
const e = [];
|
|
3175
|
-
if (Array.isArray(t)) {
|
|
3176
|
-
const r = new Set(t.flat(1 / 0).reverse());
|
|
3177
|
-
for (const s of r)
|
|
3178
|
-
e.unshift(zn(s));
|
|
3179
|
-
} else
|
|
3180
|
-
t !== void 0 && e.push(zn(t));
|
|
3181
|
-
return e;
|
|
3182
|
-
}
|
|
3183
|
-
static _$Ep(t, e) {
|
|
3184
|
-
const r = e.attribute;
|
|
3185
|
-
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
3186
|
-
}
|
|
3187
|
-
_$Eu() {
|
|
3188
|
-
var t;
|
|
3189
|
-
this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
|
|
3190
|
-
}
|
|
3191
|
-
addController(t) {
|
|
3192
|
-
var e, r;
|
|
3193
|
-
((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((r = t.hostConnected) === null || r === void 0 || r.call(t));
|
|
3194
|
-
}
|
|
3195
|
-
removeController(t) {
|
|
3196
|
-
var e;
|
|
3197
|
-
(e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
3198
|
-
}
|
|
3199
|
-
_$Eg() {
|
|
3200
|
-
this.constructor.elementProperties.forEach((t, e) => {
|
|
3201
|
-
this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
|
|
3202
|
-
});
|
|
3203
|
-
}
|
|
3204
|
-
createRenderRoot() {
|
|
3205
|
-
var t;
|
|
3206
|
-
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
3207
|
-
return lo(e, this.constructor.elementStyles), e;
|
|
3208
|
-
}
|
|
3209
|
-
connectedCallback() {
|
|
3210
|
-
var t;
|
|
3211
|
-
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
|
|
3212
|
-
var r;
|
|
3213
|
-
return (r = e.hostConnected) === null || r === void 0 ? void 0 : r.call(e);
|
|
3214
|
-
});
|
|
3215
|
-
}
|
|
3216
|
-
enableUpdating(t) {
|
|
3217
|
-
}
|
|
3218
|
-
disconnectedCallback() {
|
|
3219
|
-
var t;
|
|
3220
|
-
(t = this._$ES) === null || t === void 0 || t.forEach((e) => {
|
|
3221
|
-
var r;
|
|
3222
|
-
return (r = e.hostDisconnected) === null || r === void 0 ? void 0 : r.call(e);
|
|
3223
|
-
});
|
|
3224
|
-
}
|
|
3225
|
-
attributeChangedCallback(t, e, r) {
|
|
3226
|
-
this._$AK(t, r);
|
|
3227
|
-
}
|
|
3228
|
-
_$EO(t, e, r = He) {
|
|
3229
|
-
var s;
|
|
3230
|
-
const i = this.constructor._$Ep(t, r);
|
|
3231
|
-
if (i !== void 0 && r.reflect === !0) {
|
|
3232
|
-
const o = (((s = r.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? r.converter : Ye).toAttribute(e, r.type);
|
|
3233
|
-
this._$El = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$El = null;
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
_$AK(t, e) {
|
|
3237
|
-
var r;
|
|
3238
|
-
const s = this.constructor, i = s._$Ev.get(t);
|
|
3239
|
-
if (i !== void 0 && this._$El !== i) {
|
|
3240
|
-
const o = s.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) === null || r === void 0 ? void 0 : r.fromAttribute) !== void 0 ? o.converter : Ye;
|
|
3241
|
-
this._$El = i, this[i] = a.fromAttribute(e, o.type), this._$El = null;
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
requestUpdate(t, e, r) {
|
|
3245
|
-
let s = !0;
|
|
3246
|
-
t !== void 0 && (((r = r || this.constructor.getPropertyOptions(t)).hasChanged || Hr)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), r.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, r))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
|
|
3247
|
-
}
|
|
3248
|
-
_$Ej() {
|
|
3249
|
-
return B(this, null, function* () {
|
|
3250
|
-
this.isUpdatePending = !0;
|
|
3251
|
-
try {
|
|
3252
|
-
yield this._$E_;
|
|
3253
|
-
} catch (e) {
|
|
3254
|
-
Promise.reject(e);
|
|
3255
|
-
}
|
|
3256
|
-
const t = this.scheduleUpdate();
|
|
3257
|
-
return t != null && (yield t), !this.isUpdatePending;
|
|
3258
|
-
});
|
|
3259
|
-
}
|
|
3260
|
-
scheduleUpdate() {
|
|
3261
|
-
return this.performUpdate();
|
|
3262
|
-
}
|
|
3263
|
-
performUpdate() {
|
|
3264
|
-
var t;
|
|
3265
|
-
if (!this.isUpdatePending)
|
|
3266
|
-
return;
|
|
3267
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, i) => this[i] = s), this._$Ei = void 0);
|
|
3268
|
-
let e = !1;
|
|
3269
|
-
const r = this._$AL;
|
|
3270
|
-
try {
|
|
3271
|
-
e = this.shouldUpdate(r), e ? (this.willUpdate(r), (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
|
3272
|
-
var i;
|
|
3273
|
-
return (i = s.hostUpdate) === null || i === void 0 ? void 0 : i.call(s);
|
|
3274
|
-
}), this.update(r)) : this._$Ek();
|
|
3275
|
-
} catch (s) {
|
|
3276
|
-
throw e = !1, this._$Ek(), s;
|
|
3277
|
-
}
|
|
3278
|
-
e && this._$AE(r);
|
|
3279
|
-
}
|
|
3280
|
-
willUpdate(t) {
|
|
3281
|
-
}
|
|
3282
|
-
_$AE(t) {
|
|
3283
|
-
var e;
|
|
3284
|
-
(e = this._$ES) === null || e === void 0 || e.forEach((r) => {
|
|
3285
|
-
var s;
|
|
3286
|
-
return (s = r.hostUpdated) === null || s === void 0 ? void 0 : s.call(r);
|
|
3287
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
3288
|
-
}
|
|
3289
|
-
_$Ek() {
|
|
3290
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
3291
|
-
}
|
|
3292
|
-
get updateComplete() {
|
|
3293
|
-
return this.getUpdateComplete();
|
|
3294
|
-
}
|
|
3295
|
-
getUpdateComplete() {
|
|
3296
|
-
return this._$E_;
|
|
3297
|
-
}
|
|
3298
|
-
shouldUpdate(t) {
|
|
3299
|
-
return !0;
|
|
3300
|
-
}
|
|
3301
|
-
update(t) {
|
|
3302
|
-
this._$EC !== void 0 && (this._$EC.forEach((e, r) => this._$EO(r, this[r], e)), this._$EC = void 0), this._$Ek();
|
|
3303
|
-
}
|
|
3304
|
-
updated(t) {
|
|
3305
|
-
}
|
|
3306
|
-
firstUpdated(t) {
|
|
3307
|
-
}
|
|
3308
|
-
};
|
|
3309
|
-
Pt[Ze] = !0, Pt.elementProperties = /* @__PURE__ */ new Map(), Pt.elementStyles = [], Pt.shadowRootOptions = { mode: "open" }, Fn == null || Fn({ ReactiveElement: Pt }), ((Ie = me.reactiveElementVersions) !== null && Ie !== void 0 ? Ie : me.reactiveElementVersions = []).push("1.6.3");
|
|
3310
|
-
/**
|
|
3311
|
-
* @license
|
|
3312
|
-
* Copyright 2017 Google LLC
|
|
3313
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3314
|
-
*/
|
|
3315
|
-
var Ue;
|
|
3316
|
-
const ve = window, St = ve.trustedTypes, qn = St ? St.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Qe = "$lit$", ht = `lit$${(Math.random() + "").slice(9)}$`, Ur = "?" + ht, po = `<${Ur}>`, Ot = document, zt = () => Ot.createComment(""), Wt = (n) => n === null || typeof n != "object" && typeof n != "function", Vr = Array.isArray, go = (n) => Vr(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Ve = `[
|
|
3317
|
-
\f\r]`, Dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Jn = /-->/g, Kn = />/g, pt = RegExp(`>|${Ve}(?:([^\\s"'>=/]+)(${Ve}*=${Ve}*(?:[^
|
|
3318
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Gn = /'/g, Yn = /"/g, Br = /^(?:script|style|textarea|title)$/i, fo = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), Xt = fo(1), Et = Symbol.for("lit-noChange"), j = Symbol.for("lit-nothing"), Zn = /* @__PURE__ */ new WeakMap(), bt = Ot.createTreeWalker(Ot, 129, null, !1);
|
|
3319
|
-
function zr(n, t) {
|
|
3320
|
-
if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
|
|
3321
|
-
throw Error("invalid template strings array");
|
|
3322
|
-
return qn !== void 0 ? qn.createHTML(t) : t;
|
|
3323
|
-
}
|
|
3324
|
-
const mo = (n, t) => {
|
|
3325
|
-
const e = n.length - 1, r = [];
|
|
3326
|
-
let s, i = t === 2 ? "<svg>" : "", o = Dt;
|
|
3327
|
-
for (let a = 0; a < e; a++) {
|
|
3328
|
-
const c = n[a];
|
|
3329
|
-
let h, l, u = -1, d = 0;
|
|
3330
|
-
for (; d < c.length && (o.lastIndex = d, l = o.exec(c), l !== null); )
|
|
3331
|
-
d = o.lastIndex, o === Dt ? l[1] === "!--" ? o = Jn : l[1] !== void 0 ? o = Kn : l[2] !== void 0 ? (Br.test(l[2]) && (s = RegExp("</" + l[2], "g")), o = pt) : l[3] !== void 0 && (o = pt) : o === pt ? l[0] === ">" ? (o = s != null ? s : Dt, u = -1) : l[1] === void 0 ? u = -2 : (u = o.lastIndex - l[2].length, h = l[1], o = l[3] === void 0 ? pt : l[3] === '"' ? Yn : Gn) : o === Yn || o === Gn ? o = pt : o === Jn || o === Kn ? o = Dt : (o = pt, s = void 0);
|
|
3332
|
-
const p = o === pt && n[a + 1].startsWith("/>") ? " " : "";
|
|
3333
|
-
i += o === Dt ? c + po : u >= 0 ? (r.push(h), c.slice(0, u) + Qe + c.slice(u) + ht + p) : c + ht + (u === -2 ? (r.push(void 0), a) : p);
|
|
3334
|
-
}
|
|
3335
|
-
return [zr(n, i + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), r];
|
|
3336
|
-
};
|
|
3337
|
-
class Ft {
|
|
3338
|
-
constructor({ strings: t, _$litType$: e }, r) {
|
|
3339
|
-
let s;
|
|
3340
|
-
this.parts = [];
|
|
3341
|
-
let i = 0, o = 0;
|
|
3342
|
-
const a = t.length - 1, c = this.parts, [h, l] = mo(t, e);
|
|
3343
|
-
if (this.el = Ft.createElement(h, r), bt.currentNode = this.el.content, e === 2) {
|
|
3344
|
-
const u = this.el.content, d = u.firstChild;
|
|
3345
|
-
d.remove(), u.append(...d.childNodes);
|
|
3346
|
-
}
|
|
3347
|
-
for (; (s = bt.nextNode()) !== null && c.length < a; ) {
|
|
3348
|
-
if (s.nodeType === 1) {
|
|
3349
|
-
if (s.hasAttributes()) {
|
|
3350
|
-
const u = [];
|
|
3351
|
-
for (const d of s.getAttributeNames())
|
|
3352
|
-
if (d.endsWith(Qe) || d.startsWith(ht)) {
|
|
3353
|
-
const p = l[o++];
|
|
3354
|
-
if (u.push(d), p !== void 0) {
|
|
3355
|
-
const b = s.getAttribute(p.toLowerCase() + Qe).split(ht), v = /([.?@])?(.*)/.exec(p);
|
|
3356
|
-
c.push({ type: 1, index: i, name: v[2], strings: b, ctor: v[1] === "." ? yo : v[1] === "?" ? wo : v[1] === "@" ? $o : _e });
|
|
3357
|
-
} else
|
|
3358
|
-
c.push({ type: 6, index: i });
|
|
3359
|
-
}
|
|
3360
|
-
for (const d of u)
|
|
3361
|
-
s.removeAttribute(d);
|
|
3362
|
-
}
|
|
3363
|
-
if (Br.test(s.tagName)) {
|
|
3364
|
-
const u = s.textContent.split(ht), d = u.length - 1;
|
|
3365
|
-
if (d > 0) {
|
|
3366
|
-
s.textContent = St ? St.emptyScript : "";
|
|
3367
|
-
for (let p = 0; p < d; p++)
|
|
3368
|
-
s.append(u[p], zt()), bt.nextNode(), c.push({ type: 2, index: ++i });
|
|
3369
|
-
s.append(u[d], zt());
|
|
3370
|
-
}
|
|
3371
|
-
}
|
|
3372
|
-
} else if (s.nodeType === 8)
|
|
3373
|
-
if (s.data === Ur)
|
|
3374
|
-
c.push({ type: 2, index: i });
|
|
3375
|
-
else {
|
|
3376
|
-
let u = -1;
|
|
3377
|
-
for (; (u = s.data.indexOf(ht, u + 1)) !== -1; )
|
|
3378
|
-
c.push({ type: 7, index: i }), u += ht.length - 1;
|
|
3379
|
-
}
|
|
3380
|
-
i++;
|
|
3381
|
-
}
|
|
3382
|
-
}
|
|
3383
|
-
static createElement(t, e) {
|
|
3384
|
-
const r = Ot.createElement("template");
|
|
3385
|
-
return r.innerHTML = t, r;
|
|
3386
|
-
}
|
|
3387
|
-
}
|
|
3388
|
-
function kt(n, t, e = n, r) {
|
|
3389
|
-
var s, i, o, a;
|
|
3390
|
-
if (t === Et)
|
|
3391
|
-
return t;
|
|
3392
|
-
let c = r !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[r] : e._$Cl;
|
|
3393
|
-
const h = Wt(t) ? void 0 : t._$litDirective$;
|
|
3394
|
-
return (c == null ? void 0 : c.constructor) !== h && ((i = c == null ? void 0 : c._$AO) === null || i === void 0 || i.call(c, !1), h === void 0 ? c = void 0 : (c = new h(n), c._$AT(n, e, r)), r !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[r] = c : e._$Cl = c), c !== void 0 && (t = kt(n, c._$AS(n, t.values), c, r)), t;
|
|
3395
|
-
}
|
|
3396
|
-
class vo {
|
|
3397
|
-
constructor(t, e) {
|
|
3398
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
3399
|
-
}
|
|
3400
|
-
get parentNode() {
|
|
3401
|
-
return this._$AM.parentNode;
|
|
3402
|
-
}
|
|
3403
|
-
get _$AU() {
|
|
3404
|
-
return this._$AM._$AU;
|
|
3405
|
-
}
|
|
3406
|
-
u(t) {
|
|
3407
|
-
var e;
|
|
3408
|
-
const { el: { content: r }, parts: s } = this._$AD, i = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Ot).importNode(r, !0);
|
|
3409
|
-
bt.currentNode = i;
|
|
3410
|
-
let o = bt.nextNode(), a = 0, c = 0, h = s[0];
|
|
3411
|
-
for (; h !== void 0; ) {
|
|
3412
|
-
if (a === h.index) {
|
|
3413
|
-
let l;
|
|
3414
|
-
h.type === 2 ? l = new Kt(o, o.nextSibling, this, t) : h.type === 1 ? l = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (l = new Oo(o, this, t)), this._$AV.push(l), h = s[++c];
|
|
3415
|
-
}
|
|
3416
|
-
a !== (h == null ? void 0 : h.index) && (o = bt.nextNode(), a++);
|
|
3417
|
-
}
|
|
3418
|
-
return bt.currentNode = Ot, i;
|
|
3419
|
-
}
|
|
3420
|
-
v(t) {
|
|
3421
|
-
let e = 0;
|
|
3422
|
-
for (const r of this._$AV)
|
|
3423
|
-
r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
|
|
3424
|
-
}
|
|
3425
|
-
}
|
|
3426
|
-
class Kt {
|
|
3427
|
-
constructor(t, e, r, s) {
|
|
3428
|
-
var i;
|
|
3429
|
-
this.type = 2, this._$AH = j, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = s, this._$Cp = (i = s == null ? void 0 : s.isConnected) === null || i === void 0 || i;
|
|
3430
|
-
}
|
|
3431
|
-
get _$AU() {
|
|
3432
|
-
var t, e;
|
|
3433
|
-
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
|
|
3434
|
-
}
|
|
3435
|
-
get parentNode() {
|
|
3436
|
-
let t = this._$AA.parentNode;
|
|
3437
|
-
const e = this._$AM;
|
|
3438
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
3439
|
-
}
|
|
3440
|
-
get startNode() {
|
|
3441
|
-
return this._$AA;
|
|
3442
|
-
}
|
|
3443
|
-
get endNode() {
|
|
3444
|
-
return this._$AB;
|
|
3445
|
-
}
|
|
3446
|
-
_$AI(t, e = this) {
|
|
3447
|
-
t = kt(this, t, e), Wt(t) ? t === j || t == null || t === "" ? (this._$AH !== j && this._$AR(), this._$AH = j) : t !== this._$AH && t !== Et && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : go(t) ? this.T(t) : this._(t);
|
|
3448
|
-
}
|
|
3449
|
-
k(t) {
|
|
3450
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
3451
|
-
}
|
|
3452
|
-
$(t) {
|
|
3453
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
3454
|
-
}
|
|
3455
|
-
_(t) {
|
|
3456
|
-
this._$AH !== j && Wt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(Ot.createTextNode(t)), this._$AH = t;
|
|
3457
|
-
}
|
|
3458
|
-
g(t) {
|
|
3459
|
-
var e;
|
|
3460
|
-
const { values: r, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Ft.createElement(zr(s.h, s.h[0]), this.options)), s);
|
|
3461
|
-
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === i)
|
|
3462
|
-
this._$AH.v(r);
|
|
3463
|
-
else {
|
|
3464
|
-
const o = new vo(i, this), a = o.u(this.options);
|
|
3465
|
-
o.v(r), this.$(a), this._$AH = o;
|
|
3466
|
-
}
|
|
3467
|
-
}
|
|
3468
|
-
_$AC(t) {
|
|
3469
|
-
let e = Zn.get(t.strings);
|
|
3470
|
-
return e === void 0 && Zn.set(t.strings, e = new Ft(t)), e;
|
|
3471
|
-
}
|
|
3472
|
-
T(t) {
|
|
3473
|
-
Vr(this._$AH) || (this._$AH = [], this._$AR());
|
|
3474
|
-
const e = this._$AH;
|
|
3475
|
-
let r, s = 0;
|
|
3476
|
-
for (const i of t)
|
|
3477
|
-
s === e.length ? e.push(r = new Kt(this.k(zt()), this.k(zt()), this, this.options)) : r = e[s], r._$AI(i), s++;
|
|
3478
|
-
s < e.length && (this._$AR(r && r._$AB.nextSibling, s), e.length = s);
|
|
3479
|
-
}
|
|
3480
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
3481
|
-
var r;
|
|
3482
|
-
for ((r = this._$AP) === null || r === void 0 || r.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
3483
|
-
const s = t.nextSibling;
|
|
3484
|
-
t.remove(), t = s;
|
|
3485
|
-
}
|
|
3486
|
-
}
|
|
3487
|
-
setConnected(t) {
|
|
3488
|
-
var e;
|
|
3489
|
-
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
3490
|
-
}
|
|
3491
|
-
}
|
|
3492
|
-
class _e {
|
|
3493
|
-
constructor(t, e, r, s, i) {
|
|
3494
|
-
this.type = 1, this._$AH = j, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = j;
|
|
3495
|
-
}
|
|
3496
|
-
get tagName() {
|
|
3497
|
-
return this.element.tagName;
|
|
3498
|
-
}
|
|
3499
|
-
get _$AU() {
|
|
3500
|
-
return this._$AM._$AU;
|
|
3501
|
-
}
|
|
3502
|
-
_$AI(t, e = this, r, s) {
|
|
3503
|
-
const i = this.strings;
|
|
3504
|
-
let o = !1;
|
|
3505
|
-
if (i === void 0)
|
|
3506
|
-
t = kt(this, t, e, 0), o = !Wt(t) || t !== this._$AH && t !== Et, o && (this._$AH = t);
|
|
3507
|
-
else {
|
|
3508
|
-
const a = t;
|
|
3509
|
-
let c, h;
|
|
3510
|
-
for (t = i[0], c = 0; c < i.length - 1; c++)
|
|
3511
|
-
h = kt(this, a[r + c], e, c), h === Et && (h = this._$AH[c]), o || (o = !Wt(h) || h !== this._$AH[c]), h === j ? t = j : t !== j && (t += (h != null ? h : "") + i[c + 1]), this._$AH[c] = h;
|
|
3512
|
-
}
|
|
3513
|
-
o && !s && this.j(t);
|
|
3514
|
-
}
|
|
3515
|
-
j(t) {
|
|
3516
|
-
t === j ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
|
|
3517
|
-
}
|
|
3518
|
-
}
|
|
3519
|
-
class yo extends _e {
|
|
3520
|
-
constructor() {
|
|
3521
|
-
super(...arguments), this.type = 3;
|
|
3522
|
-
}
|
|
3523
|
-
j(t) {
|
|
3524
|
-
this.element[this.name] = t === j ? void 0 : t;
|
|
3525
|
-
}
|
|
3526
|
-
}
|
|
3527
|
-
const bo = St ? St.emptyScript : "";
|
|
3528
|
-
class wo extends _e {
|
|
3529
|
-
constructor() {
|
|
3530
|
-
super(...arguments), this.type = 4;
|
|
3531
|
-
}
|
|
3532
|
-
j(t) {
|
|
3533
|
-
t && t !== j ? this.element.setAttribute(this.name, bo) : this.element.removeAttribute(this.name);
|
|
3534
|
-
}
|
|
3535
|
-
}
|
|
3536
|
-
class $o extends _e {
|
|
3537
|
-
constructor(t, e, r, s, i) {
|
|
3538
|
-
super(t, e, r, s, i), this.type = 5;
|
|
3539
|
-
}
|
|
3540
|
-
_$AI(t, e = this) {
|
|
3541
|
-
var r;
|
|
3542
|
-
if ((t = (r = kt(this, t, e, 0)) !== null && r !== void 0 ? r : j) === Et)
|
|
3543
|
-
return;
|
|
3544
|
-
const s = this._$AH, i = t === j && s !== j || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== j && (s === j || i);
|
|
3545
|
-
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
3546
|
-
}
|
|
3547
|
-
handleEvent(t) {
|
|
3548
|
-
var e, r;
|
|
3549
|
-
typeof this._$AH == "function" ? this._$AH.call((r = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && r !== void 0 ? r : this.element, t) : this._$AH.handleEvent(t);
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
class Oo {
|
|
3553
|
-
constructor(t, e, r) {
|
|
3554
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
|
|
3555
|
-
}
|
|
3556
|
-
get _$AU() {
|
|
3557
|
-
return this._$AM._$AU;
|
|
3558
|
-
}
|
|
3559
|
-
_$AI(t) {
|
|
3560
|
-
kt(this, t);
|
|
3561
|
-
}
|
|
3562
|
-
}
|
|
3563
|
-
const Qn = ve.litHtmlPolyfillSupport;
|
|
3564
|
-
Qn == null || Qn(Ft, Kt), ((Ue = ve.litHtmlVersions) !== null && Ue !== void 0 ? Ue : ve.litHtmlVersions = []).push("2.8.0");
|
|
3565
|
-
const Eo = (n, t, e) => {
|
|
3566
|
-
var r, s;
|
|
3567
|
-
const i = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : t;
|
|
3568
|
-
let o = i._$litPart$;
|
|
3569
|
-
if (o === void 0) {
|
|
3570
|
-
const a = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null;
|
|
3571
|
-
i._$litPart$ = o = new Kt(t.insertBefore(zt(), a), a, void 0, e != null ? e : {});
|
|
3572
|
-
}
|
|
3573
|
-
return o._$AI(n), o;
|
|
3574
|
-
};
|
|
3575
|
-
/**
|
|
3576
|
-
* @license
|
|
3577
|
-
* Copyright 2017 Google LLC
|
|
3578
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3579
|
-
*/
|
|
3580
|
-
var Be, ze;
|
|
3581
|
-
let Vt = class extends Pt {
|
|
3582
|
-
constructor() {
|
|
3583
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
3584
|
-
}
|
|
3585
|
-
createRenderRoot() {
|
|
3586
|
-
var t, e;
|
|
3587
|
-
const r = super.createRenderRoot();
|
|
3588
|
-
return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = r.firstChild), r;
|
|
3589
|
-
}
|
|
3590
|
-
update(t) {
|
|
3591
|
-
const e = this.render();
|
|
3592
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Eo(e, this.renderRoot, this.renderOptions);
|
|
3593
|
-
}
|
|
3594
|
-
connectedCallback() {
|
|
3595
|
-
var t;
|
|
3596
|
-
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
3597
|
-
}
|
|
3598
|
-
disconnectedCallback() {
|
|
3599
|
-
var t;
|
|
3600
|
-
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
3601
|
-
}
|
|
3602
|
-
render() {
|
|
3603
|
-
return Et;
|
|
3604
|
-
}
|
|
3605
|
-
};
|
|
3606
|
-
Vt.finalized = !0, Vt._$litElement$ = !0, (Be = globalThis.litElementHydrateSupport) === null || Be === void 0 || Be.call(globalThis, { LitElement: Vt });
|
|
3607
|
-
const Xn = globalThis.litElementPolyfillSupport;
|
|
3608
|
-
Xn == null || Xn({ LitElement: Vt });
|
|
3609
|
-
((ze = globalThis.litElementVersions) !== null && ze !== void 0 ? ze : globalThis.litElementVersions = []).push("3.3.3");
|
|
3610
|
-
/**
|
|
3611
|
-
* @license
|
|
3612
|
-
* Copyright 2017 Google LLC
|
|
3613
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3614
|
-
*/
|
|
3615
|
-
const xo = (n, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? Mt(tt({}, t), { finisher(e) {
|
|
3616
|
-
e.createProperty(t.key, n);
|
|
3617
|
-
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
3618
|
-
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
3619
|
-
}, finisher(e) {
|
|
3620
|
-
e.createProperty(t.key, n);
|
|
3621
|
-
} }, _o = (n, t, e) => {
|
|
3622
|
-
t.constructor.createProperty(e, n);
|
|
3623
|
-
};
|
|
3624
|
-
function ye(n) {
|
|
3625
|
-
return (t, e) => e !== void 0 ? _o(n, t, e) : xo(n, t);
|
|
3626
|
-
}
|
|
3627
|
-
/**
|
|
3628
|
-
* @license
|
|
3629
|
-
* Copyright 2017 Google LLC
|
|
3630
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3631
|
-
*/
|
|
3632
|
-
function lt(n) {
|
|
3633
|
-
return ye(Mt(tt({}, n), { state: !0 }));
|
|
3634
|
-
}
|
|
3635
|
-
/**
|
|
3636
|
-
* @license
|
|
3637
|
-
* Copyright 2017 Google LLC
|
|
3638
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3639
|
-
*/
|
|
3640
|
-
const Ao = ({ finisher: n, descriptor: t }) => (e, r) => {
|
|
3641
|
-
var s;
|
|
3642
|
-
if (r === void 0) {
|
|
3643
|
-
const i = (s = e.originalKey) !== null && s !== void 0 ? s : e.key, o = t != null ? { kind: "method", placement: "prototype", key: i, descriptor: t(e.key) } : Mt(tt({}, e), { key: i });
|
|
3644
|
-
return n != null && (o.finisher = function(a) {
|
|
3645
|
-
n(a, i);
|
|
3646
|
-
}), o;
|
|
3647
|
-
}
|
|
3648
|
-
{
|
|
3649
|
-
const i = e.constructor;
|
|
3650
|
-
t !== void 0 && Object.defineProperty(e, r, t(r)), n == null || n(i, r);
|
|
3651
|
-
}
|
|
3652
|
-
};
|
|
3653
|
-
/**
|
|
3654
|
-
* @license
|
|
3655
|
-
* Copyright 2021 Google LLC
|
|
3656
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3657
|
-
*/
|
|
3658
|
-
var We;
|
|
3659
|
-
((We = window.HTMLSlotElement) === null || We === void 0 ? void 0 : We.prototype.assignedElements) != null;
|
|
3660
|
-
/**
|
|
3661
|
-
* @license
|
|
3662
|
-
* Copyright 2017 Google LLC
|
|
3663
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3664
|
-
*/
|
|
3665
|
-
const Po = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Co = (n) => (...t) => ({ _$litDirective$: n, values: t });
|
|
3666
|
-
let So = class {
|
|
3667
|
-
constructor(t) {
|
|
3668
|
-
}
|
|
3669
|
-
get _$AU() {
|
|
3670
|
-
return this._$AM._$AU;
|
|
3671
|
-
}
|
|
3672
|
-
_$AT(t, e, r) {
|
|
3673
|
-
this._$Ct = t, this._$AM = e, this._$Ci = r;
|
|
3674
|
-
}
|
|
3675
|
-
_$AS(t, e) {
|
|
3676
|
-
return this.update(t, e);
|
|
3677
|
-
}
|
|
3678
|
-
update(t, e) {
|
|
3679
|
-
return this.render(...e);
|
|
3680
|
-
}
|
|
3681
|
-
};
|
|
3682
|
-
/**
|
|
3683
|
-
* @license
|
|
3684
|
-
* Copyright 2018 Google LLC
|
|
3685
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
3686
|
-
*/
|
|
3687
|
-
const ko = Co(class extends So {
|
|
3688
|
-
constructor(n) {
|
|
3689
|
-
var t;
|
|
3690
|
-
if (super(n), n.type !== Po.ATTRIBUTE || n.name !== "class" || ((t = n.strings) === null || t === void 0 ? void 0 : t.length) > 2)
|
|
3691
|
-
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
3692
|
-
}
|
|
3693
|
-
render(n) {
|
|
3694
|
-
return " " + Object.keys(n).filter((t) => n[t]).join(" ") + " ";
|
|
3695
|
-
}
|
|
3696
|
-
update(n, [t]) {
|
|
3697
|
-
var e, r;
|
|
3698
|
-
if (this.it === void 0) {
|
|
3699
|
-
this.it = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.nt = new Set(n.strings.join(" ").split(/\s/).filter((i) => i !== "")));
|
|
3700
|
-
for (const i in t)
|
|
3701
|
-
t[i] && !(!((e = this.nt) === null || e === void 0) && e.has(i)) && this.it.add(i);
|
|
3702
|
-
return this.render(t);
|
|
3703
|
-
}
|
|
3704
|
-
const s = n.element.classList;
|
|
3705
|
-
this.it.forEach((i) => {
|
|
3706
|
-
i in t || (s.remove(i), this.it.delete(i));
|
|
3707
|
-
});
|
|
3708
|
-
for (const i in t) {
|
|
3709
|
-
const o = !!t[i];
|
|
3710
|
-
o === this.it.has(i) || !((r = this.nt) === null || r === void 0) && r.has(i) || (o ? (s.add(i), this.it.add(i)) : (s.remove(i), this.it.delete(i)));
|
|
3711
|
-
}
|
|
3712
|
-
return Et;
|
|
3713
|
-
}
|
|
3714
|
-
});
|
|
3715
|
-
var No = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Ae = (n, t, e, r) => {
|
|
3716
|
-
for (var s = r > 1 ? void 0 : r ? Lo(t, e) : t, i = n.length - 1, o; i >= 0; i--)
|
|
3717
|
-
(o = n[i]) && (s = (r ? o(t, e, s) : o(s)) || s);
|
|
3718
|
-
return r && s && No(t, e, s), s;
|
|
3719
|
-
};
|
|
3720
|
-
class dt extends Vt {
|
|
3721
|
-
constructor() {
|
|
3722
|
-
super(...arguments), this.active = !1, this.loaded = !1;
|
|
3723
|
-
}
|
|
3724
|
-
connectedCallback() {
|
|
3725
|
-
return B(this, null, function* () {
|
|
3726
|
-
pn(dt.prototype, this, "connectedCallback").call(this), this.icon = yield this._renderSymbol(this.symbol), this.loaded = !0;
|
|
3727
|
-
});
|
|
3728
|
-
}
|
|
3729
|
-
_toggleActive() {
|
|
3730
|
-
this.active = !this.active;
|
|
3731
|
-
}
|
|
3732
|
-
_renderSymbol(t) {
|
|
3733
|
-
return B(this, null, function* () {
|
|
3734
|
-
const e = (r) => B(this, null, function* () {
|
|
3735
|
-
return yield import("./index-9688347a.js").then((i) => i[r]);
|
|
3736
|
-
});
|
|
3737
|
-
if (t) {
|
|
3738
|
-
const { type: r, content: s } = t;
|
|
3739
|
-
switch (r) {
|
|
3740
|
-
case "Telia": {
|
|
3741
|
-
const i = yield e(s);
|
|
3742
|
-
return i ? Xt`<telia-icon
|
|
3743
|
-
class="trigger-icon"
|
|
3744
|
-
svg=${i.svg}
|
|
3745
|
-
size="lg"
|
|
3746
|
-
></telia-icon>` : j;
|
|
3747
|
-
}
|
|
3748
|
-
case "FontAwesome":
|
|
3749
|
-
return Xt`<i class="trigger-fa-icon fa fa-${s}"></i>`;
|
|
3750
|
-
case "Uri":
|
|
3751
|
-
return Xt`<i
|
|
3752
|
-
class="trigger-custom-icon"
|
|
3753
|
-
style="background: url(${s}) no-repeat center center;background-size: contain;"
|
|
3754
|
-
></i>`;
|
|
3755
|
-
default:
|
|
3756
|
-
return j;
|
|
3757
|
-
}
|
|
3758
|
-
}
|
|
3759
|
-
});
|
|
3760
|
-
}
|
|
3761
|
-
render() {
|
|
3762
|
-
return Xt`<button
|
|
3763
|
-
class=${ko({
|
|
3764
|
-
trigger: !0,
|
|
3765
|
-
active: this.active,
|
|
3766
|
-
rendered: this.loaded
|
|
3767
|
-
})}
|
|
3768
|
-
@click=${this._toggleActive}
|
|
3769
|
-
>
|
|
3770
|
-
${this.icon}
|
|
3771
|
-
<span class="trigger-close">
|
|
3772
|
-
<svg
|
|
3773
|
-
width="18"
|
|
3774
|
-
height="9"
|
|
3775
|
-
viewBox="0 0 18 9"
|
|
3776
|
-
fill="none"
|
|
3777
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3778
|
-
>
|
|
3779
|
-
<path
|
|
3780
|
-
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
|
3781
|
-
fill="white"
|
|
3782
|
-
/>
|
|
3783
|
-
</svg>
|
|
3784
|
-
</span>
|
|
3785
|
-
<span class="trigger-loader">
|
|
3786
|
-
<svg viewBox="25 25 50 50">
|
|
3787
|
-
<circle
|
|
3788
|
-
cx="50"
|
|
3789
|
-
cy="50"
|
|
3790
|
-
r="20"
|
|
3791
|
-
fill="none"
|
|
3792
|
-
stroke="#000"
|
|
3793
|
-
stroke-width="2"
|
|
3794
|
-
stroke-miterlimit="10"
|
|
3795
|
-
/>
|
|
3796
|
-
</svg>
|
|
3797
|
-
</span>
|
|
3798
|
-
</button>`;
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
dt.styles = [
|
|
3802
|
-
Ir`
|
|
3803
|
-
:host {
|
|
3804
|
-
--voca-rem-multiplier: 0.625;
|
|
3805
|
-
display: block;
|
|
3806
|
-
box-sizing: border-box;
|
|
3807
|
-
}
|
|
3808
|
-
|
|
3809
|
-
.trigger {
|
|
3810
|
-
position: fixed;
|
|
3811
|
-
transform: scale(0);
|
|
3812
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
3813
|
-
bottom: 20px;
|
|
3814
|
-
right: 20px;
|
|
3815
|
-
z-index: 5;
|
|
3816
|
-
display: flex;
|
|
3817
|
-
align-items: center;
|
|
3818
|
-
justify-content: center;
|
|
3819
|
-
border: none;
|
|
3820
|
-
line-height: 55px;
|
|
3821
|
-
height: 55px;
|
|
3822
|
-
width: 55px;
|
|
3823
|
-
border-radius: 55px;
|
|
3824
|
-
cursor: pointer;
|
|
3825
|
-
background-color: #990ae3;
|
|
3826
|
-
font-family: Lato;
|
|
3827
|
-
text-decoration: none;
|
|
3828
|
-
border: 3px dashed transparent;
|
|
3829
|
-
box-sizing: border-box;
|
|
3830
|
-
transition: transform 200ms ease-out;
|
|
3831
|
-
}
|
|
3832
|
-
.trigger:hover {
|
|
3833
|
-
transform: scale(1.1) !important;
|
|
3834
|
-
}
|
|
3835
|
-
.trigger.rendered {
|
|
3836
|
-
transform: scale(1);
|
|
3837
|
-
}
|
|
3838
|
-
.trigger.active .trigger-icon {
|
|
3839
|
-
opacity: 0;
|
|
3840
|
-
transform: rotate(-180deg) scale(0);
|
|
3841
|
-
}
|
|
3842
|
-
.trigger.active .trigger-close {
|
|
3843
|
-
opacity: 1;
|
|
3844
|
-
transform: rotate(0deg) scale(1);
|
|
3845
|
-
}
|
|
3846
|
-
|
|
3847
|
-
.trigger-icon {
|
|
3848
|
-
display: inline-block;
|
|
3849
|
-
line-height: inherit;
|
|
3850
|
-
text-align: center;
|
|
3851
|
-
opacity: 1;
|
|
3852
|
-
transform: rotate(0deg) scale(1);
|
|
3853
|
-
transition:
|
|
3854
|
-
opacity 200ms ease-out,
|
|
3855
|
-
transform 200ms ease-out;
|
|
3856
|
-
color: #ffffff;
|
|
3857
|
-
}
|
|
3858
|
-
.trigger-close {
|
|
3859
|
-
opacity: 0;
|
|
3860
|
-
transition: transform 200ms ease-out;
|
|
3861
|
-
transform: rotate(180deg) scale(0);
|
|
3862
|
-
position: absolute;
|
|
3863
|
-
top: 0;
|
|
3864
|
-
bottom: 0;
|
|
3865
|
-
left: 0;
|
|
3866
|
-
right: 0;
|
|
3867
|
-
display: flex;
|
|
3868
|
-
justify-content: center;
|
|
3869
|
-
align-items: center;
|
|
3870
|
-
fill: #ffffff;
|
|
3871
|
-
}
|
|
3872
|
-
`
|
|
3873
|
-
];
|
|
3874
|
-
Ae([
|
|
3875
|
-
ye({ attribute: !1 })
|
|
3876
|
-
], dt.prototype, "symbol", 2);
|
|
3877
|
-
Ae([
|
|
3878
|
-
lt()
|
|
3879
|
-
], dt.prototype, "active", 2);
|
|
3880
|
-
Ae([
|
|
3881
|
-
lt()
|
|
3882
|
-
], dt.prototype, "loaded", 2);
|
|
3883
|
-
Ae([
|
|
3884
|
-
lt()
|
|
3885
|
-
], dt.prototype, "icon", 2);
|
|
3886
|
-
var wt = /* @__PURE__ */ ((n) => (n.Inline = "inline", n.Link = "link", n.Badge = "badge", n.Unsupported = "unsupported", n))(wt || {});
|
|
3887
|
-
const Mo = (n, t) => n && t ? "both" : n ? "widgetDOM" : t ? "triggerDOM" : "none", Wr = (n) => n ? typeof n == "boolean" && n ? "link" : typeof n == "object" && !Array.isArray(n) ? "badge" : "unsupported" : "inline", Do = (n, t, e, r, s = !1) => B(void 0, null, function* () {
|
|
3888
|
-
var h, l;
|
|
3889
|
-
const i = Mo(
|
|
3890
|
-
t,
|
|
3891
|
-
e
|
|
3892
|
-
), o = Wr(r), a = {
|
|
3893
|
-
widgetDOMElement: t ? t.cloneNode(!0) : void 0,
|
|
3894
|
-
triggerDOMElement: e ? e.cloneNode(!0) : void 0
|
|
3895
|
-
}, c = {
|
|
3896
|
-
triggerType: o,
|
|
3897
|
-
cachedOriginals: a,
|
|
3898
|
-
widgetDOMElement: document.createElement("div")
|
|
3899
|
-
};
|
|
3900
|
-
switch (i) {
|
|
3901
|
-
case "both": {
|
|
3902
|
-
c.widgetDOMElement = t || document.createElement("div"), o !== "inline" && (c.triggerDOMElement = e);
|
|
3903
|
-
break;
|
|
3904
|
-
}
|
|
3905
|
-
case "widgetDOM": {
|
|
3906
|
-
if (c.widgetDOMElement = t || document.createElement("div"), o !== "inline") {
|
|
3907
|
-
const u = document.body.appendChild(
|
|
3908
|
-
document.createElement("a")
|
|
3909
|
-
);
|
|
3910
|
-
o === "link" && (u.innerText = n), c.triggerDOMElement = u;
|
|
3911
|
-
}
|
|
3912
|
-
break;
|
|
3913
|
-
}
|
|
3914
|
-
case "triggerDOM": {
|
|
3915
|
-
const u = document.createElement("div");
|
|
3916
|
-
c.widgetDOMElement = u, o === "inline" ? (u.id = (e == null ? void 0 : e.id) || "", s ? (u.style.display = "none", (h = e == null ? void 0 : e.parentNode) == null || h.appendChild(u), c.callback = () => {
|
|
3917
|
-
var d;
|
|
3918
|
-
(d = e == null ? void 0 : e.parentNode) == null || d.replaceChild(
|
|
3919
|
-
u,
|
|
3920
|
-
e
|
|
3921
|
-
), u.style.display = (e == null ? void 0 : e.style.display) || "block";
|
|
3922
|
-
}) : (l = e == null ? void 0 : e.parentNode) == null || l.replaceChild(
|
|
3923
|
-
u,
|
|
3924
|
-
e
|
|
3925
|
-
), c.cachedOriginals.widgetDOMElement = e, c.cachedOriginals.triggerDOMElement = void 0) : (c.widgetDOMElement = document.body.appendChild(u), c.triggerDOMElement = e);
|
|
3926
|
-
break;
|
|
3927
|
-
}
|
|
3928
|
-
case "none": {
|
|
3929
|
-
const u = document.body.appendChild(
|
|
3930
|
-
document.createElement("div")
|
|
3931
|
-
);
|
|
3932
|
-
if (c.widgetDOMElement = u, o !== "inline") {
|
|
3933
|
-
customElements.get("ace-widget-trigger") || customElements.define("ace-widget-trigger", dt);
|
|
3934
|
-
const d = document.createElement("ace-widget-trigger");
|
|
3935
|
-
d.symbol = r.symbol, document.body.appendChild(d), console.log("Created trigger"), c.triggerDOMElement = d;
|
|
3936
|
-
}
|
|
3937
|
-
break;
|
|
3938
|
-
}
|
|
3939
|
-
}
|
|
3940
|
-
return c;
|
|
3941
|
-
}), jo = "modals";
|
|
3942
|
-
class Ro {
|
|
3943
|
-
constructor(t, e) {
|
|
3944
|
-
this.options = e, this.unsubscribe = [], this.container = t.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register(
|
|
3945
|
-
"triggerDOMElement",
|
|
3946
|
-
this.options.triggerDOMElement
|
|
3947
|
-
);
|
|
3948
|
-
const r = this.container.get("$widget");
|
|
3949
|
-
this.options.widgetDOMElement.classList.add("ace-widget"), this.options.widgetDOMElement.classList.add(`ace-widget_${r.name}`);
|
|
3950
|
-
const s = t.get("widgetDOMElements") || [];
|
|
3951
|
-
t.register("widgetDOMElements", [
|
|
3952
|
-
...s,
|
|
3953
|
-
this.options.widgetDOMElement
|
|
3954
|
-
]);
|
|
3955
|
-
}
|
|
3956
|
-
/**
|
|
3957
|
-
* Renders the view outlet to the DOM.
|
|
3958
|
-
*/
|
|
3959
|
-
render() {
|
|
3960
|
-
const { widgetDOMElement: t, triggerDOMElement: e } = this.options, r = this.container.get("$widget");
|
|
3961
|
-
return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === wt.Badge && co(e), import("./render-416c8c88.js").then((s) => s.default(this.container, t)).then(() => {
|
|
3962
|
-
if (t.setAttribute("data-rendered", "true"), e && this.options.triggerType === wt.Badge) {
|
|
3963
|
-
const i = this.options.triggerOptions.openTooltip;
|
|
3964
|
-
Rr(e, i);
|
|
3965
|
-
}
|
|
3966
|
-
us(this.container, t);
|
|
3967
|
-
const s = this.container.get("$environment").widgets.all();
|
|
3968
|
-
Z(
|
|
3969
|
-
this.container,
|
|
3970
|
-
jo,
|
|
3971
|
-
P.Session
|
|
3972
|
-
).then((i) => {
|
|
3973
|
-
i && i.forEach((o) => {
|
|
3974
|
-
s.find(
|
|
3975
|
-
(a) => a.name === o.name && a.state === "activated"
|
|
3976
|
-
) && r.events.dispatch("widget:modal-opened", o);
|
|
3977
|
-
});
|
|
3978
|
-
});
|
|
3979
|
-
}));
|
|
3980
|
-
}
|
|
3981
|
-
renderBadge(t) {
|
|
3982
|
-
const { triggerDOMElement: e } = this.options;
|
|
3983
|
-
if (!e)
|
|
3984
|
-
return;
|
|
3985
|
-
e.getAttribute("role") || e.setAttribute("role", "button");
|
|
3986
|
-
const { name: r } = this.container.get("$widget"), { label: s, symbol: i, ariaLabel: o, closedTooltip: a, openTooltip: c } = t, h = { closedTooltip: a, openTooltip: c };
|
|
3987
|
-
this.options.triggerOptions = h;
|
|
3988
|
-
const l = oo(e, {
|
|
3989
|
-
label: s,
|
|
3990
|
-
symbol: i,
|
|
3991
|
-
ariaLabel: o,
|
|
3992
|
-
widgetName: r,
|
|
3993
|
-
tooltip: a
|
|
3994
|
-
});
|
|
3995
|
-
this.unsubscribe.push(l);
|
|
3996
|
-
}
|
|
3997
|
-
dispose() {
|
|
3998
|
-
return B(this, null, function* () {
|
|
3999
|
-
var r, s, i, o;
|
|
4000
|
-
const { triggerDOMElement: t, widgetDOMElement: e } = this.options;
|
|
4001
|
-
this.options.cachedOriginals.widgetDOMElement && e && ((r = e.parentNode) == null || r.replaceChild(
|
|
4002
|
-
this.options.cachedOriginals.widgetDOMElement,
|
|
4003
|
-
e
|
|
4004
|
-
)), this.options.cachedOriginals.triggerDOMElement && t && ((s = t.parentNode) == null || s.replaceChild(
|
|
4005
|
-
this.options.cachedOriginals.triggerDOMElement,
|
|
4006
|
-
t
|
|
4007
|
-
)), this.unsubscribe.forEach((a) => {
|
|
4008
|
-
a();
|
|
4009
|
-
}), (i = e.parentNode) == null || i.removeChild(e), (o = t == null ? void 0 : t.parentNode) == null || o.removeChild(t);
|
|
4010
|
-
});
|
|
4011
|
-
}
|
|
4012
|
-
}
|
|
4013
|
-
const te = "changesets", To = (n) => {
|
|
4014
|
-
const t = { tags: n.tags };
|
|
4015
|
-
return n.context && typeof n.context != "function" && (t.context = n.context), n.properties && typeof n.properties != "function" && (t.properties = n.properties), n.layout && typeof n.layout != "function" && (t.layout = n.layout), t;
|
|
4016
|
-
};
|
|
4017
|
-
class hn {
|
|
4018
|
-
constructor(t, e) {
|
|
4019
|
-
this.container = t, this.storageWriter = e;
|
|
4020
|
-
}
|
|
4021
|
-
static create(t) {
|
|
4022
|
-
return rt(
|
|
4023
|
-
t,
|
|
4024
|
-
te,
|
|
4025
|
-
C.Necessary,
|
|
4026
|
-
{
|
|
4027
|
-
medium: P.Local
|
|
4028
|
-
}
|
|
4029
|
-
).then(
|
|
4030
|
-
(e) => new hn(t, e)
|
|
4031
|
-
);
|
|
4032
|
-
}
|
|
4033
|
-
write(t, e, r, s) {
|
|
4034
|
-
return X(this)(() => Z(
|
|
4035
|
-
this.container,
|
|
4036
|
-
te,
|
|
4037
|
-
P.Local
|
|
4038
|
-
).then((i = {}) => {
|
|
4039
|
-
const { keys: o = [], items: a = {} } = i, c = o.indexOf(t);
|
|
4040
|
-
return c > -1 && o.splice(c, 1), o.push(t), a[t] = {
|
|
4041
|
-
options: s,
|
|
4042
|
-
attributes: To(r),
|
|
4043
|
-
rules: e.rules
|
|
4044
|
-
}, this.storageWriter({ keys: o, items: a });
|
|
4045
|
-
}));
|
|
4046
|
-
}
|
|
4047
|
-
remove(t) {
|
|
4048
|
-
return X(this)(() => Z(
|
|
4049
|
-
this.container,
|
|
4050
|
-
te,
|
|
4051
|
-
P.Local
|
|
4052
|
-
).then((e = {}) => {
|
|
4053
|
-
const { keys: r = [], items: s = {} } = e, i = r.indexOf(t);
|
|
4054
|
-
if (i > -1)
|
|
4055
|
-
return r.splice(i, 1), delete s[t], this.storageWriter(e);
|
|
4056
|
-
}));
|
|
4057
|
-
}
|
|
4058
|
-
load(t) {
|
|
4059
|
-
return X(this)(() => Z(
|
|
4060
|
-
this.container,
|
|
4061
|
-
te,
|
|
4062
|
-
P.Local
|
|
4063
|
-
).then((e = {}) => {
|
|
4064
|
-
const { keys: r = [], items: s = {} } = e;
|
|
4065
|
-
r.forEach((i) => {
|
|
4066
|
-
const o = s[i];
|
|
4067
|
-
if (o) {
|
|
4068
|
-
const { rules: a, attributes: c, options: h } = o;
|
|
4069
|
-
t.write({
|
|
4070
|
-
attributes: c,
|
|
4071
|
-
options: h,
|
|
4072
|
-
target: new Nt(t, a)
|
|
4073
|
-
});
|
|
4074
|
-
}
|
|
4075
|
-
});
|
|
4076
|
-
}));
|
|
4077
|
-
}
|
|
4078
|
-
}
|
|
4079
|
-
const Io = (n) => {
|
|
4080
|
-
const { container: t } = n;
|
|
4081
|
-
return hn.create(t).then(
|
|
4082
|
-
(e) => {
|
|
4083
|
-
const r = t.get("$settings"), s = { localStorage: e }, i = new Jt(n, s), o = ar(i, r);
|
|
4084
|
-
return n.events.subscribe(
|
|
4085
|
-
"widget:state-change",
|
|
4086
|
-
(a, c) => {
|
|
4087
|
-
c.state === nr.Deactivating && o();
|
|
4088
|
-
}
|
|
4089
|
-
), i;
|
|
4090
|
-
}
|
|
4091
|
-
);
|
|
4092
|
-
}, Ho = (n) => Promise.resolve().then(() => Xi).then(
|
|
4093
|
-
({ RoutingService: t, HistoryMode: e }) => n.get("settings").then((r) => {
|
|
4094
|
-
const {
|
|
4095
|
-
routing: {
|
|
4096
|
-
initialPath: s = "/",
|
|
4097
|
-
mode: i = e.scopedHash,
|
|
4098
|
-
basePath: o
|
|
4099
|
-
},
|
|
4100
|
-
views: a
|
|
4101
|
-
} = r;
|
|
4102
|
-
return new t(n, {
|
|
4103
|
-
initialPath: s,
|
|
4104
|
-
mode: i,
|
|
4105
|
-
routes: Object.keys(a).map((h) => ({
|
|
4106
|
-
name: h,
|
|
4107
|
-
path: a[h].path
|
|
4108
|
-
})),
|
|
4109
|
-
basePath: o
|
|
4110
|
-
});
|
|
4111
|
-
})
|
|
4112
|
-
), Uo = (n) => Promise.resolve().then(() => ui).then(({ StorageProvider: t }) => new t()), Vo = (n) => Promise.resolve().then(() => en).then(({ ActionResolver: t }) => new t(n)), Bo = (n) => Promise.resolve().then(() => en).then(({ ComponentResolver: t }) => new t(n)), zo = (n) => Promise.resolve().then(() => en).then(() => Io(n.get("$widget"))), Fe = "$settings", ee = "open", tr = "activeStickyWidget";
|
|
4113
|
-
class Ca extends ns {
|
|
4114
|
-
constructor(t) {
|
|
4115
|
-
super(t), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (e) => {
|
|
4116
|
-
const r = {
|
|
4117
|
-
triggerDOMElement: e.sourceDOMElement,
|
|
4118
|
-
withRenderState: "storage"
|
|
4119
|
-
/* Storage */
|
|
4120
|
-
};
|
|
4121
|
-
this.container.get("settings").then((s) => {
|
|
4122
|
-
const { activate: i } = s;
|
|
4123
|
-
(typeof i == "undefined" || i === null || i === !0) && (this.activated = (this.activated || this.widget.activate()).then(
|
|
4124
|
-
() => this.attach(r)
|
|
4125
|
-
));
|
|
4126
|
-
});
|
|
4127
|
-
}, this.container.registerAsync(
|
|
4128
|
-
"storage",
|
|
4129
|
-
() => Uo(this.container)
|
|
4130
|
-
), this.container.registerFactory("settings", () => Z(
|
|
4131
|
-
this.container,
|
|
4132
|
-
Fe,
|
|
4133
|
-
P.Local
|
|
4134
|
-
).then((e = {}) => tt(tt({}, this.container.get("$settings")), e))), so(this, "load", this.handleBootstrapping), this.container.registerAsync(
|
|
4135
|
-
"componentResolver",
|
|
4136
|
-
() => Bo(this.container)
|
|
4137
|
-
), this.container.registerAsync(
|
|
4138
|
-
"router",
|
|
4139
|
-
() => Ho(this.container)
|
|
4140
|
-
), this.container.registerAsync(
|
|
4141
|
-
"actionResolver",
|
|
4142
|
-
() => Vo(this.container)
|
|
4143
|
-
), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync(
|
|
4144
|
-
"components",
|
|
4145
|
-
() => zo(this.container)
|
|
4146
|
-
);
|
|
4147
|
-
}
|
|
4148
|
-
initialize() {
|
|
4149
|
-
const t = this.container.getManyAsync(
|
|
4150
|
-
"actionResolver",
|
|
4151
|
-
"router",
|
|
4152
|
-
"components"
|
|
4153
|
-
), e = this.container.get("csp");
|
|
4154
|
-
return e && (window.webprovisionsEnvironmentVariables || (window.webprovisionsEnvironmentVariables = {}), window.webprovisionsEnvironmentVariables.cspNonce = e.nonce), Promise.all([t, this.container.get("settings")]).then(
|
|
4155
|
-
([{ actionResolver: r, router: s, components: i }, o]) => {
|
|
4156
|
-
var h;
|
|
4157
|
-
r.subscribe(
|
|
4158
|
-
this.widget.name,
|
|
4159
|
-
(l, u, d) => this.onAction(u, d)
|
|
4160
|
-
);
|
|
4161
|
-
const a = (l) => {
|
|
4162
|
-
i.nodes.query({ type: "view" }).forEach((u) => {
|
|
4163
|
-
i.setSwitch(u, l);
|
|
4164
|
-
});
|
|
4165
|
-
}, c = ((h = s.getInitialRoute()) == null ? void 0 : h.name) || "index";
|
|
4166
|
-
return a(c), this.events.subscribe("widget:data-loaded", (l, { element: u }) => {
|
|
4167
|
-
this.widget.container.get("seoConfiguration") && this.events.dispatch("widget:preloaded-replaced", {
|
|
4168
|
-
element: u
|
|
4169
|
-
});
|
|
4170
|
-
}), this.events.subscribe(
|
|
4171
|
-
"router:change",
|
|
4172
|
-
(l, { previous: u = { routeData: {} }, next: d = { routeData: {} } }) => {
|
|
4173
|
-
const { routeData: p } = u, { routeData: b } = d, v = Object.keys(o.views).reduce(
|
|
4174
|
-
(g, E) => typeof o.views[E].path == "undefined" ? E : g,
|
|
4175
|
-
""
|
|
4176
|
-
);
|
|
4177
|
-
!b.name && v ? a(v) : a(b.name), $t(p && p.params), $t(b && b.params), this.container.getAsync("actionResolver").then((g) => {
|
|
4178
|
-
g.action(this.widget.name, "routeChange", {
|
|
4179
|
-
next: b,
|
|
4180
|
-
previous: p
|
|
4181
|
-
});
|
|
4182
|
-
});
|
|
4183
|
-
}
|
|
4184
|
-
), s.initialize();
|
|
4185
|
-
}
|
|
4186
|
-
);
|
|
4187
|
-
}
|
|
4188
|
-
attach(t = {}) {
|
|
4189
|
-
return this.container.get("settings").then((r) => B(this, [r], function* ({ trigger: e }) {
|
|
4190
|
-
var p, b;
|
|
4191
|
-
const {
|
|
4192
|
-
widgetDOMElement: s,
|
|
4193
|
-
key: i = qt(),
|
|
4194
|
-
triggerDOMElement: o,
|
|
4195
|
-
withRenderState: a
|
|
4196
|
-
} = t, h = Wr(e) === wt.Inline && ((o == null ? void 0 : o.childElementCount) || 0) > 0, l = yield Do(
|
|
4197
|
-
this.widget.name,
|
|
4198
|
-
s,
|
|
4199
|
-
o,
|
|
4200
|
-
e,
|
|
4201
|
-
h
|
|
4202
|
-
);
|
|
4203
|
-
this.outlets.size < 1 && !a && this.setRenderState("unset");
|
|
4204
|
-
const u = () => {
|
|
4205
|
-
const v = () => g.querySelectorAll("[data-loading=true]").length === 0, [g] = this.widget.container.get("widgetDOMElements"), E = (H, k) => {
|
|
4206
|
-
v() && (l.callback && l.callback(), k.disconnect());
|
|
4207
|
-
}, R = {
|
|
4208
|
-
attributes: !0,
|
|
4209
|
-
subtree: !0,
|
|
4210
|
-
childList: !0
|
|
4211
|
-
};
|
|
4212
|
-
v() && l.callback && l.callback(), new MutationObserver(E).observe(g, R);
|
|
4213
|
-
};
|
|
4214
|
-
h && this.widget.container.getAsync("dataClient").then(({ events: v }) => {
|
|
4215
|
-
v.subscribe(
|
|
4216
|
-
"data-client:fetched",
|
|
4217
|
-
(g, E) => {
|
|
4218
|
-
E.unresolvedQueries === 0 && u();
|
|
4219
|
-
}
|
|
4220
|
-
);
|
|
4221
|
-
});
|
|
4222
|
-
const d = this.getOrCreateViewOutlet(i, l);
|
|
4223
|
-
if (this.outlets.set(i, d), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), l.triggerType === wt.Badge && e && ((p = l.triggerDOMElement) == null || p.setAttribute(
|
|
4224
|
-
"aria-expanded",
|
|
4225
|
-
"false"
|
|
4226
|
-
), d == null || d.renderBadge(e)), l.triggerType !== wt.Inline && ((b = l.triggerDOMElement) == null || b.addEventListener(
|
|
4227
|
-
"click",
|
|
4228
|
-
(v) => {
|
|
4229
|
-
v.preventDefault(), this.container.get("settings").then(({ trigger: g }) => {
|
|
4230
|
-
d.render().then(() => this.renderState()).then((E) => g && g.action && g.action === "hide" ? E === J.open ? this.hide() : this.open() : E === J.open ? this.close() : this.open());
|
|
4231
|
-
});
|
|
4232
|
-
}
|
|
4233
|
-
)), this.outlets.size > 1)
|
|
4234
|
-
return this.renderState().then((v) => {
|
|
4235
|
-
this.triggerStateIfApplicable(v);
|
|
4236
|
-
});
|
|
4237
|
-
if (a)
|
|
4238
|
-
return a === "storage" ? this.renderState().then((v) => {
|
|
4239
|
-
if (l.triggerType === wt.Inline) {
|
|
4240
|
-
this.triggerStateIfApplicable("open");
|
|
4241
|
-
return;
|
|
4242
|
-
}
|
|
4243
|
-
this.triggerStateIfApplicable(v);
|
|
4244
|
-
}) : this.triggerStateIfApplicable(a);
|
|
4245
|
-
}));
|
|
4246
|
-
}
|
|
4247
|
-
detach(t) {
|
|
4248
|
-
if (t) {
|
|
4249
|
-
if (this.outlets.has(t)) {
|
|
4250
|
-
const e = this.outlets.get(t);
|
|
4251
|
-
e == null || e.dispose(), this.outlets.delete(t);
|
|
4252
|
-
return;
|
|
4253
|
-
}
|
|
4254
|
-
process.env.NODE_ENV !== "production" && console.warn(`detach(): Could not find View Outlet with key ${t}`);
|
|
4255
|
-
return;
|
|
4256
|
-
}
|
|
4257
|
-
this.outlets.forEach((e) => {
|
|
4258
|
-
e.dispose();
|
|
4259
|
-
}), this.outlets.clear();
|
|
4260
|
-
}
|
|
4261
|
-
triggerStateIfApplicable(t) {
|
|
4262
|
-
return this.container.getAsync("router").then((e) => {
|
|
4263
|
-
switch (t) {
|
|
4264
|
-
case "closed":
|
|
4265
|
-
this.close();
|
|
4266
|
-
break;
|
|
4267
|
-
case "open":
|
|
4268
|
-
this.open();
|
|
4269
|
-
break;
|
|
4270
|
-
case "hidden":
|
|
4271
|
-
this.hide(), e.start();
|
|
4272
|
-
break;
|
|
4273
|
-
default:
|
|
4274
|
-
return;
|
|
4275
|
-
}
|
|
4276
|
-
});
|
|
4277
|
-
}
|
|
4278
|
-
getOrCreateViewOutlet(t, e) {
|
|
4279
|
-
return this.outlets.has(t) ? this.outlets.get(t) : new Ro(this.container, e);
|
|
4280
|
-
}
|
|
4281
|
-
render(t = {}) {
|
|
4282
|
-
if (process.env.NODE_ENV !== "production" && console.warn(
|
|
4283
|
-
"widget.render() is deprecated. Use widget.attach() instead."
|
|
4284
|
-
), t.open) {
|
|
4285
|
-
const e = Mt(tt({}, t), {
|
|
4286
|
-
withRenderState: "open"
|
|
4287
|
-
/* Open */
|
|
4288
|
-
});
|
|
4289
|
-
return this.attach(e);
|
|
4290
|
-
}
|
|
4291
|
-
return this.attach(t);
|
|
4292
|
-
}
|
|
4293
|
-
activate(t) {
|
|
4294
|
-
t != null && t.override && this.setSettings(() => t.override), t != null && t.apiNotificationPriorityBy && this.container.register(
|
|
4295
|
-
"apiNotificationPriorityBy",
|
|
4296
|
-
t.apiNotificationPriorityBy
|
|
4297
|
-
);
|
|
4298
|
-
}
|
|
4299
|
-
setSettings(t) {
|
|
4300
|
-
return Promise.all([
|
|
4301
|
-
this.container.get("settings"),
|
|
4302
|
-
rt(
|
|
4303
|
-
this.container,
|
|
4304
|
-
Fe,
|
|
4305
|
-
C.Necessary,
|
|
4306
|
-
{
|
|
4307
|
-
medium: P.Local
|
|
4308
|
-
}
|
|
4309
|
-
)
|
|
4310
|
-
]).then(([e, r]) => Promise.resolve(t(e)).then((s) => r(s).then(() => {
|
|
4311
|
-
const i = tt(tt({}, e), s);
|
|
4312
|
-
return this.widget.events.dispatch("widget:settings-updated", i), i;
|
|
4313
|
-
})));
|
|
4314
|
-
}
|
|
4315
|
-
clearSettings() {
|
|
4316
|
-
return rt(
|
|
4317
|
-
this.container,
|
|
4318
|
-
Fe,
|
|
4319
|
-
C.Necessary,
|
|
4320
|
-
{ medium: P.Local }
|
|
4321
|
-
).then((t) => t()).then(() => this.container.get("settings")).then((t) => {
|
|
4322
|
-
this.widget.events.dispatch("widget:settings-updated", t);
|
|
4323
|
-
});
|
|
4324
|
-
}
|
|
4325
|
-
action({ action: t, value: e }) {
|
|
4326
|
-
return this.container.getAsync("actionResolver").then((r) => {
|
|
4327
|
-
r.action(this.widget.name, t, e);
|
|
4328
|
-
});
|
|
4329
|
-
}
|
|
4330
|
-
renderState() {
|
|
4331
|
-
if (on(this.container))
|
|
4332
|
-
return Promise.resolve(J.open);
|
|
4333
|
-
const t = () => Z(
|
|
4334
|
-
this.container,
|
|
4335
|
-
ee,
|
|
4336
|
-
P.Session
|
|
4337
|
-
).then((r = J.closed) => r), e = () => Z(
|
|
4338
|
-
this.container,
|
|
4339
|
-
ee,
|
|
4340
|
-
P.Session
|
|
4341
|
-
).then((r = J.closed) => r);
|
|
4342
|
-
return this.container.getAsync("router").then((r) => r.isSticky() ? e().then((s) => s === J.open ? s : t()) : t());
|
|
4343
|
-
}
|
|
4344
|
-
hide() {
|
|
4345
|
-
return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
4346
|
-
"hide(): No-op as no view outlets are registered. Invoke the attach() command first."
|
|
4347
|
-
), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "hide" }).then(() => {
|
|
4348
|
-
this.setTriggerState(!1);
|
|
4349
|
-
}));
|
|
4350
|
-
}
|
|
4351
|
-
open() {
|
|
4352
|
-
return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
4353
|
-
"open(): No-op as no view outlets are registered. Invoke the attach() command first."
|
|
4354
|
-
), Promise.resolve()) : (this.outlets.forEach((t) => t.render()), this.action({ action: "open" }).then(() => (this.widget.events.dispatch("tracking:widget-rendered", {}), this.onOpen())));
|
|
4355
|
-
}
|
|
4356
|
-
close() {
|
|
4357
|
-
return this.outlets.size < 1 ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
4358
|
-
"close(): No-op as no view outlets are registered. Invoke the attach() command first."
|
|
4359
|
-
), Promise.resolve()) : this.action({ action: "close" }).then(() => this.onClose());
|
|
4360
|
-
}
|
|
4361
|
-
show() {
|
|
4362
|
-
return process.env.NODE_ENV !== "production" && console.warn(
|
|
4363
|
-
"show(): Command is deprecated and will be removed in the future. Use open() instead."
|
|
4364
|
-
), this.open();
|
|
4365
|
-
}
|
|
4366
|
-
onAction(t, e) {
|
|
4367
|
-
switch (t) {
|
|
4368
|
-
case "close":
|
|
4369
|
-
case "open":
|
|
4370
|
-
case "hide":
|
|
4371
|
-
const r = t === "open" ? J.open : t === "close" ? J.closed : J.hidden;
|
|
4372
|
-
return this.setRenderState(r).then(() => {
|
|
4373
|
-
this.setTriggerState(r === J.open), r !== J.hidden ? r === J.open ? this.onOpen() : this.onClose() : this.outlets.forEach(
|
|
4374
|
-
(s) => {
|
|
4375
|
-
var i;
|
|
4376
|
-
return (i = s.options.triggerDOMElement) == null ? void 0 : i.setAttribute(
|
|
4377
|
-
"aria-expanded",
|
|
4378
|
-
"false"
|
|
4379
|
-
);
|
|
4380
|
-
}
|
|
4381
|
-
);
|
|
4382
|
-
});
|
|
4383
|
-
}
|
|
4384
|
-
}
|
|
4385
|
-
setRenderState(t) {
|
|
4386
|
-
const { invoke: e, events: r } = this.container.get("$widget");
|
|
4387
|
-
return Promise.all([
|
|
4388
|
-
rt(
|
|
4389
|
-
this.container,
|
|
4390
|
-
ee,
|
|
4391
|
-
C.Necessary,
|
|
4392
|
-
{
|
|
4393
|
-
medium: P.Session
|
|
4394
|
-
}
|
|
4395
|
-
),
|
|
4396
|
-
rt(
|
|
4397
|
-
this.container,
|
|
4398
|
-
ee,
|
|
4399
|
-
C.Necessary,
|
|
4400
|
-
{
|
|
4401
|
-
medium: P.Local,
|
|
4402
|
-
duration: { minutes: 5 }
|
|
4403
|
-
}
|
|
4404
|
-
),
|
|
4405
|
-
this.container.getAsync("router"),
|
|
4406
|
-
e("renderState")
|
|
4407
|
-
]).then(
|
|
4408
|
-
([s, i, o, a]) => {
|
|
4409
|
-
t === "unset" || !t ? (i(), s()) : (o.isSticky() && i(t), s(t)), r.dispatch("widget:render-state-changed", {
|
|
4410
|
-
previous: a,
|
|
4411
|
-
next: t
|
|
4412
|
-
});
|
|
4413
|
-
}
|
|
4414
|
-
);
|
|
4415
|
-
}
|
|
4416
|
-
onOpen() {
|
|
4417
|
-
return this.container.getAsync("router").then((t) => (this.outlets.forEach(
|
|
4418
|
-
(e) => {
|
|
4419
|
-
var r;
|
|
4420
|
-
return (r = e.options.triggerDOMElement) == null ? void 0 : r.setAttribute(
|
|
4421
|
-
"aria-expanded",
|
|
4422
|
-
"true"
|
|
4423
|
-
);
|
|
4424
|
-
}
|
|
4425
|
-
), t.start()));
|
|
4426
|
-
}
|
|
4427
|
-
onClose() {
|
|
4428
|
-
const t = this.container.getManyAsync(
|
|
4429
|
-
"router",
|
|
4430
|
-
"components"
|
|
4431
|
-
);
|
|
4432
|
-
return (() => this.container.get("settings").then((r) => {
|
|
4433
|
-
const { activate: s } = this.container.get("$settings");
|
|
4434
|
-
return r.activate !== s ? this.setSettings(() => Promise.resolve({ activate: s })) : Promise.resolve();
|
|
4435
|
-
}))().then(() => t).then(
|
|
4436
|
-
({
|
|
4437
|
-
router: r,
|
|
4438
|
-
components: s
|
|
4439
|
-
}) => {
|
|
4440
|
-
const i = s.nodes.visible;
|
|
4441
|
-
return this.outlets.forEach(
|
|
4442
|
-
(o) => {
|
|
4443
|
-
var a;
|
|
4444
|
-
return (a = o.options.triggerDOMElement) == null ? void 0 : a.setAttribute(
|
|
4445
|
-
"aria-expanded",
|
|
4446
|
-
"false"
|
|
4447
|
-
);
|
|
4448
|
-
}
|
|
4449
|
-
), i.filter(
|
|
4450
|
-
(o) => o.attributes.properties.animation && o.attributes.properties.animation !== "none"
|
|
4451
|
-
).length ? new Promise((o) => {
|
|
4452
|
-
setTimeout(() => {
|
|
4453
|
-
o(r);
|
|
4454
|
-
}, 200);
|
|
4455
|
-
}) : Promise.resolve(r);
|
|
4456
|
-
}
|
|
4457
|
-
).then((r) => r.stop());
|
|
4458
|
-
}
|
|
4459
|
-
setTriggerState(t) {
|
|
4460
|
-
this.outlets.forEach((e) => {
|
|
4461
|
-
const {
|
|
4462
|
-
options: { triggerDOMElement: r, triggerOptions: s }
|
|
4463
|
-
} = e, { openTooltip: i, closedTooltip: o } = s || {};
|
|
4464
|
-
r && (t ? Rr(r, i) : ao(r, o));
|
|
4465
|
-
});
|
|
4466
|
-
}
|
|
4467
|
-
deactivate() {
|
|
4468
|
-
this.subs.forEach((e) => e());
|
|
4469
|
-
const t = [];
|
|
4470
|
-
return this.outlets.forEach((e) => t.push(e.dispose())), Z(
|
|
4471
|
-
this.container,
|
|
4472
|
-
tr,
|
|
4473
|
-
P.Local
|
|
4474
|
-
).then((e) => e === this.widget.name ? rt(
|
|
4475
|
-
this.container,
|
|
4476
|
-
tr,
|
|
4477
|
-
C.Necessary,
|
|
4478
|
-
{
|
|
4479
|
-
medium: P.Local,
|
|
4480
|
-
scope: Lt.Implementation
|
|
4481
|
-
}
|
|
4482
|
-
).then((r) => r()).then(() => Promise.all(t)) : Promise.all(t));
|
|
4483
|
-
}
|
|
4484
|
-
}
|
|
4485
|
-
/**
|
|
4486
|
-
* @license
|
|
4487
|
-
* Copyright 2021 Google LLC
|
|
4488
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4489
|
-
*/
|
|
4490
|
-
let Fr = class extends Event {
|
|
4491
|
-
constructor(t, e, r) {
|
|
4492
|
-
super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = r != null && r;
|
|
4493
|
-
}
|
|
4494
|
-
};
|
|
4495
|
-
/**
|
|
4496
|
-
* @license
|
|
4497
|
-
* Copyright 2021 Google LLC
|
|
4498
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4499
|
-
*/
|
|
4500
|
-
/**
|
|
4501
|
-
* @license
|
|
4502
|
-
* Copyright 2021 Google LLC
|
|
4503
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4504
|
-
*/
|
|
4505
|
-
let Wo = class {
|
|
4506
|
-
constructor(t, e, r, s) {
|
|
4507
|
-
var i;
|
|
4508
|
-
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (o, a) => {
|
|
4509
|
-
this.unsubscribe && (this.unsubscribe !== a && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = o, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(o, a)), this.unsubscribe = a;
|
|
4510
|
-
}, this.host = t, e.context !== void 0) {
|
|
4511
|
-
const o = e;
|
|
4512
|
-
this.context = o.context, this.callback = o.callback, this.subscribe = (i = o.subscribe) !== null && i !== void 0 && i;
|
|
4513
|
-
} else
|
|
4514
|
-
this.context = e, this.callback = r, this.subscribe = s != null && s;
|
|
4515
|
-
this.host.addController(this);
|
|
4516
|
-
}
|
|
4517
|
-
hostConnected() {
|
|
4518
|
-
this.dispatchRequest();
|
|
4519
|
-
}
|
|
4520
|
-
hostDisconnected() {
|
|
4521
|
-
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
4522
|
-
}
|
|
4523
|
-
dispatchRequest() {
|
|
4524
|
-
this.host.dispatchEvent(new Fr(this.context, this.t, this.subscribe));
|
|
4525
|
-
}
|
|
4526
|
-
};
|
|
4527
|
-
/**
|
|
4528
|
-
* @license
|
|
4529
|
-
* Copyright 2021 Google LLC
|
|
4530
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4531
|
-
*/
|
|
4532
|
-
class Fo {
|
|
4533
|
-
constructor(t) {
|
|
4534
|
-
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
4535
|
-
for (const [e, { disposer: r }] of this.subscriptions)
|
|
4536
|
-
e(this.o, r);
|
|
4537
|
-
}, t !== void 0 && (this.value = t);
|
|
4538
|
-
}
|
|
4539
|
-
get value() {
|
|
4540
|
-
return this.o;
|
|
4541
|
-
}
|
|
4542
|
-
set value(t) {
|
|
4543
|
-
this.setValue(t);
|
|
4544
|
-
}
|
|
4545
|
-
setValue(t, e = !1) {
|
|
4546
|
-
const r = e || !Object.is(t, this.o);
|
|
4547
|
-
this.o = t, r && this.updateObservers();
|
|
4548
|
-
}
|
|
4549
|
-
addCallback(t, e, r) {
|
|
4550
|
-
if (!r)
|
|
4551
|
-
return void t(this.value);
|
|
4552
|
-
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
|
|
4553
|
-
this.subscriptions.delete(t);
|
|
4554
|
-
}, consumerHost: e });
|
|
4555
|
-
const { disposer: s } = this.subscriptions.get(t);
|
|
4556
|
-
t(this.value, s);
|
|
4557
|
-
}
|
|
4558
|
-
clearCallbacks() {
|
|
4559
|
-
this.subscriptions.clear();
|
|
4560
|
-
}
|
|
4561
|
-
}
|
|
4562
|
-
/**
|
|
4563
|
-
* @license
|
|
4564
|
-
* Copyright 2021 Google LLC
|
|
4565
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4566
|
-
*/
|
|
4567
|
-
class qo extends Event {
|
|
4568
|
-
constructor(t) {
|
|
4569
|
-
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
|
4570
|
-
}
|
|
4571
|
-
}
|
|
4572
|
-
class jt extends Fo {
|
|
4573
|
-
constructor(t, e, r) {
|
|
4574
|
-
super(e.context !== void 0 ? e.initialValue : r), this.onContextRequest = (s) => {
|
|
4575
|
-
const i = s.composedPath()[0];
|
|
4576
|
-
s.context === this.context && i !== this.host && (s.stopPropagation(), this.addCallback(s.callback, i, s.subscribe));
|
|
4577
|
-
}, this.onProviderRequest = (s) => {
|
|
4578
|
-
const i = s.composedPath()[0];
|
|
4579
|
-
if (s.context === this.context && i !== this.host) {
|
|
4580
|
-
for (const [o, { consumerHost: a }] of this.subscriptions)
|
|
4581
|
-
a.dispatchEvent(new Fr(this.context, o, !0));
|
|
4582
|
-
s.stopPropagation();
|
|
4583
|
-
}
|
|
4584
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), this.host.addController(this);
|
|
4585
|
-
}
|
|
4586
|
-
attachListeners() {
|
|
4587
|
-
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
4588
|
-
}
|
|
4589
|
-
hostConnected() {
|
|
4590
|
-
this.host.dispatchEvent(new qo(this.context));
|
|
4591
|
-
}
|
|
4592
|
-
}
|
|
4593
|
-
/**
|
|
4594
|
-
* @license
|
|
4595
|
-
* Copyright 2022 Google LLC
|
|
4596
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4597
|
-
*/
|
|
4598
|
-
function Jo({ context: n, subscribe: t }) {
|
|
4599
|
-
return Ao({ finisher: (e, r) => {
|
|
4600
|
-
e.addInitializer((s) => {
|
|
4601
|
-
new Wo(s, { context: n, callback: (i) => {
|
|
4602
|
-
s[r] = i;
|
|
4603
|
-
}, subscribe: t });
|
|
4604
|
-
});
|
|
4605
|
-
} });
|
|
4606
|
-
}
|
|
4607
|
-
const Ko = "children", Go = "descriptor", Yo = "container", Zo = "context", Qo = "layout", Xo = "properties";
|
|
4608
|
-
class ta {
|
|
4609
|
-
constructor(t) {
|
|
4610
|
-
(this.host = t).addController(this);
|
|
4611
|
-
}
|
|
4612
|
-
hostConnected() {
|
|
4613
|
-
}
|
|
4614
|
-
hostDisconnected() {
|
|
4615
|
-
}
|
|
4616
|
-
setDescriptor(t) {
|
|
4617
|
-
this._descriptor = t;
|
|
4618
|
-
}
|
|
4619
|
-
setContainer(t) {
|
|
4620
|
-
this._container = t;
|
|
4621
|
-
}
|
|
4622
|
-
dispatch(t, e) {
|
|
4623
|
-
return B(this, null, function* () {
|
|
4624
|
-
if (!this._container || !this._descriptor)
|
|
4625
|
-
return;
|
|
4626
|
-
const r = yield Jt.getInstance(
|
|
4627
|
-
this._container
|
|
4628
|
-
), s = new Nt(r).withId(
|
|
4629
|
-
this._descriptor.id
|
|
4630
|
-
);
|
|
4631
|
-
yield r.actions(
|
|
4632
|
-
s,
|
|
4633
|
-
this._descriptor.type || qt()
|
|
4634
|
-
).dispatch(t, e);
|
|
4635
|
-
});
|
|
4636
|
-
}
|
|
4637
|
-
}
|
|
4638
|
-
const ea = (n, t) => B(void 0, null, function* () {
|
|
4639
|
-
const e = n.properties().provider;
|
|
4640
|
-
let r = {}, s = "";
|
|
4641
|
-
Array.isArray(e) ? (s = e[0], r = e[1]) : s = e || "";
|
|
4642
|
-
const i = yield t.getAsync(s);
|
|
4643
|
-
if (!i)
|
|
4644
|
-
throw new Error("No provider defined in ListComponent");
|
|
4645
|
-
return i.applyComponentNodeSettings(n.node.id, r), { provider: i, settings: r };
|
|
4646
|
-
}), Na = (n, t) => B(void 0, null, function* () {
|
|
4647
|
-
const { provider: e, settings: r = {} } = yield ea(n, t);
|
|
4648
|
-
return {
|
|
4649
|
-
addResource: (s, i) => e.addResource(s, i),
|
|
4650
|
-
getData: (s, i) => e.getData(s, i, r)
|
|
4651
|
-
};
|
|
4652
|
-
});
|
|
4653
|
-
class na {
|
|
4654
|
-
constructor(t) {
|
|
4655
|
-
this.container = t, this.resources = /* @__PURE__ */ new Map(), this.nodeConfiguration = /* @__PURE__ */ new Map();
|
|
4656
|
-
}
|
|
4657
|
-
getData(t, e, r) {
|
|
4658
|
-
return B(this, null, function* () {
|
|
4659
|
-
const s = this.resources.get(t);
|
|
4660
|
-
if (!s)
|
|
4661
|
-
throw new Error(`Unable to get EntityProvider for "${t}"`);
|
|
4662
|
-
return yield s.query(e, r);
|
|
4663
|
-
});
|
|
4664
|
-
}
|
|
4665
|
-
addResource(t, e) {
|
|
4666
|
-
this.resources.set(t, e);
|
|
4667
|
-
}
|
|
4668
|
-
applyComponentNodeSettings(t, e) {
|
|
4669
|
-
this.nodeConfiguration.set(t, e);
|
|
4670
|
-
}
|
|
4671
|
-
}
|
|
4672
|
-
const er = (n) => ({
|
|
4673
|
-
title: n.Title,
|
|
4674
|
-
id: n.Id.toString()
|
|
4675
|
-
});
|
|
4676
|
-
class ra extends na {
|
|
4677
|
-
constructor(t) {
|
|
4678
|
-
super(t), this.addResource("item", {
|
|
4679
|
-
query: (e, r) => B(this, null, function* () {
|
|
4680
|
-
const s = e.itemId, i = "78aacc09-ae6f-5485-5ca3-9dacebb95825", o = t.get("$widget").name, a = r.projection || "", h = yield (yield fetch(
|
|
4681
|
-
`${a}/guides/${s}?client=${i}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`
|
|
4682
|
-
)).json();
|
|
4683
|
-
return h ? er(h) : null;
|
|
4684
|
-
})
|
|
4685
|
-
}), this.addResource("items", {
|
|
4686
|
-
query: (e, r) => B(this, null, function* () {
|
|
4687
|
-
const s = "", i = t.get("$widget").name, o = r.projection || "", u = yield (yield fetch(
|
|
4688
|
-
`${o}/guides?client=${s}&funnel=${i}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`
|
|
4689
|
-
)).json();
|
|
4690
|
-
return {
|
|
4691
|
-
items: (u.Matches || []).map((d) => er(d)),
|
|
4692
|
-
totalItems: (u == null ? void 0 : u.TotalMatches) || 0
|
|
4693
|
-
};
|
|
4694
|
-
})
|
|
4695
|
-
});
|
|
4696
|
-
}
|
|
4697
|
-
}
|
|
4698
|
-
const La = (n) => B(void 0, null, function* () {
|
|
4699
|
-
n.registerAsync("guideProvider", () => new ra(n));
|
|
4700
|
-
}), Ma = (n, t, e, r, s) => n.getAsync("componentResolver").then((i) => (i.registerComponent(t, e), cr(n, t, r || (() => {
|
|
4701
|
-
}), t, s))), W = (n, t, e) => {
|
|
4702
|
-
n && e.style.setProperty(t, n);
|
|
4703
|
-
}, sa = (n, t) => {
|
|
4704
|
-
var e, r, s, i, o, a, c, h, l, u, d;
|
|
4705
|
-
W((e = n.colors) == null ? void 0 : e.primary, "--primary-color", t), W((r = n.colors) == null ? void 0 : r.secondary, "--secondary-color", t), W((s = n.colors) == null ? void 0 : s.text, "--text-color", t), W((i = n.colors) == null ? void 0 : i.link, "--link-color", t), W((o = n.colors) == null ? void 0 : o.gray, "--gray-color", t), W((a = n.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), W((c = n.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), W((h = n.spacing) == null ? void 0 : h.sm, "--spacing-sm", t), W((l = n.spacing) == null ? void 0 : l.md, "--spacing-md", t), W((u = n.spacing) == null ? void 0 : u.lg, "--spacing-lg", t), W((d = n.spacing) == null ? void 0 : d.xl, "--spacing-xl", t), W(n.boxShadow, "--box-shadow", t), W(n.borderRadius, "--border-radius", t), W(n.borderRadiusSm, "--border-radius-sm", t), W(n.fontFamily, "--font-family", t);
|
|
4706
|
-
}, ia = (n) => {
|
|
4707
|
-
const t = {};
|
|
4708
|
-
return Object.keys(n).forEach((e) => {
|
|
4709
|
-
e.indexOf("css-") > -1 && (t[e] = n[e]);
|
|
4710
|
-
}), t;
|
|
4711
|
-
}, oa = (n, t) => {
|
|
4712
|
-
const e = ia(t);
|
|
4713
|
-
Object.entries(e).forEach(([r, s]) => {
|
|
4714
|
-
n.style.setProperty(r.replace("css-", ""), s);
|
|
4715
|
-
});
|
|
4716
|
-
};
|
|
4717
|
-
var aa = Object.defineProperty, ca = Object.getOwnPropertyDescriptor, gt = (n, t, e, r) => {
|
|
4718
|
-
for (var s = r > 1 ? void 0 : r ? ca(t, e) : t, i = n.length - 1, o; i >= 0; i--)
|
|
4719
|
-
(o = n[i]) && (s = (r ? o(t, e, s) : o(s)) || s);
|
|
4720
|
-
return r && s && aa(t, e, s), s;
|
|
4721
|
-
};
|
|
4722
|
-
const Da = (n) => {
|
|
4723
|
-
var e;
|
|
4724
|
-
class t extends n {
|
|
4725
|
-
constructor() {
|
|
4726
|
-
super(...arguments), this.entry = "", this._descriptorProvider = new jt(
|
|
4727
|
-
this,
|
|
4728
|
-
Go,
|
|
4729
|
-
void 0
|
|
4730
|
-
), this._childrenProvider = new jt(this, Ko, []), this._propertiesProvider = new jt(this, Xo, {}), this._contextProvider = new jt(this, Zo, {}), this._layoutProvider = new jt(this, Qo, {}), this.actions = new ta(this), this.context = {}, this.layout = {}, this.properties = {};
|
|
4731
|
-
}
|
|
4732
|
-
connectedCallback() {
|
|
4733
|
-
super.connectedCallback(), this.container && (this.actions.setContainer(this.container), Jt.getInstance(this.container).then(
|
|
4734
|
-
(s) => B(this, null, function* () {
|
|
4735
|
-
var o;
|
|
4736
|
-
const i = s.nodes.get(this.entry);
|
|
4737
|
-
if (i) {
|
|
4738
|
-
this._propertyChangeListener = s.events.subscribe(
|
|
4739
|
-
"components:properties-changed",
|
|
4740
|
-
(u, d) => {
|
|
4741
|
-
i.id === d.node.id && this._setProperties(d.node.attributes.properties);
|
|
4742
|
-
}
|
|
4743
|
-
), this._contextChangeListener = s.events.subscribe(
|
|
4744
|
-
"components:context-changed",
|
|
4745
|
-
(u, d) => {
|
|
4746
|
-
i.id === d.node.id && this._setContext(d.node.attributes.context);
|
|
4747
|
-
}
|
|
4748
|
-
), this._layoutChangeListener = s.events.subscribe(
|
|
4749
|
-
"components:layout-changed",
|
|
4750
|
-
(u, d) => {
|
|
4751
|
-
i.id === d.node.id && this._setLayout(d.node.attributes.layout);
|
|
4752
|
-
}
|
|
4753
|
-
);
|
|
4754
|
-
const a = "default";
|
|
4755
|
-
this._unmountNode = i.mount(this.container), this._setDescriptor(Je(i, a)), this._setProperties(i.attributes.properties), this._setContext(i.attributes.context), this._setLayout(this.layout);
|
|
4756
|
-
const c = i.getChildren(a).map((u) => Je(u));
|
|
4757
|
-
this._childrenProvider.setValue(c);
|
|
4758
|
-
const l = (yield this.container.getAsync("componentResolver")).getComponent(
|
|
4759
|
-
((o = this.descriptor) == null ? void 0 : o.type) || ""
|
|
4760
|
-
);
|
|
4761
|
-
l.then && l.then((u) => {
|
|
4762
|
-
this.component = u.default;
|
|
4763
|
-
});
|
|
4764
|
-
}
|
|
4765
|
-
})
|
|
4766
|
-
));
|
|
4767
|
-
}
|
|
4768
|
-
disconnectedCallback() {
|
|
4769
|
-
super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._contextChangeListener && this._contextChangeListener(), this._layoutChangeListener && this._layoutChangeListener(), this._unmountNode && this._unmountNode();
|
|
4770
|
-
}
|
|
4771
|
-
updated() {
|
|
4772
|
-
this.container && this.actions.setContainer(this.container), sa(this.context, this.renderRoot.host), this.renderRoot.host.style.setProperty(
|
|
4773
|
-
"--width",
|
|
4774
|
-
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
|
4775
|
-
), oa(this.renderRoot.host, this.properties);
|
|
4776
|
-
}
|
|
4777
|
-
_setProperties(s) {
|
|
4778
|
-
this._propertiesProvider.setValue(s), this.properties = s;
|
|
4779
|
-
}
|
|
4780
|
-
_setContext(s) {
|
|
4781
|
-
this._contextProvider.setValue(s), this.context = s;
|
|
4782
|
-
}
|
|
4783
|
-
_setLayout(s) {
|
|
4784
|
-
this._layoutProvider.setValue(s), this.layout = s;
|
|
4785
|
-
}
|
|
4786
|
-
_setDescriptor(s) {
|
|
4787
|
-
this.descriptor = s, this._descriptorProvider.setValue(s), this.actions.setDescriptor(s);
|
|
4788
|
-
}
|
|
4789
|
-
}
|
|
4790
|
-
return t.styles = [
|
|
4791
|
-
(e = n.styles) != null ? e : [],
|
|
4792
|
-
Ir`
|
|
4793
|
-
:host {
|
|
4794
|
-
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
4795
|
-
--spacing-xs: 0.2rem;
|
|
4796
|
-
--spacing-sm: 0.5rem;
|
|
4797
|
-
--spacing-md: 1rem;
|
|
4798
|
-
--spacing-lg: 1.2rem;
|
|
4799
|
-
--spacing-xl: 1.8rem;
|
|
4800
|
-
|
|
4801
|
-
--primary-color: #29003e;
|
|
4802
|
-
--secondary-color: #00558f;
|
|
4803
|
-
--text-color: #222222;
|
|
4804
|
-
--link-color: #990ae3;
|
|
4805
|
-
--gray-color: #efefef;
|
|
4806
|
-
--gray-dark-color: #a6a6a6;
|
|
4807
|
-
|
|
4808
|
-
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
|
4809
|
-
--border-radius: 1rem;
|
|
4810
|
-
--border-radius-sm: 0.3rem;
|
|
4811
|
-
|
|
4812
|
-
font-family: var(--font-family);
|
|
4813
|
-
grid-column: span var(--width);
|
|
4814
|
-
max-width: 100%;
|
|
4815
|
-
overflow: hidden;
|
|
4816
|
-
box-sizing: border-box;
|
|
4817
|
-
display: block;
|
|
4818
|
-
}
|
|
4819
|
-
* {
|
|
4820
|
-
box-sizing: border-box;
|
|
4821
|
-
}
|
|
4822
|
-
`
|
|
4823
|
-
], gt([
|
|
4824
|
-
Jo({ context: Yo }),
|
|
4825
|
-
ye({ attribute: !1 })
|
|
4826
|
-
], t.prototype, "container", 2), gt([
|
|
4827
|
-
ye()
|
|
4828
|
-
], t.prototype, "entry", 2), gt([
|
|
4829
|
-
lt()
|
|
4830
|
-
], t.prototype, "descriptor", 2), gt([
|
|
4831
|
-
lt()
|
|
4832
|
-
], t.prototype, "component", 2), gt([
|
|
4833
|
-
lt()
|
|
4834
|
-
], t.prototype, "context", 2), gt([
|
|
4835
|
-
lt()
|
|
4836
|
-
], t.prototype, "layout", 2), gt([
|
|
4837
|
-
lt()
|
|
4838
|
-
], t.prototype, "properties", 2), t;
|
|
4839
|
-
};
|
|
4840
|
-
export {
|
|
4841
|
-
j as A,
|
|
4842
|
-
na as D,
|
|
4843
|
-
La as G,
|
|
4844
|
-
Et as T,
|
|
4845
|
-
Da as W,
|
|
4846
|
-
jt as a,
|
|
4847
|
-
Ir as b,
|
|
4848
|
-
Yo as c,
|
|
4849
|
-
lt as d,
|
|
4850
|
-
Co as e,
|
|
4851
|
-
sa as f,
|
|
4852
|
-
oa as g,
|
|
4853
|
-
Ca as h,
|
|
4854
|
-
So as i,
|
|
4855
|
-
Ko as j,
|
|
4856
|
-
Go as k,
|
|
4857
|
-
Zo as l,
|
|
4858
|
-
J as m,
|
|
4859
|
-
ye as n,
|
|
4860
|
-
Qo as o,
|
|
4861
|
-
Jt as p,
|
|
4862
|
-
Xo as q,
|
|
4863
|
-
ta as r,
|
|
4864
|
-
Vt as s,
|
|
4865
|
-
Po as t,
|
|
4866
|
-
Na as u,
|
|
4867
|
-
Ma as v,
|
|
4868
|
-
Xt as x
|
|
4869
|
-
};
|
|
4870
|
-
//# sourceMappingURL=index-79b338f7.js.map
|