lib0 0.2.107 → 0.2.109
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/bin/0serve.js +9 -1
- package/coverage/tmp/coverage-32991-1750516864118-0.json +1 -0
- package/diff/patience.d.ts +16 -0
- package/diff/patience.d.ts.map +1 -0
- package/diff/patience.js +226 -0
- package/diff/patience.test.d.ts +4 -0
- package/diff/patience.test.d.ts.map +1 -0
- package/dist/aes-gcm.cjs +3 -3
- package/dist/{broadcastchannel-b12b5283.cjs → broadcastchannel-3f71755b.cjs} +2 -2
- package/dist/{broadcastchannel-b12b5283.cjs.map → broadcastchannel-3f71755b.cjs.map} +1 -1
- package/dist/broadcastchannel.cjs +8 -8
- package/dist/{buffer-c775e94f.cjs → buffer-c040e625.cjs} +5 -5
- package/dist/{buffer-c775e94f.cjs.map → buffer-c040e625.cjs.map} +1 -1
- package/dist/buffer.cjs +7 -7
- package/dist/cache.cjs +2 -2
- package/dist/component.cjs +4 -4
- package/dist/{decoding-a2e1942e.cjs → decoding-7b1393a8.cjs} +3 -3
- package/dist/{decoding-a2e1942e.cjs.map → decoding-7b1393a8.cjs.map} +1 -1
- package/dist/decoding.cjs +3 -3
- package/dist/diff/patience.d.ts +16 -0
- package/dist/diff/patience.d.ts.map +1 -0
- package/dist/diff/patience.test.d.ts +4 -0
- package/dist/diff/patience.test.d.ts.map +1 -0
- package/dist/{diff-6c8c103c.cjs → diff-117a5b30.cjs} +2 -2
- package/dist/{diff-6c8c103c.cjs.map → diff-117a5b30.cjs.map} +1 -1
- package/dist/diff.cjs +3 -3
- package/dist/{encoding-cbd8e85d.cjs → encoding-364fc682.cjs} +2 -2
- package/dist/{encoding-cbd8e85d.cjs.map → encoding-364fc682.cjs.map} +1 -1
- package/dist/encoding.cjs +2 -2
- package/dist/{environment-a22d11e0.cjs → environment-f28f4004.cjs} +3 -3
- package/dist/{environment-a22d11e0.cjs.map → environment-f28f4004.cjs.map} +1 -1
- package/dist/environment.cjs +4 -4
- package/dist/{function-a29189eb.cjs → function-e09c7eb7.cjs} +2 -2
- package/dist/{function-a29189eb.cjs.map → function-e09c7eb7.cjs.map} +1 -1
- package/dist/function.cjs +2 -2
- package/dist/index.cjs +10 -10
- package/dist/indexeddbV2.cjs +1 -1
- package/dist/jwt.cjs +7 -7
- package/dist/list.cjs +2 -2
- package/dist/logging.cjs +4 -4
- package/dist/logging.common.cjs +4 -4
- package/dist/logging.node.cjs +4 -4
- package/dist/{object-315a738b.cjs → object-0dc73acd.cjs} +10 -1
- package/dist/object-0dc73acd.cjs.map +1 -0
- package/dist/object.cjs +2 -1
- package/dist/object.cjs.map +1 -1
- package/dist/object.d.ts +16 -5
- package/dist/object.d.ts.map +1 -1
- package/dist/object.test.d.ts.map +1 -1
- package/dist/patience.cjs +236 -0
- package/dist/patience.cjs.map +1 -0
- package/dist/performance.node.cjs +2 -2
- package/dist/pledge.cjs +1 -1
- package/dist/{prng-44216e7f.cjs → prng-57f83f83.cjs} +3 -3
- package/dist/{prng-44216e7f.cjs.map → prng-57f83f83.cjs.map} +1 -1
- package/dist/prng.cjs +8 -8
- package/dist/rabin-gf2-polynomial.cjs +7 -7
- package/dist/rabin-uncached.cjs +7 -7
- package/dist/rabin.cjs +7 -7
- package/dist/{string-3cd7a2db.cjs → string-42009272.cjs} +34 -2
- package/dist/string-42009272.cjs.map +1 -0
- package/dist/string.cjs +3 -1
- package/dist/string.cjs.map +1 -1
- package/dist/string.d.ts +2 -0
- package/dist/string.d.ts.map +1 -1
- package/dist/string.test.d.ts +5 -4
- package/dist/string.test.d.ts.map +1 -1
- package/dist/testing.cjs +9 -9
- package/dist/url.cjs +1 -1
- package/object.d.ts +16 -5
- package/object.d.ts.map +1 -1
- package/object.js +7 -0
- package/object.test.d.ts.map +1 -1
- package/package.json +7 -1
- package/string.d.ts +2 -0
- package/string.d.ts.map +1 -1
- package/string.js +28 -0
- package/string.test.d.ts +5 -4
- package/string.test.d.ts.map +1 -1
- package/test.html +1 -0
- package/test.js +2 -0
- package/coverage/tmp/coverage-18706-1746450396473-0.json +0 -1
- package/dist/object-315a738b.cjs.map +0 -1
- package/dist/string-3cd7a2db.cjs.map +0 -1
package/dist/environment.cjs
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('./map-0dabcc55.cjs');
|
|
6
|
-
require('./string-
|
|
6
|
+
require('./string-42009272.cjs');
|
|
7
7
|
require('./conditions-f5c0c102.cjs');
|
|
8
8
|
require('./storage.cjs');
|
|
9
|
-
require('./function-
|
|
10
|
-
var environment = require('./environment-
|
|
9
|
+
require('./function-e09c7eb7.cjs');
|
|
10
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
11
11
|
require('./array-f0f52786.cjs');
|
|
12
12
|
require('./set-a0a3ea69.cjs');
|
|
13
|
-
require('./object-
|
|
13
|
+
require('./object-0dc73acd.cjs');
|
|
14
14
|
require('./traits.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var array = require('./array-f0f52786.cjs');
|
|
4
|
-
var object = require('./object-
|
|
4
|
+
var object = require('./object-0dc73acd.cjs');
|
|
5
5
|
var traits = require('./traits.cjs');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -219,4 +219,4 @@ exports.isOneOf = isOneOf;
|
|
|
219
219
|
exports.isString = isString;
|
|
220
220
|
exports.isTemplate = isTemplate;
|
|
221
221
|
exports.nop = nop;
|
|
222
|
-
//# sourceMappingURL=function-
|
|
222
|
+
//# sourceMappingURL=function-e09c7eb7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-
|
|
1
|
+
{"version":3,"file":"function-e09c7eb7.cjs","sources":["../function.js"],"sourcesContent":["/**\n * Common functions and function call helpers.\n *\n * @module function\n */\n\nimport * as array from './array.js'\nimport * as object from './object.js'\nimport * as traits from './traits.js'\n\n/**\n * Calls all functions in `fs` with args. Only throws after all functions were called.\n *\n * @param {Array<function>} fs\n * @param {Array<any>} args\n */\nexport const callAll = (fs, args, i = 0) => {\n try {\n for (; i < fs.length; i++) {\n fs[i](...args)\n }\n } finally {\n if (i < fs.length) {\n callAll(fs, args, i + 1)\n }\n }\n}\n\nexport const nop = () => {}\n\n/**\n * @template T\n * @param {function():T} f\n * @return {T}\n */\nexport const apply = f => f()\n\n/**\n * @template A\n *\n * @param {A} a\n * @return {A}\n */\nexport const id = a => a\n\n/**\n * @template T\n *\n * @param {T} a\n * @param {T} b\n * @return {boolean}\n */\nexport const equalityStrict = (a, b) => a === b\n\n/**\n * @template T\n *\n * @param {Array<T>|object} a\n * @param {Array<T>|object} b\n * @return {boolean}\n */\nexport const equalityFlat = (a, b) => a === b || (a != null && b != null && a.constructor === b.constructor && ((array.isArray(a) && array.equalFlat(a, /** @type {Array<T>} */ (b))) || (typeof a === 'object' && object.equalFlat(a, b))))\n\n/* c8 ignore start */\n\n/**\n * @param {any} a\n * @param {any} b\n * @return {boolean}\n */\nexport const equalityDeep = (a, b) => {\n if (a === b) {\n return true\n }\n if (a == null || b == null || a.constructor !== b.constructor) {\n return false\n }\n if (a[traits.EqualityTraitSymbol] != null) {\n return a[traits.EqualityTraitSymbol](b)\n }\n switch (a.constructor) {\n case ArrayBuffer:\n a = new Uint8Array(a)\n b = new Uint8Array(b)\n // eslint-disable-next-line no-fallthrough\n case Uint8Array: {\n if (a.byteLength !== b.byteLength) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false\n }\n }\n break\n }\n case Set: {\n if (a.size !== b.size) {\n return false\n }\n for (const value of a) {\n if (!b.has(value)) {\n return false\n }\n }\n break\n }\n case Map: {\n if (a.size !== b.size) {\n return false\n }\n for (const key of a.keys()) {\n if (!b.has(key) || !equalityDeep(a.get(key), b.get(key))) {\n return false\n }\n }\n break\n }\n case Object:\n if (object.length(a) !== object.length(b)) {\n return false\n }\n for (const key in a) {\n if (!object.hasProperty(a, key) || !equalityDeep(a[key], b[key])) {\n return false\n }\n }\n break\n case Array:\n if (a.length !== b.length) {\n return false\n }\n for (let i = 0; i < a.length; i++) {\n if (!equalityDeep(a[i], b[i])) {\n return false\n }\n }\n break\n default:\n return false\n }\n return true\n}\n\n/**\n * @template V\n * @template {V} OPTS\n *\n * @param {V} value\n * @param {Array<OPTS>} options\n */\n// @ts-ignore\nexport const isOneOf = (value, options) => options.includes(value)\n/* c8 ignore stop */\n\nexport const isArray = array.isArray\n\n/**\n * @param {any} s\n * @return {s is String}\n */\nexport const isString = (s) => s && s.constructor === String\n\n/**\n * @param {any} n\n * @return {n is Number}\n */\nexport const isNumber = n => n != null && n.constructor === Number\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {any} n\n * @param {TYPE} T\n * @return {n is InstanceType<TYPE>}\n */\nexport const is = (n, T) => n && n.constructor === T\n\n/**\n * @template {abstract new (...args: any) => any} TYPE\n * @param {TYPE} T\n */\nexport const isTemplate = (T) =>\n /**\n * @param {any} n\n * @return {n is InstanceType<TYPE>}\n **/\n n => n && n.constructor === T\n"],"names":["array.isArray","array.equalFlat","object.equalFlat","traits.EqualityTraitSymbol","object.length","object.hasProperty"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK;AAC5C,EAAE,IAAI;AACN,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/B,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAC;AACpB,KAAK;AACL,GAAG,SAAS;AACZ,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE;AACvB,MAAM,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,G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AAM;AAC5D;AACA;AACA;AACA;AACA;AACY,MAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,WAAW,KAAK,OAAM;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK,EAAC;AACpD;AACA;AACA;AACA;AACA;AACY,MAAC,UAAU,GAAG,CAAC,CAAC;AAC5B;AACA;AACA;AACA;AACA,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/function.cjs
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('./array-f0f52786.cjs');
|
|
6
|
-
require('./object-
|
|
6
|
+
require('./object-0dc73acd.cjs');
|
|
7
7
|
require('./traits.cjs');
|
|
8
|
-
var _function = require('./function-
|
|
8
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
9
9
|
require('./set-a0a3ea69.cjs');
|
|
10
10
|
|
|
11
11
|
|
package/dist/index.cjs
CHANGED
|
@@ -4,17 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var array = require('./array-f0f52786.cjs');
|
|
6
6
|
var binary = require('./binary-ac8e39e2.cjs');
|
|
7
|
-
var broadcastchannel = require('./broadcastchannel-
|
|
8
|
-
var buffer = require('./buffer-
|
|
7
|
+
var broadcastchannel = require('./broadcastchannel-3f71755b.cjs');
|
|
8
|
+
var buffer = require('./buffer-c040e625.cjs');
|
|
9
9
|
var conditions = require('./conditions-f5c0c102.cjs');
|
|
10
|
-
var decoding = require('./decoding-
|
|
11
|
-
var diff = require('./diff-
|
|
10
|
+
var decoding = require('./decoding-7b1393a8.cjs');
|
|
11
|
+
var diff = require('./diff-117a5b30.cjs');
|
|
12
12
|
var dom = require('./dom-16daf1a0.cjs');
|
|
13
|
-
var encoding = require('./encoding-
|
|
14
|
-
var environment = require('./environment-
|
|
13
|
+
var encoding = require('./encoding-364fc682.cjs');
|
|
14
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
15
15
|
var error = require('./error-8582d695.cjs');
|
|
16
16
|
var eventloop = require('./eventloop-b299a889.cjs');
|
|
17
|
-
var _function = require('./function-
|
|
17
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
18
18
|
var indexeddb = require('./indexeddb-0cbb4d6f.cjs');
|
|
19
19
|
var iterator = require('./iterator-9fc627c1.cjs');
|
|
20
20
|
var json = require('./json-092190a1.cjs');
|
|
@@ -23,14 +23,14 @@ var map = require('./map-0dabcc55.cjs');
|
|
|
23
23
|
var math = require('./math-08e068f9.cjs');
|
|
24
24
|
var mutex = require('./mutex-63f09c81.cjs');
|
|
25
25
|
var number = require('./number-466d8922.cjs');
|
|
26
|
-
var object = require('./object-
|
|
26
|
+
var object = require('./object-0dc73acd.cjs');
|
|
27
27
|
var pair = require('./pair-ab022bc3.cjs');
|
|
28
|
-
var prng = require('./prng-
|
|
28
|
+
var prng = require('./prng-57f83f83.cjs');
|
|
29
29
|
var promise = require('./promise-7d13a97c.cjs');
|
|
30
30
|
var set = require('./set-a0a3ea69.cjs');
|
|
31
31
|
var sort = require('./sort-b8702761.cjs');
|
|
32
32
|
var statistics = require('./statistics-c2316dca.cjs');
|
|
33
|
-
var string = require('./string-
|
|
33
|
+
var string = require('./string-42009272.cjs');
|
|
34
34
|
var symbol = require('./symbol-9c439012.cjs');
|
|
35
35
|
var time = require('./time-bc2081b9.cjs');
|
|
36
36
|
var tree = require('./tree-9f3c8837.cjs');
|
package/dist/indexeddbV2.cjs
CHANGED
package/dist/jwt.cjs
CHANGED
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var error = require('./error-8582d695.cjs');
|
|
6
|
-
var buffer = require('./buffer-
|
|
7
|
-
var string = require('./string-
|
|
6
|
+
var buffer = require('./buffer-c040e625.cjs');
|
|
7
|
+
var string = require('./string-42009272.cjs');
|
|
8
8
|
var json = require('./json-092190a1.cjs');
|
|
9
9
|
var ecdsa = require('./ecdsa.cjs');
|
|
10
10
|
var time = require('./time-bc2081b9.cjs');
|
|
11
|
-
require('./environment-
|
|
11
|
+
require('./environment-f28f4004.cjs');
|
|
12
12
|
require('./map-0dabcc55.cjs');
|
|
13
13
|
require('./conditions-f5c0c102.cjs');
|
|
14
14
|
require('./storage.cjs');
|
|
15
|
-
require('./function-
|
|
15
|
+
require('./function-e09c7eb7.cjs');
|
|
16
16
|
require('./array-f0f52786.cjs');
|
|
17
17
|
require('./set-a0a3ea69.cjs');
|
|
18
|
-
require('./object-
|
|
18
|
+
require('./object-0dc73acd.cjs');
|
|
19
19
|
require('./traits.cjs');
|
|
20
20
|
require('./math-08e068f9.cjs');
|
|
21
|
-
require('./encoding-
|
|
21
|
+
require('./encoding-364fc682.cjs');
|
|
22
22
|
require('./number-466d8922.cjs');
|
|
23
23
|
require('./binary-ac8e39e2.cjs');
|
|
24
|
-
require('./decoding-
|
|
24
|
+
require('./decoding-7b1393a8.cjs');
|
|
25
25
|
require('lib0/webcrypto');
|
|
26
26
|
require('./common.cjs');
|
|
27
27
|
require('./metric.cjs');
|
package/dist/list.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _function = require('./function-
|
|
5
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
6
6
|
var error = require('./error-8582d695.cjs');
|
|
7
7
|
require('./array-f0f52786.cjs');
|
|
8
8
|
require('./set-a0a3ea69.cjs');
|
|
9
|
-
require('./object-
|
|
9
|
+
require('./object-0dc73acd.cjs');
|
|
10
10
|
require('./traits.cjs');
|
|
11
11
|
|
|
12
12
|
class ListNode {
|
package/dist/logging.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var environment = require('./environment-
|
|
5
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
6
6
|
var set = require('./set-a0a3ea69.cjs');
|
|
7
7
|
var pair = require('./pair-ab022bc3.cjs');
|
|
8
8
|
var dom = require('./dom-16daf1a0.cjs');
|
|
@@ -11,12 +11,12 @@ var map = require('./map-0dabcc55.cjs');
|
|
|
11
11
|
var eventloop = require('./eventloop-b299a889.cjs');
|
|
12
12
|
var math = require('./math-08e068f9.cjs');
|
|
13
13
|
var logging_common = require('./logging.common.cjs');
|
|
14
|
-
require('./string-
|
|
14
|
+
require('./string-42009272.cjs');
|
|
15
15
|
require('./array-f0f52786.cjs');
|
|
16
16
|
require('./conditions-f5c0c102.cjs');
|
|
17
17
|
require('./storage.cjs');
|
|
18
|
-
require('./function-
|
|
19
|
-
require('./object-
|
|
18
|
+
require('./function-e09c7eb7.cjs');
|
|
19
|
+
require('./object-0dc73acd.cjs');
|
|
20
20
|
require('./traits.cjs');
|
|
21
21
|
require('./time-bc2081b9.cjs');
|
|
22
22
|
require('./metric.cjs');
|
package/dist/logging.common.cjs
CHANGED
|
@@ -4,18 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var symbol = require('./symbol-9c439012.cjs');
|
|
6
6
|
var time = require('./time-bc2081b9.cjs');
|
|
7
|
-
var environment = require('./environment-
|
|
8
|
-
var _function = require('./function-
|
|
7
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
8
|
+
var _function = require('./function-e09c7eb7.cjs');
|
|
9
9
|
var json = require('./json-092190a1.cjs');
|
|
10
10
|
require('./metric.cjs');
|
|
11
11
|
require('./math-08e068f9.cjs');
|
|
12
12
|
require('./map-0dabcc55.cjs');
|
|
13
|
-
require('./string-
|
|
13
|
+
require('./string-42009272.cjs');
|
|
14
14
|
require('./array-f0f52786.cjs');
|
|
15
15
|
require('./set-a0a3ea69.cjs');
|
|
16
16
|
require('./conditions-f5c0c102.cjs');
|
|
17
17
|
require('./storage.cjs');
|
|
18
|
-
require('./object-
|
|
18
|
+
require('./object-0dc73acd.cjs');
|
|
19
19
|
require('./traits.cjs');
|
|
20
20
|
|
|
21
21
|
const BOLD = symbol.create();
|
package/dist/logging.node.cjs
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var environment = require('./environment-
|
|
5
|
+
var environment = require('./environment-f28f4004.cjs');
|
|
6
6
|
var logging_common = require('./logging.common.cjs');
|
|
7
7
|
require('./map-0dabcc55.cjs');
|
|
8
|
-
require('./string-
|
|
8
|
+
require('./string-42009272.cjs');
|
|
9
9
|
require('./array-f0f52786.cjs');
|
|
10
10
|
require('./set-a0a3ea69.cjs');
|
|
11
11
|
require('./conditions-f5c0c102.cjs');
|
|
12
12
|
require('./storage.cjs');
|
|
13
|
-
require('./function-
|
|
14
|
-
require('./object-
|
|
13
|
+
require('./function-e09c7eb7.cjs');
|
|
14
|
+
require('./object-0dc73acd.cjs');
|
|
15
15
|
require('./traits.cjs');
|
|
16
16
|
require('./symbol-9c439012.cjs');
|
|
17
17
|
require('./time-bc2081b9.cjs');
|
|
@@ -21,6 +21,13 @@ const assign = Object.assign;
|
|
|
21
21
|
*/
|
|
22
22
|
const keys = Object.keys;
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @template V
|
|
26
|
+
* @param {{[key:string]: V}} obj
|
|
27
|
+
* @return {Array<V>}
|
|
28
|
+
*/
|
|
29
|
+
const values = Object.values;
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
* @template V
|
|
26
33
|
* @param {{[k:string]:V}} obj
|
|
@@ -145,6 +152,7 @@ var object = /*#__PURE__*/Object.freeze({
|
|
|
145
152
|
create: create,
|
|
146
153
|
assign: assign,
|
|
147
154
|
keys: keys,
|
|
155
|
+
values: values,
|
|
148
156
|
forEach: forEach,
|
|
149
157
|
map: map,
|
|
150
158
|
length: length,
|
|
@@ -173,4 +181,5 @@ exports.map = map;
|
|
|
173
181
|
exports.object = object;
|
|
174
182
|
exports.size = size;
|
|
175
183
|
exports.some = some;
|
|
176
|
-
|
|
184
|
+
exports.values = values;
|
|
185
|
+
//# sourceMappingURL=object-0dc73acd.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-0dc73acd.cjs","sources":["../object.js"],"sourcesContent":["/**\n * Utility functions for working with EcmaScript objects.\n *\n * @module object\n */\n\n/**\n * @return {Object<string,any>} obj\n */\nexport const create = () => Object.create(null)\n\n/**\n * Object.assign\n */\nexport const assign = Object.assign\n\n/**\n * @param {Object<string,any>} obj\n */\nexport const keys = Object.keys\n\n/**\n * @template V\n * @param {{[key:string]: V}} obj\n * @return {Array<V>}\n */\nexport const values = Object.values\n\n/**\n * @template V\n * @param {{[k:string]:V}} obj\n * @param {function(V,string):any} f\n */\nexport const forEach = (obj, f) => {\n for (const key in obj) {\n f(obj[key], key)\n }\n}\n\n/**\n * @todo implement mapToArray & map\n *\n * @template R\n * @param {Object<string,any>} obj\n * @param {function(any,string):R} f\n * @return {Array<R>}\n */\nexport const map = (obj, f) => {\n const results = []\n for (const key in obj) {\n results.push(f(obj[key], key))\n }\n return results\n}\n\n/**\n * @deprecated use object.size instead\n * @param {Object<string,any>} obj\n * @return {number}\n */\nexport const length = obj => keys(obj).length\n\n/**\n * @param {Object<string,any>} obj\n * @return {number}\n */\nexport const size = obj => keys(obj).length\n\n/**\n * @param {Object<string,any>} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const some = (obj, f) => {\n for (const key in obj) {\n if (f(obj[key], key)) {\n return true\n }\n }\n return false\n}\n\n/**\n * @param {Object|null|undefined} obj\n */\nexport const isEmpty = obj => {\n // eslint-disable-next-line no-unreachable-loop\n for (const _k in obj) {\n return false\n }\n return true\n}\n\n/**\n * @param {Object<string,any>} obj\n * @param {function(any,string):boolean} f\n * @return {boolean}\n */\nexport const every = (obj, f) => {\n for (const key in obj) {\n if (!f(obj[key], key)) {\n return false\n }\n }\n return true\n}\n\n/**\n * Calls `Object.prototype.hasOwnProperty`.\n *\n * @param {any} obj\n * @param {string|symbol} key\n * @return {boolean}\n */\nexport const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key)\n\n/**\n * @param {Object<string,any>} a\n * @param {Object<string,any>} b\n * @return {boolean}\n */\nexport const equalFlat = (a, b) => a === b || (size(a) === size(b) && every(a, (val, key) => (val !== undefined || hasProperty(b, key)) && b[key] === val))\n\n/**\n * Make an object immutable. This hurts performance and is usually not needed if you perform good\n * coding practices.\n */\nexport const freeze = Object.freeze\n\n/**\n * Make an object and all its children immutable.\n * This *really* hurts performance and is usually not needed if you perform good coding practices.\n *\n * @template {any} T\n * @param {T} o\n * @return {Readonly<T>}\n */\nexport const deepFreeze = (o) => {\n for (const key in o) {\n const c = o[key]\n if (typeof c === 'object' || typeof c === 'function') {\n deepFreeze(o[key])\n }\n }\n return freeze(o)\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,EAAC;AAC/C;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACnC;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,MAAM,CAAC,KAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,MAAM,CAAC,OAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK;AACnC,EAAE,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AACzB,IAAI,CAAC,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', { value: true });
|
|
4
4
|
|
|
5
|
-
var object = require('./object-
|
|
5
|
+
var object = require('./object-0dc73acd.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -20,4 +20,5 @@ exports.length = object.length;
|
|
|
20
20
|
exports.map = object.map;
|
|
21
21
|
exports.size = object.size;
|
|
22
22
|
exports.some = object.some;
|
|
23
|
+
exports.values = object.values;
|
|
23
24
|
//# sourceMappingURL=object.cjs.map
|
package/dist/object.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"object.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/object.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export function create(): {
|
|
|
6
6
|
*/
|
|
7
7
|
export const assign: {
|
|
8
8
|
<T extends {}, U>(target: T, source: U): T & U;
|
|
9
|
-
<T_1 extends {}, U_1,
|
|
10
|
-
<T_2 extends {}, U_2,
|
|
9
|
+
<T_1 extends {}, U_1, V_1>(target: T_1, source1: U_1, source2: V_1): T_1 & U_1 & V_1;
|
|
10
|
+
<T_2 extends {}, U_2, V_2, W>(target: T_2, source1: U_2, source2: V_2, source3: W): T_2 & U_2 & V_2 & W;
|
|
11
11
|
(target: object, ...sources: any[]): any;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
@@ -17,9 +17,20 @@ export const keys: {
|
|
|
17
17
|
(o: object): string[];
|
|
18
18
|
(o: {}): string[];
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @template V
|
|
22
|
+
* @param {{[key:string]: V}} obj
|
|
23
|
+
* @return {Array<V>}
|
|
24
|
+
*/
|
|
25
|
+
export const values: {
|
|
26
|
+
<T>(o: {
|
|
27
|
+
[s: string]: T;
|
|
28
|
+
} | ArrayLike<T>): T[];
|
|
29
|
+
(o: {}): any[];
|
|
30
|
+
};
|
|
31
|
+
export function forEach<V_1>(obj: {
|
|
32
|
+
[k: string]: V_1;
|
|
33
|
+
}, f: (arg0: V_1, arg1: string) => any): void;
|
|
23
34
|
export function map<R>(obj: {
|
|
24
35
|
[x: string]: any;
|
|
25
36
|
}, f: (arg0: any, arg1: string) => R): R[];
|
package/dist/object.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../object.js"],"names":[],"mappings":"AASO;QAFY,MAAM,GAAC,GAAG;EAEkB;AAE/C;;GAEG;AACH;;;;;EAAmC;AAEnC;;GAEG;AACH;;;EAA+B;
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../object.js"],"names":[],"mappings":"AASO;QAFY,MAAM,GAAC,GAAG;EAEkB;AAE/C;;GAEG;AACH;;;;;EAAmC;AAEnC;;GAEG;AACH;;;EAA+B;AAE/B;;;;GAIG;AACH;;;;;EAAmC;AAO5B;;wBAFe,MAAM,KAAE,GAAG,QAMhC;AAUM;QAJW,MAAM,GAAC,GAAG;aACR,GAAG,QAAC,MAAM,aAS7B;AAOM;QAHW,MAAM,GAAC,GAAG;IAChB,MAAM,CAE2B;AAMtC;QAHW,MAAM,GAAC,GAAG;IAChB,MAAM,CAEyB;AAOpC;QAJW,MAAM,GAAC,GAAG;aACR,GAAG,QAAC,MAAM,KAAE,OAAO,GAC3B,OAAO,CASlB;AAKM,6BAFI,MAAM,GAAC,IAAI,GAAC,SAAS,WAQ/B;AAOM;QAJW,MAAM,GAAC,GAAG;aACR,GAAG,QAAC,MAAM,KAAE,OAAO,GAC3B,OAAO,CASlB;AASM,iCAJI,GAAG,OACH,MAAM,GAAC,MAAM,GACZ,OAAO,CAEoE;AAOhF;QAJW,MAAM,GAAC,GAAG;;QACV,MAAM,GAAC,GAAG;IAChB,OAAO,CAEwI;AAE3J;;;GAGG;AACH;;;;;;EAAmC;AAU5B,iEAQN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.test.d.ts","sourceRoot":"","sources":["../object.test.js"],"names":[],"mappings":"AAOO,gCAFI,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"object.test.d.ts","sourceRoot":"","sources":["../object.test.js"],"names":[],"mappings":"AAOO,gCAFI,EAAE,QAAQ,QA2CpB;AAKM,gCAFI,EAAE,QAAQ,QAuBpB;mBA1EkB,cAAc"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var map = require('./map-0dabcc55.cjs');
|
|
6
|
+
var math = require('./math-08e068f9.cjs');
|
|
7
|
+
var array = require('./array-f0f52786.cjs');
|
|
8
|
+
require('./set-a0a3ea69.cjs');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g.
|
|
12
|
+
* first diff lines, then diff words)
|
|
13
|
+
*
|
|
14
|
+
* https://bramcohen.livejournal.com/73318.html
|
|
15
|
+
*
|
|
16
|
+
* @experiemantal This API will likely change.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Implementation of patience diff. Expects that content is pre-split (e.g. by newline).
|
|
21
|
+
*
|
|
22
|
+
* @param {Array<string>} as
|
|
23
|
+
* @param {Array<string>} bs
|
|
24
|
+
* @return {Array<{ index: number, remove: Array<string>, insert: Array<string>}>} changeset @todo should use delta instead
|
|
25
|
+
*/
|
|
26
|
+
const diff = (as, bs) => {
|
|
27
|
+
const {
|
|
28
|
+
middleAs,
|
|
29
|
+
middleBs,
|
|
30
|
+
commonPrefix
|
|
31
|
+
} = removeCommonPrefixAndSuffix(as, bs);
|
|
32
|
+
return lcs(middleAs, middleBs, commonPrefix)
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {string} a
|
|
37
|
+
* @param {string} b
|
|
38
|
+
* @param {RegExp|string} _regexp
|
|
39
|
+
*/
|
|
40
|
+
const diffSplitBy = (a, b, _regexp) => {
|
|
41
|
+
const isStringSeparator = typeof _regexp === 'string';
|
|
42
|
+
const separator = isStringSeparator ? _regexp : '';
|
|
43
|
+
const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp;
|
|
44
|
+
const as = splitByRegexp(a, regexp, !isStringSeparator);
|
|
45
|
+
const bs = splitByRegexp(b, regexp, !isStringSeparator);
|
|
46
|
+
const changes = diff(as, bs);
|
|
47
|
+
let prevSplitIndex = 0;
|
|
48
|
+
let prevStringIndex = 0;
|
|
49
|
+
return changes.map(change => {
|
|
50
|
+
for (; prevSplitIndex < change.index; prevSplitIndex++) {
|
|
51
|
+
prevStringIndex += as[prevSplitIndex].length;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
index: prevStringIndex,
|
|
55
|
+
remove: change.remove.join(separator),
|
|
56
|
+
insert: change.insert.join(separator)
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sensible default for diffing strings using patience (it's fast though).
|
|
63
|
+
*
|
|
64
|
+
* Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word
|
|
65
|
+
* (split by space, brackets, punctuation)
|
|
66
|
+
*
|
|
67
|
+
* @param {string} a
|
|
68
|
+
* @param {string} b
|
|
69
|
+
*/
|
|
70
|
+
const diffAuto = (a, b) =>
|
|
71
|
+
diffSplitBy(a, b, '\n').map(d =>
|
|
72
|
+
diffSplitBy(d.remove, d.insert, /\. |[a-zA-Z0-9]+|[. ()[\],;{}]/g).map(dd => ({
|
|
73
|
+
insert: dd.insert,
|
|
74
|
+
remove: dd.remove,
|
|
75
|
+
index: dd.index + d.index
|
|
76
|
+
}))
|
|
77
|
+
).flat();
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @param {Array<string>} as
|
|
81
|
+
* @param {Array<string>} bs
|
|
82
|
+
*/
|
|
83
|
+
const removeCommonPrefixAndSuffix = (as, bs) => {
|
|
84
|
+
const commonLen = math.min(as.length, bs.length);
|
|
85
|
+
let commonPrefix = 0;
|
|
86
|
+
let commonSuffix = 0;
|
|
87
|
+
// match start
|
|
88
|
+
for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ }
|
|
89
|
+
// match end
|
|
90
|
+
for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ }
|
|
91
|
+
const middleAs = as.slice(commonPrefix, as.length - commonSuffix);
|
|
92
|
+
const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix);
|
|
93
|
+
return {
|
|
94
|
+
middleAs, middleBs, commonPrefix, commonSuffix
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Splits string by regex and returns all strings as an array. The matched parts are also returned.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} str
|
|
102
|
+
* @param {RegExp} regexp
|
|
103
|
+
* @param {boolean} includeSeparator
|
|
104
|
+
*/
|
|
105
|
+
const splitByRegexp = (str, regexp, includeSeparator) => {
|
|
106
|
+
const matches = [...str.matchAll(regexp)];
|
|
107
|
+
let prevIndex = 0;
|
|
108
|
+
/**
|
|
109
|
+
* @type {Array<string>}
|
|
110
|
+
*/
|
|
111
|
+
const res = [];
|
|
112
|
+
matches.forEach(m => {
|
|
113
|
+
prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index));
|
|
114
|
+
includeSeparator && res.push(m[0]); // is always non-empty
|
|
115
|
+
prevIndex = /** @type {number} */ (m.index) + m[0].length;
|
|
116
|
+
});
|
|
117
|
+
const end = str.slice(prevIndex);
|
|
118
|
+
end.length > 0 && res.push(end);
|
|
119
|
+
return res
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* An item may have multiple occurances (not when matching unique entries). It also may have a
|
|
124
|
+
* reference to the stack of other items (from as to bs).
|
|
125
|
+
*/
|
|
126
|
+
class Item {
|
|
127
|
+
constructor () {
|
|
128
|
+
/**
|
|
129
|
+
* @type {Array<number>}
|
|
130
|
+
*/
|
|
131
|
+
this.indexes = [];
|
|
132
|
+
/**
|
|
133
|
+
* The matching item from the other side
|
|
134
|
+
* @type {Item?}
|
|
135
|
+
*/
|
|
136
|
+
this.match = null;
|
|
137
|
+
/**
|
|
138
|
+
* For patience sort. Reference (index of the stack) to the previous pile.
|
|
139
|
+
*
|
|
140
|
+
* @type {Item?}
|
|
141
|
+
*/
|
|
142
|
+
this.ref = null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {Array<string>} xs
|
|
148
|
+
*/
|
|
149
|
+
const partition = xs => {
|
|
150
|
+
/**
|
|
151
|
+
* @type {Map<string,Item>}
|
|
152
|
+
*/
|
|
153
|
+
const refs = map.create();
|
|
154
|
+
xs.forEach((x, index) => {
|
|
155
|
+
map.setIfUndefined(refs, x, () => new Item()).indexes.push(index);
|
|
156
|
+
});
|
|
157
|
+
return refs
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Find the longest common subsequence of items using patience sort.
|
|
162
|
+
*
|
|
163
|
+
* @param {Array<string>} as
|
|
164
|
+
* @param {Array<string>} bs
|
|
165
|
+
* @param {number} indexAdjust
|
|
166
|
+
*/
|
|
167
|
+
const lcs = (as, bs, indexAdjust) => {
|
|
168
|
+
if (as.length === 0 && bs.length === 0) return []
|
|
169
|
+
const aParts = partition(as);
|
|
170
|
+
const bParts = partition(bs);
|
|
171
|
+
/**
|
|
172
|
+
* @type {Array<Array<Item>>} I.e. Array<Pile<Item>>
|
|
173
|
+
*/
|
|
174
|
+
const piles = [];
|
|
175
|
+
aParts.forEach((aItem, aKey) => {
|
|
176
|
+
// skip if no match or if either item is not unique
|
|
177
|
+
if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return
|
|
178
|
+
for (let i = 0; i < piles.length; i++) {
|
|
179
|
+
const pile = piles[i];
|
|
180
|
+
if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) {
|
|
181
|
+
pile.push(aItem);
|
|
182
|
+
if (i > 0) aItem.ref = array.last(piles[i - 1]);
|
|
183
|
+
return
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1]));
|
|
187
|
+
piles.push([aItem]);
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* References to all matched items
|
|
191
|
+
*
|
|
192
|
+
* @type {Array<Item>}
|
|
193
|
+
*/
|
|
194
|
+
const matches = [];
|
|
195
|
+
/**
|
|
196
|
+
* @type {Item?}
|
|
197
|
+
*/
|
|
198
|
+
let currPileItem = piles[piles.length - 1]?.[0];
|
|
199
|
+
while (currPileItem != null) {
|
|
200
|
+
matches.push(currPileItem);
|
|
201
|
+
currPileItem = currPileItem.ref;
|
|
202
|
+
}
|
|
203
|
+
matches.reverse();
|
|
204
|
+
// add pseude match (assume the string terminal always matches)
|
|
205
|
+
const pseudoA = new Item();
|
|
206
|
+
const pseudoB = new Item();
|
|
207
|
+
pseudoA.match = pseudoB;
|
|
208
|
+
pseudoA.indexes.push(as.length);
|
|
209
|
+
pseudoB.indexes.push(bs.length);
|
|
210
|
+
matches.push(pseudoA);
|
|
211
|
+
/**
|
|
212
|
+
* @type {Array<{ index: number, remove: Array<string>, insert: Array<string>}>}
|
|
213
|
+
*/
|
|
214
|
+
const changeset = [];
|
|
215
|
+
let diffAStart = 0;
|
|
216
|
+
let diffBStart = 0;
|
|
217
|
+
for (let i = 0; i < matches.length; i++) {
|
|
218
|
+
const m = matches[i];
|
|
219
|
+
const delLength = m.indexes[0] - diffAStart;
|
|
220
|
+
const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart;
|
|
221
|
+
if (delLength !== 0 || insLength !== 0) {
|
|
222
|
+
const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength));
|
|
223
|
+
if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) {
|
|
224
|
+
changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
diffAStart = m.indexes[0] + 1;
|
|
228
|
+
diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1;
|
|
229
|
+
}
|
|
230
|
+
return changeset
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
exports.diff = diff;
|
|
234
|
+
exports.diffAuto = diffAuto;
|
|
235
|
+
exports.diffSplitBy = diffSplitBy;
|
|
236
|
+
//# sourceMappingURL=patience.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patience.cjs","sources":["../diff/patience.js"],"sourcesContent":["/**\n * A very simple diff algorithm. Slightly adapted to support splitting at different stages (e.g.\n * first diff lines, then diff words)\n *\n * https://bramcohen.livejournal.com/73318.html\n *\n * @experiemantal This API will likely change.\n */\n\nimport * as map from '../map.js'\nimport * as math from '../math.js'\nimport * as array from '../array.js'\n\n/**\n * Implementation of patience diff. Expects that content is pre-split (e.g. by newline).\n *\n * @param {Array<string>} as\n * @param {Array<string>} bs\n * @return {Array<{ index: number, remove: Array<string>, insert: Array<string>}>} changeset @todo should use delta instead\n */\nexport const diff = (as, bs) => {\n const {\n middleAs,\n middleBs,\n commonPrefix\n } = removeCommonPrefixAndSuffix(as, bs)\n return lcs(middleAs, middleBs, commonPrefix)\n}\n\n/**\n * @param {string} a\n * @param {string} b\n * @param {RegExp|string} _regexp\n */\nexport const diffSplitBy = (a, b, _regexp) => {\n const isStringSeparator = typeof _regexp === 'string'\n const separator = isStringSeparator ? _regexp : ''\n const regexp = isStringSeparator ? new RegExp(_regexp, 'g') : _regexp\n const as = splitByRegexp(a, regexp, !isStringSeparator)\n const bs = splitByRegexp(b, regexp, !isStringSeparator)\n const changes = diff(as, bs)\n let prevSplitIndex = 0\n let prevStringIndex = 0\n return changes.map(change => {\n for (; prevSplitIndex < change.index; prevSplitIndex++) {\n prevStringIndex += as[prevSplitIndex].length\n }\n return {\n index: prevStringIndex,\n remove: change.remove.join(separator),\n insert: change.insert.join(separator)\n }\n })\n}\n\n/**\n * Sensible default for diffing strings using patience (it's fast though).\n *\n * Perform different types of patience diff on the content. Diff first by newline, then paragraphs, then by word\n * (split by space, brackets, punctuation)\n *\n * @param {string} a\n * @param {string} b\n */\nexport const diffAuto = (a, b) =>\n diffSplitBy(a, b, '\\n').map(d =>\n diffSplitBy(d.remove, d.insert, /\\. |[a-zA-Z0-9]+|[. ()[\\],;{}]/g).map(dd => ({\n insert: dd.insert,\n remove: dd.remove,\n index: dd.index + d.index\n }))\n ).flat()\n\n/**\n * @param {Array<string>} as\n * @param {Array<string>} bs\n */\nconst removeCommonPrefixAndSuffix = (as, bs) => {\n const commonLen = math.min(as.length, bs.length)\n let commonPrefix = 0\n let commonSuffix = 0\n // match start\n for (; commonPrefix < commonLen && as[commonPrefix] === bs[commonPrefix]; commonPrefix++) { /* nop */ }\n // match end\n for (; commonSuffix < commonLen - commonPrefix && as[as.length - 1 - commonSuffix] === bs[bs.length - 1 - commonSuffix]; commonSuffix++) { /* nop */ }\n const middleAs = as.slice(commonPrefix, as.length - commonSuffix)\n const middleBs = bs.slice(commonPrefix, bs.length - commonSuffix)\n return {\n middleAs, middleBs, commonPrefix, commonSuffix\n }\n}\n\n/**\n * Splits string by regex and returns all strings as an array. The matched parts are also returned.\n *\n * @param {string} str\n * @param {RegExp} regexp\n * @param {boolean} includeSeparator\n */\nconst splitByRegexp = (str, regexp, includeSeparator) => {\n const matches = [...str.matchAll(regexp)]\n let prevIndex = 0\n /**\n * @type {Array<string>}\n */\n const res = []\n matches.forEach(m => {\n prevIndex < (m.index || 0) && res.push(str.slice(prevIndex, m.index))\n includeSeparator && res.push(m[0]) // is always non-empty\n prevIndex = /** @type {number} */ (m.index) + m[0].length\n })\n const end = str.slice(prevIndex)\n end.length > 0 && res.push(end)\n return res\n}\n\n/**\n * An item may have multiple occurances (not when matching unique entries). It also may have a\n * reference to the stack of other items (from as to bs).\n */\nclass Item {\n constructor () {\n /**\n * @type {Array<number>}\n */\n this.indexes = []\n /**\n * The matching item from the other side\n * @type {Item?}\n */\n this.match = null\n /**\n * For patience sort. Reference (index of the stack) to the previous pile.\n *\n * @type {Item?}\n */\n this.ref = null\n }\n}\n\n/**\n * @param {Array<string>} xs\n */\nconst partition = xs => {\n /**\n * @type {Map<string,Item>}\n */\n const refs = map.create()\n xs.forEach((x, index) => {\n map.setIfUndefined(refs, x, () => new Item()).indexes.push(index)\n })\n return refs\n}\n\n/**\n * Find the longest common subsequence of items using patience sort.\n *\n * @param {Array<string>} as\n * @param {Array<string>} bs\n * @param {number} indexAdjust\n */\nconst lcs = (as, bs, indexAdjust) => {\n if (as.length === 0 && bs.length === 0) return []\n const aParts = partition(as)\n const bParts = partition(bs)\n /**\n * @type {Array<Array<Item>>} I.e. Array<Pile<Item>>\n */\n const piles = []\n aParts.forEach((aItem, aKey) => {\n // skip if no match or if either item is not unique\n if (aItem.indexes.length > 1 || (aItem.match = bParts.get(aKey) || null) == null || aItem.match.indexes.length > 1) return\n for (let i = 0; i < piles.length; i++) {\n const pile = piles[i]\n if (aItem.match.indexes[0] < /** @type {Item} */ (pile[pile.length - 1].match).indexes[0]) {\n pile.push(aItem)\n if (i > 0) aItem.ref = array.last(piles[i - 1])\n return\n }\n }\n piles.length > 0 && (aItem.ref = array.last(piles[piles.length - 1]))\n piles.push([aItem])\n })\n /**\n * References to all matched items\n *\n * @type {Array<Item>}\n */\n const matches = []\n /**\n * @type {Item?}\n */\n let currPileItem = piles[piles.length - 1]?.[0]\n while (currPileItem != null) {\n matches.push(currPileItem)\n currPileItem = currPileItem.ref\n }\n matches.reverse()\n // add pseude match (assume the string terminal always matches)\n const pseudoA = new Item()\n const pseudoB = new Item()\n pseudoA.match = pseudoB\n pseudoA.indexes.push(as.length)\n pseudoB.indexes.push(bs.length)\n matches.push(pseudoA)\n /**\n * @type {Array<{ index: number, remove: Array<string>, insert: Array<string>}>}\n */\n const changeset = []\n let diffAStart = 0\n let diffBStart = 0\n for (let i = 0; i < matches.length; i++) {\n const m = matches[i]\n const delLength = m.indexes[0] - diffAStart\n const insLength = /** @type {Item} */ (m.match).indexes[0] - diffBStart\n if (delLength !== 0 || insLength !== 0) {\n const stripped = removeCommonPrefixAndSuffix(as.slice(diffAStart, diffAStart + delLength), bs.slice(diffBStart, diffBStart + insLength))\n if (stripped.middleAs.length !== 0 || stripped.middleBs.length !== 0) {\n changeset.push({ index: diffAStart + indexAdjust + stripped.commonPrefix, remove: stripped.middleAs, insert: stripped.middleBs })\n }\n }\n diffAStart = m.indexes[0] + 1\n diffBStart = /** @type {Item} */ (m.match).indexes[0] + 1\n }\n return changeset\n}\n"],"names":["math.min","map.create","map.setIfUndefined","array.last"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAChC,EAAE,MAAM;AACR,IAAI,QAAQ;AACZ,IAAI,QAAQ;AACZ,IAAI,YAAY;AAChB,GAAG,GAAG,2BAA2B,CAAC,EAAE,EAAE,EAAE,EAAC;AACzC,EAAE,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,YAAY,CAAC;AAC9C,EAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK;AAC9C,EAAE,MAAM,iBAAiB,GAAG,OAA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