@scbt-ecom/ui 0.24.1 → 0.25.0
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/shared/ui/formElements/controlled/index.d.ts +1 -0
- package/dist/shared/ui/formElements/uncontrolled/index.d.ts +1 -0
- package/dist/shared/ui/formElements/uncontrolled/select/Select.d.ts +15 -0
- package/dist/shared/ui/formElements/uncontrolled/select/hooks/useSelectController.d.ts +3 -1
- package/dist/ui.js +298 -282
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.js
CHANGED
|
@@ -27948,10 +27948,10 @@ function QW(t, e = null) {
|
|
|
27948
27948
|
if (!a)
|
|
27949
27949
|
return !1;
|
|
27950
27950
|
let s = r ? n.tr : null;
|
|
27951
|
-
return
|
|
27951
|
+
return e9(s, a, t, e) ? (r && r(s.scrollIntoView()), !0) : !1;
|
|
27952
27952
|
};
|
|
27953
27953
|
}
|
|
27954
|
-
function
|
|
27954
|
+
function e9(t, e, n, r = null) {
|
|
27955
27955
|
let i = !1, o = e, a = e.$from.doc;
|
|
27956
27956
|
if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(n) && e.startIndex == 0) {
|
|
27957
27957
|
if (e.$from.index(e.depth - 1) == 0)
|
|
@@ -27960,9 +27960,9 @@ function eH(t, e, n, r = null) {
|
|
|
27960
27960
|
o = new Gl(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new Gl(e.$from, a.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
27961
27961
|
}
|
|
27962
27962
|
let s = Zh(o, n, r, e);
|
|
27963
|
-
return s ? (t &&
|
|
27963
|
+
return s ? (t && t9(t, e, s, i, n), !0) : !1;
|
|
27964
27964
|
}
|
|
27965
|
-
function
|
|
27965
|
+
function t9(t, e, n, r, i) {
|
|
27966
27966
|
let o = se.empty;
|
|
27967
27967
|
for (let c = n.length - 1; c >= 0; c--)
|
|
27968
27968
|
o = se.from(n[c].type.create(n[c].attrs, o));
|
|
@@ -27975,13 +27975,13 @@ function tH(t, e, n, r, i) {
|
|
|
27975
27975
|
!f && Co(t.doc, l, s) && (t.split(l, s), l += 2 * s), l += u.child(c).nodeSize;
|
|
27976
27976
|
return t;
|
|
27977
27977
|
}
|
|
27978
|
-
function
|
|
27978
|
+
function n9(t) {
|
|
27979
27979
|
return function(e, n) {
|
|
27980
27980
|
let { $from: r, $to: i } = e.selection, o = r.blockRange(i, (a) => a.childCount > 0 && a.firstChild.type == t);
|
|
27981
|
-
return o ? n ? r.node(o.depth - 1).type == t ?
|
|
27981
|
+
return o ? n ? r.node(o.depth - 1).type == t ? r9(e, n, t, o) : i9(e, n, o) : !0 : !1;
|
|
27982
27982
|
};
|
|
27983
27983
|
}
|
|
27984
|
-
function
|
|
27984
|
+
function r9(t, e, n, r) {
|
|
27985
27985
|
let i = t.tr, o = r.end, a = r.$to.end(r.depth);
|
|
27986
27986
|
o < a && (i.step(new Mt(o - 1, a, o, a, new me(se.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new Gl(i.doc.resolve(r.$from.pos), i.doc.resolve(a), r.depth));
|
|
27987
27987
|
const s = qo(r);
|
|
@@ -27991,7 +27991,7 @@ function rH(t, e, n, r) {
|
|
|
27991
27991
|
let l = i.mapping.map(o, -1) - 1;
|
|
27992
27992
|
return ti(i.doc, l) && i.join(l), e(i.scrollIntoView()), !0;
|
|
27993
27993
|
}
|
|
27994
|
-
function
|
|
27994
|
+
function i9(t, e, n) {
|
|
27995
27995
|
let r = t.tr, i = n.parent;
|
|
27996
27996
|
for (let p = n.end, h = n.endIndex - 1, m = n.startIndex; h > m; h--)
|
|
27997
27997
|
p -= i.child(h).nodeSize, r.delete(p - 1, p + 1);
|
|
@@ -28004,7 +28004,7 @@ function iH(t, e, n) {
|
|
|
28004
28004
|
let d = o.pos, f = d + a.nodeSize;
|
|
28005
28005
|
return r.step(new Mt(d - (s ? 1 : 0), f + (l ? 1 : 0), d + 1, f - 1, new me((s ? se.empty : se.from(i.copy(se.empty))).append(l ? se.empty : se.from(i.copy(se.empty))), s ? 0 : 1, l ? 0 : 1), s ? 0 : 1)), e(r.scrollIntoView()), !0;
|
|
28006
28006
|
}
|
|
28007
|
-
function
|
|
28007
|
+
function o9(t) {
|
|
28008
28008
|
return function(e, n) {
|
|
28009
28009
|
let { $from: r, $to: i } = e.selection, o = r.blockRange(i, (u) => u.childCount > 0 && u.firstChild.type == t);
|
|
28010
28010
|
if (!o)
|
|
@@ -28107,7 +28107,7 @@ class fc {
|
|
|
28107
28107
|
return s;
|
|
28108
28108
|
}
|
|
28109
28109
|
}
|
|
28110
|
-
class
|
|
28110
|
+
class a9 {
|
|
28111
28111
|
constructor() {
|
|
28112
28112
|
this.callbacks = {};
|
|
28113
28113
|
}
|
|
@@ -28244,10 +28244,10 @@ function Ak(t) {
|
|
|
28244
28244
|
function Ge(t, e = void 0, ...n) {
|
|
28245
28245
|
return Ak(t) ? e ? t.bind(e)(...n) : t(...n) : t;
|
|
28246
28246
|
}
|
|
28247
|
-
function
|
|
28247
|
+
function s9(t = {}) {
|
|
28248
28248
|
return Object.keys(t).length === 0 && t.constructor === Object;
|
|
28249
28249
|
}
|
|
28250
|
-
function
|
|
28250
|
+
function l9(t) {
|
|
28251
28251
|
return typeof t != "string" ? t : t.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(t) : t === "true" ? !0 : t === "false" ? !1 : t;
|
|
28252
28252
|
}
|
|
28253
28253
|
function gy(t, e) {
|
|
@@ -28258,7 +28258,7 @@ function gy(t, e) {
|
|
|
28258
28258
|
if (r === !1)
|
|
28259
28259
|
return !1;
|
|
28260
28260
|
const i = e.reduce((o, a) => {
|
|
28261
|
-
const s = a.attribute.parseHTML ? a.attribute.parseHTML(n) :
|
|
28261
|
+
const s = a.attribute.parseHTML ? a.attribute.parseHTML(n) : l9(n.getAttribute(a.name));
|
|
28262
28262
|
return s == null ? o : {
|
|
28263
28263
|
...o,
|
|
28264
28264
|
[a.name]: s
|
|
@@ -28271,10 +28271,10 @@ function gy(t, e) {
|
|
|
28271
28271
|
function by(t) {
|
|
28272
28272
|
return Object.fromEntries(
|
|
28273
28273
|
// @ts-ignore
|
|
28274
|
-
Object.entries(t).filter(([e, n]) => e === "attrs" &&
|
|
28274
|
+
Object.entries(t).filter(([e, n]) => e === "attrs" && s9(n) ? !1 : n != null)
|
|
28275
28275
|
);
|
|
28276
28276
|
}
|
|
28277
|
-
function
|
|
28277
|
+
function u9(t, e) {
|
|
28278
28278
|
var n;
|
|
28279
28279
|
const r = Tk(t), { nodeExtensions: i, markExtensions: o } = pc(t), a = (n = i.find((u) => ye(u, "topNode"))) === null || n === void 0 ? void 0 : n.name, s = Object.fromEntries(i.map((u) => {
|
|
28280
28280
|
const c = r.filter((b) => b.type === u.name), d = {
|
|
@@ -28362,7 +28362,7 @@ function am(t, e) {
|
|
|
28362
28362
|
const n = eo.fromSchema(e).serializeFragment(t), i = document.implementation.createHTMLDocument().createElement("div");
|
|
28363
28363
|
return i.appendChild(n), i.innerHTML;
|
|
28364
28364
|
}
|
|
28365
|
-
const
|
|
28365
|
+
const c9 = (t, e = 500) => {
|
|
28366
28366
|
let n = "";
|
|
28367
28367
|
const r = t.parentOffset;
|
|
28368
28368
|
return t.parent.nodesBetween(Math.max(0, r - e), r, (i, o, a, s) => {
|
|
@@ -28384,7 +28384,7 @@ class hc {
|
|
|
28384
28384
|
this.find = e.find, this.handler = e.handler;
|
|
28385
28385
|
}
|
|
28386
28386
|
}
|
|
28387
|
-
const
|
|
28387
|
+
const d9 = (t, e) => {
|
|
28388
28388
|
if (sm(e))
|
|
28389
28389
|
return e.exec(t);
|
|
28390
28390
|
const n = e(t);
|
|
@@ -28405,11 +28405,11 @@ function Xs(t) {
|
|
|
28405
28405
|
)
|
|
28406
28406
|
return !1;
|
|
28407
28407
|
let c = !1;
|
|
28408
|
-
const d =
|
|
28408
|
+
const d = c9(u) + o;
|
|
28409
28409
|
return a.forEach((f) => {
|
|
28410
28410
|
if (c)
|
|
28411
28411
|
return;
|
|
28412
|
-
const p =
|
|
28412
|
+
const p = d9(d, f.find);
|
|
28413
28413
|
if (!p)
|
|
28414
28414
|
return;
|
|
28415
28415
|
const h = l.state.tr, m = dc({
|
|
@@ -28437,7 +28437,7 @@ function Xs(t) {
|
|
|
28437
28437
|
}), l.dispatch(h), c = !0);
|
|
28438
28438
|
}), c;
|
|
28439
28439
|
}
|
|
28440
|
-
function
|
|
28440
|
+
function f9(t) {
|
|
28441
28441
|
const { editor: e, rules: n } = t, r = new Lt({
|
|
28442
28442
|
state: {
|
|
28443
28443
|
init() {
|
|
@@ -28509,11 +28509,11 @@ function fH(t) {
|
|
|
28509
28509
|
});
|
|
28510
28510
|
return r;
|
|
28511
28511
|
}
|
|
28512
|
-
function
|
|
28512
|
+
function p9(t) {
|
|
28513
28513
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
28514
28514
|
}
|
|
28515
28515
|
function Ys(t) {
|
|
28516
|
-
return
|
|
28516
|
+
return p9(t) !== "Object" ? !1 : t.constructor === Object && Object.getPrototypeOf(t) === Object.prototype;
|
|
28517
28517
|
}
|
|
28518
28518
|
function mc(t, e) {
|
|
28519
28519
|
const n = { ...t };
|
|
@@ -28567,15 +28567,15 @@ class Fn {
|
|
|
28567
28567
|
return !1;
|
|
28568
28568
|
}
|
|
28569
28569
|
}
|
|
28570
|
-
function
|
|
28570
|
+
function h9(t) {
|
|
28571
28571
|
return typeof t == "number";
|
|
28572
28572
|
}
|
|
28573
|
-
class
|
|
28573
|
+
class m9 {
|
|
28574
28574
|
constructor(e) {
|
|
28575
28575
|
this.find = e.find, this.handler = e.handler;
|
|
28576
28576
|
}
|
|
28577
28577
|
}
|
|
28578
|
-
const
|
|
28578
|
+
const g9 = (t, e, n) => {
|
|
28579
28579
|
if (sm(e))
|
|
28580
28580
|
return [...t.matchAll(e)];
|
|
28581
28581
|
const r = e(t, n);
|
|
@@ -28584,7 +28584,7 @@ const gH = (t, e, n) => {
|
|
|
28584
28584
|
return o.index = i.index, o.input = t, o.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), o.push(i.replaceWith)), o;
|
|
28585
28585
|
}) : [];
|
|
28586
28586
|
};
|
|
28587
|
-
function
|
|
28587
|
+
function b9(t) {
|
|
28588
28588
|
const { editor: e, state: n, from: r, to: i, rule: o, pasteEvent: a, dropEvent: s } = t, { commands: l, chain: u, can: c } = new fc({
|
|
28589
28589
|
editor: e,
|
|
28590
28590
|
state: n
|
|
@@ -28593,7 +28593,7 @@ function bH(t) {
|
|
|
28593
28593
|
if (!p.isTextblock || p.type.spec.code)
|
|
28594
28594
|
return;
|
|
28595
28595
|
const m = Math.max(r, h), g = Math.min(i, h + p.content.size), b = p.textBetween(m - h, g - h, void 0, "");
|
|
28596
|
-
|
|
28596
|
+
g9(b, o.find, a).forEach((w) => {
|
|
28597
28597
|
if (w.index === void 0)
|
|
28598
28598
|
return;
|
|
28599
28599
|
const v = m + w.index + 1, y = v + w[0].length, C = {
|
|
@@ -28614,14 +28614,14 @@ function bH(t) {
|
|
|
28614
28614
|
}), d.every((p) => p !== null);
|
|
28615
28615
|
}
|
|
28616
28616
|
let Zs = null;
|
|
28617
|
-
const
|
|
28617
|
+
const v9 = (t) => {
|
|
28618
28618
|
var e;
|
|
28619
28619
|
const n = new ClipboardEvent("paste", {
|
|
28620
28620
|
clipboardData: new DataTransfer()
|
|
28621
28621
|
});
|
|
28622
28622
|
return (e = n.clipboardData) === null || e === void 0 || e.setData("text/html", t), n;
|
|
28623
28623
|
};
|
|
28624
|
-
function
|
|
28624
|
+
function y9(t) {
|
|
28625
28625
|
const { editor: e, rules: n } = t;
|
|
28626
28626
|
let r = null, i = !1, o = !1, a = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, s;
|
|
28627
28627
|
try {
|
|
@@ -28634,7 +28634,7 @@ function yH(t) {
|
|
|
28634
28634
|
state: c,
|
|
28635
28635
|
transaction: m
|
|
28636
28636
|
});
|
|
28637
|
-
if (!(!
|
|
28637
|
+
if (!(!b9({
|
|
28638
28638
|
editor: e,
|
|
28639
28639
|
state: g,
|
|
28640
28640
|
from: Math.max(d - 1, 0),
|
|
@@ -28692,7 +28692,7 @@ function yH(t) {
|
|
|
28692
28692
|
if (x) {
|
|
28693
28693
|
let { text: y } = b;
|
|
28694
28694
|
typeof y == "string" ? y = y : y = am(se.from(y), p.schema);
|
|
28695
|
-
const { from: C } = b, E = C + y.length, S =
|
|
28695
|
+
const { from: C } = b, E = C + y.length, S = v9(y);
|
|
28696
28696
|
return l({
|
|
28697
28697
|
rule: c,
|
|
28698
28698
|
state: p,
|
|
@@ -28702,7 +28702,7 @@ function yH(t) {
|
|
|
28702
28702
|
});
|
|
28703
28703
|
}
|
|
28704
28704
|
const w = f.doc.content.findDiffStart(p.doc.content), v = f.doc.content.findDiffEnd(p.doc.content);
|
|
28705
|
-
if (!(!
|
|
28705
|
+
if (!(!h9(w) || !v || w === v.b))
|
|
28706
28706
|
return l({
|
|
28707
28707
|
rule: c,
|
|
28708
28708
|
state: p,
|
|
@@ -28713,13 +28713,13 @@ function yH(t) {
|
|
|
28713
28713
|
}
|
|
28714
28714
|
}));
|
|
28715
28715
|
}
|
|
28716
|
-
function
|
|
28716
|
+
function x9(t) {
|
|
28717
28717
|
const e = t.filter((n, r) => t.indexOf(n) !== r);
|
|
28718
28718
|
return Array.from(new Set(e));
|
|
28719
28719
|
}
|
|
28720
28720
|
class vo {
|
|
28721
28721
|
constructor(e, n) {
|
|
28722
|
-
this.splittableMarks = [], this.editor = n, this.extensions = vo.resolve(e), this.schema =
|
|
28722
|
+
this.splittableMarks = [], this.editor = n, this.extensions = vo.resolve(e), this.schema = u9(this.extensions, n), this.setupExtensions();
|
|
28723
28723
|
}
|
|
28724
28724
|
/**
|
|
28725
28725
|
* Returns a flattened and sorted extension list while
|
|
@@ -28728,7 +28728,7 @@ class vo {
|
|
|
28728
28728
|
* @returns An flattened and sorted array of Tiptap extensions
|
|
28729
28729
|
*/
|
|
28730
28730
|
static resolve(e) {
|
|
28731
|
-
const n = vo.sort(vo.flatten(e)), r =
|
|
28731
|
+
const n = vo.sort(vo.flatten(e)), r = x9(n.map((i) => i.name));
|
|
28732
28732
|
return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), n;
|
|
28733
28733
|
}
|
|
28734
28734
|
/**
|
|
@@ -28808,11 +28808,11 @@ class vo {
|
|
|
28808
28808
|
return l;
|
|
28809
28809
|
}).flat();
|
|
28810
28810
|
return [
|
|
28811
|
-
|
|
28811
|
+
f9({
|
|
28812
28812
|
editor: e,
|
|
28813
28813
|
rules: r
|
|
28814
28814
|
}),
|
|
28815
|
-
...
|
|
28815
|
+
...y9({
|
|
28816
28816
|
editor: e,
|
|
28817
28817
|
rules: i
|
|
28818
28818
|
}),
|
|
@@ -28939,7 +28939,7 @@ function Mk(t, e, n) {
|
|
|
28939
28939
|
function Ok(t) {
|
|
28940
28940
|
return Object.fromEntries(Object.entries(t.nodes).filter(([, e]) => e.spec.toText).map(([e, n]) => [e, n.spec.toText]));
|
|
28941
28941
|
}
|
|
28942
|
-
const
|
|
28942
|
+
const C9 = Yt.create({
|
|
28943
28943
|
name: "clipboardTextSerializer",
|
|
28944
28944
|
addOptions() {
|
|
28945
28945
|
return {
|
|
@@ -28962,10 +28962,10 @@ const CH = Yt.create({
|
|
|
28962
28962
|
})
|
|
28963
28963
|
];
|
|
28964
28964
|
}
|
|
28965
|
-
}),
|
|
28965
|
+
}), w9 = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
|
|
28966
28966
|
var n;
|
|
28967
28967
|
t.isDestroyed || (e.dom.blur(), (n = window == null ? void 0 : window.getSelection()) === null || n === void 0 || n.removeAllRanges());
|
|
28968
|
-
}), !0),
|
|
28968
|
+
}), !0), S9 = (t = !1) => ({ commands: e }) => e.setContent("", t), k9 = () => ({ state: t, tr: e, dispatch: n }) => {
|
|
28969
28969
|
const { selection: r } = e, { ranges: i } = r;
|
|
28970
28970
|
return n && i.forEach(({ $from: o, $to: a }) => {
|
|
28971
28971
|
t.doc.nodesBetween(o.pos, a.pos, (s, l) => {
|
|
@@ -28982,12 +28982,12 @@ const CH = Yt.create({
|
|
|
28982
28982
|
(h || h === 0) && e.lift(p, h);
|
|
28983
28983
|
});
|
|
28984
28984
|
}), !0;
|
|
28985
|
-
},
|
|
28985
|
+
}, E9 = (t) => (e) => t(e), I9 = () => ({ state: t, dispatch: e }) => XW(t, e), T9 = (t, e) => ({ editor: n, tr: r }) => {
|
|
28986
28986
|
const { state: i } = n, o = i.doc.slice(t.from, t.to);
|
|
28987
28987
|
r.deleteRange(t.from, t.to);
|
|
28988
28988
|
const a = r.mapping.map(e);
|
|
28989
28989
|
return r.insert(a, o.content), r.setSelection(new Re(r.doc.resolve(a - 1))), !0;
|
|
28990
|
-
},
|
|
28990
|
+
}, A9 = () => ({ tr: t, dispatch: e }) => {
|
|
28991
28991
|
const { selection: n } = t, r = n.$anchor.node();
|
|
28992
28992
|
if (r.content.size > 0)
|
|
28993
28993
|
return !1;
|
|
@@ -29001,7 +29001,7 @@ const CH = Yt.create({
|
|
|
29001
29001
|
return !0;
|
|
29002
29002
|
}
|
|
29003
29003
|
return !1;
|
|
29004
|
-
},
|
|
29004
|
+
}, M9 = (t) => ({ tr: e, state: n, dispatch: r }) => {
|
|
29005
29005
|
const i = Pt(t, n.schema), o = e.selection.$anchor;
|
|
29006
29006
|
for (let a = o.depth; a > 0; a -= 1)
|
|
29007
29007
|
if (o.node(a).type === i) {
|
|
@@ -29012,10 +29012,10 @@ const CH = Yt.create({
|
|
|
29012
29012
|
return !0;
|
|
29013
29013
|
}
|
|
29014
29014
|
return !1;
|
|
29015
|
-
},
|
|
29015
|
+
}, O9 = (t) => ({ tr: e, dispatch: n }) => {
|
|
29016
29016
|
const { from: r, to: i } = t;
|
|
29017
29017
|
return n && e.delete(r, i), !0;
|
|
29018
|
-
},
|
|
29018
|
+
}, P9 = () => ({ state: t, dispatch: e }) => NW(t, e), D9 = () => ({ commands: t }) => t.keyboardShortcut("Enter"), R9 = () => ({ state: t, dispatch: e }) => $W(t, e);
|
|
29019
29019
|
function Zl(t, e, n = { strict: !0 }) {
|
|
29020
29020
|
const r = Object.keys(e);
|
|
29021
29021
|
return r.length ? r.every((i) => n.strict ? e[i] === t[i] : sm(e[i]) ? e[i].test(t[i]) : e[i] === t[i]) : !0;
|
|
@@ -29055,7 +29055,7 @@ function ri(t, e) {
|
|
|
29055
29055
|
}
|
|
29056
29056
|
return t;
|
|
29057
29057
|
}
|
|
29058
|
-
const
|
|
29058
|
+
const N9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
29059
29059
|
const o = ri(t, r.schema), { doc: a, selection: s } = n, { $from: l, from: u, to: c } = s;
|
|
29060
29060
|
if (i) {
|
|
29061
29061
|
const d = lm(l, o, e);
|
|
@@ -29065,7 +29065,7 @@ const NH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
29065
29065
|
}
|
|
29066
29066
|
}
|
|
29067
29067
|
return !0;
|
|
29068
|
-
},
|
|
29068
|
+
}, F9 = (t) => (e) => {
|
|
29069
29069
|
const n = typeof t == "function" ? t(e) : t;
|
|
29070
29070
|
for (let r = 0; r < n.length; r += 1)
|
|
29071
29071
|
if (n[r](e))
|
|
@@ -29089,7 +29089,7 @@ function Rk(t, e = null) {
|
|
|
29089
29089
|
const i = n.from, o = r.to;
|
|
29090
29090
|
return e === "all" ? Re.create(t, wi(0, i, o), wi(t.content.size, i, o)) : Re.create(t, wi(e, i, o), wi(e, i, o));
|
|
29091
29091
|
}
|
|
29092
|
-
const
|
|
29092
|
+
const j9 = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) => {
|
|
29093
29093
|
e = {
|
|
29094
29094
|
scrollIntoView: !0,
|
|
29095
29095
|
...e
|
|
@@ -29105,7 +29105,7 @@ const jH = (t = null, e = {}) => ({ editor: n, view: r, tr: i, dispatch: o }) =>
|
|
|
29105
29105
|
return a(), !0;
|
|
29106
29106
|
const s = Rk(i.doc, t) || n.state.selection, l = n.state.selection.eq(s);
|
|
29107
29107
|
return o && (l || i.setSelection(s), l && i.storedMarks && i.setStoredMarks(i.storedMarks), a()), !0;
|
|
29108
|
-
},
|
|
29108
|
+
}, B9 = (t, e) => (n) => t.every((r, i) => e(r, { ...n, index: i })), V9 = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Nk = (t) => {
|
|
29109
29109
|
const e = t.childNodes;
|
|
29110
29110
|
for (let n = e.length - 1; n >= 0; n -= 1) {
|
|
29111
29111
|
const r = e[n];
|
|
@@ -29166,7 +29166,7 @@ function Ul(t, e, n) {
|
|
|
29166
29166
|
}
|
|
29167
29167
|
return Ul("", e, n);
|
|
29168
29168
|
}
|
|
29169
|
-
function
|
|
29169
|
+
function L9(t, e, n) {
|
|
29170
29170
|
const r = t.steps.length - 1;
|
|
29171
29171
|
if (r < e)
|
|
29172
29172
|
return;
|
|
@@ -29179,7 +29179,7 @@ function LH(t, e, n) {
|
|
|
29179
29179
|
a === 0 && (a = c);
|
|
29180
29180
|
}), t.setSelection(Fe.near(t.doc.resolve(a), n));
|
|
29181
29181
|
}
|
|
29182
|
-
const
|
|
29182
|
+
const G9 = (t) => !("type" in t), _9 = (t, e, n) => ({ tr: r, dispatch: i, editor: o }) => {
|
|
29183
29183
|
var a;
|
|
29184
29184
|
if (i) {
|
|
29185
29185
|
n = {
|
|
@@ -29208,7 +29208,7 @@ const GH = (t) => !("type" in t), _H = (t, e, n) => ({ tr: r, dispatch: i, edito
|
|
|
29208
29208
|
}), !1;
|
|
29209
29209
|
}
|
|
29210
29210
|
let { from: l, to: u } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
|
|
29211
|
-
if ((
|
|
29211
|
+
if ((G9(s) ? s : [s]).forEach((h) => {
|
|
29212
29212
|
h.check(), c = c ? h.isText && h.marks.length === 0 : !1, d = d ? h.isBlock : !1;
|
|
29213
29213
|
}), l === u && d) {
|
|
29214
29214
|
const { parent: h } = r.doc.resolve(l);
|
|
@@ -29227,24 +29227,24 @@ const GH = (t) => !("type" in t), _H = (t, e, n) => ({ tr: r, dispatch: i, edito
|
|
|
29227
29227
|
r.insertText(p, l, u);
|
|
29228
29228
|
} else
|
|
29229
29229
|
p = s, r.replaceWith(l, u, p);
|
|
29230
|
-
n.updateSelection &&
|
|
29230
|
+
n.updateSelection && L9(r, r.steps.length - 1, -1), n.applyInputRules && r.setMeta("applyInputRules", { from: l, text: p }), n.applyPasteRules && r.setMeta("applyPasteRules", { from: l, text: p });
|
|
29231
29231
|
}
|
|
29232
29232
|
return !0;
|
|
29233
|
-
},
|
|
29233
|
+
}, z9 = () => ({ state: t, dispatch: e }) => _W(t, e), W9 = () => ({ state: t, dispatch: e }) => zW(t, e), H9 = () => ({ state: t, dispatch: e }) => FW(t, e), $9 = () => ({ state: t, dispatch: e }) => LW(t, e), X9 = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
29234
29234
|
try {
|
|
29235
29235
|
const r = oc(t.doc, t.selection.$from.pos, -1);
|
|
29236
29236
|
return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
|
|
29237
29237
|
} catch {
|
|
29238
29238
|
return !1;
|
|
29239
29239
|
}
|
|
29240
|
-
},
|
|
29240
|
+
}, Y9 = () => ({ state: t, dispatch: e, tr: n }) => {
|
|
29241
29241
|
try {
|
|
29242
29242
|
const r = oc(t.doc, t.selection.$from.pos, 1);
|
|
29243
29243
|
return r == null ? !1 : (n.join(r, 2), e && e(n), !0);
|
|
29244
29244
|
} catch {
|
|
29245
29245
|
return !1;
|
|
29246
29246
|
}
|
|
29247
|
-
},
|
|
29247
|
+
}, Z9 = () => ({ state: t, dispatch: e }) => jW(t, e), U9 = () => ({ state: t, dispatch: e }) => BW(t, e);
|
|
29248
29248
|
function Fk() {
|
|
29249
29249
|
return [
|
|
29250
29250
|
"iPad Simulator",
|
|
@@ -29258,7 +29258,7 @@ function Fk() {
|
|
|
29258
29258
|
function jk() {
|
|
29259
29259
|
return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
|
|
29260
29260
|
}
|
|
29261
|
-
function
|
|
29261
|
+
function J9(t) {
|
|
29262
29262
|
const e = t.split(/-(?!$)/);
|
|
29263
29263
|
let n = e[e.length - 1];
|
|
29264
29264
|
n === "Space" && (n = " ");
|
|
@@ -29280,8 +29280,8 @@ function JH(t) {
|
|
|
29280
29280
|
}
|
|
29281
29281
|
return r && (n = `Alt-${n}`), i && (n = `Ctrl-${n}`), a && (n = `Meta-${n}`), o && (n = `Shift-${n}`), n;
|
|
29282
29282
|
}
|
|
29283
|
-
const
|
|
29284
|
-
const o =
|
|
29283
|
+
const K9 = (t) => ({ editor: e, view: n, tr: r, dispatch: i }) => {
|
|
29284
|
+
const o = J9(t).split(/-(?!$)/), a = o.find((u) => !["Alt", "Ctrl", "Meta", "Shift"].includes(u)), s = new KeyboardEvent("keydown", {
|
|
29285
29285
|
key: a === "Space" ? " " : a,
|
|
29286
29286
|
altKey: o.includes("Alt"),
|
|
29287
29287
|
ctrlKey: o.includes("Ctrl"),
|
|
@@ -29312,13 +29312,13 @@ function ls(t, e, n = {}) {
|
|
|
29312
29312
|
const l = i - r, u = s.filter((d) => a ? a.name === d.node.type.name : !0).filter((d) => Zl(d.node.attrs, n, { strict: !1 }));
|
|
29313
29313
|
return o ? !!u.length : u.reduce((d, f) => d + f.to - f.from, 0) >= l;
|
|
29314
29314
|
}
|
|
29315
|
-
const
|
|
29315
|
+
const q9 = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
29316
29316
|
const i = Pt(t, n.schema);
|
|
29317
29317
|
return ls(n, i, e) ? WW(n, r) : !1;
|
|
29318
|
-
},
|
|
29318
|
+
}, Q9 = () => ({ state: t, dispatch: e }) => YW(t, e), eH = (t) => ({ state: e, dispatch: n }) => {
|
|
29319
29319
|
const r = Pt(t, e.schema);
|
|
29320
|
-
return
|
|
29321
|
-
},
|
|
29320
|
+
return n9(r)(e, n);
|
|
29321
|
+
}, tH = () => ({ state: t, dispatch: e }) => HW(t, e);
|
|
29322
29322
|
function gc(t, e) {
|
|
29323
29323
|
return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
|
|
29324
29324
|
}
|
|
@@ -29326,7 +29326,7 @@ function xy(t, e) {
|
|
|
29326
29326
|
const n = typeof e == "string" ? [e] : e;
|
|
29327
29327
|
return Object.keys(t).reduce((r, i) => (n.includes(i) || (r[i] = t[i]), r), {});
|
|
29328
29328
|
}
|
|
29329
|
-
const
|
|
29329
|
+
const nH = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
|
|
29330
29330
|
let o = null, a = null;
|
|
29331
29331
|
const s = gc(typeof t == "string" ? t : t.name, r.schema);
|
|
29332
29332
|
return s ? (s === "node" && (o = Pt(t, r.schema)), s === "mark" && (a = ri(t, r.schema)), i && n.selection.ranges.forEach((l) => {
|
|
@@ -29336,13 +29336,13 @@ const n9 = (t, e) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
29336
29336
|
});
|
|
29337
29337
|
});
|
|
29338
29338
|
}), !0) : !1;
|
|
29339
|
-
},
|
|
29339
|
+
}, rH = () => ({ tr: t, dispatch: e }) => (e && t.scrollIntoView(), !0), iH = () => ({ tr: t, dispatch: e }) => {
|
|
29340
29340
|
if (e) {
|
|
29341
29341
|
const n = new En(t.doc);
|
|
29342
29342
|
t.setSelection(n);
|
|
29343
29343
|
}
|
|
29344
29344
|
return !0;
|
|
29345
|
-
},
|
|
29345
|
+
}, oH = () => ({ state: t, dispatch: e }) => VW(t, e), aH = () => ({ state: t, dispatch: e }) => GW(t, e), sH = () => ({ state: t, dispatch: e }) => ZW(t, e), lH = () => ({ state: t, dispatch: e }) => KW(t, e), uH = () => ({ state: t, dispatch: e }) => JW(t, e);
|
|
29346
29346
|
function op(t, e, n = {}, r = {}) {
|
|
29347
29347
|
return Ul(t, e, {
|
|
29348
29348
|
slice: !1,
|
|
@@ -29350,7 +29350,7 @@ function op(t, e, n = {}, r = {}) {
|
|
|
29350
29350
|
errorOnInvalidContent: r.errorOnInvalidContent
|
|
29351
29351
|
});
|
|
29352
29352
|
}
|
|
29353
|
-
const
|
|
29353
|
+
const cH = (t, e = !1, n = {}, r = {}) => ({ editor: i, tr: o, dispatch: a, commands: s }) => {
|
|
29354
29354
|
var l, u;
|
|
29355
29355
|
const { doc: c } = o;
|
|
29356
29356
|
if (n.preserveWhitespace !== "full") {
|
|
@@ -29372,7 +29372,7 @@ function Bk(t, e) {
|
|
|
29372
29372
|
const s = a.find((l) => l.type.name === n.name);
|
|
29373
29373
|
return s ? { ...s.attrs } : {};
|
|
29374
29374
|
}
|
|
29375
|
-
function
|
|
29375
|
+
function dH(t, e) {
|
|
29376
29376
|
const n = new BS(t);
|
|
29377
29377
|
return e.forEach((r) => {
|
|
29378
29378
|
r.steps.forEach((i) => {
|
|
@@ -29380,7 +29380,7 @@ function d9(t, e) {
|
|
|
29380
29380
|
});
|
|
29381
29381
|
}), n;
|
|
29382
29382
|
}
|
|
29383
|
-
function
|
|
29383
|
+
function fH(t) {
|
|
29384
29384
|
for (let e = 0; e < t.edgeCount; e += 1) {
|
|
29385
29385
|
const { type: n } = t.edge(e);
|
|
29386
29386
|
if (n.isTextblock && !n.hasRequiredAttrs())
|
|
@@ -29388,7 +29388,7 @@ function f9(t) {
|
|
|
29388
29388
|
}
|
|
29389
29389
|
return null;
|
|
29390
29390
|
}
|
|
29391
|
-
function
|
|
29391
|
+
function pH(t, e, n) {
|
|
29392
29392
|
const r = [];
|
|
29393
29393
|
return t.nodesBetween(e.from, e.to, (i, o) => {
|
|
29394
29394
|
n(i) && r.push({
|
|
@@ -29397,7 +29397,7 @@ function p9(t, e, n) {
|
|
|
29397
29397
|
});
|
|
29398
29398
|
}), r;
|
|
29399
29399
|
}
|
|
29400
|
-
function
|
|
29400
|
+
function hH(t, e) {
|
|
29401
29401
|
for (let n = t.depth; n > 0; n -= 1) {
|
|
29402
29402
|
const r = t.node(n);
|
|
29403
29403
|
if (e(r))
|
|
@@ -29410,16 +29410,16 @@ function h9(t, e) {
|
|
|
29410
29410
|
}
|
|
29411
29411
|
}
|
|
29412
29412
|
function um(t) {
|
|
29413
|
-
return (e) =>
|
|
29413
|
+
return (e) => hH(e.$from, t);
|
|
29414
29414
|
}
|
|
29415
|
-
function
|
|
29415
|
+
function mH(t, e) {
|
|
29416
29416
|
const n = {
|
|
29417
29417
|
from: 0,
|
|
29418
29418
|
to: t.content.size
|
|
29419
29419
|
};
|
|
29420
29420
|
return Mk(t, n, e);
|
|
29421
29421
|
}
|
|
29422
|
-
function
|
|
29422
|
+
function gH(t, e) {
|
|
29423
29423
|
const n = Pt(e, t.schema), { from: r, to: i } = t.selection, o = [];
|
|
29424
29424
|
t.doc.nodesBetween(r, i, (s) => {
|
|
29425
29425
|
o.push(s);
|
|
@@ -29429,20 +29429,20 @@ function g9(t, e) {
|
|
|
29429
29429
|
}
|
|
29430
29430
|
function Vk(t, e) {
|
|
29431
29431
|
const n = gc(typeof e == "string" ? e : e.name, t.schema);
|
|
29432
|
-
return n === "node" ?
|
|
29432
|
+
return n === "node" ? gH(t, e) : n === "mark" ? Bk(t, e) : {};
|
|
29433
29433
|
}
|
|
29434
|
-
function
|
|
29434
|
+
function bH(t, e = JSON.stringify) {
|
|
29435
29435
|
const n = {};
|
|
29436
29436
|
return t.filter((r) => {
|
|
29437
29437
|
const i = e(r);
|
|
29438
29438
|
return Object.prototype.hasOwnProperty.call(n, i) ? !1 : n[i] = !0;
|
|
29439
29439
|
});
|
|
29440
29440
|
}
|
|
29441
|
-
function
|
|
29442
|
-
const e =
|
|
29441
|
+
function vH(t) {
|
|
29442
|
+
const e = bH(t);
|
|
29443
29443
|
return e.length === 1 ? e : e.filter((n, r) => !e.filter((o, a) => a !== r).some((o) => n.oldRange.from >= o.oldRange.from && n.oldRange.to <= o.oldRange.to && n.newRange.from >= o.newRange.from && n.newRange.to <= o.newRange.to));
|
|
29444
29444
|
}
|
|
29445
|
-
function
|
|
29445
|
+
function yH(t) {
|
|
29446
29446
|
const { mapping: e, steps: n } = t, r = [];
|
|
29447
29447
|
return e.maps.forEach((i, o) => {
|
|
29448
29448
|
const a = [];
|
|
@@ -29469,7 +29469,7 @@ function y9(t) {
|
|
|
29469
29469
|
}
|
|
29470
29470
|
});
|
|
29471
29471
|
});
|
|
29472
|
-
}),
|
|
29472
|
+
}), vH(r);
|
|
29473
29473
|
}
|
|
29474
29474
|
function cm(t, e, n) {
|
|
29475
29475
|
const r = [];
|
|
@@ -29516,7 +29516,7 @@ function ap(t, e, n = {}) {
|
|
|
29516
29516
|
const l = s.filter((d) => o ? o.name === d.mark.type.name : !0).filter((d) => Zl(d.mark.attrs, n, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), u = s.filter((d) => o ? d.mark.type !== o && d.mark.type.excludes(o) : !0).reduce((d, f) => d + f.to - f.from, 0);
|
|
29517
29517
|
return (l > 0 ? l + u : l) >= a;
|
|
29518
29518
|
}
|
|
29519
|
-
function
|
|
29519
|
+
function xH(t, e, n = {}) {
|
|
29520
29520
|
if (!e)
|
|
29521
29521
|
return ls(t, null, n) || ap(t, null, n);
|
|
29522
29522
|
const r = gc(e, t.schema);
|
|
@@ -29555,10 +29555,10 @@ function dm(t, { checkChildren: e = !0, ignoreWhitespace: n = !1 } = {}) {
|
|
|
29555
29555
|
}
|
|
29556
29556
|
return !1;
|
|
29557
29557
|
}
|
|
29558
|
-
function
|
|
29558
|
+
function CH(t) {
|
|
29559
29559
|
return t instanceof Ee;
|
|
29560
29560
|
}
|
|
29561
|
-
function
|
|
29561
|
+
function wH(t, e, n) {
|
|
29562
29562
|
var r;
|
|
29563
29563
|
const { selection: i } = e;
|
|
29564
29564
|
let o = null;
|
|
@@ -29580,7 +29580,7 @@ function w9(t, e, n) {
|
|
|
29580
29580
|
}), u;
|
|
29581
29581
|
});
|
|
29582
29582
|
}
|
|
29583
|
-
const
|
|
29583
|
+
const SH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
29584
29584
|
const { selection: o } = n, { empty: a, ranges: s } = o, l = ri(t, r.schema);
|
|
29585
29585
|
if (i)
|
|
29586
29586
|
if (a) {
|
|
@@ -29602,26 +29602,26 @@ const S9 = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
29602
29602
|
}) : n.addMark(h, m, l.create(e));
|
|
29603
29603
|
});
|
|
29604
29604
|
});
|
|
29605
|
-
return
|
|
29606
|
-
},
|
|
29605
|
+
return wH(r, n, l);
|
|
29606
|
+
}, kH = (t, e) => ({ tr: n }) => (n.setMeta(t, e), !0), EH = (t, e = {}) => ({ state: n, dispatch: r, chain: i }) => {
|
|
29607
29607
|
const o = Pt(t, n.schema);
|
|
29608
29608
|
let a;
|
|
29609
29609
|
return n.selection.$anchor.sameParent(n.selection.$head) && (a = n.selection.$anchor.parent.attrs), o.isTextblock ? i().command(({ commands: s }) => my(o, { ...a, ...e })(n) ? !0 : s.clearNodes()).command(({ state: s }) => my(o, { ...a, ...e })(s, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
29610
|
-
},
|
|
29610
|
+
}, IH = (t) => ({ tr: e, dispatch: n }) => {
|
|
29611
29611
|
if (n) {
|
|
29612
29612
|
const { doc: r } = e, i = wi(t, 0, r.content.size), o = Ee.create(r, i);
|
|
29613
29613
|
e.setSelection(o);
|
|
29614
29614
|
}
|
|
29615
29615
|
return !0;
|
|
29616
|
-
},
|
|
29616
|
+
}, TH = (t) => ({ tr: e, dispatch: n }) => {
|
|
29617
29617
|
if (n) {
|
|
29618
29618
|
const { doc: r } = e, { from: i, to: o } = typeof t == "number" ? { from: t, to: t } : t, a = Re.atStart(r).from, s = Re.atEnd(r).to, l = wi(i, a, s), u = wi(o, a, s), c = Re.create(r, l, u);
|
|
29619
29619
|
e.setSelection(c);
|
|
29620
29620
|
}
|
|
29621
29621
|
return !0;
|
|
29622
|
-
},
|
|
29622
|
+
}, AH = (t) => ({ state: e, dispatch: n }) => {
|
|
29623
29623
|
const r = Pt(t, e.schema);
|
|
29624
|
-
return
|
|
29624
|
+
return o9(r)(e, n);
|
|
29625
29625
|
};
|
|
29626
29626
|
function wy(t, e) {
|
|
29627
29627
|
const n = t.storedMarks || t.selection.$to.parentOffset && t.selection.$from.marks();
|
|
@@ -29630,13 +29630,13 @@ function wy(t, e) {
|
|
|
29630
29630
|
t.tr.ensureMarks(r);
|
|
29631
29631
|
}
|
|
29632
29632
|
}
|
|
29633
|
-
const
|
|
29633
|
+
const MH = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: i }) => {
|
|
29634
29634
|
const { selection: o, doc: a } = e, { $from: s, $to: l } = o, u = i.extensionManager.attributes, c = ml(u, s.node().type.name, s.node().attrs);
|
|
29635
29635
|
if (o instanceof Ee && o.node.isBlock)
|
|
29636
29636
|
return !s.parentOffset || !Co(a, s.pos) ? !1 : (r && (t && wy(n, i.extensionManager.splittableMarks), e.split(s.pos).scrollIntoView()), !0);
|
|
29637
29637
|
if (!s.parent.isBlock)
|
|
29638
29638
|
return !1;
|
|
29639
|
-
const d = l.parentOffset === l.parent.content.size, f = s.depth === 0 ? void 0 :
|
|
29639
|
+
const d = l.parentOffset === l.parent.content.size, f = s.depth === 0 ? void 0 : fH(s.node(-1).contentMatchAt(s.indexAfter(-1)));
|
|
29640
29640
|
let p = d && f ? [
|
|
29641
29641
|
{
|
|
29642
29642
|
type: f,
|
|
@@ -29656,7 +29656,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29656
29656
|
t && wy(n, i.extensionManager.splittableMarks), e.scrollIntoView();
|
|
29657
29657
|
}
|
|
29658
29658
|
return h;
|
|
29659
|
-
},
|
|
29659
|
+
}, OH = (t, e = {}) => ({ tr: n, state: r, dispatch: i, editor: o }) => {
|
|
29660
29660
|
var a;
|
|
29661
29661
|
const s = Pt(t, r.schema), { $from: l, $to: u } = r.selection, c = r.selection.node;
|
|
29662
29662
|
if (c && c.isBlock || l.depth < 2 || !l.sameParent(u))
|
|
@@ -29729,7 +29729,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29729
29729
|
return !0;
|
|
29730
29730
|
const i = t.doc.nodeAt(r);
|
|
29731
29731
|
return n.node.type === (i == null ? void 0 : i.type) && ti(t.doc, r) && t.join(r), !0;
|
|
29732
|
-
},
|
|
29732
|
+
}, PH = (t, e, n, r = {}) => ({ editor: i, tr: o, state: a, dispatch: s, chain: l, commands: u, can: c }) => {
|
|
29733
29733
|
const { extensions: d, splittableMarks: f } = i.extensionManager, p = Pt(t, a.schema), h = Pt(e, a.schema), { selection: m, storedMarks: g } = a, { $from: b, $to: x } = m, w = b.blockRange(x), v = g || m.$to.parentOffset && m.$from.marks();
|
|
29734
29734
|
if (!w)
|
|
29735
29735
|
return !1;
|
|
@@ -29744,17 +29744,17 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29744
29744
|
const C = c().wrapInList(p, r), E = v.filter((S) => f.includes(S.type.name));
|
|
29745
29745
|
return o.ensureMarks(E), C ? !0 : u.clearNodes();
|
|
29746
29746
|
}).wrapInList(p, r).command(() => bd(o, p)).command(() => vd(o, p)).run();
|
|
29747
|
-
},
|
|
29747
|
+
}, DH = (t, e = {}, n = {}) => ({ state: r, commands: i }) => {
|
|
29748
29748
|
const { extendEmptyMarkRange: o = !1 } = n, a = ri(t, r.schema);
|
|
29749
29749
|
return ap(r, a, e) ? i.unsetMark(a, { extendEmptyMarkRange: o }) : i.setMark(a, e);
|
|
29750
|
-
},
|
|
29750
|
+
}, RH = (t, e, n = {}) => ({ state: r, commands: i }) => {
|
|
29751
29751
|
const o = Pt(t, r.schema), a = Pt(e, r.schema), s = ls(r, o, n);
|
|
29752
29752
|
let l;
|
|
29753
29753
|
return r.selection.$anchor.sameParent(r.selection.$head) && (l = r.selection.$anchor.parent.attrs), s ? i.setNode(a, l) : i.setNode(o, { ...l, ...n });
|
|
29754
|
-
},
|
|
29754
|
+
}, NH = (t, e = {}) => ({ state: n, commands: r }) => {
|
|
29755
29755
|
const i = Pt(t, n.schema);
|
|
29756
29756
|
return ls(n, i, e) ? r.lift(i) : r.wrapIn(i, e);
|
|
29757
|
-
},
|
|
29757
|
+
}, FH = () => ({ state: t, dispatch: e }) => {
|
|
29758
29758
|
const n = t.plugins;
|
|
29759
29759
|
for (let r = 0; r < n.length; r += 1) {
|
|
29760
29760
|
const i = n[r];
|
|
@@ -29774,12 +29774,12 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29774
29774
|
}
|
|
29775
29775
|
}
|
|
29776
29776
|
return !1;
|
|
29777
|
-
},
|
|
29777
|
+
}, jH = () => ({ tr: t, dispatch: e }) => {
|
|
29778
29778
|
const { selection: n } = t, { empty: r, ranges: i } = n;
|
|
29779
29779
|
return r || e && i.forEach((o) => {
|
|
29780
29780
|
t.removeMark(o.$from.pos, o.$to.pos);
|
|
29781
29781
|
}), !0;
|
|
29782
|
-
},
|
|
29782
|
+
}, BH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
29783
29783
|
var o;
|
|
29784
29784
|
const { extendEmptyMarkRange: a = !1 } = e, { selection: s } = n, l = ri(t, r.schema), { $from: u, empty: c, ranges: d } = s;
|
|
29785
29785
|
if (!i)
|
|
@@ -29793,7 +29793,7 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29793
29793
|
n.removeMark(f.$from.pos, f.$to.pos, l);
|
|
29794
29794
|
});
|
|
29795
29795
|
return n.removeStoredMark(l), !0;
|
|
29796
|
-
},
|
|
29796
|
+
}, VH = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
29797
29797
|
let o = null, a = null;
|
|
29798
29798
|
const s = gc(typeof t == "string" ? t : t.name, r.schema);
|
|
29799
29799
|
return s ? (s === "node" && (o = Pt(t, r.schema)), s === "mark" && (a = ri(t, r.schema)), i && n.selection.ranges.forEach((l) => {
|
|
@@ -29824,82 +29824,82 @@ const M9 = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
29824
29824
|
}));
|
|
29825
29825
|
}));
|
|
29826
29826
|
}), !0) : !1;
|
|
29827
|
-
},
|
|
29827
|
+
}, LH = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
29828
29828
|
const i = Pt(t, n.schema);
|
|
29829
29829
|
return qW(i, e)(n, r);
|
|
29830
|
-
},
|
|
29830
|
+
}, GH = (t, e = {}) => ({ state: n, dispatch: r }) => {
|
|
29831
29831
|
const i = Pt(t, n.schema);
|
|
29832
29832
|
return QW(i, e)(n, r);
|
|
29833
29833
|
};
|
|
29834
|
-
var
|
|
29834
|
+
var _H = /* @__PURE__ */ Object.freeze({
|
|
29835
29835
|
__proto__: null,
|
|
29836
|
-
blur:
|
|
29837
|
-
clearContent:
|
|
29838
|
-
clearNodes:
|
|
29839
|
-
command:
|
|
29840
|
-
createParagraphNear:
|
|
29841
|
-
cut:
|
|
29842
|
-
deleteCurrentNode:
|
|
29843
|
-
deleteNode:
|
|
29844
|
-
deleteRange:
|
|
29845
|
-
deleteSelection:
|
|
29846
|
-
enter:
|
|
29847
|
-
exitCode:
|
|
29848
|
-
extendMarkRange:
|
|
29849
|
-
first:
|
|
29850
|
-
focus:
|
|
29851
|
-
forEach:
|
|
29852
|
-
insertContent:
|
|
29853
|
-
insertContentAt:
|
|
29854
|
-
joinBackward:
|
|
29855
|
-
joinDown:
|
|
29856
|
-
joinForward: $
|
|
29857
|
-
joinItemBackward:
|
|
29858
|
-
joinItemForward:
|
|
29859
|
-
joinTextblockBackward:
|
|
29860
|
-
joinTextblockForward:
|
|
29861
|
-
joinUp:
|
|
29862
|
-
keyboardShortcut:
|
|
29863
|
-
lift:
|
|
29864
|
-
liftEmptyBlock:
|
|
29865
|
-
liftListItem:
|
|
29866
|
-
newlineInCode:
|
|
29867
|
-
resetAttributes:
|
|
29868
|
-
scrollIntoView:
|
|
29869
|
-
selectAll:
|
|
29870
|
-
selectNodeBackward:
|
|
29871
|
-
selectNodeForward:
|
|
29872
|
-
selectParentNode:
|
|
29873
|
-
selectTextblockEnd:
|
|
29874
|
-
selectTextblockStart:
|
|
29875
|
-
setContent:
|
|
29876
|
-
setMark:
|
|
29877
|
-
setMeta:
|
|
29878
|
-
setNode:
|
|
29879
|
-
setNodeSelection:
|
|
29880
|
-
setTextSelection:
|
|
29881
|
-
sinkListItem:
|
|
29882
|
-
splitBlock:
|
|
29883
|
-
splitListItem:
|
|
29884
|
-
toggleList:
|
|
29885
|
-
toggleMark:
|
|
29886
|
-
toggleNode:
|
|
29887
|
-
toggleWrap:
|
|
29888
|
-
undoInputRule:
|
|
29889
|
-
unsetAllMarks:
|
|
29890
|
-
unsetMark:
|
|
29891
|
-
updateAttributes:
|
|
29892
|
-
wrapIn:
|
|
29893
|
-
wrapInList:
|
|
29836
|
+
blur: w9,
|
|
29837
|
+
clearContent: S9,
|
|
29838
|
+
clearNodes: k9,
|
|
29839
|
+
command: E9,
|
|
29840
|
+
createParagraphNear: I9,
|
|
29841
|
+
cut: T9,
|
|
29842
|
+
deleteCurrentNode: A9,
|
|
29843
|
+
deleteNode: M9,
|
|
29844
|
+
deleteRange: O9,
|
|
29845
|
+
deleteSelection: P9,
|
|
29846
|
+
enter: D9,
|
|
29847
|
+
exitCode: R9,
|
|
29848
|
+
extendMarkRange: N9,
|
|
29849
|
+
first: F9,
|
|
29850
|
+
focus: j9,
|
|
29851
|
+
forEach: B9,
|
|
29852
|
+
insertContent: V9,
|
|
29853
|
+
insertContentAt: _9,
|
|
29854
|
+
joinBackward: H9,
|
|
29855
|
+
joinDown: W9,
|
|
29856
|
+
joinForward: $9,
|
|
29857
|
+
joinItemBackward: X9,
|
|
29858
|
+
joinItemForward: Y9,
|
|
29859
|
+
joinTextblockBackward: Z9,
|
|
29860
|
+
joinTextblockForward: U9,
|
|
29861
|
+
joinUp: z9,
|
|
29862
|
+
keyboardShortcut: K9,
|
|
29863
|
+
lift: q9,
|
|
29864
|
+
liftEmptyBlock: Q9,
|
|
29865
|
+
liftListItem: eH,
|
|
29866
|
+
newlineInCode: tH,
|
|
29867
|
+
resetAttributes: nH,
|
|
29868
|
+
scrollIntoView: rH,
|
|
29869
|
+
selectAll: iH,
|
|
29870
|
+
selectNodeBackward: oH,
|
|
29871
|
+
selectNodeForward: aH,
|
|
29872
|
+
selectParentNode: sH,
|
|
29873
|
+
selectTextblockEnd: lH,
|
|
29874
|
+
selectTextblockStart: uH,
|
|
29875
|
+
setContent: cH,
|
|
29876
|
+
setMark: SH,
|
|
29877
|
+
setMeta: kH,
|
|
29878
|
+
setNode: EH,
|
|
29879
|
+
setNodeSelection: IH,
|
|
29880
|
+
setTextSelection: TH,
|
|
29881
|
+
sinkListItem: AH,
|
|
29882
|
+
splitBlock: MH,
|
|
29883
|
+
splitListItem: OH,
|
|
29884
|
+
toggleList: PH,
|
|
29885
|
+
toggleMark: DH,
|
|
29886
|
+
toggleNode: RH,
|
|
29887
|
+
toggleWrap: NH,
|
|
29888
|
+
undoInputRule: FH,
|
|
29889
|
+
unsetAllMarks: jH,
|
|
29890
|
+
unsetMark: BH,
|
|
29891
|
+
updateAttributes: VH,
|
|
29892
|
+
wrapIn: LH,
|
|
29893
|
+
wrapInList: GH
|
|
29894
29894
|
});
|
|
29895
|
-
const
|
|
29895
|
+
const zH = Yt.create({
|
|
29896
29896
|
name: "commands",
|
|
29897
29897
|
addCommands() {
|
|
29898
29898
|
return {
|
|
29899
|
-
...
|
|
29899
|
+
..._H
|
|
29900
29900
|
};
|
|
29901
29901
|
}
|
|
29902
|
-
}),
|
|
29902
|
+
}), WH = Yt.create({
|
|
29903
29903
|
name: "drop",
|
|
29904
29904
|
addProseMirrorPlugins() {
|
|
29905
29905
|
return [
|
|
@@ -29918,7 +29918,7 @@ const z9 = Yt.create({
|
|
|
29918
29918
|
})
|
|
29919
29919
|
];
|
|
29920
29920
|
}
|
|
29921
|
-
}),
|
|
29921
|
+
}), HH = Yt.create({
|
|
29922
29922
|
name: "editable",
|
|
29923
29923
|
addProseMirrorPlugins() {
|
|
29924
29924
|
return [
|
|
@@ -29930,7 +29930,7 @@ const z9 = Yt.create({
|
|
|
29930
29930
|
})
|
|
29931
29931
|
];
|
|
29932
29932
|
}
|
|
29933
|
-
}), $
|
|
29933
|
+
}), $H = Yt.create({
|
|
29934
29934
|
name: "focusEvents",
|
|
29935
29935
|
addProseMirrorPlugins() {
|
|
29936
29936
|
const { editor: t } = this;
|
|
@@ -29954,7 +29954,7 @@ const z9 = Yt.create({
|
|
|
29954
29954
|
})
|
|
29955
29955
|
];
|
|
29956
29956
|
}
|
|
29957
|
-
}),
|
|
29957
|
+
}), XH = Yt.create({
|
|
29958
29958
|
name: "keymap",
|
|
29959
29959
|
addKeyboardShortcuts() {
|
|
29960
29960
|
const t = () => this.editor.commands.first(({ commands: a }) => [
|
|
@@ -30030,7 +30030,7 @@ const z9 = Yt.create({
|
|
|
30030
30030
|
})
|
|
30031
30031
|
];
|
|
30032
30032
|
}
|
|
30033
|
-
}),
|
|
30033
|
+
}), YH = Yt.create({
|
|
30034
30034
|
name: "paste",
|
|
30035
30035
|
addProseMirrorPlugins() {
|
|
30036
30036
|
return [
|
|
@@ -30048,7 +30048,7 @@ const z9 = Yt.create({
|
|
|
30048
30048
|
})
|
|
30049
30049
|
];
|
|
30050
30050
|
}
|
|
30051
|
-
}),
|
|
30051
|
+
}), ZH = Yt.create({
|
|
30052
30052
|
name: "tabindex",
|
|
30053
30053
|
addProseMirrorPlugins() {
|
|
30054
30054
|
return [
|
|
@@ -30184,7 +30184,7 @@ class pi {
|
|
|
30184
30184
|
}), this.editor.view.dispatch(n);
|
|
30185
30185
|
}
|
|
30186
30186
|
}
|
|
30187
|
-
const
|
|
30187
|
+
const UH = `.ProseMirror {
|
|
30188
30188
|
position: relative;
|
|
30189
30189
|
}
|
|
30190
30190
|
|
|
@@ -30259,14 +30259,14 @@ img.ProseMirror-separator {
|
|
|
30259
30259
|
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
30260
30260
|
opacity: 0
|
|
30261
30261
|
}`;
|
|
30262
|
-
function
|
|
30262
|
+
function JH(t, e, n) {
|
|
30263
30263
|
const r = document.querySelector("style[data-tiptap-style]");
|
|
30264
30264
|
if (r !== null)
|
|
30265
30265
|
return r;
|
|
30266
30266
|
const i = document.createElement("style");
|
|
30267
30267
|
return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = t, document.getElementsByTagName("head")[0].appendChild(i), i;
|
|
30268
30268
|
}
|
|
30269
|
-
let
|
|
30269
|
+
let KH = class extends a9 {
|
|
30270
30270
|
constructor(e = {}) {
|
|
30271
30271
|
super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
|
|
30272
30272
|
element: document.createElement("div"),
|
|
@@ -30328,7 +30328,7 @@ let K9 = class extends aH {
|
|
|
30328
30328
|
* Inject CSS styles.
|
|
30329
30329
|
*/
|
|
30330
30330
|
injectCSS() {
|
|
30331
|
-
this.options.injectCSS && document && (this.css =
|
|
30331
|
+
this.options.injectCSS && document && (this.css = JH(UH, this.options.injectNonce));
|
|
30332
30332
|
}
|
|
30333
30333
|
/**
|
|
30334
30334
|
* Update editor options.
|
|
@@ -30397,16 +30397,16 @@ let K9 = class extends aH {
|
|
|
30397
30397
|
createExtensionManager() {
|
|
30398
30398
|
var e, n;
|
|
30399
30399
|
const i = [...this.options.enableCoreExtensions ? [
|
|
30400
|
-
|
|
30401
|
-
|
|
30400
|
+
HH,
|
|
30401
|
+
C9.configure({
|
|
30402
30402
|
blockSeparator: (n = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || n === void 0 ? void 0 : n.blockSeparator
|
|
30403
30403
|
}),
|
|
30404
|
-
|
|
30405
|
-
$
|
|
30406
|
-
|
|
30407
|
-
|
|
30408
|
-
|
|
30409
|
-
|
|
30404
|
+
zH,
|
|
30405
|
+
$H,
|
|
30406
|
+
XH,
|
|
30407
|
+
ZH,
|
|
30408
|
+
WH,
|
|
30409
|
+
YH
|
|
30410
30410
|
].filter((o) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[o.name] !== !1 : !0) : [], ...this.options.extensions].filter((o) => ["extension", "node", "mark"].includes(o == null ? void 0 : o.type));
|
|
30411
30411
|
this.extensionManager = new vo(i, this);
|
|
30412
30412
|
}
|
|
@@ -30536,7 +30536,7 @@ let K9 = class extends aH {
|
|
|
30536
30536
|
}
|
|
30537
30537
|
isActive(e, n) {
|
|
30538
30538
|
const r = typeof e == "string" ? e : null, i = typeof e == "string" ? n : e;
|
|
30539
|
-
return
|
|
30539
|
+
return xH(this.state, r, i);
|
|
30540
30540
|
}
|
|
30541
30541
|
/**
|
|
30542
30542
|
* Get the document as JSON.
|
|
@@ -30557,7 +30557,7 @@ let K9 = class extends aH {
|
|
|
30557
30557
|
const { blockSeparator: n = `
|
|
30558
30558
|
|
|
30559
30559
|
`, textSerializers: r = {} } = e || {};
|
|
30560
|
-
return
|
|
30560
|
+
return mH(this.state.doc, {
|
|
30561
30561
|
blockSeparator: n,
|
|
30562
30562
|
textSerializers: {
|
|
30563
30563
|
...Ok(this.schema),
|
|
@@ -30631,7 +30631,7 @@ function Go(t) {
|
|
|
30631
30631
|
}
|
|
30632
30632
|
});
|
|
30633
30633
|
}
|
|
30634
|
-
function
|
|
30634
|
+
function qH(t) {
|
|
30635
30635
|
return new hc({
|
|
30636
30636
|
find: t.find,
|
|
30637
30637
|
handler: ({ state: e, range: n, match: r }) => {
|
|
@@ -30722,7 +30722,7 @@ let Vn = class lp {
|
|
|
30722
30722
|
}
|
|
30723
30723
|
};
|
|
30724
30724
|
function Wi(t) {
|
|
30725
|
-
return new
|
|
30725
|
+
return new m9({
|
|
30726
30726
|
find: t.find,
|
|
30727
30727
|
handler: ({ state: e, range: n, match: r, pasteEvent: i }) => {
|
|
30728
30728
|
const o = Ge(t.getAttributes, void 0, r, i);
|
|
@@ -30739,7 +30739,7 @@ function Wi(t) {
|
|
|
30739
30739
|
}
|
|
30740
30740
|
});
|
|
30741
30741
|
}
|
|
30742
|
-
function
|
|
30742
|
+
function QH(t) {
|
|
30743
30743
|
return t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
30744
30744
|
}
|
|
30745
30745
|
var up = { exports: {} }, yd = {};
|
|
@@ -31016,7 +31016,7 @@ var l5 = function t(e, n) {
|
|
|
31016
31016
|
return !0;
|
|
31017
31017
|
}
|
|
31018
31018
|
return e !== e && n !== n;
|
|
31019
|
-
}, u5 = /* @__PURE__ */
|
|
31019
|
+
}, u5 = /* @__PURE__ */ QH(l5), cp = { exports: {} }, Cd = {};
|
|
31020
31020
|
/**
|
|
31021
31021
|
* @license React
|
|
31022
31022
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
@@ -31236,7 +31236,7 @@ class b5 {
|
|
|
31236
31236
|
return (o = (i = this.options.current).onPaste) === null || o === void 0 ? void 0 : o.call(i, ...r);
|
|
31237
31237
|
}
|
|
31238
31238
|
};
|
|
31239
|
-
return new
|
|
31239
|
+
return new KH(e);
|
|
31240
31240
|
}
|
|
31241
31241
|
/**
|
|
31242
31242
|
* Get the current editor instance.
|
|
@@ -32208,9 +32208,9 @@ function W5(t) {
|
|
|
32208
32208
|
const i = e.some((u) => u.docChanged) && !n.doc.eq(r.doc), o = e.some((u) => u.getMeta("preventAutolink"));
|
|
32209
32209
|
if (!i || o)
|
|
32210
32210
|
return;
|
|
32211
|
-
const { tr: a } = r, s =
|
|
32212
|
-
if (
|
|
32213
|
-
const c =
|
|
32211
|
+
const { tr: a } = r, s = dH(n.doc, [...e]);
|
|
32212
|
+
if (yH(s).forEach(({ newRange: u }) => {
|
|
32213
|
+
const c = pH(r.doc, u, (p) => p.isTextblock);
|
|
32214
32214
|
let d, f;
|
|
32215
32215
|
if (c.length > 1 ? (d = c[0], f = r.doc.textBetween(d.pos, d.pos + d.node.nodeSize, void 0, " ")) : c.length && r.doc.textBetween(u.from, u.to, " ", " ").endsWith(" ") && (d = c[0], f = r.doc.textBetween(d.pos, u.to, void 0, " ")), d && f) {
|
|
32216
32216
|
const p = f.split(" ").filter((b) => b !== "");
|
|
@@ -33512,7 +33512,7 @@ const qk = Kk(!1, !0), Qk = Kk(!0, !0), P$ = Yt.create({
|
|
|
33512
33512
|
to: i.pos
|
|
33513
33513
|
}, {
|
|
33514
33514
|
type: this.name
|
|
33515
|
-
}) :
|
|
33515
|
+
}) : CH(n) ? o.insertContentAt(i.pos, {
|
|
33516
33516
|
type: this.name
|
|
33517
33517
|
}) : o.insertContent({ type: this.name }), o.command(({ tr: a, dispatch: s }) => {
|
|
33518
33518
|
var l;
|
|
@@ -33533,7 +33533,7 @@ const qk = Kk(!1, !0), Qk = Kk(!0, !0), P$ = Yt.create({
|
|
|
33533
33533
|
},
|
|
33534
33534
|
addInputRules() {
|
|
33535
33535
|
return [
|
|
33536
|
-
|
|
33536
|
+
qH({
|
|
33537
33537
|
find: /^(?:---|—-|___\s|\*\*\*\s)$/,
|
|
33538
33538
|
type: this.type
|
|
33539
33539
|
})
|
|
@@ -41500,28 +41500,29 @@ const JY = ({
|
|
|
41500
41500
|
onChange: r,
|
|
41501
41501
|
filterDisabled: i,
|
|
41502
41502
|
externalInputValue: o,
|
|
41503
|
-
externalOnInputChange: a
|
|
41503
|
+
externalOnInputChange: a,
|
|
41504
|
+
externalHandlers: s
|
|
41504
41505
|
}) => {
|
|
41505
|
-
const [
|
|
41506
|
-
const { value:
|
|
41507
|
-
|
|
41508
|
-
},
|
|
41509
|
-
(
|
|
41510
|
-
), [n, t,
|
|
41511
|
-
if (
|
|
41512
|
-
if (!Array.isArray(
|
|
41513
|
-
const
|
|
41514
|
-
|
|
41515
|
-
}
|
|
41516
|
-
r && r(
|
|
41506
|
+
const [l, u] = De(""), c = (g) => e ? e(g) : g.label, d = (g) => {
|
|
41507
|
+
const { value: b } = g.target;
|
|
41508
|
+
u(b);
|
|
41509
|
+
}, f = Pe(() => i || !n ? t : t.filter(
|
|
41510
|
+
(g) => c(g).toLowerCase().includes(o ? o.toLowerCase() : l.toLowerCase())
|
|
41511
|
+
), [n, t, c, l, o, i]), p = (g) => {
|
|
41512
|
+
if (g) {
|
|
41513
|
+
if (!Array.isArray(g)) {
|
|
41514
|
+
const b = c(g);
|
|
41515
|
+
u(b), a && a(b), s != null && s.onInputChange && (s == null || s.onInputChange(b));
|
|
41516
|
+
}
|
|
41517
|
+
r && r(g), s != null && s.onChange && (s == null || s.onChange(g));
|
|
41517
41518
|
}
|
|
41518
41519
|
};
|
|
41519
|
-
return { options:
|
|
41520
|
-
const
|
|
41521
|
-
|
|
41522
|
-
}, selectDisplayValue: (
|
|
41523
|
-
if (
|
|
41524
|
-
return Array.isArray(
|
|
41520
|
+
return { options: f, inputValue: l, onInputValueChange: d, onValueChange: p, onDeleteItem: (g, b) => {
|
|
41521
|
+
const x = Array.isArray(g) && g.filter((w) => w.value !== b.value) || [];
|
|
41522
|
+
p(x);
|
|
41523
|
+
}, selectDisplayValue: (g) => {
|
|
41524
|
+
if (g)
|
|
41525
|
+
return Array.isArray(g) ? g.map((b) => c(b)).join(", ") : c(g);
|
|
41525
41526
|
} };
|
|
41526
41527
|
}, KY = ({ option: t, classes: e, displayValue: n, isMulti: r, motionProps: i, ...o }) => {
|
|
41527
41528
|
const a = n ? n(t) : t.label, { item: s, helperText: l } = e || {}, u = r || t.attachment || t.helperText ? "div" : Bt;
|
|
@@ -41576,9 +41577,10 @@ const JY = ({
|
|
|
41576
41577
|
filterDisabled: c = !1,
|
|
41577
41578
|
inputValue: d,
|
|
41578
41579
|
onInputChange: f,
|
|
41579
|
-
|
|
41580
|
-
|
|
41581
|
-
|
|
41580
|
+
externalHandlers: p,
|
|
41581
|
+
...h
|
|
41582
|
+
}, m) => {
|
|
41583
|
+
const { root: g, list: b, ...x } = o || {}, { options: w, inputValue: v, onValueChange: y, onInputValueChange: C, selectDisplayValue: E } = JY({
|
|
41582
41584
|
options: i,
|
|
41583
41585
|
isSearchable: r,
|
|
41584
41586
|
isMulti: n,
|
|
@@ -41586,74 +41588,88 @@ const JY = ({
|
|
|
41586
41588
|
onChange: l,
|
|
41587
41589
|
filterDisabled: c,
|
|
41588
41590
|
externalInputValue: d,
|
|
41589
|
-
externalOnInputChange: f
|
|
41590
|
-
|
|
41591
|
-
|
|
41592
|
-
|
|
41593
|
-
|
|
41594
|
-
|
|
41595
|
-
|
|
41596
|
-
|
|
41597
|
-
|
|
41598
|
-
|
|
41599
|
-
|
|
41600
|
-
|
|
41601
|
-
|
|
41602
|
-
|
|
41603
|
-
|
|
41604
|
-
|
|
41605
|
-
|
|
41606
|
-
|
|
41607
|
-
|
|
41608
|
-
classes: {
|
|
41609
|
-
input: n || !r ? "cursor-pointer" : void 0
|
|
41610
|
-
},
|
|
41611
|
-
attachmentProps: {
|
|
41612
|
-
icon: /* @__PURE__ */ T.jsx(S, { children: /* @__PURE__ */ T.jsx(
|
|
41613
|
-
Be,
|
|
41614
|
-
{
|
|
41615
|
-
name: "arrows/arrowRight",
|
|
41616
|
-
className: z("size-6 rotate-90 text-color-blue-grey-600 duration-100", {
|
|
41617
|
-
"-rotate-90": I
|
|
41618
|
-
})
|
|
41619
|
-
}
|
|
41620
|
-
) }),
|
|
41621
|
-
...u
|
|
41622
|
-
}
|
|
41623
|
-
}
|
|
41624
|
-
) }),
|
|
41625
|
-
/* @__PURE__ */ T.jsx(
|
|
41626
|
-
Dh,
|
|
41627
|
-
{
|
|
41628
|
-
as: ji.ul,
|
|
41629
|
-
className: z(
|
|
41630
|
-
"customScrollbar-y absolute left-0 top-full z-10 mt-1",
|
|
41631
|
-
"max-h-[264px] w-full overflow-y-auto bg-color-white",
|
|
41632
|
-
"rounded-md p-1 shadow-[0_8px_20px_0px_rgba(41,41,41,0.08)]",
|
|
41633
|
-
g
|
|
41634
|
-
),
|
|
41635
|
-
initial: { opacity: 0, translateY: 10 },
|
|
41636
|
-
animate: { opacity: 1, translateY: 0 },
|
|
41637
|
-
exit: { opacity: 0, translateY: 10 },
|
|
41638
|
-
children: x.length ? x.map((P, R) => /* @__PURE__ */ T.jsx(
|
|
41639
|
-
KY,
|
|
41591
|
+
externalOnInputChange: f,
|
|
41592
|
+
externalHandlers: p
|
|
41593
|
+
}), S = r ? Bt : xf, k = r ? xf : Bt;
|
|
41594
|
+
return /* @__PURE__ */ T.jsx(
|
|
41595
|
+
rw,
|
|
41596
|
+
{
|
|
41597
|
+
ref: m,
|
|
41598
|
+
...h,
|
|
41599
|
+
onBlur: p == null ? void 0 : p.onBlur,
|
|
41600
|
+
onFocus: p == null ? void 0 : p.onFocus,
|
|
41601
|
+
onClick: p == null ? void 0 : p.onClick,
|
|
41602
|
+
value: s ?? null,
|
|
41603
|
+
onChange: y,
|
|
41604
|
+
multiple: n,
|
|
41605
|
+
children: ({ disabled: I, open: A, value: O }) => {
|
|
41606
|
+
const P = () => n && r ? E(O) : r ? v : E(O);
|
|
41607
|
+
return /* @__PURE__ */ T.jsxs("div", { className: z("relative w-full", g), children: [
|
|
41608
|
+
/* @__PURE__ */ T.jsx(S, { children: /* @__PURE__ */ T.jsx(
|
|
41609
|
+
Ph,
|
|
41640
41610
|
{
|
|
41641
|
-
|
|
41642
|
-
|
|
41643
|
-
|
|
41644
|
-
|
|
41645
|
-
|
|
41646
|
-
|
|
41647
|
-
|
|
41648
|
-
|
|
41611
|
+
as: An.InputBase,
|
|
41612
|
+
label: t,
|
|
41613
|
+
disabled: I,
|
|
41614
|
+
readOnly: !r,
|
|
41615
|
+
value: (d || P()) ?? "",
|
|
41616
|
+
autoComplete: "off",
|
|
41617
|
+
onChange: (R) => {
|
|
41618
|
+
const { value: V } = R.target;
|
|
41619
|
+
r && (f && f(V), p != null && p.onInputChange && p.onInputChange(V), C && C(R));
|
|
41620
|
+
},
|
|
41621
|
+
invalid: e,
|
|
41622
|
+
classes: {
|
|
41623
|
+
input: n || !r ? "cursor-pointer" : void 0
|
|
41624
|
+
},
|
|
41625
|
+
attachmentProps: {
|
|
41626
|
+
icon: /* @__PURE__ */ T.jsx(k, { children: /* @__PURE__ */ T.jsx(
|
|
41627
|
+
Be,
|
|
41628
|
+
{
|
|
41629
|
+
name: "arrows/arrowRight",
|
|
41630
|
+
className: z("size-6 rotate-90 text-color-blue-grey-600 duration-100", {
|
|
41631
|
+
"-rotate-90": A
|
|
41632
|
+
})
|
|
41633
|
+
}
|
|
41634
|
+
) }),
|
|
41635
|
+
...u
|
|
41649
41636
|
}
|
|
41650
|
-
}
|
|
41651
|
-
|
|
41652
|
-
|
|
41653
|
-
|
|
41654
|
-
|
|
41655
|
-
|
|
41656
|
-
|
|
41637
|
+
}
|
|
41638
|
+
) }),
|
|
41639
|
+
/* @__PURE__ */ T.jsx(
|
|
41640
|
+
Dh,
|
|
41641
|
+
{
|
|
41642
|
+
as: ji.ul,
|
|
41643
|
+
className: z(
|
|
41644
|
+
"customScrollbar-y absolute left-0 top-full z-10 mt-1",
|
|
41645
|
+
"max-h-[264px] w-full overflow-y-auto bg-color-white",
|
|
41646
|
+
"rounded-md p-1 shadow-[0_8px_20px_0px_rgba(41,41,41,0.08)]",
|
|
41647
|
+
b
|
|
41648
|
+
),
|
|
41649
|
+
initial: { opacity: 0, translateY: 10 },
|
|
41650
|
+
animate: { opacity: 1, translateY: 0 },
|
|
41651
|
+
exit: { opacity: 0, translateY: 10 },
|
|
41652
|
+
children: w.length ? w.map((R, V) => /* @__PURE__ */ T.jsx(
|
|
41653
|
+
KY,
|
|
41654
|
+
{
|
|
41655
|
+
option: R,
|
|
41656
|
+
isMulti: n,
|
|
41657
|
+
classes: x,
|
|
41658
|
+
displayValue: a,
|
|
41659
|
+
motionProps: {
|
|
41660
|
+
initial: { opacity: 0 },
|
|
41661
|
+
animate: { opacity: 1 },
|
|
41662
|
+
transition: { delay: V / 25 }
|
|
41663
|
+
}
|
|
41664
|
+
},
|
|
41665
|
+
R.value
|
|
41666
|
+
)) : /* @__PURE__ */ T.jsx("p", { className: "py-4 text-center align-middle", children: "Ничего не найдено" })
|
|
41667
|
+
}
|
|
41668
|
+
)
|
|
41669
|
+
] });
|
|
41670
|
+
}
|
|
41671
|
+
}
|
|
41672
|
+
);
|
|
41657
41673
|
}
|
|
41658
41674
|
), jE = Vt(
|
|
41659
41675
|
({ classes: t, className: e, invalid: n, disabled: r, ...i }, o) => /* @__PURE__ */ T.jsx(
|