@clevertask/scribe 0.0.11 → 0.0.12
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/assets/index.css +1 -1
- package/dist/components/Menu/BubbleMenu.js +1 -1
- package/dist/components/Menu/Mobile/ListOptionBar.d.ts +6 -0
- package/dist/components/Menu/Mobile/ListOptionBar.js +40 -0
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +240 -244
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts +1 -1
- package/dist/components/Scribe/extension/index.js +24 -25
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +5 -5
- package/dist/components/Scribe/extension/slashCommand/index.js +2 -2
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/index.d.ts +1 -0
- package/dist/components/Scribe/index.js +83 -60
- package/dist/index-B0pieAxt.js +160 -0
- package/dist/{index-CasgquAq.js → index-CCS9HOYd.js} +16838 -5188
- package/dist/{index-DeZ8laak.js → index-DoNRu1rY.js} +1573 -1513
- package/dist/index-VneQGVTd.js +2385 -0
- package/dist/main.css +4 -4
- package/dist/marked.esm-BS_MmRZC.js +1566 -0
- package/dist/purify.es-BGaRrCfO.js +553 -0
- package/dist/turndown.browser.es-RmA_HBaI.js +649 -0
- package/dist/utils/create-scribe-editor.js +7 -6
- package/dist/utils/html-to-markdown.js +7 -6
- package/dist/utils/markdown-to-html.js +4 -3
- package/package.json +13 -12
- package/dist/browser-BJWkU9cc.js +0 -2106
- package/dist/components/Scribe/extension/math-extension.d.ts +0 -2
- package/dist/components/Scribe/extension/math-extension.js +0 -11770
- package/dist/index-BqFHWqw6.js +0 -156
- package/dist/index-C_aWB8qt.js +0 -2291
- package/dist/turndown.browser.es-C1wFFc_i.js +0 -1172
package/dist/index-C_aWB8qt.js
DELETED
|
@@ -1,2291 +0,0 @@
|
|
|
1
|
-
import { P as In, b as $n, H as Wn, A as kn, J as Un, a as Fn } from "./index-DeZ8laak.js";
|
|
2
|
-
import B, { forwardRef as qn, version as Nt, useState as zn, useContext as un, useEffect as Kn, createContext as cn } from "react";
|
|
3
|
-
import Gn, { flushSync as Yn } from "react-dom";
|
|
4
|
-
var k = "top", G = "bottom", Y = "right", U = "left", Tt = "auto", Ue = [k, G, Y, U], De = "start", Ie = "end", Xn = "clippingParents", fn = "viewport", Ne = "popper", Jn = "reference", Pt = /* @__PURE__ */ Ue.reduce(function(e, t) {
|
|
5
|
-
return e.concat([t + "-" + De, t + "-" + Ie]);
|
|
6
|
-
}, []), ln = /* @__PURE__ */ [].concat(Ue, [Tt]).reduce(function(e, t) {
|
|
7
|
-
return e.concat([t, t + "-" + De, t + "-" + Ie]);
|
|
8
|
-
}, []), Qn = "beforeRead", Zn = "read", er = "afterRead", tr = "beforeMain", nr = "main", rr = "afterMain", ir = "beforeWrite", or = "write", ar = "afterWrite", sr = [Qn, Zn, er, tr, nr, rr, ir, or, ar];
|
|
9
|
-
function ne(e) {
|
|
10
|
-
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
11
|
-
}
|
|
12
|
-
function q(e) {
|
|
13
|
-
if (e == null)
|
|
14
|
-
return window;
|
|
15
|
-
if (e.toString() !== "[object Window]") {
|
|
16
|
-
var t = e.ownerDocument;
|
|
17
|
-
return t && t.defaultView || window;
|
|
18
|
-
}
|
|
19
|
-
return e;
|
|
20
|
-
}
|
|
21
|
-
function ge(e) {
|
|
22
|
-
var t = q(e).Element;
|
|
23
|
-
return e instanceof t || e instanceof Element;
|
|
24
|
-
}
|
|
25
|
-
function K(e) {
|
|
26
|
-
var t = q(e).HTMLElement;
|
|
27
|
-
return e instanceof t || e instanceof HTMLElement;
|
|
28
|
-
}
|
|
29
|
-
function Dt(e) {
|
|
30
|
-
if (typeof ShadowRoot > "u")
|
|
31
|
-
return !1;
|
|
32
|
-
var t = q(e).ShadowRoot;
|
|
33
|
-
return e instanceof t || e instanceof ShadowRoot;
|
|
34
|
-
}
|
|
35
|
-
function ur(e) {
|
|
36
|
-
var t = e.state;
|
|
37
|
-
Object.keys(t.elements).forEach(function(n) {
|
|
38
|
-
var r = t.styles[n] || {}, o = t.attributes[n] || {}, s = t.elements[n];
|
|
39
|
-
!K(s) || !ne(s) || (Object.assign(s.style, r), Object.keys(o).forEach(function(l) {
|
|
40
|
-
var u = o[l];
|
|
41
|
-
u === !1 ? s.removeAttribute(l) : s.setAttribute(l, u === !0 ? "" : u);
|
|
42
|
-
}));
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function cr(e) {
|
|
46
|
-
var t = e.state, n = {
|
|
47
|
-
popper: {
|
|
48
|
-
position: t.options.strategy,
|
|
49
|
-
left: "0",
|
|
50
|
-
top: "0",
|
|
51
|
-
margin: "0"
|
|
52
|
-
},
|
|
53
|
-
arrow: {
|
|
54
|
-
position: "absolute"
|
|
55
|
-
},
|
|
56
|
-
reference: {}
|
|
57
|
-
};
|
|
58
|
-
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
|
59
|
-
Object.keys(t.elements).forEach(function(r) {
|
|
60
|
-
var o = t.elements[r], s = t.attributes[r] || {}, l = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), u = l.reduce(function(a, d) {
|
|
61
|
-
return a[d] = "", a;
|
|
62
|
-
}, {});
|
|
63
|
-
!K(o) || !ne(o) || (Object.assign(o.style, u), Object.keys(s).forEach(function(a) {
|
|
64
|
-
o.removeAttribute(a);
|
|
65
|
-
}));
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
const pn = {
|
|
70
|
-
name: "applyStyles",
|
|
71
|
-
enabled: !0,
|
|
72
|
-
phase: "write",
|
|
73
|
-
fn: ur,
|
|
74
|
-
effect: cr,
|
|
75
|
-
requires: ["computeStyles"]
|
|
76
|
-
};
|
|
77
|
-
function te(e) {
|
|
78
|
-
return e.split("-")[0];
|
|
79
|
-
}
|
|
80
|
-
var ye = Math.max, at = Math.min, Ae = Math.round;
|
|
81
|
-
function bt() {
|
|
82
|
-
var e = navigator.userAgentData;
|
|
83
|
-
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
84
|
-
return t.brand + "/" + t.version;
|
|
85
|
-
}).join(" ") : navigator.userAgent;
|
|
86
|
-
}
|
|
87
|
-
function dn() {
|
|
88
|
-
return !/^((?!chrome|android).)*safari/i.test(bt());
|
|
89
|
-
}
|
|
90
|
-
function Ce(e, t, n) {
|
|
91
|
-
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
92
|
-
var r = e.getBoundingClientRect(), o = 1, s = 1;
|
|
93
|
-
t && K(e) && (o = e.offsetWidth > 0 && Ae(r.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && Ae(r.height) / e.offsetHeight || 1);
|
|
94
|
-
var l = ge(e) ? q(e) : window, u = l.visualViewport, a = !dn() && n, d = (r.left + (a && u ? u.offsetLeft : 0)) / o, f = (r.top + (a && u ? u.offsetTop : 0)) / s, v = r.width / o, y = r.height / s;
|
|
95
|
-
return {
|
|
96
|
-
width: v,
|
|
97
|
-
height: y,
|
|
98
|
-
top: f,
|
|
99
|
-
right: d + v,
|
|
100
|
-
bottom: f + y,
|
|
101
|
-
left: d,
|
|
102
|
-
x: d,
|
|
103
|
-
y: f
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function At(e) {
|
|
107
|
-
var t = Ce(e), n = e.offsetWidth, r = e.offsetHeight;
|
|
108
|
-
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
|
|
109
|
-
x: e.offsetLeft,
|
|
110
|
-
y: e.offsetTop,
|
|
111
|
-
width: n,
|
|
112
|
-
height: r
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function vn(e, t) {
|
|
116
|
-
var n = t.getRootNode && t.getRootNode();
|
|
117
|
-
if (e.contains(t))
|
|
118
|
-
return !0;
|
|
119
|
-
if (n && Dt(n)) {
|
|
120
|
-
var r = t;
|
|
121
|
-
do {
|
|
122
|
-
if (r && e.isSameNode(r))
|
|
123
|
-
return !0;
|
|
124
|
-
r = r.parentNode || r.host;
|
|
125
|
-
} while (r);
|
|
126
|
-
}
|
|
127
|
-
return !1;
|
|
128
|
-
}
|
|
129
|
-
function ue(e) {
|
|
130
|
-
return q(e).getComputedStyle(e);
|
|
131
|
-
}
|
|
132
|
-
function fr(e) {
|
|
133
|
-
return ["table", "td", "th"].indexOf(ne(e)) >= 0;
|
|
134
|
-
}
|
|
135
|
-
function le(e) {
|
|
136
|
-
return ((ge(e) ? e.ownerDocument : (
|
|
137
|
-
// $FlowFixMe[prop-missing]
|
|
138
|
-
e.document
|
|
139
|
-
)) || window.document).documentElement;
|
|
140
|
-
}
|
|
141
|
-
function ut(e) {
|
|
142
|
-
return ne(e) === "html" ? e : (
|
|
143
|
-
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
144
|
-
// $FlowFixMe[incompatible-return]
|
|
145
|
-
// $FlowFixMe[prop-missing]
|
|
146
|
-
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
147
|
-
e.parentNode || // DOM Element detected
|
|
148
|
-
(Dt(e) ? e.host : null) || // ShadowRoot detected
|
|
149
|
-
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
150
|
-
le(e)
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
function Bt(e) {
|
|
154
|
-
return !K(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
155
|
-
ue(e).position === "fixed" ? null : e.offsetParent;
|
|
156
|
-
}
|
|
157
|
-
function lr(e) {
|
|
158
|
-
var t = /firefox/i.test(bt()), n = /Trident/i.test(bt());
|
|
159
|
-
if (n && K(e)) {
|
|
160
|
-
var r = ue(e);
|
|
161
|
-
if (r.position === "fixed")
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
var o = ut(e);
|
|
165
|
-
for (Dt(o) && (o = o.host); K(o) && ["html", "body"].indexOf(ne(o)) < 0; ) {
|
|
166
|
-
var s = ue(o);
|
|
167
|
-
if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
|
|
168
|
-
return o;
|
|
169
|
-
o = o.parentNode;
|
|
170
|
-
}
|
|
171
|
-
return null;
|
|
172
|
-
}
|
|
173
|
-
function Fe(e) {
|
|
174
|
-
for (var t = q(e), n = Bt(e); n && fr(n) && ue(n).position === "static"; )
|
|
175
|
-
n = Bt(n);
|
|
176
|
-
return n && (ne(n) === "html" || ne(n) === "body" && ue(n).position === "static") ? t : n || lr(e) || t;
|
|
177
|
-
}
|
|
178
|
-
function Ct(e) {
|
|
179
|
-
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
180
|
-
}
|
|
181
|
-
function Pe(e, t, n) {
|
|
182
|
-
return ye(e, at(t, n));
|
|
183
|
-
}
|
|
184
|
-
function pr(e, t, n) {
|
|
185
|
-
var r = Pe(e, t, n);
|
|
186
|
-
return r > n ? n : r;
|
|
187
|
-
}
|
|
188
|
-
function hn() {
|
|
189
|
-
return {
|
|
190
|
-
top: 0,
|
|
191
|
-
right: 0,
|
|
192
|
-
bottom: 0,
|
|
193
|
-
left: 0
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function mn(e) {
|
|
197
|
-
return Object.assign({}, hn(), e);
|
|
198
|
-
}
|
|
199
|
-
function yn(e, t) {
|
|
200
|
-
return t.reduce(function(n, r) {
|
|
201
|
-
return n[r] = e, n;
|
|
202
|
-
}, {});
|
|
203
|
-
}
|
|
204
|
-
var dr = function(t, n) {
|
|
205
|
-
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
206
|
-
placement: n.placement
|
|
207
|
-
})) : t, mn(typeof t != "number" ? t : yn(t, Ue));
|
|
208
|
-
};
|
|
209
|
-
function vr(e) {
|
|
210
|
-
var t, n = e.state, r = e.name, o = e.options, s = n.elements.arrow, l = n.modifiersData.popperOffsets, u = te(n.placement), a = Ct(u), d = [U, Y].indexOf(u) >= 0, f = d ? "height" : "width";
|
|
211
|
-
if (!(!s || !l)) {
|
|
212
|
-
var v = dr(o.padding, n), y = At(s), h = a === "y" ? k : U, b = a === "y" ? G : Y, m = n.rects.reference[f] + n.rects.reference[a] - l[a] - n.rects.popper[f], w = l[a] - n.rects.reference[a], T = Fe(s), D = T ? a === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, O = m / 2 - w / 2, i = v[h], E = D - y[f] - v[b], p = D / 2 - y[f] / 2 + O, x = Pe(i, p, E), _ = a;
|
|
213
|
-
n.modifiersData[r] = (t = {}, t[_] = x, t.centerOffset = x - p, t);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function hr(e) {
|
|
217
|
-
var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
|
|
218
|
-
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || vn(t.elements.popper, o) && (t.elements.arrow = o));
|
|
219
|
-
}
|
|
220
|
-
const mr = {
|
|
221
|
-
name: "arrow",
|
|
222
|
-
enabled: !0,
|
|
223
|
-
phase: "main",
|
|
224
|
-
fn: vr,
|
|
225
|
-
effect: hr,
|
|
226
|
-
requires: ["popperOffsets"],
|
|
227
|
-
requiresIfExists: ["preventOverflow"]
|
|
228
|
-
};
|
|
229
|
-
function _e(e) {
|
|
230
|
-
return e.split("-")[1];
|
|
231
|
-
}
|
|
232
|
-
var yr = {
|
|
233
|
-
top: "auto",
|
|
234
|
-
right: "auto",
|
|
235
|
-
bottom: "auto",
|
|
236
|
-
left: "auto"
|
|
237
|
-
};
|
|
238
|
-
function gr(e, t) {
|
|
239
|
-
var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
|
|
240
|
-
return {
|
|
241
|
-
x: Ae(n * o) / o || 0,
|
|
242
|
-
y: Ae(r * o) / o || 0
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function Ht(e) {
|
|
246
|
-
var t, n = e.popper, r = e.popperRect, o = e.placement, s = e.variation, l = e.offsets, u = e.position, a = e.gpuAcceleration, d = e.adaptive, f = e.roundOffsets, v = e.isFixed, y = l.x, h = y === void 0 ? 0 : y, b = l.y, m = b === void 0 ? 0 : b, w = typeof f == "function" ? f({
|
|
247
|
-
x: h,
|
|
248
|
-
y: m
|
|
249
|
-
}) : {
|
|
250
|
-
x: h,
|
|
251
|
-
y: m
|
|
252
|
-
};
|
|
253
|
-
h = w.x, m = w.y;
|
|
254
|
-
var T = l.hasOwnProperty("x"), D = l.hasOwnProperty("y"), O = U, i = k, E = window;
|
|
255
|
-
if (d) {
|
|
256
|
-
var p = Fe(n), x = "clientHeight", _ = "clientWidth";
|
|
257
|
-
if (p === q(n) && (p = le(n), ue(p).position !== "static" && u === "absolute" && (x = "scrollHeight", _ = "scrollWidth")), p = p, o === k || (o === U || o === Y) && s === Ie) {
|
|
258
|
-
i = G;
|
|
259
|
-
var A = v && p === E && E.visualViewport ? E.visualViewport.height : (
|
|
260
|
-
// $FlowFixMe[prop-missing]
|
|
261
|
-
p[x]
|
|
262
|
-
);
|
|
263
|
-
m -= A - r.height, m *= a ? 1 : -1;
|
|
264
|
-
}
|
|
265
|
-
if (o === U || (o === k || o === G) && s === Ie) {
|
|
266
|
-
O = Y;
|
|
267
|
-
var R = v && p === E && E.visualViewport ? E.visualViewport.width : (
|
|
268
|
-
// $FlowFixMe[prop-missing]
|
|
269
|
-
p[_]
|
|
270
|
-
);
|
|
271
|
-
h -= R - r.width, h *= a ? 1 : -1;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
var j = Object.assign({
|
|
275
|
-
position: u
|
|
276
|
-
}, d && yr), M = f === !0 ? gr({
|
|
277
|
-
x: h,
|
|
278
|
-
y: m
|
|
279
|
-
}, q(n)) : {
|
|
280
|
-
x: h,
|
|
281
|
-
y: m
|
|
282
|
-
};
|
|
283
|
-
if (h = M.x, m = M.y, a) {
|
|
284
|
-
var V;
|
|
285
|
-
return Object.assign({}, j, (V = {}, V[i] = D ? "0" : "", V[O] = T ? "0" : "", V.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + m + "px)" : "translate3d(" + h + "px, " + m + "px, 0)", V));
|
|
286
|
-
}
|
|
287
|
-
return Object.assign({}, j, (t = {}, t[i] = D ? m + "px" : "", t[O] = T ? h + "px" : "", t.transform = "", t));
|
|
288
|
-
}
|
|
289
|
-
function br(e) {
|
|
290
|
-
var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, s = n.adaptive, l = s === void 0 ? !0 : s, u = n.roundOffsets, a = u === void 0 ? !0 : u, d = {
|
|
291
|
-
placement: te(t.placement),
|
|
292
|
-
variation: _e(t.placement),
|
|
293
|
-
popper: t.elements.popper,
|
|
294
|
-
popperRect: t.rects.popper,
|
|
295
|
-
gpuAcceleration: o,
|
|
296
|
-
isFixed: t.options.strategy === "fixed"
|
|
297
|
-
};
|
|
298
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ht(Object.assign({}, d, {
|
|
299
|
-
offsets: t.modifiersData.popperOffsets,
|
|
300
|
-
position: t.options.strategy,
|
|
301
|
-
adaptive: l,
|
|
302
|
-
roundOffsets: a
|
|
303
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ht(Object.assign({}, d, {
|
|
304
|
-
offsets: t.modifiersData.arrow,
|
|
305
|
-
position: "absolute",
|
|
306
|
-
adaptive: !1,
|
|
307
|
-
roundOffsets: a
|
|
308
|
-
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
309
|
-
"data-popper-placement": t.placement
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
const wr = {
|
|
313
|
-
name: "computeStyles",
|
|
314
|
-
enabled: !0,
|
|
315
|
-
phase: "beforeWrite",
|
|
316
|
-
fn: br,
|
|
317
|
-
data: {}
|
|
318
|
-
};
|
|
319
|
-
var rt = {
|
|
320
|
-
passive: !0
|
|
321
|
-
};
|
|
322
|
-
function Or(e) {
|
|
323
|
-
var t = e.state, n = e.instance, r = e.options, o = r.scroll, s = o === void 0 ? !0 : o, l = r.resize, u = l === void 0 ? !0 : l, a = q(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
324
|
-
return s && d.forEach(function(f) {
|
|
325
|
-
f.addEventListener("scroll", n.update, rt);
|
|
326
|
-
}), u && a.addEventListener("resize", n.update, rt), function() {
|
|
327
|
-
s && d.forEach(function(f) {
|
|
328
|
-
f.removeEventListener("scroll", n.update, rt);
|
|
329
|
-
}), u && a.removeEventListener("resize", n.update, rt);
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
const Er = {
|
|
333
|
-
name: "eventListeners",
|
|
334
|
-
enabled: !0,
|
|
335
|
-
phase: "write",
|
|
336
|
-
fn: function() {
|
|
337
|
-
},
|
|
338
|
-
effect: Or,
|
|
339
|
-
data: {}
|
|
340
|
-
};
|
|
341
|
-
var Sr = {
|
|
342
|
-
left: "right",
|
|
343
|
-
right: "left",
|
|
344
|
-
bottom: "top",
|
|
345
|
-
top: "bottom"
|
|
346
|
-
};
|
|
347
|
-
function ot(e) {
|
|
348
|
-
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
349
|
-
return Sr[t];
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
var xr = {
|
|
353
|
-
start: "end",
|
|
354
|
-
end: "start"
|
|
355
|
-
};
|
|
356
|
-
function It(e) {
|
|
357
|
-
return e.replace(/start|end/g, function(t) {
|
|
358
|
-
return xr[t];
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
function _t(e) {
|
|
362
|
-
var t = q(e), n = t.pageXOffset, r = t.pageYOffset;
|
|
363
|
-
return {
|
|
364
|
-
scrollLeft: n,
|
|
365
|
-
scrollTop: r
|
|
366
|
-
};
|
|
367
|
-
}
|
|
368
|
-
function Lt(e) {
|
|
369
|
-
return Ce(le(e)).left + _t(e).scrollLeft;
|
|
370
|
-
}
|
|
371
|
-
function Tr(e, t) {
|
|
372
|
-
var n = q(e), r = le(e), o = n.visualViewport, s = r.clientWidth, l = r.clientHeight, u = 0, a = 0;
|
|
373
|
-
if (o) {
|
|
374
|
-
s = o.width, l = o.height;
|
|
375
|
-
var d = dn();
|
|
376
|
-
(d || !d && t === "fixed") && (u = o.offsetLeft, a = o.offsetTop);
|
|
377
|
-
}
|
|
378
|
-
return {
|
|
379
|
-
width: s,
|
|
380
|
-
height: l,
|
|
381
|
-
x: u + Lt(e),
|
|
382
|
-
y: a
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
function Dr(e) {
|
|
386
|
-
var t, n = le(e), r = _t(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, s = ye(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), l = ye(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), u = -r.scrollLeft + Lt(e), a = -r.scrollTop;
|
|
387
|
-
return ue(o || n).direction === "rtl" && (u += ye(n.clientWidth, o ? o.clientWidth : 0) - s), {
|
|
388
|
-
width: s,
|
|
389
|
-
height: l,
|
|
390
|
-
x: u,
|
|
391
|
-
y: a
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
function Rt(e) {
|
|
395
|
-
var t = ue(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
|
|
396
|
-
return /auto|scroll|overlay|hidden/.test(n + o + r);
|
|
397
|
-
}
|
|
398
|
-
function gn(e) {
|
|
399
|
-
return ["html", "body", "#document"].indexOf(ne(e)) >= 0 ? e.ownerDocument.body : K(e) && Rt(e) ? e : gn(ut(e));
|
|
400
|
-
}
|
|
401
|
-
function Be(e, t) {
|
|
402
|
-
var n;
|
|
403
|
-
t === void 0 && (t = []);
|
|
404
|
-
var r = gn(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), s = q(r), l = o ? [s].concat(s.visualViewport || [], Rt(r) ? r : []) : r, u = t.concat(l);
|
|
405
|
-
return o ? u : (
|
|
406
|
-
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
407
|
-
u.concat(Be(ut(l)))
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
function wt(e) {
|
|
411
|
-
return Object.assign({}, e, {
|
|
412
|
-
left: e.x,
|
|
413
|
-
top: e.y,
|
|
414
|
-
right: e.x + e.width,
|
|
415
|
-
bottom: e.y + e.height
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
function Ar(e, t) {
|
|
419
|
-
var n = Ce(e, !1, t === "fixed");
|
|
420
|
-
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
421
|
-
}
|
|
422
|
-
function $t(e, t, n) {
|
|
423
|
-
return t === fn ? wt(Tr(e, n)) : ge(t) ? Ar(t, n) : wt(Dr(le(e)));
|
|
424
|
-
}
|
|
425
|
-
function Cr(e) {
|
|
426
|
-
var t = Be(ut(e)), n = ["absolute", "fixed"].indexOf(ue(e).position) >= 0, r = n && K(e) ? Fe(e) : e;
|
|
427
|
-
return ge(r) ? t.filter(function(o) {
|
|
428
|
-
return ge(o) && vn(o, r) && ne(o) !== "body";
|
|
429
|
-
}) : [];
|
|
430
|
-
}
|
|
431
|
-
function _r(e, t, n, r) {
|
|
432
|
-
var o = t === "clippingParents" ? Cr(e) : [].concat(t), s = [].concat(o, [n]), l = s[0], u = s.reduce(function(a, d) {
|
|
433
|
-
var f = $t(e, d, r);
|
|
434
|
-
return a.top = ye(f.top, a.top), a.right = at(f.right, a.right), a.bottom = at(f.bottom, a.bottom), a.left = ye(f.left, a.left), a;
|
|
435
|
-
}, $t(e, l, r));
|
|
436
|
-
return u.width = u.right - u.left, u.height = u.bottom - u.top, u.x = u.left, u.y = u.top, u;
|
|
437
|
-
}
|
|
438
|
-
function bn(e) {
|
|
439
|
-
var t = e.reference, n = e.element, r = e.placement, o = r ? te(r) : null, s = r ? _e(r) : null, l = t.x + t.width / 2 - n.width / 2, u = t.y + t.height / 2 - n.height / 2, a;
|
|
440
|
-
switch (o) {
|
|
441
|
-
case k:
|
|
442
|
-
a = {
|
|
443
|
-
x: l,
|
|
444
|
-
y: t.y - n.height
|
|
445
|
-
};
|
|
446
|
-
break;
|
|
447
|
-
case G:
|
|
448
|
-
a = {
|
|
449
|
-
x: l,
|
|
450
|
-
y: t.y + t.height
|
|
451
|
-
};
|
|
452
|
-
break;
|
|
453
|
-
case Y:
|
|
454
|
-
a = {
|
|
455
|
-
x: t.x + t.width,
|
|
456
|
-
y: u
|
|
457
|
-
};
|
|
458
|
-
break;
|
|
459
|
-
case U:
|
|
460
|
-
a = {
|
|
461
|
-
x: t.x - n.width,
|
|
462
|
-
y: u
|
|
463
|
-
};
|
|
464
|
-
break;
|
|
465
|
-
default:
|
|
466
|
-
a = {
|
|
467
|
-
x: t.x,
|
|
468
|
-
y: t.y
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
var d = o ? Ct(o) : null;
|
|
472
|
-
if (d != null) {
|
|
473
|
-
var f = d === "y" ? "height" : "width";
|
|
474
|
-
switch (s) {
|
|
475
|
-
case De:
|
|
476
|
-
a[d] = a[d] - (t[f] / 2 - n[f] / 2);
|
|
477
|
-
break;
|
|
478
|
-
case Ie:
|
|
479
|
-
a[d] = a[d] + (t[f] / 2 - n[f] / 2);
|
|
480
|
-
break;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
return a;
|
|
484
|
-
}
|
|
485
|
-
function $e(e, t) {
|
|
486
|
-
t === void 0 && (t = {});
|
|
487
|
-
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, s = n.strategy, l = s === void 0 ? e.strategy : s, u = n.boundary, a = u === void 0 ? Xn : u, d = n.rootBoundary, f = d === void 0 ? fn : d, v = n.elementContext, y = v === void 0 ? Ne : v, h = n.altBoundary, b = h === void 0 ? !1 : h, m = n.padding, w = m === void 0 ? 0 : m, T = mn(typeof w != "number" ? w : yn(w, Ue)), D = y === Ne ? Jn : Ne, O = e.rects.popper, i = e.elements[b ? D : y], E = _r(ge(i) ? i : i.contextElement || le(e.elements.popper), a, f, l), p = Ce(e.elements.reference), x = bn({
|
|
488
|
-
reference: p,
|
|
489
|
-
element: O,
|
|
490
|
-
placement: o
|
|
491
|
-
}), _ = wt(Object.assign({}, O, x)), A = y === Ne ? _ : p, R = {
|
|
492
|
-
top: E.top - A.top + T.top,
|
|
493
|
-
bottom: A.bottom - E.bottom + T.bottom,
|
|
494
|
-
left: E.left - A.left + T.left,
|
|
495
|
-
right: A.right - E.right + T.right
|
|
496
|
-
}, j = e.modifiersData.offset;
|
|
497
|
-
if (y === Ne && j) {
|
|
498
|
-
var M = j[o];
|
|
499
|
-
Object.keys(R).forEach(function(V) {
|
|
500
|
-
var H = [Y, G].indexOf(V) >= 0 ? 1 : -1, $ = [k, G].indexOf(V) >= 0 ? "y" : "x";
|
|
501
|
-
R[V] += M[$] * H;
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
return R;
|
|
505
|
-
}
|
|
506
|
-
function Lr(e, t) {
|
|
507
|
-
t === void 0 && (t = {});
|
|
508
|
-
var n = t, r = n.placement, o = n.boundary, s = n.rootBoundary, l = n.padding, u = n.flipVariations, a = n.allowedAutoPlacements, d = a === void 0 ? ln : a, f = _e(r), v = f ? u ? Pt : Pt.filter(function(b) {
|
|
509
|
-
return _e(b) === f;
|
|
510
|
-
}) : Ue, y = v.filter(function(b) {
|
|
511
|
-
return d.indexOf(b) >= 0;
|
|
512
|
-
});
|
|
513
|
-
y.length === 0 && (y = v);
|
|
514
|
-
var h = y.reduce(function(b, m) {
|
|
515
|
-
return b[m] = $e(e, {
|
|
516
|
-
placement: m,
|
|
517
|
-
boundary: o,
|
|
518
|
-
rootBoundary: s,
|
|
519
|
-
padding: l
|
|
520
|
-
})[te(m)], b;
|
|
521
|
-
}, {});
|
|
522
|
-
return Object.keys(h).sort(function(b, m) {
|
|
523
|
-
return h[b] - h[m];
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
function Rr(e) {
|
|
527
|
-
if (te(e) === Tt)
|
|
528
|
-
return [];
|
|
529
|
-
var t = ot(e);
|
|
530
|
-
return [It(e), t, It(t)];
|
|
531
|
-
}
|
|
532
|
-
function Mr(e) {
|
|
533
|
-
var t = e.state, n = e.options, r = e.name;
|
|
534
|
-
if (!t.modifiersData[r]._skip) {
|
|
535
|
-
for (var o = n.mainAxis, s = o === void 0 ? !0 : o, l = n.altAxis, u = l === void 0 ? !0 : l, a = n.fallbackPlacements, d = n.padding, f = n.boundary, v = n.rootBoundary, y = n.altBoundary, h = n.flipVariations, b = h === void 0 ? !0 : h, m = n.allowedAutoPlacements, w = t.options.placement, T = te(w), D = T === w, O = a || (D || !b ? [ot(w)] : Rr(w)), i = [w].concat(O).reduce(function(re, X) {
|
|
536
|
-
return re.concat(te(X) === Tt ? Lr(t, {
|
|
537
|
-
placement: X,
|
|
538
|
-
boundary: f,
|
|
539
|
-
rootBoundary: v,
|
|
540
|
-
padding: d,
|
|
541
|
-
flipVariations: b,
|
|
542
|
-
allowedAutoPlacements: m
|
|
543
|
-
}) : X);
|
|
544
|
-
}, []), E = t.rects.reference, p = t.rects.popper, x = /* @__PURE__ */ new Map(), _ = !0, A = i[0], R = 0; R < i.length; R++) {
|
|
545
|
-
var j = i[R], M = te(j), V = _e(j) === De, H = [k, G].indexOf(M) >= 0, $ = H ? "width" : "height", N = $e(t, {
|
|
546
|
-
placement: j,
|
|
547
|
-
boundary: f,
|
|
548
|
-
rootBoundary: v,
|
|
549
|
-
altBoundary: y,
|
|
550
|
-
padding: d
|
|
551
|
-
}), P = H ? V ? Y : U : V ? G : k;
|
|
552
|
-
E[$] > p[$] && (P = ot(P));
|
|
553
|
-
var I = ot(P), J = [];
|
|
554
|
-
if (s && J.push(N[M] <= 0), u && J.push(N[P] <= 0, N[I] <= 0), J.every(function(re) {
|
|
555
|
-
return re;
|
|
556
|
-
})) {
|
|
557
|
-
A = j, _ = !1;
|
|
558
|
-
break;
|
|
559
|
-
}
|
|
560
|
-
x.set(j, J);
|
|
561
|
-
}
|
|
562
|
-
if (_)
|
|
563
|
-
for (var Q = b ? 3 : 1, pe = function(X) {
|
|
564
|
-
var ie = i.find(function(be) {
|
|
565
|
-
var oe = x.get(be);
|
|
566
|
-
if (oe)
|
|
567
|
-
return oe.slice(0, X).every(function(we) {
|
|
568
|
-
return we;
|
|
569
|
-
});
|
|
570
|
-
});
|
|
571
|
-
if (ie)
|
|
572
|
-
return A = ie, "break";
|
|
573
|
-
}, Z = Q; Z > 0; Z--) {
|
|
574
|
-
var de = pe(Z);
|
|
575
|
-
if (de === "break") break;
|
|
576
|
-
}
|
|
577
|
-
t.placement !== A && (t.modifiersData[r]._skip = !0, t.placement = A, t.reset = !0);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
const Vr = {
|
|
581
|
-
name: "flip",
|
|
582
|
-
enabled: !0,
|
|
583
|
-
phase: "main",
|
|
584
|
-
fn: Mr,
|
|
585
|
-
requiresIfExists: ["offset"],
|
|
586
|
-
data: {
|
|
587
|
-
_skip: !1
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
function Wt(e, t, n) {
|
|
591
|
-
return n === void 0 && (n = {
|
|
592
|
-
x: 0,
|
|
593
|
-
y: 0
|
|
594
|
-
}), {
|
|
595
|
-
top: e.top - t.height - n.y,
|
|
596
|
-
right: e.right - t.width + n.x,
|
|
597
|
-
bottom: e.bottom - t.height + n.y,
|
|
598
|
-
left: e.left - t.width - n.x
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
function kt(e) {
|
|
602
|
-
return [k, Y, G, U].some(function(t) {
|
|
603
|
-
return e[t] >= 0;
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
function jr(e) {
|
|
607
|
-
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, s = t.modifiersData.preventOverflow, l = $e(t, {
|
|
608
|
-
elementContext: "reference"
|
|
609
|
-
}), u = $e(t, {
|
|
610
|
-
altBoundary: !0
|
|
611
|
-
}), a = Wt(l, r), d = Wt(u, o, s), f = kt(a), v = kt(d);
|
|
612
|
-
t.modifiersData[n] = {
|
|
613
|
-
referenceClippingOffsets: a,
|
|
614
|
-
popperEscapeOffsets: d,
|
|
615
|
-
isReferenceHidden: f,
|
|
616
|
-
hasPopperEscaped: v
|
|
617
|
-
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
618
|
-
"data-popper-reference-hidden": f,
|
|
619
|
-
"data-popper-escaped": v
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
const Nr = {
|
|
623
|
-
name: "hide",
|
|
624
|
-
enabled: !0,
|
|
625
|
-
phase: "main",
|
|
626
|
-
requiresIfExists: ["preventOverflow"],
|
|
627
|
-
fn: jr
|
|
628
|
-
};
|
|
629
|
-
function Pr(e, t, n) {
|
|
630
|
-
var r = te(e), o = [U, k].indexOf(r) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, {
|
|
631
|
-
placement: e
|
|
632
|
-
})) : n, l = s[0], u = s[1];
|
|
633
|
-
return l = l || 0, u = (u || 0) * o, [U, Y].indexOf(r) >= 0 ? {
|
|
634
|
-
x: u,
|
|
635
|
-
y: l
|
|
636
|
-
} : {
|
|
637
|
-
x: l,
|
|
638
|
-
y: u
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
function Br(e) {
|
|
642
|
-
var t = e.state, n = e.options, r = e.name, o = n.offset, s = o === void 0 ? [0, 0] : o, l = ln.reduce(function(f, v) {
|
|
643
|
-
return f[v] = Pr(v, t.rects, s), f;
|
|
644
|
-
}, {}), u = l[t.placement], a = u.x, d = u.y;
|
|
645
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += d), t.modifiersData[r] = l;
|
|
646
|
-
}
|
|
647
|
-
const Hr = {
|
|
648
|
-
name: "offset",
|
|
649
|
-
enabled: !0,
|
|
650
|
-
phase: "main",
|
|
651
|
-
requires: ["popperOffsets"],
|
|
652
|
-
fn: Br
|
|
653
|
-
};
|
|
654
|
-
function Ir(e) {
|
|
655
|
-
var t = e.state, n = e.name;
|
|
656
|
-
t.modifiersData[n] = bn({
|
|
657
|
-
reference: t.rects.reference,
|
|
658
|
-
element: t.rects.popper,
|
|
659
|
-
placement: t.placement
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
const $r = {
|
|
663
|
-
name: "popperOffsets",
|
|
664
|
-
enabled: !0,
|
|
665
|
-
phase: "read",
|
|
666
|
-
fn: Ir,
|
|
667
|
-
data: {}
|
|
668
|
-
};
|
|
669
|
-
function Wr(e) {
|
|
670
|
-
return e === "x" ? "y" : "x";
|
|
671
|
-
}
|
|
672
|
-
function kr(e) {
|
|
673
|
-
var t = e.state, n = e.options, r = e.name, o = n.mainAxis, s = o === void 0 ? !0 : o, l = n.altAxis, u = l === void 0 ? !1 : l, a = n.boundary, d = n.rootBoundary, f = n.altBoundary, v = n.padding, y = n.tether, h = y === void 0 ? !0 : y, b = n.tetherOffset, m = b === void 0 ? 0 : b, w = $e(t, {
|
|
674
|
-
boundary: a,
|
|
675
|
-
rootBoundary: d,
|
|
676
|
-
padding: v,
|
|
677
|
-
altBoundary: f
|
|
678
|
-
}), T = te(t.placement), D = _e(t.placement), O = !D, i = Ct(T), E = Wr(i), p = t.modifiersData.popperOffsets, x = t.rects.reference, _ = t.rects.popper, A = typeof m == "function" ? m(Object.assign({}, t.rects, {
|
|
679
|
-
placement: t.placement
|
|
680
|
-
})) : m, R = typeof A == "number" ? {
|
|
681
|
-
mainAxis: A,
|
|
682
|
-
altAxis: A
|
|
683
|
-
} : Object.assign({
|
|
684
|
-
mainAxis: 0,
|
|
685
|
-
altAxis: 0
|
|
686
|
-
}, A), j = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
|
|
687
|
-
x: 0,
|
|
688
|
-
y: 0
|
|
689
|
-
};
|
|
690
|
-
if (p) {
|
|
691
|
-
if (s) {
|
|
692
|
-
var V, H = i === "y" ? k : U, $ = i === "y" ? G : Y, N = i === "y" ? "height" : "width", P = p[i], I = P + w[H], J = P - w[$], Q = h ? -_[N] / 2 : 0, pe = D === De ? x[N] : _[N], Z = D === De ? -_[N] : -x[N], de = t.elements.arrow, re = h && de ? At(de) : {
|
|
693
|
-
width: 0,
|
|
694
|
-
height: 0
|
|
695
|
-
}, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : hn(), ie = X[H], be = X[$], oe = Pe(0, x[N], re[N]), we = O ? x[N] / 2 - Q - oe - ie - R.mainAxis : pe - oe - ie - R.mainAxis, ce = O ? -x[N] / 2 + Q + oe + be + R.mainAxis : Z + oe + be + R.mainAxis, Oe = t.elements.arrow && Fe(t.elements.arrow), ze = Oe ? i === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Le = (V = j == null ? void 0 : j[i]) != null ? V : 0, Ke = P + we - Le - ze, Ge = P + ce - Le, Re = Pe(h ? at(I, Ke) : I, P, h ? ye(J, Ge) : J);
|
|
696
|
-
p[i] = Re, M[i] = Re - P;
|
|
697
|
-
}
|
|
698
|
-
if (u) {
|
|
699
|
-
var Me, Ye = i === "x" ? k : U, Xe = i === "x" ? G : Y, ae = p[E], fe = E === "y" ? "height" : "width", Ve = ae + w[Ye], ve = ae - w[Xe], je = [k, U].indexOf(T) !== -1, Je = (Me = j == null ? void 0 : j[E]) != null ? Me : 0, Qe = je ? Ve : ae - x[fe] - _[fe] - Je + R.altAxis, Ze = je ? ae + x[fe] + _[fe] - Je - R.altAxis : ve, et = h && je ? pr(Qe, ae, Ze) : Pe(h ? Qe : Ve, ae, h ? Ze : ve);
|
|
700
|
-
p[E] = et, M[E] = et - ae;
|
|
701
|
-
}
|
|
702
|
-
t.modifiersData[r] = M;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
const Ur = {
|
|
706
|
-
name: "preventOverflow",
|
|
707
|
-
enabled: !0,
|
|
708
|
-
phase: "main",
|
|
709
|
-
fn: kr,
|
|
710
|
-
requiresIfExists: ["offset"]
|
|
711
|
-
};
|
|
712
|
-
function Fr(e) {
|
|
713
|
-
return {
|
|
714
|
-
scrollLeft: e.scrollLeft,
|
|
715
|
-
scrollTop: e.scrollTop
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
function qr(e) {
|
|
719
|
-
return e === q(e) || !K(e) ? _t(e) : Fr(e);
|
|
720
|
-
}
|
|
721
|
-
function zr(e) {
|
|
722
|
-
var t = e.getBoundingClientRect(), n = Ae(t.width) / e.offsetWidth || 1, r = Ae(t.height) / e.offsetHeight || 1;
|
|
723
|
-
return n !== 1 || r !== 1;
|
|
724
|
-
}
|
|
725
|
-
function Kr(e, t, n) {
|
|
726
|
-
n === void 0 && (n = !1);
|
|
727
|
-
var r = K(t), o = K(t) && zr(t), s = le(t), l = Ce(e, o, n), u = {
|
|
728
|
-
scrollLeft: 0,
|
|
729
|
-
scrollTop: 0
|
|
730
|
-
}, a = {
|
|
731
|
-
x: 0,
|
|
732
|
-
y: 0
|
|
733
|
-
};
|
|
734
|
-
return (r || !r && !n) && ((ne(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
735
|
-
Rt(s)) && (u = qr(t)), K(t) ? (a = Ce(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : s && (a.x = Lt(s))), {
|
|
736
|
-
x: l.left + u.scrollLeft - a.x,
|
|
737
|
-
y: l.top + u.scrollTop - a.y,
|
|
738
|
-
width: l.width,
|
|
739
|
-
height: l.height
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
function Gr(e) {
|
|
743
|
-
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
744
|
-
e.forEach(function(s) {
|
|
745
|
-
t.set(s.name, s);
|
|
746
|
-
});
|
|
747
|
-
function o(s) {
|
|
748
|
-
n.add(s.name);
|
|
749
|
-
var l = [].concat(s.requires || [], s.requiresIfExists || []);
|
|
750
|
-
l.forEach(function(u) {
|
|
751
|
-
if (!n.has(u)) {
|
|
752
|
-
var a = t.get(u);
|
|
753
|
-
a && o(a);
|
|
754
|
-
}
|
|
755
|
-
}), r.push(s);
|
|
756
|
-
}
|
|
757
|
-
return e.forEach(function(s) {
|
|
758
|
-
n.has(s.name) || o(s);
|
|
759
|
-
}), r;
|
|
760
|
-
}
|
|
761
|
-
function Yr(e) {
|
|
762
|
-
var t = Gr(e);
|
|
763
|
-
return sr.reduce(function(n, r) {
|
|
764
|
-
return n.concat(t.filter(function(o) {
|
|
765
|
-
return o.phase === r;
|
|
766
|
-
}));
|
|
767
|
-
}, []);
|
|
768
|
-
}
|
|
769
|
-
function Xr(e) {
|
|
770
|
-
var t;
|
|
771
|
-
return function() {
|
|
772
|
-
return t || (t = new Promise(function(n) {
|
|
773
|
-
Promise.resolve().then(function() {
|
|
774
|
-
t = void 0, n(e());
|
|
775
|
-
});
|
|
776
|
-
})), t;
|
|
777
|
-
};
|
|
778
|
-
}
|
|
779
|
-
function Jr(e) {
|
|
780
|
-
var t = e.reduce(function(n, r) {
|
|
781
|
-
var o = n[r.name];
|
|
782
|
-
return n[r.name] = o ? Object.assign({}, o, r, {
|
|
783
|
-
options: Object.assign({}, o.options, r.options),
|
|
784
|
-
data: Object.assign({}, o.data, r.data)
|
|
785
|
-
}) : r, n;
|
|
786
|
-
}, {});
|
|
787
|
-
return Object.keys(t).map(function(n) {
|
|
788
|
-
return t[n];
|
|
789
|
-
});
|
|
790
|
-
}
|
|
791
|
-
var Ut = {
|
|
792
|
-
placement: "bottom",
|
|
793
|
-
modifiers: [],
|
|
794
|
-
strategy: "absolute"
|
|
795
|
-
};
|
|
796
|
-
function Ft() {
|
|
797
|
-
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
798
|
-
t[n] = arguments[n];
|
|
799
|
-
return !t.some(function(r) {
|
|
800
|
-
return !(r && typeof r.getBoundingClientRect == "function");
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
function Qr(e) {
|
|
804
|
-
e === void 0 && (e = {});
|
|
805
|
-
var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, s = o === void 0 ? Ut : o;
|
|
806
|
-
return function(u, a, d) {
|
|
807
|
-
d === void 0 && (d = s);
|
|
808
|
-
var f = {
|
|
809
|
-
placement: "bottom",
|
|
810
|
-
orderedModifiers: [],
|
|
811
|
-
options: Object.assign({}, Ut, s),
|
|
812
|
-
modifiersData: {},
|
|
813
|
-
elements: {
|
|
814
|
-
reference: u,
|
|
815
|
-
popper: a
|
|
816
|
-
},
|
|
817
|
-
attributes: {},
|
|
818
|
-
styles: {}
|
|
819
|
-
}, v = [], y = !1, h = {
|
|
820
|
-
state: f,
|
|
821
|
-
setOptions: function(T) {
|
|
822
|
-
var D = typeof T == "function" ? T(f.options) : T;
|
|
823
|
-
m(), f.options = Object.assign({}, s, f.options, D), f.scrollParents = {
|
|
824
|
-
reference: ge(u) ? Be(u) : u.contextElement ? Be(u.contextElement) : [],
|
|
825
|
-
popper: Be(a)
|
|
826
|
-
};
|
|
827
|
-
var O = Yr(Jr([].concat(r, f.options.modifiers)));
|
|
828
|
-
return f.orderedModifiers = O.filter(function(i) {
|
|
829
|
-
return i.enabled;
|
|
830
|
-
}), b(), h.update();
|
|
831
|
-
},
|
|
832
|
-
// Sync update – it will always be executed, even if not necessary. This
|
|
833
|
-
// is useful for low frequency updates where sync behavior simplifies the
|
|
834
|
-
// logic.
|
|
835
|
-
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
836
|
-
// prefer the async Popper#update method
|
|
837
|
-
forceUpdate: function() {
|
|
838
|
-
if (!y) {
|
|
839
|
-
var T = f.elements, D = T.reference, O = T.popper;
|
|
840
|
-
if (Ft(D, O)) {
|
|
841
|
-
f.rects = {
|
|
842
|
-
reference: Kr(D, Fe(O), f.options.strategy === "fixed"),
|
|
843
|
-
popper: At(O)
|
|
844
|
-
}, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(R) {
|
|
845
|
-
return f.modifiersData[R.name] = Object.assign({}, R.data);
|
|
846
|
-
});
|
|
847
|
-
for (var i = 0; i < f.orderedModifiers.length; i++) {
|
|
848
|
-
if (f.reset === !0) {
|
|
849
|
-
f.reset = !1, i = -1;
|
|
850
|
-
continue;
|
|
851
|
-
}
|
|
852
|
-
var E = f.orderedModifiers[i], p = E.fn, x = E.options, _ = x === void 0 ? {} : x, A = E.name;
|
|
853
|
-
typeof p == "function" && (f = p({
|
|
854
|
-
state: f,
|
|
855
|
-
options: _,
|
|
856
|
-
name: A,
|
|
857
|
-
instance: h
|
|
858
|
-
}) || f);
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
// Async and optimistically optimized update – it will not be executed if
|
|
864
|
-
// not necessary (debounced to run at most once-per-tick)
|
|
865
|
-
update: Xr(function() {
|
|
866
|
-
return new Promise(function(w) {
|
|
867
|
-
h.forceUpdate(), w(f);
|
|
868
|
-
});
|
|
869
|
-
}),
|
|
870
|
-
destroy: function() {
|
|
871
|
-
m(), y = !0;
|
|
872
|
-
}
|
|
873
|
-
};
|
|
874
|
-
if (!Ft(u, a))
|
|
875
|
-
return h;
|
|
876
|
-
h.setOptions(d).then(function(w) {
|
|
877
|
-
!y && d.onFirstUpdate && d.onFirstUpdate(w);
|
|
878
|
-
});
|
|
879
|
-
function b() {
|
|
880
|
-
f.orderedModifiers.forEach(function(w) {
|
|
881
|
-
var T = w.name, D = w.options, O = D === void 0 ? {} : D, i = w.effect;
|
|
882
|
-
if (typeof i == "function") {
|
|
883
|
-
var E = i({
|
|
884
|
-
state: f,
|
|
885
|
-
name: T,
|
|
886
|
-
instance: h,
|
|
887
|
-
options: O
|
|
888
|
-
}), p = function() {
|
|
889
|
-
};
|
|
890
|
-
v.push(E || p);
|
|
891
|
-
}
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
function m() {
|
|
895
|
-
v.forEach(function(w) {
|
|
896
|
-
return w();
|
|
897
|
-
}), v = [];
|
|
898
|
-
}
|
|
899
|
-
return h;
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
var Zr = [Er, $r, wr, pn, Hr, Vr, Ur, mr, Nr], ei = /* @__PURE__ */ Qr({
|
|
903
|
-
defaultModifiers: Zr
|
|
904
|
-
}), ti = "tippy-box", wn = "tippy-content", ni = "tippy-backdrop", On = "tippy-arrow", En = "tippy-svg-arrow", me = {
|
|
905
|
-
passive: !0,
|
|
906
|
-
capture: !0
|
|
907
|
-
}, Sn = function() {
|
|
908
|
-
return document.body;
|
|
909
|
-
};
|
|
910
|
-
function ri(e, t) {
|
|
911
|
-
return {}.hasOwnProperty.call(e, t);
|
|
912
|
-
}
|
|
913
|
-
function lt(e, t, n) {
|
|
914
|
-
if (Array.isArray(e)) {
|
|
915
|
-
var r = e[t];
|
|
916
|
-
return r ?? (Array.isArray(n) ? n[t] : n);
|
|
917
|
-
}
|
|
918
|
-
return e;
|
|
919
|
-
}
|
|
920
|
-
function Mt(e, t) {
|
|
921
|
-
var n = {}.toString.call(e);
|
|
922
|
-
return n.indexOf("[object") === 0 && n.indexOf(t + "]") > -1;
|
|
923
|
-
}
|
|
924
|
-
function xn(e, t) {
|
|
925
|
-
return typeof e == "function" ? e.apply(void 0, t) : e;
|
|
926
|
-
}
|
|
927
|
-
function qt(e, t) {
|
|
928
|
-
if (t === 0)
|
|
929
|
-
return e;
|
|
930
|
-
var n;
|
|
931
|
-
return function(r) {
|
|
932
|
-
clearTimeout(n), n = setTimeout(function() {
|
|
933
|
-
e(r);
|
|
934
|
-
}, t);
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
function ii(e, t) {
|
|
938
|
-
var n = Object.assign({}, e);
|
|
939
|
-
return t.forEach(function(r) {
|
|
940
|
-
delete n[r];
|
|
941
|
-
}), n;
|
|
942
|
-
}
|
|
943
|
-
function oi(e) {
|
|
944
|
-
return e.split(/\s+/).filter(Boolean);
|
|
945
|
-
}
|
|
946
|
-
function Te(e) {
|
|
947
|
-
return [].concat(e);
|
|
948
|
-
}
|
|
949
|
-
function zt(e, t) {
|
|
950
|
-
e.indexOf(t) === -1 && e.push(t);
|
|
951
|
-
}
|
|
952
|
-
function ai(e) {
|
|
953
|
-
return e.filter(function(t, n) {
|
|
954
|
-
return e.indexOf(t) === n;
|
|
955
|
-
});
|
|
956
|
-
}
|
|
957
|
-
function si(e) {
|
|
958
|
-
return e.split("-")[0];
|
|
959
|
-
}
|
|
960
|
-
function st(e) {
|
|
961
|
-
return [].slice.call(e);
|
|
962
|
-
}
|
|
963
|
-
function Kt(e) {
|
|
964
|
-
return Object.keys(e).reduce(function(t, n) {
|
|
965
|
-
return e[n] !== void 0 && (t[n] = e[n]), t;
|
|
966
|
-
}, {});
|
|
967
|
-
}
|
|
968
|
-
function He() {
|
|
969
|
-
return document.createElement("div");
|
|
970
|
-
}
|
|
971
|
-
function We(e) {
|
|
972
|
-
return ["Element", "Fragment"].some(function(t) {
|
|
973
|
-
return Mt(e, t);
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
function ui(e) {
|
|
977
|
-
return Mt(e, "NodeList");
|
|
978
|
-
}
|
|
979
|
-
function ci(e) {
|
|
980
|
-
return Mt(e, "MouseEvent");
|
|
981
|
-
}
|
|
982
|
-
function fi(e) {
|
|
983
|
-
return !!(e && e._tippy && e._tippy.reference === e);
|
|
984
|
-
}
|
|
985
|
-
function li(e) {
|
|
986
|
-
return We(e) ? [e] : ui(e) ? st(e) : Array.isArray(e) ? e : st(document.querySelectorAll(e));
|
|
987
|
-
}
|
|
988
|
-
function pt(e, t) {
|
|
989
|
-
e.forEach(function(n) {
|
|
990
|
-
n && (n.style.transitionDuration = t + "ms");
|
|
991
|
-
});
|
|
992
|
-
}
|
|
993
|
-
function Gt(e, t) {
|
|
994
|
-
e.forEach(function(n) {
|
|
995
|
-
n && n.setAttribute("data-state", t);
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
function pi(e) {
|
|
999
|
-
var t, n = Te(e), r = n[0];
|
|
1000
|
-
return r != null && (t = r.ownerDocument) != null && t.body ? r.ownerDocument : document;
|
|
1001
|
-
}
|
|
1002
|
-
function di(e, t) {
|
|
1003
|
-
var n = t.clientX, r = t.clientY;
|
|
1004
|
-
return e.every(function(o) {
|
|
1005
|
-
var s = o.popperRect, l = o.popperState, u = o.props, a = u.interactiveBorder, d = si(l.placement), f = l.modifiersData.offset;
|
|
1006
|
-
if (!f)
|
|
1007
|
-
return !0;
|
|
1008
|
-
var v = d === "bottom" ? f.top.y : 0, y = d === "top" ? f.bottom.y : 0, h = d === "right" ? f.left.x : 0, b = d === "left" ? f.right.x : 0, m = s.top - r + v > a, w = r - s.bottom - y > a, T = s.left - n + h > a, D = n - s.right - b > a;
|
|
1009
|
-
return m || w || T || D;
|
|
1010
|
-
});
|
|
1011
|
-
}
|
|
1012
|
-
function dt(e, t, n) {
|
|
1013
|
-
var r = t + "EventListener";
|
|
1014
|
-
["transitionend", "webkitTransitionEnd"].forEach(function(o) {
|
|
1015
|
-
e[r](o, n);
|
|
1016
|
-
});
|
|
1017
|
-
}
|
|
1018
|
-
function Yt(e, t) {
|
|
1019
|
-
for (var n = t; n; ) {
|
|
1020
|
-
var r;
|
|
1021
|
-
if (e.contains(n))
|
|
1022
|
-
return !0;
|
|
1023
|
-
n = n.getRootNode == null || (r = n.getRootNode()) == null ? void 0 : r.host;
|
|
1024
|
-
}
|
|
1025
|
-
return !1;
|
|
1026
|
-
}
|
|
1027
|
-
var ee = {
|
|
1028
|
-
isTouch: !1
|
|
1029
|
-
}, Xt = 0;
|
|
1030
|
-
function vi() {
|
|
1031
|
-
ee.isTouch || (ee.isTouch = !0, window.performance && document.addEventListener("mousemove", Tn));
|
|
1032
|
-
}
|
|
1033
|
-
function Tn() {
|
|
1034
|
-
var e = performance.now();
|
|
1035
|
-
e - Xt < 20 && (ee.isTouch = !1, document.removeEventListener("mousemove", Tn)), Xt = e;
|
|
1036
|
-
}
|
|
1037
|
-
function hi() {
|
|
1038
|
-
var e = document.activeElement;
|
|
1039
|
-
if (fi(e)) {
|
|
1040
|
-
var t = e._tippy;
|
|
1041
|
-
e.blur && !t.state.isVisible && e.blur();
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
function mi() {
|
|
1045
|
-
document.addEventListener("touchstart", vi, me), window.addEventListener("blur", hi);
|
|
1046
|
-
}
|
|
1047
|
-
var yi = typeof window < "u" && typeof document < "u", gi = yi ? (
|
|
1048
|
-
// @ts-ignore
|
|
1049
|
-
!!window.msCrypto
|
|
1050
|
-
) : !1;
|
|
1051
|
-
function xe(e) {
|
|
1052
|
-
var t = e === "destroy" ? "n already-" : " ";
|
|
1053
|
-
return [e + "() was called on a" + t + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
|
|
1054
|
-
}
|
|
1055
|
-
function Jt(e) {
|
|
1056
|
-
var t = /[ \t]{2,}/g, n = /^[ \t]*/gm;
|
|
1057
|
-
return e.replace(t, " ").replace(n, "").trim();
|
|
1058
|
-
}
|
|
1059
|
-
function bi(e) {
|
|
1060
|
-
return Jt(`
|
|
1061
|
-
%ctippy.js
|
|
1062
|
-
|
|
1063
|
-
%c` + Jt(e) + `
|
|
1064
|
-
|
|
1065
|
-
%c👷 This is a development-only message. It will be removed in production.
|
|
1066
|
-
`);
|
|
1067
|
-
}
|
|
1068
|
-
function Dn(e) {
|
|
1069
|
-
return [
|
|
1070
|
-
bi(e),
|
|
1071
|
-
// title
|
|
1072
|
-
"color: #00C584; font-size: 1.3em; font-weight: bold;",
|
|
1073
|
-
// message
|
|
1074
|
-
"line-height: 1.5",
|
|
1075
|
-
// footer
|
|
1076
|
-
"color: #a6a095;"
|
|
1077
|
-
];
|
|
1078
|
-
}
|
|
1079
|
-
var ke;
|
|
1080
|
-
process.env.NODE_ENV !== "production" && wi();
|
|
1081
|
-
function wi() {
|
|
1082
|
-
ke = /* @__PURE__ */ new Set();
|
|
1083
|
-
}
|
|
1084
|
-
function se(e, t) {
|
|
1085
|
-
if (e && !ke.has(t)) {
|
|
1086
|
-
var n;
|
|
1087
|
-
ke.add(t), (n = console).warn.apply(n, Dn(t));
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
function Ot(e, t) {
|
|
1091
|
-
if (e && !ke.has(t)) {
|
|
1092
|
-
var n;
|
|
1093
|
-
ke.add(t), (n = console).error.apply(n, Dn(t));
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
function Oi(e) {
|
|
1097
|
-
var t = !e, n = Object.prototype.toString.call(e) === "[object Object]" && !e.addEventListener;
|
|
1098
|
-
Ot(t, ["tippy() was passed", "`" + String(e) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), Ot(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
|
|
1099
|
-
}
|
|
1100
|
-
var An = {
|
|
1101
|
-
animateFill: !1,
|
|
1102
|
-
followCursor: !1,
|
|
1103
|
-
inlinePositioning: !1,
|
|
1104
|
-
sticky: !1
|
|
1105
|
-
}, Ei = {
|
|
1106
|
-
allowHTML: !1,
|
|
1107
|
-
animation: "fade",
|
|
1108
|
-
arrow: !0,
|
|
1109
|
-
content: "",
|
|
1110
|
-
inertia: !1,
|
|
1111
|
-
maxWidth: 350,
|
|
1112
|
-
role: "tooltip",
|
|
1113
|
-
theme: "",
|
|
1114
|
-
zIndex: 9999
|
|
1115
|
-
}, F = Object.assign({
|
|
1116
|
-
appendTo: Sn,
|
|
1117
|
-
aria: {
|
|
1118
|
-
content: "auto",
|
|
1119
|
-
expanded: "auto"
|
|
1120
|
-
},
|
|
1121
|
-
delay: 0,
|
|
1122
|
-
duration: [300, 250],
|
|
1123
|
-
getReferenceClientRect: null,
|
|
1124
|
-
hideOnClick: !0,
|
|
1125
|
-
ignoreAttributes: !1,
|
|
1126
|
-
interactive: !1,
|
|
1127
|
-
interactiveBorder: 2,
|
|
1128
|
-
interactiveDebounce: 0,
|
|
1129
|
-
moveTransition: "",
|
|
1130
|
-
offset: [0, 10],
|
|
1131
|
-
onAfterUpdate: function() {
|
|
1132
|
-
},
|
|
1133
|
-
onBeforeUpdate: function() {
|
|
1134
|
-
},
|
|
1135
|
-
onCreate: function() {
|
|
1136
|
-
},
|
|
1137
|
-
onDestroy: function() {
|
|
1138
|
-
},
|
|
1139
|
-
onHidden: function() {
|
|
1140
|
-
},
|
|
1141
|
-
onHide: function() {
|
|
1142
|
-
},
|
|
1143
|
-
onMount: function() {
|
|
1144
|
-
},
|
|
1145
|
-
onShow: function() {
|
|
1146
|
-
},
|
|
1147
|
-
onShown: function() {
|
|
1148
|
-
},
|
|
1149
|
-
onTrigger: function() {
|
|
1150
|
-
},
|
|
1151
|
-
onUntrigger: function() {
|
|
1152
|
-
},
|
|
1153
|
-
onClickOutside: function() {
|
|
1154
|
-
},
|
|
1155
|
-
placement: "top",
|
|
1156
|
-
plugins: [],
|
|
1157
|
-
popperOptions: {},
|
|
1158
|
-
render: null,
|
|
1159
|
-
showOnCreate: !1,
|
|
1160
|
-
touch: !0,
|
|
1161
|
-
trigger: "mouseenter focus",
|
|
1162
|
-
triggerTarget: null
|
|
1163
|
-
}, An, Ei), Si = Object.keys(F), xi = function(t) {
|
|
1164
|
-
process.env.NODE_ENV !== "production" && _n(t, []);
|
|
1165
|
-
var n = Object.keys(t);
|
|
1166
|
-
n.forEach(function(r) {
|
|
1167
|
-
F[r] = t[r];
|
|
1168
|
-
});
|
|
1169
|
-
};
|
|
1170
|
-
function Cn(e) {
|
|
1171
|
-
var t = e.plugins || [], n = t.reduce(function(r, o) {
|
|
1172
|
-
var s = o.name, l = o.defaultValue;
|
|
1173
|
-
if (s) {
|
|
1174
|
-
var u;
|
|
1175
|
-
r[s] = e[s] !== void 0 ? e[s] : (u = F[s]) != null ? u : l;
|
|
1176
|
-
}
|
|
1177
|
-
return r;
|
|
1178
|
-
}, {});
|
|
1179
|
-
return Object.assign({}, e, n);
|
|
1180
|
-
}
|
|
1181
|
-
function Ti(e, t) {
|
|
1182
|
-
var n = t ? Object.keys(Cn(Object.assign({}, F, {
|
|
1183
|
-
plugins: t
|
|
1184
|
-
}))) : Si, r = n.reduce(function(o, s) {
|
|
1185
|
-
var l = (e.getAttribute("data-tippy-" + s) || "").trim();
|
|
1186
|
-
if (!l)
|
|
1187
|
-
return o;
|
|
1188
|
-
if (s === "content")
|
|
1189
|
-
o[s] = l;
|
|
1190
|
-
else
|
|
1191
|
-
try {
|
|
1192
|
-
o[s] = JSON.parse(l);
|
|
1193
|
-
} catch {
|
|
1194
|
-
o[s] = l;
|
|
1195
|
-
}
|
|
1196
|
-
return o;
|
|
1197
|
-
}, {});
|
|
1198
|
-
return r;
|
|
1199
|
-
}
|
|
1200
|
-
function Qt(e, t) {
|
|
1201
|
-
var n = Object.assign({}, t, {
|
|
1202
|
-
content: xn(t.content, [e])
|
|
1203
|
-
}, t.ignoreAttributes ? {} : Ti(e, t.plugins));
|
|
1204
|
-
return n.aria = Object.assign({}, F.aria, n.aria), n.aria = {
|
|
1205
|
-
expanded: n.aria.expanded === "auto" ? t.interactive : n.aria.expanded,
|
|
1206
|
-
content: n.aria.content === "auto" ? t.interactive ? null : "describedby" : n.aria.content
|
|
1207
|
-
}, n;
|
|
1208
|
-
}
|
|
1209
|
-
function _n(e, t) {
|
|
1210
|
-
e === void 0 && (e = {}), t === void 0 && (t = []);
|
|
1211
|
-
var n = Object.keys(e);
|
|
1212
|
-
n.forEach(function(r) {
|
|
1213
|
-
var o = ii(F, Object.keys(An)), s = !ri(o, r);
|
|
1214
|
-
s && (s = t.filter(function(l) {
|
|
1215
|
-
return l.name === r;
|
|
1216
|
-
}).length === 0), se(s, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
|
|
1217
|
-
|
|
1218
|
-
`, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
1219
|
-
`, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
|
|
1220
|
-
});
|
|
1221
|
-
}
|
|
1222
|
-
var Di = function() {
|
|
1223
|
-
return "innerHTML";
|
|
1224
|
-
};
|
|
1225
|
-
function Et(e, t) {
|
|
1226
|
-
e[Di()] = t;
|
|
1227
|
-
}
|
|
1228
|
-
function Zt(e) {
|
|
1229
|
-
var t = He();
|
|
1230
|
-
return e === !0 ? t.className = On : (t.className = En, We(e) ? t.appendChild(e) : Et(t, e)), t;
|
|
1231
|
-
}
|
|
1232
|
-
function en(e, t) {
|
|
1233
|
-
We(t.content) ? (Et(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? Et(e, t.content) : e.textContent = t.content);
|
|
1234
|
-
}
|
|
1235
|
-
function St(e) {
|
|
1236
|
-
var t = e.firstElementChild, n = st(t.children);
|
|
1237
|
-
return {
|
|
1238
|
-
box: t,
|
|
1239
|
-
content: n.find(function(r) {
|
|
1240
|
-
return r.classList.contains(wn);
|
|
1241
|
-
}),
|
|
1242
|
-
arrow: n.find(function(r) {
|
|
1243
|
-
return r.classList.contains(On) || r.classList.contains(En);
|
|
1244
|
-
}),
|
|
1245
|
-
backdrop: n.find(function(r) {
|
|
1246
|
-
return r.classList.contains(ni);
|
|
1247
|
-
})
|
|
1248
|
-
};
|
|
1249
|
-
}
|
|
1250
|
-
function Ln(e) {
|
|
1251
|
-
var t = He(), n = He();
|
|
1252
|
-
n.className = ti, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
|
|
1253
|
-
var r = He();
|
|
1254
|
-
r.className = wn, r.setAttribute("data-state", "hidden"), en(r, e.props), t.appendChild(n), n.appendChild(r), o(e.props, e.props);
|
|
1255
|
-
function o(s, l) {
|
|
1256
|
-
var u = St(t), a = u.box, d = u.content, f = u.arrow;
|
|
1257
|
-
l.theme ? a.setAttribute("data-theme", l.theme) : a.removeAttribute("data-theme"), typeof l.animation == "string" ? a.setAttribute("data-animation", l.animation) : a.removeAttribute("data-animation"), l.inertia ? a.setAttribute("data-inertia", "") : a.removeAttribute("data-inertia"), a.style.maxWidth = typeof l.maxWidth == "number" ? l.maxWidth + "px" : l.maxWidth, l.role ? a.setAttribute("role", l.role) : a.removeAttribute("role"), (s.content !== l.content || s.allowHTML !== l.allowHTML) && en(d, e.props), l.arrow ? f ? s.arrow !== l.arrow && (a.removeChild(f), a.appendChild(Zt(l.arrow))) : a.appendChild(Zt(l.arrow)) : f && a.removeChild(f);
|
|
1258
|
-
}
|
|
1259
|
-
return {
|
|
1260
|
-
popper: t,
|
|
1261
|
-
onUpdate: o
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
Ln.$$tippy = !0;
|
|
1265
|
-
var Ai = 1, it = [], vt = [];
|
|
1266
|
-
function Ci(e, t) {
|
|
1267
|
-
var n = Qt(e, Object.assign({}, F, Cn(Kt(t)))), r, o, s, l = !1, u = !1, a = !1, d = !1, f, v, y, h = [], b = qt(Ke, n.interactiveDebounce), m, w = Ai++, T = null, D = ai(n.plugins), O = {
|
|
1268
|
-
// Is the instance currently enabled?
|
|
1269
|
-
isEnabled: !0,
|
|
1270
|
-
// Is the tippy currently showing and not transitioning out?
|
|
1271
|
-
isVisible: !1,
|
|
1272
|
-
// Has the instance been destroyed?
|
|
1273
|
-
isDestroyed: !1,
|
|
1274
|
-
// Is the tippy currently mounted to the DOM?
|
|
1275
|
-
isMounted: !1,
|
|
1276
|
-
// Has the tippy finished transitioning in?
|
|
1277
|
-
isShown: !1
|
|
1278
|
-
}, i = {
|
|
1279
|
-
// properties
|
|
1280
|
-
id: w,
|
|
1281
|
-
reference: e,
|
|
1282
|
-
popper: He(),
|
|
1283
|
-
popperInstance: T,
|
|
1284
|
-
props: n,
|
|
1285
|
-
state: O,
|
|
1286
|
-
plugins: D,
|
|
1287
|
-
// methods
|
|
1288
|
-
clearDelayTimeouts: Qe,
|
|
1289
|
-
setProps: Ze,
|
|
1290
|
-
setContent: et,
|
|
1291
|
-
show: Vn,
|
|
1292
|
-
hide: jn,
|
|
1293
|
-
hideWithInteractivity: Nn,
|
|
1294
|
-
enable: je,
|
|
1295
|
-
disable: Je,
|
|
1296
|
-
unmount: Pn,
|
|
1297
|
-
destroy: Bn
|
|
1298
|
-
};
|
|
1299
|
-
if (!n.render)
|
|
1300
|
-
return process.env.NODE_ENV !== "production" && Ot(!0, "render() function has not been supplied."), i;
|
|
1301
|
-
var E = n.render(i), p = E.popper, x = E.onUpdate;
|
|
1302
|
-
p.setAttribute("data-tippy-root", ""), p.id = "tippy-" + i.id, i.popper = p, e._tippy = i, p._tippy = i;
|
|
1303
|
-
var _ = D.map(function(c) {
|
|
1304
|
-
return c.fn(i);
|
|
1305
|
-
}), A = e.hasAttribute("aria-expanded");
|
|
1306
|
-
return Oe(), Q(), P(), I("onCreate", [i]), n.showOnCreate && Ve(), p.addEventListener("mouseenter", function() {
|
|
1307
|
-
i.props.interactive && i.state.isVisible && i.clearDelayTimeouts();
|
|
1308
|
-
}), p.addEventListener("mouseleave", function() {
|
|
1309
|
-
i.props.interactive && i.props.trigger.indexOf("mouseenter") >= 0 && H().addEventListener("mousemove", b);
|
|
1310
|
-
}), i;
|
|
1311
|
-
function R() {
|
|
1312
|
-
var c = i.props.touch;
|
|
1313
|
-
return Array.isArray(c) ? c : [c, 0];
|
|
1314
|
-
}
|
|
1315
|
-
function j() {
|
|
1316
|
-
return R()[0] === "hold";
|
|
1317
|
-
}
|
|
1318
|
-
function M() {
|
|
1319
|
-
var c;
|
|
1320
|
-
return !!((c = i.props.render) != null && c.$$tippy);
|
|
1321
|
-
}
|
|
1322
|
-
function V() {
|
|
1323
|
-
return m || e;
|
|
1324
|
-
}
|
|
1325
|
-
function H() {
|
|
1326
|
-
var c = V().parentNode;
|
|
1327
|
-
return c ? pi(c) : document;
|
|
1328
|
-
}
|
|
1329
|
-
function $() {
|
|
1330
|
-
return St(p);
|
|
1331
|
-
}
|
|
1332
|
-
function N(c) {
|
|
1333
|
-
return i.state.isMounted && !i.state.isVisible || ee.isTouch || f && f.type === "focus" ? 0 : lt(i.props.delay, c ? 0 : 1, F.delay);
|
|
1334
|
-
}
|
|
1335
|
-
function P(c) {
|
|
1336
|
-
c === void 0 && (c = !1), p.style.pointerEvents = i.props.interactive && !c ? "" : "none", p.style.zIndex = "" + i.props.zIndex;
|
|
1337
|
-
}
|
|
1338
|
-
function I(c, g, S) {
|
|
1339
|
-
if (S === void 0 && (S = !0), _.forEach(function(C) {
|
|
1340
|
-
C[c] && C[c].apply(C, g);
|
|
1341
|
-
}), S) {
|
|
1342
|
-
var L;
|
|
1343
|
-
(L = i.props)[c].apply(L, g);
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
function J() {
|
|
1347
|
-
var c = i.props.aria;
|
|
1348
|
-
if (c.content) {
|
|
1349
|
-
var g = "aria-" + c.content, S = p.id, L = Te(i.props.triggerTarget || e);
|
|
1350
|
-
L.forEach(function(C) {
|
|
1351
|
-
var W = C.getAttribute(g);
|
|
1352
|
-
if (i.state.isVisible)
|
|
1353
|
-
C.setAttribute(g, W ? W + " " + S : S);
|
|
1354
|
-
else {
|
|
1355
|
-
var z = W && W.replace(S, "").trim();
|
|
1356
|
-
z ? C.setAttribute(g, z) : C.removeAttribute(g);
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
}
|
|
1361
|
-
function Q() {
|
|
1362
|
-
if (!(A || !i.props.aria.expanded)) {
|
|
1363
|
-
var c = Te(i.props.triggerTarget || e);
|
|
1364
|
-
c.forEach(function(g) {
|
|
1365
|
-
i.props.interactive ? g.setAttribute("aria-expanded", i.state.isVisible && g === V() ? "true" : "false") : g.removeAttribute("aria-expanded");
|
|
1366
|
-
});
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
function pe() {
|
|
1370
|
-
H().removeEventListener("mousemove", b), it = it.filter(function(c) {
|
|
1371
|
-
return c !== b;
|
|
1372
|
-
});
|
|
1373
|
-
}
|
|
1374
|
-
function Z(c) {
|
|
1375
|
-
if (!(ee.isTouch && (a || c.type === "mousedown"))) {
|
|
1376
|
-
var g = c.composedPath && c.composedPath()[0] || c.target;
|
|
1377
|
-
if (!(i.props.interactive && Yt(p, g))) {
|
|
1378
|
-
if (Te(i.props.triggerTarget || e).some(function(S) {
|
|
1379
|
-
return Yt(S, g);
|
|
1380
|
-
})) {
|
|
1381
|
-
if (ee.isTouch || i.state.isVisible && i.props.trigger.indexOf("click") >= 0)
|
|
1382
|
-
return;
|
|
1383
|
-
} else
|
|
1384
|
-
I("onClickOutside", [i, c]);
|
|
1385
|
-
i.props.hideOnClick === !0 && (i.clearDelayTimeouts(), i.hide(), u = !0, setTimeout(function() {
|
|
1386
|
-
u = !1;
|
|
1387
|
-
}), i.state.isMounted || ie());
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
function de() {
|
|
1392
|
-
a = !0;
|
|
1393
|
-
}
|
|
1394
|
-
function re() {
|
|
1395
|
-
a = !1;
|
|
1396
|
-
}
|
|
1397
|
-
function X() {
|
|
1398
|
-
var c = H();
|
|
1399
|
-
c.addEventListener("mousedown", Z, !0), c.addEventListener("touchend", Z, me), c.addEventListener("touchstart", re, me), c.addEventListener("touchmove", de, me);
|
|
1400
|
-
}
|
|
1401
|
-
function ie() {
|
|
1402
|
-
var c = H();
|
|
1403
|
-
c.removeEventListener("mousedown", Z, !0), c.removeEventListener("touchend", Z, me), c.removeEventListener("touchstart", re, me), c.removeEventListener("touchmove", de, me);
|
|
1404
|
-
}
|
|
1405
|
-
function be(c, g) {
|
|
1406
|
-
we(c, function() {
|
|
1407
|
-
!i.state.isVisible && p.parentNode && p.parentNode.contains(p) && g();
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
function oe(c, g) {
|
|
1411
|
-
we(c, g);
|
|
1412
|
-
}
|
|
1413
|
-
function we(c, g) {
|
|
1414
|
-
var S = $().box;
|
|
1415
|
-
function L(C) {
|
|
1416
|
-
C.target === S && (dt(S, "remove", L), g());
|
|
1417
|
-
}
|
|
1418
|
-
if (c === 0)
|
|
1419
|
-
return g();
|
|
1420
|
-
dt(S, "remove", v), dt(S, "add", L), v = L;
|
|
1421
|
-
}
|
|
1422
|
-
function ce(c, g, S) {
|
|
1423
|
-
S === void 0 && (S = !1);
|
|
1424
|
-
var L = Te(i.props.triggerTarget || e);
|
|
1425
|
-
L.forEach(function(C) {
|
|
1426
|
-
C.addEventListener(c, g, S), h.push({
|
|
1427
|
-
node: C,
|
|
1428
|
-
eventType: c,
|
|
1429
|
-
handler: g,
|
|
1430
|
-
options: S
|
|
1431
|
-
});
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
function Oe() {
|
|
1435
|
-
j() && (ce("touchstart", Le, {
|
|
1436
|
-
passive: !0
|
|
1437
|
-
}), ce("touchend", Ge, {
|
|
1438
|
-
passive: !0
|
|
1439
|
-
})), oi(i.props.trigger).forEach(function(c) {
|
|
1440
|
-
if (c !== "manual")
|
|
1441
|
-
switch (ce(c, Le), c) {
|
|
1442
|
-
case "mouseenter":
|
|
1443
|
-
ce("mouseleave", Ge);
|
|
1444
|
-
break;
|
|
1445
|
-
case "focus":
|
|
1446
|
-
ce(gi ? "focusout" : "blur", Re);
|
|
1447
|
-
break;
|
|
1448
|
-
case "focusin":
|
|
1449
|
-
ce("focusout", Re);
|
|
1450
|
-
break;
|
|
1451
|
-
}
|
|
1452
|
-
});
|
|
1453
|
-
}
|
|
1454
|
-
function ze() {
|
|
1455
|
-
h.forEach(function(c) {
|
|
1456
|
-
var g = c.node, S = c.eventType, L = c.handler, C = c.options;
|
|
1457
|
-
g.removeEventListener(S, L, C);
|
|
1458
|
-
}), h = [];
|
|
1459
|
-
}
|
|
1460
|
-
function Le(c) {
|
|
1461
|
-
var g, S = !1;
|
|
1462
|
-
if (!(!i.state.isEnabled || Me(c) || u)) {
|
|
1463
|
-
var L = ((g = f) == null ? void 0 : g.type) === "focus";
|
|
1464
|
-
f = c, m = c.currentTarget, Q(), !i.state.isVisible && ci(c) && it.forEach(function(C) {
|
|
1465
|
-
return C(c);
|
|
1466
|
-
}), c.type === "click" && (i.props.trigger.indexOf("mouseenter") < 0 || l) && i.props.hideOnClick !== !1 && i.state.isVisible ? S = !0 : Ve(c), c.type === "click" && (l = !S), S && !L && ve(c);
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
function Ke(c) {
|
|
1470
|
-
var g = c.target, S = V().contains(g) || p.contains(g);
|
|
1471
|
-
if (!(c.type === "mousemove" && S)) {
|
|
1472
|
-
var L = fe().concat(p).map(function(C) {
|
|
1473
|
-
var W, z = C._tippy, Ee = (W = z.popperInstance) == null ? void 0 : W.state;
|
|
1474
|
-
return Ee ? {
|
|
1475
|
-
popperRect: C.getBoundingClientRect(),
|
|
1476
|
-
popperState: Ee,
|
|
1477
|
-
props: n
|
|
1478
|
-
} : null;
|
|
1479
|
-
}).filter(Boolean);
|
|
1480
|
-
di(L, c) && (pe(), ve(c));
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
function Ge(c) {
|
|
1484
|
-
var g = Me(c) || i.props.trigger.indexOf("click") >= 0 && l;
|
|
1485
|
-
if (!g) {
|
|
1486
|
-
if (i.props.interactive) {
|
|
1487
|
-
i.hideWithInteractivity(c);
|
|
1488
|
-
return;
|
|
1489
|
-
}
|
|
1490
|
-
ve(c);
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
function Re(c) {
|
|
1494
|
-
i.props.trigger.indexOf("focusin") < 0 && c.target !== V() || i.props.interactive && c.relatedTarget && p.contains(c.relatedTarget) || ve(c);
|
|
1495
|
-
}
|
|
1496
|
-
function Me(c) {
|
|
1497
|
-
return ee.isTouch ? j() !== c.type.indexOf("touch") >= 0 : !1;
|
|
1498
|
-
}
|
|
1499
|
-
function Ye() {
|
|
1500
|
-
Xe();
|
|
1501
|
-
var c = i.props, g = c.popperOptions, S = c.placement, L = c.offset, C = c.getReferenceClientRect, W = c.moveTransition, z = M() ? St(p).arrow : null, Ee = C ? {
|
|
1502
|
-
getBoundingClientRect: C,
|
|
1503
|
-
contextElement: C.contextElement || V()
|
|
1504
|
-
} : e, jt = {
|
|
1505
|
-
name: "$$tippy",
|
|
1506
|
-
enabled: !0,
|
|
1507
|
-
phase: "beforeWrite",
|
|
1508
|
-
requires: ["computeStyles"],
|
|
1509
|
-
fn: function(tt) {
|
|
1510
|
-
var Se = tt.state;
|
|
1511
|
-
if (M()) {
|
|
1512
|
-
var Hn = $(), ft = Hn.box;
|
|
1513
|
-
["placement", "reference-hidden", "escaped"].forEach(function(nt) {
|
|
1514
|
-
nt === "placement" ? ft.setAttribute("data-placement", Se.placement) : Se.attributes.popper["data-popper-" + nt] ? ft.setAttribute("data-" + nt, "") : ft.removeAttribute("data-" + nt);
|
|
1515
|
-
}), Se.attributes.popper = {};
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
}, he = [{
|
|
1519
|
-
name: "offset",
|
|
1520
|
-
options: {
|
|
1521
|
-
offset: L
|
|
1522
|
-
}
|
|
1523
|
-
}, {
|
|
1524
|
-
name: "preventOverflow",
|
|
1525
|
-
options: {
|
|
1526
|
-
padding: {
|
|
1527
|
-
top: 2,
|
|
1528
|
-
bottom: 2,
|
|
1529
|
-
left: 5,
|
|
1530
|
-
right: 5
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
}, {
|
|
1534
|
-
name: "flip",
|
|
1535
|
-
options: {
|
|
1536
|
-
padding: 5
|
|
1537
|
-
}
|
|
1538
|
-
}, {
|
|
1539
|
-
name: "computeStyles",
|
|
1540
|
-
options: {
|
|
1541
|
-
adaptive: !W
|
|
1542
|
-
}
|
|
1543
|
-
}, jt];
|
|
1544
|
-
M() && z && he.push({
|
|
1545
|
-
name: "arrow",
|
|
1546
|
-
options: {
|
|
1547
|
-
element: z,
|
|
1548
|
-
padding: 3
|
|
1549
|
-
}
|
|
1550
|
-
}), he.push.apply(he, (g == null ? void 0 : g.modifiers) || []), i.popperInstance = ei(Ee, p, Object.assign({}, g, {
|
|
1551
|
-
placement: S,
|
|
1552
|
-
onFirstUpdate: y,
|
|
1553
|
-
modifiers: he
|
|
1554
|
-
}));
|
|
1555
|
-
}
|
|
1556
|
-
function Xe() {
|
|
1557
|
-
i.popperInstance && (i.popperInstance.destroy(), i.popperInstance = null);
|
|
1558
|
-
}
|
|
1559
|
-
function ae() {
|
|
1560
|
-
var c = i.props.appendTo, g, S = V();
|
|
1561
|
-
i.props.interactive && c === Sn || c === "parent" ? g = S.parentNode : g = xn(c, [S]), g.contains(p) || g.appendChild(p), i.state.isMounted = !0, Ye(), process.env.NODE_ENV !== "production" && se(i.props.interactive && c === F.appendTo && S.nextElementSibling !== p, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
|
|
1562
|
-
|
|
1563
|
-
`, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
|
|
1564
|
-
|
|
1565
|
-
`, "Specifying `appendTo: document.body` silences this warning, but it", "assumes you are using a focus management solution to handle", "keyboard navigation.", `
|
|
1566
|
-
|
|
1567
|
-
`, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
|
|
1568
|
-
}
|
|
1569
|
-
function fe() {
|
|
1570
|
-
return st(p.querySelectorAll("[data-tippy-root]"));
|
|
1571
|
-
}
|
|
1572
|
-
function Ve(c) {
|
|
1573
|
-
i.clearDelayTimeouts(), c && I("onTrigger", [i, c]), X();
|
|
1574
|
-
var g = N(!0), S = R(), L = S[0], C = S[1];
|
|
1575
|
-
ee.isTouch && L === "hold" && C && (g = C), g ? r = setTimeout(function() {
|
|
1576
|
-
i.show();
|
|
1577
|
-
}, g) : i.show();
|
|
1578
|
-
}
|
|
1579
|
-
function ve(c) {
|
|
1580
|
-
if (i.clearDelayTimeouts(), I("onUntrigger", [i, c]), !i.state.isVisible) {
|
|
1581
|
-
ie();
|
|
1582
|
-
return;
|
|
1583
|
-
}
|
|
1584
|
-
if (!(i.props.trigger.indexOf("mouseenter") >= 0 && i.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(c.type) >= 0 && l)) {
|
|
1585
|
-
var g = N(!1);
|
|
1586
|
-
g ? o = setTimeout(function() {
|
|
1587
|
-
i.state.isVisible && i.hide();
|
|
1588
|
-
}, g) : s = requestAnimationFrame(function() {
|
|
1589
|
-
i.hide();
|
|
1590
|
-
});
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
function je() {
|
|
1594
|
-
i.state.isEnabled = !0;
|
|
1595
|
-
}
|
|
1596
|
-
function Je() {
|
|
1597
|
-
i.hide(), i.state.isEnabled = !1;
|
|
1598
|
-
}
|
|
1599
|
-
function Qe() {
|
|
1600
|
-
clearTimeout(r), clearTimeout(o), cancelAnimationFrame(s);
|
|
1601
|
-
}
|
|
1602
|
-
function Ze(c) {
|
|
1603
|
-
if (process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("setProps")), !i.state.isDestroyed) {
|
|
1604
|
-
I("onBeforeUpdate", [i, c]), ze();
|
|
1605
|
-
var g = i.props, S = Qt(e, Object.assign({}, g, Kt(c), {
|
|
1606
|
-
ignoreAttributes: !0
|
|
1607
|
-
}));
|
|
1608
|
-
i.props = S, Oe(), g.interactiveDebounce !== S.interactiveDebounce && (pe(), b = qt(Ke, S.interactiveDebounce)), g.triggerTarget && !S.triggerTarget ? Te(g.triggerTarget).forEach(function(L) {
|
|
1609
|
-
L.removeAttribute("aria-expanded");
|
|
1610
|
-
}) : S.triggerTarget && e.removeAttribute("aria-expanded"), Q(), P(), x && x(g, S), i.popperInstance && (Ye(), fe().forEach(function(L) {
|
|
1611
|
-
requestAnimationFrame(L._tippy.popperInstance.forceUpdate);
|
|
1612
|
-
})), I("onAfterUpdate", [i, c]);
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
function et(c) {
|
|
1616
|
-
i.setProps({
|
|
1617
|
-
content: c
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
function Vn() {
|
|
1621
|
-
process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("show"));
|
|
1622
|
-
var c = i.state.isVisible, g = i.state.isDestroyed, S = !i.state.isEnabled, L = ee.isTouch && !i.props.touch, C = lt(i.props.duration, 0, F.duration);
|
|
1623
|
-
if (!(c || g || S || L) && !V().hasAttribute("disabled") && (I("onShow", [i], !1), i.props.onShow(i) !== !1)) {
|
|
1624
|
-
if (i.state.isVisible = !0, M() && (p.style.visibility = "visible"), P(), X(), i.state.isMounted || (p.style.transition = "none"), M()) {
|
|
1625
|
-
var W = $(), z = W.box, Ee = W.content;
|
|
1626
|
-
pt([z, Ee], 0);
|
|
1627
|
-
}
|
|
1628
|
-
y = function() {
|
|
1629
|
-
var he;
|
|
1630
|
-
if (!(!i.state.isVisible || d)) {
|
|
1631
|
-
if (d = !0, p.offsetHeight, p.style.transition = i.props.moveTransition, M() && i.props.animation) {
|
|
1632
|
-
var ct = $(), tt = ct.box, Se = ct.content;
|
|
1633
|
-
pt([tt, Se], C), Gt([tt, Se], "visible");
|
|
1634
|
-
}
|
|
1635
|
-
J(), Q(), zt(vt, i), (he = i.popperInstance) == null || he.forceUpdate(), I("onMount", [i]), i.props.animation && M() && oe(C, function() {
|
|
1636
|
-
i.state.isShown = !0, I("onShown", [i]);
|
|
1637
|
-
});
|
|
1638
|
-
}
|
|
1639
|
-
}, ae();
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
function jn() {
|
|
1643
|
-
process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("hide"));
|
|
1644
|
-
var c = !i.state.isVisible, g = i.state.isDestroyed, S = !i.state.isEnabled, L = lt(i.props.duration, 1, F.duration);
|
|
1645
|
-
if (!(c || g || S) && (I("onHide", [i], !1), i.props.onHide(i) !== !1)) {
|
|
1646
|
-
if (i.state.isVisible = !1, i.state.isShown = !1, d = !1, l = !1, M() && (p.style.visibility = "hidden"), pe(), ie(), P(!0), M()) {
|
|
1647
|
-
var C = $(), W = C.box, z = C.content;
|
|
1648
|
-
i.props.animation && (pt([W, z], L), Gt([W, z], "hidden"));
|
|
1649
|
-
}
|
|
1650
|
-
J(), Q(), i.props.animation ? M() && be(L, i.unmount) : i.unmount();
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
function Nn(c) {
|
|
1654
|
-
process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("hideWithInteractivity")), H().addEventListener("mousemove", b), zt(it, b), b(c);
|
|
1655
|
-
}
|
|
1656
|
-
function Pn() {
|
|
1657
|
-
process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("unmount")), i.state.isVisible && i.hide(), i.state.isMounted && (Xe(), fe().forEach(function(c) {
|
|
1658
|
-
c._tippy.unmount();
|
|
1659
|
-
}), p.parentNode && p.parentNode.removeChild(p), vt = vt.filter(function(c) {
|
|
1660
|
-
return c !== i;
|
|
1661
|
-
}), i.state.isMounted = !1, I("onHidden", [i]));
|
|
1662
|
-
}
|
|
1663
|
-
function Bn() {
|
|
1664
|
-
process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("destroy")), !i.state.isDestroyed && (i.clearDelayTimeouts(), i.unmount(), ze(), delete e._tippy, i.state.isDestroyed = !0, I("onDestroy", [i]));
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
function qe(e, t) {
|
|
1668
|
-
t === void 0 && (t = {});
|
|
1669
|
-
var n = F.plugins.concat(t.plugins || []);
|
|
1670
|
-
process.env.NODE_ENV !== "production" && (Oi(e), _n(t, n)), mi();
|
|
1671
|
-
var r = Object.assign({}, t, {
|
|
1672
|
-
plugins: n
|
|
1673
|
-
}), o = li(e);
|
|
1674
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1675
|
-
var s = We(r.content), l = o.length > 1;
|
|
1676
|
-
se(s && l, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
|
|
1677
|
-
|
|
1678
|
-
`, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
|
|
1679
|
-
|
|
1680
|
-
`, `1) content: element.innerHTML
|
|
1681
|
-
`, "2) content: () => element.cloneNode(true)"].join(" "));
|
|
1682
|
-
}
|
|
1683
|
-
var u = o.reduce(function(a, d) {
|
|
1684
|
-
var f = d && Ci(d, r);
|
|
1685
|
-
return f && a.push(f), a;
|
|
1686
|
-
}, []);
|
|
1687
|
-
return We(e) ? u[0] : u;
|
|
1688
|
-
}
|
|
1689
|
-
qe.defaultProps = F;
|
|
1690
|
-
qe.setDefaultProps = xi;
|
|
1691
|
-
qe.currentInput = ee;
|
|
1692
|
-
Object.assign({}, pn, {
|
|
1693
|
-
effect: function(t) {
|
|
1694
|
-
var n = t.state, r = {
|
|
1695
|
-
popper: {
|
|
1696
|
-
position: n.options.strategy,
|
|
1697
|
-
left: "0",
|
|
1698
|
-
top: "0",
|
|
1699
|
-
margin: "0"
|
|
1700
|
-
},
|
|
1701
|
-
arrow: {
|
|
1702
|
-
position: "absolute"
|
|
1703
|
-
},
|
|
1704
|
-
reference: {}
|
|
1705
|
-
};
|
|
1706
|
-
Object.assign(n.elements.popper.style, r.popper), n.styles = r, n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
|
|
1707
|
-
}
|
|
1708
|
-
});
|
|
1709
|
-
qe.setDefaultProps({
|
|
1710
|
-
render: Ln
|
|
1711
|
-
});
|
|
1712
|
-
class _i {
|
|
1713
|
-
constructor({ editor: t, element: n, view: r, tippyOptions: o = {}, updateDelay: s = 250, shouldShow: l }) {
|
|
1714
|
-
this.preventHide = !1, this.shouldShow = ({ view: u, state: a, from: d, to: f }) => {
|
|
1715
|
-
const { doc: v, selection: y } = a, { empty: h } = y, b = !v.textBetween(d, f).length && Wn(a.selection), m = this.element.contains(document.activeElement);
|
|
1716
|
-
return !(!(u.hasFocus() || m) || h || b || !this.editor.isEditable);
|
|
1717
|
-
}, this.mousedownHandler = () => {
|
|
1718
|
-
this.preventHide = !0;
|
|
1719
|
-
}, this.dragstartHandler = () => {
|
|
1720
|
-
this.hide();
|
|
1721
|
-
}, this.focusHandler = () => {
|
|
1722
|
-
setTimeout(() => this.update(this.editor.view));
|
|
1723
|
-
}, this.blurHandler = ({ event: u }) => {
|
|
1724
|
-
var a;
|
|
1725
|
-
if (this.preventHide) {
|
|
1726
|
-
this.preventHide = !1;
|
|
1727
|
-
return;
|
|
1728
|
-
}
|
|
1729
|
-
u != null && u.relatedTarget && (!((a = this.element.parentNode) === null || a === void 0) && a.contains(u.relatedTarget)) || (u == null ? void 0 : u.relatedTarget) !== this.editor.view.dom && this.hide();
|
|
1730
|
-
}, this.tippyBlurHandler = (u) => {
|
|
1731
|
-
this.blurHandler({ event: u });
|
|
1732
|
-
}, this.handleDebouncedUpdate = (u, a) => {
|
|
1733
|
-
const d = !(a != null && a.selection.eq(u.state.selection)), f = !(a != null && a.doc.eq(u.state.doc));
|
|
1734
|
-
!d && !f || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
|
|
1735
|
-
this.updateHandler(u, d, f, a);
|
|
1736
|
-
}, this.updateDelay));
|
|
1737
|
-
}, this.updateHandler = (u, a, d, f) => {
|
|
1738
|
-
var v, y, h;
|
|
1739
|
-
const { state: b, composing: m } = u, { selection: w } = b;
|
|
1740
|
-
if (m || !a && !d)
|
|
1741
|
-
return;
|
|
1742
|
-
this.createTooltip();
|
|
1743
|
-
const { ranges: D } = w, O = Math.min(...D.map((p) => p.$from.pos)), i = Math.max(...D.map((p) => p.$to.pos));
|
|
1744
|
-
if (!((v = this.shouldShow) === null || v === void 0 ? void 0 : v.call(this, {
|
|
1745
|
-
editor: this.editor,
|
|
1746
|
-
element: this.element,
|
|
1747
|
-
view: u,
|
|
1748
|
-
state: b,
|
|
1749
|
-
oldState: f,
|
|
1750
|
-
from: O,
|
|
1751
|
-
to: i
|
|
1752
|
-
}))) {
|
|
1753
|
-
this.hide();
|
|
1754
|
-
return;
|
|
1755
|
-
}
|
|
1756
|
-
(y = this.tippy) === null || y === void 0 || y.setProps({
|
|
1757
|
-
getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
|
|
1758
|
-
if (kn(b.selection)) {
|
|
1759
|
-
let p = u.nodeDOM(O);
|
|
1760
|
-
if (p) {
|
|
1761
|
-
const x = p.dataset.nodeViewWrapper ? p : p.querySelector("[data-node-view-wrapper]");
|
|
1762
|
-
if (x && (p = x.firstChild), p)
|
|
1763
|
-
return p.getBoundingClientRect();
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
return Un(u, O, i);
|
|
1767
|
-
})
|
|
1768
|
-
}), this.show();
|
|
1769
|
-
}, this.editor = t, this.element = n, this.view = r, this.updateDelay = s, l && (this.shouldShow = l), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = o, this.element.remove(), this.element.style.visibility = "visible";
|
|
1770
|
-
}
|
|
1771
|
-
createTooltip() {
|
|
1772
|
-
const { element: t } = this.editor.options, n = !!t.parentElement;
|
|
1773
|
-
this.element.tabIndex = 0, !(this.tippy || !n) && (this.tippy = qe(t, {
|
|
1774
|
-
duration: 0,
|
|
1775
|
-
getReferenceClientRect: null,
|
|
1776
|
-
content: this.element,
|
|
1777
|
-
interactive: !0,
|
|
1778
|
-
trigger: "manual",
|
|
1779
|
-
placement: "top",
|
|
1780
|
-
hideOnClick: "toggle",
|
|
1781
|
-
...this.tippyOptions
|
|
1782
|
-
}), this.tippy.popper.firstChild && this.tippy.popper.firstChild.addEventListener("blur", this.tippyBlurHandler));
|
|
1783
|
-
}
|
|
1784
|
-
update(t, n) {
|
|
1785
|
-
const { state: r } = t, o = r.selection.from !== r.selection.to;
|
|
1786
|
-
if (this.updateDelay > 0 && o) {
|
|
1787
|
-
this.handleDebouncedUpdate(t, n);
|
|
1788
|
-
return;
|
|
1789
|
-
}
|
|
1790
|
-
const s = !(n != null && n.selection.eq(t.state.selection)), l = !(n != null && n.doc.eq(t.state.doc));
|
|
1791
|
-
this.updateHandler(t, s, l, n);
|
|
1792
|
-
}
|
|
1793
|
-
show() {
|
|
1794
|
-
var t;
|
|
1795
|
-
(t = this.tippy) === null || t === void 0 || t.show();
|
|
1796
|
-
}
|
|
1797
|
-
hide() {
|
|
1798
|
-
var t;
|
|
1799
|
-
(t = this.tippy) === null || t === void 0 || t.hide();
|
|
1800
|
-
}
|
|
1801
|
-
destroy() {
|
|
1802
|
-
var t, n;
|
|
1803
|
-
!((t = this.tippy) === null || t === void 0) && t.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
const Rn = (e) => new In({
|
|
1807
|
-
key: typeof e.pluginKey == "string" ? new $n(e.pluginKey) : e.pluginKey,
|
|
1808
|
-
view: (t) => new _i({ view: t, ...e })
|
|
1809
|
-
});
|
|
1810
|
-
Fn.create({
|
|
1811
|
-
name: "bubbleMenu",
|
|
1812
|
-
addOptions() {
|
|
1813
|
-
return {
|
|
1814
|
-
element: null,
|
|
1815
|
-
tippyOptions: {},
|
|
1816
|
-
pluginKey: "bubbleMenu",
|
|
1817
|
-
updateDelay: void 0,
|
|
1818
|
-
shouldShow: null
|
|
1819
|
-
};
|
|
1820
|
-
},
|
|
1821
|
-
addProseMirrorPlugins() {
|
|
1822
|
-
return this.options.element ? [
|
|
1823
|
-
Rn({
|
|
1824
|
-
pluginKey: this.options.pluginKey,
|
|
1825
|
-
editor: this.editor,
|
|
1826
|
-
element: this.options.element,
|
|
1827
|
-
tippyOptions: this.options.tippyOptions,
|
|
1828
|
-
updateDelay: this.options.updateDelay,
|
|
1829
|
-
shouldShow: this.options.shouldShow
|
|
1830
|
-
})
|
|
1831
|
-
] : [];
|
|
1832
|
-
}
|
|
1833
|
-
});
|
|
1834
|
-
var xt = { exports: {} }, ht = {};
|
|
1835
|
-
/**
|
|
1836
|
-
* @license React
|
|
1837
|
-
* use-sync-external-store-shim.production.min.js
|
|
1838
|
-
*
|
|
1839
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1840
|
-
*
|
|
1841
|
-
* This source code is licensed under the MIT license found in the
|
|
1842
|
-
* LICENSE file in the root directory of this source tree.
|
|
1843
|
-
*/
|
|
1844
|
-
var tn;
|
|
1845
|
-
function Li() {
|
|
1846
|
-
if (tn) return ht;
|
|
1847
|
-
tn = 1;
|
|
1848
|
-
var e = B;
|
|
1849
|
-
function t(v, y) {
|
|
1850
|
-
return v === y && (v !== 0 || 1 / v === 1 / y) || v !== v && y !== y;
|
|
1851
|
-
}
|
|
1852
|
-
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, s = e.useLayoutEffect, l = e.useDebugValue;
|
|
1853
|
-
function u(v, y) {
|
|
1854
|
-
var h = y(), b = r({ inst: { value: h, getSnapshot: y } }), m = b[0].inst, w = b[1];
|
|
1855
|
-
return s(function() {
|
|
1856
|
-
m.value = h, m.getSnapshot = y, a(m) && w({ inst: m });
|
|
1857
|
-
}, [v, h, y]), o(function() {
|
|
1858
|
-
return a(m) && w({ inst: m }), v(function() {
|
|
1859
|
-
a(m) && w({ inst: m });
|
|
1860
|
-
});
|
|
1861
|
-
}, [v]), l(h), h;
|
|
1862
|
-
}
|
|
1863
|
-
function a(v) {
|
|
1864
|
-
var y = v.getSnapshot;
|
|
1865
|
-
v = v.value;
|
|
1866
|
-
try {
|
|
1867
|
-
var h = y();
|
|
1868
|
-
return !n(v, h);
|
|
1869
|
-
} catch {
|
|
1870
|
-
return !0;
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
function d(v, y) {
|
|
1874
|
-
return y();
|
|
1875
|
-
}
|
|
1876
|
-
var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : u;
|
|
1877
|
-
return ht.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, ht;
|
|
1878
|
-
}
|
|
1879
|
-
var mt = {};
|
|
1880
|
-
/**
|
|
1881
|
-
* @license React
|
|
1882
|
-
* use-sync-external-store-shim.development.js
|
|
1883
|
-
*
|
|
1884
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1885
|
-
*
|
|
1886
|
-
* This source code is licensed under the MIT license found in the
|
|
1887
|
-
* LICENSE file in the root directory of this source tree.
|
|
1888
|
-
*/
|
|
1889
|
-
var nn;
|
|
1890
|
-
function Ri() {
|
|
1891
|
-
return nn || (nn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1892
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1893
|
-
var e = B, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
1894
|
-
function n(O) {
|
|
1895
|
-
{
|
|
1896
|
-
for (var i = arguments.length, E = new Array(i > 1 ? i - 1 : 0), p = 1; p < i; p++)
|
|
1897
|
-
E[p - 1] = arguments[p];
|
|
1898
|
-
r("error", O, E);
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
function r(O, i, E) {
|
|
1902
|
-
{
|
|
1903
|
-
var p = t.ReactDebugCurrentFrame, x = p.getStackAddendum();
|
|
1904
|
-
x !== "" && (i += "%s", E = E.concat([x]));
|
|
1905
|
-
var _ = E.map(function(A) {
|
|
1906
|
-
return String(A);
|
|
1907
|
-
});
|
|
1908
|
-
_.unshift("Warning: " + i), Function.prototype.apply.call(console[O], console, _);
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
function o(O, i) {
|
|
1912
|
-
return O === i && (O !== 0 || 1 / O === 1 / i) || O !== O && i !== i;
|
|
1913
|
-
}
|
|
1914
|
-
var s = typeof Object.is == "function" ? Object.is : o, l = e.useState, u = e.useEffect, a = e.useLayoutEffect, d = e.useDebugValue, f = !1, v = !1;
|
|
1915
|
-
function y(O, i, E) {
|
|
1916
|
-
f || e.startTransition !== void 0 && (f = !0, n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
1917
|
-
var p = i();
|
|
1918
|
-
if (!v) {
|
|
1919
|
-
var x = i();
|
|
1920
|
-
s(p, x) || (n("The result of getSnapshot should be cached to avoid an infinite loop"), v = !0);
|
|
1921
|
-
}
|
|
1922
|
-
var _ = l({
|
|
1923
|
-
inst: {
|
|
1924
|
-
value: p,
|
|
1925
|
-
getSnapshot: i
|
|
1926
|
-
}
|
|
1927
|
-
}), A = _[0].inst, R = _[1];
|
|
1928
|
-
return a(function() {
|
|
1929
|
-
A.value = p, A.getSnapshot = i, h(A) && R({
|
|
1930
|
-
inst: A
|
|
1931
|
-
});
|
|
1932
|
-
}, [O, p, i]), u(function() {
|
|
1933
|
-
h(A) && R({
|
|
1934
|
-
inst: A
|
|
1935
|
-
});
|
|
1936
|
-
var j = function() {
|
|
1937
|
-
h(A) && R({
|
|
1938
|
-
inst: A
|
|
1939
|
-
});
|
|
1940
|
-
};
|
|
1941
|
-
return O(j);
|
|
1942
|
-
}, [O]), d(p), p;
|
|
1943
|
-
}
|
|
1944
|
-
function h(O) {
|
|
1945
|
-
var i = O.getSnapshot, E = O.value;
|
|
1946
|
-
try {
|
|
1947
|
-
var p = i();
|
|
1948
|
-
return !s(E, p);
|
|
1949
|
-
} catch {
|
|
1950
|
-
return !0;
|
|
1951
|
-
}
|
|
1952
|
-
}
|
|
1953
|
-
function b(O, i, E) {
|
|
1954
|
-
return i();
|
|
1955
|
-
}
|
|
1956
|
-
var m = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", w = !m, T = w ? b : y, D = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : T;
|
|
1957
|
-
mt.useSyncExternalStore = D, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1958
|
-
}()), mt;
|
|
1959
|
-
}
|
|
1960
|
-
process.env.NODE_ENV === "production" ? xt.exports = Li() : xt.exports = Ri();
|
|
1961
|
-
var Vt = xt.exports;
|
|
1962
|
-
const Mi = (...e) => (t) => {
|
|
1963
|
-
e.forEach((n) => {
|
|
1964
|
-
typeof n == "function" ? n(t) : n && (n.current = t);
|
|
1965
|
-
});
|
|
1966
|
-
}, Vi = ({ contentComponent: e }) => {
|
|
1967
|
-
const t = Vt.useSyncExternalStore(e.subscribe, e.getSnapshot, e.getServerSnapshot);
|
|
1968
|
-
return B.createElement(B.Fragment, null, Object.values(t));
|
|
1969
|
-
};
|
|
1970
|
-
function ji() {
|
|
1971
|
-
const e = /* @__PURE__ */ new Set();
|
|
1972
|
-
let t = {};
|
|
1973
|
-
return {
|
|
1974
|
-
/**
|
|
1975
|
-
* Subscribe to the editor instance's changes.
|
|
1976
|
-
*/
|
|
1977
|
-
subscribe(n) {
|
|
1978
|
-
return e.add(n), () => {
|
|
1979
|
-
e.delete(n);
|
|
1980
|
-
};
|
|
1981
|
-
},
|
|
1982
|
-
getSnapshot() {
|
|
1983
|
-
return t;
|
|
1984
|
-
},
|
|
1985
|
-
getServerSnapshot() {
|
|
1986
|
-
return t;
|
|
1987
|
-
},
|
|
1988
|
-
/**
|
|
1989
|
-
* Adds a new NodeView Renderer to the editor.
|
|
1990
|
-
*/
|
|
1991
|
-
setRenderer(n, r) {
|
|
1992
|
-
t = {
|
|
1993
|
-
...t,
|
|
1994
|
-
[n]: Gn.createPortal(r.reactElement, r.element, n)
|
|
1995
|
-
}, e.forEach((o) => o());
|
|
1996
|
-
},
|
|
1997
|
-
/**
|
|
1998
|
-
* Removes a NodeView Renderer from the editor.
|
|
1999
|
-
*/
|
|
2000
|
-
removeRenderer(n) {
|
|
2001
|
-
const r = { ...t };
|
|
2002
|
-
delete r[n], t = r, e.forEach((o) => o());
|
|
2003
|
-
}
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
class Ni extends B.Component {
|
|
2007
|
-
constructor(t) {
|
|
2008
|
-
var n;
|
|
2009
|
-
super(t), this.editorContentRef = B.createRef(), this.initialized = !1, this.state = {
|
|
2010
|
-
hasContentComponentInitialized: !!(!((n = t.editor) === null || n === void 0) && n.contentComponent)
|
|
2011
|
-
};
|
|
2012
|
-
}
|
|
2013
|
-
componentDidMount() {
|
|
2014
|
-
this.init();
|
|
2015
|
-
}
|
|
2016
|
-
componentDidUpdate() {
|
|
2017
|
-
this.init();
|
|
2018
|
-
}
|
|
2019
|
-
init() {
|
|
2020
|
-
const t = this.props.editor;
|
|
2021
|
-
if (t && !t.isDestroyed && t.options.element) {
|
|
2022
|
-
if (t.contentComponent)
|
|
2023
|
-
return;
|
|
2024
|
-
const n = this.editorContentRef.current;
|
|
2025
|
-
n.append(...t.options.element.childNodes), t.setOptions({
|
|
2026
|
-
element: n
|
|
2027
|
-
}), t.contentComponent = ji(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = t.contentComponent.subscribe(() => {
|
|
2028
|
-
this.setState((r) => r.hasContentComponentInitialized ? r : {
|
|
2029
|
-
hasContentComponentInitialized: !0
|
|
2030
|
-
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
|
|
2031
|
-
})), t.createNodeViews(), this.initialized = !0;
|
|
2032
|
-
}
|
|
2033
|
-
}
|
|
2034
|
-
componentWillUnmount() {
|
|
2035
|
-
const t = this.props.editor;
|
|
2036
|
-
if (!t || (this.initialized = !1, t.isDestroyed || t.view.setProps({
|
|
2037
|
-
nodeViews: {}
|
|
2038
|
-
}), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent(), t.contentComponent = null, !t.options.element.firstChild))
|
|
2039
|
-
return;
|
|
2040
|
-
const n = document.createElement("div");
|
|
2041
|
-
n.append(...t.options.element.childNodes), t.setOptions({
|
|
2042
|
-
element: n
|
|
2043
|
-
});
|
|
2044
|
-
}
|
|
2045
|
-
render() {
|
|
2046
|
-
const { editor: t, innerRef: n, ...r } = this.props;
|
|
2047
|
-
return B.createElement(
|
|
2048
|
-
B.Fragment,
|
|
2049
|
-
null,
|
|
2050
|
-
B.createElement("div", { ref: Mi(n, this.editorContentRef), ...r }),
|
|
2051
|
-
(t == null ? void 0 : t.contentComponent) && B.createElement(Vi, { contentComponent: t.contentComponent })
|
|
2052
|
-
);
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
const Pi = qn((e, t) => {
|
|
2056
|
-
const n = B.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
|
|
2057
|
-
return B.createElement(Ni, {
|
|
2058
|
-
key: n,
|
|
2059
|
-
innerRef: t,
|
|
2060
|
-
...e
|
|
2061
|
-
});
|
|
2062
|
-
}), Gi = B.memo(Pi);
|
|
2063
|
-
var yt = {};
|
|
2064
|
-
/**
|
|
2065
|
-
* @license React
|
|
2066
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
2067
|
-
*
|
|
2068
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2069
|
-
*
|
|
2070
|
-
* This source code is licensed under the MIT license found in the
|
|
2071
|
-
* LICENSE file in the root directory of this source tree.
|
|
2072
|
-
*/
|
|
2073
|
-
var rn;
|
|
2074
|
-
function Bi() {
|
|
2075
|
-
if (rn) return yt;
|
|
2076
|
-
rn = 1;
|
|
2077
|
-
var e = B, t = Vt;
|
|
2078
|
-
function n(d, f) {
|
|
2079
|
-
return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
|
|
2080
|
-
}
|
|
2081
|
-
var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, l = e.useEffect, u = e.useMemo, a = e.useDebugValue;
|
|
2082
|
-
return yt.useSyncExternalStoreWithSelector = function(d, f, v, y, h) {
|
|
2083
|
-
var b = s(null);
|
|
2084
|
-
if (b.current === null) {
|
|
2085
|
-
var m = { hasValue: !1, value: null };
|
|
2086
|
-
b.current = m;
|
|
2087
|
-
} else m = b.current;
|
|
2088
|
-
b = u(function() {
|
|
2089
|
-
function T(p) {
|
|
2090
|
-
if (!D) {
|
|
2091
|
-
if (D = !0, O = p, p = y(p), h !== void 0 && m.hasValue) {
|
|
2092
|
-
var x = m.value;
|
|
2093
|
-
if (h(x, p)) return i = x;
|
|
2094
|
-
}
|
|
2095
|
-
return i = p;
|
|
2096
|
-
}
|
|
2097
|
-
if (x = i, r(O, p)) return x;
|
|
2098
|
-
var _ = y(p);
|
|
2099
|
-
return h !== void 0 && h(x, _) ? x : (O = p, i = _);
|
|
2100
|
-
}
|
|
2101
|
-
var D = !1, O, i, E = v === void 0 ? null : v;
|
|
2102
|
-
return [function() {
|
|
2103
|
-
return T(f());
|
|
2104
|
-
}, E === null ? void 0 : function() {
|
|
2105
|
-
return T(E());
|
|
2106
|
-
}];
|
|
2107
|
-
}, [f, v, y, h]);
|
|
2108
|
-
var w = o(d, b[0], b[1]);
|
|
2109
|
-
return l(function() {
|
|
2110
|
-
m.hasValue = !0, m.value = w;
|
|
2111
|
-
}, [w]), a(w), w;
|
|
2112
|
-
}, yt;
|
|
2113
|
-
}
|
|
2114
|
-
var gt = {};
|
|
2115
|
-
/**
|
|
2116
|
-
* @license React
|
|
2117
|
-
* use-sync-external-store-shim/with-selector.development.js
|
|
2118
|
-
*
|
|
2119
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2120
|
-
*
|
|
2121
|
-
* This source code is licensed under the MIT license found in the
|
|
2122
|
-
* LICENSE file in the root directory of this source tree.
|
|
2123
|
-
*/
|
|
2124
|
-
var on;
|
|
2125
|
-
function Hi() {
|
|
2126
|
-
return on || (on = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2127
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
2128
|
-
var e = B, t = Vt;
|
|
2129
|
-
function n(f, v) {
|
|
2130
|
-
return f === v && (f !== 0 || 1 / f === 1 / v) || f !== f && v !== v;
|
|
2131
|
-
}
|
|
2132
|
-
var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, l = e.useEffect, u = e.useMemo, a = e.useDebugValue;
|
|
2133
|
-
function d(f, v, y, h, b) {
|
|
2134
|
-
var m = s(null), w;
|
|
2135
|
-
m.current === null ? (w = {
|
|
2136
|
-
hasValue: !1,
|
|
2137
|
-
value: null
|
|
2138
|
-
}, m.current = w) : w = m.current;
|
|
2139
|
-
var T = u(function() {
|
|
2140
|
-
var E = !1, p, x, _ = function(M) {
|
|
2141
|
-
if (!E) {
|
|
2142
|
-
E = !0, p = M;
|
|
2143
|
-
var V = h(M);
|
|
2144
|
-
if (b !== void 0 && w.hasValue) {
|
|
2145
|
-
var H = w.value;
|
|
2146
|
-
if (b(H, V))
|
|
2147
|
-
return x = H, H;
|
|
2148
|
-
}
|
|
2149
|
-
return x = V, V;
|
|
2150
|
-
}
|
|
2151
|
-
var $ = p, N = x;
|
|
2152
|
-
if (r($, M))
|
|
2153
|
-
return N;
|
|
2154
|
-
var P = h(M);
|
|
2155
|
-
return b !== void 0 && b(N, P) ? N : (p = M, x = P, P);
|
|
2156
|
-
}, A = y === void 0 ? null : y, R = function() {
|
|
2157
|
-
return _(v());
|
|
2158
|
-
}, j = A === null ? void 0 : function() {
|
|
2159
|
-
return _(A());
|
|
2160
|
-
};
|
|
2161
|
-
return [R, j];
|
|
2162
|
-
}, [v, y, h, b]), D = T[0], O = T[1], i = o(f, D, O);
|
|
2163
|
-
return l(function() {
|
|
2164
|
-
w.hasValue = !0, w.value = i;
|
|
2165
|
-
}, [i]), a(i), i;
|
|
2166
|
-
}
|
|
2167
|
-
gt.useSyncExternalStoreWithSelector = d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2168
|
-
}()), gt;
|
|
2169
|
-
}
|
|
2170
|
-
process.env.NODE_ENV === "production" ? Bi() : Hi();
|
|
2171
|
-
process.env.NODE_ENV;
|
|
2172
|
-
const Mn = cn({
|
|
2173
|
-
editor: null
|
|
2174
|
-
});
|
|
2175
|
-
Mn.Consumer;
|
|
2176
|
-
const Ii = () => un(Mn), Yi = (e) => {
|
|
2177
|
-
const [t, n] = zn(null), { editor: r } = Ii();
|
|
2178
|
-
return Kn(() => {
|
|
2179
|
-
var o;
|
|
2180
|
-
if (!t || !((o = e.editor) === null || o === void 0) && o.isDestroyed || r != null && r.isDestroyed)
|
|
2181
|
-
return;
|
|
2182
|
-
const { pluginKey: s = "bubbleMenu", editor: l, tippyOptions: u = {}, updateDelay: a, shouldShow: d = null } = e, f = l || r;
|
|
2183
|
-
if (!f) {
|
|
2184
|
-
console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");
|
|
2185
|
-
return;
|
|
2186
|
-
}
|
|
2187
|
-
const v = Rn({
|
|
2188
|
-
updateDelay: a,
|
|
2189
|
-
editor: f,
|
|
2190
|
-
element: t,
|
|
2191
|
-
pluginKey: s,
|
|
2192
|
-
shouldShow: d,
|
|
2193
|
-
tippyOptions: u
|
|
2194
|
-
});
|
|
2195
|
-
return f.registerPlugin(v), () => {
|
|
2196
|
-
f.unregisterPlugin(s);
|
|
2197
|
-
};
|
|
2198
|
-
}, [e.editor, r, t]), B.createElement("div", { ref: n, className: e.className, style: { visibility: "hidden" } }, e.children);
|
|
2199
|
-
}, $i = cn({
|
|
2200
|
-
onDragStart: void 0
|
|
2201
|
-
}), Wi = () => un($i);
|
|
2202
|
-
B.forwardRef((e, t) => {
|
|
2203
|
-
const { onDragStart: n } = Wi(), r = e.as || "div";
|
|
2204
|
-
return (
|
|
2205
|
-
// @ts-ignore
|
|
2206
|
-
B.createElement(r, { ...e, ref: t, "data-node-view-wrapper": "", onDragStart: n, style: {
|
|
2207
|
-
whiteSpace: "normal",
|
|
2208
|
-
...e.style
|
|
2209
|
-
} })
|
|
2210
|
-
);
|
|
2211
|
-
});
|
|
2212
|
-
function an(e) {
|
|
2213
|
-
return !!(typeof e == "function" && e.prototype && e.prototype.isReactComponent);
|
|
2214
|
-
}
|
|
2215
|
-
function sn(e) {
|
|
2216
|
-
return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.forward_ref)" || e.$$typeof.description === "react.forward_ref"));
|
|
2217
|
-
}
|
|
2218
|
-
function ki(e) {
|
|
2219
|
-
return !!(typeof e == "object" && e.$$typeof && (e.$$typeof.toString() === "Symbol(react.memo)" || e.$$typeof.description === "react.memo"));
|
|
2220
|
-
}
|
|
2221
|
-
function Ui(e) {
|
|
2222
|
-
if (an(e) || sn(e))
|
|
2223
|
-
return !0;
|
|
2224
|
-
if (ki(e)) {
|
|
2225
|
-
const t = e.type;
|
|
2226
|
-
if (t)
|
|
2227
|
-
return an(t) || sn(t);
|
|
2228
|
-
}
|
|
2229
|
-
return !1;
|
|
2230
|
-
}
|
|
2231
|
-
function Fi() {
|
|
2232
|
-
try {
|
|
2233
|
-
if (Nt)
|
|
2234
|
-
return parseInt(Nt.split(".")[0], 10) >= 19;
|
|
2235
|
-
} catch {
|
|
2236
|
-
}
|
|
2237
|
-
return !1;
|
|
2238
|
-
}
|
|
2239
|
-
class Xi {
|
|
2240
|
-
/**
|
|
2241
|
-
* Immediately creates element and renders the provided React component.
|
|
2242
|
-
*/
|
|
2243
|
-
constructor(t, { editor: n, props: r = {}, as: o = "div", className: s = "" }) {
|
|
2244
|
-
this.ref = null, this.id = Math.floor(Math.random() * 4294967295).toString(), this.component = t, this.editor = n, this.props = r, this.element = document.createElement(o), this.element.classList.add("react-renderer"), s && this.element.classList.add(...s.split(" ")), this.editor.isInitialized ? Yn(() => {
|
|
2245
|
-
this.render();
|
|
2246
|
-
}) : queueMicrotask(() => {
|
|
2247
|
-
this.render();
|
|
2248
|
-
});
|
|
2249
|
-
}
|
|
2250
|
-
/**
|
|
2251
|
-
* Render the React component.
|
|
2252
|
-
*/
|
|
2253
|
-
render() {
|
|
2254
|
-
var t;
|
|
2255
|
-
const n = this.component, r = this.props, o = this.editor, s = Fi(), l = Ui(n), u = { ...r };
|
|
2256
|
-
u.ref && !(s || l) && delete u.ref, !u.ref && (s || l) && (u.ref = (a) => {
|
|
2257
|
-
this.ref = a;
|
|
2258
|
-
}), this.reactElement = B.createElement(n, { ...u }), (t = o == null ? void 0 : o.contentComponent) === null || t === void 0 || t.setRenderer(this.id, this);
|
|
2259
|
-
}
|
|
2260
|
-
/**
|
|
2261
|
-
* Re-renders the React component with new props.
|
|
2262
|
-
*/
|
|
2263
|
-
updateProps(t = {}) {
|
|
2264
|
-
this.props = {
|
|
2265
|
-
...this.props,
|
|
2266
|
-
...t
|
|
2267
|
-
}, this.render();
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* Destroy the React component.
|
|
2271
|
-
*/
|
|
2272
|
-
destroy() {
|
|
2273
|
-
var t;
|
|
2274
|
-
const n = this.editor;
|
|
2275
|
-
(t = n == null ? void 0 : n.contentComponent) === null || t === void 0 || t.removeRenderer(this.id);
|
|
2276
|
-
}
|
|
2277
|
-
/**
|
|
2278
|
-
* Update the attributes of the element that holds the React component.
|
|
2279
|
-
*/
|
|
2280
|
-
updateAttributes(t) {
|
|
2281
|
-
Object.keys(t).forEach((n) => {
|
|
2282
|
-
this.element.setAttribute(n, t[n]);
|
|
2283
|
-
});
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
export {
|
|
2287
|
-
Yi as B,
|
|
2288
|
-
Gi as E,
|
|
2289
|
-
Xi as R,
|
|
2290
|
-
qe as t
|
|
2291
|
-
};
|