decidim 0.27.3 → 0.27.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +16 -2
  3. data/babel.config.json +1 -4
  4. data/lib/decidim/release_manager.rb.new +43 -0
  5. data/lib/decidim/version.rb +1 -1
  6. data/package-lock.json +343 -255
  7. data/packages/browserslist-config/package.json +1 -1
  8. data/packages/core/node_modules/diff/CONTRIBUTING.md +39 -0
  9. data/packages/core/node_modules/diff/LICENSE +31 -0
  10. data/packages/core/node_modules/diff/README.md +211 -0
  11. data/packages/core/node_modules/diff/dist/diff.js +1627 -0
  12. data/packages/core/node_modules/diff/dist/diff.min.js +38 -0
  13. data/packages/core/node_modules/diff/lib/convert/dmp.js +32 -0
  14. data/packages/core/node_modules/diff/lib/convert/xml.js +42 -0
  15. data/packages/core/node_modules/diff/lib/diff/array.js +45 -0
  16. data/packages/core/node_modules/diff/lib/diff/base.js +307 -0
  17. data/packages/core/node_modules/diff/lib/diff/character.js +37 -0
  18. data/packages/core/node_modules/diff/lib/diff/css.js +41 -0
  19. data/packages/core/node_modules/diff/lib/diff/json.js +163 -0
  20. data/packages/core/node_modules/diff/lib/diff/line.js +89 -0
  21. data/packages/core/node_modules/diff/lib/diff/sentence.js +41 -0
  22. data/packages/core/node_modules/diff/lib/diff/word.js +108 -0
  23. data/packages/core/node_modules/diff/lib/index.es6.js +1561 -0
  24. data/packages/core/node_modules/diff/lib/index.js +216 -0
  25. data/packages/core/node_modules/diff/lib/index.mjs +1561 -0
  26. data/packages/core/node_modules/diff/lib/patch/apply.js +238 -0
  27. data/packages/core/node_modules/diff/lib/patch/create.js +272 -0
  28. data/packages/core/node_modules/diff/lib/patch/merge.js +613 -0
  29. data/packages/core/node_modules/diff/lib/patch/parse.js +167 -0
  30. data/packages/core/node_modules/diff/lib/util/array.js +32 -0
  31. data/packages/core/node_modules/diff/lib/util/distance-iterator.js +57 -0
  32. data/packages/core/node_modules/diff/lib/util/params.js +24 -0
  33. data/packages/core/node_modules/diff/package.json +87 -0
  34. data/packages/core/node_modules/diff/release-notes.md +309 -0
  35. data/packages/core/node_modules/diff/runtime.js +3 -0
  36. data/packages/core/package-lock.json +4889 -0
  37. data/packages/core/package.json +1 -1
  38. data/packages/dev/package.json +1 -1
  39. data/packages/elections/package.json +1 -1
  40. data/packages/eslint-config/package.json +1 -1
  41. data/packages/stylelint-config/package.json +1 -1
  42. data/packages/webpacker/node_modules/argparse/CHANGELOG.md +216 -0
  43. data/packages/webpacker/node_modules/argparse/LICENSE +254 -0
  44. data/packages/webpacker/node_modules/argparse/README.md +84 -0
  45. data/packages/webpacker/node_modules/argparse/argparse.js +3707 -0
  46. data/packages/webpacker/node_modules/argparse/lib/sub.js +67 -0
  47. data/packages/webpacker/node_modules/argparse/lib/textwrap.js +440 -0
  48. data/packages/webpacker/node_modules/argparse/package.json +31 -0
  49. data/packages/{core/node_modules/uuid/LICENSE.md → webpacker/node_modules/brace-expansion/LICENSE} +2 -2
  50. data/packages/webpacker/node_modules/brace-expansion/README.md +135 -0
  51. data/packages/webpacker/node_modules/brace-expansion/index.js +203 -0
  52. data/packages/webpacker/node_modules/brace-expansion/package.json +46 -0
  53. data/packages/webpacker/node_modules/glob/LICENSE +15 -0
  54. data/packages/webpacker/node_modules/glob/README.md +1214 -0
  55. data/packages/webpacker/node_modules/glob/dist/cjs/package.json +4 -0
  56. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.d.ts +3 -0
  57. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.d.ts.map +1 -0
  58. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.js +270 -0
  59. data/packages/webpacker/node_modules/glob/dist/cjs/src/bin.js.map +1 -0
  60. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.d.ts +344 -0
  61. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.d.ts.map +1 -0
  62. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.js +238 -0
  63. data/packages/webpacker/node_modules/glob/dist/cjs/src/glob.js.map +1 -0
  64. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.d.ts +14 -0
  65. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.d.ts.map +1 -0
  66. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.js +27 -0
  67. data/packages/webpacker/node_modules/glob/dist/cjs/src/has-magic.js.map +1 -0
  68. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.d.ts +20 -0
  69. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.d.ts.map +1 -0
  70. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.js +103 -0
  71. data/packages/webpacker/node_modules/glob/dist/cjs/src/ignore.js.map +1 -0
  72. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.d.ts +95 -0
  73. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.d.ts.map +1 -0
  74. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.js +68 -0
  75. data/packages/webpacker/node_modules/glob/dist/cjs/src/index.js.map +1 -0
  76. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.d.ts +77 -0
  77. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.d.ts.map +1 -0
  78. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.js +219 -0
  79. data/packages/webpacker/node_modules/glob/dist/cjs/src/pattern.js.map +1 -0
  80. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.d.ts +59 -0
  81. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.d.ts.map +1 -0
  82. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.js +309 -0
  83. data/packages/webpacker/node_modules/glob/dist/cjs/src/processor.js.map +1 -0
  84. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.d.ts +96 -0
  85. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.d.ts.map +1 -0
  86. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.js +358 -0
  87. data/packages/webpacker/node_modules/glob/dist/cjs/src/walker.js.map +1 -0
  88. data/packages/webpacker/node_modules/glob/dist/mjs/glob.d.ts +344 -0
  89. data/packages/webpacker/node_modules/glob/dist/mjs/glob.d.ts.map +1 -0
  90. data/packages/webpacker/node_modules/glob/dist/mjs/glob.js +234 -0
  91. data/packages/webpacker/node_modules/glob/dist/mjs/glob.js.map +1 -0
  92. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.d.ts +14 -0
  93. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.d.ts.map +1 -0
  94. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.js +23 -0
  95. data/packages/webpacker/node_modules/glob/dist/mjs/has-magic.js.map +1 -0
  96. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.d.ts +20 -0
  97. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.d.ts.map +1 -0
  98. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.js +99 -0
  99. data/packages/webpacker/node_modules/glob/dist/mjs/ignore.js.map +1 -0
  100. data/packages/webpacker/node_modules/glob/dist/mjs/index.d.ts +95 -0
  101. data/packages/webpacker/node_modules/glob/dist/mjs/index.d.ts.map +1 -0
  102. data/packages/webpacker/node_modules/glob/dist/mjs/index.js +56 -0
  103. data/packages/webpacker/node_modules/glob/dist/mjs/index.js.map +1 -0
  104. data/packages/webpacker/node_modules/glob/dist/mjs/package.json +4 -0
  105. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.d.ts +77 -0
  106. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.d.ts.map +1 -0
  107. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.js +215 -0
  108. data/packages/webpacker/node_modules/glob/dist/mjs/pattern.js.map +1 -0
  109. data/packages/webpacker/node_modules/glob/dist/mjs/processor.d.ts +59 -0
  110. data/packages/webpacker/node_modules/glob/dist/mjs/processor.d.ts.map +1 -0
  111. data/packages/webpacker/node_modules/glob/dist/mjs/processor.js +302 -0
  112. data/packages/webpacker/node_modules/glob/dist/mjs/processor.js.map +1 -0
  113. data/packages/webpacker/node_modules/glob/dist/mjs/walker.d.ts +96 -0
  114. data/packages/webpacker/node_modules/glob/dist/mjs/walker.d.ts.map +1 -0
  115. data/packages/webpacker/node_modules/glob/dist/mjs/walker.js +352 -0
  116. data/packages/webpacker/node_modules/glob/dist/mjs/walker.js.map +1 -0
  117. data/packages/webpacker/node_modules/glob/package.json +98 -0
  118. data/packages/webpacker/node_modules/js-yaml/CHANGELOG.md +616 -0
  119. data/packages/webpacker/node_modules/js-yaml/LICENSE +21 -0
  120. data/packages/webpacker/node_modules/js-yaml/README.md +246 -0
  121. data/packages/webpacker/node_modules/js-yaml/bin/js-yaml.js +126 -0
  122. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.js +3874 -0
  123. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
  124. data/packages/webpacker/node_modules/js-yaml/dist/js-yaml.mjs +3851 -0
  125. data/packages/webpacker/node_modules/js-yaml/index.js +47 -0
  126. data/packages/webpacker/node_modules/js-yaml/lib/common.js +59 -0
  127. data/packages/webpacker/node_modules/js-yaml/lib/dumper.js +965 -0
  128. data/packages/webpacker/node_modules/js-yaml/lib/exception.js +55 -0
  129. data/packages/webpacker/node_modules/js-yaml/lib/loader.js +1727 -0
  130. data/packages/webpacker/node_modules/js-yaml/lib/schema/core.js +11 -0
  131. data/packages/webpacker/node_modules/js-yaml/lib/schema/default.js +22 -0
  132. data/packages/webpacker/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
  133. data/packages/webpacker/node_modules/js-yaml/lib/schema/json.js +19 -0
  134. data/packages/webpacker/node_modules/js-yaml/lib/schema.js +121 -0
  135. data/packages/webpacker/node_modules/js-yaml/lib/snippet.js +101 -0
  136. data/packages/webpacker/node_modules/js-yaml/lib/type/binary.js +125 -0
  137. data/packages/webpacker/node_modules/js-yaml/lib/type/bool.js +35 -0
  138. data/packages/webpacker/node_modules/js-yaml/lib/type/float.js +97 -0
  139. data/packages/webpacker/node_modules/js-yaml/lib/type/int.js +156 -0
  140. data/packages/webpacker/node_modules/js-yaml/lib/type/map.js +8 -0
  141. data/packages/webpacker/node_modules/js-yaml/lib/type/merge.js +12 -0
  142. data/packages/webpacker/node_modules/js-yaml/lib/type/null.js +35 -0
  143. data/packages/webpacker/node_modules/js-yaml/lib/type/omap.js +44 -0
  144. data/packages/webpacker/node_modules/js-yaml/lib/type/pairs.js +53 -0
  145. data/packages/webpacker/node_modules/js-yaml/lib/type/seq.js +8 -0
  146. data/packages/webpacker/node_modules/js-yaml/lib/type/set.js +29 -0
  147. data/packages/webpacker/node_modules/js-yaml/lib/type/str.js +8 -0
  148. data/packages/webpacker/node_modules/js-yaml/lib/type/timestamp.js +88 -0
  149. data/packages/webpacker/node_modules/js-yaml/lib/type.js +66 -0
  150. data/packages/webpacker/node_modules/js-yaml/package.json +66 -0
  151. data/packages/webpacker/node_modules/minimatch/LICENSE +15 -0
  152. data/packages/webpacker/node_modules/minimatch/README.md +454 -0
  153. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts +2 -0
  154. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.d.ts.map +1 -0
  155. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +14 -0
  156. data/packages/webpacker/node_modules/minimatch/dist/cjs/assert-valid-pattern.js.map +1 -0
  157. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.d.ts +19 -0
  158. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.d.ts.map +1 -0
  159. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.js +589 -0
  160. data/packages/webpacker/node_modules/minimatch/dist/cjs/ast.js.map +1 -0
  161. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.d.ts +8 -0
  162. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.d.ts.map +1 -0
  163. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.js +152 -0
  164. data/packages/webpacker/node_modules/minimatch/dist/cjs/brace-expressions.js.map +1 -0
  165. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.d.ts +12 -0
  166. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.d.ts.map +1 -0
  167. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.js +22 -0
  168. data/packages/webpacker/node_modules/minimatch/dist/cjs/escape.js.map +1 -0
  169. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.d.ts +94 -0
  170. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.d.ts.map +1 -0
  171. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.js +1011 -0
  172. data/packages/webpacker/node_modules/minimatch/dist/cjs/index.js.map +1 -0
  173. data/packages/webpacker/node_modules/minimatch/dist/cjs/package.json +3 -0
  174. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.d.ts +17 -0
  175. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.d.ts.map +1 -0
  176. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.js +24 -0
  177. data/packages/webpacker/node_modules/minimatch/dist/cjs/unescape.js.map +1 -0
  178. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts +2 -0
  179. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.d.ts.map +1 -0
  180. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +10 -0
  181. data/packages/webpacker/node_modules/minimatch/dist/mjs/assert-valid-pattern.js.map +1 -0
  182. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.d.ts +19 -0
  183. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.d.ts.map +1 -0
  184. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.js +585 -0
  185. data/packages/webpacker/node_modules/minimatch/dist/mjs/ast.js.map +1 -0
  186. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.d.ts +8 -0
  187. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.d.ts.map +1 -0
  188. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.js +148 -0
  189. data/packages/webpacker/node_modules/minimatch/dist/mjs/brace-expressions.js.map +1 -0
  190. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.d.ts +12 -0
  191. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.d.ts.map +1 -0
  192. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.js +18 -0
  193. data/packages/webpacker/node_modules/minimatch/dist/mjs/escape.js.map +1 -0
  194. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.d.ts +94 -0
  195. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.d.ts.map +1 -0
  196. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.js +995 -0
  197. data/packages/webpacker/node_modules/minimatch/dist/mjs/index.js.map +1 -0
  198. data/packages/webpacker/node_modules/minimatch/dist/mjs/package.json +3 -0
  199. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.d.ts +17 -0
  200. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.d.ts.map +1 -0
  201. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.js +20 -0
  202. data/packages/webpacker/node_modules/minimatch/dist/mjs/unescape.js.map +1 -0
  203. data/packages/webpacker/node_modules/minimatch/package.json +86 -0
  204. data/packages/webpacker/package.json +2 -2
  205. metadata +237 -64
  206. data/packages/core/node_modules/uuid/AUTHORS +0 -5
  207. data/packages/core/node_modules/uuid/CHANGELOG.md +0 -119
  208. data/packages/core/node_modules/uuid/README.md +0 -276
  209. data/packages/core/node_modules/uuid/bin/uuid +0 -65
  210. data/packages/core/node_modules/uuid/index.js +0 -8
  211. data/packages/core/node_modules/uuid/lib/bytesToUuid.js +0 -26
  212. data/packages/core/node_modules/uuid/lib/md5-browser.js +0 -216
  213. data/packages/core/node_modules/uuid/lib/md5.js +0 -25
  214. data/packages/core/node_modules/uuid/lib/rng-browser.js +0 -34
  215. data/packages/core/node_modules/uuid/lib/rng.js +0 -8
  216. data/packages/core/node_modules/uuid/lib/sha1-browser.js +0 -89
  217. data/packages/core/node_modules/uuid/lib/sha1.js +0 -25
  218. data/packages/core/node_modules/uuid/lib/v35.js +0 -57
  219. data/packages/core/node_modules/uuid/package.json +0 -49
  220. data/packages/core/node_modules/uuid/v1.js +0 -109
  221. data/packages/core/node_modules/uuid/v3.js +0 -4
  222. data/packages/core/node_modules/uuid/v4.js +0 -29
  223. data/packages/core/node_modules/uuid/v5.js +0 -3
@@ -0,0 +1,163 @@
1
+ /*istanbul ignore start*/
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffJson = diffJson;
8
+ exports.canonicalize = canonicalize;
9
+ exports.jsonDiff = void 0;
10
+
11
+ /*istanbul ignore end*/
12
+ var
13
+ /*istanbul ignore start*/
14
+ _base = _interopRequireDefault(require("./base"))
15
+ /*istanbul ignore end*/
16
+ ;
17
+
18
+ var
19
+ /*istanbul ignore start*/
20
+ _line = require("./line")
21
+ /*istanbul ignore end*/
22
+ ;
23
+
24
+ /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
27
+
28
+ /*istanbul ignore end*/
29
+ var objectPrototypeToString = Object.prototype.toString;
30
+ var jsonDiff = new
31
+ /*istanbul ignore start*/
32
+ _base
33
+ /*istanbul ignore end*/
34
+ [
35
+ /*istanbul ignore start*/
36
+ "default"
37
+ /*istanbul ignore end*/
38
+ ](); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
39
+ // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
40
+
41
+ /*istanbul ignore start*/
42
+ exports.jsonDiff = jsonDiff;
43
+
44
+ /*istanbul ignore end*/
45
+ jsonDiff.useLongestToken = true;
46
+ jsonDiff.tokenize =
47
+ /*istanbul ignore start*/
48
+ _line
49
+ /*istanbul ignore end*/
50
+ .
51
+ /*istanbul ignore start*/
52
+ lineDiff
53
+ /*istanbul ignore end*/
54
+ .tokenize;
55
+
56
+ jsonDiff.castInput = function (value) {
57
+ /*istanbul ignore start*/
58
+ var _this$options =
59
+ /*istanbul ignore end*/
60
+ this.options,
61
+ undefinedReplacement = _this$options.undefinedReplacement,
62
+ _this$options$stringi = _this$options.stringifyReplacer,
63
+ stringifyReplacer = _this$options$stringi === void 0 ? function (k, v)
64
+ /*istanbul ignore start*/
65
+ {
66
+ return (
67
+ /*istanbul ignore end*/
68
+ typeof v === 'undefined' ? undefinedReplacement : v
69
+ );
70
+ } : _this$options$stringi;
71
+ return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
72
+ };
73
+
74
+ jsonDiff.equals = function (left, right) {
75
+ return (
76
+ /*istanbul ignore start*/
77
+ _base
78
+ /*istanbul ignore end*/
79
+ [
80
+ /*istanbul ignore start*/
81
+ "default"
82
+ /*istanbul ignore end*/
83
+ ].prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'))
84
+ );
85
+ };
86
+
87
+ function diffJson(oldObj, newObj, options) {
88
+ return jsonDiff.diff(oldObj, newObj, options);
89
+ } // This function handles the presence of circular references by bailing out when encountering an
90
+ // object that is already on the "stack" of items being processed. Accepts an optional replacer
91
+
92
+
93
+ function canonicalize(obj, stack, replacementStack, replacer, key) {
94
+ stack = stack || [];
95
+ replacementStack = replacementStack || [];
96
+
97
+ if (replacer) {
98
+ obj = replacer(key, obj);
99
+ }
100
+
101
+ var i;
102
+
103
+ for (i = 0; i < stack.length; i += 1) {
104
+ if (stack[i] === obj) {
105
+ return replacementStack[i];
106
+ }
107
+ }
108
+
109
+ var canonicalizedObj;
110
+
111
+ if ('[object Array]' === objectPrototypeToString.call(obj)) {
112
+ stack.push(obj);
113
+ canonicalizedObj = new Array(obj.length);
114
+ replacementStack.push(canonicalizedObj);
115
+
116
+ for (i = 0; i < obj.length; i += 1) {
117
+ canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
118
+ }
119
+
120
+ stack.pop();
121
+ replacementStack.pop();
122
+ return canonicalizedObj;
123
+ }
124
+
125
+ if (obj && obj.toJSON) {
126
+ obj = obj.toJSON();
127
+ }
128
+
129
+ if (
130
+ /*istanbul ignore start*/
131
+ _typeof(
132
+ /*istanbul ignore end*/
133
+ obj) === 'object' && obj !== null) {
134
+ stack.push(obj);
135
+ canonicalizedObj = {};
136
+ replacementStack.push(canonicalizedObj);
137
+
138
+ var sortedKeys = [],
139
+ _key;
140
+
141
+ for (_key in obj) {
142
+ /* istanbul ignore else */
143
+ if (obj.hasOwnProperty(_key)) {
144
+ sortedKeys.push(_key);
145
+ }
146
+ }
147
+
148
+ sortedKeys.sort();
149
+
150
+ for (i = 0; i < sortedKeys.length; i += 1) {
151
+ _key = sortedKeys[i];
152
+ canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
153
+ }
154
+
155
+ stack.pop();
156
+ replacementStack.pop();
157
+ } else {
158
+ canonicalizedObj = obj;
159
+ }
160
+
161
+ return canonicalizedObj;
162
+ }
163
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2pzb24uanMiXSwibmFtZXMiOlsib2JqZWN0UHJvdG90eXBlVG9TdHJpbmciLCJPYmplY3QiLCJwcm90b3R5cGUiLCJ0b1N0cmluZyIsImpzb25EaWZmIiwiRGlmZiIsInVzZUxvbmdlc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mJiBvYmogIT09IG51bGwpIHtcbiAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgY2Fub25pY2FsaXplZE9iaiA9IHt9O1xuICAgIHJlcGxhY2VtZW50U3RhY2sucHVzaChjYW5vbmljYWxpemVkT2JqKTtcbiAgICBsZXQgc29ydGVkS2V5cyA9IFtdLFxuICAgICAgICBrZXk7XG4gICAgZm9yIChrZXkgaW4gb2JqKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgIHNvcnRlZEtleXMucHVzaChrZXkpO1xuICAgICAgfVxuICAgIH1cbiAgICBzb3J0ZWRLZXlzLnNvcnQoKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgc29ydGVkS2V5cy5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAga2V5ID0gc29ydGVkS2V5c1tpXTtcbiAgICAgIGNhbm9uaWNhbGl6ZWRPYmpba2V5XSA9IGNhbm9uaWNhbGl6ZShvYmpba2V5XSwgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpO1xuICAgIH1cbiAgICBzdGFjay5wb3AoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnBvcCgpO1xuICB9IGVsc2Uge1xuICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBvYmo7XG4gIH1cbiAgcmV0dXJuIGNhbm9uaWNhbGl6ZWRPYmo7XG59XG4iXX0=
@@ -0,0 +1,89 @@
1
+ /*istanbul ignore start*/
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffLines = diffLines;
8
+ exports.diffTrimmedLines = diffTrimmedLines;
9
+ exports.lineDiff = void 0;
10
+
11
+ /*istanbul ignore end*/
12
+ var
13
+ /*istanbul ignore start*/
14
+ _base = _interopRequireDefault(require("./base"))
15
+ /*istanbul ignore end*/
16
+ ;
17
+
18
+ var
19
+ /*istanbul ignore start*/
20
+ _params = require("../util/params")
21
+ /*istanbul ignore end*/
22
+ ;
23
+
24
+ /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ /*istanbul ignore end*/
27
+ var lineDiff = new
28
+ /*istanbul ignore start*/
29
+ _base
30
+ /*istanbul ignore end*/
31
+ [
32
+ /*istanbul ignore start*/
33
+ "default"
34
+ /*istanbul ignore end*/
35
+ ]();
36
+
37
+ /*istanbul ignore start*/
38
+ exports.lineDiff = lineDiff;
39
+
40
+ /*istanbul ignore end*/
41
+ lineDiff.tokenize = function (value) {
42
+ var retLines = [],
43
+ linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
44
+
45
+ if (!linesAndNewlines[linesAndNewlines.length - 1]) {
46
+ linesAndNewlines.pop();
47
+ } // Merge the content and line separators into single tokens
48
+
49
+
50
+ for (var i = 0; i < linesAndNewlines.length; i++) {
51
+ var line = linesAndNewlines[i];
52
+
53
+ if (i % 2 && !this.options.newlineIsToken) {
54
+ retLines[retLines.length - 1] += line;
55
+ } else {
56
+ if (this.options.ignoreWhitespace) {
57
+ line = line.trim();
58
+ }
59
+
60
+ retLines.push(line);
61
+ }
62
+ }
63
+
64
+ return retLines;
65
+ };
66
+
67
+ function diffLines(oldStr, newStr, callback) {
68
+ return lineDiff.diff(oldStr, newStr, callback);
69
+ }
70
+
71
+ function diffTrimmedLines(oldStr, newStr, callback) {
72
+ var options =
73
+ /*istanbul ignore start*/
74
+ (0,
75
+ /*istanbul ignore end*/
76
+
77
+ /*istanbul ignore start*/
78
+ _params
79
+ /*istanbul ignore end*/
80
+ .
81
+ /*istanbul ignore start*/
82
+ generateOptions)
83
+ /*istanbul ignore end*/
84
+ (callback, {
85
+ ignoreWhitespace: true
86
+ });
87
+ return lineDiff.diff(oldStr, newStr, options);
88
+ }
89
+ //# sourceMappingURL=data:application/json;charset=ut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Wdub3JlV2hpdGVzcGFjZSkge1xuICAgICAgICBsaW5lID0gbGluZS50cmltKCk7XG4gICAgICB9XG4gICAgICByZXRMaW5lcy5wdXNoKGxpbmUpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXRMaW5lcztcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmTGluZXMob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBsaW5lRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbmV4cG9ydCBmdW5jdGlvbiBkaWZmVHJpbW1lZExpbmVzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykge1xuICBsZXQgb3B0aW9ucyA9IGdlbmVyYXRlT3B0aW9ucyhjYWxsYmFjaywge2lnbm9yZVdoaXRlc3BhY2U6IHRydWV9KTtcbiAgcmV0dXJuIGxpbmVEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpO1xufVxuIl19
@@ -0,0 +1,41 @@
1
+ /*istanbul ignore start*/
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffSentences = diffSentences;
8
+ exports.sentenceDiff = void 0;
9
+
10
+ /*istanbul ignore end*/
11
+ var
12
+ /*istanbul ignore start*/
13
+ _base = _interopRequireDefault(require("./base"))
14
+ /*istanbul ignore end*/
15
+ ;
16
+
17
+ /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
+
19
+ /*istanbul ignore end*/
20
+ var sentenceDiff = new
21
+ /*istanbul ignore start*/
22
+ _base
23
+ /*istanbul ignore end*/
24
+ [
25
+ /*istanbul ignore start*/
26
+ "default"
27
+ /*istanbul ignore end*/
28
+ ]();
29
+
30
+ /*istanbul ignore start*/
31
+ exports.sentenceDiff = sentenceDiff;
32
+
33
+ /*istanbul ignore end*/
34
+ sentenceDiff.tokenize = function (value) {
35
+ return value.split(/(\S.+?[.!?])(?=\s+|$)/);
36
+ };
37
+
38
+ function diffSentences(oldStr, newStr, callback) {
39
+ return sentenceDiff.diff(oldStr, newStr, callback);
40
+ }
41
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSixFQUFyQjs7Ozs7O0FBQ1BELFlBQVksQ0FBQ0UsUUFBYixHQUF3QixVQUFTQyxLQUFULEVBQWdCO0FBQ3RDLFNBQU9BLEtBQUssQ0FBQ0MsS0FBTixDQUFZLHVCQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLGFBQVQsQ0FBdUJDLE1BQXZCLEVBQStCQyxNQUEvQixFQUF1Q0MsUUFBdkMsRUFBaUQ7QUFBRSxTQUFPUixZQUFZLENBQUNTLElBQWIsQ0FBa0JILE1BQWxCLEVBQTBCQyxNQUExQixFQUFrQ0MsUUFBbEMsQ0FBUDtBQUFxRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cblxuZXhwb3J0IGNvbnN0IHNlbnRlbmNlRGlmZiA9IG5ldyBEaWZmKCk7XG5zZW50ZW5jZURpZmYudG9rZW5pemUgPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdmFsdWUuc3BsaXQoLyhcXFMuKz9bLiE/XSkoPz1cXHMrfCQpLyk7XG59O1xuXG5leHBvcnQgZnVuY3Rpb24gZGlmZlNlbnRlbmNlcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIHNlbnRlbmNlRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdfQ==
@@ -0,0 +1,108 @@
1
+ /*istanbul ignore start*/
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffWords = diffWords;
8
+ exports.diffWordsWithSpace = diffWordsWithSpace;
9
+ exports.wordDiff = void 0;
10
+
11
+ /*istanbul ignore end*/
12
+ var
13
+ /*istanbul ignore start*/
14
+ _base = _interopRequireDefault(require("./base"))
15
+ /*istanbul ignore end*/
16
+ ;
17
+
18
+ var
19
+ /*istanbul ignore start*/
20
+ _params = require("../util/params")
21
+ /*istanbul ignore end*/
22
+ ;
23
+
24
+ /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
+
26
+ /*istanbul ignore end*/
27
+ // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
28
+ //
29
+ // Ranges and exceptions:
30
+ // Latin-1 Supplement, 0080–00FF
31
+ // - U+00D7 × Multiplication sign
32
+ // - U+00F7 ÷ Division sign
33
+ // Latin Extended-A, 0100–017F
34
+ // Latin Extended-B, 0180–024F
35
+ // IPA Extensions, 0250–02AF
36
+ // Spacing Modifier Letters, 02B0–02FF
37
+ // - U+02C7 ˇ &#711; Caron
38
+ // - U+02D8 ˘ &#728; Breve
39
+ // - U+02D9 ˙ &#729; Dot Above
40
+ // - U+02DA ˚ &#730; Ring Above
41
+ // - U+02DB ˛ &#731; Ogonek
42
+ // - U+02DC ˜ &#732; Small Tilde
43
+ // - U+02DD ˝ &#733; Double Acute Accent
44
+ // Latin Extended Additional, 1E00–1EFF
45
+ var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
46
+ var reWhitespace = /\S/;
47
+ var wordDiff = new
48
+ /*istanbul ignore start*/
49
+ _base
50
+ /*istanbul ignore end*/
51
+ [
52
+ /*istanbul ignore start*/
53
+ "default"
54
+ /*istanbul ignore end*/
55
+ ]();
56
+
57
+ /*istanbul ignore start*/
58
+ exports.wordDiff = wordDiff;
59
+
60
+ /*istanbul ignore end*/
61
+ wordDiff.equals = function (left, right) {
62
+ if (this.options.ignoreCase) {
63
+ left = left.toLowerCase();
64
+ right = right.toLowerCase();
65
+ }
66
+
67
+ return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
68
+ };
69
+
70
+ wordDiff.tokenize = function (value) {
71
+ // All whitespace symbols except newline group into one token, each newline - in separate token
72
+ var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
73
+
74
+ for (var i = 0; i < tokens.length - 1; i++) {
75
+ // If we have an empty string in the next field and we have only word chars before and after, merge
76
+ if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
77
+ tokens[i] += tokens[i + 2];
78
+ tokens.splice(i + 1, 2);
79
+ i--;
80
+ }
81
+ }
82
+
83
+ return tokens;
84
+ };
85
+
86
+ function diffWords(oldStr, newStr, options) {
87
+ options =
88
+ /*istanbul ignore start*/
89
+ (0,
90
+ /*istanbul ignore end*/
91
+
92
+ /*istanbul ignore start*/
93
+ _params
94
+ /*istanbul ignore end*/
95
+ .
96
+ /*istanbul ignore start*/
97
+ generateOptions)
98
+ /*istanbul ignore end*/
99
+ (options, {
100
+ ignoreWhitespace: true
101
+ });
102
+ return wordDiff.diff(oldStr, newStr, options);
103
+ }
104
+
105
+ function diffWordsWithSpace(oldStr, newStr, options) {
106
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