@mathews_cometchat/bubble-builder 1.0.0-alpha7 → 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 +944 -686
- 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
|
|
@@ -16646,8 +16648,8 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16646
16648
|
}, Yn = (0, S.memo)(function() {
|
|
16647
16649
|
let e = N((e) => e.templates), t = N((e) => e.fetchTemplates), n = N((e) => e.setShowTemplatePicker);
|
|
16648
16650
|
return (0, S.useState)(() => {
|
|
16649
|
-
e.length === 0 && t();
|
|
16650
|
-
}), /* @__PURE__ */ (0, P.jsx)("button", {
|
|
16651
|
+
e.length === 0 && !ns.hideTemplateLibrary && t();
|
|
16652
|
+
}), ns.hideTemplateLibrary ? null : /* @__PURE__ */ (0, P.jsx)("button", {
|
|
16651
16653
|
onClick: (e) => {
|
|
16652
16654
|
e.stopPropagation(), n(!0);
|
|
16653
16655
|
},
|
|
@@ -16655,6 +16657,215 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16655
16657
|
children: "Load from Saved Template"
|
|
16656
16658
|
});
|
|
16657
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 = {
|
|
16658
16869
|
Navigation: ["openUrl"],
|
|
16659
16870
|
Messaging: [
|
|
16660
16871
|
"chatWithUser",
|
|
@@ -16665,7 +16876,7 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16665
16876
|
CometChat: ["initiateCall"],
|
|
16666
16877
|
Data: ["apiCall"],
|
|
16667
16878
|
Developer: ["customCallback"]
|
|
16668
|
-
},
|
|
16879
|
+
}, er = {
|
|
16669
16880
|
openUrl: {
|
|
16670
16881
|
type: "openUrl",
|
|
16671
16882
|
url: "",
|
|
@@ -16701,9 +16912,9 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16701
16912
|
method: "POST"
|
|
16702
16913
|
},
|
|
16703
16914
|
customCallback: { type: "customCallback" }
|
|
16704
|
-
},
|
|
16915
|
+
}, tr = (0, S.memo)(function({ action: e, onChange: t }) {
|
|
16705
16916
|
let n = (0, S.useCallback)((e) => {
|
|
16706
|
-
t(
|
|
16917
|
+
t(er[e] ?? {
|
|
16707
16918
|
type: "openUrl",
|
|
16708
16919
|
url: ""
|
|
16709
16920
|
});
|
|
@@ -16716,7 +16927,7 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16716
16927
|
}), /* @__PURE__ */ (0, P.jsx)("select", {
|
|
16717
16928
|
value: e.type,
|
|
16718
16929
|
onChange: (e) => n(e.target.value),
|
|
16719
|
-
children: Object.entries(
|
|
16930
|
+
children: Object.entries($n).map(([e, t]) => /* @__PURE__ */ (0, P.jsx)("optgroup", {
|
|
16720
16931
|
label: e,
|
|
16721
16932
|
children: t.map((e) => /* @__PURE__ */ (0, P.jsx)("option", {
|
|
16722
16933
|
value: e,
|
|
@@ -16724,20 +16935,20 @@ var Wn = /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
|
16724
16935
|
}, e))
|
|
16725
16936
|
}, e))
|
|
16726
16937
|
})]
|
|
16727
|
-
}),
|
|
16938
|
+
}), nr(e, t)] });
|
|
16728
16939
|
});
|
|
16729
|
-
function
|
|
16940
|
+
function nr(e, t) {
|
|
16730
16941
|
switch (e.type) {
|
|
16731
16942
|
case "openUrl": return /* @__PURE__ */ (0, P.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
16732
16943
|
className: "prop-field",
|
|
16733
16944
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16734
16945
|
className: "prop-label",
|
|
16735
16946
|
children: "URL"
|
|
16736
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16947
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16737
16948
|
value: e.url,
|
|
16738
16949
|
onChange: (n) => t({
|
|
16739
16950
|
...e,
|
|
16740
|
-
url: n
|
|
16951
|
+
url: n
|
|
16741
16952
|
}),
|
|
16742
16953
|
placeholder: "https://..."
|
|
16743
16954
|
})]
|
|
@@ -16766,11 +16977,11 @@ function $n(e, t) {
|
|
|
16766
16977
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16767
16978
|
className: "prop-label",
|
|
16768
16979
|
children: "User UID"
|
|
16769
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16980
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16770
16981
|
value: e.uid,
|
|
16771
16982
|
onChange: (n) => t({
|
|
16772
16983
|
...e,
|
|
16773
|
-
uid: n
|
|
16984
|
+
uid: n
|
|
16774
16985
|
})
|
|
16775
16986
|
})]
|
|
16776
16987
|
});
|
|
@@ -16779,11 +16990,11 @@ function $n(e, t) {
|
|
|
16779
16990
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16780
16991
|
className: "prop-label",
|
|
16781
16992
|
children: "Group GUID"
|
|
16782
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
16993
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16783
16994
|
value: e.guid,
|
|
16784
16995
|
onChange: (n) => t({
|
|
16785
16996
|
...e,
|
|
16786
|
-
guid: n
|
|
16997
|
+
guid: n
|
|
16787
16998
|
})
|
|
16788
16999
|
})]
|
|
16789
17000
|
});
|
|
@@ -16793,11 +17004,11 @@ function $n(e, t) {
|
|
|
16793
17004
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16794
17005
|
className: "prop-label",
|
|
16795
17006
|
children: "Text"
|
|
16796
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17007
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16797
17008
|
value: e.text,
|
|
16798
17009
|
onChange: (n) => t({
|
|
16799
17010
|
...e,
|
|
16800
|
-
text: n
|
|
17011
|
+
text: n
|
|
16801
17012
|
})
|
|
16802
17013
|
})]
|
|
16803
17014
|
}),
|
|
@@ -16806,11 +17017,11 @@ function $n(e, t) {
|
|
|
16806
17017
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16807
17018
|
className: "prop-label",
|
|
16808
17019
|
children: "Receiver UID (optional)"
|
|
16809
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17020
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16810
17021
|
value: e.receiverUid ?? "",
|
|
16811
17022
|
onChange: (n) => t({
|
|
16812
17023
|
...e,
|
|
16813
|
-
receiverUid: n
|
|
17024
|
+
receiverUid: n || void 0
|
|
16814
17025
|
})
|
|
16815
17026
|
})]
|
|
16816
17027
|
}),
|
|
@@ -16819,11 +17030,11 @@ function $n(e, t) {
|
|
|
16819
17030
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16820
17031
|
className: "prop-label",
|
|
16821
17032
|
children: "Receiver GUID (optional)"
|
|
16822
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17033
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16823
17034
|
value: e.receiverGuid ?? "",
|
|
16824
17035
|
onChange: (n) => t({
|
|
16825
17036
|
...e,
|
|
16826
|
-
receiverGuid: n
|
|
17037
|
+
receiverGuid: n || void 0
|
|
16827
17038
|
})
|
|
16828
17039
|
})]
|
|
16829
17040
|
})
|
|
@@ -16833,11 +17044,11 @@ function $n(e, t) {
|
|
|
16833
17044
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16834
17045
|
className: "prop-label",
|
|
16835
17046
|
children: "Value"
|
|
16836
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17047
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16837
17048
|
value: e.value,
|
|
16838
17049
|
onChange: (n) => t({
|
|
16839
17050
|
...e,
|
|
16840
|
-
value: n
|
|
17051
|
+
value: n
|
|
16841
17052
|
})
|
|
16842
17053
|
})]
|
|
16843
17054
|
});
|
|
@@ -16846,11 +17057,11 @@ function $n(e, t) {
|
|
|
16846
17057
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16847
17058
|
className: "prop-label",
|
|
16848
17059
|
children: "URL"
|
|
16849
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17060
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16850
17061
|
value: e.url,
|
|
16851
17062
|
onChange: (n) => t({
|
|
16852
17063
|
...e,
|
|
16853
|
-
url: n
|
|
17064
|
+
url: n
|
|
16854
17065
|
})
|
|
16855
17066
|
})]
|
|
16856
17067
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -16858,11 +17069,11 @@ function $n(e, t) {
|
|
|
16858
17069
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16859
17070
|
className: "prop-label",
|
|
16860
17071
|
children: "Filename"
|
|
16861
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17072
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16862
17073
|
value: e.filename ?? "",
|
|
16863
17074
|
onChange: (n) => t({
|
|
16864
17075
|
...e,
|
|
16865
|
-
filename: n
|
|
17076
|
+
filename: n || void 0
|
|
16866
17077
|
})
|
|
16867
17078
|
})]
|
|
16868
17079
|
})] });
|
|
@@ -16892,11 +17103,11 @@ function $n(e, t) {
|
|
|
16892
17103
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16893
17104
|
className: "prop-label",
|
|
16894
17105
|
children: "User UID"
|
|
16895
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17106
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16896
17107
|
value: e.uid ?? "",
|
|
16897
17108
|
onChange: (n) => t({
|
|
16898
17109
|
...e,
|
|
16899
|
-
uid: n
|
|
17110
|
+
uid: n || void 0
|
|
16900
17111
|
})
|
|
16901
17112
|
})]
|
|
16902
17113
|
}),
|
|
@@ -16905,11 +17116,11 @@ function $n(e, t) {
|
|
|
16905
17116
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16906
17117
|
className: "prop-label",
|
|
16907
17118
|
children: "Group GUID"
|
|
16908
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17119
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16909
17120
|
value: e.guid ?? "",
|
|
16910
17121
|
onChange: (n) => t({
|
|
16911
17122
|
...e,
|
|
16912
|
-
guid: n
|
|
17123
|
+
guid: n || void 0
|
|
16913
17124
|
})
|
|
16914
17125
|
})]
|
|
16915
17126
|
})
|
|
@@ -16919,11 +17130,11 @@ function $n(e, t) {
|
|
|
16919
17130
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
16920
17131
|
className: "prop-label",
|
|
16921
17132
|
children: "URL"
|
|
16922
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
17133
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
16923
17134
|
value: e.url,
|
|
16924
17135
|
onChange: (n) => t({
|
|
16925
17136
|
...e,
|
|
16926
|
-
url: n
|
|
17137
|
+
url: n
|
|
16927
17138
|
})
|
|
16928
17139
|
})]
|
|
16929
17140
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -16970,19 +17181,19 @@ function $n(e, t) {
|
|
|
16970
17181
|
}
|
|
16971
17182
|
//#endregion
|
|
16972
17183
|
//#region src/components/properties/IconPicker.tsx
|
|
16973
|
-
var
|
|
17184
|
+
var rr = {
|
|
16974
17185
|
maxHeight: 220,
|
|
16975
17186
|
overflowY: "auto",
|
|
16976
17187
|
padding: 4,
|
|
16977
17188
|
border: "1px solid var(--border-subtle)",
|
|
16978
17189
|
borderRadius: 6,
|
|
16979
17190
|
marginTop: 4
|
|
16980
|
-
},
|
|
17191
|
+
}, ir = {
|
|
16981
17192
|
display: "flex",
|
|
16982
17193
|
flexWrap: "wrap",
|
|
16983
17194
|
gap: 4,
|
|
16984
17195
|
padding: "2px 0"
|
|
16985
|
-
},
|
|
17196
|
+
}, ar = {
|
|
16986
17197
|
width: 34,
|
|
16987
17198
|
height: 34,
|
|
16988
17199
|
borderRadius: 6,
|
|
@@ -16993,11 +17204,11 @@ var er = {
|
|
|
16993
17204
|
alignItems: "center",
|
|
16994
17205
|
justifyContent: "center",
|
|
16995
17206
|
padding: 2
|
|
16996
|
-
},
|
|
17207
|
+
}, or = {
|
|
16997
17208
|
width: 20,
|
|
16998
17209
|
height: 20,
|
|
16999
17210
|
objectFit: "contain"
|
|
17000
|
-
},
|
|
17211
|
+
}, sr = (0, S.memo)(function({ value: e, onChange: t }) {
|
|
17001
17212
|
let [n, r] = (0, S.useState)(!1), [i, a] = (0, S.useState)(""), o = (0, S.useCallback)((e) => {
|
|
17002
17213
|
let n = Mn.find((t) => t.name === e);
|
|
17003
17214
|
t(n ? n.url : e), r(!1), a("");
|
|
@@ -17065,7 +17276,7 @@ var er = {
|
|
|
17065
17276
|
fontSize: 11
|
|
17066
17277
|
}
|
|
17067
17278
|
}), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17068
|
-
style:
|
|
17279
|
+
style: rr,
|
|
17069
17280
|
children: [Pn.map((t) => {
|
|
17070
17281
|
let n = f.filter((e) => e.category === t);
|
|
17071
17282
|
return n.length === 0 ? null : /* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
@@ -17077,19 +17288,19 @@ var er = {
|
|
|
17077
17288
|
},
|
|
17078
17289
|
children: t
|
|
17079
17290
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
17080
|
-
style:
|
|
17291
|
+
style: ir,
|
|
17081
17292
|
children: n.map((t) => /* @__PURE__ */ (0, P.jsx)("button", {
|
|
17082
17293
|
onClick: () => o(t.name),
|
|
17083
17294
|
title: t.label,
|
|
17084
17295
|
style: {
|
|
17085
|
-
...
|
|
17296
|
+
...ar,
|
|
17086
17297
|
borderColor: e === t.url ? "var(--accent-primary)" : "transparent",
|
|
17087
17298
|
background: e === t.url ? "rgba(108,92,231,0.1)" : "none"
|
|
17088
17299
|
},
|
|
17089
17300
|
children: /* @__PURE__ */ (0, P.jsx)("img", {
|
|
17090
17301
|
src: t.url,
|
|
17091
17302
|
alt: t.label,
|
|
17092
|
-
style:
|
|
17303
|
+
style: or
|
|
17093
17304
|
})
|
|
17094
17305
|
}, t.name))
|
|
17095
17306
|
})] }, t);
|
|
@@ -17109,8 +17320,8 @@ var er = {
|
|
|
17109
17320
|
})]
|
|
17110
17321
|
}) : null
|
|
17111
17322
|
] });
|
|
17112
|
-
}),
|
|
17113
|
-
function
|
|
17323
|
+
}), cr = /^(https?:\/\/|{{)/i;
|
|
17324
|
+
function lr(e) {
|
|
17114
17325
|
let t = [];
|
|
17115
17326
|
switch (e.type) {
|
|
17116
17327
|
case "text":
|
|
@@ -17120,7 +17331,7 @@ function or(e) {
|
|
|
17120
17331
|
});
|
|
17121
17332
|
break;
|
|
17122
17333
|
case "image":
|
|
17123
|
-
e.url ?
|
|
17334
|
+
e.url ? cr.test(e.url) || t.push({
|
|
17124
17335
|
field: "url",
|
|
17125
17336
|
message: "Must be a valid URL"
|
|
17126
17337
|
}) : t.push({
|
|
@@ -17144,7 +17355,7 @@ function or(e) {
|
|
|
17144
17355
|
e.label || t.push({
|
|
17145
17356
|
field: "label",
|
|
17146
17357
|
message: "Label is required"
|
|
17147
|
-
}), e.action ?
|
|
17358
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17148
17359
|
field: "action",
|
|
17149
17360
|
message: "Action is required"
|
|
17150
17361
|
});
|
|
@@ -17153,7 +17364,7 @@ function or(e) {
|
|
|
17153
17364
|
e.icon || t.push({
|
|
17154
17365
|
field: "icon",
|
|
17155
17366
|
message: "Icon is required"
|
|
17156
|
-
}), e.action ?
|
|
17367
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17157
17368
|
field: "action",
|
|
17158
17369
|
message: "Action is required"
|
|
17159
17370
|
});
|
|
@@ -17162,7 +17373,7 @@ function or(e) {
|
|
|
17162
17373
|
e.text || t.push({
|
|
17163
17374
|
field: "text",
|
|
17164
17375
|
message: "Text is required"
|
|
17165
|
-
}), e.action ?
|
|
17376
|
+
}), e.action ? ur(e.action, t) : t.push({
|
|
17166
17377
|
field: "action",
|
|
17167
17378
|
message: "Action is required"
|
|
17168
17379
|
});
|
|
@@ -17210,7 +17421,7 @@ function or(e) {
|
|
|
17210
17421
|
}
|
|
17211
17422
|
return t;
|
|
17212
17423
|
}
|
|
17213
|
-
function
|
|
17424
|
+
function ur(e, t) {
|
|
17214
17425
|
switch (e.type) {
|
|
17215
17426
|
case "openUrl":
|
|
17216
17427
|
e.url || t.push({
|
|
@@ -17256,13 +17467,13 @@ function sr(e, t) {
|
|
|
17256
17467
|
break;
|
|
17257
17468
|
}
|
|
17258
17469
|
}
|
|
17259
|
-
function
|
|
17260
|
-
return
|
|
17470
|
+
function dr(e) {
|
|
17471
|
+
return lr(e).length > 0;
|
|
17261
17472
|
}
|
|
17262
17473
|
//#endregion
|
|
17263
17474
|
//#region src/components/properties/ElementPropertyEditor.tsx
|
|
17264
|
-
var
|
|
17265
|
-
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)(() => {
|
|
17266
17477
|
let e = /* @__PURE__ */ new Map();
|
|
17267
17478
|
for (let t of n) e.set(t.field, t.message);
|
|
17268
17479
|
return e;
|
|
@@ -17295,7 +17506,7 @@ var lr = (0, S.memo)(function({ element: e, onUpdate: t }) {
|
|
|
17295
17506
|
n.length === 1 ? "" : "s"
|
|
17296
17507
|
]
|
|
17297
17508
|
}),
|
|
17298
|
-
|
|
17509
|
+
Ar(e, t, r)
|
|
17299
17510
|
] }, e.id);
|
|
17300
17511
|
});
|
|
17301
17512
|
function R({ label: e, children: t, error: n }) {
|
|
@@ -17310,10 +17521,10 @@ function R({ label: e, children: t, error: n }) {
|
|
|
17310
17521
|
}), t]
|
|
17311
17522
|
});
|
|
17312
17523
|
}
|
|
17313
|
-
function
|
|
17314
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
17524
|
+
function pr({ value: e, onChange: t, placeholder: n }) {
|
|
17525
|
+
return /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
17315
17526
|
value: e ?? "",
|
|
17316
|
-
onChange:
|
|
17527
|
+
onChange: t,
|
|
17317
17528
|
placeholder: n
|
|
17318
17529
|
});
|
|
17319
17530
|
}
|
|
@@ -17343,7 +17554,7 @@ function z({ value: e, onChange: t, min: n, max: r, unit: i }) {
|
|
|
17343
17554
|
}) : null]
|
|
17344
17555
|
});
|
|
17345
17556
|
}
|
|
17346
|
-
var
|
|
17557
|
+
var mr = [
|
|
17347
17558
|
{
|
|
17348
17559
|
label: "Small (28px)",
|
|
17349
17560
|
value: 28
|
|
@@ -17357,8 +17568,8 @@ var dr = [
|
|
|
17357
17568
|
value: 48
|
|
17358
17569
|
}
|
|
17359
17570
|
];
|
|
17360
|
-
function
|
|
17361
|
-
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;
|
|
17362
17573
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17363
17574
|
style: {
|
|
17364
17575
|
display: "flex",
|
|
@@ -17374,7 +17585,7 @@ function fr({ value: e, onChange: t }) {
|
|
|
17374
17585
|
}
|
|
17375
17586
|
a(!1), t(Number(e.target.value));
|
|
17376
17587
|
},
|
|
17377
|
-
children: [
|
|
17588
|
+
children: [mr.map((e) => /* @__PURE__ */ (0, P.jsx)("option", {
|
|
17378
17589
|
value: e.value,
|
|
17379
17590
|
children: e.label
|
|
17380
17591
|
}, e.value)), /* @__PURE__ */ (0, P.jsx)("option", {
|
|
@@ -17389,7 +17600,7 @@ function fr({ value: e, onChange: t }) {
|
|
|
17389
17600
|
}) : null]
|
|
17390
17601
|
});
|
|
17391
17602
|
}
|
|
17392
|
-
function
|
|
17603
|
+
function gr({ value: e, onChange: t, options: n }) {
|
|
17393
17604
|
return /* @__PURE__ */ (0, P.jsxs)("select", {
|
|
17394
17605
|
value: e ?? "",
|
|
17395
17606
|
onChange: (e) => t(e.target.value || void 0),
|
|
@@ -17402,7 +17613,7 @@ function pr({ value: e, onChange: t, options: n }) {
|
|
|
17402
17613
|
}, e))]
|
|
17403
17614
|
});
|
|
17404
17615
|
}
|
|
17405
|
-
var
|
|
17616
|
+
var _r = {
|
|
17406
17617
|
width: 32,
|
|
17407
17618
|
height: 28,
|
|
17408
17619
|
padding: 0,
|
|
@@ -17412,18 +17623,18 @@ var mr = {
|
|
|
17412
17623
|
opacity: 0,
|
|
17413
17624
|
top: 0,
|
|
17414
17625
|
left: 0
|
|
17415
|
-
},
|
|
17626
|
+
}, vr = {
|
|
17416
17627
|
display: "flex",
|
|
17417
17628
|
alignItems: "center",
|
|
17418
17629
|
gap: 6
|
|
17419
|
-
},
|
|
17630
|
+
}, yr = {
|
|
17420
17631
|
width: 32,
|
|
17421
17632
|
height: 28,
|
|
17422
17633
|
borderRadius: 4,
|
|
17423
17634
|
position: "relative",
|
|
17424
17635
|
overflow: "hidden",
|
|
17425
17636
|
cursor: "pointer"
|
|
17426
|
-
},
|
|
17637
|
+
}, br = {
|
|
17427
17638
|
padding: "2px 6px",
|
|
17428
17639
|
fontSize: 10,
|
|
17429
17640
|
borderRadius: 4,
|
|
@@ -17431,7 +17642,7 @@ var mr = {
|
|
|
17431
17642
|
border: "1px solid var(--border-medium)",
|
|
17432
17643
|
cursor: "pointer",
|
|
17433
17644
|
color: "var(--text-secondary)"
|
|
17434
|
-
},
|
|
17645
|
+
}, xr = {
|
|
17435
17646
|
width: 32,
|
|
17436
17647
|
height: 28,
|
|
17437
17648
|
borderRadius: 4,
|
|
@@ -17444,30 +17655,30 @@ var mr = {
|
|
|
17444
17655
|
function B({ value: e, onChange: t, fallback: n }) {
|
|
17445
17656
|
let r = e ?? n, i = e == null && n != null;
|
|
17446
17657
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17447
|
-
style:
|
|
17658
|
+
style: vr,
|
|
17448
17659
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
17449
17660
|
style: r ? {
|
|
17450
|
-
...
|
|
17661
|
+
...yr,
|
|
17451
17662
|
background: r,
|
|
17452
17663
|
border: "1px solid var(--border-medium)",
|
|
17453
17664
|
opacity: i ? .5 : 1
|
|
17454
|
-
} :
|
|
17665
|
+
} : xr,
|
|
17455
17666
|
children: /* @__PURE__ */ (0, P.jsx)("input", {
|
|
17456
17667
|
type: "color",
|
|
17457
17668
|
value: r ?? "#000000",
|
|
17458
17669
|
onChange: (e) => t(e.target.value),
|
|
17459
|
-
style:
|
|
17670
|
+
style: _r,
|
|
17460
17671
|
title: i ? `Default: ${n}` : e ?? "No color (transparent)"
|
|
17461
17672
|
})
|
|
17462
17673
|
}), e && !n ? /* @__PURE__ */ (0, P.jsx)("button", {
|
|
17463
17674
|
onClick: () => t(void 0),
|
|
17464
|
-
style:
|
|
17675
|
+
style: br,
|
|
17465
17676
|
title: "Remove color",
|
|
17466
17677
|
children: "✕"
|
|
17467
17678
|
}) : null]
|
|
17468
17679
|
});
|
|
17469
17680
|
}
|
|
17470
|
-
function
|
|
17681
|
+
function Sr({ value: e, onChange: t, label: n }) {
|
|
17471
17682
|
return /* @__PURE__ */ (0, P.jsxs)("label", {
|
|
17472
17683
|
style: {
|
|
17473
17684
|
display: "flex",
|
|
@@ -17483,11 +17694,11 @@ function yr({ value: e, onChange: t, label: n }) {
|
|
|
17483
17694
|
}), n]
|
|
17484
17695
|
});
|
|
17485
17696
|
}
|
|
17486
|
-
var
|
|
17697
|
+
var Cr = {
|
|
17487
17698
|
display: "flex",
|
|
17488
17699
|
gap: 4,
|
|
17489
17700
|
alignItems: "center"
|
|
17490
|
-
},
|
|
17701
|
+
}, wr = {
|
|
17491
17702
|
padding: "4px 6px",
|
|
17492
17703
|
fontSize: 10,
|
|
17493
17704
|
borderRadius: 4,
|
|
@@ -17496,18 +17707,18 @@ var br = {
|
|
|
17496
17707
|
cursor: "pointer",
|
|
17497
17708
|
color: "var(--text-secondary)",
|
|
17498
17709
|
whiteSpace: "nowrap"
|
|
17499
|
-
},
|
|
17710
|
+
}, Tr = {
|
|
17500
17711
|
display: "flex",
|
|
17501
17712
|
flexDirection: "column",
|
|
17502
17713
|
gap: 4
|
|
17503
|
-
},
|
|
17714
|
+
}, Er = {
|
|
17504
17715
|
display: "grid",
|
|
17505
17716
|
gridTemplateColumns: "1fr 1fr",
|
|
17506
17717
|
gap: 4
|
|
17507
|
-
},
|
|
17718
|
+
}, Dr = {
|
|
17508
17719
|
fontSize: 10,
|
|
17509
17720
|
color: "var(--text-muted)"
|
|
17510
|
-
},
|
|
17721
|
+
}, Or = {
|
|
17511
17722
|
padding: "2px 6px",
|
|
17512
17723
|
fontSize: 10,
|
|
17513
17724
|
borderRadius: 4,
|
|
@@ -17517,10 +17728,10 @@ var br = {
|
|
|
17517
17728
|
color: "var(--text-secondary)",
|
|
17518
17729
|
alignSelf: "flex-start"
|
|
17519
17730
|
};
|
|
17520
|
-
function
|
|
17731
|
+
function kr({ value: e, onChange: t }) {
|
|
17521
17732
|
let [n, r] = (0, S.useState)(typeof e == "object" && !!e);
|
|
17522
17733
|
if (!n) return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17523
|
-
style:
|
|
17734
|
+
style: Cr,
|
|
17524
17735
|
children: [/* @__PURE__ */ (0, P.jsx)("div", {
|
|
17525
17736
|
style: { flex: 1 },
|
|
17526
17737
|
children: /* @__PURE__ */ (0, P.jsx)(z, {
|
|
@@ -17540,7 +17751,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17540
17751
|
left: n
|
|
17541
17752
|
});
|
|
17542
17753
|
},
|
|
17543
|
-
style:
|
|
17754
|
+
style: wr,
|
|
17544
17755
|
title: "Edit each side",
|
|
17545
17756
|
children: "⊞"
|
|
17546
17757
|
})]
|
|
@@ -17555,12 +17766,12 @@ function Er({ value: e, onChange: t }) {
|
|
|
17555
17766
|
[e]: n ?? 0
|
|
17556
17767
|
});
|
|
17557
17768
|
return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17558
|
-
style:
|
|
17769
|
+
style: Tr,
|
|
17559
17770
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
17560
|
-
style:
|
|
17771
|
+
style: Er,
|
|
17561
17772
|
children: [
|
|
17562
17773
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17563
|
-
style:
|
|
17774
|
+
style: Dr,
|
|
17564
17775
|
children: "Top"
|
|
17565
17776
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17566
17777
|
value: i.top,
|
|
@@ -17569,7 +17780,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17569
17780
|
unit: "px"
|
|
17570
17781
|
})] }),
|
|
17571
17782
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17572
|
-
style:
|
|
17783
|
+
style: Dr,
|
|
17573
17784
|
children: "Right"
|
|
17574
17785
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17575
17786
|
value: i.right,
|
|
@@ -17578,7 +17789,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17578
17789
|
unit: "px"
|
|
17579
17790
|
})] }),
|
|
17580
17791
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17581
|
-
style:
|
|
17792
|
+
style: Dr,
|
|
17582
17793
|
children: "Bottom"
|
|
17583
17794
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17584
17795
|
value: i.bottom,
|
|
@@ -17587,7 +17798,7 @@ function Er({ value: e, onChange: t }) {
|
|
|
17587
17798
|
unit: "px"
|
|
17588
17799
|
})] }),
|
|
17589
17800
|
/* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
17590
|
-
style:
|
|
17801
|
+
style: Dr,
|
|
17591
17802
|
children: "Left"
|
|
17592
17803
|
}), /* @__PURE__ */ (0, P.jsx)(z, {
|
|
17593
17804
|
value: i.left,
|
|
@@ -17600,12 +17811,12 @@ function Er({ value: e, onChange: t }) {
|
|
|
17600
17811
|
onClick: () => {
|
|
17601
17812
|
r(!1), t(Math.round(((i.top ?? 0) + (i.right ?? 0) + (i.bottom ?? 0) + (i.left ?? 0)) / 4) || void 0);
|
|
17602
17813
|
},
|
|
17603
|
-
style:
|
|
17814
|
+
style: Or,
|
|
17604
17815
|
children: "Collapse"
|
|
17605
17816
|
})]
|
|
17606
17817
|
});
|
|
17607
17818
|
}
|
|
17608
|
-
function
|
|
17819
|
+
function Ar(e, t, n = /* @__PURE__ */ new Map()) {
|
|
17609
17820
|
let r = (e) => n.get(e);
|
|
17610
17821
|
switch (e.type) {
|
|
17611
17822
|
case "text": return /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -17614,16 +17825,16 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17614
17825
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17615
17826
|
label: "Content",
|
|
17616
17827
|
error: r("content"),
|
|
17617
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17828
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
17829
|
+
multiline: !0,
|
|
17618
17830
|
rows: 3,
|
|
17619
17831
|
value: e.content,
|
|
17620
|
-
onChange: (e) => t({ content: e
|
|
17621
|
-
style: { resize: "vertical" }
|
|
17832
|
+
onChange: (e) => t({ content: e })
|
|
17622
17833
|
})
|
|
17623
17834
|
}),
|
|
17624
17835
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17625
17836
|
label: "Variant",
|
|
17626
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17837
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17627
17838
|
value: e.variant,
|
|
17628
17839
|
onChange: (e) => t({ variant: e }),
|
|
17629
17840
|
options: [
|
|
@@ -17648,7 +17859,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17648
17859
|
}),
|
|
17649
17860
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17650
17861
|
label: "Align",
|
|
17651
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17862
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17652
17863
|
value: e.align,
|
|
17653
17864
|
onChange: (e) => t({ align: e }),
|
|
17654
17865
|
options: [
|
|
@@ -17661,7 +17872,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17661
17872
|
}),
|
|
17662
17873
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17663
17874
|
label: "Font Weight",
|
|
17664
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17875
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17665
17876
|
value: e.fontWeight,
|
|
17666
17877
|
onChange: (e) => t({ fontWeight: e }),
|
|
17667
17878
|
options: [
|
|
@@ -17681,7 +17892,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17681
17892
|
}),
|
|
17682
17893
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17683
17894
|
label: "Padding",
|
|
17684
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17895
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17685
17896
|
value: e.padding,
|
|
17686
17897
|
onChange: (e) => t({ padding: e })
|
|
17687
17898
|
})
|
|
@@ -17694,7 +17905,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17694
17905
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17695
17906
|
label: "URL",
|
|
17696
17907
|
error: r("url"),
|
|
17697
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17908
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17698
17909
|
value: e.url,
|
|
17699
17910
|
onChange: (e) => t({ url: e }),
|
|
17700
17911
|
placeholder: "https://..."
|
|
@@ -17719,14 +17930,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17719
17930
|
}) : null,
|
|
17720
17931
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17721
17932
|
label: "Alt Text",
|
|
17722
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17933
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17723
17934
|
value: e.altText ?? "",
|
|
17724
17935
|
onChange: (e) => t({ altText: e })
|
|
17725
17936
|
})
|
|
17726
17937
|
}),
|
|
17727
17938
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17728
17939
|
label: "Fit",
|
|
17729
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17940
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17730
17941
|
value: e.fit,
|
|
17731
17942
|
onChange: (e) => t({ fit: e }),
|
|
17732
17943
|
options: [
|
|
@@ -17763,7 +17974,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17763
17974
|
}),
|
|
17764
17975
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17765
17976
|
label: "Padding",
|
|
17766
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17977
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17767
17978
|
value: e.padding,
|
|
17768
17979
|
onChange: (e) => t({ padding: e })
|
|
17769
17980
|
})
|
|
@@ -17776,7 +17987,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17776
17987
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17777
17988
|
label: "Name",
|
|
17778
17989
|
error: r("name"),
|
|
17779
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
17990
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
17780
17991
|
value: e.name,
|
|
17781
17992
|
onChange: (e) => t({ name: e })
|
|
17782
17993
|
})
|
|
@@ -17830,21 +18041,21 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17830
18041
|
children: [
|
|
17831
18042
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17832
18043
|
label: "Image URL",
|
|
17833
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18044
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17834
18045
|
value: e.imageUrl ?? "",
|
|
17835
18046
|
onChange: (e) => t({ imageUrl: e })
|
|
17836
18047
|
})
|
|
17837
18048
|
}),
|
|
17838
18049
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17839
18050
|
label: "Fallback Initials",
|
|
17840
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18051
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17841
18052
|
value: e.fallbackInitials ?? "",
|
|
17842
18053
|
onChange: (e) => t({ fallbackInitials: e.slice(0, 2) })
|
|
17843
18054
|
})
|
|
17844
18055
|
}),
|
|
17845
18056
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17846
18057
|
label: "Size",
|
|
17847
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18058
|
+
children: /* @__PURE__ */ (0, P.jsx)(hr, {
|
|
17848
18059
|
value: e.size,
|
|
17849
18060
|
onChange: (e) => t({ size: e })
|
|
17850
18061
|
})
|
|
@@ -17876,7 +18087,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17876
18087
|
}),
|
|
17877
18088
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17878
18089
|
label: "Font Weight",
|
|
17879
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18090
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
17880
18091
|
value: e.fontWeight,
|
|
17881
18092
|
onChange: (e) => t({ fontWeight: e }),
|
|
17882
18093
|
options: [
|
|
@@ -17894,7 +18105,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17894
18105
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17895
18106
|
label: "Text",
|
|
17896
18107
|
error: r("text"),
|
|
17897
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18108
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
17898
18109
|
value: e.text,
|
|
17899
18110
|
onChange: (e) => t({ text: e })
|
|
17900
18111
|
})
|
|
@@ -17953,7 +18164,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
17953
18164
|
}),
|
|
17954
18165
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
17955
18166
|
label: "Padding",
|
|
17956
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18167
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
17957
18168
|
value: e.padding,
|
|
17958
18169
|
onChange: (e) => t({ padding: e })
|
|
17959
18170
|
})
|
|
@@ -18019,14 +18230,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18019
18230
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18020
18231
|
label: "Text",
|
|
18021
18232
|
error: r("text"),
|
|
18022
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18233
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18023
18234
|
value: e.text,
|
|
18024
18235
|
onChange: (e) => t({ text: e })
|
|
18025
18236
|
})
|
|
18026
18237
|
}),
|
|
18027
18238
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18028
18239
|
label: "Icon",
|
|
18029
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18240
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18030
18241
|
value: e.icon ?? "",
|
|
18031
18242
|
onChange: (e) => t({ icon: e })
|
|
18032
18243
|
})
|
|
@@ -18076,7 +18287,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18076
18287
|
}),
|
|
18077
18288
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18078
18289
|
label: "Padding",
|
|
18079
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18290
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18080
18291
|
value: e.padding,
|
|
18081
18292
|
onChange: (e) => t({ padding: e })
|
|
18082
18293
|
})
|
|
@@ -18141,7 +18352,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18141
18352
|
}),
|
|
18142
18353
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18143
18354
|
label: "Label",
|
|
18144
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18355
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18145
18356
|
value: e.label ?? "",
|
|
18146
18357
|
onChange: (e) => t({ label: e })
|
|
18147
18358
|
})
|
|
@@ -18171,7 +18382,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18171
18382
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18172
18383
|
label: "Label",
|
|
18173
18384
|
error: r("label"),
|
|
18174
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18385
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18175
18386
|
value: e.label,
|
|
18176
18387
|
onChange: (e) => t({ label: e })
|
|
18177
18388
|
})
|
|
@@ -18230,27 +18441,27 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18230
18441
|
}),
|
|
18231
18442
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18232
18443
|
label: "Icon",
|
|
18233
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18444
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18234
18445
|
value: e.icon ?? "",
|
|
18235
18446
|
onChange: (e) => t({ icon: e })
|
|
18236
18447
|
})
|
|
18237
18448
|
}),
|
|
18238
18449
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18239
18450
|
label: "Icon Position",
|
|
18240
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18451
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18241
18452
|
value: e.iconPosition,
|
|
18242
18453
|
onChange: (e) => t({ iconPosition: e }),
|
|
18243
18454
|
options: ["left", "right"]
|
|
18244
18455
|
})
|
|
18245
18456
|
}),
|
|
18246
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18457
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18247
18458
|
value: e.fullWidth,
|
|
18248
18459
|
onChange: (e) => t({ fullWidth: e }),
|
|
18249
18460
|
label: "Full Width"
|
|
18250
18461
|
}),
|
|
18251
18462
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18252
18463
|
label: "Padding",
|
|
18253
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18464
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18254
18465
|
value: e.padding,
|
|
18255
18466
|
onChange: (e) => t({ padding: e })
|
|
18256
18467
|
})
|
|
@@ -18269,7 +18480,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18269
18480
|
style: { marginTop: 12 },
|
|
18270
18481
|
children: "Action"
|
|
18271
18482
|
}),
|
|
18272
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18483
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18273
18484
|
action: e.action,
|
|
18274
18485
|
onChange: (e) => t({ action: e })
|
|
18275
18486
|
})
|
|
@@ -18281,7 +18492,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18281
18492
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18282
18493
|
label: "Icon",
|
|
18283
18494
|
error: r("icon"),
|
|
18284
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18495
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18285
18496
|
value: e.icon,
|
|
18286
18497
|
onChange: (e) => t({ icon: e })
|
|
18287
18498
|
})
|
|
@@ -18324,7 +18535,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18324
18535
|
style: { marginTop: 12 },
|
|
18325
18536
|
children: "Action"
|
|
18326
18537
|
}),
|
|
18327
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18538
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18328
18539
|
action: e.action,
|
|
18329
18540
|
onChange: (e) => t({ action: e })
|
|
18330
18541
|
})
|
|
@@ -18336,7 +18547,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18336
18547
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18337
18548
|
label: "Text",
|
|
18338
18549
|
error: r("text"),
|
|
18339
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18550
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18340
18551
|
value: e.text,
|
|
18341
18552
|
onChange: (e) => t({ text: e })
|
|
18342
18553
|
})
|
|
@@ -18358,7 +18569,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18358
18569
|
unit: "px"
|
|
18359
18570
|
})
|
|
18360
18571
|
}),
|
|
18361
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18572
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18362
18573
|
value: e.underline,
|
|
18363
18574
|
onChange: (e) => t({ underline: e }),
|
|
18364
18575
|
label: "Underline"
|
|
@@ -18368,7 +18579,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18368
18579
|
style: { marginTop: 12 },
|
|
18369
18580
|
children: "Action"
|
|
18370
18581
|
}),
|
|
18371
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18582
|
+
/* @__PURE__ */ (0, P.jsx)(tr, {
|
|
18372
18583
|
action: e.action,
|
|
18373
18584
|
onChange: (e) => t({ action: e })
|
|
18374
18585
|
})
|
|
@@ -18380,7 +18591,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18380
18591
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18381
18592
|
label: "Columns (comma-separated)",
|
|
18382
18593
|
error: r("columns"),
|
|
18383
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18594
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18384
18595
|
value: e.columns.join(", "),
|
|
18385
18596
|
onChange: (e) => t({ columns: e.split(",").map((e) => e.trim()) })
|
|
18386
18597
|
})
|
|
@@ -18446,12 +18657,12 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18446
18657
|
onChange: (e) => t({ headerBackgroundColor: e })
|
|
18447
18658
|
})
|
|
18448
18659
|
}),
|
|
18449
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18660
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18450
18661
|
value: e.border,
|
|
18451
18662
|
onChange: (e) => t({ border: e }),
|
|
18452
18663
|
label: "Show Borders"
|
|
18453
18664
|
}),
|
|
18454
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18665
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18455
18666
|
value: e.stripedRows,
|
|
18456
18667
|
onChange: (e) => t({ stripedRows: e }),
|
|
18457
18668
|
label: "Striped Rows"
|
|
@@ -18508,7 +18719,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18508
18719
|
}),
|
|
18509
18720
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18510
18721
|
label: "Align",
|
|
18511
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18722
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18512
18723
|
value: e.align,
|
|
18513
18724
|
onChange: (e) => t({ align: e }),
|
|
18514
18725
|
options: [
|
|
@@ -18520,7 +18731,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18520
18731
|
]
|
|
18521
18732
|
})
|
|
18522
18733
|
}),
|
|
18523
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18734
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18524
18735
|
value: e.wrap,
|
|
18525
18736
|
onChange: (e) => t({ wrap: e }),
|
|
18526
18737
|
label: "Wrap"
|
|
@@ -18530,7 +18741,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18530
18741
|
style: { marginTop: 12 },
|
|
18531
18742
|
children: "Scrollable"
|
|
18532
18743
|
}),
|
|
18533
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
18744
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18534
18745
|
value: e.scrollable,
|
|
18535
18746
|
onChange: (e) => t({ scrollable: e }),
|
|
18536
18747
|
label: "Scrollable (Carousel)"
|
|
@@ -18545,7 +18756,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18545
18756
|
})
|
|
18546
18757
|
}), /* @__PURE__ */ (0, P.jsx)(R, {
|
|
18547
18758
|
label: "Snap",
|
|
18548
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18759
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18549
18760
|
value: e.snap,
|
|
18550
18761
|
onChange: (e) => t({ snap: e }),
|
|
18551
18762
|
options: ["item", "free"]
|
|
@@ -18558,7 +18769,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18558
18769
|
}),
|
|
18559
18770
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18560
18771
|
label: "Padding",
|
|
18561
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18772
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18562
18773
|
value: e.padding,
|
|
18563
18774
|
onChange: (e) => t({ padding: e })
|
|
18564
18775
|
})
|
|
@@ -18632,7 +18843,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18632
18843
|
}),
|
|
18633
18844
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18634
18845
|
label: "Align",
|
|
18635
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18846
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18636
18847
|
value: e.align,
|
|
18637
18848
|
onChange: (e) => t({ align: e }),
|
|
18638
18849
|
options: [
|
|
@@ -18650,7 +18861,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18650
18861
|
}),
|
|
18651
18862
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18652
18863
|
label: "Padding",
|
|
18653
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18864
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18654
18865
|
value: e.padding,
|
|
18655
18866
|
onChange: (e) => t({ padding: e })
|
|
18656
18867
|
})
|
|
@@ -18715,7 +18926,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18715
18926
|
}),
|
|
18716
18927
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18717
18928
|
label: "Columns",
|
|
18718
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18929
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18719
18930
|
value: String(e.columns ?? 2),
|
|
18720
18931
|
onChange: (e) => t({ columns: Number(e) }),
|
|
18721
18932
|
options: [
|
|
@@ -18741,7 +18952,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18741
18952
|
}),
|
|
18742
18953
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18743
18954
|
label: "Padding",
|
|
18744
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
18955
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18745
18956
|
value: e.padding,
|
|
18746
18957
|
onChange: (e) => t({ padding: e })
|
|
18747
18958
|
})
|
|
@@ -18803,31 +19014,31 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18803
19014
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18804
19015
|
label: "Header",
|
|
18805
19016
|
error: r("header"),
|
|
18806
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19017
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18807
19018
|
value: e.header,
|
|
18808
19019
|
onChange: (e) => t({ header: e })
|
|
18809
19020
|
})
|
|
18810
19021
|
}),
|
|
18811
19022
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18812
19023
|
label: "Header Icon",
|
|
18813
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19024
|
+
children: /* @__PURE__ */ (0, P.jsx)(sr, {
|
|
18814
19025
|
value: e.headerIcon ?? "",
|
|
18815
19026
|
onChange: (e) => t({ headerIcon: e })
|
|
18816
19027
|
})
|
|
18817
19028
|
}),
|
|
18818
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
19029
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18819
19030
|
value: e.expandedByDefault,
|
|
18820
19031
|
onChange: (e) => t({ expandedByDefault: e }),
|
|
18821
19032
|
label: "Expanded by Default"
|
|
18822
19033
|
}),
|
|
18823
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
19034
|
+
/* @__PURE__ */ (0, P.jsx)(Sr, {
|
|
18824
19035
|
value: e.border,
|
|
18825
19036
|
onChange: (e) => t({ border: e }),
|
|
18826
19037
|
label: "Show Border"
|
|
18827
19038
|
}),
|
|
18828
19039
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18829
19040
|
label: "Padding",
|
|
18830
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19041
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18831
19042
|
value: e.padding,
|
|
18832
19043
|
onChange: (e) => t({ padding: e })
|
|
18833
19044
|
})
|
|
@@ -18843,7 +19054,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18843
19054
|
}),
|
|
18844
19055
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18845
19056
|
label: "Font Weight",
|
|
18846
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19057
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18847
19058
|
value: e.fontWeight,
|
|
18848
19059
|
onChange: (e) => t({ fontWeight: e }),
|
|
18849
19060
|
options: [
|
|
@@ -18869,7 +19080,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18869
19080
|
children: [
|
|
18870
19081
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18871
19082
|
label: "Tab Labels (comma-separated)",
|
|
18872
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19083
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18873
19084
|
value: e.tabs.map((e) => e.label).join(", "),
|
|
18874
19085
|
onChange: (n) => {
|
|
18875
19086
|
t({ tabs: n.split(",").map((e) => e.trim()).map((t, n) => ({
|
|
@@ -18892,7 +19103,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18892
19103
|
}),
|
|
18893
19104
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18894
19105
|
label: "Tab Align",
|
|
18895
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19106
|
+
children: /* @__PURE__ */ (0, P.jsx)(gr, {
|
|
18896
19107
|
value: e.tabAlign,
|
|
18897
19108
|
onChange: (e) => t({ tabAlign: e }),
|
|
18898
19109
|
options: [
|
|
@@ -18904,14 +19115,14 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18904
19115
|
}),
|
|
18905
19116
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18906
19117
|
label: "Tab Padding",
|
|
18907
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19118
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18908
19119
|
value: e.tabPadding,
|
|
18909
19120
|
onChange: (e) => t({ tabPadding: e })
|
|
18910
19121
|
})
|
|
18911
19122
|
}),
|
|
18912
19123
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18913
19124
|
label: "Content Padding",
|
|
18914
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19125
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18915
19126
|
value: e.contentPadding,
|
|
18916
19127
|
onChange: (e) => t({ contentPadding: e })
|
|
18917
19128
|
})
|
|
@@ -18933,19 +19144,17 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18933
19144
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18934
19145
|
label: "Content",
|
|
18935
19146
|
error: r("content"),
|
|
18936
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19147
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19148
|
+
multiline: !0,
|
|
18937
19149
|
rows: 4,
|
|
18938
19150
|
value: e.content,
|
|
18939
|
-
onChange: (e) => t({ content: e
|
|
18940
|
-
style: {
|
|
18941
|
-
fontFamily: "monospace",
|
|
18942
|
-
resize: "vertical"
|
|
18943
|
-
}
|
|
19151
|
+
onChange: (e) => t({ content: e }),
|
|
19152
|
+
style: { fontFamily: "monospace" }
|
|
18944
19153
|
})
|
|
18945
19154
|
}),
|
|
18946
19155
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18947
19156
|
label: "Language",
|
|
18948
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19157
|
+
children: /* @__PURE__ */ (0, P.jsx)(pr, {
|
|
18949
19158
|
value: e.language ?? "",
|
|
18950
19159
|
onChange: (e) => t({ language: e })
|
|
18951
19160
|
})
|
|
@@ -18966,7 +19175,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
18966
19175
|
}),
|
|
18967
19176
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
18968
19177
|
label: "Padding",
|
|
18969
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19178
|
+
children: /* @__PURE__ */ (0, P.jsx)(kr, {
|
|
18970
19179
|
value: e.padding,
|
|
18971
19180
|
onChange: (e) => t({ padding: e })
|
|
18972
19181
|
})
|
|
@@ -19013,11 +19222,11 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
19013
19222
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
19014
19223
|
label: "Content",
|
|
19015
19224
|
error: r("content"),
|
|
19016
|
-
children: /* @__PURE__ */ (0, P.jsx)(
|
|
19225
|
+
children: /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19226
|
+
multiline: !0,
|
|
19017
19227
|
rows: 4,
|
|
19018
19228
|
value: e.content,
|
|
19019
|
-
onChange: (e) => t({ content: e
|
|
19020
|
-
style: { resize: "vertical" }
|
|
19229
|
+
onChange: (e) => t({ content: e })
|
|
19021
19230
|
})
|
|
19022
19231
|
}),
|
|
19023
19232
|
/* @__PURE__ */ (0, P.jsx)(R, {
|
|
@@ -19061,7 +19270,7 @@ function Dr(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
19061
19270
|
}
|
|
19062
19271
|
//#endregion
|
|
19063
19272
|
//#region src/components/properties/BubbleSettingsEditor.tsx
|
|
19064
|
-
var
|
|
19273
|
+
var jr = (0, S.memo)(function() {
|
|
19065
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);
|
|
19066
19275
|
return /* @__PURE__ */ (0, P.jsxs)("div", { children: [
|
|
19067
19276
|
/* @__PURE__ */ (0, P.jsx)("div", {
|
|
@@ -19168,12 +19377,12 @@ var Or = (0, S.memo)(function() {
|
|
|
19168
19377
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
19169
19378
|
className: "prop-label",
|
|
19170
19379
|
children: "Fallback Text (required)"
|
|
19171
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
19380
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19381
|
+
multiline: !0,
|
|
19172
19382
|
rows: 3,
|
|
19173
19383
|
value: n,
|
|
19174
|
-
onChange:
|
|
19175
|
-
placeholder: "Plain text for older UI Kit versions"
|
|
19176
|
-
style: { resize: "vertical" }
|
|
19384
|
+
onChange: i,
|
|
19385
|
+
placeholder: "Plain text for older UI Kit versions"
|
|
19177
19386
|
})]
|
|
19178
19387
|
}),
|
|
19179
19388
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -19181,52 +19390,52 @@ var Or = (0, S.memo)(function() {
|
|
|
19181
19390
|
children: [/* @__PURE__ */ (0, P.jsx)("label", {
|
|
19182
19391
|
className: "prop-label",
|
|
19183
19392
|
children: "Notification Text"
|
|
19184
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
19393
|
+
}), /* @__PURE__ */ (0, P.jsx)(Qn, {
|
|
19394
|
+
multiline: !0,
|
|
19185
19395
|
rows: 2,
|
|
19186
19396
|
value: r,
|
|
19187
|
-
onChange:
|
|
19188
|
-
placeholder: "Text for push notifications"
|
|
19189
|
-
style: { resize: "vertical" }
|
|
19397
|
+
onChange: a,
|
|
19398
|
+
placeholder: "Text for push notifications"
|
|
19190
19399
|
})]
|
|
19191
19400
|
})
|
|
19192
19401
|
]
|
|
19193
19402
|
})
|
|
19194
19403
|
] });
|
|
19195
|
-
}),
|
|
19196
|
-
function
|
|
19404
|
+
}), Mr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
|
|
19405
|
+
function Nr(e) {
|
|
19197
19406
|
let t = Object.prototype.toString.call(e);
|
|
19198
19407
|
return t === "[object Window]" || t === "[object global]";
|
|
19199
19408
|
}
|
|
19200
|
-
function
|
|
19409
|
+
function Pr(e) {
|
|
19201
19410
|
return "nodeType" in e;
|
|
19202
19411
|
}
|
|
19203
|
-
function
|
|
19204
|
-
return e ?
|
|
19412
|
+
function Fr(e) {
|
|
19413
|
+
return e ? Nr(e) ? e : Pr(e) ? e.ownerDocument?.defaultView ?? window : window : window;
|
|
19205
19414
|
}
|
|
19206
|
-
function
|
|
19207
|
-
let { Document: t } =
|
|
19415
|
+
function Ir(e) {
|
|
19416
|
+
let { Document: t } = Fr(e);
|
|
19208
19417
|
return e instanceof t;
|
|
19209
19418
|
}
|
|
19210
|
-
function
|
|
19211
|
-
return
|
|
19419
|
+
function Lr(e) {
|
|
19420
|
+
return Nr(e) ? !1 : e instanceof Fr(e).HTMLElement;
|
|
19212
19421
|
}
|
|
19213
|
-
function
|
|
19214
|
-
return e instanceof
|
|
19422
|
+
function Rr(e) {
|
|
19423
|
+
return e instanceof Fr(e).SVGElement;
|
|
19215
19424
|
}
|
|
19216
|
-
function
|
|
19217
|
-
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;
|
|
19218
19427
|
}
|
|
19219
|
-
var
|
|
19220
|
-
function
|
|
19428
|
+
var Br = Mr ? S.useLayoutEffect : S.useEffect;
|
|
19429
|
+
function Vr(e) {
|
|
19221
19430
|
let t = (0, S.useRef)(e);
|
|
19222
|
-
return
|
|
19431
|
+
return Br(() => {
|
|
19223
19432
|
t.current = e;
|
|
19224
19433
|
}), (0, S.useCallback)(function() {
|
|
19225
19434
|
var e = [...arguments];
|
|
19226
19435
|
return t.current == null ? void 0 : t.current(...e);
|
|
19227
19436
|
}, []);
|
|
19228
19437
|
}
|
|
19229
|
-
function
|
|
19438
|
+
function Hr() {
|
|
19230
19439
|
let e = (0, S.useRef)(null);
|
|
19231
19440
|
return [(0, S.useCallback)((t, n) => {
|
|
19232
19441
|
e.current = setInterval(t, n);
|
|
@@ -19234,41 +19443,41 @@ function zr() {
|
|
|
19234
19443
|
e.current !== null && (clearInterval(e.current), e.current = null);
|
|
19235
19444
|
}, [])];
|
|
19236
19445
|
}
|
|
19237
|
-
function
|
|
19446
|
+
function Ur(e, t) {
|
|
19238
19447
|
t === void 0 && (t = [e]);
|
|
19239
19448
|
let n = (0, S.useRef)(e);
|
|
19240
|
-
return
|
|
19449
|
+
return Br(() => {
|
|
19241
19450
|
n.current !== e && (n.current = e);
|
|
19242
19451
|
}, t), n;
|
|
19243
19452
|
}
|
|
19244
|
-
function
|
|
19453
|
+
function Wr(e, t) {
|
|
19245
19454
|
let n = (0, S.useRef)();
|
|
19246
19455
|
return (0, S.useMemo)(() => {
|
|
19247
19456
|
let t = e(n.current);
|
|
19248
19457
|
return n.current = t, t;
|
|
19249
19458
|
}, [...t]);
|
|
19250
19459
|
}
|
|
19251
|
-
function
|
|
19252
|
-
let t =
|
|
19460
|
+
function Gr(e) {
|
|
19461
|
+
let t = Vr(e), n = (0, S.useRef)(null);
|
|
19253
19462
|
return [n, (0, S.useCallback)((e) => {
|
|
19254
19463
|
e !== n.current && t?.(e, n.current), n.current = e;
|
|
19255
19464
|
}, [])];
|
|
19256
19465
|
}
|
|
19257
|
-
function
|
|
19466
|
+
function Kr(e) {
|
|
19258
19467
|
let t = (0, S.useRef)();
|
|
19259
19468
|
return (0, S.useEffect)(() => {
|
|
19260
19469
|
t.current = e;
|
|
19261
19470
|
}, [e]), t.current;
|
|
19262
19471
|
}
|
|
19263
|
-
var
|
|
19264
|
-
function
|
|
19472
|
+
var qr = {};
|
|
19473
|
+
function Jr(e, t) {
|
|
19265
19474
|
return (0, S.useMemo)(() => {
|
|
19266
19475
|
if (t) return t;
|
|
19267
|
-
let n =
|
|
19268
|
-
return
|
|
19476
|
+
let n = qr[e] == null ? 0 : qr[e] + 1;
|
|
19477
|
+
return qr[e] = n, e + "-" + n;
|
|
19269
19478
|
}, [e, t]);
|
|
19270
19479
|
}
|
|
19271
|
-
function
|
|
19480
|
+
function Yr(e) {
|
|
19272
19481
|
return function(t) {
|
|
19273
19482
|
return [...arguments].slice(1).reduce((t, n) => {
|
|
19274
19483
|
let r = Object.entries(n);
|
|
@@ -19280,22 +19489,22 @@ function Kr(e) {
|
|
|
19280
19489
|
}, { ...t });
|
|
19281
19490
|
};
|
|
19282
19491
|
}
|
|
19283
|
-
var
|
|
19284
|
-
function
|
|
19492
|
+
var Xr = /* @__PURE__ */ Yr(1), Zr = /* @__PURE__ */ Yr(-1);
|
|
19493
|
+
function Qr(e) {
|
|
19285
19494
|
return "clientX" in e && "clientY" in e;
|
|
19286
19495
|
}
|
|
19287
|
-
function
|
|
19496
|
+
function $r(e) {
|
|
19288
19497
|
if (!e) return !1;
|
|
19289
|
-
let { KeyboardEvent: t } =
|
|
19498
|
+
let { KeyboardEvent: t } = Fr(e.target);
|
|
19290
19499
|
return t && e instanceof t;
|
|
19291
19500
|
}
|
|
19292
|
-
function
|
|
19501
|
+
function ei(e) {
|
|
19293
19502
|
if (!e) return !1;
|
|
19294
|
-
let { TouchEvent: t } =
|
|
19503
|
+
let { TouchEvent: t } = Fr(e.target);
|
|
19295
19504
|
return t && e instanceof t;
|
|
19296
19505
|
}
|
|
19297
|
-
function
|
|
19298
|
-
if (
|
|
19506
|
+
function ti(e) {
|
|
19507
|
+
if (ei(e)) {
|
|
19299
19508
|
if (e.touches && e.touches.length) {
|
|
19300
19509
|
let { clientX: t, clientY: n } = e.touches[0];
|
|
19301
19510
|
return {
|
|
@@ -19310,12 +19519,12 @@ function Qr(e) {
|
|
|
19310
19519
|
};
|
|
19311
19520
|
}
|
|
19312
19521
|
}
|
|
19313
|
-
return
|
|
19522
|
+
return Qr(e) ? {
|
|
19314
19523
|
x: e.clientX,
|
|
19315
19524
|
y: e.clientY
|
|
19316
19525
|
} : null;
|
|
19317
19526
|
}
|
|
19318
|
-
var
|
|
19527
|
+
var ni = /* @__PURE__ */ Object.freeze({
|
|
19319
19528
|
Translate: { toString(e) {
|
|
19320
19529
|
if (!e) return;
|
|
19321
19530
|
let { x: t, y: n } = e;
|
|
@@ -19327,27 +19536,27 @@ var $r = /* @__PURE__ */ Object.freeze({
|
|
|
19327
19536
|
return "scaleX(" + t + ") scaleY(" + n + ")";
|
|
19328
19537
|
} },
|
|
19329
19538
|
Transform: { toString(e) {
|
|
19330
|
-
if (e) return [
|
|
19539
|
+
if (e) return [ni.Translate.toString(e), ni.Scale.toString(e)].join(" ");
|
|
19331
19540
|
} },
|
|
19332
19541
|
Transition: { toString(e) {
|
|
19333
19542
|
let { property: t, duration: n, easing: r } = e;
|
|
19334
19543
|
return t + " " + n + "ms " + r;
|
|
19335
19544
|
} }
|
|
19336
|
-
}),
|
|
19337
|
-
function
|
|
19338
|
-
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);
|
|
19339
19548
|
}
|
|
19340
19549
|
//#endregion
|
|
19341
19550
|
//#region node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
|
|
19342
|
-
var
|
|
19343
|
-
function
|
|
19551
|
+
var ai = { display: "none" };
|
|
19552
|
+
function oi(e) {
|
|
19344
19553
|
let { id: t, value: n } = e;
|
|
19345
19554
|
return S.createElement("div", {
|
|
19346
19555
|
id: t,
|
|
19347
|
-
style:
|
|
19556
|
+
style: ai
|
|
19348
19557
|
}, n);
|
|
19349
19558
|
}
|
|
19350
|
-
function
|
|
19559
|
+
function si(e) {
|
|
19351
19560
|
let { id: t, announcement: n, ariaLiveType: r = "assertive" } = e;
|
|
19352
19561
|
return S.createElement("div", {
|
|
19353
19562
|
id: t,
|
|
@@ -19370,7 +19579,7 @@ function ii(e) {
|
|
|
19370
19579
|
"aria-atomic": !0
|
|
19371
19580
|
}, n);
|
|
19372
19581
|
}
|
|
19373
|
-
function
|
|
19582
|
+
function ci() {
|
|
19374
19583
|
let [e, t] = (0, S.useState)("");
|
|
19375
19584
|
return {
|
|
19376
19585
|
announce: (0, S.useCallback)((e) => {
|
|
@@ -19381,22 +19590,22 @@ function ai() {
|
|
|
19381
19590
|
}
|
|
19382
19591
|
//#endregion
|
|
19383
19592
|
//#region node_modules/@dnd-kit/core/dist/core.esm.js
|
|
19384
|
-
var
|
|
19385
|
-
function
|
|
19386
|
-
let t = (0, S.useContext)(
|
|
19593
|
+
var li = /* @__PURE__ */ (0, S.createContext)(null);
|
|
19594
|
+
function ui(e) {
|
|
19595
|
+
let t = (0, S.useContext)(li);
|
|
19387
19596
|
(0, S.useEffect)(() => {
|
|
19388
19597
|
if (!t) throw Error("useDndMonitor must be used within a children of <DndContext>");
|
|
19389
19598
|
return t(e);
|
|
19390
19599
|
}, [e, t]);
|
|
19391
19600
|
}
|
|
19392
|
-
function
|
|
19601
|
+
function di() {
|
|
19393
19602
|
let [e] = (0, S.useState)(() => /* @__PURE__ */ new Set()), t = (0, S.useCallback)((t) => (e.add(t), () => e.delete(t)), [e]);
|
|
19394
19603
|
return [(0, S.useCallback)((t) => {
|
|
19395
19604
|
let { type: n, event: r } = t;
|
|
19396
19605
|
e.forEach((e) => e[n]?.call(e, r));
|
|
19397
19606
|
}, [e]), t];
|
|
19398
19607
|
}
|
|
19399
|
-
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 = {
|
|
19400
19609
|
onDragStart(e) {
|
|
19401
19610
|
let { active: t } = e;
|
|
19402
19611
|
return "Picked up draggable item " + t.id + ".";
|
|
@@ -19414,11 +19623,11 @@ var li = { draggable: "\n To pick up a draggable item, press the space bar.\n
|
|
|
19414
19623
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
19415
19624
|
}
|
|
19416
19625
|
};
|
|
19417
|
-
function
|
|
19418
|
-
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);
|
|
19419
19628
|
if ((0, S.useEffect)(() => {
|
|
19420
19629
|
l(!0);
|
|
19421
|
-
}, []),
|
|
19630
|
+
}, []), ui((0, S.useMemo)(() => ({
|
|
19422
19631
|
onDragStart(e) {
|
|
19423
19632
|
let { active: n } = e;
|
|
19424
19633
|
a(t.onDragStart({ active: n }));
|
|
@@ -19452,39 +19661,39 @@ function di(e) {
|
|
|
19452
19661
|
}));
|
|
19453
19662
|
}
|
|
19454
19663
|
}), [a, t])), !c) return null;
|
|
19455
|
-
let u = S.createElement(S.Fragment, null, S.createElement(
|
|
19664
|
+
let u = S.createElement(S.Fragment, null, S.createElement(oi, {
|
|
19456
19665
|
id: r,
|
|
19457
19666
|
value: i.draggable
|
|
19458
|
-
}), S.createElement(
|
|
19667
|
+
}), S.createElement(si, {
|
|
19459
19668
|
id: s,
|
|
19460
19669
|
announcement: o
|
|
19461
19670
|
}));
|
|
19462
19671
|
return n ? (0, An.createPortal)(u, n) : u;
|
|
19463
19672
|
}
|
|
19464
|
-
var
|
|
19673
|
+
var hi;
|
|
19465
19674
|
(function(e) {
|
|
19466
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";
|
|
19467
|
-
})(
|
|
19468
|
-
function
|
|
19469
|
-
function
|
|
19676
|
+
})(hi ||= {});
|
|
19677
|
+
function gi() {}
|
|
19678
|
+
function _i(e, t) {
|
|
19470
19679
|
return (0, S.useMemo)(() => ({
|
|
19471
19680
|
sensor: e,
|
|
19472
19681
|
options: t ?? {}
|
|
19473
19682
|
}), [e, t]);
|
|
19474
19683
|
}
|
|
19475
|
-
function
|
|
19684
|
+
function vi() {
|
|
19476
19685
|
var e = [...arguments];
|
|
19477
19686
|
return (0, S.useMemo)(() => [...e].filter((e) => e != null), [...e]);
|
|
19478
19687
|
}
|
|
19479
|
-
var
|
|
19688
|
+
var yi = /* @__PURE__ */ Object.freeze({
|
|
19480
19689
|
x: 0,
|
|
19481
19690
|
y: 0
|
|
19482
19691
|
});
|
|
19483
|
-
function
|
|
19692
|
+
function bi(e, t) {
|
|
19484
19693
|
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
19485
19694
|
}
|
|
19486
|
-
function
|
|
19487
|
-
let n =
|
|
19695
|
+
function xi(e, t) {
|
|
19696
|
+
let n = ti(e);
|
|
19488
19697
|
if (!n) return "0 0";
|
|
19489
19698
|
let r = {
|
|
19490
19699
|
x: (n.x - t.left) / t.width * 100,
|
|
@@ -19492,31 +19701,31 @@ function vi(e, t) {
|
|
|
19492
19701
|
};
|
|
19493
19702
|
return r.x + "% " + r.y + "%";
|
|
19494
19703
|
}
|
|
19495
|
-
function
|
|
19704
|
+
function Si(e, t) {
|
|
19496
19705
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
19497
19706
|
return n - r;
|
|
19498
19707
|
}
|
|
19499
|
-
function
|
|
19708
|
+
function Ci(e, t) {
|
|
19500
19709
|
let { data: { value: n } } = e, { data: { value: r } } = t;
|
|
19501
19710
|
return r - n;
|
|
19502
19711
|
}
|
|
19503
|
-
function
|
|
19712
|
+
function wi(e, t) {
|
|
19504
19713
|
if (!e || e.length === 0) return null;
|
|
19505
19714
|
let [n] = e;
|
|
19506
19715
|
return t ? n[t] : n;
|
|
19507
19716
|
}
|
|
19508
|
-
function
|
|
19717
|
+
function Ti(e, t, n) {
|
|
19509
19718
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
19510
19719
|
x: t + e.width * .5,
|
|
19511
19720
|
y: n + e.height * .5
|
|
19512
19721
|
};
|
|
19513
19722
|
}
|
|
19514
|
-
var
|
|
19515
|
-
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 = [];
|
|
19516
19725
|
for (let e of r) {
|
|
19517
19726
|
let { id: t } = e, r = n.get(t);
|
|
19518
19727
|
if (r) {
|
|
19519
|
-
let n =
|
|
19728
|
+
let n = bi(Ti(r), i);
|
|
19520
19729
|
a.push({
|
|
19521
19730
|
id: t,
|
|
19522
19731
|
data: {
|
|
@@ -19526,9 +19735,9 @@ var Ci = (e) => {
|
|
|
19526
19735
|
});
|
|
19527
19736
|
}
|
|
19528
19737
|
}
|
|
19529
|
-
return a.sort(
|
|
19738
|
+
return a.sort(Si);
|
|
19530
19739
|
};
|
|
19531
|
-
function
|
|
19740
|
+
function Di(e, t) {
|
|
19532
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;
|
|
19533
19742
|
if (r < i && n < a) {
|
|
19534
19743
|
let n = t.width * t.height, r = e.width * e.height, i = o * s, a = i / (n + r - i);
|
|
@@ -19536,12 +19745,12 @@ function wi(e, t) {
|
|
|
19536
19745
|
}
|
|
19537
19746
|
return 0;
|
|
19538
19747
|
}
|
|
19539
|
-
var
|
|
19748
|
+
var Oi = (e) => {
|
|
19540
19749
|
let { collisionRect: t, droppableRects: n, droppableContainers: r } = e, i = [];
|
|
19541
19750
|
for (let e of r) {
|
|
19542
19751
|
let { id: r } = e, a = n.get(r);
|
|
19543
19752
|
if (a) {
|
|
19544
|
-
let n =
|
|
19753
|
+
let n = Di(a, t);
|
|
19545
19754
|
n > 0 && i.push({
|
|
19546
19755
|
id: r,
|
|
19547
19756
|
data: {
|
|
@@ -19551,22 +19760,22 @@ var Ti = (e) => {
|
|
|
19551
19760
|
});
|
|
19552
19761
|
}
|
|
19553
19762
|
}
|
|
19554
|
-
return i.sort(
|
|
19763
|
+
return i.sort(Ci);
|
|
19555
19764
|
};
|
|
19556
|
-
function
|
|
19765
|
+
function ki(e, t, n) {
|
|
19557
19766
|
return {
|
|
19558
19767
|
...e,
|
|
19559
19768
|
scaleX: t && n ? t.width / n.width : 1,
|
|
19560
19769
|
scaleY: t && n ? t.height / n.height : 1
|
|
19561
19770
|
};
|
|
19562
19771
|
}
|
|
19563
|
-
function
|
|
19772
|
+
function Ai(e, t) {
|
|
19564
19773
|
return e && t ? {
|
|
19565
19774
|
x: e.left - t.left,
|
|
19566
19775
|
y: e.top - t.top
|
|
19567
|
-
} :
|
|
19776
|
+
} : yi;
|
|
19568
19777
|
}
|
|
19569
|
-
function
|
|
19778
|
+
function ji(e) {
|
|
19570
19779
|
return function(t) {
|
|
19571
19780
|
return [...arguments].slice(1).reduce((t, n) => ({
|
|
19572
19781
|
...t,
|
|
@@ -19577,8 +19786,8 @@ function Oi(e) {
|
|
|
19577
19786
|
}), { ...t });
|
|
19578
19787
|
};
|
|
19579
19788
|
}
|
|
19580
|
-
var
|
|
19581
|
-
function
|
|
19789
|
+
var V = /* @__PURE__ */ ji(1);
|
|
19790
|
+
function H(e) {
|
|
19582
19791
|
if (e.startsWith("matrix3d(")) {
|
|
19583
19792
|
let t = e.slice(9, -1).split(/, /);
|
|
19584
19793
|
return {
|
|
@@ -19598,8 +19807,8 @@ function Ai(e) {
|
|
|
19598
19807
|
}
|
|
19599
19808
|
return null;
|
|
19600
19809
|
}
|
|
19601
|
-
function
|
|
19602
|
-
let r =
|
|
19810
|
+
function Mi(e, t, n) {
|
|
19811
|
+
let r = H(t);
|
|
19603
19812
|
if (!r) return e;
|
|
19604
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;
|
|
19605
19814
|
return {
|
|
@@ -19611,13 +19820,13 @@ function ji(e, t, n) {
|
|
|
19611
19820
|
left: c
|
|
19612
19821
|
};
|
|
19613
19822
|
}
|
|
19614
|
-
var
|
|
19615
|
-
function
|
|
19616
|
-
t === void 0 && (t =
|
|
19823
|
+
var Ni = { ignoreTransform: !1 };
|
|
19824
|
+
function Pi(e, t) {
|
|
19825
|
+
t === void 0 && (t = Ni);
|
|
19617
19826
|
let n = e.getBoundingClientRect();
|
|
19618
19827
|
if (t.ignoreTransform) {
|
|
19619
|
-
let { transform: t, transformOrigin: r } =
|
|
19620
|
-
t && (n =
|
|
19828
|
+
let { transform: t, transformOrigin: r } = Fr(e).getComputedStyle(e);
|
|
19829
|
+
t && (n = Mi(n, t, r));
|
|
19621
19830
|
}
|
|
19622
19831
|
let { top: r, left: i, width: a, height: o, bottom: s, right: c } = n;
|
|
19623
19832
|
return {
|
|
@@ -19629,10 +19838,10 @@ function H(e, t) {
|
|
|
19629
19838
|
right: c
|
|
19630
19839
|
};
|
|
19631
19840
|
}
|
|
19632
|
-
function
|
|
19633
|
-
return
|
|
19841
|
+
function Fi(e) {
|
|
19842
|
+
return Pi(e, { ignoreTransform: !0 });
|
|
19634
19843
|
}
|
|
19635
|
-
function
|
|
19844
|
+
function Ii(e) {
|
|
19636
19845
|
let t = e.innerWidth, n = e.innerHeight;
|
|
19637
19846
|
return {
|
|
19638
19847
|
top: 0,
|
|
@@ -19643,11 +19852,11 @@ function Ni(e) {
|
|
|
19643
19852
|
height: n
|
|
19644
19853
|
};
|
|
19645
19854
|
}
|
|
19646
|
-
function
|
|
19647
|
-
return t === void 0 && (t =
|
|
19855
|
+
function Li(e, t) {
|
|
19856
|
+
return t === void 0 && (t = Fr(e).getComputedStyle(e)), t.position === "fixed";
|
|
19648
19857
|
}
|
|
19649
|
-
function
|
|
19650
|
-
t === void 0 && (t =
|
|
19858
|
+
function Ri(e, t) {
|
|
19859
|
+
t === void 0 && (t = Fr(e).getComputedStyle(e));
|
|
19651
19860
|
let n = /(auto|scroll|overlay)/;
|
|
19652
19861
|
return [
|
|
19653
19862
|
"overflow",
|
|
@@ -19658,48 +19867,48 @@ function Fi(e, t) {
|
|
|
19658
19867
|
return typeof r == "string" ? n.test(r) : !1;
|
|
19659
19868
|
});
|
|
19660
19869
|
}
|
|
19661
|
-
function
|
|
19870
|
+
function zi(e, t) {
|
|
19662
19871
|
let n = [];
|
|
19663
19872
|
function r(i) {
|
|
19664
19873
|
if (t != null && n.length >= t || !i) return n;
|
|
19665
|
-
if (
|
|
19666
|
-
if (!
|
|
19667
|
-
let a =
|
|
19668
|
-
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);
|
|
19669
19878
|
}
|
|
19670
19879
|
return e ? r(e) : n;
|
|
19671
19880
|
}
|
|
19672
|
-
function
|
|
19673
|
-
let [t] =
|
|
19881
|
+
function Bi(e) {
|
|
19882
|
+
let [t] = zi(e, 1);
|
|
19674
19883
|
return t ?? null;
|
|
19675
19884
|
}
|
|
19676
|
-
function
|
|
19677
|
-
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;
|
|
19678
19887
|
}
|
|
19679
|
-
function
|
|
19680
|
-
return
|
|
19888
|
+
function Hi(e) {
|
|
19889
|
+
return Nr(e) ? e.scrollX : e.scrollLeft;
|
|
19681
19890
|
}
|
|
19682
|
-
function
|
|
19683
|
-
return
|
|
19891
|
+
function Ui(e) {
|
|
19892
|
+
return Nr(e) ? e.scrollY : e.scrollTop;
|
|
19684
19893
|
}
|
|
19685
|
-
function
|
|
19894
|
+
function Wi(e) {
|
|
19686
19895
|
return {
|
|
19687
|
-
x:
|
|
19688
|
-
y:
|
|
19896
|
+
x: Hi(e),
|
|
19897
|
+
y: Ui(e)
|
|
19689
19898
|
};
|
|
19690
19899
|
}
|
|
19691
|
-
var
|
|
19900
|
+
var Gi;
|
|
19692
19901
|
(function(e) {
|
|
19693
19902
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
19694
|
-
})(
|
|
19695
|
-
function
|
|
19696
|
-
return !
|
|
19903
|
+
})(Gi ||= {});
|
|
19904
|
+
function Ki(e) {
|
|
19905
|
+
return !Mr || !e ? !1 : e === document.scrollingElement;
|
|
19697
19906
|
}
|
|
19698
|
-
function
|
|
19907
|
+
function qi(e) {
|
|
19699
19908
|
let t = {
|
|
19700
19909
|
x: 0,
|
|
19701
19910
|
y: 0
|
|
19702
|
-
}, n =
|
|
19911
|
+
}, n = Ki(e) ? {
|
|
19703
19912
|
height: window.innerHeight,
|
|
19704
19913
|
width: window.innerWidth
|
|
19705
19914
|
} : {
|
|
@@ -19718,14 +19927,14 @@ function Wi(e) {
|
|
|
19718
19927
|
minScroll: t
|
|
19719
19928
|
};
|
|
19720
19929
|
}
|
|
19721
|
-
var
|
|
19930
|
+
var Ji = {
|
|
19722
19931
|
x: .2,
|
|
19723
19932
|
y: .2
|
|
19724
19933
|
};
|
|
19725
|
-
function
|
|
19934
|
+
function Yi(e, t, n, r, i) {
|
|
19726
19935
|
let { top: a, left: o, right: s, bottom: c } = n;
|
|
19727
|
-
r === void 0 && (r = 10), i === void 0 && (i =
|
|
19728
|
-
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 = {
|
|
19729
19938
|
x: 0,
|
|
19730
19939
|
y: 0
|
|
19731
19940
|
}, m = {
|
|
@@ -19735,12 +19944,12 @@ function Ki(e, t, n, r, i) {
|
|
|
19735
19944
|
height: t.height * i.y,
|
|
19736
19945
|
width: t.width * i.x
|
|
19737
19946
|
};
|
|
19738
|
-
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)), {
|
|
19739
19948
|
direction: p,
|
|
19740
19949
|
speed: m
|
|
19741
19950
|
};
|
|
19742
19951
|
}
|
|
19743
|
-
function
|
|
19952
|
+
function Xi(e) {
|
|
19744
19953
|
if (e === document.scrollingElement) {
|
|
19745
19954
|
let { innerWidth: e, innerHeight: t } = window;
|
|
19746
19955
|
return {
|
|
@@ -19762,37 +19971,37 @@ function qi(e) {
|
|
|
19762
19971
|
height: e.clientHeight
|
|
19763
19972
|
};
|
|
19764
19973
|
}
|
|
19765
|
-
function
|
|
19766
|
-
return e.reduce((e, t) =>
|
|
19974
|
+
function Zi(e) {
|
|
19975
|
+
return e.reduce((e, t) => Xr(e, Wi(t)), yi);
|
|
19767
19976
|
}
|
|
19768
|
-
function
|
|
19769
|
-
return e.reduce((e, t) => e +
|
|
19977
|
+
function Qi(e) {
|
|
19978
|
+
return e.reduce((e, t) => e + Hi(t), 0);
|
|
19770
19979
|
}
|
|
19771
|
-
function
|
|
19772
|
-
return e.reduce((e, t) => e +
|
|
19980
|
+
function $i(e) {
|
|
19981
|
+
return e.reduce((e, t) => e + Ui(t), 0);
|
|
19773
19982
|
}
|
|
19774
|
-
function
|
|
19775
|
-
if (t === void 0 && (t =
|
|
19983
|
+
function ea(e, t) {
|
|
19984
|
+
if (t === void 0 && (t = Pi), !e) return;
|
|
19776
19985
|
let { top: n, left: r, bottom: i, right: a } = t(e);
|
|
19777
|
-
|
|
19986
|
+
Bi(e) && (i <= 0 || a <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
19778
19987
|
block: "center",
|
|
19779
19988
|
inline: "center"
|
|
19780
19989
|
});
|
|
19781
19990
|
}
|
|
19782
|
-
var
|
|
19991
|
+
var ta = [[
|
|
19783
19992
|
"x",
|
|
19784
19993
|
["left", "right"],
|
|
19785
|
-
|
|
19994
|
+
Qi
|
|
19786
19995
|
], [
|
|
19787
19996
|
"y",
|
|
19788
19997
|
["top", "bottom"],
|
|
19789
|
-
|
|
19790
|
-
]],
|
|
19998
|
+
$i
|
|
19999
|
+
]], na = class {
|
|
19791
20000
|
constructor(e, t) {
|
|
19792
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;
|
|
19793
|
-
let n =
|
|
20002
|
+
let n = zi(t), r = Zi(n);
|
|
19794
20003
|
this.rect = { ...e }, this.width = e.width, this.height = e.height;
|
|
19795
|
-
for (let [e, t, i] of
|
|
20004
|
+
for (let [e, t, i] of ta) for (let a of t) Object.defineProperty(this, a, {
|
|
19796
20005
|
get: () => {
|
|
19797
20006
|
let t = i(n), o = r[e] - t;
|
|
19798
20007
|
return this.rect[a] + o;
|
|
@@ -19801,7 +20010,7 @@ var Qi = [[
|
|
|
19801
20010
|
});
|
|
19802
20011
|
Object.defineProperty(this, "rect", { enumerable: !1 });
|
|
19803
20012
|
}
|
|
19804
|
-
},
|
|
20013
|
+
}, ra = class {
|
|
19805
20014
|
constructor(e) {
|
|
19806
20015
|
this.target = void 0, this.listeners = [], this.removeAll = () => {
|
|
19807
20016
|
this.listeners.forEach((e) => this.target?.removeEventListener(...e));
|
|
@@ -19816,29 +20025,29 @@ var Qi = [[
|
|
|
19816
20025
|
]);
|
|
19817
20026
|
}
|
|
19818
20027
|
};
|
|
19819
|
-
function
|
|
19820
|
-
let { EventTarget: t } =
|
|
19821
|
-
return e instanceof t ? e :
|
|
20028
|
+
function ia(e) {
|
|
20029
|
+
let { EventTarget: t } = Fr(e);
|
|
20030
|
+
return e instanceof t ? e : zr(e);
|
|
19822
20031
|
}
|
|
19823
|
-
function
|
|
20032
|
+
function aa(e, t) {
|
|
19824
20033
|
let n = Math.abs(e.x), r = Math.abs(e.y);
|
|
19825
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;
|
|
19826
20035
|
}
|
|
19827
|
-
var
|
|
20036
|
+
var oa;
|
|
19828
20037
|
(function(e) {
|
|
19829
20038
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
19830
|
-
})(
|
|
19831
|
-
function
|
|
20039
|
+
})(oa ||= {});
|
|
20040
|
+
function sa(e) {
|
|
19832
20041
|
e.preventDefault();
|
|
19833
20042
|
}
|
|
19834
|
-
function
|
|
20043
|
+
function ca(e) {
|
|
19835
20044
|
e.stopPropagation();
|
|
19836
20045
|
}
|
|
19837
20046
|
var U;
|
|
19838
20047
|
(function(e) {
|
|
19839
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";
|
|
19840
20049
|
})(U ||= {});
|
|
19841
|
-
var
|
|
20050
|
+
var la = {
|
|
19842
20051
|
start: [U.Space, U.Enter],
|
|
19843
20052
|
cancel: [U.Esc],
|
|
19844
20053
|
end: [
|
|
@@ -19846,7 +20055,7 @@ var oa = {
|
|
|
19846
20055
|
U.Enter,
|
|
19847
20056
|
U.Tab
|
|
19848
20057
|
]
|
|
19849
|
-
},
|
|
20058
|
+
}, ua = (e, t) => {
|
|
19850
20059
|
let { currentCoordinates: n } = t;
|
|
19851
20060
|
switch (e.code) {
|
|
19852
20061
|
case U.Right: return {
|
|
@@ -19866,22 +20075,22 @@ var oa = {
|
|
|
19866
20075
|
y: n.y - 25
|
|
19867
20076
|
};
|
|
19868
20077
|
}
|
|
19869
|
-
},
|
|
20078
|
+
}, da = class {
|
|
19870
20079
|
constructor(e) {
|
|
19871
20080
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = e;
|
|
19872
20081
|
let { event: { target: t } } = e;
|
|
19873
|
-
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();
|
|
19874
20083
|
}
|
|
19875
20084
|
attach() {
|
|
19876
|
-
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));
|
|
19877
20086
|
}
|
|
19878
20087
|
handleStart() {
|
|
19879
20088
|
let { activeNode: e, onStart: t } = this.props, n = e.node.current;
|
|
19880
|
-
n &&
|
|
20089
|
+
n && ea(n), t(yi);
|
|
19881
20090
|
}
|
|
19882
20091
|
handleKeyDown(e) {
|
|
19883
|
-
if (
|
|
19884
|
-
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;
|
|
19885
20094
|
if (i.end.includes(s)) {
|
|
19886
20095
|
this.handleEnd(e);
|
|
19887
20096
|
return;
|
|
@@ -19893,7 +20102,7 @@ var oa = {
|
|
|
19893
20102
|
let { collisionRect: c } = n.current, l = c ? {
|
|
19894
20103
|
x: c.left,
|
|
19895
20104
|
y: c.top
|
|
19896
|
-
} :
|
|
20105
|
+
} : yi;
|
|
19897
20106
|
this.referenceCoordinates ||= l;
|
|
19898
20107
|
let u = a(e, {
|
|
19899
20108
|
active: t,
|
|
@@ -19901,12 +20110,12 @@ var oa = {
|
|
|
19901
20110
|
currentCoordinates: l
|
|
19902
20111
|
});
|
|
19903
20112
|
if (u) {
|
|
19904
|
-
let t =
|
|
20113
|
+
let t = Zr(u, l), r = {
|
|
19905
20114
|
x: 0,
|
|
19906
20115
|
y: 0
|
|
19907
20116
|
}, { scrollableAncestors: i } = n.current;
|
|
19908
20117
|
for (let n of i) {
|
|
19909
|
-
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 = {
|
|
19910
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)),
|
|
19911
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))
|
|
19912
20121
|
}, h = i === U.Right && !s || i === U.Left && !c, g = i === U.Down && !l || i === U.Up && !a;
|
|
@@ -19940,7 +20149,7 @@ var oa = {
|
|
|
19940
20149
|
break;
|
|
19941
20150
|
}
|
|
19942
20151
|
}
|
|
19943
|
-
this.handleMove(e,
|
|
20152
|
+
this.handleMove(e, Xr(Zr(u, this.referenceCoordinates), r));
|
|
19944
20153
|
}
|
|
19945
20154
|
}
|
|
19946
20155
|
}
|
|
@@ -19960,10 +20169,10 @@ var oa = {
|
|
|
19960
20169
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
19961
20170
|
}
|
|
19962
20171
|
};
|
|
19963
|
-
|
|
20172
|
+
da.activators = [{
|
|
19964
20173
|
eventName: "onKeyDown",
|
|
19965
20174
|
handler: (e, t, n) => {
|
|
19966
|
-
let { keyboardCodes: r =
|
|
20175
|
+
let { keyboardCodes: r = la, onActivation: i } = t, { active: a } = n, { code: o } = e.nativeEvent;
|
|
19967
20176
|
if (r.start.includes(o)) {
|
|
19968
20177
|
let t = a.activatorNode.current;
|
|
19969
20178
|
return t && e.target !== t ? !1 : (e.preventDefault(), i?.({ event: e.nativeEvent }), !0);
|
|
@@ -19971,31 +20180,31 @@ ca.activators = [{
|
|
|
19971
20180
|
return !1;
|
|
19972
20181
|
}
|
|
19973
20182
|
}];
|
|
19974
|
-
function
|
|
20183
|
+
function fa(e) {
|
|
19975
20184
|
return !!(e && "distance" in e);
|
|
19976
20185
|
}
|
|
19977
|
-
function
|
|
20186
|
+
function pa(e) {
|
|
19978
20187
|
return !!(e && "delay" in e);
|
|
19979
20188
|
}
|
|
19980
|
-
var
|
|
20189
|
+
var ma = class {
|
|
19981
20190
|
constructor(e, t, n) {
|
|
19982
|
-
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;
|
|
19983
20192
|
let { event: r } = e, { target: i } = r;
|
|
19984
|
-
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();
|
|
19985
20194
|
}
|
|
19986
20195
|
attach() {
|
|
19987
20196
|
let { events: e, props: { options: { activationConstraint: t, bypassActivationConstraint: n } } } = this;
|
|
19988
|
-
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) {
|
|
19989
20198
|
if (n != null && n({
|
|
19990
20199
|
event: this.props.event,
|
|
19991
20200
|
activeNode: this.props.activeNode,
|
|
19992
20201
|
options: this.props.options
|
|
19993
20202
|
})) return this.handleStart();
|
|
19994
|
-
if (
|
|
20203
|
+
if (pa(t)) {
|
|
19995
20204
|
this.timeoutId = setTimeout(this.handleStart, t.delay), this.handlePending(t);
|
|
19996
20205
|
return;
|
|
19997
20206
|
}
|
|
19998
|
-
if (
|
|
20207
|
+
if (fa(t)) {
|
|
19999
20208
|
this.handlePending(t);
|
|
20000
20209
|
return;
|
|
20001
20210
|
}
|
|
@@ -20011,18 +20220,18 @@ var da = class {
|
|
|
20011
20220
|
}
|
|
20012
20221
|
handleStart() {
|
|
20013
20222
|
let { initialCoordinates: e } = this, { onStart: t } = this.props;
|
|
20014
|
-
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));
|
|
20015
20224
|
}
|
|
20016
20225
|
handleMove(e) {
|
|
20017
20226
|
let { activated: t, initialCoordinates: n, props: r } = this, { onMove: i, options: { activationConstraint: a } } = r;
|
|
20018
20227
|
if (!n) return;
|
|
20019
|
-
let o =
|
|
20228
|
+
let o = ti(e) ?? yi, s = Zr(n, o);
|
|
20020
20229
|
if (!t && a) {
|
|
20021
|
-
if (
|
|
20022
|
-
if (a.tolerance != null &&
|
|
20023
|
-
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();
|
|
20024
20233
|
}
|
|
20025
|
-
if (
|
|
20234
|
+
if (pa(a) && aa(s, a.tolerance)) return this.handleCancel();
|
|
20026
20235
|
this.handlePending(a, s);
|
|
20027
20236
|
return;
|
|
20028
20237
|
}
|
|
@@ -20043,80 +20252,80 @@ var da = class {
|
|
|
20043
20252
|
var e;
|
|
20044
20253
|
(e = this.document.getSelection()) == null || e.removeAllRanges();
|
|
20045
20254
|
}
|
|
20046
|
-
},
|
|
20255
|
+
}, ha = {
|
|
20047
20256
|
cancel: { name: "pointercancel" },
|
|
20048
20257
|
move: { name: "pointermove" },
|
|
20049
20258
|
end: { name: "pointerup" }
|
|
20050
|
-
},
|
|
20259
|
+
}, ga = class extends ma {
|
|
20051
20260
|
constructor(e) {
|
|
20052
|
-
let { event: t } = e, n =
|
|
20053
|
-
super(e,
|
|
20261
|
+
let { event: t } = e, n = zr(t.target);
|
|
20262
|
+
super(e, ha, n);
|
|
20054
20263
|
}
|
|
20055
20264
|
};
|
|
20056
|
-
|
|
20265
|
+
ga.activators = [{
|
|
20057
20266
|
eventName: "onPointerDown",
|
|
20058
20267
|
handler: (e, t) => {
|
|
20059
20268
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
20060
20269
|
return !n.isPrimary || n.button !== 0 ? !1 : (r?.({ event: n }), !0);
|
|
20061
20270
|
}
|
|
20062
20271
|
}];
|
|
20063
|
-
var
|
|
20272
|
+
var _a = {
|
|
20064
20273
|
move: { name: "mousemove" },
|
|
20065
20274
|
end: { name: "mouseup" }
|
|
20066
|
-
},
|
|
20275
|
+
}, va;
|
|
20067
20276
|
(function(e) {
|
|
20068
20277
|
e[e.RightClick = 2] = "RightClick";
|
|
20069
|
-
})(
|
|
20070
|
-
var
|
|
20278
|
+
})(va ||= {});
|
|
20279
|
+
var ya = class extends ma {
|
|
20071
20280
|
constructor(e) {
|
|
20072
|
-
super(e,
|
|
20281
|
+
super(e, _a, zr(e.event.target));
|
|
20073
20282
|
}
|
|
20074
20283
|
};
|
|
20075
|
-
|
|
20284
|
+
ya.activators = [{
|
|
20076
20285
|
eventName: "onMouseDown",
|
|
20077
20286
|
handler: (e, t) => {
|
|
20078
20287
|
let { nativeEvent: n } = e, { onActivation: r } = t;
|
|
20079
|
-
return n.button ===
|
|
20288
|
+
return n.button === va.RightClick ? !1 : (r?.({ event: n }), !0);
|
|
20080
20289
|
}
|
|
20081
20290
|
}];
|
|
20082
|
-
var
|
|
20291
|
+
var ba = {
|
|
20083
20292
|
cancel: { name: "touchcancel" },
|
|
20084
20293
|
move: { name: "touchmove" },
|
|
20085
20294
|
end: { name: "touchend" }
|
|
20086
|
-
},
|
|
20295
|
+
}, xa = class extends ma {
|
|
20087
20296
|
constructor(e) {
|
|
20088
|
-
super(e,
|
|
20297
|
+
super(e, ba);
|
|
20089
20298
|
}
|
|
20090
20299
|
static setup() {
|
|
20091
|
-
return window.addEventListener(
|
|
20300
|
+
return window.addEventListener(ba.move.name, e, {
|
|
20092
20301
|
capture: !1,
|
|
20093
20302
|
passive: !1
|
|
20094
20303
|
}), function() {
|
|
20095
|
-
window.removeEventListener(
|
|
20304
|
+
window.removeEventListener(ba.move.name, e);
|
|
20096
20305
|
};
|
|
20097
20306
|
function e() {}
|
|
20098
20307
|
}
|
|
20099
20308
|
};
|
|
20100
|
-
|
|
20309
|
+
xa.activators = [{
|
|
20101
20310
|
eventName: "onTouchStart",
|
|
20102
20311
|
handler: (e, t) => {
|
|
20103
20312
|
let { nativeEvent: n } = e, { onActivation: r } = t, { touches: i } = n;
|
|
20104
20313
|
return i.length > 1 ? !1 : (r?.({ event: n }), !0);
|
|
20105
20314
|
}
|
|
20106
20315
|
}];
|
|
20107
|
-
var
|
|
20316
|
+
var Sa;
|
|
20108
20317
|
(function(e) {
|
|
20109
20318
|
e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
|
|
20110
|
-
})(
|
|
20111
|
-
var
|
|
20319
|
+
})(Sa ||= {});
|
|
20320
|
+
var Ca;
|
|
20112
20321
|
(function(e) {
|
|
20113
20322
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
20114
|
-
})(
|
|
20115
|
-
function
|
|
20116
|
-
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({
|
|
20117
20326
|
delta: d,
|
|
20118
20327
|
disabled: !a
|
|
20119
|
-
}), [m, h] =
|
|
20328
|
+
}), [m, h] = Hr(), g = (0, S.useRef)({
|
|
20120
20329
|
x: 0,
|
|
20121
20330
|
y: 0
|
|
20122
20331
|
}), _ = (0, S.useRef)({
|
|
@@ -20124,13 +20333,13 @@ function xa(e) {
|
|
|
20124
20333
|
y: 0
|
|
20125
20334
|
}), v = (0, S.useMemo)(() => {
|
|
20126
20335
|
switch (n) {
|
|
20127
|
-
case
|
|
20336
|
+
case Sa.Pointer: return c ? {
|
|
20128
20337
|
top: c.y,
|
|
20129
20338
|
bottom: c.y,
|
|
20130
20339
|
left: c.x,
|
|
20131
20340
|
right: c.x
|
|
20132
20341
|
} : null;
|
|
20133
|
-
case
|
|
20342
|
+
case Sa.DraggableRect: return i;
|
|
20134
20343
|
}
|
|
20135
20344
|
}, [
|
|
20136
20345
|
n,
|
|
@@ -20141,7 +20350,7 @@ function xa(e) {
|
|
|
20141
20350
|
if (!e) return;
|
|
20142
20351
|
let t = g.current.x * _.current.x, n = g.current.y * _.current.y;
|
|
20143
20352
|
e.scrollBy(t, n);
|
|
20144
|
-
}, []), x = (0, S.useMemo)(() => s ===
|
|
20353
|
+
}, []), x = (0, S.useMemo)(() => s === Ca.TreeOrder ? [...l].reverse() : l, [s, l]);
|
|
20145
20354
|
(0, S.useEffect)(() => {
|
|
20146
20355
|
if (!a || !l.length || !v) {
|
|
20147
20356
|
h();
|
|
@@ -20151,7 +20360,7 @@ function xa(e) {
|
|
|
20151
20360
|
if (r?.(e) === !1) continue;
|
|
20152
20361
|
let n = u[l.indexOf(e)];
|
|
20153
20362
|
if (!n) continue;
|
|
20154
|
-
let { direction: i, speed: a } =
|
|
20363
|
+
let { direction: i, speed: a } = Yi(e, n, v, t, f);
|
|
20155
20364
|
for (let e of ["x", "y"]) p[e][i[e]] || (a[e] = 0, i[e] = 0);
|
|
20156
20365
|
if (a.x > 0 || a.y > 0) {
|
|
20157
20366
|
h(), y.current = e, m(b, o), g.current = a, _.current = i;
|
|
@@ -20181,32 +20390,32 @@ function xa(e) {
|
|
|
20181
20390
|
JSON.stringify(f)
|
|
20182
20391
|
]);
|
|
20183
20392
|
}
|
|
20184
|
-
var
|
|
20393
|
+
var Ta = {
|
|
20185
20394
|
x: {
|
|
20186
|
-
[
|
|
20187
|
-
[
|
|
20395
|
+
[Gi.Backward]: !1,
|
|
20396
|
+
[Gi.Forward]: !1
|
|
20188
20397
|
},
|
|
20189
20398
|
y: {
|
|
20190
|
-
[
|
|
20191
|
-
[
|
|
20399
|
+
[Gi.Backward]: !1,
|
|
20400
|
+
[Gi.Forward]: !1
|
|
20192
20401
|
}
|
|
20193
20402
|
};
|
|
20194
|
-
function
|
|
20195
|
-
let { delta: t, disabled: n } = e, r =
|
|
20196
|
-
return
|
|
20197
|
-
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;
|
|
20198
20407
|
let i = {
|
|
20199
20408
|
x: Math.sign(t.x - r.x),
|
|
20200
20409
|
y: Math.sign(t.y - r.y)
|
|
20201
20410
|
};
|
|
20202
20411
|
return {
|
|
20203
20412
|
x: {
|
|
20204
|
-
[
|
|
20205
|
-
[
|
|
20413
|
+
[Gi.Backward]: e.x[Gi.Backward] || i.x === -1,
|
|
20414
|
+
[Gi.Forward]: e.x[Gi.Forward] || i.x === 1
|
|
20206
20415
|
},
|
|
20207
20416
|
y: {
|
|
20208
|
-
[
|
|
20209
|
-
[
|
|
20417
|
+
[Gi.Backward]: e.y[Gi.Backward] || i.y === -1,
|
|
20418
|
+
[Gi.Forward]: e.y[Gi.Forward] || i.y === 1
|
|
20210
20419
|
}
|
|
20211
20420
|
};
|
|
20212
20421
|
}, [
|
|
@@ -20215,11 +20424,11 @@ function Ca(e) {
|
|
|
20215
20424
|
r
|
|
20216
20425
|
]);
|
|
20217
20426
|
}
|
|
20218
|
-
function
|
|
20427
|
+
function Da(e, t) {
|
|
20219
20428
|
let n = t == null ? void 0 : e.get(t), r = n ? n.node.current : null;
|
|
20220
|
-
return
|
|
20429
|
+
return Wr((e) => t == null ? null : r ?? e ?? null, [r, t]);
|
|
20221
20430
|
}
|
|
20222
|
-
function
|
|
20431
|
+
function Oa(e, t) {
|
|
20223
20432
|
return (0, S.useMemo)(() => e.reduce((e, n) => {
|
|
20224
20433
|
let { sensor: r } = n, i = r.activators.map((e) => ({
|
|
20225
20434
|
eventName: e.eventName,
|
|
@@ -20228,21 +20437,21 @@ function Ta(e, t) {
|
|
|
20228
20437
|
return [...e, ...i];
|
|
20229
20438
|
}, []), [e, t]);
|
|
20230
20439
|
}
|
|
20231
|
-
var
|
|
20440
|
+
var ka;
|
|
20232
20441
|
(function(e) {
|
|
20233
20442
|
e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
|
|
20234
|
-
})(
|
|
20235
|
-
var
|
|
20443
|
+
})(ka ||= {});
|
|
20444
|
+
var Aa;
|
|
20236
20445
|
(function(e) {
|
|
20237
20446
|
e.Optimized = "optimized";
|
|
20238
|
-
})(
|
|
20239
|
-
var
|
|
20240
|
-
function
|
|
20241
|
-
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) {
|
|
20242
20451
|
e === void 0 && (e = []), !f.current && o((t) => t === null ? e : t.concat(e.filter((e) => !t.includes(e))));
|
|
20243
|
-
}, [f]), m = (0, S.useRef)(null), h =
|
|
20244
|
-
if (d && !n) return
|
|
20245
|
-
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) {
|
|
20246
20455
|
let t = /* @__PURE__ */ new Map();
|
|
20247
20456
|
for (let n of e) {
|
|
20248
20457
|
if (!n) continue;
|
|
@@ -20250,7 +20459,7 @@ function ka(e, t) {
|
|
|
20250
20459
|
t.set(n.id, n.rect.current);
|
|
20251
20460
|
continue;
|
|
20252
20461
|
}
|
|
20253
|
-
let e = n.node.current, r = e ? new
|
|
20462
|
+
let e = n.node.current, r = e ? new na(c(e), e) : null;
|
|
20254
20463
|
n.rect.current = r, r && t.set(n.id, r);
|
|
20255
20464
|
}
|
|
20256
20465
|
return t;
|
|
@@ -20285,39 +20494,39 @@ function ka(e, t) {
|
|
|
20285
20494
|
};
|
|
20286
20495
|
function g() {
|
|
20287
20496
|
switch (l) {
|
|
20288
|
-
case
|
|
20289
|
-
case
|
|
20497
|
+
case ka.Always: return !1;
|
|
20498
|
+
case ka.BeforeDragging: return n;
|
|
20290
20499
|
default: return !n;
|
|
20291
20500
|
}
|
|
20292
20501
|
}
|
|
20293
20502
|
}
|
|
20294
|
-
function
|
|
20295
|
-
return
|
|
20503
|
+
function Na(e, t) {
|
|
20504
|
+
return Wr((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
20296
20505
|
}
|
|
20297
|
-
function
|
|
20298
|
-
return
|
|
20506
|
+
function Pa(e, t) {
|
|
20507
|
+
return Na(e, t);
|
|
20299
20508
|
}
|
|
20300
|
-
function
|
|
20301
|
-
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)(() => {
|
|
20302
20511
|
if (n || typeof window > "u" || window.MutationObserver === void 0) return;
|
|
20303
20512
|
let { MutationObserver: e } = window;
|
|
20304
20513
|
return new e(r);
|
|
20305
20514
|
}, [r, n]);
|
|
20306
20515
|
return (0, S.useEffect)(() => () => i?.disconnect(), [i]), i;
|
|
20307
20516
|
}
|
|
20308
|
-
function
|
|
20309
|
-
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)(() => {
|
|
20310
20519
|
if (n || typeof window > "u" || window.ResizeObserver === void 0) return;
|
|
20311
20520
|
let { ResizeObserver: e } = window;
|
|
20312
20521
|
return new e(r);
|
|
20313
20522
|
}, [n]);
|
|
20314
20523
|
return (0, S.useEffect)(() => () => i?.disconnect(), [i]), i;
|
|
20315
20524
|
}
|
|
20316
|
-
function
|
|
20317
|
-
return new
|
|
20525
|
+
function La(e) {
|
|
20526
|
+
return new na(Pi(e), e);
|
|
20318
20527
|
}
|
|
20319
|
-
function
|
|
20320
|
-
t === void 0 && (t =
|
|
20528
|
+
function Ra(e, t, n) {
|
|
20529
|
+
t === void 0 && (t = La);
|
|
20321
20530
|
let [r, i] = (0, S.useState)(null);
|
|
20322
20531
|
function a() {
|
|
20323
20532
|
i((r) => {
|
|
@@ -20327,7 +20536,7 @@ function Fa(e, t, n) {
|
|
|
20327
20536
|
return JSON.stringify(r) === JSON.stringify(i) ? r : i;
|
|
20328
20537
|
});
|
|
20329
20538
|
}
|
|
20330
|
-
let o =
|
|
20539
|
+
let o = Fa({ callback(t) {
|
|
20331
20540
|
if (e) for (let n of t) {
|
|
20332
20541
|
let { type: t, target: r } = n;
|
|
20333
20542
|
if (t === "childList" && r instanceof HTMLElement && r.contains(e)) {
|
|
@@ -20335,36 +20544,36 @@ function Fa(e, t, n) {
|
|
|
20335
20544
|
break;
|
|
20336
20545
|
}
|
|
20337
20546
|
}
|
|
20338
|
-
} }), s =
|
|
20339
|
-
return
|
|
20547
|
+
} }), s = Ia({ callback: a });
|
|
20548
|
+
return Br(() => {
|
|
20340
20549
|
a(), e ? (s?.observe(e), o?.observe(document.body, {
|
|
20341
20550
|
childList: !0,
|
|
20342
20551
|
subtree: !0
|
|
20343
20552
|
})) : (s?.disconnect(), o?.disconnect());
|
|
20344
20553
|
}, [e]), r;
|
|
20345
20554
|
}
|
|
20346
|
-
function
|
|
20347
|
-
return
|
|
20555
|
+
function za(e) {
|
|
20556
|
+
return Ai(e, Na(e));
|
|
20348
20557
|
}
|
|
20349
|
-
var
|
|
20350
|
-
function
|
|
20351
|
-
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]);
|
|
20352
20561
|
return (0, S.useEffect)(() => {
|
|
20353
20562
|
t.current = e;
|
|
20354
20563
|
}, [e]), n;
|
|
20355
20564
|
}
|
|
20356
|
-
function
|
|
20565
|
+
function Ha(e) {
|
|
20357
20566
|
let [t, n] = (0, S.useState)(null), r = (0, S.useRef)(e), i = (0, S.useCallback)((e) => {
|
|
20358
|
-
let t =
|
|
20359
|
-
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);
|
|
20360
20569
|
}, []);
|
|
20361
20570
|
return (0, S.useEffect)(() => {
|
|
20362
20571
|
let t = r.current;
|
|
20363
20572
|
if (e !== t) {
|
|
20364
20573
|
a(t);
|
|
20365
20574
|
let o = e.map((e) => {
|
|
20366
|
-
let t =
|
|
20367
|
-
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;
|
|
20368
20577
|
}).filter((e) => e != null);
|
|
20369
20578
|
n(o.length ? new Map(o) : null), r.current = e;
|
|
20370
20579
|
}
|
|
@@ -20373,24 +20582,24 @@ function za(e) {
|
|
|
20373
20582
|
};
|
|
20374
20583
|
function a(e) {
|
|
20375
20584
|
e.forEach((e) => {
|
|
20376
|
-
|
|
20585
|
+
Vi(e)?.removeEventListener("scroll", i);
|
|
20377
20586
|
});
|
|
20378
20587
|
}
|
|
20379
|
-
}, [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]);
|
|
20380
20589
|
}
|
|
20381
|
-
function
|
|
20590
|
+
function Ua(e, t) {
|
|
20382
20591
|
t === void 0 && (t = []);
|
|
20383
20592
|
let n = (0, S.useRef)(null);
|
|
20384
20593
|
return (0, S.useEffect)(() => {
|
|
20385
20594
|
n.current = null;
|
|
20386
20595
|
}, t), (0, S.useEffect)(() => {
|
|
20387
|
-
let t = e !==
|
|
20596
|
+
let t = e !== yi;
|
|
20388
20597
|
t && !n.current && (n.current = e), !t && n.current && (n.current = null);
|
|
20389
|
-
}, [e]), n.current ?
|
|
20598
|
+
}, [e]), n.current ? Zr(e, n.current) : yi;
|
|
20390
20599
|
}
|
|
20391
|
-
function
|
|
20600
|
+
function Wa(e) {
|
|
20392
20601
|
(0, S.useEffect)(() => {
|
|
20393
|
-
if (!
|
|
20602
|
+
if (!Mr) return;
|
|
20394
20603
|
let t = e.map((e) => {
|
|
20395
20604
|
let { sensor: t } = e;
|
|
20396
20605
|
return t.setup == null ? void 0 : t.setup();
|
|
@@ -20403,7 +20612,7 @@ function Va(e) {
|
|
|
20403
20612
|
return t;
|
|
20404
20613
|
}));
|
|
20405
20614
|
}
|
|
20406
|
-
function
|
|
20615
|
+
function Ga(e, t) {
|
|
20407
20616
|
return (0, S.useMemo)(() => e.reduce((e, n) => {
|
|
20408
20617
|
let { eventName: r, handler: i } = n;
|
|
20409
20618
|
return e[r] = (e) => {
|
|
@@ -20411,30 +20620,30 @@ function Ha(e, t) {
|
|
|
20411
20620
|
}, e;
|
|
20412
20621
|
}, {}), [e, t]);
|
|
20413
20622
|
}
|
|
20414
|
-
function
|
|
20415
|
-
return (0, S.useMemo)(() => e ?
|
|
20623
|
+
function Ka(e) {
|
|
20624
|
+
return (0, S.useMemo)(() => e ? Ii(e) : null, [e]);
|
|
20416
20625
|
}
|
|
20417
|
-
var
|
|
20418
|
-
function
|
|
20419
|
-
t === void 0 && (t =
|
|
20420
|
-
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);
|
|
20421
20630
|
function o() {
|
|
20422
|
-
a(() => e.length ? e.map((e) =>
|
|
20631
|
+
a(() => e.length ? e.map((e) => Ki(e) ? r : new na(t(e), e)) : qa);
|
|
20423
20632
|
}
|
|
20424
|
-
let s =
|
|
20425
|
-
return
|
|
20633
|
+
let s = Ia({ callback: o });
|
|
20634
|
+
return Br(() => {
|
|
20426
20635
|
s?.disconnect(), o(), e.forEach((e) => s?.observe(e));
|
|
20427
20636
|
}, [e]), i;
|
|
20428
20637
|
}
|
|
20429
|
-
function
|
|
20638
|
+
function Ya(e) {
|
|
20430
20639
|
if (!e) return null;
|
|
20431
20640
|
if (e.children.length > 1) return e;
|
|
20432
20641
|
let t = e.children[0];
|
|
20433
|
-
return
|
|
20642
|
+
return Lr(t) ? t : e;
|
|
20434
20643
|
}
|
|
20435
|
-
function
|
|
20436
|
-
let { measure: t } = e, [n, r] = (0, S.useState)(null), i =
|
|
20437
|
-
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)) {
|
|
20438
20647
|
r((e) => {
|
|
20439
20648
|
let r = t(n);
|
|
20440
20649
|
return e ? {
|
|
@@ -20445,8 +20654,8 @@ function qa(e) {
|
|
|
20445
20654
|
});
|
|
20446
20655
|
break;
|
|
20447
20656
|
}
|
|
20448
|
-
}, [t]) }), [a, o] =
|
|
20449
|
-
let n =
|
|
20657
|
+
}, [t]) }), [a, o] = Gr((0, S.useCallback)((e) => {
|
|
20658
|
+
let n = Ya(e);
|
|
20450
20659
|
i?.disconnect(), n && i?.observe(n), r(n ? t(n) : null);
|
|
20451
20660
|
}, [t, i]));
|
|
20452
20661
|
return (0, S.useMemo)(() => ({
|
|
@@ -20459,21 +20668,21 @@ function qa(e) {
|
|
|
20459
20668
|
o
|
|
20460
20669
|
]);
|
|
20461
20670
|
}
|
|
20462
|
-
var
|
|
20463
|
-
sensor:
|
|
20671
|
+
var Za = [{
|
|
20672
|
+
sensor: ga,
|
|
20464
20673
|
options: {}
|
|
20465
20674
|
}, {
|
|
20466
|
-
sensor:
|
|
20675
|
+
sensor: da,
|
|
20467
20676
|
options: {}
|
|
20468
|
-
}],
|
|
20469
|
-
draggable: { measure:
|
|
20677
|
+
}], Qa = { current: {} }, $a = {
|
|
20678
|
+
draggable: { measure: Fi },
|
|
20470
20679
|
droppable: {
|
|
20471
|
-
measure:
|
|
20472
|
-
strategy:
|
|
20473
|
-
frequency:
|
|
20680
|
+
measure: Fi,
|
|
20681
|
+
strategy: ka.WhileDragging,
|
|
20682
|
+
frequency: Aa.Optimized
|
|
20474
20683
|
},
|
|
20475
|
-
dragOverlay: { measure:
|
|
20476
|
-
},
|
|
20684
|
+
dragOverlay: { measure: Pi }
|
|
20685
|
+
}, eo = class extends Map {
|
|
20477
20686
|
get(e) {
|
|
20478
20687
|
return e == null ? void 0 : super.get(e) ?? void 0;
|
|
20479
20688
|
}
|
|
@@ -20489,7 +20698,7 @@ var Ja = [{
|
|
|
20489
20698
|
getNodeFor(e) {
|
|
20490
20699
|
return this.get(e)?.node.current ?? void 0;
|
|
20491
20700
|
}
|
|
20492
|
-
},
|
|
20701
|
+
}, to = {
|
|
20493
20702
|
activatorEvent: null,
|
|
20494
20703
|
active: null,
|
|
20495
20704
|
activeNode: null,
|
|
@@ -20498,31 +20707,31 @@ var Ja = [{
|
|
|
20498
20707
|
containerNodeRect: null,
|
|
20499
20708
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
20500
20709
|
droppableRects: /* @__PURE__ */ new Map(),
|
|
20501
|
-
droppableContainers: /* @__PURE__ */ new
|
|
20710
|
+
droppableContainers: /* @__PURE__ */ new eo(),
|
|
20502
20711
|
over: null,
|
|
20503
20712
|
dragOverlay: {
|
|
20504
20713
|
nodeRef: { current: null },
|
|
20505
20714
|
rect: null,
|
|
20506
|
-
setRef:
|
|
20715
|
+
setRef: gi
|
|
20507
20716
|
},
|
|
20508
20717
|
scrollableAncestors: [],
|
|
20509
20718
|
scrollableAncestorRects: [],
|
|
20510
|
-
measuringConfiguration:
|
|
20511
|
-
measureDroppableContainers:
|
|
20719
|
+
measuringConfiguration: $a,
|
|
20720
|
+
measureDroppableContainers: gi,
|
|
20512
20721
|
windowRect: null,
|
|
20513
20722
|
measuringScheduled: !1
|
|
20514
|
-
},
|
|
20723
|
+
}, no = {
|
|
20515
20724
|
activatorEvent: null,
|
|
20516
20725
|
activators: [],
|
|
20517
20726
|
active: null,
|
|
20518
20727
|
activeNodeRect: null,
|
|
20519
20728
|
ariaDescribedById: { draggable: "" },
|
|
20520
|
-
dispatch:
|
|
20729
|
+
dispatch: gi,
|
|
20521
20730
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
20522
20731
|
over: null,
|
|
20523
|
-
measureDroppableContainers:
|
|
20524
|
-
},
|
|
20525
|
-
function
|
|
20732
|
+
measureDroppableContainers: gi
|
|
20733
|
+
}, ro = /* @__PURE__ */ (0, S.createContext)(no), io = /* @__PURE__ */ (0, S.createContext)(to);
|
|
20734
|
+
function ao() {
|
|
20526
20735
|
return {
|
|
20527
20736
|
draggable: {
|
|
20528
20737
|
active: null,
|
|
@@ -20536,12 +20745,12 @@ function no() {
|
|
|
20536
20745
|
y: 0
|
|
20537
20746
|
}
|
|
20538
20747
|
},
|
|
20539
|
-
droppable: { containers: new
|
|
20748
|
+
droppable: { containers: new eo() }
|
|
20540
20749
|
};
|
|
20541
20750
|
}
|
|
20542
|
-
function
|
|
20751
|
+
function oo(e, t) {
|
|
20543
20752
|
switch (t.type) {
|
|
20544
|
-
case
|
|
20753
|
+
case hi.DragStart: return {
|
|
20545
20754
|
...e,
|
|
20546
20755
|
draggable: {
|
|
20547
20756
|
...e.draggable,
|
|
@@ -20549,7 +20758,7 @@ function ro(e, t) {
|
|
|
20549
20758
|
active: t.active
|
|
20550
20759
|
}
|
|
20551
20760
|
};
|
|
20552
|
-
case
|
|
20761
|
+
case hi.DragMove: return e.draggable.active == null ? e : {
|
|
20553
20762
|
...e,
|
|
20554
20763
|
draggable: {
|
|
20555
20764
|
...e.draggable,
|
|
@@ -20559,8 +20768,8 @@ function ro(e, t) {
|
|
|
20559
20768
|
}
|
|
20560
20769
|
}
|
|
20561
20770
|
};
|
|
20562
|
-
case
|
|
20563
|
-
case
|
|
20771
|
+
case hi.DragEnd:
|
|
20772
|
+
case hi.DragCancel: return {
|
|
20564
20773
|
...e,
|
|
20565
20774
|
draggable: {
|
|
20566
20775
|
...e.draggable,
|
|
@@ -20575,8 +20784,8 @@ function ro(e, t) {
|
|
|
20575
20784
|
}
|
|
20576
20785
|
}
|
|
20577
20786
|
};
|
|
20578
|
-
case
|
|
20579
|
-
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);
|
|
20580
20789
|
return i.set(r, n), {
|
|
20581
20790
|
...e,
|
|
20582
20791
|
droppable: {
|
|
@@ -20585,10 +20794,10 @@ function ro(e, t) {
|
|
|
20585
20794
|
}
|
|
20586
20795
|
};
|
|
20587
20796
|
}
|
|
20588
|
-
case
|
|
20797
|
+
case hi.SetDroppableDisabled: {
|
|
20589
20798
|
let { id: n, key: r, disabled: i } = t, a = e.droppable.containers.get(n);
|
|
20590
20799
|
if (!a || r !== a.key) return e;
|
|
20591
|
-
let o = new
|
|
20800
|
+
let o = new eo(e.droppable.containers);
|
|
20592
20801
|
return o.set(n, {
|
|
20593
20802
|
...a,
|
|
20594
20803
|
disabled: i
|
|
@@ -20600,10 +20809,10 @@ function ro(e, t) {
|
|
|
20600
20809
|
}
|
|
20601
20810
|
};
|
|
20602
20811
|
}
|
|
20603
|
-
case
|
|
20812
|
+
case hi.UnregisterDroppable: {
|
|
20604
20813
|
let { id: n, key: r } = t, i = e.droppable.containers.get(n);
|
|
20605
20814
|
if (!i || r !== i.key) return e;
|
|
20606
|
-
let a = new
|
|
20815
|
+
let a = new eo(e.droppable.containers);
|
|
20607
20816
|
return a.delete(n), {
|
|
20608
20817
|
...e,
|
|
20609
20818
|
droppable: {
|
|
@@ -20615,11 +20824,11 @@ function ro(e, t) {
|
|
|
20615
20824
|
default: return e;
|
|
20616
20825
|
}
|
|
20617
20826
|
}
|
|
20618
|
-
function
|
|
20619
|
-
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);
|
|
20620
20829
|
return (0, S.useEffect)(() => {
|
|
20621
20830
|
if (!t && !r && a && o != null) {
|
|
20622
|
-
if (
|
|
20831
|
+
if (!$r(a) || document.activeElement === a.target) return;
|
|
20623
20832
|
let e = i.get(o);
|
|
20624
20833
|
if (!e) return;
|
|
20625
20834
|
let { activatorNode: t, node: n } = e;
|
|
@@ -20627,7 +20836,7 @@ function io(e) {
|
|
|
20627
20836
|
requestAnimationFrame(() => {
|
|
20628
20837
|
for (let e of [t.current, n.current]) {
|
|
20629
20838
|
if (!e) continue;
|
|
20630
|
-
let t =
|
|
20839
|
+
let t = ii(e);
|
|
20631
20840
|
if (t) {
|
|
20632
20841
|
t.focus();
|
|
20633
20842
|
break;
|
|
@@ -20643,25 +20852,25 @@ function io(e) {
|
|
|
20643
20852
|
a
|
|
20644
20853
|
]), null;
|
|
20645
20854
|
}
|
|
20646
|
-
function
|
|
20855
|
+
function co(e, t) {
|
|
20647
20856
|
let { transform: n, ...r } = t;
|
|
20648
20857
|
return e != null && e.length ? e.reduce((e, t) => t({
|
|
20649
20858
|
transform: e,
|
|
20650
20859
|
...r
|
|
20651
20860
|
}), n) : n;
|
|
20652
20861
|
}
|
|
20653
|
-
function
|
|
20862
|
+
function W(e) {
|
|
20654
20863
|
return (0, S.useMemo)(() => ({
|
|
20655
20864
|
draggable: {
|
|
20656
|
-
|
|
20865
|
+
...$a.draggable,
|
|
20657
20866
|
...e?.draggable
|
|
20658
20867
|
},
|
|
20659
20868
|
droppable: {
|
|
20660
|
-
|
|
20869
|
+
...$a.droppable,
|
|
20661
20870
|
...e?.droppable
|
|
20662
20871
|
},
|
|
20663
20872
|
dragOverlay: {
|
|
20664
|
-
|
|
20873
|
+
...$a.dragOverlay,
|
|
20665
20874
|
...e?.dragOverlay
|
|
20666
20875
|
}
|
|
20667
20876
|
}), [
|
|
@@ -20670,12 +20879,12 @@ function oo(e) {
|
|
|
20670
20879
|
e?.dragOverlay
|
|
20671
20880
|
]);
|
|
20672
20881
|
}
|
|
20673
|
-
function
|
|
20882
|
+
function G(e) {
|
|
20674
20883
|
let { activeNode: t, measure: n, initialRect: r, config: i = !0 } = e, a = (0, S.useRef)(!1), { x: o, y: s } = typeof i == "boolean" ? {
|
|
20675
20884
|
x: i,
|
|
20676
20885
|
y: i
|
|
20677
20886
|
} : i;
|
|
20678
|
-
|
|
20887
|
+
Br(() => {
|
|
20679
20888
|
if (!o && !s || !t) {
|
|
20680
20889
|
a.current = !1;
|
|
20681
20890
|
return;
|
|
@@ -20683,9 +20892,9 @@ function so(e) {
|
|
|
20683
20892
|
if (a.current || !r) return;
|
|
20684
20893
|
let e = t?.node.current;
|
|
20685
20894
|
if (!e || e.isConnected === !1) return;
|
|
20686
|
-
let i =
|
|
20895
|
+
let i = Ai(n(e), r);
|
|
20687
20896
|
if (o || (i.x = 0), s || (i.y = 0), a.current = !0, Math.abs(i.x) > 0 || Math.abs(i.y) > 0) {
|
|
20688
|
-
let t =
|
|
20897
|
+
let t = Bi(e);
|
|
20689
20898
|
t && t.scrollBy({
|
|
20690
20899
|
top: i.y,
|
|
20691
20900
|
left: i.x
|
|
@@ -20699,34 +20908,34 @@ function so(e) {
|
|
|
20699
20908
|
n
|
|
20700
20909
|
]);
|
|
20701
20910
|
}
|
|
20702
|
-
var
|
|
20703
|
-
...
|
|
20911
|
+
var lo = /* @__PURE__ */ (0, S.createContext)({
|
|
20912
|
+
...yi,
|
|
20704
20913
|
scaleX: 1,
|
|
20705
20914
|
scaleY: 1
|
|
20706
|
-
}),
|
|
20915
|
+
}), uo;
|
|
20707
20916
|
(function(e) {
|
|
20708
20917
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
20709
|
-
})(
|
|
20710
|
-
var
|
|
20711
|
-
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)({
|
|
20712
20921
|
initial: null,
|
|
20713
20922
|
translated: null
|
|
20714
20923
|
}), w = (0, S.useMemo)(() => _ == null ? null : {
|
|
20715
20924
|
id: _,
|
|
20716
|
-
data: x?.data ??
|
|
20925
|
+
data: x?.data ?? Qa,
|
|
20717
20926
|
rect: C
|
|
20718
|
-
}, [_, 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, {
|
|
20719
20928
|
dragging: g,
|
|
20720
20929
|
dependencies: [y.x, y.y],
|
|
20721
20930
|
config: ae.droppable
|
|
20722
|
-
}), k =
|
|
20723
|
-
|
|
20931
|
+
}), k = Da(v, _), ce = (0, S.useMemo)(() => E ? ti(E) : null, [E]), le = Ne(), A = Pa(k, ae.draggable.measure);
|
|
20932
|
+
G({
|
|
20724
20933
|
activeNode: _ == null ? null : v.get(_),
|
|
20725
20934
|
config: le.layoutShiftCompensation,
|
|
20726
20935
|
initialRect: A,
|
|
20727
20936
|
measure: ae.draggable.measure
|
|
20728
20937
|
});
|
|
20729
|
-
let ue =
|
|
20938
|
+
let ue = Ra(k, ae.draggable.measure, A), j = Ra(k ? k.parentElement : null), M = (0, S.useRef)({
|
|
20730
20939
|
activatorEvent: null,
|
|
20731
20940
|
active: null,
|
|
20732
20941
|
activeNode: k,
|
|
@@ -20740,7 +20949,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20740
20949
|
over: null,
|
|
20741
20950
|
scrollableAncestors: [],
|
|
20742
20951
|
scrollAdjustedTranslate: null
|
|
20743
|
-
}), 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, {
|
|
20744
20953
|
transform: {
|
|
20745
20954
|
x: y.x - he.x,
|
|
20746
20955
|
y: y.y - he.y,
|
|
@@ -20757,13 +20966,13 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20757
20966
|
scrollableAncestors: _e,
|
|
20758
20967
|
scrollableAncestorRects: ve,
|
|
20759
20968
|
windowRect: ge
|
|
20760
|
-
}), 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({
|
|
20761
20970
|
active: w,
|
|
20762
20971
|
collisionRect: we,
|
|
20763
20972
|
droppableRects: oe,
|
|
20764
20973
|
droppableContainers: ie,
|
|
20765
20974
|
pointerCoordinates: P
|
|
20766
|
-
}) : 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) => {
|
|
20767
20976
|
let { sensor: n, options: r } = t;
|
|
20768
20977
|
if (T.current == null) return;
|
|
20769
20978
|
let i = v.get(T.current);
|
|
@@ -20810,8 +21019,8 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20810
21019
|
}
|
|
20811
21020
|
};
|
|
20812
21021
|
(0, An.unstable_batchedUpdates)(() => {
|
|
20813
|
-
r?.(i), h(
|
|
20814
|
-
type:
|
|
21022
|
+
r?.(i), h(uo.Initializing), d({
|
|
21023
|
+
type: hi.DragStart,
|
|
20815
21024
|
initialCoordinates: e,
|
|
20816
21025
|
active: t
|
|
20817
21026
|
}), f({
|
|
@@ -20822,12 +21031,12 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20822
21031
|
},
|
|
20823
21032
|
onMove(e) {
|
|
20824
21033
|
d({
|
|
20825
|
-
type:
|
|
21034
|
+
type: hi.DragMove,
|
|
20826
21035
|
coordinates: e
|
|
20827
21036
|
});
|
|
20828
21037
|
},
|
|
20829
|
-
onEnd: o(
|
|
20830
|
-
onCancel: o(
|
|
21038
|
+
onEnd: o(hi.DragEnd),
|
|
21039
|
+
onCancel: o(hi.DragCancel)
|
|
20831
21040
|
});
|
|
20832
21041
|
function o(e) {
|
|
20833
21042
|
return async function() {
|
|
@@ -20840,11 +21049,11 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20840
21049
|
collisions: n,
|
|
20841
21050
|
delta: i,
|
|
20842
21051
|
over: r
|
|
20843
|
-
}, e ===
|
|
21052
|
+
}, e === hi.DragEnd && typeof s == "function" && await Promise.resolve(s(o)) && (e = hi.DragCancel);
|
|
20844
21053
|
}
|
|
20845
21054
|
T.current = null, (0, An.unstable_batchedUpdates)(() => {
|
|
20846
|
-
d({ type: e }), h(
|
|
20847
|
-
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";
|
|
20848
21057
|
if (o) {
|
|
20849
21058
|
let e = ne.current[t];
|
|
20850
21059
|
e?.(o), f({
|
|
@@ -20855,14 +21064,14 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20855
21064
|
});
|
|
20856
21065
|
};
|
|
20857
21066
|
}
|
|
20858
|
-
}, [v]), Ae =
|
|
21067
|
+
}, [v]), Ae = Oa(a, (0, S.useCallback)((e, t) => (n, r) => {
|
|
20859
21068
|
let i = n.nativeEvent, a = v.get(r);
|
|
20860
21069
|
if (T.current !== null || !a || i.dndKit || i.defaultPrevented) return;
|
|
20861
21070
|
let o = { active: a };
|
|
20862
21071
|
e(n, t.options, o) === !0 && (i.dndKit = { capturedBy: t.sensor }, T.current = r, ke(n, t));
|
|
20863
21072
|
}, [v, ke]));
|
|
20864
|
-
|
|
20865
|
-
ue && m ===
|
|
21073
|
+
Wa(a), Br(() => {
|
|
21074
|
+
ue && m === uo.Initializing && h(uo.Initialized);
|
|
20866
21075
|
}, [ue, m]), (0, S.useEffect)(() => {
|
|
20867
21076
|
let { onDragMove: e } = ne.current, { active: t, activatorEvent: n, collisions: r, over: i } = M.current;
|
|
20868
21077
|
if (!t || !n) return;
|
|
@@ -20906,7 +21115,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20906
21115
|
event: c
|
|
20907
21116
|
});
|
|
20908
21117
|
});
|
|
20909
|
-
}, [Ee]),
|
|
21118
|
+
}, [Ee]), Br(() => {
|
|
20910
21119
|
M.current = {
|
|
20911
21120
|
activatorEvent: E,
|
|
20912
21121
|
active: w,
|
|
@@ -20938,7 +21147,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
20938
21147
|
De,
|
|
20939
21148
|
_e,
|
|
20940
21149
|
Ce
|
|
20941
|
-
]),
|
|
21150
|
+
]), wa({
|
|
20942
21151
|
...le,
|
|
20943
21152
|
delta: y,
|
|
20944
21153
|
draggingRect: we,
|
|
@@ -21003,7 +21212,7 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
21003
21212
|
De,
|
|
21004
21213
|
se
|
|
21005
21214
|
]);
|
|
21006
|
-
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, {
|
|
21007
21216
|
...n,
|
|
21008
21217
|
hiddenTextDescribedById: re
|
|
21009
21218
|
}));
|
|
@@ -21014,10 +21223,10 @@ var G = /* @__PURE__ */ (0, S.memo)(function(e) {
|
|
|
21014
21223
|
enabled: n
|
|
21015
21224
|
} : { enabled: n };
|
|
21016
21225
|
}
|
|
21017
|
-
}),
|
|
21018
|
-
function
|
|
21019
|
-
let { id: t, data: n, disabled: r = !1, attributes: i } = e, a =
|
|
21020
|
-
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, {
|
|
21021
21230
|
id: t,
|
|
21022
21231
|
key: a,
|
|
21023
21232
|
node: v,
|
|
@@ -21034,7 +21243,7 @@ function po(e) {
|
|
|
21034
21243
|
role: p,
|
|
21035
21244
|
tabIndex: h,
|
|
21036
21245
|
"aria-disabled": r,
|
|
21037
|
-
"aria-pressed": g && p ===
|
|
21246
|
+
"aria-pressed": g && p === mo ? !0 : void 0,
|
|
21038
21247
|
"aria-roledescription": m,
|
|
21039
21248
|
"aria-describedby": u.draggable
|
|
21040
21249
|
}), [
|
|
@@ -21054,15 +21263,15 @@ function po(e) {
|
|
|
21054
21263
|
transform: _
|
|
21055
21264
|
};
|
|
21056
21265
|
}
|
|
21057
|
-
function
|
|
21058
|
-
return (0, S.useContext)(
|
|
21266
|
+
function _o() {
|
|
21267
|
+
return (0, S.useContext)(io);
|
|
21059
21268
|
}
|
|
21060
|
-
var
|
|
21061
|
-
function
|
|
21062
|
-
let { data: t, disabled: n = !1, id: r, resizeObserverConfig: i } = e, a =
|
|
21063
|
-
...
|
|
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,
|
|
21064
21273
|
...i
|
|
21065
|
-
}, _ =
|
|
21274
|
+
}, _ = Ur(h ?? r), v = Ia({
|
|
21066
21275
|
callback: (0, S.useCallback)(() => {
|
|
21067
21276
|
if (!d.current) {
|
|
21068
21277
|
d.current = !0;
|
|
@@ -21073,13 +21282,13 @@ function _o(e) {
|
|
|
21073
21282
|
}, g);
|
|
21074
21283
|
}, [g]),
|
|
21075
21284
|
disabled: m || !o
|
|
21076
|
-
}), [y, b] =
|
|
21285
|
+
}), [y, b] = Gr((0, S.useCallback)((e, t) => {
|
|
21077
21286
|
v && (t && (v.unobserve(t), d.current = !1), e && v.observe(e));
|
|
21078
|
-
}, [v])), x =
|
|
21287
|
+
}, [v])), x = Ur(t);
|
|
21079
21288
|
return (0, S.useEffect)(() => {
|
|
21080
21289
|
!v || !y.current || (v.disconnect(), d.current = !1, v.observe(y.current));
|
|
21081
21290
|
}, [y, v]), (0, S.useEffect)(() => (s({
|
|
21082
|
-
type:
|
|
21291
|
+
type: hi.RegisterDroppable,
|
|
21083
21292
|
element: {
|
|
21084
21293
|
id: r,
|
|
21085
21294
|
key: a,
|
|
@@ -21089,12 +21298,12 @@ function _o(e) {
|
|
|
21089
21298
|
data: x
|
|
21090
21299
|
}
|
|
21091
21300
|
}), () => s({
|
|
21092
|
-
type:
|
|
21301
|
+
type: hi.UnregisterDroppable,
|
|
21093
21302
|
key: a,
|
|
21094
21303
|
id: r
|
|
21095
21304
|
})), [r]), (0, S.useEffect)(() => {
|
|
21096
21305
|
n !== u.current.disabled && (s({
|
|
21097
|
-
type:
|
|
21306
|
+
type: hi.SetDroppableDisabled,
|
|
21098
21307
|
id: r,
|
|
21099
21308
|
key: a,
|
|
21100
21309
|
disabled: n
|
|
@@ -21113,9 +21322,9 @@ function _o(e) {
|
|
|
21113
21322
|
setNodeRef: b
|
|
21114
21323
|
};
|
|
21115
21324
|
}
|
|
21116
|
-
function
|
|
21117
|
-
let { animation: t, children: n } = e, [r, i] = (0, S.useState)(null), [a, o] = (0, S.useState)(null), s =
|
|
21118
|
-
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(() => {
|
|
21119
21328
|
if (!a) return;
|
|
21120
21329
|
let e = r?.key, n = r?.props.id;
|
|
21121
21330
|
if (e == null || n == null) {
|
|
@@ -21131,34 +21340,34 @@ function vo(e) {
|
|
|
21131
21340
|
a
|
|
21132
21341
|
]), S.createElement(S.Fragment, null, n, r ? (0, S.cloneElement)(r, { ref: o }) : null);
|
|
21133
21342
|
}
|
|
21134
|
-
var
|
|
21343
|
+
var So = {
|
|
21135
21344
|
x: 0,
|
|
21136
21345
|
y: 0,
|
|
21137
21346
|
scaleX: 1,
|
|
21138
21347
|
scaleY: 1
|
|
21139
21348
|
};
|
|
21140
|
-
function
|
|
21349
|
+
function Co(e) {
|
|
21141
21350
|
let { children: t } = e;
|
|
21142
|
-
return S.createElement(
|
|
21351
|
+
return S.createElement(ro.Provider, { value: no }, S.createElement(lo.Provider, { value: So }, t));
|
|
21143
21352
|
}
|
|
21144
|
-
var
|
|
21353
|
+
var wo = {
|
|
21145
21354
|
position: "fixed",
|
|
21146
21355
|
touchAction: "none"
|
|
21147
|
-
},
|
|
21148
|
-
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;
|
|
21149
21358
|
if (!s) return null;
|
|
21150
21359
|
let d = i ? l : {
|
|
21151
21360
|
...l,
|
|
21152
21361
|
scaleX: 1,
|
|
21153
21362
|
scaleY: 1
|
|
21154
21363
|
}, f = {
|
|
21155
|
-
...
|
|
21364
|
+
...wo,
|
|
21156
21365
|
width: s.width,
|
|
21157
21366
|
height: s.height,
|
|
21158
21367
|
top: s.top,
|
|
21159
21368
|
left: s.left,
|
|
21160
|
-
transform:
|
|
21161
|
-
transformOrigin: i && r ?
|
|
21369
|
+
transform: ni.Transform.toString(d),
|
|
21370
|
+
transformOrigin: i && r ? xi(r, s) : void 0,
|
|
21162
21371
|
transition: typeof u == "function" ? u(r) : u,
|
|
21163
21372
|
...c
|
|
21164
21373
|
};
|
|
@@ -21167,12 +21376,12 @@ var xo = {
|
|
|
21167
21376
|
style: f,
|
|
21168
21377
|
ref: t
|
|
21169
21378
|
}, a);
|
|
21170
|
-
}),
|
|
21379
|
+
}), Do = {
|
|
21171
21380
|
duration: 250,
|
|
21172
21381
|
easing: "ease",
|
|
21173
21382
|
keyframes: (e) => {
|
|
21174
21383
|
let { transform: { initial: t, final: n } } = e;
|
|
21175
|
-
return [{ transform:
|
|
21384
|
+
return [{ transform: ni.Transform.toString(t) }, { transform: ni.Transform.toString(n) }];
|
|
21176
21385
|
},
|
|
21177
21386
|
sideEffects: /* @__PURE__ */ ((e) => (t) => {
|
|
21178
21387
|
let { active: n, dragOverlay: r } = t, i = {}, { styles: a, className: o } = e;
|
|
@@ -21184,20 +21393,20 @@ var xo = {
|
|
|
21184
21393
|
};
|
|
21185
21394
|
})({ styles: { active: { opacity: "0" } } })
|
|
21186
21395
|
};
|
|
21187
|
-
function
|
|
21396
|
+
function Oo(e) {
|
|
21188
21397
|
let { config: t, draggableNodes: n, droppableContainers: r, measuringConfiguration: i } = e;
|
|
21189
|
-
return
|
|
21398
|
+
return Vr((e, a) => {
|
|
21190
21399
|
if (t === null) return;
|
|
21191
21400
|
let o = n.get(e);
|
|
21192
21401
|
if (!o) return;
|
|
21193
21402
|
let s = o.node.current;
|
|
21194
21403
|
if (!s) return;
|
|
21195
|
-
let c =
|
|
21404
|
+
let c = Ya(a);
|
|
21196
21405
|
if (!c) return;
|
|
21197
|
-
let { transform: l } =
|
|
21406
|
+
let { transform: l } = Fr(a).getComputedStyle(a), u = H(l);
|
|
21198
21407
|
if (!u) return;
|
|
21199
|
-
let d = typeof t == "function" ? t :
|
|
21200
|
-
return
|
|
21408
|
+
let d = typeof t == "function" ? t : ko(t);
|
|
21409
|
+
return ea(s, i.draggable.measure), d({
|
|
21201
21410
|
active: {
|
|
21202
21411
|
id: e,
|
|
21203
21412
|
data: o.data,
|
|
@@ -21215,9 +21424,9 @@ function To(e) {
|
|
|
21215
21424
|
});
|
|
21216
21425
|
});
|
|
21217
21426
|
}
|
|
21218
|
-
function
|
|
21427
|
+
function ko(e) {
|
|
21219
21428
|
let { duration: t, easing: n, sideEffects: r, keyframes: i } = {
|
|
21220
|
-
...
|
|
21429
|
+
...Do,
|
|
21221
21430
|
...e
|
|
21222
21431
|
};
|
|
21223
21432
|
return (e) => {
|
|
@@ -21259,14 +21468,14 @@ function Eo(e) {
|
|
|
21259
21468
|
});
|
|
21260
21469
|
};
|
|
21261
21470
|
}
|
|
21262
|
-
var
|
|
21263
|
-
function
|
|
21471
|
+
var Ao = 0;
|
|
21472
|
+
function jo(e) {
|
|
21264
21473
|
return (0, S.useMemo)(() => {
|
|
21265
|
-
if (e != null) return
|
|
21474
|
+
if (e != null) return Ao++, Ao;
|
|
21266
21475
|
}, [e]);
|
|
21267
21476
|
}
|
|
21268
|
-
var
|
|
21269
|
-
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, {
|
|
21270
21479
|
activatorEvent: u,
|
|
21271
21480
|
active: d,
|
|
21272
21481
|
activeNodeRect: f,
|
|
@@ -21278,13 +21487,13 @@ var ko = /* @__PURE__ */ S.memo((e) => {
|
|
|
21278
21487
|
scrollableAncestorRects: b,
|
|
21279
21488
|
transform: C,
|
|
21280
21489
|
windowRect: x
|
|
21281
|
-
}), ee =
|
|
21490
|
+
}), ee = Na(f), te = Oo({
|
|
21282
21491
|
config: r,
|
|
21283
21492
|
draggableNodes: m,
|
|
21284
21493
|
droppableContainers: h,
|
|
21285
21494
|
measuringConfiguration: v
|
|
21286
21495
|
}), E = ee ? g.setRef : void 0;
|
|
21287
|
-
return S.createElement(
|
|
21496
|
+
return S.createElement(Co, null, S.createElement(xo, { animation: te }, d && w ? S.createElement(Eo, {
|
|
21288
21497
|
key: w,
|
|
21289
21498
|
id: d.id,
|
|
21290
21499
|
ref: E,
|
|
@@ -21303,15 +21512,15 @@ var ko = /* @__PURE__ */ S.memo((e) => {
|
|
|
21303
21512
|
});
|
|
21304
21513
|
//#endregion
|
|
21305
21514
|
//#region src/components/ElementTree.tsx
|
|
21306
|
-
function
|
|
21515
|
+
function No(e) {
|
|
21307
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;
|
|
21308
21517
|
}
|
|
21309
|
-
function
|
|
21518
|
+
function Po(e, t) {
|
|
21310
21519
|
if (!e || e.length !== t.length) return !1;
|
|
21311
21520
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
21312
21521
|
return !0;
|
|
21313
21522
|
}
|
|
21314
|
-
function
|
|
21523
|
+
function Fo(e) {
|
|
21315
21524
|
switch (e.type) {
|
|
21316
21525
|
case "text": return `"${(e.content ?? "").slice(0, 20)}"`;
|
|
21317
21526
|
case "button": return `"${e.label}"`;
|
|
@@ -21323,13 +21532,13 @@ function Mo(e) {
|
|
|
21323
21532
|
default: return "";
|
|
21324
21533
|
}
|
|
21325
21534
|
}
|
|
21326
|
-
function
|
|
21535
|
+
function Io(e) {
|
|
21327
21536
|
return "n-" + e.join("-");
|
|
21328
21537
|
}
|
|
21329
|
-
function
|
|
21538
|
+
function Lo(e, t) {
|
|
21330
21539
|
return "g-" + e.join("-") + "_" + t;
|
|
21331
21540
|
}
|
|
21332
|
-
function
|
|
21541
|
+
function Ro(e) {
|
|
21333
21542
|
if (!e.startsWith("g-")) return null;
|
|
21334
21543
|
let t = e.slice(2).split("_");
|
|
21335
21544
|
return t.length === 2 ? {
|
|
@@ -21337,11 +21546,11 @@ function Fo(e) {
|
|
|
21337
21546
|
index: Number(t[1])
|
|
21338
21547
|
} : null;
|
|
21339
21548
|
}
|
|
21340
|
-
function
|
|
21549
|
+
function zo(e) {
|
|
21341
21550
|
return e.startsWith("n-") ? e.slice(2).split("-").map(Number) : null;
|
|
21342
21551
|
}
|
|
21343
|
-
function
|
|
21344
|
-
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) });
|
|
21345
21554
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21346
21555
|
ref: r,
|
|
21347
21556
|
className: `tree-drop-gap ${i ? "active" : ""}`,
|
|
@@ -21349,14 +21558,14 @@ function Lo({ parentPath: e, index: t, depth: n }) {
|
|
|
21349
21558
|
children: /* @__PURE__ */ (0, P.jsx)("div", { className: "tree-drop-line" })
|
|
21350
21559
|
});
|
|
21351
21560
|
}
|
|
21352
|
-
var
|
|
21353
|
-
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({
|
|
21354
21563
|
id: c,
|
|
21355
21564
|
data: {
|
|
21356
21565
|
path: n,
|
|
21357
21566
|
element: t
|
|
21358
21567
|
}
|
|
21359
|
-
}), { setNodeRef: y, isOver: b } =
|
|
21568
|
+
}), { setNodeRef: y, isOver: b } = bo({
|
|
21360
21569
|
id: c,
|
|
21361
21570
|
data: {
|
|
21362
21571
|
path: n,
|
|
@@ -21369,7 +21578,7 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21369
21578
|
}, [a, n]), w = (0, S.useCallback)((e) => {
|
|
21370
21579
|
e.stopPropagation(), e.preventDefault(), m((e) => !e);
|
|
21371
21580
|
}, []), T = n.slice(0, -1);
|
|
21372
|
-
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, {
|
|
21373
21582
|
parentPath: T,
|
|
21374
21583
|
index: n[n.length - 1],
|
|
21375
21584
|
depth: o
|
|
@@ -21399,13 +21608,13 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21399
21608
|
}),
|
|
21400
21609
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21401
21610
|
className: "tree-label",
|
|
21402
|
-
children:
|
|
21611
|
+
children: Fo(t)
|
|
21403
21612
|
}),
|
|
21404
21613
|
f && d ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21405
21614
|
className: "tree-badge",
|
|
21406
21615
|
children: d.length
|
|
21407
21616
|
}) : null,
|
|
21408
|
-
|
|
21617
|
+
dr(t) ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21409
21618
|
className: "tree-error-dot",
|
|
21410
21619
|
title: "Has validation errors"
|
|
21411
21620
|
}) : null
|
|
@@ -21420,7 +21629,7 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21420
21629
|
onSelect: a,
|
|
21421
21630
|
depth: o + 1,
|
|
21422
21631
|
isDraggingAny: s
|
|
21423
|
-
},
|
|
21632
|
+
}, Io([...n, c]))), s ? /* @__PURE__ */ (0, P.jsx)(Bo, {
|
|
21424
21633
|
parentPath: n,
|
|
21425
21634
|
index: d.length,
|
|
21426
21635
|
depth: o + 1
|
|
@@ -21428,14 +21637,14 @@ var Ro = (0, S.memo)(function e({ element: t, path: n, selectedPath: r, selected
|
|
|
21428
21637
|
}) : null]
|
|
21429
21638
|
})] });
|
|
21430
21639
|
});
|
|
21431
|
-
function
|
|
21640
|
+
function Ho({ element: e }) {
|
|
21432
21641
|
return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21433
21642
|
className: "tree-drag-overlay",
|
|
21434
21643
|
children: /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21435
21644
|
className: "tree-item selected",
|
|
21436
21645
|
style: { paddingLeft: 8 },
|
|
21437
21646
|
children: [
|
|
21438
|
-
|
|
21647
|
+
No(e) ? /* @__PURE__ */ (0, P.jsx)("span", {
|
|
21439
21648
|
className: "tree-arrow",
|
|
21440
21649
|
children: "▾"
|
|
21441
21650
|
}) : /* @__PURE__ */ (0, P.jsx)("span", {
|
|
@@ -21448,44 +21657,44 @@ function zo({ element: e }) {
|
|
|
21448
21657
|
}),
|
|
21449
21658
|
/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21450
21659
|
className: "tree-label",
|
|
21451
|
-
children:
|
|
21660
|
+
children: Fo(e)
|
|
21452
21661
|
})
|
|
21453
21662
|
]
|
|
21454
21663
|
})
|
|
21455
21664
|
});
|
|
21456
21665
|
}
|
|
21457
|
-
function
|
|
21666
|
+
function Uo(e, t) {
|
|
21458
21667
|
let n = t.toLowerCase();
|
|
21459
|
-
if (e.type.toLowerCase().includes(n) ||
|
|
21460
|
-
let r =
|
|
21461
|
-
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;
|
|
21462
21671
|
}
|
|
21463
|
-
function
|
|
21464
|
-
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) => {
|
|
21465
21674
|
o(e.active.data.current?.element ?? null);
|
|
21466
21675
|
}, []), d = (0, S.useCallback)((e) => {
|
|
21467
21676
|
o(null);
|
|
21468
21677
|
let { active: t, over: n } = e;
|
|
21469
21678
|
if (!n || t.id === n.id) return;
|
|
21470
|
-
let r =
|
|
21679
|
+
let r = zo(t.id);
|
|
21471
21680
|
if (!r) return;
|
|
21472
21681
|
let a = n.id, s = t.id;
|
|
21473
21682
|
if (a.startsWith(s.replace("n-", "n-") + "-") || a.startsWith(s.replace("n-", "g-") + "-")) return;
|
|
21474
|
-
let c =
|
|
21683
|
+
let c = Ro(a);
|
|
21475
21684
|
if (c) {
|
|
21476
21685
|
i(r, c.parentPath, c.index);
|
|
21477
21686
|
return;
|
|
21478
21687
|
}
|
|
21479
|
-
let l =
|
|
21688
|
+
let l = zo(a);
|
|
21480
21689
|
if (!l) return;
|
|
21481
21690
|
let u = n.data.current?.element;
|
|
21482
|
-
u &&
|
|
21691
|
+
u && No(u) !== null ? i(r, l, (No(u) ?? []).length) : i(r, l.slice(0, -1), l[l.length - 1]);
|
|
21483
21692
|
}, [i]);
|
|
21484
21693
|
if (e.length === 0) return /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21485
21694
|
className: "tree-empty",
|
|
21486
21695
|
children: "No elements yet"
|
|
21487
21696
|
});
|
|
21488
|
-
let f = s ? e.filter((e) =>
|
|
21697
|
+
let f = s ? e.filter((e) => Uo(e, s)) : e;
|
|
21489
21698
|
return /* @__PURE__ */ (0, P.jsxs)("div", { children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21490
21699
|
className: "tree-search-wrap",
|
|
21491
21700
|
children: [/* @__PURE__ */ (0, P.jsx)("input", {
|
|
@@ -21505,16 +21714,16 @@ function Vo() {
|
|
|
21505
21714
|
s,
|
|
21506
21715
|
"\""
|
|
21507
21716
|
]
|
|
21508
|
-
}) : /* @__PURE__ */ (0, P.jsxs)(
|
|
21717
|
+
}) : /* @__PURE__ */ (0, P.jsxs)(fo, {
|
|
21509
21718
|
sensors: l,
|
|
21510
|
-
collisionDetection:
|
|
21719
|
+
collisionDetection: Ei,
|
|
21511
21720
|
onDragStart: u,
|
|
21512
21721
|
onDragEnd: d,
|
|
21513
21722
|
children: [/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21514
21723
|
className: "tree-root",
|
|
21515
21724
|
children: [f.map((i) => {
|
|
21516
21725
|
let o = e.indexOf(i);
|
|
21517
|
-
return /* @__PURE__ */ (0, P.jsx)(
|
|
21726
|
+
return /* @__PURE__ */ (0, P.jsx)(Vo, {
|
|
21518
21727
|
element: i,
|
|
21519
21728
|
path: [o],
|
|
21520
21729
|
selectedPath: t,
|
|
@@ -21522,18 +21731,18 @@ function Vo() {
|
|
|
21522
21731
|
onSelect: r,
|
|
21523
21732
|
depth: 0,
|
|
21524
21733
|
isDraggingAny: !!a
|
|
21525
|
-
},
|
|
21526
|
-
}), !s && a ? /* @__PURE__ */ (0, P.jsx)(
|
|
21734
|
+
}, Io([o]));
|
|
21735
|
+
}), !s && a ? /* @__PURE__ */ (0, P.jsx)(Bo, {
|
|
21527
21736
|
parentPath: [],
|
|
21528
21737
|
index: e.length,
|
|
21529
21738
|
depth: 0
|
|
21530
21739
|
}) : null]
|
|
21531
|
-
}), /* @__PURE__ */ (0, P.jsx)(
|
|
21740
|
+
}), /* @__PURE__ */ (0, P.jsx)(Mo, { children: a ? /* @__PURE__ */ (0, P.jsx)(Ho, { element: a }) : null })]
|
|
21532
21741
|
})] });
|
|
21533
21742
|
}
|
|
21534
21743
|
//#endregion
|
|
21535
21744
|
//#region src/components/RightPanel.tsx
|
|
21536
|
-
function
|
|
21745
|
+
function Go(e, t) {
|
|
21537
21746
|
if (t.length === 0) return null;
|
|
21538
21747
|
let n = e[t[0]];
|
|
21539
21748
|
for (let e = 1; e < t.length; e++) {
|
|
@@ -21544,8 +21753,8 @@ function Ho(e, t) {
|
|
|
21544
21753
|
}
|
|
21545
21754
|
return n ?? null;
|
|
21546
21755
|
}
|
|
21547
|
-
var
|
|
21548
|
-
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) => {
|
|
21549
21758
|
let t = N.getState().selectedPath;
|
|
21550
21759
|
t && i(t, e);
|
|
21551
21760
|
}, [i]);
|
|
@@ -21572,7 +21781,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21572
21781
|
]
|
|
21573
21782
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21574
21783
|
className: "rp-content",
|
|
21575
|
-
children: e === "tree" ? /* @__PURE__ */ (0, P.jsx)(
|
|
21784
|
+
children: e === "tree" ? /* @__PURE__ */ (0, P.jsx)(Wo, {}) : e === "element" ? a ? /* @__PURE__ */ (0, P.jsx)(fr, {
|
|
21576
21785
|
element: a,
|
|
21577
21786
|
onUpdate: o
|
|
21578
21787
|
}) : /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
@@ -21581,10 +21790,10 @@ var Uo = (0, S.memo)(function() {
|
|
|
21581
21790
|
className: "rp-empty-icon",
|
|
21582
21791
|
children: "⊡"
|
|
21583
21792
|
}), "Select an element to edit its properties"]
|
|
21584
|
-
}) : /* @__PURE__ */ (0, P.jsx)(
|
|
21793
|
+
}) : /* @__PURE__ */ (0, P.jsx)(jr, {})
|
|
21585
21794
|
})]
|
|
21586
21795
|
});
|
|
21587
|
-
}),
|
|
21796
|
+
}), qo = [
|
|
21588
21797
|
{
|
|
21589
21798
|
keys: "⌘ Z",
|
|
21590
21799
|
action: "Undo"
|
|
@@ -21617,7 +21826,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21617
21826
|
keys: "?",
|
|
21618
21827
|
action: "Toggle this panel"
|
|
21619
21828
|
}
|
|
21620
|
-
],
|
|
21829
|
+
], Jo = (0, S.memo)(function() {
|
|
21621
21830
|
let [e, t] = (0, S.useState)(!1);
|
|
21622
21831
|
return (0, S.useEffect)(() => {
|
|
21623
21832
|
let e = (e) => {
|
|
@@ -21640,7 +21849,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21640
21849
|
})]
|
|
21641
21850
|
}), /* @__PURE__ */ (0, P.jsx)("div", {
|
|
21642
21851
|
className: "shortcuts-list",
|
|
21643
|
-
children:
|
|
21852
|
+
children: qo.map((e) => /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21644
21853
|
className: "shortcut-row",
|
|
21645
21854
|
children: [/* @__PURE__ */ (0, P.jsx)("span", {
|
|
21646
21855
|
className: "shortcut-action",
|
|
@@ -21656,7 +21865,7 @@ var Uo = (0, S.memo)(function() {
|
|
|
21656
21865
|
});
|
|
21657
21866
|
//#endregion
|
|
21658
21867
|
//#region src/hooks/useKeyboardShortcuts.ts
|
|
21659
|
-
function
|
|
21868
|
+
function Yo() {
|
|
21660
21869
|
(0, S.useEffect)(() => {
|
|
21661
21870
|
let e = (e) => {
|
|
21662
21871
|
let t = e.metaKey || e.ctrlKey, n = e.target;
|
|
@@ -21696,33 +21905,73 @@ function Ko() {
|
|
|
21696
21905
|
}
|
|
21697
21906
|
//#endregion
|
|
21698
21907
|
//#region src/components/EditorLayout.tsx
|
|
21699
|
-
var
|
|
21700
|
-
return
|
|
21908
|
+
var Xo = (0, S.memo)(function() {
|
|
21909
|
+
return Yo(), /* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21701
21910
|
className: "editor-root",
|
|
21702
21911
|
children: [
|
|
21703
|
-
/* @__PURE__ */ (0, P.jsx)(mn, {}),
|
|
21912
|
+
!ns.hideTopBar && /* @__PURE__ */ (0, P.jsx)(mn, {}),
|
|
21704
21913
|
/* @__PURE__ */ (0, P.jsxs)("div", {
|
|
21705
21914
|
className: "editor-panels",
|
|
21706
21915
|
children: [
|
|
21707
21916
|
/* @__PURE__ */ (0, P.jsx)(wn, {}),
|
|
21708
21917
|
/* @__PURE__ */ (0, P.jsx)(qn, {}),
|
|
21709
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
21918
|
+
/* @__PURE__ */ (0, P.jsx)(Ko, {})
|
|
21710
21919
|
]
|
|
21711
21920
|
}),
|
|
21712
|
-
/* @__PURE__ */ (0, P.jsx)(
|
|
21921
|
+
/* @__PURE__ */ (0, P.jsx)(Jo, {})
|
|
21713
21922
|
]
|
|
21714
21923
|
});
|
|
21715
21924
|
});
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
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, {});
|
|
21720
21969
|
}
|
|
21721
21970
|
//#endregion
|
|
21722
21971
|
//#region src/lib.tsx
|
|
21723
|
-
var
|
|
21724
|
-
function
|
|
21725
|
-
|
|
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:", {
|
|
21726
21975
|
appId: t.appId,
|
|
21727
21976
|
region: t.region,
|
|
21728
21977
|
token: t.token ? "***" + t.token.slice(-4) : void 0,
|
|
@@ -21731,15 +21980,24 @@ function Xo(e, t) {
|
|
|
21731
21980
|
hasOnSave: !!t.onSave
|
|
21732
21981
|
});
|
|
21733
21982
|
let n = (0, te.createRoot)(e);
|
|
21734
|
-
|
|
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(() => {
|
|
21735
21992
|
N.getState().loadBubble(t.bubble, void 0, t.templateName ?? "Untitled");
|
|
21736
21993
|
}, 0), {
|
|
21737
21994
|
loadBubble: (e, t) => N.getState().loadBubble(e, void 0, t ?? "Untitled"),
|
|
21738
21995
|
getBubbleJSON: () => N.getState().getBubbleJSON(),
|
|
21996
|
+
setVariables: (e) => N.getState().setVariables(e),
|
|
21739
21997
|
destroy: () => {
|
|
21740
|
-
n.unmount(), Object.keys(
|
|
21998
|
+
r?.(), n.unmount(), Object.keys(ns).forEach((e) => delete ns[e]);
|
|
21741
21999
|
}
|
|
21742
22000
|
};
|
|
21743
22001
|
}
|
|
21744
22002
|
//#endregion
|
|
21745
|
-
export {
|
|
22003
|
+
export { ns as builderConfig, rs as mountBubbleBuilder };
|