js-md5 0.9.0 → 0.10.0

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/build/md5.mjs CHANGED
@@ -8,7 +8,7 @@ var md5$1 = {exports: {}};
8
8
  * [js-md5]{@link https://github.com/emn178/js-md5}
9
9
  *
10
10
  * @namespace md5
11
- * @version 0.9.0
11
+ * @version 0.10.0
12
12
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
13
13
  * @copyright Chen, Yi-Cyuan 2014-2026
14
14
  * @license MIT
@@ -24,7 +24,7 @@ var md5$1 = {exports: {}};
24
24
  if (root.JS_MD5_NO_WINDOW) {
25
25
  WINDOW = false;
26
26
  }
27
- var WEB_WORKER = !WINDOW && typeof self === 'object';
27
+ var WEB_WORKER = typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;
28
28
  if (WEB_WORKER) {
29
29
  root = self;
30
30
  }
@@ -340,7 +340,7 @@ var md5$1 = {exports: {}};
340
340
  var result = formatMessage(message);
341
341
  message = result[0];
342
342
  var isString = result[1];
343
- var code, index = 0, i, length = message.length, blocks = this.blocks;
343
+ var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
344
344
  var buffer8 = this.buffer8;
345
345
 
346
346
  while (index < length) {
@@ -366,12 +366,18 @@ var md5$1 = {exports: {}};
366
366
  buffer8[i++] = 0xe0 | (code >>> 12);
367
367
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
368
368
  buffer8[i++] = 0x80 | (code & 0x3f);
369
- } else {
370
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
369
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
370
+ ++index;
371
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
371
372
  buffer8[i++] = 0xf0 | (code >>> 18);
372
373
  buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
373
374
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
374
375
  buffer8[i++] = 0x80 | (code & 0x3f);
376
+ } else {
377
+ // unpaired surrogate: U+FFFD
378
+ buffer8[i++] = 0xef;
379
+ buffer8[i++] = 0xbf;
380
+ buffer8[i++] = 0xbd;
375
381
  }
376
382
  }
377
383
  } else {
@@ -386,12 +392,18 @@ var md5$1 = {exports: {}};
386
392
  blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
387
393
  blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
388
394
  blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
389
- } else {
390
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
395
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
396
+ ++index;
397
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
391
398
  blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
392
399
  blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
393
400
  blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
394
401
  blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
402
+ } else {
403
+ // unpaired surrogate: U+FFFD
404
+ blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
405
+ blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
406
+ blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
395
407
  }
396
408
  }
397
409
  }
@@ -774,7 +786,7 @@ var md5$1 = {exports: {}};
774
786
  var i, result = formatMessage(key);
775
787
  key = result[0];
776
788
  if (result[1]) {
777
- var bytes = [], length = key.length, index = 0, code;
789
+ var bytes = [], length = key.length, index = 0, code, code2;
778
790
  for (i = 0; i < length; ++i) {
779
791
  code = key.charCodeAt(i);
780
792
  if (code < 0x80) {
@@ -786,12 +798,18 @@ var md5$1 = {exports: {}};
786
798
  bytes[index++] = (0xe0 | (code >>> 12));
787
799
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
788
800
  bytes[index++] = (0x80 | (code & 0x3f));
789
- } else {
790
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
801
+ } else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
802
+ ++i;
803
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
791
804
  bytes[index++] = (0xf0 | (code >>> 18));
792
805
  bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
793
806
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
794
807
  bytes[index++] = (0x80 | (code & 0x3f));
808
+ } else {
809
+ // unpaired surrogate: U+FFFD
810
+ bytes[index++] = 0xef;
811
+ bytes[index++] = 0xbf;
812
+ bytes[index++] = 0xbd;
795
813
  }
796
814
  }
797
815
  key = bytes;
@@ -2,7 +2,7 @@
2
2
  * [js-md5]{@link https://github.com/emn178/js-md5}
3
3
  *
4
4
  * @namespace md5
5
- * @version 0.9.0
5
+ * @version 0.10.0
6
6
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
7
7
  * @copyright Chen, Yi-Cyuan 2014-2026
8
8
  * @license MIT
@@ -16,7 +16,7 @@
16
16
  if (root.JS_MD5_NO_WINDOW) {
17
17
  WINDOW = false;
18
18
  }
19
- var WEB_WORKER = !WINDOW && typeof self === 'object';
19
+ var WEB_WORKER = typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;
20
20
  /* istanbul ignore next */
21
21
  var NODE_JS = !root.JS_MD5_NO_NODE_JS && !WINDOW && typeof process === 'object' && process.versions && process.versions.node;
22
22
  if (NODE_JS) {
@@ -347,7 +347,7 @@
347
347
  var result = formatMessage(message);
348
348
  message = result[0];
349
349
  var isString = result[1];
350
- var code, index = 0, i, length = message.length, blocks = this.blocks;
350
+ var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
351
351
  var buffer8 = this.buffer8;
352
352
 
353
353
  while (index < length) {
@@ -373,12 +373,18 @@
373
373
  buffer8[i++] = 0xe0 | (code >>> 12);
374
374
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
375
375
  buffer8[i++] = 0x80 | (code & 0x3f);
376
- } else {
377
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
376
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
377
+ ++index;
378
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
378
379
  buffer8[i++] = 0xf0 | (code >>> 18);
379
380
  buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
380
381
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
381
382
  buffer8[i++] = 0x80 | (code & 0x3f);
383
+ } else {
384
+ // unpaired surrogate: U+FFFD
385
+ buffer8[i++] = 0xef;
386
+ buffer8[i++] = 0xbf;
387
+ buffer8[i++] = 0xbd;
382
388
  }
383
389
  }
384
390
  }
@@ -757,7 +763,7 @@
757
763
  var i, result = formatMessage(key);
758
764
  key = result[0];
759
765
  if (result[1]) {
760
- var bytes = [], length = key.length, index = 0, code;
766
+ var bytes = [], length = key.length, index = 0, code, code2;
761
767
  for (i = 0; i < length; ++i) {
762
768
  code = key.charCodeAt(i);
763
769
  if (code < 0x80) {
@@ -769,12 +775,18 @@
769
775
  bytes[index++] = (0xe0 | (code >>> 12));
770
776
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
771
777
  bytes[index++] = (0x80 | (code & 0x3f));
772
- } else {
773
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
778
+ } else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
779
+ ++i;
780
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
774
781
  bytes[index++] = (0xf0 | (code >>> 18));
775
782
  bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
776
783
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
777
784
  bytes[index++] = (0x80 | (code & 0x3f));
785
+ } else {
786
+ // unpaired surrogate: U+FFFD
787
+ bytes[index++] = 0xef;
788
+ bytes[index++] = 0xbf;
789
+ bytes[index++] = 0xbd;
778
790
  }
779
791
  }
780
792
  key = bytes;
@@ -2,9 +2,9 @@
2
2
  * [js-md5]{@link https://github.com/emn178/js-md5}
3
3
  *
4
4
  * @namespace md5
5
- * @version 0.9.0
5
+ * @version 0.10.0
6
6
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
7
7
  * @copyright Chen, Yi-Cyuan 2014-2026
8
8
  * @license MIT
9
9
  */
10
- !function(){var t="input is invalid type",r="object"==typeof window,e=r?window:{};e.JS_MD5_NO_WINDOW&&(r=!1);var i=!r&&"object"==typeof self,h=!e.JS_MD5_NO_NODE_JS&&!r&&"object"==typeof process&&process.versions&&process.versions.node;h?e=global:i&&(e=self);var s=!e.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,n="function"==typeof define&&define.amd,a="0123456789abcdef".split(""),o=[128,32768,8388608,-2147483648],f=["hex","array","digest","arrayBuffer"];f.push("buffer"),f.push("base64");var u,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[],c=new ArrayBuffer(68);u=new Uint8Array(c),p=new Uint32Array(c);var d=Array.isArray,l=ArrayBuffer.isView,v=function(r){var e=typeof r;if("string"===e)return[r,!0];if("object"!==e||null===r)throw new Error(t);if(r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!d(r)&&!l(r))throw new Error(t);return[r,!1]},w=function(t){return function(r){return new B(!0).update(r)[t]()}},b=function(r){var e=require("crypto"),i=require("buffer").Buffer,h=i.from;return function(s){if("string"==typeof s)return e.createHash("md5").update(s,"utf8").digest("hex");if(null==s)throw new Error(t);return s.constructor===ArrayBuffer&&(s=new Uint8Array(s)),d(s)||l(s)||s.constructor===i?e.createHash("md5").update(h(s)).digest("hex"):r(s)}},A=function(t){return function(r,e){return new g(r,!0).update(e)[t]()}};function B(t){if(t)p[0]=p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0,this.blocks=p,this.buffer8=u;else{var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function g(t,r){var e,i=v(t);if(t=i[0],i[1]){var h,s=[],n=t.length,a=0;for(e=0;e<n;++e)(h=t.charCodeAt(e))<128?s[a++]=h:h<2048?(s[a++]=192|h>>>6,s[a++]=128|63&h):h<55296||h>=57344?(s[a++]=224|h>>>12,s[a++]=128|h>>>6&63,s[a++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++e)),s[a++]=240|h>>>18,s[a++]=128|h>>>12&63,s[a++]=128|h>>>6&63,s[a++]=128|63&h);t=s}t.length>64&&(t=new B(!0).update(t).array());var o=[],f=[];for(e=0;e<64;++e){var u=t[e]||0;o[e]=92^u,f[e]=54^u}B.call(this,r),this.update(f),this.oKeyPad=o,this.inner=!0,this.sharedMemory=r}B.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=v(t);t=r[0];for(var e,i,h=r[1],s=0,n=t.length,a=this.blocks,o=this.buffer8;s<n;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),h)for(i=this.start;s<n&&i<64;++s)(e=t.charCodeAt(s))<128?o[i++]=e:e<2048?(o[i++]=192|e>>>6,o[i++]=128|63&e):e<55296||e>=57344?(o[i++]=224|e>>>12,o[i++]=128|e>>>6&63,o[i++]=128|63&e):(e=65536+((1023&e)<<10|1023&t.charCodeAt(++s)),o[i++]=240|e>>>18,o[i++]=128|e>>>12&63,o[i++]=128|e>>>6&63,o[i++]=128|63&e);else for(i=this.start;s<n&&i<64;++s)o[i++]=t[s];this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=o[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},B.prototype.hash=function(){var t,r,e,i,h,s,n=this.blocks;this.first?r=((r=((t=((t=n[0]-680876937)<<7|t>>>25)-271733879|0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+n[1]-117830708)<<12|i>>>20)+t|0)&(-271733879^t))+n[2]-1126478375)<<17|e>>>15)+i|0)&(i^t))+n[3]-1316259209)<<22|r>>>10)+e|0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+n[0]-680876936)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[1]-389564586)<<12|i>>>20)+t|0)&(t^r))+n[2]+606105819)<<17|e>>>15)+i|0)&(i^t))+n[3]-1044525330)<<22|r>>>10)+e|0),r=((r+=((t=((t+=(i^r&(e^i))+n[4]-176418897)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[5]+1200080426)<<12|i>>>20)+t|0)&(t^r))+n[6]-1473231341)<<17|e>>>15)+i|0)&(i^t))+n[7]-45705983)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+n[8]+1770035416)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[9]-1958414417)<<12|i>>>20)+t|0)&(t^r))+n[10]-42063)<<17|e>>>15)+i|0)&(i^t))+n[11]-1990404162)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+n[12]+1804603682)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[13]-40341101)<<12|i>>>20)+t|0)&(t^r))+n[14]-1502002290)<<17|e>>>15)+i|0)&(i^t))+n[15]+1236535329)<<22|r>>>10)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[1]-165796510)<<5|t>>>27)+r|0)^r))+n[6]-1069501632)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[11]+643717713)<<14|e>>>18)+i|0)^i))+n[0]-373897302)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[5]-701558691)<<5|t>>>27)+r|0)^r))+n[10]+38016083)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[15]-660478335)<<14|e>>>18)+i|0)^i))+n[4]-405537848)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[9]+568446438)<<5|t>>>27)+r|0)^r))+n[14]-1019803690)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[3]-187363961)<<14|e>>>18)+i|0)^i))+n[8]+1163531501)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[13]-1444681467)<<5|t>>>27)+r|0)^r))+n[2]-51403784)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[7]+1735328473)<<14|e>>>18)+i|0)^i))+n[12]-1926607734)<<20|r>>>12)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[5]-378558)<<4|t>>>28)+r|0))+n[8]-2022574463)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[11]+1839030562)<<16|e>>>16)+i|0))+n[14]-35309556)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[1]-1530992060)<<4|t>>>28)+r|0))+n[4]+1272893353)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[7]-155497632)<<16|e>>>16)+i|0))+n[10]-1094730640)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[13]+681279174)<<4|t>>>28)+r|0))+n[0]-358537222)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[3]-722521979)<<16|e>>>16)+i|0))+n[6]+76029189)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[9]-640364487)<<4|t>>>28)+r|0))+n[12]-421815835)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[15]+530742520)<<16|e>>>16)+i|0))+n[2]-995338651)<<23|r>>>9)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[0]-198630844)<<6|t>>>26)+r|0)|~e))+n[7]+1126891415)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[14]-1416354905)<<15|e>>>17)+i|0)|~t))+n[5]-57434055)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[12]+1700485571)<<6|t>>>26)+r|0)|~e))+n[3]-1894986606)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[10]-1051523)<<15|e>>>17)+i|0)|~t))+n[1]-2054922799)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[8]+1873313359)<<6|t>>>26)+r|0)|~e))+n[15]-30611744)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[6]-1560198380)<<15|e>>>17)+i|0)|~t))+n[13]+1309151649)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[4]-145523070)<<6|t>>>26)+r|0)|~e))+n[11]-1120210379)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[2]+718787259)<<15|e>>>17)+i|0)|~t))+n[9]-343485551)<<21|r>>>11)+e|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=e-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+e|0,this.h3=this.h3+i|0)},B.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return a[t>>>4&15]+a[15&t]+a[t>>>12&15]+a[t>>>8&15]+a[t>>>20&15]+a[t>>>16&15]+a[t>>>28&15]+a[t>>>24&15]+a[r>>>4&15]+a[15&r]+a[r>>>12&15]+a[r>>>8&15]+a[r>>>20&15]+a[r>>>16&15]+a[r>>>28&15]+a[r>>>24&15]+a[e>>>4&15]+a[15&e]+a[e>>>12&15]+a[e>>>8&15]+a[e>>>20&15]+a[e>>>16&15]+a[e>>>28&15]+a[e>>>24&15]+a[i>>>4&15]+a[15&i]+a[i>>>12&15]+a[i>>>8&15]+a[i>>>20&15]+a[i>>>16&15]+a[i>>>28&15]+a[i>>>24&15]},B.prototype.toString=B.prototype.hex,B.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},B.prototype.array=B.prototype.digest,B.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.base64=function(){for(var t,r,e,i="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],e=h[s++],i+=y[t>>>2]+y[63&(t<<4|r>>>4)]+y[63&(r<<2|e>>>6)]+y[63&e];return t=h[s],i+=y[t>>>2]+y[t<<4&63]+"=="},g.prototype=new B,g.prototype.finalize=function(){if(B.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();B.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),B.prototype.finalize.call(this)}};var m=function(){var t=w("hex");h&&(t=b(t)),t.create=function(){return new B},t.update=function(r){return t.create().update(r)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=w(e)}return t}();m.md5=m,m.md5.hmac=function(){var t=A("hex");t.create=function(t){return new g(t)},t.update=function(r,e){return t.create(r).update(e)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=A(e)}return t}(),s?module.exports=m:(e.md5=m,n&&define(function(){return m}))}();
10
+ !function(){var t="input is invalid type",r="object"==typeof window,e=r?window:{};e.JS_MD5_NO_WINDOW&&(r=!1);var i="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope,h=!e.JS_MD5_NO_NODE_JS&&!r&&"object"==typeof process&&process.versions&&process.versions.node;h?e=global:i&&(e=self);var s=!e.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,n="function"==typeof define&&define.amd,a="0123456789abcdef".split(""),o=[128,32768,8388608,-2147483648],f=["hex","array","digest","arrayBuffer"];f.push("buffer"),f.push("base64");var u,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),y=[],c=new ArrayBuffer(68);u=new Uint8Array(c),y=new Uint32Array(c);var d=Array.isArray,l=ArrayBuffer.isView,v=function(r){var e=typeof r;if("string"===e)return[r,!0];if("object"!==e||null===r)throw new Error(t);if(r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!d(r)&&!l(r))throw new Error(t);return[r,!1]},b=function(t){return function(r){return new B(!0).update(r)[t]()}},w=function(r){var e=require("crypto"),i=require("buffer").Buffer,h=i.from;return function(s){if("string"==typeof s)return e.createHash("md5").update(s,"utf8").digest("hex");if(null==s)throw new Error(t);return s.constructor===ArrayBuffer&&(s=new Uint8Array(s)),d(s)||l(s)||s.constructor===i?e.createHash("md5").update(h(s)).digest("hex"):r(s)}},A=function(t){return function(r,e){return new g(r,!0).update(e)[t]()}};function B(t){if(t)y[0]=y[16]=y[1]=y[2]=y[3]=y[4]=y[5]=y[6]=y[7]=y[8]=y[9]=y[10]=y[11]=y[12]=y[13]=y[14]=y[15]=0,this.blocks=y,this.buffer8=u;else{var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function g(t,r){var e,i=v(t);if(t=i[0],i[1]){var h,s,n=[],a=t.length,o=0;for(e=0;e<a;++e)(h=t.charCodeAt(e))<128?n[o++]=h:h<2048?(n[o++]=192|h>>>6,n[o++]=128|63&h):h<55296||h>=57344?(n[o++]=224|h>>>12,n[o++]=128|h>>>6&63,n[o++]=128|63&h):h<56320&&(s=t.charCodeAt(e+1))>=56320&&s<57344?(++e,h=65536+((1023&h)<<10|1023&s),n[o++]=240|h>>>18,n[o++]=128|h>>>12&63,n[o++]=128|h>>>6&63,n[o++]=128|63&h):(n[o++]=239,n[o++]=191,n[o++]=189);t=n}t.length>64&&(t=new B(!0).update(t).array());var f=[],u=[];for(e=0;e<64;++e){var p=t[e]||0;f[e]=92^p,u[e]=54^p}B.call(this,r),this.update(u),this.oKeyPad=f,this.inner=!0,this.sharedMemory=r}B.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=v(t);t=r[0];for(var e,i,h,s=r[1],n=0,a=t.length,o=this.blocks,f=this.buffer8;n<a;){if(this.hashed&&(this.hashed=!1,o[0]=o[16],o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),s)for(h=this.start;n<a&&h<64;++n)(e=t.charCodeAt(n))<128?f[h++]=e:e<2048?(f[h++]=192|e>>>6,f[h++]=128|63&e):e<55296||e>=57344?(f[h++]=224|e>>>12,f[h++]=128|e>>>6&63,f[h++]=128|63&e):e<56320&&(i=t.charCodeAt(n+1))>=56320&&i<57344?(++n,e=65536+((1023&e)<<10|1023&i),f[h++]=240|e>>>18,f[h++]=128|e>>>12&63,f[h++]=128|e>>>6&63,f[h++]=128|63&e):(f[h++]=239,f[h++]=191,f[h++]=189);else for(h=this.start;n<a&&h<64;++n)f[h++]=t[n];this.lastByteIndex=h,this.bytes+=h-this.start,h>=64?(this.start=h-64,this.hash(),this.hashed=!0):this.start=h}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=o[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},B.prototype.hash=function(){var t,r,e,i,h,s,n=this.blocks;this.first?r=((r=((t=((t=n[0]-680876937)<<7|t>>>25)-271733879|0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+n[1]-117830708)<<12|i>>>20)+t|0)&(-271733879^t))+n[2]-1126478375)<<17|e>>>15)+i|0)&(i^t))+n[3]-1316259209)<<22|r>>>10)+e|0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+n[0]-680876936)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[1]-389564586)<<12|i>>>20)+t|0)&(t^r))+n[2]+606105819)<<17|e>>>15)+i|0)&(i^t))+n[3]-1044525330)<<22|r>>>10)+e|0),r=((r+=((t=((t+=(i^r&(e^i))+n[4]-176418897)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[5]+1200080426)<<12|i>>>20)+t|0)&(t^r))+n[6]-1473231341)<<17|e>>>15)+i|0)&(i^t))+n[7]-45705983)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+n[8]+1770035416)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[9]-1958414417)<<12|i>>>20)+t|0)&(t^r))+n[10]-42063)<<17|e>>>15)+i|0)&(i^t))+n[11]-1990404162)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+n[12]+1804603682)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+n[13]-40341101)<<12|i>>>20)+t|0)&(t^r))+n[14]-1502002290)<<17|e>>>15)+i|0)&(i^t))+n[15]+1236535329)<<22|r>>>10)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[1]-165796510)<<5|t>>>27)+r|0)^r))+n[6]-1069501632)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[11]+643717713)<<14|e>>>18)+i|0)^i))+n[0]-373897302)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[5]-701558691)<<5|t>>>27)+r|0)^r))+n[10]+38016083)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[15]-660478335)<<14|e>>>18)+i|0)^i))+n[4]-405537848)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[9]+568446438)<<5|t>>>27)+r|0)^r))+n[14]-1019803690)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[3]-187363961)<<14|e>>>18)+i|0)^i))+n[8]+1163531501)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+n[13]-1444681467)<<5|t>>>27)+r|0)^r))+n[2]-51403784)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+n[7]+1735328473)<<14|e>>>18)+i|0)^i))+n[12]-1926607734)<<20|r>>>12)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[5]-378558)<<4|t>>>28)+r|0))+n[8]-2022574463)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[11]+1839030562)<<16|e>>>16)+i|0))+n[14]-35309556)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[1]-1530992060)<<4|t>>>28)+r|0))+n[4]+1272893353)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[7]-155497632)<<16|e>>>16)+i|0))+n[10]-1094730640)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[13]+681279174)<<4|t>>>28)+r|0))+n[0]-358537222)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[3]-722521979)<<16|e>>>16)+i|0))+n[6]+76029189)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+n[9]-640364487)<<4|t>>>28)+r|0))+n[12]-421815835)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+n[15]+530742520)<<16|e>>>16)+i|0))+n[2]-995338651)<<23|r>>>9)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[0]-198630844)<<6|t>>>26)+r|0)|~e))+n[7]+1126891415)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[14]-1416354905)<<15|e>>>17)+i|0)|~t))+n[5]-57434055)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[12]+1700485571)<<6|t>>>26)+r|0)|~e))+n[3]-1894986606)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[10]-1051523)<<15|e>>>17)+i|0)|~t))+n[1]-2054922799)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[8]+1873313359)<<6|t>>>26)+r|0)|~e))+n[15]-30611744)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[6]-1560198380)<<15|e>>>17)+i|0)|~t))+n[13]+1309151649)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+n[4]-145523070)<<6|t>>>26)+r|0)|~e))+n[11]-1120210379)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+n[2]+718787259)<<15|e>>>17)+i|0)|~t))+n[9]-343485551)<<21|r>>>11)+e|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=e-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+e|0,this.h3=this.h3+i|0)},B.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return a[t>>>4&15]+a[15&t]+a[t>>>12&15]+a[t>>>8&15]+a[t>>>20&15]+a[t>>>16&15]+a[t>>>28&15]+a[t>>>24&15]+a[r>>>4&15]+a[15&r]+a[r>>>12&15]+a[r>>>8&15]+a[r>>>20&15]+a[r>>>16&15]+a[r>>>28&15]+a[r>>>24&15]+a[e>>>4&15]+a[15&e]+a[e>>>12&15]+a[e>>>8&15]+a[e>>>20&15]+a[e>>>16&15]+a[e>>>28&15]+a[e>>>24&15]+a[i>>>4&15]+a[15&i]+a[i>>>12&15]+a[i>>>8&15]+a[i>>>20&15]+a[i>>>16&15]+a[i>>>28&15]+a[i>>>24&15]},B.prototype.toString=B.prototype.hex,B.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},B.prototype.array=B.prototype.digest,B.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.base64=function(){for(var t,r,e,i="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],e=h[s++],i+=p[t>>>2]+p[63&(t<<4|r>>>4)]+p[63&(r<<2|e>>>6)]+p[63&e];return t=h[s],i+=p[t>>>2]+p[t<<4&63]+"=="},g.prototype=new B,g.prototype.finalize=function(){if(B.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();B.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),B.prototype.finalize.call(this)}};var m=function(){var t=b("hex");h&&(t=w(t)),t.create=function(){return new B},t.update=function(r){return t.create().update(r)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=b(e)}return t}();m.md5=m,m.md5.hmac=function(){var t=A("hex");t.create=function(t){return new g(t)},t.update=function(r,e){return t.create(r).update(e)};for(var r=0;r<f.length;++r){var e=f[r];t[e]=A(e)}return t}(),s?module.exports=m:(e.md5=m,n&&define(function(){return m}))}();
@@ -1,10 +1,10 @@
1
- function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,i={exports:{}};
1
+ function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,e={exports:{}};
2
2
  /**
3
3
  * [js-md5]{@link https://github.com/emn178/js-md5}
4
4
  *
5
5
  * @namespace md5
6
- * @version 0.9.0
6
+ * @version 0.10.0
7
7
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
8
8
  * @copyright Chen, Yi-Cyuan 2014-2026
9
9
  * @license MIT
10
- */r=i,function(){var t="input is invalid type",i="object"==typeof window,e=i?window:{};e.JS_MD5_NO_WINDOW&&(i=!1),!i&&"object"==typeof self&&(e=self);var h=!e.JS_MD5_NO_COMMON_JS&&r.exports,s="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],n=["hex","array","digest","arrayBuffer"];n.push("buffer"),n.push("base64");var o,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),u=[],p=new ArrayBuffer(68);o=new Uint8Array(p),u=new Uint32Array(p);var y=Array.isArray,c=ArrayBuffer.isView,l=function(r){var i=typeof r;if("string"===i)return[r,!0];if("object"!==i||null===r)throw new Error(t);if(r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!y(r)&&!c(r))throw new Error(t);return[r,!1]},d=function(t){return function(r){return new w(!0).update(r)[t]()}},v=function(t){return function(r,i){return new b(r,!0).update(i)[t]()}};function w(t){if(t)u[0]=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0,this.blocks=u,this.buffer8=o;else{var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function b(t,r){var i,e=l(t);if(t=e[0],e[1]){var h,s=[],a=t.length,n=0;for(i=0;i<a;++i)(h=t.charCodeAt(i))<128?s[n++]=h:h<2048?(s[n++]=192|h>>>6,s[n++]=128|63&h):h<55296||h>=57344?(s[n++]=224|h>>>12,s[n++]=128|h>>>6&63,s[n++]=128|63&h):(h=65536+((1023&h)<<10|1023&t.charCodeAt(++i)),s[n++]=240|h>>>18,s[n++]=128|h>>>12&63,s[n++]=128|h>>>6&63,s[n++]=128|63&h);t=s}t.length>64&&(t=new w(!0).update(t).array());var o=[],f=[];for(i=0;i<64;++i){var u=t[i]||0;o[i]=92^u,f[i]=54^u}w.call(this,r),this.update(f),this.oKeyPad=o,this.inner=!0,this.sharedMemory=r}w.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=l(t);t=r[0];for(var i,e,h=r[1],s=0,a=t.length,n=this.blocks,o=this.buffer8;s<a;){if(this.hashed&&(this.hashed=!1,n[0]=n[16],n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0),h)for(e=this.start;s<a&&e<64;++s)(i=t.charCodeAt(s))<128?o[e++]=i:i<2048?(o[e++]=192|i>>>6,o[e++]=128|63&i):i<55296||i>=57344?(o[e++]=224|i>>>12,o[e++]=128|i>>>6&63,o[e++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++s)),o[e++]=240|i>>>18,o[e++]=128|i>>>12&63,o[e++]=128|i>>>6&63,o[e++]=128|63&i);else for(e=this.start;s<a&&e<64;++s)o[e++]=t[s];this.lastByteIndex=e,this.bytes+=e-this.start,e>=64?(this.start=e-64,this.hash(),this.hashed=!0):this.start=e}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=a[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},w.prototype.hash=function(){var t,r,i,e,h,s,a=this.blocks;this.first?r=((r=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879|0)^(i=((i=(-271733879^(e=((e=(-1732584194^2004318071&t)+a[1]-117830708)<<12|e>>>20)+t|0)&(-271733879^t))+a[2]-1126478375)<<17|i>>>15)+e|0)&(e^t))+a[3]-1316259209)<<22|r>>>10)+i|0:(t=this.h0,r=this.h1,i=this.h2,r=((r+=((t=((t+=((e=this.h3)^r&(i^e))+a[0]-680876936)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+a[1]-389564586)<<12|e>>>20)+t|0)&(t^r))+a[2]+606105819)<<17|i>>>15)+e|0)&(e^t))+a[3]-1044525330)<<22|r>>>10)+i|0),r=((r+=((t=((t+=(e^r&(i^e))+a[4]-176418897)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+a[5]+1200080426)<<12|e>>>20)+t|0)&(t^r))+a[6]-1473231341)<<17|i>>>15)+e|0)&(e^t))+a[7]-45705983)<<22|r>>>10)+i|0,r=((r+=((t=((t+=(e^r&(i^e))+a[8]+1770035416)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+a[9]-1958414417)<<12|e>>>20)+t|0)&(t^r))+a[10]-42063)<<17|i>>>15)+e|0)&(e^t))+a[11]-1990404162)<<22|r>>>10)+i|0,r=((r+=((t=((t+=(e^r&(i^e))+a[12]+1804603682)<<7|t>>>25)+r|0)^(i=((i+=(r^(e=((e+=(i^t&(r^i))+a[13]-40341101)<<12|e>>>20)+t|0)&(t^r))+a[14]-1502002290)<<17|i>>>15)+e|0)&(e^t))+a[15]+1236535329)<<22|r>>>10)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+a[1]-165796510)<<5|t>>>27)+r|0)^r))+a[6]-1069501632)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+a[11]+643717713)<<14|i>>>18)+e|0)^e))+a[0]-373897302)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+a[5]-701558691)<<5|t>>>27)+r|0)^r))+a[10]+38016083)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+a[15]-660478335)<<14|i>>>18)+e|0)^e))+a[4]-405537848)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+a[9]+568446438)<<5|t>>>27)+r|0)^r))+a[14]-1019803690)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+a[3]-187363961)<<14|i>>>18)+e|0)^e))+a[8]+1163531501)<<20|r>>>12)+i|0,r=((r+=((e=((e+=(r^i&((t=((t+=(i^e&(r^i))+a[13]-1444681467)<<5|t>>>27)+r|0)^r))+a[2]-51403784)<<9|e>>>23)+t|0)^t&((i=((i+=(t^r&(e^t))+a[7]+1735328473)<<14|i>>>18)+e|0)^e))+a[12]-1926607734)<<20|r>>>12)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+a[5]-378558)<<4|t>>>28)+r|0))+a[8]-2022574463)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+a[11]+1839030562)<<16|i>>>16)+e|0))+a[14]-35309556)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+a[1]-1530992060)<<4|t>>>28)+r|0))+a[4]+1272893353)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+a[7]-155497632)<<16|i>>>16)+e|0))+a[10]-1094730640)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+a[13]+681279174)<<4|t>>>28)+r|0))+a[0]-358537222)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+a[3]-722521979)<<16|i>>>16)+e|0))+a[6]+76029189)<<23|r>>>9)+i|0,r=((r+=((s=(e=((e+=((h=r^i)^(t=((t+=(h^e)+a[9]-640364487)<<4|t>>>28)+r|0))+a[12]-421815835)<<11|e>>>21)+t|0)^t)^(i=((i+=(s^r)+a[15]+530742520)<<16|i>>>16)+e|0))+a[2]-995338651)<<23|r>>>9)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+a[0]-198630844)<<6|t>>>26)+r|0)|~i))+a[7]+1126891415)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+a[14]-1416354905)<<15|i>>>17)+e|0)|~t))+a[5]-57434055)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+a[12]+1700485571)<<6|t>>>26)+r|0)|~i))+a[3]-1894986606)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+a[10]-1051523)<<15|i>>>17)+e|0)|~t))+a[1]-2054922799)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+a[8]+1873313359)<<6|t>>>26)+r|0)|~i))+a[15]-30611744)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+a[6]-1560198380)<<15|i>>>17)+e|0)|~t))+a[13]+1309151649)<<21|r>>>11)+i|0,r=((r+=((e=((e+=(r^((t=((t+=(i^(r|~e))+a[4]-145523070)<<6|t>>>26)+r|0)|~i))+a[11]-1120210379)<<10|e>>>22)+t|0)^((i=((i+=(t^(e|~r))+a[2]+718787259)<<15|i>>>17)+e|0)|~t))+a[9]-343485551)<<21|r>>>11)+i|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=i-1732584194|0,this.h3=e+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+i|0,this.h3=this.h3+e|0)},w.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,i=this.h2,e=this.h3;return s[t>>>4&15]+s[15&t]+s[t>>>12&15]+s[t>>>8&15]+s[t>>>20&15]+s[t>>>16&15]+s[t>>>28&15]+s[t>>>24&15]+s[r>>>4&15]+s[15&r]+s[r>>>12&15]+s[r>>>8&15]+s[r>>>20&15]+s[r>>>16&15]+s[r>>>28&15]+s[r>>>24&15]+s[i>>>4&15]+s[15&i]+s[i>>>12&15]+s[i>>>8&15]+s[i>>>20&15]+s[i>>>16&15]+s[i>>>28&15]+s[i>>>24&15]+s[e>>>4&15]+s[15&e]+s[e>>>12&15]+s[e>>>8&15]+s[e>>>20&15]+s[e>>>16&15]+s[e>>>28&15]+s[e>>>24&15]},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,i=this.h2,e=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255]},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.base64=function(){for(var t,r,i,e="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],i=h[s++],e+=f[t>>>2]+f[63&(t<<4|r>>>4)]+f[63&(r<<2|i>>>6)]+f[63&i];return t=h[s],e+=f[t>>>2]+f[t<<4&63]+"=="},b.prototype=new w,b.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();w.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),w.prototype.finalize.call(this)}};var A=function(){var t=d("hex");t.create=function(){return new w},t.update=function(r){return t.create().update(r)};for(var r=0;r<n.length;++r){var i=n[r];t[i]=d(i)}return t}();A.md5=A,A.md5.hmac=function(){var t=v("hex");t.create=function(t){return new b(t)},t.update=function(r,i){return t.create(r).update(i)};for(var r=0;r<n.length;++r){var i=n[r];t[i]=v(i)}return t}(),h?r.exports=A:e.md5=A}();var e=t(i.exports);export{e as default,e as md5};
10
+ */r=e,function(){var t="input is invalid type",e="object"==typeof window,i=e?window:{};i.JS_MD5_NO_WINDOW&&(e=!1),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(i=self);var h=!i.JS_MD5_NO_COMMON_JS&&r.exports,s="0123456789abcdef".split(""),a=[128,32768,8388608,-2147483648],n=["hex","array","digest","arrayBuffer"];n.push("buffer"),n.push("base64");var o,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),u=[],p=new ArrayBuffer(68);o=new Uint8Array(p),u=new Uint32Array(p);var y=Array.isArray,l=ArrayBuffer.isView,c=function(r){var e=typeof r;if("string"===e)return[r,!0];if("object"!==e||null===r)throw new Error(t);if(r.constructor===ArrayBuffer)return[new Uint8Array(r),!1];if(!y(r)&&!l(r))throw new Error(t);return[r,!1]},d=function(t){return function(r){return new w(!0).update(r)[t]()}},v=function(t){return function(r,e){return new b(r,!0).update(e)[t]()}};function w(t){if(t)u[0]=u[16]=u[1]=u[2]=u[3]=u[4]=u[5]=u[6]=u[7]=u[8]=u[9]=u[10]=u[11]=u[12]=u[13]=u[14]=u[15]=0,this.blocks=u,this.buffer8=o;else{var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function b(t,r){var e,i=c(t);if(t=i[0],i[1]){var h,s,a=[],n=t.length,o=0;for(e=0;e<n;++e)(h=t.charCodeAt(e))<128?a[o++]=h:h<2048?(a[o++]=192|h>>>6,a[o++]=128|63&h):h<55296||h>=57344?(a[o++]=224|h>>>12,a[o++]=128|h>>>6&63,a[o++]=128|63&h):h<56320&&(s=t.charCodeAt(e+1))>=56320&&s<57344?(++e,h=65536+((1023&h)<<10|1023&s),a[o++]=240|h>>>18,a[o++]=128|h>>>12&63,a[o++]=128|h>>>6&63,a[o++]=128|63&h):(a[o++]=239,a[o++]=191,a[o++]=189);t=a}t.length>64&&(t=new w(!0).update(t).array());var f=[],u=[];for(e=0;e<64;++e){var p=t[e]||0;f[e]=92^p,u[e]=54^p}w.call(this,r),this.update(u),this.oKeyPad=f,this.inner=!0,this.sharedMemory=r}w.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var r=c(t);t=r[0];for(var e,i,h,s=r[1],a=0,n=t.length,o=this.blocks,f=this.buffer8;a<n;){if(this.hashed&&(this.hashed=!1,o[0]=o[16],o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),s)for(h=this.start;a<n&&h<64;++a)(e=t.charCodeAt(a))<128?f[h++]=e:e<2048?(f[h++]=192|e>>>6,f[h++]=128|63&e):e<55296||e>=57344?(f[h++]=224|e>>>12,f[h++]=128|e>>>6&63,f[h++]=128|63&e):e<56320&&(i=t.charCodeAt(a+1))>=56320&&i<57344?(++a,e=65536+((1023&e)<<10|1023&i),f[h++]=240|e>>>18,f[h++]=128|e>>>12&63,f[h++]=128|e>>>6&63,f[h++]=128|63&e):(f[h++]=239,f[h++]=191,f[h++]=189);else for(h=this.start;a<n&&h<64;++a)f[h++]=t[a];this.lastByteIndex=h,this.bytes+=h-this.start,h>=64?(this.start=h-64,this.hash(),this.hashed=!0):this.start=h}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,r=this.lastByteIndex;t[r>>>2]|=a[3&r],r>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},w.prototype.hash=function(){var t,r,e,i,h,s,a=this.blocks;this.first?r=((r=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879|0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+a[1]-117830708)<<12|i>>>20)+t|0)&(-271733879^t))+a[2]-1126478375)<<17|e>>>15)+i|0)&(i^t))+a[3]-1316259209)<<22|r>>>10)+e|0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+a[0]-680876936)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[1]-389564586)<<12|i>>>20)+t|0)&(t^r))+a[2]+606105819)<<17|e>>>15)+i|0)&(i^t))+a[3]-1044525330)<<22|r>>>10)+e|0),r=((r+=((t=((t+=(i^r&(e^i))+a[4]-176418897)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[5]+1200080426)<<12|i>>>20)+t|0)&(t^r))+a[6]-1473231341)<<17|e>>>15)+i|0)&(i^t))+a[7]-45705983)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[8]+1770035416)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[9]-1958414417)<<12|i>>>20)+t|0)&(t^r))+a[10]-42063)<<17|e>>>15)+i|0)&(i^t))+a[11]-1990404162)<<22|r>>>10)+e|0,r=((r+=((t=((t+=(i^r&(e^i))+a[12]+1804603682)<<7|t>>>25)+r|0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+a[13]-40341101)<<12|i>>>20)+t|0)&(t^r))+a[14]-1502002290)<<17|e>>>15)+i|0)&(i^t))+a[15]+1236535329)<<22|r>>>10)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[1]-165796510)<<5|t>>>27)+r|0)^r))+a[6]-1069501632)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[11]+643717713)<<14|e>>>18)+i|0)^i))+a[0]-373897302)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[5]-701558691)<<5|t>>>27)+r|0)^r))+a[10]+38016083)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[15]-660478335)<<14|e>>>18)+i|0)^i))+a[4]-405537848)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[9]+568446438)<<5|t>>>27)+r|0)^r))+a[14]-1019803690)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[3]-187363961)<<14|e>>>18)+i|0)^i))+a[8]+1163531501)<<20|r>>>12)+e|0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+a[13]-1444681467)<<5|t>>>27)+r|0)^r))+a[2]-51403784)<<9|i>>>23)+t|0)^t&((e=((e+=(t^r&(i^t))+a[7]+1735328473)<<14|e>>>18)+i|0)^i))+a[12]-1926607734)<<20|r>>>12)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[5]-378558)<<4|t>>>28)+r|0))+a[8]-2022574463)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[11]+1839030562)<<16|e>>>16)+i|0))+a[14]-35309556)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[1]-1530992060)<<4|t>>>28)+r|0))+a[4]+1272893353)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[7]-155497632)<<16|e>>>16)+i|0))+a[10]-1094730640)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[13]+681279174)<<4|t>>>28)+r|0))+a[0]-358537222)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[3]-722521979)<<16|e>>>16)+i|0))+a[6]+76029189)<<23|r>>>9)+e|0,r=((r+=((s=(i=((i+=((h=r^e)^(t=((t+=(h^i)+a[9]-640364487)<<4|t>>>28)+r|0))+a[12]-421815835)<<11|i>>>21)+t|0)^t)^(e=((e+=(s^r)+a[15]+530742520)<<16|e>>>16)+i|0))+a[2]-995338651)<<23|r>>>9)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[0]-198630844)<<6|t>>>26)+r|0)|~e))+a[7]+1126891415)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[14]-1416354905)<<15|e>>>17)+i|0)|~t))+a[5]-57434055)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[12]+1700485571)<<6|t>>>26)+r|0)|~e))+a[3]-1894986606)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[10]-1051523)<<15|e>>>17)+i|0)|~t))+a[1]-2054922799)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[8]+1873313359)<<6|t>>>26)+r|0)|~e))+a[15]-30611744)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[6]-1560198380)<<15|e>>>17)+i|0)|~t))+a[13]+1309151649)<<21|r>>>11)+e|0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+a[4]-145523070)<<6|t>>>26)+r|0)|~e))+a[11]-1120210379)<<10|i>>>22)+t|0)^((e=((e+=(t^(i|~r))+a[2]+718787259)<<15|e>>>17)+i|0)|~t))+a[9]-343485551)<<21|r>>>11)+e|0,this.first?(this.h0=t+1732584193|0,this.h1=r-271733879|0,this.h2=e-1732584194|0,this.h3=i+271733878|0,this.first=!1):(this.h0=this.h0+t|0,this.h1=this.h1+r|0,this.h2=this.h2+e|0,this.h3=this.h3+i|0)},w.prototype.hex=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return s[t>>>4&15]+s[15&t]+s[t>>>12&15]+s[t>>>8&15]+s[t>>>20&15]+s[t>>>16&15]+s[t>>>28&15]+s[t>>>24&15]+s[r>>>4&15]+s[15&r]+s[r>>>12&15]+s[r>>>8&15]+s[r>>>20&15]+s[r>>>16&15]+s[r>>>28&15]+s[r>>>24&15]+s[e>>>4&15]+s[15&e]+s[e>>>12&15]+s[e>>>8&15]+s[e>>>20&15]+s[e>>>16&15]+s[e>>>28&15]+s[e>>>24&15]+s[i>>>4&15]+s[15&i]+s[i>>>12&15]+s[i>>>8&15]+s[i>>>20&15]+s[i>>>16&15]+s[i>>>28&15]+s[i>>>24&15]},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&r,r>>>8&255,r>>>16&255,r>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),r=new Uint32Array(t);return r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},w.prototype.buffer=w.prototype.arrayBuffer,w.prototype.base64=function(){for(var t,r,e,i="",h=this.array(),s=0;s<15;)t=h[s++],r=h[s++],e=h[s++],i+=f[t>>>2]+f[63&(t<<4|r>>>4)]+f[63&(r<<2|e>>>6)]+f[63&e];return t=h[s],i+=f[t>>>2]+f[t<<4&63]+"=="},b.prototype=new w,b.prototype.finalize=function(){if(w.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();w.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),w.prototype.finalize.call(this)}};var A=function(){var t=d("hex");t.create=function(){return new w},t.update=function(r){return t.create().update(r)};for(var r=0;r<n.length;++r){var e=n[r];t[e]=d(e)}return t}();A.md5=A,A.md5.hmac=function(){var t=v("hex");t.create=function(t){return new b(t)},t.update=function(r,e){return t.create(r).update(e)};for(var r=0;r<n.length;++r){var e=n[r];t[e]=v(e)}return t}(),h?r.exports=A:i.md5=A}();var i=t(e.exports);export{i as default,i as md5};
@@ -8,7 +8,7 @@ var md5$1 = {exports: {}};
8
8
  * [js-md5]{@link https://github.com/emn178/js-md5}
9
9
  *
10
10
  * @namespace md5
11
- * @version 0.9.0
11
+ * @version 0.10.0
12
12
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
13
13
  * @copyright Chen, Yi-Cyuan 2014-2026
14
14
  * @license MIT
@@ -24,7 +24,7 @@ var md5$1 = {exports: {}};
24
24
  if (root.JS_MD5_NO_WINDOW) {
25
25
  WINDOW = false;
26
26
  }
27
- var WEB_WORKER = !WINDOW && typeof self === 'object';
27
+ var WEB_WORKER = typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;
28
28
  if (WEB_WORKER) {
29
29
  root = self;
30
30
  }
@@ -323,7 +323,7 @@ var md5$1 = {exports: {}};
323
323
  var result = formatMessage(message);
324
324
  message = result[0];
325
325
  var isString = result[1];
326
- var code, index = 0, i, length = message.length, blocks = this.blocks;
326
+ var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
327
327
  var buffer8 = this.buffer8;
328
328
 
329
329
  while (index < length) {
@@ -349,12 +349,18 @@ var md5$1 = {exports: {}};
349
349
  buffer8[i++] = 0xe0 | (code >>> 12);
350
350
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
351
351
  buffer8[i++] = 0x80 | (code & 0x3f);
352
- } else {
353
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
352
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
353
+ ++index;
354
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
354
355
  buffer8[i++] = 0xf0 | (code >>> 18);
355
356
  buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
356
357
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
357
358
  buffer8[i++] = 0x80 | (code & 0x3f);
359
+ } else {
360
+ // unpaired surrogate: U+FFFD
361
+ buffer8[i++] = 0xef;
362
+ buffer8[i++] = 0xbf;
363
+ buffer8[i++] = 0xbd;
358
364
  }
359
365
  }
360
366
  }
@@ -733,7 +739,7 @@ var md5$1 = {exports: {}};
733
739
  var i, result = formatMessage(key);
734
740
  key = result[0];
735
741
  if (result[1]) {
736
- var bytes = [], length = key.length, index = 0, code;
742
+ var bytes = [], length = key.length, index = 0, code, code2;
737
743
  for (i = 0; i < length; ++i) {
738
744
  code = key.charCodeAt(i);
739
745
  if (code < 0x80) {
@@ -745,12 +751,18 @@ var md5$1 = {exports: {}};
745
751
  bytes[index++] = (0xe0 | (code >>> 12));
746
752
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
747
753
  bytes[index++] = (0x80 | (code & 0x3f));
748
- } else {
749
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
754
+ } else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
755
+ ++i;
756
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
750
757
  bytes[index++] = (0xf0 | (code >>> 18));
751
758
  bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
752
759
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
753
760
  bytes[index++] = (0x80 | (code & 0x3f));
761
+ } else {
762
+ // unpaired surrogate: U+FFFD
763
+ bytes[index++] = 0xef;
764
+ bytes[index++] = 0xbf;
765
+ bytes[index++] = 0xbd;
754
766
  }
755
767
  }
756
768
  key = bytes;
@@ -13,7 +13,7 @@ var md5$1 = {exports: {}};
13
13
  * [js-md5]{@link https://github.com/emn178/js-md5}
14
14
  *
15
15
  * @namespace md5
16
- * @version 0.9.0
16
+ * @version 0.10.0
17
17
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
18
18
  * @copyright Chen, Yi-Cyuan 2014-2026
19
19
  * @license MIT
@@ -29,7 +29,7 @@ var md5$1 = {exports: {}};
29
29
  if (root.JS_MD5_NO_WINDOW) {
30
30
  WINDOW = false;
31
31
  }
32
- var WEB_WORKER = !WINDOW && typeof self === 'object';
32
+ var WEB_WORKER = typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;
33
33
  /* istanbul ignore next */
34
34
  var NODE_JS = !root.JS_MD5_NO_NODE_JS && !WINDOW && typeof process === 'object' && process.versions && process.versions.node;
35
35
  if (NODE_JS) {
@@ -359,7 +359,7 @@ var md5$1 = {exports: {}};
359
359
  var result = formatMessage(message);
360
360
  message = result[0];
361
361
  var isString = result[1];
362
- var code, index = 0, i, length = message.length, blocks = this.blocks;
362
+ var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
363
363
  var buffer8 = this.buffer8;
364
364
 
365
365
  while (index < length) {
@@ -385,12 +385,18 @@ var md5$1 = {exports: {}};
385
385
  buffer8[i++] = 0xe0 | (code >>> 12);
386
386
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
387
387
  buffer8[i++] = 0x80 | (code & 0x3f);
388
- } else {
389
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
388
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
389
+ ++index;
390
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
390
391
  buffer8[i++] = 0xf0 | (code >>> 18);
391
392
  buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
392
393
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
393
394
  buffer8[i++] = 0x80 | (code & 0x3f);
395
+ } else {
396
+ // unpaired surrogate: U+FFFD
397
+ buffer8[i++] = 0xef;
398
+ buffer8[i++] = 0xbf;
399
+ buffer8[i++] = 0xbd;
394
400
  }
395
401
  }
396
402
  }
@@ -769,7 +775,7 @@ var md5$1 = {exports: {}};
769
775
  var i, result = formatMessage(key);
770
776
  key = result[0];
771
777
  if (result[1]) {
772
- var bytes = [], length = key.length, index = 0, code;
778
+ var bytes = [], length = key.length, index = 0, code, code2;
773
779
  for (i = 0; i < length; ++i) {
774
780
  code = key.charCodeAt(i);
775
781
  if (code < 0x80) {
@@ -781,12 +787,18 @@ var md5$1 = {exports: {}};
781
787
  bytes[index++] = (0xe0 | (code >>> 12));
782
788
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
783
789
  bytes[index++] = (0x80 | (code & 0x3f));
784
- } else {
785
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
790
+ } else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
791
+ ++i;
792
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
786
793
  bytes[index++] = (0xf0 | (code >>> 18));
787
794
  bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
788
795
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
789
796
  bytes[index++] = (0x80 | (code & 0x3f));
797
+ } else {
798
+ // unpaired surrogate: U+FFFD
799
+ bytes[index++] = 0xef;
800
+ bytes[index++] = 0xbf;
801
+ bytes[index++] = 0xbd;
790
802
  }
791
803
  }
792
804
  key = bytes;
@@ -13,7 +13,7 @@ var md5$1 = {exports: {}};
13
13
  * [js-md5]{@link https://github.com/emn178/js-md5}
14
14
  *
15
15
  * @namespace md5
16
- * @version 0.9.0
16
+ * @version 0.10.0
17
17
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
18
18
  * @copyright Chen, Yi-Cyuan 2014-2026
19
19
  * @license MIT
@@ -29,7 +29,7 @@ var md5$1 = {exports: {}};
29
29
  if (root.JS_MD5_NO_WINDOW) {
30
30
  WINDOW = false;
31
31
  }
32
- var WEB_WORKER = !WINDOW && typeof self === 'object';
32
+ var WEB_WORKER = typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' && self instanceof WorkerGlobalScope;
33
33
  /* istanbul ignore next */
34
34
  var NODE_JS = !root.JS_MD5_NO_NODE_JS && !WINDOW && typeof process === 'object' && process.versions && process.versions.node;
35
35
  if (NODE_JS) {
@@ -381,7 +381,7 @@ var md5$1 = {exports: {}};
381
381
  var result = formatMessage(message);
382
382
  message = result[0];
383
383
  var isString = result[1];
384
- var code, index = 0, i, length = message.length, blocks = this.blocks;
384
+ var code, code2, index = 0, i, length = message.length, blocks = this.blocks;
385
385
  var buffer8 = this.buffer8;
386
386
 
387
387
  while (index < length) {
@@ -407,12 +407,18 @@ var md5$1 = {exports: {}};
407
407
  buffer8[i++] = 0xe0 | (code >>> 12);
408
408
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
409
409
  buffer8[i++] = 0x80 | (code & 0x3f);
410
- } else {
411
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
410
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
411
+ ++index;
412
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
412
413
  buffer8[i++] = 0xf0 | (code >>> 18);
413
414
  buffer8[i++] = 0x80 | ((code >>> 12) & 0x3f);
414
415
  buffer8[i++] = 0x80 | ((code >>> 6) & 0x3f);
415
416
  buffer8[i++] = 0x80 | (code & 0x3f);
417
+ } else {
418
+ // unpaired surrogate: U+FFFD
419
+ buffer8[i++] = 0xef;
420
+ buffer8[i++] = 0xbf;
421
+ buffer8[i++] = 0xbd;
416
422
  }
417
423
  }
418
424
  } else {
@@ -427,12 +433,18 @@ var md5$1 = {exports: {}};
427
433
  blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3];
428
434
  blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
429
435
  blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
430
- } else {
431
- code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
436
+ } else if (code < 0xdc00 && (code2 = message.charCodeAt(index + 1)) >= 0xdc00 && code2 < 0xe000) {
437
+ ++index;
438
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
432
439
  blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3];
433
440
  blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3];
434
441
  blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3];
435
442
  blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
443
+ } else {
444
+ // unpaired surrogate: U+FFFD
445
+ blocks[i >>> 2] |= 0xef << SHIFT[i++ & 3];
446
+ blocks[i >>> 2] |= 0xbf << SHIFT[i++ & 3];
447
+ blocks[i >>> 2] |= 0xbd << SHIFT[i++ & 3];
436
448
  }
437
449
  }
438
450
  }
@@ -815,7 +827,7 @@ var md5$1 = {exports: {}};
815
827
  var i, result = formatMessage(key);
816
828
  key = result[0];
817
829
  if (result[1]) {
818
- var bytes = [], length = key.length, index = 0, code;
830
+ var bytes = [], length = key.length, index = 0, code, code2;
819
831
  for (i = 0; i < length; ++i) {
820
832
  code = key.charCodeAt(i);
821
833
  if (code < 0x80) {
@@ -827,12 +839,18 @@ var md5$1 = {exports: {}};
827
839
  bytes[index++] = (0xe0 | (code >>> 12));
828
840
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
829
841
  bytes[index++] = (0x80 | (code & 0x3f));
830
- } else {
831
- code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff));
842
+ } else if (code < 0xdc00 && (code2 = key.charCodeAt(i + 1)) >= 0xdc00 && code2 < 0xe000) {
843
+ ++i;
844
+ code = 0x10000 + (((code & 0x3ff) << 10) | (code2 & 0x3ff));
832
845
  bytes[index++] = (0xf0 | (code >>> 18));
833
846
  bytes[index++] = (0x80 | ((code >>> 12) & 0x3f));
834
847
  bytes[index++] = (0x80 | ((code >>> 6) & 0x3f));
835
848
  bytes[index++] = (0x80 | (code & 0x3f));
849
+ } else {
850
+ // unpaired surrogate: U+FFFD
851
+ bytes[index++] = 0xef;
852
+ bytes[index++] = 0xbf;
853
+ bytes[index++] = 0xbd;
836
854
  }
837
855
  }
838
856
  key = bytes;
package/jsdoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "templates": {
3
+ "default": {
4
+ "includeDate": false
5
+ }
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-md5",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.",
5
5
  "main": "src/md5.js",
6
6
  "module": "build/md5.mjs",
@@ -35,23 +35,22 @@
35
35
  },
36
36
  "types": "./index.d.ts",
37
37
  "devDependencies": {
38
- "@rollup/plugin-commonjs": "^28.0.5",
38
+ "@rollup/plugin-commonjs": "^29.0.3",
39
39
  "@rollup/plugin-terser": "^1.0.0",
40
40
  "expect.js": "~0.3.1",
41
41
  "jsdoc": "~4.0.2",
42
- "mocha": "~10.2.0",
43
- "nyc": "^15.1.0",
42
+ "mocha": "^11.7.6",
43
+ "nyc": "^18.0.0",
44
44
  "requirejs": "^2.1.22",
45
45
  "rollup": "^4.43.0",
46
46
  "tiny-worker": "^2.3.0"
47
47
  },
48
48
  "scripts": {
49
- "test": "npm run compress && nyc mocha tests/node-test.js && node tests/build-test.js && node tests/esm-test.mjs",
49
+ "test": "nyc mocha tests/node-test.js && node tests/build-test.js && node tests/esm-test.mjs",
50
50
  "report": "nyc --reporter=html --reporter=text mocha tests/node-test.js",
51
- "coveralls": "nyc report --reporter=text-lcov | coveralls",
52
- "doc": "rm -rf doc;jsdoc src README.md -d doc",
53
- "compress": "rollup -c",
54
- "build": "npm run-script compress;npm run-script doc"
51
+ "coverage": "nyc report --reporter=text-lcov > coverage.lcov",
52
+ "doc": "rm -rf doc && jsdoc -c jsdoc.json src README.md -d doc",
53
+ "build": "rollup -c && npm run doc"
55
54
  },
56
55
  "repository": {
57
56
  "type": "git",
@@ -78,5 +77,11 @@
78
77
  "browser": {
79
78
  "crypto": false,
80
79
  "buffer": false
80
+ },
81
+ "overrides": {
82
+ "diff": "^8.0.3",
83
+ "glob": "^14.0.2",
84
+ "minimatch": "^11.0.1",
85
+ "serialize-javascript": "^7.1.3"
81
86
  }
82
87
  }