chunk-6Y2MJOYY.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. import {
  2. __commonJS,
  3. __esm,
  4. __export,
  5. __require,
  6. __toCommonJS,
  7. init_define_APP_INFO
  8. } from "./chunk-XY75H3MP.js";
  9. // browser-external:crypto
  10. var crypto_exports = {};
  11. __export(crypto_exports, {
  12. default: () => crypto_default
  13. });
  14. var crypto_default;
  15. var init_crypto = __esm({
  16. "browser-external:crypto"() {
  17. init_define_APP_INFO();
  18. crypto_default = new Proxy({}, {
  19. get() {
  20. throw new Error('Module "crypto" has been externalized for browser compatibility and cannot be accessed in client code.');
  21. }
  22. });
  23. }
  24. });
  25. // node_modules/crypto-js/core.js
  26. var require_core = __commonJS({
  27. "node_modules/crypto-js/core.js"(exports, module) {
  28. init_define_APP_INFO();
  29. (function(root, factory) {
  30. if (typeof exports === "object") {
  31. module.exports = exports = factory();
  32. } else if (typeof define === "function" && define.amd) {
  33. define([], factory);
  34. } else {
  35. root.CryptoJS = factory();
  36. }
  37. })(exports, function() {
  38. var CryptoJS = CryptoJS || function(Math2, undefined) {
  39. var crypto;
  40. if (typeof window !== "undefined" && window.crypto) {
  41. crypto = window.crypto;
  42. }
  43. if (typeof self !== "undefined" && self.crypto) {
  44. crypto = self.crypto;
  45. }
  46. if (typeof globalThis !== "undefined" && globalThis.crypto) {
  47. crypto = globalThis.crypto;
  48. }
  49. if (!crypto && typeof window !== "undefined" && window.msCrypto) {
  50. crypto = window.msCrypto;
  51. }
  52. if (!crypto && typeof global !== "undefined" && global.crypto) {
  53. crypto = global.crypto;
  54. }
  55. if (!crypto && typeof __require === "function") {
  56. try {
  57. crypto = (init_crypto(), __toCommonJS(crypto_exports));
  58. } catch (err) {
  59. }
  60. }
  61. var cryptoSecureRandomInt = function() {
  62. if (crypto) {
  63. if (typeof crypto.getRandomValues === "function") {
  64. try {
  65. return crypto.getRandomValues(new Uint32Array(1))[0];
  66. } catch (err) {
  67. }
  68. }
  69. if (typeof crypto.randomBytes === "function") {
  70. try {
  71. return crypto.randomBytes(4).readInt32LE();
  72. } catch (err) {
  73. }
  74. }
  75. }
  76. throw new Error("Native crypto module could not be used to get secure random number.");
  77. };
  78. var create = Object.create || function() {
  79. function F() {
  80. }
  81. return function(obj) {
  82. var subtype;
  83. F.prototype = obj;
  84. subtype = new F();
  85. F.prototype = null;
  86. return subtype;
  87. };
  88. }();
  89. var C = {};
  90. var C_lib = C.lib = {};
  91. var Base = C_lib.Base = function() {
  92. return {
  93. extend: function(overrides) {
  94. var subtype = create(this);
  95. if (overrides) {
  96. subtype.mixIn(overrides);
  97. }
  98. if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
  99. subtype.init = function() {
  100. subtype.$super.init.apply(this, arguments);
  101. };
  102. }
  103. subtype.init.prototype = subtype;
  104. subtype.$super = this;
  105. return subtype;
  106. },
  107. create: function() {
  108. var instance = this.extend();
  109. instance.init.apply(instance, arguments);
  110. return instance;
  111. },
  112. init: function() {
  113. },
  114. mixIn: function(properties) {
  115. for (var propertyName in properties) {
  116. if (properties.hasOwnProperty(propertyName)) {
  117. this[propertyName] = properties[propertyName];
  118. }
  119. }
  120. if (properties.hasOwnProperty("toString")) {
  121. this.toString = properties.toString;
  122. }
  123. },
  124. clone: function() {
  125. return this.init.prototype.extend(this);
  126. }
  127. };
  128. }();
  129. var WordArray = C_lib.WordArray = Base.extend({
  130. init: function(words, sigBytes) {
  131. words = this.words = words || [];
  132. if (sigBytes != undefined) {
  133. this.sigBytes = sigBytes;
  134. } else {
  135. this.sigBytes = words.length * 4;
  136. }
  137. },
  138. toString: function(encoder) {
  139. return (encoder || Hex).stringify(this);
  140. },
  141. concat: function(wordArray) {
  142. var thisWords = this.words;
  143. var thatWords = wordArray.words;
  144. var thisSigBytes = this.sigBytes;
  145. var thatSigBytes = wordArray.sigBytes;
  146. this.clamp();
  147. if (thisSigBytes % 4) {
  148. for (var i = 0; i < thatSigBytes; i++) {
  149. var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  150. thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
  151. }
  152. } else {
  153. for (var j = 0; j < thatSigBytes; j += 4) {
  154. thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
  155. }
  156. }
  157. this.sigBytes += thatSigBytes;
  158. return this;
  159. },
  160. clamp: function() {
  161. var words = this.words;
  162. var sigBytes = this.sigBytes;
  163. words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
  164. words.length = Math2.ceil(sigBytes / 4);
  165. },
  166. clone: function() {
  167. var clone = Base.clone.call(this);
  168. clone.words = this.words.slice(0);
  169. return clone;
  170. },
  171. random: function(nBytes) {
  172. var words = [];
  173. for (var i = 0; i < nBytes; i += 4) {
  174. words.push(cryptoSecureRandomInt());
  175. }
  176. return new WordArray.init(words, nBytes);
  177. }
  178. });
  179. var C_enc = C.enc = {};
  180. var Hex = C_enc.Hex = {
  181. stringify: function(wordArray) {
  182. var words = wordArray.words;
  183. var sigBytes = wordArray.sigBytes;
  184. var hexChars = [];
  185. for (var i = 0; i < sigBytes; i++) {
  186. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  187. hexChars.push((bite >>> 4).toString(16));
  188. hexChars.push((bite & 15).toString(16));
  189. }
  190. return hexChars.join("");
  191. },
  192. parse: function(hexStr) {
  193. var hexStrLength = hexStr.length;
  194. var words = [];
  195. for (var i = 0; i < hexStrLength; i += 2) {
  196. words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
  197. }
  198. return new WordArray.init(words, hexStrLength / 2);
  199. }
  200. };
  201. var Latin1 = C_enc.Latin1 = {
  202. stringify: function(wordArray) {
  203. var words = wordArray.words;
  204. var sigBytes = wordArray.sigBytes;
  205. var latin1Chars = [];
  206. for (var i = 0; i < sigBytes; i++) {
  207. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  208. latin1Chars.push(String.fromCharCode(bite));
  209. }
  210. return latin1Chars.join("");
  211. },
  212. parse: function(latin1Str) {
  213. var latin1StrLength = latin1Str.length;
  214. var words = [];
  215. for (var i = 0; i < latin1StrLength; i++) {
  216. words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
  217. }
  218. return new WordArray.init(words, latin1StrLength);
  219. }
  220. };
  221. var Utf8 = C_enc.Utf8 = {
  222. stringify: function(wordArray) {
  223. try {
  224. return decodeURIComponent(escape(Latin1.stringify(wordArray)));
  225. } catch (e) {
  226. throw new Error("Malformed UTF-8 data");
  227. }
  228. },
  229. parse: function(utf8Str) {
  230. return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
  231. }
  232. };
  233. var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
  234. reset: function() {
  235. this._data = new WordArray.init();
  236. this._nDataBytes = 0;
  237. },
  238. _append: function(data) {
  239. if (typeof data == "string") {
  240. data = Utf8.parse(data);
  241. }
  242. this._data.concat(data);
  243. this._nDataBytes += data.sigBytes;
  244. },
  245. _process: function(doFlush) {
  246. var processedWords;
  247. var data = this._data;
  248. var dataWords = data.words;
  249. var dataSigBytes = data.sigBytes;
  250. var blockSize = this.blockSize;
  251. var blockSizeBytes = blockSize * 4;
  252. var nBlocksReady = dataSigBytes / blockSizeBytes;
  253. if (doFlush) {
  254. nBlocksReady = Math2.ceil(nBlocksReady);
  255. } else {
  256. nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
  257. }
  258. var nWordsReady = nBlocksReady * blockSize;
  259. var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
  260. if (nWordsReady) {
  261. for (var offset = 0; offset < nWordsReady; offset += blockSize) {
  262. this._doProcessBlock(dataWords, offset);
  263. }
  264. processedWords = dataWords.splice(0, nWordsReady);
  265. data.sigBytes -= nBytesReady;
  266. }
  267. return new WordArray.init(processedWords, nBytesReady);
  268. },
  269. clone: function() {
  270. var clone = Base.clone.call(this);
  271. clone._data = this._data.clone();
  272. return clone;
  273. },
  274. _minBufferSize: 0
  275. });
  276. var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
  277. cfg: Base.extend(),
  278. init: function(cfg) {
  279. this.cfg = this.cfg.extend(cfg);
  280. this.reset();
  281. },
  282. reset: function() {
  283. BufferedBlockAlgorithm.reset.call(this);
  284. this._doReset();
  285. },
  286. update: function(messageUpdate) {
  287. this._append(messageUpdate);
  288. this._process();
  289. return this;
  290. },
  291. finalize: function(messageUpdate) {
  292. if (messageUpdate) {
  293. this._append(messageUpdate);
  294. }
  295. var hash = this._doFinalize();
  296. return hash;
  297. },
  298. blockSize: 512 / 32,
  299. _createHelper: function(hasher) {
  300. return function(message, cfg) {
  301. return new hasher.init(cfg).finalize(message);
  302. };
  303. },
  304. _createHmacHelper: function(hasher) {
  305. return function(message, key) {
  306. return new C_algo.HMAC.init(hasher, key).finalize(message);
  307. };
  308. }
  309. });
  310. var C_algo = C.algo = {};
  311. return C;
  312. }(Math);
  313. return CryptoJS;
  314. });
  315. }
  316. });
  317. export {
  318. require_core
  319. };
  320. //# sourceMappingURL=chunk-6Y2MJOYY.js.map