@ecodev/natural 44.0.2 → 44.0.3

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.
@@ -65,7 +65,6 @@ import * as i9 from '@angular/material/paginator';
65
65
  import { MatPaginatorModule } from '@angular/material/paginator';
66
66
  import * as i3$3 from '@angular/material/sidenav';
67
67
  import { MatSidenavContainer, MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
68
- import { Md5 } from 'ts-md5';
69
68
  import * as i1$8 from '@angular/common/http';
70
69
  import { HttpHeaders, HttpClientModule } from '@angular/common/http';
71
70
 
@@ -10060,6 +10059,213 @@ class Source {
10060
10059
  }
10061
10060
  }
10062
10061
 
10062
+ function md5(string) {
10063
+ const x = convertToWordArray(utf8Encode(string));
10064
+ const S11 = 7;
10065
+ const S12 = 12;
10066
+ const S13 = 17;
10067
+ const S14 = 22;
10068
+ const S21 = 5;
10069
+ const S22 = 9;
10070
+ const S23 = 14;
10071
+ const S24 = 20;
10072
+ const S31 = 4;
10073
+ const S32 = 11;
10074
+ const S33 = 16;
10075
+ const S34 = 23;
10076
+ const S41 = 6;
10077
+ const S42 = 10;
10078
+ const S43 = 15;
10079
+ const S44 = 21;
10080
+ let a = 0x67452301;
10081
+ let b = 0xefcdab89;
10082
+ let c = 0x98badcfe;
10083
+ let d = 0x10325476;
10084
+ for (let k = 0; k < x.length; k += 16) {
10085
+ const AA = a;
10086
+ const BB = b;
10087
+ const CC = c;
10088
+ const DD = d;
10089
+ a = FF(a, b, c, d, x[k], S11, 0xd76aa478);
10090
+ d = FF(d, a, b, c, x[k + 1], S12, 0xe8c7b756);
10091
+ c = FF(c, d, a, b, x[k + 2], S13, 0x242070db);
10092
+ b = FF(b, c, d, a, x[k + 3], S14, 0xc1bdceee);
10093
+ a = FF(a, b, c, d, x[k + 4], S11, 0xf57c0faf);
10094
+ d = FF(d, a, b, c, x[k + 5], S12, 0x4787c62a);
10095
+ c = FF(c, d, a, b, x[k + 6], S13, 0xa8304613);
10096
+ b = FF(b, c, d, a, x[k + 7], S14, 0xfd469501);
10097
+ a = FF(a, b, c, d, x[k + 8], S11, 0x698098d8);
10098
+ d = FF(d, a, b, c, x[k + 9], S12, 0x8b44f7af);
10099
+ c = FF(c, d, a, b, x[k + 10], S13, 0xffff5bb1);
10100
+ b = FF(b, c, d, a, x[k + 11], S14, 0x895cd7be);
10101
+ a = FF(a, b, c, d, x[k + 12], S11, 0x6b901122);
10102
+ d = FF(d, a, b, c, x[k + 13], S12, 0xfd987193);
10103
+ c = FF(c, d, a, b, x[k + 14], S13, 0xa679438e);
10104
+ b = FF(b, c, d, a, x[k + 15], S14, 0x49b40821);
10105
+ a = GG(a, b, c, d, x[k + 1], S21, 0xf61e2562);
10106
+ d = GG(d, a, b, c, x[k + 6], S22, 0xc040b340);
10107
+ c = GG(c, d, a, b, x[k + 11], S23, 0x265e5a51);
10108
+ b = GG(b, c, d, a, x[k], S24, 0xe9b6c7aa);
10109
+ a = GG(a, b, c, d, x[k + 5], S21, 0xd62f105d);
10110
+ d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
10111
+ c = GG(c, d, a, b, x[k + 15], S23, 0xd8a1e681);
10112
+ b = GG(b, c, d, a, x[k + 4], S24, 0xe7d3fbc8);
10113
+ a = GG(a, b, c, d, x[k + 9], S21, 0x21e1cde6);
10114
+ d = GG(d, a, b, c, x[k + 14], S22, 0xc33707d6);
10115
+ c = GG(c, d, a, b, x[k + 3], S23, 0xf4d50d87);
10116
+ b = GG(b, c, d, a, x[k + 8], S24, 0x455a14ed);
10117
+ a = GG(a, b, c, d, x[k + 13], S21, 0xa9e3e905);
10118
+ d = GG(d, a, b, c, x[k + 2], S22, 0xfcefa3f8);
10119
+ c = GG(c, d, a, b, x[k + 7], S23, 0x676f02d9);
10120
+ b = GG(b, c, d, a, x[k + 12], S24, 0x8d2a4c8a);
10121
+ a = HH(a, b, c, d, x[k + 5], S31, 0xfffa3942);
10122
+ d = HH(d, a, b, c, x[k + 8], S32, 0x8771f681);
10123
+ c = HH(c, d, a, b, x[k + 11], S33, 0x6d9d6122);
10124
+ b = HH(b, c, d, a, x[k + 14], S34, 0xfde5380c);
10125
+ a = HH(a, b, c, d, x[k + 1], S31, 0xa4beea44);
10126
+ d = HH(d, a, b, c, x[k + 4], S32, 0x4bdecfa9);
10127
+ c = HH(c, d, a, b, x[k + 7], S33, 0xf6bb4b60);
10128
+ b = HH(b, c, d, a, x[k + 10], S34, 0xbebfbc70);
10129
+ a = HH(a, b, c, d, x[k + 13], S31, 0x289b7ec6);
10130
+ d = HH(d, a, b, c, x[k], S32, 0xeaa127fa);
10131
+ c = HH(c, d, a, b, x[k + 3], S33, 0xd4ef3085);
10132
+ b = HH(b, c, d, a, x[k + 6], S34, 0x4881d05);
10133
+ a = HH(a, b, c, d, x[k + 9], S31, 0xd9d4d039);
10134
+ d = HH(d, a, b, c, x[k + 12], S32, 0xe6db99e5);
10135
+ c = HH(c, d, a, b, x[k + 15], S33, 0x1fa27cf8);
10136
+ b = HH(b, c, d, a, x[k + 2], S34, 0xc4ac5665);
10137
+ a = II(a, b, c, d, x[k], S41, 0xf4292244);
10138
+ d = II(d, a, b, c, x[k + 7], S42, 0x432aff97);
10139
+ c = II(c, d, a, b, x[k + 14], S43, 0xab9423a7);
10140
+ b = II(b, c, d, a, x[k + 5], S44, 0xfc93a039);
10141
+ a = II(a, b, c, d, x[k + 12], S41, 0x655b59c3);
10142
+ d = II(d, a, b, c, x[k + 3], S42, 0x8f0ccc92);
10143
+ c = II(c, d, a, b, x[k + 10], S43, 0xffeff47d);
10144
+ b = II(b, c, d, a, x[k + 1], S44, 0x85845dd1);
10145
+ a = II(a, b, c, d, x[k + 8], S41, 0x6fa87e4f);
10146
+ d = II(d, a, b, c, x[k + 15], S42, 0xfe2ce6e0);
10147
+ c = II(c, d, a, b, x[k + 6], S43, 0xa3014314);
10148
+ b = II(b, c, d, a, x[k + 13], S44, 0x4e0811a1);
10149
+ a = II(a, b, c, d, x[k + 4], S41, 0xf7537e82);
10150
+ d = II(d, a, b, c, x[k + 11], S42, 0xbd3af235);
10151
+ c = II(c, d, a, b, x[k + 2], S43, 0x2ad7d2bb);
10152
+ b = II(b, c, d, a, x[k + 9], S44, 0xeb86d391);
10153
+ a = addUnsigned(a, AA);
10154
+ b = addUnsigned(b, BB);
10155
+ c = addUnsigned(c, CC);
10156
+ d = addUnsigned(d, DD);
10157
+ }
10158
+ const result = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
10159
+ return result.toLowerCase();
10160
+ }
10161
+ function addUnsigned(lX, lY) {
10162
+ const lX8 = lX & 0x80000000;
10163
+ const lY8 = lY & 0x80000000;
10164
+ const lX4 = lX & 0x40000000;
10165
+ const lY4 = lY & 0x40000000;
10166
+ const lResult = (lX & 0x3fffffff) + (lY & 0x3fffffff);
10167
+ if (!!(lX4 & lY4)) {
10168
+ return lResult ^ 0x80000000 ^ lX8 ^ lY8;
10169
+ }
10170
+ if (!!(lX4 | lY4)) {
10171
+ if (!!(lResult & 0x40000000)) {
10172
+ return lResult ^ 0xc0000000 ^ lX8 ^ lY8;
10173
+ }
10174
+ else {
10175
+ return lResult ^ 0x40000000 ^ lX8 ^ lY8;
10176
+ }
10177
+ }
10178
+ else {
10179
+ return lResult ^ lX8 ^ lY8;
10180
+ }
10181
+ }
10182
+ function rotateLeft(lValue, iShiftBits) {
10183
+ return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
10184
+ }
10185
+ function F(x, y, z) {
10186
+ return (x & y) | (~x & z);
10187
+ }
10188
+ function G(x, y, z) {
10189
+ return (x & z) | (y & ~z);
10190
+ }
10191
+ function H(x, y, z) {
10192
+ return x ^ y ^ z;
10193
+ }
10194
+ function I(x, y, z) {
10195
+ return y ^ (x | ~z);
10196
+ }
10197
+ function FF(a, b, c, d, x, s, ac) {
10198
+ a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
10199
+ return addUnsigned(rotateLeft(a, s), b);
10200
+ }
10201
+ function GG(a, b, c, d, x, s, ac) {
10202
+ a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
10203
+ return addUnsigned(rotateLeft(a, s), b);
10204
+ }
10205
+ function HH(a, b, c, d, x, s, ac) {
10206
+ a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
10207
+ return addUnsigned(rotateLeft(a, s), b);
10208
+ }
10209
+ function II(a, b, c, d, x, s, ac) {
10210
+ a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
10211
+ return addUnsigned(rotateLeft(a, s), b);
10212
+ }
10213
+ function convertToWordArray(string) {
10214
+ let lWordCount;
10215
+ const lMessageLength = string.length;
10216
+ const lNumberOfWords_temp1 = lMessageLength + 8;
10217
+ const lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
10218
+ const lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
10219
+ const lWordArray = Array(lNumberOfWords - 1);
10220
+ let lBytePosition = 0;
10221
+ let lByteCount = 0;
10222
+ while (lByteCount < lMessageLength) {
10223
+ lWordCount = (lByteCount - (lByteCount % 4)) / 4;
10224
+ lBytePosition = (lByteCount % 4) * 8;
10225
+ lWordArray[lWordCount] = lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition);
10226
+ lByteCount++;
10227
+ }
10228
+ lWordCount = (lByteCount - (lByteCount % 4)) / 4;
10229
+ lBytePosition = (lByteCount % 4) * 8;
10230
+ lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
10231
+ lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
10232
+ lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
10233
+ return lWordArray;
10234
+ }
10235
+ function wordToHex(lValue) {
10236
+ let WordToHexValue = '';
10237
+ let WordToHexValue_temp = '';
10238
+ let lByte;
10239
+ let lCount;
10240
+ for (lCount = 0; lCount <= 3; lCount++) {
10241
+ lByte = (lValue >>> (lCount * 8)) & 255;
10242
+ WordToHexValue_temp = '0' + lByte.toString(16);
10243
+ WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
10244
+ }
10245
+ return WordToHexValue;
10246
+ }
10247
+ function utf8Encode(string) {
10248
+ let utftext = '';
10249
+ let c;
10250
+ string = string.replace(/\r\n/g, '\n');
10251
+ for (let n = 0; n < string.length; n++) {
10252
+ c = string.charCodeAt(n);
10253
+ if (c < 128) {
10254
+ utftext += String.fromCharCode(c);
10255
+ }
10256
+ else if (c > 127 && c < 2048) {
10257
+ utftext += String.fromCharCode((c >> 6) | 192);
10258
+ utftext += String.fromCharCode((c & 63) | 128);
10259
+ }
10260
+ else {
10261
+ utftext += String.fromCharCode((c >> 12) | 224);
10262
+ utftext += String.fromCharCode(((c >> 6) & 63) | 128);
10263
+ utftext += String.fromCharCode((c & 63) | 128);
10264
+ }
10265
+ }
10266
+ return utftext;
10267
+ }
10268
+
10063
10269
  function isRetina() {
10064
10270
  // We cannot reasonably inject `DOCUMENT` here, but we are extra
10065
10271
  // careful about usage of `window` and its possible non-existence in SSR,
@@ -10078,9 +10284,9 @@ function isRetina() {
10078
10284
  class Gravatar extends Source {
10079
10285
  getAvatar(size) {
10080
10286
  const value = this.getValue();
10081
- const md5 = value.match('^[a-f0-9]{32}$') ? value : Md5.hashStr(value.trim().toLowerCase()).toString();
10287
+ const hash = value.match('^[a-f0-9]{32}$') ? value : md5(value.trim().toLowerCase()).toString();
10082
10288
  const avatarSize = isRetina() ? size * 2 : size;
10083
- return `https://secure.gravatar.com/avatar/${md5}?s=${avatarSize}&d=404`;
10289
+ return `https://secure.gravatar.com/avatar/${hash}?s=${avatarSize}&d=404`;
10084
10290
  }
10085
10291
  isTextual() {
10086
10292
  return false;