@mathews_cometchat/bubble-builder 1.0.0-alpha6 → 1.0.0-alpha8
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/bubble-builder.es.js +948 -688
- package/dist/bubble-builder.umd.js +4 -4
- package/package.json +1 -1
|
@@ -1804,30 +1804,30 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1804
1804
|
function lr(e) {
|
|
1805
1805
|
yd(e, 0);
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function ur(e) {
|
|
1808
1808
|
if (Lt(yt(e))) return e;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function dr(e, t) {
|
|
1811
1811
|
if (e === "change") return t;
|
|
1812
1812
|
}
|
|
1813
|
-
var
|
|
1813
|
+
var fr = !1;
|
|
1814
1814
|
if (dn) {
|
|
1815
|
-
var
|
|
1815
|
+
var R;
|
|
1816
1816
|
if (dn) {
|
|
1817
|
-
var
|
|
1818
|
-
if (!
|
|
1819
|
-
var
|
|
1820
|
-
|
|
1817
|
+
var pr = "oninput" in document;
|
|
1818
|
+
if (!pr) {
|
|
1819
|
+
var z = document.createElement("div");
|
|
1820
|
+
z.setAttribute("oninput", "return;"), pr = typeof z.oninput == "function";
|
|
1821
1821
|
}
|
|
1822
|
-
|
|
1823
|
-
} else
|
|
1824
|
-
|
|
1822
|
+
R = pr;
|
|
1823
|
+
} else R = !1;
|
|
1824
|
+
fr = R && (!document.documentMode || 9 < document.documentMode);
|
|
1825
1825
|
}
|
|
1826
1826
|
function mr() {
|
|
1827
1827
|
sr && (sr.detachEvent("onpropertychange", hr), cr = sr = null);
|
|
1828
1828
|
}
|
|
1829
1829
|
function hr(e) {
|
|
1830
|
-
if (e.propertyName === "value" &&
|
|
1830
|
+
if (e.propertyName === "value" && ur(cr)) {
|
|
1831
1831
|
var t = [];
|
|
1832
1832
|
or(t, cr, e, rn(e)), ln(lr, t);
|
|
1833
1833
|
}
|
|
@@ -1836,26 +1836,26 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1836
1836
|
e === "focusin" ? (mr(), sr = t, cr = n, sr.attachEvent("onpropertychange", hr)) : e === "focusout" && mr();
|
|
1837
1837
|
}
|
|
1838
1838
|
function _r(e) {
|
|
1839
|
-
if (e === "selectionchange" || e === "keyup" || e === "keydown") return
|
|
1839
|
+
if (e === "selectionchange" || e === "keyup" || e === "keydown") return ur(cr);
|
|
1840
1840
|
}
|
|
1841
1841
|
function vr(e, t) {
|
|
1842
|
-
if (e === "click") return
|
|
1843
|
-
}
|
|
1844
|
-
function B(e, t) {
|
|
1845
|
-
if (e === "input" || e === "change") return R(t);
|
|
1842
|
+
if (e === "click") return ur(t);
|
|
1846
1843
|
}
|
|
1847
1844
|
function yr(e, t) {
|
|
1845
|
+
if (e === "input" || e === "change") return ur(t);
|
|
1846
|
+
}
|
|
1847
|
+
function br(e, t) {
|
|
1848
1848
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1849
1849
|
}
|
|
1850
|
-
var
|
|
1851
|
-
function
|
|
1852
|
-
if (
|
|
1850
|
+
var xr = typeof Object.is == "function" ? Object.is : br;
|
|
1851
|
+
function B(e, t) {
|
|
1852
|
+
if (xr(e, t)) return !0;
|
|
1853
1853
|
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
|
|
1854
1854
|
var n = Object.keys(e), r = Object.keys(t);
|
|
1855
1855
|
if (n.length !== r.length) return !1;
|
|
1856
1856
|
for (r = 0; r < n.length; r++) {
|
|
1857
1857
|
var i = n[r];
|
|
1858
|
-
if (!we.call(t, i) || !
|
|
1858
|
+
if (!we.call(t, i) || !xr(e[i], t[i])) return !1;
|
|
1859
1859
|
}
|
|
1860
1860
|
return !0;
|
|
1861
1861
|
}
|
|
@@ -1919,7 +1919,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
1919
1919
|
anchorOffset: r.anchorOffset,
|
|
1920
1920
|
focusNode: r.focusNode,
|
|
1921
1921
|
focusOffset: r.focusOffset
|
|
1922
|
-
}), Ar &&
|
|
1922
|
+
}), Ar && B(Ar, r) || (Ar = r, r = Ed(kr, "onSelect"), 0 < r.length && (t = new Cn("onSelect", "select", null, t, n), e.push({
|
|
1923
1923
|
event: t,
|
|
1924
1924
|
listeners: r
|
|
1925
1925
|
}), t.target = Or)));
|
|
@@ -2259,7 +2259,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2259
2259
|
if (s === null) throw Error(i(387));
|
|
2260
2260
|
if (s = s.memoizedProps, s !== null) {
|
|
2261
2261
|
var c = a.type;
|
|
2262
|
-
|
|
2262
|
+
xr(a.pendingProps.value, s.value) || (e === null ? e = [c] : e.push(c));
|
|
2263
2263
|
}
|
|
2264
2264
|
} else if (a === N.current) {
|
|
2265
2265
|
if (s = a.alternate, s === null) throw Error(i(387));
|
|
@@ -2271,7 +2271,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2271
2271
|
}
|
|
2272
2272
|
function Xi(e) {
|
|
2273
2273
|
for (e = e.firstContext; e !== null;) {
|
|
2274
|
-
if (!
|
|
2274
|
+
if (!xr(e.context._currentValue, e.memoizedValue)) return !0;
|
|
2275
2275
|
e = e.next;
|
|
2276
2276
|
}
|
|
2277
2277
|
return !1;
|
|
@@ -2327,16 +2327,16 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2327
2327
|
refCount: 0
|
|
2328
2328
|
};
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function oa(e) {
|
|
2331
2331
|
e.refCount--, e.refCount === 0 && na(ra, function() {
|
|
2332
2332
|
e.controller.abort();
|
|
2333
2333
|
});
|
|
2334
2334
|
}
|
|
2335
|
-
var
|
|
2335
|
+
var sa = null, ca = 0, U = 0, la = null;
|
|
2336
2336
|
function ua(e, t) {
|
|
2337
|
-
if (
|
|
2338
|
-
var n =
|
|
2339
|
-
|
|
2337
|
+
if (sa === null) {
|
|
2338
|
+
var n = sa = [];
|
|
2339
|
+
ca = 0, U = dd(), la = {
|
|
2340
2340
|
status: "pending",
|
|
2341
2341
|
value: void 0,
|
|
2342
2342
|
then: function(e) {
|
|
@@ -2344,13 +2344,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2344
2344
|
}
|
|
2345
2345
|
};
|
|
2346
2346
|
}
|
|
2347
|
-
return
|
|
2347
|
+
return ca++, t.then(da, da), t;
|
|
2348
2348
|
}
|
|
2349
2349
|
function da() {
|
|
2350
|
-
if (--
|
|
2350
|
+
if (--ca === 0 && sa !== null) {
|
|
2351
2351
|
la !== null && (la.status = "fulfilled");
|
|
2352
|
-
var e =
|
|
2353
|
-
|
|
2352
|
+
var e = sa;
|
|
2353
|
+
sa = null, U = 0, la = null;
|
|
2354
2354
|
for (var t = 0; t < e.length; t++) (0, e[t])();
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
@@ -2738,7 +2738,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2738
2738
|
do {
|
|
2739
2739
|
var p = s.lane & -536870913, m = p !== s.lane;
|
|
2740
2740
|
if (m ? (Y & p) === p : (r & p) === p) {
|
|
2741
|
-
p !== 0 && p ===
|
|
2741
|
+
p !== 0 && p === U && (Ua = !0), u !== null && (u = u.next = {
|
|
2742
2742
|
lane: 0,
|
|
2743
2743
|
tag: s.tag,
|
|
2744
2744
|
payload: s.payload,
|
|
@@ -2843,7 +2843,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2843
2843
|
}
|
|
2844
2844
|
function yo(e, t) {
|
|
2845
2845
|
if (t === null) return !1;
|
|
2846
|
-
for (var n = 0; n < t.length && n < e.length; n++) if (!
|
|
2846
|
+
for (var n = 0; n < t.length && n < e.length; n++) if (!xr(e[n], t[n])) return !1;
|
|
2847
2847
|
return !0;
|
|
2848
2848
|
}
|
|
2849
2849
|
function bo(e, t, n, r, i, a) {
|
|
@@ -2988,9 +2988,9 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
2988
2988
|
hasEagerState: u.hasEagerState,
|
|
2989
2989
|
eagerState: u.eagerState,
|
|
2990
2990
|
next: null
|
|
2991
|
-
}), f ===
|
|
2991
|
+
}), f === U && (d = !0);
|
|
2992
2992
|
else if ((co & p) === p) {
|
|
2993
|
-
u = u.next, p ===
|
|
2993
|
+
u = u.next, p === U && (d = !0);
|
|
2994
2994
|
continue;
|
|
2995
2995
|
} else f = {
|
|
2996
2996
|
lane: 0,
|
|
@@ -3013,7 +3013,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3013
3013
|
}, l === null ? (c = l = p, s = o) : l = l.next = p, W.lanes |= f, Gl |= f;
|
|
3014
3014
|
u = u.next;
|
|
3015
3015
|
} while (u !== null && u !== t);
|
|
3016
|
-
if (l === null ? s = o : l.next = c, !
|
|
3016
|
+
if (l === null ? s = o : l.next = c, !xr(o, e.memoizedState) && (tc = !0, d && (n = la, n !== null))) throw n;
|
|
3017
3017
|
e.memoizedState = o, e.baseState = s, e.baseQueue = l, r.lastRenderedState = o;
|
|
3018
3018
|
}
|
|
3019
3019
|
return a === null && (r.lanes = 0), [e.memoizedState, r.dispatch];
|
|
@@ -3029,7 +3029,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3029
3029
|
do
|
|
3030
3030
|
o = e(o, s.action), s = s.next;
|
|
3031
3031
|
while (s !== a);
|
|
3032
|
-
|
|
3032
|
+
xr(o, t.memoizedState) || (tc = !0), t.memoizedState = o, t.baseQueue === null && (t.baseState = o), n.lastRenderedState = o;
|
|
3033
3033
|
}
|
|
3034
3034
|
return [o, r];
|
|
3035
3035
|
}
|
|
@@ -3039,7 +3039,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3039
3039
|
if (n === void 0) throw Error(i(407));
|
|
3040
3040
|
n = n();
|
|
3041
3041
|
} else n = t();
|
|
3042
|
-
var s = !
|
|
3042
|
+
var s = !xr((G || a).memoizedState, n);
|
|
3043
3043
|
if (s && (a.memoizedState = n, tc = !0), a = a.queue, cs(Bo.bind(null, r, a, e), [e]), a.getSnapshot !== t || s || lo !== null && lo.memoizedState.tag & 1) {
|
|
3044
3044
|
if (r.flags |= 2048, rs(9, { destroy: void 0 }, zo.bind(null, r, a, n, t), null), q === null) throw Error(i(349));
|
|
3045
3045
|
o || co & 127 || Ro(r, t, n);
|
|
@@ -3065,7 +3065,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3065
3065
|
e = e.value;
|
|
3066
3066
|
try {
|
|
3067
3067
|
var n = t();
|
|
3068
|
-
return !
|
|
3068
|
+
return !xr(e, n);
|
|
3069
3069
|
} catch {
|
|
3070
3070
|
return !0;
|
|
3071
3071
|
}
|
|
@@ -3339,7 +3339,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3339
3339
|
return n === void 0 || co & 1073741824 && !(Y & 261930) ? e.memoizedState = t : (e.memoizedState = n, e = mu(), W.lanes |= e, Gl |= e, n);
|
|
3340
3340
|
}
|
|
3341
3341
|
function ys(e, t, n, r) {
|
|
3342
|
-
return
|
|
3342
|
+
return xr(n, t) ? n : Ja.current === null ? !(co & 42) || co & 1073741824 && !(Y & 261930) ? (tc = !0, e.memoizedState = n) : (e = mu(), W.lanes |= e, Gl |= e, t) : (e = vs(e, n, r), xr(e, t) || (tc = !0), e);
|
|
3343
3343
|
}
|
|
3344
3344
|
function bs(e, t, n, r, i) {
|
|
3345
3345
|
var a = k.p;
|
|
@@ -3455,7 +3455,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3455
3455
|
var a = e.alternate;
|
|
3456
3456
|
if (e.lanes === 0 && (a === null || a.lanes === 0) && (a = t.lastRenderedReducer, a !== null)) try {
|
|
3457
3457
|
var o = t.lastRenderedState, s = a(o, n);
|
|
3458
|
-
if (i.hasEagerState = !0, i.eagerState = s,
|
|
3458
|
+
if (i.hasEagerState = !0, i.eagerState = s, xr(s, o)) return $r(e, t, i, 0), q === null && Qr(), !1;
|
|
3459
3459
|
} catch {}
|
|
3460
3460
|
if (n = ei(e, t, i, r), n !== null) return hu(n, e, r), Fs(n, t, r), !0;
|
|
3461
3461
|
}
|
|
@@ -3727,7 +3727,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3727
3727
|
}
|
|
3728
3728
|
};
|
|
3729
3729
|
function Hs(e, t, n, r, i, a, o) {
|
|
3730
|
-
return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, a, o) : t.prototype && t.prototype.isPureReactComponent ? !
|
|
3730
|
+
return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, a, o) : t.prototype && t.prototype.isPureReactComponent ? !B(n, r) || !B(i, a) : !0;
|
|
3731
3731
|
}
|
|
3732
3732
|
function Us(e, t, n, r) {
|
|
3733
3733
|
e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r), t.state !== e && Vs.enqueueReplaceState(t, t.state, null);
|
|
@@ -3844,14 +3844,14 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
3844
3844
|
}
|
|
3845
3845
|
if (a = e.child, !Oc(e, i)) {
|
|
3846
3846
|
var o = a.memoizedProps;
|
|
3847
|
-
if (n = n.compare, n = n === null ?
|
|
3847
|
+
if (n = n.compare, n = n === null ? B : n, n(o, r) && e.ref === t.ref) return Dc(e, t, i);
|
|
3848
3848
|
}
|
|
3849
3849
|
return t.flags |= 1, e = ci(a, r), e.ref = t.ref, e.return = t, t.child = e;
|
|
3850
3850
|
}
|
|
3851
3851
|
function ac(e, t, n, r, i) {
|
|
3852
3852
|
if (e !== null) {
|
|
3853
3853
|
var a = e.memoizedProps;
|
|
3854
|
-
if (
|
|
3854
|
+
if (B(a, r) && e.ref === t.ref) if (tc = !1, t.pendingProps = r = a, Oc(e, i)) e.flags & 131072 && (tc = !0);
|
|
3855
3855
|
else return t.lanes = e.lanes, Dc(e, t, i);
|
|
3856
3856
|
}
|
|
3857
3857
|
return pc(e, t, n, r, i);
|
|
@@ -5242,10 +5242,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5242
5242
|
}
|
|
5243
5243
|
function Cl(e, t) {
|
|
5244
5244
|
var n = null;
|
|
5245
|
-
e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (n = e.memoizedState.cachePool.pool), e = null, t.memoizedState !== null && t.memoizedState.cachePool !== null && (e = t.memoizedState.cachePool.pool), e !== n && (e != null && e.refCount++, n != null &&
|
|
5245
|
+
e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (n = e.memoizedState.cachePool.pool), e = null, t.memoizedState !== null && t.memoizedState.cachePool !== null && (e = t.memoizedState.cachePool.pool), e !== n && (e != null && e.refCount++, n != null && oa(n));
|
|
5246
5246
|
}
|
|
5247
5247
|
function wl(e, t) {
|
|
5248
|
-
e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null &&
|
|
5248
|
+
e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null && oa(e));
|
|
5249
5249
|
}
|
|
5250
5250
|
function Tl(e, t, n, r) {
|
|
5251
5251
|
if (t.subtreeFlags & 10256) for (t = t.child; t !== null;) El(e, t, n, r), t = t.sibling;
|
|
@@ -5262,7 +5262,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5262
5262
|
Tl(e, t, n, r);
|
|
5263
5263
|
break;
|
|
5264
5264
|
case 3:
|
|
5265
|
-
Tl(e, t, n, r), i & 2048 && (e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null &&
|
|
5265
|
+
Tl(e, t, n, r), i & 2048 && (e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null && oa(e)));
|
|
5266
5266
|
break;
|
|
5267
5267
|
case 12:
|
|
5268
5268
|
if (i & 2048) {
|
|
@@ -5431,7 +5431,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5431
5431
|
r != null && r.refCount++;
|
|
5432
5432
|
}
|
|
5433
5433
|
break;
|
|
5434
|
-
case 24:
|
|
5434
|
+
case 24: oa(n.memoizedState.cache);
|
|
5435
5435
|
}
|
|
5436
5436
|
if (r = n.child, r !== null) r.return = n, rl = r;
|
|
5437
5437
|
else a: for (n = e; rl !== null;) {
|
|
@@ -5562,7 +5562,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5562
5562
|
var i = n[r], a = i.getSnapshot;
|
|
5563
5563
|
i = i.value;
|
|
5564
5564
|
try {
|
|
5565
|
-
if (!
|
|
5565
|
+
if (!xr(a(), i)) return !1;
|
|
5566
5566
|
} catch {
|
|
5567
5567
|
return !1;
|
|
5568
5568
|
}
|
|
@@ -5920,7 +5920,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5920
5920
|
}
|
|
5921
5921
|
}
|
|
5922
5922
|
function Vu(e, t) {
|
|
5923
|
-
(e.pooledCacheLanes &= t) === 0 && (t = e.pooledCache, t != null && (e.pooledCache = null,
|
|
5923
|
+
(e.pooledCacheLanes &= t) === 0 && (t = e.pooledCache, t != null && (e.pooledCache = null, oa(t)));
|
|
5924
5924
|
}
|
|
5925
5925
|
function Hu() {
|
|
5926
5926
|
return Ru(), zu(), Bu(), Uu();
|
|
@@ -6083,7 +6083,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
6083
6083
|
}
|
|
6084
6084
|
function dd() {
|
|
6085
6085
|
if (nd === 0) {
|
|
6086
|
-
var e =
|
|
6086
|
+
var e = U;
|
|
6087
6087
|
e === 0 && (e = Ue, Ue <<= 1, !(Ue & 261888) && (Ue = 256)), nd = e;
|
|
6088
6088
|
}
|
|
6089
6089
|
return nd;
|
|
@@ -6347,13 +6347,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
6347
6347
|
}
|
|
6348
6348
|
}
|
|
6349
6349
|
a: {
|
|
6350
|
-
if (c = r ? yt(r) : window, l = c.nodeName && c.nodeName.toLowerCase(), l === "select" || l === "input" && c.type === "file") var v =
|
|
6351
|
-
else if (ar(c)) if (
|
|
6350
|
+
if (c = r ? yt(r) : window, l = c.nodeName && c.nodeName.toLowerCase(), l === "select" || l === "input" && c.type === "file") var v = dr;
|
|
6351
|
+
else if (ar(c)) if (fr) v = yr;
|
|
6352
6352
|
else {
|
|
6353
6353
|
v = _r;
|
|
6354
6354
|
var y = gr;
|
|
6355
6355
|
}
|
|
6356
|
-
else l = c.nodeName, !l || l.toLowerCase() !== "input" || c.type !== "checkbox" && c.type !== "radio" ? r && Zt(r.elementType) && (v =
|
|
6356
|
+
else l = c.nodeName, !l || l.toLowerCase() !== "input" || c.type !== "checkbox" && c.type !== "radio" ? r && Zt(r.elementType) && (v = dr) : v = vr;
|
|
6357
6357
|
if (v &&= v(e, r)) {
|
|
6358
6358
|
or(s, v, n, i);
|
|
6359
6359
|
break a;
|
|
@@ -8085,12 +8085,12 @@ var re = [
|
|
|
8085
8085
|
"appnew.cometchat.com"
|
|
8086
8086
|
];
|
|
8087
8087
|
function ie() {
|
|
8088
|
-
return `${re.includes(window.location.hostname) ? "https://apimgmt.cc-cluster-2.io/" : "https://apimgmt.cometchat-staging.com/"}apps/${
|
|
8088
|
+
return `${re.includes(window.location.hostname) ? "https://apimgmt.cc-cluster-2.io/" : "https://apimgmt.cometchat-staging.com/"}apps/${ns.appId}/vcb/bubble-templates`;
|
|
8089
8089
|
}
|
|
8090
8090
|
function ae() {
|
|
8091
8091
|
return {
|
|
8092
8092
|
"Content-Type": "application/json",
|
|
8093
|
-
Authorization: `Bearer ${
|
|
8093
|
+
Authorization: `Bearer ${ns.token}`
|
|
8094
8094
|
};
|
|
8095
8095
|
}
|
|
8096
8096
|
async function oe(e, t) {
|
|
@@ -8213,6 +8213,7 @@ var N = ee((e, t) => ({
|
|
|
8213
8213
|
historyIndex: -1,
|
|
8214
8214
|
isDirty: !1,
|
|
8215
8215
|
useThemePlaceholders: !0,
|
|
8216
|
+
variables: [],
|
|
8216
8217
|
view: "library",
|
|
8217
8218
|
showTemplatePicker: !1,
|
|
8218
8219
|
templates: [],
|
|
@@ -8540,6 +8541,7 @@ var N = ee((e, t) => ({
|
|
|
8540
8541
|
isDirty: !0
|
|
8541
8542
|
}),
|
|
8542
8543
|
setUseThemePlaceholders: (t) => e({ useThemePlaceholders: t }),
|
|
8544
|
+
setVariables: (t) => e({ variables: t }),
|
|
8543
8545
|
setTemplateName: (t) => e({
|
|
8544
8546
|
templateName: t,
|
|
8545
8547
|
isDirty: !0
|
|
@@ -15884,6 +15886,8 @@ function Hn(e, t, n, r, i, a, o, s, c, l, u) {
|
|
|
15884
15886
|
textAlign: e.align,
|
|
15885
15887
|
fontWeight: e.fontWeight === "medium" ? 500 : e.fontWeight === "bold" ? 700 : 400,
|
|
15886
15888
|
padding: Ln(e.padding),
|
|
15889
|
+
overflowWrap: "break-word",
|
|
15890
|
+
wordBreak: "break-word",
|
|
15887
15891
|
...e.maxLines ? {
|
|
15888
15892
|
overflow: "hidden",
|
|
15889
15893
|
display: "-webkit-box",
|
|
@@ -16644,8 +16648,8 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16644
16648
|
}, Yn = (0, S.memo)(function() {
|
|
16645
16649
|
let e = N((e) => e.templates), t = N((e) => e.fetchTemplates), n = N((e) => e.setShowTemplatePicker);
|
|
16646
16650
|
return (0, S.useState)(() => {
|
|
16647
|
-
e.length === 0 && t();
|
|
16648
|
-
}), /* @__PURE__ */ (0, P.jsx)("button", {
|
|
16651
|
+
e.length === 0 && !ns.hideTemplateLibrary && t();
|
|
16652
|
+
}), ns.hideTemplateLibrary ? null : /* @__PURE__ */ (0, P.jsx)("button", {
|
|
16649
16653
|
onClick: (e) => {
|
|
16650
16654
|
e.stopPropagation(), n(!0);
|
|
16651
16655
|
},
|
|
@@ -16653,6 +16657,215 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16653
16657
|
children: "Load from Saved Template"
|
|
16654
16658
|
});
|
|
16655
16659
|
}), Xn = {
|
|
16660
|
+
padding: "0 6px",
|
|
16661
|
+
borderRadius: 4,
|
|
16662
|
+
height: 28,
|
|
16663
|
+
border: "1px solid var(--border-subtle)",
|
|
16664
|
+
background: "var(--bg-secondary)",
|
|
16665
|
+
cursor: "pointer",
|
|
16666
|
+
color: "#6852D6",
|
|
16667
|
+
display: "inline-flex",
|
|
16668
|
+
alignItems: "center",
|
|
16669
|
+
justifyContent: "center",
|
|
16670
|
+
flexShrink: 0
|
|
16671
|
+
}, Zn = /* @__PURE__ */ (0, P.jsxs)("svg", {
|
|
16672
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16673
|
+
viewBox: "0 0 24 24",
|
|
16674
|
+
width: "14",
|
|
16675
|
+
height: "14",
|
|
16676
|
+
fill: "currentColor",
|
|
16677
|
+
children: [/* @__PURE__ */ (0, P.jsx)("path", { d: "M1 11v2.056h1c.098 0 .194-.004.29-.013A1 1 0 0 1 3 14v5.056a2.5 2.5 0 0 0 2.5 2.5H8v-2H5.5a.5.5 0 0 1-.5-.5V14c0-.755-.279-1.444-.739-1.972.46-.527.739-1.217.739-1.972V5a.5.5 0 0 1 .5-.5H8v-2H5.5A2.5 2.5 0 0 0 3 5v5.056a1 1 0 0 1-.71.958A3.047 3.047 0 0 0 2 11H1ZM21 10.056a1 1 0 0 0 .71.958c.096-.01.192-.014.29-.014h1v2.056h-1c-.098 0-.194-.004-.29-.013A1 1 0 0 0 21 14v5.056a2.5 2.5 0 0 1-2.5 2.5h-2v-2h2a.5.5 0 0 0 .5-.5V14c0-.755.279-1.444.739-1.972A2.989 2.989 0 0 1 19 10.056V5a.5.5 0 0 0-.5-.5H16v-2h2.5A2.5 2.5 0 0 1 21 5v5.056ZM12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" }), /* @__PURE__ */ (0, P.jsx)("path", { d: "M17 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" })]
|
|
16678
|
+
}), Qn = (0, S.memo)(function({ value: e, onChange: t, placeholder: n, multiline: r, rows: i, style: a }) {
|
|
16679
|
+
let o = N((e) => e.variables), [s, c] = (0, S.useState)(!1), [l, u] = (0, S.useState)(""), d = (0, S.useRef)(null), f = (0, S.useRef)(null), [p, m] = (0, S.useState)(null), h = (0, S.useCallback)(() => {
|
|
16680
|
+
if (s) {
|
|
16681
|
+
c(!1), u("");
|
|
16682
|
+
return;
|
|
16683
|
+
}
|
|
16684
|
+
if (f.current) {
|
|
16685
|
+
let e = f.current.getBoundingClientRect();
|
|
16686
|
+
m({
|
|
16687
|
+
top: e.bottom + 4,
|
|
16688
|
+
left: e.left,
|
|
16689
|
+
width: e.width
|
|
16690
|
+
});
|
|
16691
|
+
}
|
|
16692
|
+
c(!0), u("");
|
|
16693
|
+
}, [s]);
|
|
16694
|
+
(0, S.useEffect)(() => {
|
|
16695
|
+
if (!s) return;
|
|
16696
|
+
let e = (e) => {
|
|
16697
|
+
let t = e.target;
|
|
16698
|
+
f.current?.contains(t) || document.getElementById("variable-dropdown-portal")?.contains(t) || c(!1);
|
|
16699
|
+
};
|
|
16700
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
16701
|
+
}, [s]);
|
|
16702
|
+
let g = (0, S.useCallback)((n) => {
|
|
16703
|
+
let r = `{{${n}}}`, i = d.current;
|
|
16704
|
+
if (i) {
|
|
16705
|
+
let n = i.selectionStart ?? e.length, a = i.selectionEnd ?? e.length;
|
|
16706
|
+
t(e.slice(0, n) + r + e.slice(a)), requestAnimationFrame(() => {
|
|
16707
|
+
let e = n + r.length;
|
|
16708
|
+
i.setSelectionRange(e, e), i.focus();
|
|
16709
|
+
});
|
|
16710
|
+
} else t(e + r);
|
|
16711
|
+
c(!1), u("");
|
|
16712
|
+
}, [e, t]);
|
|
16713
|
+
if (!o || o.length === 0) return r ? /* @__PURE__ */ (0, P.jsx)("textarea", {
|
|
16714
|
+
ref: d,
|
|
16715
|
+
rows: i ?? 3,
|
|
16716
|
+
value: e ?? "",
|
|
16717
|
+
onChange: (e) => t(e.target.value),
|
|
16718
|
+
placeholder: n,
|
|
16719
|
+
style: {
|
|
16720
|
+
resize: "vertical",
|
|
16721
|
+
...a
|
|
16722
|
+
}
|
|
16723
|
+
}) : /* @__PURE__ */ (0, P.jsx)("input", {
|
|
16724
|
+
ref: d,
|
|
16725
|
+
value: e ?? "",
|
|
16726
|
+
onChange: (e) => t(e.target.value),
|
|
16727
|
+
placeholder: n,
|
|
16728
|
+
style: a
|
|
16729
|
+
});
|
|
16730
|
+
let _ = l ? o.filter((e) => e.name.toLowerCase().includes(l.toLowerCase()) || (e.label ?? "").toLowerCase().includes(l.toLowerCase()) || (e.description ?? "").toLowerCase().includes(l.toLowerCase())) : o, v = /* @__PURE__ */ new Map();
|
|
16731
|
+
for (let e of _) {
|
|
16732
|
+
let t = e.category ?? "Variables";
|
|
16733
|
+
v.has(t) || v.set(t, []), v.get(t).push(e);
|
|
16734
|
+
}
|
|
16735
|
+
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
16736
|
+
ref: f,
|
|
16737
|
+
style: { position: "relative" },
|
|
16738
|
+
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
16739
|
+
style: {
|
|
16740
|
+
display: "flex",
|
|
16741
|
+
gap: 4,
|
|
16742
|
+
alignItems: "center"
|
|
16743
|
+
},
|
|
16744
|
+
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
16745
|
+
style: { flex: 1 },
|
|
16746
|
+
children: r ? /* @__PURE__ */ (0, P.jsx)("textarea", {
|
|
16747
|
+
ref: d,
|
|
16748
|
+
rows: i ?? 3,
|
|
16749
|
+
value: e ?? "",
|
|
16750
|
+
onChange: (e) => t(e.target.value),
|
|
16751
|
+
placeholder: n,
|
|
16752
|
+
style: {
|
|
16753
|
+
resize: "vertical",
|
|
16754
|
+
width: "100%",
|
|
16755
|
+
...a
|
|
16756
|
+
}
|
|
16757
|
+
}) : /* @__PURE__ */ (0, P.jsx)("input", {
|
|
16758
|
+
ref: d,
|
|
16759
|
+
value: e ?? "",
|
|
16760
|
+
onChange: (e) => t(e.target.value),
|
|
16761
|
+
placeholder: n,
|
|
16762
|
+
style: {
|
|
16763
|
+
width: "100%",
|
|
16764
|
+
...a
|
|
16765
|
+
}
|
|
16766
|
+
})
|
|
16767
|
+
}), /* @__PURE__ */ (0, P.jsx)("button", {
|
|
16768
|
+
type: "button",
|
|
16769
|
+
onClick: h,
|
|
16770
|
+
style: Xn,
|
|
16771
|
+
title: "Insert variable",
|
|
16772
|
+
children: Zn
|
|
16773
|
+
})]
|
|
16774
|
+
}), s && p && (0, An.createPortal)(/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
16775
|
+
id: "variable-dropdown-portal",
|
|
16776
|
+
style: {
|
|
16777
|
+
position: "fixed",
|
|
16778
|
+
top: p.top,
|
|
16779
|
+
left: p.left,
|
|
16780
|
+
width: p.width,
|
|
16781
|
+
zIndex: 9999,
|
|
16782
|
+
background: "#fff",
|
|
16783
|
+
borderRadius: 8,
|
|
16784
|
+
border: "1px solid #E2E4E9",
|
|
16785
|
+
boxShadow: "0 8px 30px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06)",
|
|
16786
|
+
display: "flex",
|
|
16787
|
+
flexDirection: "column",
|
|
16788
|
+
maxHeight: 280
|
|
16789
|
+
},
|
|
16790
|
+
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
16791
|
+
style: {
|
|
16792
|
+
padding: "8px 10px",
|
|
16793
|
+
borderBottom: "1px solid #EFEFEF",
|
|
16794
|
+
flexShrink: 0
|
|
16795
|
+
},
|
|
16796
|
+
children: /* @__PURE__ */ (0, P.jsx)("input", {
|
|
16797
|
+
value: l,
|
|
16798
|
+
onChange: (e) => u(e.target.value),
|
|
16799
|
+
placeholder: "Search variables...",
|
|
16800
|
+
autoFocus: !0,
|
|
16801
|
+
style: {
|
|
16802
|
+
width: "100%",
|
|
16803
|
+
fontSize: 12,
|
|
16804
|
+
border: "1px solid #E2E4E9",
|
|
16805
|
+
borderRadius: 6,
|
|
16806
|
+
padding: "6px 10px",
|
|
16807
|
+
outline: "none",
|
|
16808
|
+
background: "#FAFAFA",
|
|
16809
|
+
color: "#333",
|
|
16810
|
+
margin: 0,
|
|
16811
|
+
boxShadow: "none"
|
|
16812
|
+
}
|
|
16813
|
+
})
|
|
16814
|
+
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
16815
|
+
style: {
|
|
16816
|
+
overflowY: "auto",
|
|
16817
|
+
flex: 1,
|
|
16818
|
+
padding: "4px 0"
|
|
16819
|
+
},
|
|
16820
|
+
children: _.length === 0 ? /* @__PURE__ */ (0, P.jsx)("div", {
|
|
16821
|
+
style: {
|
|
16822
|
+
padding: "16px 12px",
|
|
16823
|
+
fontSize: 12,
|
|
16824
|
+
color: "#aaa",
|
|
16825
|
+
textAlign: "center"
|
|
16826
|
+
},
|
|
16827
|
+
children: "No matching variables"
|
|
16828
|
+
}) : [...v.entries()].map(([e, t], n) => /* @__PURE__ */ (0, P.jsxs)("div", { children: [v.size > 1 && /* @__PURE__ */ (0, P.jsx)("div", {
|
|
16829
|
+
style: {
|
|
16830
|
+
fontSize: 10,
|
|
16831
|
+
fontWeight: 600,
|
|
16832
|
+
color: "#999",
|
|
16833
|
+
letterSpacing: .5,
|
|
16834
|
+
padding: "6px 12px 3px",
|
|
16835
|
+
textTransform: "uppercase",
|
|
16836
|
+
...n > 0 ? {
|
|
16837
|
+
borderTop: "1px solid #F0F0F0",
|
|
16838
|
+
marginTop: 2
|
|
16839
|
+
} : {}
|
|
16840
|
+
},
|
|
16841
|
+
children: e
|
|
16842
|
+
}), t.map((e) => /* @__PURE__ */ (0, P.jsx)("div", {
|
|
16843
|
+
onClick: () => g(e.name),
|
|
16844
|
+
onMouseEnter: (e) => {
|
|
16845
|
+
e.currentTarget.style.background = "#F5F5F7";
|
|
16846
|
+
},
|
|
16847
|
+
onMouseLeave: (e) => {
|
|
16848
|
+
e.currentTarget.style.background = "transparent";
|
|
16849
|
+
},
|
|
16850
|
+
title: [e.label, e.description].filter(Boolean).join(" — ") || void 0,
|
|
16851
|
+
style: {
|
|
16852
|
+
padding: "5px 12px",
|
|
16853
|
+
cursor: "pointer",
|
|
16854
|
+
transition: "background 0.1s"
|
|
16855
|
+
},
|
|
16856
|
+
children: /* @__PURE__ */ (0, P.jsx)("span", {
|
|
16857
|
+
style: {
|
|
16858
|
+
fontFamily: "var(--font-mono, monospace)",
|
|
16859
|
+
fontSize: 11,
|
|
16860
|
+
color: "#6852D6"
|
|
16861
|
+
},
|
|
16862
|
+
children: `{{${e.name}}}`
|
|
16863
|
+
})
|
|
16864
|
+
}, e.name))] }, e))
|
|
16865
|
+
})]
|
|
16866
|
+
}), document.body)]
|
|
16867
|
+
});
|
|
16868
|
+
}), $n = {
|
|
16656
16869
|
Navigation: ["openUrl"],
|
|
16657
16870
|
Messaging: [
|
|
16658
16871
|
"chatWithUser",
|
|
@@ -16663,7 +16876,7 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16663
16876
|
CometChat: ["initiateCall"],
|
|
16664
16877
|
Data: ["apiCall"],
|
|
16665
16878
|
Developer: ["customCallback"]
|
|
16666
|
-
},
|
|
16879
|
+
}, er = {
|
|
16667
16880
|
openUrl: {
|
|
16668
16881
|
type: "openUrl",
|
|
16669
16882
|
url: "",
|
|
@@ -16699,9 +16912,9 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16699
16912
|
method: "POST"
|
|
16700
16913
|
},
|
|
16701
16914
|
customCallback: { type: "customCallback" }
|
|
16702
|
-
},
|
|
16915
|
+
}, tr = (0, S.memo)(function({ action: e, onChange: t }) {
|
|
16703
16916
|
let n = (0, S.useCallback)((e) => {
|
|
16704
|
-
t(
|
|
16917
|
+
t(er[e] ?? {
|
|
16705
16918
|
type: "openUrl",
|
|
16706
16919
|
url: ""
|
|
16707
16920
|
});
|
|
@@ -16714,7 +16927,7 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16714
16927
|
}), /* @__PURE__ */ (0, P.jsx)("select", {
|
|
16715
16928
|
value: e.type,
|
|
16716
16929
|
onChange: (e) => n(e.target.value),
|
|
16717
|
-
children: Object.entries(
|
|
16930
|
+
children: Object.entries($n).map(([e, t]) => /* @__PURE__ */ (0, P.jsx)("optgroup", {
|
|
16718
16931
|
label: e,
|
|
16719
16932
|
children: t.map((e) => /* @__PURE__ */ (0, P.jsx)("option", {
|
|
16720
16933
|
value: e,
|
|
@@ -16722,20 +16935,20 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16722
16935
|
}, e))
|
|
16723
16936
|
}, e))
|
|
16724
16937
|
})]
|
|
16725
|
-
}),
|
|
16938
|
+
}), nr(e, t)] });
|
|
16726
16939
|
});
|
|
16727
|
-
function
|
|
16940
|
+
function nr(e, t) {
|
|
16728
16941
|
switch (e.type) {
|
|
16729
16942
|
case "openUrl": return /* @__PURE__ */ (0, P.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
16730
16943
|
className: "prop-field",
|
|
16731
16944
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16732
16945
|
className: "prop-label",
|
|
16733
16946
|
children: "URL"
|
|
16734
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16947
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16735
16948
|
value: e.url,
|
|
16736
16949
|
onChange: (n) => t({
|
|
16737
16950
|
...e,
|
|
16738
|
-
url: n
|
|
16951
|
+
url: n
|
|
16739
16952
|
}),
|
|
16740
16953
|
placeholder: "https://..."
|
|
16741
16954
|
})]
|
|
@@ -16764,11 +16977,11 @@ function $n(e, t) {
|
|
|
16764
16977
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16765
16978
|
className: "prop-label",
|
|
16766
16979
|
children: "User UID"
|
|
16767
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16980
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16768
16981
|
value: e.uid,
|
|
16769
16982
|
onChange: (n) => t({
|
|
16770
16983
|
...e,
|
|
16771
|
-
uid: n
|
|
16984
|
+
uid: n
|
|
16772
16985
|
})
|
|
16773
16986
|
})]
|
|
16774
16987
|
});
|
|
@@ -16777,11 +16990,11 @@ function $n(e, t) {
|
|
|
16777
16990
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16778
16991
|
className: "prop-label",
|
|
16779
16992
|
children: "Group GUID"
|
|
16780
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16993
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16781
16994
|
value: e.guid,
|
|
16782
16995
|
onChange: (n) => t({
|
|
16783
16996
|
...e,
|
|
16784
|
-
guid: n
|
|
16997
|
+
guid: n
|
|
16785
16998
|
})
|
|
16786
16999
|
})]
|
|
16787
17000
|
});
|
|
@@ -16791,11 +17004,11 @@ function $n(e, t) {
|
|
|
16791
17004
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16792
17005
|
className: "prop-label",
|
|
16793
17006
|
children: "Text"
|
|
16794
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17007
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16795
17008
|
value: e.text,
|
|
16796
17009
|
onChange: (n) => t({
|
|
16797
17010
|
...e,
|
|
16798
|
-
text: n
|
|
17011
|
+
text: n
|
|
16799
17012
|
})
|
|
16800
17013
|
})]
|
|
16801
17014
|
}),
|
|
@@ -16804,11 +17017,11 @@ function $n(e, t) {
|
|
|
16804
17017
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16805
17018
|
className: "prop-label",
|
|
16806
17019
|
children: "Receiver UID (optional)"
|
|
16807
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17020
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16808
17021
|
value: e.receiverUid ?? "",
|
|
16809
17022
|
onChange: (n) => t({
|
|
16810
17023
|
...e,
|
|
16811
|
-
receiverUid: n
|
|
17024
|
+
receiverUid: n || void 0
|
|
16812
17025
|
})
|
|
16813
17026
|
})]
|
|
16814
17027
|
}),
|
|
@@ -16817,11 +17030,11 @@ function $n(e, t) {
|
|
|
16817
17030
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16818
17031
|
className: "prop-label",
|
|
16819
17032
|
children: "Receiver GUID (optional)"
|
|
16820
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17033
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16821
17034
|
value: e.receiverGuid ?? "",
|
|
16822
17035
|
onChange: (n) => t({
|
|
16823
17036
|
...e,
|
|
16824
|
-
receiverGuid: n
|
|
17037
|
+
receiverGuid: n || void 0
|
|
16825
17038
|
})
|
|
16826
17039
|
})]
|
|
16827
17040
|
})
|
|
@@ -16831,11 +17044,11 @@ function $n(e, t) {
|
|
|
16831
17044
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16832
17045
|
className: "prop-label",
|
|
16833
17046
|
children: "Value"
|
|
16834
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17047
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16835
17048
|
value: e.value,
|
|
16836
17049
|
onChange: (n) => t({
|
|
16837
17050
|
...e,
|
|
16838
|
-
value: n
|
|
17051
|
+
value: n
|
|
16839
17052
|
})
|
|
16840
17053
|
})]
|
|
16841
17054
|
});
|
|
@@ -16844,11 +17057,11 @@ function $n(e, t) {
|
|
|
16844
17057
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16845
17058
|
className: "prop-label",
|
|
16846
17059
|
children: "URL"
|
|
16847
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17060
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16848
17061
|
value: e.url,
|
|
16849
17062
|
onChange: (n) => t({
|
|
16850
17063
|
...e,
|
|
16851
|
-
url: n
|
|
17064
|
+
url: n
|
|
16852
17065
|
})
|
|
16853
17066
|
})]
|
|
16854
17067
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -16856,11 +17069,11 @@ function $n(e, t) {
|
|
|
16856
17069
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16857
17070
|
className: "prop-label",
|
|
16858
17071
|
children: "Filename"
|
|
16859
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17072
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16860
17073
|
value: e.filename ?? "",
|
|
16861
17074
|
onChange: (n) => t({
|
|
16862
17075
|
...e,
|
|
16863
|
-
filename: n
|
|
17076
|
+
filename: n || void 0
|
|
16864
17077
|
})
|
|
16865
17078
|
})]
|
|
16866
17079
|
})] });
|
|
@@ -16890,11 +17103,11 @@ function $n(e, t) {
|
|
|
16890
17103
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16891
17104
|
className: "prop-label",
|
|
16892
17105
|
children: "User UID"
|
|
16893
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17106
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16894
17107
|
value: e.uid ?? "",
|
|
16895
17108
|
onChange: (n) => t({
|
|
16896
17109
|
...e,
|
|
16897
|
-
uid: n
|
|
17110
|
+
uid: n || void 0
|
|
16898
17111
|
})
|
|
16899
17112
|
})]
|
|
16900
17113
|
}),
|
|
@@ -16903,11 +17116,11 @@ function $n(e, t) {
|
|
|
16903
17116
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16904
17117
|
className: "prop-label",
|
|
16905
17118
|
children: "Group GUID"
|
|
16906
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17119
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16907
17120
|
value: e.guid ?? "",
|
|
16908
17121
|
onChange: (n) => t({
|
|
16909
17122
|
...e,
|
|
16910
|
-
guid: n
|
|
17123
|
+
guid: n || void 0
|
|
16911
17124
|
})
|
|
16912
17125
|
})]
|
|
16913
17126
|
})
|
|
@@ -16917,11 +17130,11 @@ function $n(e, t) {
|
|
|
16917
17130
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16918
17131
|
className: "prop-label",
|
|
16919
17132
|
children: "URL"
|
|
16920
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17133
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16921
17134
|
value: e.url,
|
|
16922
17135
|
onChange: (n) => t({
|
|
16923
17136
|
...e,
|
|
16924
|
-
url: n
|
|
17137
|
+
url: n
|
|
16925
17138
|
})
|
|
16926
17139
|
})]
|
|
16927
17140
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -16968,19 +17181,19 @@ function $n(e, t) {
|
|
|
16968
17181
|
}
|
|
16969
17182
|
//#endregion
|
|
16970
17183
|
//#region src/components/properties/IconPicker.tsx
|
|
16971
|
-
var
|
|
17184
|
+
var rr = {
|
|
16972
17185
|
maxHeight: 220,
|
|
16973
17186
|
overflowY: "auto",
|
|
16974
17187
|
padding: 4,
|
|
16975
17188
|
border: "1px solid var(--border-subtle)",
|
|
16976
17189
|
borderRadius: 6,
|
|
16977
17190
|
marginTop: 4
|
|
16978
|
-
},
|
|
17191
|
+
}, ir = {
|
|
16979
17192
|
display: "flex",
|
|
16980
17193
|
flexWrap: "wrap",
|
|
16981
17194
|
gap: 4,
|
|
16982
17195
|
padding: "2px 0"
|
|
16983
|
-
},
|
|
17196
|
+
}, ar = {
|
|
16984
17197
|
width: 34,
|
|
16985
17198
|
height: 34,
|
|
16986
17199
|
borderRadius: 6,
|
|
@@ -16991,11 +17204,11 @@ var er = {
|
|
|
16991
17204
|
alignItems: "center",
|
|
16992
17205
|
justifyContent: "center",
|
|
16993
17206
|
padding: 2
|
|
16994
|
-
},
|
|
17207
|
+
}, or = {
|
|
16995
17208
|
width: 20,
|
|
16996
17209
|
height: 20,
|
|
16997
17210
|
objectFit: "contain"
|
|
16998
|
-
},
|
|
17211
|
+
}, sr = (0, S.memo)(function({ value: e, onChange: t }) {
|
|
16999
17212
|
let [n, r] = (0, S.useState)(!1), [i, a] = (0, S.useState)(""), o = (0, S.useCallback)((e) => {
|
|
17000
17213
|
let n = Mn.find((t) => t.name === e);
|
|
17001
17214
|
t(n ? n.url : e), r(!1), a("");
|
|
@@ -17063,7 +17276,7 @@ var er = {
|
|
|
17063
17276
|
fontSize: 11
|
|
17064
17277
|
}
|
|
17065
17278
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17066
|
-
style:
|
|
17279
|
+
style: rr,
|
|
17067
17280
|
children: [Pn.map((t) => {
|
|
17068
17281
|
let n = f.filter((e) => e.category === t);
|
|
17069
17282
|
return n.length === 0 ? null : /* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
@@ -17075,19 +17288,19 @@ var er = {
|
|
|
17075
17288
|
},
|
|
17076
17289
|
children: t
|
|
17077
17290
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
17078
|
-
style:
|
|
17291
|
+
style: ir,
|
|
17079
17292
|
children: n.map((t) => /* @__PURE__ */ (0, P.jsx)("button", {
|
|
17080
17293
|
onClick: () => o(t.name),
|
|
17081
17294
|
title: t.label,
|
|
17082
17295
|
style: {
|
|
17083
|
-
...
|
|
17296
|
+
...ar,
|
|
17084
17297
|
borderColor: e === t.url ? "var(--accent-primary)" : "transparent",
|
|
17085
17298
|
background: e === t.url ? "rgba(108,92,231,0.1)" : "none"
|
|
17086
17299
|
},
|
|
17087
17300
|
children: /* @__PURE__ */ (0, P.jsx)("img", {
|
|
17088
17301
|
src: t.url,
|
|
17089
17302
|
alt: t.label,
|
|
17090
|
-
style:
|
|
17303
|
+
style: or
|
|
17091
17304
|
})
|
|
17092
17305
|
}, t.name))
|
|
17093
17306
|
})] }, t);
|
|
@@ -17107,8 +17320,8 @@ var er = {
|
|
|
17107
17320
|
})]
|
|
17108
17321
|
}) : null
|
|
17109
17322
|
] });
|
|
17110
|
-
}),
|
|
17111
|
-
function
|
|
17323
|
+
}), cr = /^(https?:\/\/|{{)/i;
|
|
17324
|
+
function lr(e) {
|
|
17112
17325
|
let t = [];
|
|
17113
17326
|
switch (e.type) {
|
|
17114
17327
|
case "text":
|
|
@@ -17118,7 +17331,7 @@ function or(e) {
|
|
|
17118
17331
|
});
|
|
17119
17332
|
break;
|
|
17120
17333
|
case "image":
|
|
17121
|
-
e.url ?
|
|
17334
|
+
e.url ? cr.test(e.url) || t.push({
|
|
17122
17335
|
field: "url",
|
|
17123
17336
|
message: "Must be a valid URL"
|
|
17124
17337
|
}) : t.push({
|
|
@@ -17142,7 +17355,7 @@ function or(e) {
|
|
|
17142
17355
|
e.label || t.push({
|
|
17143
17356
|
field: "label",
|
|
17144
17357
|
message: "Label is required"
|
|
17145
|
-
}), e.action ?
|
|
17358
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17146
17359
|
field: "action",
|
|
17147
17360
|
message: "Action is required"
|
|
17148
17361
|
});
|
|
@@ -17151,7 +17364,7 @@ function or(e) {
|
|
|
17151
17364
|
e.icon || t.push({
|
|
17152
17365
|
field: "icon",
|
|
17153
17366
|
message: "Icon is required"
|
|
17154
|
-
}), e.action ?
|
|
17367
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17155
17368
|
field: "action",
|
|
17156
17369
|
message: "Action is required"
|
|
17157
17370
|
});
|
|
@@ -17160,7 +17373,7 @@ function or(e) {
|
|
|
17160
17373
|
e.text || t.push({
|
|
17161
17374
|
field: "text",
|
|
17162
17375
|
message: "Text is required"
|
|
17163
|
-
}), e.action ?
|
|
17376
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17164
17377
|
field: "action",
|
|
17165
17378
|
message: "Action is required"
|
|
17166
17379
|
});
|
|
@@ -17208,7 +17421,7 @@ function or(e) {
|
|
|
17208
17421
|
}
|
|
17209
17422
|
return t;
|
|
17210
17423
|
}
|
|
17211
|
-
function
|
|
17424
|
+
function ur(e, t) {
|
|
17212
17425
|
switch (e.type) {
|
|
17213
17426
|
case "openUrl":
|
|
17214
17427
|
e.url || t.push({
|
|
@@ -17254,13 +17467,13 @@ function sr(e, t) {
|
|
|
17254
17467
|
break;
|
|
17255
17468
|
}
|
|
17256
17469
|
}
|
|
17257
|
-
function
|
|
17258
|
-
return
|
|
17470
|
+
function dr(e) {
|
|
17471
|
+
return lr(e).length > 0;
|
|
17259
17472
|
}
|
|
17260
17473
|
//#endregion
|
|
17261
17474
|
//#region src/components/properties/ElementPropertyEditor.tsx
|
|
17262
|
-
var
|
|
17263
|
-
let n = (0, S.useMemo)(() =>
|
|
17475
|
+
var fr = (0, S.memo)(function({ element: e, onUpdate: t }) {
|
|
17476
|
+
let n = (0, S.useMemo)(() => lr(e), [e]), r = (0, S.useMemo)(() => {
|
|
17264
17477
|
let e = /* @__PURE__ */ new Map();
|
|
17265
17478
|
for (let t of n) e.set(t.field, t.message);
|
|
17266
17479
|
return e;
|
|
@@ -17293,7 +17506,7 @@ var lr = (0, S.memo)(function({ element: e, onUpdate: t }) {
|
|
|
17293
17506
|
n.length === 1 ? "" : "s"
|
|
17294
17507
|
]
|
|
17295
17508
|
}),
|
|
17296
|
-
|
|
17509
|
+
Ar(e, t, r)
|
|
17297
17510
|
] }, e.id);
|
|
17298
17511
|
});
|
|
17299
17512
|
function R({ label: e, children: t, error: n }) {
|
|
@@ -17308,10 +17521,10 @@ function R({ label: e, children: t, error: n }) {
|
|
|
17308
17521
|
}), t]
|
|
17309
17522
|
});
|
|
17310
17523
|
}
|
|
17311
|
-
function
|
|
17312
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
17524
|
+
function pr({ value: e, onChange: t, placeholder: n }) {
|
|
17525
|
+
return /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
17313
17526
|
value: e ?? "",
|
|
17314
|
-
onChange:
|
|
17527
|
+
onChange: t,
|
|
17315
17528
|
placeholder: n
|
|
17316
17529
|
});
|
|
17317
17530
|
}
|
|
@@ -17341,7 +17554,7 @@ function z({ value: e, onChange: t, min: n, max: r, unit: i }) {
|
|
|
17341
17554
|
}) : null]
|
|
17342
17555
|
});
|
|
17343
17556
|
}
|
|
17344
|
-
var
|
|
17557
|
+
var mr = [
|
|
17345
17558
|
{
|
|
17346
17559
|
label: "Small (28px)",
|
|
17347
17560
|
value: 28
|
|
@@ -17355,8 +17568,8 @@ var dr = [
|
|
|
17355
17568
|
value: 48
|
|
17356
17569
|
}
|
|
17357
17570
|
];
|
|
17358
|
-
function
|
|
17359
|
-
let n = e ?? 36, r =
|
|
17571
|
+
function hr({ value: e, onChange: t }) {
|
|
17572
|
+
let n = e ?? 36, r = mr.some((e) => e.value === n), [i, a] = (0, S.useState)(!1), o = i || !r;
|
|
17360
17573
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17361
17574
|
style: {
|
|
17362
17575
|
display: "flex",
|
|
@@ -17372,7 +17585,7 @@ function fr({ value: e, onChange: t }) {
|
|
|
17372
17585
|
}
|
|
17373
17586
|
a(!1), t(Number(e.target.value));
|
|
17374
17587
|
},
|
|
17375
|
-
children: [
|
|
17588
|
+
children: [mr.map((e) => /* @__PURE__ */ (0, P.jsx)("option", {
|
|
17376
17589
|
value: e.value,
|
|
17377
17590
|
children: e.label
|
|
17378
17591
|
}, e.value)), /* @__PURE__ */ (0, P.jsx)("option", {
|
|
@@ -17387,7 +17600,7 @@ function fr({ value: e, onChange: t }) {
|
|
|
17387
17600
|
}) : null]
|
|
17388
17601
|
});
|
|
17389
17602
|
}
|
|
17390
|
-
function
|
|
17603
|
+
function gr({ value: e, onChange: t, options: n }) {
|
|
17391
17604
|
return /* @__PURE__ */ (0, P.jsxs)("select", {
|
|
17392
17605
|
value: e ?? "",
|
|
17393
17606
|
onChange: (e) => t(e.target.value || void 0),
|
|
@@ -17400,7 +17613,7 @@ function pr({ value: e, onChange: t, options: n }) {
|
|
|
17400
17613
|
}, e))]
|
|
17401
17614
|
});
|
|
17402
17615
|
}
|
|
17403
|
-
var
|
|
17616
|
+
var _r = {
|
|
17404
17617
|
width: 32,
|
|
17405
17618
|
height: 28,
|
|
17406
17619
|
padding: 0,
|
|
@@ -17410,18 +17623,18 @@ var mr = {
|
|
|
17410
17623
|
opacity: 0,
|
|
17411
17624
|
top: 0,
|
|
17412
17625
|
left: 0
|
|
17413
|
-
},
|
|
17626
|
+
}, vr = {
|
|
17414
17627
|
display: "flex",
|
|
17415
17628
|
alignItems: "center",
|
|
17416
17629
|
gap: 6
|
|
17417
|
-
},
|
|
17630
|
+
}, yr = {
|
|
17418
17631
|
width: 32,
|
|
17419
17632
|
height: 28,
|
|
17420
17633
|
borderRadius: 4,
|
|
17421
17634
|
position: "relative",
|
|
17422
17635
|
overflow: "hidden",
|
|
17423
17636
|
cursor: "pointer"
|
|
17424
|
-
},
|
|
17637
|
+
}, br = {
|
|
17425
17638
|
padding: "2px 6px",
|
|
17426
17639
|
fontSize: 10,
|
|
17427
17640
|
borderRadius: 4,
|
|
@@ -17429,7 +17642,7 @@ var mr = {
|
|
|
17429
17642
|
border: "1px solid var(--border-medium)",
|
|
17430
17643
|
cursor: "pointer",
|
|
17431
17644
|
color: "var(--text-secondary)"
|
|
17432
|
-
},
|
|
17645
|
+
}, xr = {
|
|
17433
17646
|
width: 32,
|
|
17434
17647
|
height: 28,
|
|
17435
17648
|
borderRadius: 4,
|
|
@@ -17442,30 +17655,30 @@ var mr = {
|
|
|
17442
17655
|
function B({ value: e, onChange: t, fallback: n }) {
|
|
17443
17656
|
let r = e ?? n, i = e == null && n != null;
|
|
17444
17657
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17445
|
-
style:
|
|
17658
|
+
style: vr,
|
|
17446
17659
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
17447
17660
|
style: r ? {
|
|
17448
|
-
...
|
|
17661
|
+
...yr,
|
|
17449
17662
|
background: r,
|
|
17450
17663
|
border: "1px solid var(--border-medium)",
|
|
17451
17664
|
opacity: i ? .5 : 1
|
|
17452
|
-
} :
|
|
17665
|
+
} : xr,
|
|
17453
17666
|
children: /* @__PURE__ */ (0, P.jsx)("input", {
|
|
17454
17667
|
type: "color",
|
|
17455
17668
|
value: r ?? "#000000",
|
|
17456
17669
|
onChange: (e) => t(e.target.value),
|
|
17457
|
-
style:
|
|
17670
|
+
style: _r,
|
|
17458
17671
|
title: i ? `Default: ${n}` : e ?? "No color (transparent)"
|
|
17459
17672
|
})
|
|
17460
|
-
}), e ? /* @__PURE__ */ (0, P.jsx)("button", {
|
|
17673
|
+
}), e && !n ? /* @__PURE__ */ (0, P.jsx)("button", {
|
|
17461
17674
|
onClick: () => t(void 0),
|
|
17462
|
-
style:
|
|
17463
|
-
title:
|
|
17675
|
+
style: br,
|
|
17676
|
+
title: "Remove color",
|
|
17464
17677
|
children: "✕"
|
|
17465
17678
|
}) : null]
|
|
17466
17679
|
});
|
|
17467
17680
|
}
|
|
17468
|
-
function
|
|
17681
|
+
function Sr({ value: e, onChange: t, label: n }) {
|
|
17469
17682
|
return /* @__PURE__ */ (0, P.jsxs)("label", {
|
|
17470
17683
|
style: {
|
|
17471
17684
|
display: "flex",
|
|
@@ -17481,11 +17694,11 @@ function yr({ value: e, onChange: t, label: n }) {
|
|
|
17481
17694
|
}), n]
|
|
17482
17695
|
});
|
|
17483
17696
|
}
|
|
17484
|
-
var
|
|
17697
|
+
var Cr = {
|
|
17485
17698
|
display: "flex",
|
|
17486
17699
|
gap: 4,
|
|
17487
17700
|
alignItems: "center"
|
|
17488
|
-
},
|
|
17701
|
+
}, wr = {
|
|
17489
17702
|
padding: "4px 6px",
|
|
17490
17703
|
fontSize: 10,
|
|
17491
17704
|
borderRadius: 4,
|
|
@@ -17494,18 +17707,18 @@ var br = {
|
|
|
17494
17707
|
cursor: "pointer",
|
|
17495
17708
|
color: "var(--text-secondary)",
|
|
17496
17709
|
whiteSpace: "nowrap"
|
|
17497
|
-
},
|
|
17710
|
+
}, Tr = {
|
|
17498
17711
|
display: "flex",
|
|
17499
17712
|
flexDirection: "column",
|
|
17500
17713
|
gap: 4
|
|
17501
|
-
},
|
|
17714
|
+
}, Er = {
|
|
17502
17715
|
display: "grid",
|
|
17503
17716
|
gridTemplateColumns: "1fr 1fr",
|
|
17504
17717
|
gap: 4
|
|
17505
|
-
},
|
|
17718
|
+
}, Dr = {
|
|
17506
17719
|
fontSize: 10,
|
|
17507
17720
|
color: "var(--text-muted)"
|
|
17508
|
-
},
|
|
17721
|
+
}, Or = {
|
|
17509
17722
|
padding: "2px 6px",
|
|
17510
17723
|
fontSize: 10,
|
|
17511
17724
|
borderRadius: 4,
|
|
@@ -17515,10 +17728,10 @@ var br = {
|
|
|
17515
17728
|
color: "var(--text-secondary)",
|
|
17516
17729
|
alignSelf: "flex-start"
|
|
17517
17730
|
};
|
|
17518
|
-
function
|
|
17731
|
+
function kr({ value: e, onChange: t }) {
|
|
17519
17732
|
let [n, r] = (0, S.useState)(typeof e == "object" && !!e);
|
|
17520
17733
|
if (!n) return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17521
|
-
style:
|
|
17734
|
+
style: Cr,
|
|
17522
17735
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
17523
17736
|
style: { flex: 1 },
|
|
17524
17737
|
children: /* @__PURE__ */ (0, P.jsx)(z, {
|
|
@@ -17538,7 +17751,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17538
17751
|
left: n
|
|
17539
17752
|
});
|
|
17540
17753
|
},
|
|
17541
|
-
style:
|
|
17754
|
+
style: wr,
|
|
17542
17755
|
title: "Edit each side",
|
|
17543
17756
|
children: "⊞"
|
|
17544
17757
|
})]
|
|
@@ -17553,12 +17766,12 @@ function Er({ value: e, onChange: t }) {
|
|
|
17553
17766
|
[e]: n ?? 0
|
|
17554
17767
|
});
|
|
17555
17768
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17556
|
-
style:
|
|
17769
|
+
style: Tr,
|
|
17557
17770
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17558
|
-
style:
|
|
17771
|
+
style: Er,
|
|
17559
17772
|
children: [
|
|
17560
17773
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17561
|
-
style:
|
|
17774
|
+
style: Dr,
|
|
17562
17775
|
children: "Top"
|
|
17563
17776
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17564
17777
|
value: i.top,
|
|
@@ -17567,7 +17780,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17567
17780
|
unit: "px"
|
|
17568
17781
|
})] }),
|
|
17569
17782
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17570
|
-
style:
|
|
17783
|
+
style: Dr,
|
|
17571
17784
|
children: "Right"
|
|
17572
17785
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17573
17786
|
value: i.right,
|
|
@@ -17576,7 +17789,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17576
17789
|
unit: "px"
|
|
17577
17790
|
})] }),
|
|
17578
17791
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17579
|
-
style:
|
|
17792
|
+
style: Dr,
|
|
17580
17793
|
children: "Bottom"
|
|
17581
17794
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17582
17795
|
value: i.bottom,
|
|
@@ -17585,7 +17798,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17585
17798
|
unit: "px"
|
|
17586
17799
|
})] }),
|
|
17587
17800
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17588
|
-
style:
|
|
17801
|
+
style: Dr,
|
|
17589
17802
|
children: "Left"
|
|
17590
17803
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17591
17804
|
value: i.left,
|
|
@@ -17598,12 +17811,12 @@ function Er({ value: e, onChange: t }) {
|
|
|
17598
17811
|
onClick: () => {
|
|
17599
17812
|
r(!1), t(Math.round(((i.top ?? 0) + (i.right ?? 0) + (i.bottom ?? 0) + (i.left ?? 0)) / 4) || void 0);
|
|
17600
17813
|
},
|
|
17601
|
-
style:
|
|
17814
|
+
style: Or,
|
|
17602
17815
|
children: "Collapse"
|
|
17603
17816
|
})]
|
|
17604
17817
|
});
|
|
17605
17818
|
}
|
|
17606
|
-
function
|
|
17819
|
+
function Ar(e, t, n = /* @__PURE__ */ new Map()) {
|
|
17607
17820
|
let r = (e) => n.get(e);
|
|
17608
17821
|
switch (e.type) {
|
|
17609
17822
|
case "text": return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -17612,16 +17825,16 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17612
17825
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17613
17826
|
label: "Content",
|
|
17614
17827
|
error: r("content"),
|
|
17615
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17828
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
17829
|
+
multiline: !0,
|
|
17616
17830
|
rows: 3,
|
|
17617
17831
|
value: e.content,
|
|
17618
|
-
onChange: (e) => t({ content: e
|
|
17619
|
-
style: { resize: "vertical" }
|
|
17832
|
+
onChange: (e) => t({ content: e })
|
|
17620
17833
|
})
|
|
17621
17834
|
}),
|
|
17622
17835
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17623
17836
|
label: "Variant",
|
|
17624
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17837
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17625
17838
|
value: e.variant,
|
|
17626
17839
|
onChange: (e) => t({ variant: e }),
|
|
17627
17840
|
options: [
|
|
@@ -17646,7 +17859,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17646
17859
|
}),
|
|
17647
17860
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17648
17861
|
label: "Align",
|
|
17649
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17862
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17650
17863
|
value: e.align,
|
|
17651
17864
|
onChange: (e) => t({ align: e }),
|
|
17652
17865
|
options: [
|
|
@@ -17659,7 +17872,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17659
17872
|
}),
|
|
17660
17873
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17661
17874
|
label: "Font Weight",
|
|
17662
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17875
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17663
17876
|
value: e.fontWeight,
|
|
17664
17877
|
onChange: (e) => t({ fontWeight: e }),
|
|
17665
17878
|
options: [
|
|
@@ -17679,7 +17892,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17679
17892
|
}),
|
|
17680
17893
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17681
17894
|
label: "Padding",
|
|
17682
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17895
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17683
17896
|
value: e.padding,
|
|
17684
17897
|
onChange: (e) => t({ padding: e })
|
|
17685
17898
|
})
|
|
@@ -17692,7 +17905,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17692
17905
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17693
17906
|
label: "URL",
|
|
17694
17907
|
error: r("url"),
|
|
17695
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17908
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17696
17909
|
value: e.url,
|
|
17697
17910
|
onChange: (e) => t({ url: e }),
|
|
17698
17911
|
placeholder: "https://..."
|
|
@@ -17717,14 +17930,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17717
17930
|
}) : null,
|
|
17718
17931
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17719
17932
|
label: "Alt Text",
|
|
17720
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17933
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17721
17934
|
value: e.altText ?? "",
|
|
17722
17935
|
onChange: (e) => t({ altText: e })
|
|
17723
17936
|
})
|
|
17724
17937
|
}),
|
|
17725
17938
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17726
17939
|
label: "Fit",
|
|
17727
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17940
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17728
17941
|
value: e.fit,
|
|
17729
17942
|
onChange: (e) => t({ fit: e }),
|
|
17730
17943
|
options: [
|
|
@@ -17761,7 +17974,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17761
17974
|
}),
|
|
17762
17975
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17763
17976
|
label: "Padding",
|
|
17764
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17977
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17765
17978
|
value: e.padding,
|
|
17766
17979
|
onChange: (e) => t({ padding: e })
|
|
17767
17980
|
})
|
|
@@ -17774,7 +17987,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17774
17987
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17775
17988
|
label: "Name",
|
|
17776
17989
|
error: r("name"),
|
|
17777
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17990
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
17778
17991
|
value: e.name,
|
|
17779
17992
|
onChange: (e) => t({ name: e })
|
|
17780
17993
|
})
|
|
@@ -17828,21 +18041,21 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17828
18041
|
children: [
|
|
17829
18042
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17830
18043
|
label: "Image URL",
|
|
17831
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18044
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17832
18045
|
value: e.imageUrl ?? "",
|
|
17833
18046
|
onChange: (e) => t({ imageUrl: e })
|
|
17834
18047
|
})
|
|
17835
18048
|
}),
|
|
17836
18049
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17837
18050
|
label: "Fallback Initials",
|
|
17838
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18051
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17839
18052
|
value: e.fallbackInitials ?? "",
|
|
17840
18053
|
onChange: (e) => t({ fallbackInitials: e.slice(0, 2) })
|
|
17841
18054
|
})
|
|
17842
18055
|
}),
|
|
17843
18056
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17844
18057
|
label: "Size",
|
|
17845
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18058
|
+
children: /* @__PURE__ */ (0, P.jsx)(hr, {
|
|
17846
18059
|
value: e.size,
|
|
17847
18060
|
onChange: (e) => t({ size: e })
|
|
17848
18061
|
})
|
|
@@ -17874,7 +18087,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17874
18087
|
}),
|
|
17875
18088
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17876
18089
|
label: "Font Weight",
|
|
17877
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18090
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17878
18091
|
value: e.fontWeight,
|
|
17879
18092
|
onChange: (e) => t({ fontWeight: e }),
|
|
17880
18093
|
options: [
|
|
@@ -17892,7 +18105,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17892
18105
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17893
18106
|
label: "Text",
|
|
17894
18107
|
error: r("text"),
|
|
17895
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18108
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17896
18109
|
value: e.text,
|
|
17897
18110
|
onChange: (e) => t({ text: e })
|
|
17898
18111
|
})
|
|
@@ -17951,7 +18164,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17951
18164
|
}),
|
|
17952
18165
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17953
18166
|
label: "Padding",
|
|
17954
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18167
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17955
18168
|
value: e.padding,
|
|
17956
18169
|
onChange: (e) => t({ padding: e })
|
|
17957
18170
|
})
|
|
@@ -18017,14 +18230,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18017
18230
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18018
18231
|
label: "Text",
|
|
18019
18232
|
error: r("text"),
|
|
18020
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18233
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18021
18234
|
value: e.text,
|
|
18022
18235
|
onChange: (e) => t({ text: e })
|
|
18023
18236
|
})
|
|
18024
18237
|
}),
|
|
18025
18238
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18026
18239
|
label: "Icon",
|
|
18027
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18240
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18028
18241
|
value: e.icon ?? "",
|
|
18029
18242
|
onChange: (e) => t({ icon: e })
|
|
18030
18243
|
})
|
|
@@ -18074,7 +18287,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18074
18287
|
}),
|
|
18075
18288
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18076
18289
|
label: "Padding",
|
|
18077
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18290
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18078
18291
|
value: e.padding,
|
|
18079
18292
|
onChange: (e) => t({ padding: e })
|
|
18080
18293
|
})
|
|
@@ -18139,7 +18352,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18139
18352
|
}),
|
|
18140
18353
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18141
18354
|
label: "Label",
|
|
18142
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18355
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18143
18356
|
value: e.label ?? "",
|
|
18144
18357
|
onChange: (e) => t({ label: e })
|
|
18145
18358
|
})
|
|
@@ -18169,7 +18382,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18169
18382
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18170
18383
|
label: "Label",
|
|
18171
18384
|
error: r("label"),
|
|
18172
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18385
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18173
18386
|
value: e.label,
|
|
18174
18387
|
onChange: (e) => t({ label: e })
|
|
18175
18388
|
})
|
|
@@ -18228,27 +18441,27 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18228
18441
|
}),
|
|
18229
18442
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18230
18443
|
label: "Icon",
|
|
18231
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18444
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18232
18445
|
value: e.icon ?? "",
|
|
18233
18446
|
onChange: (e) => t({ icon: e })
|
|
18234
18447
|
})
|
|
18235
18448
|
}),
|
|
18236
18449
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18237
18450
|
label: "Icon Position",
|
|
18238
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18451
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18239
18452
|
value: e.iconPosition,
|
|
18240
18453
|
onChange: (e) => t({ iconPosition: e }),
|
|
18241
18454
|
options: ["left", "right"]
|
|
18242
18455
|
})
|
|
18243
18456
|
}),
|
|
18244
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18457
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18245
18458
|
value: e.fullWidth,
|
|
18246
18459
|
onChange: (e) => t({ fullWidth: e }),
|
|
18247
18460
|
label: "Full Width"
|
|
18248
18461
|
}),
|
|
18249
18462
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18250
18463
|
label: "Padding",
|
|
18251
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18464
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18252
18465
|
value: e.padding,
|
|
18253
18466
|
onChange: (e) => t({ padding: e })
|
|
18254
18467
|
})
|
|
@@ -18267,7 +18480,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18267
18480
|
style: { marginTop: 12 },
|
|
18268
18481
|
children: "Action"
|
|
18269
18482
|
}),
|
|
18270
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18483
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18271
18484
|
action: e.action,
|
|
18272
18485
|
onChange: (e) => t({ action: e })
|
|
18273
18486
|
})
|
|
@@ -18279,7 +18492,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18279
18492
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18280
18493
|
label: "Icon",
|
|
18281
18494
|
error: r("icon"),
|
|
18282
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18495
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18283
18496
|
value: e.icon,
|
|
18284
18497
|
onChange: (e) => t({ icon: e })
|
|
18285
18498
|
})
|
|
@@ -18322,7 +18535,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18322
18535
|
style: { marginTop: 12 },
|
|
18323
18536
|
children: "Action"
|
|
18324
18537
|
}),
|
|
18325
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18538
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18326
18539
|
action: e.action,
|
|
18327
18540
|
onChange: (e) => t({ action: e })
|
|
18328
18541
|
})
|
|
@@ -18334,7 +18547,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18334
18547
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18335
18548
|
label: "Text",
|
|
18336
18549
|
error: r("text"),
|
|
18337
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18550
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18338
18551
|
value: e.text,
|
|
18339
18552
|
onChange: (e) => t({ text: e })
|
|
18340
18553
|
})
|
|
@@ -18356,7 +18569,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18356
18569
|
unit: "px"
|
|
18357
18570
|
})
|
|
18358
18571
|
}),
|
|
18359
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18572
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18360
18573
|
value: e.underline,
|
|
18361
18574
|
onChange: (e) => t({ underline: e }),
|
|
18362
18575
|
label: "Underline"
|
|
@@ -18366,7 +18579,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18366
18579
|
style: { marginTop: 12 },
|
|
18367
18580
|
children: "Action"
|
|
18368
18581
|
}),
|
|
18369
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18582
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18370
18583
|
action: e.action,
|
|
18371
18584
|
onChange: (e) => t({ action: e })
|
|
18372
18585
|
})
|
|
@@ -18378,7 +18591,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18378
18591
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18379
18592
|
label: "Columns (comma-separated)",
|
|
18380
18593
|
error: r("columns"),
|
|
18381
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18594
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18382
18595
|
value: e.columns.join(", "),
|
|
18383
18596
|
onChange: (e) => t({ columns: e.split(",").map((e) => e.trim()) })
|
|
18384
18597
|
})
|
|
@@ -18444,12 +18657,12 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18444
18657
|
onChange: (e) => t({ headerBackgroundColor: e })
|
|
18445
18658
|
})
|
|
18446
18659
|
}),
|
|
18447
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18660
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18448
18661
|
value: e.border,
|
|
18449
18662
|
onChange: (e) => t({ border: e }),
|
|
18450
18663
|
label: "Show Borders"
|
|
18451
18664
|
}),
|
|
18452
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18665
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18453
18666
|
value: e.stripedRows,
|
|
18454
18667
|
onChange: (e) => t({ stripedRows: e }),
|
|
18455
18668
|
label: "Striped Rows"
|
|
@@ -18506,7 +18719,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18506
18719
|
}),
|
|
18507
18720
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18508
18721
|
label: "Align",
|
|
18509
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18722
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18510
18723
|
value: e.align,
|
|
18511
18724
|
onChange: (e) => t({ align: e }),
|
|
18512
18725
|
options: [
|
|
@@ -18518,7 +18731,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18518
18731
|
]
|
|
18519
18732
|
})
|
|
18520
18733
|
}),
|
|
18521
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18734
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18522
18735
|
value: e.wrap,
|
|
18523
18736
|
onChange: (e) => t({ wrap: e }),
|
|
18524
18737
|
label: "Wrap"
|
|
@@ -18528,7 +18741,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18528
18741
|
style: { marginTop: 12 },
|
|
18529
18742
|
children: "Scrollable"
|
|
18530
18743
|
}),
|
|
18531
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18744
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18532
18745
|
value: e.scrollable,
|
|
18533
18746
|
onChange: (e) => t({ scrollable: e }),
|
|
18534
18747
|
label: "Scrollable (Carousel)"
|
|
@@ -18543,7 +18756,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18543
18756
|
})
|
|
18544
18757
|
}), /* @__PURE__ */ (0, P.jsx)(R, {
|
|
18545
18758
|
label: "Snap",
|
|
18546
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18759
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18547
18760
|
value: e.snap,
|
|
18548
18761
|
onChange: (e) => t({ snap: e }),
|
|
18549
18762
|
options: ["item", "free"]
|
|
@@ -18556,7 +18769,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18556
18769
|
}),
|
|
18557
18770
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18558
18771
|
label: "Padding",
|
|
18559
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18772
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18560
18773
|
value: e.padding,
|
|
18561
18774
|
onChange: (e) => t({ padding: e })
|
|
18562
18775
|
})
|
|
@@ -18630,7 +18843,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18630
18843
|
}),
|
|
18631
18844
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18632
18845
|
label: "Align",
|
|
18633
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18846
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18634
18847
|
value: e.align,
|
|
18635
18848
|
onChange: (e) => t({ align: e }),
|
|
18636
18849
|
options: [
|
|
@@ -18648,7 +18861,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18648
18861
|
}),
|
|
18649
18862
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18650
18863
|
label: "Padding",
|
|
18651
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18864
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18652
18865
|
value: e.padding,
|
|
18653
18866
|
onChange: (e) => t({ padding: e })
|
|
18654
18867
|
})
|
|
@@ -18713,7 +18926,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18713
18926
|
}),
|
|
18714
18927
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18715
18928
|
label: "Columns",
|
|
18716
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18929
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18717
18930
|
value: String(e.columns ?? 2),
|
|
18718
18931
|
onChange: (e) => t({ columns: Number(e) }),
|
|
18719
18932
|
options: [
|
|
@@ -18739,7 +18952,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18739
18952
|
}),
|
|
18740
18953
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18741
18954
|
label: "Padding",
|
|
18742
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18955
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18743
18956
|
value: e.padding,
|
|
18744
18957
|
onChange: (e) => t({ padding: e })
|
|
18745
18958
|
})
|
|
@@ -18801,31 +19014,31 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18801
19014
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18802
19015
|
label: "Header",
|
|
18803
19016
|
error: r("header"),
|
|
18804
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19017
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18805
19018
|
value: e.header,
|
|
18806
19019
|
onChange: (e) => t({ header: e })
|
|
18807
19020
|
})
|
|
18808
19021
|
}),
|
|
18809
19022
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18810
19023
|
label: "Header Icon",
|
|
18811
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19024
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18812
19025
|
value: e.headerIcon ?? "",
|
|
18813
19026
|
onChange: (e) => t({ headerIcon: e })
|
|
18814
19027
|
})
|
|
18815
19028
|
}),
|
|
18816
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
19029
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18817
19030
|
value: e.expandedByDefault,
|
|
18818
19031
|
onChange: (e) => t({ expandedByDefault: e }),
|
|
18819
19032
|
label: "Expanded by Default"
|
|
18820
19033
|
}),
|
|
18821
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
19034
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18822
19035
|
value: e.border,
|
|
18823
19036
|
onChange: (e) => t({ border: e }),
|
|
18824
19037
|
label: "Show Border"
|
|
18825
19038
|
}),
|
|
18826
19039
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18827
19040
|
label: "Padding",
|
|
18828
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19041
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18829
19042
|
value: e.padding,
|
|
18830
19043
|
onChange: (e) => t({ padding: e })
|
|
18831
19044
|
})
|
|
@@ -18841,7 +19054,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18841
19054
|
}),
|
|
18842
19055
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18843
19056
|
label: "Font Weight",
|
|
18844
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19057
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18845
19058
|
value: e.fontWeight,
|
|
18846
19059
|
onChange: (e) => t({ fontWeight: e }),
|
|
18847
19060
|
options: [
|
|
@@ -18867,7 +19080,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18867
19080
|
children: [
|
|
18868
19081
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18869
19082
|
label: "Tab Labels (comma-separated)",
|
|
18870
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19083
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18871
19084
|
value: e.tabs.map((e) => e.label).join(", "),
|
|
18872
19085
|
onChange: (n) => {
|
|
18873
19086
|
t({ tabs: n.split(",").map((e) => e.trim()).map((t, n) => ({
|
|
@@ -18890,7 +19103,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18890
19103
|
}),
|
|
18891
19104
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18892
19105
|
label: "Tab Align",
|
|
18893
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19106
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18894
19107
|
value: e.tabAlign,
|
|
18895
19108
|
onChange: (e) => t({ tabAlign: e }),
|
|
18896
19109
|
options: [
|
|
@@ -18902,14 +19115,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18902
19115
|
}),
|
|
18903
19116
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18904
19117
|
label: "Tab Padding",
|
|
18905
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19118
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18906
19119
|
value: e.tabPadding,
|
|
18907
19120
|
onChange: (e) => t({ tabPadding: e })
|
|
18908
19121
|
})
|
|
18909
19122
|
}),
|
|
18910
19123
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18911
19124
|
label: "Content Padding",
|
|
18912
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19125
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18913
19126
|
value: e.contentPadding,
|
|
18914
19127
|
onChange: (e) => t({ contentPadding: e })
|
|
18915
19128
|
})
|
|
@@ -18931,19 +19144,17 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18931
19144
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18932
19145
|
label: "Content",
|
|
18933
19146
|
error: r("content"),
|
|
18934
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19147
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19148
|
+
multiline: !0,
|
|
18935
19149
|
rows: 4,
|
|
18936
19150
|
value: e.content,
|
|
18937
|
-
onChange: (e) => t({ content: e
|
|
18938
|
-
style: {
|
|
18939
|
-
fontFamily: "monospace",
|
|
18940
|
-
resize: "vertical"
|
|
18941
|
-
}
|
|
19151
|
+
onChange: (e) => t({ content: e }),
|
|
19152
|
+
style: { fontFamily: "monospace" }
|
|
18942
19153
|
})
|
|
18943
19154
|
}),
|
|
18944
19155
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18945
19156
|
label: "Language",
|
|
18946
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19157
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18947
19158
|
value: e.language ?? "",
|
|
18948
19159
|
onChange: (e) => t({ language: e })
|
|
18949
19160
|
})
|
|
@@ -18964,7 +19175,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18964
19175
|
}),
|
|
18965
19176
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18966
19177
|
label: "Padding",
|
|
18967
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19178
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18968
19179
|
value: e.padding,
|
|
18969
19180
|
onChange: (e) => t({ padding: e })
|
|
18970
19181
|
})
|
|
@@ -19011,11 +19222,11 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
19011
19222
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
19012
19223
|
label: "Content",
|
|
19013
19224
|
error: r("content"),
|
|
19014
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19225
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19226
|
+
multiline: !0,
|
|
19015
19227
|
rows: 4,
|
|
19016
19228
|
value: e.content,
|
|
19017
|
-
onChange: (e) => t({ content: e
|
|
19018
|
-
style: { resize: "vertical" }
|
|
19229
|
+
onChange: (e) => t({ content: e })
|
|
19019
19230
|
})
|
|
19020
19231
|
}),
|
|
19021
19232
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
@@ -19059,7 +19270,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
19059
19270
|
}
|
|
19060
19271
|
//#endregion
|
|
19061
19272
|
//#region src/components/properties/BubbleSettingsEditor.tsx
|
|
19062
|
-
var
|
|
19273
|
+
var jr = (0, S.memo)(function() {
|
|
19063
19274
|
let e = N((e) => e.settings), t = N((e) => e.updateSettings), n = N((e) => e.fallbackText), r = N((e) => e.notificationText), i = N((e) => e.setFallbackText), a = N((e) => e.setNotificationText);
|
|
19064
19275
|
return /* @__PURE__ */ (0, P.jsxs)("div", { children: [
|
|
19065
19276
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
@@ -19166,12 +19377,12 @@ var Or = (0, S.memo)(function() {
|
|
|
19166
19377
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
19167
19378
|
className: "prop-label",
|
|
19168
19379
|
children: "Fallback Text (required)"
|
|
19169
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
19380
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19381
|
+
multiline: !0,
|
|
19170
19382
|
rows: 3,
|
|
19171
19383
|
value: n,
|
|
19172
|
-
onChange:
|
|
19173
|
-
placeholder: "Plain text for older UI Kit versions"
|
|
19174
|
-
style: { resize: "vertical" }
|
|
19384
|
+
onChange: i,
|
|
19385
|
+
placeholder: "Plain text for older UI Kit versions"
|
|
19175
19386
|
})]
|
|
19176
19387
|
}),
|
|
19177
19388
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -19179,52 +19390,52 @@ var Or = (0, S.memo)(function() {
|
|
|
19179
19390
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
19180
19391
|
className: "prop-label",
|
|
19181
19392
|
children: "Notification Text"
|
|
19182
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
19393
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19394
|
+
multiline: !0,
|
|
19183
19395
|
rows: 2,
|
|
19184
19396
|
value: r,
|
|
19185
|
-
onChange:
|
|
19186
|
-
placeholder: "Text for push notifications"
|
|
19187
|
-
style: { resize: "vertical" }
|
|
19397
|
+
onChange: a,
|
|
19398
|
+
placeholder: "Text for push notifications"
|
|
19188
19399
|
})]
|
|
19189
19400
|
})
|
|
19190
19401
|
]
|
|
19191
19402
|
})
|
|
19192
19403
|
] });
|
|
19193
|
-
}),
|
|
19194
|
-
function
|
|
19404
|
+
}), Mr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
19405
|
+
function Nr(e) {
|
|
19195
19406
|
let t = Object.prototype.toString.call(e);
|
|
19196
19407
|
return t === "[object Window]" || t === "[object global]";
|
|
19197
19408
|
}
|
|
19198
|
-
function
|
|
19409
|
+
function Pr(e) {
|
|
19199
19410
|
return "nodeType" in e;
|
|
19200
19411
|
}
|
|
19201
|
-
function
|
|
19202
|
-
return e ?
|
|
19412
|
+
function Fr(e) {
|
|
19413
|
+
return e ? Nr(e) ? e : Pr(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
19203
19414
|
}
|
|
19204
|
-
function
|
|
19205
|
-
let { Document: t } =
|
|
19415
|
+
function Ir(e) {
|
|
19416
|
+
let { Document: t } = Fr(e);
|
|
19206
19417
|
return e instanceof t;
|
|
19207
19418
|
}
|
|
19208
|
-
function
|
|
19209
|
-
return
|
|
19419
|
+
function Lr(e) {
|
|
19420
|
+
return Nr(e) ? !1 : e instanceof Fr(e).HTMLElement;
|
|
19210
19421
|
}
|
|
19211
|
-
function
|
|
19212
|
-
return e instanceof
|
|
19422
|
+
function Rr(e) {
|
|
19423
|
+
return e instanceof Fr(e).SVGElement;
|
|
19213
19424
|
}
|
|
19214
|
-
function
|
|
19215
|
-
return e ?
|
|
19425
|
+
function zr(e) {
|
|
19426
|
+
return e ? Nr(e) ? e.document : Pr(e) ? Ir(e) ? e : Lr(e) || Rr(e) ? e.ownerDocument : document : document : document;
|
|
19216
19427
|
}
|
|
19217
|
-
var
|
|
19218
|
-
function
|
|
19428
|
+
var Br = Mr ? S.useLayoutEffect : S.useEffect;
|
|
19429
|
+
function Vr(e) {
|
|
19219
19430
|
let t = (0, S.useRef)(e);
|
|
19220
|
-
return
|
|
19431
|
+
return Br(() => {
|
|
19221
19432
|
t.current = e;
|
|
19222
19433
|
}), (0, S.useCallback)(function() {
|
|
19223
19434
|
var e = [...arguments];
|
|
19224
19435
|
return t.current == null ? void 0 : t.current(...e);
|
|
19225
19436
|
}, []);
|
|
19226
19437
|
}
|
|
19227
|
-
function
|
|
19438
|
+
function Hr() {
|
|
19228
19439
|
let e = (0, S.useRef)(null);
|
|
19229
19440
|
return [(0, S.useCallback)((t, n) => {
|
|
19230
19441
|
e.current = setInterval(t, n);
|
|
@@ -19232,41 +19443,41 @@ function zr() {
|
|
|
19232
19443
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
19233
19444
|
}, [])];
|
|
19234
19445
|
}
|
|
19235
|
-
function
|
|
19446
|
+
function Ur(e, t) {
|
|
19236
19447
|
t === void 0 && (t = [e]);
|
|
19237
19448
|
let n = (0, S.useRef)(e);
|
|
19238
|
-
return
|
|
19449
|
+
return Br(() => {
|
|
19239
19450
|
n.current !== e && (n.current = e);
|
|
19240
19451
|
}, t), n;
|
|
19241
19452
|
}
|
|
19242
|
-
function
|
|
19453
|
+
function Wr(e, t) {
|
|
19243
19454
|
let n = (0, S.useRef)();
|
|
19244
19455
|
return (0, S.useMemo)(() => {
|
|
19245
19456
|
let t = e(n.current);
|
|
19246
19457
|
return n.current = t, t;
|
|
19247
19458
|
}, [...t]);
|
|
19248
19459
|
}
|
|
19249
|
-
function
|
|
19250
|
-
let t =
|
|
19460
|
+
function Gr(e) {
|
|
19461
|
+
let t = Vr(e), n = (0, S.useRef)(null);
|
|
19251
19462
|
return [n, (0, S.useCallback)((e) => {
|
|
19252
19463
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
19253
19464
|
}, [])];
|
|
19254
19465
|
}
|
|
19255
|
-
function
|
|
19466
|
+
function Kr(e) {
|
|
19256
19467
|
let t = (0, S.useRef)();
|
|
19257
19468
|
return (0, S.useEffect)(() => {
|
|
19258
19469
|
t.current = e;
|
|
19259
19470
|
}, [e]), t.current;
|
|
19260
19471
|
}
|
|
19261
|
-
var
|
|
19262
|
-
function
|
|
19472
|
+
var qr = {};
|
|
19473
|
+
function Jr(e, t) {
|
|
19263
19474
|
return (0, S.useMemo)(() => {
|
|
19264
19475
|
if (t) return t;
|
|
19265
|
-
let n =
|
|
19266
|
-
return
|
|
19476
|
+
let n = qr[e] == null ? 0 : qr[e] + 1;
|
|
19477
|
+
return qr[e] = n, e + "-" + n;
|
|
19267
19478
|
}, [e, t]);
|
|
19268
19479
|
}
|
|
19269
|
-
function
|
|
19480
|
+
function Yr(e) {
|
|
19270
19481
|
return function(t) {
|
|
19271
19482
|
return [...arguments].slice(1).reduce((t, n) => {
|
|
19272
19483
|
let r = Object.entries(n);
|
|
@@ -19278,22 +19489,22 @@ function Kr(e) {
|
|
|
19278
19489
|
}, { ...t });
|
|
19279
19490
|
};
|
|
19280
19491
|
}
|
|
19281
|
-
var
|
|
19282
|
-
function
|
|
19492
|
+
var Xr = /* @__PURE__ */ Yr(1), Zr = /* @__PURE__ */ Yr(-1);
|
|
19493
|
+
function Qr(e) {
|
|
19283
19494
|
return "clientX" in e && "clientY" in e;
|
|
19284
19495
|
}
|
|
19285
|
-
function
|
|
19496
|
+
function $r(e) {
|
|
19286
19497
|
if (!e) return !1;
|
|
19287
|
-
let { KeyboardEvent: t } =
|
|
19498
|
+
let { KeyboardEvent: t } = Fr(e.target);
|
|
19288
19499
|
return t && e instanceof t;
|
|
19289
19500
|
}
|
|
19290
|
-
function
|
|
19501
|
+
function ei(e) {
|
|
19291
19502
|
if (!e) return !1;
|
|
19292
|
-
let { TouchEvent: t } =
|
|
19503
|
+
let { TouchEvent: t } = Fr(e.target);
|
|
19293
19504
|
return t && e instanceof t;
|
|
19294
19505
|
}
|
|
19295
|
-
function
|
|
19296
|
-
if (
|
|
19506
|
+
function ti(e) {
|
|
19507
|
+
if (ei(e)) {
|
|
19297
19508
|
if (e.touches && e.touches.length) {
|
|
19298
19509
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
19299
19510
|
return {
|
|
@@ -19308,12 +19519,12 @@ function Qr(e) {
|
|
|
19308
19519
|
};
|
|
19309
19520
|
}
|
|
19310
19521
|
}
|
|
19311
|
-
return
|
|
19522
|
+
return Qr(e) ? {
|
|
19312
19523
|
x: e.clientX,
|
|
19313
19524
|
y: e.clientY
|
|
19314
19525
|
} : null;
|
|
19315
19526
|
}
|
|
19316
|
-
var
|
|
19527
|
+
var ni = /* @__PURE__ */ Object.freeze({
|
|
19317
19528
|
Translate: { toString(e) {
|
|
19318
19529
|
if (!e) return;
|
|
19319
19530
|
let { x: t, y: n } = e;
|
|
@@ -19325,27 +19536,27 @@ var $r = /* @__PURE__ */ Object.freeze({
|
|
|
19325
19536
|
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
19326
19537
|
} },
|
|
19327
19538
|
Transform: { toString(e) {
|
|
19328
|
-
if (e) return [
|
|
19539
|
+
if (e) return [ni.Translate.toString(e), ni.Scale.toString(e)].join(" ");
|
|
19329
19540
|
} },
|
|
19330
19541
|
Transition: { toString(e) {
|
|
19331
19542
|
let { property: t, duration: n, easing: r } = e;
|
|
19332
19543
|
return t + " " + n + "ms " + r;
|
|
19333
19544
|
} }
|
|
19334
|
-
}),
|
|
19335
|
-
function
|
|
19336
|
-
return e.matches(
|
|
19545
|
+
}), ri = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
19546
|
+
function ii(e) {
|
|
19547
|
+
return e.matches(ri) ? e : e.querySelector(ri);
|
|
19337
19548
|
}
|
|
19338
19549
|
//#endregion
|
|
19339
19550
|
//#region node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
19340
|
-
var
|
|
19341
|
-
function
|
|
19551
|
+
var ai = { display: "none" };
|
|
19552
|
+
function oi(e) {
|
|
19342
19553
|
let { id: t, value: n } = e;
|
|
19343
19554
|
return S.createElement("div", {
|
|
19344
19555
|
id: t,
|
|
19345
|
-
style:
|
|
19556
|
+
style: ai
|
|
19346
19557
|
}, n);
|
|
19347
19558
|
}
|
|
19348
|
-
function
|
|
19559
|
+
function si(e) {
|
|
19349
19560
|
let { id: t, announcement: n, ariaLiveType: r = "assertive" } = e;
|
|
19350
19561
|
return S.createElement("div", {
|
|
19351
19562
|
id: t,
|
|
@@ -19368,7 +19579,7 @@ function ii(e) {
|
|
|
19368
19579
|
"aria-atomic": !0
|
|
19369
19580
|
}, n);
|
|
19370
19581
|
}
|
|
19371
|
-
function
|
|
19582
|
+
function ci() {
|
|
19372
19583
|
let [e, t] = (0, S.useState)("");
|
|
19373
19584
|
return {
|
|
19374
19585
|
announce: (0, S.useCallback)((e) => {
|
|
@@ -19379,22 +19590,22 @@ function ai() {
|
|
|
19379
19590
|
}
|
|
19380
19591
|
//#endregion
|
|
19381
19592
|
//#region node_modules/@dnd-kit/core/dist/core.esm.js
|
|
19382
|
-
var
|
|
19383
|
-
function
|
|
19384
|
-
let t = (0, S.useContext)(
|
|
19593
|
+
var li = /* @__PURE__ */ (0, S.createContext)(null);
|
|
19594
|
+
function ui(e) {
|
|
19595
|
+
let t = (0, S.useContext)(li);
|
|
19385
19596
|
(0, S.useEffect)(() => {
|
|
19386
19597
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
19387
19598
|
return t(e);
|
|
19388
19599
|
}, [e, t]);
|
|
19389
19600
|
}
|
|
19390
|
-
function
|
|
19601
|
+
function di() {
|
|
19391
19602
|
let [e] = (0, S.useState)(() => /* @__PURE__ */ new Set()), t = (0, S.useCallback)((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
19392
19603
|
return [(0, S.useCallback)((t) => {
|
|
19393
19604
|
let { type: n, event: r } = t;
|
|
19394
19605
|
e.forEach((e) => e[n]?.call(e, r));
|
|
19395
19606
|
}, [e]), t];
|
|
19396
19607
|
}
|
|
19397
|
-
var
|
|
19608
|
+
var fi = { draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n " }, pi = {
|
|
19398
19609
|
onDragStart(e) {
|
|
19399
19610
|
let { active: t } = e;
|
|
19400
19611
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -19412,11 +19623,11 @@ var li = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
19412
19623
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
19413
19624
|
}
|
|
19414
19625
|
};
|
|
19415
|
-
function
|
|
19416
|
-
let { announcements: t =
|
|
19626
|
+
function mi(e) {
|
|
19627
|
+
let { announcements: t = pi, container: n, hiddenTextDescribedById: r, screenReaderInstructions: i = fi } = e, { announce: a, announcement: o } = ci(), s = Jr("DndLiveRegion"), [c, l] = (0, S.useState)(!1);
|
|
19417
19628
|
if ((0, S.useEffect)(() => {
|
|
19418
19629
|
l(!0);
|
|
19419
|
-
}, []),
|
|
19630
|
+
}, []), ui((0, S.useMemo)(() => ({
|
|
19420
19631
|
onDragStart(e) {
|
|
19421
19632
|
let { active: n } = e;
|
|
19422
19633
|
a(t.onDragStart({ active: n }));
|
|
@@ -19450,39 +19661,39 @@ function di(e) {
|
|
|
19450
19661
|
}));
|
|
19451
19662
|
}
|
|
19452
19663
|
}), [a, t])), !c) return null;
|
|
19453
|
-
let u = S.createElement(S.Fragment, null, S.createElement(
|
|
19664
|
+
let u = S.createElement(S.Fragment, null, S.createElement(oi, {
|
|
19454
19665
|
id: r,
|
|
19455
19666
|
value: i.draggable
|
|
19456
|
-
}), S.createElement(
|
|
19667
|
+
}), S.createElement(si, {
|
|
19457
19668
|
id: s,
|
|
19458
19669
|
announcement: o
|
|
19459
19670
|
}));
|
|
19460
19671
|
return n ? (0, An.createPortal)(u, n) : u;
|
|
19461
19672
|
}
|
|
19462
|
-
var
|
|
19673
|
+
var hi;
|
|
19463
19674
|
(function(e) {
|
|
19464
19675
|
e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
|
|
19465
|
-
})(
|
|
19466
|
-
function
|
|
19467
|
-
function
|
|
19676
|
+
})(hi ||= {});
|
|
19677
|
+
function gi() {}
|
|
19678
|
+
function _i(e, t) {
|
|
19468
19679
|
return (0, S.useMemo)(() => ({
|
|
19469
19680
|
sensor: e,
|
|
19470
19681
|
options: t ?? {}
|
|
19471
19682
|
}), [e, t]);
|
|
19472
19683
|
}
|
|
19473
|
-
function
|
|
19684
|
+
function vi() {
|
|
19474
19685
|
var e = [...arguments];
|
|
19475
19686
|
return (0, S.useMemo)(() => [...e].filter((e) => e != null), [...e]);
|
|
19476
19687
|
}
|
|
19477
|
-
var
|
|
19688
|
+
var yi = /* @__PURE__ */ Object.freeze({
|
|
19478
19689
|
x: 0,
|
|
19479
19690
|
y: 0
|
|
19480
19691
|
});
|
|
19481
|
-
function
|
|
19692
|
+
function bi(e, t) {
|
|
19482
19693
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
19483
19694
|
}
|
|
19484
|
-
function
|
|
19485
|
-
let n =
|
|
19695
|
+
function xi(e, t) {
|
|
19696
|
+
let n = ti(e);
|
|
19486
19697
|
if (!n) return "0 0";
|
|
19487
19698
|
let r = {
|
|
19488
19699
|
x: (n.x - t.left) / t.width * 100,
|
|
@@ -19490,31 +19701,31 @@ function vi(e, t) {
|
|
|
19490
19701
|
};
|
|
19491
19702
|
return r.x + "% " + r.y + "%";
|
|
19492
19703
|
}
|
|
19493
|
-
function
|
|
19704
|
+
function Si(e, t) {
|
|
19494
19705
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
19495
19706
|
return n - r;
|
|
19496
19707
|
}
|
|
19497
|
-
function
|
|
19708
|
+
function Ci(e, t) {
|
|
19498
19709
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
19499
19710
|
return r - n;
|
|
19500
19711
|
}
|
|
19501
|
-
function
|
|
19712
|
+
function wi(e, t) {
|
|
19502
19713
|
if (!e || e.length === 0) return null;
|
|
19503
19714
|
let [n] = e;
|
|
19504
19715
|
return t ? n[t] : n;
|
|
19505
19716
|
}
|
|
19506
|
-
function
|
|
19717
|
+
function Ti(e, t, n) {
|
|
19507
19718
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
19508
19719
|
x: t + e.width * .5,
|
|
19509
19720
|
y: n + e.height * .5
|
|
19510
19721
|
};
|
|
19511
19722
|
}
|
|
19512
|
-
var
|
|
19513
|
-
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i =
|
|
19723
|
+
var Ei = (e) => {
|
|
19724
|
+
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = Ti(t, t.left, t.top), a = [];
|
|
19514
19725
|
for (let e of r) {
|
|
19515
19726
|
let { id: t } = e, r = n.get(t);
|
|
19516
19727
|
if (r) {
|
|
19517
|
-
let n =
|
|
19728
|
+
let n = bi(Ti(r), i);
|
|
19518
19729
|
a.push({
|
|
19519
19730
|
id: t,
|
|
19520
19731
|
data: {
|
|
@@ -19524,9 +19735,9 @@ var Ci = (e) => {
|
|
|
19524
19735
|
});
|
|
19525
19736
|
}
|
|
19526
19737
|
}
|
|
19527
|
-
return a.sort(
|
|
19738
|
+
return a.sort(Si);
|
|
19528
19739
|
};
|
|
19529
|
-
function
|
|
19740
|
+
function Di(e, t) {
|
|
19530
19741
|
let n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), i = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), o = i - r, s = a - n;
|
|
19531
19742
|
if (r < i && n < a) {
|
|
19532
19743
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -19534,12 +19745,12 @@ function wi(e, t) {
|
|
|
19534
19745
|
}
|
|
19535
19746
|
return 0;
|
|
19536
19747
|
}
|
|
19537
|
-
var
|
|
19748
|
+
var Oi = (e) => {
|
|
19538
19749
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
19539
19750
|
for (let e of r) {
|
|
19540
19751
|
let { id: r } = e, a = n.get(r);
|
|
19541
19752
|
if (a) {
|
|
19542
|
-
let n =
|
|
19753
|
+
let n = Di(a, t);
|
|
19543
19754
|
n > 0 && i.push({
|
|
19544
19755
|
id: r,
|
|
19545
19756
|
data: {
|
|
@@ -19549,22 +19760,22 @@ var Ti = (e) => {
|
|
|
19549
19760
|
});
|
|
19550
19761
|
}
|
|
19551
19762
|
}
|
|
19552
|
-
return i.sort(
|
|
19763
|
+
return i.sort(Ci);
|
|
19553
19764
|
};
|
|
19554
|
-
function
|
|
19765
|
+
function ki(e, t, n) {
|
|
19555
19766
|
return {
|
|
19556
19767
|
...e,
|
|
19557
19768
|
scaleX: t && n ? t.width / n.width : 1,
|
|
19558
19769
|
scaleY: t && n ? t.height / n.height : 1
|
|
19559
19770
|
};
|
|
19560
19771
|
}
|
|
19561
|
-
function
|
|
19772
|
+
function Ai(e, t) {
|
|
19562
19773
|
return e && t ? {
|
|
19563
19774
|
x: e.left - t.left,
|
|
19564
19775
|
y: e.top - t.top
|
|
19565
|
-
} :
|
|
19776
|
+
} : yi;
|
|
19566
19777
|
}
|
|
19567
|
-
function
|
|
19778
|
+
function ji(e) {
|
|
19568
19779
|
return function(t) {
|
|
19569
19780
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
19570
19781
|
...t,
|
|
@@ -19575,8 +19786,8 @@ function Oi(e) {
|
|
|
19575
19786
|
}), { ...t });
|
|
19576
19787
|
};
|
|
19577
19788
|
}
|
|
19578
|
-
var
|
|
19579
|
-
function
|
|
19789
|
+
var V = /* @__PURE__ */ ji(1);
|
|
19790
|
+
function H(e) {
|
|
19580
19791
|
if (e.startsWith("matrix3d(")) {
|
|
19581
19792
|
let t = e.slice(9, -1).split(/, /);
|
|
19582
19793
|
return {
|
|
@@ -19596,8 +19807,8 @@ function Ai(e) {
|
|
|
19596
19807
|
}
|
|
19597
19808
|
return null;
|
|
19598
19809
|
}
|
|
19599
|
-
function
|
|
19600
|
-
let r =
|
|
19810
|
+
function Mi(e, t, n) {
|
|
19811
|
+
let r = H(t);
|
|
19601
19812
|
if (!r) return e;
|
|
19602
19813
|
let { scaleX: i, scaleY: a, x: o, y: s } = r, c = e.left - o - (1 - i) * parseFloat(n), l = e.top - s - (1 - a) * parseFloat(n.slice(n.indexOf(" ") + 1)), u = i ? e.width / i : e.width, d = a ? e.height / a : e.height;
|
|
19603
19814
|
return {
|
|
@@ -19609,13 +19820,13 @@ function ji(e, t, n) {
|
|
|
19609
19820
|
left: c
|
|
19610
19821
|
};
|
|
19611
19822
|
}
|
|
19612
|
-
var
|
|
19613
|
-
function
|
|
19614
|
-
t === void 0 && (t =
|
|
19823
|
+
var Ni = { ignoreTransform: !1 };
|
|
19824
|
+
function Pi(e, t) {
|
|
19825
|
+
t === void 0 && (t = Ni);
|
|
19615
19826
|
let n = e.getBoundingClientRect();
|
|
19616
19827
|
if (t.ignoreTransform) {
|
|
19617
|
-
let { transform: t, transformOrigin: r } =
|
|
19618
|
-
t && (n =
|
|
19828
|
+
let { transform: t, transformOrigin: r } = Fr(e).getComputedStyle(e);
|
|
19829
|
+
t && (n = Mi(n, t, r));
|
|
19619
19830
|
}
|
|
19620
19831
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
19621
19832
|
return {
|
|
@@ -19627,10 +19838,10 @@ function H(e, t) {
|
|
|
19627
19838
|
right: c
|
|
19628
19839
|
};
|
|
19629
19840
|
}
|
|
19630
|
-
function
|
|
19631
|
-
return
|
|
19841
|
+
function Fi(e) {
|
|
19842
|
+
return Pi(e, { ignoreTransform: !0 });
|
|
19632
19843
|
}
|
|
19633
|
-
function
|
|
19844
|
+
function Ii(e) {
|
|
19634
19845
|
let t = e.innerWidth, n = e.innerHeight;
|
|
19635
19846
|
return {
|
|
19636
19847
|
top: 0,
|
|
@@ -19641,11 +19852,11 @@ function Ni(e) {
|
|
|
19641
19852
|
height: n
|
|
19642
19853
|
};
|
|
19643
19854
|
}
|
|
19644
|
-
function
|
|
19645
|
-
return t === void 0 && (t =
|
|
19855
|
+
function Li(e, t) {
|
|
19856
|
+
return t === void 0 && (t = Fr(e).getComputedStyle(e)), t.position === "fixed";
|
|
19646
19857
|
}
|
|
19647
|
-
function
|
|
19648
|
-
t === void 0 && (t =
|
|
19858
|
+
function Ri(e, t) {
|
|
19859
|
+
t === void 0 && (t = Fr(e).getComputedStyle(e));
|
|
19649
19860
|
let n = /(auto|scroll|overlay)/;
|
|
19650
19861
|
return [
|
|
19651
19862
|
"overflow",
|
|
@@ -19656,48 +19867,48 @@ function Fi(e, t) {
|
|
|
19656
19867
|
return typeof r == "string" ? n.test(r) : !1;
|
|
19657
19868
|
});
|
|
19658
19869
|
}
|
|
19659
|
-
function
|
|
19870
|
+
function zi(e, t) {
|
|
19660
19871
|
let n = [];
|
|
19661
19872
|
function r(i) {
|
|
19662
19873
|
if (t != null && n.length >= t || !i) return n;
|
|
19663
|
-
if (
|
|
19664
|
-
if (!
|
|
19665
|
-
let a =
|
|
19666
|
-
return i !== e &&
|
|
19874
|
+
if (Ir(i) && i.scrollingElement != null && !n.includes(i.scrollingElement)) return n.push(i.scrollingElement), n;
|
|
19875
|
+
if (!Lr(i) || Rr(i) || n.includes(i)) return n;
|
|
19876
|
+
let a = Fr(e).getComputedStyle(i);
|
|
19877
|
+
return i !== e && Ri(i, a) && n.push(i), Li(i, a) ? n : r(i.parentNode);
|
|
19667
19878
|
}
|
|
19668
19879
|
return e ? r(e) : n;
|
|
19669
19880
|
}
|
|
19670
|
-
function
|
|
19671
|
-
let [t] =
|
|
19881
|
+
function Bi(e) {
|
|
19882
|
+
let [t] = zi(e, 1);
|
|
19672
19883
|
return t ?? null;
|
|
19673
19884
|
}
|
|
19674
|
-
function
|
|
19675
|
-
return !
|
|
19885
|
+
function Vi(e) {
|
|
19886
|
+
return !Mr || !e ? null : Nr(e) ? e : Pr(e) ? Ir(e) || e === zr(e).scrollingElement ? window : Lr(e) ? e : null : null;
|
|
19676
19887
|
}
|
|
19677
|
-
function
|
|
19678
|
-
return
|
|
19888
|
+
function Hi(e) {
|
|
19889
|
+
return Nr(e) ? e.scrollX : e.scrollLeft;
|
|
19679
19890
|
}
|
|
19680
|
-
function
|
|
19681
|
-
return
|
|
19891
|
+
function Ui(e) {
|
|
19892
|
+
return Nr(e) ? e.scrollY : e.scrollTop;
|
|
19682
19893
|
}
|
|
19683
|
-
function
|
|
19894
|
+
function Wi(e) {
|
|
19684
19895
|
return {
|
|
19685
|
-
x:
|
|
19686
|
-
y:
|
|
19896
|
+
x: Hi(e),
|
|
19897
|
+
y: Ui(e)
|
|
19687
19898
|
};
|
|
19688
19899
|
}
|
|
19689
|
-
var
|
|
19900
|
+
var Gi;
|
|
19690
19901
|
(function(e) {
|
|
19691
19902
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
19692
|
-
})(
|
|
19693
|
-
function
|
|
19694
|
-
return !
|
|
19903
|
+
})(Gi ||= {});
|
|
19904
|
+
function Ki(e) {
|
|
19905
|
+
return !Mr || !e ? !1 : e === document.scrollingElement;
|
|
19695
19906
|
}
|
|
19696
|
-
function
|
|
19907
|
+
function qi(e) {
|
|
19697
19908
|
let t = {
|
|
19698
19909
|
x: 0,
|
|
19699
19910
|
y: 0
|
|
19700
|
-
}, n =
|
|
19911
|
+
}, n = Ki(e) ? {
|
|
19701
19912
|
height: window.innerHeight,
|
|
19702
19913
|
width: window.innerWidth
|
|
19703
19914
|
} : {
|
|
@@ -19716,14 +19927,14 @@ function Wi(e) {
|
|
|
19716
19927
|
minScroll: t
|
|
19717
19928
|
};
|
|
19718
19929
|
}
|
|
19719
|
-
var
|
|
19930
|
+
var Ji = {
|
|
19720
19931
|
x: .2,
|
|
19721
19932
|
y: .2
|
|
19722
19933
|
};
|
|
19723
|
-
function
|
|
19934
|
+
function Yi(e, t, n, r, i) {
|
|
19724
19935
|
let { top: a, left: o, right: s, bottom: c } = n;
|
|
19725
|
-
r === void 0 && (r = 10), i === void 0 && (i =
|
|
19726
|
-
let { isTop: l, isBottom: u, isLeft: d, isRight: f } =
|
|
19936
|
+
r === void 0 && (r = 10), i === void 0 && (i = Ji);
|
|
19937
|
+
let { isTop: l, isBottom: u, isLeft: d, isRight: f } = qi(e), p = {
|
|
19727
19938
|
x: 0,
|
|
19728
19939
|
y: 0
|
|
19729
19940
|
}, m = {
|
|
@@ -19733,12 +19944,12 @@ function Ki(e, t, n, r, i) {
|
|
|
19733
19944
|
height: t.height * i.y,
|
|
19734
19945
|
width: t.width * i.x
|
|
19735
19946
|
};
|
|
19736
|
-
return !l && a <= t.top + h.height ? (p.y =
|
|
19947
|
+
return !l && a <= t.top + h.height ? (p.y = Gi.Backward, m.y = r * Math.abs((t.top + h.height - a) / h.height)) : !u && c >= t.bottom - h.height && (p.y = Gi.Forward, m.y = r * Math.abs((t.bottom - h.height - c) / h.height)), !f && s >= t.right - h.width ? (p.x = Gi.Forward, m.x = r * Math.abs((t.right - h.width - s) / h.width)) : !d && o <= t.left + h.width && (p.x = Gi.Backward, m.x = r * Math.abs((t.left + h.width - o) / h.width)), {
|
|
19737
19948
|
direction: p,
|
|
19738
19949
|
speed: m
|
|
19739
19950
|
};
|
|
19740
19951
|
}
|
|
19741
|
-
function
|
|
19952
|
+
function Xi(e) {
|
|
19742
19953
|
if (e === document.scrollingElement) {
|
|
19743
19954
|
let { innerWidth: e, innerHeight: t } = window;
|
|
19744
19955
|
return {
|
|
@@ -19760,37 +19971,37 @@ function qi(e) {
|
|
|
19760
19971
|
height: e.clientHeight
|
|
19761
19972
|
};
|
|
19762
19973
|
}
|
|
19763
|
-
function
|
|
19764
|
-
return e.reduce((e, t) =>
|
|
19974
|
+
function Zi(e) {
|
|
19975
|
+
return e.reduce((e, t) => Xr(e, Wi(t)), yi);
|
|
19765
19976
|
}
|
|
19766
|
-
function
|
|
19767
|
-
return e.reduce((e, t) => e +
|
|
19977
|
+
function Qi(e) {
|
|
19978
|
+
return e.reduce((e, t) => e + Hi(t), 0);
|
|
19768
19979
|
}
|
|
19769
|
-
function
|
|
19770
|
-
return e.reduce((e, t) => e +
|
|
19980
|
+
function $i(e) {
|
|
19981
|
+
return e.reduce((e, t) => e + Ui(t), 0);
|
|
19771
19982
|
}
|
|
19772
|
-
function
|
|
19773
|
-
if (t === void 0 && (t =
|
|
19983
|
+
function ea(e, t) {
|
|
19984
|
+
if (t === void 0 && (t = Pi), !e) return;
|
|
19774
19985
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
19775
|
-
|
|
19986
|
+
Bi(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
19776
19987
|
block: "center",
|
|
19777
19988
|
inline: "center"
|
|
19778
19989
|
});
|
|
19779
19990
|
}
|
|
19780
|
-
var
|
|
19991
|
+
var ta = [[
|
|
19781
19992
|
"x",
|
|
19782
19993
|
["left", "right"],
|
|
19783
|
-
|
|
19994
|
+
Qi
|
|
19784
19995
|
], [
|
|
19785
19996
|
"y",
|
|
19786
19997
|
["top", "bottom"],
|
|
19787
|
-
|
|
19788
|
-
]],
|
|
19998
|
+
$i
|
|
19999
|
+
]], na = class {
|
|
19789
20000
|
constructor(e, t) {
|
|
19790
20001
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
19791
|
-
let n =
|
|
20002
|
+
let n = zi(t), r = Zi(n);
|
|
19792
20003
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
19793
|
-
for (let [e, t, i] of
|
|
20004
|
+
for (let [e, t, i] of ta) for (let a of t) Object.defineProperty(this, a, {
|
|
19794
20005
|
get: () => {
|
|
19795
20006
|
let t = i(n), o = r[e] - t;
|
|
19796
20007
|
return this.rect[a] + o;
|
|
@@ -19799,7 +20010,7 @@ var Qi = [[
|
|
|
19799
20010
|
});
|
|
19800
20011
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
19801
20012
|
}
|
|
19802
|
-
},
|
|
20013
|
+
}, ra = class {
|
|
19803
20014
|
constructor(e) {
|
|
19804
20015
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
19805
20016
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -19814,29 +20025,29 @@ var Qi = [[
|
|
|
19814
20025
|
]);
|
|
19815
20026
|
}
|
|
19816
20027
|
};
|
|
19817
|
-
function
|
|
19818
|
-
let { EventTarget: t } =
|
|
19819
|
-
return e instanceof t ? e :
|
|
20028
|
+
function ia(e) {
|
|
20029
|
+
let { EventTarget: t } = Fr(e);
|
|
20030
|
+
return e instanceof t ? e : zr(e);
|
|
19820
20031
|
}
|
|
19821
|
-
function
|
|
20032
|
+
function aa(e, t) {
|
|
19822
20033
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
19823
20034
|
return typeof t == "number" ? Math.sqrt(n ** 2 + r ** 2) > t : "x" in t && "y" in t ? n > t.x && r > t.y : "x" in t ? n > t.x : "y" in t ? r > t.y : !1;
|
|
19824
20035
|
}
|
|
19825
|
-
var
|
|
20036
|
+
var oa;
|
|
19826
20037
|
(function(e) {
|
|
19827
20038
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
19828
|
-
})(
|
|
19829
|
-
function
|
|
20039
|
+
})(oa ||= {});
|
|
20040
|
+
function sa(e) {
|
|
19830
20041
|
e.preventDefault();
|
|
19831
20042
|
}
|
|
19832
|
-
function
|
|
20043
|
+
function ca(e) {
|
|
19833
20044
|
e.stopPropagation();
|
|
19834
20045
|
}
|
|
19835
20046
|
var U;
|
|
19836
20047
|
(function(e) {
|
|
19837
20048
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
19838
20049
|
})(U ||= {});
|
|
19839
|
-
var
|
|
20050
|
+
var la = {
|
|
19840
20051
|
start: [U.Space, U.Enter],
|
|
19841
20052
|
cancel: [U.Esc],
|
|
19842
20053
|
end: [
|
|
@@ -19844,7 +20055,7 @@ var oa = {
|
|
|
19844
20055
|
U.Enter,
|
|
19845
20056
|
U.Tab
|
|
19846
20057
|
]
|
|
19847
|
-
},
|
|
20058
|
+
}, ua = (e, t) => {
|
|
19848
20059
|
let { currentCoordinates: n } = t;
|
|
19849
20060
|
switch (e.code) {
|
|
19850
20061
|
case U.Right: return {
|
|
@@ -19864,22 +20075,22 @@ var oa = {
|
|
|
19864
20075
|
y: n.y - 25
|
|
19865
20076
|
};
|
|
19866
20077
|
}
|
|
19867
|
-
},
|
|
20078
|
+
}, da = class {
|
|
19868
20079
|
constructor(e) {
|
|
19869
20080
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
19870
20081
|
let { event: { target: t } } = e;
|
|
19871
|
-
this.props = e, this.listeners = new
|
|
20082
|
+
this.props = e, this.listeners = new ra(zr(t)), this.windowListeners = new ra(Fr(t)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
19872
20083
|
}
|
|
19873
20084
|
attach() {
|
|
19874
|
-
this.handleStart(), this.windowListeners.add(
|
|
20085
|
+
this.handleStart(), this.windowListeners.add(oa.Resize, this.handleCancel), this.windowListeners.add(oa.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(oa.Keydown, this.handleKeyDown));
|
|
19875
20086
|
}
|
|
19876
20087
|
handleStart() {
|
|
19877
20088
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
19878
|
-
n &&
|
|
20089
|
+
n && ea(n), t(yi);
|
|
19879
20090
|
}
|
|
19880
20091
|
handleKeyDown(e) {
|
|
19881
|
-
if (
|
|
19882
|
-
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i =
|
|
20092
|
+
if ($r(e)) {
|
|
20093
|
+
let { active: t, context: n, options: r } = this.props, { keyboardCodes: i = la, coordinateGetter: a = ua, scrollBehavior: o = "smooth" } = r, { code: s } = e;
|
|
19883
20094
|
if (i.end.includes(s)) {
|
|
19884
20095
|
this.handleEnd(e);
|
|
19885
20096
|
return;
|
|
@@ -19891,7 +20102,7 @@ var oa = {
|
|
|
19891
20102
|
let { collisionRect: c } = n.current, l = c ? {
|
|
19892
20103
|
x: c.left,
|
|
19893
20104
|
y: c.top
|
|
19894
|
-
} :
|
|
20105
|
+
} : yi;
|
|
19895
20106
|
this.referenceCoordinates ||= l;
|
|
19896
20107
|
let u = a(e, {
|
|
19897
20108
|
active: t,
|
|
@@ -19899,12 +20110,12 @@ var oa = {
|
|
|
19899
20110
|
currentCoordinates: l
|
|
19900
20111
|
});
|
|
19901
20112
|
if (u) {
|
|
19902
|
-
let t =
|
|
20113
|
+
let t = Zr(u, l), r = {
|
|
19903
20114
|
x: 0,
|
|
19904
20115
|
y: 0
|
|
19905
20116
|
}, { scrollableAncestors: i } = n.current;
|
|
19906
20117
|
for (let n of i) {
|
|
19907
|
-
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } =
|
|
20118
|
+
let i = e.code, { isTop: a, isRight: s, isLeft: c, isBottom: l, maxScroll: d, minScroll: f } = qi(n), p = Xi(n), m = {
|
|
19908
20119
|
x: Math.min(i === U.Right ? p.right - p.width / 2 : p.right, Math.max(i === U.Right ? p.left : p.left + p.width / 2, u.x)),
|
|
19909
20120
|
y: Math.min(i === U.Down ? p.bottom - p.height / 2 : p.bottom, Math.max(i === U.Down ? p.top : p.top + p.height / 2, u.y))
|
|
19910
20121
|
}, h = i === U.Right && !s || i === U.Left && !c, g = i === U.Down && !l || i === U.Up && !a;
|
|
@@ -19938,7 +20149,7 @@ var oa = {
|
|
|
19938
20149
|
break;
|
|
19939
20150
|
}
|
|
19940
20151
|
}
|
|
19941
|
-
this.handleMove(e,
|
|
20152
|
+
this.handleMove(e, Xr(Zr(u, this.referenceCoordinates), r));
|
|
19942
20153
|
}
|
|
19943
20154
|
}
|
|
19944
20155
|
}
|
|
@@ -19958,10 +20169,10 @@ var oa = {
|
|
|
19958
20169
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
19959
20170
|
}
|
|
19960
20171
|
};
|
|
19961
|
-
|
|
20172
|
+
da.activators = [{
|
|
19962
20173
|
eventName: "onKeyDown",
|
|
19963
20174
|
handler: (e, t, n) => {
|
|
19964
|
-
let { keyboardCodes: r =
|
|
20175
|
+
let { keyboardCodes: r = la, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
19965
20176
|
if (r.start.includes(o)) {
|
|
19966
20177
|
let t = a.activatorNode.current;
|
|
19967
20178
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -19969,31 +20180,31 @@ ca.activators = [{
|
|
|
19969
20180
|
return !1;
|
|
19970
20181
|
}
|
|
19971
20182
|
}];
|
|
19972
|
-
function
|
|
20183
|
+
function fa(e) {
|
|
19973
20184
|
return !!(e && "distance" in e);
|
|
19974
20185
|
}
|
|
19975
|
-
function
|
|
20186
|
+
function pa(e) {
|
|
19976
20187
|
return !!(e && "delay" in e);
|
|
19977
20188
|
}
|
|
19978
|
-
var
|
|
20189
|
+
var ma = class {
|
|
19979
20190
|
constructor(e, t, n) {
|
|
19980
|
-
n === void 0 && (n =
|
|
20191
|
+
n === void 0 && (n = ia(e.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = e, this.events = t;
|
|
19981
20192
|
let { event: r } = e, { target: i } = r;
|
|
19982
|
-
this.props = e, this.events = t, this.document =
|
|
20193
|
+
this.props = e, this.events = t, this.document = zr(i), this.documentListeners = new ra(this.document), this.listeners = new ra(n), this.windowListeners = new ra(Fr(i)), this.initialCoordinates = ti(r) ?? yi, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
19983
20194
|
}
|
|
19984
20195
|
attach() {
|
|
19985
20196
|
let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
|
|
19986
|
-
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(
|
|
20197
|
+
if (this.listeners.add(e.move.name, this.handleMove, { passive: !1 }), this.listeners.add(e.end.name, this.handleEnd), e.cancel && this.listeners.add(e.cancel.name, this.handleCancel), this.windowListeners.add(oa.Resize, this.handleCancel), this.windowListeners.add(oa.DragStart, sa), this.windowListeners.add(oa.VisibilityChange, this.handleCancel), this.windowListeners.add(oa.ContextMenu, sa), this.documentListeners.add(oa.Keydown, this.handleKeydown), t) {
|
|
19987
20198
|
if (n != null && n({
|
|
19988
20199
|
event: this.props.event,
|
|
19989
20200
|
activeNode: this.props.activeNode,
|
|
19990
20201
|
options: this.props.options
|
|
19991
20202
|
})) return this.handleStart();
|
|
19992
|
-
if (
|
|
20203
|
+
if (pa(t)) {
|
|
19993
20204
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
19994
20205
|
return;
|
|
19995
20206
|
}
|
|
19996
|
-
if (
|
|
20207
|
+
if (fa(t)) {
|
|
19997
20208
|
this.handlePending(t);
|
|
19998
20209
|
return;
|
|
19999
20210
|
}
|
|
@@ -20009,18 +20220,18 @@ var da = class {
|
|
|
20009
20220
|
}
|
|
20010
20221
|
handleStart() {
|
|
20011
20222
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
20012
|
-
e && (this.activated = !0, this.documentListeners.add(
|
|
20223
|
+
e && (this.activated = !0, this.documentListeners.add(oa.Click, ca, { capture: !0 }), this.removeTextSelection(), this.documentListeners.add(oa.SelectionChange, this.removeTextSelection), t(e));
|
|
20013
20224
|
}
|
|
20014
20225
|
handleMove(e) {
|
|
20015
20226
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
20016
20227
|
if (!n) return;
|
|
20017
|
-
let o =
|
|
20228
|
+
let o = ti(e) ?? yi, s = Zr(n, o);
|
|
20018
20229
|
if (!t && a) {
|
|
20019
|
-
if (
|
|
20020
|
-
if (a.tolerance != null &&
|
|
20021
|
-
if (
|
|
20230
|
+
if (fa(a)) {
|
|
20231
|
+
if (a.tolerance != null && aa(s, a.tolerance)) return this.handleCancel();
|
|
20232
|
+
if (aa(s, a.distance)) return this.handleStart();
|
|
20022
20233
|
}
|
|
20023
|
-
if (
|
|
20234
|
+
if (pa(a) && aa(s, a.tolerance)) return this.handleCancel();
|
|
20024
20235
|
this.handlePending(a, s);
|
|
20025
20236
|
return;
|
|
20026
20237
|
}
|
|
@@ -20041,80 +20252,80 @@ var da = class {
|
|
|
20041
20252
|
var e;
|
|
20042
20253
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
20043
20254
|
}
|
|
20044
|
-
},
|
|
20255
|
+
}, ha = {
|
|
20045
20256
|
cancel: { name: "pointercancel" },
|
|
20046
20257
|
move: { name: "pointermove" },
|
|
20047
20258
|
end: { name: "pointerup" }
|
|
20048
|
-
},
|
|
20259
|
+
}, ga = class extends ma {
|
|
20049
20260
|
constructor(e) {
|
|
20050
|
-
let { event: t } = e, n =
|
|
20051
|
-
super(e,
|
|
20261
|
+
let { event: t } = e, n = zr(t.target);
|
|
20262
|
+
super(e, ha, n);
|
|
20052
20263
|
}
|
|
20053
20264
|
};
|
|
20054
|
-
|
|
20265
|
+
ga.activators = [{
|
|
20055
20266
|
eventName: "onPointerDown",
|
|
20056
20267
|
handler: (e, t) => {
|
|
20057
20268
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
20058
20269
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
20059
20270
|
}
|
|
20060
20271
|
}];
|
|
20061
|
-
var
|
|
20272
|
+
var _a = {
|
|
20062
20273
|
move: { name: "mousemove" },
|
|
20063
20274
|
end: { name: "mouseup" }
|
|
20064
|
-
},
|
|
20275
|
+
}, va;
|
|
20065
20276
|
(function(e) {
|
|
20066
20277
|
e[e.RightClick = 2] = "RightClick";
|
|
20067
|
-
})(
|
|
20068
|
-
var
|
|
20278
|
+
})(va ||= {});
|
|
20279
|
+
var ya = class extends ma {
|
|
20069
20280
|
constructor(e) {
|
|
20070
|
-
super(e,
|
|
20281
|
+
super(e, _a, zr(e.event.target));
|
|
20071
20282
|
}
|
|
20072
20283
|
};
|
|
20073
|
-
|
|
20284
|
+
ya.activators = [{
|
|
20074
20285
|
eventName: "onMouseDown",
|
|
20075
20286
|
handler: (e, t) => {
|
|
20076
20287
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
20077
|
-
return n.button ===
|
|
20288
|
+
return n.button === va.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
20078
20289
|
}
|
|
20079
20290
|
}];
|
|
20080
|
-
var
|
|
20291
|
+
var ba = {
|
|
20081
20292
|
cancel: { name: "touchcancel" },
|
|
20082
20293
|
move: { name: "touchmove" },
|
|
20083
20294
|
end: { name: "touchend" }
|
|
20084
|
-
},
|
|
20295
|
+
}, xa = class extends ma {
|
|
20085
20296
|
constructor(e) {
|
|
20086
|
-
super(e,
|
|
20297
|
+
super(e, ba);
|
|
20087
20298
|
}
|
|
20088
20299
|
static setup() {
|
|
20089
|
-
return window.addEventListener(
|
|
20300
|
+
return window.addEventListener(ba.move.name, e, {
|
|
20090
20301
|
capture: !1,
|
|
20091
20302
|
passive: !1
|
|
20092
20303
|
}), function() {
|
|
20093
|
-
window.removeEventListener(
|
|
20304
|
+
window.removeEventListener(ba.move.name, e);
|
|
20094
20305
|
};
|
|
20095
20306
|
function e() {}
|
|
20096
20307
|
}
|
|
20097
20308
|
};
|
|
20098
|
-
|
|
20309
|
+
xa.activators = [{
|
|
20099
20310
|
eventName: "onTouchStart",
|
|
20100
20311
|
handler: (e, t) => {
|
|
20101
20312
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
20102
20313
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
20103
20314
|
}
|
|
20104
20315
|
}];
|
|
20105
|
-
var
|
|
20316
|
+
var Sa;
|
|
20106
20317
|
(function(e) {
|
|
20107
20318
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
20108
|
-
})(
|
|
20109
|
-
var
|
|
20319
|
+
})(Sa ||= {});
|
|
20320
|
+
var Ca;
|
|
20110
20321
|
(function(e) {
|
|
20111
20322
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
20112
|
-
})(
|
|
20113
|
-
function
|
|
20114
|
-
let { acceleration: t, activator: n =
|
|
20323
|
+
})(Ca ||= {});
|
|
20324
|
+
function wa(e) {
|
|
20325
|
+
let { acceleration: t, activator: n = Sa.Pointer, canScroll: r, draggingRect: i, enabled: a, interval: o = 5, order: s = Ca.TreeOrder, pointerCoordinates: c, scrollableAncestors: l, scrollableAncestorRects: u, delta: d, threshold: f } = e, p = Ea({
|
|
20115
20326
|
delta: d,
|
|
20116
20327
|
disabled: !a
|
|
20117
|
-
}), [m, h] =
|
|
20328
|
+
}), [m, h] = Hr(), g = (0, S.useRef)({
|
|
20118
20329
|
x: 0,
|
|
20119
20330
|
y: 0
|
|
20120
20331
|
}), _ = (0, S.useRef)({
|
|
@@ -20122,13 +20333,13 @@ function xa(e) {
|
|
|
20122
20333
|
y: 0
|
|
20123
20334
|
}), v = (0, S.useMemo)(() => {
|
|
20124
20335
|
switch (n) {
|
|
20125
|
-
case
|
|
20336
|
+
case Sa.Pointer: return c ? {
|
|
20126
20337
|
top: c.y,
|
|
20127
20338
|
bottom: c.y,
|
|
20128
20339
|
left: c.x,
|
|
20129
20340
|
right: c.x
|
|
20130
20341
|
} : null;
|
|
20131
|
-
case
|
|
20342
|
+
case Sa.DraggableRect: return i;
|
|
20132
20343
|
}
|
|
20133
20344
|
}, [
|
|
20134
20345
|
n,
|
|
@@ -20139,7 +20350,7 @@ function xa(e) {
|
|
|
20139
20350
|
if (!e) return;
|
|
20140
20351
|
let t = g.current.x * _.current.x, n = g.current.y * _.current.y;
|
|
20141
20352
|
e.scrollBy(t, n);
|
|
20142
|
-
}, []), x = (0, S.useMemo)(() => s ===
|
|
20353
|
+
}, []), x = (0, S.useMemo)(() => s === Ca.TreeOrder ? [...l].reverse() : l, [s, l]);
|
|
20143
20354
|
(0, S.useEffect)(() => {
|
|
20144
20355
|
if (!a || !l.length || !v) {
|
|
20145
20356
|
h();
|
|
@@ -20149,7 +20360,7 @@ function xa(e) {
|
|
|
20149
20360
|
if (r?.(e) === !1) continue;
|
|
20150
20361
|
let n = u[l.indexOf(e)];
|
|
20151
20362
|
if (!n) continue;
|
|
20152
|
-
let { direction: i, speed: a } =
|
|
20363
|
+
let { direction: i, speed: a } = Yi(e, n, v, t, f);
|
|
20153
20364
|
for (let e of ["x", "y"]) p[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
20154
20365
|
if (a.x > 0 || a.y > 0) {
|
|
20155
20366
|
h(), y.current = e, m(b, o), g.current = a, _.current = i;
|
|
@@ -20179,32 +20390,32 @@ function xa(e) {
|
|
|
20179
20390
|
JSON.stringify(f)
|
|
20180
20391
|
]);
|
|
20181
20392
|
}
|
|
20182
|
-
var
|
|
20393
|
+
var Ta = {
|
|
20183
20394
|
x: {
|
|
20184
|
-
[
|
|
20185
|
-
[
|
|
20395
|
+
[Gi.Backward]: !1,
|
|
20396
|
+
[Gi.Forward]: !1
|
|
20186
20397
|
},
|
|
20187
20398
|
y: {
|
|
20188
|
-
[
|
|
20189
|
-
[
|
|
20399
|
+
[Gi.Backward]: !1,
|
|
20400
|
+
[Gi.Forward]: !1
|
|
20190
20401
|
}
|
|
20191
20402
|
};
|
|
20192
|
-
function
|
|
20193
|
-
let { delta: t, disabled: n } = e, r =
|
|
20194
|
-
return
|
|
20195
|
-
if (n || !r || !e) return
|
|
20403
|
+
function Ea(e) {
|
|
20404
|
+
let { delta: t, disabled: n } = e, r = Kr(t);
|
|
20405
|
+
return Wr((e) => {
|
|
20406
|
+
if (n || !r || !e) return Ta;
|
|
20196
20407
|
let i = {
|
|
20197
20408
|
x: Math.sign(t.x - r.x),
|
|
20198
20409
|
y: Math.sign(t.y - r.y)
|
|
20199
20410
|
};
|
|
20200
20411
|
return {
|
|
20201
20412
|
x: {
|
|
20202
|
-
[
|
|
20203
|
-
[
|
|
20413
|
+
[Gi.Backward]: e.x[Gi.Backward] || i.x === -1,
|
|
20414
|
+
[Gi.Forward]: e.x[Gi.Forward] || i.x === 1
|
|
20204
20415
|
},
|
|
20205
20416
|
y: {
|
|
20206
|
-
[
|
|
20207
|
-
[
|
|
20417
|
+
[Gi.Backward]: e.y[Gi.Backward] || i.y === -1,
|
|
20418
|
+
[Gi.Forward]: e.y[Gi.Forward] || i.y === 1
|
|
20208
20419
|
}
|
|
20209
20420
|
};
|
|
20210
20421
|
}, [
|
|
@@ -20213,11 +20424,11 @@ function Ca(e) {
|
|
|
20213
20424
|
r
|
|
20214
20425
|
]);
|
|
20215
20426
|
}
|
|
20216
|
-
function
|
|
20427
|
+
function Da(e, t) {
|
|
20217
20428
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
20218
|
-
return
|
|
20429
|
+
return Wr((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
20219
20430
|
}
|
|
20220
|
-
function
|
|
20431
|
+
function Oa(e, t) {
|
|
20221
20432
|
return (0, S.useMemo)(() => e.reduce((e, n) => {
|
|
20222
20433
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
20223
20434
|
eventName: e.eventName,
|
|
@@ -20226,21 +20437,21 @@ function Ta(e, t) {
|
|
|
20226
20437
|
return [...e, ...i];
|
|
20227
20438
|
}, []), [e, t]);
|
|
20228
20439
|
}
|
|
20229
|
-
var
|
|
20440
|
+
var ka;
|
|
20230
20441
|
(function(e) {
|
|
20231
20442
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
20232
|
-
})(
|
|
20233
|
-
var
|
|
20443
|
+
})(ka ||= {});
|
|
20444
|
+
var Aa;
|
|
20234
20445
|
(function(e) {
|
|
20235
20446
|
e.Optimized = "optimized";
|
|
20236
|
-
})(
|
|
20237
|
-
var
|
|
20238
|
-
function
|
|
20239
|
-
let { dragging: n, dependencies: r, config: i } = t, [a, o] = (0, S.useState)(null), { frequency: s, measure: c, strategy: l } = i, u = (0, S.useRef)(e), d = g(), f =
|
|
20447
|
+
})(Aa ||= {});
|
|
20448
|
+
var ja = /* @__PURE__ */ new Map();
|
|
20449
|
+
function Ma(e, t) {
|
|
20450
|
+
let { dragging: n, dependencies: r, config: i } = t, [a, o] = (0, S.useState)(null), { frequency: s, measure: c, strategy: l } = i, u = (0, S.useRef)(e), d = g(), f = Ur(d), p = (0, S.useCallback)(function(e) {
|
|
20240
20451
|
e === void 0 && (e = []), !f.current && o((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
|
|
20241
|
-
}, [f]), m = (0, S.useRef)(null), h =
|
|
20242
|
-
if (d && !n) return
|
|
20243
|
-
if (!t || t ===
|
|
20452
|
+
}, [f]), m = (0, S.useRef)(null), h = Wr((t) => {
|
|
20453
|
+
if (d && !n) return ja;
|
|
20454
|
+
if (!t || t === ja || u.current !== e || a != null) {
|
|
20244
20455
|
let t = /* @__PURE__ */ new Map();
|
|
20245
20456
|
for (let n of e) {
|
|
20246
20457
|
if (!n) continue;
|
|
@@ -20248,7 +20459,7 @@ function ka(e, t) {
|
|
|
20248
20459
|
t.set(n.id, n.rect.current);
|
|
20249
20460
|
continue;
|
|
20250
20461
|
}
|
|
20251
|
-
let e = n.node.current, r = e ? new
|
|
20462
|
+
let e = n.node.current, r = e ? new na(c(e), e) : null;
|
|
20252
20463
|
n.rect.current = r, r && t.set(n.id, r);
|
|
20253
20464
|
}
|
|
20254
20465
|
return t;
|
|
@@ -20283,39 +20494,39 @@ function ka(e, t) {
|
|
|
20283
20494
|
};
|
|
20284
20495
|
function g() {
|
|
20285
20496
|
switch (l) {
|
|
20286
|
-
case
|
|
20287
|
-
case
|
|
20497
|
+
case ka.Always: return !1;
|
|
20498
|
+
case ka.BeforeDragging: return n;
|
|
20288
20499
|
default: return !n;
|
|
20289
20500
|
}
|
|
20290
20501
|
}
|
|
20291
20502
|
}
|
|
20292
|
-
function
|
|
20293
|
-
return
|
|
20503
|
+
function Na(e, t) {
|
|
20504
|
+
return Wr((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
20294
20505
|
}
|
|
20295
|
-
function
|
|
20296
|
-
return
|
|
20506
|
+
function Pa(e, t) {
|
|
20507
|
+
return Na(e, t);
|
|
20297
20508
|
}
|
|
20298
|
-
function
|
|
20299
|
-
let { callback: t, disabled: n } = e, r =
|
|
20509
|
+
function Fa(e) {
|
|
20510
|
+
let { callback: t, disabled: n } = e, r = Vr(t), i = (0, S.useMemo)(() => {
|
|
20300
20511
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
20301
20512
|
let { MutationObserver: e } = window;
|
|
20302
20513
|
return new e(r);
|
|
20303
20514
|
}, [r, n]);
|
|
20304
20515
|
return (0, S.useEffect)(() => () => i?.disconnect(), [i]), i;
|
|
20305
20516
|
}
|
|
20306
|
-
function
|
|
20307
|
-
let { callback: t, disabled: n } = e, r =
|
|
20517
|
+
function Ia(e) {
|
|
20518
|
+
let { callback: t, disabled: n } = e, r = Vr(t), i = (0, S.useMemo)(() => {
|
|
20308
20519
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
20309
20520
|
let { ResizeObserver: e } = window;
|
|
20310
20521
|
return new e(r);
|
|
20311
20522
|
}, [n]);
|
|
20312
20523
|
return (0, S.useEffect)(() => () => i?.disconnect(), [i]), i;
|
|
20313
20524
|
}
|
|
20314
|
-
function
|
|
20315
|
-
return new
|
|
20525
|
+
function La(e) {
|
|
20526
|
+
return new na(Pi(e), e);
|
|
20316
20527
|
}
|
|
20317
|
-
function
|
|
20318
|
-
t === void 0 && (t =
|
|
20528
|
+
function Ra(e, t, n) {
|
|
20529
|
+
t === void 0 && (t = La);
|
|
20319
20530
|
let [r, i] = (0, S.useState)(null);
|
|
20320
20531
|
function a() {
|
|
20321
20532
|
i((r) => {
|
|
@@ -20325,7 +20536,7 @@ function Fa(e, t, n) {
|
|
|
20325
20536
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
20326
20537
|
});
|
|
20327
20538
|
}
|
|
20328
|
-
let o =
|
|
20539
|
+
let o = Fa({ callback(t) {
|
|
20329
20540
|
if (e) for (let n of t) {
|
|
20330
20541
|
let { type: t, target: r } = n;
|
|
20331
20542
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -20333,36 +20544,36 @@ function Fa(e, t, n) {
|
|
|
20333
20544
|
break;
|
|
20334
20545
|
}
|
|
20335
20546
|
}
|
|
20336
|
-
} }), s =
|
|
20337
|
-
return
|
|
20547
|
+
} }), s = Ia({ callback: a });
|
|
20548
|
+
return Br(() => {
|
|
20338
20549
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
20339
20550
|
childList: !0,
|
|
20340
20551
|
subtree: !0
|
|
20341
20552
|
})) : (s?.disconnect(), o?.disconnect());
|
|
20342
20553
|
}, [e]), r;
|
|
20343
20554
|
}
|
|
20344
|
-
function
|
|
20345
|
-
return
|
|
20555
|
+
function za(e) {
|
|
20556
|
+
return Ai(e, Na(e));
|
|
20346
20557
|
}
|
|
20347
|
-
var
|
|
20348
|
-
function
|
|
20349
|
-
let t = (0, S.useRef)(e), n =
|
|
20558
|
+
var Ba = [];
|
|
20559
|
+
function Va(e) {
|
|
20560
|
+
let t = (0, S.useRef)(e), n = Wr((n) => e ? n && n !== Ba && e && t.current && e.parentNode === t.current.parentNode ? n : zi(e) : Ba, [e]);
|
|
20350
20561
|
return (0, S.useEffect)(() => {
|
|
20351
20562
|
t.current = e;
|
|
20352
20563
|
}, [e]), n;
|
|
20353
20564
|
}
|
|
20354
|
-
function
|
|
20565
|
+
function Ha(e) {
|
|
20355
20566
|
let [t, n] = (0, S.useState)(null), r = (0, S.useRef)(e), i = (0, S.useCallback)((e) => {
|
|
20356
|
-
let t =
|
|
20357
|
-
t && n((e) => e ? (e.set(t,
|
|
20567
|
+
let t = Vi(e.target);
|
|
20568
|
+
t && n((e) => e ? (e.set(t, Wi(t)), new Map(e)) : null);
|
|
20358
20569
|
}, []);
|
|
20359
20570
|
return (0, S.useEffect)(() => {
|
|
20360
20571
|
let t = r.current;
|
|
20361
20572
|
if (e !== t) {
|
|
20362
20573
|
a(t);
|
|
20363
20574
|
let o = e.map((e) => {
|
|
20364
|
-
let t =
|
|
20365
|
-
return t ? (t.addEventListener("scroll", i, { passive: !0 }), [t,
|
|
20575
|
+
let t = Vi(e);
|
|
20576
|
+
return t ? (t.addEventListener("scroll", i, { passive: !0 }), [t, Wi(t)]) : null;
|
|
20366
20577
|
}).filter((e) => e != null);
|
|
20367
20578
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
20368
20579
|
}
|
|
@@ -20371,24 +20582,24 @@ function za(e) {
|
|
|
20371
20582
|
};
|
|
20372
20583
|
function a(e) {
|
|
20373
20584
|
e.forEach((e) => {
|
|
20374
|
-
|
|
20585
|
+
Vi(e)?.removeEventListener("scroll", i);
|
|
20375
20586
|
});
|
|
20376
20587
|
}
|
|
20377
|
-
}, [i, e]), (0, S.useMemo)(() => e.length ? t ? Array.from(t.values()).reduce((e, t) =>
|
|
20588
|
+
}, [i, e]), (0, S.useMemo)(() => e.length ? t ? Array.from(t.values()).reduce((e, t) => Xr(e, t), yi) : Zi(e) : yi, [e, t]);
|
|
20378
20589
|
}
|
|
20379
|
-
function
|
|
20590
|
+
function Ua(e, t) {
|
|
20380
20591
|
t === void 0 && (t = []);
|
|
20381
20592
|
let n = (0, S.useRef)(null);
|
|
20382
20593
|
return (0, S.useEffect)(() => {
|
|
20383
20594
|
n.current = null;
|
|
20384
20595
|
}, t), (0, S.useEffect)(() => {
|
|
20385
|
-
let t = e !==
|
|
20596
|
+
let t = e !== yi;
|
|
20386
20597
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
20387
|
-
}, [e]), n.current ?
|
|
20598
|
+
}, [e]), n.current ? Zr(e, n.current) : yi;
|
|
20388
20599
|
}
|
|
20389
|
-
function
|
|
20600
|
+
function Wa(e) {
|
|
20390
20601
|
(0, S.useEffect)(() => {
|
|
20391
|
-
if (!
|
|
20602
|
+
if (!Mr) return;
|
|
20392
20603
|
let t = e.map((e) => {
|
|
20393
20604
|
let { sensor: t } = e;
|
|
20394
20605
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -20401,7 +20612,7 @@ function Va(e) {
|
|
|
20401
20612
|
return t;
|
|
20402
20613
|
}));
|
|
20403
20614
|
}
|
|
20404
|
-
function
|
|
20615
|
+
function Ga(e, t) {
|
|
20405
20616
|
return (0, S.useMemo)(() => e.reduce((e, n) => {
|
|
20406
20617
|
let { eventName: r, handler: i } = n;
|
|
20407
20618
|
return e[r] = (e) => {
|
|
@@ -20409,30 +20620,30 @@ function Ha(e, t) {
|
|
|
20409
20620
|
}, e;
|
|
20410
20621
|
}, {}), [e, t]);
|
|
20411
20622
|
}
|
|
20412
|
-
function
|
|
20413
|
-
return (0, S.useMemo)(() => e ?
|
|
20623
|
+
function Ka(e) {
|
|
20624
|
+
return (0, S.useMemo)(() => e ? Ii(e) : null, [e]);
|
|
20414
20625
|
}
|
|
20415
|
-
var
|
|
20416
|
-
function
|
|
20417
|
-
t === void 0 && (t =
|
|
20418
|
-
let [n] = e, r =
|
|
20626
|
+
var qa = [];
|
|
20627
|
+
function Ja(e, t) {
|
|
20628
|
+
t === void 0 && (t = Pi);
|
|
20629
|
+
let [n] = e, r = Ka(n ? Fr(n) : null), [i, a] = (0, S.useState)(qa);
|
|
20419
20630
|
function o() {
|
|
20420
|
-
a(() => e.length ? e.map((e) =>
|
|
20631
|
+
a(() => e.length ? e.map((e) => Ki(e) ? r : new na(t(e), e)) : qa);
|
|
20421
20632
|
}
|
|
20422
|
-
let s =
|
|
20423
|
-
return
|
|
20633
|
+
let s = Ia({ callback: o });
|
|
20634
|
+
return Br(() => {
|
|
20424
20635
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
20425
20636
|
}, [e]), i;
|
|
20426
20637
|
}
|
|
20427
|
-
function
|
|
20638
|
+
function Ya(e) {
|
|
20428
20639
|
if (!e) return null;
|
|
20429
20640
|
if (e.children.length > 1) return e;
|
|
20430
20641
|
let t = e.children[0];
|
|
20431
|
-
return
|
|
20642
|
+
return Lr(t) ? t : e;
|
|
20432
20643
|
}
|
|
20433
|
-
function
|
|
20434
|
-
let { measure: t } = e, [n, r] = (0, S.useState)(null), i =
|
|
20435
|
-
for (let { target: n } of e) if (
|
|
20644
|
+
function Xa(e) {
|
|
20645
|
+
let { measure: t } = e, [n, r] = (0, S.useState)(null), i = Ia({ callback: (0, S.useCallback)((e) => {
|
|
20646
|
+
for (let { target: n } of e) if (Lr(n)) {
|
|
20436
20647
|
r((e) => {
|
|
20437
20648
|
let r = t(n);
|
|
20438
20649
|
return e ? {
|
|
@@ -20443,8 +20654,8 @@ function qa(e) {
|
|
|
20443
20654
|
});
|
|
20444
20655
|
break;
|
|
20445
20656
|
}
|
|
20446
|
-
}, [t]) }), [a, o] =
|
|
20447
|
-
let n =
|
|
20657
|
+
}, [t]) }), [a, o] = Gr((0, S.useCallback)((e) => {
|
|
20658
|
+
let n = Ya(e);
|
|
20448
20659
|
i?.disconnect(), n && i?.observe(n), r(n ? t(n) : null);
|
|
20449
20660
|
}, [t, i]));
|
|
20450
20661
|
return (0, S.useMemo)(() => ({
|
|
@@ -20457,21 +20668,21 @@ function qa(e) {
|
|
|
20457
20668
|
o
|
|
20458
20669
|
]);
|
|
20459
20670
|
}
|
|
20460
|
-
var
|
|
20461
|
-
sensor:
|
|
20671
|
+
var Za = [{
|
|
20672
|
+
sensor: ga,
|
|
20462
20673
|
options: {}
|
|
20463
20674
|
}, {
|
|
20464
|
-
sensor:
|
|
20675
|
+
sensor: da,
|
|
20465
20676
|
options: {}
|
|
20466
|
-
}],
|
|
20467
|
-
draggable: { measure:
|
|
20677
|
+
}], Qa = { current: {} }, $a = {
|
|
20678
|
+
draggable: { measure: Fi },
|
|
20468
20679
|
droppable: {
|
|
20469
|
-
measure:
|
|
20470
|
-
strategy:
|
|
20471
|
-
frequency:
|
|
20680
|
+
measure: Fi,
|
|
20681
|
+
strategy: ka.WhileDragging,
|
|
20682
|
+
frequency: Aa.Optimized
|
|
20472
20683
|
},
|
|
20473
|
-
dragOverlay: { measure:
|
|
20474
|
-
},
|
|
20684
|
+
dragOverlay: { measure: Pi }
|
|
20685
|
+
}, eo = class extends Map {
|
|
20475
20686
|
get(e) {
|
|
20476
20687
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
20477
20688
|
}
|
|
@@ -20487,7 +20698,7 @@ var Ja = [{
|
|
|
20487
20698
|
getNodeFor(e) {
|
|
20488
20699
|
return this.get(e)?.node.current ?? void 0;
|
|
20489
20700
|
}
|
|
20490
|
-
},
|
|
20701
|
+
}, to = {
|
|
20491
20702
|
activatorEvent: null,
|
|
20492
20703
|
active: null,
|
|
20493
20704
|
activeNode: null,
|
|
@@ -20496,31 +20707,31 @@ var Ja = [{
|
|
|
20496
20707
|
containerNodeRect: null,
|
|
20497
20708
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
20498
20709
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
20499
|
-
droppableContainers: /* @__PURE__ */ new
|
|
20710
|
+
droppableContainers: /* @__PURE__ */ new eo(),
|
|
20500
20711
|
over: null,
|
|
20501
20712
|
dragOverlay: {
|
|
20502
20713
|
nodeRef: { current: null },
|
|
20503
20714
|
rect: null,
|
|
20504
|
-
setRef:
|
|
20715
|
+
setRef: gi
|
|
20505
20716
|
},
|
|
20506
20717
|
scrollableAncestors: [],
|
|
20507
20718
|
scrollableAncestorRects: [],
|
|
20508
|
-
measuringConfiguration:
|
|
20509
|
-
measureDroppableContainers:
|
|
20719
|
+
measuringConfiguration: $a,
|
|
20720
|
+
measureDroppableContainers: gi,
|
|
20510
20721
|
windowRect: null,
|
|
20511
20722
|
measuringScheduled: !1
|
|
20512
|
-
},
|
|
20723
|
+
}, no = {
|
|
20513
20724
|
activatorEvent: null,
|
|
20514
20725
|
activators: [],
|
|
20515
20726
|
active: null,
|
|
20516
20727
|
activeNodeRect: null,
|
|
20517
20728
|
ariaDescribedById: { draggable: "" },
|
|
20518
|
-
dispatch:
|
|
20729
|
+
dispatch: gi,
|
|
20519
20730
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
20520
20731
|
over: null,
|
|
20521
|
-
measureDroppableContainers:
|
|
20522
|
-
},
|
|
20523
|
-
function
|
|
20732
|
+
measureDroppableContainers: gi
|
|
20733
|
+
}, ro = /* @__PURE__ */ (0, S.createContext)(no), io = /* @__PURE__ */ (0, S.createContext)(to);
|
|
20734
|
+
function ao() {
|
|
20524
20735
|
return {
|
|
20525
20736
|
draggable: {
|
|
20526
20737
|
active: null,
|
|
@@ -20534,12 +20745,12 @@ function no() {
|
|
|
20534
20745
|
y: 0
|
|
20535
20746
|
}
|
|
20536
20747
|
},
|
|
20537
|
-
droppable: { containers: new
|
|
20748
|
+
droppable: { containers: new eo() }
|
|
20538
20749
|
};
|
|
20539
20750
|
}
|
|
20540
|
-
function
|
|
20751
|
+
function oo(e, t) {
|
|
20541
20752
|
switch (t.type) {
|
|
20542
|
-
case
|
|
20753
|
+
case hi.DragStart: return {
|
|
20543
20754
|
...e,
|
|
20544
20755
|
draggable: {
|
|
20545
20756
|
...e.draggable,
|
|
@@ -20547,7 +20758,7 @@ function ro(e, t) {
|
|
|
20547
20758
|
active: t.active
|
|
20548
20759
|
}
|
|
20549
20760
|
};
|
|
20550
|
-
case
|
|
20761
|
+
case hi.DragMove: return e.draggable.active == null ? e : {
|
|
20551
20762
|
...e,
|
|
20552
20763
|
draggable: {
|
|
20553
20764
|
...e.draggable,
|
|
@@ -20557,8 +20768,8 @@ function ro(e, t) {
|
|
|
20557
20768
|
}
|
|
20558
20769
|
}
|
|
20559
20770
|
};
|
|
20560
|
-
case
|
|
20561
|
-
case
|
|
20771
|
+
case hi.DragEnd:
|
|
20772
|
+
case hi.DragCancel: return {
|
|
20562
20773
|
...e,
|
|
20563
20774
|
draggable: {
|
|
20564
20775
|
...e.draggable,
|
|
@@ -20573,8 +20784,8 @@ function ro(e, t) {
|
|
|
20573
20784
|
}
|
|
20574
20785
|
}
|
|
20575
20786
|
};
|
|
20576
|
-
case
|
|
20577
|
-
let { element: n } = t, { id: r } = n, i = new
|
|
20787
|
+
case hi.RegisterDroppable: {
|
|
20788
|
+
let { element: n } = t, { id: r } = n, i = new eo(e.droppable.containers);
|
|
20578
20789
|
return i.set(r, n), {
|
|
20579
20790
|
...e,
|
|
20580
20791
|
droppable: {
|
|
@@ -20583,10 +20794,10 @@ function ro(e, t) {
|
|
|
20583
20794
|
}
|
|
20584
20795
|
};
|
|
20585
20796
|
}
|
|
20586
|
-
case
|
|
20797
|
+
case hi.SetDroppableDisabled: {
|
|
20587
20798
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
20588
20799
|
if (!a || r !== a.key) return e;
|
|
20589
|
-
let o = new
|
|
20800
|
+
let o = new eo(e.droppable.containers);
|
|
20590
20801
|
return o.set(n, {
|
|
20591
20802
|
...a,
|
|
20592
20803
|
disabled: i
|
|
@@ -20598,10 +20809,10 @@ function ro(e, t) {
|
|
|
20598
20809
|
}
|
|
20599
20810
|
};
|
|
20600
20811
|
}
|
|
20601
|
-
case
|
|
20812
|
+
case hi.UnregisterDroppable: {
|
|
20602
20813
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
20603
20814
|
if (!i || r !== i.key) return e;
|
|
20604
|
-
let a = new
|
|
20815
|
+
let a = new eo(e.droppable.containers);
|
|
20605
20816
|
return a.delete(n), {
|
|
20606
20817
|
...e,
|
|
20607
20818
|
droppable: {
|
|
@@ -20613,11 +20824,11 @@ function ro(e, t) {
|
|
|
20613
20824
|
default: return e;
|
|
20614
20825
|
}
|
|
20615
20826
|
}
|
|
20616
|
-
function
|
|
20617
|
-
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = (0, S.useContext)(
|
|
20827
|
+
function so(e) {
|
|
20828
|
+
let { disabled: t } = e, { active: n, activatorEvent: r, draggableNodes: i } = (0, S.useContext)(ro), a = Kr(r), o = Kr(n?.id);
|
|
20618
20829
|
return (0, S.useEffect)(() => {
|
|
20619
20830
|
if (!t && !r && a && o != null) {
|
|
20620
|
-
if (
|
|
20831
|
+
if (!$r(a) || document.activeElement === a.target) return;
|
|
20621
20832
|
let e = i.get(o);
|
|
20622
20833
|
if (!e) return;
|
|
20623
20834
|
let { activatorNode: t, node: n } = e;
|
|
@@ -20625,7 +20836,7 @@ function io(e) {
|
|
|
20625
20836
|
requestAnimationFrame(() => {
|
|
20626
20837
|
for (let e of [t.current, n.current]) {
|
|
20627
20838
|
if (!e) continue;
|
|
20628
|
-
let t =
|
|
20839
|
+
let t = ii(e);
|
|
20629
20840
|
if (t) {
|
|
20630
20841
|
t.focus();
|
|
20631
20842
|
break;
|
|
@@ -20641,25 +20852,25 @@ function io(e) {
|
|
|
20641
20852
|
a
|
|
20642
20853
|
]), null;
|
|
20643
20854
|
}
|
|
20644
|
-
function
|
|
20855
|
+
function co(e, t) {
|
|
20645
20856
|
let { transform: n, ...r } = t;
|
|
20646
20857
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
20647
20858
|
transform: e,
|
|
20648
20859
|
...r
|
|
20649
20860
|
}), n) : n;
|
|
20650
20861
|
}
|
|
20651
|
-
function
|
|
20862
|
+
function W(e) {
|
|
20652
20863
|
return (0, S.useMemo)(() => ({
|
|
20653
20864
|
draggable: {
|
|
20654
|
-
|
|
20865
|
+
...$a.draggable,
|
|
20655
20866
|
...e?.draggable
|
|
20656
20867
|
},
|
|
20657
20868
|
droppable: {
|
|
20658
|
-
|
|
20869
|
+
...$a.droppable,
|
|
20659
20870
|
...e?.droppable
|
|
20660
20871
|
},
|
|
20661
20872
|
dragOverlay: {
|
|
20662
|
-
|
|
20873
|
+
...$a.dragOverlay,
|
|
20663
20874
|
...e?.dragOverlay
|
|
20664
20875
|
}
|
|
20665
20876
|
}), [
|
|
@@ -20668,12 +20879,12 @@ function oo(e) {
|
|
|
20668
20879
|
e?.dragOverlay
|
|
20669
20880
|
]);
|
|
20670
20881
|
}
|
|
20671
|
-
function
|
|
20882
|
+
function G(e) {
|
|
20672
20883
|
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = (0, S.useRef)(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
20673
20884
|
x: i,
|
|
20674
20885
|
y: i
|
|
20675
20886
|
} : i;
|
|
20676
|
-
|
|
20887
|
+
Br(() => {
|
|
20677
20888
|
if (!o && !s || !t) {
|
|
20678
20889
|
a.current = !1;
|
|
20679
20890
|
return;
|
|
@@ -20681,9 +20892,9 @@ function so(e) {
|
|
|
20681
20892
|
if (a.current || !r) return;
|
|
20682
20893
|
let e = t?.node.current;
|
|
20683
20894
|
if (!e || e.isConnected === !1) return;
|
|
20684
|
-
let i =
|
|
20895
|
+
let i = Ai(n(e), r);
|
|
20685
20896
|
if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
|
|
20686
|
-
let t =
|
|
20897
|
+
let t = Bi(e);
|
|
20687
20898
|
t && t.scrollBy({
|
|
20688
20899
|
top: i.y,
|
|
20689
20900
|
left: i.x
|
|
@@ -20697,34 +20908,34 @@ function so(e) {
|
|
|
20697
20908
|
n
|
|
20698
20909
|
]);
|
|
20699
20910
|
}
|
|
20700
|
-
var
|
|
20701
|
-
...
|
|
20911
|
+
var lo = /* @__PURE__ */ (0, S.createContext)({
|
|
20912
|
+
...yi,
|
|
20702
20913
|
scaleX: 1,
|
|
20703
20914
|
scaleY: 1
|
|
20704
|
-
}),
|
|
20915
|
+
}), uo;
|
|
20705
20916
|
(function(e) {
|
|
20706
20917
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
20707
|
-
})(
|
|
20708
|
-
var
|
|
20709
|
-
let { id: t, accessibility: n, autoScroll: r = !0, children: i, sensors: a =
|
|
20918
|
+
})(uo ||= {});
|
|
20919
|
+
var fo = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
20920
|
+
let { id: t, accessibility: n, autoScroll: r = !0, children: i, sensors: a = Za, collisionDetection: o = Oi, measuring: s, modifiers: c, ...l } = e, [u, d] = (0, S.useReducer)(oo, void 0, ao), [f, p] = di(), [m, h] = (0, S.useState)(uo.Uninitialized), g = m === uo.Initialized, { draggable: { active: _, nodes: v, translate: y }, droppable: { containers: b } } = u, x = _ == null ? null : v.get(_), C = (0, S.useRef)({
|
|
20710
20921
|
initial: null,
|
|
20711
20922
|
translated: null
|
|
20712
20923
|
}), w = (0, S.useMemo)(() => _ == null ? null : {
|
|
20713
20924
|
id: _,
|
|
20714
|
-
data: x?.data ??
|
|
20925
|
+
data: x?.data ?? Qa,
|
|
20715
20926
|
rect: C
|
|
20716
|
-
}, [_, x]), T = (0, S.useRef)(null), [ee, te] = (0, S.useState)(null), [E, D] = (0, S.useState)(null), ne =
|
|
20927
|
+
}, [_, x]), T = (0, S.useRef)(null), [ee, te] = (0, S.useState)(null), [E, D] = (0, S.useState)(null), ne = Ur(l, Object.values(l)), re = Jr("DndDescribedBy", t), ie = (0, S.useMemo)(() => b.getEnabled(), [b]), ae = W(s), { droppableRects: oe, measureDroppableContainers: se, measuringScheduled: O } = Ma(ie, {
|
|
20717
20928
|
dragging: g,
|
|
20718
20929
|
dependencies: [y.x, y.y],
|
|
20719
20930
|
config: ae.droppable
|
|
20720
|
-
}), k =
|
|
20721
|
-
|
|
20931
|
+
}), k = Da(v, _), ce = (0, S.useMemo)(() => E ? ti(E) : null, [E]), le = Ne(), A = Pa(k, ae.draggable.measure);
|
|
20932
|
+
G({
|
|
20722
20933
|
activeNode: _ == null ? null : v.get(_),
|
|
20723
20934
|
config: le.layoutShiftCompensation,
|
|
20724
20935
|
initialRect: A,
|
|
20725
20936
|
measure: ae.draggable.measure
|
|
20726
20937
|
});
|
|
20727
|
-
let ue =
|
|
20938
|
+
let ue = Ra(k, ae.draggable.measure, A), j = Ra(k ? k.parentElement : null), M = (0, S.useRef)({
|
|
20728
20939
|
activatorEvent: null,
|
|
20729
20940
|
active: null,
|
|
20730
20941
|
activeNode: k,
|
|
@@ -20738,7 +20949,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20738
20949
|
over: null,
|
|
20739
20950
|
scrollableAncestors: [],
|
|
20740
20951
|
scrollAdjustedTranslate: null
|
|
20741
|
-
}), de = b.getNodeFor(M.current.over?.id), fe =
|
|
20952
|
+
}), de = b.getNodeFor(M.current.over?.id), fe = Xa({ measure: ae.dragOverlay.measure }), pe = fe.nodeRef.current ?? k, N = g ? fe.rect ?? ue : null, me = !!(fe.nodeRef.current && fe.rect), he = za(me ? null : ue), ge = Ka(pe ? Fr(pe) : null), _e = Va(g ? de ?? k : null), ve = Ja(_e), ye = co(c, {
|
|
20742
20953
|
transform: {
|
|
20743
20954
|
x: y.x - he.x,
|
|
20744
20955
|
y: y.y - he.y,
|
|
@@ -20755,13 +20966,13 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20755
20966
|
scrollableAncestors: _e,
|
|
20756
20967
|
scrollableAncestorRects: ve,
|
|
20757
20968
|
windowRect: ge
|
|
20758
|
-
}), P = ce ?
|
|
20969
|
+
}), P = ce ? Xr(ce, y) : null, be = Ha(_e), xe = Ua(be), Se = Ua(be, [ue]), Ce = Xr(ye, xe), we = N ? V(N, ye) : null, Te = w && we ? o({
|
|
20759
20970
|
active: w,
|
|
20760
20971
|
collisionRect: we,
|
|
20761
20972
|
droppableRects: oe,
|
|
20762
20973
|
droppableContainers: ie,
|
|
20763
20974
|
pointerCoordinates: P
|
|
20764
|
-
}) : null, Ee =
|
|
20975
|
+
}) : null, Ee = wi(Te, "id"), [De, F] = (0, S.useState)(null), I = ki(me ? ye : Xr(ye, Se), De?.rect ?? null, ue), Oe = (0, S.useRef)(null), ke = (0, S.useCallback)((e, t) => {
|
|
20765
20976
|
let { sensor: n, options: r } = t;
|
|
20766
20977
|
if (T.current == null) return;
|
|
20767
20978
|
let i = v.get(T.current);
|
|
@@ -20808,8 +21019,8 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20808
21019
|
}
|
|
20809
21020
|
};
|
|
20810
21021
|
(0, An.unstable_batchedUpdates)(() => {
|
|
20811
|
-
r?.(i), h(
|
|
20812
|
-
type:
|
|
21022
|
+
r?.(i), h(uo.Initializing), d({
|
|
21023
|
+
type: hi.DragStart,
|
|
20813
21024
|
initialCoordinates: e,
|
|
20814
21025
|
active: t
|
|
20815
21026
|
}), f({
|
|
@@ -20820,12 +21031,12 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20820
21031
|
},
|
|
20821
21032
|
onMove(e) {
|
|
20822
21033
|
d({
|
|
20823
|
-
type:
|
|
21034
|
+
type: hi.DragMove,
|
|
20824
21035
|
coordinates: e
|
|
20825
21036
|
});
|
|
20826
21037
|
},
|
|
20827
|
-
onEnd: o(
|
|
20828
|
-
onCancel: o(
|
|
21038
|
+
onEnd: o(hi.DragEnd),
|
|
21039
|
+
onCancel: o(hi.DragCancel)
|
|
20829
21040
|
});
|
|
20830
21041
|
function o(e) {
|
|
20831
21042
|
return async function() {
|
|
@@ -20838,11 +21049,11 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20838
21049
|
collisions: n,
|
|
20839
21050
|
delta: i,
|
|
20840
21051
|
over: r
|
|
20841
|
-
}, e ===
|
|
21052
|
+
}, e === hi.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = hi.DragCancel);
|
|
20842
21053
|
}
|
|
20843
21054
|
T.current = null, (0, An.unstable_batchedUpdates)(() => {
|
|
20844
|
-
d({ type: e }), h(
|
|
20845
|
-
let t = e ===
|
|
21055
|
+
d({ type: e }), h(uo.Uninitialized), F(null), te(null), D(null), Oe.current = null;
|
|
21056
|
+
let t = e === hi.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
20846
21057
|
if (o) {
|
|
20847
21058
|
let e = ne.current[t];
|
|
20848
21059
|
e?.(o), f({
|
|
@@ -20853,14 +21064,14 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20853
21064
|
});
|
|
20854
21065
|
};
|
|
20855
21066
|
}
|
|
20856
|
-
}, [v]), Ae =
|
|
21067
|
+
}, [v]), Ae = Oa(a, (0, S.useCallback)((e, t) => (n, r) => {
|
|
20857
21068
|
let i = n.nativeEvent, a = v.get(r);
|
|
20858
21069
|
if (T.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
20859
21070
|
let o = { active: a };
|
|
20860
21071
|
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, T.current = r, ke(n, t));
|
|
20861
21072
|
}, [v, ke]));
|
|
20862
|
-
|
|
20863
|
-
ue && m ===
|
|
21073
|
+
Wa(a), Br(() => {
|
|
21074
|
+
ue && m === uo.Initializing && h(uo.Initialized);
|
|
20864
21075
|
}, [ue, m]), (0, S.useEffect)(() => {
|
|
20865
21076
|
let { onDragMove: e } = ne.current, { active: t, activatorEvent: n, collisions: r, over: i } = M.current;
|
|
20866
21077
|
if (!t || !n) return;
|
|
@@ -20904,7 +21115,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20904
21115
|
event: c
|
|
20905
21116
|
});
|
|
20906
21117
|
});
|
|
20907
|
-
}, [Ee]),
|
|
21118
|
+
}, [Ee]), Br(() => {
|
|
20908
21119
|
M.current = {
|
|
20909
21120
|
activatorEvent: E,
|
|
20910
21121
|
active: w,
|
|
@@ -20936,7 +21147,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20936
21147
|
De,
|
|
20937
21148
|
_e,
|
|
20938
21149
|
Ce
|
|
20939
|
-
]),
|
|
21150
|
+
]), wa({
|
|
20940
21151
|
...le,
|
|
20941
21152
|
delta: y,
|
|
20942
21153
|
draggingRect: we,
|
|
@@ -21001,7 +21212,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
21001
21212
|
De,
|
|
21002
21213
|
se
|
|
21003
21214
|
]);
|
|
21004
|
-
return S.createElement(
|
|
21215
|
+
return S.createElement(li.Provider, { value: p }, S.createElement(ro.Provider, { value: Me }, S.createElement(io.Provider, { value: je }, S.createElement(lo.Provider, { value: I }, i)), S.createElement(so, { disabled: n?.restoreFocus === !1 })), S.createElement(mi, {
|
|
21005
21216
|
...n,
|
|
21006
21217
|
hiddenTextDescribedById: re
|
|
21007
21218
|
}));
|
|
@@ -21012,10 +21223,10 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
21012
21223
|
enabled: n
|
|
21013
21224
|
} : { enabled: n };
|
|
21014
21225
|
}
|
|
21015
|
-
}),
|
|
21016
|
-
function
|
|
21017
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, a =
|
|
21018
|
-
return
|
|
21226
|
+
}), po = /* @__PURE__ */ (0, S.createContext)(null), mo = "button", ho = "Draggable";
|
|
21227
|
+
function go(e) {
|
|
21228
|
+
let { id: t, data: n, disabled: r = !1, attributes: i } = e, a = Jr(ho), { activators: o, activatorEvent: s, active: c, activeNodeRect: l, ariaDescribedById: u, draggableNodes: d, over: f } = (0, S.useContext)(ro), { role: p = mo, roleDescription: m = "draggable", tabIndex: h = 0 } = i ?? {}, g = c?.id === t, _ = (0, S.useContext)(g ? lo : po), [v, y] = Gr(), [b, x] = Gr(), C = Ga(o, t), w = Ur(n);
|
|
21229
|
+
return Br(() => (d.set(t, {
|
|
21019
21230
|
id: t,
|
|
21020
21231
|
key: a,
|
|
21021
21232
|
node: v,
|
|
@@ -21032,7 +21243,7 @@ function po(e) {
|
|
|
21032
21243
|
role: p,
|
|
21033
21244
|
tabIndex: h,
|
|
21034
21245
|
"aria-disabled": r,
|
|
21035
|
-
"aria-pressed": g && p ===
|
|
21246
|
+
"aria-pressed": g && p === mo ? !0 : void 0,
|
|
21036
21247
|
"aria-roledescription": m,
|
|
21037
21248
|
"aria-describedby": u.draggable
|
|
21038
21249
|
}), [
|
|
@@ -21052,15 +21263,15 @@ function po(e) {
|
|
|
21052
21263
|
transform: _
|
|
21053
21264
|
};
|
|
21054
21265
|
}
|
|
21055
|
-
function
|
|
21056
|
-
return (0, S.useContext)(
|
|
21266
|
+
function _o() {
|
|
21267
|
+
return (0, S.useContext)(io);
|
|
21057
21268
|
}
|
|
21058
|
-
var
|
|
21059
|
-
function
|
|
21060
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e, a =
|
|
21061
|
-
...
|
|
21269
|
+
var vo = "Droppable", yo = { timeout: 25 };
|
|
21270
|
+
function bo(e) {
|
|
21271
|
+
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e, a = Jr(vo), { active: o, dispatch: s, over: c, measureDroppableContainers: l } = (0, S.useContext)(ro), u = (0, S.useRef)({ disabled: n }), d = (0, S.useRef)(!1), f = (0, S.useRef)(null), p = (0, S.useRef)(null), { disabled: m, updateMeasurementsFor: h, timeout: g } = {
|
|
21272
|
+
...yo,
|
|
21062
21273
|
...i
|
|
21063
|
-
}, _ =
|
|
21274
|
+
}, _ = Ur(h ?? r), v = Ia({
|
|
21064
21275
|
callback: (0, S.useCallback)(() => {
|
|
21065
21276
|
if (!d.current) {
|
|
21066
21277
|
d.current = !0;
|
|
@@ -21071,13 +21282,13 @@ function _o(e) {
|
|
|
21071
21282
|
}, g);
|
|
21072
21283
|
}, [g]),
|
|
21073
21284
|
disabled: m || !o
|
|
21074
|
-
}), [y, b] =
|
|
21285
|
+
}), [y, b] = Gr((0, S.useCallback)((e, t) => {
|
|
21075
21286
|
v && (t && (v.unobserve(t), d.current = !1), e && v.observe(e));
|
|
21076
|
-
}, [v])), x =
|
|
21287
|
+
}, [v])), x = Ur(t);
|
|
21077
21288
|
return (0, S.useEffect)(() => {
|
|
21078
21289
|
!v || !y.current || (v.disconnect(), d.current = !1, v.observe(y.current));
|
|
21079
21290
|
}, [y, v]), (0, S.useEffect)(() => (s({
|
|
21080
|
-
type:
|
|
21291
|
+
type: hi.RegisterDroppable,
|
|
21081
21292
|
element: {
|
|
21082
21293
|
id: r,
|
|
21083
21294
|
key: a,
|
|
@@ -21087,12 +21298,12 @@ function _o(e) {
|
|
|
21087
21298
|
data: x
|
|
21088
21299
|
}
|
|
21089
21300
|
}), () => s({
|
|
21090
|
-
type:
|
|
21301
|
+
type: hi.UnregisterDroppable,
|
|
21091
21302
|
key: a,
|
|
21092
21303
|
id: r
|
|
21093
21304
|
})), [r]), (0, S.useEffect)(() => {
|
|
21094
21305
|
n !== u.current.disabled && (s({
|
|
21095
|
-
type:
|
|
21306
|
+
type: hi.SetDroppableDisabled,
|
|
21096
21307
|
id: r,
|
|
21097
21308
|
key: a,
|
|
21098
21309
|
disabled: n
|
|
@@ -21111,9 +21322,9 @@ function _o(e) {
|
|
|
21111
21322
|
setNodeRef: b
|
|
21112
21323
|
};
|
|
21113
21324
|
}
|
|
21114
|
-
function
|
|
21115
|
-
let { animation: t, children: n } = e, [r, i] = (0, S.useState)(null), [a, o] = (0, S.useState)(null), s =
|
|
21116
|
-
return !n && !r && s && i(s),
|
|
21325
|
+
function xo(e) {
|
|
21326
|
+
let { animation: t, children: n } = e, [r, i] = (0, S.useState)(null), [a, o] = (0, S.useState)(null), s = Kr(n);
|
|
21327
|
+
return !n && !r && s && i(s), Br(() => {
|
|
21117
21328
|
if (!a) return;
|
|
21118
21329
|
let e = r?.key, n = r?.props.id;
|
|
21119
21330
|
if (e == null || n == null) {
|
|
@@ -21129,34 +21340,34 @@ function vo(e) {
|
|
|
21129
21340
|
a
|
|
21130
21341
|
]), S.createElement(S.Fragment, null, n, r ? (0, S.cloneElement)(r, { ref: o }) : null);
|
|
21131
21342
|
}
|
|
21132
|
-
var
|
|
21343
|
+
var So = {
|
|
21133
21344
|
x: 0,
|
|
21134
21345
|
y: 0,
|
|
21135
21346
|
scaleX: 1,
|
|
21136
21347
|
scaleY: 1
|
|
21137
21348
|
};
|
|
21138
|
-
function
|
|
21349
|
+
function Co(e) {
|
|
21139
21350
|
let { children: t } = e;
|
|
21140
|
-
return S.createElement(
|
|
21351
|
+
return S.createElement(ro.Provider, { value: no }, S.createElement(lo.Provider, { value: So }, t));
|
|
21141
21352
|
}
|
|
21142
|
-
var
|
|
21353
|
+
var wo = {
|
|
21143
21354
|
position: "fixed",
|
|
21144
21355
|
touchAction: "none"
|
|
21145
|
-
},
|
|
21146
|
-
let { as: n, activatorEvent: r, adjustScale: i, children: a, className: o, rect: s, style: c, transform: l, transition: u =
|
|
21356
|
+
}, To = (e) => $r(e) ? "transform 250ms ease" : void 0, Eo = /* @__PURE__ */ (0, S.forwardRef)((e, t) => {
|
|
21357
|
+
let { as: n, activatorEvent: r, adjustScale: i, children: a, className: o, rect: s, style: c, transform: l, transition: u = To } = e;
|
|
21147
21358
|
if (!s) return null;
|
|
21148
21359
|
let d = i ? l : {
|
|
21149
21360
|
...l,
|
|
21150
21361
|
scaleX: 1,
|
|
21151
21362
|
scaleY: 1
|
|
21152
21363
|
}, f = {
|
|
21153
|
-
...
|
|
21364
|
+
...wo,
|
|
21154
21365
|
width: s.width,
|
|
21155
21366
|
height: s.height,
|
|
21156
21367
|
top: s.top,
|
|
21157
21368
|
left: s.left,
|
|
21158
|
-
transform:
|
|
21159
|
-
transformOrigin: i && r ?
|
|
21369
|
+
transform: ni.Transform.toString(d),
|
|
21370
|
+
transformOrigin: i && r ? xi(r, s) : void 0,
|
|
21160
21371
|
transition: typeof u == "function" ? u(r) : u,
|
|
21161
21372
|
...c
|
|
21162
21373
|
};
|
|
@@ -21165,12 +21376,12 @@ var xo = {
|
|
|
21165
21376
|
style: f,
|
|
21166
21377
|
ref: t
|
|
21167
21378
|
}, a);
|
|
21168
|
-
}),
|
|
21379
|
+
}), Do = {
|
|
21169
21380
|
duration: 250,
|
|
21170
21381
|
easing: "ease",
|
|
21171
21382
|
keyframes: (e) => {
|
|
21172
21383
|
let { transform: { initial: t, final: n } } = e;
|
|
21173
|
-
return [{ transform:
|
|
21384
|
+
return [{ transform: ni.Transform.toString(t) }, { transform: ni.Transform.toString(n) }];
|
|
21174
21385
|
},
|
|
21175
21386
|
sideEffects: /* @__PURE__ */ ((e) => (t) => {
|
|
21176
21387
|
let { active: n, dragOverlay: r } = t, i = {}, { styles: a, className: o } = e;
|
|
@@ -21182,20 +21393,20 @@ var xo = {
|
|
|
21182
21393
|
};
|
|
21183
21394
|
})({ styles: { active: { opacity: "0" } } })
|
|
21184
21395
|
};
|
|
21185
|
-
function
|
|
21396
|
+
function Oo(e) {
|
|
21186
21397
|
let { config: t, draggableNodes: n, droppableContainers: r, measuringConfiguration: i } = e;
|
|
21187
|
-
return
|
|
21398
|
+
return Vr((e, a) => {
|
|
21188
21399
|
if (t === null) return;
|
|
21189
21400
|
let o = n.get(e);
|
|
21190
21401
|
if (!o) return;
|
|
21191
21402
|
let s = o.node.current;
|
|
21192
21403
|
if (!s) return;
|
|
21193
|
-
let c =
|
|
21404
|
+
let c = Ya(a);
|
|
21194
21405
|
if (!c) return;
|
|
21195
|
-
let { transform: l } =
|
|
21406
|
+
let { transform: l } = Fr(a).getComputedStyle(a), u = H(l);
|
|
21196
21407
|
if (!u) return;
|
|
21197
|
-
let d = typeof t == "function" ? t :
|
|
21198
|
-
return
|
|
21408
|
+
let d = typeof t == "function" ? t : ko(t);
|
|
21409
|
+
return ea(s, i.draggable.measure), d({
|
|
21199
21410
|
active: {
|
|
21200
21411
|
id: e,
|
|
21201
21412
|
data: o.data,
|
|
@@ -21213,9 +21424,9 @@ function To(e) {
|
|
|
21213
21424
|
});
|
|
21214
21425
|
});
|
|
21215
21426
|
}
|
|
21216
|
-
function
|
|
21427
|
+
function ko(e) {
|
|
21217
21428
|
let { duration: t, easing: n, sideEffects: r, keyframes: i } = {
|
|
21218
|
-
...
|
|
21429
|
+
...Do,
|
|
21219
21430
|
...e
|
|
21220
21431
|
};
|
|
21221
21432
|
return (e) => {
|
|
@@ -21257,14 +21468,14 @@ function Eo(e) {
|
|
|
21257
21468
|
});
|
|
21258
21469
|
};
|
|
21259
21470
|
}
|
|
21260
|
-
var
|
|
21261
|
-
function
|
|
21471
|
+
var Ao = 0;
|
|
21472
|
+
function jo(e) {
|
|
21262
21473
|
return (0, S.useMemo)(() => {
|
|
21263
|
-
if (e != null) return
|
|
21474
|
+
if (e != null) return Ao++, Ao;
|
|
21264
21475
|
}, [e]);
|
|
21265
21476
|
}
|
|
21266
|
-
var
|
|
21267
|
-
let { adjustScale: t = !1, children: n, dropAnimation: r, style: i, transition: a, modifiers: o, wrapperElement: s = "div", className: c, zIndex: l = 999 } = e, { activatorEvent: u, active: d, activeNodeRect: f, containerNodeRect: p, draggableNodes: m, droppableContainers: h, dragOverlay: g, over: _, measuringConfiguration: v, scrollableAncestors: y, scrollableAncestorRects: b, windowRect: x } =
|
|
21477
|
+
var Mo = /* @__PURE__ */ S.memo((e) => {
|
|
21478
|
+
let { adjustScale: t = !1, children: n, dropAnimation: r, style: i, transition: a, modifiers: o, wrapperElement: s = "div", className: c, zIndex: l = 999 } = e, { activatorEvent: u, active: d, activeNodeRect: f, containerNodeRect: p, draggableNodes: m, droppableContainers: h, dragOverlay: g, over: _, measuringConfiguration: v, scrollableAncestors: y, scrollableAncestorRects: b, windowRect: x } = _o(), C = (0, S.useContext)(lo), w = jo(d?.id), T = co(o, {
|
|
21268
21479
|
activatorEvent: u,
|
|
21269
21480
|
active: d,
|
|
21270
21481
|
activeNodeRect: f,
|
|
@@ -21276,13 +21487,13 @@ var ko = /* @__PURE__ */ S.memo((e) => {
|
|
|
21276
21487
|
scrollableAncestorRects: b,
|
|
21277
21488
|
transform: C,
|
|
21278
21489
|
windowRect: x
|
|
21279
|
-
}), ee =
|
|
21490
|
+
}), ee = Na(f), te = Oo({
|
|
21280
21491
|
config: r,
|
|
21281
21492
|
draggableNodes: m,
|
|
21282
21493
|
droppableContainers: h,
|
|
21283
21494
|
measuringConfiguration: v
|
|
21284
21495
|
}), E = ee ? g.setRef : void 0;
|
|
21285
|
-
return S.createElement(
|
|
21496
|
+
return S.createElement(Co, null, S.createElement(xo, { animation: te }, d && w ? S.createElement(Eo, {
|
|
21286
21497
|
key: w,
|
|
21287
21498
|
id: d.id,
|
|
21288
21499
|
ref: E,
|
|
@@ -21301,15 +21512,15 @@ var ko = /* @__PURE__ */ S.memo((e) => {
|
|
|
21301
21512
|
});
|
|
21302
21513
|
//#endregion
|
|
21303
21514
|
//#region src/components/ElementTree.tsx
|
|
21304
|
-
function
|
|
21515
|
+
function No(e) {
|
|
21305
21516
|
return e.type === "row" || e.type === "column" || e.type === "grid" ? e.items : e.type === "accordion" ? e.body : e.type === "tabs" ? e.tabs.flatMap((e) => e.content) : null;
|
|
21306
21517
|
}
|
|
21307
|
-
function
|
|
21518
|
+
function Po(e, t) {
|
|
21308
21519
|
if (!e || e.length !== t.length) return !1;
|
|
21309
21520
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
21310
21521
|
return !0;
|
|
21311
21522
|
}
|
|
21312
|
-
function
|
|
21523
|
+
function Fo(e) {
|
|
21313
21524
|
switch (e.type) {
|
|
21314
21525
|
case "text": return `"${(e.content ?? "").slice(0, 20)}"`;
|
|
21315
21526
|
case "button": return `"${e.label}"`;
|
|
@@ -21321,13 +21532,13 @@ function Mo(e) {
|
|
|
21321
21532
|
default: return "";
|
|
21322
21533
|
}
|
|
21323
21534
|
}
|
|
21324
|
-
function
|
|
21535
|
+
function Io(e) {
|
|
21325
21536
|
return "n-" + e.join("-");
|
|
21326
21537
|
}
|
|
21327
|
-
function
|
|
21538
|
+
function Lo(e, t) {
|
|
21328
21539
|
return "g-" + e.join("-") + "_" + t;
|
|
21329
21540
|
}
|
|
21330
|
-
function
|
|
21541
|
+
function Ro(e) {
|
|
21331
21542
|
if (!e.startsWith("g-")) return null;
|
|
21332
21543
|
let t = e.slice(2).split("_");
|
|
21333
21544
|
return t.length === 2 ? {
|
|
@@ -21335,11 +21546,11 @@ function Fo(e) {
|
|
|
21335
21546
|
index: Number(t[1])
|
|
21336
21547
|
} : null;
|
|
21337
21548
|
}
|
|
21338
|
-
function
|
|
21549
|
+
function zo(e) {
|
|
21339
21550
|
return e.startsWith("n-") ? e.slice(2).split("-").map(Number) : null;
|
|
21340
21551
|
}
|
|
21341
|
-
function
|
|
21342
|
-
let { setNodeRef: r, isOver: i } =
|
|
21552
|
+
function Bo({ parentPath: e, index: t, depth: n }) {
|
|
21553
|
+
let { setNodeRef: r, isOver: i } = bo({ id: Lo(e, t) });
|
|
21343
21554
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21344
21555
|
ref: r,
|
|
21345
21556
|
className: `tree-drop-gap ${i ? "active" : ""}`,
|
|
@@ -21347,14 +21558,14 @@ function Lo({ parentPath: e, index: t, depth: n }) {
|
|
|
21347
21558
|
children: /* @__PURE__ */ (0, P.jsx)("div", { className: "tree-drop-line" })
|
|
21348
21559
|
});
|
|
21349
21560
|
}
|
|
21350
|
-
var
|
|
21351
|
-
let c =
|
|
21561
|
+
var Vo = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selectedPaths: i, onSelect: a, depth: o, isDraggingAny: s }) {
|
|
21562
|
+
let c = Io(n), l = Po(r, n), u = i.length > 1 && i.some((e) => Po(e, n)), d = No(t), f = d !== null, [p, m] = (0, S.useState)(!1), { attributes: h, listeners: g, setNodeRef: _, isDragging: v } = go({
|
|
21352
21563
|
id: c,
|
|
21353
21564
|
data: {
|
|
21354
21565
|
path: n,
|
|
21355
21566
|
element: t
|
|
21356
21567
|
}
|
|
21357
|
-
}), { setNodeRef: y, isOver: b } =
|
|
21568
|
+
}), { setNodeRef: y, isOver: b } = bo({
|
|
21358
21569
|
id: c,
|
|
21359
21570
|
data: {
|
|
21360
21571
|
path: n,
|
|
@@ -21367,7 +21578,7 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21367
21578
|
}, [a, n]), w = (0, S.useCallback)((e) => {
|
|
21368
21579
|
e.stopPropagation(), e.preventDefault(), m((e) => !e);
|
|
21369
21580
|
}, []), T = n.slice(0, -1);
|
|
21370
|
-
return /* @__PURE__ */ (0, P.jsxs)(P.Fragment, { children: [s ? /* @__PURE__ */ (0, P.jsx)(
|
|
21581
|
+
return /* @__PURE__ */ (0, P.jsxs)(P.Fragment, { children: [s ? /* @__PURE__ */ (0, P.jsx)(Bo, {
|
|
21371
21582
|
parentPath: T,
|
|
21372
21583
|
index: n[n.length - 1],
|
|
21373
21584
|
depth: o
|
|
@@ -21397,13 +21608,13 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21397
21608
|
}),
|
|
21398
21609
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21399
21610
|
className: "tree-label",
|
|
21400
|
-
children:
|
|
21611
|
+
children: Fo(t)
|
|
21401
21612
|
}),
|
|
21402
21613
|
f && d ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21403
21614
|
className: "tree-badge",
|
|
21404
21615
|
children: d.length
|
|
21405
21616
|
}) : null,
|
|
21406
|
-
|
|
21617
|
+
dr(t) ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21407
21618
|
className: "tree-error-dot",
|
|
21408
21619
|
title: "Has validation errors"
|
|
21409
21620
|
}) : null
|
|
@@ -21418,7 +21629,7 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21418
21629
|
onSelect: a,
|
|
21419
21630
|
depth: o + 1,
|
|
21420
21631
|
isDraggingAny: s
|
|
21421
|
-
},
|
|
21632
|
+
}, Io([...n, c]))), s ? /* @__PURE__ */ (0, P.jsx)(Bo, {
|
|
21422
21633
|
parentPath: n,
|
|
21423
21634
|
index: d.length,
|
|
21424
21635
|
depth: o + 1
|
|
@@ -21426,14 +21637,14 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21426
21637
|
}) : null]
|
|
21427
21638
|
})] });
|
|
21428
21639
|
});
|
|
21429
|
-
function
|
|
21640
|
+
function Ho({ element: e }) {
|
|
21430
21641
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21431
21642
|
className: "tree-drag-overlay",
|
|
21432
21643
|
children: /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21433
21644
|
className: "tree-item selected",
|
|
21434
21645
|
style: { paddingLeft: 8 },
|
|
21435
21646
|
children: [
|
|
21436
|
-
|
|
21647
|
+
No(e) ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21437
21648
|
className: "tree-arrow",
|
|
21438
21649
|
children: "▾"
|
|
21439
21650
|
}) : /* @__PURE__ */ (0, P.jsx)("span", {
|
|
@@ -21446,44 +21657,44 @@ function zo({ element: e }) {
|
|
|
21446
21657
|
}),
|
|
21447
21658
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21448
21659
|
className: "tree-label",
|
|
21449
|
-
children:
|
|
21660
|
+
children: Fo(e)
|
|
21450
21661
|
})
|
|
21451
21662
|
]
|
|
21452
21663
|
})
|
|
21453
21664
|
});
|
|
21454
21665
|
}
|
|
21455
|
-
function
|
|
21666
|
+
function Uo(e, t) {
|
|
21456
21667
|
let n = t.toLowerCase();
|
|
21457
|
-
if (e.type.toLowerCase().includes(n) ||
|
|
21458
|
-
let r =
|
|
21459
|
-
return r ? r.some((e) =>
|
|
21668
|
+
if (e.type.toLowerCase().includes(n) || Fo(e).toLowerCase().includes(n)) return !0;
|
|
21669
|
+
let r = No(e);
|
|
21670
|
+
return r ? r.some((e) => Uo(e, n)) : !1;
|
|
21460
21671
|
}
|
|
21461
|
-
function
|
|
21462
|
-
let e = N((e) => e.body), t = N((e) => e.selectedPath), n = N((e) => e.selectedPaths), r = N((e) => e.selectElement), i = N((e) => e.moveElementToPath), [a, o] = (0, S.useState)(null), [s, c] = (0, S.useState)(""), l =
|
|
21672
|
+
function Wo() {
|
|
21673
|
+
let e = N((e) => e.body), t = N((e) => e.selectedPath), n = N((e) => e.selectedPaths), r = N((e) => e.selectElement), i = N((e) => e.moveElementToPath), [a, o] = (0, S.useState)(null), [s, c] = (0, S.useState)(""), l = vi(_i(ga, { activationConstraint: { distance: 8 } })), u = (0, S.useCallback)((e) => {
|
|
21463
21674
|
o(e.active.data.current?.element ?? null);
|
|
21464
21675
|
}, []), d = (0, S.useCallback)((e) => {
|
|
21465
21676
|
o(null);
|
|
21466
21677
|
let { active: t, over: n } = e;
|
|
21467
21678
|
if (!n || t.id === n.id) return;
|
|
21468
|
-
let r =
|
|
21679
|
+
let r = zo(t.id);
|
|
21469
21680
|
if (!r) return;
|
|
21470
21681
|
let a = n.id, s = t.id;
|
|
21471
21682
|
if (a.startsWith(s.replace("n-", "n-") + "-") || a.startsWith(s.replace("n-", "g-") + "-")) return;
|
|
21472
|
-
let c =
|
|
21683
|
+
let c = Ro(a);
|
|
21473
21684
|
if (c) {
|
|
21474
21685
|
i(r, c.parentPath, c.index);
|
|
21475
21686
|
return;
|
|
21476
21687
|
}
|
|
21477
|
-
let l =
|
|
21688
|
+
let l = zo(a);
|
|
21478
21689
|
if (!l) return;
|
|
21479
21690
|
let u = n.data.current?.element;
|
|
21480
|
-
u &&
|
|
21691
|
+
u && No(u) !== null ? i(r, l, (No(u) ?? []).length) : i(r, l.slice(0, -1), l[l.length - 1]);
|
|
21481
21692
|
}, [i]);
|
|
21482
21693
|
if (e.length === 0) return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21483
21694
|
className: "tree-empty",
|
|
21484
21695
|
children: "No elements yet"
|
|
21485
21696
|
});
|
|
21486
|
-
let f = s ? e.filter((e) =>
|
|
21697
|
+
let f = s ? e.filter((e) => Uo(e, s)) : e;
|
|
21487
21698
|
return /* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21488
21699
|
className: "tree-search-wrap",
|
|
21489
21700
|
children: [/* @__PURE__ */ (0, P.jsx)("input", {
|
|
@@ -21503,16 +21714,16 @@ function Vo() {
|
|
|
21503
21714
|
s,
|
|
21504
21715
|
"\""
|
|
21505
21716
|
]
|
|
21506
|
-
}) : /* @__PURE__ */ (0, P.jsxs)(
|
|
21717
|
+
}) : /* @__PURE__ */ (0, P.jsxs)(fo, {
|
|
21507
21718
|
sensors: l,
|
|
21508
|
-
collisionDetection:
|
|
21719
|
+
collisionDetection: Ei,
|
|
21509
21720
|
onDragStart: u,
|
|
21510
21721
|
onDragEnd: d,
|
|
21511
21722
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21512
21723
|
className: "tree-root",
|
|
21513
21724
|
children: [f.map((i) => {
|
|
21514
21725
|
let o = e.indexOf(i);
|
|
21515
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
21726
|
+
return /* @__PURE__ */ (0, P.jsx)(Vo, {
|
|
21516
21727
|
element: i,
|
|
21517
21728
|
path: [o],
|
|
21518
21729
|
selectedPath: t,
|
|
@@ -21520,18 +21731,18 @@ function Vo() {
|
|
|
21520
21731
|
onSelect: r,
|
|
21521
21732
|
depth: 0,
|
|
21522
21733
|
isDraggingAny: !!a
|
|
21523
|
-
},
|
|
21524
|
-
}), !s && a ? /* @__PURE__ */ (0, P.jsx)(
|
|
21734
|
+
}, Io([o]));
|
|
21735
|
+
}), !s && a ? /* @__PURE__ */ (0, P.jsx)(Bo, {
|
|
21525
21736
|
parentPath: [],
|
|
21526
21737
|
index: e.length,
|
|
21527
21738
|
depth: 0
|
|
21528
21739
|
}) : null]
|
|
21529
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
21740
|
+
}), /* @__PURE__ */ (0, P.jsx)(Mo, { children: a ? /* @__PURE__ */ (0, P.jsx)(Ho, { element: a }) : null })]
|
|
21530
21741
|
})] });
|
|
21531
21742
|
}
|
|
21532
21743
|
//#endregion
|
|
21533
21744
|
//#region src/components/RightPanel.tsx
|
|
21534
|
-
function
|
|
21745
|
+
function Go(e, t) {
|
|
21535
21746
|
if (t.length === 0) return null;
|
|
21536
21747
|
let n = e[t[0]];
|
|
21537
21748
|
for (let e = 1; e < t.length; e++) {
|
|
@@ -21542,8 +21753,8 @@ function Ho(e, t) {
|
|
|
21542
21753
|
}
|
|
21543
21754
|
return n ?? null;
|
|
21544
21755
|
}
|
|
21545
|
-
var
|
|
21546
|
-
let [e, t] = (0, S.useState)("tree"), n = N((e) => e.selectedPath), r = N((e) => e.body), i = N((e) => e.updateElement), a = n ?
|
|
21756
|
+
var Ko = (0, S.memo)(function() {
|
|
21757
|
+
let [e, t] = (0, S.useState)("tree"), n = N((e) => e.selectedPath), r = N((e) => e.body), i = N((e) => e.updateElement), a = n ? Go(r, n) : null, o = (0, S.useCallback)((e) => {
|
|
21547
21758
|
let t = N.getState().selectedPath;
|
|
21548
21759
|
t && i(t, e);
|
|
21549
21760
|
}, [i]);
|
|
@@ -21570,7 +21781,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21570
21781
|
]
|
|
21571
21782
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21572
21783
|
className: "rp-content",
|
|
21573
|
-
children: e === "tree" ? /* @__PURE__ */ (0, P.jsx)(
|
|
21784
|
+
children: e === "tree" ? /* @__PURE__ */ (0, P.jsx)(Wo, {}) : e === "element" ? a ? /* @__PURE__ */ (0, P.jsx)(fr, {
|
|
21574
21785
|
element: a,
|
|
21575
21786
|
onUpdate: o
|
|
21576
21787
|
}) : /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -21579,10 +21790,10 @@ var Uo = (0, S.memo)(function() {
|
|
|
21579
21790
|
className: "rp-empty-icon",
|
|
21580
21791
|
children: "⊡"
|
|
21581
21792
|
}), "Select an element to edit its properties"]
|
|
21582
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
21793
|
+
}) : /* @__PURE__ */ (0, P.jsx)(jr, {})
|
|
21583
21794
|
})]
|
|
21584
21795
|
});
|
|
21585
|
-
}),
|
|
21796
|
+
}), qo = [
|
|
21586
21797
|
{
|
|
21587
21798
|
keys: "⌘ Z",
|
|
21588
21799
|
action: "Undo"
|
|
@@ -21615,7 +21826,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21615
21826
|
keys: "?",
|
|
21616
21827
|
action: "Toggle this panel"
|
|
21617
21828
|
}
|
|
21618
|
-
],
|
|
21829
|
+
], Jo = (0, S.memo)(function() {
|
|
21619
21830
|
let [e, t] = (0, S.useState)(!1);
|
|
21620
21831
|
return (0, S.useEffect)(() => {
|
|
21621
21832
|
let e = (e) => {
|
|
@@ -21638,7 +21849,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21638
21849
|
})]
|
|
21639
21850
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21640
21851
|
className: "shortcuts-list",
|
|
21641
|
-
children:
|
|
21852
|
+
children: qo.map((e) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21642
21853
|
className: "shortcut-row",
|
|
21643
21854
|
children: [/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21644
21855
|
className: "shortcut-action",
|
|
@@ -21654,7 +21865,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21654
21865
|
});
|
|
21655
21866
|
//#endregion
|
|
21656
21867
|
//#region src/hooks/useKeyboardShortcuts.ts
|
|
21657
|
-
function
|
|
21868
|
+
function Yo() {
|
|
21658
21869
|
(0, S.useEffect)(() => {
|
|
21659
21870
|
let e = (e) => {
|
|
21660
21871
|
let t = e.metaKey || e.ctrlKey, n = e.target;
|
|
@@ -21694,33 +21905,73 @@ function Ko() {
|
|
|
21694
21905
|
}
|
|
21695
21906
|
//#endregion
|
|
21696
21907
|
//#region src/components/EditorLayout.tsx
|
|
21697
|
-
var
|
|
21698
|
-
return
|
|
21908
|
+
var Xo = (0, S.memo)(function() {
|
|
21909
|
+
return Yo(), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21699
21910
|
className: "editor-root",
|
|
21700
21911
|
children: [
|
|
21701
|
-
/* @__PURE__ */ (0, P.jsx)(mn, {}),
|
|
21912
|
+
!ns.hideTopBar && /* @__PURE__ */ (0, P.jsx)(mn, {}),
|
|
21702
21913
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21703
21914
|
className: "editor-panels",
|
|
21704
21915
|
children: [
|
|
21705
21916
|
/* @__PURE__ */ (0, P.jsx)(wn, {}),
|
|
21706
21917
|
/* @__PURE__ */ (0, P.jsx)(qn, {}),
|
|
21707
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
21918
|
+
/* @__PURE__ */ (0, P.jsx)(Ko, {})
|
|
21708
21919
|
]
|
|
21709
21920
|
}),
|
|
21710
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
21921
|
+
/* @__PURE__ */ (0, P.jsx)(Jo, {})
|
|
21711
21922
|
]
|
|
21712
21923
|
});
|
|
21713
21924
|
});
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21925
|
+
ns.hideTopBar = !0, ns.hideTemplateLibrary = !0, ns.onChange = (e) => console.log("[onChange]", e), N.getState().setView("editor"), N.getState().setVariables([
|
|
21926
|
+
{
|
|
21927
|
+
name: "user.name",
|
|
21928
|
+
label: "User Name",
|
|
21929
|
+
category: "User"
|
|
21930
|
+
},
|
|
21931
|
+
{
|
|
21932
|
+
name: "user.avatar",
|
|
21933
|
+
label: "Avatar URL",
|
|
21934
|
+
category: "User"
|
|
21935
|
+
},
|
|
21936
|
+
{
|
|
21937
|
+
name: "user.uid",
|
|
21938
|
+
label: "User ID",
|
|
21939
|
+
category: "User"
|
|
21940
|
+
},
|
|
21941
|
+
{
|
|
21942
|
+
name: "order.id",
|
|
21943
|
+
label: "Order ID",
|
|
21944
|
+
category: "Order"
|
|
21945
|
+
},
|
|
21946
|
+
{
|
|
21947
|
+
name: "order.total",
|
|
21948
|
+
label: "Total",
|
|
21949
|
+
description: "Formatted price",
|
|
21950
|
+
category: "Order"
|
|
21951
|
+
},
|
|
21952
|
+
{
|
|
21953
|
+
name: "order.status",
|
|
21954
|
+
label: "Status",
|
|
21955
|
+
category: "Order"
|
|
21956
|
+
},
|
|
21957
|
+
{
|
|
21958
|
+
name: "order.trackingUrl",
|
|
21959
|
+
label: "Tracking URL",
|
|
21960
|
+
category: "Order"
|
|
21961
|
+
}
|
|
21962
|
+
]);
|
|
21963
|
+
var Zo = N.getState().body, Qo = N.getState().settings, $o = N.getState().fallbackText, es = N.getState().notificationText;
|
|
21964
|
+
N.subscribe((e) => {
|
|
21965
|
+
(e.body !== Zo || e.settings !== Qo || e.fallbackText !== $o || e.notificationText !== es) && (Zo = e.body, Qo = e.settings, $o = e.fallbackText, es = e.notificationText, ns.onChange?.(e.getBubbleJSON()));
|
|
21966
|
+
});
|
|
21967
|
+
function ts() {
|
|
21968
|
+
return N((e) => e.view) === "library" ? /* @__PURE__ */ (0, P.jsx)(Te, {}) : /* @__PURE__ */ (0, P.jsx)(Xo, {});
|
|
21718
21969
|
}
|
|
21719
21970
|
//#endregion
|
|
21720
21971
|
//#region src/lib.tsx
|
|
21721
|
-
var
|
|
21722
|
-
function
|
|
21723
|
-
|
|
21972
|
+
var ns = {};
|
|
21973
|
+
function rs(e, t) {
|
|
21974
|
+
ns.appId = t.appId, ns.region = t.region, ns.token = t.token, ns.onSave = t.onSave, ns.onChange = t.onChange, ns.hideTopBar = t.hideTopBar, ns.hideTemplateLibrary = t.hideTemplateLibrary, t.variables && N.getState().setVariables(t.variables), t.hideTemplateLibrary && N.getState().setView("editor"), console.log("[BubbleBuilder] mountBubbleBuilder called with:", {
|
|
21724
21975
|
appId: t.appId,
|
|
21725
21976
|
region: t.region,
|
|
21726
21977
|
token: t.token ? "***" + t.token.slice(-4) : void 0,
|
|
@@ -21729,15 +21980,24 @@ function Xo(e, t) {
|
|
|
21729
21980
|
hasOnSave: !!t.onSave
|
|
21730
21981
|
});
|
|
21731
21982
|
let n = (0, te.createRoot)(e);
|
|
21732
|
-
|
|
21983
|
+
n.render(/* @__PURE__ */ (0, P.jsx)(S.StrictMode, { children: /* @__PURE__ */ (0, P.jsx)(ts, {}) }));
|
|
21984
|
+
let r;
|
|
21985
|
+
if (t.onChange) {
|
|
21986
|
+
let e = t.onChange, n = N.getState().body, i = N.getState().settings, a = N.getState().fallbackText, o = N.getState().notificationText;
|
|
21987
|
+
r = N.subscribe((t) => {
|
|
21988
|
+
(t.body !== n || t.settings !== i || t.fallbackText !== a || t.notificationText !== o) && (n = t.body, i = t.settings, a = t.fallbackText, o = t.notificationText, e(t.getBubbleJSON()));
|
|
21989
|
+
});
|
|
21990
|
+
}
|
|
21991
|
+
return t.bubble && setTimeout(() => {
|
|
21733
21992
|
N.getState().loadBubble(t.bubble, void 0, t.templateName ?? "Untitled");
|
|
21734
21993
|
}, 0), {
|
|
21735
21994
|
loadBubble: (e, t) => N.getState().loadBubble(e, void 0, t ?? "Untitled"),
|
|
21736
21995
|
getBubbleJSON: () => N.getState().getBubbleJSON(),
|
|
21996
|
+
setVariables: (e) => N.getState().setVariables(e),
|
|
21737
21997
|
destroy: () => {
|
|
21738
|
-
n.unmount(), Object.keys(
|
|
21998
|
+
r?.(), n.unmount(), Object.keys(ns).forEach((e) => delete ns[e]);
|
|
21739
21999
|
}
|
|
21740
22000
|
};
|
|
21741
22001
|
}
|
|
21742
22002
|
//#endregion
|
|
21743
|
-
export {
|
|
22003
|
+
export { ns as builderConfig, rs as mountBubbleBuilder };
|