@tailor-cms/ce-accordion-edit 0.0.3 → 0.0.5
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/index.cjs +654 -118
- package/dist/index.js +654 -118
- package/dist/style.css +5 -11
- package/package.json +4 -5
package/dist/index.js
CHANGED
|
@@ -764,8 +764,8 @@ function getAllKeysIn$2(object2) {
|
|
|
764
764
|
}
|
|
765
765
|
var _getAllKeysIn = getAllKeysIn$2;
|
|
766
766
|
var getNative$3 = _getNative, root$4 = _root;
|
|
767
|
-
var DataView$
|
|
768
|
-
var _DataView = DataView$
|
|
767
|
+
var DataView$2 = getNative$3(root$4, "DataView");
|
|
768
|
+
var _DataView = DataView$2;
|
|
769
769
|
var getNative$2 = _getNative, root$3 = _root;
|
|
770
770
|
var Promise$2 = getNative$2(root$3, "Promise");
|
|
771
771
|
var _Promise = Promise$2;
|
|
@@ -775,12 +775,12 @@ var _Set = Set$3;
|
|
|
775
775
|
var getNative = _getNative, root$1 = _root;
|
|
776
776
|
var WeakMap$2 = getNative(root$1, "WeakMap");
|
|
777
777
|
var _WeakMap = WeakMap$2;
|
|
778
|
-
var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$2 = _Set, WeakMap$1 = _WeakMap, baseGetTag$3 = _baseGetTag, toSource = _toSource;
|
|
778
|
+
var DataView$1 = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$2 = _Set, WeakMap$1 = _WeakMap, baseGetTag$3 = _baseGetTag, toSource = _toSource;
|
|
779
779
|
var mapTag$5 = "[object Map]", objectTag$3 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
780
780
|
var dataViewTag$3 = "[object DataView]";
|
|
781
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1);
|
|
781
|
+
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$1);
|
|
782
782
|
var getTag$5 = baseGetTag$3;
|
|
783
|
-
if (DataView && getTag$5(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag$5(new Map$1()) != mapTag$5 || Promise$1 && getTag$5(Promise$1.resolve()) != promiseTag || Set$2 && getTag$5(new Set$2()) != setTag$5 || WeakMap$1 && getTag$5(new WeakMap$1()) != weakMapTag$1) {
|
|
783
|
+
if (DataView$1 && getTag$5(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 || Map$1 && getTag$5(new Map$1()) != mapTag$5 || Promise$1 && getTag$5(Promise$1.resolve()) != promiseTag || Set$2 && getTag$5(new Set$2()) != setTag$5 || WeakMap$1 && getTag$5(new WeakMap$1()) != weakMapTag$1) {
|
|
784
784
|
getTag$5 = function(value) {
|
|
785
785
|
var result = baseGetTag$3(value), Ctor = result == objectTag$3 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
786
786
|
if (ctorString) {
|
|
@@ -1003,6 +1003,585 @@ function cloneDeep(value) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
var cloneDeep_1 = cloneDeep;
|
|
1005
1005
|
const cloneDeep$1 = /* @__PURE__ */ getDefaultExportFromCjs(cloneDeep_1);
|
|
1006
|
+
var src = {};
|
|
1007
|
+
var sha3$1 = {};
|
|
1008
|
+
var _assert = {};
|
|
1009
|
+
Object.defineProperty(_assert, "__esModule", { value: true });
|
|
1010
|
+
_assert.anumber = anumber;
|
|
1011
|
+
_assert.number = anumber;
|
|
1012
|
+
_assert.abytes = abytes;
|
|
1013
|
+
_assert.bytes = abytes;
|
|
1014
|
+
_assert.ahash = ahash;
|
|
1015
|
+
_assert.aexists = aexists;
|
|
1016
|
+
_assert.aoutput = aoutput;
|
|
1017
|
+
function anumber(n) {
|
|
1018
|
+
if (!Number.isSafeInteger(n) || n < 0)
|
|
1019
|
+
throw new Error("positive integer expected, got " + n);
|
|
1020
|
+
}
|
|
1021
|
+
function isBytes(a) {
|
|
1022
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
1023
|
+
}
|
|
1024
|
+
function abytes(b, ...lengths) {
|
|
1025
|
+
if (!isBytes(b))
|
|
1026
|
+
throw new Error("Uint8Array expected");
|
|
1027
|
+
if (lengths.length > 0 && !lengths.includes(b.length))
|
|
1028
|
+
throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
1029
|
+
}
|
|
1030
|
+
function ahash(h2) {
|
|
1031
|
+
if (typeof h2 !== "function" || typeof h2.create !== "function")
|
|
1032
|
+
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
1033
|
+
anumber(h2.outputLen);
|
|
1034
|
+
anumber(h2.blockLen);
|
|
1035
|
+
}
|
|
1036
|
+
function aexists(instance, checkFinished = true) {
|
|
1037
|
+
if (instance.destroyed)
|
|
1038
|
+
throw new Error("Hash instance has been destroyed");
|
|
1039
|
+
if (checkFinished && instance.finished)
|
|
1040
|
+
throw new Error("Hash#digest() has already been called");
|
|
1041
|
+
}
|
|
1042
|
+
function aoutput(out, instance) {
|
|
1043
|
+
abytes(out);
|
|
1044
|
+
const min = instance.outputLen;
|
|
1045
|
+
if (out.length < min) {
|
|
1046
|
+
throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
const assert = {
|
|
1050
|
+
number: anumber,
|
|
1051
|
+
bytes: abytes,
|
|
1052
|
+
hash: ahash,
|
|
1053
|
+
exists: aexists,
|
|
1054
|
+
output: aoutput
|
|
1055
|
+
};
|
|
1056
|
+
_assert.default = assert;
|
|
1057
|
+
var _u64 = {};
|
|
1058
|
+
Object.defineProperty(_u64, "__esModule", { value: true });
|
|
1059
|
+
_u64.add5L = _u64.add5H = _u64.add4H = _u64.add4L = _u64.add3H = _u64.add3L = _u64.rotlBL = _u64.rotlBH = _u64.rotlSL = _u64.rotlSH = _u64.rotr32L = _u64.rotr32H = _u64.rotrBL = _u64.rotrBH = _u64.rotrSL = _u64.rotrSH = _u64.shrSL = _u64.shrSH = _u64.toBig = void 0;
|
|
1060
|
+
_u64.fromBig = fromBig;
|
|
1061
|
+
_u64.split = split$1;
|
|
1062
|
+
_u64.add = add;
|
|
1063
|
+
const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
1064
|
+
const _32n = /* @__PURE__ */ BigInt(32);
|
|
1065
|
+
function fromBig(n, le = false) {
|
|
1066
|
+
if (le)
|
|
1067
|
+
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
1068
|
+
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
1069
|
+
}
|
|
1070
|
+
function split$1(lst, le = false) {
|
|
1071
|
+
let Ah = new Uint32Array(lst.length);
|
|
1072
|
+
let Al = new Uint32Array(lst.length);
|
|
1073
|
+
for (let i = 0; i < lst.length; i++) {
|
|
1074
|
+
const { h: h2, l } = fromBig(lst[i], le);
|
|
1075
|
+
[Ah[i], Al[i]] = [h2, l];
|
|
1076
|
+
}
|
|
1077
|
+
return [Ah, Al];
|
|
1078
|
+
}
|
|
1079
|
+
const toBig = (h2, l) => BigInt(h2 >>> 0) << _32n | BigInt(l >>> 0);
|
|
1080
|
+
_u64.toBig = toBig;
|
|
1081
|
+
const shrSH = (h2, _l, s) => h2 >>> s;
|
|
1082
|
+
_u64.shrSH = shrSH;
|
|
1083
|
+
const shrSL = (h2, l, s) => h2 << 32 - s | l >>> s;
|
|
1084
|
+
_u64.shrSL = shrSL;
|
|
1085
|
+
const rotrSH = (h2, l, s) => h2 >>> s | l << 32 - s;
|
|
1086
|
+
_u64.rotrSH = rotrSH;
|
|
1087
|
+
const rotrSL = (h2, l, s) => h2 << 32 - s | l >>> s;
|
|
1088
|
+
_u64.rotrSL = rotrSL;
|
|
1089
|
+
const rotrBH = (h2, l, s) => h2 << 64 - s | l >>> s - 32;
|
|
1090
|
+
_u64.rotrBH = rotrBH;
|
|
1091
|
+
const rotrBL = (h2, l, s) => h2 >>> s - 32 | l << 64 - s;
|
|
1092
|
+
_u64.rotrBL = rotrBL;
|
|
1093
|
+
const rotr32H = (_h, l) => l;
|
|
1094
|
+
_u64.rotr32H = rotr32H;
|
|
1095
|
+
const rotr32L = (h2, _l) => h2;
|
|
1096
|
+
_u64.rotr32L = rotr32L;
|
|
1097
|
+
const rotlSH = (h2, l, s) => h2 << s | l >>> 32 - s;
|
|
1098
|
+
_u64.rotlSH = rotlSH;
|
|
1099
|
+
const rotlSL = (h2, l, s) => l << s | h2 >>> 32 - s;
|
|
1100
|
+
_u64.rotlSL = rotlSL;
|
|
1101
|
+
const rotlBH = (h2, l, s) => l << s - 32 | h2 >>> 64 - s;
|
|
1102
|
+
_u64.rotlBH = rotlBH;
|
|
1103
|
+
const rotlBL = (h2, l, s) => h2 << s - 32 | l >>> 64 - s;
|
|
1104
|
+
_u64.rotlBL = rotlBL;
|
|
1105
|
+
function add(Ah, Al, Bh, Bl) {
|
|
1106
|
+
const l = (Al >>> 0) + (Bl >>> 0);
|
|
1107
|
+
return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
|
|
1108
|
+
}
|
|
1109
|
+
const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
|
1110
|
+
_u64.add3L = add3L;
|
|
1111
|
+
const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
|
|
1112
|
+
_u64.add3H = add3H;
|
|
1113
|
+
const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
|
1114
|
+
_u64.add4L = add4L;
|
|
1115
|
+
const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
|
|
1116
|
+
_u64.add4H = add4H;
|
|
1117
|
+
const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
|
1118
|
+
_u64.add5L = add5L;
|
|
1119
|
+
const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
1120
|
+
_u64.add5H = add5H;
|
|
1121
|
+
const u64 = {
|
|
1122
|
+
fromBig,
|
|
1123
|
+
split: split$1,
|
|
1124
|
+
toBig,
|
|
1125
|
+
shrSH,
|
|
1126
|
+
shrSL,
|
|
1127
|
+
rotrSH,
|
|
1128
|
+
rotrSL,
|
|
1129
|
+
rotrBH,
|
|
1130
|
+
rotrBL,
|
|
1131
|
+
rotr32H,
|
|
1132
|
+
rotr32L,
|
|
1133
|
+
rotlSH,
|
|
1134
|
+
rotlSL,
|
|
1135
|
+
rotlBH,
|
|
1136
|
+
rotlBL,
|
|
1137
|
+
add,
|
|
1138
|
+
add3L,
|
|
1139
|
+
add3H,
|
|
1140
|
+
add4L,
|
|
1141
|
+
add4H,
|
|
1142
|
+
add5H,
|
|
1143
|
+
add5L
|
|
1144
|
+
};
|
|
1145
|
+
_u64.default = u64;
|
|
1146
|
+
var utils = {};
|
|
1147
|
+
var crypto = {};
|
|
1148
|
+
Object.defineProperty(crypto, "__esModule", { value: true });
|
|
1149
|
+
crypto.crypto = void 0;
|
|
1150
|
+
crypto.crypto = typeof globalThis === "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
1151
|
+
(function(exports) {
|
|
1152
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1153
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1154
|
+
exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.byteSwap = exports.isLE = exports.rotl = exports.rotr = exports.createView = exports.u32 = exports.u8 = void 0;
|
|
1155
|
+
exports.isBytes = isBytes2;
|
|
1156
|
+
exports.byteSwap32 = byteSwap32;
|
|
1157
|
+
exports.bytesToHex = bytesToHex;
|
|
1158
|
+
exports.hexToBytes = hexToBytes;
|
|
1159
|
+
exports.asyncLoop = asyncLoop;
|
|
1160
|
+
exports.utf8ToBytes = utf8ToBytes;
|
|
1161
|
+
exports.toBytes = toBytes;
|
|
1162
|
+
exports.concatBytes = concatBytes;
|
|
1163
|
+
exports.checkOpts = checkOpts;
|
|
1164
|
+
exports.wrapConstructor = wrapConstructor;
|
|
1165
|
+
exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
|
|
1166
|
+
exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
|
|
1167
|
+
exports.randomBytes = randomBytes;
|
|
1168
|
+
const crypto_1 = crypto;
|
|
1169
|
+
const _assert_js_12 = _assert;
|
|
1170
|
+
function isBytes2(a) {
|
|
1171
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
1172
|
+
}
|
|
1173
|
+
const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
1174
|
+
exports.u8 = u8;
|
|
1175
|
+
const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
1176
|
+
exports.u32 = u32;
|
|
1177
|
+
const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
1178
|
+
exports.createView = createView;
|
|
1179
|
+
const rotr = (word, shift2) => word << 32 - shift2 | word >>> shift2;
|
|
1180
|
+
exports.rotr = rotr;
|
|
1181
|
+
const rotl = (word, shift2) => word << shift2 | word >>> 32 - shift2 >>> 0;
|
|
1182
|
+
exports.rotl = rotl;
|
|
1183
|
+
exports.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
1184
|
+
const byteSwap = (word) => word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
|
1185
|
+
exports.byteSwap = byteSwap;
|
|
1186
|
+
exports.byteSwapIfBE = exports.isLE ? (n) => n : (n) => (0, exports.byteSwap)(n);
|
|
1187
|
+
function byteSwap32(arr) {
|
|
1188
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1189
|
+
arr[i] = (0, exports.byteSwap)(arr[i]);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
1193
|
+
function bytesToHex(bytes) {
|
|
1194
|
+
(0, _assert_js_12.abytes)(bytes);
|
|
1195
|
+
let hex = "";
|
|
1196
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
1197
|
+
hex += hexes[bytes[i]];
|
|
1198
|
+
}
|
|
1199
|
+
return hex;
|
|
1200
|
+
}
|
|
1201
|
+
const asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
1202
|
+
function asciiToBase16(ch) {
|
|
1203
|
+
if (ch >= asciis._0 && ch <= asciis._9)
|
|
1204
|
+
return ch - asciis._0;
|
|
1205
|
+
if (ch >= asciis.A && ch <= asciis.F)
|
|
1206
|
+
return ch - (asciis.A - 10);
|
|
1207
|
+
if (ch >= asciis.a && ch <= asciis.f)
|
|
1208
|
+
return ch - (asciis.a - 10);
|
|
1209
|
+
return;
|
|
1210
|
+
}
|
|
1211
|
+
function hexToBytes(hex) {
|
|
1212
|
+
if (typeof hex !== "string")
|
|
1213
|
+
throw new Error("hex string expected, got " + typeof hex);
|
|
1214
|
+
const hl = hex.length;
|
|
1215
|
+
const al = hl / 2;
|
|
1216
|
+
if (hl % 2)
|
|
1217
|
+
throw new Error("hex string expected, got unpadded hex of length " + hl);
|
|
1218
|
+
const array2 = new Uint8Array(al);
|
|
1219
|
+
for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
|
|
1220
|
+
const n1 = asciiToBase16(hex.charCodeAt(hi));
|
|
1221
|
+
const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
|
|
1222
|
+
if (n1 === void 0 || n2 === void 0) {
|
|
1223
|
+
const char = hex[hi] + hex[hi + 1];
|
|
1224
|
+
throw new Error('hex string expected, got non-hex character "' + char + '" at index ' + hi);
|
|
1225
|
+
}
|
|
1226
|
+
array2[ai] = n1 * 16 + n2;
|
|
1227
|
+
}
|
|
1228
|
+
return array2;
|
|
1229
|
+
}
|
|
1230
|
+
const nextTick2 = async () => {
|
|
1231
|
+
};
|
|
1232
|
+
exports.nextTick = nextTick2;
|
|
1233
|
+
async function asyncLoop(iters, tick, cb) {
|
|
1234
|
+
let ts = Date.now();
|
|
1235
|
+
for (let i = 0; i < iters; i++) {
|
|
1236
|
+
cb(i);
|
|
1237
|
+
const diff = Date.now() - ts;
|
|
1238
|
+
if (diff >= 0 && diff < tick)
|
|
1239
|
+
continue;
|
|
1240
|
+
await (0, exports.nextTick)();
|
|
1241
|
+
ts += diff;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
function utf8ToBytes(str) {
|
|
1245
|
+
if (typeof str !== "string")
|
|
1246
|
+
throw new Error("utf8ToBytes expected string, got " + typeof str);
|
|
1247
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
1248
|
+
}
|
|
1249
|
+
function toBytes(data) {
|
|
1250
|
+
if (typeof data === "string")
|
|
1251
|
+
data = utf8ToBytes(data);
|
|
1252
|
+
(0, _assert_js_12.abytes)(data);
|
|
1253
|
+
return data;
|
|
1254
|
+
}
|
|
1255
|
+
function concatBytes(...arrays) {
|
|
1256
|
+
let sum = 0;
|
|
1257
|
+
for (let i = 0; i < arrays.length; i++) {
|
|
1258
|
+
const a = arrays[i];
|
|
1259
|
+
(0, _assert_js_12.abytes)(a);
|
|
1260
|
+
sum += a.length;
|
|
1261
|
+
}
|
|
1262
|
+
const res = new Uint8Array(sum);
|
|
1263
|
+
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
|
1264
|
+
const a = arrays[i];
|
|
1265
|
+
res.set(a, pad);
|
|
1266
|
+
pad += a.length;
|
|
1267
|
+
}
|
|
1268
|
+
return res;
|
|
1269
|
+
}
|
|
1270
|
+
class Hash2 {
|
|
1271
|
+
// Safe version that clones internal state
|
|
1272
|
+
clone() {
|
|
1273
|
+
return this._cloneInto();
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
exports.Hash = Hash2;
|
|
1277
|
+
function checkOpts(defaults2, opts) {
|
|
1278
|
+
if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]")
|
|
1279
|
+
throw new Error("Options should be object or undefined");
|
|
1280
|
+
const merged = Object.assign(defaults2, opts);
|
|
1281
|
+
return merged;
|
|
1282
|
+
}
|
|
1283
|
+
function wrapConstructor(hashCons) {
|
|
1284
|
+
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
1285
|
+
const tmp = hashCons();
|
|
1286
|
+
hashC.outputLen = tmp.outputLen;
|
|
1287
|
+
hashC.blockLen = tmp.blockLen;
|
|
1288
|
+
hashC.create = () => hashCons();
|
|
1289
|
+
return hashC;
|
|
1290
|
+
}
|
|
1291
|
+
function wrapConstructorWithOpts(hashCons) {
|
|
1292
|
+
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
|
1293
|
+
const tmp = hashCons({});
|
|
1294
|
+
hashC.outputLen = tmp.outputLen;
|
|
1295
|
+
hashC.blockLen = tmp.blockLen;
|
|
1296
|
+
hashC.create = (opts) => hashCons(opts);
|
|
1297
|
+
return hashC;
|
|
1298
|
+
}
|
|
1299
|
+
function wrapXOFConstructorWithOpts(hashCons) {
|
|
1300
|
+
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
|
1301
|
+
const tmp = hashCons({});
|
|
1302
|
+
hashC.outputLen = tmp.outputLen;
|
|
1303
|
+
hashC.blockLen = tmp.blockLen;
|
|
1304
|
+
hashC.create = (opts) => hashCons(opts);
|
|
1305
|
+
return hashC;
|
|
1306
|
+
}
|
|
1307
|
+
function randomBytes(bytesLength = 32) {
|
|
1308
|
+
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
|
|
1309
|
+
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
1310
|
+
}
|
|
1311
|
+
if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === "function") {
|
|
1312
|
+
return crypto_1.crypto.randomBytes(bytesLength);
|
|
1313
|
+
}
|
|
1314
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
1315
|
+
}
|
|
1316
|
+
})(utils);
|
|
1317
|
+
Object.defineProperty(sha3$1, "__esModule", { value: true });
|
|
1318
|
+
sha3$1.shake256 = sha3$1.shake128 = sha3$1.keccak_512 = sha3$1.keccak_384 = sha3$1.keccak_256 = sha3$1.keccak_224 = sha3$1.sha3_512 = sha3$1.sha3_384 = sha3$1.sha3_256 = sha3$1.sha3_224 = sha3$1.Keccak = void 0;
|
|
1319
|
+
sha3$1.keccakP = keccakP;
|
|
1320
|
+
const _assert_js_1 = _assert;
|
|
1321
|
+
const _u64_js_1 = _u64;
|
|
1322
|
+
const utils_js_1 = utils;
|
|
1323
|
+
const SHA3_PI = [];
|
|
1324
|
+
const SHA3_ROTL = [];
|
|
1325
|
+
const _SHA3_IOTA = [];
|
|
1326
|
+
const _0n = /* @__PURE__ */ BigInt(0);
|
|
1327
|
+
const _1n = /* @__PURE__ */ BigInt(1);
|
|
1328
|
+
const _2n = /* @__PURE__ */ BigInt(2);
|
|
1329
|
+
const _7n = /* @__PURE__ */ BigInt(7);
|
|
1330
|
+
const _256n = /* @__PURE__ */ BigInt(256);
|
|
1331
|
+
const _0x71n = /* @__PURE__ */ BigInt(113);
|
|
1332
|
+
for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
|
|
1333
|
+
[x, y] = [y, (2 * x + 3 * y) % 5];
|
|
1334
|
+
SHA3_PI.push(2 * (5 * y + x));
|
|
1335
|
+
SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
|
|
1336
|
+
let t = _0n;
|
|
1337
|
+
for (let j = 0; j < 7; j++) {
|
|
1338
|
+
R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
|
|
1339
|
+
if (R & _2n)
|
|
1340
|
+
t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
|
|
1341
|
+
}
|
|
1342
|
+
_SHA3_IOTA.push(t);
|
|
1343
|
+
}
|
|
1344
|
+
const [SHA3_IOTA_H, SHA3_IOTA_L] = /* @__PURE__ */ (0, _u64_js_1.split)(_SHA3_IOTA, true);
|
|
1345
|
+
const rotlH = (h2, l, s) => s > 32 ? (0, _u64_js_1.rotlBH)(h2, l, s) : (0, _u64_js_1.rotlSH)(h2, l, s);
|
|
1346
|
+
const rotlL = (h2, l, s) => s > 32 ? (0, _u64_js_1.rotlBL)(h2, l, s) : (0, _u64_js_1.rotlSL)(h2, l, s);
|
|
1347
|
+
function keccakP(s, rounds = 24) {
|
|
1348
|
+
const B = new Uint32Array(5 * 2);
|
|
1349
|
+
for (let round = 24 - rounds; round < 24; round++) {
|
|
1350
|
+
for (let x = 0; x < 10; x++)
|
|
1351
|
+
B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
|
|
1352
|
+
for (let x = 0; x < 10; x += 2) {
|
|
1353
|
+
const idx1 = (x + 8) % 10;
|
|
1354
|
+
const idx0 = (x + 2) % 10;
|
|
1355
|
+
const B0 = B[idx0];
|
|
1356
|
+
const B1 = B[idx0 + 1];
|
|
1357
|
+
const Th = rotlH(B0, B1, 1) ^ B[idx1];
|
|
1358
|
+
const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
|
|
1359
|
+
for (let y = 0; y < 50; y += 10) {
|
|
1360
|
+
s[x + y] ^= Th;
|
|
1361
|
+
s[x + y + 1] ^= Tl;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
let curH = s[2];
|
|
1365
|
+
let curL = s[3];
|
|
1366
|
+
for (let t = 0; t < 24; t++) {
|
|
1367
|
+
const shift2 = SHA3_ROTL[t];
|
|
1368
|
+
const Th = rotlH(curH, curL, shift2);
|
|
1369
|
+
const Tl = rotlL(curH, curL, shift2);
|
|
1370
|
+
const PI = SHA3_PI[t];
|
|
1371
|
+
curH = s[PI];
|
|
1372
|
+
curL = s[PI + 1];
|
|
1373
|
+
s[PI] = Th;
|
|
1374
|
+
s[PI + 1] = Tl;
|
|
1375
|
+
}
|
|
1376
|
+
for (let y = 0; y < 50; y += 10) {
|
|
1377
|
+
for (let x = 0; x < 10; x++)
|
|
1378
|
+
B[x] = s[y + x];
|
|
1379
|
+
for (let x = 0; x < 10; x++)
|
|
1380
|
+
s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
|
|
1381
|
+
}
|
|
1382
|
+
s[0] ^= SHA3_IOTA_H[round];
|
|
1383
|
+
s[1] ^= SHA3_IOTA_L[round];
|
|
1384
|
+
}
|
|
1385
|
+
B.fill(0);
|
|
1386
|
+
}
|
|
1387
|
+
class Keccak extends utils_js_1.Hash {
|
|
1388
|
+
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1389
|
+
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
|
1390
|
+
super();
|
|
1391
|
+
this.blockLen = blockLen;
|
|
1392
|
+
this.suffix = suffix;
|
|
1393
|
+
this.outputLen = outputLen;
|
|
1394
|
+
this.enableXOF = enableXOF;
|
|
1395
|
+
this.rounds = rounds;
|
|
1396
|
+
this.pos = 0;
|
|
1397
|
+
this.posOut = 0;
|
|
1398
|
+
this.finished = false;
|
|
1399
|
+
this.destroyed = false;
|
|
1400
|
+
(0, _assert_js_1.anumber)(outputLen);
|
|
1401
|
+
if (0 >= this.blockLen || this.blockLen >= 200)
|
|
1402
|
+
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
1403
|
+
this.state = new Uint8Array(200);
|
|
1404
|
+
this.state32 = (0, utils_js_1.u32)(this.state);
|
|
1405
|
+
}
|
|
1406
|
+
keccak() {
|
|
1407
|
+
if (!utils_js_1.isLE)
|
|
1408
|
+
(0, utils_js_1.byteSwap32)(this.state32);
|
|
1409
|
+
keccakP(this.state32, this.rounds);
|
|
1410
|
+
if (!utils_js_1.isLE)
|
|
1411
|
+
(0, utils_js_1.byteSwap32)(this.state32);
|
|
1412
|
+
this.posOut = 0;
|
|
1413
|
+
this.pos = 0;
|
|
1414
|
+
}
|
|
1415
|
+
update(data) {
|
|
1416
|
+
(0, _assert_js_1.aexists)(this);
|
|
1417
|
+
const { blockLen, state } = this;
|
|
1418
|
+
data = (0, utils_js_1.toBytes)(data);
|
|
1419
|
+
const len = data.length;
|
|
1420
|
+
for (let pos = 0; pos < len; ) {
|
|
1421
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
1422
|
+
for (let i = 0; i < take; i++)
|
|
1423
|
+
state[this.pos++] ^= data[pos++];
|
|
1424
|
+
if (this.pos === blockLen)
|
|
1425
|
+
this.keccak();
|
|
1426
|
+
}
|
|
1427
|
+
return this;
|
|
1428
|
+
}
|
|
1429
|
+
finish() {
|
|
1430
|
+
if (this.finished)
|
|
1431
|
+
return;
|
|
1432
|
+
this.finished = true;
|
|
1433
|
+
const { state, suffix, pos, blockLen } = this;
|
|
1434
|
+
state[pos] ^= suffix;
|
|
1435
|
+
if ((suffix & 128) !== 0 && pos === blockLen - 1)
|
|
1436
|
+
this.keccak();
|
|
1437
|
+
state[blockLen - 1] ^= 128;
|
|
1438
|
+
this.keccak();
|
|
1439
|
+
}
|
|
1440
|
+
writeInto(out) {
|
|
1441
|
+
(0, _assert_js_1.aexists)(this, false);
|
|
1442
|
+
(0, _assert_js_1.abytes)(out);
|
|
1443
|
+
this.finish();
|
|
1444
|
+
const bufferOut = this.state;
|
|
1445
|
+
const { blockLen } = this;
|
|
1446
|
+
for (let pos = 0, len = out.length; pos < len; ) {
|
|
1447
|
+
if (this.posOut >= blockLen)
|
|
1448
|
+
this.keccak();
|
|
1449
|
+
const take = Math.min(blockLen - this.posOut, len - pos);
|
|
1450
|
+
out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
|
|
1451
|
+
this.posOut += take;
|
|
1452
|
+
pos += take;
|
|
1453
|
+
}
|
|
1454
|
+
return out;
|
|
1455
|
+
}
|
|
1456
|
+
xofInto(out) {
|
|
1457
|
+
if (!this.enableXOF)
|
|
1458
|
+
throw new Error("XOF is not possible for this instance");
|
|
1459
|
+
return this.writeInto(out);
|
|
1460
|
+
}
|
|
1461
|
+
xof(bytes) {
|
|
1462
|
+
(0, _assert_js_1.anumber)(bytes);
|
|
1463
|
+
return this.xofInto(new Uint8Array(bytes));
|
|
1464
|
+
}
|
|
1465
|
+
digestInto(out) {
|
|
1466
|
+
(0, _assert_js_1.aoutput)(out, this);
|
|
1467
|
+
if (this.finished)
|
|
1468
|
+
throw new Error("digest() was already called");
|
|
1469
|
+
this.writeInto(out);
|
|
1470
|
+
this.destroy();
|
|
1471
|
+
return out;
|
|
1472
|
+
}
|
|
1473
|
+
digest() {
|
|
1474
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
1475
|
+
}
|
|
1476
|
+
destroy() {
|
|
1477
|
+
this.destroyed = true;
|
|
1478
|
+
this.state.fill(0);
|
|
1479
|
+
}
|
|
1480
|
+
_cloneInto(to) {
|
|
1481
|
+
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
|
1482
|
+
to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
|
|
1483
|
+
to.state32.set(this.state32);
|
|
1484
|
+
to.pos = this.pos;
|
|
1485
|
+
to.posOut = this.posOut;
|
|
1486
|
+
to.finished = this.finished;
|
|
1487
|
+
to.rounds = rounds;
|
|
1488
|
+
to.suffix = suffix;
|
|
1489
|
+
to.outputLen = outputLen;
|
|
1490
|
+
to.enableXOF = enableXOF;
|
|
1491
|
+
to.destroyed = this.destroyed;
|
|
1492
|
+
return to;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
sha3$1.Keccak = Keccak;
|
|
1496
|
+
const gen = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapConstructor)(() => new Keccak(blockLen, suffix, outputLen));
|
|
1497
|
+
sha3$1.sha3_224 = gen(6, 144, 224 / 8);
|
|
1498
|
+
sha3$1.sha3_256 = gen(6, 136, 256 / 8);
|
|
1499
|
+
sha3$1.sha3_384 = gen(6, 104, 384 / 8);
|
|
1500
|
+
sha3$1.sha3_512 = gen(6, 72, 512 / 8);
|
|
1501
|
+
sha3$1.keccak_224 = gen(1, 144, 224 / 8);
|
|
1502
|
+
sha3$1.keccak_256 = gen(1, 136, 256 / 8);
|
|
1503
|
+
sha3$1.keccak_384 = gen(1, 104, 384 / 8);
|
|
1504
|
+
sha3$1.keccak_512 = gen(1, 72, 512 / 8);
|
|
1505
|
+
const genShake = (suffix, blockLen, outputLen) => (0, utils_js_1.wrapXOFConstructorWithOpts)((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
|
|
1506
|
+
sha3$1.shake128 = genShake(31, 168, 128 / 8);
|
|
1507
|
+
sha3$1.shake256 = genShake(31, 136, 256 / 8);
|
|
1508
|
+
const { sha3_512: sha3 } = sha3$1;
|
|
1509
|
+
const defaultLength = 24;
|
|
1510
|
+
const bigLength = 32;
|
|
1511
|
+
const createEntropy = (length = 4, random = Math.random) => {
|
|
1512
|
+
let entropy = "";
|
|
1513
|
+
while (entropy.length < length) {
|
|
1514
|
+
entropy = entropy + Math.floor(random() * 36).toString(36);
|
|
1515
|
+
}
|
|
1516
|
+
return entropy;
|
|
1517
|
+
};
|
|
1518
|
+
function bufToBigInt(buf) {
|
|
1519
|
+
let bits = 8n;
|
|
1520
|
+
let value = 0n;
|
|
1521
|
+
for (const i of buf.values()) {
|
|
1522
|
+
const bi = BigInt(i);
|
|
1523
|
+
value = (value << bits) + bi;
|
|
1524
|
+
}
|
|
1525
|
+
return value;
|
|
1526
|
+
}
|
|
1527
|
+
const hash = (input = "") => {
|
|
1528
|
+
return bufToBigInt(sha3(input)).toString(36).slice(1);
|
|
1529
|
+
};
|
|
1530
|
+
const alphabet = Array.from(
|
|
1531
|
+
{ length: 26 },
|
|
1532
|
+
(x, i) => String.fromCharCode(i + 97)
|
|
1533
|
+
);
|
|
1534
|
+
const randomLetter = (random) => alphabet[Math.floor(random() * alphabet.length)];
|
|
1535
|
+
const createFingerprint = ({
|
|
1536
|
+
globalObj = typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof window !== "undefined" ? window : {},
|
|
1537
|
+
random = Math.random
|
|
1538
|
+
} = {}) => {
|
|
1539
|
+
const globals = Object.keys(globalObj).toString();
|
|
1540
|
+
const sourceString = globals.length ? globals + createEntropy(bigLength, random) : createEntropy(bigLength, random);
|
|
1541
|
+
return hash(sourceString).substring(0, bigLength);
|
|
1542
|
+
};
|
|
1543
|
+
const createCounter = (count) => () => {
|
|
1544
|
+
return count++;
|
|
1545
|
+
};
|
|
1546
|
+
const initialCountMax = 476782367;
|
|
1547
|
+
const init$1 = ({
|
|
1548
|
+
// Fallback if the user does not pass in a CSPRNG. This should be OK
|
|
1549
|
+
// because we don't rely solely on the random number generator for entropy.
|
|
1550
|
+
// We also use the host fingerprint, current time, and a session counter.
|
|
1551
|
+
random = Math.random,
|
|
1552
|
+
counter = createCounter(Math.floor(random() * initialCountMax)),
|
|
1553
|
+
length = defaultLength,
|
|
1554
|
+
fingerprint = createFingerprint({ random })
|
|
1555
|
+
} = {}) => {
|
|
1556
|
+
return function cuid2() {
|
|
1557
|
+
const firstLetter = randomLetter(random);
|
|
1558
|
+
const time = Date.now().toString(36);
|
|
1559
|
+
const count = counter().toString(36);
|
|
1560
|
+
const salt = createEntropy(length, random);
|
|
1561
|
+
const hashInput = `${time + salt + count + fingerprint}`;
|
|
1562
|
+
return `${firstLetter + hash(hashInput).substring(1, length)}`;
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
const createId$1 = init$1();
|
|
1566
|
+
const isCuid$1 = (id, { minLength = 2, maxLength = bigLength } = {}) => {
|
|
1567
|
+
const length = id.length;
|
|
1568
|
+
const regex2 = /^[0-9a-z]+$/;
|
|
1569
|
+
try {
|
|
1570
|
+
if (typeof id === "string" && length >= minLength && length <= maxLength && regex2.test(id))
|
|
1571
|
+
return true;
|
|
1572
|
+
} finally {
|
|
1573
|
+
}
|
|
1574
|
+
return false;
|
|
1575
|
+
};
|
|
1576
|
+
src.getConstants = () => ({ defaultLength, bigLength });
|
|
1577
|
+
src.init = init$1;
|
|
1578
|
+
src.createId = createId$1;
|
|
1579
|
+
src.bufToBigInt = bufToBigInt;
|
|
1580
|
+
src.createCounter = createCounter;
|
|
1581
|
+
src.createFingerprint = createFingerprint;
|
|
1582
|
+
src.isCuid = isCuid$1;
|
|
1583
|
+
const { createId, init, getConstants, isCuid } = src;
|
|
1584
|
+
var createId_1 = createId;
|
|
1006
1585
|
const _export_sfc = (sfc, props2) => {
|
|
1007
1586
|
const target = sfc.__vccOpts || sfc;
|
|
1008
1587
|
for (const [key, val] of props2) {
|
|
@@ -2576,40 +3155,40 @@ class ReferenceSet extends Set {
|
|
|
2576
3155
|
return next;
|
|
2577
3156
|
}
|
|
2578
3157
|
}
|
|
2579
|
-
function clone$2(
|
|
2580
|
-
if (isSchema(
|
|
2581
|
-
return
|
|
2582
|
-
if (seen.has(
|
|
2583
|
-
return seen.get(
|
|
3158
|
+
function clone$2(src2, seen = /* @__PURE__ */ new Map()) {
|
|
3159
|
+
if (isSchema(src2) || !src2 || typeof src2 !== "object")
|
|
3160
|
+
return src2;
|
|
3161
|
+
if (seen.has(src2))
|
|
3162
|
+
return seen.get(src2);
|
|
2584
3163
|
let copy2;
|
|
2585
|
-
if (
|
|
2586
|
-
copy2 = new Date(
|
|
2587
|
-
seen.set(
|
|
2588
|
-
} else if (
|
|
2589
|
-
copy2 = new RegExp(
|
|
2590
|
-
seen.set(
|
|
2591
|
-
} else if (Array.isArray(
|
|
2592
|
-
copy2 = new Array(
|
|
2593
|
-
seen.set(
|
|
2594
|
-
for (let i = 0; i <
|
|
2595
|
-
copy2[i] = clone$2(
|
|
2596
|
-
} else if (
|
|
3164
|
+
if (src2 instanceof Date) {
|
|
3165
|
+
copy2 = new Date(src2.getTime());
|
|
3166
|
+
seen.set(src2, copy2);
|
|
3167
|
+
} else if (src2 instanceof RegExp) {
|
|
3168
|
+
copy2 = new RegExp(src2);
|
|
3169
|
+
seen.set(src2, copy2);
|
|
3170
|
+
} else if (Array.isArray(src2)) {
|
|
3171
|
+
copy2 = new Array(src2.length);
|
|
3172
|
+
seen.set(src2, copy2);
|
|
3173
|
+
for (let i = 0; i < src2.length; i++)
|
|
3174
|
+
copy2[i] = clone$2(src2[i], seen);
|
|
3175
|
+
} else if (src2 instanceof Map) {
|
|
2597
3176
|
copy2 = /* @__PURE__ */ new Map();
|
|
2598
|
-
seen.set(
|
|
2599
|
-
for (const [k, v] of
|
|
3177
|
+
seen.set(src2, copy2);
|
|
3178
|
+
for (const [k, v] of src2.entries())
|
|
2600
3179
|
copy2.set(k, clone$2(v, seen));
|
|
2601
|
-
} else if (
|
|
3180
|
+
} else if (src2 instanceof Set) {
|
|
2602
3181
|
copy2 = /* @__PURE__ */ new Set();
|
|
2603
|
-
seen.set(
|
|
2604
|
-
for (const v of
|
|
3182
|
+
seen.set(src2, copy2);
|
|
3183
|
+
for (const v of src2)
|
|
2605
3184
|
copy2.add(clone$2(v, seen));
|
|
2606
|
-
} else if (
|
|
3185
|
+
} else if (src2 instanceof Object) {
|
|
2607
3186
|
copy2 = {};
|
|
2608
|
-
seen.set(
|
|
2609
|
-
for (const [k, v] of Object.entries(
|
|
3187
|
+
seen.set(src2, copy2);
|
|
3188
|
+
for (const [k, v] of Object.entries(src2))
|
|
2610
3189
|
copy2[k] = clone$2(v, seen);
|
|
2611
3190
|
} else {
|
|
2612
|
-
throw Error(`Unable to clone ${
|
|
3191
|
+
throw Error(`Unable to clone ${src2}`);
|
|
2613
3192
|
}
|
|
2614
3193
|
return copy2;
|
|
2615
3194
|
}
|
|
@@ -4066,11 +4645,11 @@ function getParentAutoScrollElement$1(el, includeSelf) {
|
|
|
4066
4645
|
} while (elem = elem.parentNode);
|
|
4067
4646
|
return getWindowScrollingElement$1();
|
|
4068
4647
|
}
|
|
4069
|
-
function extend$1(dst,
|
|
4070
|
-
if (dst &&
|
|
4071
|
-
for (var key in
|
|
4072
|
-
if (
|
|
4073
|
-
dst[key] =
|
|
4648
|
+
function extend$1(dst, src2) {
|
|
4649
|
+
if (dst && src2) {
|
|
4650
|
+
for (var key in src2) {
|
|
4651
|
+
if (src2.hasOwnProperty(key)) {
|
|
4652
|
+
dst[key] = src2[key];
|
|
4074
4653
|
}
|
|
4075
4654
|
}
|
|
4076
4655
|
}
|
|
@@ -9838,10 +10417,10 @@ class DOMSerializer {
|
|
|
9838
10417
|
while (keep < active.length)
|
|
9839
10418
|
top = active.pop()[1];
|
|
9840
10419
|
while (rendered < node.marks.length) {
|
|
9841
|
-
let
|
|
9842
|
-
let markDOM = this.serializeMark(
|
|
10420
|
+
let add2 = node.marks[rendered++];
|
|
10421
|
+
let markDOM = this.serializeMark(add2, node.isInline, options);
|
|
9843
10422
|
if (markDOM) {
|
|
9844
|
-
active.push([
|
|
10423
|
+
active.push([add2, top]);
|
|
9845
10424
|
top.appendChild(markDOM.dom);
|
|
9846
10425
|
top = markDOM.contentDOM || markDOM.dom;
|
|
9847
10426
|
}
|
|
@@ -10972,11 +11551,11 @@ class Fitter {
|
|
|
10972
11551
|
this.openFrontierNode(wrap[i]);
|
|
10973
11552
|
let slice2 = this.unplaced, fragment = parent2 ? parent2.content : slice2.content;
|
|
10974
11553
|
let openStart = slice2.openStart - sliceDepth;
|
|
10975
|
-
let taken = 0,
|
|
11554
|
+
let taken = 0, add2 = [];
|
|
10976
11555
|
let { match, type: type2 } = this.frontier[frontierDepth];
|
|
10977
11556
|
if (inject2) {
|
|
10978
11557
|
for (let i = 0; i < inject2.childCount; i++)
|
|
10979
|
-
|
|
11558
|
+
add2.push(inject2.child(i));
|
|
10980
11559
|
match = match.matchFragment(inject2);
|
|
10981
11560
|
}
|
|
10982
11561
|
let openEndCount = fragment.size + sliceDepth - (slice2.content.size - slice2.openEnd);
|
|
@@ -10987,13 +11566,13 @@ class Fitter {
|
|
|
10987
11566
|
taken++;
|
|
10988
11567
|
if (taken > 1 || openStart == 0 || next.content.size) {
|
|
10989
11568
|
match = matches2;
|
|
10990
|
-
|
|
11569
|
+
add2.push(closeNodeStart(next.mark(type2.allowedMarks(next.marks)), taken == 1 ? openStart : 0, taken == fragment.childCount ? openEndCount : -1));
|
|
10991
11570
|
}
|
|
10992
11571
|
}
|
|
10993
11572
|
let toEnd = taken == fragment.childCount;
|
|
10994
11573
|
if (!toEnd)
|
|
10995
11574
|
openEndCount = -1;
|
|
10996
|
-
this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(
|
|
11575
|
+
this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add2));
|
|
10997
11576
|
this.frontier[frontierDepth].match = match;
|
|
10998
11577
|
if (toEnd && openEndCount < 0 && parent2 && parent2.type == this.frontier[this.depth].type && this.frontier.length > 1)
|
|
10999
11578
|
this.closeFrontierNode();
|
|
@@ -11042,8 +11621,8 @@ class Fitter {
|
|
|
11042
11621
|
this.placed = addToFragment(this.placed, close2.depth, close2.fit);
|
|
11043
11622
|
$to = close2.move;
|
|
11044
11623
|
for (let d = close2.depth + 1; d <= $to.depth; d++) {
|
|
11045
|
-
let node = $to.node(d),
|
|
11046
|
-
this.openFrontierNode(node.type, node.attrs,
|
|
11624
|
+
let node = $to.node(d), add2 = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));
|
|
11625
|
+
this.openFrontierNode(node.type, node.attrs, add2);
|
|
11047
11626
|
}
|
|
11048
11627
|
return $to;
|
|
11049
11628
|
}
|
|
@@ -11055,9 +11634,9 @@ class Fitter {
|
|
|
11055
11634
|
}
|
|
11056
11635
|
closeFrontierNode() {
|
|
11057
11636
|
let open = this.frontier.pop();
|
|
11058
|
-
let
|
|
11059
|
-
if (
|
|
11060
|
-
this.placed = addToFragment(this.placed, this.frontier.length,
|
|
11637
|
+
let add2 = open.match.fillBefore(Fragment.empty, true);
|
|
11638
|
+
if (add2.childCount)
|
|
11639
|
+
this.placed = addToFragment(this.placed, this.frontier.length, add2);
|
|
11061
11640
|
}
|
|
11062
11641
|
}
|
|
11063
11642
|
function dropFromFragment(fragment, depth, count) {
|
|
@@ -24123,7 +24702,7 @@ lodash.exports;
|
|
|
24123
24702
|
var id = ++idCounter2;
|
|
24124
24703
|
return toString2(prefix) + id;
|
|
24125
24704
|
}
|
|
24126
|
-
var
|
|
24705
|
+
var add2 = createMathOperation(function(augend, addend) {
|
|
24127
24706
|
return augend + addend;
|
|
24128
24707
|
}, 0);
|
|
24129
24708
|
var ceil = createRound("ceil");
|
|
@@ -24316,7 +24895,7 @@ lodash.exports;
|
|
|
24316
24895
|
lodash2.extend = assignIn;
|
|
24317
24896
|
lodash2.extendWith = assignInWith;
|
|
24318
24897
|
mixin(lodash2, lodash2);
|
|
24319
|
-
lodash2.add =
|
|
24898
|
+
lodash2.add = add2;
|
|
24320
24899
|
lodash2.attempt = attempt;
|
|
24321
24900
|
lodash2.camelCase = camelCase;
|
|
24322
24901
|
lodash2.capitalize = capitalize;
|
|
@@ -25070,11 +25649,11 @@ function getParentAutoScrollElement(el, includeSelf) {
|
|
|
25070
25649
|
} while (elem = elem.parentNode);
|
|
25071
25650
|
return getWindowScrollingElement();
|
|
25072
25651
|
}
|
|
25073
|
-
function extend(dst,
|
|
25074
|
-
if (dst &&
|
|
25075
|
-
for (var key in
|
|
25076
|
-
if (
|
|
25077
|
-
dst[key] =
|
|
25652
|
+
function extend(dst, src2) {
|
|
25653
|
+
if (dst && src2) {
|
|
25654
|
+
for (var key in src2) {
|
|
25655
|
+
if (src2.hasOwnProperty(key)) {
|
|
25656
|
+
dst[key] = src2[key];
|
|
25078
25657
|
}
|
|
25079
25658
|
}
|
|
25080
25659
|
}
|
|
@@ -26882,43 +27461,6 @@ _extends(Remove, {
|
|
|
26882
27461
|
});
|
|
26883
27462
|
Sortable.mount(new AutoScrollPlugin());
|
|
26884
27463
|
Sortable.mount(Remove, Revert);
|
|
26885
|
-
const byteToHex = [];
|
|
26886
|
-
for (let i = 0; i < 256; ++i) {
|
|
26887
|
-
byteToHex.push((i + 256).toString(16).slice(1));
|
|
26888
|
-
}
|
|
26889
|
-
function unsafeStringify(arr, offset = 0) {
|
|
26890
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
26891
|
-
}
|
|
26892
|
-
let getRandomValues;
|
|
26893
|
-
const rnds8 = new Uint8Array(16);
|
|
26894
|
-
function rng() {
|
|
26895
|
-
if (!getRandomValues) {
|
|
26896
|
-
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
26897
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
26898
|
-
}
|
|
26899
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
26900
|
-
}
|
|
26901
|
-
return getRandomValues(rnds8);
|
|
26902
|
-
}
|
|
26903
|
-
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
26904
|
-
const native = { randomUUID };
|
|
26905
|
-
function v4(options, buf, offset) {
|
|
26906
|
-
if (native.randomUUID && !buf && !options) {
|
|
26907
|
-
return native.randomUUID();
|
|
26908
|
-
}
|
|
26909
|
-
options = options || {};
|
|
26910
|
-
const rnds = options.random || (options.rng || rng)();
|
|
26911
|
-
rnds[6] = rnds[6] & 15 | 64;
|
|
26912
|
-
rnds[8] = rnds[8] & 63 | 128;
|
|
26913
|
-
if (buf) {
|
|
26914
|
-
offset = offset || 0;
|
|
26915
|
-
for (let i = 0; i < 16; ++i) {
|
|
26916
|
-
buf[offset + i] = rnds[i];
|
|
26917
|
-
}
|
|
26918
|
-
return buf;
|
|
26919
|
-
}
|
|
26920
|
-
return unsafeStringify(rnds);
|
|
26921
|
-
}
|
|
26922
27464
|
var baseKeys = _baseKeys, getTag = _getTag, isArguments = isArguments_1, isArray = isArray_1, isArrayLike = isArrayLike_1, isBuffer = isBufferExports, isPrototype = _isPrototype, isTypedArray = isTypedArray_1;
|
|
26923
27465
|
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
26924
27466
|
var objectProto = Object.prototype;
|
|
@@ -26958,25 +27500,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26958
27500
|
__name: "AccordionItem",
|
|
26959
27501
|
props: {
|
|
26960
27502
|
item: {},
|
|
26961
|
-
|
|
27503
|
+
allowedEmbedTypes: {},
|
|
26962
27504
|
embeds: { default: () => {
|
|
26963
27505
|
} },
|
|
26964
27506
|
isFocused: { type: Boolean, default: false },
|
|
26965
27507
|
isDisabled: { type: Boolean, default: false },
|
|
26966
27508
|
isExpanded: { type: Boolean, default: false }
|
|
26967
27509
|
},
|
|
26968
|
-
emits: ["save", "
|
|
27510
|
+
emits: ["save", "delete"],
|
|
26969
27511
|
setup(__props, { emit: emit2 }) {
|
|
26970
27512
|
const props2 = __props;
|
|
26971
27513
|
const eventBus = inject("$eventBus");
|
|
26972
27514
|
const isEditing = ref(!props2.item.title);
|
|
26973
27515
|
const form = ref();
|
|
26974
27516
|
const title = ref(props2.item.title);
|
|
26975
|
-
const isNew = computed(() => !props2.item.title);
|
|
26976
27517
|
const hasElements = computed(() => !isEmpty$1(props2.embeds));
|
|
26977
27518
|
const cancel = () => {
|
|
26978
|
-
if (isNew.value)
|
|
26979
|
-
return emit2("delete");
|
|
26980
27519
|
title.value = props2.item.title;
|
|
26981
27520
|
isEditing.value = false;
|
|
26982
27521
|
};
|
|
@@ -26988,8 +27527,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
26988
27527
|
isEditing.value = false;
|
|
26989
27528
|
const item = { ...props2.item, title: title.value };
|
|
26990
27529
|
emit2("save", { item, embeds: props2.embeds });
|
|
26991
|
-
if (isNew.value)
|
|
26992
|
-
emit2("expand");
|
|
26993
27530
|
};
|
|
26994
27531
|
const saveEmbed = (embeds) => {
|
|
26995
27532
|
const item = cloneDeep$1(props2.item);
|
|
@@ -27020,13 +27557,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27020
27557
|
const _component_VExpansionPanelTitle = resolveComponent("VExpansionPanelTitle");
|
|
27021
27558
|
const _component_VHover = resolveComponent("VHover");
|
|
27022
27559
|
const _component_VAlert = resolveComponent("VAlert");
|
|
27023
|
-
const
|
|
27560
|
+
const _component_TailorEmbeddedContainer = resolveComponent("TailorEmbeddedContainer");
|
|
27024
27561
|
const _component_VExpansionPanelText = resolveComponent("VExpansionPanelText");
|
|
27025
27562
|
const _component_VExpansionPanel = resolveComponent("VExpansionPanel");
|
|
27026
27563
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
27027
27564
|
return openBlock(), createBlock(_component_VExpansionPanel, {
|
|
27028
|
-
"hide-actions": isNew.value,
|
|
27029
|
-
readonly: isNew.value,
|
|
27030
27565
|
value: _ctx.item.id
|
|
27031
27566
|
}, {
|
|
27032
27567
|
default: withCtx(() => [
|
|
@@ -27035,7 +27570,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27035
27570
|
createVNode(_component_VExpansionPanelTitle, mergeProps(hoverProps, {
|
|
27036
27571
|
class: "pa-2 pr-4",
|
|
27037
27572
|
color: "primary-lighten-5",
|
|
27038
|
-
"min-height": "
|
|
27573
|
+
"min-height": "64"
|
|
27039
27574
|
}), {
|
|
27040
27575
|
default: withCtx(() => [
|
|
27041
27576
|
createVNode(_component_VForm, {
|
|
@@ -27143,10 +27678,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27143
27678
|
]),
|
|
27144
27679
|
_: 1
|
|
27145
27680
|
})) : createCommentVNode("", true),
|
|
27146
|
-
createVNode(
|
|
27681
|
+
createVNode(_component_TailorEmbeddedContainer, {
|
|
27147
27682
|
container: { embeds: _ctx.embeds },
|
|
27148
27683
|
"is-disabled": _ctx.isDisabled,
|
|
27149
|
-
types: _ctx.
|
|
27684
|
+
types: _ctx.allowedEmbedTypes,
|
|
27150
27685
|
onDelete: deleteEmbed,
|
|
27151
27686
|
onSave: _cache[6] || (_cache[6] = ($event) => saveEmbed($event.embeds))
|
|
27152
27687
|
}, null, 8, ["container", "is-disabled", "types"])
|
|
@@ -27155,18 +27690,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
27155
27690
|
})
|
|
27156
27691
|
]),
|
|
27157
27692
|
_: 1
|
|
27158
|
-
}, 8, ["
|
|
27693
|
+
}, 8, ["value"]);
|
|
27159
27694
|
};
|
|
27160
27695
|
}
|
|
27161
27696
|
});
|
|
27162
|
-
const
|
|
27163
|
-
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
27697
|
+
const AccordionItem_vue_vue_type_style_index_0_scoped_2e9fbd32_lang = "";
|
|
27698
|
+
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2e9fbd32"]]);
|
|
27164
27699
|
const _hoisted_1 = { class: "tce-accordion d-flex flex-column align-center text-center" };
|
|
27165
27700
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27166
27701
|
__name: "Edit",
|
|
27167
27702
|
props: {
|
|
27168
27703
|
element: {},
|
|
27169
|
-
|
|
27704
|
+
allowedEmbedTypes: {},
|
|
27170
27705
|
isFocused: { type: Boolean },
|
|
27171
27706
|
isDisabled: { type: Boolean }
|
|
27172
27707
|
},
|
|
@@ -27183,9 +27718,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27183
27718
|
return acc;
|
|
27184
27719
|
}, {})
|
|
27185
27720
|
);
|
|
27186
|
-
const
|
|
27187
|
-
const id =
|
|
27188
|
-
elementData.items.push({ id, elementIds: [] });
|
|
27721
|
+
const add2 = () => {
|
|
27722
|
+
const id = createId_1();
|
|
27723
|
+
elementData.items.push({ id, title: "Title", elementIds: [] });
|
|
27724
|
+
expanded.value.push(id);
|
|
27725
|
+
emit2("save", elementData);
|
|
27189
27726
|
};
|
|
27190
27727
|
const saveItem = ({ item, embeds = {} }, index2) => {
|
|
27191
27728
|
elementData.items[index2] = item;
|
|
@@ -27227,7 +27764,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27227
27764
|
ref: panels,
|
|
27228
27765
|
modelValue: expanded.value,
|
|
27229
27766
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => expanded.value = $event),
|
|
27230
|
-
elevation: "0",
|
|
27231
27767
|
rounded: "lg",
|
|
27232
27768
|
multiple: ""
|
|
27233
27769
|
}, {
|
|
@@ -27240,7 +27776,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27240
27776
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(elementData.items, (item, index2) => {
|
|
27241
27777
|
return openBlock(), createBlock(AccordionItem, {
|
|
27242
27778
|
key: item.id,
|
|
27243
|
-
"embed-types": _ctx.
|
|
27779
|
+
"allowed-embed-types": _ctx.allowedEmbedTypes,
|
|
27244
27780
|
embeds: embedsByItem.value[item.id],
|
|
27245
27781
|
"is-disabled": _ctx.isDisabled,
|
|
27246
27782
|
"is-expanded": expanded.value.includes(item.id),
|
|
@@ -27249,7 +27785,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27249
27785
|
onDelete: ($event) => deleteItem(item.id, index2),
|
|
27250
27786
|
onExpand: ($event) => expanded.value.push(item.id),
|
|
27251
27787
|
onSave: ($event) => saveItem($event, index2)
|
|
27252
|
-
}, null, 8, ["embed-types", "embeds", "is-disabled", "is-expanded", "is-focused", "item", "onDelete", "onExpand", "onSave"]);
|
|
27788
|
+
}, null, 8, ["allowed-embed-types", "embeds", "is-disabled", "is-expanded", "is-focused", "item", "onDelete", "onExpand", "onSave"]);
|
|
27253
27789
|
}), 128))
|
|
27254
27790
|
]),
|
|
27255
27791
|
_: 1
|
|
@@ -27272,7 +27808,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27272
27808
|
color: "primary-darken-4",
|
|
27273
27809
|
"prepend-icon": "mdi-plus",
|
|
27274
27810
|
variant: "text",
|
|
27275
|
-
onClick:
|
|
27811
|
+
onClick: add2
|
|
27276
27812
|
}, {
|
|
27277
27813
|
default: withCtx(() => [
|
|
27278
27814
|
createTextVNode(" Add accordion item ")
|
|
@@ -27283,8 +27819,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27283
27819
|
};
|
|
27284
27820
|
}
|
|
27285
27821
|
});
|
|
27286
|
-
const
|
|
27287
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
27822
|
+
const Edit_vue_vue_type_style_index_0_scoped_b6deefb4_lang = "";
|
|
27823
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b6deefb4"]]);
|
|
27288
27824
|
const manifest = {
|
|
27289
27825
|
...src_default,
|
|
27290
27826
|
Edit
|