3 lines
62 KiB
JavaScript
Raw Permalink Normal View History

2025-04-19 15:38:48 +08:00
/*! For license information please see index.min.js.LICENSE */
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Cids=n():e.Cids=n()}(window,(function(){return function(e){var n={};function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(i,r,function(n){return e[n]}.bind(null,r));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=6)}([function(e,n,t){"use strict";(function(e){var i=t(9),r=t(10),o=t(11);function s(){return k.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,n){if(s()<n)throw new RangeError("Invalid typed array length");return k.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(n)).__proto__=k.prototype:(null===e&&(e=new k(n)),e.length=n),e}function k(e,n,t){if(!(k.TYPED_ARRAY_SUPPORT||this instanceof k))return new k(e,n,t);if("number"==typeof e){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,n,t)}function u(e,n,t,i){if("number"==typeof n)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&n instanceof ArrayBuffer?function(e,n,t,i){if(n.byteLength,t<0||n.byteLength<t)throw new RangeError("'offset' is out of bounds");if(n.byteLength<t+(i||0))throw new RangeError("'length' is out of bounds");n=void 0===t&&void 0===i?new Uint8Array(n):void 0===i?new Uint8Array(n,t):new Uint8Array(n,t,i);k.TYPED_ARRAY_SUPPORT?(e=n).__proto__=k.prototype:e=c(e,n);return e}(e,n,t,i):"string"==typeof n?function(e,n,t){"string"==typeof t&&""!==t||(t="utf8");if(!k.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var i=0|b(n,t),r=(e=a(e,i)).write(n,t);r!==i&&(e=e.slice(0,r));return e}(e,n,t):function(e,n){if(k.isBuffer(n)){var t=0|h(n.length);return 0===(e=a(e,t)).length?e:(n.copy(e,0,0,t),e)}if(n){if("undefined"!=typeof ArrayBuffer&&n.buffer instanceof ArrayBuffer||"length"in n)return"number"!=typeof n.length||(i=n.length)!=i?a(e,0):c(e,n);if("Buffer"===n.type&&o(n.data))return c(e,n.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,n)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,n){if(f(n),e=a(e,n<0?0:0|h(n)),!k.TYPED_ARRAY_SUPPORT)for(var t=0;t<n;++t)e[t]=0;return e}function c(e,n){var t=n.length<0?0:0|h(n.length);e=a(e,t);for(var i=0;i<t;i+=1)e[i]=255&n[i];return e}function h(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function b(e,n){if(k.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(e).length;default:if(i)return L(e).length;n=(""+n).toLowerCase(),i=!0}}function S(e,n,t){var i=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return""
//# sourceMappingURL=index.min.js.map