quill-better-table-picker
Version:
Better table module for Quill with support for grid-style table picker
1,227 lines (1,225 loc) • 101 kB
JavaScript
!(function (e, t) {
"object" == typeof exports && "object" == typeof module
? (module.exports = t(require("quill")))
: "function" == typeof define && define.amd
? define(["quill"], t)
: "object" == typeof exports
? (exports.quillBetterTable = t(require("quill")))
: (e.quillBetterTable = t(e.Quill));
})(window, function (e) {
return (function (e) {
var t = window.webpackHotUpdatequillBetterTable;
window.webpackHotUpdatequillBetterTable = function (e, o) {
!(function (e, t) {
if (!x[e] || !y[e]) return;
for (var o in ((y[e] = !1), t))
Object.prototype.hasOwnProperty.call(t, o) && (f[o] = t[o]);
0 == --g && 0 === v && A();
})(e, o),
t && t(e, o);
};
var o,
n = !0,
r = "7eecf1b3e532dd32e8d1",
l = {},
i = [],
s = [];
function a(e) {
var t = O[e];
if (!t) return H;
var n = function (n) {
return (
t.hot.active
? (O[n]
? -1 === O[n].parents.indexOf(e) && O[n].parents.push(e)
: ((i = [e]), (o = n)),
-1 === t.children.indexOf(n) && t.children.push(n))
: (console.warn(
"[HMR] unexpected require(" +
n +
") from disposed module " +
e
),
(i = [])),
H(n)
);
},
r = function (e) {
return {
configurable: !0,
enumerable: !0,
get: function () {
return H[e];
},
set: function (t) {
H[e] = t;
},
};
};
for (var l in H)
Object.prototype.hasOwnProperty.call(H, l) &&
"e" !== l &&
"t" !== l &&
Object.defineProperty(n, l, r(l));
return (
(n.e = function (e) {
return (
"ready" === h && u("prepare"),
v++,
H.e(e).then(t, function (e) {
throw (t(), e);
})
);
function t() {
v--, "prepare" === h && (w[e] || q(e), 0 === v && 0 === g && A());
}
}),
(n.t = function (e, t) {
return 1 & t && (e = n(e)), H.t(e, -2 & t);
}),
n
);
}
function c(t) {
var n = {
_acceptedDependencies: {},
_declinedDependencies: {},
_selfAccepted: !1,
_selfDeclined: !1,
_selfInvalidated: !1,
_disposeHandlers: [],
_main: o !== t,
active: !0,
accept: function (e, t) {
if (void 0 === e) n._selfAccepted = !0;
else if ("function" == typeof e) n._selfAccepted = e;
else if ("object" == typeof e)
for (var o = 0; o < e.length; o++)
n._acceptedDependencies[e[o]] = t || function () {};
else n._acceptedDependencies[e] = t || function () {};
},
decline: function (e) {
if (void 0 === e) n._selfDeclined = !0;
else if ("object" == typeof e)
for (var t = 0; t < e.length; t++)
n._declinedDependencies[e[t]] = !0;
else n._declinedDependencies[e] = !0;
},
dispose: function (e) {
n._disposeHandlers.push(e);
},
addDisposeHandler: function (e) {
n._disposeHandlers.push(e);
},
removeDisposeHandler: function (e) {
var t = n._disposeHandlers.indexOf(e);
t >= 0 && n._disposeHandlers.splice(t, 1);
},
invalidate: function () {
switch (((this._selfInvalidated = !0), h)) {
case "idle":
((f = {})[t] = e[t]), u("ready");
break;
case "ready":
T(t);
break;
case "prepare":
case "check":
case "dispose":
case "apply":
(b = b || []).push(t);
}
},
check: C,
apply: S,
status: function (e) {
if (!e) return h;
d.push(e);
},
addStatusHandler: function (e) {
d.push(e);
},
removeStatusHandler: function (e) {
var t = d.indexOf(e);
t >= 0 && d.splice(t, 1);
},
data: l[t],
};
return (o = void 0), n;
}
var d = [],
h = "idle";
function u(e) {
h = e;
for (var t = 0; t < d.length; t++) d[t].call(null, e);
}
var p,
f,
m,
b,
g = 0,
v = 0,
w = {},
y = {},
x = {};
function N(e) {
return +e + "" === e ? +e : e;
}
function C(e) {
if ("idle" !== h)
throw new Error("check() is only allowed in idle status");
return (
(n = e),
u("check"),
((t = 1e4),
(t = t || 1e4),
new Promise(function (e, o) {
if ("undefined" == typeof XMLHttpRequest)
return o(new Error("No browser support"));
try {
var n = new XMLHttpRequest(),
l = H.p + "" + r + ".hot-update.json";
n.open("GET", l, !0), (n.timeout = t), n.send(null);
} catch (e) {
return o(e);
}
n.onreadystatechange = function () {
if (4 === n.readyState)
if (0 === n.status)
o(new Error("Manifest request to " + l + " timed out."));
else if (404 === n.status) e();
else if (200 !== n.status && 304 !== n.status)
o(new Error("Manifest request to " + l + " failed."));
else {
try {
var t = JSON.parse(n.responseText);
} catch (e) {
return void o(e);
}
e(t);
}
};
})).then(function (e) {
if (!e) return u(E() ? "ready" : "idle"), null;
(y = {}), (w = {}), (x = e.c), (m = e.h), u("prepare");
var t = new Promise(function (e, t) {
p = { resolve: e, reject: t };
});
f = {};
return q(0), "prepare" === h && 0 === v && 0 === g && A(), t;
})
);
var t;
}
function q(e) {
x[e]
? ((y[e] = !0),
g++,
(function (e) {
var t = document.createElement("script");
(t.charset = "utf-8"),
(t.src = H.p + "" + e + "." + r + ".hot-update.js"),
document.head.appendChild(t);
})(e))
: (w[e] = !0);
}
function A() {
u("ready");
var e = p;
if (((p = null), e))
if (n)
Promise.resolve()
.then(function () {
return S(n);
})
.then(
function (t) {
e.resolve(t);
},
function (t) {
e.reject(t);
}
);
else {
var t = [];
for (var o in f)
Object.prototype.hasOwnProperty.call(f, o) && t.push(N(o));
e.resolve(t);
}
}
function S(t) {
if ("ready" !== h)
throw new Error("apply() is only allowed in ready status");
return (function t(n) {
var s, a, c, d, h;
function p(e) {
for (
var t = [e],
o = {},
n = t.map(function (e) {
return { chain: [e], id: e };
});
n.length > 0;
) {
var r = n.pop(),
l = r.id,
i = r.chain;
if (
(d = O[l]) &&
(!d.hot._selfAccepted || d.hot._selfInvalidated)
) {
if (d.hot._selfDeclined)
return { type: "self-declined", chain: i, moduleId: l };
if (d.hot._main)
return { type: "unaccepted", chain: i, moduleId: l };
for (var s = 0; s < d.parents.length; s++) {
var a = d.parents[s],
c = O[a];
if (c) {
if (c.hot._declinedDependencies[l])
return {
type: "declined",
chain: i.concat([a]),
moduleId: l,
parentId: a,
};
-1 === t.indexOf(a) &&
(c.hot._acceptedDependencies[l]
? (o[a] || (o[a] = []), g(o[a], [l]))
: (delete o[a],
t.push(a),
n.push({ chain: i.concat([a]), id: a })));
}
}
}
}
return {
type: "accepted",
moduleId: e,
outdatedModules: t,
outdatedDependencies: o,
};
}
function g(e, t) {
for (var o = 0; o < t.length; o++) {
var n = t[o];
-1 === e.indexOf(n) && e.push(n);
}
}
E();
var v = {},
w = [],
y = {},
C = function () {
console.warn(
"[HMR] unexpected require(" + A.moduleId + ") to disposed module"
);
};
for (var q in f)
if (Object.prototype.hasOwnProperty.call(f, q)) {
var A;
(h = N(q)), (A = f[q] ? p(h) : { type: "disposed", moduleId: q });
var S = !1,
T = !1,
M = !1,
B = "";
switch (
(A.chain && (B = "\nUpdate propagation: " + A.chain.join(" -> ")),
A.type)
) {
case "self-declined":
n.onDeclined && n.onDeclined(A),
n.ignoreDeclined ||
(S = new Error(
"Aborted because of self decline: " + A.moduleId + B
));
break;
case "declined":
n.onDeclined && n.onDeclined(A),
n.ignoreDeclined ||
(S = new Error(
"Aborted because of declined dependency: " +
A.moduleId +
" in " +
A.parentId +
B
));
break;
case "unaccepted":
n.onUnaccepted && n.onUnaccepted(A),
n.ignoreUnaccepted ||
(S = new Error(
"Aborted because " + h + " is not accepted" + B
));
break;
case "accepted":
n.onAccepted && n.onAccepted(A), (T = !0);
break;
case "disposed":
n.onDisposed && n.onDisposed(A), (M = !0);
break;
default:
throw new Error("Unexception type " + A.type);
}
if (S) return u("abort"), Promise.reject(S);
if (T)
for (h in ((y[h] = f[h]),
g(w, A.outdatedModules),
A.outdatedDependencies))
Object.prototype.hasOwnProperty.call(
A.outdatedDependencies,
h
) && (v[h] || (v[h] = []), g(v[h], A.outdatedDependencies[h]));
M && (g(w, [A.moduleId]), (y[h] = C));
}
var L,
R = [];
for (a = 0; a < w.length; a++)
(h = w[a]),
O[h] &&
O[h].hot._selfAccepted &&
y[h] !== C &&
!O[h].hot._selfInvalidated &&
R.push({
module: h,
parents: O[h].parents.slice(),
errorHandler: O[h].hot._selfAccepted,
});
u("dispose"),
Object.keys(x).forEach(function (e) {
!1 === x[e] &&
(function (e) {
delete installedChunks[e];
})(e);
});
var k,
I,
z = w.slice();
for (; z.length > 0; )
if (((h = z.pop()), (d = O[h]))) {
var j = {},
D = d.hot._disposeHandlers;
for (c = 0; c < D.length; c++) (s = D[c])(j);
for (
l[h] = j, d.hot.active = !1, delete O[h], delete v[h], c = 0;
c < d.children.length;
c++
) {
var V = O[d.children[c]];
V && (L = V.parents.indexOf(h)) >= 0 && V.parents.splice(L, 1);
}
}
for (h in v)
if (Object.prototype.hasOwnProperty.call(v, h) && (d = O[h]))
for (I = v[h], c = 0; c < I.length; c++)
(k = I[c]),
(L = d.children.indexOf(k)) >= 0 && d.children.splice(L, 1);
u("apply"), void 0 !== m && ((r = m), (m = void 0));
for (h in ((f = void 0), y))
Object.prototype.hasOwnProperty.call(y, h) && (e[h] = y[h]);
var _ = null;
for (h in v)
if (Object.prototype.hasOwnProperty.call(v, h) && (d = O[h])) {
I = v[h];
var U = [];
for (a = 0; a < I.length; a++)
if (((k = I[a]), (s = d.hot._acceptedDependencies[k]))) {
if (-1 !== U.indexOf(s)) continue;
U.push(s);
}
for (a = 0; a < U.length; a++) {
s = U[a];
try {
s(I);
} catch (e) {
n.onErrored &&
n.onErrored({
type: "accept-errored",
moduleId: h,
dependencyId: I[a],
error: e,
}),
n.ignoreErrored || _ || (_ = e);
}
}
}
for (a = 0; a < R.length; a++) {
var P = R[a];
(h = P.module), (i = P.parents), (o = h);
try {
H(h);
} catch (e) {
if ("function" == typeof P.errorHandler)
try {
P.errorHandler(e);
} catch (t) {
n.onErrored &&
n.onErrored({
type: "self-accept-error-handler-errored",
moduleId: h,
error: t,
originalError: e,
}),
n.ignoreErrored || _ || (_ = t),
_ || (_ = e);
}
else
n.onErrored &&
n.onErrored({
type: "self-accept-errored",
moduleId: h,
error: e,
}),
n.ignoreErrored || _ || (_ = e);
}
}
if (_) return u("fail"), Promise.reject(_);
if (b)
return t(n).then(function (e) {
return (
w.forEach(function (t) {
e.indexOf(t) < 0 && e.push(t);
}),
e
);
});
return (
u("idle"),
new Promise(function (e) {
e(w);
})
);
})((t = t || {}));
}
function E() {
if (b) return f || (f = {}), b.forEach(T), (b = void 0), !0;
}
function T(t) {
Object.prototype.hasOwnProperty.call(f, t) || (f[t] = e[t]);
}
var O = {};
function H(t) {
if (O[t]) return O[t].exports;
var o = (O[t] = {
i: t,
l: !1,
exports: {},
hot: c(t),
parents: ((s = i), (i = []), s),
children: [],
});
return e[t].call(o.exports, o, o.exports, a(t)), (o.l = !0), o.exports;
}
return (
(H.m = e),
(H.c = O),
(H.d = function (e, t, o) {
H.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: o });
}),
(H.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
}),
(H.t = function (e, t) {
if ((1 & t && (e = H(e)), 8 & t)) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var o = Object.create(null);
if (
(H.r(o),
Object.defineProperty(o, "default", { enumerable: !0, value: e }),
2 & t && "string" != typeof e)
)
for (var n in e)
H.d(
o,
n,
function (t) {
return e[t];
}.bind(null, n)
);
return o;
}),
(H.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return H.d(t, "a", t), t;
}),
(H.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(H.p = ""),
(H.h = function () {
return r;
}),
a(11)((H.s = 11))
);
})([
function (t, o) {
t.exports = e;
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M73.142857 336.64h526.628572v43.885714H73.142857zM73.142857 643.657143h526.628572v43.885714H73.142857zM336.457143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857h-219.428571v877.714286h219.428571a131.657143 131.657143 0 0 0 131.657143-131.657143V204.8A131.84 131.84 0 0 0 819.2 73.142857z m44.068571 460.982857h-65.828571v65.828572H753.371429v-65.828572h-65.828572V490.057143h65.828572v-65.828572h44.068571v65.828572h65.828571z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M380.342857 336.457143h526.811429v43.885714H380.342857z m0 307.2h526.811429v43.885714H380.342857zM643.657143 117.028571h43.885714v789.942858h-43.885714zM204.8 73.142857h614.582857A131.474286 131.474286 0 0 1 950.857143 204.8v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.588571 87.588571 0 0 0-87.588571 87.771429v614.4a87.588571 87.588571 0 0 0 87.588571 87.771429h614.582857a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM204.8 73.142857A131.657143 131.657143 0 0 0 73.142857 204.8v614.4a131.657143 131.657143 0 0 0 131.657143 131.657143h219.428571V73.142857z m131.84 460.8h-65.828571v65.828572h-43.885715v-65.828572h-65.828571v-43.885714h65.828571v-65.828572h43.885715v65.828572h65.828571z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M73.142857 599.771429h877.714286v43.885714H73.142857zM336.457143 380.342857h43.885714v526.628572h-43.885714z m307.2 0h43.885714v526.628572h-43.885714zM204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.657143 131.657143 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.588571 87.588571 0 0 0 87.771429 87.771429h614.4a87.588571 87.588571 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM819.2 73.142857H204.8A131.657143 131.657143 0 0 0 73.142857 204.8v219.428571h877.714286v-219.428571A131.657143 131.657143 0 0 0 819.2 73.142857z m-219.428571 197.485714h-65.828572v65.828572h-43.885714v-65.828572h-65.828572v-43.885714h65.828572V160.914286h43.885714v65.828571h65.828572z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M204.8 73.142857h614.4a131.657143 131.657143 0 0 1 131.657143 131.657143v614.4a131.657143 131.657143 0 0 1-131.657143 131.657143H204.8A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.8 73.142857z m0 43.885714a87.771429 87.771429 0 0 0-87.771429 87.771429v614.4a87.771429 87.771429 0 0 0 87.771429 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM73.142857 336.457143h877.714286v44.068571H73.142857zM336.64 117.028571h43.885714v526.628572h-43.885714z m307.017143 0h44.068571v526.628572H643.657143zM73.142857 599.771429v219.428571a131.657143 131.657143 0 0 0 131.657143 131.657143h614.4a131.657143 131.657143 0 0 0 131.657143-131.657143v-219.428571z m526.628572 197.485714h-65.645715v65.828571H490.057143v-65.828571h-65.828572v-43.885714h65.828572v-65.828572h44.068571v65.828572h65.645715z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-277.850505 5.559596v226.909091H375.725253V104.59798h272.420202zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v226.909091H103.434343V195.361616z m90.763637 726.367677c-24.048485 0-47.191919-9.567677-64.129293-26.634344-17.066667-17.066667-26.634343-40.080808-26.634344-64.129292V649.309091h226.909091v272.420202H194.19798z m181.527273 0V649.309091h272.290909v272.420202H375.725253z m544.711111-90.892929c0 24.048485-9.567677 47.191919-26.634344 64.129293-17.066667 17.066667-40.080808 26.634343-64.129293 26.634343H693.527273V649.309091h226.909091v181.527273zM693.527273 331.507071V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.145455H693.527273z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M336.457143 73.142857h43.885714v877.714286h-43.885714z m307.382857 0h43.702857v877.714286h-43.702857z m-438.857143 0h614.4A131.657143 131.657143 0 0 1 950.857143 204.8v614.4a131.474286 131.474286 0 0 1-131.474286 131.657143h-614.4A131.657143 131.657143 0 0 1 73.142857 819.2V204.8A131.84 131.84 0 0 1 204.982857 73.142857z m0 43.885714a87.588571 87.588571 0 0 0-87.771428 87.771429v614.4a87.588571 87.588571 0 0 0 87.771428 87.771429h614.4a87.771429 87.771429 0 0 0 87.771429-87.771429V204.8a87.771429 87.771429 0 0 0-87.771429-87.771429zM73.142857 336.457143h877.714286v307.2H73.142857z m292.571429 43.885714v219.428572h292.571428v-219.428572z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M925.996 99.038c-25.47-25.6-60.121-39.822-96.323-39.822H194.198c-75.12 0.13-136.016 61.026-136.145 136.146v635.345c0 36.073 14.351 70.723 39.822 96.323 25.6 25.73 60.25 40.081 96.323 40.081h635.475c36.072 0 70.723-14.351 96.323-39.951 25.6-25.6 39.951-60.122 39.951-96.324V195.362c0-36.073-14.351-70.724-39.951-96.324z m-365.77 494.287L512 545.228l-48.226 48.097-32.194-31.935 48.355-48.226-48.226-48.097 32.194-32.194L512 480.97l48.097-48.097 32.194 32.194-48.097 48.097 48.226 48.226-32.194 31.935zM103.434 195.362c0-24.049 9.568-47.192 26.635-64.13 17.066-17.066 40.08-26.634 64.129-26.634h136.145v226.91H103.434V195.361z m0 181.656h226.91V649.31h-226.91V377.02z m90.764 544.84c-24.049 0-47.192-9.567-64.13-26.634-17.066-17.066-26.634-40.08-26.634-64.258V694.69h226.91v227.168H194.197z m726.238-90.763c0 24.048-9.438 47.192-26.505 64.259-17.066 17.066-40.21 26.634-64.258 26.505H693.527V694.69h226.91v136.404z m0-181.786H693.527V377.02h226.91v272.29zM693.527 331.507V104.598h136.146c24.048 0 47.192 9.438 64.258 26.505 17.067 17.067 26.635 40.21 26.505 64.259v136.145H693.527z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M925.99596 99.038384c-25.470707-25.6-60.121212-39.822222-96.323233-39.822222H194.19798c-36.072727 0-70.723232 14.351515-96.323233 39.822222-25.6 25.6-39.822222 60.121212-39.822222 96.323232v635.474748c0 36.072727 14.351515 70.723232 39.822222 96.323232C123.474747 952.759596 158.125253 967.111111 194.19798 967.111111h635.474747c36.072727 0 70.723232-14.351515 96.323233-39.951515 25.6-25.6 39.951515-60.121212 39.951515-96.323232V195.361616c0-36.072727-14.351515-70.723232-39.951515-96.323232z m-550.270707 5.559596h272.290909v227.167677H375.725253V104.59798z m56.242424 360.468687l31.935353-32.19394 48.09697 48.226263 48.09697-48.226263 32.193939 32.19394-48.09697 48.096969 48.226263 48.226263-32.193939 31.935354-48.226263-48.09697-48.226263 48.09697-31.935353-31.935354 48.226262-48.226263-48.096969-48.096969zM103.434343 195.361616c0-24.048485 9.567677-47.191919 26.634344-64.129293 17.066667-17.066667 40.080808-26.634343 64.129293-26.634343h136.145454v227.167677H103.434343V195.361616z m817.002021 635.733333c0 24.048485-9.567677 47.191919-26.634344 64.258586-17.066667 17.066667-40.080808 26.634343-64.129293 26.634344H194.19798c-24.048485 0-47.191919-9.567677-64.258586-26.634344C112.872727 878.157576 103.434343 855.014141 103.434343 830.836364V694.690909h226.909091v226.909091h45.381819V694.690909h272.290909v226.909091h45.381818V694.690909h226.909091v136.40404z m0-499.329292H693.527273V104.59798h136.145454c24.048485 0 47.191919 9.567677 64.129293 26.634343 17.066667 17.066667 26.634343 40.080808 26.634344 64.129293v136.404041z"/></svg>';
},
function (e, t) {
e.exports =
'<?xml version="1.0" standalone="no"?><!doctype html><svg class=icon width=20px height=20.00px viewBox="0 0 1024 1024" version=1.1 xmlns=http://www.w3.org/2000/svg><path fill=#595959 d="M764.42168889 830.5152c0 30.23530667-24.61013333 54.84430222-54.84316444 54.84430222H314.42147555c-30.23416889 0-54.84316445-24.61013333-54.84316444-54.84430222V248.32796445h504.84337778v582.18723555zM369.26577778 149.89084445c0-6.32832 4.92202667-11.25034667 11.25034667-11.25034667H644.18702222c6.32832 0 11.25034667 4.92202667 11.25034667 11.25034667v33.04675555H369.26577778V149.89084445z m559.68768 33.04675555H720.82773333V149.89084445c0-42.1888-34.45191111-76.64071111-76.64071111-76.64071112H380.51612445c-42.1888 0-76.64071111 34.45191111-76.64071112 76.64071112v33.04675555h-208.82773333c-18.28181333 0-33.04789333 14.76608-33.04789333 33.04675555s14.76608 33.04675555 33.04675555 33.04675556h98.43825778v581.48408889c0 66.79779555 54.14001778 120.93781333 120.93667555 120.93781333h395.1570489c66.79665778 0 120.93667555-54.14001778 120.93667555-120.93781333V248.32796445h98.43825778c18.28067555 0 33.04675555-14.76494222 33.04675555-33.04675556s-14.76608-32.34360889-33.04675555-32.34360889zM512 786.21923555c18.28181333 0 33.04675555-14.76608 33.04675555-33.04789333v-351.56195555c0-18.28181333-14.76494222-33.04675555-33.04675555-33.04675556s-33.04675555 14.76494222-33.04675555 33.04675556v351.56195555c0 18.28181333 14.76494222 33.04789333 33.04675555 33.04789333m-153.98456889 0c18.28181333 0 33.04675555-14.76608 33.04675556-33.04789333v-351.56195555c0-18.28181333-14.76494222-33.04675555-33.04675556-33.04675556s-33.04675555 14.76494222-33.04675556 33.04675556v351.56195555c0.70314667 18.28181333 15.46922667 33.04789333 33.04675556 33.04789333m307.96913778 0c18.28067555 0 33.04675555-14.76608 33.04675556-33.04789333v-351.56195555c0-18.28181333-14.76608-33.04675555-33.04675556-33.04675556s-33.04675555 14.76494222-33.04675556 33.04675556v351.56195555c0 18.28181333 14.76494222 33.04789333 33.04675556 33.04789333"/></svg>';
},
function (e, t, o) {
"use strict";
var n = Object.prototype.hasOwnProperty,
r = Object.prototype.toString,
l = Object.defineProperty,
i = Object.getOwnPropertyDescriptor,
s = function (e) {
return "function" == typeof Array.isArray
? Array.isArray(e)
: "[object Array]" === r.call(e);
},
a = function (e) {
if (!e || "[object Object]" !== r.call(e)) return !1;
var t,
o = n.call(e, "constructor"),
l =
e.constructor &&
e.constructor.prototype &&
n.call(e.constructor.prototype, "isPrototypeOf");
if (e.constructor && !o && !l) return !1;
for (t in e);
return void 0 === t || n.call(e, t);
},
c = function (e, t) {
l && "__proto__" === t.name
? l(e, t.name, {
enumerable: !0,
configurable: !0,
value: t.newValue,
writable: !0,
})
: (e[t.name] = t.newValue);
},
d = function (e, t) {
if ("__proto__" === t) {
if (!n.call(e, t)) return;
if (i) return i(e, t).value;
}
return e[t];
};
e.exports = function e() {
var t,
o,
n,
r,
l,
i,
h = arguments[0],
u = 1,
p = arguments.length,
f = !1;
for (
"boolean" == typeof h && ((f = h), (h = arguments[1] || {}), (u = 2)),
(null == h || ("object" != typeof h && "function" != typeof h)) &&
(h = {});
u < p;
++u
)
if (null != (t = arguments[u]))
for (o in t)
(n = d(h, o)),
h !== (r = d(t, o)) &&
(f && r && (a(r) || (l = s(r)))
? (l
? ((l = !1), (i = n && s(n) ? n : []))
: (i = n && a(n) ? n : {}),
c(h, { name: o, newValue: e(f, i, r) }))
: void 0 !== r && c(h, { name: o, newValue: r }));
return h;
};
},
function (e, t, o) {
e.exports = o(12);
},
function (e, t, o) {
"use strict";
o.r(t);
var n = o(0),
r = o.n(n);
function l(e, t) {
if ("object" == typeof t) for (let o in t) e.style[o] = t[o];
}
function i(e, t) {
let o = t.getBoundingClientRect();
return {
x: e.x - o.x - t.scrollLeft,
y: e.y - o.y - t.scrollTop,
x1: e.x - o.x - t.scrollLeft + e.width,
y1: e.y - o.y - t.scrollTop + e.height,
width: e.width,
height: e.height,
};
}
function s(e, t) {
return (
e &&
Object.keys(e).reduce(
(o, n) => (t.includes(n) ? o : Object.assign({}, o, { [n]: e[n] })),
{}
)
);
}
function a(e) {
let t;
if (
((t = e.path || (e.composedPath && e.composedPath())),
null == t && e.target)
) {
t = [];
let o = e.target;
for (t.push(o); o && o.parentNode; ) (o = o.parentNode), t.push(o);
}
return t;
}
class c {
constructor(e, t, o) {
if (!e) return null;
(this.table = e),
(this.quill = t),
(this.options = o),
(this.domNode = null),
this.initColTool();
}
initColTool() {
const e = this.quill.root.parentNode,
t = (this.table.getBoundingClientRect(), e.getBoundingClientRect()),
o = this.table.parentNode.getBoundingClientRect();
(this.domNode = document.createElement("div")),
this.domNode.classList.add("qlbt-col-tool"),
this.updateToolCells(),
e.appendChild(this.domNode),
l(this.domNode, {
width: "".concat(o.width, "px"),
height: "".concat(12, "px"),
left: "".concat(o.left - t.left + e.scrollLeft, "px"),
top: "".concat(o.top - t.top + e.scrollTop - 12 - 5, "px"),
});
}
createToolCell() {
const e = document.createElement("div");
e.classList.add("qlbt-col-tool-cell");
const t = document.createElement("div");
return (
t.classList.add("qlbt-col-tool-cell-holder"),
l(e, { height: "".concat(12, "px") }),
e.appendChild(t),
e
);
}
updateToolCells() {
const e = r.a.find(this.table),
t = e.children.tail.children.head.children,
o = e.colGroup().children,
n = (function (e) {
return e.reduce((e, t) => {
const o = t.formats().colspan;
return (e += parseInt(o, 10));
}, 0);
})(t);
let i = Array.from(
this.domNode.querySelectorAll(".qlbt-col-tool-cell")
);
for (let e = 0; e < Math.max(n, i.length); e++) {
let t = o.at(e),
r = t && parseInt(t.formats()[t.statics.blotName].width, 10),
s = null;
i[e]
? i[e] && e >= n
? i[e].remove()
: ((s = i[e]), l(s, { "min-width": "".concat(r, "px") }))
: ((s = this.createToolCell()),
this.domNode.appendChild(s),
this.addColCellHolderHandler(s),
l(s, { "min-width": "".concat(r, "px") }));
}
}
destroy() {
return this.domNode.remove(), null;
}
addColCellHolderHandler(e) {
const t = r.a.find(this.table),
o = e.querySelector(".qlbt-col-tool-cell-holder");
let n = !1,
i = 0,
s = 0,
a = 0,
c = 0,
d = {},
h = {},
u = null;
const p = (e) => {
e.preventDefault(),
n &&
((s = e.clientX),
(a = c + s - i >= 50 ? s - i : 50 - c),
l(u, { left: "".concat(h.left + h.width - 1 + a, "px") }));
},
f = (r) => {
r.preventDefault();
const m = Array.from(
this.domNode.querySelectorAll(".qlbt-col-tool-cell")
).indexOf(e),
b = t.colGroup().children.at(m);
n &&
(b.format("width", c + a),
l(e, { "min-width": "".concat(c + a, "px") }),
(i = 0),
(s = 0),
(a = 0),
(c = 0),
(n = !1),
o.classList.remove("dragging")),
document.removeEventListener("mousemove", p, !1),
document.removeEventListener("mouseup", f, !1),
(d = {}),
(h = {}),
u.remove(),
(u = null),
t.updateTableWidth();
const g = this.quill.getModule("better-table").tableSelection;
g && g.clearSelection();
};
o.addEventListener(
"mousedown",
(t) => {
document.addEventListener("mousemove", p, !1),
document.addEventListener("mouseup", f, !1),
(d = this.table.getBoundingClientRect()),
(h = e.getBoundingClientRect()),
(u = document.createElement("div")),
l(u, {
position: "fixed",
top: "".concat(h.top, "px"),
left: "".concat(h.left + h.width - 1, "px"),
zIndex: "100",
height: "".concat(d.height + 12 + 4, "px"),
width: "1px",
backgroundColor: "#35A7ED",
}),
document.body.appendChild(u),
(n = !0),
(i = t.clientX),
(c = h.width),
o.classList.add("dragging");
},
!1
);
}
colToolCells() {
return Array.from(
this.domNode.querySelectorAll(".qlbt-col-tool-cell")
);
}
}
const d = r.a.import("blots/block");
class h extends d {
static create(e) {
"string" == typeof e && (e = { value: e });
const t = super.create(e.value);
return (
v.forEach((o) => {
e[o] && t.setAttribute("data-".concat(o), e[o]);
}),
w.forEach((o) => {
e[o] && t.setAttribute("data-".concat(o), e[o]);
}),
t
);
}
static formats(e) {
const t = {};
return (
(t.value = this.tagName.indexOf(e.tagName) + 1),
w
.concat(v)
.reduce(
(t, o) => (
e.hasAttribute("data-".concat(o)) &&
(t[o] = e.getAttribute("data-".concat(o)) || void 0),
t
),
t
)
);
}
format(e, t) {
const {
row: o,
cell: n,
rowspan: r,
colspan: l,
} = h.formats(this.domNode);
e === h.blotName
? t
? super.format(e, {
value: t,
row: o,
cell: n,
rowspan: r,
colspan: l,
})
: o
? this.replaceWith(x.blotName, {
row: o,
cell: n,
rowspan: r,
colspan: l,
})
: super.format(e, t)
: super.format(e, t);
}
optimize(e) {
const { row: t, rowspan: o, colspan: n } = h.formats(this.domNode);
if (
(!t ||
this.parent instanceof N ||
this.wrap(N.blotName, { row: t, colspan: n, rowspan: o }),
this.enforceAllowedChildren(),
null != this.uiNode &&
this.uiNode !== this.domNode.firstChild &&
this.domNode.insertBefore(this.uiNode, this.domNode.firstChild),
0 === this.children.length)
)
if (null != this.statics.defaultChild) {
const e = this.scroll.create(this.statics.defaultChild.blotName);
this.appendChild(e);
} else this.remove();
this.cache = {};
}
}
(h.blotName = "header"),
(h.tagName = ["H1", "H2", "H3", "H4", "H5", "H6"]);
var u = h;
const p = r.a.import("blots/break"),
f = r.a.import("blots/block"),
m = r.a.import("blots/container"),
b = ["width"],
g = { width: 100 },
v = ["row", "cell"],
w = ["rowspan", "colspan"],
y = { rowspan: 1, colspan: 1 };
class x extends f {
static create(e) {
const t = super.create(e);
return (
v.forEach((o) => {
let n = "row" === o ? O : H;
t.setAttribute("data-".concat(o), e[o] || n());
}),
w.forEach((o) => {
t.setAttribute("data-".concat(o), e[o] || y[o]);
}),
e["cell-bg"] && t.setAttribute("data-cell-bg", e["cell-bg"]),
t
);
}
static formats(e) {
return w
.concat(v)
.concat(["cell-bg"])
.reduce(
(t, o) => (
e.hasAttribute("data-".concat(o)) &&
(t[o] = e.getAttribute("data-".concat(o)) || void 0),
t
),
{}
);
}
format(e, t) {
if (w.concat(v).indexOf(e) > -1)
t
? this.domNode.setAttribute("data-".concat(e), t)
: this.domNode.removeAttribute("data-".concat(e));
else if ("cell-bg" === e)
t
? this.domNode.setAttribute("data-cell-bg", t)
: this.domNode.removeAttribute("data-cell-bg");
else if ("header" === e) {
if (!t) return;
const {
row: o,
cell: n,
rowspan: r,
colspan: l,
} = x.formats(this.domNode);
super.format(e, {
value: t,
row: o,
cell: n,
rowspan: r,
colspan: l,
});
} else super.format(e, t);
}
optimize(e) {
const t = this.domNode.getAttribute("data-row"),
o = this.domNode.getAttribute("data-rowspan"),
n = this.domNode.getAttribute("data-colspan"),
r = this.domNode.getAttribute("data-cell-bg");
!this.statics.requiredContainer ||
this.parent instanceof this.statics.requiredContainer ||
this.wrap(this.statics.requiredContainer.blotName, {
row: t,
colspan: n,
rowspan: o,
"cell-bg": r,
}),
super.optimize(e);
}
tableCell() {
return this.parent;
}
}
(x.blotName = "table-cell-line"),
(x.className = "qlbt-cell-line"),
(x.tagName = "P");
class N extends m {
checkMerge() {
if (super.checkMerge() && null != this.next.children.head) {
const e =
this.children.head.formats()[
this.children.head.statics.blotName
],
t =
this.children.tail.formats()[
this.children.tail.statics.blotName
],
o =
this.next.children.head.formats()[
this.next.children.head.statics.blotName
],
n =
this.next.children.tail.formats()[
this.next.children.tail.statics.blotName
];
return e.cell === t.cell && e.cell === o.cell && e.cell === n.cell;
}
return !1;
}
static create(e) {
const t = super.create(e);
return (
t.setAttribute("data-row", e.row),
w.forEach((o) => {
e[o] && t.setAttribute(o, e[o]);
}),
e["cell-bg"] &&
(t.setAttribute("data-cell-bg", e["cell-bg"]),
(t.style.backgroundColor = e["cell-bg"])),
t
);
}
static formats(e) {
const t = {};
return (
e.hasAttribute("data-row") && (t.row = e.getAttribute("data-row")),
e.hasAttribute("data-cell-bg") &&
(t["cell-bg"] = e.getAttribute("data-cell-bg")),
w.reduce(
(t, o) => (e.hasAttribute(o) && (t[o] = e.getAttribute(o)), t),
t
)
);
}
cellOffset() {
return this.parent ? this.parent.children.indexOf(this) : -1;
}
formats() {
const e = {};
return (
this.domNode.hasAttribute("data-row") &&
(e.row = this.domNode.getAttribute("data-row")),
this.domNode.hasAttribute("data-cell-bg") &&
(e["cell-bg"] = this.domNode.getAttribute("data-cell-bg")),
w.reduce(
(e, t) => (
this.domNode.hasAttribute(t) &&
(e[t] = this.domNode.getAttribute(t)),
e
),
e
)
);
}
toggleAttribute(e, t) {
t ? this.domNode.setAttribute(e, t) : this.domNode.removeAttribute(e);
}
formatChildren(e, t) {
this.children.forEach((o) => {
o.format(e, t);
});
}
format(e, t) {
w.indexOf(e) > -1
? (this.toggleAttribute(e, t), this.formatChildren(e, t))
: ["row"].indexOf(e) > -1
? (this.toggleAttribute("data-".concat(e), t),
this.formatChildren(e, t))
: "cell-bg" === e
? (this.toggleAttribute("data-cell-bg", t),
this.formatChildren(e, t),
(this.domNode.style.backgroundColor = t || "initial"))
: super.format(e, t);
}
optimize(e) {
const t = this.domNode.getAttribute("data-row");
!this.statics.requiredContainer ||
this.parent instanceof this.statics.requiredContainer ||
this.wrap(this.statics.requiredContainer.blotName, { row: t }),
super.optimize(e);
}
row() {
return this.parent;
}
rowOffset() {
return this.row() ? this.row().rowOffset() : -1;
}
table() {
return this.row() && this.row().table();
}
}
(N.blotName = "table"), (N.tagName = "TD");
class C extends m {
checkMerge() {
if (super.checkMerge() && null != this.next.children.head) {
const e = this.children.head.formats(),
t = this.children.tail.formats(),
o = this.next.children.head.formats(),
n = this.next.children.tail.formats();
return e.row === t.row && e.row === o.row && e.row === n.row;
}
return !1;
}
static create(e) {
const t = super.create(e);
return t.setAttribute("data-row", e.row), t;
}
formats() {
return ["row"].reduce(
(e, t) => (
this.domNode.hasAttribute("data-".concat(t)) &&
(e[t] = this.domNode.getAttribute("data-".concat(t))),
e
),
{}
);
}
optimize(e) {
!this.statics.requiredContainer ||
this.parent instanceof this.statics.requiredContainer ||
this.wrap(this.statics.requiredContainer.blotName),
this.enforceAllowedChildren(),
null != this.uiNode &&
this.uiNode !== this.domNode.firstChild &&
this.domNode.insertBefore(this.uiNode, this.domNode.firstChild),
this.children.length > 0 &&
null != this.next &&
this.checkMerge() &&
(this.next.moveChildren(this), this.next.remove());
}
rowOffset() {
return this.parent ? this.parent.children.indexOf(this) : -1;
}
table() {
return this.parent && this.parent.parent;
}
}
(C.blotName = "table-row"), (C.tagName = "TR");
class q extends m {}
(q.blotName = "table-body"), (q.tagName = "TBODY");
class A extends f {
static create(e) {
let t = super.create(e);
return (
b.forEach((o) => {
t.setAttribute("".concat(o), e[o] || g[o]);
}),
t
);
}
static formats(e) {
return b.reduce(
(t, o) => (
e.hasAttribute("".concat(o)) &&
(t[o] = e.getAttribute("".concat(o)) || void 0),
t
),
{}
);
}
format(e, t) {
b.indexOf(e) > -1
? this.domNode.setAttribute("".concat(e), t || g[e])
: super.format(e, t);
}
html() {
return this.domNode.outerHTML;
}
}
(A.blotName = "table-col"), (A.tagName = "col");
class S extends m {}
(S.blotName = "table-col-group"), (S.tagName = "colgroup");
class E extends m {
static create() {
return super.create();
}
constructor(e, t) {
super(e, t), this.updateTableWidth();
}
updateTableWidth() {
setTimeout(() => {
const e = this.colGroup();
if (!e) return;
const t = e.children.reduce(
(e, t) => (e += parseInt(t.formats()[A.blotName].width, 10)),
0
);
this.domNode.style.width = "".concat(t, "px");
}, 0);
}
cells(e) {