(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["ofd"] = factory(); else root["ofd"] = factory(); })((typeof self !== 'undefined' ? self : this), function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "fae3"); /******/ }) /************************************************************************/ /******/ ({ /***/ "0083": /***/ (function(module, exports, __webpack_require__) { "use strict"; /*globals Promise */ var JSZipUtils = {}; // just use the responseText with xhr1, response with xhr2. // The transformation doesn't throw away high-order byte (with responseText) // because JSZip handles that case. If not used with JSZip, you may need to // do it, see https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data JSZipUtils._getBinaryFromXHR = function (xhr) { // for xhr.responseText, the 0xFF mask is applied by JSZip return xhr.response || xhr.responseText; }; // taken from jQuery function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject("Microsoft.XMLHTTP"); } catch( e ) {} } // Create the request object var createXHR = (typeof window !== "undefined" && window.ActiveXObject) ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; /** * @param {string} path The path to the resource to GET. * @param {function|{callback: function, progress: function}} options * @return {Promise|undefined} If no callback is passed then a promise is returned */ JSZipUtils.getBinaryContent = function (path, options) { var promise, resolve, reject; var callback; if (!options) { options = {}; } // backward compatible callback if (typeof options === "function") { callback = options; options = {}; } else if (typeof options.callback === 'function') { // callback inside options object callback = options.callback; } if (!callback && typeof Promise !== "undefined") { promise = new Promise(function (_resolve, _reject) { resolve = _resolve; reject = _reject; }); } else { resolve = function (data) { callback(null, data); }; reject = function (err) { callback(err, null); }; } /* * Here is the tricky part : getting the data. * In firefox/chrome/opera/... setting the mimeType to 'text/plain; charset=x-user-defined' * is enough, the result is in the standard xhr.responseText. * cf https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Receiving_binary_data_in_older_browsers * In IE <= 9, we must use (the IE only) attribute responseBody * (for binary data, its content is different from responseText). * In IE 10, the 'charset=x-user-defined' trick doesn't work, only the * responseType will work : * http://msdn.microsoft.com/en-us/library/ie/hh673569%28v=vs.85%29.aspx#Binary_Object_upload_and_download * * I'd like to use jQuery to avoid this XHR madness, but it doesn't support * the responseType attribute : http://bugs.jquery.com/ticket/11461 */ try { var xhr = createXHR(); xhr.open('GET', path, true); // recent browsers if ("responseType" in xhr) { xhr.responseType = "arraybuffer"; } // older browser if(xhr.overrideMimeType) { xhr.overrideMimeType("text/plain; charset=x-user-defined"); } xhr.onreadystatechange = function (event) { // use `xhr` and not `this`... thanks IE if (xhr.readyState === 4) { if (xhr.status === 200 || xhr.status === 0) { try { resolve(JSZipUtils._getBinaryFromXHR(xhr)); } catch(err) { reject(new Error(err)); } } else { reject(new Error("Ajax error for " + path + " : " + this.status + " " + this.statusText)); } } }; if(options.progress) { xhr.onprogress = function(e) { options.progress({ path: path, originalEvent: e, percent: e.loaded / e.total * 100, loaded: e.loaded, total: e.total }); }; } xhr.send(); } catch (e) { reject(new Error(e), null); } // returns a promise or undefined depending on whether a callback was // provided return promise; }; // export module.exports = JSZipUtils; // enforcing Stuk's coding style // vim: set shiftwidth=4 softtabstop=4: /***/ }), /***/ "0094": /***/ (function(module, exports, __webpack_require__) { "use strict"; var FREEZING = __webpack_require__("bb2f"); var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var defineBuiltIns = __webpack_require__("6964"); var InternalMetadataModule = __webpack_require__("f183"); var collection = __webpack_require__("6d61"); var collectionWeak = __webpack_require__("acac"); var isObject = __webpack_require__("861d"); var enforceInternalState = __webpack_require__("69f3").enforce; var fails = __webpack_require__("d039"); var NATIVE_WEAK_MAP = __webpack_require__("cdce"); var $Object = Object; // eslint-disable-next-line es/no-array-isarray -- safe var isArray = Array.isArray; // eslint-disable-next-line es/no-object-isextensible -- safe var isExtensible = $Object.isExtensible; // eslint-disable-next-line es/no-object-isfrozen -- safe var isFrozen = $Object.isFrozen; // eslint-disable-next-line es/no-object-issealed -- safe var isSealed = $Object.isSealed; // eslint-disable-next-line es/no-object-freeze -- safe var freeze = $Object.freeze; // eslint-disable-next-line es/no-object-seal -- safe var seal = $Object.seal; var IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis; var InternalWeakMap; var wrapper = function (init) { return function WeakMap() { return init(this, arguments.length ? arguments[0] : undefined); }; }; // `WeakMap` constructor // https://tc39.es/ecma262/#sec-weakmap-constructor var $WeakMap = collection('WeakMap', wrapper, collectionWeak); var WeakMapPrototype = $WeakMap.prototype; var nativeSet = uncurryThis(WeakMapPrototype.set); // Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them var hasMSEdgeFreezingBug = function () { return FREEZING && fails(function () { var frozenArray = freeze([]); nativeSet(new $WeakMap(), frozenArray, 1); return !isFrozen(frozenArray); }); }; // IE11 WeakMap frozen keys fix // We can't use feature detection because it crash some old IE builds // https://github.com/zloirock/core-js/issues/485 if (NATIVE_WEAK_MAP) if (IS_IE11) { InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true); InternalMetadataModule.enable(); var nativeDelete = uncurryThis(WeakMapPrototype['delete']); var nativeHas = uncurryThis(WeakMapPrototype.has); var nativeGet = uncurryThis(WeakMapPrototype.get); defineBuiltIns(WeakMapPrototype, { 'delete': function (key) { if (isObject(key) && !isExtensible(key)) { var state = enforceInternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeDelete(this, key) || state.frozen['delete'](key); } return nativeDelete(this, key); }, has: function has(key) { if (isObject(key) && !isExtensible(key)) { var state = enforceInternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeHas(this, key) || state.frozen.has(key); } return nativeHas(this, key); }, get: function get(key) { if (isObject(key) && !isExtensible(key)) { var state = enforceInternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key); } return nativeGet(this, key); }, set: function set(key, value) { if (isObject(key) && !isExtensible(key)) { var state = enforceInternalState(this); if (!state.frozen) state.frozen = new InternalWeakMap(); nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value); } else nativeSet(this, key, value); return this; } }); // Chakra Edge frozen keys fix } else if (hasMSEdgeFreezingBug()) { defineBuiltIns(WeakMapPrototype, { set: function set(key, value) { var arrayIntegrityLevel; if (isArray(key)) { if (isFrozen(key)) arrayIntegrityLevel = freeze; else if (isSealed(key)) arrayIntegrityLevel = seal; } nativeSet(this, key, value); if (arrayIntegrityLevel) arrayIntegrityLevel(key); return this; } }); } /***/ }), /***/ "00ee": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ "015d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var Uint8Array = globalThis.Uint8Array; var SyntaxError = globalThis.SyntaxError; var min = Math.min; var stringMatch = uncurryThis(''.match); module.exports = function (string, into) { var stringLength = string.length; if (stringLength % 2 !== 0) throw new SyntaxError('String should be an even number of characters'); var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2; var bytes = into || new Uint8Array(maxLength); var segments = stringMatch(string, /.{2}/g); var written = 0; for (; written < maxLength; written++) { var result = +('0x' + segments[written] + '0'); // eslint-disable-next-line no-self-compare -- NaN check if (result !== result) { throw new SyntaxError('String should only contain hex characters'); } bytes[written] = result >> 4; } return { bytes: bytes, read: written << 1 }; }; /***/ }), /***/ "01b4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var Queue = function () { this.head = null; this.tail = null; }; Queue.prototype = { add: function (item) { var entry = { item: item, next: null }; var tail = this.tail; if (tail) tail.next = entry; else this.head = entry; this.tail = entry; }, get: function () { var entry = this.head; if (entry) { var next = this.head = entry.next; if (next === null) this.tail = null; return entry.item; } } }; module.exports = Queue; /***/ }), /***/ "0366": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("4625"); var aCallable = __webpack_require__("59ed"); var NATIVE_BIND = __webpack_require__("40d5"); var bind = uncurryThis(uncurryThis.bind); // optional / simple context binding module.exports = function (fn, that) { aCallable(fn); return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ "04f8": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__("1212"); var fails = __webpack_require__("d039"); var globalThis = __webpack_require__("cfe9"); var $String = globalThis.String; // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol('symbol detection'); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, // of course, fail. return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; }); /***/ }), /***/ "057f": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-object-getownpropertynames -- safe */ var classof = __webpack_require__("c6b6"); var toIndexedObject = __webpack_require__("fc6a"); var $getOwnPropertyNames = __webpack_require__("241c").f; var arraySlice = __webpack_require__("f36a"); var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return $getOwnPropertyNames(it); } catch (error) { return arraySlice(windowNames); } }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window module.exports.f = function getOwnPropertyNames(it) { return windowNames && classof(it) === 'Window' ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it)); }; /***/ }), /***/ "06cf": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var call = __webpack_require__("c65b"); var propertyIsEnumerableModule = __webpack_require__("d1e7"); var createPropertyDescriptor = __webpack_require__("5c6c"); var toIndexedObject = __webpack_require__("fc6a"); var toPropertyKey = __webpack_require__("a04b"); var hasOwn = __webpack_require__("1a2d"); var IE8_DOM_DEFINE = __webpack_require__("0cfb"); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; /***/ }), /***/ "07ac": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $values = __webpack_require__("6f53").values; // `Object.values` method // https://tc39.es/ecma262/#sec-object.values $({ target: 'Object', stat: true }, { values: function values(O) { return $values(O); } }); /***/ }), /***/ "07fa": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toLength = __webpack_require__("50c4"); // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike module.exports = function (obj) { return toLength(obj.length); }; /***/ }), /***/ "094a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); // eslint-disable-next-line es/no-map -- safe var MapPrototype = Map.prototype; module.exports = { // eslint-disable-next-line es/no-map -- safe Map: Map, set: uncurryThis(MapPrototype.set), get: uncurryThis(MapPrototype.get), has: uncurryThis(MapPrototype.has), remove: uncurryThis(MapPrototype['delete']), proto: MapPrototype }; /***/ }), /***/ "0b25": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIntegerOrInfinity = __webpack_require__("5926"); var toLength = __webpack_require__("50c4"); var $RangeError = RangeError; // `ToIndex` abstract operation // https://tc39.es/ecma262/#sec-toindex module.exports = function (it) { if (it === undefined) return 0; var number = toIntegerOrInfinity(it); var length = toLength(number); if (number !== length) throw new $RangeError('Wrong length or index'); return length; }; /***/ }), /***/ "0b42": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isArray = __webpack_require__("e8b5"); var isConstructor = __webpack_require__("68ee"); var isObject = __webpack_require__("861d"); var wellKnownSymbol = __webpack_require__("b622"); var SPECIES = wellKnownSymbol('species'); var $Array = Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? $Array : C; }; /***/ }), /***/ "0b43": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_SYMBOL = __webpack_require__("04f8"); /* eslint-disable es/no-symbol -- safe */ module.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor; /***/ }), /***/ "0c47": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var setToStringTag = __webpack_require__("d44e"); // JSON[@@toStringTag] property // https://tc39.es/ecma262/#sec-json-@@tostringtag setToStringTag(globalThis.JSON, 'JSON', true); /***/ }), /***/ "0ccb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var toLength = __webpack_require__("50c4"); var toString = __webpack_require__("577e"); var $repeat = __webpack_require__("1148"); var requireObjectCoercible = __webpack_require__("1d80"); var repeat = uncurryThis($repeat); var stringSlice = uncurryThis(''.slice); var ceil = Math.ceil; // `String.prototype.{ padStart, padEnd }` methods implementation var createMethod = function (IS_END) { return function ($this, maxLength, fillString) { var S = toString(requireObjectCoercible($this)); var intMaxLength = toLength(maxLength); var stringLength = S.length; if (intMaxLength <= stringLength) return S; var fillStr = fillString === undefined ? ' ' : toString(fillString); var fillLen, stringFiller; if (fillStr === '') return S; fillLen = intMaxLength - stringLength; stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length)); if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen); return IS_END ? S + stringFiller : stringFiller + S; }; }; module.exports = { // `String.prototype.padStart` method // https://tc39.es/ecma262/#sec-string.prototype.padstart start: createMethod(false), // `String.prototype.padEnd` method // https://tc39.es/ecma262/#sec-string.prototype.padend end: createMethod(true) }; /***/ }), /***/ "0cfb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var fails = __webpack_require__("d039"); var createElement = __webpack_require__("cc12"); // Thanks to IE8 for its funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a !== 7; }); /***/ }), /***/ "0d26": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var $Error = Error; var replace = uncurryThis(''.replace); var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd'); // eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/; var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST); module.exports = function (stack, dropEntries) { if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) { while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, ''); } return stack; }; /***/ }), /***/ "0d51": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $String = String; module.exports = function (argument) { try { return $String(argument); } catch (error) { return 'Object'; } }; /***/ }), /***/ "10d1": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("0094"); /***/ }), /***/ "10d11": /***/ (function(module, exports) { /* eslint-disable no-bitwise, no-mixed-operators, complexity */ const DECRYPT = 0 const CBC = 0 const ROUND = 32 const BLOCK = 16 const Sbox = [ 0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05, 0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99, 0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0xed, 0xcf, 0xac, 0x62, 0xe4, 0xb3, 0x1c, 0xa9, 0xc9, 0x08, 0xe8, 0x95, 0x80, 0xdf, 0x94, 0xfa, 0x75, 0x8f, 0x3f, 0xa6, 0x47, 0x07, 0xa7, 0xfc, 0xf3, 0x73, 0x17, 0xba, 0x83, 0x59, 0x3c, 0x19, 0xe6, 0x85, 0x4f, 0xa8, 0x68, 0x6b, 0x81, 0xb2, 0x71, 0x64, 0xda, 0x8b, 0xf8, 0xeb, 0x0f, 0x4b, 0x70, 0x56, 0x9d, 0x35, 0x1e, 0x24, 0x0e, 0x5e, 0x63, 0x58, 0xd1, 0xa2, 0x25, 0x22, 0x7c, 0x3b, 0x01, 0x21, 0x78, 0x87, 0xd4, 0x00, 0x46, 0x57, 0x9f, 0xd3, 0x27, 0x52, 0x4c, 0x36, 0x02, 0xe7, 0xa0, 0xc4, 0xc8, 0x9e, 0xea, 0xbf, 0x8a, 0xd2, 0x40, 0xc7, 0x38, 0xb5, 0xa3, 0xf7, 0xf2, 0xce, 0xf9, 0x61, 0x15, 0xa1, 0xe0, 0xae, 0x5d, 0xa4, 0x9b, 0x34, 0x1a, 0x55, 0xad, 0x93, 0x32, 0x30, 0xf5, 0x8c, 0xb1, 0xe3, 0x1d, 0xf6, 0xe2, 0x2e, 0x82, 0x66, 0xca, 0x60, 0xc0, 0x29, 0x23, 0xab, 0x0d, 0x53, 0x4e, 0x6f, 0xd5, 0xdb, 0x37, 0x45, 0xde, 0xfd, 0x8e, 0x2f, 0x03, 0xff, 0x6a, 0x72, 0x6d, 0x6c, 0x5b, 0x51, 0x8d, 0x1b, 0xaf, 0x92, 0xbb, 0xdd, 0xbc, 0x7f, 0x11, 0xd9, 0x5c, 0x41, 0x1f, 0x10, 0x5a, 0xd8, 0x0a, 0xc1, 0x31, 0x88, 0xa5, 0xcd, 0x7b, 0xbd, 0x2d, 0x74, 0xd0, 0x12, 0xb8, 0xe5, 0xb4, 0xb0, 0x89, 0x69, 0x97, 0x4a, 0x0c, 0x96, 0x77, 0x7e, 0x65, 0xb9, 0xf1, 0x09, 0xc5, 0x6e, 0xc6, 0x84, 0x18, 0xf0, 0x7d, 0xec, 0x3a, 0xdc, 0x4d, 0x20, 0x79, 0xee, 0x5f, 0x3e, 0xd7, 0xcb, 0x39, 0x48 ] const CK = [ 0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269, 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9, 0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249, 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9, 0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229, 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299, 0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209, 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279 ] /** * 16 进制串转字节数组 */ function hexToArray(str) { const arr = [] for (let i = 0, len = str.length; i < len; i += 2) { arr.push(parseInt(str.substr(i, 2), 16)) } return arr } /** * 字节数组转 16 进制串 */ function ArrayToHex(arr) { return arr.map(item => { item = item.toString(16) return item.length === 1 ? '0' + item : item }).join('') } /** * utf8 串转字节数组 */ function utf8ToArray(str) { const arr = [] for (let i = 0, len = str.length; i < len; i++) { const point = str.codePointAt(i) if (point <= 0x007f) { // 单字节,标量值:00000000 00000000 0zzzzzzz arr.push(point) } else if (point <= 0x07ff) { // 双字节,标量值:00000000 00000yyy yyzzzzzz arr.push(0xc0 | (point >>> 6)) // 110yyyyy(0xc0-0xdf) arr.push(0x80 | (point & 0x3f)) // 10zzzzzz(0x80-0xbf) } else if (point <= 0xD7FF || (point >= 0xE000 && point <= 0xFFFF)) { // 三字节:标量值:00000000 xxxxyyyy yyzzzzzz arr.push(0xe0 | (point >>> 12)) // 1110xxxx(0xe0-0xef) arr.push(0x80 | ((point >>> 6) & 0x3f)) // 10yyyyyy(0x80-0xbf) arr.push(0x80 | (point & 0x3f)) // 10zzzzzz(0x80-0xbf) } else if (point >= 0x010000 && point <= 0x10FFFF) { // 四字节:标量值:000wwwxx xxxxyyyy yyzzzzzz i++ arr.push((0xf0 | (point >>> 18) & 0x1c)) // 11110www(0xf0-0xf7) arr.push((0x80 | ((point >>> 12) & 0x3f))) // 10xxxxxx(0x80-0xbf) arr.push((0x80 | ((point >>> 6) & 0x3f))) // 10yyyyyy(0x80-0xbf) arr.push((0x80 | (point & 0x3f))) // 10zzzzzz(0x80-0xbf) } else { // 五、六字节,暂时不支持 arr.push(point) throw new Error('input is not supported') } } return arr } /** * 字节数组转 utf8 串 */ function arrayToUtf8(arr) { const str = [] for (let i = 0, len = arr.length; i < len; i++) { if (arr[i] >= 0xf0 && arr[i] <= 0xf7) { // 四字节 str.push(String.fromCodePoint(((arr[i] & 0x07) << 18) + ((arr[i + 1] & 0x3f) << 12) + ((arr[i + 2] & 0x3f) << 6) + (arr[i + 3] & 0x3f))) i += 3 } else if (arr[i] >= 0xe0 && arr[i] <= 0xef) { // 三字节 str.push(String.fromCodePoint(((arr[i] & 0x0f) << 12) + ((arr[i + 1] & 0x3f) << 6) + (arr[i + 2] & 0x3f))) i += 2 } else if (arr[i] >= 0xc0 && arr[i] <= 0xdf) { // 双字节 str.push(String.fromCodePoint(((arr[i] & 0x1f) << 6) + (arr[i + 1] & 0x3f))) i++ } else { // 单字节 str.push(String.fromCodePoint(arr[i])) } } return str.join('') } /** * 32 比特循环左移 */ function rotl(x, y) { return x << y | x >>> (32 - y) } /** * 非线性变换 */ function byteSub(a) { return (Sbox[a >>> 24 & 0xFF] & 0xFF) << 24 | (Sbox[a >>> 16 & 0xFF] & 0xFF) << 16 | (Sbox[a >>> 8 & 0xFF] & 0xFF) << 8 | (Sbox[a & 0xFF] & 0xFF) } /** * 线性变换,加密/解密用 */ function l1(b) { return b ^ rotl(b, 2) ^ rotl(b, 10) ^ rotl(b, 18) ^ rotl(b, 24) } /** * 线性变换,生成轮密钥用 */ function l2(b) { return b ^ rotl(b, 13) ^ rotl(b, 23) } /** * 以一组 128 比特进行加密/解密操作 */ function sms4Crypt(input, output, roundKey) { const x = new Array(4) // 字节数组转成字数组(此处 1 字 = 32 比特) const tmp = new Array(4) for (let i = 0; i < 4; i++) { tmp[0] = input[0 + 4 * i] & 0xff tmp[1] = input[1 + 4 * i] & 0xff tmp[2] = input[2 + 4 * i] & 0xff tmp[3] = input[3 + 4 * i] & 0xff x[i] = tmp[0] << 24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3] } // x[i + 4] = x[i] ^ l1(byteSub(x[i + 1] ^ x[i + 2] ^ x[i + 3] ^ roundKey[i])) for (let r = 0, mid; r < 32; r += 4) { mid = x[1] ^ x[2] ^ x[3] ^ roundKey[r + 0] x[0] ^= l1(byteSub(mid)) // x[4] mid = x[2] ^ x[3] ^ x[0] ^ roundKey[r + 1] x[1] ^= l1(byteSub(mid)) // x[5] mid = x[3] ^ x[0] ^ x[1] ^ roundKey[r + 2] x[2] ^= l1(byteSub(mid)) // x[6] mid = x[0] ^ x[1] ^ x[2] ^ roundKey[r + 3] x[3] ^= l1(byteSub(mid)) // x[7] } // 反序变换 for (let j = 0; j < 16; j += 4) { output[j] = x[3 - j / 4] >>> 24 & 0xff output[j + 1] = x[3 - j / 4] >>> 16 & 0xff output[j + 2] = x[3 - j / 4] >>> 8 & 0xff output[j + 3] = x[3 - j / 4] & 0xff } } /** * 密钥扩展算法 */ function sms4KeyExt(key, roundKey, cryptFlag) { const x = new Array(4) // 字节数组转成字数组(此处 1 字 = 32 比特) const tmp = new Array(4) for (let i = 0; i < 4; i++) { tmp[0] = key[0 + 4 * i] & 0xff tmp[1] = key[1 + 4 * i] & 0xff tmp[2] = key[2 + 4 * i] & 0xff tmp[3] = key[3 + 4 * i] & 0xff x[i] = tmp[0] << 24 | tmp[1] << 16 | tmp[2] << 8 | tmp[3] } // 与系统参数做异或 x[0] ^= 0xa3b1bac6 x[1] ^= 0x56aa3350 x[2] ^= 0x677d9197 x[3] ^= 0xb27022dc // roundKey[i] = x[i + 4] = x[i] ^ l2(byteSub(x[i + 1] ^ x[i + 2] ^ x[i + 3] ^ CK[i])) for (let r = 0, mid; r < 32; r += 4) { mid = x[1] ^ x[2] ^ x[3] ^ CK[r + 0] roundKey[r + 0] = x[0] ^= l2(byteSub(mid)) // x[4] mid = x[2] ^ x[3] ^ x[0] ^ CK[r + 1] roundKey[r + 1] = x[1] ^= l2(byteSub(mid)) // x[5] mid = x[3] ^ x[0] ^ x[1] ^ CK[r + 2] roundKey[r + 2] = x[2] ^= l2(byteSub(mid)) // x[6] mid = x[0] ^ x[1] ^ x[2] ^ CK[r + 3] roundKey[r + 3] = x[3] ^= l2(byteSub(mid)) // x[7] } // 解密时使用反序的轮密钥 if (cryptFlag === DECRYPT) { for (let r = 0, mid; r < 16; r++) { mid = roundKey[r] roundKey[r] = roundKey[31 - r] roundKey[31 - r] = mid } } } function sm4(inArray, key, cryptFlag, {padding = 'pkcs#5', mode, output = 'string'} = {}) { if (mode === CBC) { // @TODO,CBC 模式,默认走 ECB 模式 } // 检查 key if (typeof key === 'string') key = hexToArray(key) if (key.length !== (128 / 8)) { // key 不是 128 比特 throw new Error('key is invalid') } // 检查输入 if (typeof inArray === 'string') { if (cryptFlag !== DECRYPT) { // 加密,输入为 utf8 串 inArray = utf8ToArray(inArray) } else { // 解密,输入为 16 进制串 inArray = hexToArray(inArray) } } else { inArray = [...inArray] } // 新增填充 if (padding === 'pkcs#5' && cryptFlag !== DECRYPT) { const paddingCount = BLOCK - inArray.length % BLOCK for (let i = 0; i < paddingCount; i++) inArray.push(paddingCount) } // 生成轮密钥 const roundKey = new Array(ROUND) sms4KeyExt(key, roundKey, cryptFlag) const outArray = [] let restLen = inArray.length let point = 0 while (restLen >= BLOCK) { const input = inArray.slice(point, point + 16) const output = new Array(16) sms4Crypt(input, output, roundKey) for (let i = 0; i < BLOCK; i++) { outArray[point + i] = output[i] } restLen -= BLOCK point += BLOCK } // 去除填充 if (padding === 'pkcs#5' && cryptFlag === DECRYPT) { const paddingCount = outArray[outArray.length - 1] outArray.splice(outArray.length - paddingCount, paddingCount) } // 调整输出 if (output !== 'array') { if (cryptFlag !== DECRYPT) { // 加密,输出转 16 进制串 return ArrayToHex(outArray) } else { // 解密,输出转 utf8 串 return arrayToUtf8(outArray) } } else { return outArray } } module.exports = { encrypt(inArray, key, options) { return sm4(inArray, key, 1, options) }, decrypt(inArray, key, options) { return sm4(inArray, key, 0, options) } } /***/ }), /***/ "1148": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIntegerOrInfinity = __webpack_require__("5926"); var toString = __webpack_require__("577e"); var requireObjectCoercible = __webpack_require__("1d80"); var $RangeError = RangeError; var floor = Math.floor; // `String.prototype.repeat` method implementation // https://tc39.es/ecma262/#sec-string.prototype.repeat module.exports = function repeat(count) { var str = toString(requireObjectCoercible(this)); var result = ''; var n = toIntegerOrInfinity(count); if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions'); for (;n > 0; (n = floor(n / 2)) && (str += str)) if (n % 2) result += str; return result; }; /***/ }), /***/ "1212": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var userAgent = __webpack_require__("b5db"); var process = globalThis.process; var Deno = globalThis.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } module.exports = version; /***/ }), /***/ "1296": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var WeakMapHelpers = __webpack_require__("6d3e"); var IS_PURE = __webpack_require__("c430"); var get = WeakMapHelpers.get; var has = WeakMapHelpers.has; var set = WeakMapHelpers.set; // `WeakMap.prototype.getOrInsert` method // https://tc39.es/ecma262/#sec-weakmap.prototype.getorinsert $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, { getOrInsert: function getOrInsert(key, value) { if (has(this, key)) return get(this, key); set(this, key, value); return value; } }); /***/ }), /***/ "13d2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var hasOwn = __webpack_require__("1a2d"); var DESCRIPTORS = __webpack_require__("83ab"); var CONFIGURABLE_FUNCTION_NAME = __webpack_require__("5e77").CONFIGURABLE; var inspectSource = __webpack_require__("8925"); var InternalStateModule = __webpack_require__("69f3"); var enforceInternalState = InternalStateModule.enforce; var getInternalState = InternalStateModule.get; var $String = String; // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; var stringSlice = uncurryThis(''.slice); var replace = uncurryThis(''.replace); var join = uncurryThis([].join); var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () { return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; }); var TEMPLATE = String(String).split('String'); var makeBuiltIn = module.exports = function (value, name, options) { if (stringSlice($String(name), 0, 7) === 'Symbol(') { name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; } if (options && options.getter) name = 'get ' + name; if (options && options.setter) name = 'set ' + name; if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true }); else value.name = name; } if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) { defineProperty(value, 'length', { value: options.arity }); } try { if (options && hasOwn(options, 'constructor') && options.constructor) { if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false }); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable } else if (value.prototype) value.prototype = undefined; } catch (error) { /* empty */ } var state = enforceInternalState(value); if (!hasOwn(state, 'source')) { state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); } return value; }; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative // eslint-disable-next-line no-extend-native -- required Function.prototype.toString = makeBuiltIn(function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }, 'toString'); /***/ }), /***/ "13d5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $reduce = __webpack_require__("d58f").left; var arrayMethodIsStrict = __webpack_require__("a640"); var CHROME_VERSION = __webpack_require__("1212"); var IS_NODE = __webpack_require__("9adc"); // Chrome 80-82 has a critical bug // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982 var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83; var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce'); // `Array.prototype.reduce` method // https://tc39.es/ecma262/#sec-array.prototype.reduce $({ target: 'Array', proto: true, forced: FORCED }, { reduce: function reduce(callbackfn /* , initialValue */) { var length = arguments.length; return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ "14be": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var getBuiltIn = __webpack_require__("d066"); var validateArgumentsLength = __webpack_require__("d6d6"); var toString = __webpack_require__("577e"); var USE_NATIVE_URL = __webpack_require__("f354"); var URL = getBuiltIn('URL'); // `URL.parse` method // https://url.spec.whatwg.org/#dom-url-parse $({ target: 'URL', stat: true, forced: !USE_NATIVE_URL }, { parse: function parse(url) { var length = validateArgumentsLength(arguments.length, 1); var urlString = toString(url); var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]); try { return new URL(urlString, base); } catch (error) { return null; } } }); /***/ }), /***/ "14d8": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("9606"); __webpack_require__("2b3d"); __webpack_require__("a149"); __webpack_require__("14be"); __webpack_require__("bf19"); var path = __webpack_require__("428f"); module.exports = path.URL; /***/ }), /***/ "14d9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); var setArrayLength = __webpack_require__("3a34"); var doesNotExceedSafeInteger = __webpack_require__("3511"); var fails = __webpack_require__("d039"); var INCORRECT_TO_LENGTH = fails(function () { return [].push.call({ length: 0x100000000 }, 1) !== 4294967297; }); // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError // https://bugs.chromium.org/p/v8/issues/detail?id=12681 var properErrorOnNonWritableLength = function () { try { // eslint-disable-next-line es/no-object-defineproperty -- safe Object.defineProperty([], 'length', { writable: false }).push(); } catch (error) { return error instanceof TypeError; } }; var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength(); // `Array.prototype.push` method // https://tc39.es/ecma262/#sec-array.prototype.push $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` push: function push(item) { var O = toObject(this); var len = lengthOfArrayLike(O); var argCount = arguments.length; doesNotExceedSafeInteger(len + argCount); for (var i = 0; i < argCount; i++) { O[len] = arguments[i]; len++; } setArrayLength(O, len); return len; } }); /***/ }), /***/ "14e5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var newPromiseCapabilityModule = __webpack_require__("f069"); var perform = __webpack_require__("e667"); var iterate = __webpack_require__("2266"); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__("5eed"); // `Promise.all` method // https://tc39.es/ecma262/#sec-promise.all $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { all: function all(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; remaining++; call($promiseResolve, C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ "157a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var DESCRIPTORS = __webpack_require__("83ab"); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Avoid NodeJS experimental warning module.exports = function (name) { if (!DESCRIPTORS) return globalThis[name]; var descriptor = getOwnPropertyDescriptor(globalThis, name); return descriptor && descriptor.value; }; /***/ }), /***/ "1626": /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot var documentAll = typeof document == 'object' && document.all; // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { return typeof argument == 'function' || argument === documentAll; } : function (argument) { return typeof argument == 'function'; }; /***/ }), /***/ "1787": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); module.exports = function (argument) { return isObject(argument) || argument === null; }; /***/ }), /***/ "182d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toPositiveInteger = __webpack_require__("f8cd"); var $RangeError = RangeError; module.exports = function (it, BYTES) { var offset = toPositiveInteger(it); if (offset % BYTES) throw new $RangeError('Wrong offset'); return offset; }; /***/ }), /***/ "1920": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("4d90"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('String', 'padStart'); /***/ }), /***/ "197b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.species` well-known symbol // https://tc39.es/ecma262/#sec-symbol.species defineWellKnownSymbol('species'); /***/ }), /***/ "19aa": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isPrototypeOf = __webpack_require__("3a9b"); var $TypeError = TypeError; module.exports = function (it, Prototype) { if (isPrototypeOf(Prototype, it)) return it; throw new $TypeError('Incorrect invocation'); }; /***/ }), /***/ "1a2d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var toObject = __webpack_require__("7b0b"); var hasOwnProperty = uncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty // eslint-disable-next-line es/no-object-hasown -- safe module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; /***/ }), /***/ "1be4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); module.exports = getBuiltIn('document', 'documentElement'); /***/ }), /***/ "1c59": /***/ (function(module, exports, __webpack_require__) { "use strict"; var collection = __webpack_require__("6d61"); var collectionStrong = __webpack_require__("6566"); // `Set` constructor // https://tc39.es/ecma262/#sec-set-objects collection('Set', function (init) { return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); /***/ }), /***/ "1c7e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var ITERATOR = wellKnownSymbol('iterator'); var SAFE_CLOSING = false; try { var called = 0; var iteratorWithReturn = { next: function () { return { done: !!called++ }; }, 'return': function () { SAFE_CLOSING = true; } }; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation iteratorWithReturn[ITERATOR] = function () { return this; }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing Array.from(iteratorWithReturn, function () { throw 2; }); } catch (error) { /* empty */ } module.exports = function (exec, SKIP_CLOSING) { try { if (!SKIP_CLOSING && !SAFE_CLOSING) return false; } catch (error) { return false; } // workaround of old WebKit + `eval` bug var ITERATION_SUPPORT = false; try { var object = {}; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation object[ITERATOR] = function () { return { next: function () { return { done: ITERATION_SUPPORT = true }; } }; }; exec(object); } catch (error) { /* empty */ } return ITERATION_SUPPORT; }; /***/ }), /***/ "1cd7": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("f6d6"); var path = __webpack_require__("428f"); module.exports = path.String.fromCodePoint; /***/ }), /***/ "1d02": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var $findLastIndex = __webpack_require__("a258").findLastIndex; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findLastIndex` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlastindex exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) { return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ "1d80": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isNullOrUndefined = __webpack_require__("7234"); var $TypeError = TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ "1dde": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var wellKnownSymbol = __webpack_require__("b622"); var V8_VERSION = __webpack_require__("1212"); var SPECIES = wellKnownSymbol('species'); module.exports = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; /***/ }), /***/ "1e5a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var symmetricDifference = __webpack_require__("9961"); var setMethodGetKeysBeforeCloning = __webpack_require__("5320"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var FORCED = !setMethodAcceptSetLike('symmetricDifference') || !setMethodGetKeysBeforeCloning('symmetricDifference'); // `Set.prototype.symmetricDifference` method // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference $({ target: 'Set', proto: true, real: true, forced: FORCED }, { symmetricDifference: symmetricDifference }); /***/ }), /***/ "1e70": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var difference = __webpack_require__("a5f7"); var fails = __webpack_require__("d039"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var SET_LIKE_INCORRECT_BEHAVIOR = !setMethodAcceptSetLike('difference', function (result) { return result.size === 0; }); var FORCED = SET_LIKE_INCORRECT_BEHAVIOR || fails(function () { // https://bugs.webkit.org/show_bug.cgi?id=288595 var setLike = { size: 1, has: function () { return true; }, keys: function () { var index = 0; return { next: function () { var done = index++ > 1; if (baseSet.has(1)) baseSet.clear(); return { done: done, value: 2 }; } }; } }; // eslint-disable-next-line es/no-set -- testing var baseSet = new Set([1, 2, 3, 4]); // eslint-disable-next-line es/no-set-prototype-difference -- testing return baseSet.difference(setLike).size !== 3; }); // `Set.prototype.difference` method // https://tc39.es/ecma262/#sec-set.prototype.difference $({ target: 'Set', proto: true, real: true, forced: FORCED }, { difference: difference }); /***/ }), /***/ "1f4a": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("99af"); __webpack_require__("d3b7"); __webpack_require__("a4d3"); __webpack_require__("dec7"); __webpack_require__("b636"); __webpack_require__("e01a"); __webpack_require__("e691"); __webpack_require__("dc8d"); __webpack_require__("efe9"); __webpack_require__("d28b"); __webpack_require__("2a1b"); __webpack_require__("8edd"); __webpack_require__("80e0"); __webpack_require__("6b9e"); __webpack_require__("197b"); __webpack_require__("2351"); __webpack_require__("8172"); __webpack_require__("944a"); __webpack_require__("81b8"); __webpack_require__("0c47"); __webpack_require__("23dc"); __webpack_require__("f8c9"); var path = __webpack_require__("428f"); module.exports = path.Symbol; /***/ }), /***/ "1fb5": /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revLookup[code.charCodeAt(i)] = i } // Support decoding URL-safe base64 strings, as Node.js does. // See: https://en.wikipedia.org/wiki/Base64#URL_applications revLookup['-'.charCodeAt(0)] = 62 revLookup['_'.charCodeAt(0)] = 63 function getLens (b64) { var len = b64.length if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // Trim off extra bytes after placeholder bytes are found // See: https://github.com/beatgammit/base64-js/issues/42 var validLen = b64.indexOf('=') if (validLen === -1) validLen = len var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4) return [validLen, placeHoldersLen] } // base64 is 4/3 + up to two characters of the original data function byteLength (b64) { var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function _byteLength (b64, validLen, placeHoldersLen) { return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function toByteArray (b64) { var tmp var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) var curByte = 0 // if there are placeholders, only get up to the last complete 4 chars var len = placeHoldersLen > 0 ? validLen - 4 : validLen var i for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] arr[curByte++] = (tmp >> 16) & 0xFF arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 1) { tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } return arr } function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } function encodeChunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) output.push(tripletToBase64(tmp)) } return output.join('') } function fromByteArray (uint8) { var tmp var len = uint8.length var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes var parts = [] var maxChunkLength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] parts.push( lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3F] + '==' ) } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] parts.push( lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3F] + lookup[(tmp << 2) & 0x3F] + '=' ) } return parts.join('') } /***/ }), /***/ "1fe2": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("7276"); /***/ }), /***/ "2005": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isDetached = __webpack_require__("75bd"); var $TypeError = TypeError; module.exports = function (it) { if (isDetached(it)) throw new $TypeError('ArrayBuffer is detached'); return it; }; /***/ }), /***/ "2266": /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__("0366"); var call = __webpack_require__("c65b"); var anObject = __webpack_require__("825a"); var tryToString = __webpack_require__("0d51"); var isArrayIteratorMethod = __webpack_require__("e95a"); var lengthOfArrayLike = __webpack_require__("07fa"); var isPrototypeOf = __webpack_require__("3a9b"); var getIterator = __webpack_require__("9a1f"); var getIteratorMethod = __webpack_require__("35a1"); var iteratorClose = __webpack_require__("2a62"); var $TypeError = TypeError; var Result = function (stopped, result) { this.stopped = stopped; this.result = result; }; var ResultPrototype = Result.prototype; module.exports = function (iterable, unboundFunction, options) { var that = options && options.that; var AS_ENTRIES = !!(options && options.AS_ENTRIES); var IS_RECORD = !!(options && options.IS_RECORD); var IS_ITERATOR = !!(options && options.IS_ITERATOR); var INTERRUPTED = !!(options && options.INTERRUPTED); var fn = bind(unboundFunction, that); var iterator, iterFn, index, length, result, next, step; var stop = function (condition) { var $iterator = iterator; iterator = undefined; if ($iterator) iteratorClose($iterator, 'normal'); return new Result(true, condition); }; var callFn = function (value) { if (AS_ENTRIES) { anObject(value); return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); } return INTERRUPTED ? fn(value, stop) : fn(value); }; if (IS_RECORD) { iterator = iterable.iterator; } else if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { result = callFn(iterable[index]); if (result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); } iterator = getIterator(iterable, iterFn); } next = IS_RECORD ? iterable.next : iterator.next; while (!(step = call(next, iterator)).done) { // `IteratorValue` errors should propagate without closing the iterator var value = step.value; try { result = callFn(value); } catch (error) { if (iterator) iteratorClose(iterator, 'throw', error); else throw error; } if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); }; /***/ }), /***/ "2351": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.split` well-known symbol // https://tc39.es/ecma262/#sec-symbol.split defineWellKnownSymbol('split'); /***/ }), /***/ "23cb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIntegerOrInfinity = __webpack_require__("5926"); var max = Math.max; var min = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). module.exports = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ "23dc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var setToStringTag = __webpack_require__("d44e"); // Math[@@toStringTag] property // https://tc39.es/ecma262/#sec-math-@@tostringtag setToStringTag(Math, 'Math', true); /***/ }), /***/ "23e7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var createNonEnumerableProperty = __webpack_require__("9112"); var defineBuiltIn = __webpack_require__("cb2d"); var defineGlobalProperty = __webpack_require__("6374"); var copyConstructorProperties = __webpack_require__("e893"); var isForced = __webpack_require__("94ca"); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.dontCallGetSet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = globalThis; } else if (STATIC) { target = globalThis[TARGET] || defineGlobalProperty(TARGET, {}); } else { target = globalThis[TARGET] && globalThis[TARGET].prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.dontCallGetSet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } defineBuiltIn(target, key, sourceProperty, options); } }; /***/ }), /***/ "2418": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("cca6"); var path = __webpack_require__("428f"); module.exports = path.Object.assign; /***/ }), /***/ "241c": /***/ (function(module, exports, __webpack_require__) { "use strict"; var internalObjectKeys = __webpack_require__("ca84"); var enumBugKeys = __webpack_require__("7839"); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; /***/ }), /***/ "249d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $transfer = __webpack_require__("41f6"); // `ArrayBuffer.prototype.transfer` method // https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfer if ($transfer) $({ target: 'ArrayBuffer', proto: true }, { transfer: function transfer() { return $transfer(this, arguments.length ? arguments[0] : undefined, true); } }); /***/ }), /***/ "2532": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("e330"); var notARegExp = __webpack_require__("5a34"); var requireObjectCoercible = __webpack_require__("1d80"); var toString = __webpack_require__("577e"); var correctIsRegExpLogic = __webpack_require__("ab13"); var stringIndexOf = uncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf( toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); /***/ }), /***/ "2626": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var defineBuiltInAccessor = __webpack_require__("edd0"); var wellKnownSymbol = __webpack_require__("b622"); var DESCRIPTORS = __webpack_require__("83ab"); var SPECIES = wellKnownSymbol('species'); module.exports = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { defineBuiltInAccessor(Constructor, SPECIES, { configurable: true, get: function () { return this; } }); } }; /***/ }), /***/ "271a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineBuiltIn = __webpack_require__("cb2d"); var uncurryThis = __webpack_require__("e330"); var toString = __webpack_require__("577e"); var validateArgumentsLength = __webpack_require__("d6d6"); var $URLSearchParams = URLSearchParams; var URLSearchParamsPrototype = $URLSearchParams.prototype; var getAll = uncurryThis(URLSearchParamsPrototype.getAll); var $has = uncurryThis(URLSearchParamsPrototype.has); var params = new $URLSearchParams('a=1'); // `undefined` case is a Chromium 117 bug // https://bugs.chromium.org/p/v8/issues/detail?id=14222 if (params.has('a', 2) || !params.has('a', undefined)) { defineBuiltIn(URLSearchParamsPrototype, 'has', function has(name /* , value */) { var length = arguments.length; var $value = length < 2 ? undefined : arguments[1]; if (length && $value === undefined) return $has(this, name); var values = getAll(this, name); // also validates `this` validateArgumentsLength(length, 1); var value = toString($value); var index = 0; while (index < values.length) { if (values[index++] === value) return true; } return false; }, { enumerable: true, unsafe: true }); } /***/ }), /***/ "2834": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var uncurryThis = __webpack_require__("e330"); var aCallable = __webpack_require__("59ed"); var arrayFromConstructorAndList = __webpack_require__("dfb9"); var aTypedArray = ArrayBufferViewCore.aTypedArray; var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var sort = uncurryThis(ArrayBufferViewCore.TypedArrayPrototype.sort); // `%TypedArray%.prototype.toSorted` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tosorted exportTypedArrayMethod('toSorted', function toSorted(compareFn) { if (compareFn !== undefined) aCallable(compareFn); var O = aTypedArray(this); var A = arrayFromConstructorAndList(getTypedArrayConstructor(O), O); return sort(A, compareFn); }); /***/ }), /***/ "2954": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var fails = __webpack_require__("d039"); var arraySlice = __webpack_require__("f36a"); var aTypedArray = ArrayBufferViewCore.aTypedArray; var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var FORCED = fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing new Int8Array(1).slice(); }); // `%TypedArray%.prototype.slice` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice exportTypedArrayMethod('slice', function slice(start, end) { var list = arraySlice(aTypedArray(this), start, end); var C = getTypedArrayConstructor(this); var index = 0; var length = list.length; var result = new C(length); while (length > index) result[index] = list[index++]; return result; }, FORCED); /***/ }), /***/ "2a07": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var IS_NODE = __webpack_require__("9adc"); module.exports = function (name) { if (IS_NODE) { try { return globalThis.process.getBuiltinModule(name); } catch (error) { /* empty */ } try { // eslint-disable-next-line no-new-func -- safe return Function('return require("' + name + '")')(); } catch (error) { /* empty */ } } }; /***/ }), /***/ "2a1b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.match` well-known symbol // https://tc39.es/ecma262/#sec-symbol.match defineWellKnownSymbol('match'); /***/ }), /***/ "2a62": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var anObject = __webpack_require__("825a"); var getMethod = __webpack_require__("dc4a"); module.exports = function (iterator, kind, value) { var innerResult, innerError; anObject(iterator); try { innerResult = getMethod(iterator, 'return'); if (!innerResult) { if (kind === 'throw') throw value; return value; } innerResult = call(innerResult, iterator); } catch (error) { innerError = true; innerResult = error; } if (kind === 'throw') throw value; if (innerError) throw innerResult; anObject(innerResult); return value; }; /***/ }), /***/ "2b3d": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("4002"); /***/ }), /***/ "2ba4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_BIND = __webpack_require__("40d5"); var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () { return call.apply(apply, arguments); }); /***/ }), /***/ "2baa": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Should throw an error on invalid iterator // https://issues.chromium.org/issues/336839115 module.exports = function (methodName, argument) { // eslint-disable-next-line es/no-iterator -- required for testing var method = typeof Iterator == 'function' && Iterator.prototype[methodName]; if (method) try { method.call({ next: null }, argument).next(); } catch (error) { return true; } }; /***/ }), /***/ "2c66": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var defineBuiltInAccessor = __webpack_require__("edd0"); var isDetached = __webpack_require__("75bd"); var ArrayBufferPrototype = ArrayBuffer.prototype; // `ArrayBuffer.prototype.detached` getter // https://tc39.es/ecma262/#sec-get-arraybuffer.prototype.detached if (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) { defineBuiltInAccessor(ArrayBufferPrototype, 'detached', { configurable: true, get: function detached() { return isDetached(this); } }); } /***/ }), /***/ "2ca0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("4625"); var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var toLength = __webpack_require__("50c4"); var toString = __webpack_require__("577e"); var notARegExp = __webpack_require__("5a34"); var requireObjectCoercible = __webpack_require__("1d80"); var correctIsRegExpLogic = __webpack_require__("ab13"); var IS_PURE = __webpack_require__("c430"); var stringSlice = uncurryThis(''.slice); var min = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.startsWith` method // https://tc39.es/ecma262/#sec-string.prototype.startswith $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { startsWith: function startsWith(searchString /* , position = 0 */) { var that = toString(requireObjectCoercible(this)); notARegExp(searchString); var search = toString(searchString); var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length)); return stringSlice(that, index, index + search.length) === search; } }); /***/ }), /***/ "2cf4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var apply = __webpack_require__("2ba4"); var bind = __webpack_require__("0366"); var isCallable = __webpack_require__("1626"); var hasOwn = __webpack_require__("1a2d"); var fails = __webpack_require__("d039"); var html = __webpack_require__("1be4"); var arraySlice = __webpack_require__("f36a"); var createElement = __webpack_require__("cc12"); var validateArgumentsLength = __webpack_require__("d6d6"); var IS_IOS = __webpack_require__("52c8"); var IS_NODE = __webpack_require__("9adc"); var set = globalThis.setImmediate; var clear = globalThis.clearImmediate; var process = globalThis.process; var Dispatch = globalThis.Dispatch; var Function = globalThis.Function; var MessageChannel = globalThis.MessageChannel; var String = globalThis.String; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var $location, defer, channel, port; fails(function () { // Deno throws a ReferenceError on `location` access without `--location` flag $location = globalThis.location; }); var run = function (id) { if (hasOwn(queue, id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var runner = function (id) { return function () { run(id); }; }; var eventListener = function (event) { run(event.data); }; var globalPostMessageDefer = function (id) { // old engines have not location.origin globalThis.postMessage(String(id), $location.protocol + '//' + $location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!set || !clear) { set = function setImmediate(handler) { validateArgumentsLength(arguments.length, 1); var fn = isCallable(handler) ? handler : Function(handler); var args = arraySlice(arguments, 1); queue[++counter] = function () { apply(fn, undefined, args); }; defer(counter); return counter; }; clear = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (IS_NODE) { defer = function (id) { process.nextTick(runner(id)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(runner(id)); }; // Browsers with MessageChannel, includes WebWorkers // except iOS - https://github.com/zloirock/core-js/issues/624 } else if (MessageChannel && !IS_IOS) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = eventListener; defer = bind(port.postMessage, port); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if ( globalThis.addEventListener && isCallable(globalThis.postMessage) && !globalThis.importScripts && $location && $location.protocol !== 'file:' && !fails(globalPostMessageDefer) ) { defer = globalPostMessageDefer; globalThis.addEventListener('message', eventListener, false); // IE8- } else if (ONREADYSTATECHANGE in createElement('script')) { defer = function (id) { html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(runner(id), 0); }; } } module.exports = { set: set, clear: clear }; /***/ }), /***/ "33d1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); var toIntegerOrInfinity = __webpack_require__("5926"); var addToUnscopables = __webpack_require__("44d2"); // `Array.prototype.at` method // https://tc39.es/ecma262/#sec-array.prototype.at $({ target: 'Array', proto: true }, { at: function at(index) { var O = toObject(this); var len = lengthOfArrayLike(O); var relativeIndex = toIntegerOrInfinity(index); var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; return (k < 0 || k >= len) ? undefined : O[k]; } }); addToUnscopables('at'); /***/ }), /***/ "34af": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var aString = __webpack_require__("8a96"); var anUint8Array = __webpack_require__("6b37"); var notDetached = __webpack_require__("2005"); var $fromHex = __webpack_require__("015d"); // Should not throw an error on length-tracking views over ResizableArrayBuffer // https://issues.chromium.org/issues/454630441 function throwsOnLengthTrackingView() { try { // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- required for testing var rab = new ArrayBuffer(16, { maxByteLength: 1024 }); // eslint-disable-next-line es/no-uint8array-prototype-setfromhex, es/no-typed-arrays -- required for testing new Uint8Array(rab).setFromHex('cafed00d'); } catch (error) { return true; } } // `Uint8Array.prototype.setFromHex` method // https://tc39.es/ecma262/#sec-uint8array.prototype.setfromhex if (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true, forced: throwsOnLengthTrackingView() }, { setFromHex: function setFromHex(string) { anUint8Array(this); aString(string); notDetached(this.buffer); var read = $fromHex(string, this).read; return { read: read, written: read / 2 }; } }); /***/ }), /***/ "3511": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $TypeError = TypeError; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991 module.exports = function (it) { if (it > MAX_SAFE_INTEGER) throw new $TypeError('Maximum allowed index exceeded'); return it; }; /***/ }), /***/ "3529": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var newPromiseCapabilityModule = __webpack_require__("f069"); var perform = __webpack_require__("e667"); var iterate = __webpack_require__("2266"); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__("5eed"); // `Promise.race` method // https://tc39.es/ecma262/#sec-promise.race $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { race: function race(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); iterate(iterable, function (promise) { call($promiseResolve, C, promise).then(capability.resolve, reject); }); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ "35a1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__("f5df"); var getMethod = __webpack_require__("dc4a"); var isNullOrUndefined = __webpack_require__("7234"); var Iterators = __webpack_require__("3f8c"); var wellKnownSymbol = __webpack_require__("b622"); var ITERATOR = wellKnownSymbol('iterator'); module.exports = function (it) { if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)]; }; /***/ }), /***/ "3662": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return pipeline; }); /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d9e2"); /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__); Array.prototype.pipeline = async function (callback) { if (null === this || 'undefined' === typeof this) { // At the moment all modern browsers, that support strict mode, have // native implementation of Array.prototype.reduce. For instance, IE8 // does not support strict mode, so this check is actually useless. throw new TypeError('Array.prototype.pipeline called on null or undefined'); } if ('function' !== typeof callback) { throw new TypeError(callback + ' is not a function'); } var index, value, length = this.length >>> 0; for (index = 0; length > index; ++index) { value = await callback(value, this[index], index, this); } return value; }; let _pipeline = function (...funcs) { return funcs.pipeline((a, b) => b.call(this, a)); }; const pipeline = _pipeline; /***/ }), /***/ "36f2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var getBuiltInNodeModule = __webpack_require__("2a07"); var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__("dbe5"); var structuredClone = globalThis.structuredClone; var $ArrayBuffer = globalThis.ArrayBuffer; var $MessageChannel = globalThis.MessageChannel; var detach = false; var WorkerThreads, channel, buffer, $detach; if (PROPER_STRUCTURED_CLONE_TRANSFER) { detach = function (transferable) { structuredClone(transferable, { transfer: [transferable] }); }; } else if ($ArrayBuffer) try { if (!$MessageChannel) { WorkerThreads = getBuiltInNodeModule('worker_threads'); if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel; } if ($MessageChannel) { channel = new $MessageChannel(); buffer = new $ArrayBuffer(2); $detach = function (transferable) { channel.port1.postMessage(null, [transferable]); }; if (buffer.byteLength === 2) { $detach(buffer); if (buffer.byteLength === 0) detach = $detach; } } } catch (error) { /* empty */ } module.exports = detach; /***/ }), /***/ "37e8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__("aed9"); var definePropertyModule = __webpack_require__("9bf2"); var anObject = __webpack_require__("825a"); var toIndexedObject = __webpack_require__("fc6a"); var objectKeys = __webpack_require__("df75"); // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); return O; }; /***/ }), /***/ "384f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var iterateSimple = __webpack_require__("5388"); var SetHelpers = __webpack_require__("cb27"); var Set = SetHelpers.Set; var SetPrototype = SetHelpers.proto; var forEach = uncurryThis(SetPrototype.forEach); var keys = uncurryThis(SetPrototype.keys); var next = keys(new Set()).next; module.exports = function (set, fn, interruptible) { return interruptible ? iterateSimple({ iterator: keys(set), next: next }, fn) : forEach(set, fn); }; /***/ }), /***/ "395e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var has = __webpack_require__("cb27").has; var size = __webpack_require__("8e16"); var getSetRecord = __webpack_require__("7f65"); var iterateSimple = __webpack_require__("5388"); var iteratorClose = __webpack_require__("2a62"); // `Set.prototype.isSupersetOf` method // https://tc39.es/ecma262/#sec-set.prototype.issupersetof module.exports = function isSupersetOf(other) { var O = aSet(this); var otherRec = getSetRecord(other); if (size(O) < otherRec.size) return false; var iterator = otherRec.getIterator(); return iterateSimple(iterator, function (e) { if (!has(O, e)) return iteratorClose(iterator.iterator, 'normal', false); }) !== false; }; /***/ }), /***/ "3980": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("967a"); __webpack_require__("e260"); __webpack_require__("d3b7"); __webpack_require__("e6cf"); __webpack_require__("820e"); __webpack_require__("dbfa"); __webpack_require__("e283"); __webpack_require__("6a8a"); __webpack_require__("a79d"); __webpack_require__("3ca3"); var path = __webpack_require__("428f"); module.exports = path.Promise; /***/ }), /***/ "3a34": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var isArray = __webpack_require__("e8b5"); var $TypeError = TypeError; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Safari < 13 does not throw an error in this case var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () { // makes no sense without proper strict mode support if (this !== undefined) return true; try { // eslint-disable-next-line es/no-object-defineproperty -- safe Object.defineProperty([], 'length', { writable: false }).length = 1; } catch (error) { return error instanceof TypeError; } }(); module.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) { if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) { throw new $TypeError('Cannot set read only .length'); } return O.length = length; } : function (O, length) { return O.length = length; }; /***/ }), /***/ "3a9b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); module.exports = uncurryThis({}.isPrototypeOf); /***/ }), /***/ "3bbe": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isPossiblePrototype = __webpack_require__("1787"); var $String = String; var $TypeError = TypeError; module.exports = function (argument) { if (isPossiblePrototype(argument)) return argument; throw new $TypeError("Can't set " + $String(argument) + ' as a prototype'); }; /***/ }), /***/ "3c35": /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */ module.exports = __webpack_amd_options__; /* WEBPACK VAR INJECTION */}.call(this, {})) /***/ }), /***/ "3c5d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var call = __webpack_require__("c65b"); var ArrayBufferViewCore = __webpack_require__("ebb5"); var lengthOfArrayLike = __webpack_require__("07fa"); var toOffset = __webpack_require__("182d"); var toIndexedObject = __webpack_require__("7b0b"); var fails = __webpack_require__("d039"); var RangeError = globalThis.RangeError; var Int8Array = globalThis.Int8Array; var Int8ArrayPrototype = Int8Array && Int8Array.prototype; var $set = Int8ArrayPrototype && Int8ArrayPrototype.set; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS = !fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing var array = new Uint8ClampedArray(2); call($set, array, { length: 1, 0: 3 }, 1); return array[1] !== 3; }); // https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () { var array = new Int8Array(2); array.set(1); array.set('2', 1); return array[0] !== 0 || array[1] !== 2; }); // `%TypedArray%.prototype.set` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set exportTypedArrayMethod('set', function set(arrayLike /* , offset */) { aTypedArray(this); var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); var src = toIndexedObject(arrayLike); if (WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset); var length = this.length; var len = lengthOfArrayLike(src); var index = 0; if (len + offset > length) throw new RangeError('Wrong length'); while (index < len) this[offset + index] = src[index++]; }, !WORKS_WITH_OBJECTS_AND_GENERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG); /***/ }), /***/ "3ca3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var charAt = __webpack_require__("6547").charAt; var toString = __webpack_require__("577e"); var InternalStateModule = __webpack_require__("69f3"); var defineIterator = __webpack_require__("c6d2"); var createIterResultObject = __webpack_require__("4754"); var STRING_ITERATOR = 'String Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-string.prototype-@@iterator defineIterator(String, 'String', function (iterated) { setInternalState(this, { type: STRING_ITERATOR, string: toString(iterated), index: 0 }); // `%StringIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next }, function next() { var state = getInternalState(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return createIterResultObject(undefined, true); point = charAt(string, index); state.index += point.length; return createIterResultObject(point, false); }); /***/ }), /***/ "3f8c": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = {}; /***/ }), /***/ "4002": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` __webpack_require__("3ca3"); var $ = __webpack_require__("23e7"); var DESCRIPTORS = __webpack_require__("83ab"); var USE_NATIVE_URL = __webpack_require__("f354"); var globalThis = __webpack_require__("cfe9"); var bind = __webpack_require__("0366"); var uncurryThis = __webpack_require__("e330"); var defineBuiltIn = __webpack_require__("cb2d"); var defineBuiltInAccessor = __webpack_require__("edd0"); var anInstance = __webpack_require__("19aa"); var hasOwn = __webpack_require__("1a2d"); var assign = __webpack_require__("60da"); var arrayFrom = __webpack_require__("4df4"); var arraySlice = __webpack_require__("f36a"); var codeAt = __webpack_require__("6547").codeAt; var toASCII = __webpack_require__("5fb2"); var $toString = __webpack_require__("577e"); var setToStringTag = __webpack_require__("d44e"); var validateArgumentsLength = __webpack_require__("d6d6"); var URLSearchParamsModule = __webpack_require__("5352"); var InternalStateModule = __webpack_require__("69f3"); var setInternalState = InternalStateModule.set; var getInternalURLState = InternalStateModule.getterFor('URL'); var URLSearchParams = URLSearchParamsModule.URLSearchParams; var getInternalSearchParamsState = URLSearchParamsModule.getState; var NativeURL = globalThis.URL; var TypeError = globalThis.TypeError; var encodeURIComponent = globalThis.encodeURIComponent; var parseInt = globalThis.parseInt; var floor = Math.floor; var pow = Math.pow; var charAt = uncurryThis(''.charAt); var exec = uncurryThis(/./.exec); var join = uncurryThis([].join); var numberToString = uncurryThis(1.1.toString); var pop = uncurryThis([].pop); var push = uncurryThis([].push); var replace = uncurryThis(''.replace); var shift = uncurryThis([].shift); var split = uncurryThis(''.split); var stringSlice = uncurryThis(''.slice); var toLowerCase = uncurryThis(''.toLowerCase); var unshift = uncurryThis([].unshift); var INVALID_AUTHORITY = 'Invalid authority'; var INVALID_SCHEME = 'Invalid scheme'; var INVALID_HOST = 'Invalid host'; var INVALID_PORT = 'Invalid port'; var ALPHA = /[a-z]/i; var ALPHANUMERIC_PLUS_MINUS_DOT = /[\d+\-.a-z]/i; var DIGIT = /\d/; var HEX_START = /^0x/i; var OCT = /^[0-7]+$/; var DEC = /^\d+$/; var HEX = /^[\da-f]+$/i; /* eslint-disable regexp/no-control-character -- safe */ var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/; var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/; var LEADING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+/; var TRAILING_C0_CONTROL_OR_SPACE = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/; var TAB_AND_NEW_LINE = /[\t\n\r]/g; /* eslint-enable regexp/no-control-character -- safe */ // eslint-disable-next-line no-unassigned-vars -- expected `undefined` value var EOF; // https://url.spec.whatwg.org/#ends-in-a-number-checker var endsInNumber = function (input) { var parts = split(input, '.'); var last, hexPart; if (parts[parts.length - 1] === '') { if (parts.length === 1) return false; parts.length--; } last = parts[parts.length - 1]; if (exec(DEC, last)) return true; if (exec(HEX_START, last)) { hexPart = stringSlice(last, 2); return hexPart === '' || !!exec(HEX, hexPart); } return false; }; // https://url.spec.whatwg.org/#concept-ipv4-parser var parseIPv4 = function (input) { var parts = split(input, '.'); var partsLength, numbers, index, part, radix, number, ipv4; if (parts.length && parts[parts.length - 1] === '') { parts.length--; } partsLength = parts.length; if (partsLength > 4) return null; numbers = []; for (index = 0; index < partsLength; index++) { part = parts[index]; if (part === '') return null; radix = 10; if (part.length > 1 && charAt(part, 0) === '0') { radix = exec(HEX_START, part) ? 16 : 8; part = stringSlice(part, radix === 8 ? 1 : 2); } if (part === '') { number = 0; } else { if (!exec(radix === 10 ? DEC : radix === 8 ? OCT : HEX, part)) return null; number = parseInt(part, radix); } push(numbers, number); } for (index = 0; index < partsLength; index++) { number = numbers[index]; if (index === partsLength - 1) { if (number >= pow(256, 5 - partsLength)) return null; } else if (number > 255) return null; } ipv4 = pop(numbers); for (index = 0; index < numbers.length; index++) { ipv4 += numbers[index] * pow(256, 3 - index); } return ipv4; }; // https://url.spec.whatwg.org/#concept-ipv6-parser // eslint-disable-next-line max-statements -- TODO var parseIPv6 = function (input) { var address = [0, 0, 0, 0, 0, 0, 0, 0]; var pieceIndex = 0; var compress = null; var pointer = 0; var value, length, numbersSeen, ipv4Piece, number, swaps, swap; var chr = function () { return charAt(input, pointer); }; if (chr() === ':') { if (charAt(input, 1) !== ':') return; pointer += 2; pieceIndex++; compress = pieceIndex; } while (chr()) { if (pieceIndex === 8) return; if (chr() === ':') { if (compress !== null) return; pointer++; pieceIndex++; compress = pieceIndex; continue; } value = length = 0; while (length < 4 && exec(HEX, chr())) { value = value * 16 + parseInt(chr(), 16); pointer++; length++; } if (chr() === '.') { if (length === 0) return; pointer -= length; if (pieceIndex > 6) return; numbersSeen = 0; while (chr()) { ipv4Piece = null; if (numbersSeen > 0) { if (chr() === '.' && numbersSeen < 4) pointer++; else return; } if (!exec(DIGIT, chr())) return; while (exec(DIGIT, chr())) { number = parseInt(chr(), 10); if (ipv4Piece === null) ipv4Piece = number; else if (ipv4Piece === 0) return; else ipv4Piece = ipv4Piece * 10 + number; if (ipv4Piece > 255) return; pointer++; } address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece; numbersSeen++; if (numbersSeen === 2 || numbersSeen === 4) pieceIndex++; } if (numbersSeen !== 4) return; break; } else if (chr() === ':') { pointer++; if (!chr()) return; } else if (chr()) return; address[pieceIndex++] = value; } if (compress !== null) { swaps = pieceIndex - compress; pieceIndex = 7; while (pieceIndex !== 0 && swaps > 0) { swap = address[pieceIndex]; address[pieceIndex--] = address[compress + swaps - 1]; address[compress + --swaps] = swap; } } else if (pieceIndex !== 8) return; return address; }; var findLongestZeroSequence = function (ipv6) { var maxIndex = null; var maxLength = 1; var currStart = null; var currLength = 0; var index = 0; for (; index < 8; index++) { if (ipv6[index] !== 0) { if (currLength > maxLength) { maxIndex = currStart; maxLength = currLength; } currStart = null; currLength = 0; } else { if (currStart === null) currStart = index; ++currLength; } } return currLength > maxLength ? currStart : maxIndex; }; // https://url.spec.whatwg.org/#host-serializing var serializeHost = function (host) { var result, index, compress, ignore0; // ipv4 if (typeof host == 'number') { result = []; for (index = 0; index < 4; index++) { unshift(result, host % 256); host = floor(host / 256); } return join(result, '.'); } // ipv6 if (typeof host == 'object') { result = ''; compress = findLongestZeroSequence(host); for (index = 0; index < 8; index++) { if (ignore0 && host[index] === 0) continue; if (ignore0) ignore0 = false; if (compress === index) { result += index ? ':' : '::'; ignore0 = true; } else { result += numberToString(host[index], 16); if (index < 7) result += ':'; } } return '[' + result + ']'; } return host; }; var C0ControlPercentEncodeSet = {}; var queryPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { ' ': 1, '"': 1, '#': 1, '<': 1, '>': 1 }); var specialQueryPercentEncodeSet = assign({}, queryPercentEncodeSet, { "'": 1 }); var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, { ' ': 1, '"': 1, '<': 1, '>': 1, '`': 1 }); var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, { '#': 1, '?': 1, '{': 1, '}': 1, '^': 1 }); var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, { '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1 }); var percentEncode = function (chr, set) { var code = codeAt(chr, 0); // encodeURIComponent does not encode ', which is in the special-query percent-encode set return code >= 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : chr === "'" && hasOwn(set, chr) ? '%27' : encodeURIComponent(chr); }; // https://url.spec.whatwg.org/#special-scheme var specialSchemes = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 }; // https://url.spec.whatwg.org/#windows-drive-letter var isWindowsDriveLetter = function (string, normalized) { var second; return string.length === 2 && exec(ALPHA, charAt(string, 0)) && ((second = charAt(string, 1)) === ':' || (!normalized && second === '|')); }; // https://url.spec.whatwg.org/#start-with-a-windows-drive-letter var startsWithWindowsDriveLetter = function (string) { var third; return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && ( string.length === 2 || ((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#') ); }; // https://url.spec.whatwg.org/#single-dot-path-segment var isSingleDot = function (segment) { return segment === '.' || toLowerCase(segment) === '%2e'; }; // https://url.spec.whatwg.org/#double-dot-path-segment var isDoubleDot = function (segment) { segment = toLowerCase(segment); return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e'; }; // States: var SCHEME_START = {}; var SCHEME = {}; var NO_SCHEME = {}; var SPECIAL_RELATIVE_OR_AUTHORITY = {}; var PATH_OR_AUTHORITY = {}; var RELATIVE = {}; var RELATIVE_SLASH = {}; var SPECIAL_AUTHORITY_SLASHES = {}; var SPECIAL_AUTHORITY_IGNORE_SLASHES = {}; var AUTHORITY = {}; var HOST = {}; var HOSTNAME = {}; var PORT = {}; var FILE = {}; var FILE_SLASH = {}; var FILE_HOST = {}; var PATH_START = {}; var PATH = {}; var CANNOT_BE_A_BASE_URL_PATH = {}; var QUERY = {}; var FRAGMENT = {}; var URLState = function (url, isBase, base) { var urlString = $toString(url); var baseState, failure, searchParams; if (isBase) { failure = this.parse(urlString); if (failure) throw new TypeError(failure); this.searchParams = null; } else { if (base !== undefined) baseState = new URLState(base, true); failure = this.parse(urlString, null, baseState); if (failure) throw new TypeError(failure); searchParams = getInternalSearchParamsState(new URLSearchParams()); searchParams.bindURL(this); this.searchParams = searchParams; } }; URLState.prototype = { type: 'URL', // https://url.spec.whatwg.org/#url-parsing // eslint-disable-next-line max-statements -- TODO parse: function (input, stateOverride, base) { var url = this; var state = stateOverride || SCHEME_START; var pointer = 0; var buffer = ''; var seenAt = false; var seenBracket = false; var seenPasswordToken = false; var codePoints, chr, bufferCodePoints, failure; input = $toString(input); if (!stateOverride) { url.scheme = ''; url.username = ''; url.password = ''; url.host = null; url.port = null; url.path = []; url.query = null; url.fragment = null; url.cannotBeABaseURL = false; input = replace(input, LEADING_C0_CONTROL_OR_SPACE, ''); input = replace(input, TRAILING_C0_CONTROL_OR_SPACE, '$1'); } input = replace(input, TAB_AND_NEW_LINE, ''); codePoints = arrayFrom(input); while (pointer <= codePoints.length) { chr = codePoints[pointer]; switch (state) { case SCHEME_START: if (chr && exec(ALPHA, chr)) { buffer += toLowerCase(chr); state = SCHEME; } else if (!stateOverride) { state = NO_SCHEME; continue; } else return INVALID_SCHEME; break; case SCHEME: if (chr && exec(ALPHANUMERIC_PLUS_MINUS_DOT, chr)) { buffer += toLowerCase(chr); } else if (chr === ':') { if (stateOverride && ( (url.isSpecial() !== hasOwn(specialSchemes, buffer)) || (buffer === 'file' && (url.includesCredentials() || url.port !== null)) || (url.scheme === 'file' && url.host === '') )) return; url.scheme = buffer; if (stateOverride) { if (url.isSpecial() && specialSchemes[url.scheme] === url.port) url.port = null; return; } buffer = ''; if (url.scheme === 'file') { state = FILE; } else if (url.isSpecial() && base && base.scheme === url.scheme) { state = SPECIAL_RELATIVE_OR_AUTHORITY; } else if (url.isSpecial()) { state = SPECIAL_AUTHORITY_SLASHES; } else if (codePoints[pointer + 1] === '/') { state = PATH_OR_AUTHORITY; pointer++; } else { url.cannotBeABaseURL = true; push(url.path, ''); state = CANNOT_BE_A_BASE_URL_PATH; } } else if (!stateOverride) { buffer = ''; state = NO_SCHEME; pointer = 0; continue; } else return INVALID_SCHEME; break; case NO_SCHEME: if (!base || (base.cannotBeABaseURL && chr !== '#')) return INVALID_SCHEME; if (base.cannotBeABaseURL && chr === '#') { url.scheme = base.scheme; url.path = arraySlice(base.path); url.query = base.query; url.fragment = ''; url.cannotBeABaseURL = true; state = FRAGMENT; break; } state = base.scheme === 'file' ? FILE : RELATIVE; continue; case SPECIAL_RELATIVE_OR_AUTHORITY: if (chr === '/' && codePoints[pointer + 1] === '/') { state = SPECIAL_AUTHORITY_IGNORE_SLASHES; pointer++; } else { state = RELATIVE; continue; } break; case PATH_OR_AUTHORITY: if (chr === '/') { state = AUTHORITY; break; } else { state = PATH; continue; } case RELATIVE: url.scheme = base.scheme; if (chr === EOF) { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = arraySlice(base.path); url.query = base.query; } else if (chr === '/' || (chr === '\\' && url.isSpecial())) { state = RELATIVE_SLASH; } else if (chr === '?') { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = arraySlice(base.path); url.query = ''; state = QUERY; } else if (chr === '#') { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = arraySlice(base.path); url.query = base.query; url.fragment = ''; state = FRAGMENT; } else { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; url.path = arraySlice(base.path); if (url.path.length) url.path.length--; state = PATH; continue; } break; case RELATIVE_SLASH: if (url.isSpecial() && (chr === '/' || chr === '\\')) { state = SPECIAL_AUTHORITY_IGNORE_SLASHES; } else if (chr === '/') { state = AUTHORITY; } else { url.username = base.username; url.password = base.password; url.host = base.host; url.port = base.port; state = PATH; continue; } break; case SPECIAL_AUTHORITY_SLASHES: state = SPECIAL_AUTHORITY_IGNORE_SLASHES; if (chr !== '/' || codePoints[pointer + 1] !== '/') continue; pointer++; break; case SPECIAL_AUTHORITY_IGNORE_SLASHES: if (chr !== '/' && chr !== '\\') { state = AUTHORITY; continue; } break; case AUTHORITY: if (chr === '@') { if (seenAt) buffer = '%40' + buffer; seenAt = true; bufferCodePoints = arrayFrom(buffer); for (var i = 0; i < bufferCodePoints.length; i++) { var codePoint = bufferCodePoints[i]; if (codePoint === ':' && !seenPasswordToken) { seenPasswordToken = true; continue; } var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet); if (seenPasswordToken) url.password += encodedCodePoints; else url.username += encodedCodePoints; } buffer = ''; } else if ( chr === EOF || chr === '/' || chr === '?' || chr === '#' || (chr === '\\' && url.isSpecial()) ) { if (seenAt && buffer === '') return INVALID_AUTHORITY; pointer -= arrayFrom(buffer).length + 1; buffer = ''; state = HOST; } else buffer += chr; break; case HOST: case HOSTNAME: if (stateOverride && url.scheme === 'file') { state = FILE_HOST; continue; } else if (chr === ':' && !seenBracket) { if (buffer === '') return INVALID_HOST; if (stateOverride === HOSTNAME) return; failure = url.parseHost(buffer); if (failure) return failure; buffer = ''; state = PORT; } else if ( chr === EOF || chr === '/' || chr === '?' || chr === '#' || (chr === '\\' && url.isSpecial()) ) { if (url.isSpecial() && buffer === '') return INVALID_HOST; if (stateOverride && buffer === '' && (url.includesCredentials() || url.port !== null)) return; failure = url.parseHost(buffer); if (failure) return failure; buffer = ''; state = PATH_START; if (stateOverride) return; continue; } else { if (chr === '[') seenBracket = true; else if (chr === ']') seenBracket = false; buffer += chr; } break; case PORT: if (exec(DIGIT, chr)) { buffer += chr; } else if ( chr === EOF || chr === '/' || chr === '?' || chr === '#' || (chr === '\\' && url.isSpecial()) || stateOverride ) { if (buffer !== '') { var port = parseInt(buffer, 10); if (port > 0xFFFF) return INVALID_PORT; url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port; buffer = ''; } if (stateOverride) return; state = PATH_START; continue; } else return INVALID_PORT; break; case FILE: url.scheme = 'file'; url.host = ''; if (chr === '/' || chr === '\\') state = FILE_SLASH; else if (base && base.scheme === 'file') { switch (chr) { case EOF: url.host = base.host; url.path = arraySlice(base.path); url.query = base.query; break; case '?': url.host = base.host; url.path = arraySlice(base.path); url.query = ''; state = QUERY; break; case '#': url.host = base.host; url.path = arraySlice(base.path); url.query = base.query; url.fragment = ''; state = FRAGMENT; break; default: url.host = base.host; if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) { url.path = arraySlice(base.path); url.shortenPath(); } state = PATH; continue; } } else { state = PATH; continue; } break; case FILE_SLASH: if (chr === '/' || chr === '\\') { state = FILE_HOST; break; } if (base && base.scheme === 'file') { url.host = base.host; if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), '')) && isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]); } state = PATH; continue; case FILE_HOST: if (chr === EOF || chr === '/' || chr === '\\' || chr === '?' || chr === '#') { if (!stateOverride && isWindowsDriveLetter(buffer)) { state = PATH; } else if (buffer === '') { url.host = ''; if (stateOverride) return; state = PATH_START; } else { failure = url.parseHost(buffer); if (failure) return failure; if (url.host === 'localhost') url.host = ''; if (stateOverride) return; buffer = ''; state = PATH_START; } continue; } else buffer += chr; break; case PATH_START: if (url.isSpecial()) { state = PATH; if (chr !== '/' && chr !== '\\') continue; } else if (!stateOverride && chr === '?') { url.query = ''; state = QUERY; } else if (!stateOverride && chr === '#') { url.fragment = ''; state = FRAGMENT; } else if (chr !== EOF) { state = PATH; if (chr !== '/') continue; } break; case PATH: if ( chr === EOF || chr === '/' || (chr === '\\' && url.isSpecial()) || (!stateOverride && (chr === '?' || chr === '#')) ) { if (isDoubleDot(buffer)) { url.shortenPath(); if (chr !== '/' && !(chr === '\\' && url.isSpecial())) { push(url.path, ''); } } else if (isSingleDot(buffer)) { if (chr !== '/' && !(chr === '\\' && url.isSpecial())) { push(url.path, ''); } } else { if (url.scheme === 'file' && !url.path.length && isWindowsDriveLetter(buffer)) { if (url.host !== null && url.host !== '') url.host = ''; buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter } push(url.path, buffer); } buffer = ''; if (url.scheme === 'file' && (chr === EOF || chr === '?' || chr === '#')) { while (url.path.length > 1 && url.path[0] === '') { shift(url.path); } } if (chr === '?') { url.query = ''; state = QUERY; } else if (chr === '#') { url.fragment = ''; state = FRAGMENT; } } else { buffer += percentEncode(chr, pathPercentEncodeSet); } break; case CANNOT_BE_A_BASE_URL_PATH: if (chr === '?') { url.query = ''; state = QUERY; } else if (chr === '#') { url.fragment = ''; state = FRAGMENT; } else if (chr !== EOF) { url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet); } break; case QUERY: if (!stateOverride && chr === '#') { url.fragment = ''; state = FRAGMENT; } else if (chr !== EOF) { url.query += percentEncode(chr, url.isSpecial() ? specialQueryPercentEncodeSet : queryPercentEncodeSet); } break; case FRAGMENT: if (chr !== EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet); break; } pointer++; } }, // https://url.spec.whatwg.org/#host-parsing parseHost: function (input) { var result, codePoints, index; if (charAt(input, 0) === '[') { if (charAt(input, input.length - 1) !== ']') return INVALID_HOST; result = parseIPv6(stringSlice(input, 1, -1)); if (!result) return INVALID_HOST; this.host = result; // opaque host } else if (!this.isSpecial()) { if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST; result = ''; codePoints = arrayFrom(input); for (index = 0; index < codePoints.length; index++) { result += percentEncode(codePoints[index], C0ControlPercentEncodeSet); } this.host = result; } else { input = toASCII(input); if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST; if (endsInNumber(input)) { result = parseIPv4(input); if (result === null) return INVALID_HOST; this.host = result; } else { this.host = input; } } }, // https://url.spec.whatwg.org/#cannot-have-a-username-password-port cannotHaveUsernamePasswordPort: function () { return this.host === null || this.host === '' || this.cannotBeABaseURL || this.scheme === 'file'; }, // https://url.spec.whatwg.org/#include-credentials includesCredentials: function () { return this.username !== '' || this.password !== ''; }, // https://url.spec.whatwg.org/#is-special isSpecial: function () { return hasOwn(specialSchemes, this.scheme); }, // https://url.spec.whatwg.org/#shorten-a-urls-path shortenPath: function () { var path = this.path; var pathSize = path.length; if (pathSize && (this.scheme !== 'file' || pathSize !== 1 || !isWindowsDriveLetter(path[0], true))) { path.length--; } }, // https://url.spec.whatwg.org/#concept-url-serializer serialize: function () { var url = this; var scheme = url.scheme; var username = url.username; var password = url.password; var host = url.host; var port = url.port; var path = url.path; var query = url.query; var fragment = url.fragment; var output = scheme + ':'; if (host !== null) { output += '//'; if (url.includesCredentials()) { output += username + (password ? ':' + password : '') + '@'; } output += serializeHost(host); if (port !== null) output += ':' + port; } else if (scheme === 'file') output += '//'; if (host === null && !url.cannotBeABaseURL && path.length > 1 && path[0] === '') output += '/.'; output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : ''; if (query !== null) output += '?' + query; if (fragment !== null) output += '#' + fragment; return output; }, // https://url.spec.whatwg.org/#dom-url-href setHref: function (href) { var failure = this.parse(href); if (failure) throw new TypeError(failure); this.searchParams.update(); }, // https://url.spec.whatwg.org/#dom-url-origin getOrigin: function () { var scheme = this.scheme; var port = this.port; if (scheme === 'blob') try { return new URLConstructor(this.path[0]).origin; } catch (error) { return 'null'; } if (scheme === 'file' || !this.isSpecial()) return 'null'; return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : ''); }, // https://url.spec.whatwg.org/#dom-url-protocol getProtocol: function () { return this.scheme + ':'; }, setProtocol: function (protocol) { this.parse($toString(protocol) + ':', SCHEME_START); }, // https://url.spec.whatwg.org/#dom-url-username getUsername: function () { return this.username; }, setUsername: function (username) { var codePoints = arrayFrom($toString(username)); if (this.cannotHaveUsernamePasswordPort()) return; this.username = ''; for (var i = 0; i < codePoints.length; i++) { this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet); } }, // https://url.spec.whatwg.org/#dom-url-password getPassword: function () { return this.password; }, setPassword: function (password) { var codePoints = arrayFrom($toString(password)); if (this.cannotHaveUsernamePasswordPort()) return; this.password = ''; for (var i = 0; i < codePoints.length; i++) { this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet); } }, // https://url.spec.whatwg.org/#dom-url-host getHost: function () { var host = this.host; var port = this.port; return host === null ? '' : port === null ? serializeHost(host) : serializeHost(host) + ':' + port; }, setHost: function (host) { if (this.cannotBeABaseURL) return; this.parse(host, HOST); }, // https://url.spec.whatwg.org/#dom-url-hostname getHostname: function () { var host = this.host; return host === null ? '' : serializeHost(host); }, setHostname: function (hostname) { if (this.cannotBeABaseURL) return; this.parse(hostname, HOSTNAME); }, // https://url.spec.whatwg.org/#dom-url-port getPort: function () { var port = this.port; return port === null ? '' : $toString(port); }, setPort: function (port) { if (this.cannotHaveUsernamePasswordPort()) return; port = $toString(port); if (port === '') this.port = null; else this.parse(port, PORT); }, // https://url.spec.whatwg.org/#dom-url-pathname getPathname: function () { var path = this.path; return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : ''; }, setPathname: function (pathname) { if (this.cannotBeABaseURL) return; this.path = []; this.parse(pathname, PATH_START); }, // https://url.spec.whatwg.org/#dom-url-search getSearch: function () { var query = this.query; return query ? '?' + query : ''; }, setSearch: function (search) { search = $toString(search); if (search === '') { this.query = null; } else { if (charAt(search, 0) === '?') search = stringSlice(search, 1); this.query = ''; this.parse(search, QUERY); } this.searchParams.update(); }, // https://url.spec.whatwg.org/#dom-url-searchparams getSearchParams: function () { return this.searchParams.facade; }, // https://url.spec.whatwg.org/#dom-url-hash getHash: function () { var fragment = this.fragment; return fragment ? '#' + fragment : ''; }, setHash: function (hash) { hash = $toString(hash); if (hash === '') { this.fragment = null; return; } if (charAt(hash, 0) === '#') hash = stringSlice(hash, 1); this.fragment = ''; this.parse(hash, FRAGMENT); }, update: function () { this.query = this.searchParams.serialize() || null; } }; // `URL` constructor // https://url.spec.whatwg.org/#url-class var URLConstructor = function URL(url /* , base */) { var that = anInstance(this, URLPrototype); var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined; var state = setInternalState(that, new URLState(url, false, base)); if (!DESCRIPTORS) { that.href = state.serialize(); that.origin = state.getOrigin(); that.protocol = state.getProtocol(); that.username = state.getUsername(); that.password = state.getPassword(); that.host = state.getHost(); that.hostname = state.getHostname(); that.port = state.getPort(); that.pathname = state.getPathname(); that.search = state.getSearch(); that.searchParams = state.getSearchParams(); that.hash = state.getHash(); } }; var URLPrototype = URLConstructor.prototype; var accessorDescriptor = function (getter, setter) { return { get: function () { return getInternalURLState(this)[getter](); }, set: setter && function (value) { return getInternalURLState(this)[setter](value); }, configurable: true, enumerable: true }; }; if (DESCRIPTORS) { // `URL.prototype.href` accessors pair // https://url.spec.whatwg.org/#dom-url-href defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref')); // `URL.prototype.origin` getter // https://url.spec.whatwg.org/#dom-url-origin defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin')); // `URL.prototype.protocol` accessors pair // https://url.spec.whatwg.org/#dom-url-protocol defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol')); // `URL.prototype.username` accessors pair // https://url.spec.whatwg.org/#dom-url-username defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername')); // `URL.prototype.password` accessors pair // https://url.spec.whatwg.org/#dom-url-password defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword')); // `URL.prototype.host` accessors pair // https://url.spec.whatwg.org/#dom-url-host defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost')); // `URL.prototype.hostname` accessors pair // https://url.spec.whatwg.org/#dom-url-hostname defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname')); // `URL.prototype.port` accessors pair // https://url.spec.whatwg.org/#dom-url-port defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort')); // `URL.prototype.pathname` accessors pair // https://url.spec.whatwg.org/#dom-url-pathname defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname')); // `URL.prototype.search` accessors pair // https://url.spec.whatwg.org/#dom-url-search defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch')); // `URL.prototype.searchParams` getter // https://url.spec.whatwg.org/#dom-url-searchparams defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams')); // `URL.prototype.hash` accessors pair // https://url.spec.whatwg.org/#dom-url-hash defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash')); } // `URL.prototype.toJSON` method // https://url.spec.whatwg.org/#dom-url-tojson defineBuiltIn(URLPrototype, 'toJSON', function toJSON() { return getInternalURLState(this).serialize(); }, { enumerable: true }); // `URL.prototype.toString` method // https://url.spec.whatwg.org/#URL-stringification-behavior defineBuiltIn(URLPrototype, 'toString', function toString() { return getInternalURLState(this).serialize(); }, { enumerable: true }); if (NativeURL) { var nativeCreateObjectURL = NativeURL.createObjectURL; var nativeRevokeObjectURL = NativeURL.revokeObjectURL; // `URL.createObjectURL` method // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL)); // `URL.revokeObjectURL` method // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL)); } setToStringTag(URLConstructor, 'URL'); $({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, { URL: URLConstructor }); /***/ }), /***/ "40d5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); module.exports = !fails(function () { // eslint-disable-next-line es/no-function-prototype-bind -- safe var test = function () { /* empty */ }.bind(); // eslint-disable-next-line no-prototype-builtins -- safe return typeof test != 'function' || test.hasOwnProperty('prototype'); }); /***/ }), /***/ "40e9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $transfer = __webpack_require__("41f6"); // `ArrayBuffer.prototype.transferToFixedLength` method // https://tc39.es/ecma262/#sec-arraybuffer.prototype.transfertofixedlength if ($transfer) $({ target: 'ArrayBuffer', proto: true }, { transferToFixedLength: function transferToFixedLength() { return $transfer(this, arguments.length ? arguments[0] : undefined, false); } }); /***/ }), /***/ "418f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var anObjectOrUndefined = __webpack_require__("f69d"); var anUint8Array = __webpack_require__("6b37"); var notDetached = __webpack_require__("2005"); var base64Map = __webpack_require__("b917"); var getAlphabetOption = __webpack_require__("da63"); var base64Alphabet = base64Map.i2c; var base64UrlAlphabet = base64Map.i2cUrl; var charAt = uncurryThis(''.charAt); var Uint8Array = globalThis.Uint8Array; var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toBase64 || !function () { try { var target = new Uint8Array(); target.toBase64(null); } catch (error) { return true; } }(); // `Uint8Array.prototype.toBase64` method // https://tc39.es/ecma262/#sec-uint8array.prototype.tobase64 if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, { toBase64: function toBase64(/* options */) { var array = anUint8Array(this); var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined; var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet; var omitPadding = !!options && !!options.omitPadding; notDetached(this.buffer); var result = ''; var i = 0; var length = array.length; var triplet; var at = function (shift) { return charAt(alphabet, (triplet >> (6 * shift)) & 63); }; for (; i + 2 < length; i += 3) { triplet = (array[i] << 16) + (array[i + 1] << 8) + array[i + 2]; result += at(3) + at(2) + at(1) + at(0); } if (i + 2 === length) { triplet = (array[i] << 16) + (array[i + 1] << 8); result += at(3) + at(2) + at(1) + (omitPadding ? '' : '='); } else if (i + 1 === length) { triplet = array[i] << 16; result += at(3) + at(2) + (omitPadding ? '' : '=='); } return result; } }); /***/ }), /***/ "41d0": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable no-bitwise, no-mixed-operators, class-methods-use-this, camelcase */ const {BigInteger} = __webpack_require__("f33e") const _ = __webpack_require__("dffd") const copyArray = function (sourceArray, sourceIndex, destinationArray, destinationIndex, length) { for (let i = 0; i < length; i++) { destinationArray[destinationIndex + i] = sourceArray[sourceIndex + i] } } const Int32 = { minValue: -0b10000000000000000000000000000000, maxValue: 0b1111111111111111111111111111111, parse(n) { if (n < this.minValue) { const bigInteger = Number(-n) const bigIntegerRadix = bigInteger.toString(2) const subBigIntegerRadix = bigIntegerRadix.substr(bigIntegerRadix.length - 31, 31) let reBigIntegerRadix = '' for (let i = 0; i < subBigIntegerRadix.length; i++) { const subBigIntegerRadixItem = subBigIntegerRadix.substr(i, 1) reBigIntegerRadix += subBigIntegerRadixItem === '0' ? '1' : '0' } const result = parseInt(reBigIntegerRadix, 2) return (result + 1) } else if (n > this.maxValue) { const bigInteger = Number(n) const bigIntegerRadix = bigInteger.toString(2) const subBigIntegerRadix = bigIntegerRadix.substr(bigIntegerRadix.length - 31, 31) let reBigIntegerRadix = '' for (let i = 0; i < subBigIntegerRadix.length; i++) { const subBigIntegerRadixItem = subBigIntegerRadix.substr(i, 1) reBigIntegerRadix += subBigIntegerRadixItem === '0' ? '1' : '0' } const result = parseInt(reBigIntegerRadix, 2) return -(result + 1) } else { return n } }, parseByte(n) { if (n < 0) { const bigInteger = Number(-n) const bigIntegerRadix = bigInteger.toString(2) const subBigIntegerRadix = bigIntegerRadix.substr(bigIntegerRadix.length - 8, 8) let reBigIntegerRadix = '' for (let i = 0; i < subBigIntegerRadix.length; i++) { const subBigIntegerRadixItem = subBigIntegerRadix.substr(i, 1) reBigIntegerRadix += subBigIntegerRadixItem === '0' ? '1' : '0' } const result = parseInt(reBigIntegerRadix, 2) return (result + 1) % 256 } else if (n > 255) { const bigInteger = Number(n) const bigIntegerRadix = bigInteger.toString(2) return parseInt(bigIntegerRadix.substr(bigIntegerRadix.length - 8, 8), 2) } else { return n } } } class SM3Digest { constructor(...args) { this.xBuf = [] this.xBufOff = 0 this.byteCount = 0 this.DIGEST_LENGTH = 32 this.v0 = [0x7380166f, 0x4914b2b9, 0x172442d7, 0xda8a0600, 0xa96f30bc, 0x163138aa, 0xe38dee4d, 0xb0fb0e4e] this.v0 = [0x7380166f, 0x4914b2b9, 0x172442d7, -628488704, -1452330820, 0x163138aa, -477237683, -1325724082] this.v = new Array(8) this.v_ = new Array(8) this.X0 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] this.X = new Array(68) this.xOff = 0 this.T_00_15 = 0x79cc4519 this.T_16_63 = 0x7a879d8a if (args.length > 0) { this.initDigest(args[0]) } else { this.init() } } init() { this.xBuf = new Array(4) this.reset() } initDigest(t) { this.xBuf = [].concat(t.xBuf) this.xBufOff = t.xBufOff this.byteCount = t.byteCount copyArray(t.X, 0, this.X, 0, t.X.length) this.xOff = t.xOff copyArray(t.v, 0, this.v, 0, t.v.length) } getDigestSize() { return this.DIGEST_LENGTH } reset() { this.byteCount = 0 this.xBufOff = 0 const keys = Object.keys(this.xBuf) for (let i = 0, len = keys.length; i < len; i++) this.xBuf[keys[i]] = null copyArray(this.v0, 0, this.v, 0, this.v0.length) this.xOff = 0 copyArray(this.X0, 0, this.X, 0, this.X0.length) } processBlock() { let i const ww = this.X const ww_ = new Array(64) for (i = 16; i < 68; i++) { ww[i] = this.p1(ww[i - 16] ^ ww[i - 9] ^ (this.rotate(ww[i - 3], 15))) ^ (this.rotate(ww[i - 13], 7)) ^ ww[i - 6] } for (i = 0; i < 64; i++) { ww_[i] = ww[i] ^ ww[i + 4] } const vv = this.v const vv_ = this.v_ copyArray(vv, 0, vv_, 0, this.v0.length) let SS1 let SS2 let TT1 let TT2 let aaa for (i = 0; i < 16; i++) { aaa = this.rotate(vv_[0], 12) SS1 = Int32.parse(Int32.parse(aaa + vv_[4]) + this.rotate(this.T_00_15, i)) SS1 = this.rotate(SS1, 7) SS2 = SS1 ^ aaa TT1 = Int32.parse(Int32.parse(this.ff_00_15(vv_[0], vv_[1], vv_[2]) + vv_[3]) + SS2) + ww_[i] TT2 = Int32.parse(Int32.parse(this.gg_00_15(vv_[4], vv_[5], vv_[6]) + vv_[7]) + SS1) + ww[i] vv_[3] = vv_[2] vv_[2] = this.rotate(vv_[1], 9) vv_[1] = vv_[0] vv_[0] = TT1 vv_[7] = vv_[6] vv_[6] = this.rotate(vv_[5], 19) vv_[5] = vv_[4] vv_[4] = this.p0(TT2) } for (i = 16; i < 64; i++) { aaa = this.rotate(vv_[0], 12) SS1 = Int32.parse(Int32.parse(aaa + vv_[4]) + this.rotate(this.T_16_63, i)) SS1 = this.rotate(SS1, 7) SS2 = SS1 ^ aaa TT1 = Int32.parse(Int32.parse(this.ff_16_63(vv_[0], vv_[1], vv_[2]) + vv_[3]) + SS2) + ww_[i] TT2 = Int32.parse(Int32.parse(this.gg_16_63(vv_[4], vv_[5], vv_[6]) + vv_[7]) + SS1) + ww[i] vv_[3] = vv_[2] vv_[2] = this.rotate(vv_[1], 9) vv_[1] = vv_[0] vv_[0] = TT1 vv_[7] = vv_[6] vv_[6] = this.rotate(vv_[5], 19) vv_[5] = vv_[4] vv_[4] = this.p0(TT2) } for (i = 0; i < 8; i++) { vv[i] ^= Int32.parse(vv_[i]) } this.xOff = 0 copyArray(this.X0, 0, this.X, 0, this.X0.length) } processWord(in_Renamed, inOff) { let n = in_Renamed[inOff] << 24 n |= (in_Renamed[++inOff] & 0xff) << 16 n |= (in_Renamed[++inOff] & 0xff) << 8 n |= (in_Renamed[++inOff] & 0xff) this.X[this.xOff] = n if (++this.xOff === 16) { this.processBlock() } } processLength(bitLength) { if (this.xOff > 14) { this.processBlock() } this.X[14] = (this.urShiftLong(bitLength, 32)) this.X[15] = (bitLength & (0xffffffff)) } intToBigEndian(n, bs, off) { bs[off] = Int32.parseByte(this.urShift(n, 24)) & 0xff bs[++off] = Int32.parseByte(this.urShift(n, 16)) & 0xff bs[++off] = Int32.parseByte(this.urShift(n, 8)) & 0xff bs[++off] = Int32.parseByte(n) & 0xff } doFinal(out_Renamed, outOff) { this.finish() for (let i = 0; i < 8; i++) { this.intToBigEndian(this.v[i], out_Renamed, outOff + i * 4) } this.reset() return this.DIGEST_LENGTH } update(input) { this.xBuf[this.xBufOff++] = input if (this.xBufOff === this.xBuf.length) { this.processWord(this.xBuf, 0) this.xBufOff = 0 } this.byteCount++ } blockUpdate(input, inOff, length) { while ((this.xBufOff !== 0) && (length > 0)) { this.update(input[inOff]) inOff++ length-- } while (length > this.xBuf.length) { this.processWord(input, inOff) inOff += this.xBuf.length length -= this.xBuf.length this.byteCount += this.xBuf.length } while (length > 0) { this.update(input[inOff]) inOff++ length-- } } finish() { const bitLength = (this.byteCount << 3) this.update((128)) while (this.xBufOff !== 0) this.update((0)) this.processLength(bitLength) this.processBlock() } rotate(x, n) { return (x << n) | (this.urShift(x, (32 - n))) } p0(X) { return ((X) ^ this.rotate((X), 9) ^ this.rotate((X), 17)) } p1(X) { return ((X) ^ this.rotate((X), 15) ^ this.rotate((X), 23)) } ff_00_15(X, Y, Z) { return (X ^ Y ^ Z) } ff_16_63(X, Y, Z) { return ((X & Y) | (X & Z) | (Y & Z)) } gg_00_15(X, Y, Z) { return (X ^ Y ^ Z) } gg_16_63(X, Y, Z) { return ((X & Y) | (~X & Z)) } urShift(number, bits) { if (number > Int32.maxValue || number < Int32.minValue) { number = Int32.parse(number) } return number >>> bits } urShiftLong(number, bits) { let returnV const big = new BigInteger() big.fromInt(number) if (big.signum() >= 0) { returnV = big.shiftRight(bits).intValue() } else { const bigAdd = new BigInteger() bigAdd.fromInt(2) const shiftLeftBits = ~bits let shiftLeftNumber = '' if (shiftLeftBits < 0) { const shiftRightBits = 64 + shiftLeftBits for (let i = 0; i < shiftRightBits; i++) { shiftLeftNumber += '0' } const shiftLeftNumberBigAdd = new BigInteger() shiftLeftNumberBigAdd.fromInt(number >> bits) const shiftLeftNumberBig = new BigInteger('10' + shiftLeftNumber, 2) shiftLeftNumber = shiftLeftNumberBig.toRadix(10) const r = shiftLeftNumberBig.add(shiftLeftNumberBigAdd) returnV = r.toRadix(10) } else { shiftLeftNumber = bigAdd.shiftLeft((~bits)).intValue() returnV = (number >> bits) + shiftLeftNumber } } return returnV } getZ(g, publicKey, userId) { // ZA=H256(ENTLA ∥ IDA ∥ a ∥ b ∥ xG ∥ yG ∥xA ∥yA) let len = 0 if (userId) { if (typeof userId !== 'string') throw new Error(`sm2: Type of userId Must be String! Receive Type: ${typeof userId}`) if (userId.length >= 8192) throw new Error(`sm2: The Length of userId Must Less Than 8192! Length: ${userId.length}`) userId = _.parseUtf8StringToHex(userId) len = userId.length * 4 } this.update((len >> 8 & 0x00ff)) this.update((len & 0x00ff)) if (userId) { const userIdWords = _.hexToArray(userId) this.blockUpdate(userIdWords, 0, userIdWords.length) } const aWords = _.hexToArray(_.leftPad(g.curve.a.toBigInteger().toRadix(16), 64)) const bWords = _.hexToArray(_.leftPad(g.curve.b.toBigInteger().toRadix(16), 64)) const gxWords = _.hexToArray(_.leftPad(g.getX().toBigInteger().toRadix(16), 64)) const gyWords = _.hexToArray(_.leftPad(g.getY().toBigInteger().toRadix(16), 64)) const pxWords = _.hexToArray(publicKey.substr(0, 64)) const pyWords = _.hexToArray(publicKey.substr(64, 64)) this.blockUpdate(aWords, 0, aWords.length) this.blockUpdate(bWords, 0, bWords.length) this.blockUpdate(gxWords, 0, gxWords.length) this.blockUpdate(gyWords, 0, gyWords.length) this.blockUpdate(pxWords, 0, pxWords.length) this.blockUpdate(pyWords, 0, pyWords.length) const md = new Array(this.getDigestSize()) this.doFinal(md, 0) return md } } module.exports = SM3Digest /***/ }), /***/ "41f6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var uncurryThisAccessor = __webpack_require__("7282"); var toIndex = __webpack_require__("0b25"); var notDetached = __webpack_require__("2005"); var arrayBufferByteLength = __webpack_require__("b620"); var detachTransferable = __webpack_require__("36f2"); var PROPER_STRUCTURED_CLONE_TRANSFER = __webpack_require__("dbe5"); var structuredClone = globalThis.structuredClone; var ArrayBuffer = globalThis.ArrayBuffer; var DataView = globalThis.DataView; var max = Math.max; var min = Math.min; var ArrayBufferPrototype = ArrayBuffer.prototype; var DataViewPrototype = DataView.prototype; var slice = uncurryThis(ArrayBufferPrototype.slice); var isResizable = uncurryThisAccessor(ArrayBufferPrototype, 'resizable', 'get'); var maxByteLength = uncurryThisAccessor(ArrayBufferPrototype, 'maxByteLength', 'get'); var getInt8 = uncurryThis(DataViewPrototype.getInt8); var setInt8 = uncurryThis(DataViewPrototype.setInt8); module.exports = (PROPER_STRUCTURED_CLONE_TRANSFER || detachTransferable) && function (arrayBuffer, newLength, preserveResizability) { var byteLength = arrayBufferByteLength(arrayBuffer); var newByteLength = newLength === undefined ? byteLength : toIndex(newLength); var fixedLength = !isResizable || !isResizable(arrayBuffer); var newBuffer; notDetached(arrayBuffer); if (PROPER_STRUCTURED_CLONE_TRANSFER) { arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] }); if (byteLength === newByteLength && (preserveResizability || fixedLength)) return arrayBuffer; } if (byteLength >= newByteLength && (!preserveResizability || fixedLength)) { newBuffer = slice(arrayBuffer, 0, newByteLength); } else { var options = preserveResizability && !fixedLength && maxByteLength ? { maxByteLength: max(newByteLength, maxByteLength(arrayBuffer)) } : undefined; newBuffer = new ArrayBuffer(newByteLength, options); var a = new DataView(arrayBuffer); var b = new DataView(newBuffer); var copyLength = min(newByteLength, byteLength); for (var i = 0; i < copyLength; i++) setInt8(b, i, getInt8(a, i)); } if (!PROPER_STRUCTURED_CLONE_TRANSFER) detachTransferable(arrayBuffer); return newBuffer; }; /***/ }), /***/ "428f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); module.exports = globalThis; /***/ }), /***/ "4362": /***/ (function(module, exports, __webpack_require__) { exports.nextTick = function nextTick(fn) { var args = Array.prototype.slice.call(arguments); args.shift(); setTimeout(function () { fn.apply(null, args); }, 0); }; exports.platform = exports.arch = exports.execPath = exports.title = 'browser'; exports.pid = 1; exports.browser = true; exports.env = {}; exports.argv = []; exports.binding = function (name) { throw new Error('No such module. (Possibly not yet loaded)') }; (function () { var cwd = '/'; var path; exports.cwd = function () { return cwd }; exports.chdir = function (dir) { if (!path) path = __webpack_require__("df7c"); cwd = path.resolve(dir, cwd); }; })(); exports.exit = exports.kill = exports.umask = exports.dlopen = exports.uptime = exports.memoryUsage = exports.uvCounters = function() {}; exports.features = {}; /***/ }), /***/ "44ad": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var classof = __webpack_require__("c6b6"); var $Object = Object; var split = uncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !$Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) === 'String' ? split(it, '') : $Object(it); } : $Object; /***/ }), /***/ "44d2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var create = __webpack_require__("7c73"); var defineProperty = __webpack_require__("9bf2").f; var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] === undefined) { defineProperty(ArrayPrototype, UNSCOPABLES, { configurable: true, value: create(null) }); } // add a key to Array.prototype[@@unscopables] module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; /***/ }), /***/ "44de": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function (a, b) { try { // eslint-disable-next-line no-console -- safe arguments.length === 1 ? console.error(a) : console.error(a, b); } catch (error) { /* empty */ } }; /***/ }), /***/ "44e7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var classof = __webpack_require__("c6b6"); var wellKnownSymbol = __webpack_require__("b622"); var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) === 'RegExp'); }; /***/ }), /***/ "4625": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classofRaw = __webpack_require__("c6b6"); var uncurryThis = __webpack_require__("e330"); module.exports = function (fn) { // Nashorn bug: // https://github.com/zloirock/core-js/issues/1128 // https://github.com/zloirock/core-js/issues/1130 if (classofRaw(fn) === 'Function') return uncurryThis(fn); }; /***/ }), /***/ "4661": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("2532"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('String', 'includes'); /***/ }), /***/ "46c4": /***/ (function(module, exports, __webpack_require__) { "use strict"; // `GetIteratorDirect(obj)` abstract operation // https://tc39.es/ecma262/#sec-getiteratordirect module.exports = function (obj) { return { iterator: obj, next: obj.next, done: false }; }; /***/ }), /***/ "4701": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable no-case-declarations, max-len */ const {BigInteger} = __webpack_require__("f33e") /** * thanks for Tom Wu : http://www-cs-students.stanford.edu/~tjw/jsbn/ * * Basic Javascript Elliptic Curve implementation * Ported loosely from BouncyCastle's Java EC code * Only Fp curves implemented for now */ const THREE = new BigInteger('3') /** * 椭圆曲线域元素 */ class ECFieldElementFp { constructor(q, x) { this.x = x this.q = q // TODO if (x.compareTo(q) >= 0) error } /** * 判断相等 */ equals(other) { if (other === this) return true return (this.q.equals(other.q) && this.x.equals(other.x)) } /** * 返回具体数值 */ toBigInteger() { return this.x } /** * 取反 */ negate() { return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)) } /** * 相加 */ add(b) { return new ECFieldElementFp(this.q, this.x.add(b.toBigInteger()).mod(this.q)) } /** * 相减 */ subtract(b) { return new ECFieldElementFp(this.q, this.x.subtract(b.toBigInteger()).mod(this.q)) } /** * 相乘 */ multiply(b) { return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger()).mod(this.q)) } /** * 相除 */ divide(b) { return new ECFieldElementFp(this.q, this.x.multiply(b.toBigInteger().modInverse(this.q)).mod(this.q)) } /** * 平方 */ square() { return new ECFieldElementFp(this.q, this.x.square().mod(this.q)) } } class ECPointFp { constructor(curve, x, y, z) { this.curve = curve this.x = x this.y = y // 标准射影坐标系:zinv == null 或 z * zinv == 1 this.z = z == null ? BigInteger.ONE : z this.zinv = null // TODO: compression flag } getX() { if (this.zinv === null) this.zinv = this.z.modInverse(this.curve.q) return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q)) } getY() { if (this.zinv === null) this.zinv = this.z.modInverse(this.curve.q) return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q)) } /** * 判断相等 */ equals(other) { if (other === this) return true if (this.isInfinity()) return other.isInfinity() if (other.isInfinity()) return this.isInfinity() // u = y2 * z1 - y1 * z2 const u = other.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(other.z)).mod(this.curve.q) if (!u.equals(BigInteger.ZERO)) return false // v = x2 * z1 - x1 * z2 const v = other.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(other.z)).mod(this.curve.q) return v.equals(BigInteger.ZERO) } /** * 是否是无穷远点 */ isInfinity() { if ((this.x === null) && (this.y === null)) return true return this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO) } /** * 取反,x 轴对称点 */ negate() { return new ECPointFp(this.curve, this.x, this.y.negate(), this.z) } /** * 相加 * * 标准射影坐标系: * * λ1 = x1 * z2 * λ2 = x2 * z1 * λ3 = λ1 − λ2 * λ4 = y1 * z2 * λ5 = y2 * z1 * λ6 = λ4 − λ5 * λ7 = λ1 + λ2 * λ8 = z1 * z2 * λ9 = λ3^2 * λ10 = λ3 * λ9 * λ11 = λ8 * λ6^2 − λ7 * λ9 * x3 = λ3 * λ11 * y3 = λ6 * (λ9 * λ1 − λ11) − λ4 * λ10 * z3 = λ10 * λ8 */ add(b) { if (this.isInfinity()) return b if (b.isInfinity()) return this const x1 = this.x.toBigInteger() const y1 = this.y.toBigInteger() const z1 = this.z const x2 = b.x.toBigInteger() const y2 = b.y.toBigInteger() const z2 = b.z const q = this.curve.q const w1 = x1.multiply(z2).mod(q) const w2 = x2.multiply(z1).mod(q) const w3 = w1.subtract(w2) const w4 = y1.multiply(z2).mod(q) const w5 = y2.multiply(z1).mod(q) const w6 = w4.subtract(w5) if (BigInteger.ZERO.equals(w3)) { if (BigInteger.ZERO.equals(w6)) { return this.twice() // this == b,计算自加 } return this.curve.infinity // this == -b,则返回无穷远点 } const w7 = w1.add(w2) const w8 = z1.multiply(z2).mod(q) const w9 = w3.square().mod(q) const w10 = w3.multiply(w9).mod(q) const w11 = w8.multiply(w6.square()).subtract(w7.multiply(w9)).mod(q) const x3 = w3.multiply(w11).mod(q) const y3 = w6.multiply(w9.multiply(w1).subtract(w11)).subtract(w4.multiply(w10)).mod(q) const z3 = w10.multiply(w8).mod(q) return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3) } /** * 自加 * * 标准射影坐标系: * * λ1 = 3 * x1^2 + a * z1^2 * λ2 = 2 * y1 * z1 * λ3 = y1^2 * λ4 = λ3 * x1 * z1 * λ5 = λ2^2 * λ6 = λ1^2 − 8 * λ4 * x3 = λ2 * λ6 * y3 = λ1 * (4 * λ4 − λ6) − 2 * λ5 * λ3 * z3 = λ2 * λ5 */ twice() { if (this.isInfinity()) return this if (!this.y.toBigInteger().signum()) return this.curve.infinity const x1 = this.x.toBigInteger() const y1 = this.y.toBigInteger() const z1 = this.z const q = this.curve.q const a = this.curve.a.toBigInteger() const w1 = x1.square().multiply(THREE).add(a.multiply(z1.square())).mod(q) const w2 = y1.shiftLeft(1).multiply(z1).mod(q) const w3 = y1.square().mod(q) const w4 = w3.multiply(x1).multiply(z1).mod(q) const w5 = w2.square().mod(q) const w6 = w1.square().subtract(w4.shiftLeft(3)).mod(q) const x3 = w2.multiply(w6).mod(q) const y3 = w1.multiply(w4.shiftLeft(2).subtract(w6)).subtract(w5.shiftLeft(1).multiply(w3)).mod(q) const z3 = w2.multiply(w5).mod(q) return new ECPointFp(this.curve, this.curve.fromBigInteger(x3), this.curve.fromBigInteger(y3), z3) } /** * 倍点计算 */ multiply(k) { if (this.isInfinity()) return this if (!k.signum()) return this.curve.infinity // 使用加减法 const k3 = k.multiply(THREE) const neg = this.negate() let Q = this for (let i = k3.bitLength() - 2; i > 0; i--) { Q = Q.twice() const k3Bit = k3.testBit(i) const kBit = k.testBit(i) if (k3Bit !== kBit) { Q = Q.add(k3Bit ? this : neg) } } return Q } } /** * 椭圆曲线 y^2 = x^3 + ax + b */ class ECCurveFp { constructor(q, a, b) { this.q = q this.a = this.fromBigInteger(a) this.b = this.fromBigInteger(b) this.infinity = new ECPointFp(this, null, null) // 无穷远点 } /** * 判断两个椭圆曲线是否相等 */ equals(other) { if (other === this) return true return (this.q.equals(other.q) && this.a.equals(other.a) && this.b.equals(other.b)) } /** * 生成椭圆曲线域元素 */ fromBigInteger(x) { return new ECFieldElementFp(this.q, x) } /** * 解析 16 进制串为椭圆曲线点 */ decodePointHex(s) { switch (parseInt(s.substr(0, 2), 16)) { // 第一个字节 case 0: return this.infinity case 2: case 3: // 不支持的压缩方式 return null case 4: case 6: case 7: const len = (s.length - 2) / 2 const xHex = s.substr(2, len) const yHex = s.substr(len + 2, len) return new ECPointFp(this, this.fromBigInteger(new BigInteger(xHex, 16)), this.fromBigInteger(new BigInteger(yHex, 16))) default: // 不支持 return null } } } module.exports = { ECPointFp, ECCurveFp, } /***/ }), /***/ "4738": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var NativePromiseConstructor = __webpack_require__("d256"); var isCallable = __webpack_require__("1626"); var isForced = __webpack_require__("94ca"); var inspectSource = __webpack_require__("8925"); var wellKnownSymbol = __webpack_require__("b622"); var ENVIRONMENT = __webpack_require__("8558"); var IS_PURE = __webpack_require__("c430"); var V8_VERSION = __webpack_require__("1212"); var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; var SPECIES = wellKnownSymbol('species'); var SUBCLASSING = false; var NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent); var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () { var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor); var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor); // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // We can't detect it synchronously, so just check versions if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; // We need Promise#{ catch, finally } in the pure version for preventing prototype pollution if (IS_PURE && !(NativePromisePrototype['catch'] && NativePromisePrototype['finally'])) return true; // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation // https://github.com/zloirock/core-js/issues/679 if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) { // Detect correctness of subclassing with @@species support var promise = new NativePromiseConstructor(function (resolve) { resolve(1); }); var FakePromise = function (exec) { exec(function () { /* empty */ }, function () { /* empty */ }); }; var constructor = promise.constructor = {}; constructor[SPECIES] = FakePromise; SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; if (!SUBCLASSING) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test } return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT; }); module.exports = { CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR, REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT, SUBCLASSING: SUBCLASSING }; /***/ }), /***/ "4754": /***/ (function(module, exports, __webpack_require__) { "use strict"; // `CreateIterResultObject` abstract operation // https://tc39.es/ecma262/#sec-createiterresultobject module.exports = function (value, done) { return { value: value, done: done }; }; /***/ }), /***/ "476b": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("843c"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('String', 'padEnd'); /***/ }), /***/ "4840": /***/ (function(module, exports, __webpack_require__) { "use strict"; var anObject = __webpack_require__("825a"); var aConstructor = __webpack_require__("5087"); var isNullOrUndefined = __webpack_require__("7234"); var wellKnownSymbol = __webpack_require__("b622"); var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor module.exports = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || isNullOrUndefined(S = anObject(C)[SPECIES]) ? defaultConstructor : aConstructor(S); }; /***/ }), /***/ "485a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var $TypeError = TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive module.exports = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw new $TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ "4b11": /***/ (function(module, exports, __webpack_require__) { "use strict"; // eslint-disable-next-line es/no-typed-arrays -- safe module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined'; /***/ }), /***/ "4d64": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIndexedObject = __webpack_require__("fc6a"); var toAbsoluteIndex = __webpack_require__("23cb"); var lengthOfArrayLike = __webpack_require__("07fa"); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); if (length === 0) return !IS_INCLUDES && -1; var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare -- NaN check if (IS_INCLUDES && el !== el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check if (value !== value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; /***/ }), /***/ "4d90": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $padStart = __webpack_require__("0ccb").start; var WEBKIT_BUG = __webpack_require__("9a0c"); // `String.prototype.padStart` method // https://tc39.es/ecma262/#sec-string.prototype.padstart $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { padStart: function padStart(maxLength /* , fillString = ' ' */) { return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ "4df4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__("0366"); var call = __webpack_require__("c65b"); var toObject = __webpack_require__("7b0b"); var callWithSafeIterationClosing = __webpack_require__("9bdd"); var isArrayIteratorMethod = __webpack_require__("e95a"); var isConstructor = __webpack_require__("68ee"); var lengthOfArrayLike = __webpack_require__("07fa"); var createProperty = __webpack_require__("8418"); var setArrayLength = __webpack_require__("3a34"); var getIterator = __webpack_require__("9a1f"); var getIteratorMethod = __webpack_require__("35a1"); var iteratorClose = __webpack_require__("2a62"); var $Array = Array; // `Array.from` method implementation // https://tc39.es/ecma262/#sec-array.from module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var IS_CONSTRUCTOR = isConstructor(this); var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined); var O = toObject(arrayLike); var iteratorMethod = getIteratorMethod(O); var index = 0; var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) { result = IS_CONSTRUCTOR ? new this() : []; iterator = getIterator(O, iteratorMethod); next = iterator.next; for (;!(step = call(next, iterator)).done; index++) { value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; try { createProperty(result, index, value); } catch (error) { iteratorClose(iterator, 'throw', error); } } } else { length = lengthOfArrayLike(O); result = IS_CONSTRUCTOR ? new this(length) : $Array(length); for (;length > index; index++) { value = mapping ? mapfn(O[index], index) : O[index]; createProperty(result, index, value); } } setArrayLength(result, index); return result; }; /***/ }), /***/ "4e28": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("07ac"); var path = __webpack_require__("428f"); module.exports = path.Object.values; /***/ }), /***/ "4ea1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var isBigIntArray = __webpack_require__("bcbf"); var lengthOfArrayLike = __webpack_require__("07fa"); var toIntegerOrInfinity = __webpack_require__("5926"); var toBigInt = __webpack_require__("f495"); var aTypedArray = ArrayBufferViewCore.aTypedArray; var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $RangeError = RangeError; var PROPER_ORDER = function () { try { // eslint-disable-next-line no-throw-literal, es/no-typed-arrays, es/no-array-prototype-with -- required for testing new Int8Array(1)['with'](2, { valueOf: function () { throw 8; } }); } catch (error) { // some early implementations, like WebKit, does not follow the final semantic // https://github.com/tc39/proposal-change-array-by-copy/pull/86 return error === 8; } }(); // Bug in WebKit. It should truncate a negative fractional index to zero, but instead throws an error var THROW_ON_NEGATIVE_FRACTIONAL_INDEX = PROPER_ORDER && function () { try { // eslint-disable-next-line es/no-typed-arrays, es/no-array-prototype-with -- required for testing new Int8Array(1)['with'](-0.5, 1); } catch (error) { return true; } }(); // `%TypedArray%.prototype.with` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.with exportTypedArrayMethod('with', { 'with': function (index, value) { var O = aTypedArray(this); var len = lengthOfArrayLike(O); var relativeIndex = toIntegerOrInfinity(index); var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex; var numericValue = isBigIntArray(O) ? toBigInt(value) : +value; if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index'); var A = new (getTypedArrayConstructor(O))(len); var k = 0; for (; k < len; k++) A[k] = k === actualIndex ? numericValue : O[k]; return A; } }['with'], !PROPER_ORDER || THROW_ON_NEGATIVE_FRACTIONAL_INDEX); /***/ }), /***/ "4ec9": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("6f48"); /***/ }), /***/ "4fad": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var isObject = __webpack_require__("861d"); var classof = __webpack_require__("c6b6"); var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__("d86b"); // eslint-disable-next-line es/no-object-isextensible -- safe var $isExtensible = Object.isExtensible; var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); }); // `Object.isExtensible` method // https://tc39.es/ecma262/#sec-object.isextensible module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) { if (!isObject(it)) return false; if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false; return $isExtensible ? $isExtensible(it) : true; } : $isExtensible; /***/ }), /***/ "4fadc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $entries = __webpack_require__("6f53").entries; // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries $({ target: 'Object', stat: true }, { entries: function entries(O) { return $entries(O); } }); /***/ }), /***/ "4ff9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var log = Math.log; var LN2 = Math.LN2; // `Math.log2` method // https://tc39.es/ecma262/#sec-math.log2 // eslint-disable-next-line es/no-math-log2 -- safe module.exports = Math.log2 || function log2(x) { return log(x) / LN2; }; /***/ }), /***/ "5087": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isConstructor = __webpack_require__("68ee"); var tryToString = __webpack_require__("0d51"); var $TypeError = TypeError; // `Assert: IsConstructor(argument) is true` module.exports = function (argument) { if (isConstructor(argument)) return argument; throw new $TypeError(tryToString(argument) + ' is not a constructor'); }; /***/ }), /***/ "50c4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIntegerOrInfinity = __webpack_require__("5926"); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { var len = toIntegerOrInfinity(argument); return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ "526b": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable no-use-before-define */ const {BigInteger} = __webpack_require__("f33e") const {encodeDer, decodeDer} = __webpack_require__("f9dd") const SM3Digest = __webpack_require__("41d0") const SM2Cipher = __webpack_require__("a336") const _ = __webpack_require__("dffd") const {G, curve, n} = _.generateEcparam() const C1C2C3 = 0 /** * 加密 */ function doEncrypt(msg, publicKey, cipherMode = 1) { const cipher = new SM2Cipher() msg = _.hexToArray(_.parseUtf8StringToHex(msg)) if (publicKey.length > 128) { publicKey = publicKey.substr(publicKey.length - 128) } const xHex = publicKey.substr(0, 64) const yHex = publicKey.substr(64) publicKey = cipher.createPoint(xHex, yHex) const c1 = cipher.initEncipher(publicKey) cipher.encryptBlock(msg) const c2 = _.arrayToHex(msg) let c3 = new Array(32) cipher.doFinal(c3) c3 = _.arrayToHex(c3) return cipherMode === C1C2C3 ? c1 + c2 + c3 : c1 + c3 + c2 } /** * 解密 */ function doDecrypt(encryptData, privateKey, cipherMode = 1) { const cipher = new SM2Cipher() privateKey = new BigInteger(privateKey, 16) const c1X = encryptData.substr(0, 64) const c1Y = encryptData.substr(0 + c1X.length, 64) const c1Length = c1X.length + c1Y.length let c3 = encryptData.substr(c1Length, 64) let c2 = encryptData.substr(c1Length + 64) if (cipherMode === C1C2C3) { c3 = encryptData.substr(encryptData.length - 64) c2 = encryptData.substr(c1Length, encryptData.length - c1Length - 64) } const data = _.hexToArray(c2) const c1 = cipher.createPoint(c1X, c1Y) cipher.initDecipher(privateKey, c1) cipher.decryptBlock(data) const c3_ = new Array(32) cipher.doFinal(c3_) const isDecrypt = _.arrayToHex(c3_) === c3 if (isDecrypt) { const decryptData = _.arrayToUtf8(data) return decryptData } else { return '' } } /** * 签名 */ function doSignature(msg, privateKey, { pointPool, der, hash, publicKey, userId } = {}) { let hashHex = typeof msg === 'string' ? _.parseUtf8StringToHex(msg) : _.parseArrayBufferToHex(msg) if (hash) { // sm3杂凑 publicKey = publicKey || getPublicKeyFromPrivateKey(privateKey) hashHex = doSm3Hash(hashHex, publicKey, userId) } const dA = new BigInteger(privateKey, 16) const e = new BigInteger(hashHex, 16) // k let k = null let r = null let s = null do { do { let point if (pointPool && pointPool.length) { point = pointPool.pop() } else { point = getPoint() } k = point.k // r = (e + x1) mod n r = e.add(point.x1).mod(n) } while (r.equals(BigInteger.ZERO) || r.add(k).equals(n)) // s = ((1 + dA)^-1 * (k - r * dA)) mod n s = dA.add(BigInteger.ONE).modInverse(n).multiply(k.subtract(r.multiply(dA))).mod(n) } while (s.equals(BigInteger.ZERO)) if (der) { // asn1 der编码 return encodeDer(r, s) } return _.leftPad(r.toString(16), 64) + _.leftPad(s.toString(16), 64) } /** * 验签 */ function doVerifySignature(msg, signHex, publicKey, {der, hash, userId} = {}) { let hashHex = typeof msg === 'string' ? _.parseUtf8StringToHex(msg) : _.parseArrayBufferToHex(msg) if (hash) { // sm3杂凑 hashHex = doSm3Hash(hashHex, publicKey, userId) } let r; let s if (der) { const decodeDerObj = decodeDer(signHex) r = decodeDerObj.r s = decodeDerObj.s } else { r = new BigInteger(signHex.substring(0, 64), 16) s = new BigInteger(signHex.substring(64), 16) } const PA = curve.decodePointHex(publicKey) const e = new BigInteger(hashHex, 16) // t = (r + s) mod n const t = r.add(s).mod(n) if (t.equals(BigInteger.ZERO)) return false // x1y1 = s * G + t * PA const x1y1 = G.multiply(s).add(PA.multiply(t)) // R = (e + x1) mod n const R = e.add(x1y1.getX().toBigInteger()).mod(n) return r.equals(R) } /** * sm3杂凑算法 * 计算M值: Hash(za || msg) */ function doSm3Hash(hashHex, publicKey, userId = '1234567812345678') { const smDigest = new SM3Digest() const z = new SM3Digest().getZ(G, publicKey.substr(2, 128), userId) const zValue = _.hexToArray(_.arrayToHex(z).toString()) const p = hashHex const pValue = _.hexToArray(p) const hashData = new Array(smDigest.getDigestSize()) smDigest.blockUpdate(zValue, 0, zValue.length) smDigest.blockUpdate(pValue, 0, pValue.length) smDigest.doFinal(hashData, 0) return _.arrayToHex(hashData).toString() } /** * 计算公钥 */ function getPublicKeyFromPrivateKey(privateKey) { const PA = G.multiply(new BigInteger(privateKey, 16)) const x = _.leftPad(PA.getX().toBigInteger().toString(16), 64) const y = _.leftPad(PA.getY().toBigInteger().toString(16), 64) return '04' + x + y } /** * 获取椭圆曲线点 */ function getPoint() { const keypair = _.generateKeyPairHex() const PA = curve.decodePointHex(keypair.publicKey) keypair.k = new BigInteger(keypair.privateKey, 16) keypair.x1 = PA.getX().toBigInteger() return keypair } module.exports = { generateKeyPairHex: _.generateKeyPairHex, doEncrypt, doDecrypt, doSignature, doVerifySignature, getPoint, } /***/ }), /***/ "52c8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var userAgent = __webpack_require__("b5db"); module.exports = /ipad|iphone|ipod/i.test(userAgent) && /applewebkit/i.test(userAgent); /***/ }), /***/ "5320": /***/ (function(module, exports, __webpack_require__) { "use strict"; // Should get iterator record of a set-like object before cloning this // https://bugs.webkit.org/show_bug.cgi?id=289430 module.exports = function (METHOD_NAME) { try { // eslint-disable-next-line es/no-set -- needed for test var baseSet = new Set(); var setLike = { size: 0, has: function () { return true; }, keys: function () { // eslint-disable-next-line es/no-object-defineproperty -- needed for test return Object.defineProperty({}, 'next', { get: function () { baseSet.clear(); baseSet.add(4); return function () { return { done: true }; }; } }); } }; var result = baseSet[METHOD_NAME](setLike); return result.size === 1 && result.values().next().value === 4; } catch (error) { return false; } }; /***/ }), /***/ "5352": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` __webpack_require__("e260"); __webpack_require__("f6d6"); var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var safeGetBuiltIn = __webpack_require__("157a"); var getBuiltIn = __webpack_require__("d066"); var call = __webpack_require__("c65b"); var uncurryThis = __webpack_require__("e330"); var DESCRIPTORS = __webpack_require__("83ab"); var USE_NATIVE_URL = __webpack_require__("f354"); var defineBuiltIn = __webpack_require__("cb2d"); var defineBuiltInAccessor = __webpack_require__("edd0"); var defineBuiltIns = __webpack_require__("6964"); var setToStringTag = __webpack_require__("d44e"); var createIteratorConstructor = __webpack_require__("dcc3"); var InternalStateModule = __webpack_require__("69f3"); var anInstance = __webpack_require__("19aa"); var isCallable = __webpack_require__("1626"); var hasOwn = __webpack_require__("1a2d"); var bind = __webpack_require__("0366"); var classof = __webpack_require__("f5df"); var anObject = __webpack_require__("825a"); var isObject = __webpack_require__("861d"); var $toString = __webpack_require__("577e"); var create = __webpack_require__("7c73"); var createPropertyDescriptor = __webpack_require__("5c6c"); var getIterator = __webpack_require__("9a1f"); var getIteratorMethod = __webpack_require__("35a1"); var createIterResultObject = __webpack_require__("4754"); var validateArgumentsLength = __webpack_require__("d6d6"); var wellKnownSymbol = __webpack_require__("b622"); var arraySort = __webpack_require__("addb"); var ITERATOR = wellKnownSymbol('iterator'); var URL_SEARCH_PARAMS = 'URLSearchParams'; var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator'; var setInternalState = InternalStateModule.set; var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS); var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR); var nativeFetch = safeGetBuiltIn('fetch'); var NativeRequest = safeGetBuiltIn('Request'); var Headers = safeGetBuiltIn('Headers'); var RequestPrototype = NativeRequest && NativeRequest.prototype; var HeadersPrototype = Headers && Headers.prototype; var TypeError = globalThis.TypeError; var encodeURIComponent = globalThis.encodeURIComponent; var fromCharCode = String.fromCharCode; var fromCodePoint = getBuiltIn('String', 'fromCodePoint'); var $parseInt = parseInt; var charAt = uncurryThis(''.charAt); var join = uncurryThis([].join); var push = uncurryThis([].push); var replace = uncurryThis(''.replace); var shift = uncurryThis([].shift); var splice = uncurryThis([].splice); var split = uncurryThis(''.split); var stringSlice = uncurryThis(''.slice); var exec = uncurryThis(/./.exec); var plus = /\+/g; var FALLBACK_REPLACER = '\uFFFD'; var VALID_HEX = /^[0-9a-f]+$/i; var parseHexOctet = function (string, start) { var substr = stringSlice(string, start, start + 2); if (!exec(VALID_HEX, substr)) return NaN; return $parseInt(substr, 16); }; var getLeadingOnes = function (octet) { var count = 0; for (var mask = 0x80; mask > 0 && (octet & mask) !== 0; mask >>= 1) { count++; } return count; }; var utf8Decode = function (octets) { var codePoint = null; var length = octets.length; switch (length) { case 1: codePoint = octets[0]; break; case 2: codePoint = (octets[0] & 0x1F) << 6 | (octets[1] & 0x3F); break; case 3: codePoint = (octets[0] & 0x0F) << 12 | (octets[1] & 0x3F) << 6 | (octets[2] & 0x3F); break; case 4: codePoint = (octets[0] & 0x07) << 18 | (octets[1] & 0x3F) << 12 | (octets[2] & 0x3F) << 6 | (octets[3] & 0x3F); break; } // reject surrogates, overlong encodings, and out-of-range codepoints if (codePoint === null || codePoint > 0x10FFFF || (codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint < (length > 3 ? 0x10000 : length > 2 ? 0x800 : length > 1 ? 0x80 : 0) ) return null; return codePoint; }; /* eslint-disable max-statements, max-depth -- ok */ var decode = function (input) { input = replace(input, plus, ' '); var length = input.length; var result = ''; var i = 0; while (i < length) { var decodedChar = charAt(input, i); if (decodedChar === '%') { if (charAt(input, i + 1) === '%' || i + 3 > length) { result += '%'; i++; continue; } var octet = parseHexOctet(input, i + 1); // eslint-disable-next-line no-self-compare -- NaN check if (octet !== octet) { result += decodedChar; i++; continue; } i += 2; var byteSequenceLength = getLeadingOnes(octet); if (byteSequenceLength === 0) { decodedChar = fromCharCode(octet); } else { if (byteSequenceLength === 1 || byteSequenceLength > 4) { result += FALLBACK_REPLACER; i++; continue; } var octets = [octet]; var sequenceIndex = 1; while (sequenceIndex < byteSequenceLength) { i++; if (i + 3 > length || charAt(input, i) !== '%') break; var nextByte = parseHexOctet(input, i + 1); // eslint-disable-next-line no-self-compare -- NaN check if (nextByte !== nextByte || nextByte > 191 || nextByte < 128) break; // https://encoding.spec.whatwg.org/#utf-8-decoder - position-specific byte ranges if (sequenceIndex === 1) { if (octet === 0xE0 && nextByte < 0xA0) break; if (octet === 0xED && nextByte > 0x9F) break; if (octet === 0xF0 && nextByte < 0x90) break; if (octet === 0xF4 && nextByte > 0x8F) break; } push(octets, nextByte); i += 2; sequenceIndex++; } if (octets.length !== byteSequenceLength) { result += FALLBACK_REPLACER; continue; } var codePoint = utf8Decode(octets); if (codePoint === null) { for (var replacement = 0; replacement < byteSequenceLength; replacement++) result += FALLBACK_REPLACER; i++; continue; } else { decodedChar = fromCodePoint(codePoint); } } } result += decodedChar; i++; } return result; }; /* eslint-enable max-statements, max-depth -- ok */ var find = /[!'()~]|%20/g; var replacements = { '!': '%21', "'": '%27', '(': '%28', ')': '%29', '~': '%7E', '%20': '+' }; var replacer = function (match) { return replacements[match]; }; var serialize = function (it) { return replace(encodeURIComponent(it), find, replacer); }; var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) { setInternalState(this, { type: URL_SEARCH_PARAMS_ITERATOR, target: getInternalParamsState(params).entries, index: 0, kind: kind }); }, URL_SEARCH_PARAMS, function next() { var state = getInternalIteratorState(this); var target = state.target; var index = state.index++; if (!target || index >= target.length) { state.target = null; return createIterResultObject(undefined, true); } var entry = target[index]; switch (state.kind) { case 'keys': return createIterResultObject(entry.key, false); case 'values': return createIterResultObject(entry.value, false); } return createIterResultObject([entry.key, entry.value], false); }, true); var URLSearchParamsState = function (init) { this.entries = []; this.url = null; if (init !== undefined) { if (isObject(init)) this.parseObject(init); else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init)); } }; URLSearchParamsState.prototype = { type: URL_SEARCH_PARAMS, bindURL: function (url) { this.url = url; this.update(); }, parseObject: function (object) { var entries = this.entries; var iteratorMethod = getIteratorMethod(object); var iterator, next, step, entryIterator, entryNext, first, second; if (iteratorMethod) { iterator = getIterator(object, iteratorMethod); next = iterator.next; while (!(step = call(next, iterator)).done) { entryIterator = getIterator(anObject(step.value)); entryNext = entryIterator.next; if ( (first = call(entryNext, entryIterator)).done || (second = call(entryNext, entryIterator)).done || !call(entryNext, entryIterator).done ) throw new TypeError('Expected sequence with length 2'); push(entries, { key: $toString(first.value), value: $toString(second.value) }); } } else for (var key in object) if (hasOwn(object, key)) { push(entries, { key: key, value: $toString(object[key]) }); } }, parseQuery: function (query) { if (query) { var entries = this.entries; var attributes = split(query, '&'); var index = 0; var attribute, entry; while (index < attributes.length) { attribute = attributes[index++]; if (attribute.length) { entry = split(attribute, '='); push(entries, { key: decode(shift(entry)), value: decode(join(entry, '=')) }); } } } }, serialize: function () { var entries = this.entries; var result = []; var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; push(result, serialize(entry.key) + '=' + serialize(entry.value)); } return join(result, '&'); }, update: function () { this.entries.length = 0; this.parseQuery(this.url.query); }, updateURL: function () { if (this.url) this.url.update(); } }; // `URLSearchParams` constructor // https://url.spec.whatwg.org/#interface-urlsearchparams var URLSearchParamsConstructor = function URLSearchParams(/* init */) { anInstance(this, URLSearchParamsPrototype); var init = arguments.length > 0 ? arguments[0] : undefined; var state = setInternalState(this, new URLSearchParamsState(init)); if (!DESCRIPTORS) this.size = state.entries.length; }; var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype; defineBuiltIns(URLSearchParamsPrototype, { // `URLSearchParams.prototype.append` method // https://url.spec.whatwg.org/#dom-urlsearchparams-append append: function append(name, value) { var state = getInternalParamsState(this); validateArgumentsLength(arguments.length, 2); push(state.entries, { key: $toString(name), value: $toString(value) }); if (!DESCRIPTORS) this.size++; state.updateURL(); }, // `URLSearchParams.prototype.delete` method // https://url.spec.whatwg.org/#dom-urlsearchparams-delete 'delete': function (name /* , value */) { var state = getInternalParamsState(this); var length = validateArgumentsLength(arguments.length, 1); var entries = state.entries; var key = $toString(name); var $value = length < 2 ? undefined : arguments[1]; var value = $value === undefined ? $value : $toString($value); var index = 0; while (index < entries.length) { var entry = entries[index]; if (entry.key === key && (value === undefined || entry.value === value)) { splice(entries, index, 1); } else index++; } if (!DESCRIPTORS) this.size = entries.length; state.updateURL(); }, // `URLSearchParams.prototype.get` method // https://url.spec.whatwg.org/#dom-urlsearchparams-get get: function get(name) { var entries = getInternalParamsState(this).entries; validateArgumentsLength(arguments.length, 1); var key = $toString(name); var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) return entries[index].value; } return null; }, // `URLSearchParams.prototype.getAll` method // https://url.spec.whatwg.org/#dom-urlsearchparams-getall getAll: function getAll(name) { var entries = getInternalParamsState(this).entries; validateArgumentsLength(arguments.length, 1); var key = $toString(name); var result = []; var index = 0; for (; index < entries.length; index++) { if (entries[index].key === key) push(result, entries[index].value); } return result; }, // `URLSearchParams.prototype.has` method // https://url.spec.whatwg.org/#dom-urlsearchparams-has has: function has(name /* , value */) { var entries = getInternalParamsState(this).entries; var length = validateArgumentsLength(arguments.length, 1); var key = $toString(name); var $value = length < 2 ? undefined : arguments[1]; var value = $value === undefined ? $value : $toString($value); var index = 0; while (index < entries.length) { var entry = entries[index++]; if (entry.key === key && (value === undefined || entry.value === value)) return true; } return false; }, // `URLSearchParams.prototype.set` method // https://url.spec.whatwg.org/#dom-urlsearchparams-set set: function set(name, value) { var state = getInternalParamsState(this); validateArgumentsLength(arguments.length, 2); var entries = state.entries; var found = false; var key = $toString(name); var val = $toString(value); var index = 0; var entry; for (; index < entries.length; index++) { entry = entries[index]; if (entry.key === key) { if (found) splice(entries, index--, 1); else { found = true; entry.value = val; } } } if (!found) push(entries, { key: key, value: val }); if (!DESCRIPTORS) this.size = entries.length; state.updateURL(); }, // `URLSearchParams.prototype.sort` method // https://url.spec.whatwg.org/#dom-urlsearchparams-sort sort: function sort() { var state = getInternalParamsState(this); arraySort(state.entries, function (a, b) { return a.key > b.key ? 1 : -1; }); state.updateURL(); }, // `URLSearchParams.prototype.forEach` method forEach: function forEach(callback /* , thisArg */) { var entries = getInternalParamsState(this).entries; var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined); var index = 0; var entry; while (index < entries.length) { entry = entries[index++]; boundFunction(entry.value, entry.key, this); } }, // `URLSearchParams.prototype.keys` method keys: function keys() { return new URLSearchParamsIterator(this, 'keys'); }, // `URLSearchParams.prototype.values` method values: function values() { return new URLSearchParamsIterator(this, 'values'); }, // `URLSearchParams.prototype.entries` method entries: function entries() { return new URLSearchParamsIterator(this, 'entries'); } }, { enumerable: true }); // `URLSearchParams.prototype[@@iterator]` method defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' }); // `URLSearchParams.prototype.toString` method // https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() { return getInternalParamsState(this).serialize(); }, { enumerable: true }); // `URLSearchParams.prototype.size` getter // https://url.spec.whatwg.org/#dom-urlsearchparams-size if (DESCRIPTORS) defineBuiltInAccessor(URLSearchParamsPrototype, 'size', { get: function size() { return getInternalParamsState(this).entries.length; }, configurable: true, enumerable: true }); setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS); $({ global: true, constructor: true, forced: !USE_NATIVE_URL }, { URLSearchParams: URLSearchParamsConstructor }); // Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams` if (!USE_NATIVE_URL && isCallable(Headers)) { var headersHas = uncurryThis(HeadersPrototype.has); var headersSet = uncurryThis(HeadersPrototype.set); var wrapRequestOptions = function (init) { if (isObject(init)) { var body = init.body; var headers; if (classof(body) === URL_SEARCH_PARAMS) { headers = init.headers ? new Headers(init.headers) : new Headers(); if (!headersHas(headers, 'content-type')) { headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); } return create(init, { body: createPropertyDescriptor(0, $toString(body)), headers: createPropertyDescriptor(0, headers) }); } } return init; }; if (isCallable(nativeFetch)) { $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, { fetch: function fetch(input /* , init */) { return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); } }); } if (isCallable(NativeRequest)) { var RequestConstructor = function Request(input /* , init */) { anInstance(this, RequestPrototype); return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {}); }; RequestPrototype.constructor = RequestConstructor; RequestConstructor.prototype = RequestPrototype; $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, { Request: RequestConstructor }); } } module.exports = { URLSearchParams: URLSearchParamsConstructor, getState: getInternalParamsState }; /***/ }), /***/ "5388": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) { var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator; var next = record.next; var step, result; while (!(step = call(next, iterator)).done) { result = fn(step.value); if (result !== undefined) return result; } }; /***/ }), /***/ "5486": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) { const util = __webpack_require__("90da"); const convertToJson = function(node, options) { const jObj = {}; //when no child node or attr is present if ((!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) { return util.isExist(node.val) ? node.val : ''; } else { //otherwise create a textnode if node has some text if (util.isExist(node.val)) { if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { if(options.arrayMode === "strict"){ jObj[options.textNodeName] = [ node.val ]; }else{ jObj[options.textNodeName] = node.val; } } } } util.merge(jObj, node.attrsMap, options.arrayMode); const keys = Object.keys(node.child); for (let index = 0; index < keys.length; index++) { var tagname = keys[index]; if (node.child[tagname] && node.child[tagname].length > 1) { jObj[tagname] = []; for (var tag in node.child[tagname]) { global.xmlParseFlag = global.xmlParseFlag + 1; jObj[tagname].push(convertToJson(node.child[tagname][tag], options)); } } else { if(options.arrayMode === true){ global.xmlParseFlag = global.xmlParseFlag + 1;//解析标识+1 const result = convertToJson(node.child[tagname][0], options) if(typeof result === 'object') jObj[tagname] = [ result ]; else jObj[tagname] = result; }else if(options.arrayMode === "strict"){ global.xmlParseFlag = global.xmlParseFlag + 1; jObj[tagname] = [convertToJson(node.child[tagname][0], options) ]; }else{ global.xmlParseFlag = global.xmlParseFlag + 1; jObj[tagname] = convertToJson(node.child[tagname][0], options); } } } return jObj; }; exports.convertToJson = convertToJson; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "5494": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var uncurryThis = __webpack_require__("e330"); var defineBuiltInAccessor = __webpack_require__("edd0"); var URLSearchParamsPrototype = URLSearchParams.prototype; var forEach = uncurryThis(URLSearchParamsPrototype.forEach); // `URLSearchParams.prototype.size` getter // https://github.com/whatwg/url/pull/734 if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) { defineBuiltInAccessor(URLSearchParamsPrototype, 'size', { get: function size() { var count = 0; forEach(this, function () { count++; }); return count; }, configurable: true, enumerable: true }); } /***/ }), /***/ "5692": /***/ (function(module, exports, __webpack_require__) { "use strict"; var store = __webpack_require__("c6cd"); module.exports = function (key, value) { return store[key] || (store[key] = value || {}); }; /***/ }), /***/ "56ef": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var uncurryThis = __webpack_require__("e330"); var getOwnPropertyNamesModule = __webpack_require__("241c"); var getOwnPropertySymbolsModule = __webpack_require__("7418"); var anObject = __webpack_require__("825a"); var concat = uncurryThis([].concat); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; }; /***/ }), /***/ "5751": /***/ (function(module, exports, __webpack_require__) { "use strict"; var WeakMapHelpers = __webpack_require__("6d3e"); var weakmap = new WeakMapHelpers.WeakMap(); var set = WeakMapHelpers.set; var remove = WeakMapHelpers.remove; module.exports = function (key) { set(weakmap, key, 1); remove(weakmap, key); return key; }; /***/ }), /***/ "577e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__("f5df"); var $String = String; module.exports = function (argument) { if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); return $String(argument); }; /***/ }), /***/ "57b9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var getBuiltIn = __webpack_require__("d066"); var wellKnownSymbol = __webpack_require__("b622"); var defineBuiltIn = __webpack_require__("cb2d"); module.exports = function () { var Symbol = getBuiltIn('Symbol'); var SymbolPrototype = Symbol && Symbol.prototype; var valueOf = SymbolPrototype && SymbolPrototype.valueOf; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); if (SymbolPrototype && !SymbolPrototype[TO_PRIMITIVE]) { // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive // eslint-disable-next-line no-unused-vars -- required for .length defineBuiltIn(SymbolPrototype, TO_PRIMITIVE, function (hint) { return call(valueOf, this); }, { arity: 1 }); } }; /***/ }), /***/ "5926": /***/ (function(module, exports, __webpack_require__) { "use strict"; var trunc = __webpack_require__("b42e"); // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity module.exports = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check return number !== number || number === 0 ? 0 : trunc(number); }; /***/ }), /***/ "59ed": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isCallable = __webpack_require__("1626"); var tryToString = __webpack_require__("0d51"); var $TypeError = TypeError; // `Assert: IsCallable(argument) is true` module.exports = function (argument) { if (isCallable(argument)) return argument; throw new $TypeError(tryToString(argument) + ' is not a function'); }; /***/ }), /***/ "5a34": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isRegExp = __webpack_require__("44e7"); var $TypeError = TypeError; module.exports = function (it) { if (isRegExp(it)) { throw new $TypeError("The method doesn't accept regular expressions"); } return it; }; /***/ }), /***/ "5a47": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var NATIVE_SYMBOL = __webpack_require__("04f8"); var fails = __webpack_require__("d039"); var getOwnPropertySymbolsModule = __webpack_require__("7418"); var toObject = __webpack_require__("7b0b"); // V8 ~ Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 var FORCED = !NATIVE_SYMBOL || fails(function () { getOwnPropertySymbolsModule.f(1); }); // `Object.getOwnPropertySymbols` method // https://tc39.es/ecma262/#sec-object.getownpropertysymbols $({ target: 'Object', stat: true, forced: FORCED }, { getOwnPropertySymbols: function getOwnPropertySymbols(it) { var $getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return $getOwnPropertySymbols ? $getOwnPropertySymbols(toObject(it)) : []; } }); /***/ }), /***/ "5a79": /***/ (function(module, exports, __webpack_require__) { "use strict"; const util = __webpack_require__("90da"); const buildOptions = __webpack_require__("90da").buildOptions; const x2j = __webpack_require__("8a24"); //TODO: do it later const convertToJsonString = function(node, options) { options = buildOptions(options, x2j.defaultOptions, x2j.props); options.indentBy = options.indentBy || ''; return _cToJsonStr(node, options, 0); }; const _cToJsonStr = function(node, options, level) { let jObj = '{'; //traver through all the children const keys = Object.keys(node.child); for (let index = 0; index < keys.length; index++) { var tagname = keys[index]; if (node.child[tagname] && node.child[tagname].length > 1) { jObj += '"' + tagname + '" : [ '; for (var tag in node.child[tagname]) { jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; } jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last } else { jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; } } util.merge(jObj, node.attrsMap); //add attrsMap as new children if (util.isEmptyObject(jObj)) { return util.isExist(node.val) ? node.val : ''; } else { if (util.isExist(node.val)) { if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); } } } //add value if (jObj[jObj.length - 1] === ',') { jObj = jObj.substr(0, jObj.length - 2); } return jObj + '}'; }; function stringval(v) { if (v === true || v === false || !isNaN(v)) { return v; } else { return '"' + v + '"'; } } function indentate(options, level) { return options.indentBy.repeat(level); } exports.convertToJsonString = convertToJsonString; /***/ }), /***/ "5c6c": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ "5e77": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var hasOwn = __webpack_require__("1a2d"); var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && function something() { /* empty */ }.name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); module.exports = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; /***/ }), /***/ "5e7e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var IS_PURE = __webpack_require__("c430"); var IS_NODE = __webpack_require__("9adc"); var globalThis = __webpack_require__("cfe9"); var path = __webpack_require__("428f"); var call = __webpack_require__("c65b"); var defineBuiltIn = __webpack_require__("cb2d"); var setPrototypeOf = __webpack_require__("d2bb"); var setToStringTag = __webpack_require__("d44e"); var setSpecies = __webpack_require__("2626"); var aCallable = __webpack_require__("59ed"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var anInstance = __webpack_require__("19aa"); var speciesConstructor = __webpack_require__("4840"); var task = __webpack_require__("2cf4").set; var microtask = __webpack_require__("b575"); var hostReportErrors = __webpack_require__("44de"); var perform = __webpack_require__("e667"); var Queue = __webpack_require__("01b4"); var InternalStateModule = __webpack_require__("69f3"); var NativePromiseConstructor = __webpack_require__("d256"); var PromiseConstructorDetection = __webpack_require__("4738"); var newPromiseCapabilityModule = __webpack_require__("f069"); var PROMISE = 'Promise'; var FORCED_PROMISE_CONSTRUCTOR = PromiseConstructorDetection.CONSTRUCTOR; var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT; var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING; var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); var setInternalState = InternalStateModule.set; var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; var PromiseConstructor = NativePromiseConstructor; var PromisePrototype = NativePromisePrototype; var TypeError = globalThis.TypeError; var document = globalThis.document; var process = globalThis.process; var newPromiseCapability = newPromiseCapabilityModule.f; var newGenericPromiseCapability = newPromiseCapability; var DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent); var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; var HANDLED = 1; var UNHANDLED = 2; var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; // helpers var isThenable = function (it) { var then; return isObject(it) && isCallable(then = it.then) ? then : false; }; var callReaction = function (reaction, state) { var value = state.value; var ok = state.state === FULFILLED; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (state.rejection === UNHANDLED) onHandleUnhandled(state); state.rejection = HANDLED; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // can throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(new TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { call(then, result, resolve, reject); } else resolve(result); } else reject(value); } catch (error) { if (domain && !exited) domain.exit(); reject(error); } }; var notify = function (state, isReject) { if (state.notified) return; state.notified = true; microtask(function () { var reactions = state.reactions; var reaction; while (reaction = reactions.get()) { callReaction(reaction, state); } state.notified = false; if (isReject && !state.rejection) onUnhandled(state); }); }; var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { event = document.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); globalThis.dispatchEvent(event); } else event = { promise: promise, reason: reason }; if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event); else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; var onUnhandled = function (state) { call(task, globalThis, function () { var promise = state.facade; var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { if (IS_NODE) { process.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); }; var isUnhandled = function (state) { return state.rejection !== HANDLED && !state.parent; }; var onHandleUnhandled = function (state) { call(task, globalThis, function () { var promise = state.facade; if (IS_NODE) { process.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; var bind = function (fn, state, unwrap) { return function (value) { fn(state, value, unwrap); }; }; var internalReject = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; notify(state, true); }; var internalResolve = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { if (state.facade === value) throw new TypeError("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { call(then, value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state) ); } catch (error) { internalReject(wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; notify(state, false); } } catch (error) { internalReject({ done: false }, error, state); } }; // constructor polyfill if (FORCED_PROMISE_CONSTRUCTOR) { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromisePrototype); aCallable(executor); call(Internal, this); var state = getInternalPromiseState(this); try { executor(bind(internalResolve, state), bind(internalReject, state)); } catch (error) { internalReject(state, error); } }; PromisePrototype = PromiseConstructor.prototype; // eslint-disable-next-line no-unused-vars -- required for `.length` Internal = function Promise(executor) { setInternalState(this, { type: PROMISE, done: false, notified: false, parent: false, reactions: new Queue(), rejection: false, state: PENDING, value: null }); }; // `Promise.prototype.then` method // https://tc39.es/ecma262/#sec-promise.prototype.then Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) { var state = getInternalPromiseState(this); var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); state.parent = true; reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; reaction.fail = isCallable(onRejected) && onRejected; reaction.domain = IS_NODE ? process.domain : undefined; if (state.state === PENDING) state.reactions.add(reaction); else microtask(function () { callReaction(reaction, state); }); return reaction.promise; }); OwnPromiseCapability = function () { var promise = new Internal(); var state = getInternalPromiseState(promise); this.promise = promise; this.resolve = bind(internalResolve, state); this.reject = bind(internalReject, state); }; newPromiseCapabilityModule.f = newPromiseCapability = function (C) { return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; if (!IS_PURE && isCallable(NativePromiseConstructor) && NativePromisePrototype !== Object.prototype) { nativeThen = NativePromisePrototype.then; if (!NATIVE_PROMISE_SUBCLASSING) { // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs defineBuiltIn(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { var that = this; return new PromiseConstructor(function (resolve, reject) { call(nativeThen, that, resolve, reject); }).then(onFulfilled, onRejected); // https://github.com/zloirock/core-js/issues/640 }, { unsafe: true }); } // make `.constructor === Promise` work for native promise-based APIs try { delete NativePromisePrototype.constructor; } catch (error) { /* empty */ } // make `instanceof Promise` work for native promise-based APIs if (setPrototypeOf) { setPrototypeOf(NativePromisePrototype, PromisePrototype); } } } // `Promise` constructor // https://tc39.es/ecma262/#sec-promise-executor $({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR }, { Promise: PromiseConstructor }); PromiseWrapper = path.Promise; setToStringTag(PromiseConstructor, PROMISE, false, true); setSpecies(PROMISE); /***/ }), /***/ "5eed": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NativePromiseConstructor = __webpack_require__("d256"); var checkCorrectnessOfIteration = __webpack_require__("1c7e"); var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__("4738").CONSTRUCTOR; module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(function (iterable) { NativePromiseConstructor.all(iterable).then(undefined, function () { /* empty */ }); }); /***/ }), /***/ "5eff": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("e260"); __webpack_require__("4ec9"); __webpack_require__("cdfc"); __webpack_require__("625a"); __webpack_require__("fafb"); __webpack_require__("d3b7"); __webpack_require__("3ca3"); var path = __webpack_require__("428f"); module.exports = path.Map; /***/ }), /***/ "5fb2": /***/ (function(module, exports, __webpack_require__) { "use strict"; // based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js var uncurryThis = __webpack_require__("e330"); var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 var base = 36; var tMin = 1; var tMax = 26; var skew = 38; var damp = 700; var initialBias = 72; var initialN = 128; // 0x80 var delimiter = '-'; // '\x2D' var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process'; var baseMinusTMin = base - tMin; var $RangeError = RangeError; var exec = uncurryThis(regexSeparators.exec); var floor = Math.floor; var fromCharCode = String.fromCharCode; var charCodeAt = uncurryThis(''.charCodeAt); var join = uncurryThis([].join); var push = uncurryThis([].push); var replace = uncurryThis(''.replace); var split = uncurryThis(''.split); var toLowerCase = uncurryThis(''.toLowerCase); /** * Creates an array containing the numeric code points of each Unicode * character in the string. While JavaScript uses UCS-2 internally, * this function will convert a pair of surrogate halves (each of which * UCS-2 exposes as separate characters) into a single code point, * matching UTF-16. */ var ucs2decode = function (string) { var output = []; var counter = 0; var length = string.length; while (counter < length) { var value = charCodeAt(string, counter++); if (value >= 0xD800 && value <= 0xDBFF && counter < length) { // It's a high surrogate, and there is a next character. var extra = charCodeAt(string, counter++); if ((extra & 0xFC00) === 0xDC00) { // Low surrogate. push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); } else { // It's an unmatched surrogate; only append this code unit, in case the // next code unit is the high surrogate of a surrogate pair. push(output, value); counter--; } } else { push(output, value); } } return output; }; /** * Converts a digit/integer into a basic code point. */ var digitToBasic = function (digit) { // 0..25 map to ASCII a..z or A..Z // 26..35 map to ASCII 0..9 return digit + 22 + 75 * (digit < 26); }; /** * Bias adaptation function as per section 3.4 of RFC 3492. * https://tools.ietf.org/html/rfc3492#section-3.4 */ var adapt = function (delta, numPoints, firstTime) { var k = 0; delta = firstTime ? floor(delta / damp) : delta >> 1; delta += floor(delta / numPoints); while (delta > baseMinusTMin * tMax >> 1) { delta = floor(delta / baseMinusTMin); k += base; } return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); }; /** * Converts a string of Unicode symbols (e.g. a domain name label) to a * Punycode string of ASCII-only symbols. */ var encode = function (input) { var output = []; // Convert the input in UCS-2 to an array of Unicode code points. input = ucs2decode(input); // Cache the length. var inputLength = input.length; // Initialize the state. var n = initialN; var delta = 0; var bias = initialBias; var i, currentValue; // Handle the basic code points. for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue < 0x80) { push(output, fromCharCode(currentValue)); } } var basicLength = output.length; // number of basic code points. var handledCPCount = basicLength; // number of code points that have been handled; // Finish the basic string with a delimiter unless it's empty. if (basicLength) { push(output, delimiter); } // Main encoding loop: while (handledCPCount < inputLength) { // All non-basic code points < n have been handled already. Find the next larger one: var m = maxInt; for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue >= n && currentValue < m) { m = currentValue; } } // Increase `delta` enough to advance the decoder's state to , but guard against overflow. var handledCPCountPlusOne = handledCPCount + 1; if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { throw new $RangeError(OVERFLOW_ERROR); } delta += (m - n) * handledCPCountPlusOne; n = m; for (i = 0; i < input.length; i++) { currentValue = input[i]; if (currentValue < n && ++delta > maxInt) { throw new $RangeError(OVERFLOW_ERROR); } if (currentValue === n) { // Represent delta as a generalized variable-length integer. var q = delta; var k = base; while (true) { var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; if (q < t) break; var qMinusT = q - t; var baseMinusT = base - t; push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT))); q = floor(qMinusT / baseMinusT); k += base; } push(output, fromCharCode(digitToBasic(q))); bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength); delta = 0; handledCPCount++; } } delta++; n++; } return join(output, ''); }; module.exports = function (input) { var encoded = []; var labels = split(replace(toLowerCase(input), regexSeparators, '\u002E'), '.'); var i, label; for (i = 0; i < labels.length; i++) { label = labels[i]; push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label); } return join(encoded, '.'); }; /***/ }), /***/ "6062": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("1c59"); /***/ }), /***/ "60da": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var uncurryThis = __webpack_require__("e330"); var call = __webpack_require__("c65b"); var fails = __webpack_require__("d039"); var objectKeys = __webpack_require__("df75"); var getOwnPropertySymbolsModule = __webpack_require__("7418"); var propertyIsEnumerableModule = __webpack_require__("d1e7"); var toObject = __webpack_require__("7b0b"); var IndexedObject = __webpack_require__("44ad"); // eslint-disable-next-line es/no-object-assign -- safe var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing var defineProperty = Object.defineProperty; var concat = uncurryThis([].concat); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign module.exports = !$assign || fails(function () { // should have correct order of operations (Edge bug) if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { enumerable: true, get: function () { defineProperty(this, 'b', { value: 3, enumerable: false }); } }), { b: 2 })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug) var A = {}; var B = {}; // eslint-disable-next-line es/no-symbol -- safe var symbol = Symbol('assign detection'); var alphabet = 'abcdefghijklmnopqrst'; A[symbol] = 7; // eslint-disable-next-line es/no-array-prototype-foreach -- safe alphabet.split('').forEach(function (chr) { B[chr] = chr; }); return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` var T = toObject(target); var argumentsLength = arguments.length; var index = 1; var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; var propertyIsEnumerable = propertyIsEnumerableModule.f; while (argumentsLength > index) { var S = IndexedObject(arguments[index++]); var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /***/ "6199": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/* * [js-sha1]{@link https://github.com/emn178/js-sha1} * * @version 0.6.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2017 * @license MIT */ /*jslint bitwise: true */ (function() { 'use strict'; var root = typeof window === 'object' ? window : {}; var NODE_JS = !root.JS_SHA1_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; if (NODE_JS) { root = global; } var COMMON_JS = !root.JS_SHA1_NO_COMMON_JS && typeof module === 'object' && module.exports; var AMD = true && __webpack_require__("3c35"); var HEX_CHARS = '0123456789abcdef'.split(''); var EXTRA = [-2147483648, 8388608, 32768, 128]; var SHIFT = [24, 16, 8, 0]; var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer']; var blocks = []; var createOutputMethod = function (outputType) { return function (message) { return new Sha1(true).update(message)[outputType](); }; }; var createMethod = function () { var method = createOutputMethod('hex'); if (NODE_JS) { method = nodeWrap(method); } method.create = function () { return new Sha1(); }; method.update = function (message) { return method.create().update(message); }; for (var i = 0; i < OUTPUT_TYPES.length; ++i) { var type = OUTPUT_TYPES[i]; method[type] = createOutputMethod(type); } return method; }; var nodeWrap = function (method) { var crypto = eval("require('crypto')"); var Buffer = eval("require('buffer').Buffer"); var nodeMethod = function (message) { if (typeof message === 'string') { return crypto.createHash('sha1').update(message, 'utf8').digest('hex'); } else if (message.constructor === ArrayBuffer) { message = new Uint8Array(message); } else if (message.length === undefined) { return method(message); } return crypto.createHash('sha1').update(new Buffer(message)).digest('hex'); }; return nodeMethod; }; function Sha1(sharedMemory) { if (sharedMemory) { blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; this.blocks = blocks; } else { this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; } this.h0 = 0x67452301; this.h1 = 0xEFCDAB89; this.h2 = 0x98BADCFE; this.h3 = 0x10325476; this.h4 = 0xC3D2E1F0; this.block = this.start = this.bytes = this.hBytes = 0; this.finalized = this.hashed = false; this.first = true; } Sha1.prototype.update = function (message) { if (this.finalized) { return; } var notString = typeof(message) !== 'string'; if (notString && message.constructor === root.ArrayBuffer) { message = new Uint8Array(message); } var code, index = 0, i, length = message.length || 0, blocks = this.blocks; while (index < length) { if (this.hashed) { this.hashed = false; blocks[0] = this.block; blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; } if(notString) { for (i = this.start; index < length && i < 64; ++index) { blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; } } else { for (i = this.start; index < length && i < 64; ++index) { code = message.charCodeAt(index); if (code < 0x80) { blocks[i >> 2] |= code << SHIFT[i++ & 3]; } else if (code < 0x800) { blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } else if (code < 0xd800 || code >= 0xe000) { blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } else { code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } } } this.lastByteIndex = i; this.bytes += i - this.start; if (i >= 64) { this.block = blocks[16]; this.start = i - 64; this.hash(); this.hashed = true; } else { this.start = i; } } if (this.bytes > 4294967295) { this.hBytes += this.bytes / 4294967296 << 0; this.bytes = this.bytes % 4294967296; } return this; }; Sha1.prototype.finalize = function () { if (this.finalized) { return; } this.finalized = true; var blocks = this.blocks, i = this.lastByteIndex; blocks[16] = this.block; blocks[i >> 2] |= EXTRA[i & 3]; this.block = blocks[16]; if (i >= 56) { if (!this.hashed) { this.hash(); } blocks[0] = this.block; blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; } blocks[14] = this.hBytes << 3 | this.bytes >>> 29; blocks[15] = this.bytes << 3; this.hash(); }; Sha1.prototype.hash = function () { var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4; var f, j, t, blocks = this.blocks; for(j = 16; j < 80; ++j) { t = blocks[j - 3] ^ blocks[j - 8] ^ blocks[j - 14] ^ blocks[j - 16]; blocks[j] = (t << 1) | (t >>> 31); } for(j = 0; j < 20; j += 5) { f = (b & c) | ((~b) & d); t = (a << 5) | (a >>> 27); e = t + f + e + 1518500249 + blocks[j] << 0; b = (b << 30) | (b >>> 2); f = (a & b) | ((~a) & c); t = (e << 5) | (e >>> 27); d = t + f + d + 1518500249 + blocks[j + 1] << 0; a = (a << 30) | (a >>> 2); f = (e & a) | ((~e) & b); t = (d << 5) | (d >>> 27); c = t + f + c + 1518500249 + blocks[j + 2] << 0; e = (e << 30) | (e >>> 2); f = (d & e) | ((~d) & a); t = (c << 5) | (c >>> 27); b = t + f + b + 1518500249 + blocks[j + 3] << 0; d = (d << 30) | (d >>> 2); f = (c & d) | ((~c) & e); t = (b << 5) | (b >>> 27); a = t + f + a + 1518500249 + blocks[j + 4] << 0; c = (c << 30) | (c >>> 2); } for(; j < 40; j += 5) { f = b ^ c ^ d; t = (a << 5) | (a >>> 27); e = t + f + e + 1859775393 + blocks[j] << 0; b = (b << 30) | (b >>> 2); f = a ^ b ^ c; t = (e << 5) | (e >>> 27); d = t + f + d + 1859775393 + blocks[j + 1] << 0; a = (a << 30) | (a >>> 2); f = e ^ a ^ b; t = (d << 5) | (d >>> 27); c = t + f + c + 1859775393 + blocks[j + 2] << 0; e = (e << 30) | (e >>> 2); f = d ^ e ^ a; t = (c << 5) | (c >>> 27); b = t + f + b + 1859775393 + blocks[j + 3] << 0; d = (d << 30) | (d >>> 2); f = c ^ d ^ e; t = (b << 5) | (b >>> 27); a = t + f + a + 1859775393 + blocks[j + 4] << 0; c = (c << 30) | (c >>> 2); } for(; j < 60; j += 5) { f = (b & c) | (b & d) | (c & d); t = (a << 5) | (a >>> 27); e = t + f + e - 1894007588 + blocks[j] << 0; b = (b << 30) | (b >>> 2); f = (a & b) | (a & c) | (b & c); t = (e << 5) | (e >>> 27); d = t + f + d - 1894007588 + blocks[j + 1] << 0; a = (a << 30) | (a >>> 2); f = (e & a) | (e & b) | (a & b); t = (d << 5) | (d >>> 27); c = t + f + c - 1894007588 + blocks[j + 2] << 0; e = (e << 30) | (e >>> 2); f = (d & e) | (d & a) | (e & a); t = (c << 5) | (c >>> 27); b = t + f + b - 1894007588 + blocks[j + 3] << 0; d = (d << 30) | (d >>> 2); f = (c & d) | (c & e) | (d & e); t = (b << 5) | (b >>> 27); a = t + f + a - 1894007588 + blocks[j + 4] << 0; c = (c << 30) | (c >>> 2); } for(; j < 80; j += 5) { f = b ^ c ^ d; t = (a << 5) | (a >>> 27); e = t + f + e - 899497514 + blocks[j] << 0; b = (b << 30) | (b >>> 2); f = a ^ b ^ c; t = (e << 5) | (e >>> 27); d = t + f + d - 899497514 + blocks[j + 1] << 0; a = (a << 30) | (a >>> 2); f = e ^ a ^ b; t = (d << 5) | (d >>> 27); c = t + f + c - 899497514 + blocks[j + 2] << 0; e = (e << 30) | (e >>> 2); f = d ^ e ^ a; t = (c << 5) | (c >>> 27); b = t + f + b - 899497514 + blocks[j + 3] << 0; d = (d << 30) | (d >>> 2); f = c ^ d ^ e; t = (b << 5) | (b >>> 27); a = t + f + a - 899497514 + blocks[j + 4] << 0; c = (c << 30) | (c >>> 2); } this.h0 = this.h0 + a << 0; this.h1 = this.h1 + b << 0; this.h2 = this.h2 + c << 0; this.h3 = this.h3 + d << 0; this.h4 = this.h4 + e << 0; }; Sha1.prototype.hex = function () { this.finalize(); var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4; return HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F] + HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + HEX_CHARS[(h4 >> 28) & 0x0F] + HEX_CHARS[(h4 >> 24) & 0x0F] + HEX_CHARS[(h4 >> 20) & 0x0F] + HEX_CHARS[(h4 >> 16) & 0x0F] + HEX_CHARS[(h4 >> 12) & 0x0F] + HEX_CHARS[(h4 >> 8) & 0x0F] + HEX_CHARS[(h4 >> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F]; }; Sha1.prototype.toString = Sha1.prototype.hex; Sha1.prototype.digest = function () { this.finalize(); var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4; return [ (h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, h0 & 0xFF, (h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, h1 & 0xFF, (h2 >> 24) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 8) & 0xFF, h2 & 0xFF, (h3 >> 24) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 8) & 0xFF, h3 & 0xFF, (h4 >> 24) & 0xFF, (h4 >> 16) & 0xFF, (h4 >> 8) & 0xFF, h4 & 0xFF ]; }; Sha1.prototype.array = Sha1.prototype.digest; Sha1.prototype.arrayBuffer = function () { this.finalize(); var buffer = new ArrayBuffer(20); var dataView = new DataView(buffer); dataView.setUint32(0, this.h0); dataView.setUint32(4, this.h1); dataView.setUint32(8, this.h2); dataView.setUint32(12, this.h3); dataView.setUint32(16, this.h4); return buffer; }; var exports = createMethod(); if (COMMON_JS) { module.exports = exports; } else { root.sha1 = exports; if (AMD) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return exports; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } } })(); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362"), __webpack_require__("c8ba"))) /***/ }), /***/ "625a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var MapHelpers = __webpack_require__("094a"); var IS_PURE = __webpack_require__("c430"); var get = MapHelpers.get; var has = MapHelpers.has; var set = MapHelpers.set; // `Map.prototype.getOrInsert` method // https://tc39.es/ecma262/#sec-map.prototype.getorinsert $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { getOrInsert: function getOrInsert(key, value) { if (has(this, key)) return get(this, key); set(this, key, value); return value; } }); /***/ }), /***/ "6374": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; module.exports = function (key, value) { try { defineProperty(globalThis, key, { value: value, configurable: true, writable: true }); } catch (error) { globalThis[key] = value; } return value; }; /***/ }), /***/ "64c1": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// Base64 JavaScript decoder // Copyright (c) 2008-2022 Lapo Luchini // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { "use strict"; var Base64 = {}, decoder, // populated on first usage haveU8 = (typeof Uint8Array == 'function'); Base64.decode = function (a) { var isString = (typeof a == 'string'); var i; if (decoder === undefined) { var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ignore = "= \f\n\r\t\u00A0\u2028\u2029"; decoder = []; for (i = 0; i < 64; ++i) decoder[b64.charCodeAt(i)] = i; for (i = 0; i < ignore.length; ++i) decoder[ignore.charCodeAt(i)] = -1; // RFC 3548 URL & file safe encoding decoder['-'.charCodeAt(0)] = decoder['+'.charCodeAt(0)]; decoder['_'.charCodeAt(0)] = decoder['/'.charCodeAt(0)]; } var out = haveU8 ? new Uint8Array(a.length * 3 >> 2) : []; var bits = 0, char_count = 0, len = 0; for (i = 0; i < a.length; ++i) { var c = isString ? a.charCodeAt(i) : a[i]; if (c == 61) // '='.charCodeAt(0) break; c = decoder[c]; if (c == -1) continue; if (c === undefined) throw 'Illegal character at offset ' + i; bits |= c; if (++char_count >= 4) { out[len++] = (bits >> 16); out[len++] = (bits >> 8) & 0xFF; out[len++] = bits & 0xFF; bits = 0; char_count = 0; } else { bits <<= 6; } } switch (char_count) { case 1: throw "Base64 encoding incomplete: at least 2 bits missing"; case 2: out[len++] = (bits >> 10); break; case 3: out[len++] = (bits >> 16); out[len++] = (bits >> 8) & 0xFF; break; } if (haveU8 && out.length > len) // in case it was originally longer because of ignored characters out = out.subarray(0, len); return out; }; Base64.pretty = function (str) { // fix padding if (str.length % 4 > 0) str = (str + '===').slice(0, str.length + str.length % 4); // convert RFC 3548 to standard Base64 str = str.replace(/-/g, '+').replace(/_/g, '/'); // 80 column width return str.replace(/(.{80})/g, '$1\n'); }; Base64.re = /-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====|^([A-Za-z0-9+/=\s]+)$/; Base64.unarmor = function (a) { var m = Base64.re.exec(a); if (m) { if (m[1]) a = m[1]; else if (m[2]) a = m[2]; else if (m[3]) a = m[3]; else throw "RegExp out of sync"; } return Base64.decode(a); }; return Base64; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), /***/ "6547": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var toIntegerOrInfinity = __webpack_require__("5926"); var toString = __webpack_require__("577e"); var requireObjectCoercible = __webpack_require__("1d80"); var charAt = uncurryThis(''.charAt); var charCodeAt = uncurryThis(''.charCodeAt); var stringSlice = uncurryThis(''.slice); var createMethod = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString(requireObjectCoercible($this)); var position = toIntegerOrInfinity(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = charCodeAt(S, position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; module.exports = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; /***/ }), /***/ "6566": /***/ (function(module, exports, __webpack_require__) { "use strict"; var create = __webpack_require__("7c73"); var defineBuiltInAccessor = __webpack_require__("edd0"); var defineBuiltIns = __webpack_require__("6964"); var bind = __webpack_require__("0366"); var anInstance = __webpack_require__("19aa"); var isNullOrUndefined = __webpack_require__("7234"); var iterate = __webpack_require__("2266"); var defineIterator = __webpack_require__("c6d2"); var createIterResultObject = __webpack_require__("4754"); var setSpecies = __webpack_require__("2626"); var DESCRIPTORS = __webpack_require__("83ab"); var fastKey = __webpack_require__("f183").fastKey; var InternalStateModule = __webpack_require__("69f3"); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; module.exports = { getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var Constructor = wrapper(function (that, iterable) { anInstance(that, Prototype); setInternalState(that, { type: CONSTRUCTOR_NAME, index: create(null), first: null, last: null, size: 0 }); if (!DESCRIPTORS) that.size = 0; if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var Prototype = Constructor.prototype; var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function (that, key, value) { var state = getInternalState(that); var entry = getEntry(that, key); var previous, index; // change existing entry if (entry) { entry.value = value; // create new entry } else { state.last = entry = { index: index = fastKey(key, true), key: key, value: value, previous: previous = state.last, next: null, removed: false }; if (!state.first) state.first = entry; if (previous) previous.next = entry; if (DESCRIPTORS) state.size++; else that.size++; // add to index if (index !== 'F') state.index[index] = entry; } return that; }; var getEntry = function (that, key) { var state = getInternalState(that); // fast case var index = fastKey(key); var entry; if (index !== 'F') return state.index[index]; // frozen object case for (entry = state.first; entry; entry = entry.next) { if (entry.key === key) return entry; } }; defineBuiltIns(Prototype, { // `{ Map, Set }.prototype.clear()` methods // https://tc39.es/ecma262/#sec-map.prototype.clear // https://tc39.es/ecma262/#sec-set.prototype.clear clear: function clear() { var that = this; var state = getInternalState(that); var entry = state.first; while (entry) { entry.removed = true; if (entry.previous) entry.previous = entry.previous.next = null; entry = entry.next; } state.first = state.last = null; state.index = create(null); if (DESCRIPTORS) state.size = 0; else that.size = 0; }, // `{ Map, Set }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.delete // https://tc39.es/ecma262/#sec-set.prototype.delete 'delete': function (key) { var that = this; var state = getInternalState(that); var entry = getEntry(that, key); if (entry) { var next = entry.next; var prev = entry.previous; delete state.index[entry.index]; entry.removed = true; if (prev) prev.next = next; if (next) next.previous = prev; if (state.first === entry) state.first = next; if (state.last === entry) state.last = prev; if (DESCRIPTORS) state.size--; else that.size--; } return !!entry; }, // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods // https://tc39.es/ecma262/#sec-map.prototype.foreach // https://tc39.es/ecma262/#sec-set.prototype.foreach forEach: function forEach(callbackfn /* , that = undefined */) { var state = getInternalState(this); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined); var entry; while (entry = entry ? entry.next : state.first) { boundFunction(entry.value, entry.key, this); // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; } }, // `{ Map, Set}.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.has // https://tc39.es/ecma262/#sec-set.prototype.has has: function has(key) { return !!getEntry(this, key); } }); defineBuiltIns(Prototype, IS_MAP ? { // `Map.prototype.get(key)` method // https://tc39.es/ecma262/#sec-map.prototype.get get: function get(key) { var entry = getEntry(this, key); return entry && entry.value; }, // `Map.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-map.prototype.set set: function set(key, value) { return define(this, key === 0 ? 0 : key, value); } } : { // `Set.prototype.add(value)` method // https://tc39.es/ecma262/#sec-set.prototype.add add: function add(value) { return define(this, value = value === 0 ? 0 : value, value); } }); if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', { configurable: true, get: function () { return getInternalState(this).size; } }); return Constructor; }, setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods // https://tc39.es/ecma262/#sec-map.prototype.entries // https://tc39.es/ecma262/#sec-map.prototype.keys // https://tc39.es/ecma262/#sec-map.prototype.values // https://tc39.es/ecma262/#sec-map.prototype-@@iterator // https://tc39.es/ecma262/#sec-set.prototype.entries // https://tc39.es/ecma262/#sec-set.prototype.keys // https://tc39.es/ecma262/#sec-set.prototype.values // https://tc39.es/ecma262/#sec-set.prototype-@@iterator defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { setInternalState(this, { type: ITERATOR_NAME, target: iterated, state: getInternalCollectionState(iterated), kind: kind, last: null }); }, function () { var state = getInternalIteratorState(this); var kind = state.kind; var entry = state.last; // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; // get next entry if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { // or finish the iteration state.target = null; return createIterResultObject(undefined, true); } // return step by kind if (kind === 'keys') return createIterResultObject(entry.key, false); if (kind === 'values') return createIterResultObject(entry.value, false); return createIterResultObject([entry.key, entry.value], false); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors // https://tc39.es/ecma262/#sec-get-map-@@species // https://tc39.es/ecma262/#sec-get-set-@@species setSpecies(CONSTRUCTOR_NAME); } }; /***/ }), /***/ "65f0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var arraySpeciesConstructor = __webpack_require__("0b42"); // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; /***/ }), /***/ "67d3": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return unzipOfd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocRoots; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return parseSingleDoc; }); /* unused harmony export doGetDocRoot */ /* unused harmony export getDocument */ /* unused harmony export getDocumentRes */ /* unused harmony export getPublicRes */ /* unused harmony export getTemplatePage */ /* unused harmony export getPage */ /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d9e2"); /* harmony import */ var core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_error_cause_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("14d9"); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("e9f5"); /* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("7d54"); /* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("625a"); /* harmony import */ var core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fafb"); /* harmony import */ var core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("b7ef"); /* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("88a7"); /* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("271a"); /* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("5494"); /* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _utils_ofd_pipeline__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("3662"); /* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("c4e3"); /* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("6b33"); /* harmony import */ var _jbig2_jbig2__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("73fd"); /* harmony import */ var _utils_ofd_ses_signature_parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("a9c6"); /* * ofd.js - A Javascript class for reading and rendering ofd files * * * Copyright (c) 2020. DLTech21 All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ let parser = __webpack_require__("74db"); const unzipOfd = function (file) { return new Promise((resolve, reject) => { jszip__WEBPACK_IMPORTED_MODULE_11___default.a.loadAsync(file).then(function (zip) { resolve(zip); }, function (e) { reject(e); }); }); }; const getDocRoots = async function (zip) { const data = await getJsonFromXmlContent(zip, 'OFD.xml'); const docbodys = data['json']['ofd:OFD']['ofd:DocBody']; let array = []; array = array.concat(docbodys); return [zip, array]; }; const parseSingleDoc = async function ([zip, array]) { let docs = []; for (let docbody of array) { if (docbody) { let res = await doGetDocRoot(zip, docbody); res = await getDocument(res); res = await getDocumentRes(res); res = await getPublicRes(res); res = await getTemplatePage(res); res = await getPage(res); docs.push(res); } } return docs; }; const doGetDocRoot = async function (zip, docbody) { let docRoot = docbody['ofd:DocRoot']; docRoot = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* replaceFirstSlash */ "m"])(docRoot); const doc = docRoot.split('/')[0]; const signatures = docbody['ofd:Signatures']; const stampAnnot = await getSignature(zip, signatures, doc); let stampAnnotArray = {}; for (const stamp of stampAnnot) { if (stamp.sealObj && Object.keys(stamp.sealObj).length > 0) { if (stamp.sealObj.type === 'ofd') { const stampObjs = await getSealDocumentObj(stamp); for (let stampObj of stampObjs) { stamp.stampAnnot.boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* parseStBox */ "l"])(stamp.stampAnnot['@_Boundary']); //console.log(stamp.stampAnnot.boundary) stamp.stampAnnot.pageRef = stamp.stampAnnot['@_PageRef']; if (!stampAnnotArray[stamp.stampAnnot['@_PageRef']]) { stampAnnotArray[stamp.stampAnnot['@_PageRef']] = []; } stampAnnotArray[stamp.stampAnnot['@_PageRef']].push({ type: 'ofd', obj: stampObj, stamp }); } } else if (stamp.sealObj.type === 'png') { let img = 'data:image/png;base64,' + btoa(String.fromCharCode.apply(null, stamp.sealObj.ofdArray)); let stampArray = []; stampArray = stampArray.concat(stamp.stampAnnot); for (const annot of stampArray) { if (annot) { const stampObj = { img, pageId: annot['@_PageRef'], 'boundary': Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* parseStBox */ "l"])(annot['@_Boundary']), 'clip': Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* parseStBox */ "l"])(annot['@_Clip']) }; if (!stampAnnotArray[annot['@_PageRef']]) { stampAnnotArray[annot['@_PageRef']] = []; } stampAnnotArray[annot['@_PageRef']].push({ type: 'png', obj: stampObj, stamp }); } } } } } return [zip, doc, docRoot, stampAnnotArray]; }; const getDocument = async function ([zip, doc, docRoot, stampAnnot]) { const data = await getJsonFromXmlContent(zip, docRoot); const documentObj = data['json']['ofd:Document']; let annotations = documentObj['ofd:Annotations']; let array = []; let annoBase; if (annotations) { if (annotations.indexOf('/') !== -1) { annoBase = annotations.substring(0, annotations.indexOf('/')); } if (annotations.indexOf(doc) === -1) { annotations = `${doc}/${annotations}`; } if (zip.files[annotations]) { annotations = await getJsonFromXmlContent(zip, annotations); array = array.concat(annotations['json']['ofd:Annotations']['ofd:Page']); } } const annotationObjs = await getAnnotations(annoBase, array, doc, zip); return [zip, doc, documentObj, stampAnnot, annotationObjs]; }; const getAnnotations = async function (annoBase, annotations, doc, zip) { let annotationObjs = {}; for (let anno of annotations) { if (!anno) { continue; } const pageId = anno['@_PageID']; let fileLoc = anno['ofd:FileLoc']; fileLoc = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* replaceFirstSlash */ "m"])(fileLoc); if (annoBase && fileLoc.indexOf(annoBase) === -1) { fileLoc = `${annoBase}/${fileLoc}`; } if (fileLoc.indexOf(doc) === -1) { fileLoc = `${doc}/${fileLoc}`; } if (zip.files[fileLoc]) { const data = await getJsonFromXmlContent(zip, fileLoc); let array = []; array = array.concat(data['json']['ofd:PageAnnot']['ofd:Annot']); if (!annotationObjs[pageId]) { annotationObjs[pageId] = []; } for (let annot of array) { if (!annot) { continue; } const type = annot['@_Type']; const visible = annot['@_Visible'] ? annot['@_Visible'] : true; const appearance = annot['ofd:Appearance']; let appearanceObj = { type, appearance, visible }; annotationObjs[pageId].push(appearanceObj); } } } return annotationObjs; }; const getDocumentRes = async function ([zip, doc, Document, stampAnnot, annotationObjs]) { let documentResPath = Document['ofd:CommonData']['ofd:DocumentRes']; let fontResObj = {}; let drawParamResObj = {}; let multiMediaResObj = {}; if (documentResPath) { if (documentResPath.indexOf(doc) == -1) { documentResPath = `${doc}/${documentResPath}`; } if (zip.files[documentResPath]) { const data = await getJsonFromXmlContent(zip, documentResPath); const documentResObj = data['json']['ofd:Res']; fontResObj = await getFont(documentResObj); drawParamResObj = await getDrawParam(documentResObj); multiMediaResObj = await getMultiMediaRes(zip, documentResObj, doc); } } return [zip, doc, Document, stampAnnot, annotationObjs, fontResObj, drawParamResObj, multiMediaResObj]; }; const getPublicRes = async function ([zip, doc, Document, stampAnnot, annotationObjs, fontResObj, drawParamResObj, multiMediaResObj]) { let publicResPath = Document['ofd:CommonData']['ofd:PublicRes']; if (publicResPath) { if (publicResPath.indexOf(doc) == -1) { publicResPath = `${doc}/${publicResPath}`; } if (zip.files[publicResPath]) { const data = await getJsonFromXmlContent(zip, publicResPath); const publicResObj = data['json']['ofd:Res']; let fontObj = await getFont(publicResObj); fontResObj = Object.assign(fontResObj, fontObj); let drawParamObj = await getDrawParam(publicResObj); drawParamResObj = Object.assign(drawParamResObj, drawParamObj); let multiMediaObj = await getMultiMediaRes(zip, publicResObj, doc); multiMediaResObj = Object.assign(multiMediaResObj, multiMediaObj); } } return [zip, doc, Document, stampAnnot, annotationObjs, fontResObj, drawParamResObj, multiMediaResObj]; }; const getTemplatePage = async function ([zip, doc, Document, stampAnnot, annotationObjs, fontResObj, drawParamResObj, multiMediaResObj]) { let templatePages = Document['ofd:CommonData']['ofd:TemplatePage']; let array = []; array = array.concat(templatePages); let tpls = {}; for (const templatePage of array) { if (templatePage) { let pageObj = await parsePage(zip, templatePage, doc); tpls[Object.keys(pageObj)[0]] = pageObj[Object.keys(pageObj)[0]]; } } return [zip, doc, Document, stampAnnot, annotationObjs, tpls, fontResObj, drawParamResObj, multiMediaResObj]; }; const getPage = async function ([zip, doc, Document, stampAnnot, annotationObjs, tpls, fontResObj, drawParamResObj, multiMediaResObj]) { let pages = Document['ofd:Pages']['ofd:Page']; let array = []; array = array.concat(pages); let res = []; for (const page of array) { if (page) { let pageObj = await parsePage(zip, page, doc); const pageId = Object.keys(pageObj)[0]; const currentPageStamp = stampAnnot[pageId]; if (currentPageStamp) { pageObj[pageId].stamp = currentPageStamp; } const annotationObj = annotationObjs[pageId]; if (annotationObj) { pageObj[pageId].annotation = annotationObj; } res.push(pageObj); } } return { 'doc': doc, 'document': Document, 'pages': res, 'tpls': tpls, 'stampAnnot': stampAnnot, fontResObj, drawParamResObj, multiMediaResObj }; }; const getFont = async function (res) { const fonts = res['ofd:Fonts']; let fontResObj = {}; if (fonts) { let fontArray = []; fontArray = fontArray.concat(fonts['ofd:Font']); for (const font of fontArray) { if (font) { if (font['@_FamilyName']) { fontResObj[font['@_ID']] = font['@_FamilyName']; } else { fontResObj[font['@_ID']] = font['@_FontName']; } } } } return fontResObj; }; const getDrawParam = async function (res) { const drawParams = res['ofd:DrawParams']; let drawParamResObj = {}; if (drawParams) { let array = []; array = array.concat(drawParams['ofd:DrawParam']); for (const item of array) { if (item) { drawParamResObj[item['@_ID']] = { 'LineWidth': item['@_LineWidth'], 'FillColor': item['ofd:FillColor'] ? item['ofd:FillColor']['@_Value'] : '', 'StrokeColor': item['ofd:StrokeColor'] ? item['ofd:StrokeColor']['@_Value'] : "", 'relative': item['@_Relative'] }; } } } return drawParamResObj; }; const getMultiMediaRes = async function (zip, res, doc) { const multiMedias = res['ofd:MultiMedias']; let multiMediaResObj = {}; if (multiMedias) { let array = []; array = array.concat(multiMedias['ofd:MultiMedia']); for (const item of array) { if (item) { // MediaFile 可能写成 /Doc_0/Res/x.png,而 zip 内条目名不带前导斜杠 let file = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* replaceFirstSlash */ "m"])(item['ofd:MediaFile']); if (res['@_BaseLoc']) { if (file.indexOf(res['@_BaseLoc']) === -1) { file = `${res['@_BaseLoc']}/${file}`; } } if (file.indexOf(doc) === -1) { file = `${doc}/${file}`; } if (item['@_Type'].toLowerCase() === 'image') { if (!zip.files[file]) { console.warn('OFD 图片资源不存在:', file); continue; } const format = item['@_Format']; const ext = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* getExtensionByPath */ "g"])(file); if (format && (format.toLowerCase() === 'gbig2' || format.toLowerCase() === 'jb2') || ext && (ext.toLowerCase() === 'jb2' || ext.toLowerCase() === 'gbig2')) { multiMediaResObj[item['@_ID']] = { 'format': 'gbig2', 'load': lazyResource(() => parseJbig2ImageFromZip(zip, file)) }; } else { multiMediaResObj[item['@_ID']] = { 'format': 'image', 'load': lazyResource(() => parseOtherImageFromZip(zip, file)) }; } } else { multiMediaResObj[item['@_ID']] = file; } } } } return multiMediaResObj; }; const parsePage = async function (zip, obj, doc) { let pagePath = obj['@_BaseLoc']; if (pagePath.indexOf(doc) == -1) { pagePath = `${doc}/${pagePath}`; } const data = await getJsonFromXmlContent(zip, pagePath); let pageObj = {}; pageObj[obj['@_ID']] = { 'json': data['json']['ofd:Page'], 'xml': data['xml'] }; return pageObj; }; const getSignature = async function (zip, signatures, doc) { let stampAnnot = []; if (signatures) { signatures = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* replaceFirstSlash */ "m"])(signatures); if (signatures.indexOf(doc) === -1) { signatures = `${doc}/${signatures}`; } if (zip.files[signatures]) { let data = await getJsonFromXmlContent(zip, signatures); let signature = data['json']['ofd:Signatures']['ofd:Signature']; let signatureArray = []; signatureArray = signatureArray.concat(signature); for (const sign of signatureArray) { if (sign) { let signatureLoc = sign['@_BaseLoc']; let signatureID = sign['@_ID']; signatureLoc = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* replaceFirstSlash */ "m"])(signatureLoc); if (signatureLoc.indexOf('Signs') === -1) { signatureLoc = `Signs/${signatureLoc}`; } if (signatureLoc.indexOf(doc) === -1) { signatureLoc = `${doc}/${signatureLoc}`; } stampAnnot.push(await getSignatureData(zip, signatureLoc, signatureID)); } } } } return stampAnnot; }; const getFileData = async function (zip, name) { if (!zip.files[name]) return null; return zip.files[name].async('uint8array'); }; const getSignatureData = async function (zip, signature, signatureID) { const data = await getJsonFromXmlContent(zip, signature); let signedValue = data['json']['ofd:Signature']['ofd:SignedValue']; signedValue = signedValue.toString().replace('/', ''); if (!zip.files[signedValue]) { signedValue = `${signature.substring(0, signature.lastIndexOf('/'))}/${signedValue}`; } let sealObj = await Object(_utils_ofd_ses_signature_parser__WEBPACK_IMPORTED_MODULE_14__[/* parseSesSignature */ "b"])(zip, signedValue); const checkMethod = data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:References']['@_CheckMethod']; global.toBeChecked = new Map(); let arr = new Array(); data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:References']['ofd:Reference'].forEach(async reference => { if (Object.keys(reference).length == 0 || Object.keys(reference['@_FileRef']).length == 0) { return true; } const hashed = reference['ofd:CheckValue']; const key = reference['@_FileRef'].replace('/', ''); let fileData = await getFileData(zip, key); arr.push({ fileData, hashed, checkMethod }); }); global.toBeChecked.set(signatureID, arr); return { 'stampAnnot': data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:StampAnnot'], 'sealObj': sealObj, 'signedInfo': { 'signatureID': signatureID, 'VerifyRet': sealObj.verifyRet, 'Provider': data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:Provider'], 'SignatureMethod': data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:SignatureMethod'], 'SignatureDateTime': data['json']['ofd:Signature']['ofd:SignedInfo']['ofd:SignatureDateTime'] } }; }; const getSealDocumentObj = function (stampAnnot) { return new Promise((resolve, reject) => { _utils_ofd_pipeline__WEBPACK_IMPORTED_MODULE_10__[/* pipeline */ "a"].call(this, async () => await unzipOfd(stampAnnot.sealObj.ofdArray), getDocRoots, parseSingleDoc).then(res => { resolve(res); }).catch(res => { reject(res); }); }); }; const getJsonFromXmlContent = async function (zip, xmlName) { return new Promise((resolve, reject) => { if (!zip.files[xmlName]) { reject(new Error('File not found in OFD: ' + xmlName)); return; } zip.files[xmlName].async('string').then(function (content) { let ops = { attributeNamePrefix: "@_", ignoreAttributes: false, parseNodeValue: false, trimValues: false }; let jsonObj = parser.parse(content, ops); let result = { 'xml': content, 'json': jsonObj }; resolve(result); }, function error(e) { reject(e); }); }); }; /** * 图片只在页面真正渲染时解码一次。 * 多页扫描件若在解析阶段就把所有图转成 dataURI,首屏要多等数秒(65 页约 2.8s / 35MB 字符串)。 */ const lazyResource = function (factory) { let pending = null; return function () { if (!pending) pending = factory(); return pending; }; }; const parseJbig2ImageFromZip = async function (zip, name) { const bytes = await zip.files[name].async('uint8array'); let jbig2 = new _jbig2_jbig2__WEBPACK_IMPORTED_MODULE_13__[/* Jbig2Image */ "a"](); const img = jbig2.parse(bytes); return { img, width: jbig2.width, height: jbig2.height }; }; const IMAGE_MIME_TYPES = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', bmp: 'image/bmp', tif: 'image/tiff', tiff: 'image/tiff' }; const parseOtherImageFromZip = async function (zip, name) { const bytes = await zip.files[name].async('uint8array'); const mime = IMAGE_MIME_TYPES[Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_12__[/* getExtensionByPath */ "g"])(name).toLowerCase()] || 'image/png'; // Blob URL 比 base64 快近一个数量级,也不产生几十 MB 的字符串 if (typeof URL !== 'undefined' && URL.createObjectURL && typeof Blob !== 'undefined') { return URL.createObjectURL(new Blob([bytes], { type: mime })); } return `data:${mime};base64,` + uint8ToBase64(bytes); }; const BASE64_CHUNK_SIZE = 0x8000; // 分块避免 String.fromCharCode 参数过多爆栈 const uint8ToBase64 = function (bytes) { let binary = ''; for (let i = 0; i < bytes.length; i += BASE64_CHUNK_SIZE) { binary += String.fromCharCode.apply(null, bytes.subarray(i, i + BASE64_CHUNK_SIZE)); } return btoa(binary); }; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "68df": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var size = __webpack_require__("8e16"); var iterate = __webpack_require__("384f"); var getSetRecord = __webpack_require__("7f65"); // `Set.prototype.isSubsetOf` method // https://tc39.es/ecma262/#sec-set.prototype.issubsetof module.exports = function isSubsetOf(other) { var O = aSet(this); var otherRec = getSetRecord(other); if (size(O) > otherRec.size) return false; return iterate(O, function (e) { if (!otherRec.includes(e)) return false; }, true) !== false; }; /***/ }), /***/ "68ee": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var classof = __webpack_require__("f5df"); var getBuiltIn = __webpack_require__("d066"); var inspectSource = __webpack_require__("8925"); var noop = function () { /* empty */ }; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec = uncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.test(noop); var isConstructorModern = function isConstructor(argument) { if (!isCallable(argument)) return false; try { construct(noop, [], argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function isConstructor(argument) { if (!isCallable(argument)) return false; switch (classof(argument)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': return false; } try { // we can't check .prototype since constructors produced by .bind haven't it // `Function#toString` throws on some built-it function in some legacy engines // (for example, `DOMQuad` and similar in FF41-) return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); } catch (error) { return true; } }; isConstructorLegacy.sham = true; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor module.exports = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; /***/ }), /***/ "6964": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineBuiltIn = __webpack_require__("cb2d"); module.exports = function (target, src, options) { for (var key in src) defineBuiltIn(target, key, src[key], options); return target; }; /***/ }), /***/ "699f": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// Converted from: https://www.cs.auckland.ac.nz/~pgut001/dumpasn1.cfg // which is made by Peter Gutmann and whose license states: // You can use this code in whatever way you want, // as long as you don't try to claim you wrote it. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { 'use strict'; return { "0.2.262.1.10": { "d": "Telesec", "c": "Deutsche Telekom" }, "0.2.262.1.10.0": { "d": "extension", "c": "Telesec" }, "0.2.262.1.10.1": { "d": "mechanism", "c": "Telesec" }, "0.2.262.1.10.1.0": { "d": "authentication", "c": "Telesec mechanism" }, "0.2.262.1.10.1.0.1": { "d": "passwordAuthentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.2": { "d": "protectedPasswordAuthentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.3": { "d": "oneWayX509Authentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.4": { "d": "twoWayX509Authentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.5": { "d": "threeWayX509Authentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.6": { "d": "oneWayISO9798Authentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.7": { "d": "twoWayISO9798Authentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.0.8": { "d": "telekomAuthentication", "c": "Telesec authentication" }, "0.2.262.1.10.1.1": { "d": "signature", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.1": { "d": "md4WithRSAAndISO9697", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.2": { "d": "md4WithRSAAndTelesecSignatureStandard", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.3": { "d": "md5WithRSAAndISO9697", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.4": { "d": "md5WithRSAAndTelesecSignatureStandard", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.5": { "d": "ripemd160WithRSAAndTelekomSignatureStandard", "c": "Telesec mechanism" }, "0.2.262.1.10.1.1.9": { "d": "hbciRsaSignature", "c": "Telesec signature" }, "0.2.262.1.10.1.2": { "d": "encryption", "c": "Telesec mechanism" }, "0.2.262.1.10.1.2.0": { "d": "none", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.1": { "d": "rsaTelesec", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2": { "d": "des", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2.1": { "d": "desECB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2.2": { "d": "desCBC", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2.3": { "d": "desOFB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2.4": { "d": "desCFB8", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.2.5": { "d": "desCFB64", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3": { "d": "des3", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3.1": { "d": "des3ECB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3.2": { "d": "des3CBC", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3.3": { "d": "des3OFB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3.4": { "d": "des3CFB8", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.3.5": { "d": "des3CFB64", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.4": { "d": "magenta", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5": { "d": "idea", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5.1": { "d": "ideaECB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5.2": { "d": "ideaCBC", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5.3": { "d": "ideaOFB", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5.4": { "d": "ideaCFB8", "c": "Telesec encryption" }, "0.2.262.1.10.1.2.5.5": { "d": "ideaCFB64", "c": "Telesec encryption" }, "0.2.262.1.10.1.3": { "d": "oneWayFunction", "c": "Telesec mechanism" }, "0.2.262.1.10.1.3.1": { "d": "md4", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.2": { "d": "md5", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.3": { "d": "sqModNX509", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.4": { "d": "sqModNISO", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.5": { "d": "ripemd128", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.6": { "d": "hashUsingBlockCipher", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.7": { "d": "mac", "c": "Telesec one-way function" }, "0.2.262.1.10.1.3.8": { "d": "ripemd160", "c": "Telesec one-way function" }, "0.2.262.1.10.1.4": { "d": "fecFunction", "c": "Telesec mechanism" }, "0.2.262.1.10.1.4.1": { "d": "reedSolomon", "c": "Telesec mechanism" }, "0.2.262.1.10.2": { "d": "module", "c": "Telesec" }, "0.2.262.1.10.2.0": { "d": "algorithms", "c": "Telesec module" }, "0.2.262.1.10.2.1": { "d": "attributeTypes", "c": "Telesec module" }, "0.2.262.1.10.2.2": { "d": "certificateTypes", "c": "Telesec module" }, "0.2.262.1.10.2.3": { "d": "messageTypes", "c": "Telesec module" }, "0.2.262.1.10.2.4": { "d": "plProtocol", "c": "Telesec module" }, "0.2.262.1.10.2.5": { "d": "smeAndComponentsOfSme", "c": "Telesec module" }, "0.2.262.1.10.2.6": { "d": "fec", "c": "Telesec module" }, "0.2.262.1.10.2.7": { "d": "usefulDefinitions", "c": "Telesec module" }, "0.2.262.1.10.2.8": { "d": "stefiles", "c": "Telesec module" }, "0.2.262.1.10.2.9": { "d": "sadmib", "c": "Telesec module" }, "0.2.262.1.10.2.10": { "d": "electronicOrder", "c": "Telesec module" }, "0.2.262.1.10.2.11": { "d": "telesecTtpAsymmetricApplication", "c": "Telesec module" }, "0.2.262.1.10.2.12": { "d": "telesecTtpBasisApplication", "c": "Telesec module" }, "0.2.262.1.10.2.13": { "d": "telesecTtpMessages", "c": "Telesec module" }, "0.2.262.1.10.2.14": { "d": "telesecTtpTimeStampApplication", "c": "Telesec module" }, "0.2.262.1.10.3": { "d": "objectClass", "c": "Telesec" }, "0.2.262.1.10.3.0": { "d": "telesecOtherName", "c": "Telesec object class" }, "0.2.262.1.10.3.1": { "d": "directory", "c": "Telesec object class" }, "0.2.262.1.10.3.2": { "d": "directoryType", "c": "Telesec object class" }, "0.2.262.1.10.3.3": { "d": "directoryGroup", "c": "Telesec object class" }, "0.2.262.1.10.3.4": { "d": "directoryUser", "c": "Telesec object class" }, "0.2.262.1.10.3.5": { "d": "symmetricKeyEntry", "c": "Telesec object class" }, "0.2.262.1.10.4": { "d": "package", "c": "Telesec" }, "0.2.262.1.10.5": { "d": "parameter", "c": "Telesec" }, "0.2.262.1.10.6": { "d": "nameBinding", "c": "Telesec" }, "0.2.262.1.10.7": { "d": "attribute", "c": "Telesec" }, "0.2.262.1.10.7.0": { "d": "applicationGroupIdentifier", "c": "Telesec attribute" }, "0.2.262.1.10.7.1": { "d": "certificateType", "c": "Telesec attribute" }, "0.2.262.1.10.7.2": { "d": "telesecCertificate", "c": "Telesec attribute" }, "0.2.262.1.10.7.3": { "d": "certificateNumber", "c": "Telesec attribute" }, "0.2.262.1.10.7.4": { "d": "certificateRevocationList", "c": "Telesec attribute" }, "0.2.262.1.10.7.5": { "d": "creationDate", "c": "Telesec attribute" }, "0.2.262.1.10.7.6": { "d": "issuer", "c": "Telesec attribute" }, "0.2.262.1.10.7.7": { "d": "namingAuthority", "c": "Telesec attribute" }, "0.2.262.1.10.7.8": { "d": "publicKeyDirectory", "c": "Telesec attribute" }, "0.2.262.1.10.7.9": { "d": "securityDomain", "c": "Telesec attribute" }, "0.2.262.1.10.7.10": { "d": "subject", "c": "Telesec attribute" }, "0.2.262.1.10.7.11": { "d": "timeOfRevocation", "c": "Telesec attribute" }, "0.2.262.1.10.7.12": { "d": "userGroupReference", "c": "Telesec attribute" }, "0.2.262.1.10.7.13": { "d": "validity", "c": "Telesec attribute" }, "0.2.262.1.10.7.14": { "d": "zert93", "c": "Telesec attribute" }, "0.2.262.1.10.7.15": { "d": "securityMessEnv", "c": "Telesec attribute" }, "0.2.262.1.10.7.16": { "d": "anonymizedPublicKeyDirectory", "c": "Telesec attribute" }, "0.2.262.1.10.7.17": { "d": "telesecGivenName", "c": "Telesec attribute" }, "0.2.262.1.10.7.18": { "d": "nameAdditions", "c": "Telesec attribute" }, "0.2.262.1.10.7.19": { "d": "telesecPostalCode", "c": "Telesec attribute" }, "0.2.262.1.10.7.20": { "d": "nameDistinguisher", "c": "Telesec attribute" }, "0.2.262.1.10.7.21": { "d": "telesecCertificateList", "c": "Telesec attribute" }, "0.2.262.1.10.7.22": { "d": "teletrustCertificateList", "c": "Telesec attribute" }, "0.2.262.1.10.7.23": { "d": "x509CertificateList", "c": "Telesec attribute" }, "0.2.262.1.10.7.24": { "d": "timeOfIssue", "c": "Telesec attribute" }, "0.2.262.1.10.7.25": { "d": "physicalCardNumber", "c": "Telesec attribute" }, "0.2.262.1.10.7.26": { "d": "fileType", "c": "Telesec attribute" }, "0.2.262.1.10.7.27": { "d": "ctlFileIsArchive", "c": "Telesec attribute" }, "0.2.262.1.10.7.28": { "d": "emailAddress", "c": "Telesec attribute" }, "0.2.262.1.10.7.29": { "d": "certificateTemplateList", "c": "Telesec attribute" }, "0.2.262.1.10.7.30": { "d": "directoryName", "c": "Telesec attribute" }, "0.2.262.1.10.7.31": { "d": "directoryTypeName", "c": "Telesec attribute" }, "0.2.262.1.10.7.32": { "d": "directoryGroupName", "c": "Telesec attribute" }, "0.2.262.1.10.7.33": { "d": "directoryUserName", "c": "Telesec attribute" }, "0.2.262.1.10.7.34": { "d": "revocationFlag", "c": "Telesec attribute" }, "0.2.262.1.10.7.35": { "d": "symmetricKeyEntryName", "c": "Telesec attribute" }, "0.2.262.1.10.7.36": { "d": "glNumber", "c": "Telesec attribute" }, "0.2.262.1.10.7.37": { "d": "goNumber", "c": "Telesec attribute" }, "0.2.262.1.10.7.38": { "d": "gKeyData", "c": "Telesec attribute" }, "0.2.262.1.10.7.39": { "d": "zKeyData", "c": "Telesec attribute" }, "0.2.262.1.10.7.40": { "d": "ktKeyData", "c": "Telesec attribute" }, "0.2.262.1.10.7.41": { "d": "ktKeyNumber", "c": "Telesec attribute" }, "0.2.262.1.10.7.51": { "d": "timeOfRevocationGen", "c": "Telesec attribute" }, "0.2.262.1.10.7.52": { "d": "liabilityText", "c": "Telesec attribute" }, "0.2.262.1.10.8": { "d": "attributeGroup", "c": "Telesec" }, "0.2.262.1.10.9": { "d": "action", "c": "Telesec" }, "0.2.262.1.10.10": { "d": "notification", "c": "Telesec" }, "0.2.262.1.10.11": { "d": "snmp-mibs", "c": "Telesec" }, "0.2.262.1.10.11.1": { "d": "securityApplication", "c": "Telesec SNMP MIBs" }, "0.2.262.1.10.12": { "d": "certAndCrlExtensionDefinitions", "c": "Telesec" }, "0.2.262.1.10.12.0": { "d": "liabilityLimitationFlag", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.1": { "d": "telesecCertIdExt", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.2": { "d": "Telesec policyIdentifier", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.3": { "d": "telesecPolicyQualifierID", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.4": { "d": "telesecCRLFilteredExt", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.5": { "d": "telesecCRLFilterExt", "c": "Telesec cert/CRL extension" }, "0.2.262.1.10.12.6": { "d": "telesecNamingAuthorityExt", "c": "Telesec cert/CRL extension" }, "0.4.0.127.0.7": { "d": "bsi", "c": "BSI TR-03110/TR-03111" }, "0.4.0.127.0.7.1": { "d": "bsiEcc", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1": { "d": "bsifieldType", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.1": { "d": "bsiPrimeField", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2": { "d": "bsiCharacteristicTwoField", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.2": { "d": "bsiECTLVKeyFormat", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.2.1": { "d": "bsiECTLVPublicKey", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.3": { "d": "bsiCharacteristicTwoBasis", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.3.1": { "d": "bsiGnBasis", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.3.2": { "d": "bsiTpBasis", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.2.3.3": { "d": "bsiPpBasis", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1": { "d": "bsiEcdsaSignatures", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.1": { "d": "bsiEcdsaWithSHA1", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.2": { "d": "bsiEcdsaWithSHA224", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.3": { "d": "bsiEcdsaWithSHA256", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.4": { "d": "bsiEcdsaWithSHA384", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.5": { "d": "bsiEcdsaWithSHA512", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.4.1.6": { "d": "bsiEcdsaWithRIPEMD160", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1": { "d": "bsiEckaEgX963KDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.1": { "d": "bsiEckaEgX963KDFWithSHA1", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.2": { "d": "bsiEckaEgX963KDFWithSHA224", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.3": { "d": "bsiEckaEgX963KDFWithSHA256", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.4": { "d": "bsiEckaEgX963KDFWithSHA384", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.5": { "d": "bsiEckaEgX963KDFWithSHA512", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.1.6": { "d": "bsiEckaEgX963KDFWithRIPEMD160", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.2": { "d": "bsiEckaEgSessionKDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.2.1": { "d": "bsiEckaEgSessionKDFWith3DES", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.2.2": { "d": "bsiEckaEgSessionKDFWithAES128", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.2.3": { "d": "bsiEckaEgSessionKDFWithAES192", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.1.2.4": { "d": "bsiEckaEgSessionKDFWithAES256", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2": { "d": "bsiEckaDH", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1": { "d": "bsiEckaDHX963KDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.1": { "d": "bsiEckaDHX963KDFWithSHA1", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.2": { "d": "bsiEckaDHX963KDFWithSHA224", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.3": { "d": "bsiEckaDHX963KDFWithSHA256", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.4": { "d": "bsiEckaDHX963KDFWithSHA384", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.5": { "d": "bsiEckaDHX963KDFWithSHA512", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.1.6": { "d": "bsiEckaDHX963KDFWithRIPEMD160", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.2": { "d": "bsiEckaDHSessionKDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.2.1": { "d": "bsiEckaDHSessionKDFWith3DES", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.2.2": { "d": "bsiEckaDHSessionKDFWithAES128", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.2.3": { "d": "bsiEckaDHSessionKDFWithAES192", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.1.5.2.2.4": { "d": "bsiEckaDHSessionKDFWithAES256", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.2": { "d": "bsiEcKeyType", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.2.1": { "d": "bsiEcPublicKey", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.5.1": { "d": "bsiKaeg", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.5.1.1": { "d": "bsiKaegWithX963KDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.1.5.1.2": { "d": "bsiKaegWith3DESKDF", "c": "BSI TR-03111" }, "0.4.0.127.0.7.2.2.1": { "d": "bsiPK", "c": "BSI TR-03110. Formerly known as bsiCA, now moved to ...2.2.3.x" }, "0.4.0.127.0.7.2.2.1.1": { "d": "bsiPK_DH", "c": "BSI TR-03110. Formerly known as bsiCA_DH, now moved to ...2.2.3.x" }, "0.4.0.127.0.7.2.2.1.2": { "d": "bsiPK_ECDH", "c": "BSI TR-03110. Formerly known as bsiCA_ECDH, now moved to ...2.2.3.x" }, "0.4.0.127.0.7.2.2.2": { "d": "bsiTA", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1": { "d": "bsiTA_RSA", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.1": { "d": "bsiTA_RSAv1_5_SHA1", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.2": { "d": "bsiTA_RSAv1_5_SHA256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.3": { "d": "bsiTA_RSAPSS_SHA1", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.4": { "d": "bsiTA_RSAPSS_SHA256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.5": { "d": "bsiTA_RSAv1_5_SHA512", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.1.6": { "d": "bsiTA_RSAPSS_SHA512", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2": { "d": "bsiTA_ECDSA", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2.1": { "d": "bsiTA_ECDSA_SHA1", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2.2": { "d": "bsiTA_ECDSA_SHA224", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2.3": { "d": "bsiTA_ECDSA_SHA256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2.4": { "d": "bsiTA_ECDSA_SHA384", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.2.2.5": { "d": "bsiTA_ECDSA_SHA512", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3": { "d": "bsiCA", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.1": { "d": "bsiCA_DH", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.1.1": { "d": "bsiCA_DH_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.1.2": { "d": "bsiCA_DH_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.1.3": { "d": "bsiCA_DH_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.1.4": { "d": "bsiCA_DH_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.2": { "d": "bsiCA_ECDH", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.2.1": { "d": "bsiCA_ECDH_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.2.2": { "d": "bsiCA_ECDH_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.2.3": { "d": "bsiCA_ECDH_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.3.2.4": { "d": "bsiCA_ECDH_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4": { "d": "bsiPACE", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.1": { "d": "bsiPACE_DH_GM", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.1.1": { "d": "bsiPACE_DH_GM_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.1.2": { "d": "bsiPACE_DH_GM_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.1.3": { "d": "bsiPACE_DH_GM_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.1.4": { "d": "bsiPACE_DH_GM_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.2": { "d": "bsiPACE_ECDH_GM", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.2.1": { "d": "bsiPACE_ECDH_GM_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.2.2": { "d": "bsiPACE_ECDH_GM_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.2.3": { "d": "bsiPACE_ECDH_GM_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.2.4": { "d": "bsiPACE_ECDH_GM_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.3": { "d": "bsiPACE_DH_IM", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.3.1": { "d": "bsiPACE_DH_IM_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.3.2": { "d": "bsiPACE_DH_IM_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.3.3": { "d": "bsiPACE_DH_IM_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.3.4": { "d": "bsiPACE_DH_IM_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.4": { "d": "bsiPACE_ECDH_IM", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.4.1": { "d": "bsiPACE_ECDH_IM_3DES_CBC_CBC", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.4.2": { "d": "bsiPACE_ECDH_IM_AES_CBC_CMAC_128", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.4.3": { "d": "bsiPACE_ECDH_IM_AES_CBC_CMAC_192", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.4.4.4": { "d": "bsiPACE_ECDH_IM_AES_CBC_CMAC_256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5": { "d": "bsiRI", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1": { "d": "bsiRI_DH", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1.1": { "d": "bsiRI_DH_SHA1", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1.2": { "d": "bsiRI_DH_SHA224", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1.3": { "d": "bsiRI_DH_SHA256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1.4": { "d": "bsiRI_DH_SHA384", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.1.5": { "d": "bsiRI_DH_SHA512", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2": { "d": "bsiRI_ECDH", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2.1": { "d": "bsiRI_ECDH_SHA1", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2.2": { "d": "bsiRI_ECDH_SHA224", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2.3": { "d": "bsiRI_ECDH_SHA256", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2.4": { "d": "bsiRI_ECDH_SHA384", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.5.2.5": { "d": "bsiRI_ECDH_SHA512", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.6": { "d": "bsiCardInfo", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.7": { "d": "bsiEidSecurity", "c": "BSI TR-03110" }, "0.4.0.127.0.7.2.2.8": { "d": "bsiPT", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.2": { "d": "bsiEACRoles", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.2.1": { "d": "bsiEACRolesIS", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.2.2": { "d": "bsiEACRolesAT", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.2.3": { "d": "bsiEACRolesST", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3": { "d": "bsiTAv2ce", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3.1": { "d": "bsiTAv2ceDescription", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3.1.1": { "d": "bsiTAv2ceDescriptionPlainText", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3.1.2": { "d": "bsiTAv2ceDescriptionIA5String", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3.1.3": { "d": "bsiTAv2ceDescriptionOctetString", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.3.2": { "d": "bsiTAv2ceTerminalSector", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.4": { "d": "bsiAuxData", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.4.1": { "d": "bsiAuxDataBirthday", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.4.2": { "d": "bsiAuxDataExpireDate", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.4.3": { "d": "bsiAuxDataCommunityID", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5": { "d": "bsiDefectList", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.1": { "d": "bsiDefectAuthDefect", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.1.1": { "d": "bsiDefectCertRevoked", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.1.2": { "d": "bsiDefectCertReplaced", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.1.3": { "d": "bsiDefectChipAuthKeyRevoked", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.1.4": { "d": "bsiDefectActiveAuthKeyRevoked", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.2": { "d": "bsiDefectEPassportDefect", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.2.1": { "d": "bsiDefectEPassportDGMalformed", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.2.2": { "d": "bsiDefectSODInvalid", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.3": { "d": "bsiDefectEIDDefect", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.3.1": { "d": "bsiDefectEIDDGMalformed", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.3.2": { "d": "bsiDefectEIDIntegrity", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.4": { "d": "bsiDefectDocumentDefect", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.4.1": { "d": "bsiDefectCardSecurityMalformed", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.4.2": { "d": "bsiDefectChipSecurityMalformed", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.5.4.3": { "d": "bsiDefectPowerDownReq", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.1.6": { "d": "bsiListContentDescription", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.2.1": { "d": "bsiSecurityObject", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.2.2": { "d": "bsiBlackList", "c": "BSI TR-03110" }, "0.4.0.127.0.7.3.4.2.2": { "d": "bsiSignedUpdateDeviceAdmin", "c": "BSI TR-03109" }, "0.4.0.127.0.7.4.1.1.1": { "d": "bsiCertReqMsgs", "c": "BSI TR-03109" }, "0.4.0.127.0.7.4.1.1.2": { "d": "bsiCertReqMsgswithOuterSignature", "c": "BSI TR-03109" }, "0.4.0.127.0.7.4.1.1.3": { "d": "bsiAuthorizedCertReqMsgs", "c": "BSI TR-03109" }, "0.4.0.127.0.7.4.1.2.2": { "d": "bsiSignedRevReqs", "c": "BSI TR-03109" }, "0.4.0.1862": { "d": "etsiQcsProfile", "c": "ETSI TS 101 862 qualified certificates" }, "0.4.0.1862.1": { "d": "etsiQcs", "c": "ETSI TS 101 862 qualified certificates" }, "0.4.0.1862.1.1": { "d": "etsiQcsCompliance", "c": "ETSI TS 101 862 qualified certificates" }, "0.4.0.1862.1.2": { "d": "etsiQcsLimitValue", "c": "ETSI TS 101 862 qualified certificates" }, "0.4.0.1862.1.3": { "d": "etsiQcsRetentionPeriod", "c": "ETSI TS 101 862 qualified certificates" }, "0.4.0.1862.1.4": { "d": "etsiQcsQcSSCD", "c": "ETSI TS 101 862 qualified certificates" }, "0.9.2342.19200300.100.1.1": { "d": "userID", "c": "Some oddball X.500 attribute collection" }, "0.9.2342.19200300.100.1.3": { "d": "rfc822Mailbox", "c": "Some oddball X.500 attribute collection" }, "0.9.2342.19200300.100.1.25": { "d": "domainComponent", "c": "Men are from Mars, this OID is from Pluto" }, "1.0.10118.3.0.49": { "d": "ripemd160", "c": "ISO 10118-3 hash function" }, "1.0.10118.3.0.50": { "d": "ripemd128", "c": "ISO 10118-3 hash function" }, "1.0.10118.3.0.55": { "d": "whirlpool", "c": "ISO 10118-3 hash function" }, "1.0.18033.2": { "d": "iso18033-2", "c": "ISO 18033-2" }, "1.0.18033.2.2": { "d": "kem", "c": "ISO 18033-2 algorithms" }, "1.0.18033.2.2.4": { "d": "kemRSA", "c": "ISO 18033-2 KEM algorithms" }, "1.2.36.1.3.1.1.1": { "d": "qgpki", "c": "Queensland Government PKI" }, "1.2.36.1.3.1.1.1.1": { "d": "qgpkiPolicies", "c": "QGPKI policies" }, "1.2.36.1.3.1.1.1.1.1": { "d": "qgpkiMedIntermedCA", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.1.1": { "d": "qgpkiMedIntermedIndividual", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.1.2": { "d": "qgpkiMedIntermedDeviceControl", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.1.3": { "d": "qgpkiMedIntermedDevice", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.1.4": { "d": "qgpkiMedIntermedAuthorisedParty", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.1.5": { "d": "qgpkiMedIntermedDeviceSystem", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2": { "d": "qgpkiMedIssuingCA", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.1": { "d": "qgpkiMedIssuingIndividual", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.2": { "d": "qgpkiMedIssuingDeviceControl", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.3": { "d": "qgpkiMedIssuingDevice", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.4": { "d": "qgpkiMedIssuingAuthorisedParty", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.5": { "d": "qgpkiMedIssuingClientAuth", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.6": { "d": "qgpkiMedIssuingServerAuth", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.7": { "d": "qgpkiMedIssuingDataProt", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.2.8": { "d": "qgpkiMedIssuingTokenAuth", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.3": { "d": "qgpkiBasicIntermedCA", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.3.1": { "d": "qgpkiBasicIntermedDeviceSystem", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.4": { "d": "qgpkiBasicIssuingCA", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.4.1": { "d": "qgpkiBasicIssuingClientAuth", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.4.2": { "d": "qgpkiBasicIssuingServerAuth", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.1.4.3": { "d": "qgpkiBasicIssuingDataSigning", "c": "QGPKI policy" }, "1.2.36.1.3.1.1.1.2": { "d": "qgpkiAssuranceLevel", "c": "QGPKI assurance level" }, "1.2.36.1.3.1.1.1.2.1": { "d": "qgpkiAssuranceRudimentary", "c": "QGPKI assurance level" }, "1.2.36.1.3.1.1.1.2.2": { "d": "qgpkiAssuranceBasic", "c": "QGPKI assurance level" }, "1.2.36.1.3.1.1.1.2.3": { "d": "qgpkiAssuranceMedium", "c": "QGPKI assurance level" }, "1.2.36.1.3.1.1.1.2.4": { "d": "qgpkiAssuranceHigh", "c": "QGPKI assurance level" }, "1.2.36.1.3.1.1.1.3": { "d": "qgpkiCertFunction", "c": "QGPKI policies" }, "1.2.36.1.3.1.1.1.3.1": { "d": "qgpkiFunctionIndividual", "c": "QGPKI policies" }, "1.2.36.1.3.1.1.1.3.2": { "d": "qgpkiFunctionDevice", "c": "QGPKI policies" }, "1.2.36.1.3.1.1.1.3.3": { "d": "qgpkiFunctionAuthorisedParty", "c": "QGPKI policies" }, "1.2.36.1.3.1.1.1.3.4": { "d": "qgpkiFunctionDeviceControl", "c": "QGPKI policies" }, "1.2.36.1.3.1.2": { "d": "qpspki", "c": "Queensland Police PKI" }, "1.2.36.1.3.1.2.1": { "d": "qpspkiPolicies", "c": "Queensland Police PKI" }, "1.2.36.1.3.1.2.1.2": { "d": "qpspkiPolicyBasic", "c": "Queensland Police PKI" }, "1.2.36.1.3.1.2.1.3": { "d": "qpspkiPolicyMedium", "c": "Queensland Police PKI" }, "1.2.36.1.3.1.2.1.4": { "d": "qpspkiPolicyHigh", "c": "Queensland Police PKI" }, "1.2.36.1.3.1.3.2": { "d": "qtmrpki", "c": "Queensland Transport PKI" }, "1.2.36.1.3.1.3.2.1": { "d": "qtmrpkiPolicies", "c": "Queensland Transport PKI" }, "1.2.36.1.3.1.3.2.2": { "d": "qtmrpkiPurpose", "c": "Queensland Transport PKI" }, "1.2.36.1.3.1.3.2.2.1": { "d": "qtmrpkiIndividual", "c": "Queensland Transport PKI purpose" }, "1.2.36.1.3.1.3.2.2.2": { "d": "qtmrpkiDeviceControl", "c": "Queensland Transport PKI purpose" }, "1.2.36.1.3.1.3.2.2.3": { "d": "qtmrpkiDevice", "c": "Queensland Transport PKI purpose" }, "1.2.36.1.3.1.3.2.2.4": { "d": "qtmrpkiAuthorisedParty", "c": "Queensland Transport PKI purpose" }, "1.2.36.1.3.1.3.2.2.5": { "d": "qtmrpkiDeviceSystem", "c": "Queensland Transport PKI purpose" }, "1.2.36.1.3.1.3.2.3": { "d": "qtmrpkiDevice", "c": "Queensland Transport PKI" }, "1.2.36.1.3.1.3.2.3.1": { "d": "qtmrpkiDriverLicense", "c": "Queensland Transport PKI device" }, "1.2.36.1.3.1.3.2.3.2": { "d": "qtmrpkiIndustryAuthority", "c": "Queensland Transport PKI device" }, "1.2.36.1.3.1.3.2.3.3": { "d": "qtmrpkiMarineLicense", "c": "Queensland Transport PKI device" }, "1.2.36.1.3.1.3.2.3.4": { "d": "qtmrpkiAdultProofOfAge", "c": "Queensland Transport PKI device" }, "1.2.36.1.3.1.3.2.3.5": { "d": "qtmrpkiSam", "c": "Queensland Transport PKI device" }, "1.2.36.1.3.1.3.2.4": { "d": "qtmrpkiAuthorisedParty", "c": "Queensland Transport PKI" }, "1.2.36.1.3.1.3.2.4.1": { "d": "qtmrpkiTransportInspector", "c": "Queensland Transport PKI authorised party" }, "1.2.36.1.3.1.3.2.4.2": { "d": "qtmrpkiPoliceOfficer", "c": "Queensland Transport PKI authorised party" }, "1.2.36.1.3.1.3.2.4.3": { "d": "qtmrpkiSystem", "c": "Queensland Transport PKI authorised party" }, "1.2.36.1.3.1.3.2.4.4": { "d": "qtmrpkiLiquorLicensingInspector", "c": "Queensland Transport PKI authorised party" }, "1.2.36.1.3.1.3.2.4.5": { "d": "qtmrpkiMarineEnforcementOfficer", "c": "Queensland Transport PKI authorised party" }, "1.2.36.1.333.1": { "d": "australianBusinessNumber", "c": "Australian Government corporate taxpayer ID" }, "1.2.36.68980861.1.1.2": { "d": "signetPersonal", "c": "Signet CA" }, "1.2.36.68980861.1.1.3": { "d": "signetBusiness", "c": "Signet CA" }, "1.2.36.68980861.1.1.4": { "d": "signetLegal", "c": "Signet CA" }, "1.2.36.68980861.1.1.10": { "d": "signetPilot", "c": "Signet CA" }, "1.2.36.68980861.1.1.11": { "d": "signetIntraNet", "c": "Signet CA" }, "1.2.36.68980861.1.1.20": { "d": "signetPolicy", "c": "Signet CA" }, "1.2.36.75878867.1.100.1.1": { "d": "certificatesAustraliaPolicy", "c": "Certificates Australia CA" }, "1.2.156.10197.1": { "d": "gmtCryptographicAlgorithm", "c": "China GM Standards Committee" }, "1.2.156.10197.1.100": { "d": "gmtBlockCipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.102": { "d": "sm1Cipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.103": { "d": "ssf33Cipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.104": { "d": "sm4Cipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.200": { "d": "gmtStreamCipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.201": { "d": "zucCipher", "c": "China GM Standards Committee" }, "1.2.156.10197.1.300": { "d": "gmtPublicKeyCryptography", "c": "China GM Standards Committee" }, "1.2.156.10197.1.301": { "d": "sm2ECC", "c": "China GM Standards Committee" }, "1.2.156.10197.1.301.1": { "d": "sm2-1DigitalSignature", "c": "China GM Standards Committee" }, "1.2.156.10197.1.301.2": { "d": "sm2-2KeyExchange", "c": "China GM Standards Committee" }, "1.2.156.10197.1.301.3": { "d": "sm2-3PublicKeyEncryption", "c": "China GM Standards Committee" }, "1.2.156.10197.1.302": { "d": "gmtSM9IBE", "c": "China GM Standards Committee" }, "1.2.156.10197.1.302.1": { "d": "sm9-1DigitalSignature", "c": "China GM Standards Committee" }, "1.2.156.10197.1.302.2": { "d": "sm9-2KeyExchange", "c": "China GM Standards Committee" }, "1.2.156.10197.1.302.3": { "d": "sm9-3PublicKeyEncryption", "c": "China GM Standards Committee" }, "1.2.156.10197.1.400": { "d": "gmtHashAlgorithm", "c": "China GM Standards Committee" }, "1.2.156.10197.1.401": { "d": "sm3Hash", "c": "China GM Standards Committee" }, "1.2.156.10197.1.401.1": { "d": "sm3HashWithoutKey", "c": "China GM Standards Committee" }, "1.2.156.10197.1.401.2": { "d": "sm3HashWithKey", "c": "China GM Standards Committee" }, "1.2.156.10197.1.500": { "d": "gmtDigestSigning", "c": "China GM Standards Committee" }, "1.2.156.10197.1.501": { "d": "sm2withSM3", "c": "China GM Standards Committee" }, "1.2.156.10197.1.504": { "d": "rsaWithSM3", "c": "China GM Standards Committee" }, "1.2.156.10197.4.3": { "d": "gmtCertificateAuthority", "c": "China GM Standards Committee" }, "1.2.156.10197.6": { "d": "gmtStandardClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1": { "d": "gmtFoundationClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.1": { "d": "gmtAlgorithmClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.1.1": { "d": "zucStandard", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.1.2": { "d": "sm4Standard", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.1.3": { "d": "sm2Standard", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.1.4": { "d": "sm3Standard", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.2": { "d": "gmtIDClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.2.1": { "d": "gmtCryptoID", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.3": { "d": "gmtOperationModes", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.4": { "d": "gmtSecurityMechanism", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.4.1": { "d": "gmtSM2Specification", "c": "China GM Standards Committee" }, "1.2.156.10197.6.1.4.2": { "d": "gmtSM2CryptographicMessageSyntax", "c": "China GM Standards Committee" }, "1.2.156.10197.6.2": { "d": "gmtDeviceClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.3": { "d": "gmtServiceClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.4": { "d": "gmtInfrastructure", "c": "China GM Standards Committee" }, "1.2.156.10197.6.5": { "d": "gmtTestingClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.5.1": { "d": "gmtRandomTestingClass", "c": "China GM Standards Committee" }, "1.2.156.10197.6.6": { "d": "gmtManagementClass", "c": "China GM Standards Committee" }, "1.2.392.200011.61.1.1.1": { "d": "mitsubishiSecurityAlgorithm", "c": "Mitsubishi security algorithm" }, "1.2.392.200011.61.1.1.1.1": { "d": "misty1-cbc", "c": "Mitsubishi security algorithm" }, "1.2.410.200004.1": { "d": "kisaAlgorithm", "c": "KISA algorithm" }, "1.2.410.200004.1.1": { "d": "kcdsa", "c": "Korean DSA" }, "1.2.410.200004.1.2": { "d": "has160", "c": "Korean hash algorithm" }, "1.2.410.200004.1.3": { "d": "seedECB", "c": "Korean SEED algorithm, ECB mode" }, "1.2.410.200004.1.4": { "d": "seedCBC", "c": "Korean SEED algorithm, CBC mode" }, "1.2.410.200004.1.5": { "d": "seedOFB", "c": "Korean SEED algorithm, OFB mode" }, "1.2.410.200004.1.6": { "d": "seedCFB", "c": "Korean SEED algorithm, CFB mode" }, "1.2.410.200004.1.7": { "d": "seedMAC", "c": "Korean SEED algorithm, MAC mode" }, "1.2.410.200004.1.8": { "d": "kcdsaWithHAS160", "c": "Korean signature algorithm" }, "1.2.410.200004.1.9": { "d": "kcdsaWithSHA1", "c": "Korean signature algorithm" }, "1.2.410.200004.1.10": { "d": "pbeWithHAS160AndSEED-ECB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.11": { "d": "pbeWithHAS160AndSEED-CBC", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.12": { "d": "pbeWithHAS160AndSEED-CFB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.13": { "d": "pbeWithHAS160AndSEED-OFB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.14": { "d": "pbeWithSHA1AndSEED-ECB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.15": { "d": "pbeWithSHA1AndSEED-CBC", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.16": { "d": "pbeWithSHA1AndSEED-CFB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.17": { "d": "pbeWithSHA1AndSEED-OFB", "c": "Korean SEED algorithm, PBE key derivation" }, "1.2.410.200004.1.20": { "d": "rsaWithHAS160", "c": "Korean signature algorithm" }, "1.2.410.200004.1.21": { "d": "kcdsa1", "c": "Korean DSA" }, "1.2.410.200004.2": { "d": "npkiCP", "c": "KISA NPKI certificate policies" }, "1.2.410.200004.2.1": { "d": "npkiSignaturePolicy", "c": "KISA NPKI certificate policies" }, "1.2.410.200004.3": { "d": "npkiKP", "c": "KISA NPKI key usage" }, "1.2.410.200004.4": { "d": "npkiAT", "c": "KISA NPKI attribute" }, "1.2.410.200004.5": { "d": "npkiLCA", "c": "KISA NPKI licensed CA" }, "1.2.410.200004.5.1": { "d": "npkiSignKorea", "c": "KISA NPKI licensed CA" }, "1.2.410.200004.5.2": { "d": "npkiSignGate", "c": "KISA NPKI licensed CA" }, "1.2.410.200004.5.3": { "d": "npkiNcaSign", "c": "KISA NPKI licensed CA" }, "1.2.410.200004.6": { "d": "npkiON", "c": "KISA NPKI otherName" }, "1.2.410.200004.7": { "d": "npkiAPP", "c": "KISA NPKI application" }, "1.2.410.200004.7.1": { "d": "npkiSMIME", "c": "KISA NPKI application" }, "1.2.410.200004.7.1.1": { "d": "npkiSMIMEAlgo", "c": "KISA NPKI application" }, "1.2.410.200004.7.1.1.1": { "d": "npkiCmsSEEDWrap", "c": "KISA NPKI application" }, "1.2.410.200004.10": { "d": "npki", "c": "KISA NPKI" }, "1.2.410.200004.10.1": { "d": "npkiAttribute", "c": "KISA NPKI attribute" }, "1.2.410.200004.10.1.1": { "d": "npkiIdentifyData", "c": "KISA NPKI attribute" }, "1.2.410.200004.10.1.1.1": { "d": "npkiVID", "c": "KISA NPKI attribute" }, "1.2.410.200004.10.1.1.2": { "d": "npkiEncryptedVID", "c": "KISA NPKI attribute" }, "1.2.410.200004.10.1.1.3": { "d": "npkiRandomNum", "c": "KISA NPKI attribute" }, "1.2.410.200004.10.1.1.4": { "d": "npkiVID", "c": "KISA NPKI attribute" }, "1.2.410.200046.1.1": { "d": "aria1AlgorithmModes", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.1": { "d": "aria128-ecb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.2": { "d": "aria128-cbc", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.3": { "d": "aria128-cfb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.4": { "d": "aria128-ofb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.5": { "d": "aria128-ctr", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.6": { "d": "aria192-ecb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.7": { "d": "aria192-cbc", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.8": { "d": "aria192-cfb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.9": { "d": "aria192-ofb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.10": { "d": "aria192-ctr", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.11": { "d": "aria256-ecb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.12": { "d": "aria256-cbc", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.13": { "d": "aria256-cfb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.14": { "d": "aria256-ofb", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.15": { "d": "aria256-ctr", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.21": { "d": "aria128-cmac", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.22": { "d": "aria192-cmac", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.23": { "d": "aria256-cmac", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.31": { "d": "aria128-ocb2", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.32": { "d": "aria192-ocb2", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.33": { "d": "aria256-ocb2", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.34": { "d": "aria128-gcm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.35": { "d": "aria192-gcm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.36": { "d": "aria256-gcm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.37": { "d": "aria128-ccm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.38": { "d": "aria192-ccm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.39": { "d": "aria256-ccm", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.40": { "d": "aria128-keywrap", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.41": { "d": "aria192-keywrap", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.42": { "d": "aria256-keywrap", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.43": { "d": "aria128-keywrapWithPad", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.44": { "d": "aria192-keywrapWithPad", "c": "ARIA algorithm modes" }, "1.2.410.200046.1.1.45": { "d": "aria256-keywrapWithPad", "c": "ARIA algorithm modes" }, "1.2.643.2.2.3": { "d": "gostSignature", "c": "GOST R 34.10-2001 + GOST R 34.11-94 signature" }, "1.2.643.2.2.4": { "d": "gost94Signature", "c": "GOST R 34.10-94 + GOST R 34.11-94 signature. Obsoleted by GOST R 34.10-2001", "w": true }, "1.2.643.2.2.19": { "d": "gostPublicKey", "c": "GOST R 34.10-2001 (ECC) public key" }, "1.2.643.2.2.20": { "d": "gost94PublicKey", "c": "GOST R 34.10-94 public key. Obsoleted by GOST R 34.10-2001", "w": true }, "1.2.643.2.2.21": { "d": "gostCipher", "c": "GOST 28147-89 (symmetric key block cipher)" }, "1.2.643.2.2.31.0": { "d": "testCipherParams", "c": "Test params for GOST 28147-89" }, "1.2.643.2.2.31.1": { "d": "cryptoProCipherA", "c": "CryptoPro params A (default, variant 'Verba-O') for GOST 28147-89" }, "1.2.643.2.2.31.2": { "d": "cryptoProCipherB", "c": "CryptoPro params B (variant 1) for GOST 28147-89" }, "1.2.643.2.2.31.3": { "d": "cryptoProCipherC", "c": "CryptoPro params C (variant 2) for GOST 28147-89" }, "1.2.643.2.2.31.4": { "d": "cryptoProCipherD", "c": "CryptoPro params D (variant 3) for GOST 28147-89" }, "1.2.643.2.2.31.5": { "d": "oscar11Cipher", "c": "Oscar-1.1 params for GOST 28147-89" }, "1.2.643.2.2.31.6": { "d": "oscar10Cipher", "c": "Oscar-1.0 params for GOST 28147-89" }, "1.2.643.2.2.31.7": { "d": "ric1Cipher", "c": "RIC-1 params for GOST 28147-89" }, "1.2.643.2.2.31.12": { "d": "tc26CipherA", "c": "TC26 params 2 for GOST 28147-89" }, "1.2.643.2.2.31.13": { "d": "tc26CipherB", "c": "TC26 params 1 for GOST 28147-89" }, "1.2.643.2.2.31.14": { "d": "tc26CipherC", "c": "TC26 params 3 for GOST 28147-89" }, "1.2.643.2.2.31.15": { "d": "tc26CipherD", "c": "TC26 params 4 for GOST 28147-89" }, "1.2.643.2.2.31.16": { "d": "tc26CipherE", "c": "TC26 params 5 for GOST 28147-89" }, "1.2.643.2.2.31.17": { "d": "tc26CipherF", "c": "TC26 params 6 for GOST 28147-89" }, "1.2.643.7.1.2.5.1.1": { "d": "tc26CipherZ", "c": "TC26 params Z for GOST 28147-89" }, "1.2.643.2.2.9": { "d": "gostDigest", "c": "GOST R 34.11-94 digest" }, "1.2.643.2.2.30.0": { "d": "testDigestParams", "c": "Test params for GOST R 34.11-94" }, "1.2.643.2.2.30.1": { "d": "cryptoProDigestA", "c": "CryptoPro digest params A (default, variant 'Verba-O') for GOST R 34.11-94" }, "1.2.643.2.2.30.2": { "d": "cryptoProDigestB", "c": "CryptoPro digest params B (variant 1) for GOST R 34.11-94" }, "1.2.643.2.2.30.3": { "d": "cryptoProDigestC", "c": "CryptoPro digest params C (variant 2) for GOST R 34.11-94" }, "1.2.643.2.2.30.4": { "d": "cryptoProDigestD", "c": "CryptoPro digest params D (variant 3) for GOST R 34.11-94" }, "1.2.643.2.2.32.2": { "d": "cryptoPro94SignA", "c": "CryptoPro sign params A (default, variant 'Verba-O') for GOST R 34.10-94" }, "1.2.643.2.2.32.3": { "d": "cryptoPro94SignB", "c": "CryptoPro sign params B (variant 1) for GOST R 34.10-94" }, "1.2.643.2.2.32.4": { "d": "cryptoPro94SignC", "c": "CryptoPro sign params C (variant 2) for GOST R 34.10-94" }, "1.2.643.2.2.32.5": { "d": "cryptoPro94SignD", "c": "CryptoPro sign params D (variant 3) for GOST R 34.10-94" }, "1.2.643.2.2.33.1": { "d": "cryptoPro94SignXA", "c": "CryptoPro sign params XA (variant 1) for GOST R 34.10-94" }, "1.2.643.2.2.33.2": { "d": "cryptoPro94SignXB", "c": "CryptoPro sign params XB (variant 2) for GOST R 34.10-94" }, "1.2.643.2.2.33.3": { "d": "cryptoPro94SignXC", "c": "CryptoPro sign params XC (variant 3) for GOST R 34.10-94" }, "1.2.643.2.2.35.0": { "d": "testSignParams", "c": "Test elliptic curve for GOST R 34.10-2001" }, "1.2.643.2.2.35.1": { "d": "cryptoProSignA", "c": "CryptoPro ell.curve A for GOST R 34.10-2001" }, "1.2.643.2.2.35.2": { "d": "cryptoProSignB", "c": "CryptoPro ell.curve B for GOST R 34.10-2001" }, "1.2.643.2.2.35.3": { "d": "cryptoProSignC", "c": "CryptoPro ell.curve C for GOST R 34.10-2001" }, "1.2.643.2.2.36.0": { "d": "cryptoProSignXA", "c": "CryptoPro ell.curve XA for GOST R 34.10-2001" }, "1.2.643.2.2.36.1": { "d": "cryptoProSignXB", "c": "CryptoPro ell.curve XB for GOST R 34.10-2001" }, "1.2.643.7.1.2.1.1.1": { "d": "cryptoPro2012Sign256A", "c": "CryptoPro ell.curve A for GOST R 34.10-2012 256 bit" }, "1.2.643.7.1.2.1.2.1": { "d": "cryptoPro2012Sign512A", "c": "CryptoPro ell.curve A (default) for GOST R 34.10-2012 512 bit" }, "1.2.643.7.1.2.1.2.2": { "d": "cryptoPro2012Sign512B", "c": "CryptoPro ell.curve B for GOST R 34.10-2012 512 bit" }, "1.2.643.7.1.2.1.2.3": { "d": "cryptoPro2012Sign512C", "c": "CryptoPro ell.curve C for GOST R 34.10-2012 512 bit" }, "1.2.643.2.2.14.0": { "d": "nullMeshing", "c": "Do not mesh state of GOST 28147-89 cipher" }, "1.2.643.2.2.14.1": { "d": "cryptoProMeshing", "c": "CryptoPro meshing of state of GOST 28147-89 cipher" }, "1.2.643.2.2.10": { "d": "hmacGost", "c": "HMAC with GOST R 34.11-94" }, "1.2.643.2.2.13.0": { "d": "gostWrap", "c": "Wrap key using GOST 28147-89 key" }, "1.2.643.2.2.13.1": { "d": "cryptoProWrap", "c": "Wrap key using diversified GOST 28147-89 key" }, "1.2.643.2.2.96": { "d": "cryptoProECDHWrap", "c": "Wrap key using ECC DH on GOST R 34.10-2001 keys (VKO)" }, "1.2.643.7.1.1.1.1": { "d": "gost2012PublicKey256", "c": "GOST R 34.10-2012 256 bit public key" }, "1.2.643.7.1.1.1.2": { "d": "gost2012PublicKey512", "c": "GOST R 34.10-2012 512 bit public key" }, "1.2.643.7.1.1.2.2": { "d": "gost2012Digest256", "c": "GOST R 34.11-2012 256 bit digest" }, "1.2.643.7.1.1.2.3": { "d": "gost2012Digest512", "c": "GOST R 34.11-2012 512 bit digest" }, "1.2.643.7.1.1.3.2": { "d": "gost2012Signature256", "c": "GOST R 34.10-2012 256 bit signature" }, "1.2.643.7.1.1.3.3": { "d": "gost2012Signature512", "c": "GOST R 34.10-2012 512 bit signature" }, "1.2.643.7.1.1.6.1": { "d": "cryptoProECDH256", "c": "CryptoPro ECC DH algorithm for GOST R 34.10-2012 256 bit key" }, "1.2.643.7.1.1.6.2": { "d": "cryptoProECDH512", "c": "CryptoPro ECC DH algorithm for GOST R 34.10-2012 512 bit key" }, "1.2.752.34.1": { "d": "seis-cp", "c": "SEIS Project" }, "1.2.752.34.1.1": { "d": "SEIS high-assurance policyIdentifier", "c": "SEIS Project certificate policies" }, "1.2.752.34.1.2": { "d": "SEIS GAK policyIdentifier", "c": "SEIS Project certificate policies" }, "1.2.752.34.2": { "d": "SEIS pe", "c": "SEIS Project" }, "1.2.752.34.3": { "d": "SEIS at", "c": "SEIS Project" }, "1.2.752.34.3.1": { "d": "SEIS at-personalIdentifier", "c": "SEIS Project attribute" }, "1.2.840.10040.1": { "d": "module", "c": "ANSI X9.57" }, "1.2.840.10040.1.1": { "d": "x9f1-cert-mgmt", "c": "ANSI X9.57 module" }, "1.2.840.10040.2": { "d": "holdinstruction", "c": "ANSI X9.57" }, "1.2.840.10040.2.1": { "d": "holdinstruction-none", "c": "ANSI X9.57 hold instruction" }, "1.2.840.10040.2.2": { "d": "callissuer", "c": "ANSI X9.57 hold instruction" }, "1.2.840.10040.2.3": { "d": "reject", "c": "ANSI X9.57 hold instruction" }, "1.2.840.10040.2.4": { "d": "pickupToken", "c": "ANSI X9.57 hold instruction" }, "1.2.840.10040.3": { "d": "attribute", "c": "ANSI X9.57" }, "1.2.840.10040.3.1": { "d": "countersignature", "c": "ANSI X9.57 attribute" }, "1.2.840.10040.3.2": { "d": "attribute-cert", "c": "ANSI X9.57 attribute" }, "1.2.840.10040.4": { "d": "algorithm", "c": "ANSI X9.57" }, "1.2.840.10040.4.1": { "d": "dsa", "c": "ANSI X9.57 algorithm" }, "1.2.840.10040.4.2": { "d": "dsa-match", "c": "ANSI X9.57 algorithm" }, "1.2.840.10040.4.3": { "d": "dsaWithSha1", "c": "ANSI X9.57 algorithm" }, "1.2.840.10045.1": { "d": "fieldType", "c": "ANSI X9.62. This OID is also assigned as ecdsa-with-SHA1" }, "1.2.840.10045.1.1": { "d": "prime-field", "c": "ANSI X9.62 field type" }, "1.2.840.10045.1.2": { "d": "characteristic-two-field", "c": "ANSI X9.62 field type" }, "1.2.840.10045.1.2.3": { "d": "characteristic-two-basis", "c": "ANSI X9.62 field type" }, "1.2.840.10045.1.2.3.1": { "d": "onBasis", "c": "ANSI X9.62 field basis" }, "1.2.840.10045.1.2.3.2": { "d": "tpBasis", "c": "ANSI X9.62 field basis" }, "1.2.840.10045.1.2.3.3": { "d": "ppBasis", "c": "ANSI X9.62 field basis" }, "1.2.840.10045.2": { "d": "publicKeyType", "c": "ANSI X9.62" }, "1.2.840.10045.2.1": { "d": "ecPublicKey", "c": "ANSI X9.62 public key type" }, "1.2.840.10045.3.0.1": { "d": "c2pnb163v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.2": { "d": "c2pnb163v2", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.3": { "d": "c2pnb163v3", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.5": { "d": "c2tnb191v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.6": { "d": "c2tnb191v2", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.7": { "d": "c2tnb191v3", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.10": { "d": "c2pnb208w1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.11": { "d": "c2tnb239v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.12": { "d": "c2tnb239v2", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.13": { "d": "c2tnb239v3", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.16": { "d": "c2pnb272w1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.18": { "d": "c2tnb359v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.19": { "d": "c2pnb368w1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.0.20": { "d": "c2tnb431r1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.1": { "d": "prime192v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.2": { "d": "prime192v2", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.3": { "d": "prime192v3", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.4": { "d": "prime239v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.5": { "d": "prime239v2", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.6": { "d": "prime239v3", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.3.1.7": { "d": "prime256v1", "c": "ANSI X9.62 named elliptic curve" }, "1.2.840.10045.4.1": { "d": "ecdsaWithSHA1", "c": "ANSI X9.62 ECDSA algorithm with SHA1" }, "1.2.840.10045.4.2": { "d": "ecdsaWithRecommended", "c": "ANSI X9.62 ECDSA algorithm with Recommended" }, "1.2.840.10045.4.3": { "d": "ecdsaWithSpecified", "c": "ANSI X9.62 ECDSA algorithm with Specified" }, "1.2.840.10045.4.3.1": { "d": "ecdsaWithSHA224", "c": "ANSI X9.62 ECDSA algorithm with SHA224" }, "1.2.840.10045.4.3.2": { "d": "ecdsaWithSHA256", "c": "ANSI X9.62 ECDSA algorithm with SHA256" }, "1.2.840.10045.4.3.3": { "d": "ecdsaWithSHA384", "c": "ANSI X9.62 ECDSA algorithm with SHA384" }, "1.2.840.10045.4.3.4": { "d": "ecdsaWithSHA512", "c": "ANSI X9.62 ECDSA algorithm with SHA512" }, "1.2.840.10046.1": { "d": "fieldType", "c": "ANSI X9.42" }, "1.2.840.10046.1.1": { "d": "gf-prime", "c": "ANSI X9.42 field type" }, "1.2.840.10046.2": { "d": "numberType", "c": "ANSI X9.42" }, "1.2.840.10046.2.1": { "d": "dhPublicKey", "c": "ANSI X9.42 number type" }, "1.2.840.10046.3": { "d": "scheme", "c": "ANSI X9.42" }, "1.2.840.10046.3.1": { "d": "dhStatic", "c": "ANSI X9.42 scheme" }, "1.2.840.10046.3.2": { "d": "dhEphem", "c": "ANSI X9.42 scheme" }, "1.2.840.10046.3.3": { "d": "dhHybrid1", "c": "ANSI X9.42 scheme" }, "1.2.840.10046.3.4": { "d": "dhHybrid2", "c": "ANSI X9.42 scheme" }, "1.2.840.10046.3.5": { "d": "mqv2", "c": "ANSI X9.42 scheme" }, "1.2.840.10046.3.6": { "d": "mqv1", "c": "ANSI X9.42 scheme" }, "1.2.840.10065.2.2": { "d": "?", "c": "ASTM 31.20" }, "1.2.840.10065.2.3": { "d": "healthcareLicense", "c": "ASTM 31.20" }, "1.2.840.10065.2.3.1.1": { "d": "license?", "c": "ASTM 31.20 healthcare license type" }, "1.2.840.10070": { "d": "iec62351", "c": "IEC 62351" }, "1.2.840.10070.8": { "d": "iec62351_8", "c": "IEC 62351-8" }, "1.2.840.10070.8.1": { "d": "iecUserRoles", "c": "IEC 62351-8" }, "1.2.840.113533.7": { "d": "nsn", "c": "" }, "1.2.840.113533.7.65": { "d": "nsn-ce", "c": "" }, "1.2.840.113533.7.65.0": { "d": "entrustVersInfo", "c": "Nortel Secure Networks ce" }, "1.2.840.113533.7.66": { "d": "nsn-alg", "c": "" }, "1.2.840.113533.7.66.3": { "d": "cast3CBC", "c": "Nortel Secure Networks alg" }, "1.2.840.113533.7.66.10": { "d": "cast5CBC", "c": "Nortel Secure Networks alg" }, "1.2.840.113533.7.66.11": { "d": "cast5MAC", "c": "Nortel Secure Networks alg" }, "1.2.840.113533.7.66.12": { "d": "pbeWithMD5AndCAST5-CBC", "c": "Nortel Secure Networks alg" }, "1.2.840.113533.7.66.13": { "d": "passwordBasedMac", "c": "Nortel Secure Networks alg" }, "1.2.840.113533.7.67": { "d": "nsn-oc", "c": "" }, "1.2.840.113533.7.67.0": { "d": "entrustUser", "c": "Nortel Secure Networks oc" }, "1.2.840.113533.7.68": { "d": "nsn-at", "c": "" }, "1.2.840.113533.7.68.0": { "d": "entrustCAInfo", "c": "Nortel Secure Networks at" }, "1.2.840.113533.7.68.10": { "d": "attributeCertificate", "c": "Nortel Secure Networks at" }, "1.2.840.113549.1.1": { "d": "pkcs-1", "c": "" }, "1.2.840.113549.1.1.1": { "d": "rsaEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.2": { "d": "md2WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.3": { "d": "md4WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.4": { "d": "md5WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.5": { "d": "sha1WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.7": { "d": "rsaOAEP", "c": "PKCS #1" }, "1.2.840.113549.1.1.8": { "d": "pkcs1-MGF", "c": "PKCS #1" }, "1.2.840.113549.1.1.9": { "d": "rsaOAEP-pSpecified", "c": "PKCS #1" }, "1.2.840.113549.1.1.10": { "d": "rsaPSS", "c": "PKCS #1" }, "1.2.840.113549.1.1.11": { "d": "sha256WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.12": { "d": "sha384WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.13": { "d": "sha512WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.14": { "d": "sha224WithRSAEncryption", "c": "PKCS #1" }, "1.2.840.113549.1.1.6": { "d": "rsaOAEPEncryptionSET", "c": "PKCS #1. This OID may also be assigned as ripemd160WithRSAEncryption" }, "1.2.840.113549.1.2": { "d": "bsafeRsaEncr", "c": "Obsolete BSAFE OID", "w": true }, "1.2.840.113549.1.3": { "d": "pkcs-3", "c": "" }, "1.2.840.113549.1.3.1": { "d": "dhKeyAgreement", "c": "PKCS #3" }, "1.2.840.113549.1.5": { "d": "pkcs-5", "c": "" }, "1.2.840.113549.1.5.1": { "d": "pbeWithMD2AndDES-CBC", "c": "PKCS #5" }, "1.2.840.113549.1.5.3": { "d": "pbeWithMD5AndDES-CBC", "c": "PKCS #5" }, "1.2.840.113549.1.5.4": { "d": "pbeWithMD2AndRC2-CBC", "c": "PKCS #5" }, "1.2.840.113549.1.5.6": { "d": "pbeWithMD5AndRC2-CBC", "c": "PKCS #5" }, "1.2.840.113549.1.5.9": { "d": "pbeWithMD5AndXOR", "c": "PKCS #5, used in BSAFE only", "w": true }, "1.2.840.113549.1.5.10": { "d": "pbeWithSHAAndDES-CBC", "c": "PKCS #5" }, "1.2.840.113549.1.5.12": { "d": "pkcs5PBKDF2", "c": "PKCS #5 v2.0" }, "1.2.840.113549.1.5.13": { "d": "pkcs5PBES2", "c": "PKCS #5 v2.0" }, "1.2.840.113549.1.5.14": { "d": "pkcs5PBMAC1", "c": "PKCS #5 v2.0" }, "1.2.840.113549.1.7": { "d": "pkcs-7", "c": "" }, "1.2.840.113549.1.7.1": { "d": "data", "c": "PKCS #7" }, "1.2.840.113549.1.7.2": { "d": "signedData", "c": "PKCS #7" }, "1.2.840.113549.1.7.3": { "d": "envelopedData", "c": "PKCS #7" }, "1.2.840.113549.1.7.4": { "d": "signedAndEnvelopedData", "c": "PKCS #7" }, "1.2.840.113549.1.7.5": { "d": "digestedData", "c": "PKCS #7" }, "1.2.840.113549.1.7.6": { "d": "encryptedData", "c": "PKCS #7" }, "1.2.840.113549.1.7.7": { "d": "dataWithAttributes", "c": "PKCS #7 experimental", "w": true }, "1.2.840.113549.1.7.8": { "d": "encryptedPrivateKeyInfo", "c": "PKCS #7 experimental", "w": true }, "1.2.840.113549.1.9": { "d": "pkcs-9", "c": "" }, "1.2.840.113549.1.9.1": { "d": "emailAddress", "c": "PKCS #9. Deprecated, use an altName extension instead" }, "1.2.840.113549.1.9.2": { "d": "unstructuredName", "c": "PKCS #9" }, "1.2.840.113549.1.9.3": { "d": "contentType", "c": "PKCS #9" }, "1.2.840.113549.1.9.4": { "d": "messageDigest", "c": "PKCS #9" }, "1.2.840.113549.1.9.5": { "d": "signingTime", "c": "PKCS #9" }, "1.2.840.113549.1.9.6": { "d": "countersignature", "c": "PKCS #9" }, "1.2.840.113549.1.9.7": { "d": "challengePassword", "c": "PKCS #9" }, "1.2.840.113549.1.9.8": { "d": "unstructuredAddress", "c": "PKCS #9" }, "1.2.840.113549.1.9.9": { "d": "extendedCertificateAttributes", "c": "PKCS #9" }, "1.2.840.113549.1.9.10": { "d": "issuerAndSerialNumber", "c": "PKCS #9 experimental", "w": true }, "1.2.840.113549.1.9.11": { "d": "passwordCheck", "c": "PKCS #9 experimental", "w": true }, "1.2.840.113549.1.9.12": { "d": "publicKey", "c": "PKCS #9 experimental", "w": true }, "1.2.840.113549.1.9.13": { "d": "signingDescription", "c": "PKCS #9" }, "1.2.840.113549.1.9.14": { "d": "extensionRequest", "c": "PKCS #9 via CRMF" }, "1.2.840.113549.1.9.15": { "d": "sMIMECapabilities", "c": "PKCS #9. This OID was formerly assigned as symmetricCapabilities, then reassigned as SMIMECapabilities, then renamed to the current name" }, "1.2.840.113549.1.9.15.1": { "d": "preferSignedData", "c": "sMIMECapabilities" }, "1.2.840.113549.1.9.15.2": { "d": "canNotDecryptAny", "c": "sMIMECapabilities" }, "1.2.840.113549.1.9.15.3": { "d": "receiptRequest", "c": "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 1) instead", "w": true }, "1.2.840.113549.1.9.15.4": { "d": "receipt", "c": "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 1 1) instead", "w": true }, "1.2.840.113549.1.9.15.5": { "d": "contentHints", "c": "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 4) instead", "w": true }, "1.2.840.113549.1.9.15.6": { "d": "mlExpansionHistory", "c": "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 3) instead", "w": true }, "1.2.840.113549.1.9.16": { "d": "id-sMIME", "c": "PKCS #9" }, "1.2.840.113549.1.9.16.0": { "d": "id-mod", "c": "id-sMIME" }, "1.2.840.113549.1.9.16.0.1": { "d": "id-mod-cms", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.2": { "d": "id-mod-ess", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.3": { "d": "id-mod-oid", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.4": { "d": "id-mod-msg-v3", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.5": { "d": "id-mod-ets-eSignature-88", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.6": { "d": "id-mod-ets-eSignature-97", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.7": { "d": "id-mod-ets-eSigPolicy-88", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.0.8": { "d": "id-mod-ets-eSigPolicy-88", "c": "S/MIME Modules" }, "1.2.840.113549.1.9.16.1": { "d": "contentType", "c": "S/MIME" }, "1.2.840.113549.1.9.16.1.0": { "d": "anyContentType", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.1": { "d": "receipt", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.2": { "d": "authData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.3": { "d": "publishCert", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.4": { "d": "tSTInfo", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.5": { "d": "tDTInfo", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.6": { "d": "contentInfo", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.7": { "d": "dVCSRequestData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.8": { "d": "dVCSResponseData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.9": { "d": "compressedData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.10": { "d": "scvpCertValRequest", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.11": { "d": "scvpCertValResponse", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.12": { "d": "scvpValPolRequest", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.13": { "d": "scvpValPolResponse", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.14": { "d": "attrCertEncAttrs", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.15": { "d": "tSReq", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.16": { "d": "firmwarePackage", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.17": { "d": "firmwareLoadReceipt", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.18": { "d": "firmwareLoadError", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.19": { "d": "contentCollection", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.20": { "d": "contentWithAttrs", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.21": { "d": "encKeyWithID", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.22": { "d": "encPEPSI", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.23": { "d": "authEnvelopedData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.24": { "d": "routeOriginAttest", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.25": { "d": "symmetricKeyPackage", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.26": { "d": "rpkiManifest", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.27": { "d": "asciiTextWithCRLF", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.28": { "d": "xml", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.29": { "d": "pdf", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.30": { "d": "postscript", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.31": { "d": "timestampedData", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.32": { "d": "asAdjacencyAttest", "c": "S/MIME Content Types", "w": true }, "1.2.840.113549.1.9.16.1.33": { "d": "rpkiTrustAnchor", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.34": { "d": "trustAnchorList", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.35": { "d": "rpkiGhostbusters", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.36": { "d": "resourceTaggedAttest", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.37": { "d": "utf8TextWithCRLF", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.38": { "d": "htmlWithCRLF", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.39": { "d": "epub", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.40": { "d": "animaJSONVoucher", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.41": { "d": "mudType", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.42": { "d": "sztpConveyedInfoXML", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.43": { "d": "sztpConveyedInfoJSON", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.44": { "d": "cbor", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.45": { "d": "cborSequence", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.1.46": { "d": "animaCBORVoucher", "c": "S/MIME Content Types", "w": true }, "1.2.840.113549.1.9.16.1.47": { "d": "geofeedCSVwithCRLF", "c": "S/MIME Content Types" }, "1.2.840.113549.1.9.16.2": { "d": "authenticatedAttributes", "c": "S/MIME" }, "1.2.840.113549.1.9.16.2.1": { "d": "receiptRequest", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.2": { "d": "securityLabel", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.3": { "d": "mlExpandHistory", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.4": { "d": "contentHint", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.5": { "d": "msgSigDigest", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.6": { "d": "encapContentType", "c": "S/MIME Authenticated Attributes. Obsolete", "w": true }, "1.2.840.113549.1.9.16.2.7": { "d": "contentIdentifier", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.8": { "d": "macValue", "c": "S/MIME Authenticated Attributes. Obsolete", "w": true }, "1.2.840.113549.1.9.16.2.9": { "d": "equivalentLabels", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.10": { "d": "contentReference", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.11": { "d": "encrypKeyPref", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.12": { "d": "signingCertificate", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.13": { "d": "smimeEncryptCerts", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.14": { "d": "timeStampToken", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.15": { "d": "sigPolicyId", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.16": { "d": "commitmentType", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.17": { "d": "signerLocation", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.18": { "d": "signerAttr", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.19": { "d": "otherSigCert", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.20": { "d": "contentTimestamp", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.21": { "d": "certificateRefs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.22": { "d": "revocationRefs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.23": { "d": "certValues", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.24": { "d": "revocationValues", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.25": { "d": "escTimeStamp", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.26": { "d": "certCRLTimestamp", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.27": { "d": "archiveTimeStamp", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.28": { "d": "signatureType", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.29": { "d": "dvcsDvc", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.30": { "d": "cekReference", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.31": { "d": "maxCEKDecrypts", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.32": { "d": "kekDerivationAlg", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.33": { "d": "intendedRecipients", "c": "S/MIME Authenticated Attributes. Obsolete", "w": true }, "1.2.840.113549.1.9.16.2.34": { "d": "cmcUnsignedData", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.35": { "d": "fwPackageID", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.36": { "d": "fwTargetHardwareIDs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.37": { "d": "fwDecryptKeyID", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.38": { "d": "fwImplCryptAlgs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.39": { "d": "fwWrappedFirmwareKey", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.40": { "d": "fwCommunityIdentifiers", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.41": { "d": "fwPkgMessageDigest", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.42": { "d": "fwPackageInfo", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.43": { "d": "fwImplCompressAlgs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.44": { "d": "etsAttrCertificateRefs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.45": { "d": "etsAttrRevocationRefs", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.46": { "d": "binarySigningTime", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.47": { "d": "signingCertificateV2", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.48": { "d": "etsArchiveTimeStampV2", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.49": { "d": "erInternal", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.50": { "d": "erExternal", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.51": { "d": "multipleSignatures", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.52": { "d": "cmsAlgorithmProtect", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.53": { "d": "setKeyInformation", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.54": { "d": "asymmDecryptKeyID", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.55": { "d": "secureHeaderFieldsIdentifier", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.56": { "d": "otpChallenge", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.57": { "d": "revocationChallenge", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.2.58": { "d": "estIdentityLinking", "c": "S/MIME Authenticated Attributes" }, "1.2.840.113549.1.9.16.3.1": { "d": "esDHwith3DES", "c": "S/MIME Algorithms. Obsolete", "w": true }, "1.2.840.113549.1.9.16.3.2": { "d": "esDHwithRC2", "c": "S/MIME Algorithms. Obsolete", "w": true }, "1.2.840.113549.1.9.16.3.3": { "d": "3desWrap", "c": "S/MIME Algorithms. Obsolete", "w": true }, "1.2.840.113549.1.9.16.3.4": { "d": "rc2Wrap", "c": "S/MIME Algorithms. Obsolete", "w": true }, "1.2.840.113549.1.9.16.3.5": { "d": "esDH", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.6": { "d": "cms3DESwrap", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.7": { "d": "cmsRC2wrap", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.8": { "d": "zlib", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.9": { "d": "pwriKEK", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.10": { "d": "ssDH", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.11": { "d": "hmacWith3DESwrap", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.12": { "d": "hmacWithAESwrap", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.13": { "d": "md5XorExperiment", "c": "S/MIME Algorithms. Experimental", "w": true }, "1.2.840.113549.1.9.16.3.14": { "d": "rsaKEM", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.15": { "d": "authEnc128", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.16": { "d": "authEnc256", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.17": { "d": "hssLmsHashSig", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.18": { "d": "chaCha20Poly1305", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.19": { "d": "ecdhHKDF-SHA256", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.20": { "d": "ecdhHKDF-SHA384", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.21": { "d": "ecdhHKDF-SHA512", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.22": { "d": "aesSIV-CMAC-256", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.23": { "d": "aesSIV-CMAC-384", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.24": { "d": "aesSIV-CMAC-512", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.25": { "d": "aesSIV-CMAC-wrap256", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.26": { "d": "aesSIV-CMAC-wrap384", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.27": { "d": "aesSIV-CMAC-wrap512", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.28": { "d": "hkdfWithSha256", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.29": { "d": "hkdfWithSha384", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.3.30": { "d": "hkdfWithSha512", "c": "S/MIME Algorithms" }, "1.2.840.113549.1.9.16.4.1": { "d": "certDist-ldap", "c": "S/MIME Certificate Distribution" }, "1.2.840.113549.1.9.16.5.1": { "d": "sigPolicyQualifier-spuri x", "c": "S/MIME Signature Policy Qualifiers" }, "1.2.840.113549.1.9.16.5.2": { "d": "sigPolicyQualifier-spUserNotice", "c": "S/MIME Signature Policy Qualifiers" }, "1.2.840.113549.1.9.16.6.1": { "d": "proofOfOrigin", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.6.2": { "d": "proofOfReceipt", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.6.3": { "d": "proofOfDelivery", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.6.4": { "d": "proofOfSender", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.6.5": { "d": "proofOfApproval", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.6.6": { "d": "proofOfCreation", "c": "S/MIME Commitment Type Identifiers" }, "1.2.840.113549.1.9.16.7.1": { "d": "testAmoco", "c": "S/MIMETest Security Policies" }, "1.2.840.113549.1.9.16.7.2": { "d": "testCaterpillar", "c": "S/MIMETest Security Policies" }, "1.2.840.113549.1.9.16.7.3": { "d": "testWhirlpool", "c": "S/MIMETest Security Policies" }, "1.2.840.113549.1.9.16.7.4": { "d": "testWhirlpoolCategories", "c": "S/MIMETest Security Policies" }, "1.2.840.113549.1.9.16.8.1": { "d": "glUseKEK", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.2": { "d": "glDelete", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.3": { "d": "glAddMember", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.4": { "d": "glDeleteMember", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.5": { "d": "glRekey", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.6": { "d": "glAddOwner", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.7": { "d": "glRemoveOwner", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.8": { "d": "glkCompromise", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.9": { "d": "glkRefresh", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.10": { "d": "glFailInfo", "c": "S/MIME Symmetric Key Distribution Attributes. Obsolete", "w": true }, "1.2.840.113549.1.9.16.8.11": { "d": "glaQueryRequest", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.12": { "d": "glaQueryResponse", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.13": { "d": "glProvideCert", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.14": { "d": "glUpdateCert", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.8.15": { "d": "glKey", "c": "S/MIME Symmetric Key Distribution Attributes" }, "1.2.840.113549.1.9.16.9": { "d": "signatureTypeIdentifier", "c": "S/MIME" }, "1.2.840.113549.1.9.16.9.1": { "d": "originatorSig", "c": "S/MIME Signature Type Identifier" }, "1.2.840.113549.1.9.16.9.2": { "d": "domainSig", "c": "S/MIME Signature Type Identifier" }, "1.2.840.113549.1.9.16.9.3": { "d": "additionalAttributesSig", "c": "S/MIME Signature Type Identifier" }, "1.2.840.113549.1.9.16.9.4": { "d": "reviewSig", "c": "S/MIME Signature Type Identifier" }, "1.2.840.113549.1.9.16.10.1": { "d": "envelopedData", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.2": { "d": "signedData", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.3": { "d": "certsOnly", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.4": { "d": "signedReceipt", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.5": { "d": "envelopedX400", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.6": { "d": "signedX400", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.10.7": { "d": "compressedData", "c": "S/MIME X.400 Encoded Information Types" }, "1.2.840.113549.1.9.16.11": { "d": "capabilities", "c": "S/MIME" }, "1.2.840.113549.1.9.16.11.1": { "d": "preferBinaryInside", "c": "S/MIME Capability" }, "1.2.840.113549.1.9.16.12": { "d": "pskcAttributes", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.1": { "d": "pskcManufacturer", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.2": { "d": "pskcSerialNo", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.3": { "d": "pskcModel", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.4": { "d": "pskcIssueno", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.5": { "d": "pskcDevicebinding", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.6": { "d": "pskcDevicestartdate", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.7": { "d": "pskcDeviceexpirydate", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.8": { "d": "pskcModuleid", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.9": { "d": "pskcKeyid", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.10": { "d": "pskcAlgorithm", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.11": { "d": "pskcIssuer", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.12": { "d": "pskcKeyprofileid", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.13": { "d": "pskcKeyreference", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.14": { "d": "pskcFriendlyname", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.15": { "d": "pskcAlgorithmparams", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.16": { "d": "pskcCounter", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.17": { "d": "pskcTime", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.18": { "d": "pskcTimeinterval", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.19": { "d": "pskcTimedrift", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.20": { "d": "pskcValuemac", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.21": { "d": "pskcKeystartdate", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.22": { "d": "pskcKeyexpirydate", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.23": { "d": "pskcNooftransactions", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.24": { "d": "pskcKeyusages", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.25": { "d": "pskcPinpolicy", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.26": { "d": "pskcDeviceuserid", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.12.27": { "d": "pskcKeyuserid", "c": "S/MIME Portable Symmetric Key Container Attributes" }, "1.2.840.113549.1.9.16.13": { "d": "otherRecipientInfoIds", "c": "S/MIME Other Recipient Info Identifiers" }, "1.2.840.113549.1.9.16.13.1": { "d": "keyTransPSK", "c": "S/MIME Other Recipient Info Identifiers" }, "1.2.840.113549.1.9.16.13.2": { "d": "keyAgreePSK", "c": "S/MIME Other Recipient Info Identifiers" }, "1.2.840.113549.1.9.20": { "d": "friendlyName (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.21": { "d": "localKeyID (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.22": { "d": "certTypes (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.22.1": { "d": "x509Certificate (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.22.2": { "d": "sdsiCertificate (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.23": { "d": "crlTypes (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.23.1": { "d": "x509Crl (for PKCS #12)", "c": "PKCS #9 via PKCS #12" }, "1.2.840.113549.1.9.24": { "d": "pkcs9objectClass", "c": "PKCS #9/RFC 2985" }, "1.2.840.113549.1.9.25": { "d": "pkcs9attributes", "c": "PKCS #9/RFC 2985" }, "1.2.840.113549.1.9.25.1": { "d": "pkcs15Token", "c": "PKCS #9/RFC 2985 attribute" }, "1.2.840.113549.1.9.25.2": { "d": "encryptedPrivateKeyInfo", "c": "PKCS #9/RFC 2985 attribute" }, "1.2.840.113549.1.9.25.3": { "d": "randomNonce", "c": "PKCS #9/RFC 2985 attribute" }, "1.2.840.113549.1.9.25.4": { "d": "sequenceNumber", "c": "PKCS #9/RFC 2985 attribute" }, "1.2.840.113549.1.9.25.5": { "d": "pkcs7PDU", "c": "PKCS #9/RFC 2985 attribute" }, "1.2.840.113549.1.9.26": { "d": "pkcs9syntax", "c": "PKCS #9/RFC 2985" }, "1.2.840.113549.1.9.27": { "d": "pkcs9matchingRules", "c": "PKCS #9/RFC 2985" }, "1.2.840.113549.1.9.52": { "d": "cmsAlgorithmProtection", "c": "RFC 6211" }, "1.2.840.113549.1.12": { "d": "pkcs-12", "c": "" }, "1.2.840.113549.1.12.1": { "d": "pkcs-12-PbeIds", "c": "This OID was formerly assigned as PKCS #12 modeID" }, "1.2.840.113549.1.12.1.1": { "d": "pbeWithSHAAnd128BitRC4", "c": "PKCS #12 PbeIds. This OID was formerly assigned as pkcs-12-OfflineTransportMode" }, "1.2.840.113549.1.12.1.2": { "d": "pbeWithSHAAnd40BitRC4", "c": "PKCS #12 PbeIds. This OID was formerly assigned as pkcs-12-OnlineTransportMode" }, "1.2.840.113549.1.12.1.3": { "d": "pbeWithSHAAnd3-KeyTripleDES-CBC", "c": "PKCS #12 PbeIds" }, "1.2.840.113549.1.12.1.4": { "d": "pbeWithSHAAnd2-KeyTripleDES-CBC", "c": "PKCS #12 PbeIds" }, "1.2.840.113549.1.12.1.5": { "d": "pbeWithSHAAnd128BitRC2-CBC", "c": "PKCS #12 PbeIds" }, "1.2.840.113549.1.12.1.6": { "d": "pbeWithSHAAnd40BitRC2-CBC", "c": "PKCS #12 PbeIds" }, "1.2.840.113549.1.12.2": { "d": "pkcs-12-ESPVKID", "c": "Deprecated", "w": true }, "1.2.840.113549.1.12.2.1": { "d": "pkcs-12-PKCS8KeyShrouding", "c": "PKCS #12 ESPVKID. Deprecated, use (1 2 840 113549 1 12 3 5) instead", "w": true }, "1.2.840.113549.1.12.3": { "d": "pkcs-12-BagIds", "c": "" }, "1.2.840.113549.1.12.3.1": { "d": "pkcs-12-keyBagId", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.3.2": { "d": "pkcs-12-certAndCRLBagId", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.3.3": { "d": "pkcs-12-secretBagId", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.3.4": { "d": "pkcs-12-safeContentsId", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.3.5": { "d": "pkcs-12-pkcs-8ShroudedKeyBagId", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.4": { "d": "pkcs-12-CertBagID", "c": "Deprecated", "w": true }, "1.2.840.113549.1.12.4.1": { "d": "pkcs-12-X509CertCRLBagID", "c": "PKCS #12 CertBagID. This OID was formerly assigned as pkcs-12-X509CertCRLBag" }, "1.2.840.113549.1.12.4.2": { "d": "pkcs-12-SDSICertBagID", "c": "PKCS #12 CertBagID. This OID was formerly assigned as pkcs-12-SDSICertBag" }, "1.2.840.113549.1.12.5": { "d": "pkcs-12-OID", "c": "", "w": true }, "1.2.840.113549.1.12.5.1": { "d": "pkcs-12-PBEID", "c": "PKCS #12 OID. Deprecated, use the partially compatible (1 2 840 113549 1 12 1) OIDs instead", "w": true }, "1.2.840.113549.1.12.5.1.1": { "d": "pkcs-12-PBEWithSha1And128BitRC4", "c": "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 1) instead", "w": true }, "1.2.840.113549.1.12.5.1.2": { "d": "pkcs-12-PBEWithSha1And40BitRC4", "c": "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 2) instead", "w": true }, "1.2.840.113549.1.12.5.1.3": { "d": "pkcs-12-PBEWithSha1AndTripleDESCBC", "c": "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 3) or (1 2 840 113549 1 12 1 4) instead", "w": true }, "1.2.840.113549.1.12.5.1.4": { "d": "pkcs-12-PBEWithSha1And128BitRC2CBC", "c": "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 5) instead", "w": true }, "1.2.840.113549.1.12.5.1.5": { "d": "pkcs-12-PBEWithSha1And40BitRC2CBC", "c": "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 6) instead", "w": true }, "1.2.840.113549.1.12.5.1.6": { "d": "pkcs-12-PBEWithSha1AndRC4", "c": "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 1) or (1 2 840 113549 1 12 1 2) instead", "w": true }, "1.2.840.113549.1.12.5.1.7": { "d": "pkcs-12-PBEWithSha1AndRC2CBC", "c": "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 5) or (1 2 840 113549 1 12 1 6) instead", "w": true }, "1.2.840.113549.1.12.5.2": { "d": "pkcs-12-EnvelopingID", "c": "PKCS #12 OID. Deprecated, use the conventional PKCS #1 OIDs instead" }, "1.2.840.113549.1.12.5.2.1": { "d": "pkcs-12-RSAEncryptionWith128BitRC4", "c": "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead", "w": true }, "1.2.840.113549.1.12.5.2.2": { "d": "pkcs-12-RSAEncryptionWith40BitRC4", "c": "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead", "w": true }, "1.2.840.113549.1.12.5.2.3": { "d": "pkcs-12-RSAEncryptionWithTripleDES", "c": "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead", "w": true }, "1.2.840.113549.1.12.5.3": { "d": "pkcs-12-SignatureID", "c": "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead", "w": true }, "1.2.840.113549.1.12.5.3.1": { "d": "pkcs-12-RSASignatureWithSHA1Digest", "c": "PKCS #12 OID SignatureID. Deprecated, use the conventional PKCS #1 OIDs instead", "w": true }, "1.2.840.113549.1.12.10": { "d": "pkcs-12Version1", "c": "" }, "1.2.840.113549.1.12.10.1": { "d": "pkcs-12BadIds", "c": "" }, "1.2.840.113549.1.12.10.1.1": { "d": "pkcs-12-keyBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.10.1.2": { "d": "pkcs-12-pkcs-8ShroudedKeyBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.10.1.3": { "d": "pkcs-12-certBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.10.1.4": { "d": "pkcs-12-crlBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.10.1.5": { "d": "pkcs-12-secretBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.12.10.1.6": { "d": "pkcs-12-safeContentsBag", "c": "PKCS #12 BagIds" }, "1.2.840.113549.1.15.1": { "d": "pkcs15modules", "c": "PKCS #15" }, "1.2.840.113549.1.15.2": { "d": "pkcs15attributes", "c": "PKCS #15" }, "1.2.840.113549.1.15.3": { "d": "pkcs15contentType", "c": "PKCS #15" }, "1.2.840.113549.1.15.3.1": { "d": "pkcs15content", "c": "PKCS #15 content type" }, "1.2.840.113549.2": { "d": "digestAlgorithm", "c": "" }, "1.2.840.113549.2.2": { "d": "md2", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.4": { "d": "md4", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.5": { "d": "md5", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.7": { "d": "hmacWithSHA1", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.8": { "d": "hmacWithSHA224", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.9": { "d": "hmacWithSHA256", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.10": { "d": "hmacWithSHA384", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.2.11": { "d": "hmacWithSHA512", "c": "RSADSI digestAlgorithm" }, "1.2.840.113549.3": { "d": "encryptionAlgorithm", "c": "" }, "1.2.840.113549.3.2": { "d": "rc2CBC", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.3": { "d": "rc2ECB", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.4": { "d": "rc4", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.5": { "d": "rc4WithMAC", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.6": { "d": "desx-CBC", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.7": { "d": "des-EDE3-CBC", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.8": { "d": "rc5CBC", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.9": { "d": "rc5-CBCPad", "c": "RSADSI encryptionAlgorithm" }, "1.2.840.113549.3.10": { "d": "desCDMF", "c": "RSADSI encryptionAlgorithm. Formerly called CDMFCBCPad" }, "1.2.840.114021.1.6.1": { "d": "Identrus unknown policyIdentifier", "c": "Identrus" }, "1.2.840.114021.4.1": { "d": "identrusOCSP", "c": "Identrus" }, "1.2.840.113556.1.2.241": { "d": "deliveryMechanism", "c": "Microsoft Exchange Server - attribute" }, "1.2.840.113556.1.2.281": { "d": "ntSecurityDescriptor", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.3.0": { "d": "site-Addressing", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.13": { "d": "classSchema", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.14": { "d": "attributeSchema", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.17": { "d": "mailbox-Agent", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.22": { "d": "mailbox", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.23": { "d": "container", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.3.46": { "d": "mailRecipient", "c": "Microsoft Exchange Server - object class" }, "1.2.840.113556.1.4.145": { "d": "revision", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1327": { "d": "pKIDefaultKeySpec", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1328": { "d": "pKIKeyUsage", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1329": { "d": "pKIMaxIssuingDepth", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1330": { "d": "pKICriticalExtensions", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1331": { "d": "pKIExpirationPeriod", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1332": { "d": "pKIOverlapPeriod", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1333": { "d": "pKIExtendedKeyUsage", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1334": { "d": "pKIDefaultCSPs", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1335": { "d": "pKIEnrollmentAccess", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1429": { "d": "msPKI-RA-Signature", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1430": { "d": "msPKI-Enrollment-Flag", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1431": { "d": "msPKI-Private-Key-Flag", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1432": { "d": "msPKI-Certificate-Name-Flag", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1433": { "d": "msPKI-Minimal-Key-Size", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1434": { "d": "msPKI-Template-Schema-Version", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1435": { "d": "msPKI-Template-Minor-Revision", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1436": { "d": "msPKI-Cert-Template-OID", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1437": { "d": "msPKI-Supersede-Templates", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1438": { "d": "msPKI-RA-Policies", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1439": { "d": "msPKI-Certificate-Policy", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1674": { "d": "msPKI-Certificate-Application-Policy", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.1.4.1675": { "d": "msPKI-RA-Application-Policies", "c": "Microsoft Cert Template - attribute" }, "1.2.840.113556.4.3": { "d": "microsoftExcel", "c": "Microsoft" }, "1.2.840.113556.4.4": { "d": "titledWithOID", "c": "Microsoft" }, "1.2.840.113556.4.5": { "d": "microsoftPowerPoint", "c": "Microsoft" }, "1.2.840.113583.1": { "d": "adobeAcrobat", "c": "Adobe Acrobat" }, "1.2.840.113583.1.1": { "d": "acrobatSecurity", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.1": { "d": "pdfPassword", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.2": { "d": "pdfDefaultSigningCredential", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.3": { "d": "pdfDefaultEncryptionCredential", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.4": { "d": "pdfPasswordTimeout", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.5": { "d": "pdfAuthenticDocumentsTrust", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.6": { "d": "pdfDynamicContentTrust", "c": "Adobe Acrobat security", "w": true }, "1.2.840.113583.1.1.7": { "d": "pdfUbiquityTrust", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.8": { "d": "pdfRevocationInfoArchival", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.9": { "d": "pdfX509Extension", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.9.1": { "d": "pdfTimeStamp", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.9.2": { "d": "pdfArchiveRevInfo", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.1.10": { "d": "pdfPPLKLiteCredential", "c": "Adobe Acrobat security" }, "1.2.840.113583.1.2": { "d": "acrobatCPS", "c": "Adobe Acrobat CPS" }, "1.2.840.113583.1.2.1": { "d": "pdfAuthenticDocumentsCPS", "c": "Adobe Acrobat CPS" }, "1.2.840.113583.1.2.2": { "d": "pdfTestCPS", "c": "Adobe Acrobat CPS" }, "1.2.840.113583.1.2.3": { "d": "pdfUbiquityCPS", "c": "Adobe Acrobat CPS" }, "1.2.840.113583.1.2.4": { "d": "pdfAdhocCPS", "c": "Adobe Acrobat CPS" }, "1.2.840.113583.1.7": { "d": "acrobatUbiquity", "c": "Adobe Acrobat ubiquity" }, "1.2.840.113583.1.7.1": { "d": "pdfUbiquitySubRights", "c": "Adobe Acrobat ubiquity" }, "1.2.840.113583.1.9": { "d": "acrobatExtension", "c": "Adobe Acrobat X.509 extension" }, "1.2.840.113628.114.1.7": { "d": "adobePKCS7", "c": "Adobe" }, "1.2.840.113635.100": { "d": "appleDataSecurity", "c": "Apple" }, "1.2.840.113635.100.1": { "d": "appleTrustPolicy", "c": "Apple" }, "1.2.840.113635.100.1.1": { "d": "appleISignTP", "c": "Apple trust policy" }, "1.2.840.113635.100.1.2": { "d": "appleX509Basic", "c": "Apple trust policy" }, "1.2.840.113635.100.1.3": { "d": "appleSSLPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.4": { "d": "appleLocalCertGenPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.5": { "d": "appleCSRGenPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.6": { "d": "appleCRLPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.7": { "d": "appleOCSPPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.8": { "d": "appleSMIMEPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.9": { "d": "appleEAPPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.10": { "d": "appleSWUpdateSigningPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.11": { "d": "appleIPSecPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.12": { "d": "appleIChatPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.13": { "d": "appleResourceSignPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.14": { "d": "applePKINITClientPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.15": { "d": "applePKINITServerPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.16": { "d": "appleCodeSigningPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.1.17": { "d": "applePackageSigningPolicy", "c": "Apple trust policy" }, "1.2.840.113635.100.2": { "d": "appleSecurityAlgorithm", "c": "Apple" }, "1.2.840.113635.100.2.1": { "d": "appleFEE", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.2": { "d": "appleASC", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.3": { "d": "appleFEE_MD5", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.4": { "d": "appleFEE_SHA1", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.5": { "d": "appleFEED", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.6": { "d": "appleFEEDEXP", "c": "Apple security algorithm" }, "1.2.840.113635.100.2.7": { "d": "appleECDSA", "c": "Apple security algorithm" }, "1.2.840.113635.100.3": { "d": "appleDotMacCertificate", "c": "Apple" }, "1.2.840.113635.100.3.1": { "d": "appleDotMacCertificateRequest", "c": "Apple dotMac certificate" }, "1.2.840.113635.100.3.2": { "d": "appleDotMacCertificateExtension", "c": "Apple dotMac certificate" }, "1.2.840.113635.100.3.3": { "d": "appleDotMacCertificateRequestValues", "c": "Apple dotMac certificate" }, "1.2.840.113635.100.4": { "d": "appleExtendedKeyUsage", "c": "Apple" }, "1.2.840.113635.100.4.1": { "d": "appleCodeSigning", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.1.1": { "d": "appleCodeSigningDevelopment", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.1.2": { "d": "appleSoftwareUpdateSigning", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.1.3": { "d": "appleCodeSigningThirdParty", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.1.4": { "d": "appleResourceSigning", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.2": { "d": "appleIChatSigning", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.3": { "d": "appleIChatEncryption", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.4": { "d": "appleSystemIdentity", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.5": { "d": "appleCryptoEnv", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.5.1": { "d": "appleCryptoProductionEnv", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.5.2": { "d": "appleCryptoMaintenanceEnv", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.5.3": { "d": "appleCryptoTestEnv", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.5.4": { "d": "appleCryptoDevelopmentEnv", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.6": { "d": "appleCryptoQoS", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.6.1": { "d": "appleCryptoTier0QoS", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.6.2": { "d": "appleCryptoTier1QoS", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.6.3": { "d": "appleCryptoTier2QoS", "c": "Apple extended key usage" }, "1.2.840.113635.100.4.6.4": { "d": "appleCryptoTier3QoS", "c": "Apple extended key usage" }, "1.2.840.113635.100.5": { "d": "appleCertificatePolicies", "c": "Apple" }, "1.2.840.113635.100.5.1": { "d": "appleCertificatePolicyID", "c": "Apple" }, "1.2.840.113635.100.5.2": { "d": "appleDotMacCertificatePolicyID", "c": "Apple" }, "1.2.840.113635.100.5.3": { "d": "appleADCCertificatePolicyID", "c": "Apple" }, "1.2.840.113635.100.6": { "d": "appleCertificateExtensions", "c": "Apple" }, "1.2.840.113635.100.6.1": { "d": "appleCertificateExtensionCodeSigning", "c": "Apple certificate extension" }, "1.2.840.113635.100.6.1.1": { "d": "appleCertificateExtensionAppleSigning", "c": "Apple certificate extension" }, "1.2.840.113635.100.6.1.2": { "d": "appleCertificateExtensionADCDeveloperSigning", "c": "Apple certificate extension" }, "1.2.840.113635.100.6.1.3": { "d": "appleCertificateExtensionADCAppleSigning", "c": "Apple certificate extension" }, "1.2.840.113635.100.15.1": { "d": "appleCustomCertificateExtension1", "c": "Apple custom certificate extension" }, "1.2.840.113635.100.15.2": { "d": "appleCustomCertificateExtension2", "c": "Apple custom certificate extension" }, "1.2.840.113635.100.15.3": { "d": "appleCustomCertificateExtension3", "c": "Apple custom certificate extension" }, "1.3.6.1.4.1.311.2.1.4": { "d": "spcIndirectDataContext", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.10": { "d": "spcAgencyInfo", "c": "Microsoft code signing. Also known as policyLink" }, "1.3.6.1.4.1.311.2.1.11": { "d": "spcStatementType", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.12": { "d": "spcSpOpusInfo", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.14": { "d": "certReqExtensions", "c": "Microsoft" }, "1.3.6.1.4.1.311.2.1.15": { "d": "spcPEImageData", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.18": { "d": "spcRawFileData", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.19": { "d": "spcStructuredStorageData", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.20": { "d": "spcJavaClassData (type 1)", "c": "Microsoft code signing. Formerly \"link extension\" aka \"glue extension\"" }, "1.3.6.1.4.1.311.2.1.21": { "d": "individualCodeSigning", "c": "Microsoft" }, "1.3.6.1.4.1.311.2.1.22": { "d": "commercialCodeSigning", "c": "Microsoft" }, "1.3.6.1.4.1.311.2.1.25": { "d": "spcLink (type 2)", "c": "Microsoft code signing. Also known as \"glue extension\"" }, "1.3.6.1.4.1.311.2.1.26": { "d": "spcMinimalCriteriaInfo", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.27": { "d": "spcFinancialCriteriaInfo", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.28": { "d": "spcLink (type 3)", "c": "Microsoft code signing. Also known as \"glue extension\"" }, "1.3.6.1.4.1.311.2.1.29": { "d": "spcHashInfoObjID", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.1.30": { "d": "spcSipInfoObjID", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.2.2": { "d": "ctl", "c": "Microsoft CTL" }, "1.3.6.1.4.1.311.2.2.1": { "d": "ctlTrustedCodesigningCAList", "c": "Microsoft CTL" }, "1.3.6.1.4.1.311.2.2.2": { "d": "ctlTrustedClientAuthCAList", "c": "Microsoft CTL" }, "1.3.6.1.4.1.311.2.2.3": { "d": "ctlTrustedServerAuthCAList", "c": "Microsoft CTL" }, "1.3.6.1.4.1.311.3.2.1": { "d": "timestampRequest", "c": "Microsoft code signing" }, "1.3.6.1.4.1.311.10.1": { "d": "certTrustList", "c": "Microsoft contentType" }, "1.3.6.1.4.1.311.10.1.1": { "d": "sortedCtl", "c": "Microsoft contentType" }, "1.3.6.1.4.1.311.10.2": { "d": "nextUpdateLocation", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.3.1": { "d": "certTrustListSigning", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.2": { "d": "timeStampSigning", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.3": { "d": "serverGatedCrypto", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.3.1": { "d": "serialized", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.3.4": { "d": "encryptedFileSystem", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.5": { "d": "whqlCrypto", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.6": { "d": "nt5Crypto", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.7": { "d": "oemWHQLCrypto", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.8": { "d": "embeddedNTCrypto", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.9": { "d": "rootListSigner", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.10": { "d": "qualifiedSubordination", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.11": { "d": "keyRecovery", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.12": { "d": "documentSigning", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.13": { "d": "lifetimeSigning", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.14": { "d": "mobileDeviceSoftware", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.15": { "d": "smartDisplay", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.16": { "d": "cspSignature", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.3.4.1": { "d": "efsRecovery", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.4.1": { "d": "yesnoTrustAttr", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.10.5.1": { "d": "drm", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.5.2": { "d": "drmIndividualization", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.6.1": { "d": "licenses", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.6.2": { "d": "licenseServer", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.10.7.1": { "d": "keyidRdn", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.10.8.1": { "d": "removeCertificate", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.10.9.1": { "d": "crossCertDistPoints", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.10.10.1": { "d": "cmcAddAttributes", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.11": { "d": "certPropIdPrefix", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.11.4": { "d": "certMd5HashPropId", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.11.20": { "d": "certKeyIdentifierPropId", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.11.28": { "d": "certIssuerSerialNumberMd5HashPropId", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.11.29": { "d": "certSubjectNameMd5HashPropId", "c": "Microsoft" }, "1.3.6.1.4.1.311.10.12.1": { "d": "anyApplicationPolicy", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.12": { "d": "catalog", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.12.1.1": { "d": "catalogList", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.12.1.2": { "d": "catalogListMember", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.12.2.1": { "d": "catalogNameValueObjID", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.12.2.2": { "d": "catalogMemberInfoObjID", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.13.1": { "d": "renewalCertificate", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.13.2.1": { "d": "enrolmentNameValuePair", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.13.2.2": { "d": "enrolmentCSP", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.13.2.3": { "d": "osVersion", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.16.4": { "d": "microsoftRecipientInfo", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.17.1": { "d": "pkcs12KeyProviderNameAttr", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.17.2": { "d": "localMachineKeyset", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.17.3": { "d": "pkcs12ExtendedAttributes", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.20.1": { "d": "autoEnrollCtlUsage", "c": "Microsoft" }, "1.3.6.1.4.1.311.20.2": { "d": "enrollCerttypeExtension", "c": "Microsoft CAPICOM certificate template, V1" }, "1.3.6.1.4.1.311.20.2.1": { "d": "enrollmentAgent", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.20.2.2": { "d": "smartcardLogon", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.20.2.3": { "d": "universalPrincipalName", "c": "Microsoft UPN" }, "1.3.6.1.4.1.311.20.3": { "d": "certManifold", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.1": { "d": "cAKeyCertIndexPair", "c": "Microsoft attribute. Also known as certsrvCaVersion" }, "1.3.6.1.4.1.311.21.2": { "d": "certSrvPreviousCertHash", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.3": { "d": "crlVirtualBase", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.4": { "d": "crlNextPublish", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.5": { "d": "caExchange", "c": "Microsoft extended key usage", "w": true }, "1.3.6.1.4.1.311.21.6": { "d": "keyRecovery", "c": "Microsoft extended key usage", "w": true }, "1.3.6.1.4.1.311.21.7": { "d": "certificateTemplate", "c": "Microsoft CAPICOM certificate template, V2" }, "1.3.6.1.4.1.311.21.9": { "d": "rdnDummySigner", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.10": { "d": "applicationCertPolicies", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.11": { "d": "applicationPolicyMappings", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.12": { "d": "applicationPolicyConstraints", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.13": { "d": "archivedKey", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.21.14": { "d": "crlSelfCDP", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.15": { "d": "requireCertChainPolicy", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.16": { "d": "archivedKeyCertHash", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.17": { "d": "issuedCertHash", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.19": { "d": "dsEmailReplication", "c": "Microsoft" }, "1.3.6.1.4.1.311.21.20": { "d": "requestClientInfo", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.21.21": { "d": "encryptedKeyHash", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.21.22": { "d": "certsrvCrossCaVersion", "c": "Microsoft" }, "1.3.6.1.4.1.311.25.1": { "d": "ntdsReplication", "c": "Microsoft" }, "1.3.6.1.4.1.311.31.1": { "d": "productUpdate", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.47.1.1": { "d": "systemHealth", "c": "Microsoft extended key usage" }, "1.3.6.1.4.1.311.47.1.3": { "d": "systemHealthLoophole", "c": "Microsoft extended key usage" }, "1.3.6.1.4.1.311.60.1.1": { "d": "rootProgramFlags", "c": "Microsoft policy attribute" }, "1.3.6.1.4.1.311.61.1.1": { "d": "kernelModeCodeSigning", "c": "Microsoft enhanced key usage" }, "1.3.6.1.4.1.311.60.2.1.1": { "d": "jurisdictionOfIncorporationL", "c": "Microsoft (???)" }, "1.3.6.1.4.1.311.60.2.1.2": { "d": "jurisdictionOfIncorporationSP", "c": "Microsoft (???)" }, "1.3.6.1.4.1.311.60.2.1.3": { "d": "jurisdictionOfIncorporationC", "c": "Microsoft (???)" }, "1.3.6.1.4.1.311.76.509.1.1": { "d": "microsoftCPS", "c": "Microsoft PKI services" }, "1.3.6.1.4.1.311.88": { "d": "capiCom", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.1": { "d": "capiComVersion", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.2": { "d": "capiComAttribute", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.2.1": { "d": "capiComDocumentName", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.2.2": { "d": "capiComDocumentDescription", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.3": { "d": "capiComEncryptedData", "c": "Microsoft attribute" }, "1.3.6.1.4.1.311.88.3.1": { "d": "capiComEncryptedContent", "c": "Microsoft attribute" }, "1.3.6.1.4.1.188.7.1.1": { "d": "ascom", "c": "Ascom Systech" }, "1.3.6.1.4.1.188.7.1.1.1": { "d": "ideaECB", "c": "Ascom Systech" }, "1.3.6.1.4.1.188.7.1.1.2": { "d": "ideaCBC", "c": "Ascom Systech" }, "1.3.6.1.4.1.188.7.1.1.3": { "d": "ideaCFB", "c": "Ascom Systech" }, "1.3.6.1.4.1.188.7.1.1.4": { "d": "ideaOFB", "c": "Ascom Systech" }, "1.3.6.1.4.1.2428.10.1.1": { "d": "UNINETT policyIdentifier", "c": "UNINETT PCA" }, "1.3.6.1.4.1.2712.10": { "d": "ICE-TEL policyIdentifier", "c": "ICE-TEL CA" }, "1.3.6.1.4.1.2786.1.1.1": { "d": "ICE-TEL Italian policyIdentifier", "c": "ICE-TEL CA policy" }, "1.3.6.1.4.1.3029.1.1.1": { "d": "blowfishECB", "c": "cryptlib encryption algorithm" }, "1.3.6.1.4.1.3029.1.1.2": { "d": "blowfishCBC", "c": "cryptlib encryption algorithm" }, "1.3.6.1.4.1.3029.1.1.3": { "d": "blowfishCFB", "c": "cryptlib encryption algorithm" }, "1.3.6.1.4.1.3029.1.1.4": { "d": "blowfishOFB", "c": "cryptlib encryption algorithm" }, "1.3.6.1.4.1.3029.1.2.1": { "d": "elgamal", "c": "cryptlib public-key algorithm" }, "1.3.6.1.4.1.3029.1.2.1.1": { "d": "elgamalWithSHA-1", "c": "cryptlib public-key algorithm" }, "1.3.6.1.4.1.3029.1.2.1.2": { "d": "elgamalWithRIPEMD-160", "c": "cryptlib public-key algorithm" }, "1.3.6.1.4.1.3029.3.1.1": { "d": "cryptlibPresenceCheck", "c": "cryptlib attribute type" }, "1.3.6.1.4.1.3029.3.1.2": { "d": "pkiBoot", "c": "cryptlib attribute type" }, "1.3.6.1.4.1.3029.3.1.4": { "d": "crlExtReason", "c": "cryptlib attribute type" }, "1.3.6.1.4.1.3029.3.1.5": { "d": "keyFeatures", "c": "cryptlib attribute type" }, "1.3.6.1.4.1.3029.4.1": { "d": "cryptlibContent", "c": "cryptlib" }, "1.3.6.1.4.1.3029.4.1.1": { "d": "cryptlibConfigData", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.4.1.2": { "d": "cryptlibUserIndex", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.4.1.3": { "d": "cryptlibUserInfo", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.4.1.4": { "d": "rtcsRequest", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.4.1.5": { "d": "rtcsResponse", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.4.1.6": { "d": "rtcsResponseExt", "c": "cryptlib content type" }, "1.3.6.1.4.1.3029.42.11172.1": { "d": "mpeg-1", "c": "cryptlib special MPEG-of-cat OID" }, "1.3.6.1.4.1.3029.54.11940.54": { "d": "TSA policy \"Anything that arrives, we sign\"", "c": "cryptlib TSA policy" }, "1.3.6.1.4.1.3029.88.89.90.90.89": { "d": "xYZZY policyIdentifier", "c": "cryptlib certificate policy" }, "1.3.6.1.4.1.3401.8.1.1": { "d": "pgpExtension", "c": "PGP key information" }, "1.3.6.1.4.1.3576.7": { "d": "eciaAscX12Edi", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.7.1": { "d": "plainEDImessage", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.7.2": { "d": "signedEDImessage", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.7.5": { "d": "integrityEDImessage", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.7.65": { "d": "iaReceiptMessage", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.7.97": { "d": "iaStatusMessage", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.8": { "d": "eciaEdifact", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.3576.9": { "d": "eciaNonEdi", "c": "TMN EDI for Interactive Agents" }, "1.3.6.1.4.1.4146": { "d": "Globalsign", "c": "Globalsign" }, "1.3.6.1.4.1.4146.1": { "d": "globalsignPolicy", "c": "Globalsign" }, "1.3.6.1.4.1.4146.1.10": { "d": "globalsignDVPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.20": { "d": "globalsignOVPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.30": { "d": "globalsignTSAPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.40": { "d": "globalsignClientCertPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.50": { "d": "globalsignCodeSignPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.60": { "d": "globalsignRootSignPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.70": { "d": "globalsignTrustedRootPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.80": { "d": "globalsignEDIClientPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.81": { "d": "globalsignEDIServerPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.90": { "d": "globalsignTPMRootPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.4146.1.95": { "d": "globalsignOCSPPolicy", "c": "Globalsign policy" }, "1.3.6.1.4.1.5309.1": { "d": "edelWebPolicy", "c": "EdelWeb policy" }, "1.3.6.1.4.1.5309.1.2": { "d": "edelWebCustomerPolicy", "c": "EdelWeb policy" }, "1.3.6.1.4.1.5309.1.2.1": { "d": "edelWebClepsydrePolicy", "c": "EdelWeb policy" }, "1.3.6.1.4.1.5309.1.2.2": { "d": "edelWebExperimentalTSAPolicy", "c": "EdelWeb policy" }, "1.3.6.1.4.1.5309.1.2.3": { "d": "edelWebOpenEvidenceTSAPolicy", "c": "EdelWeb policy" }, "1.3.6.1.4.1.5472": { "d": "timeproof", "c": "enterprise" }, "1.3.6.1.4.1.5472.1": { "d": "tss", "c": "timeproof" }, "1.3.6.1.4.1.5472.1.1": { "d": "tss80", "c": "timeproof TSS" }, "1.3.6.1.4.1.5472.1.2": { "d": "tss380", "c": "timeproof TSS" }, "1.3.6.1.4.1.5472.1.3": { "d": "tss400", "c": "timeproof TSS" }, "1.3.6.1.4.1.5770.0.3": { "d": "secondaryPractices", "c": "MEDePass" }, "1.3.6.1.4.1.5770.0.4": { "d": "physicianIdentifiers", "c": "MEDePass" }, "1.3.6.1.4.1.6449.1.2.1.3.1": { "d": "comodoPolicy", "c": "Comodo CA" }, "1.3.6.1.4.1.6449.1.2.2.15": { "d": "wotrustPolicy", "c": "WoTrust (Comodo) CA" }, "1.3.6.1.4.1.6449.1.3.5.2": { "d": "comodoCertifiedDeliveryService", "c": "Comodo CA" }, "1.3.6.1.4.1.6449.2.1.1": { "d": "comodoTimestampingPolicy", "c": "Comodo CA" }, "1.3.6.1.4.1.8301.3.5.1": { "d": "validityModelChain", "c": "TU Darmstadt ValidityModel" }, "1.3.6.1.4.1.8301.3.5.2": { "d": "validityModelShell", "c": "ValidityModel" }, "1.3.6.1.4.1.8231.1": { "d": "rolUnicoNacional", "c": "Chilean Government national unique roll number" }, "1.3.6.1.4.1.11591": { "d": "gnu", "c": "GNU Project (see https://www.gnupg.org/oids.html)" }, "1.3.6.1.4.1.11591.1": { "d": "gnuRadius", "c": "GNU Radius" }, "1.3.6.1.4.1.11591.3": { "d": "gnuRadar", "c": "GNU Radar" }, "1.3.6.1.4.1.11591.4.11": { "d": "scrypt", "c": "GNU Generic Security Service" }, "1.3.6.1.4.1.11591.12": { "d": "gnuDigestAlgorithm", "c": "GNU digest algorithm" }, "1.3.6.1.4.1.11591.12.2": { "d": "tiger", "c": "GNU digest algorithm" }, "1.3.6.1.4.1.11591.13": { "d": "gnuEncryptionAlgorithm", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2": { "d": "serpent", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.1": { "d": "serpent128_ECB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.2": { "d": "serpent128_CBC", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.3": { "d": "serpent128_OFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.4": { "d": "serpent128_CFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.21": { "d": "serpent192_ECB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.22": { "d": "serpent192_CBC", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.23": { "d": "serpent192_OFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.24": { "d": "serpent192_CFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.41": { "d": "serpent256_ECB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.42": { "d": "serpent256_CBC", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.43": { "d": "serpent256_OFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.13.2.44": { "d": "serpent256_CFB", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.15.1": { "d": "curve25519", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.15.2": { "d": "curve448", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.15.3": { "d": "curve25519ph", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.11591.15.4": { "d": "curve448ph", "c": "GNU encryption algorithm" }, "1.3.6.1.4.1.16334.509.1.1": { "d": "Northrop Grumman extKeyUsage?", "c": "Northrop Grumman extended key usage" }, "1.3.6.1.4.1.16334.509.2.1": { "d": "ngcClass1", "c": "Northrop Grumman policy" }, "1.3.6.1.4.1.16334.509.2.2": { "d": "ngcClass2", "c": "Northrop Grumman policy" }, "1.3.6.1.4.1.16334.509.2.3": { "d": "ngcClass3", "c": "Northrop Grumman policy" }, "1.3.6.1.4.1.23629.1.4.2.1.1": { "d": "safenetUsageLimit", "c": "SafeNet" }, "1.3.6.1.4.1.23629.1.4.2.1.2": { "d": "safenetEndDate", "c": "SafeNet" }, "1.3.6.1.4.1.23629.1.4.2.1.3": { "d": "safenetStartDate", "c": "SafeNet" }, "1.3.6.1.4.1.23629.1.4.2.1.4": { "d": "safenetAdminCert", "c": "SafeNet" }, "1.3.6.1.4.1.23629.1.4.2.2.1": { "d": "safenetKeyDigest", "c": "SafeNet" }, "1.3.6.1.4.1.51483.2.1": { "d": "hashOfRootKey", "c": "CTIA" }, "1.3.6.1.5.2.3.1": { "d": "authData", "c": "Kerberos" }, "1.3.6.1.5.2.3.2": { "d": "dHKeyData", "c": "Kerberos" }, "1.3.6.1.5.2.3.3": { "d": "rkeyData", "c": "Kerberos" }, "1.3.6.1.5.2.3.4": { "d": "keyPurposeClientAuth", "c": "Kerberos" }, "1.3.6.1.5.2.3.5": { "d": "keyPurposeKdc", "c": "Kerberos" }, "1.3.6.1.5.2.3.6": { "d": "kdf", "c": "Kerberos" }, "1.3.6.1.5.5.7": { "d": "pkix", "c": "" }, "1.3.6.1.5.5.7.0.12": { "d": "attributeCert", "c": "PKIX" }, "1.3.6.1.5.5.7.1": { "d": "privateExtension", "c": "PKIX" }, "1.3.6.1.5.5.7.1.1": { "d": "authorityInfoAccess", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.2": { "d": "biometricInfo", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.3": { "d": "qcStatements", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.4": { "d": "acAuditIdentity", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.5": { "d": "acTargeting", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.6": { "d": "acAaControls", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.7": { "d": "ipAddrBlocks", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.8": { "d": "autonomousSysIds", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.9": { "d": "routerIdentifier", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.10": { "d": "acProxying", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.11": { "d": "subjectInfoAccess", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.12": { "d": "logoType", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.13": { "d": "wlanSSID", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.14": { "d": "proxyCertInfo", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.15": { "d": "acPolicies", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.16": { "d": "certificateWarranty", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.18": { "d": "cmsContentConstraints", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.19": { "d": "otherCerts", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.20": { "d": "wrappedApexContinKey", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.21": { "d": "clearanceConstraints", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.22": { "d": "skiSemantics", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.23": { "d": "noSecrecyAfforded", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.24": { "d": "tlsFeature", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.25": { "d": "manufacturerUsageDescription", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.26": { "d": "tnAuthList", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.27": { "d": "jwtClaimConstraints", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.28": { "d": "ipAddrBlocksV2", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.29": { "d": "autonomousSysIdsV2", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.30": { "d": "manufacturerUsageDescriptionSigner", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.31": { "d": "acmeIdentifier", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.1.32": { "d": "masaURL", "c": "PKIX private extension" }, "1.3.6.1.5.5.7.2": { "d": "policyQualifierIds", "c": "PKIX" }, "1.3.6.1.5.5.7.2.1": { "d": "cps", "c": "PKIX policy qualifier" }, "1.3.6.1.5.5.7.2.2": { "d": "unotice", "c": "PKIX policy qualifier" }, "1.3.6.1.5.5.7.2.3": { "d": "textNotice", "c": "PKIX policy qualifier" }, "1.3.6.1.5.5.7.2.4": { "d": "acps", "c": "PKIX policy qualifier" }, "1.3.6.1.5.5.7.2.5": { "d": "acunotice", "c": "PKIX policy qualifier" }, "1.3.6.1.5.5.7.3": { "d": "keyPurpose", "c": "PKIX" }, "1.3.6.1.5.5.7.3.1": { "d": "serverAuth", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.2": { "d": "clientAuth", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.3": { "d": "codeSigning", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.4": { "d": "emailProtection", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.5": { "d": "ipsecEndSystem", "c": "PKIX key purpose", "w": true }, "1.3.6.1.5.5.7.3.6": { "d": "ipsecTunnel", "c": "PKIX key purpose", "w": true }, "1.3.6.1.5.5.7.3.7": { "d": "ipsecUser", "c": "PKIX key purpose", "w": true }, "1.3.6.1.5.5.7.3.8": { "d": "timeStamping", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.9": { "d": "ocspSigning", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.10": { "d": "dvcs", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.11": { "d": "sbgpCertAAServerAuth", "c": "PKIX key purpose", "w": true }, "1.3.6.1.5.5.7.3.12": { "d": "scvpResponder", "c": "PKIX key purpose", "w": true }, "1.3.6.1.5.5.7.3.13": { "d": "eapOverPPP", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.14": { "d": "eapOverLAN", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.15": { "d": "scvpServer", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.16": { "d": "scvpClient", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.17": { "d": "ipsecIKE", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.18": { "d": "capwapAC", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.19": { "d": "capwapWTP", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.20": { "d": "sipDomain", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.21": { "d": "secureShellClient", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.22": { "d": "secureShellServer", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.23": { "d": "sendRouter", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.24": { "d": "sendProxiedRouter", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.25": { "d": "sendOwner", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.26": { "d": "sendProxiedOwner", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.27": { "d": "cmcCA", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.28": { "d": "cmcRA", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.29": { "d": "cmcArchive", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.30": { "d": "bgpsecRouter", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.31": { "d": "bimi", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.32": { "d": "cmKGA", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.33": { "d": "rpcTLSClient", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.3.34": { "d": "rpcTLSServer", "c": "PKIX key purpose" }, "1.3.6.1.5.5.7.4": { "d": "cmpInformationTypes", "c": "PKIX" }, "1.3.6.1.5.5.7.4.1": { "d": "caProtEncCert", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.2": { "d": "signKeyPairTypes", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.3": { "d": "encKeyPairTypes", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.4": { "d": "preferredSymmAlg", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.5": { "d": "caKeyUpdateInfo", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.6": { "d": "currentCRL", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.7": { "d": "unsupportedOIDs", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.10": { "d": "keyPairParamReq", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.11": { "d": "keyPairParamRep", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.12": { "d": "revPassphrase", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.13": { "d": "implicitConfirm", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.14": { "d": "confirmWaitTime", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.15": { "d": "origPKIMessage", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.4.16": { "d": "suppLangTags", "c": "PKIX CMP information" }, "1.3.6.1.5.5.7.5": { "d": "crmfRegistration", "c": "PKIX" }, "1.3.6.1.5.5.7.5.1": { "d": "regCtrl", "c": "PKIX CRMF registration" }, "1.3.6.1.5.5.7.5.1.1": { "d": "regToken", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.2": { "d": "authenticator", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.3": { "d": "pkiPublicationInfo", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.4": { "d": "pkiArchiveOptions", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.5": { "d": "oldCertID", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.6": { "d": "protocolEncrKey", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.7": { "d": "altCertTemplate", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.1.8": { "d": "wtlsTemplate", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.2": { "d": "utf8Pairs", "c": "PKIX CRMF registration" }, "1.3.6.1.5.5.7.5.2.1": { "d": "utf8Pairs", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.5.2.2": { "d": "certReq", "c": "PKIX CRMF registration control" }, "1.3.6.1.5.5.7.6": { "d": "algorithms", "c": "PKIX" }, "1.3.6.1.5.5.7.6.1": { "d": "des40", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.2": { "d": "noSignature", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.3": { "d": "dhSigHmacSha1", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.4": { "d": "dhPop", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.5": { "d": "dhPopSha224", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.6": { "d": "dhPopSha256", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.7": { "d": "dhPopSha384", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.8": { "d": "dhPopSha512", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.15": { "d": "dhPopStaticSha224HmacSha224", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.16": { "d": "dhPopStaticSha256HmacSha256", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.17": { "d": "dhPopStaticSha384HmacSha384", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.18": { "d": "dhPopStaticSha512HmacSha512", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.25": { "d": "ecdhPopStaticSha224HmacSha224", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.26": { "d": "ecdhPopStaticSha256HmacSha256", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.27": { "d": "ecdhPopStaticSha384HmacSha384", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.6.28": { "d": "ecdhPopStaticSha512HmacSha512", "c": "PKIX algorithm" }, "1.3.6.1.5.5.7.7": { "d": "cmcControls", "c": "PKIX" }, "1.3.6.1.5.5.7.8": { "d": "otherNames", "c": "PKIX" }, "1.3.6.1.5.5.7.8.1": { "d": "personalData", "c": "PKIX other name" }, "1.3.6.1.5.5.7.8.2": { "d": "userGroup", "c": "PKIX other name" }, "1.3.6.1.5.5.7.8.3": { "d": "permanentIdentifier", "c": "PKIX other name" }, "1.3.6.1.5.5.7.8.5": { "d": "xmppAddr", "c": "PKIX other name" }, "1.3.6.1.5.5.7.8.6": { "d": "SIM", "c": "PKIX other name" }, "1.3.6.1.5.5.7.9": { "d": "personalData", "c": "PKIX qualified certificates" }, "1.3.6.1.5.5.7.9.1": { "d": "dateOfBirth", "c": "PKIX personal data" }, "1.3.6.1.5.5.7.9.2": { "d": "placeOfBirth", "c": "PKIX personal data" }, "1.3.6.1.5.5.7.9.3": { "d": "gender", "c": "PKIX personal data" }, "1.3.6.1.5.5.7.9.4": { "d": "countryOfCitizenship", "c": "PKIX personal data" }, "1.3.6.1.5.5.7.9.5": { "d": "countryOfResidence", "c": "PKIX personal data" }, "1.3.6.1.5.5.7.10": { "d": "attributeCertificate", "c": "PKIX" }, "1.3.6.1.5.5.7.10.1": { "d": "authenticationInfo", "c": "PKIX attribute certificate extension" }, "1.3.6.1.5.5.7.10.2": { "d": "accessIdentity", "c": "PKIX attribute certificate extension" }, "1.3.6.1.5.5.7.10.3": { "d": "chargingIdentity", "c": "PKIX attribute certificate extension" }, "1.3.6.1.5.5.7.10.4": { "d": "group", "c": "PKIX attribute certificate extension" }, "1.3.6.1.5.5.7.10.5": { "d": "role", "c": "PKIX attribute certificate extension" }, "1.3.6.1.5.5.7.10.6": { "d": "wlanSSID", "c": "PKIX attribute-certificate extension" }, "1.3.6.1.5.5.7.11": { "d": "personalData", "c": "PKIX qualified certificates" }, "1.3.6.1.5.5.7.11.1": { "d": "pkixQCSyntax-v1", "c": "PKIX qualified certificates" }, "1.3.6.1.5.5.7.11.2": { "d": "pkixQCSyntax-v2", "c": "PKIX qualified certificates" }, "1.3.6.1.5.5.7.12": { "d": "pkixCCT", "c": "PKIX CMC Content Types" }, "1.3.6.1.5.5.7.12.2": { "d": "pkiData", "c": "PKIX CMC Content Types" }, "1.3.6.1.5.5.7.12.3": { "d": "pkiResponse", "c": "PKIX CMC Content Types" }, "1.3.6.1.5.5.7.14.2": { "d": "resourceCertificatePolicy", "c": "PKIX policies" }, "1.3.6.1.5.5.7.20": { "d": "logo", "c": "PKIX qualified certificates" }, "1.3.6.1.5.5.7.20.1": { "d": "logoLoyalty", "c": "PKIX" }, "1.3.6.1.5.5.7.20.2": { "d": "logoBackground", "c": "PKIX" }, "1.3.6.1.5.5.7.48.1": { "d": "ocsp", "c": "PKIX" }, "1.3.6.1.5.5.7.48.1.1": { "d": "ocspBasic", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.2": { "d": "ocspNonce", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.3": { "d": "ocspCRL", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.4": { "d": "ocspResponse", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.5": { "d": "ocspNoCheck", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.6": { "d": "ocspArchiveCutoff", "c": "OCSP" }, "1.3.6.1.5.5.7.48.1.7": { "d": "ocspServiceLocator", "c": "OCSP" }, "1.3.6.1.5.5.7.48.2": { "d": "caIssuers", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.3": { "d": "timeStamping", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.4": { "d": "dvcs", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.5": { "d": "caRepository", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.7": { "d": "signedObjectRepository", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.10": { "d": "rpkiManifest", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.7.48.11": { "d": "signedObject", "c": "PKIX subject/authority info access descriptor" }, "1.3.6.1.5.5.8.1.1": { "d": "hmacMD5", "c": "ISAKMP HMAC algorithm" }, "1.3.6.1.5.5.8.1.2": { "d": "hmacSHA", "c": "ISAKMP HMAC algorithm" }, "1.3.6.1.5.5.8.1.3": { "d": "hmacTiger", "c": "ISAKMP HMAC algorithm" }, "1.3.6.1.5.5.8.2.2": { "d": "iKEIntermediate", "c": "IKE ???" }, "1.3.12.2.1011.7.1": { "d": "decEncryptionAlgorithm", "c": "DASS algorithm" }, "1.3.12.2.1011.7.1.2": { "d": "decDEA", "c": "DASS encryption algorithm" }, "1.3.12.2.1011.7.2": { "d": "decHashAlgorithm", "c": "DASS algorithm" }, "1.3.12.2.1011.7.2.1": { "d": "decMD2", "c": "DASS hash algorithm" }, "1.3.12.2.1011.7.2.2": { "d": "decMD4", "c": "DASS hash algorithm" }, "1.3.12.2.1011.7.3": { "d": "decSignatureAlgorithm", "c": "DASS algorithm" }, "1.3.12.2.1011.7.3.1": { "d": "decMD2withRSA", "c": "DASS signature algorithm" }, "1.3.12.2.1011.7.3.2": { "d": "decMD4withRSA", "c": "DASS signature algorithm" }, "1.3.12.2.1011.7.3.3": { "d": "decDEAMAC", "c": "DASS signature algorithm" }, "1.3.14.2.26.5": { "d": "sha", "c": "Unsure about this OID" }, "1.3.14.3.2.1.1": { "d": "rsa", "c": "X.509. Unsure about this OID" }, "1.3.14.3.2.2": { "d": "md4WitRSA", "c": "Oddball OIW OID" }, "1.3.14.3.2.3": { "d": "md5WithRSA", "c": "Oddball OIW OID" }, "1.3.14.3.2.4": { "d": "md4WithRSAEncryption", "c": "Oddball OIW OID" }, "1.3.14.3.2.2.1": { "d": "sqmod-N", "c": "X.509. Deprecated", "w": true }, "1.3.14.3.2.3.1": { "d": "sqmod-NwithRSA", "c": "X.509. Deprecated", "w": true }, "1.3.14.3.2.6": { "d": "desECB", "c": "" }, "1.3.14.3.2.7": { "d": "desCBC", "c": "" }, "1.3.14.3.2.8": { "d": "desOFB", "c": "" }, "1.3.14.3.2.9": { "d": "desCFB", "c": "" }, "1.3.14.3.2.10": { "d": "desMAC", "c": "" }, "1.3.14.3.2.11": { "d": "rsaSignature", "c": "ISO 9796-2, also X9.31 Part 1" }, "1.3.14.3.2.12": { "d": "dsa", "c": "OIW?, supposedly from an incomplete version of SDN.701 (doesn't match final SDN.701)", "w": true }, "1.3.14.3.2.13": { "d": "dsaWithSHA", "c": "Oddball OIW OID. Incorrectly used by JDK 1.1 in place of (1 3 14 3 2 27)", "w": true }, "1.3.14.3.2.14": { "d": "mdc2WithRSASignature", "c": "Oddball OIW OID using 9796-2 padding rules" }, "1.3.14.3.2.15": { "d": "shaWithRSASignature", "c": "Oddball OIW OID using 9796-2 padding rules" }, "1.3.14.3.2.16": { "d": "dhWithCommonModulus", "c": "Oddball OIW OID. Deprecated, use a plain DH OID instead", "w": true }, "1.3.14.3.2.17": { "d": "desEDE", "c": "Oddball OIW OID. Mode is ECB" }, "1.3.14.3.2.18": { "d": "sha", "c": "Oddball OIW OID" }, "1.3.14.3.2.19": { "d": "mdc-2", "c": "Oddball OIW OID, DES-based hash, planned for X9.31 Part 2" }, "1.3.14.3.2.20": { "d": "dsaCommon", "c": "Oddball OIW OID. Deprecated, use a plain DSA OID instead", "w": true }, "1.3.14.3.2.21": { "d": "dsaCommonWithSHA", "c": "Oddball OIW OID. Deprecated, use a plain dsaWithSHA OID instead", "w": true }, "1.3.14.3.2.22": { "d": "rsaKeyTransport", "c": "Oddball OIW OID" }, "1.3.14.3.2.23": { "d": "keyed-hash-seal", "c": "Oddball OIW OID" }, "1.3.14.3.2.24": { "d": "md2WithRSASignature", "c": "Oddball OIW OID using 9796-2 padding rules" }, "1.3.14.3.2.25": { "d": "md5WithRSASignature", "c": "Oddball OIW OID using 9796-2 padding rules" }, "1.3.14.3.2.26": { "d": "sha1", "c": "OIW" }, "1.3.14.3.2.27": { "d": "dsaWithSHA1", "c": "OIW. This OID may also be assigned as ripemd-160" }, "1.3.14.3.2.28": { "d": "dsaWithCommonSHA1", "c": "OIW" }, "1.3.14.3.2.29": { "d": "sha-1WithRSAEncryption", "c": "Oddball OIW OID" }, "1.3.14.3.3.1": { "d": "simple-strong-auth-mechanism", "c": "Oddball OIW OID" }, "1.3.14.7.2.1.1": { "d": "ElGamal", "c": "Unsure about this OID" }, "1.3.14.7.2.3.1": { "d": "md2WithRSA", "c": "Unsure about this OID" }, "1.3.14.7.2.3.2": { "d": "md2WithElGamal", "c": "Unsure about this OID" }, "1.3.36.1": { "d": "document", "c": "Teletrust document" }, "1.3.36.1.1": { "d": "finalVersion", "c": "Teletrust document" }, "1.3.36.1.2": { "d": "draft", "c": "Teletrust document" }, "1.3.36.2": { "d": "sio", "c": "Teletrust sio" }, "1.3.36.2.1": { "d": "sedu", "c": "Teletrust sio" }, "1.3.36.3": { "d": "algorithm", "c": "Teletrust algorithm" }, "1.3.36.3.1": { "d": "encryptionAlgorithm", "c": "Teletrust algorithm" }, "1.3.36.3.1.1": { "d": "des", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.1.1": { "d": "desECB_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.1.1.1": { "d": "desECB_ISOpad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.1.2.1": { "d": "desCBC_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.1.2.1.1": { "d": "desCBC_ISOpad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.3": { "d": "des_3", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.3.1.1": { "d": "des_3ECB_pad", "c": "Teletrust encryption algorithm. EDE triple DES" }, "1.3.36.3.1.3.1.1.1": { "d": "des_3ECB_ISOpad", "c": "Teletrust encryption algorithm. EDE triple DES" }, "1.3.36.3.1.3.2.1": { "d": "des_3CBC_pad", "c": "Teletrust encryption algorithm. EDE triple DES" }, "1.3.36.3.1.3.2.1.1": { "d": "des_3CBC_ISOpad", "c": "Teletrust encryption algorithm. EDE triple DES" }, "1.3.36.3.1.2": { "d": "idea", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.1": { "d": "ideaECB", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.1.1": { "d": "ideaECB_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.1.1.1": { "d": "ideaECB_ISOpad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.2": { "d": "ideaCBC", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.2.1": { "d": "ideaCBC_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.2.1.1": { "d": "ideaCBC_ISOpad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.3": { "d": "ideaOFB", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.2.4": { "d": "ideaCFB", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.4": { "d": "rsaEncryption", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.4.512.17": { "d": "rsaEncryptionWithlmod512expe17", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.5": { "d": "bsi-1", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.5.1": { "d": "bsi_1ECB_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.5.2": { "d": "bsi_1CBC_pad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.1.5.2.1": { "d": "bsi_1CBC_PEMpad", "c": "Teletrust encryption algorithm" }, "1.3.36.3.2": { "d": "hashAlgorithm", "c": "Teletrust algorithm" }, "1.3.36.3.2.1": { "d": "ripemd160", "c": "Teletrust hash algorithm" }, "1.3.36.3.2.2": { "d": "ripemd128", "c": "Teletrust hash algorithm" }, "1.3.36.3.2.3": { "d": "ripemd256", "c": "Teletrust hash algorithm" }, "1.3.36.3.2.4": { "d": "mdc2singleLength", "c": "Teletrust hash algorithm" }, "1.3.36.3.2.5": { "d": "mdc2doubleLength", "c": "Teletrust hash algorithm" }, "1.3.36.3.3": { "d": "signatureAlgorithm", "c": "Teletrust algorithm" }, "1.3.36.3.3.1": { "d": "rsaSignature", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.1": { "d": "rsaSignatureWithsha1", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.1.1024.11": { "d": "rsaSignatureWithsha1_l1024_l11", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.2": { "d": "rsaSignatureWithripemd160", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.2.1024.11": { "d": "rsaSignatureWithripemd160_l1024_l11", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.3": { "d": "rsaSignatureWithrimpemd128", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.1.4": { "d": "rsaSignatureWithrimpemd256", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2": { "d": "ecsieSign", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2.1": { "d": "ecsieSignWithsha1", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2.2": { "d": "ecsieSignWithripemd160", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2.3": { "d": "ecsieSignWithmd2", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2.4": { "d": "ecsieSignWithmd5", "c": "Teletrust signature algorithm" }, "1.3.36.3.3.2.8.1.1.1": { "d": "brainpoolP160r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.2": { "d": "brainpoolP160t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.3": { "d": "brainpoolP192r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.4": { "d": "brainpoolP192t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.5": { "d": "brainpoolP224r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.6": { "d": "brainpoolP224t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.7": { "d": "brainpoolP256r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.8": { "d": "brainpoolP256t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.9": { "d": "brainpoolP320r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.10": { "d": "brainpoolP320t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.11": { "d": "brainpoolP384r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.12": { "d": "brainpoolP384t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.13": { "d": "brainpoolP512r1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.3.2.8.1.1.14": { "d": "brainpoolP512t1", "c": "ECC Brainpool Standard Curves and Curve Generation" }, "1.3.36.3.4": { "d": "signatureScheme", "c": "Teletrust algorithm" }, "1.3.36.3.4.1": { "d": "sigS_ISO9796-1", "c": "Teletrust signature scheme" }, "1.3.36.3.4.2": { "d": "sigS_ISO9796-2", "c": "Teletrust signature scheme" }, "1.3.36.3.4.2.1": { "d": "sigS_ISO9796-2Withred", "c": "Teletrust signature scheme. Unsure what this is supposed to be" }, "1.3.36.3.4.2.2": { "d": "sigS_ISO9796-2Withrsa", "c": "Teletrust signature scheme. Unsure what this is supposed to be" }, "1.3.36.3.4.2.3": { "d": "sigS_ISO9796-2Withrnd", "c": "Teletrust signature scheme. 9796-2 with random number in padding field" }, "1.3.36.4": { "d": "attribute", "c": "Teletrust attribute" }, "1.3.36.5": { "d": "policy", "c": "Teletrust policy" }, "1.3.36.6": { "d": "api", "c": "Teletrust API" }, "1.3.36.6.1": { "d": "manufacturer-specific_api", "c": "Teletrust API" }, "1.3.36.6.1.1": { "d": "utimaco-api", "c": "Teletrust API" }, "1.3.36.6.2": { "d": "functionality-specific_api", "c": "Teletrust API" }, "1.3.36.7": { "d": "keymgmnt", "c": "Teletrust key management" }, "1.3.36.7.1": { "d": "keyagree", "c": "Teletrust key management" }, "1.3.36.7.1.1": { "d": "bsiPKE", "c": "Teletrust key management" }, "1.3.36.7.2": { "d": "keytrans", "c": "Teletrust key management" }, "1.3.36.7.2.1": { "d": "encISO9796-2Withrsa", "c": "Teletrust key management. 9796-2 with key stored in hash field" }, "1.3.36.8.1.1": { "d": "Teletrust SigGConform policyIdentifier", "c": "Teletrust policy" }, "1.3.36.8.2.1": { "d": "directoryService", "c": "Teletrust extended key usage" }, "1.3.36.8.3.1": { "d": "dateOfCertGen", "c": "Teletrust attribute" }, "1.3.36.8.3.2": { "d": "procuration", "c": "Teletrust attribute" }, "1.3.36.8.3.3": { "d": "admission", "c": "Teletrust attribute" }, "1.3.36.8.3.4": { "d": "monetaryLimit", "c": "Teletrust attribute" }, "1.3.36.8.3.5": { "d": "declarationOfMajority", "c": "Teletrust attribute" }, "1.3.36.8.3.6": { "d": "integratedCircuitCardSerialNumber", "c": "Teletrust attribute" }, "1.3.36.8.3.7": { "d": "pKReference", "c": "Teletrust attribute" }, "1.3.36.8.3.8": { "d": "restriction", "c": "Teletrust attribute" }, "1.3.36.8.3.9": { "d": "retrieveIfAllowed", "c": "Teletrust attribute" }, "1.3.36.8.3.10": { "d": "requestedCertificate", "c": "Teletrust attribute" }, "1.3.36.8.3.11": { "d": "namingAuthorities", "c": "Teletrust attribute" }, "1.3.36.8.3.11.1": { "d": "rechtWirtschaftSteuern", "c": "Teletrust naming authorities" }, "1.3.36.8.3.11.1.1": { "d": "rechtsanwaeltin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.2": { "d": "rechtsanwalt", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.3": { "d": "rechtsBeistand", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.4": { "d": "steuerBeraterin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.5": { "d": "steuerBerater", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.6": { "d": "steuerBevollmaechtigte", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.7": { "d": "steuerBevollmaechtigter", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.8": { "d": "notarin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.9": { "d": "notar", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.10": { "d": "notarVertreterin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.11": { "d": "notarVertreter", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.12": { "d": "notariatsVerwalterin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.13": { "d": "notariatsVerwalter", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.14": { "d": "wirtschaftsPrueferin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.15": { "d": "wirtschaftsPruefer", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.16": { "d": "vereidigteBuchprueferin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.17": { "d": "vereidigterBuchpruefer", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.18": { "d": "patentAnwaeltin", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.11.1.19": { "d": "patentAnwalt", "c": "Teletrust ProfessionInfo" }, "1.3.36.8.3.12": { "d": "certInDirSince", "c": "Teletrust OCSP attribute (obsolete)", "w": true }, "1.3.36.8.3.13": { "d": "certHash", "c": "Teletrust OCSP attribute" }, "1.3.36.8.3.14": { "d": "nameAtBirth", "c": "Teletrust attribute" }, "1.3.36.8.3.15": { "d": "additionalInformation", "c": "Teletrust attribute" }, "1.3.36.8.4.1": { "d": "personalData", "c": "Teletrust OtherName attribute" }, "1.3.36.8.4.8": { "d": "restriction", "c": "Teletrust attribute certificate attribute" }, "1.3.36.8.5.1.1.1": { "d": "rsaIndicateSHA1", "c": "Teletrust signature algorithm" }, "1.3.36.8.5.1.1.2": { "d": "rsaIndicateRIPEMD160", "c": "Teletrust signature algorithm" }, "1.3.36.8.5.1.1.3": { "d": "rsaWithSHA1", "c": "Teletrust signature algorithm" }, "1.3.36.8.5.1.1.4": { "d": "rsaWithRIPEMD160", "c": "Teletrust signature algorithm" }, "1.3.36.8.5.1.2.1": { "d": "dsaExtended", "c": "Teletrust signature algorithm" }, "1.3.36.8.5.1.2.2": { "d": "dsaWithRIPEMD160", "c": "Teletrust signature algorithm" }, "1.3.36.8.6.1": { "d": "cert", "c": "Teletrust signature attributes" }, "1.3.36.8.6.2": { "d": "certRef", "c": "Teletrust signature attributes" }, "1.3.36.8.6.3": { "d": "attrCert", "c": "Teletrust signature attributes" }, "1.3.36.8.6.4": { "d": "attrRef", "c": "Teletrust signature attributes" }, "1.3.36.8.6.5": { "d": "fileName", "c": "Teletrust signature attributes" }, "1.3.36.8.6.6": { "d": "storageTime", "c": "Teletrust signature attributes" }, "1.3.36.8.6.7": { "d": "fileSize", "c": "Teletrust signature attributes" }, "1.3.36.8.6.8": { "d": "location", "c": "Teletrust signature attributes" }, "1.3.36.8.6.9": { "d": "sigNumber", "c": "Teletrust signature attributes" }, "1.3.36.8.6.10": { "d": "autoGen", "c": "Teletrust signature attributes" }, "1.3.36.8.7.1.1": { "d": "ptAdobeILL", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.2": { "d": "ptAmiPro", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.3": { "d": "ptAutoCAD", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.4": { "d": "ptBinary", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.5": { "d": "ptBMP", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.6": { "d": "ptCGM", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.7": { "d": "ptCorelCRT", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.8": { "d": "ptCorelDRW", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.9": { "d": "ptCorelEXC", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.10": { "d": "ptCorelPHT", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.11": { "d": "ptDraw", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.12": { "d": "ptDVI", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.13": { "d": "ptEPS", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.14": { "d": "ptExcel", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.15": { "d": "ptGEM", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.16": { "d": "ptGIF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.17": { "d": "ptHPGL", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.18": { "d": "ptJPEG", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.19": { "d": "ptKodak", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.20": { "d": "ptLaTeX", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.21": { "d": "ptLotus", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.22": { "d": "ptLotusPIC", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.23": { "d": "ptMacPICT", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.24": { "d": "ptMacWord", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.25": { "d": "ptMSWfD", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.26": { "d": "ptMSWord", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.27": { "d": "ptMSWord2", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.28": { "d": "ptMSWord6", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.29": { "d": "ptMSWord8", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.30": { "d": "ptPDF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.31": { "d": "ptPIF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.32": { "d": "ptPostscript", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.33": { "d": "ptRTF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.34": { "d": "ptSCITEX", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.35": { "d": "ptTAR", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.36": { "d": "ptTarga", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.37": { "d": "ptTeX", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.38": { "d": "ptText", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.39": { "d": "ptTIFF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.40": { "d": "ptTIFF-FC", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.41": { "d": "ptUID", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.42": { "d": "ptUUEncode", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.43": { "d": "ptWMF", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.44": { "d": "ptWordPerfect", "c": "Teletrust presentation types" }, "1.3.36.8.7.1.45": { "d": "ptWPGrph", "c": "Teletrust presentation types" }, "1.3.101.1.4": { "d": "thawte-ce", "c": "Thawte" }, "1.3.101.1.4.1": { "d": "strongExtranet", "c": "Thawte certificate extension" }, "1.3.101.110": { "d": "curveX25519", "c": "ECDH 25519 key agreement algorithm" }, "1.3.101.111": { "d": "curveX448", "c": "ECDH 448 key agreement algorithm" }, "1.3.101.112": { "d": "curveEd25519", "c": "EdDSA 25519 signature algorithm" }, "1.3.101.113": { "d": "curveEd448", "c": "EdDSA 448 signature algorithm" }, "1.3.101.114": { "d": "curveEd25519ph", "c": "EdDSA 25519 pre-hash signature algorithm" }, "1.3.101.115": { "d": "curveEd448ph", "c": "EdDSA 448 pre-hash signature algorithm" }, "1.3.132.0.1": { "d": "sect163k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.2": { "d": "sect163r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.3": { "d": "sect239k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.4": { "d": "sect113r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.5": { "d": "sect113r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.6": { "d": "secp112r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.7": { "d": "secp112r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.8": { "d": "secp160r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.9": { "d": "secp160k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.10": { "d": "secp256k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.15": { "d": "sect163r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.16": { "d": "sect283k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.17": { "d": "sect283r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.22": { "d": "sect131r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.23": { "d": "sect131r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.24": { "d": "sect193r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.25": { "d": "sect193r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.26": { "d": "sect233k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.27": { "d": "sect233r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.28": { "d": "secp128r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.29": { "d": "secp128r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.30": { "d": "secp160r2", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.31": { "d": "secp192k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.32": { "d": "secp224k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.33": { "d": "secp224r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.34": { "d": "secp384r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.35": { "d": "secp521r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.36": { "d": "sect409k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.37": { "d": "sect409r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.38": { "d": "sect571k1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.0.39": { "d": "sect571r1", "c": "SECG (Certicom) named elliptic curve" }, "1.3.132.1.11.1": { "d": "ecdhX963KDF-SHA256", "c": "SECG (Certicom) elliptic curve key agreement" }, "1.3.132.1.11.2": { "d": "ecdhX963KDF-SHA384", "c": "SECG (Certicom) elliptic curve key agreement" }, "1.3.132.1.11.3": { "d": "ecdhX963KDF-SHA512", "c": "SECG (Certicom) elliptic curve key agreement" }, "1.3.133.16.840.9.44": { "d": "x944", "c": "X9.44" }, "1.3.133.16.840.9.44.1": { "d": "x944Components", "c": "X9.44" }, "1.3.133.16.840.9.44.1.1": { "d": "x944Kdf2", "c": "X9.44" }, "1.3.133.16.840.9.44.1.2": { "d": "x944Kdf3", "c": "X9.44" }, "1.3.133.16.840.9.84": { "d": "x984", "c": "X9.84" }, "1.3.133.16.840.9.84.0": { "d": "x984Module", "c": "X9.84" }, "1.3.133.16.840.9.84.0.1": { "d": "x984Biometrics", "c": "X9.84 Module" }, "1.3.133.16.840.9.84.0.2": { "d": "x984CMS", "c": "X9.84 Module" }, "1.3.133.16.840.9.84.0.3": { "d": "x984Identifiers", "c": "X9.84 Module" }, "1.3.133.16.840.9.84.1": { "d": "x984Biometric", "c": "X9.84" }, "1.3.133.16.840.9.84.1.0": { "d": "biometricUnknownType", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.1": { "d": "biometricBodyOdor", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.2": { "d": "biometricDNA", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.3": { "d": "biometricEarShape", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.4": { "d": "biometricFacialFeatures", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.5": { "d": "biometricFingerImage", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.6": { "d": "biometricFingerGeometry", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.7": { "d": "biometricHandGeometry", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.8": { "d": "biometricIrisFeatures", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.9": { "d": "biometricKeystrokeDynamics", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.10": { "d": "biometricPalm", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.11": { "d": "biometricRetina", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.12": { "d": "biometricSignature", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.13": { "d": "biometricSpeechPattern", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.14": { "d": "biometricThermalImage", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.15": { "d": "biometricVeinPattern", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.16": { "d": "biometricThermalFaceImage", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.17": { "d": "biometricThermalHandImage", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.18": { "d": "biometricLipMovement", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.1.19": { "d": "biometricGait", "c": "X9.84 Biometric" }, "1.3.133.16.840.9.84.3": { "d": "x984MatchingMethod", "c": "X9.84" }, "1.3.133.16.840.9.84.4": { "d": "x984FormatOwner", "c": "X9.84" }, "1.3.133.16.840.9.84.4.0": { "d": "x984CbeffOwner", "c": "X9.84 Format Owner" }, "1.3.133.16.840.9.84.4.1": { "d": "x984IbiaOwner", "c": "X9.84 Format Owner" }, "1.3.133.16.840.9.84.4.1.1": { "d": "ibiaOwnerSAFLINK", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.2": { "d": "ibiaOwnerBioscrypt", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.3": { "d": "ibiaOwnerVisionics", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.4": { "d": "ibiaOwnerInfineonTechnologiesAG", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.5": { "d": "ibiaOwnerIridianTechnologies", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.6": { "d": "ibiaOwnerVeridicom", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.7": { "d": "ibiaOwnerCyberSIGN", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.8": { "d": "ibiaOwnereCryp", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.9": { "d": "ibiaOwnerFingerprintCardsAB", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.10": { "d": "ibiaOwnerSecuGen", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.11": { "d": "ibiaOwnerPreciseBiometric", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.12": { "d": "ibiaOwnerIdentix", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.13": { "d": "ibiaOwnerDERMALOG", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.14": { "d": "ibiaOwnerLOGICO", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.15": { "d": "ibiaOwnerNIST", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.16": { "d": "ibiaOwnerA3Vision", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.17": { "d": "ibiaOwnerNEC", "c": "X9.84 IBIA Format Owner" }, "1.3.133.16.840.9.84.4.1.18": { "d": "ibiaOwnerSTMicroelectronics", "c": "X9.84 IBIA Format Owner" }, "2.5.4.0": { "d": "objectClass", "c": "X.520 DN component" }, "2.5.4.1": { "d": "aliasedEntryName", "c": "X.520 DN component" }, "2.5.4.2": { "d": "knowledgeInformation", "c": "X.520 DN component" }, "2.5.4.3": { "d": "commonName", "c": "X.520 DN component" }, "2.5.4.4": { "d": "surname", "c": "X.520 DN component" }, "2.5.4.5": { "d": "serialNumber", "c": "X.520 DN component" }, "2.5.4.6": { "d": "countryName", "c": "X.520 DN component" }, "2.5.4.7": { "d": "localityName", "c": "X.520 DN component" }, "2.5.4.7.1": { "d": "collectiveLocalityName", "c": "X.520 DN component" }, "2.5.4.8": { "d": "stateOrProvinceName", "c": "X.520 DN component" }, "2.5.4.8.1": { "d": "collectiveStateOrProvinceName", "c": "X.520 DN component" }, "2.5.4.9": { "d": "streetAddress", "c": "X.520 DN component" }, "2.5.4.9.1": { "d": "collectiveStreetAddress", "c": "X.520 DN component" }, "2.5.4.10": { "d": "organizationName", "c": "X.520 DN component" }, "2.5.4.10.1": { "d": "collectiveOrganizationName", "c": "X.520 DN component" }, "2.5.4.11": { "d": "organizationalUnitName", "c": "X.520 DN component" }, "2.5.4.11.1": { "d": "collectiveOrganizationalUnitName", "c": "X.520 DN component" }, "2.5.4.12": { "d": "title", "c": "X.520 DN component" }, "2.5.4.13": { "d": "description", "c": "X.520 DN component" }, "2.5.4.14": { "d": "searchGuide", "c": "X.520 DN component" }, "2.5.4.15": { "d": "businessCategory", "c": "X.520 DN component" }, "2.5.4.16": { "d": "postalAddress", "c": "X.520 DN component" }, "2.5.4.16.1": { "d": "collectivePostalAddress", "c": "X.520 DN component" }, "2.5.4.17": { "d": "postalCode", "c": "X.520 DN component" }, "2.5.4.17.1": { "d": "collectivePostalCode", "c": "X.520 DN component" }, "2.5.4.18": { "d": "postOfficeBox", "c": "X.520 DN component" }, "2.5.4.18.1": { "d": "collectivePostOfficeBox", "c": "X.520 DN component" }, "2.5.4.19": { "d": "physicalDeliveryOfficeName", "c": "X.520 DN component" }, "2.5.4.19.1": { "d": "collectivePhysicalDeliveryOfficeName", "c": "X.520 DN component" }, "2.5.4.20": { "d": "telephoneNumber", "c": "X.520 DN component" }, "2.5.4.20.1": { "d": "collectiveTelephoneNumber", "c": "X.520 DN component" }, "2.5.4.21": { "d": "telexNumber", "c": "X.520 DN component" }, "2.5.4.21.1": { "d": "collectiveTelexNumber", "c": "X.520 DN component" }, "2.5.4.22": { "d": "teletexTerminalIdentifier", "c": "X.520 DN component" }, "2.5.4.22.1": { "d": "collectiveTeletexTerminalIdentifier", "c": "X.520 DN component" }, "2.5.4.23": { "d": "facsimileTelephoneNumber", "c": "X.520 DN component" }, "2.5.4.23.1": { "d": "collectiveFacsimileTelephoneNumber", "c": "X.520 DN component" }, "2.5.4.24": { "d": "x121Address", "c": "X.520 DN component" }, "2.5.4.25": { "d": "internationalISDNNumber", "c": "X.520 DN component" }, "2.5.4.25.1": { "d": "collectiveInternationalISDNNumber", "c": "X.520 DN component" }, "2.5.4.26": { "d": "registeredAddress", "c": "X.520 DN component" }, "2.5.4.27": { "d": "destinationIndicator", "c": "X.520 DN component" }, "2.5.4.28": { "d": "preferredDeliveryMehtod", "c": "X.520 DN component" }, "2.5.4.29": { "d": "presentationAddress", "c": "X.520 DN component" }, "2.5.4.30": { "d": "supportedApplicationContext", "c": "X.520 DN component" }, "2.5.4.31": { "d": "member", "c": "X.520 DN component" }, "2.5.4.32": { "d": "owner", "c": "X.520 DN component" }, "2.5.4.33": { "d": "roleOccupant", "c": "X.520 DN component" }, "2.5.4.34": { "d": "seeAlso", "c": "X.520 DN component" }, "2.5.4.35": { "d": "userPassword", "c": "X.520 DN component" }, "2.5.4.36": { "d": "userCertificate", "c": "X.520 DN component" }, "2.5.4.37": { "d": "caCertificate", "c": "X.520 DN component" }, "2.5.4.38": { "d": "authorityRevocationList", "c": "X.520 DN component" }, "2.5.4.39": { "d": "certificateRevocationList", "c": "X.520 DN component" }, "2.5.4.40": { "d": "crossCertificatePair", "c": "X.520 DN component" }, "2.5.4.41": { "d": "name", "c": "X.520 DN component" }, "2.5.4.42": { "d": "givenName", "c": "X.520 DN component" }, "2.5.4.43": { "d": "initials", "c": "X.520 DN component" }, "2.5.4.44": { "d": "generationQualifier", "c": "X.520 DN component" }, "2.5.4.45": { "d": "uniqueIdentifier", "c": "X.520 DN component" }, "2.5.4.46": { "d": "dnQualifier", "c": "X.520 DN component" }, "2.5.4.47": { "d": "enhancedSearchGuide", "c": "X.520 DN component" }, "2.5.4.48": { "d": "protocolInformation", "c": "X.520 DN component" }, "2.5.4.49": { "d": "distinguishedName", "c": "X.520 DN component" }, "2.5.4.50": { "d": "uniqueMember", "c": "X.520 DN component" }, "2.5.4.51": { "d": "houseIdentifier", "c": "X.520 DN component" }, "2.5.4.52": { "d": "supportedAlgorithms", "c": "X.520 DN component" }, "2.5.4.53": { "d": "deltaRevocationList", "c": "X.520 DN component" }, "2.5.4.54": { "d": "dmdName", "c": "X.520 DN component" }, "2.5.4.55": { "d": "clearance", "c": "X.520 DN component" }, "2.5.4.56": { "d": "defaultDirQop", "c": "X.520 DN component" }, "2.5.4.57": { "d": "attributeIntegrityInfo", "c": "X.520 DN component" }, "2.5.4.58": { "d": "attributeCertificate", "c": "X.520 DN component" }, "2.5.4.59": { "d": "attributeCertificateRevocationList", "c": "X.520 DN component" }, "2.5.4.60": { "d": "confKeyInfo", "c": "X.520 DN component" }, "2.5.4.61": { "d": "aACertificate", "c": "X.520 DN component" }, "2.5.4.62": { "d": "attributeDescriptorCertificate", "c": "X.520 DN component" }, "2.5.4.63": { "d": "attributeAuthorityRevocationList", "c": "X.520 DN component" }, "2.5.4.64": { "d": "familyInformation", "c": "X.520 DN component" }, "2.5.4.65": { "d": "pseudonym", "c": "X.520 DN component" }, "2.5.4.66": { "d": "communicationsService", "c": "X.520 DN component" }, "2.5.4.67": { "d": "communicationsNetwork", "c": "X.520 DN component" }, "2.5.4.68": { "d": "certificationPracticeStmt", "c": "X.520 DN component" }, "2.5.4.69": { "d": "certificatePolicy", "c": "X.520 DN component" }, "2.5.4.70": { "d": "pkiPath", "c": "X.520 DN component" }, "2.5.4.71": { "d": "privPolicy", "c": "X.520 DN component" }, "2.5.4.72": { "d": "role", "c": "X.520 DN component" }, "2.5.4.73": { "d": "delegationPath", "c": "X.520 DN component" }, "2.5.4.74": { "d": "protPrivPolicy", "c": "X.520 DN component" }, "2.5.4.75": { "d": "xMLPrivilegeInfo", "c": "X.520 DN component" }, "2.5.4.76": { "d": "xmlPrivPolicy", "c": "X.520 DN component" }, "2.5.4.77": { "d": "uuidpair", "c": "X.520 DN component" }, "2.5.4.78": { "d": "tagOid", "c": "X.520 DN component" }, "2.5.4.79": { "d": "uiiFormat", "c": "X.520 DN component" }, "2.5.4.80": { "d": "uiiInUrh", "c": "X.520 DN component" }, "2.5.4.81": { "d": "contentUrl", "c": "X.520 DN component" }, "2.5.4.82": { "d": "permission", "c": "X.520 DN component" }, "2.5.4.83": { "d": "uri", "c": "X.520 DN component" }, "2.5.4.84": { "d": "pwdAttribute", "c": "X.520 DN component" }, "2.5.4.85": { "d": "userPwd", "c": "X.520 DN component" }, "2.5.4.86": { "d": "urn", "c": "X.520 DN component" }, "2.5.4.87": { "d": "url", "c": "X.520 DN component" }, "2.5.4.88": { "d": "utmCoordinates", "c": "X.520 DN component" }, "2.5.4.89": { "d": "urnC", "c": "X.520 DN component" }, "2.5.4.90": { "d": "uii", "c": "X.520 DN component" }, "2.5.4.91": { "d": "epc", "c": "X.520 DN component" }, "2.5.4.92": { "d": "tagAfi", "c": "X.520 DN component" }, "2.5.4.93": { "d": "epcFormat", "c": "X.520 DN component" }, "2.5.4.94": { "d": "epcInUrn", "c": "X.520 DN component" }, "2.5.4.95": { "d": "ldapUrl", "c": "X.520 DN component" }, "2.5.4.96": { "d": "tagLocation", "c": "X.520 DN component" }, "2.5.4.97": { "d": "organizationIdentifier", "c": "X.520 DN component" }, "2.5.4.98": { "d": "countryCode3c", "c": "X.520 DN component" }, "2.5.4.99": { "d": "countryCode3n", "c": "X.520 DN component" }, "2.5.4.100": { "d": "dnsName", "c": "X.520 DN component" }, "2.5.4.101": { "d": "eepkCertificateRevocationList", "c": "X.520 DN component" }, "2.5.4.102": { "d": "eeAttrCertificateRevocationList", "c": "X.520 DN component" }, "2.5.4.103": { "d": "supportedPublicKeyAlgorithms", "c": "X.520 DN component" }, "2.5.4.104": { "d": "intEmail", "c": "X.520 DN component" }, "2.5.4.105": { "d": "jid", "c": "X.520 DN component" }, "2.5.4.106": { "d": "objectIdentifier", "c": "X.520 DN component" }, "2.5.6.0": { "d": "top", "c": "X.520 objectClass" }, "2.5.6.1": { "d": "alias", "c": "X.520 objectClass" }, "2.5.6.2": { "d": "country", "c": "X.520 objectClass" }, "2.5.6.3": { "d": "locality", "c": "X.520 objectClass" }, "2.5.6.4": { "d": "organization", "c": "X.520 objectClass" }, "2.5.6.5": { "d": "organizationalUnit", "c": "X.520 objectClass" }, "2.5.6.6": { "d": "person", "c": "X.520 objectClass" }, "2.5.6.7": { "d": "organizationalPerson", "c": "X.520 objectClass" }, "2.5.6.8": { "d": "organizationalRole", "c": "X.520 objectClass" }, "2.5.6.9": { "d": "groupOfNames", "c": "X.520 objectClass" }, "2.5.6.10": { "d": "residentialPerson", "c": "X.520 objectClass" }, "2.5.6.11": { "d": "applicationProcess", "c": "X.520 objectClass" }, "2.5.6.12": { "d": "applicationEntity", "c": "X.520 objectClass" }, "2.5.6.13": { "d": "dSA", "c": "X.520 objectClass" }, "2.5.6.14": { "d": "device", "c": "X.520 objectClass" }, "2.5.6.15": { "d": "strongAuthenticationUser", "c": "X.520 objectClass" }, "2.5.6.16": { "d": "certificateAuthority", "c": "X.520 objectClass" }, "2.5.6.17": { "d": "groupOfUniqueNames", "c": "X.520 objectClass" }, "2.5.6.21": { "d": "pkiUser", "c": "X.520 objectClass" }, "2.5.6.22": { "d": "pkiCA", "c": "X.520 objectClass" }, "2.5.8.1.1": { "d": "rsa", "c": "X.500 algorithms. Ambiguous, since no padding rules specified", "w": true }, "2.5.29.1": { "d": "authorityKeyIdentifier", "c": "X.509 extension. Deprecated, use 2 5 29 35 instead", "w": true }, "2.5.29.2": { "d": "keyAttributes", "c": "X.509 extension. Obsolete, use keyUsage/extKeyUsage instead", "w": true }, "2.5.29.3": { "d": "certificatePolicies", "c": "X.509 extension. Deprecated, use 2 5 29 32 instead", "w": true }, "2.5.29.4": { "d": "keyUsageRestriction", "c": "X.509 extension. Obsolete, use keyUsage/extKeyUsage instead", "w": true }, "2.5.29.5": { "d": "policyMapping", "c": "X.509 extension. Deprecated, use 2 5 29 33 instead", "w": true }, "2.5.29.6": { "d": "subtreesConstraint", "c": "X.509 extension. Obsolete, use nameConstraints instead", "w": true }, "2.5.29.7": { "d": "subjectAltName", "c": "X.509 extension. Deprecated, use 2 5 29 17 instead", "w": true }, "2.5.29.8": { "d": "issuerAltName", "c": "X.509 extension. Deprecated, use 2 5 29 18 instead", "w": true }, "2.5.29.9": { "d": "subjectDirectoryAttributes", "c": "X.509 extension" }, "2.5.29.10": { "d": "basicConstraints", "c": "X.509 extension. Deprecated, use 2 5 29 19 instead", "w": true }, "2.5.29.11": { "d": "nameConstraints", "c": "X.509 extension. Deprecated, use 2 5 29 30 instead", "w": true }, "2.5.29.12": { "d": "policyConstraints", "c": "X.509 extension. Deprecated, use 2 5 29 36 instead", "w": true }, "2.5.29.13": { "d": "basicConstraints", "c": "X.509 extension. Deprecated, use 2 5 29 19 instead", "w": true }, "2.5.29.14": { "d": "subjectKeyIdentifier", "c": "X.509 extension" }, "2.5.29.15": { "d": "keyUsage", "c": "X.509 extension" }, "2.5.29.16": { "d": "privateKeyUsagePeriod", "c": "X.509 extension" }, "2.5.29.17": { "d": "subjectAltName", "c": "X.509 extension" }, "2.5.29.18": { "d": "issuerAltName", "c": "X.509 extension" }, "2.5.29.19": { "d": "basicConstraints", "c": "X.509 extension" }, "2.5.29.20": { "d": "cRLNumber", "c": "X.509 extension" }, "2.5.29.21": { "d": "cRLReason", "c": "X.509 extension" }, "2.5.29.22": { "d": "expirationDate", "c": "X.509 extension. Deprecated, alternative OID uncertain", "w": true }, "2.5.29.23": { "d": "instructionCode", "c": "X.509 extension" }, "2.5.29.24": { "d": "invalidityDate", "c": "X.509 extension" }, "2.5.29.25": { "d": "cRLDistributionPoints", "c": "X.509 extension. Deprecated, use 2 5 29 31 instead", "w": true }, "2.5.29.26": { "d": "issuingDistributionPoint", "c": "X.509 extension. Deprecated, use 2 5 29 28 instead", "w": true }, "2.5.29.27": { "d": "deltaCRLIndicator", "c": "X.509 extension" }, "2.5.29.28": { "d": "issuingDistributionPoint", "c": "X.509 extension" }, "2.5.29.29": { "d": "certificateIssuer", "c": "X.509 extension" }, "2.5.29.30": { "d": "nameConstraints", "c": "X.509 extension" }, "2.5.29.31": { "d": "cRLDistributionPoints", "c": "X.509 extension" }, "2.5.29.32": { "d": "certificatePolicies", "c": "X.509 extension" }, "2.5.29.32.0": { "d": "anyPolicy", "c": "X.509 certificate policy" }, "2.5.29.33": { "d": "policyMappings", "c": "X.509 extension" }, "2.5.29.34": { "d": "policyConstraints", "c": "X.509 extension. Deprecated, use 2 5 29 36 instead", "w": true }, "2.5.29.35": { "d": "authorityKeyIdentifier", "c": "X.509 extension" }, "2.5.29.36": { "d": "policyConstraints", "c": "X.509 extension" }, "2.5.29.37": { "d": "extKeyUsage", "c": "X.509 extension" }, "2.5.29.37.0": { "d": "anyExtendedKeyUsage", "c": "X.509 extended key usage" }, "2.5.29.38": { "d": "authorityAttributeIdentifier", "c": "X.509 extension" }, "2.5.29.39": { "d": "roleSpecCertIdentifier", "c": "X.509 extension" }, "2.5.29.40": { "d": "cRLStreamIdentifier", "c": "X.509 extension" }, "2.5.29.41": { "d": "basicAttConstraints", "c": "X.509 extension" }, "2.5.29.42": { "d": "delegatedNameConstraints", "c": "X.509 extension" }, "2.5.29.43": { "d": "timeSpecification", "c": "X.509 extension" }, "2.5.29.44": { "d": "cRLScope", "c": "X.509 extension" }, "2.5.29.45": { "d": "statusReferrals", "c": "X.509 extension" }, "2.5.29.46": { "d": "freshestCRL", "c": "X.509 extension" }, "2.5.29.47": { "d": "orderedList", "c": "X.509 extension" }, "2.5.29.48": { "d": "attributeDescriptor", "c": "X.509 extension" }, "2.5.29.49": { "d": "userNotice", "c": "X.509 extension" }, "2.5.29.50": { "d": "sOAIdentifier", "c": "X.509 extension" }, "2.5.29.51": { "d": "baseUpdateTime", "c": "X.509 extension" }, "2.5.29.52": { "d": "acceptableCertPolicies", "c": "X.509 extension" }, "2.5.29.53": { "d": "deltaInfo", "c": "X.509 extension" }, "2.5.29.54": { "d": "inhibitAnyPolicy", "c": "X.509 extension" }, "2.5.29.55": { "d": "targetInformation", "c": "X.509 extension" }, "2.5.29.56": { "d": "noRevAvail", "c": "X.509 extension" }, "2.5.29.57": { "d": "acceptablePrivilegePolicies", "c": "X.509 extension" }, "2.5.29.58": { "d": "toBeRevoked", "c": "X.509 extension" }, "2.5.29.59": { "d": "revokedGroups", "c": "X.509 extension" }, "2.5.29.60": { "d": "expiredCertsOnCRL", "c": "X.509 extension" }, "2.5.29.61": { "d": "indirectIssuer", "c": "X.509 extension" }, "2.5.29.62": { "d": "noAssertion", "c": "X.509 extension" }, "2.5.29.63": { "d": "aAissuingDistributionPoint", "c": "X.509 extension" }, "2.5.29.64": { "d": "issuedOnBehalfOf", "c": "X.509 extension" }, "2.5.29.65": { "d": "singleUse", "c": "X.509 extension" }, "2.5.29.66": { "d": "groupAC", "c": "X.509 extension" }, "2.5.29.67": { "d": "allowedAttAss", "c": "X.509 extension" }, "2.5.29.68": { "d": "attributeMappings", "c": "X.509 extension" }, "2.5.29.69": { "d": "holderNameConstraints", "c": "X.509 extension" }, "2.16.724.1.2.2.4.1": { "d": "personalDataInfo", "c": "Spanish Government PKI?" }, "2.16.840.1.101.2.1.1.1": { "d": "sdnsSignatureAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.2": { "d": "fortezzaSignatureAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicSignatureAlgorithm, this OID is better known as dsaWithSHA-1." }, "2.16.840.1.101.2.1.1.3": { "d": "sdnsConfidentialityAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.4": { "d": "fortezzaConfidentialityAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicConfidentialityAlgorithm" }, "2.16.840.1.101.2.1.1.5": { "d": "sdnsIntegrityAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.6": { "d": "fortezzaIntegrityAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicIntegrityAlgorithm" }, "2.16.840.1.101.2.1.1.7": { "d": "sdnsTokenProtectionAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.8": { "d": "fortezzaTokenProtectionAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly know as mosaicTokenProtectionAlgorithm" }, "2.16.840.1.101.2.1.1.9": { "d": "sdnsKeyManagementAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.10": { "d": "fortezzaKeyManagementAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicKeyManagementAlgorithm" }, "2.16.840.1.101.2.1.1.11": { "d": "sdnsKMandSigAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.12": { "d": "fortezzaKMandSigAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicKMandSigAlgorithm" }, "2.16.840.1.101.2.1.1.13": { "d": "suiteASignatureAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.14": { "d": "suiteAConfidentialityAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.15": { "d": "suiteAIntegrityAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.16": { "d": "suiteATokenProtectionAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.17": { "d": "suiteAKeyManagementAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.18": { "d": "suiteAKMandSigAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.19": { "d": "fortezzaUpdatedSigAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicUpdatedSigAlgorithm" }, "2.16.840.1.101.2.1.1.20": { "d": "fortezzaKMandUpdSigAlgorithms", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicKMandUpdSigAlgorithms" }, "2.16.840.1.101.2.1.1.21": { "d": "fortezzaUpdatedIntegAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicUpdatedIntegAlgorithm" }, "2.16.840.1.101.2.1.1.22": { "d": "keyExchangeAlgorithm", "c": "SDN.700 INFOSEC algorithms. Formerly known as mosaicKeyEncryptionAlgorithm" }, "2.16.840.1.101.2.1.1.23": { "d": "fortezzaWrap80Algorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.1.24": { "d": "kEAKeyEncryptionAlgorithm", "c": "SDN.700 INFOSEC algorithms" }, "2.16.840.1.101.2.1.2.1": { "d": "rfc822MessageFormat", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.2": { "d": "emptyContent", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.3": { "d": "cspContentType", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.42": { "d": "mspRev3ContentType", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.48": { "d": "mspContentType", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.49": { "d": "mspRekeyAgentProtocol", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.50": { "d": "mspMMP", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.66": { "d": "mspRev3-1ContentType", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.72": { "d": "forwardedMSPMessageBodyPart", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.73": { "d": "mspForwardedMessageParameters", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.74": { "d": "forwardedCSPMsgBodyPart", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.75": { "d": "cspForwardedMessageParameters", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.76": { "d": "mspMMP2", "c": "SDN.700 INFOSEC format" }, "2.16.840.1.101.2.1.2.78.2": { "d": "encryptedKeyPackage", "c": "SDN.700 INFOSEC format and RFC 6032" }, "2.16.840.1.101.2.1.2.78.3": { "d": "keyPackageReceipt", "c": "SDN.700 INFOSEC format and RFC 7191" }, "2.16.840.1.101.2.1.2.78.6": { "d": "keyPackageError", "c": "SDN.700 INFOSEC format and RFC 7191" }, "2.16.840.1.101.2.1.3.1": { "d": "sdnsSecurityPolicy", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.2": { "d": "sdnsPRBAC", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.3": { "d": "mosaicPRBAC", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.10": { "d": "siSecurityPolicy", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.10.0": { "d": "siNASP", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.1": { "d": "siELCO", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.2": { "d": "siTK", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.3": { "d": "siDSAP", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.4": { "d": "siSSSS", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.5": { "d": "siDNASP", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.6": { "d": "siBYEMAN", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.7": { "d": "siREL-US", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.8": { "d": "siREL-AUS", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.9": { "d": "siREL-CAN", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.10": { "d": "siREL_UK", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.11": { "d": "siREL-NZ", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.10.12": { "d": "siGeneric", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.11": { "d": "genser", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.11.0": { "d": "genserNations", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.11.1": { "d": "genserComsec", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.11.2": { "d": "genserAcquisition", "c": "SDN.700 INFOSEC policy (obsolete)", "w": true }, "2.16.840.1.101.2.1.3.11.3": { "d": "genserSecurityCategories", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.11.3.0": { "d": "genserTagSetName", "c": "SDN.700 INFOSEC GENSER policy" }, "2.16.840.1.101.2.1.3.12": { "d": "defaultSecurityPolicy", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.13": { "d": "capcoMarkings", "c": "SDN.700 INFOSEC policy" }, "2.16.840.1.101.2.1.3.13.0": { "d": "capcoSecurityCategories", "c": "SDN.700 INFOSEC policy CAPCO markings" }, "2.16.840.1.101.2.1.3.13.0.1": { "d": "capcoTagSetName1", "c": "SDN.700 INFOSEC policy CAPCO markings" }, "2.16.840.1.101.2.1.3.13.0.2": { "d": "capcoTagSetName2", "c": "SDN.700 INFOSEC policy CAPCO markings" }, "2.16.840.1.101.2.1.3.13.0.3": { "d": "capcoTagSetName3", "c": "SDN.700 INFOSEC policy CAPCO markings" }, "2.16.840.1.101.2.1.3.13.0.4": { "d": "capcoTagSetName4", "c": "SDN.700 INFOSEC policy CAPCO markings" }, "2.16.840.1.101.2.1.5.1": { "d": "sdnsKeyManagementCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.2": { "d": "sdnsUserSignatureCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.3": { "d": "sdnsKMandSigCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.4": { "d": "fortezzaKeyManagementCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.5": { "d": "fortezzaKMandSigCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.6": { "d": "fortezzaUserSignatureCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.7": { "d": "fortezzaCASignatureCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.8": { "d": "sdnsCASignatureCertificate", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.10": { "d": "auxiliaryVector", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.11": { "d": "mlReceiptPolicy", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.12": { "d": "mlMembership", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.13": { "d": "mlAdministrators", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.14": { "d": "alid", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.20": { "d": "janUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.21": { "d": "febUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.22": { "d": "marUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.23": { "d": "aprUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.24": { "d": "mayUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.25": { "d": "junUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.26": { "d": "julUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.27": { "d": "augUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.28": { "d": "sepUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.29": { "d": "octUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.30": { "d": "novUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.31": { "d": "decUKMs", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.40": { "d": "metaSDNSckl", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.41": { "d": "sdnsCKL", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.42": { "d": "metaSDNSsignatureCKL", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.43": { "d": "sdnsSignatureCKL", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.44": { "d": "sdnsCertificateRevocationList", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.45": { "d": "fortezzaCertificateRevocationList", "c": "SDN.700 INFOSEC attributes (superseded)", "w": true }, "2.16.840.1.101.2.1.5.46": { "d": "fortezzaCKL", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.47": { "d": "alExemptedAddressProcessor", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.48": { "d": "guard", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.49": { "d": "algorithmsSupported", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.50": { "d": "suiteAKeyManagementCertificate", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.51": { "d": "suiteAKMandSigCertificate", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.52": { "d": "suiteAUserSignatureCertificate", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.53": { "d": "prbacInfo", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.54": { "d": "prbacCAConstraints", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.55": { "d": "sigOrKMPrivileges", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.56": { "d": "commPrivileges", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.57": { "d": "labeledAttribute", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.58": { "d": "policyInformationFile", "c": "SDN.700 INFOSEC attributes (obsolete)", "w": true }, "2.16.840.1.101.2.1.5.59": { "d": "secPolicyInformationFile", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.60": { "d": "cAClearanceConstraint", "c": "SDN.700 INFOSEC attributes" }, "2.16.840.1.101.2.1.5.65": { "d": "keyPkgIdAndReceiptReq", "c": "SDN.700 INFOSEC attributes and RFC 7191" }, "2.16.840.1.101.2.1.5.66": { "d": "contentDecryptKeyID", "c": "SDN.700 INFOSEC attributes and RFC 6032" }, "2.16.840.1.101.2.1.5.70": { "d": "kpCrlPointers", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.5.71": { "d": "kpKeyProvinceV2", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.5.72": { "d": "kpManifest", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.7.1": { "d": "cspExtns", "c": "SDN.700 INFOSEC extensions" }, "2.16.840.1.101.2.1.7.1.0": { "d": "cspCsExtn", "c": "SDN.700 INFOSEC extensions" }, "2.16.840.1.101.2.1.8.1": { "d": "mISSISecurityCategories", "c": "SDN.700 INFOSEC security category" }, "2.16.840.1.101.2.1.8.2": { "d": "standardSecurityLabelPrivileges", "c": "SDN.700 INFOSEC security category" }, "2.16.840.1.101.2.1.8.3.1": { "d": "enumeratedPermissiveAttrs", "c": "SDN.700 INFOSEC security category from RFC 7906" }, "2.16.840.1.101.2.1.8.3.3": { "d": "informativeAttrs", "c": "SDN.700 INFOSEC security category from RFC 7906" }, "2.16.840.1.101.2.1.8.3.4": { "d": "enumeratedRestrictiveAttrs", "c": "SDN.700 INFOSEC security category from RFC 7906" }, "2.16.840.1.101.2.1.10.1": { "d": "sigPrivileges", "c": "SDN.700 INFOSEC privileges" }, "2.16.840.1.101.2.1.10.2": { "d": "kmPrivileges", "c": "SDN.700 INFOSEC privileges" }, "2.16.840.1.101.2.1.10.3": { "d": "namedTagSetPrivilege", "c": "SDN.700 INFOSEC privileges" }, "2.16.840.1.101.2.1.11.1": { "d": "ukDemo", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.11.2": { "d": "usDODClass2", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.11.3": { "d": "usMediumPilot", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.11.4": { "d": "usDODClass4", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.11.5": { "d": "usDODClass3", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.11.6": { "d": "usDODClass5", "c": "SDN.700 INFOSEC certificate policy" }, "2.16.840.1.101.2.1.12.0": { "d": "testSecurityPolicy", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.1": { "d": "tsp1", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.1.0": { "d": "tsp1SecurityCategories", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.1.0.0": { "d": "tsp1TagSetZero", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.1.0.1": { "d": "tsp1TagSetOne", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.1.0.2": { "d": "tsp1TagSetTwo", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.2": { "d": "tsp2", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.2.0": { "d": "tsp2SecurityCategories", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.2.0.0": { "d": "tsp2TagSetZero", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.2.0.1": { "d": "tsp2TagSetOne", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.2.0.2": { "d": "tsp2TagSetTwo", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.3": { "d": "kafka", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.3.0": { "d": "kafkaSecurityCategories", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.3.0.1": { "d": "kafkaTagSetName1", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.3.0.2": { "d": "kafkaTagSetName2", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.0.3.0.3": { "d": "kafkaTagSetName3", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.12.1.1": { "d": "tcp1", "c": "SDN.700 INFOSEC test objects" }, "2.16.840.1.101.2.1.13.1": { "d": "kmaKeyAlgorithm", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.3": { "d": "kmaTSECNomenclature", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.5": { "d": "kmaKeyDistPeriod", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.6": { "d": "kmaKeyValidityPeriod", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.7": { "d": "kmaKeyDuration", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.11": { "d": "kmaSplitID", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.12": { "d": "kmaKeyPkgType", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.13": { "d": "kmaKeyPurpose", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.14": { "d": "kmaKeyUse", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.15": { "d": "kmaTransportKey", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.16": { "d": "kmaKeyPkgReceiversV2", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.19": { "d": "kmaOtherCertFormats", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.20": { "d": "kmaUsefulCerts", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.21": { "d": "kmaKeyWrapAlgorithm", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.13.22": { "d": "kmaSigUsageV3", "c": "SDN.700 INFOSEC attributes and RFC 7906" }, "2.16.840.1.101.2.1.16.0": { "d": "dn", "c": "SDN.700 INFOSEC attributes and RFC 7191" }, "2.16.840.1.101.2.1.22": { "d": "errorCodes", "c": "RFC 7906 key attribute error codes" }, "2.16.840.1.101.2.1.22.1": { "d": "missingKeyType", "c": "RFC 7906 key attribute error codes" }, "2.16.840.1.101.2.1.22.2": { "d": "privacyMarkTooLong", "c": "RFC 7906 key attribute error codes" }, "2.16.840.1.101.2.1.22.3": { "d": "unrecognizedSecurityPolicy", "c": "RFC 7906 key attribute error codes" }, "2.16.840.1.101.3.1": { "d": "slabel", "c": "CSOR GAK", "w": true }, "2.16.840.1.101.3.2": { "d": "pki", "c": "NIST", "w": true }, "2.16.840.1.101.3.2.1": { "d": "NIST policyIdentifier", "c": "NIST policies", "w": true }, "2.16.840.1.101.3.2.1.3.1": { "d": "fbcaRudimentaryPolicy", "c": "Federal Bridge CA Policy" }, "2.16.840.1.101.3.2.1.3.2": { "d": "fbcaBasicPolicy", "c": "Federal Bridge CA Policy" }, "2.16.840.1.101.3.2.1.3.3": { "d": "fbcaMediumPolicy", "c": "Federal Bridge CA Policy" }, "2.16.840.1.101.3.2.1.3.4": { "d": "fbcaHighPolicy", "c": "Federal Bridge CA Policy" }, "2.16.840.1.101.3.2.1.48.1": { "d": "nistTestPolicy1", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.1.48.2": { "d": "nistTestPolicy2", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.1.48.3": { "d": "nistTestPolicy3", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.1.48.4": { "d": "nistTestPolicy4", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.1.48.5": { "d": "nistTestPolicy5", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.1.48.6": { "d": "nistTestPolicy6", "c": "NIST PKITS policies" }, "2.16.840.1.101.3.2.2": { "d": "gak", "c": "CSOR GAK extended key usage", "w": true }, "2.16.840.1.101.3.2.2.1": { "d": "kRAKey", "c": "CSOR GAK extended key usage", "w": true }, "2.16.840.1.101.3.2.3": { "d": "extensions", "c": "CSOR GAK extensions", "w": true }, "2.16.840.1.101.3.2.3.1": { "d": "kRTechnique", "c": "CSOR GAK extensions", "w": true }, "2.16.840.1.101.3.2.3.2": { "d": "kRecoveryCapable", "c": "CSOR GAK extensions", "w": true }, "2.16.840.1.101.3.2.3.3": { "d": "kR", "c": "CSOR GAK extensions", "w": true }, "2.16.840.1.101.3.2.4": { "d": "keyRecoverySchemes", "c": "CSOR GAK", "w": true }, "2.16.840.1.101.3.2.5": { "d": "krapola", "c": "CSOR GAK", "w": true }, "2.16.840.1.101.3.3": { "d": "arpa", "c": "CSOR GAK", "w": true }, "2.16.840.1.101.3.4": { "d": "nistAlgorithm", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1": { "d": "aes", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.1": { "d": "aes128-ECB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.2": { "d": "aes128-CBC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.3": { "d": "aes128-OFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.4": { "d": "aes128-CFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.5": { "d": "aes128-wrap", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.6": { "d": "aes128-GCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.7": { "d": "aes128-CCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.8": { "d": "aes128-wrap-pad", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.9": { "d": "aes128-GMAC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.21": { "d": "aes192-ECB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.22": { "d": "aes192-CBC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.23": { "d": "aes192-OFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.24": { "d": "aes192-CFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.25": { "d": "aes192-wrap", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.26": { "d": "aes192-GCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.27": { "d": "aes192-CCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.28": { "d": "aes192-wrap-pad", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.29": { "d": "aes192-GMAC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.41": { "d": "aes256-ECB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.42": { "d": "aes256-CBC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.43": { "d": "aes256-OFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.44": { "d": "aes256-CFB", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.45": { "d": "aes256-wrap", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.46": { "d": "aes256-GCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.47": { "d": "aes256-CCM", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.48": { "d": "aes256-wrap-pad", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.1.49": { "d": "aes256-GMAC", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2": { "d": "hashAlgos", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.1": { "d": "sha-256", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.2": { "d": "sha-384", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.3": { "d": "sha-512", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.4": { "d": "sha-224", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.7": { "d": "sha3-224", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.8": { "d": "sha3-256", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.9": { "d": "sha3-384", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.10": { "d": "sha3-512", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.11": { "d": "shake128", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.12": { "d": "shake256", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.17": { "d": "shake128len", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.18": { "d": "shake256len", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.19": { "d": "kmacShake128", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.2.20": { "d": "kmacShake256", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.3.1": { "d": "dsaWithSha224", "c": "NIST Algorithm" }, "2.16.840.1.101.3.4.3.2": { "d": "dsaWithSha256", "c": "NIST Algorithm" }, "2.16.840.1.113719.1.2.8": { "d": "novellAlgorithm", "c": "Novell" }, "2.16.840.1.113719.1.2.8.22": { "d": "desCbcIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.23": { "d": "desCbcPadIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.24": { "d": "desEDE2CbcIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.25": { "d": "desEDE2CbcPadIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.26": { "d": "desEDE3CbcIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.27": { "d": "desEDE3CbcPadIV8", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.28": { "d": "rc5CbcPad", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.29": { "d": "md2WithRSAEncryptionBSafe1", "c": "Novell signature algorithm" }, "2.16.840.1.113719.1.2.8.30": { "d": "md5WithRSAEncryptionBSafe1", "c": "Novell signature algorithm" }, "2.16.840.1.113719.1.2.8.31": { "d": "sha1WithRSAEncryptionBSafe1", "c": "Novell signature algorithm" }, "2.16.840.1.113719.1.2.8.32": { "d": "lmDigest", "c": "Novell digest algorithm" }, "2.16.840.1.113719.1.2.8.40": { "d": "md2", "c": "Novell digest algorithm" }, "2.16.840.1.113719.1.2.8.50": { "d": "md5", "c": "Novell digest algorithm" }, "2.16.840.1.113719.1.2.8.51": { "d": "ikeHmacWithSHA1-RSA", "c": "Novell signature algorithm" }, "2.16.840.1.113719.1.2.8.52": { "d": "ikeHmacWithMD5-RSA", "c": "Novell signature algorithm" }, "2.16.840.1.113719.1.2.8.69": { "d": "rc2CbcPad", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.82": { "d": "sha-1", "c": "Novell digest algorithm" }, "2.16.840.1.113719.1.2.8.92": { "d": "rc2BSafe1Cbc", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.95": { "d": "md4", "c": "Novell digest algorithm" }, "2.16.840.1.113719.1.2.8.130": { "d": "md4Packet", "c": "Novell keyed hash" }, "2.16.840.1.113719.1.2.8.131": { "d": "rsaEncryptionBsafe1", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.132": { "d": "nwPassword", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.2.8.133": { "d": "novellObfuscate-1", "c": "Novell encryption algorithm" }, "2.16.840.1.113719.1.9": { "d": "pki", "c": "Novell" }, "2.16.840.1.113719.1.9.4": { "d": "pkiAttributeType", "c": "Novell PKI" }, "2.16.840.1.113719.1.9.4.1": { "d": "securityAttributes", "c": "Novell PKI attribute type" }, "2.16.840.1.113719.1.9.4.2": { "d": "relianceLimit", "c": "Novell PKI attribute type" }, "2.16.840.1.113730.1": { "d": "cert-extension", "c": "Netscape" }, "2.16.840.1.113730.1.1": { "d": "netscape-cert-type", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.2": { "d": "netscape-base-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.3": { "d": "netscape-revocation-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.4": { "d": "netscape-ca-revocation-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.7": { "d": "netscape-cert-renewal-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.8": { "d": "netscape-ca-policy-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.9": { "d": "HomePage-url", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.10": { "d": "EntityLogo", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.11": { "d": "UserPicture", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.12": { "d": "netscape-ssl-server-name", "c": "Netscape certificate extension" }, "2.16.840.1.113730.1.13": { "d": "netscape-comment", "c": "Netscape certificate extension" }, "2.16.840.1.113730.2": { "d": "data-type", "c": "Netscape" }, "2.16.840.1.113730.2.1": { "d": "dataGIF", "c": "Netscape data type" }, "2.16.840.1.113730.2.2": { "d": "dataJPEG", "c": "Netscape data type" }, "2.16.840.1.113730.2.3": { "d": "dataURL", "c": "Netscape data type" }, "2.16.840.1.113730.2.4": { "d": "dataHTML", "c": "Netscape data type" }, "2.16.840.1.113730.2.5": { "d": "certSequence", "c": "Netscape data type" }, "2.16.840.1.113730.2.6": { "d": "certURL", "c": "Netscape certificate extension" }, "2.16.840.1.113730.3": { "d": "directory", "c": "Netscape" }, "2.16.840.1.113730.3.1": { "d": "ldapDefinitions", "c": "Netscape directory" }, "2.16.840.1.113730.3.1.1": { "d": "carLicense", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.3.1.2": { "d": "departmentNumber", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.3.1.3": { "d": "employeeNumber", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.3.1.4": { "d": "employeeType", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.3.1.216": { "d": "userPKCS12", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.3.2.2": { "d": "inetOrgPerson", "c": "Netscape LDAP definitions" }, "2.16.840.1.113730.4.1": { "d": "serverGatedCrypto", "c": "Netscape" }, "2.16.840.1.113733.1.6.3": { "d": "verisignCZAG", "c": "Verisign extension" }, "2.16.840.1.113733.1.6.6": { "d": "verisignInBox", "c": "Verisign extension" }, "2.16.840.1.113733.1.6.11": { "d": "verisignOnsiteJurisdictionHash", "c": "Verisign extension" }, "2.16.840.1.113733.1.6.13": { "d": "Unknown Verisign VPN extension", "c": "Verisign extension" }, "2.16.840.1.113733.1.6.15": { "d": "verisignServerID", "c": "Verisign extension" }, "2.16.840.1.113733.1.7.1.1": { "d": "verisignCertPolicies95Qualifier1", "c": "Verisign policy" }, "2.16.840.1.113733.1.7.1.1.1": { "d": "verisignCPSv1notice", "c": "Verisign policy (obsolete)" }, "2.16.840.1.113733.1.7.1.1.2": { "d": "verisignCPSv1nsi", "c": "Verisign policy (obsolete)" }, "2.16.840.1.113733.1.8.1": { "d": "verisignISSStrongCrypto", "c": "Verisign" }, "2.16.840.1.113733.1": { "d": "pki", "c": "Verisign extension" }, "2.16.840.1.113733.1.9": { "d": "pkcs7Attribute", "c": "Verisign PKI extension" }, "2.16.840.1.113733.1.9.2": { "d": "messageType", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.3": { "d": "pkiStatus", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.4": { "d": "failInfo", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.5": { "d": "senderNonce", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.6": { "d": "recipientNonce", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.7": { "d": "transID", "c": "Verisign PKCS #7 attribute" }, "2.16.840.1.113733.1.9.8": { "d": "extensionReq", "c": "Verisign PKCS #7 attribute. Use PKCS #9 extensionRequest instead", "w": true }, "2.16.840.1.113741.2": { "d": "intelCDSA", "c": "Intel CDSA" }, "2.16.840.1.114412.1": { "d": "digiCertNonEVCerts", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.1": { "d": "digiCertOVCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.2": { "d": "digiCertDVCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.11": { "d": "digiCertFederatedDeviceCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.3.0.1": { "d": "digiCertGlobalCAPolicy", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.3.0.2": { "d": "digiCertHighAssuranceEVCAPolicy", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.3.0.3": { "d": "digiCertGlobalRootCAPolicy", "c": "Digicert CA policy" }, "2.16.840.1.114412.1.3.0.4": { "d": "digiCertAssuredIDRootCAPolicy", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.2": { "d": "digiCertEVCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.3": { "d": "digiCertObjectSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.3.1": { "d": "digiCertCodeSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.3.2": { "d": "digiCertEVCodeSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.3.11": { "d": "digiCertKernelCodeSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.3.21": { "d": "digiCertDocumentSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4": { "d": "digiCertClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.1.1": { "d": "digiCertLevel1PersonalClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.1.2": { "d": "digiCertLevel1EnterpriseClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.2": { "d": "digiCertLevel2ClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.3.1": { "d": "digiCertLevel3USClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.3.2": { "d": "digiCertLevel3CBPClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.4.1": { "d": "digiCertLevel4USClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.4.2": { "d": "digiCertLevel4CBPClientCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.5.1": { "d": "digiCertPIVHardwareCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.5.2": { "d": "digiCertPIVCardAuthCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.2.4.5.3": { "d": "digiCertPIVContentSigningCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.4.31": { "d": "digiCertGridClassicCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.4.31.5": { "d": "digiCertGridIntegratedCert", "c": "Digicert CA policy" }, "2.16.840.1.114412.31.4.31.1": { "d": "digiCertGridHostCert", "c": "Digicert CA policy" }, "2.23.42.0": { "d": "contentType", "c": "SET" }, "2.23.42.0.0": { "d": "panData", "c": "SET contentType" }, "2.23.42.0.1": { "d": "panToken", "c": "SET contentType" }, "2.23.42.0.2": { "d": "panOnly", "c": "SET contentType" }, "2.23.42.1": { "d": "msgExt", "c": "SET" }, "2.23.42.2": { "d": "field", "c": "SET" }, "2.23.42.2.0": { "d": "fullName", "c": "SET field" }, "2.23.42.2.1": { "d": "givenName", "c": "SET field" }, "2.23.42.2.2": { "d": "familyName", "c": "SET field" }, "2.23.42.2.3": { "d": "birthFamilyName", "c": "SET field" }, "2.23.42.2.4": { "d": "placeName", "c": "SET field" }, "2.23.42.2.5": { "d": "identificationNumber", "c": "SET field" }, "2.23.42.2.6": { "d": "month", "c": "SET field" }, "2.23.42.2.7": { "d": "date", "c": "SET field" }, "2.23.42.2.8": { "d": "address", "c": "SET field" }, "2.23.42.2.9": { "d": "telephone", "c": "SET field" }, "2.23.42.2.10": { "d": "amount", "c": "SET field" }, "2.23.42.2.11": { "d": "accountNumber", "c": "SET field" }, "2.23.42.2.12": { "d": "passPhrase", "c": "SET field" }, "2.23.42.3": { "d": "attribute", "c": "SET" }, "2.23.42.3.0": { "d": "cert", "c": "SET attribute" }, "2.23.42.3.0.0": { "d": "rootKeyThumb", "c": "SET cert attribute" }, "2.23.42.3.0.1": { "d": "additionalPolicy", "c": "SET cert attribute" }, "2.23.42.4": { "d": "algorithm", "c": "SET" }, "2.23.42.5": { "d": "policy", "c": "SET" }, "2.23.42.5.0": { "d": "root", "c": "SET policy" }, "2.23.42.6": { "d": "module", "c": "SET" }, "2.23.42.7": { "d": "certExt", "c": "SET" }, "2.23.42.7.0": { "d": "hashedRootKey", "c": "SET cert extension" }, "2.23.42.7.1": { "d": "certificateType", "c": "SET cert extension" }, "2.23.42.7.2": { "d": "merchantData", "c": "SET cert extension" }, "2.23.42.7.3": { "d": "cardCertRequired", "c": "SET cert extension" }, "2.23.42.7.4": { "d": "tunneling", "c": "SET cert extension" }, "2.23.42.7.5": { "d": "setExtensions", "c": "SET cert extension" }, "2.23.42.7.6": { "d": "setQualifier", "c": "SET cert extension" }, "2.23.42.8": { "d": "brand", "c": "SET" }, "2.23.42.8.1": { "d": "IATA-ATA", "c": "SET brand" }, "2.23.42.8.4": { "d": "VISA", "c": "SET brand" }, "2.23.42.8.5": { "d": "MasterCard", "c": "SET brand" }, "2.23.42.8.30": { "d": "Diners", "c": "SET brand" }, "2.23.42.8.34": { "d": "AmericanExpress", "c": "SET brand" }, "2.23.42.8.6011": { "d": "Novus", "c": "SET brand" }, "2.23.42.9": { "d": "vendor", "c": "SET" }, "2.23.42.9.0": { "d": "GlobeSet", "c": "SET vendor" }, "2.23.42.9.1": { "d": "IBM", "c": "SET vendor" }, "2.23.42.9.2": { "d": "CyberCash", "c": "SET vendor" }, "2.23.42.9.3": { "d": "Terisa", "c": "SET vendor" }, "2.23.42.9.4": { "d": "RSADSI", "c": "SET vendor" }, "2.23.42.9.5": { "d": "VeriFone", "c": "SET vendor" }, "2.23.42.9.6": { "d": "TrinTech", "c": "SET vendor" }, "2.23.42.9.7": { "d": "BankGate", "c": "SET vendor" }, "2.23.42.9.8": { "d": "GTE", "c": "SET vendor" }, "2.23.42.9.9": { "d": "CompuSource", "c": "SET vendor" }, "2.23.42.9.10": { "d": "Griffin", "c": "SET vendor" }, "2.23.42.9.11": { "d": "Certicom", "c": "SET vendor" }, "2.23.42.9.12": { "d": "OSS", "c": "SET vendor" }, "2.23.42.9.13": { "d": "TenthMountain", "c": "SET vendor" }, "2.23.42.9.14": { "d": "Antares", "c": "SET vendor" }, "2.23.42.9.15": { "d": "ECC", "c": "SET vendor" }, "2.23.42.9.16": { "d": "Maithean", "c": "SET vendor" }, "2.23.42.9.17": { "d": "Netscape", "c": "SET vendor" }, "2.23.42.9.18": { "d": "Verisign", "c": "SET vendor" }, "2.23.42.9.19": { "d": "BlueMoney", "c": "SET vendor" }, "2.23.42.9.20": { "d": "Lacerte", "c": "SET vendor" }, "2.23.42.9.21": { "d": "Fujitsu", "c": "SET vendor" }, "2.23.42.9.22": { "d": "eLab", "c": "SET vendor" }, "2.23.42.9.23": { "d": "Entrust", "c": "SET vendor" }, "2.23.42.9.24": { "d": "VIAnet", "c": "SET vendor" }, "2.23.42.9.25": { "d": "III", "c": "SET vendor" }, "2.23.42.9.26": { "d": "OpenMarket", "c": "SET vendor" }, "2.23.42.9.27": { "d": "Lexem", "c": "SET vendor" }, "2.23.42.9.28": { "d": "Intertrader", "c": "SET vendor" }, "2.23.42.9.29": { "d": "Persimmon", "c": "SET vendor" }, "2.23.42.9.30": { "d": "NABLE", "c": "SET vendor" }, "2.23.42.9.31": { "d": "espace-net", "c": "SET vendor" }, "2.23.42.9.32": { "d": "Hitachi", "c": "SET vendor" }, "2.23.42.9.33": { "d": "Microsoft", "c": "SET vendor" }, "2.23.42.9.34": { "d": "NEC", "c": "SET vendor" }, "2.23.42.9.35": { "d": "Mitsubishi", "c": "SET vendor" }, "2.23.42.9.36": { "d": "NCR", "c": "SET vendor" }, "2.23.42.9.37": { "d": "e-COMM", "c": "SET vendor" }, "2.23.42.9.38": { "d": "Gemplus", "c": "SET vendor" }, "2.23.42.10": { "d": "national", "c": "SET" }, "2.23.42.10.392": { "d": "Japan", "c": "SET national" }, "2.23.43.1.4": { "d": "wTLS-ECC", "c": "WAP WTLS" }, "2.23.43.1.4.1": { "d": "wTLS-ECC-curve1", "c": "WAP WTLS" }, "2.23.43.1.4.6": { "d": "wTLS-ECC-curve6", "c": "WAP WTLS" }, "2.23.43.1.4.8": { "d": "wTLS-ECC-curve8", "c": "WAP WTLS" }, "2.23.43.1.4.9": { "d": "wTLS-ECC-curve9", "c": "WAP WTLS" }, "2.23.133": { "d": "tCPA", "c": "TCPA" }, "2.23.133.1": { "d": "tcpaSpecVersion", "c": "TCPA" }, "2.23.133.2": { "d": "tcpaAttribute", "c": "TCPA" }, "2.23.133.2.1": { "d": "tcpaTpmManufacturer", "c": "TCPA Attribute" }, "2.23.133.2.2": { "d": "tcpaTpmModel", "c": "TCPA Attribute" }, "2.23.133.2.3": { "d": "tcpaTpmVersion", "c": "TCPA Attribute" }, "2.23.133.2.4": { "d": "tcpaPlatformManufacturer", "c": "TCPA Attribute" }, "2.23.133.2.5": { "d": "tcpaPlatformModel", "c": "TCPA Attribute" }, "2.23.133.2.6": { "d": "tcpaPlatformVersion", "c": "TCPA Attribute" }, "2.23.133.2.7": { "d": "tcpaComponentManufacturer", "c": "TCPA Attribute" }, "2.23.133.2.8": { "d": "tcpaComponentModel", "c": "TCPA Attribute" }, "2.23.133.2.9": { "d": "tcpaComponentVersion", "c": "TCPA Attribute" }, "2.23.133.2.10": { "d": "tcpaSecurityQualities", "c": "TCPA Attribute" }, "2.23.133.2.11": { "d": "tcpaTpmProtectionProfile", "c": "TCPA Attribute" }, "2.23.133.2.12": { "d": "tcpaTpmSecurityTarget", "c": "TCPA Attribute" }, "2.23.133.2.13": { "d": "tcpaFoundationProtectionProfile", "c": "TCPA Attribute" }, "2.23.133.2.14": { "d": "tcpaFoundationSecurityTarget", "c": "TCPA Attribute" }, "2.23.133.2.15": { "d": "tcpaTpmIdLabel", "c": "TCPA Attribute" }, "2.23.133.3": { "d": "tcpaProtocol", "c": "TCPA" }, "2.23.133.3.1": { "d": "tcpaPrttTpmIdProtocol", "c": "TCPA Protocol" }, "2.23.134.1.4.2.1": { "d": "postSignumRootQCA", "c": "PostSignum CA" }, "2.23.134.1.2.2.3": { "d": "postSignumPublicCA", "c": "PostSignum CA" }, "2.23.134.1.2.1.8.210": { "d": "postSignumCommercialServerPolicy", "c": "PostSignum CA" }, "2.23.136.1.1.1": { "d": "mRTDSignatureData", "c": "ICAO MRTD" }, "2.54.1775.2": { "d": "hashedRootKey", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.3": { "d": "certificateType", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.4": { "d": "merchantData", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.5": { "d": "cardCertRequired", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.6": { "d": "tunneling", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.7": { "d": "setQualifier", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "2.54.1775.99": { "d": "setData", "c": "SET. Deprecated, use (2 23 42 7 0) instead", "w": true }, "1.2.40.0.17.1.22": { "d": "A-Trust EV policy", "c": "A-Trust CA Root" }, "1.3.6.1.4.1.34697.2.1": { "d": "AffirmTrust EV policy", "c": "AffirmTrust Commercial" }, "1.3.6.1.4.1.34697.2.2": { "d": "AffirmTrust EV policy", "c": "AffirmTrust Networking" }, "1.3.6.1.4.1.34697.2.3": { "d": "AffirmTrust EV policy", "c": "AffirmTrust Premium" }, "1.3.6.1.4.1.34697.2.4": { "d": "AffirmTrust EV policy", "c": "AffirmTrust Premium ECC" }, "2.16.578.1.26.1.3.3": { "d": "BuyPass EV policy", "c": "BuyPass Class 3 EV" }, "1.3.6.1.4.1.17326.10.14.2.1.2": { "d": "Camerfirma EV policy", "c": "Camerfirma CA Root" }, "1.3.6.1.4.1.17326.10.8.12.1.2": { "d": "Camerfirma EV policy", "c": "Camerfirma CA Root" }, "1.3.6.1.4.1.22234.2.5.2.3.1": { "d": "CertPlus EV policy", "c": "CertPlus Class 2 Primary CA (formerly Keynectis)" }, "1.3.6.1.4.1.6449.1.2.1.5.1": { "d": "Comodo EV policy", "c": "COMODO Certification Authority" }, "1.3.6.1.4.1.6334.1.100.1": { "d": "Cybertrust EV policy", "c": "Cybertrust Global Root (now Verizon Business)" }, "1.3.6.1.4.1.4788.2.202.1": { "d": "D-TRUST EV policy", "c": "D-TRUST Root Class 3 CA 2 EV 2009" }, "2.16.840.1.114412.2.1": { "d": "DigiCert EV policy", "c": "DigiCert High Assurance EV Root CA" }, "2.16.528.1.1001.1.1.1.12.6.1.1.1": { "d": "DigiNotar EV policy", "c": "DigiNotar Root CA" }, "2.16.840.1.114028.10.1.2": { "d": "Entrust EV policy", "c": "Entrust Root Certification Authority" }, "1.3.6.1.4.1.14370.1.6": { "d": "GeoTrust EV policy", "c": "GeoTrust Primary Certification Authority (formerly Equifax)" }, "1.3.6.1.4.1.4146.1.1": { "d": "GlobalSign EV policy", "c": "GlobalSign" }, "2.16.840.1.114413.1.7.23.3": { "d": "GoDaddy EV policy", "c": "GoDaddy Class 2 Certification Authority (formerly ValiCert)" }, "1.3.6.1.4.1.14777.6.1.1": { "d": "Izenpe EV policy", "c": "Certificado de Servidor Seguro SSL EV" }, "1.3.6.1.4.1.14777.6.1.2": { "d": "Izenpe EV policy", "c": "Certificado de Sede Electronica EV" }, "1.3.6.1.4.1.782.1.2.1.8.1": { "d": "Network Solutions EV policy", "c": "Network Solutions Certificate Authority" }, "1.3.6.1.4.1.8024.0.2.100.1.2": { "d": "QuoVadis EV policy", "c": "QuoVadis Root CA 2" }, "1.2.392.200091.100.721.1": { "d": "Security Communication (SECOM) EV policy", "c": "Security Communication RootCA1" }, "2.16.840.1.114414.1.7.23.3": { "d": "Starfield EV policy", "c": "Starfield Class 2 Certification Authority" }, "1.3.6.1.4.1.23223.1.1.1": { "d": "StartCom EV policy", "c": "StartCom Certification Authority" }, "2.16.756.1.89.1.2.1.1": { "d": "SwissSign EV policy", "c": "SwissSign Gold CA - G2" }, "1.3.6.1.4.1.7879.13.24.1": { "d": "T-TeleSec EV policy", "c": "T-TeleSec GlobalRoot Class 3" }, "2.16.840.1.113733.1.7.48.1": { "d": "Thawte EV policy", "c": "Thawte Premium Server CA" }, "2.16.840.1.114404.1.1.2.4.1": { "d": "TrustWave EV policy", "c": "TrustWave CA, formerly SecureTrust, before that XRamp" }, "1.3.6.1.4.1.40869.1.1.22.3": { "d": "TWCA EV policy", "c": "TWCA Root Certification Authority" }, "2.16.840.1.113733.1.7.23.6": { "d": "VeriSign EV policy", "c": "VeriSign Class 3 Public Primary Certification Authority" }, "2.16.840.1.114171.500.9": { "d": "Wells Fargo EV policy", "c": "Wells Fargo WellsSecure Public Root Certificate Authority" }, "END": "" };}).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), /***/ "69f3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_WEAK_MAP = __webpack_require__("cdce"); var globalThis = __webpack_require__("cfe9"); var isObject = __webpack_require__("861d"); var createNonEnumerableProperty = __webpack_require__("9112"); var hasOwn = __webpack_require__("1a2d"); var shared = __webpack_require__("c6cd"); var sharedKey = __webpack_require__("f772"); var hiddenKeys = __webpack_require__("d012"); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError = globalThis.TypeError; var WeakMap = globalThis.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw new TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); /* eslint-disable no-self-assign -- prototype methods protection */ store.get = store.get; store.has = store.has; store.set = store.set; /* eslint-enable no-self-assign -- prototype methods protection */ set = function (it, metadata) { if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; store.set(it, metadata); return metadata; }; get = function (it) { return store.get(it) || {}; }; has = function (it) { return store.has(it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ "6a29": /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = __webpack_require__("6d3e").has; // Perform ? RequireInternalSlot(M, [[WeakMapData]]) module.exports = function (it) { has(it); return it; }; /***/ }), /***/ "6a8a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var newPromiseCapabilityModule = __webpack_require__("f069"); // `Promise.withResolvers` method // https://tc39.es/ecma262/#sec-promise.withResolvers $({ target: 'Promise', stat: true }, { withResolvers: function withResolvers() { var promiseCapability = newPromiseCapabilityModule.f(this); return { promise: promiseCapability.promise, resolve: promiseCapability.resolve, reject: promiseCapability.reject }; } }); /***/ }), /***/ "6b33": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return convertPathAbbreviatedDatatoPoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return calPathPoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return setMaxPageScal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return setPageScal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getPageScal; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return converterDpi; }); /* unused harmony export deltaFormatter */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return calTextPoint; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return replaceFirstSlash; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getExtensionByPath; }); /* unused harmony export decodeHtml */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getFontFamily; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return parseStBox; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return parseCtm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return parseColor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return converterBox; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Uint8ArrayToHexString; }); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14d9"); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__); /* * ofd.js - A Javascript class for reading and rendering ofd files * * * Copyright (c) 2020. DLTech21 All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ const convertPathAbbreviatedDatatoPoint = abbreviatedData => { let array = abbreviatedData.split(' '); let pointList = []; let i = 0; while (i < array.length) { const cmd = array[i]; if (cmd === 'M' || cmd === 'S') { let point = { 'type': 'M', 'x': parseFloat(array[i + 1]), 'y': parseFloat(array[i + 2]) }; i = i + 3; pointList.push(point); } else if (cmd === 'L') { let point = { 'type': 'L', 'x': parseFloat(array[i + 1]), 'y': parseFloat(array[i + 2]) }; i = i + 3; pointList.push(point); } else if (cmd === 'C') { let point = { 'type': 'C', 'x': 0, 'y': 0 }; pointList.push(point); i++; } else if (cmd === 'Q') { // 二次贝塞尔:控制点 + 终点。字形轮廓大量使用,漏掉会让笔画塌陷 let point = { 'type': 'Q', 'x1': parseFloat(array[i + 1]), 'y1': parseFloat(array[i + 2]), 'x2': parseFloat(array[i + 3]), 'y2': parseFloat(array[i + 4]) }; i = i + 5; pointList.push(point); } else if (cmd === 'B') { let point = { 'type': 'B', 'x1': parseFloat(array[i + 1]), 'y1': parseFloat(array[i + 2]), 'x2': parseFloat(array[i + 3]), 'y2': parseFloat(array[i + 4]), 'x3': parseFloat(array[i + 5]), 'y3': parseFloat(array[i + 6]) }; i = i + 7; pointList.push(point); } else { i++; } } return pointList; }; const calPathPoint = function (abbreviatedPoint) { let pointList = []; for (let i = 0; i < abbreviatedPoint.length; i++) { let point = abbreviatedPoint[i]; if (point.type === 'M' || point.type === 'L' || point.type === 'C') { let x = 0, y = 0; x = point.x; y = point.y; point.x = converterDpi(x); point.y = converterDpi(y); pointList.push(point); } else if (point.type === 'Q') { let realPoint = { 'type': 'Q', 'x1': converterDpi(point.x1), 'y1': converterDpi(point.y1), 'x2': converterDpi(point.x2), 'y2': converterDpi(point.y2) }; pointList.push(realPoint); } else if (point.type === 'B') { let x1 = point.x1, y1 = point.y1; let x2 = point.x2, y2 = point.y2; let x3 = point.x3, y3 = point.y3; let realPoint = { 'type': 'B', 'x1': converterDpi(x1), 'y1': converterDpi(y1), 'x2': converterDpi(x2), 'y2': converterDpi(y2), 'x3': converterDpi(x3), 'y3': converterDpi(y3) }; pointList.push(realPoint); } } return pointList; }; const millimetersToPixel = function (mm, dpi) { //毫米转像素:mm * dpi / 25.4 return mm * dpi / 25.4; }; let MaxScale = 10; let Scale = MaxScale; const setMaxPageScal = function (scale) { MaxScale = scale > 5 ? 5 : scale; }; const setPageScal = function (scale) { // scale = Math.ceil(scale); Scale = scale > 1 ? scale : 1; Scale = Scale > MaxScale ? MaxScale : Scale; }; const getPageScal = function () { return Scale; }; const converterDpi = function (width) { return millimetersToPixel(width, Scale * 25.4); }; const deltaFormatter = function (delta) { if (delta.indexOf("g") === -1) { let floatList = []; for (let f of delta.split(' ')) { floatList.push(parseFloat(f)); } return floatList; } else { const array = delta.split(' '); let gFlag = false; let gProcessing = false; let gItemCount = 0; let floatList = []; for (const s of array) { if ('g' === s) { gFlag = true; } else { if (!s || s.trim().length == 0) { continue; } if (gFlag) { gItemCount = parseInt(s); gProcessing = true; gFlag = false; } else if (gProcessing) { for (let j = 0; j < gItemCount; j++) { floatList.push(parseFloat(s)); } gProcessing = false; } else { floatList.push(parseFloat(s)); } } } return floatList; } }; const calTextPoint = function (textCodes) { let x = 0; let y = 0; let textCodePointList = []; if (!textCodes) { return textCodePointList; } for (let textCode of textCodes) { if (!textCode) { continue; } x = parseFloat(textCode['@_X']); y = parseFloat(textCode['@_Y']); if (isNaN(x)) { x = 0; } if (isNaN(y)) { y = 0; } let deltaXList = []; let deltaYList = []; if (textCode['@_DeltaX'] && textCode['@_DeltaX'].length > 0) { deltaXList = deltaFormatter(textCode['@_DeltaX']); } if (textCode['@_DeltaY'] && textCode['@_DeltaY'].length > 0) { deltaYList = deltaFormatter(textCode['@_DeltaY']); } let textStr = textCode['#text']; if (textStr) { textStr += ''; textStr = decodeHtml(textStr); textStr = textStr.replace(/ /g, ' '); for (let i = 0; i < textStr.length; i++) { if (i > 0 && deltaXList.length > 0) { x += deltaXList[i - 1]; } if (i > 0 && deltaYList.length > 0) { y += deltaYList[i - 1]; } let text = textStr.substring(i, i + 1); let filterPointY = textCodePointList.filter(textCodePoint => { return textCodePoint.y == converterDpi(y); }); if (filterPointY && filterPointY.length) { // Y坐标相同,无需再创建text标签 filterPointY[0].text += text; } else { let textCodePoint = { 'x': converterDpi(x), 'y': converterDpi(y), 'text': text }; textCodePointList.push(textCodePoint); } } } } return textCodePointList; }; const replaceFirstSlash = function (str) { if (str) { if (str.indexOf('/') === 0) { str = str.replace('/', ''); } } return str; }; const getExtensionByPath = function (path) { if (!path && typeof path !== "string") return ""; return path.substring(path.lastIndexOf('.') + 1); }; let REGX_HTML_DECODE = /&\w+;|&#(\d+);/g; let HTML_DECODE = { "<": "<", ">": ">", "&": "&", " ": " ", """: "\"", "©": "", "'": "'" // Add more }; const decodeHtml = function (s) { s = s != undefined ? s : this.toString(); return typeof s != "string" ? s : s.replace(REGX_HTML_DECODE, function ($0, $1) { var c = HTML_DECODE[$0]; if (c == undefined) { // Maybe is Entity Number if (!isNaN($1)) { c = String.fromCharCode($1 == 160 ? 32 : $1); } else { c = $0; } } return c; }); }; let FONT_FAMILY = { '楷体': '楷体, KaiTi, Kai, simkai', 'kaiti': '楷体, KaiTi, Kai, simkai', 'Kai': '楷体, KaiTi, Kai', 'simsun': 'SimSun, simsun, Songti SC', '宋体': 'SimSun, simsun, Songti SC', '黑体': 'SimHei, STHeiti, simhei', '仿宋': 'FangSong, STFangsong, simfang', '小标宋体': 'sSun', '方正小标宋_gbk': 'sSun', '仿宋_gb2312': 'FangSong, STFangsong, simfang', '楷体_gb2312': '楷体, KaiTi, Kai, simkai', 'couriernew': 'Courier New', 'courier new': 'Courier New' }; const getFontFamily = function (font) { // 字体未在资源文件里声明时不能让整页渲染中断 if (!font) { return ''; } if (FONT_FAMILY[font.toLowerCase()]) { font = FONT_FAMILY[font.toLowerCase()]; } for (let key of Object.keys(FONT_FAMILY)) { if (font.toLowerCase().indexOf(key.toLowerCase()) != -1) { return FONT_FAMILY[key]; } } return font; }; const parseStBox = function (obj) { if (obj) { let array = obj.split(' '); return { x: parseFloat(array[0]), y: parseFloat(array[1]), w: parseFloat(array[2]), h: parseFloat(array[3]) }; } else { return null; } }; const parseCtm = function (ctm) { let array = ctm.split(' '); return array; }; const parseColor = function (color) { if (color) { if (color.indexOf('#') !== -1) { color = color.replace(/#/g, ''); color = color.replace(/ /g, ''); color = '#' + color.toString(); return color; } let array = color.split(' '); return `rgb(${array[0]}, ${array[1]}, ${array[2]})`; } else { return `rgb(0, 0, 0)`; } }; const converterBox = function (box) { return { x: converterDpi(box.x), y: converterDpi(box.y), w: converterDpi(box.w), h: converterDpi(box.h) }; }; const Uint8ArrayToHexString = function (arr) { let words = []; let j = 0; for (let i = 0; i < arr.length * 2; i += 2) { words[i >>> 3] |= parseInt(arr[j], 10) << 24 - i % 8 * 4; j++; } // 转换到16进制 let hexChars = []; for (let i = 0; i < arr.length; i++) { let bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; hexChars.push((bite >>> 4).toString(16)); hexChars.push((bite & 0x0f).toString(16)); } return hexChars.join(''); }; /***/ }), /***/ "6b37": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__("f5df"); var $TypeError = TypeError; // Perform ? RequireInternalSlot(argument, [[TypedArrayName]]) // If argument.[[TypedArrayName]] is not "Uint8Array", throw a TypeError exception module.exports = function (argument) { if (classof(argument) === 'Uint8Array') return argument; throw new $TypeError('Argument is not an Uint8Array'); }; /***/ }), /***/ "6b84": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("3ca3"); __webpack_require__("a630"); var path = __webpack_require__("428f"); module.exports = path.Array.from; /***/ }), /***/ "6b9e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.search` well-known symbol // https://tc39.es/ecma262/#sec-symbol.search defineWellKnownSymbol('search'); /***/ }), /***/ "6c57": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); // `globalThis` object // https://tc39.es/ecma262/#sec-globalthis $({ global: true, forced: globalThis.globalThis !== globalThis }, { globalThis: globalThis }); /***/ }), /***/ "6ce5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var lengthOfArrayLike = __webpack_require__("07fa"); var ArrayBufferViewCore = __webpack_require__("ebb5"); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var getTypedArrayConstructor = ArrayBufferViewCore.getTypedArrayConstructor; // `%TypedArray%.prototype.toReversed` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.toreversed exportTypedArrayMethod('toReversed', function toReversed() { var O = aTypedArray(this); var len = lengthOfArrayLike(O); var A = new (getTypedArrayConstructor(O))(len); var k = 0; for (; k < len; k++) A[k] = O[len - k - 1]; return A; }); /***/ }), /***/ "6d3e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); // eslint-disable-next-line es/no-weak-map -- safe var WeakMapPrototype = WeakMap.prototype; module.exports = { // eslint-disable-next-line es/no-weak-map -- safe WeakMap: WeakMap, set: uncurryThis(WeakMapPrototype.set), get: uncurryThis(WeakMapPrototype.get), has: uncurryThis(WeakMapPrototype.has), remove: uncurryThis(WeakMapPrototype['delete']) }; /***/ }), /***/ "6d61": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var isForced = __webpack_require__("94ca"); var defineBuiltIn = __webpack_require__("cb2d"); var InternalMetadataModule = __webpack_require__("f183"); var iterate = __webpack_require__("2266"); var anInstance = __webpack_require__("19aa"); var isCallable = __webpack_require__("1626"); var isNullOrUndefined = __webpack_require__("7234"); var isObject = __webpack_require__("861d"); var fails = __webpack_require__("d039"); var checkCorrectnessOfIteration = __webpack_require__("1c7e"); var setToStringTag = __webpack_require__("d44e"); var inheritIfRequired = __webpack_require__("7156"); module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; var NativeConstructor = globalThis[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var Constructor = NativeConstructor; var exported = {}; var fixMethod = function (KEY) { var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]); defineBuiltIn(NativePrototype, KEY, KEY === 'add' ? function add(value) { uncurriedNativeMethod(this, value === 0 ? 0 : value); return this; } : KEY === 'delete' ? function (key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY === 'get' ? function get(key) { return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY === 'has' ? function has(key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : function set(key, value) { uncurriedNativeMethod(this, key === 0 ? 0 : key, value); return this; } ); }; var REPLACE = isForced( CONSTRUCTOR_NAME, !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); })) ); if (REPLACE) { // create collection constructor Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); InternalMetadataModule.enable(); } else if (isForced(CONSTRUCTOR_NAME, true)) { var instance = new Constructor(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly // eslint-disable-next-line no-new -- required for testing var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new NativeConstructor(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { Constructor = wrapper(function (dummy, iterable) { anInstance(dummy, NativePrototype); var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); return that; }); Constructor.prototype = NativePrototype; NativePrototype.constructor = Constructor; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; } exported[CONSTRUCTOR_NAME] = Constructor; $({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported); setToStringTag(Constructor, CONSTRUCTOR_NAME); if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); return Constructor; }; /***/ }), /***/ "6f19": /***/ (function(module, exports, __webpack_require__) { "use strict"; var createNonEnumerableProperty = __webpack_require__("9112"); var clearErrorStack = __webpack_require__("0d26"); var ERROR_STACK_INSTALLABLE = __webpack_require__("b980"); // non-standard V8 // eslint-disable-next-line es/no-nonstandard-error-properties -- safe var captureStackTrace = Error.captureStackTrace; module.exports = function (error, C, stack, dropEntries) { if (ERROR_STACK_INSTALLABLE) { if (captureStackTrace) captureStackTrace(error, C); else createNonEnumerableProperty(error, 'stack', clearErrorStack(stack, dropEntries)); } }; /***/ }), /***/ "6f48": /***/ (function(module, exports, __webpack_require__) { "use strict"; var collection = __webpack_require__("6d61"); var collectionStrong = __webpack_require__("6566"); // `Map` constructor // https://tc39.es/ecma262/#sec-map-objects collection('Map', function (init) { return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); /***/ }), /***/ "6f53": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var fails = __webpack_require__("d039"); var uncurryThis = __webpack_require__("e330"); var objectGetPrototypeOf = __webpack_require__("e163"); var objectKeys = __webpack_require__("df75"); var toIndexedObject = __webpack_require__("fc6a"); var $propertyIsEnumerable = __webpack_require__("d1e7").f; var propertyIsEnumerable = uncurryThis($propertyIsEnumerable); var push = uncurryThis([].push); // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys // of `null` prototype objects var IE_BUG = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-create -- safe var O = Object.create(null); O[2] = 2; return !propertyIsEnumerable(O, 2); }); // `Object.{ entries, values }` methods implementation var createMethod = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null; var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) { push(result, TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; module.exports = { // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries entries: createMethod(true), // `Object.values` method // https://tc39.es/ecma262/#sec-object.values values: createMethod(false) }; /***/ }), /***/ "6f9c": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// Hex JavaScript decoder // Copyright (c) 2008-2022 Lapo Luchini // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { "use strict"; var Hex = {}, decoder, // populated on first usage haveU8 = (typeof Uint8Array == 'function'); /** * Decodes an hexadecimal value. * @param {string|Array|Uint8Array} a - a string representing hexadecimal data, or an array representation of its charcodes */ Hex.decode = function(a) { var isString = (typeof a == 'string'); var i; if (decoder === undefined) { var hex = "0123456789ABCDEF", ignore = " \f\n\r\t\u00A0\u2028\u2029"; decoder = []; for (i = 0; i < 16; ++i) decoder[hex.charCodeAt(i)] = i; hex = hex.toLowerCase(); for (i = 10; i < 16; ++i) decoder[hex.charCodeAt(i)] = i; for (i = 0; i < ignore.length; ++i) decoder[ignore.charCodeAt(i)] = -1; } var out = haveU8 ? new Uint8Array(a.length >> 1) : [], bits = 0, char_count = 0, len = 0; for (i = 0; i < a.length; ++i) { var c = isString ? a.charCodeAt(i) : a[i]; c = decoder[c]; if (c == -1) continue; if (c === undefined) throw 'Illegal character at offset ' + i; bits |= c; if (++char_count >= 2) { out[len++] = bits; bits = 0; char_count = 0; } else { bits <<= 4; } } if (char_count) throw "Hex encoding incomplete: 4 bits missing"; if (haveU8 && out.length > len) // in case it was originally longer because of ignored characters out = out.subarray(0, len); return out; }; return Hex; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), /***/ "7149": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var getBuiltIn = __webpack_require__("d066"); var IS_PURE = __webpack_require__("c430"); var NativePromiseConstructor = __webpack_require__("d256"); var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__("4738").CONSTRUCTOR; var promiseResolve = __webpack_require__("cdf9"); var PromiseConstructorWrapper = getBuiltIn('Promise'); var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR; // `Promise.resolve` method // https://tc39.es/ecma262/#sec-promise.resolve $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, { resolve: function resolve(x) { return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x); } }); /***/ }), /***/ "7156": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var setPrototypeOf = __webpack_require__("d2bb"); // makes subclassing work correct for wrapped built-ins module.exports = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) setPrototypeOf($this, NewTargetPrototype); return $this; }; /***/ }), /***/ "7192": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var anObjectOrUndefined = __webpack_require__("f69d"); var aString = __webpack_require__("8a96"); var hasOwn = __webpack_require__("1a2d"); var base64Map = __webpack_require__("b917"); var getAlphabetOption = __webpack_require__("da63"); var notDetached = __webpack_require__("2005"); var base64Alphabet = base64Map.c2i; var base64UrlAlphabet = base64Map.c2iUrl; var SyntaxError = globalThis.SyntaxError; var TypeError = globalThis.TypeError; var at = uncurryThis(''.charAt); var skipAsciiWhitespace = function (string, index) { var length = string.length; for (;index < length; index++) { var chr = at(string, index); if (chr !== ' ' && chr !== '\t' && chr !== '\n' && chr !== '\f' && chr !== '\r') break; } return index; }; var decodeBase64Chunk = function (chunk, alphabet, throwOnExtraBits) { var chunkLength = chunk.length; if (chunkLength < 4) { chunk += chunkLength === 2 ? 'AA' : 'A'; } var triplet = (alphabet[at(chunk, 0)] << 18) + (alphabet[at(chunk, 1)] << 12) + (alphabet[at(chunk, 2)] << 6) + alphabet[at(chunk, 3)]; var chunkBytes = [ (triplet >> 16) & 255, (triplet >> 8) & 255, triplet & 255 ]; if (chunkLength === 2) { if (throwOnExtraBits && chunkBytes[1] !== 0) { throw new SyntaxError('Extra bits'); } return [chunkBytes[0]]; } if (chunkLength === 3) { if (throwOnExtraBits && chunkBytes[2] !== 0) { throw new SyntaxError('Extra bits'); } return [chunkBytes[0], chunkBytes[1]]; } return chunkBytes; }; var writeBytes = function (bytes, elements, written) { var elementsLength = elements.length; for (var index = 0; index < elementsLength; index++) { bytes[written + index] = elements[index]; } return written + elementsLength; }; /* eslint-disable max-statements, max-depth -- TODO */ module.exports = function (string, options, into, maxLength) { aString(string); anObjectOrUndefined(options); var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet; var lastChunkHandling = options ? options.lastChunkHandling : undefined; if (lastChunkHandling === undefined) lastChunkHandling = 'loose'; if (lastChunkHandling !== 'loose' && lastChunkHandling !== 'strict' && lastChunkHandling !== 'stop-before-partial') { throw new TypeError('Incorrect `lastChunkHandling` option'); } if (into) notDetached(into.buffer); var stringLength = string.length; var bytes = into || []; var written = 0; var read = 0; var chunk = ''; var index = 0; if (maxLength) while (true) { index = skipAsciiWhitespace(string, index); if (index === stringLength) { if (chunk.length > 0) { if (lastChunkHandling === 'stop-before-partial') { break; } if (lastChunkHandling === 'loose') { if (chunk.length === 1) { throw new SyntaxError('Malformed padding: exactly one additional character'); } written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written); } else { throw new SyntaxError('Missing padding'); } } read = stringLength; break; } var chr = at(string, index); ++index; if (chr === '=') { if (chunk.length < 2) { throw new SyntaxError('Padding is too early'); } index = skipAsciiWhitespace(string, index); if (chunk.length === 2) { if (index === stringLength) { if (lastChunkHandling === 'stop-before-partial') { break; } throw new SyntaxError('Malformed padding: only one ='); } if (at(string, index) === '=') { ++index; index = skipAsciiWhitespace(string, index); } } if (index < stringLength) { throw new SyntaxError('Unexpected character after padding'); } written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, lastChunkHandling === 'strict'), written); read = stringLength; break; } if (!hasOwn(alphabet, chr)) { throw new SyntaxError('Unexpected character'); } var remainingBytes = maxLength - written; if (remainingBytes === 1 && chunk.length === 2 || remainingBytes === 2 && chunk.length === 3) { // special case: we can fit exactly the number of bytes currently represented by chunk, so we were just checking for `=` break; } chunk += chr; if (chunk.length === 4) { written = writeBytes(bytes, decodeBase64Chunk(chunk, alphabet, false), written); chunk = ''; read = index; if (written === maxLength) { break; } } } return { bytes: bytes, read: read, written: written }; }; /***/ }), /***/ "7234": /***/ (function(module, exports, __webpack_require__) { "use strict"; // we can't use just `it == null` since of `document.all` special case // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec module.exports = function (it) { return it === null || it === undefined; }; /***/ }), /***/ "7276": /***/ (function(module, exports, __webpack_require__) { "use strict"; var collection = __webpack_require__("6d61"); var collectionWeak = __webpack_require__("acac"); // `WeakSet` constructor // https://tc39.es/ecma262/#sec-weakset-constructor collection('WeakSet', function (init) { return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionWeak); /***/ }), /***/ "7282": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var aCallable = __webpack_require__("59ed"); module.exports = function (object, key, method) { try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method])); } catch (error) { /* empty */ } }; /***/ }), /***/ "72c3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var union = __webpack_require__("e9bc"); var setMethodGetKeysBeforeCloning = __webpack_require__("5320"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var FORCED = !setMethodAcceptSetLike('union') || !setMethodGetKeysBeforeCloning('union'); // `Set.prototype.union` method // https://tc39.es/ecma262/#sec-set.prototype.union $({ target: 'Set', proto: true, real: true, forced: FORCED }, { union: union }); /***/ }), /***/ "72fa": /***/ (function(module, exports) { /** * 字节数组转 16 进制串 */ function ArrayToHex(arr) { return arr.map(item => { item = item.toString(16) return item.length === 1 ? '0' + item : item }).join('') } /** * utf8 串转字节数组 */ function utf8ToArray(str) { const arr = [] for (let i = 0, len = str.length; i < len; i++) { const point = str.codePointAt(i) if (point <= 0x007f) { // 单字节,标量值:00000000 00000000 0zzzzzzz arr.push(point) } else if (point <= 0x07ff) { // 双字节,标量值:00000000 00000yyy yyzzzzzz arr.push(0xc0 | (point >>> 6)) // 110yyyyy(0xc0-0xdf) arr.push(0x80 | (point & 0x3f)) // 10zzzzzz(0x80-0xbf) } else if (point <= 0xD7FF || (point >= 0xE000 && point <= 0xFFFF)) { // 三字节:标量值:00000000 xxxxyyyy yyzzzzzz arr.push(0xe0 | (point >>> 12)) // 1110xxxx(0xe0-0xef) arr.push(0x80 | ((point >>> 6) & 0x3f)) // 10yyyyyy(0x80-0xbf) arr.push(0x80 | (point & 0x3f)) // 10zzzzzz(0x80-0xbf) } else if (point >= 0x010000 && point <= 0x10FFFF) { // 四字节:标量值:000wwwxx xxxxyyyy yyzzzzzz i++ arr.push((0xf0 | (point >>> 18) & 0x1c)) // 11110www(0xf0-0xf7) arr.push((0x80 | ((point >>> 12) & 0x3f))) // 10xxxxxx(0x80-0xbf) arr.push((0x80 | ((point >>> 6) & 0x3f))) // 10yyyyyy(0x80-0xbf) arr.push((0x80 | (point & 0x3f))) // 10zzzzzz(0x80-0xbf) } else { // 五、六字节,暂时不支持 arr.push(point) throw new Error('input is not supported') } } return arr } /** * 循环左移 */ function rotl(x, n) { const result = [] const a = ~~(n / 8) // 偏移 a 字节 const b = n % 8 // 偏移 b 位 for (let i = 0, len = x.length; i < len; i++) { // current << b + (current + 1) >>> (8 - b) result[i] = ((x[(i + a) % len] << b) & 0xff) + ((x[(i + a + 1) % len] >>> (8 - b)) & 0xff) } return result } /** * 二进制异或运算 */ function xor(x, y) { const result = [] for (let i = x.length - 1; i >= 0; i--) result[i] = (x[i] ^ y[i]) & 0xff return result } /** * 二进制与运算 */ function and(x, y) { const result = [] for (let i = x.length - 1; i >= 0; i--) result[i] = (x[i] & y[i]) & 0xff return result } /** * 二进制或运算 */ function or(x, y) { const result = [] for (let i = x.length - 1; i >= 0; i--) result[i] = (x[i] | y[i]) & 0xff return result } /** * 二进制与运算 */ function add(x, y) { const result = [] let temp = 0 for (let i = x.length - 1; i >= 0; i--) { const sum = x[i] + y[i] + temp if (sum > 0xff) { temp = 1 result[i] = sum & 0xff } else { temp = 0 result[i] = sum & 0xff } } return result } /** * 二进制非运算 */ function not(x) { const result = [] for (let i = x.length - 1; i >= 0; i--) result[i] = (~x[i]) & 0xff return result } /** * 压缩函数中的置换函数 P1(X) = X xor (X <<< 9) xor (X <<< 17) */ function P0(X) { return xor(xor(X, rotl(X, 9)), rotl(X, 17)) } /** * 消息扩展中的置换函数 P1(X) = X xor (X <<< 15) xor (X <<< 23) */ function P1(X) { return xor(xor(X, rotl(X, 15)), rotl(X, 23)) } /** * 布尔函数 FF */ function FF(X, Y, Z, j) { return j >= 0 && j <= 15 ? xor(xor(X, Y), Z) : or(or(and(X, Y), and(X, Z)), and(Y, Z)) } /** * 布尔函数 GG */ function GG(X, Y, Z, j) { return j >= 0 && j <= 15 ? xor(xor(X, Y), Z) : or(and(X, Y), and(not(X), Z)) } /** * 压缩函数 */ function CF(V, Bi) { // 消息扩展 const W = [] const M = [] // W' // 将消息分组B划分为 16 个字 W0, W1,……,W15 for (let i = 0; i < 16; i++) { const start = i * 4 W.push(Bi.slice(start, start + 4)) } // W16 ~ W67:W[j] <- P1(W[j−16] xor W[j−9] xor (W[j−3] <<< 15)) xor (W[j−13] <<< 7) xor W[j−6] for (let j = 16; j < 68; j++) { W.push(xor( xor( P1( xor( xor(W[j - 16], W[j - 9]), rotl(W[j - 3], 15) ) ), rotl(W[j - 13], 7) ), W[j - 6] )) } // W′0 ~ W′63:W′[j] = W[j] xor W[j+4] for (let j = 0; j < 64; j++) { M.push(xor(W[j], W[j + 4])) } // 压缩 const T1 = [0x79, 0xcc, 0x45, 0x19] const T2 = [0x7a, 0x87, 0x9d, 0x8a] // 字寄存器 let A = V.slice(0, 4) let B = V.slice(4, 8) let C = V.slice(8, 12) let D = V.slice(12, 16) let E = V.slice(16, 20) let F = V.slice(20, 24) let G = V.slice(24, 28) let H = V.slice(28, 32) // 中间变量 let SS1 let SS2 let TT1 let TT2 for (let j = 0; j < 64; j++) { const T = j >= 0 && j <= 15 ? T1 : T2 SS1 = rotl(add( add(rotl(A, 12), E), rotl(T, j) ), 7) SS2 = xor(SS1, rotl(A, 12)) TT1 = add(add(add(FF(A, B, C, j), D), SS2), M[j]) TT2 = add(add(add(GG(E, F, G, j), H), SS1), W[j]) D = C C = rotl(B, 9) B = A A = TT1 H = G G = rotl(F, 19) F = E E = P0(TT2) } return xor([].concat(A, B, C, D, E, F, G, H), V) } module.exports = function (input) { const array = typeof input === 'string' ? utf8ToArray(input) : Array.prototype.slice.call(input) // 填充 let len = array.length * 8 // k 是满足 len + 1 + k = 448mod512 的最小的非负整数 let k = len % 512 // 如果 448 <= (512 % len) < 512,需要多补充 (len % 448) 比特'0'以满足总比特长度为512的倍数 k = k >= 448 ? 512 - (k % 448) - 1 : 448 - k - 1 // 填充 const kArr = new Array((k - 7) / 8) for (let i = 0, len = kArr.length; i < len; i++) kArr[i] = 0 const lenArr = [] len = len.toString(2) for (let i = 7; i >= 0; i--) { if (len.length > 8) { const start = len.length - 8 lenArr[i] = parseInt(len.substr(start), 2) len = len.substr(0, start) } else if (len.length > 0) { lenArr[i] = parseInt(len, 2) len = '' } else { lenArr[i] = 0 } } const m = [].concat(array, [0x80], kArr, lenArr) // 迭代压缩 const n = m.length / 64 let V = [0x73, 0x80, 0x16, 0x6f, 0x49, 0x14, 0xb2, 0xb9, 0x17, 0x24, 0x42, 0xd7, 0xda, 0x8a, 0x06, 0x00, 0xa9, 0x6f, 0x30, 0xbc, 0x16, 0x31, 0x38, 0xaa, 0xe3, 0x8d, 0xee, 0x4d, 0xb0, 0xfb, 0x0e, 0x4e] for (let i = 0; i < n; i++) { const start = 64 * i const B = m.slice(start, start + 64) V = CF(V, B) } return ArrayToHex(V) } /***/ }), /***/ "73fd": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ jbig2_Jbig2Image; }); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.at.js var es_array_at = __webpack_require__("33d1"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js var es_array_push = __webpack_require__("14d9"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.detached.js var es_array_buffer_detached = __webpack_require__("2c66"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer.js var es_array_buffer_transfer = __webpack_require__("249d"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array-buffer.transfer-to-fixed-length.js var es_array_buffer_transfer_to_fixed_length = __webpack_require__("40e9"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.at-alternative.js var es_string_at_alternative = __webpack_require__("ea98"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.at.js var es_typed_array_at = __webpack_require__("907a"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-last.js var es_typed_array_find_last = __webpack_require__("986a"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-last-index.js var es_typed_array_find_last_index = __webpack_require__("1d02"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js var es_typed_array_set = __webpack_require__("3c5d"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-reversed.js var es_typed_array_to_reversed = __webpack_require__("6ce5"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-sorted.js var es_typed_array_to_sorted = __webpack_require__("2834"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.with.js var es_typed_array_with = __webpack_require__("4ea1"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.set-from-base64.js var es_uint8_array_set_from_base64 = __webpack_require__("8407"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.set-from-hex.js var es_uint8_array_set_from_hex = __webpack_require__("34af"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.to-base64.js var es_uint8_array_to_base64 = __webpack_require__("418f"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.uint8-array.to-hex.js var es_uint8_array_to_hex = __webpack_require__("b848"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js var es_error_cause = __webpack_require__("d9e2"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js var es_iterator_constructor = __webpack_require__("e9f5"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js var es_iterator_every = __webpack_require__("d866"); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.delete.js var web_url_search_params_delete = __webpack_require__("88a7"); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.has.js var web_url_search_params_has = __webpack_require__("271a"); // EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.size.js var web_url_search_params_size = __webpack_require__("5494"); // EXTERNAL MODULE: ./src/utils/jbig2/compatibility.js var compatibility = __webpack_require__("7f3b"); // CONCATENATED MODULE: ./src/utils/jbig2/util.js /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* eslint no-var: error */ const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; // Permission flags from Table 22, Section 7.6.3.2 of the PDF specification. const PermissionFlag = { PRINT: 0x04, MODIFY_CONTENTS: 0x08, COPY: 0x10, MODIFY_ANNOTATIONS: 0x20, FILL_INTERACTIVE_FORMS: 0x100, COPY_FOR_ACCESSIBILITY: 0x200, ASSEMBLE: 0x400, PRINT_HIGH_QUALITY: 0x800 }; const TextRenderingMode = { FILL: 0, STROKE: 1, FILL_STROKE: 2, INVISIBLE: 3, FILL_ADD_TO_PATH: 4, STROKE_ADD_TO_PATH: 5, FILL_STROKE_ADD_TO_PATH: 6, ADD_TO_PATH: 7, FILL_STROKE_MASK: 3, ADD_TO_PATH_FLAG: 4 }; const ImageKind = { GRAYSCALE_1BPP: 1, RGB_24BPP: 2, RGBA_32BPP: 3 }; const AnnotationType = { TEXT: 1, LINK: 2, FREETEXT: 3, LINE: 4, SQUARE: 5, CIRCLE: 6, POLYGON: 7, POLYLINE: 8, HIGHLIGHT: 9, UNDERLINE: 10, SQUIGGLY: 11, STRIKEOUT: 12, STAMP: 13, CARET: 14, INK: 15, POPUP: 16, FILEATTACHMENT: 17, SOUND: 18, MOVIE: 19, WIDGET: 20, SCREEN: 21, PRINTERMARK: 22, TRAPNET: 23, WATERMARK: 24, THREED: 25, REDACT: 26 }; const AnnotationStateModelType = { MARKED: "Marked", REVIEW: "Review" }; const AnnotationMarkedState = { MARKED: "Marked", UNMARKED: "Unmarked" }; const AnnotationReviewState = { ACCEPTED: "Accepted", REJECTED: "Rejected", CANCELLED: "Cancelled", COMPLETED: "Completed", NONE: "None" }; const AnnotationReplyType = { GROUP: "Group", REPLY: "R" }; const AnnotationFlag = { INVISIBLE: 0x01, HIDDEN: 0x02, PRINT: 0x04, NOZOOM: 0x08, NOROTATE: 0x10, NOVIEW: 0x20, READONLY: 0x40, LOCKED: 0x80, TOGGLENOVIEW: 0x100, LOCKEDCONTENTS: 0x200 }; const AnnotationFieldFlag = { READONLY: 0x0000001, REQUIRED: 0x0000002, NOEXPORT: 0x0000004, MULTILINE: 0x0001000, PASSWORD: 0x0002000, NOTOGGLETOOFF: 0x0004000, RADIO: 0x0008000, PUSHBUTTON: 0x0010000, COMBO: 0x0020000, EDIT: 0x0040000, SORT: 0x0080000, FILESELECT: 0x0100000, MULTISELECT: 0x0200000, DONOTSPELLCHECK: 0x0400000, DONOTSCROLL: 0x0800000, COMB: 0x1000000, RICHTEXT: 0x2000000, RADIOSINUNISON: 0x2000000, COMMITONSELCHANGE: 0x4000000 }; const AnnotationBorderStyleType = { SOLID: 1, DASHED: 2, BEVELED: 3, INSET: 4, UNDERLINE: 5 }; const StreamType = { UNKNOWN: "UNKNOWN", FLATE: "FLATE", LZW: "LZW", DCT: "DCT", JPX: "JPX", JBIG: "JBIG", A85: "A85", AHX: "AHX", CCF: "CCF", RLX: "RLX" // PDF short name is 'RL', but telemetry requires three chars. }; const FontType = { UNKNOWN: "UNKNOWN", TYPE1: "TYPE1", TYPE1C: "TYPE1C", CIDFONTTYPE0: "CIDFONTTYPE0", CIDFONTTYPE0C: "CIDFONTTYPE0C", TRUETYPE: "TRUETYPE", CIDFONTTYPE2: "CIDFONTTYPE2", TYPE3: "TYPE3", OPENTYPE: "OPENTYPE", TYPE0: "TYPE0", MMTYPE1: "MMTYPE1" }; const VerbosityLevel = { ERRORS: 0, WARNINGS: 1, INFOS: 5 }; const CMapCompressionType = { NONE: 0, BINARY: 1, STREAM: 2 }; // All the possible operations for an operator list. const OPS = { // Intentionally start from 1 so it is easy to spot bad operators that will be // 0's. dependency: 1, setLineWidth: 2, setLineCap: 3, setLineJoin: 4, setMiterLimit: 5, setDash: 6, setRenderingIntent: 7, setFlatness: 8, setGState: 9, save: 10, restore: 11, transform: 12, moveTo: 13, lineTo: 14, curveTo: 15, curveTo2: 16, curveTo3: 17, closePath: 18, rectangle: 19, stroke: 20, closeStroke: 21, fill: 22, eoFill: 23, fillStroke: 24, eoFillStroke: 25, closeFillStroke: 26, closeEOFillStroke: 27, endPath: 28, clip: 29, eoClip: 30, beginText: 31, endText: 32, setCharSpacing: 33, setWordSpacing: 34, setHScale: 35, setLeading: 36, setFont: 37, setTextRenderingMode: 38, setTextRise: 39, moveText: 40, setLeadingMoveText: 41, setTextMatrix: 42, nextLine: 43, showText: 44, showSpacedText: 45, nextLineShowText: 46, nextLineSetSpacingShowText: 47, setCharWidth: 48, setCharWidthAndBounds: 49, setStrokeColorSpace: 50, setFillColorSpace: 51, setStrokeColor: 52, setStrokeColorN: 53, setFillColor: 54, setFillColorN: 55, setStrokeGray: 56, setFillGray: 57, setStrokeRGBColor: 58, setFillRGBColor: 59, setStrokeCMYKColor: 60, setFillCMYKColor: 61, shadingFill: 62, beginInlineImage: 63, beginImageData: 64, endInlineImage: 65, paintXObject: 66, markPoint: 67, markPointProps: 68, beginMarkedContent: 69, beginMarkedContentProps: 70, endMarkedContent: 71, beginCompat: 72, endCompat: 73, paintFormXObjectBegin: 74, paintFormXObjectEnd: 75, beginGroup: 76, endGroup: 77, beginAnnotations: 78, endAnnotations: 79, beginAnnotation: 80, endAnnotation: 81, paintJpegXObject: 82, paintImageMaskXObject: 83, paintImageMaskXObjectGroup: 84, paintImageXObject: 85, paintInlineImageXObject: 86, paintInlineImageXObjectGroup: 87, paintImageXObjectRepeat: 88, paintImageMaskXObjectRepeat: 89, paintSolidColorImageMask: 90, constructPath: 91 }; const UNSUPPORTED_FEATURES = { /** @deprecated unused */ unknown: "unknown", forms: "forms", javaScript: "javaScript", smask: "smask", shadingPattern: "shadingPattern", /** @deprecated unused */ font: "font", errorTilingPattern: "errorTilingPattern", errorExtGState: "errorExtGState", errorXObject: "errorXObject", errorFontLoadType3: "errorFontLoadType3", errorFontState: "errorFontState", errorFontMissing: "errorFontMissing", errorFontTranslate: "errorFontTranslate", errorColorSpace: "errorColorSpace", errorOperatorList: "errorOperatorList", errorFontToUnicode: "errorFontToUnicode", errorFontLoadNative: "errorFontLoadNative", errorFontGetPath: "errorFontGetPath", errorMarkedContent: "errorMarkedContent" }; const PasswordResponses = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 }; let verbosity = VerbosityLevel.WARNINGS; function setVerbosityLevel(level) { if (Number.isInteger(level)) { verbosity = level; } } function getVerbosityLevel() { return verbosity; } // A notice for devs. These are good for things that are helpful to devs, such // as warning that Workers were disabled, which is important to devs but not // end users. function info(msg) { if (verbosity >= VerbosityLevel.INFOS) { console.log(`Info: ${msg}`); } } // Non-fatal warnings. function warn(msg) { if (verbosity >= VerbosityLevel.WARNINGS) { console.log(`Warning: ${msg}`); } } function unreachable(msg) { throw new Error(msg); } function assert(cond, msg) { if (!cond) { unreachable(msg); } } // Checks if URLs have the same origin. For non-HTTP based URLs, returns false. function isSameOrigin(baseUrl, otherUrl) { let base; try { base = new URL(baseUrl); if (!base.origin || base.origin === "null") { return false; // non-HTTP url } } catch (e) { return false; } const other = new URL(otherUrl, base); return base.origin === other.origin; } // Checks if URLs use one of the allowed protocols, e.g. to avoid XSS. function _isValidProtocol(url) { if (!url) { return false; } switch (url.protocol) { case "http:": case "https:": case "ftp:": case "mailto:": case "tel:": return true; default: return false; } } /** * Attempts to create a valid absolute URL. * * @param {URL|string} url - An absolute, or relative, URL. * @param {URL|string} baseUrl - An absolute URL. * @returns Either a valid {URL}, or `null` otherwise. */ function createValidAbsoluteUrl(url, baseUrl) { if (!url) { return null; } try { const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); if (_isValidProtocol(absoluteUrl)) { return absoluteUrl; } } catch (ex) { /* `new URL()` will throw on incorrect data. */ } return null; } function shadow(obj, prop, value) { Object.defineProperty(obj, prop, { value, enumerable: true, configurable: true, writable: false }); return value; } /** * @type {any} */ const BaseException = function BaseExceptionClosure() { // eslint-disable-next-line no-shadow function BaseException(message) { if (this.constructor === BaseException) { unreachable("Cannot initialize BaseException."); } this.message = message; this.name = this.constructor.name; } BaseException.prototype = new Error(); BaseException.constructor = BaseException; return BaseException; }(); class PasswordException extends BaseException { constructor(msg, code) { super(msg); this.code = code; } } class UnknownErrorException extends BaseException { constructor(msg, details) { super(msg); this.details = details; } } class InvalidPDFException extends BaseException {} class MissingPDFException extends BaseException {} class UnexpectedResponseException extends BaseException { constructor(msg, status) { super(msg); this.status = status; } } /** * Error caused during parsing PDF data. */ class FormatError extends BaseException {} /** * Error used to indicate task cancellation. */ class AbortException extends BaseException {} const NullCharactersRegExp = /\x00/g; /** * @param {string} str */ function removeNullCharacters(str) { if (typeof str !== "string") { warn("The argument for removeNullCharacters must be a string."); return str; } return str.replace(NullCharactersRegExp, ""); } function bytesToString(bytes) { assert(bytes !== null && typeof bytes === "object" && bytes.length !== undefined, "Invalid argument for bytesToString"); const length = bytes.length; const MAX_ARGUMENT_COUNT = 8192; if (length < MAX_ARGUMENT_COUNT) { return String.fromCharCode.apply(null, bytes); } const strBuf = []; for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) { const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); const chunk = bytes.subarray(i, chunkEnd); strBuf.push(String.fromCharCode.apply(null, chunk)); } return strBuf.join(""); } function stringToBytes(str) { assert(typeof str === "string", "Invalid argument for stringToBytes"); const length = str.length; const bytes = new Uint8Array(length); for (let i = 0; i < length; ++i) { bytes[i] = str.charCodeAt(i) & 0xff; } return bytes; } /** * Gets length of the array (Array, Uint8Array, or string) in bytes. * @param {Array|Uint8Array|string} arr * @returns {number} */ function arrayByteLength(arr) { if (arr.length !== undefined) { return arr.length; } assert(arr.byteLength !== undefined, "arrayByteLength - invalid argument."); return arr.byteLength; } /** * Combines array items (arrays) into single Uint8Array object. * @param {Array|Uint8Array|string>} arr - the array of the arrays * (Array, Uint8Array, or string). * @returns {Uint8Array} */ function arraysToBytes(arr) { const length = arr.length; // Shortcut: if first and only item is Uint8Array, return it. if (length === 1 && arr[0] instanceof Uint8Array) { return arr[0]; } let resultLength = 0; for (let i = 0; i < length; i++) { resultLength += arrayByteLength(arr[i]); } let pos = 0; const data = new Uint8Array(resultLength); for (let i = 0; i < length; i++) { let item = arr[i]; if (!(item instanceof Uint8Array)) { if (typeof item === "string") { item = stringToBytes(item); } else { item = new Uint8Array(item); } } const itemLength = item.byteLength; data.set(item, pos); pos += itemLength; } return data; } function string32(value) { return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); } // Checks the endianness of the platform. function isLittleEndian() { const buffer8 = new Uint8Array(4); buffer8[0] = 1; const view32 = new Uint32Array(buffer8.buffer, 0, 1); return view32[0] === 1; } const IsLittleEndianCached = { get value() { return shadow(this, "value", isLittleEndian()); } }; // Checks if it's possible to eval JS expressions. function isEvalSupported() { try { new Function(""); // eslint-disable-line no-new, no-new-func return true; } catch (e) { return false; } } const IsEvalSupportedCached = { get value() { return shadow(this, "value", isEvalSupported()); } }; const rgbBuf = ["rgb(", 0, ",", 0, ",", 0, ")"]; class Util { // makeCssRgb() can be called thousands of times. Using ´rgbBuf` avoids // creating many intermediate strings. static makeCssRgb(r, g, b) { rgbBuf[1] = r; rgbBuf[3] = g; rgbBuf[5] = b; return rgbBuf.join(""); } // Concatenates two transformation matrices together and returns the result. static transform(m1, m2) { return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; } // For 2d affine transforms static applyTransform(p, m) { const xt = p[0] * m[0] + p[1] * m[2] + m[4]; const yt = p[0] * m[1] + p[1] * m[3] + m[5]; return [xt, yt]; } static applyInverseTransform(p, m) { const d = m[0] * m[3] - m[1] * m[2]; const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; return [xt, yt]; } // Applies the transform to the rectangle and finds the minimum axially // aligned bounding box. static getAxialAlignedBoundingBox(r, m) { const p1 = Util.applyTransform(r, m); const p2 = Util.applyTransform(r.slice(2, 4), m); const p3 = Util.applyTransform([r[0], r[3]], m); const p4 = Util.applyTransform([r[2], r[1]], m); return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; } static inverseTransform(m) { const d = m[0] * m[3] - m[1] * m[2]; return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; } // Apply a generic 3d matrix M on a 3-vector v: // | a b c | | X | // | d e f | x | Y | // | g h i | | Z | // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i], // with v as [X,Y,Z] static apply3dTransform(m, v) { return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]]; } // This calculation uses Singular Value Decomposition. // The SVD can be represented with formula A = USV. We are interested in the // matrix S here because it represents the scale values. static singularValueDecompose2dScale(m) { const transpose = [m[0], m[2], m[1], m[3]]; // Multiply matrix m with its transpose. const a = m[0] * transpose[0] + m[1] * transpose[2]; const b = m[0] * transpose[1] + m[1] * transpose[3]; const c = m[2] * transpose[0] + m[3] * transpose[2]; const d = m[2] * transpose[1] + m[3] * transpose[3]; // Solve the second degree polynomial to get roots. const first = (a + d) / 2; const second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; const sx = first + second || 1; const sy = first - second || 1; // Scale values are the square roots of the eigenvalues. return [Math.sqrt(sx), Math.sqrt(sy)]; } // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2) // For coordinate systems whose origin lies in the bottom-left, this // means normalization to (BL,TR) ordering. For systems with origin in the // top-left, this means (TL,BR) ordering. static normalizeRect(rect) { const r = rect.slice(0); // clone rect if (rect[0] > rect[2]) { r[0] = rect[2]; r[2] = rect[0]; } if (rect[1] > rect[3]) { r[1] = rect[3]; r[3] = rect[1]; } return r; } // Returns a rectangle [x1, y1, x2, y2] corresponding to the // intersection of rect1 and rect2. If no intersection, returns 'false' // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2] static intersect(rect1, rect2) { function compare(a, b) { return a - b; } // Order points along the axes const orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare); const orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare); const result = []; rect1 = Util.normalizeRect(rect1); rect2 = Util.normalizeRect(rect2); // X: first and second points belong to different rectangles? if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { // Intersection must be between second and third points result[0] = orderedX[1]; result[2] = orderedX[2]; } else { return null; } // Y: first and second points belong to different rectangles? if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { // Intersection must be between second and third points result[1] = orderedY[1]; result[3] = orderedY[2]; } else { return null; } return result; } } // prettier-ignore const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; function stringToPDFString(str) { const length = str.length, strBuf = []; if (str[0] === "\xFE" && str[1] === "\xFF") { // UTF16BE BOM for (let i = 2; i < length; i += 2) { strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); } } else if (str[0] === "\xFF" && str[1] === "\xFE") { // UTF16LE BOM for (let i = 2; i < length; i += 2) { strBuf.push(String.fromCharCode(str.charCodeAt(i + 1) << 8 | str.charCodeAt(i))); } } else { for (let i = 0; i < length; ++i) { const code = PDFStringTranslateTable[str.charCodeAt(i)]; strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); } } return strBuf.join(""); } function escapeString(str) { // replace "(", ")" and "\" by "\(", "\)" and "\\" // in order to write it in a PDF file. return str.replace(/([\(\)\\])/g, "\\$1"); } function stringToUTF8String(str) { return decodeURIComponent(escape(str)); } function utf8StringToString(str) { return unescape(encodeURIComponent(str)); } function isBool(v) { return typeof v === "boolean"; } function isNum(v) { return typeof v === "number"; } function isString(v) { return typeof v === "string"; } function isArrayBuffer(v) { return typeof v === "object" && v !== null && v.byteLength !== undefined; } function isArrayEqual(arr1, arr2) { if (arr1.length !== arr2.length) { return false; } return arr1.every(function (element, index) { return element === arr2[index]; }); } function getModificationDate(date = new Date(Date.now())) { const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, "0"), (date.getUTCDate() + 1).toString().padStart(2, "0"), date.getUTCHours().toString().padStart(2, "0"), date.getUTCMinutes().toString().padStart(2, "0"), date.getUTCSeconds().toString().padStart(2, "0")]; return buffer.join(""); } /** * Promise Capability object. * * @typedef {Object} PromiseCapability * @property {Promise} promise - A Promise object. * @property {boolean} settled - If the Promise has been fulfilled/rejected. * @property {function} resolve - Fulfills the Promise. * @property {function} reject - Rejects the Promise. */ /** * Creates a promise capability object. * @alias createPromiseCapability * * @returns {PromiseCapability} */ function createPromiseCapability() { const capability = Object.create(null); let isSettled = false; Object.defineProperty(capability, "settled", { get() { return isSettled; } }); capability.promise = new Promise(function (resolve, reject) { capability.resolve = function (data) { isSettled = true; resolve(data); }; capability.reject = function (reason) { isSettled = true; reject(reason); }; }); return capability; } const createObjectURL = function createObjectURLClosure() { // Blob/createObjectURL is not available, falling back to data schema. const digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; // eslint-disable-next-line no-shadow return function createObjectURL(data, contentType, forceDataSchema = false) { if (!forceDataSchema && URL.createObjectURL) { const blob = new Blob([data], { type: contentType }); return URL.createObjectURL(blob); } let buffer = `data:${contentType};base64,`; for (let i = 0, ii = data.length; i < ii; i += 3) { const b1 = data[i] & 0xff; const b2 = data[i + 1] & 0xff; const b3 = data[i + 2] & 0xff; const d1 = b1 >> 2, d2 = (b1 & 3) << 4 | b2 >> 4; const d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64; const d4 = i + 2 < ii ? b3 & 0x3f : 64; buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; } return buffer; }; }(); // CONCATENATED MODULE: ./src/utils/jbig2/core_utils.js /* Copyright 2019 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* eslint no-var: error */ function getLookupTableFactory(initializer) { let lookup; return function () { if (initializer) { lookup = Object.create(null); initializer(lookup); initializer = null; } return lookup; }; } class core_utils_MissingDataException extends BaseException { constructor(begin, end) { super(`Missing data [${begin}, ${end})`); this.begin = begin; this.end = end; } } class core_utils_XRefEntryException extends BaseException {} class core_utils_XRefParseException extends BaseException {} /** * Get the value of an inheritable property. * * If the PDF specification explicitly lists a property in a dictionary as * inheritable, then the value of the property may be present in the dictionary * itself or in one or more parents of the dictionary. * * If the key is not found in the tree, `undefined` is returned. Otherwise, * the value for the key is returned or, if `stopWhenFound` is `false`, a list * of values is returned. To avoid infinite loops, the traversal is stopped when * the loop limit is reached. * * @param {Dict} dict - Dictionary from where to start the traversal. * @param {string} key - The key of the property to find the value for. * @param {boolean} getArray - Whether or not the value should be fetched as an * array. The default value is `false`. * @param {boolean} stopWhenFound - Whether or not to stop the traversal when * the key is found. If set to `false`, we always walk up the entire parent * chain, for example to be able to find `\Resources` placed on multiple * levels of the tree. The default value is `true`. */ function getInheritableProperty({ dict, key, getArray = false, stopWhenFound = true }) { const LOOP_LIMIT = 100; let loopCount = 0; let values; while (dict) { const value = getArray ? dict.getArray(key) : dict.get(key); if (value !== undefined) { if (stopWhenFound) { return value; } if (!values) { values = []; } values.push(value); } if (++loopCount > LOOP_LIMIT) { warn(`getInheritableProperty: maximum loop count exceeded for "${key}"`); break; } dict = dict.get("Parent"); } return values; } // prettier-ignore const ROMAN_NUMBER_MAP = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"]; /** * Converts positive integers to (upper case) Roman numerals. * @param {number} number - The number that should be converted. * @param {boolean} lowerCase - Indicates if the result should be converted * to lower case letters. The default value is `false`. * @returns {string} The resulting Roman number. */ function toRomanNumerals(number, lowerCase = false) { assert(Number.isInteger(number) && number > 0, "The number should be a positive integer."); const romanBuf = []; let pos; // Thousands while (number >= 1000) { number -= 1000; romanBuf.push("M"); } // Hundreds pos = number / 100 | 0; number %= 100; romanBuf.push(ROMAN_NUMBER_MAP[pos]); // Tens pos = number / 10 | 0; number %= 10; romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); // Ones romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); const romanStr = romanBuf.join(""); return lowerCase ? romanStr.toLowerCase() : romanStr; } // Calculate the base 2 logarithm of the number `x`. This differs from the // native function in the sense that it returns the ceiling value and that it // returns 0 instead of `Infinity`/`NaN` for `x` values smaller than/equal to 0. function log2(x) { if (x <= 0) { return 0; } return Math.ceil(Math.log2(x)); } function readInt8(data, offset) { return data[offset] << 24 >> 24; } function readUint16(data, offset) { return data[offset] << 8 | data[offset + 1]; } function readUint32(data, offset) { return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; } // Checks if ch is one of the following characters: SPACE, TAB, CR or LF. function isWhiteSpace(ch) { return ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a; } // CONCATENATED MODULE: ./src/utils/jbig2/arithmetic_decoder.js /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* eslint no-var: error */ // Table C-2 const QeTable = [{ qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1 }, { qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0 }, { qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0 }, { qe: 0x0ac1, nmps: 4, nlps: 12, switchFlag: 0 }, { qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0 }, { qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0 }, { qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1 }, { qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0 }, { qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0 }, { qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0 }, { qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0 }, { qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0 }, { qe: 0x1c01, nmps: 13, nlps: 20, switchFlag: 0 }, { qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0 }, { qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1 }, { qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0 }, { qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0 }, { qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0 }, { qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0 }, { qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0 }, { qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0 }, { qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0 }, { qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0 }, { qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0 }, { qe: 0x1c01, nmps: 25, nlps: 22, switchFlag: 0 }, { qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0 }, { qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0 }, { qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0 }, { qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0 }, { qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0 }, { qe: 0x0ac1, nmps: 31, nlps: 28, switchFlag: 0 }, { qe: 0x09c1, nmps: 32, nlps: 29, switchFlag: 0 }, { qe: 0x08a1, nmps: 33, nlps: 30, switchFlag: 0 }, { qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0 }, { qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0 }, { qe: 0x02a1, nmps: 36, nlps: 33, switchFlag: 0 }, { qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0 }, { qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0 }, { qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0 }, { qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0 }, { qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0 }, { qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0 }, { qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0 }, { qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0 }, { qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0 }, { qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0 }, { qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0 }]; /** * This class implements the QM Coder decoding as defined in * JPEG 2000 Part I Final Committee Draft Version 1.0 * Annex C.3 Arithmetic decoding procedure * available at http://www.jpeg.org/public/fcd15444-1.pdf * * The arithmetic decoder is used in conjunction with context models to decode * JPEG2000 and JBIG2 streams. */ class ArithmeticDecoder { // C.3.5 Initialisation of the decoder (INITDEC) constructor(data, start, end) { this.data = data; this.bp = start; this.dataEnd = end; this.chigh = data[start]; this.clow = 0; this.byteIn(); this.chigh = this.chigh << 7 & 0xffff | this.clow >> 9 & 0x7f; this.clow = this.clow << 7 & 0xffff; this.ct -= 7; this.a = 0x8000; } // C.3.4 Compressed data input (BYTEIN) byteIn() { const data = this.data; let bp = this.bp; if (data[bp] === 0xff) { if (data[bp + 1] > 0x8f) { this.clow += 0xff00; this.ct = 8; } else { bp++; this.clow += data[bp] << 9; this.ct = 7; this.bp = bp; } } else { bp++; this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xff00; this.ct = 8; this.bp = bp; } if (this.clow > 0xffff) { this.chigh += this.clow >> 16; this.clow &= 0xffff; } } // C.3.2 Decoding a decision (DECODE) readBit(contexts, pos) { // Contexts are packed into 1 byte: // highest 7 bits carry cx.index, lowest bit carries cx.mps let cx_index = contexts[pos] >> 1, cx_mps = contexts[pos] & 1; const qeTableIcx = QeTable[cx_index]; const qeIcx = qeTableIcx.qe; let d; let a = this.a - qeIcx; if (this.chigh < qeIcx) { // exchangeLps if (a < qeIcx) { a = qeIcx; d = cx_mps; cx_index = qeTableIcx.nmps; } else { a = qeIcx; d = 1 ^ cx_mps; if (qeTableIcx.switchFlag === 1) { cx_mps = d; } cx_index = qeTableIcx.nlps; } } else { this.chigh -= qeIcx; if ((a & 0x8000) !== 0) { this.a = a; return cx_mps; } // exchangeMps if (a < qeIcx) { d = 1 ^ cx_mps; if (qeTableIcx.switchFlag === 1) { cx_mps = d; } cx_index = qeTableIcx.nlps; } else { d = cx_mps; cx_index = qeTableIcx.nmps; } } // C.3.3 renormD; do { if (this.ct === 0) { this.byteIn(); } a <<= 1; this.chigh = this.chigh << 1 & 0xffff | this.clow >> 15 & 1; this.clow = this.clow << 1 & 0xffff; this.ct--; } while ((a & 0x8000) === 0); this.a = a; contexts[pos] = cx_index << 1 | cx_mps; return d; } } // CONCATENATED MODULE: ./src/utils/jbig2/ccitt.js /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* Copyright 1996-2003 Glyph & Cog, LLC * * The CCITT stream implementation contained in this file is a JavaScript port * of XPDF's implementation, made available under the Apache 2.0 open source * license. */ /** * @typedef {Object} CCITTFaxDecoderSource * @property {function} next - Method that return one byte of data for decoding, * or -1 when EOF is reached. */ const ccitt_CCITTFaxDecoder = function CCITTFaxDecoder() { const ccittEOL = -2; const ccittEOF = -1; const twoDimPass = 0; const twoDimHoriz = 1; const twoDimVert0 = 2; const twoDimVertR1 = 3; const twoDimVertL1 = 4; const twoDimVertR2 = 5; const twoDimVertL2 = 6; const twoDimVertR3 = 7; const twoDimVertL3 = 8; // prettier-ignore const twoDimTable = [[-1, -1], [-1, -1], // 000000x [7, twoDimVertL3], // 0000010 [7, twoDimVertR3], // 0000011 [6, twoDimVertL2], [6, twoDimVertL2], // 000010x [6, twoDimVertR2], [6, twoDimVertR2], // 000011x [4, twoDimPass], [4, twoDimPass], // 0001xxx [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [3, twoDimHoriz], [3, twoDimHoriz], // 001xxxx [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimVertL1], [3, twoDimVertL1], // 010xxxx [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertR1], [3, twoDimVertR1], // 011xxxx [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [1, twoDimVert0], [1, twoDimVert0], // 1xxxxxx [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0]]; // prettier-ignore const whiteTable1 = [[-1, -1], // 00000 [12, ccittEOL], // 00001 [-1, -1], [-1, -1], // 0001x [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 001xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 010xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 011xx [11, 1792], [11, 1792], // 1000x [12, 1984], // 10010 [12, 2048], // 10011 [12, 2112], // 10100 [12, 2176], // 10101 [12, 2240], // 10110 [12, 2304], // 10111 [11, 1856], [11, 1856], // 1100x [11, 1920], [11, 1920], // 1101x [12, 2368], // 11100 [12, 2432], // 11101 [12, 2496], // 11110 [12, 2560] // 11111 ]; // prettier-ignore const whiteTable2 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx [8, 29], [8, 29], // 00000010x [8, 30], [8, 30], // 00000011x [8, 45], [8, 45], // 00000100x [8, 46], [8, 46], // 00000101x [7, 22], [7, 22], [7, 22], [7, 22], // 0000011xx [7, 23], [7, 23], [7, 23], [7, 23], // 0000100xx [8, 47], [8, 47], // 00001010x [8, 48], [8, 48], // 00001011x [6, 13], [6, 13], [6, 13], [6, 13], // 000011xxx [6, 13], [6, 13], [6, 13], [6, 13], [7, 20], [7, 20], [7, 20], [7, 20], // 0001000xx [8, 33], [8, 33], // 00010010x [8, 34], [8, 34], // 00010011x [8, 35], [8, 35], // 00010100x [8, 36], [8, 36], // 00010101x [8, 37], [8, 37], // 00010110x [8, 38], [8, 38], // 00010111x [7, 19], [7, 19], [7, 19], [7, 19], // 0001100xx [8, 31], [8, 31], // 00011010x [8, 32], [8, 32], // 00011011x [6, 1], [6, 1], [6, 1], [6, 1], // 000111xxx [6, 1], [6, 1], [6, 1], [6, 1], [6, 12], [6, 12], [6, 12], [6, 12], // 001000xxx [6, 12], [6, 12], [6, 12], [6, 12], [8, 53], [8, 53], // 00100100x [8, 54], [8, 54], // 00100101x [7, 26], [7, 26], [7, 26], [7, 26], // 0010011xx [8, 39], [8, 39], // 00101000x [8, 40], [8, 40], // 00101001x [8, 41], [8, 41], // 00101010x [8, 42], [8, 42], // 00101011x [8, 43], [8, 43], // 00101100x [8, 44], [8, 44], // 00101101x [7, 21], [7, 21], [7, 21], [7, 21], // 0010111xx [7, 28], [7, 28], [7, 28], [7, 28], // 0011000xx [8, 61], [8, 61], // 00110010x [8, 62], [8, 62], // 00110011x [8, 63], [8, 63], // 00110100x [8, 0], [8, 0], // 00110101x [8, 320], [8, 320], // 00110110x [8, 384], [8, 384], // 00110111x [5, 10], [5, 10], [5, 10], [5, 10], // 00111xxxx [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 11], [5, 11], [5, 11], [5, 11], // 01000xxxx [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [7, 27], [7, 27], [7, 27], [7, 27], // 0100100xx [8, 59], [8, 59], // 01001010x [8, 60], [8, 60], // 01001011x [9, 1472], // 010011000 [9, 1536], // 010011001 [9, 1600], // 010011010 [9, 1728], // 010011011 [7, 18], [7, 18], [7, 18], [7, 18], // 0100111xx [7, 24], [7, 24], [7, 24], [7, 24], // 0101000xx [8, 49], [8, 49], // 01010010x [8, 50], [8, 50], // 01010011x [8, 51], [8, 51], // 01010100x [8, 52], [8, 52], // 01010101x [7, 25], [7, 25], [7, 25], [7, 25], // 0101011xx [8, 55], [8, 55], // 01011000x [8, 56], [8, 56], // 01011001x [8, 57], [8, 57], // 01011010x [8, 58], [8, 58], // 01011011x [6, 192], [6, 192], [6, 192], [6, 192], // 010111xxx [6, 192], [6, 192], [6, 192], [6, 192], [6, 1664], [6, 1664], [6, 1664], [6, 1664], // 011000xxx [6, 1664], [6, 1664], [6, 1664], [6, 1664], [8, 448], [8, 448], // 01100100x [8, 512], [8, 512], // 01100101x [9, 704], // 011001100 [9, 768], // 011001101 [8, 640], [8, 640], // 01100111x [8, 576], [8, 576], // 01101000x [9, 832], // 011010010 [9, 896], // 011010011 [9, 960], // 011010100 [9, 1024], // 011010101 [9, 1088], // 011010110 [9, 1152], // 011010111 [9, 1216], // 011011000 [9, 1280], // 011011001 [9, 1344], // 011011010 [9, 1408], // 011011011 [7, 256], [7, 256], [7, 256], [7, 256], // 0110111xx [4, 2], [4, 2], [4, 2], [4, 2], // 0111xxxxx [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 3], [4, 3], [4, 3], [4, 3], // 1000xxxxx [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 128], [5, 128], [5, 128], [5, 128], // 10010xxxx [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 8], [5, 8], [5, 8], [5, 8], // 10011xxxx [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 9], [5, 9], [5, 9], [5, 9], // 10100xxxx [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [6, 16], [6, 16], [6, 16], [6, 16], // 101010xxx [6, 16], [6, 16], [6, 16], [6, 16], [6, 17], [6, 17], [6, 17], [6, 17], // 101011xxx [6, 17], [6, 17], [6, 17], [6, 17], [4, 4], [4, 4], [4, 4], [4, 4], // 1011xxxxx [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 5], [4, 5], [4, 5], [4, 5], // 1100xxxxx [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [6, 14], [6, 14], [6, 14], [6, 14], // 110100xxx [6, 14], [6, 14], [6, 14], [6, 14], [6, 15], [6, 15], [6, 15], [6, 15], // 110101xxx [6, 15], [6, 15], [6, 15], [6, 15], [5, 64], [5, 64], [5, 64], [5, 64], // 11011xxxx [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [4, 6], [4, 6], [4, 6], [4, 6], // 1110xxxxx [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 7], [4, 7], [4, 7], [4, 7], // 1111xxxxx [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7]]; // prettier-ignore const blackTable1 = [[-1, -1], [-1, -1], // 000000000000x [12, ccittEOL], [12, ccittEOL], // 000000000001x [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000001xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000010xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000011xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000100xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000101xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000110xx [-1, -1], [-1, -1], [-1, -1], [-1, -1], // 00000000111xx [11, 1792], [11, 1792], [11, 1792], [11, 1792], // 00000001000xx [12, 1984], [12, 1984], // 000000010010x [12, 2048], [12, 2048], // 000000010011x [12, 2112], [12, 2112], // 000000010100x [12, 2176], [12, 2176], // 000000010101x [12, 2240], [12, 2240], // 000000010110x [12, 2304], [12, 2304], // 000000010111x [11, 1856], [11, 1856], [11, 1856], [11, 1856], // 00000001100xx [11, 1920], [11, 1920], [11, 1920], [11, 1920], // 00000001101xx [12, 2368], [12, 2368], // 000000011100x [12, 2432], [12, 2432], // 000000011101x [12, 2496], [12, 2496], // 000000011110x [12, 2560], [12, 2560], // 000000011111x [10, 18], [10, 18], [10, 18], [10, 18], // 0000001000xxx [10, 18], [10, 18], [10, 18], [10, 18], [12, 52], [12, 52], // 000000100100x [13, 640], // 0000001001010 [13, 704], // 0000001001011 [13, 768], // 0000001001100 [13, 832], // 0000001001101 [12, 55], [12, 55], // 000000100111x [12, 56], [12, 56], // 000000101000x [13, 1280], // 0000001010010 [13, 1344], // 0000001010011 [13, 1408], // 0000001010100 [13, 1472], // 0000001010101 [12, 59], [12, 59], // 000000101011x [12, 60], [12, 60], // 000000101100x [13, 1536], // 0000001011010 [13, 1600], // 0000001011011 [11, 24], [11, 24], [11, 24], [11, 24], // 00000010111xx [11, 25], [11, 25], [11, 25], [11, 25], // 00000011000xx [13, 1664], // 0000001100100 [13, 1728], // 0000001100101 [12, 320], [12, 320], // 000000110011x [12, 384], [12, 384], // 000000110100x [12, 448], [12, 448], // 000000110101x [13, 512], // 0000001101100 [13, 576], // 0000001101101 [12, 53], [12, 53], // 000000110111x [12, 54], [12, 54], // 000000111000x [13, 896], // 0000001110010 [13, 960], // 0000001110011 [13, 1024], // 0000001110100 [13, 1088], // 0000001110101 [13, 1152], // 0000001110110 [13, 1216], // 0000001110111 [10, 64], [10, 64], [10, 64], [10, 64], // 0000001111xxx [10, 64], [10, 64], [10, 64], [10, 64]]; // prettier-ignore const blackTable2 = [[8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [11, 23], [11, 23], // 00000101000x [12, 50], // 000001010010 [12, 51], // 000001010011 [12, 44], // 000001010100 [12, 45], // 000001010101 [12, 46], // 000001010110 [12, 47], // 000001010111 [12, 57], // 000001011000 [12, 58], // 000001011001 [12, 61], // 000001011010 [12, 256], // 000001011011 [10, 16], [10, 16], [10, 16], [10, 16], // 0000010111xx [10, 17], [10, 17], [10, 17], [10, 17], // 0000011000xx [12, 48], // 000001100100 [12, 49], // 000001100101 [12, 62], // 000001100110 [12, 63], // 000001100111 [12, 30], // 000001101000 [12, 31], // 000001101001 [12, 32], // 000001101010 [12, 33], // 000001101011 [12, 40], // 000001101100 [12, 41], // 000001101101 [11, 22], [11, 22], // 00000110111x [8, 14], [8, 14], [8, 14], [8, 14], // 00000111xxxx [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [7, 10], [7, 10], [7, 10], [7, 10], // 0000100xxxxx [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 11], [7, 11], [7, 11], [7, 11], // 0000101xxxxx [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [9, 15], [9, 15], [9, 15], [9, 15], // 000011000xxx [9, 15], [9, 15], [9, 15], [9, 15], [12, 128], // 000011001000 [12, 192], // 000011001001 [12, 26], // 000011001010 [12, 27], // 000011001011 [12, 28], // 000011001100 [12, 29], // 000011001101 [11, 19], [11, 19], // 00001100111x [11, 20], [11, 20], // 00001101000x [12, 34], // 000011010010 [12, 35], // 000011010011 [12, 36], // 000011010100 [12, 37], // 000011010101 [12, 38], // 000011010110 [12, 39], // 000011010111 [11, 21], [11, 21], // 00001101100x [12, 42], // 000011011010 [12, 43], // 000011011011 [10, 0], [10, 0], [10, 0], [10, 0], // 0000110111xx [7, 12], [7, 12], [7, 12], [7, 12], // 0000111xxxxx [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12]]; // prettier-ignore const blackTable3 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx [6, 9], // 000100 [6, 8], // 000101 [5, 7], [5, 7], // 00011x [4, 6], [4, 6], [4, 6], [4, 6], // 0010xx [4, 5], [4, 5], [4, 5], [4, 5], // 0011xx [3, 1], [3, 1], [3, 1], [3, 1], // 010xxx [3, 1], [3, 1], [3, 1], [3, 1], [3, 4], [3, 4], [3, 4], [3, 4], // 011xxx [3, 4], [3, 4], [3, 4], [3, 4], [2, 3], [2, 3], [2, 3], [2, 3], // 10xxxx [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 2], [2, 2], [2, 2], [2, 2], // 11xxxx [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]]; /** * @param {CCITTFaxDecoderSource} source - The data which should be decoded. * @param {Object} [options] - Decoding options. */ // eslint-disable-next-line no-shadow function CCITTFaxDecoder(source, options = {}) { if (!source || typeof source.next !== "function") { throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); } this.source = source; this.eof = false; this.encoding = options.K || 0; this.eoline = options.EndOfLine || false; this.byteAlign = options.EncodedByteAlign || false; this.columns = options.Columns || 1728; this.rows = options.Rows || 0; let eoblock = options.EndOfBlock; if (eoblock === null || eoblock === undefined) { eoblock = true; } this.eoblock = eoblock; this.black = options.BlackIs1 || false; this.codingLine = new Uint32Array(this.columns + 1); this.refLine = new Uint32Array(this.columns + 2); this.codingLine[0] = this.columns; this.codingPos = 0; this.row = 0; this.nextLine2D = this.encoding < 0; this.inputBits = 0; this.inputBuf = 0; this.outputBits = 0; this.rowsDone = false; let code1; while ((code1 = this._lookBits(12)) === 0) { this._eatBits(1); } if (code1 === 1) { this._eatBits(12); } if (this.encoding > 0) { this.nextLine2D = !this._lookBits(1); this._eatBits(1); } } CCITTFaxDecoder.prototype = { readNextChar() { if (this.eof) { return -1; } const refLine = this.refLine; const codingLine = this.codingLine; const columns = this.columns; let refPos, blackPixels, bits, i; if (this.outputBits === 0) { if (this.rowsDone) { this.eof = true; } if (this.eof) { return -1; } this.err = false; let code1, code2, code3; if (this.nextLine2D) { for (i = 0; codingLine[i] < columns; ++i) { refLine[i] = codingLine[i]; } refLine[i++] = columns; refLine[i] = columns; codingLine[0] = 0; this.codingPos = 0; refPos = 0; blackPixels = 0; while (codingLine[this.codingPos] < columns) { code1 = this._getTwoDimCode(); switch (code1) { case twoDimPass: this._addPixels(refLine[refPos + 1], blackPixels); if (refLine[refPos + 1] < columns) { refPos += 2; } break; case twoDimHoriz: code1 = code2 = 0; if (blackPixels) { do { code1 += code3 = this._getBlackCode(); } while (code3 >= 64); do { code2 += code3 = this._getWhiteCode(); } while (code3 >= 64); } else { do { code1 += code3 = this._getWhiteCode(); } while (code3 >= 64); do { code2 += code3 = this._getBlackCode(); } while (code3 >= 64); } this._addPixels(codingLine[this.codingPos] + code1, blackPixels); if (codingLine[this.codingPos] < columns) { this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); } while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } break; case twoDimVertR3: this._addPixels(refLine[refPos] + 3, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { ++refPos; while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVertR2: this._addPixels(refLine[refPos] + 2, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { ++refPos; while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVertR1: this._addPixels(refLine[refPos] + 1, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { ++refPos; while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVert0: this._addPixels(refLine[refPos], blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { ++refPos; while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVertL3: this._addPixelsNeg(refLine[refPos] - 3, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { if (refPos > 0) { --refPos; } else { ++refPos; } while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVertL2: this._addPixelsNeg(refLine[refPos] - 2, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { if (refPos > 0) { --refPos; } else { ++refPos; } while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case twoDimVertL1: this._addPixelsNeg(refLine[refPos] - 1, blackPixels); blackPixels ^= 1; if (codingLine[this.codingPos] < columns) { if (refPos > 0) { --refPos; } else { ++refPos; } while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { refPos += 2; } } break; case ccittEOF: this._addPixels(columns, 0); this.eof = true; break; default: info("bad 2d code"); this._addPixels(columns, 0); this.err = true; } } } else { codingLine[0] = 0; this.codingPos = 0; blackPixels = 0; while (codingLine[this.codingPos] < columns) { code1 = 0; if (blackPixels) { do { code1 += code3 = this._getBlackCode(); } while (code3 >= 64); } else { do { code1 += code3 = this._getWhiteCode(); } while (code3 >= 64); } this._addPixels(codingLine[this.codingPos] + code1, blackPixels); blackPixels ^= 1; } } let gotEOL = false; if (this.byteAlign) { this.inputBits &= ~7; } if (!this.eoblock && this.row === this.rows - 1) { this.rowsDone = true; } else { code1 = this._lookBits(12); if (this.eoline) { while (code1 !== ccittEOF && code1 !== 1) { this._eatBits(1); code1 = this._lookBits(12); } } else { while (code1 === 0) { this._eatBits(1); code1 = this._lookBits(12); } } if (code1 === 1) { this._eatBits(12); gotEOL = true; } else if (code1 === ccittEOF) { this.eof = true; } } if (!this.eof && this.encoding > 0 && !this.rowsDone) { this.nextLine2D = !this._lookBits(1); this._eatBits(1); } if (this.eoblock && gotEOL && this.byteAlign) { code1 = this._lookBits(12); if (code1 === 1) { this._eatBits(12); if (this.encoding > 0) { this._lookBits(1); this._eatBits(1); } if (this.encoding >= 0) { for (i = 0; i < 4; ++i) { code1 = this._lookBits(12); if (code1 !== 1) { info("bad rtc code: " + code1); } this._eatBits(12); if (this.encoding > 0) { this._lookBits(1); this._eatBits(1); } } } this.eof = true; } } else if (this.err && this.eoline) { while (true) { code1 = this._lookBits(13); if (code1 === ccittEOF) { this.eof = true; return -1; } if (code1 >> 1 === 1) { break; } this._eatBits(1); } this._eatBits(12); if (this.encoding > 0) { this._eatBits(1); this.nextLine2D = !(code1 & 1); } } if (codingLine[0] > 0) { this.outputBits = codingLine[this.codingPos = 0]; } else { this.outputBits = codingLine[this.codingPos = 1]; } this.row++; } let c; if (this.outputBits >= 8) { c = this.codingPos & 1 ? 0 : 0xff; this.outputBits -= 8; if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { this.codingPos++; this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; } } else { bits = 8; c = 0; do { if (this.outputBits > bits) { c <<= bits; if (!(this.codingPos & 1)) { c |= 0xff >> 8 - bits; } this.outputBits -= bits; bits = 0; } else { c <<= this.outputBits; if (!(this.codingPos & 1)) { c |= 0xff >> 8 - this.outputBits; } bits -= this.outputBits; this.outputBits = 0; if (codingLine[this.codingPos] < columns) { this.codingPos++; this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; } else if (bits > 0) { c <<= bits; bits = 0; } } } while (bits); } if (this.black) { c ^= 0xff; } return c; }, /** * @private */ _addPixels(a1, blackPixels) { const codingLine = this.codingLine; let codingPos = this.codingPos; if (a1 > codingLine[codingPos]) { if (a1 > this.columns) { info("row is wrong length"); this.err = true; a1 = this.columns; } if (codingPos & 1 ^ blackPixels) { ++codingPos; } codingLine[codingPos] = a1; } this.codingPos = codingPos; }, /** * @private */ _addPixelsNeg(a1, blackPixels) { const codingLine = this.codingLine; let codingPos = this.codingPos; if (a1 > codingLine[codingPos]) { if (a1 > this.columns) { info("row is wrong length"); this.err = true; a1 = this.columns; } if (codingPos & 1 ^ blackPixels) { ++codingPos; } codingLine[codingPos] = a1; } else if (a1 < codingLine[codingPos]) { if (a1 < 0) { info("invalid code"); this.err = true; a1 = 0; } while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { --codingPos; } codingLine[codingPos] = a1; } this.codingPos = codingPos; }, /** * This function returns the code found from the table. * The start and end parameters set the boundaries for searching the table. * The limit parameter is optional. Function returns an array with three * values. The first array element indicates whether a valid code is being * returned. The second array element is the actual code. The third array * element indicates whether EOF was reached. * @private */ _findTableCode(start, end, table, limit) { const limitValue = limit || 0; for (let i = start; i <= end; ++i) { let code = this._lookBits(i); if (code === ccittEOF) { return [true, 1, false]; } if (i < end) { code <<= end - i; } if (!limitValue || code >= limitValue) { const p = table[code - limitValue]; if (p[0] === i) { this._eatBits(i); return [true, p[1], true]; } } } return [false, 0, false]; }, /** * @private */ _getTwoDimCode() { let code = 0; let p; if (this.eoblock) { code = this._lookBits(7); p = twoDimTable[code]; if (p && p[0] > 0) { this._eatBits(p[0]); return p[1]; } } else { const result = this._findTableCode(1, 7, twoDimTable); if (result[0] && result[2]) { return result[1]; } } info("Bad two dim code"); return ccittEOF; }, /** * @private */ _getWhiteCode() { let code = 0; let p; if (this.eoblock) { code = this._lookBits(12); if (code === ccittEOF) { return 1; } if (code >> 5 === 0) { p = whiteTable1[code]; } else { p = whiteTable2[code >> 3]; } if (p[0] > 0) { this._eatBits(p[0]); return p[1]; } } else { let result = this._findTableCode(1, 9, whiteTable2); if (result[0]) { return result[1]; } result = this._findTableCode(11, 12, whiteTable1); if (result[0]) { return result[1]; } } info("bad white code"); this._eatBits(1); return 1; }, /** * @private */ _getBlackCode() { let code, p; if (this.eoblock) { code = this._lookBits(13); if (code === ccittEOF) { return 1; } if (code >> 7 === 0) { p = blackTable1[code]; } else if (code >> 9 === 0 && code >> 7 !== 0) { p = blackTable2[(code >> 1) - 64]; } else { p = blackTable3[code >> 7]; } if (p[0] > 0) { this._eatBits(p[0]); return p[1]; } } else { let result = this._findTableCode(2, 6, blackTable3); if (result[0]) { return result[1]; } result = this._findTableCode(7, 12, blackTable2, 64); if (result[0]) { return result[1]; } result = this._findTableCode(10, 13, blackTable1); if (result[0]) { return result[1]; } } info("bad black code"); this._eatBits(1); return 1; }, /** * @private */ _lookBits(n) { let c; while (this.inputBits < n) { if ((c = this.source.next()) === -1) { if (this.inputBits === 0) { return ccittEOF; } return this.inputBuf << n - this.inputBits & 0xffff >> 16 - n; } this.inputBuf = this.inputBuf << 8 | c; this.inputBits += 8; } return this.inputBuf >> this.inputBits - n & 0xffff >> 16 - n; }, /** * @private */ _eatBits(n) { if ((this.inputBits -= n) < 0) { this.inputBits = 0; } } }; return CCITTFaxDecoder; }(); // CONCATENATED MODULE: ./src/utils/jbig2/jbig2.js /* Copyright 2012 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ class jbig2_Jbig2Error extends BaseException { constructor(msg) { super(`JBIG2 error: ${msg}`); } } var jbig2_Jbig2Image = function Jbig2ImageClosure() { // Utility data structures function ContextCache() {} ContextCache.prototype = { getContexts(id) { if (id in this) { return this[id]; } return this[id] = new Int8Array(1 << 16); } }; function DecodingContext(data, start, end) { this.data = data; this.start = start; this.end = end; } DecodingContext.prototype = { get decoder() { var decoder = new ArithmeticDecoder(this.data, this.start, this.end); return shadow(this, "decoder", decoder); }, get contextCache() { var cache = new ContextCache(); return shadow(this, "contextCache", cache); } }; // Annex A. Arithmetic Integer Decoding Procedure // A.2 Procedure for decoding values function decodeInteger(contextCache, procedure, decoder) { var contexts = contextCache.getContexts(procedure); var prev = 1; function readBits(length) { var v = 0; for (var i = 0; i < length; i++) { var bit = decoder.readBit(contexts, prev); prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; v = v << 1 | bit; } return v >>> 0; } var sign = readBits(1); // prettier-ignore /* eslint-disable no-nested-ternary */ var value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); /* eslint-enable no-nested-ternary */ if (sign === 0) { return value; } else if (value > 0) { return -value; } return null; } // A.3 The IAID decoding procedure function decodeIAID(contextCache, decoder, codeLength) { var contexts = contextCache.getContexts("IAID"); var prev = 1; for (var i = 0; i < codeLength; i++) { var bit = decoder.readBit(contexts, prev); prev = prev << 1 | bit; } if (codeLength < 31) { return prev & (1 << codeLength) - 1; } return prev & 0x7fffffff; } // 7.3 Segment types var SegmentTypes = ["SymbolDictionary", null, null, null, "IntermediateTextRegion", null, "ImmediateTextRegion", "ImmediateLosslessTextRegion", null, null, null, null, null, null, null, null, "PatternDictionary", null, null, null, "IntermediateHalftoneRegion", null, "ImmediateHalftoneRegion", "ImmediateLosslessHalftoneRegion", null, null, null, null, null, null, null, null, null, null, null, null, "IntermediateGenericRegion", null, "ImmediateGenericRegion", "ImmediateLosslessGenericRegion", "IntermediateGenericRefinementRegion", null, "ImmediateGenericRefinementRegion", "ImmediateLosslessGenericRefinementRegion", null, null, null, null, "PageInformation", "EndOfPage", "EndOfStripe", "EndOfFile", "Profiles", "Tables", null, null, null, null, null, null, null, null, "Extension"]; var CodingTemplates = [[{ x: -1, y: -2 }, { x: 0, y: -2 }, { x: 1, y: -2 }, { x: -2, y: -1 }, { x: -1, y: -1 }, { x: 0, y: -1 }, { x: 1, y: -1 }, { x: 2, y: -1 }, { x: -4, y: 0 }, { x: -3, y: 0 }, { x: -2, y: 0 }, { x: -1, y: 0 }], [{ x: -1, y: -2 }, { x: 0, y: -2 }, { x: 1, y: -2 }, { x: 2, y: -2 }, { x: -2, y: -1 }, { x: -1, y: -1 }, { x: 0, y: -1 }, { x: 1, y: -1 }, { x: 2, y: -1 }, { x: -3, y: 0 }, { x: -2, y: 0 }, { x: -1, y: 0 }], [{ x: -1, y: -2 }, { x: 0, y: -2 }, { x: 1, y: -2 }, { x: -2, y: -1 }, { x: -1, y: -1 }, { x: 0, y: -1 }, { x: 1, y: -1 }, { x: -2, y: 0 }, { x: -1, y: 0 }], [{ x: -3, y: -1 }, { x: -2, y: -1 }, { x: -1, y: -1 }, { x: 0, y: -1 }, { x: 1, y: -1 }, { x: -4, y: 0 }, { x: -3, y: 0 }, { x: -2, y: 0 }, { x: -1, y: 0 }]]; var RefinementTemplates = [{ coding: [{ x: 0, y: -1 }, { x: 1, y: -1 }, { x: -1, y: 0 }], reference: [{ x: 0, y: -1 }, { x: 1, y: -1 }, { x: -1, y: 0 }, { x: 0, y: 0 }, { x: 1, y: 0 }, { x: -1, y: 1 }, { x: 0, y: 1 }, { x: 1, y: 1 }] }, { coding: [{ x: -1, y: -1 }, { x: 0, y: -1 }, { x: 1, y: -1 }, { x: -1, y: 0 }], reference: [{ x: 0, y: -1 }, { x: -1, y: 0 }, { x: 0, y: 0 }, { x: 1, y: 0 }, { x: 0, y: 1 }, { x: 1, y: 1 }] }]; // See 6.2.5.7 Decoding the bitmap. var ReusedContexts = [0x9b25, // 10011 0110010 0101 0x0795, // 0011 110010 101 0x00e5, // 001 11001 01 0x0195 // 011001 0101 ]; var RefinementReusedContexts = [0x0020, // '000' + '0' (coding) + '00010000' + '0' (reference) 0x0008 // '0000' + '001000' ]; function decodeBitmapTemplate0(width, height, decodingContext) { var decoder = decodingContext.decoder; var contexts = decodingContext.contextCache.getContexts("GB"); var contextLabel, i, j, pixel, row, row1, row2, bitmap = []; // ...ooooo.... // ..ooooooo... Context template for current pixel (X) // .ooooX...... (concatenate values of 'o'-pixels to get contextLabel) var OLD_PIXEL_MASK = 0x7bf7; // 01111 0111111 0111 for (i = 0; i < height; i++) { row = bitmap[i] = new Uint8Array(width); row1 = i < 1 ? row : bitmap[i - 1]; row2 = i < 2 ? row : bitmap[i - 2]; // At the beginning of each row: // Fill contextLabel with pixels that are above/right of (X) contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; for (j = 0; j < width; j++) { row[j] = pixel = decoder.readBit(contexts, contextLabel); // At each pixel: Clear contextLabel pixels that are shifted // out of the context, then add new ones. contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; } } return bitmap; } // 6.2 Generic Region Decoding Procedure function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { if (mmr) { const input = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); return decodeMMRBitmap(input, width, height, false); } // Use optimized version for the most common case if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { return decodeBitmapTemplate0(width, height, decodingContext); } var useskip = !!skip; var template = CodingTemplates[templateIndex].concat(at); // Sorting is non-standard, and it is not required. But sorting increases // the number of template bits that can be reused from the previous // contextLabel in the main loop. template.sort(function (a, b) { return a.y - b.y || a.x - b.x; }); var templateLength = template.length; var templateX = new Int8Array(templateLength); var templateY = new Int8Array(templateLength); var changingTemplateEntries = []; var reuseMask = 0, minX = 0, maxX = 0, minY = 0; var c, k; for (k = 0; k < templateLength; k++) { templateX[k] = template[k].x; templateY[k] = template[k].y; minX = Math.min(minX, template[k].x); maxX = Math.max(maxX, template[k].x); minY = Math.min(minY, template[k].y); // Check if the template pixel appears in two consecutive context labels, // so it can be reused. Otherwise, we add it to the list of changing // template entries. if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { reuseMask |= 1 << templateLength - 1 - k; } else { changingTemplateEntries.push(k); } } var changingEntriesLength = changingTemplateEntries.length; var changingTemplateX = new Int8Array(changingEntriesLength); var changingTemplateY = new Int8Array(changingEntriesLength); var changingTemplateBit = new Uint16Array(changingEntriesLength); for (c = 0; c < changingEntriesLength; c++) { k = changingTemplateEntries[c]; changingTemplateX[c] = template[k].x; changingTemplateY[c] = template[k].y; changingTemplateBit[c] = 1 << templateLength - 1 - k; } // Get the safe bounding box edges from the width, height, minX, maxX, minY var sbb_left = -minX; var sbb_top = -minY; var sbb_right = width - maxX; var pseudoPixelContext = ReusedContexts[templateIndex]; var row = new Uint8Array(width); var bitmap = []; var decoder = decodingContext.decoder; var contexts = decodingContext.contextCache.getContexts("GB"); var ltp = 0, j, i0, j0, contextLabel = 0, bit, shift; for (var i = 0; i < height; i++) { if (prediction) { var sltp = decoder.readBit(contexts, pseudoPixelContext); ltp ^= sltp; if (ltp) { bitmap.push(row); // duplicate previous row continue; } } row = new Uint8Array(row); bitmap.push(row); for (j = 0; j < width; j++) { if (useskip && skip[i][j]) { row[j] = 0; continue; } // Are we in the middle of a scanline, so we can reuse contextLabel // bits? if (j >= sbb_left && j < sbb_right && i >= sbb_top) { // If yes, we can just shift the bits that are reusable and only // fetch the remaining ones. contextLabel = contextLabel << 1 & reuseMask; for (k = 0; k < changingEntriesLength; k++) { i0 = i + changingTemplateY[k]; j0 = j + changingTemplateX[k]; bit = bitmap[i0][j0]; if (bit) { bit = changingTemplateBit[k]; contextLabel |= bit; } } } else { // compute the contextLabel from scratch contextLabel = 0; shift = templateLength - 1; for (k = 0; k < templateLength; k++, shift--) { j0 = j + templateX[k]; if (j0 >= 0 && j0 < width) { i0 = i + templateY[k]; if (i0 >= 0) { bit = bitmap[i0][j0]; if (bit) { contextLabel |= bit << shift; } } } } } var pixel = decoder.readBit(contexts, contextLabel); row[j] = pixel; } } return bitmap; } // 6.3.2 Generic Refinement Region Decoding Procedure function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { var codingTemplate = RefinementTemplates[templateIndex].coding; if (templateIndex === 0) { codingTemplate = codingTemplate.concat([at[0]]); } var codingTemplateLength = codingTemplate.length; var codingTemplateX = new Int32Array(codingTemplateLength); var codingTemplateY = new Int32Array(codingTemplateLength); var k; for (k = 0; k < codingTemplateLength; k++) { codingTemplateX[k] = codingTemplate[k].x; codingTemplateY[k] = codingTemplate[k].y; } var referenceTemplate = RefinementTemplates[templateIndex].reference; if (templateIndex === 0) { referenceTemplate = referenceTemplate.concat([at[1]]); } var referenceTemplateLength = referenceTemplate.length; var referenceTemplateX = new Int32Array(referenceTemplateLength); var referenceTemplateY = new Int32Array(referenceTemplateLength); for (k = 0; k < referenceTemplateLength; k++) { referenceTemplateX[k] = referenceTemplate[k].x; referenceTemplateY[k] = referenceTemplate[k].y; } var referenceWidth = referenceBitmap[0].length; var referenceHeight = referenceBitmap.length; var pseudoPixelContext = RefinementReusedContexts[templateIndex]; var bitmap = []; var decoder = decodingContext.decoder; var contexts = decodingContext.contextCache.getContexts("GR"); var ltp = 0; for (var i = 0; i < height; i++) { if (prediction) { var sltp = decoder.readBit(contexts, pseudoPixelContext); ltp ^= sltp; if (ltp) { throw new jbig2_Jbig2Error("prediction is not supported"); } } var row = new Uint8Array(width); bitmap.push(row); for (var j = 0; j < width; j++) { var i0, j0; var contextLabel = 0; for (k = 0; k < codingTemplateLength; k++) { i0 = i + codingTemplateY[k]; j0 = j + codingTemplateX[k]; if (i0 < 0 || j0 < 0 || j0 >= width) { contextLabel <<= 1; // out of bound pixel } else { contextLabel = contextLabel << 1 | bitmap[i0][j0]; } } for (k = 0; k < referenceTemplateLength; k++) { i0 = i + referenceTemplateY[k] - offsetY; j0 = j + referenceTemplateX[k] - offsetX; if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { contextLabel <<= 1; // out of bound pixel } else { contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; } } var pixel = decoder.readBit(contexts, contextLabel); row[j] = pixel; } } return bitmap; } // 6.5.5 Decoding the symbol dictionary function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext, huffmanInput) { if (huffman && refinement) { throw new jbig2_Jbig2Error("symbol refinement with Huffman is not supported"); } var newSymbols = []; var currentHeight = 0; var symbolCodeLength = log2(symbols.length + numberOfNewSymbols); var decoder = decodingContext.decoder; var contextCache = decodingContext.contextCache; let tableB1, symbolWidths; if (huffman) { tableB1 = getStandardTable(1); // standard table B.1 symbolWidths = []; symbolCodeLength = Math.max(symbolCodeLength, 1); // 6.5.8.2.3 } while (newSymbols.length < numberOfNewSymbols) { var deltaHeight = huffman ? huffmanTables.tableDeltaHeight.decode(huffmanInput) : decodeInteger(contextCache, "IADH", decoder); // 6.5.6 currentHeight += deltaHeight; let currentWidth = 0, totalWidth = 0; const firstSymbol = huffman ? symbolWidths.length : 0; while (true) { var deltaWidth = huffman ? huffmanTables.tableDeltaWidth.decode(huffmanInput) : decodeInteger(contextCache, "IADW", decoder); // 6.5.7 if (deltaWidth === null) { break; // OOB } currentWidth += deltaWidth; totalWidth += currentWidth; var bitmap; if (refinement) { // 6.5.8.2 Refinement/aggregate-coded symbol bitmap var numberOfInstances = decodeInteger(contextCache, "IAAI", decoder); if (numberOfInstances > 1) { bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, // strip size symbols.concat(newSymbols), symbolCodeLength, 0, // transposed 0, // ds offset 1, // top left 7.4.3.1.1 0, // OR operator huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, 0, huffmanInput); } else { var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); var rdx = decodeInteger(contextCache, "IARDX", decoder); // 6.4.11.3 var rdy = decodeInteger(contextCache, "IARDY", decoder); // 6.4.11.4 var symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); } newSymbols.push(bitmap); } else if (huffman) { // Store only symbol width and decode a collective bitmap when the // height class is done. symbolWidths.push(currentWidth); } else { // 6.5.8.1 Direct-coded symbol bitmap bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); newSymbols.push(bitmap); } } if (huffman && !refinement) { // 6.5.9 Height class collective bitmap const bitmapSize = huffmanTables.tableBitmapSize.decode(huffmanInput); huffmanInput.byteAlign(); let collectiveBitmap; if (bitmapSize === 0) { // Uncompressed collective bitmap collectiveBitmap = readUncompressedBitmap(huffmanInput, totalWidth, currentHeight); } else { // MMR collective bitmap const originalEnd = huffmanInput.end; const bitmapEnd = huffmanInput.position + bitmapSize; huffmanInput.end = bitmapEnd; collectiveBitmap = decodeMMRBitmap(huffmanInput, totalWidth, currentHeight, false); huffmanInput.end = originalEnd; huffmanInput.position = bitmapEnd; } const numberOfSymbolsDecoded = symbolWidths.length; if (firstSymbol === numberOfSymbolsDecoded - 1) { // collectiveBitmap is a single symbol. newSymbols.push(collectiveBitmap); } else { // Divide collectiveBitmap into symbols. let i, y, xMin = 0, xMax, bitmapWidth, symbolBitmap; for (i = firstSymbol; i < numberOfSymbolsDecoded; i++) { bitmapWidth = symbolWidths[i]; xMax = xMin + bitmapWidth; symbolBitmap = []; for (y = 0; y < currentHeight; y++) { symbolBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); } newSymbols.push(symbolBitmap); xMin = xMax; } } } } // 6.5.10 Exported symbols var exportedSymbols = []; var flags = [], currentFlag = false; var totalSymbolsLength = symbols.length + numberOfNewSymbols; while (flags.length < totalSymbolsLength) { var runLength = huffman ? tableB1.decode(huffmanInput) : decodeInteger(contextCache, "IAEX", decoder); while (runLength--) { flags.push(currentFlag); } currentFlag = !currentFlag; } for (var i = 0, ii = symbols.length; i < ii; i++) { if (flags[i]) { exportedSymbols.push(symbols[i]); } } for (var j = 0; j < numberOfNewSymbols; i++, j++) { if (flags[i]) { exportedSymbols.push(newSymbols[j]); } } return exportedSymbols; } function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, logStripSize, huffmanInput) { if (huffman && refinement) { throw new jbig2_Jbig2Error("refinement with Huffman is not supported"); } // Prepare bitmap var bitmap = []; var i, row; for (i = 0; i < height; i++) { row = new Uint8Array(width); if (defaultPixelValue) { for (var j = 0; j < width; j++) { row[j] = defaultPixelValue; } } bitmap.push(row); } var decoder = decodingContext.decoder; var contextCache = decodingContext.contextCache; var stripT = huffman ? -huffmanTables.tableDeltaT.decode(huffmanInput) : -decodeInteger(contextCache, "IADT", decoder); // 6.4.6 var firstS = 0; i = 0; while (i < numberOfSymbolInstances) { var deltaT = huffman ? huffmanTables.tableDeltaT.decode(huffmanInput) : decodeInteger(contextCache, "IADT", decoder); // 6.4.6 stripT += deltaT; var deltaFirstS = huffman ? huffmanTables.tableFirstS.decode(huffmanInput) : decodeInteger(contextCache, "IAFS", decoder); // 6.4.7 firstS += deltaFirstS; var currentS = firstS; do { let currentT = 0; // 6.4.9 if (stripSize > 1) { currentT = huffman ? huffmanInput.readBits(logStripSize) : decodeInteger(contextCache, "IAIT", decoder); } var t = stripSize * stripT + currentT; var symbolId = huffman ? huffmanTables.symbolIDTable.decode(huffmanInput) : decodeIAID(contextCache, decoder, symbolCodeLength); var applyRefinement = refinement && (huffman ? huffmanInput.readBit() : decodeInteger(contextCache, "IARI", decoder)); var symbolBitmap = inputSymbols[symbolId]; var symbolWidth = symbolBitmap[0].length; var symbolHeight = symbolBitmap.length; if (applyRefinement) { var rdw = decodeInteger(contextCache, "IARDW", decoder); // 6.4.11.1 var rdh = decodeInteger(contextCache, "IARDH", decoder); // 6.4.11.2 var rdx = decodeInteger(contextCache, "IARDX", decoder); // 6.4.11.3 var rdy = decodeInteger(contextCache, "IARDY", decoder); // 6.4.11.4 symbolWidth += rdw; symbolHeight += rdh; symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); } var offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight - 1); var offsetS = currentS - (referenceCorner & 2 ? symbolWidth - 1 : 0); var s2, t2, symbolRow; if (transposed) { // Place Symbol Bitmap from T1,S1 for (s2 = 0; s2 < symbolHeight; s2++) { row = bitmap[offsetS + s2]; if (!row) { continue; } symbolRow = symbolBitmap[s2]; // To ignore Parts of Symbol bitmap which goes // outside bitmap region var maxWidth = Math.min(width - offsetT, symbolWidth); switch (combinationOperator) { case 0: // OR for (t2 = 0; t2 < maxWidth; t2++) { row[offsetT + t2] |= symbolRow[t2]; } break; case 2: // XOR for (t2 = 0; t2 < maxWidth; t2++) { row[offsetT + t2] ^= symbolRow[t2]; } break; default: throw new jbig2_Jbig2Error(`operator ${combinationOperator} is not supported`); } } currentS += symbolHeight - 1; } else { for (t2 = 0; t2 < symbolHeight; t2++) { row = bitmap[offsetT + t2]; if (!row) { continue; } symbolRow = symbolBitmap[t2]; switch (combinationOperator) { case 0: // OR for (s2 = 0; s2 < symbolWidth; s2++) { row[offsetS + s2] |= symbolRow[s2]; } break; case 2: // XOR for (s2 = 0; s2 < symbolWidth; s2++) { row[offsetS + s2] ^= symbolRow[s2]; } break; default: throw new jbig2_Jbig2Error(`operator ${combinationOperator} is not supported`); } } currentS += symbolWidth - 1; } i++; var deltaS = huffman ? huffmanTables.tableDeltaS.decode(huffmanInput) : decodeInteger(contextCache, "IADS", decoder); // 6.4.8 if (deltaS === null) { break; // OOB } currentS += deltaS + dsOffset; } while (true); } return bitmap; } function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPatternIndex, template, decodingContext) { const at = []; if (!mmr) { at.push({ x: -patternWidth, y: 0 }); if (template === 0) { at.push({ x: -3, y: -1 }); at.push({ x: 2, y: -2 }); at.push({ x: -2, y: -2 }); } } const collectiveWidth = (maxPatternIndex + 1) * patternWidth; const collectiveBitmap = decodeBitmap(mmr, collectiveWidth, patternHeight, template, false, null, at, decodingContext); // Divide collective bitmap into patterns. const patterns = []; for (let i = 0; i <= maxPatternIndex; i++) { const patternBitmap = []; const xMin = patternWidth * i; const xMax = xMin + patternWidth; for (let y = 0; y < patternHeight; y++) { patternBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); } patterns.push(patternBitmap); } return patterns; } function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regionHeight, defaultPixelValue, enableSkip, combinationOperator, gridWidth, gridHeight, gridOffsetX, gridOffsetY, gridVectorX, gridVectorY, decodingContext) { const skip = null; if (enableSkip) { throw new jbig2_Jbig2Error("skip is not supported"); } if (combinationOperator !== 0) { throw new jbig2_Jbig2Error("operator " + combinationOperator + " is not supported in halftone region"); } // Prepare bitmap. const regionBitmap = []; let i, j, row; for (i = 0; i < regionHeight; i++) { row = new Uint8Array(regionWidth); if (defaultPixelValue) { for (j = 0; j < regionWidth; j++) { row[j] = defaultPixelValue; } } regionBitmap.push(row); } const numberOfPatterns = patterns.length; const pattern0 = patterns[0]; const patternWidth = pattern0[0].length, patternHeight = pattern0.length; const bitsPerValue = log2(numberOfPatterns); const at = []; if (!mmr) { at.push({ x: template <= 1 ? 3 : 2, y: -1 }); if (template === 0) { at.push({ x: -3, y: -1 }); at.push({ x: 2, y: -2 }); at.push({ x: -2, y: -2 }); } } // Annex C. Gray-scale Image Decoding Procedure. const grayScaleBitPlanes = []; let mmrInput, bitmap; if (mmr) { // MMR bit planes are in one continuous stream. Only EOFB codes indicate // the end of each bitmap, so EOFBs must be decoded. mmrInput = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); } for (i = bitsPerValue - 1; i >= 0; i--) { if (mmr) { bitmap = decodeMMRBitmap(mmrInput, gridWidth, gridHeight, true); } else { bitmap = decodeBitmap(false, gridWidth, gridHeight, template, false, skip, at, decodingContext); } grayScaleBitPlanes[i] = bitmap; } // 6.6.5.2 Rendering the patterns. let mg, ng, bit, patternIndex, patternBitmap, x, y, patternRow, regionRow; for (mg = 0; mg < gridHeight; mg++) { for (ng = 0; ng < gridWidth; ng++) { bit = 0; patternIndex = 0; for (j = bitsPerValue - 1; j >= 0; j--) { bit = grayScaleBitPlanes[j][mg][ng] ^ bit; // Gray decoding patternIndex |= bit << j; } patternBitmap = patterns[patternIndex]; x = gridOffsetX + mg * gridVectorY + ng * gridVectorX >> 8; y = gridOffsetY + mg * gridVectorX - ng * gridVectorY >> 8; // Draw patternBitmap at (x, y). if (x >= 0 && x + patternWidth <= regionWidth && y >= 0 && y + patternHeight <= regionHeight) { for (i = 0; i < patternHeight; i++) { regionRow = regionBitmap[y + i]; patternRow = patternBitmap[i]; for (j = 0; j < patternWidth; j++) { regionRow[x + j] |= patternRow[j]; } } } else { let regionX, regionY; for (i = 0; i < patternHeight; i++) { regionY = y + i; if (regionY < 0 || regionY >= regionHeight) { continue; } regionRow = regionBitmap[regionY]; patternRow = patternBitmap[i]; for (j = 0; j < patternWidth; j++) { regionX = x + j; if (regionX >= 0 && regionX < regionWidth) { regionRow[regionX] |= patternRow[j]; } } } } } } return regionBitmap; } function readSegmentHeader(data, start) { var segmentHeader = {}; segmentHeader.number = readUint32(data, start); var flags = data[start + 4]; var segmentType = flags & 0x3f; if (!SegmentTypes[segmentType]) { throw new jbig2_Jbig2Error("invalid segment type: " + segmentType); } segmentHeader.type = segmentType; segmentHeader.typeName = SegmentTypes[segmentType]; segmentHeader.deferredNonRetain = !!(flags & 0x80); var pageAssociationFieldSize = !!(flags & 0x40); var referredFlags = data[start + 5]; var referredToCount = referredFlags >> 5 & 7; var retainBits = [referredFlags & 31]; var position = start + 6; if (referredFlags === 7) { referredToCount = readUint32(data, position - 1) & 0x1fffffff; position += 3; var bytes = referredToCount + 7 >> 3; retainBits[0] = data[position++]; while (--bytes > 0) { retainBits.push(data[position++]); } } else if (referredFlags === 5 || referredFlags === 6) { throw new jbig2_Jbig2Error("invalid referred-to flags"); } segmentHeader.retainBits = retainBits; let referredToSegmentNumberSize = 4; if (segmentHeader.number <= 256) { referredToSegmentNumberSize = 1; } else if (segmentHeader.number <= 65536) { referredToSegmentNumberSize = 2; } var referredTo = []; var i, ii; for (i = 0; i < referredToCount; i++) { let number; if (referredToSegmentNumberSize === 1) { number = data[position]; } else if (referredToSegmentNumberSize === 2) { number = readUint16(data, position); } else { number = readUint32(data, position); } referredTo.push(number); position += referredToSegmentNumberSize; } segmentHeader.referredTo = referredTo; if (!pageAssociationFieldSize) { segmentHeader.pageAssociation = data[position++]; } else { segmentHeader.pageAssociation = readUint32(data, position); position += 4; } segmentHeader.length = readUint32(data, position); position += 4; if (segmentHeader.length === 0xffffffff) { // 7.2.7 Segment data length, unknown segment length if (segmentType === 38) { // ImmediateGenericRegion var genericRegionInfo = readRegionSegmentInformation(data, position); var genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; var genericRegionMmr = !!(genericRegionSegmentFlags & 1); // searching for the segment end var searchPatternLength = 6; var searchPattern = new Uint8Array(searchPatternLength); if (!genericRegionMmr) { searchPattern[0] = 0xff; searchPattern[1] = 0xac; } searchPattern[2] = genericRegionInfo.height >>> 24 & 0xff; searchPattern[3] = genericRegionInfo.height >> 16 & 0xff; searchPattern[4] = genericRegionInfo.height >> 8 & 0xff; searchPattern[5] = genericRegionInfo.height & 0xff; for (i = position, ii = data.length; i < ii; i++) { var j = 0; while (j < searchPatternLength && searchPattern[j] === data[i + j]) { j++; } if (j === searchPatternLength) { segmentHeader.length = i + searchPatternLength; break; } } if (segmentHeader.length === 0xffffffff) { throw new jbig2_Jbig2Error("segment end was not found"); } } else { throw new jbig2_Jbig2Error("invalid unknown segment length"); } } segmentHeader.headerEnd = position; return segmentHeader; } function readSegments(header, data, start, end) { var segments = []; var position = start; while (position < end) { var segmentHeader = readSegmentHeader(data, position); position = segmentHeader.headerEnd; var segment = { header: segmentHeader, data }; if (!header.randomAccess) { segment.start = position; position += segmentHeader.length; segment.end = position; } segments.push(segment); if (segmentHeader.type === 51) { break; // end of file is found } } if (header.randomAccess) { for (var i = 0, ii = segments.length; i < ii; i++) { segments[i].start = position; position += segments[i].header.length; segments[i].end = position; } } return segments; } // 7.4.1 Region segment information field function readRegionSegmentInformation(data, start) { return { width: readUint32(data, start), height: readUint32(data, start + 4), x: readUint32(data, start + 8), y: readUint32(data, start + 12), combinationOperator: data[start + 16] & 7 }; } var RegionSegmentInformationFieldLength = 17; function processSegment(segment, visitor) { var header = segment.header; var data = segment.data, position = segment.start, end = segment.end; var args, at, i, atLength; switch (header.type) { case 0: // SymbolDictionary // 7.4.2 Symbol dictionary segment syntax var dictionary = {}; var dictionaryFlags = readUint16(data, position); // 7.4.2.1.1 dictionary.huffman = !!(dictionaryFlags & 1); dictionary.refinement = !!(dictionaryFlags & 2); dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); dictionary.template = dictionaryFlags >> 10 & 3; dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; position += 2; if (!dictionary.huffman) { atLength = dictionary.template === 0 ? 4 : 1; at = []; for (i = 0; i < atLength; i++) { at.push({ x: readInt8(data, position), y: readInt8(data, position + 1) }); position += 2; } dictionary.at = at; } if (dictionary.refinement && !dictionary.refinementTemplate) { at = []; for (i = 0; i < 2; i++) { at.push({ x: readInt8(data, position), y: readInt8(data, position + 1) }); position += 2; } dictionary.refinementAt = at; } dictionary.numberOfExportedSymbols = readUint32(data, position); position += 4; dictionary.numberOfNewSymbols = readUint32(data, position); position += 4; args = [dictionary, header.number, header.referredTo, data, position, end]; break; case 6: // ImmediateTextRegion case 7: // ImmediateLosslessTextRegion var textRegion = {}; textRegion.info = readRegionSegmentInformation(data, position); position += RegionSegmentInformationFieldLength; var textRegionSegmentFlags = readUint16(data, position); position += 2; textRegion.huffman = !!(textRegionSegmentFlags & 1); textRegion.refinement = !!(textRegionSegmentFlags & 2); textRegion.logStripSize = textRegionSegmentFlags >> 2 & 3; textRegion.stripSize = 1 << textRegion.logStripSize; textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; textRegion.transposed = !!(textRegionSegmentFlags & 64); textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; if (textRegion.huffman) { var textRegionHuffmanFlags = readUint16(data, position); position += 2; textRegion.huffmanFS = textRegionHuffmanFlags & 3; textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 0x4000); } if (textRegion.refinement && !textRegion.refinementTemplate) { at = []; for (i = 0; i < 2; i++) { at.push({ x: readInt8(data, position), y: readInt8(data, position + 1) }); position += 2; } textRegion.refinementAt = at; } textRegion.numberOfSymbolInstances = readUint32(data, position); position += 4; args = [textRegion, header.referredTo, data, position, end]; break; case 16: // PatternDictionary // 7.4.4. Pattern dictionary segment syntax const patternDictionary = {}; const patternDictionaryFlags = data[position++]; patternDictionary.mmr = !!(patternDictionaryFlags & 1); patternDictionary.template = patternDictionaryFlags >> 1 & 3; patternDictionary.patternWidth = data[position++]; patternDictionary.patternHeight = data[position++]; patternDictionary.maxPatternIndex = readUint32(data, position); position += 4; args = [patternDictionary, header.number, data, position, end]; break; case 22: // ImmediateHalftoneRegion case 23: // ImmediateLosslessHalftoneRegion // 7.4.5 Halftone region segment syntax const halftoneRegion = {}; halftoneRegion.info = readRegionSegmentInformation(data, position); position += RegionSegmentInformationFieldLength; const halftoneRegionFlags = data[position++]; halftoneRegion.mmr = !!(halftoneRegionFlags & 1); halftoneRegion.template = halftoneRegionFlags >> 1 & 3; halftoneRegion.enableSkip = !!(halftoneRegionFlags & 8); halftoneRegion.combinationOperator = halftoneRegionFlags >> 4 & 7; halftoneRegion.defaultPixelValue = halftoneRegionFlags >> 7 & 1; halftoneRegion.gridWidth = readUint32(data, position); position += 4; halftoneRegion.gridHeight = readUint32(data, position); position += 4; halftoneRegion.gridOffsetX = readUint32(data, position) & 0xffffffff; position += 4; halftoneRegion.gridOffsetY = readUint32(data, position) & 0xffffffff; position += 4; halftoneRegion.gridVectorX = readUint16(data, position); position += 2; halftoneRegion.gridVectorY = readUint16(data, position); position += 2; args = [halftoneRegion, header.referredTo, data, position, end]; break; case 38: // ImmediateGenericRegion case 39: // ImmediateLosslessGenericRegion var genericRegion = {}; genericRegion.info = readRegionSegmentInformation(data, position); position += RegionSegmentInformationFieldLength; var genericRegionSegmentFlags = data[position++]; genericRegion.mmr = !!(genericRegionSegmentFlags & 1); genericRegion.template = genericRegionSegmentFlags >> 1 & 3; genericRegion.prediction = !!(genericRegionSegmentFlags & 8); if (!genericRegion.mmr) { atLength = genericRegion.template === 0 ? 4 : 1; at = []; for (i = 0; i < atLength; i++) { at.push({ x: readInt8(data, position), y: readInt8(data, position + 1) }); position += 2; } genericRegion.at = at; } args = [genericRegion, data, position, end]; break; case 48: // PageInformation var pageInfo = { width: readUint32(data, position), height: readUint32(data, position + 4), resolutionX: readUint32(data, position + 8), resolutionY: readUint32(data, position + 12) }; if (pageInfo.height === 0xffffffff) { delete pageInfo.height; } var pageSegmentFlags = data[position + 16]; readUint16(data, position + 17); // pageStripingInformation pageInfo.lossless = !!(pageSegmentFlags & 1); pageInfo.refinement = !!(pageSegmentFlags & 2); pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); args = [pageInfo]; break; case 49: // EndOfPage break; case 50: // EndOfStripe break; case 51: // EndOfFile break; case 53: // Tables args = [header.number, data, position, end]; break; case 62: // 7.4.15 defines 2 extension types which // are comments and can be ignored. break; default: throw new jbig2_Jbig2Error(`segment type ${header.typeName}(${header.type})` + " is not implemented"); } var callbackName = "on" + header.typeName; if (callbackName in visitor) { visitor[callbackName].apply(visitor, args); } } function processSegments(segments, visitor) { for (var i = 0, ii = segments.length; i < ii; i++) { processSegment(segments[i], visitor); } } function parseJbig2Chunks(chunks) { var visitor = new SimpleSegmentVisitor(); for (var i = 0, ii = chunks.length; i < ii; i++) { var chunk = chunks[i]; var segments = readSegments({}, chunk.data, chunk.start, chunk.end); processSegments(segments, visitor); } return visitor.buffer; } function parseJbig2(data) { const end = data.length; let position = 0; if (data[position] !== 0x97 || data[position + 1] !== 0x4a || data[position + 2] !== 0x42 || data[position + 3] !== 0x32 || data[position + 4] !== 0x0d || data[position + 5] !== 0x0a || data[position + 6] !== 0x1a || data[position + 7] !== 0x0a) { throw new jbig2_Jbig2Error("parseJbig2 - invalid header."); } const header = Object.create(null); position += 8; const flags = data[position++]; header.randomAccess = !(flags & 1); if (!(flags & 2)) { header.numberOfPages = readUint32(data, position); position += 4; } const segments = readSegments(header, data, position, end); const visitor = new SimpleSegmentVisitor(); processSegments(segments, visitor); const { width, height } = visitor.currentPageInfo; const bitPacked = visitor.buffer; const imgData = new Uint8ClampedArray(width * height); let q = 0, k = 0; for (let i = 0; i < height; i++) { let mask = 0, buffer; for (let j = 0; j < width; j++) { if (!mask) { mask = 128; buffer = bitPacked[k++]; } imgData[q++] = buffer & mask ? 0 : 255; mask >>= 1; } } return { imgData, width, height }; } function SimpleSegmentVisitor() {} SimpleSegmentVisitor.prototype = { onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) { this.currentPageInfo = info; var rowSize = info.width + 7 >> 3; var buffer = new Uint8ClampedArray(rowSize * info.height); // The contents of ArrayBuffers are initialized to 0. // Fill the buffer with 0xFF only if info.defaultPixelValue is set if (info.defaultPixelValue) { for (var i = 0, ii = buffer.length; i < ii; i++) { buffer[i] = 0xff; } } this.buffer = buffer; }, drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) { var pageInfo = this.currentPageInfo; var width = regionInfo.width, height = regionInfo.height; var rowSize = pageInfo.width + 7 >> 3; var combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; var buffer = this.buffer; var mask0 = 128 >> (regionInfo.x & 7); var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); var i, j, mask, offset; switch (combinationOperator) { case 0: // OR for (i = 0; i < height; i++) { mask = mask0; offset = offset0; for (j = 0; j < width; j++) { if (bitmap[i][j]) { buffer[offset] |= mask; } mask >>= 1; if (!mask) { mask = 128; offset++; } } offset0 += rowSize; } break; case 2: // XOR for (i = 0; i < height; i++) { mask = mask0; offset = offset0; for (j = 0; j < width; j++) { if (bitmap[i][j]) { buffer[offset] ^= mask; } mask >>= 1; if (!mask) { mask = 128; offset++; } } offset0 += rowSize; } break; default: throw new jbig2_Jbig2Error(`operator ${combinationOperator} is not supported`); } }, onImmediateGenericRegion: function SimpleSegmentVisitor_onImmediateGenericRegion(region, data, start, end) { var regionInfo = region.info; var decodingContext = new DecodingContext(data, start, end); var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); this.drawBitmap(regionInfo, bitmap); }, onImmediateLosslessGenericRegion: function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() { this.onImmediateGenericRegion.apply(this, arguments); }, onSymbolDictionary: function SimpleSegmentVisitor_onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { let huffmanTables, huffmanInput; if (dictionary.huffman) { huffmanTables = getSymbolDictionaryHuffmanTables(dictionary, referredSegments, this.customTables); huffmanInput = new Reader(data, start, end); } // Combines exported symbols from all referred segments var symbols = this.symbols; if (!symbols) { this.symbols = symbols = {}; } var inputSymbols = []; for (var i = 0, ii = referredSegments.length; i < ii; i++) { const referredSymbols = symbols[referredSegments[i]]; // referredSymbols is undefined when we have a reference to a Tables // segment instead of a SymbolDictionary. if (referredSymbols) { inputSymbols = inputSymbols.concat(referredSymbols); } } var decodingContext = new DecodingContext(data, start, end); symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext, huffmanInput); }, onImmediateTextRegion: function SimpleSegmentVisitor_onImmediateTextRegion(region, referredSegments, data, start, end) { var regionInfo = region.info; let huffmanTables, huffmanInput; // Combines exported symbols from all referred segments var symbols = this.symbols; var inputSymbols = []; for (var i = 0, ii = referredSegments.length; i < ii; i++) { const referredSymbols = symbols[referredSegments[i]]; // referredSymbols is undefined when we have a reference to a Tables // segment instead of a SymbolDictionary. if (referredSymbols) { inputSymbols = inputSymbols.concat(referredSymbols); } } var symbolCodeLength = log2(inputSymbols.length); if (region.huffman) { huffmanInput = new Reader(data, start, end); huffmanTables = getTextRegionHuffmanTables(region, referredSegments, this.customTables, inputSymbols.length, huffmanInput); } var decodingContext = new DecodingContext(data, start, end); var bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext, region.logStripSize, huffmanInput); this.drawBitmap(regionInfo, bitmap); }, onImmediateLosslessTextRegion: function SimpleSegmentVisitor_onImmediateLosslessTextRegion() { this.onImmediateTextRegion.apply(this, arguments); }, onPatternDictionary(dictionary, currentSegment, data, start, end) { let patterns = this.patterns; if (!patterns) { this.patterns = patterns = {}; } const decodingContext = new DecodingContext(data, start, end); patterns[currentSegment] = decodePatternDictionary(dictionary.mmr, dictionary.patternWidth, dictionary.patternHeight, dictionary.maxPatternIndex, dictionary.template, decodingContext); }, onImmediateHalftoneRegion(region, referredSegments, data, start, end) { // HalftoneRegion refers to exactly one PatternDictionary. const patterns = this.patterns[referredSegments[0]]; const regionInfo = region.info; const decodingContext = new DecodingContext(data, start, end); const bitmap = decodeHalftoneRegion(region.mmr, patterns, region.template, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.enableSkip, region.combinationOperator, region.gridWidth, region.gridHeight, region.gridOffsetX, region.gridOffsetY, region.gridVectorX, region.gridVectorY, decodingContext); this.drawBitmap(regionInfo, bitmap); }, onImmediateLosslessHalftoneRegion() { this.onImmediateHalftoneRegion.apply(this, arguments); }, onTables(currentSegment, data, start, end) { let customTables = this.customTables; if (!customTables) { this.customTables = customTables = {}; } customTables[currentSegment] = decodeTablesSegment(data, start, end); } }; function HuffmanLine(lineData) { if (lineData.length === 2) { // OOB line. this.isOOB = true; this.rangeLow = 0; this.prefixLength = lineData[0]; this.rangeLength = 0; this.prefixCode = lineData[1]; this.isLowerRange = false; } else { // Normal, upper range or lower range line. // Upper range lines are processed like normal lines. this.isOOB = false; this.rangeLow = lineData[0]; this.prefixLength = lineData[1]; this.rangeLength = lineData[2]; this.prefixCode = lineData[3]; this.isLowerRange = lineData[4] === "lower"; } } function HuffmanTreeNode(line) { this.children = []; if (line) { // Leaf node this.isLeaf = true; this.rangeLength = line.rangeLength; this.rangeLow = line.rangeLow; this.isLowerRange = line.isLowerRange; this.isOOB = line.isOOB; } else { // Intermediate or root node this.isLeaf = false; } } HuffmanTreeNode.prototype = { buildTree(line, shift) { const bit = line.prefixCode >> shift & 1; if (shift <= 0) { // Create a leaf node. this.children[bit] = new HuffmanTreeNode(line); } else { // Create an intermediate node and continue recursively. let node = this.children[bit]; if (!node) { this.children[bit] = node = new HuffmanTreeNode(null); } node.buildTree(line, shift - 1); } }, decodeNode(reader) { if (this.isLeaf) { if (this.isOOB) { return null; } const htOffset = reader.readBits(this.rangeLength); return this.rangeLow + (this.isLowerRange ? -htOffset : htOffset); } const node = this.children[reader.readBit()]; if (!node) { throw new jbig2_Jbig2Error("invalid Huffman data"); } return node.decodeNode(reader); } }; function HuffmanTable(lines, prefixCodesDone) { if (!prefixCodesDone) { this.assignPrefixCodes(lines); } // Create Huffman tree. this.rootNode = new HuffmanTreeNode(null); for (let i = 0, ii = lines.length; i < ii; i++) { const line = lines[i]; if (line.prefixLength > 0) { this.rootNode.buildTree(line, line.prefixLength - 1); } } } HuffmanTable.prototype = { decode(reader) { return this.rootNode.decodeNode(reader); }, assignPrefixCodes(lines) { // Annex B.3 Assigning the prefix codes. const linesLength = lines.length; let prefixLengthMax = 0; for (let i = 0; i < linesLength; i++) { prefixLengthMax = Math.max(prefixLengthMax, lines[i].prefixLength); } const histogram = new Uint32Array(prefixLengthMax + 1); for (let i = 0; i < linesLength; i++) { histogram[lines[i].prefixLength]++; } let currentLength = 1, firstCode = 0, currentCode, currentTemp, line; histogram[0] = 0; while (currentLength <= prefixLengthMax) { firstCode = firstCode + histogram[currentLength - 1] << 1; currentCode = firstCode; currentTemp = 0; while (currentTemp < linesLength) { line = lines[currentTemp]; if (line.prefixLength === currentLength) { line.prefixCode = currentCode; currentCode++; } currentTemp++; } currentLength++; } } }; function decodeTablesSegment(data, start, end) { // Decodes a Tables segment, i.e., a custom Huffman table. // Annex B.2 Code table structure. const flags = data[start]; const lowestValue = readUint32(data, start + 1) & 0xffffffff; const highestValue = readUint32(data, start + 5) & 0xffffffff; const reader = new Reader(data, start + 9, end); const prefixSizeBits = (flags >> 1 & 7) + 1; const rangeSizeBits = (flags >> 4 & 7) + 1; const lines = []; let prefixLength, rangeLength, currentRangeLow = lowestValue; // Normal table lines do { prefixLength = reader.readBits(prefixSizeBits); rangeLength = reader.readBits(rangeSizeBits); lines.push(new HuffmanLine([currentRangeLow, prefixLength, rangeLength, 0])); currentRangeLow += 1 << rangeLength; } while (currentRangeLow < highestValue); // Lower range table line prefixLength = reader.readBits(prefixSizeBits); lines.push(new HuffmanLine([lowestValue - 1, prefixLength, 32, 0, "lower"])); // Upper range table line prefixLength = reader.readBits(prefixSizeBits); lines.push(new HuffmanLine([highestValue, prefixLength, 32, 0])); if (flags & 1) { // Out-of-band table line prefixLength = reader.readBits(prefixSizeBits); lines.push(new HuffmanLine([prefixLength, 0])); } return new HuffmanTable(lines, false); } const standardTablesCache = {}; function getStandardTable(number) { // Annex B.5 Standard Huffman tables. let table = standardTablesCache[number]; if (table) { return table; } let lines; switch (number) { case 1: lines = [[0, 1, 4, 0x0], [16, 2, 8, 0x2], [272, 3, 16, 0x6], [65808, 3, 32, 0x7] // upper ]; break; case 2: lines = [[0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [75, 6, 32, 0x3e], // upper [6, 0x3f] // OOB ]; break; case 3: lines = [[-256, 8, 8, 0xfe], [0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [-257, 8, 32, 0xff, "lower"], [75, 7, 32, 0x7e], // upper [6, 0x3e] // OOB ]; break; case 4: lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [76, 5, 32, 0x1f] // upper ]; break; case 5: lines = [[-255, 7, 8, 0x7e], [1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [-256, 7, 32, 0x7f, "lower"], [76, 6, 32, 0x3e] // upper ]; break; case 6: lines = [[-2048, 5, 10, 0x1c], [-1024, 4, 9, 0x8], [-512, 4, 8, 0x9], [-256, 4, 7, 0xa], [-128, 5, 6, 0x1d], [-64, 5, 5, 0x1e], [-32, 4, 5, 0xb], [0, 2, 7, 0x0], [128, 3, 7, 0x2], [256, 3, 8, 0x3], [512, 4, 9, 0xc], [1024, 4, 10, 0xd], [-2049, 6, 32, 0x3e, "lower"], [2048, 6, 32, 0x3f] // upper ]; break; case 7: lines = [[-1024, 4, 9, 0x8], [-512, 3, 8, 0x0], [-256, 4, 7, 0x9], [-128, 5, 6, 0x1a], [-64, 5, 5, 0x1b], [-32, 4, 5, 0xa], [0, 4, 5, 0xb], [32, 5, 5, 0x1c], [64, 5, 6, 0x1d], [128, 4, 7, 0xc], [256, 3, 8, 0x1], [512, 3, 9, 0x2], [1024, 3, 10, 0x3], [-1025, 5, 32, 0x1e, "lower"], [2048, 5, 32, 0x1f] // upper ]; break; case 8: lines = [[-15, 8, 3, 0xfc], [-7, 9, 1, 0x1fc], [-5, 8, 1, 0xfd], [-3, 9, 0, 0x1fd], [-2, 7, 0, 0x7c], [-1, 4, 0, 0xa], [0, 2, 1, 0x0], [2, 5, 0, 0x1a], [3, 6, 0, 0x3a], [4, 3, 4, 0x4], [20, 6, 1, 0x3b], [22, 4, 4, 0xb], [38, 4, 5, 0xc], [70, 5, 6, 0x1b], [134, 5, 7, 0x1c], [262, 6, 7, 0x3c], [390, 7, 8, 0x7d], [646, 6, 10, 0x3d], [-16, 9, 32, 0x1fe, "lower"], [1670, 9, 32, 0x1ff], // upper [2, 0x1] // OOB ]; break; case 9: lines = [[-31, 8, 4, 0xfc], [-15, 9, 2, 0x1fc], [-11, 8, 2, 0xfd], [-7, 9, 1, 0x1fd], [-5, 7, 1, 0x7c], [-3, 4, 1, 0xa], [-1, 3, 1, 0x2], [1, 3, 1, 0x3], [3, 5, 1, 0x1a], [5, 6, 1, 0x3a], [7, 3, 5, 0x4], [39, 6, 2, 0x3b], [43, 4, 5, 0xb], [75, 4, 6, 0xc], [139, 5, 7, 0x1b], [267, 5, 8, 0x1c], [523, 6, 8, 0x3c], [779, 7, 9, 0x7d], [1291, 6, 11, 0x3d], [-32, 9, 32, 0x1fe, "lower"], [3339, 9, 32, 0x1ff], // upper [2, 0x0] // OOB ]; break; case 10: lines = [[-21, 7, 4, 0x7a], [-5, 8, 0, 0xfc], [-4, 7, 0, 0x7b], [-3, 5, 0, 0x18], [-2, 2, 2, 0x0], [2, 5, 0, 0x19], [3, 6, 0, 0x36], [4, 7, 0, 0x7c], [5, 8, 0, 0xfd], [6, 2, 6, 0x1], [70, 5, 5, 0x1a], [102, 6, 5, 0x37], [134, 6, 6, 0x38], [198, 6, 7, 0x39], [326, 6, 8, 0x3a], [582, 6, 9, 0x3b], [1094, 6, 10, 0x3c], [2118, 7, 11, 0x7d], [-22, 8, 32, 0xfe, "lower"], [4166, 8, 32, 0xff], // upper [2, 0x2] // OOB ]; break; case 11: lines = [[1, 1, 0, 0x0], [2, 2, 1, 0x2], [4, 4, 0, 0xc], [5, 4, 1, 0xd], [7, 5, 1, 0x1c], [9, 5, 2, 0x1d], [13, 6, 2, 0x3c], [17, 7, 2, 0x7a], [21, 7, 3, 0x7b], [29, 7, 4, 0x7c], [45, 7, 5, 0x7d], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f] // upper ]; break; case 12: lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 1, 0x6], [5, 5, 0, 0x1c], [6, 5, 1, 0x1d], [8, 6, 1, 0x3c], [10, 7, 0, 0x7a], [11, 7, 1, 0x7b], [13, 7, 2, 0x7c], [17, 7, 3, 0x7d], [25, 7, 4, 0x7e], [41, 8, 5, 0xfe], [73, 8, 32, 0xff] // upper ]; break; case 13: lines = [[1, 1, 0, 0x0], [2, 3, 0, 0x4], [3, 4, 0, 0xc], [4, 5, 0, 0x1c], [5, 4, 1, 0xd], [7, 3, 3, 0x5], [15, 6, 1, 0x3a], [17, 6, 2, 0x3b], [21, 6, 3, 0x3c], [29, 6, 4, 0x3d], [45, 6, 5, 0x3e], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f] // upper ]; break; case 14: lines = [[-2, 3, 0, 0x4], [-1, 3, 0, 0x5], [0, 1, 0, 0x0], [1, 3, 0, 0x6], [2, 3, 0, 0x7]]; break; case 15: lines = [[-24, 7, 4, 0x7c], [-8, 6, 2, 0x3c], [-4, 5, 1, 0x1c], [-2, 4, 0, 0xc], [-1, 3, 0, 0x4], [0, 1, 0, 0x0], [1, 3, 0, 0x5], [2, 4, 0, 0xd], [3, 5, 1, 0x1d], [5, 6, 2, 0x3d], [9, 7, 4, 0x7d], [-25, 7, 32, 0x7e, "lower"], [25, 7, 32, 0x7f] // upper ]; break; default: throw new jbig2_Jbig2Error(`standard table B.${number} does not exist`); } for (let i = 0, ii = lines.length; i < ii; i++) { lines[i] = new HuffmanLine(lines[i]); } table = new HuffmanTable(lines, true); standardTablesCache[number] = table; return table; } function Reader(data, start, end) { this.data = data; this.start = start; this.end = end; this.position = start; this.shift = -1; this.currentByte = 0; } Reader.prototype = { readBit() { if (this.shift < 0) { if (this.position >= this.end) { throw new jbig2_Jbig2Error("end of data while reading bit"); } this.currentByte = this.data[this.position++]; this.shift = 7; } const bit = this.currentByte >> this.shift & 1; this.shift--; return bit; }, readBits(numBits) { let result = 0, i; for (i = numBits - 1; i >= 0; i--) { result |= this.readBit() << i; } return result; }, byteAlign() { this.shift = -1; }, next() { if (this.position >= this.end) { return -1; } return this.data[this.position++]; } }; function getCustomHuffmanTable(index, referredTo, customTables) { // Returns a Tables segment that has been earlier decoded. // See 7.4.2.1.6 (symbol dictionary) or 7.4.3.1.6 (text region). let currentIndex = 0; for (let i = 0, ii = referredTo.length; i < ii; i++) { const table = customTables[referredTo[i]]; if (table) { if (index === currentIndex) { return table; } currentIndex++; } } throw new jbig2_Jbig2Error("can't find custom Huffman table"); } function getTextRegionHuffmanTables(textRegion, referredTo, customTables, numberOfSymbols, reader) { // 7.4.3.1.7 Symbol ID Huffman table decoding // Read code lengths for RUNCODEs 0...34. const codes = []; for (let i = 0; i <= 34; i++) { const codeLength = reader.readBits(4); codes.push(new HuffmanLine([i, codeLength, 0, 0])); } // Assign Huffman codes for RUNCODEs. const runCodesTable = new HuffmanTable(codes, false); // Read a Huffman code using the assignment above. // Interpret the RUNCODE codes and the additional bits (if any). codes.length = 0; for (let i = 0; i < numberOfSymbols;) { const codeLength = runCodesTable.decode(reader); if (codeLength >= 32) { let repeatedLength, numberOfRepeats, j; switch (codeLength) { case 32: if (i === 0) { throw new jbig2_Jbig2Error("no previous value in symbol ID table"); } numberOfRepeats = reader.readBits(2) + 3; repeatedLength = codes[i - 1].prefixLength; break; case 33: numberOfRepeats = reader.readBits(3) + 3; repeatedLength = 0; break; case 34: numberOfRepeats = reader.readBits(7) + 11; repeatedLength = 0; break; default: throw new jbig2_Jbig2Error("invalid code length in symbol ID table"); } for (j = 0; j < numberOfRepeats; j++) { codes.push(new HuffmanLine([i, repeatedLength, 0, 0])); i++; } } else { codes.push(new HuffmanLine([i, codeLength, 0, 0])); i++; } } reader.byteAlign(); const symbolIDTable = new HuffmanTable(codes, false); // 7.4.3.1.6 Text region segment Huffman table selection let customIndex = 0, tableFirstS, tableDeltaS, tableDeltaT; switch (textRegion.huffmanFS) { case 0: case 1: tableFirstS = getStandardTable(textRegion.huffmanFS + 6); break; case 3: tableFirstS = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; break; default: throw new jbig2_Jbig2Error("invalid Huffman FS selector"); } switch (textRegion.huffmanDS) { case 0: case 1: case 2: tableDeltaS = getStandardTable(textRegion.huffmanDS + 8); break; case 3: tableDeltaS = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; break; default: throw new jbig2_Jbig2Error("invalid Huffman DS selector"); } switch (textRegion.huffmanDT) { case 0: case 1: case 2: tableDeltaT = getStandardTable(textRegion.huffmanDT + 11); break; case 3: tableDeltaT = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; break; default: throw new jbig2_Jbig2Error("invalid Huffman DT selector"); } if (textRegion.refinement) { // Load tables RDW, RDH, RDX and RDY. throw new jbig2_Jbig2Error("refinement with Huffman is not supported"); } return { symbolIDTable, tableFirstS, tableDeltaS, tableDeltaT }; } function getSymbolDictionaryHuffmanTables(dictionary, referredTo, customTables) { // 7.4.2.1.6 Symbol dictionary segment Huffman table selection let customIndex = 0, tableDeltaHeight, tableDeltaWidth; switch (dictionary.huffmanDHSelector) { case 0: case 1: tableDeltaHeight = getStandardTable(dictionary.huffmanDHSelector + 4); break; case 3: tableDeltaHeight = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; break; default: throw new jbig2_Jbig2Error("invalid Huffman DH selector"); } switch (dictionary.huffmanDWSelector) { case 0: case 1: tableDeltaWidth = getStandardTable(dictionary.huffmanDWSelector + 2); break; case 3: tableDeltaWidth = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; break; default: throw new jbig2_Jbig2Error("invalid Huffman DW selector"); } let tableBitmapSize, tableAggregateInstances; if (dictionary.bitmapSizeSelector) { tableBitmapSize = getCustomHuffmanTable(customIndex, referredTo, customTables); customIndex++; } else { tableBitmapSize = getStandardTable(1); } if (dictionary.aggregationInstancesSelector) { tableAggregateInstances = getCustomHuffmanTable(customIndex, referredTo, customTables); } else { tableAggregateInstances = getStandardTable(1); } return { tableDeltaHeight, tableDeltaWidth, tableBitmapSize, tableAggregateInstances }; } function readUncompressedBitmap(reader, width, height) { const bitmap = []; for (let y = 0; y < height; y++) { const row = new Uint8Array(width); bitmap.push(row); for (let x = 0; x < width; x++) { row[x] = reader.readBit(); } reader.byteAlign(); } return bitmap; } function decodeMMRBitmap(input, width, height, endOfBlock) { // MMR is the same compression algorithm as the PDF filter // CCITTFaxDecode with /K -1. const params = { K: -1, Columns: width, Rows: height, BlackIs1: true, EndOfBlock: endOfBlock }; const decoder = new ccitt_CCITTFaxDecoder(input, params); const bitmap = []; let currentByte, eof = false; for (let y = 0; y < height; y++) { const row = new Uint8Array(width); bitmap.push(row); let shift = -1; for (let x = 0; x < width; x++) { if (shift < 0) { currentByte = decoder.readNextChar(); if (currentByte === -1) { // Set the rest of the bits to zero. currentByte = 0; eof = true; } shift = 7; } row[x] = currentByte >> shift & 1; shift--; } } if (endOfBlock && !eof) { // Read until EOFB has been consumed. const lookForEOFLimit = 5; for (let i = 0; i < lookForEOFLimit; i++) { if (decoder.readNextChar() === -1) { break; } } } return bitmap; } // eslint-disable-next-line no-shadow function Jbig2Image() {} Jbig2Image.prototype = { parseChunks(chunks) { return parseJbig2Chunks(chunks); }, parse(data) { const { imgData, width, height } = parseJbig2(data); this.width = width; this.height = height; return imgData; } }; return Jbig2Image; }(); /***/ }), /***/ "7418": /***/ (function(module, exports, __webpack_require__) { "use strict"; // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ "74db": /***/ (function(module, exports, __webpack_require__) { "use strict"; const nodeToJson = __webpack_require__("5486"); const xmlToNodeobj = __webpack_require__("8a24"); const x2xmlnode = __webpack_require__("8a24"); const buildOptions = __webpack_require__("90da").buildOptions; const validator = __webpack_require__("adc3"); exports.parse = function(xmlData, options, validationOption) { if( validationOption){ if(validationOption === true) validationOption = {} const result = validator.validate(xmlData, validationOption); if (result !== true) { throw Error( result.err.msg) } } options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props); const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options) //print(traversableObj, " "); return nodeToJson.convertToJson(traversableObj, options); }; exports.convertTonimn = __webpack_require__("8006").convert2nimn; exports.getTraversalObj = xmlToNodeobj.getTraversalObj; exports.convertToJson = nodeToJson.convertToJson; exports.convertToJsonString = __webpack_require__("5a79").convertToJsonString; exports.validate = validator.validate; exports.j2xParser = __webpack_require__("cd38"); exports.parseToNimn = function(xmlData, schema, options) { return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options); }; function print(xmlNode, indentation){ if(xmlNode){ console.log(indentation + "{") console.log(indentation + " \"tagName\": \"" + xmlNode.tagname + "\", "); if(xmlNode.parent){ console.log(indentation + " \"parent\": \"" + xmlNode.parent.tagname + "\", "); } console.log(indentation + " \"val\": \"" + xmlNode.val + "\", "); console.log(indentation + " \"attrs\": " + JSON.stringify(xmlNode.attrsMap,null,4) + ", "); if(xmlNode.child){ console.log(indentation + "\"child\": {") const indentation2 = indentation + indentation; Object.keys(xmlNode.child).forEach( function(key) { const node = xmlNode.child[key]; if(Array.isArray(node)){ console.log(indentation + "\""+key+"\" :[") node.forEach( function(item,index) { //console.log(indentation + " \""+index+"\" : [") print(item, indentation2); }) console.log(indentation + "],") }else{ console.log(indentation + " \""+key+"\" : {") print(node, indentation2); console.log(indentation + "},") } }); console.log(indentation + "},") } console.log(indentation + "},") } } /***/ }), /***/ "75bd": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var NATIVE_ARRAY_BUFFER = __webpack_require__("4b11"); var arrayBufferByteLength = __webpack_require__("b620"); var DataView = globalThis.DataView; module.exports = function (O) { if (!NATIVE_ARRAY_BUFFER || arrayBufferByteLength(O) !== 0) return false; try { // eslint-disable-next-line no-new -- thrower new DataView(O); return false; } catch (error) { return true; } }; /***/ }), /***/ "7839": /***/ (function(module, exports, __webpack_require__) { "use strict"; // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ "79a4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var fails = __webpack_require__("d039"); var intersection = __webpack_require__("953b"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var INCORRECT = !setMethodAcceptSetLike('intersection', function (result) { return result.size === 2 && result.has(1) && result.has(2); }) || fails(function () { // eslint-disable-next-line es/no-array-from, es/no-set, es/no-set-prototype-intersection -- testing return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2'; }); // `Set.prototype.intersection` method // https://tc39.es/ecma262/#sec-set.prototype.intersection $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { intersection: intersection }); /***/ }), /***/ "7b0b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var requireObjectCoercible = __webpack_require__("1d80"); var $Object = Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return $Object(requireObjectCoercible(argument)); }; /***/ }), /***/ "7c73": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* global ActiveXObject -- old IE, WSH */ var anObject = __webpack_require__("825a"); var definePropertiesModule = __webpack_require__("37e8"); var enumBugKeys = __webpack_require__("7839"); var hiddenKeys = __webpack_require__("d012"); var html = __webpack_require__("1be4"); var documentCreateElement = __webpack_require__("cc12"); var sharedKey = __webpack_require__("f772"); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function (activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; // eslint-disable-next-line no-useless-assignment -- avoid memory leak activeXDocument = null; return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { // Thrash, waste and sodomy: IE GC bug var iframe = documentCreateElement('iframe'); var JS = 'java' + SCRIPT + ':'; var iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475 iframe.src = String(JS); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(scriptTag('document.F=Object')); iframeDocument.close(); return iframeDocument.F; }; // Check for document.domain and active x support // No need to use active x approach when document.domain is not set // see https://github.com/es-shims/es5-shim/issues/150 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 // avoid IE GC bug var activeXDocument; var NullProtoObject = function () { try { activeXDocument = new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH var length = enumBugKeys.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; return NullProtoObject(); }; hiddenKeys[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create // eslint-disable-next-line es/no-object-create -- safe module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : definePropertiesModule.f(result, Properties); }; /***/ }), /***/ "7d54": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var iterate = __webpack_require__("2266"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var getIteratorDirect = __webpack_require__("46c4"); var iteratorClose = __webpack_require__("2a62"); var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f"); var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('forEach', TypeError); // `Iterator.prototype.forEach` method // https://tc39.es/ecma262/#sec-iterator.prototype.foreach $({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, { forEach: function forEach(fn) { anObject(this); try { aCallable(fn); } catch (error) { iteratorClose(this, 'throw', error); } if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn); var record = getIteratorDirect(this); var counter = 0; iterate(record, function (value) { fn(value, counter++); }, { IS_RECORD: true }); } }); /***/ }), /***/ "7efc": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export renderPageBox */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return calPageBox; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return calPageBoxScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return renderPage; }); /* unused harmony export renderImageObject */ /* unused harmony export renderImageOnDiv */ /* unused harmony export renderTextObject */ /* unused harmony export renderPathObject */ /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14d9"); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2c66"); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("249d"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("40e9"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e9f5"); /* harmony import */ var core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_constructor_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("7d54"); /* harmony import */ var core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_for_each_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("ab43"); /* harmony import */ var core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_map_js__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("a732"); /* harmony import */ var core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_iterator_some_js__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("e9c4"); /* harmony import */ var core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_json_stringify_js__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("907a"); /* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("986a"); /* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("1d02"); /* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("3c5d"); /* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("6ce5"); /* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("2834"); /* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("4ea1"); /* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var _utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("6b33"); /* * ofd.js - A Javascript class for reading and rendering ofd files * * * Copyright (c) 2020. DLTech21 All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ // 签章 / 注释必须盖在正文之上;正文的 z-index 取自图元 ID,故这里取远大于 ID 的值 const ANNOTATION_Z_INDEX = 1000000; const STAMP_Z_INDEX = 2000000; /** * 图元的层叠次序。pfIndex 由 xml 解析器写入,缺失时退回 @_ID * —— 生成器按绘制顺序递增分配 ID,否则同层图元只能靠 append 顺序决定遮挡。 */ const zIndexOf = function (obj) { if (!obj) { return 0; } if (obj['pfIndex'] !== undefined) { return obj['pfIndex']; } const id = parseInt(obj['@_ID'], 10); return isNaN(id) ? 0 : id; }; const renderPageBox = function (screenWidth, pages, document) { let pageBoxs = []; for (const page of pages) { let boxObj = {}; boxObj['id'] = Object.keys(page)[0]; boxObj['box'] = calPageBox(screenWidth, document, page); pageBoxs.push(boxObj); } return pageBoxs; }; const calPageBox = function (screenWidth, document, page) { const area = page[Object.keys(page)[0]]['json']['ofd:Area']; let box; if (area) { const physicalBox = area['ofd:PhysicalBox']; if (physicalBox) { box = physicalBox; } else { const applicationBox = area['ofd:ApplicationBox']; if (applicationBox) { box = applicationBox; } else { const contentBox = area['ofd:ContentBox']; if (contentBox) { box = contentBox; } } } } else { let documentArea = document['ofd:CommonData']['ofd:PageArea']; const physicalBox = documentArea['ofd:PhysicalBox']; if (physicalBox) { box = physicalBox; } else { const applicationBox = documentArea['ofd:ApplicationBox']; if (applicationBox) { box = applicationBox; } else { const contentBox = documentArea['ofd:ContentBox']; if (contentBox) { box = contentBox; } } } } let array = box.split(' '); const scale = ((screenWidth - 10) / parseFloat(array[2])).toFixed(1); Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* setMaxPageScal */ "n"])(scale); Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* setPageScal */ "o"])(scale); box = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(box); box = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(box); return box; }; const calPageBoxScale = function (document, page) { const area = page[Object.keys(page)[0]]['json']['ofd:Area']; let box; if (area) { const physicalBox = area['ofd:PhysicalBox']; if (physicalBox) { box = physicalBox; } else { const applicationBox = area['ofd:ApplicationBox']; if (applicationBox) { box = applicationBox; } else { const contentBox = area['ofd:ContentBox']; if (contentBox) { box = contentBox; } } } } else { let documentArea = document['ofd:CommonData']['ofd:PageArea']; const physicalBox = documentArea['ofd:PhysicalBox']; if (physicalBox) { box = physicalBox; } else { const applicationBox = documentArea['ofd:ApplicationBox']; if (applicationBox) { box = applicationBox; } else { const contentBox = documentArea['ofd:ContentBox']; if (contentBox) { box = contentBox; } } } } box = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(box); box = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(box); return box; }; // 根据模板来渲染层节点 const renderLayerFromTemplate = function (tpls, template, pageDiv, fontResObj, drawParamResObj, multiMediaResObj) { let array = []; const layers = tpls[template['@_TemplateID']]['json']['ofd:Content']['ofd:Layer']; array = array.concat(layers); for (let layer of array) { if (layer) { renderLayer(pageDiv, fontResObj, drawParamResObj, multiMediaResObj, layer, false); } } }; const renderPage = function (pageDiv, page, tpls, fontResObj, drawParamResObj, multiMediaResObj) { var _page$pageId; const pageId = Object.keys(page)[0]; const template = page[pageId]['json']['ofd:Template']; if (Array.isArray(template)) { // 当使用多个模板时 template.forEach(item => { /** * 此处只满足 ZOrder 相同的情况 * 若 ZOrder 不同,可能需要根据 ZOrder 排序来渲染 * 参考 http://www.dajs.gov.cn/attach/0/88a7620d9d3f4e13b2baa52ab3487854.pdf 第 18 页 ZOrder 的属性说明 */ if (item) { renderLayerFromTemplate(tpls, item, pageDiv, fontResObj, drawParamResObj, multiMediaResObj); } }); } else if (template) { // 当使用单个模板时 renderLayerFromTemplate(tpls, template, pageDiv, fontResObj, drawParamResObj, multiMediaResObj); } else { console.error('ofd:Template not found!'); } const contentLayers = (_page$pageId = page[pageId]) === null || _page$pageId === void 0 || (_page$pageId = _page$pageId.json) === null || _page$pageId === void 0 || (_page$pageId = _page$pageId['ofd:Content']) === null || _page$pageId === void 0 ? void 0 : _page$pageId['ofd:Layer']; let array = []; array = array.concat(contentLayers); for (let contentLayer of array) { if (contentLayer) { renderLayer(pageDiv, fontResObj, drawParamResObj, multiMediaResObj, contentLayer, false); } } if (page[pageId].stamp) { for (const stamp of page[pageId].stamp) { if (stamp.type === 'ofd') { renderSealPage(pageDiv, stamp.obj.pages, stamp.obj.tpls, true, stamp.stamp.stampAnnot, stamp.obj.fontResObj, stamp.obj.drawParamResObj, stamp.obj.multiMediaResObj, stamp.stamp.sealObj.SES_Signature, stamp.stamp.signedInfo); } else if (stamp.type === 'png') { let sealBoundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(stamp.obj.boundary); let element = renderImageOnDiv(pageDiv.style.width, pageDiv.style.height, stamp.obj.img, sealBoundary, stamp.obj.clip, true, stamp.stamp.sealObj.SES_Signature, stamp.stamp.signedInfo, STAMP_Z_INDEX); pageDiv.appendChild(element); } } } if (page[pageId].annotation) { for (const annotation of page[pageId].annotation) { renderAnnotation(pageDiv, annotation, fontResObj, drawParamResObj, multiMediaResObj); } } }; const renderAnnotation = function (pageDiv, annotation, fontResObj, drawParamResObj, multiMediaResObj) { var _annotation$appearanc; let div = document.createElement('div'); div.setAttribute('style', `overflow: hidden;z-index:${ANNOTATION_Z_INDEX};position:relative;`); let boundary = (_annotation$appearanc = annotation['appearance']) === null || _annotation$appearanc === void 0 ? void 0 : _annotation$appearanc['@_Boundary']; if (boundary) { let divBoundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(boundary)); div.setAttribute('style', `overflow: hidden;z-index:${ANNOTATION_Z_INDEX};position:absolute; left: ${divBoundary.x}px; top: ${divBoundary.y}px; width: ${divBoundary.w}px; height: ${divBoundary.h}px`); } const contentLayer = annotation['appearance']; renderLayer(div, fontResObj, drawParamResObj, multiMediaResObj, contentLayer, false); pageDiv.appendChild(div); }; const renderSealPage = function (pageDiv, pages, tpls, isStampAnnot, stampAnnot, fontResObj, drawParamResObj, multiMediaResObj, SES_Signature, signedInfo) { for (const page of pages) { const pageId = Object.keys(page)[0]; let stampAnnotBoundary = { x: 0, y: 0, w: 0, h: 0 }; if (isStampAnnot && stampAnnot) { stampAnnotBoundary = stampAnnot.boundary; } let divBoundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(stampAnnotBoundary); let div = document.createElement('div'); div.setAttribute("name", "seal_img_div"); div.setAttribute('style', `cursor: pointer; position:relative; z-index:${STAMP_Z_INDEX}; left: ${divBoundary.x}px; top: ${divBoundary.y}px; width: ${divBoundary.w}px; height: ${divBoundary.h}px`); div.setAttribute('data-ses-signature', `${JSON.stringify(SES_Signature)}`); div.setAttribute('data-signed-info', `${JSON.stringify(signedInfo)}`); const template = page[pageId]['json']['ofd:Template']; if (template) { const layers = tpls[template['@_TemplateID']]['json']['ofd:Content']['ofd:Layer']; let array = []; array = array.concat(layers); for (let layer of array) { if (layer) { renderLayer(div, fontResObj, drawParamResObj, multiMediaResObj, layer, isStampAnnot); } } } const contentLayers = page[pageId]['json']['ofd:Content']['ofd:Layer']; let array = []; array = array.concat(contentLayers); for (let contentLayer of array) { if (contentLayer) { renderLayer(div, fontResObj, drawParamResObj, multiMediaResObj, contentLayer, isStampAnnot); } } pageDiv.appendChild(div); } }; /** * 展开 DrawParam 的 @_Relative 继承链:父参数先生效,子参数覆盖父参数。 * 图元只写 DrawParam="4" 而不带 ofd:FillColor 时,颜色只能从这里取。 */ const resolveDrawParam = function (drawParamResObj, id, seen) { if (!id || !drawParamResObj || !drawParamResObj[id]) { return null; } // @_Relative 由文件提供,环形引用会导致无限递归 seen = seen || []; if (seen.indexOf(id) !== -1) { return null; } seen.push(id); const own = drawParamResObj[id]; const parent = own['relative'] ? resolveDrawParam(drawParamResObj, own['relative'], seen) : null; return { FillColor: own['FillColor'] || (parent ? parent.FillColor : ''), StrokeColor: own['StrokeColor'] || (parent ? parent.StrokeColor : ''), LineWidth: own['LineWidth'] || (parent ? parent.LineWidth : '') }; }; const renderLayer = function (pageDiv, fontResObj, drawParamResObj, multiMediaResObj, layer, isStampAnnot) { let fillColor = null; let strokeColor = null; let lineWith = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(0.353); const layerDrawParam = resolveDrawParam(drawParamResObj, layer === null || layer === void 0 ? void 0 : layer['@_DrawParam']); if (layerDrawParam) { if (layerDrawParam.FillColor) { fillColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(layerDrawParam.FillColor); } if (layerDrawParam.StrokeColor) { strokeColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(layerDrawParam.StrokeColor); } if (layerDrawParam.LineWidth) { lineWith = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(layerDrawParam.LineWidth); } } const imageObjects = layer === null || layer === void 0 ? void 0 : layer['ofd:ImageObject']; let imageObjectArray = []; imageObjectArray = imageObjectArray.concat(imageObjects); for (const imageObject of imageObjectArray) { if (imageObject) { let element = renderImageObject(pageDiv.style.width, pageDiv.style.height, multiMediaResObj, imageObject); if (element) pageDiv.appendChild(element); } } const pathObjects = layer === null || layer === void 0 ? void 0 : layer['ofd:PathObject']; let pathObjectArray = []; pathObjectArray = pathObjectArray.concat(pathObjects); for (const pathObject of pathObjectArray) { if (pathObject) { let svg = renderPathObject(pageDiv, drawParamResObj, pathObject, fillColor, strokeColor, lineWith, isStampAnnot); if (svg) pageDiv.appendChild(svg); } } const textObjects = layer === null || layer === void 0 ? void 0 : layer['ofd:TextObject']; let textObjectArray = []; textObjectArray = textObjectArray.concat(textObjects); for (const textObject of textObjectArray) { if (textObject) { let svg = renderTextObject(fontResObj, textObject, fillColor, strokeColor); pageDiv.appendChild(svg); } } // 处理 PageBlock 容器:递归渲染其内部子元素 const pageBlocks = layer === null || layer === void 0 ? void 0 : layer['ofd:PageBlock']; let pageBlockArray = []; pageBlockArray = pageBlockArray.concat(pageBlocks); for (const block of pageBlockArray) { if (block) { renderLayer(pageDiv, fontResObj, drawParamResObj, multiMediaResObj, block, isStampAnnot); } } }; const renderImageObject = function (pageWidth, pageHeight, multiMediaResObj, imageObject) { let boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(imageObject['@_Boundary']); boundary = calImageBoundary(boundary, imageObject['@_CTM']); boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(boundary); const resId = imageObject['@_ResourceID']; const resource = multiMediaResObj[resId]; if (!resource || !resource.load) return null; // resource.load() 返回 Promise:图片此刻才解码,元素先占位、解码完再填充 if (resource.format === 'gbig2') { return renderImageOnCanvas(resource.load(), boundary, zIndexOf(imageObject)); } return renderImageOnDiv(pageWidth, pageHeight, resource.load(), boundary, false, false, null, null, zIndexOf(imageObject)); }; /** 图片源可能是已就绪的 dataURI(签章),也可能是待解码的 Promise(页面图片) */ const setImageSource = function (imgElement, source) { if (!source) return; if (typeof source === 'string') { imgElement.src = source; return; } Promise.resolve(source).then(function (src) { imgElement.src = src; }, function (e) { console.error('OFD 图片解码失败:', e); }); }; /** * 图像对象占据自身坐标系的单位正方形,由 CTM 变换到页面坐标系。 * 部分生成器(如 OFD R&W)把 Boundary 写成整页、真实位置只放在 CTM 里, * 只看 Boundary 会把图片拉伸铺满整页。 * 仅处理无旋转/错切(b=c=0)的 CTM;含旋转时退回 Boundary,保持原行为。 */ const calImageBoundary = function (boundary, ctm) { if (!boundary || !ctm) { return boundary; } const m = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseCtm */ "k"])(ctm).map(parseFloat); if (m.length < 6 || m.some(isNaN)) { return boundary; } const [a, b, c, d, e, f] = m; if (b !== 0 || c !== 0) { return boundary; } return { x: boundary.x + e, y: boundary.y + f, w: a, h: d }; }; const renderImageOnCanvas = function (imagePromise, boundary, oid) { let canvas = document.createElement('canvas'); canvas.setAttribute('style', `left: ${boundary.x}px; top: ${boundary.y}px; width: ${boundary.w}px; height: ${boundary.h}px;z-index: ${oid}`); canvas.style.position = 'absolute'; Promise.resolve(imagePromise).then(function (data) { const { img, width, height } = data; const arr = new Uint8ClampedArray(4 * width * height); for (let i = 0; i < img.length; i++) { arr[4 * i] = img[i]; arr[4 * i + 1] = img[i]; arr[4 * i + 2] = img[i]; arr[4 * i + 3] = 255; } canvas.width = width; canvas.height = height; canvas.getContext('2d').putImageData(new ImageData(arr, width, height), 0, 0); }, function (e) { console.error('OFD jbig2 图片解码失败:', e); }); return canvas; }; const renderImageOnDiv = function (pageWidth, pageHeight, imgSrc, boundary, clip, isStampAnnot, SES_Signature, signedInfo, oid) { let div = document.createElement('div'); if (isStampAnnot) { div.setAttribute("name", "seal_img_div"); div.setAttribute('data-ses-signature', `${JSON.stringify(SES_Signature)}`); div.setAttribute('data-signed-info', `${JSON.stringify(signedInfo)}`); } let img = document.createElement('img'); setImageSource(img, imgSrc); img.setAttribute('width', '100%'); img.setAttribute('height', '100%'); div.appendChild(img); const pw = parseFloat(pageWidth.replace('px', '')); const ph = parseFloat(pageHeight.replace('px', '')); const w = boundary.w > pw ? pw : boundary.w; const h = boundary.h > ph ? ph : boundary.h; let c = ''; if (clip) { clip = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(clip); c = `clip: rect(${clip.y}px, ${clip.w + clip.x}px, ${clip.h + clip.y}px, ${clip.x}px)`; } div.setAttribute('style', `cursor: pointer; overflow: hidden; position: absolute; left: ${c ? boundary.x : boundary.x < 0 ? 0 : boundary.x}px; top: ${c ? boundary.y : boundary.y < 0 ? 0 : boundary.y}px; width: ${w}px; height: ${h}px; ${c};z-index: ${oid}`); return div; }; const renderTextObject = function (fontResObj, textObject, defaultFillColor, defaultStrokeColor) { // 默认黑色填充,防止 fill=null 导致文字不可见 defaultFillColor = defaultFillColor || '#000000'; defaultStrokeColor = defaultStrokeColor || '#000000'; let defaultFillOpacity = 1; let boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(textObject['@_Boundary']); boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(boundary); const ctm = textObject['@_CTM']; const hScale = textObject['@_HScale']; const font = textObject['@_Font']; const weight = textObject['@_Weight']; const size = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(parseFloat(textObject['@_Size'])); let array = []; array = array.concat(textObject['ofd:TextCode']); const textCodePointList = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* calTextPoint */ "c"])(array); let svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('version', '1.1'); const fillColor = textObject['ofd:FillColor']; if (fillColor) { defaultFillColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(fillColor['@_Value']); let alpha = fillColor['@_Alpha']; if (alpha) { defaultFillOpacity = alpha > 1 ? alpha / 255 : alpha; } } for (const textCodePoint of textCodePointList) { if (textCodePoint && !isNaN(textCodePoint.x)) { let text = document.createElementNS('http://www.w3.org/2000/svg', 'text'); text.setAttribute('x', textCodePoint.x); text.setAttribute('y', textCodePoint.y); text.innerHTML = textCodePoint.text; if (ctm) { const ctms = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseCtm */ "k"])(ctm); text.setAttribute('transform', `matrix(${ctms[0]} ${ctms[1]} ${ctms[2]} ${ctms[3]} ${Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(ctms[4])} ${Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(ctms[5])})`); } if (hScale) { text.setAttribute('transform', `matrix(${hScale}, 0, 0, 1, ${(1 - hScale) * textCodePoint.x}, 0)`); // text.setAttribute('transform-origin', `${textCodePoint.x}`); } text.setAttribute('fill', defaultStrokeColor); text.setAttribute('fill', defaultFillColor); text.setAttribute('fill-opacity', defaultFillOpacity); var ff = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* getFontFamily */ "h"])(fontResObj[font]) || 'SimSun, sans-serif'; text.setAttribute('style', `font-weight: ${weight};font-size:${size}px;font-family: ${ff};`); svg.appendChild(text); } } let width = boundary.w; let height = boundary.h; let left = boundary.x; let top = boundary.y; svg.setAttribute('style', `overflow:visible;position:absolute;width:${width}px;height:${height}px;left:${left}px;top:${top}px;z-index:${zIndexOf(textObject)}`); return svg; }; const renderPathObject = function (pageDiv, drawParamResObj, pathObject, defaultFillColor, defaultStrokeColor, defaultLineWith, isStampAnnot) { let boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseStBox */ "l"])(pathObject['@_Boundary']); boundary = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterBox */ "e"])(boundary); let lineWidth = pathObject['@_LineWidth']; const abbreviatedData = pathObject['ofd:AbbreviatedData']; const points = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* calPathPoint */ "b"])(Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* convertPathAbbreviatedDatatoPoint */ "d"])(abbreviatedData)); const ctm = pathObject['@_CTM']; let svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('version', '1.1'); let path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); // DrawParam 先生效,图元自身的属性再覆盖它 const objDrawParam = resolveDrawParam(drawParamResObj, pathObject['@_DrawParam']); if (objDrawParam) { if (objDrawParam.LineWidth) { defaultLineWith = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(objDrawParam.LineWidth); } if (objDrawParam.FillColor) { defaultFillColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(objDrawParam.FillColor); } if (objDrawParam.StrokeColor) { defaultStrokeColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(objDrawParam.StrokeColor); } } if (lineWidth) { defaultLineWith = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(lineWidth); } if (ctm) { const ctms = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseCtm */ "k"])(ctm); path.setAttribute('transform', `matrix(${ctms[0]} ${ctms[1]} ${ctms[2]} ${ctms[3]} ${Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(ctms[4])} ${Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* converterDpi */ "f"])(ctms[5])})`); } let strokeStyle = ''; const strokeColor = pathObject['ofd:StrokeColor']; if (strokeColor) { defaultStrokeColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(strokeColor['@_Value']); } let fillStyle = 'fill: none;'; const fillColor = pathObject['ofd:FillColor']; if (fillColor) { defaultFillColor = Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_16__[/* parseColor */ "j"])(fillColor['@_Value']); } if (defaultLineWith > 0 && !defaultStrokeColor) { defaultStrokeColor = defaultFillColor; if (!defaultStrokeColor) { defaultStrokeColor = 'rgb(0, 0, 0)'; } } strokeStyle = `stroke:${defaultStrokeColor};stroke-width:${defaultLineWith}px;`; if (pathObject['@_Stroke'] == 'false') { strokeStyle = ``; } // 规范里 @Fill 缺省为 false(描边环若被填充,印章会变成一坨实心色块)。 // 但部分生成器省略 @Fill、只给图元挂 ofd:FillColor 来表达填充,这类仍需填充。 const shouldFill = pathObject['@_Fill'] === 'true' || pathObject['@_Fill'] === undefined && !!fillColor; if (shouldFill) { fillStyle = `fill:${isStampAnnot ? 'none' : defaultFillColor || 'rgb(0, 0, 0)'};`; } path.setAttribute('style', `${strokeStyle};${fillStyle}`); let d = ''; for (const point of points) { if (point.type === 'M') { d += `M${point.x} ${point.y} `; } else if (point.type === 'L') { d += `L${point.x} ${point.y} `; } else if (point.type === 'Q') { d += `Q${point.x1} ${point.y1} ${point.x2} ${point.y2} `; } else if (point.type === 'B') { d += `C${point.x1} ${point.y1} ${point.x2} ${point.y2} ${point.x3} ${point.y3} `; } else if (point.type === 'C') { d += `Z`; } } path.setAttribute('d', d); svg.appendChild(path); let width = isStampAnnot ? boundary.w : Math.ceil(boundary.w); let height = isStampAnnot ? boundary.h : Math.ceil(boundary.h); let left = boundary.x; let top = boundary.y; svg.setAttribute('style', `overflow:visible;position:absolute;width:${width}px;height:${height}px;left:${left}px;top:${top}px;z-index:${zIndexOf(pathObject)}`); return svg; }; /***/ }), /***/ "7f3b": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("caad"); /* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2c66"); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("249d"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("40e9"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("625a"); /* harmony import */ var core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fafb"); /* harmony import */ var core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var core_js_modules_es_set_difference_v2_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("1e70"); /* harmony import */ var core_js_modules_es_set_difference_v2_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_difference_v2_js__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var core_js_modules_es_set_intersection_v2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("79a4"); /* harmony import */ var core_js_modules_es_set_intersection_v2_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_intersection_v2_js__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var core_js_modules_es_set_is_disjoint_from_v2_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("c1a1"); /* harmony import */ var core_js_modules_es_set_is_disjoint_from_v2_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_is_disjoint_from_v2_js__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var core_js_modules_es_set_is_subset_of_v2_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("8b00"); /* harmony import */ var core_js_modules_es_set_is_subset_of_v2_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_is_subset_of_v2_js__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var core_js_modules_es_set_is_superset_of_v2_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("a4e7"); /* harmony import */ var core_js_modules_es_set_is_superset_of_v2_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_is_superset_of_v2_js__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var core_js_modules_es_set_symmetric_difference_v2_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("1e5a"); /* harmony import */ var core_js_modules_es_set_symmetric_difference_v2_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_symmetric_difference_v2_js__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var core_js_modules_es_set_union_v2_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("72c3"); /* harmony import */ var core_js_modules_es_set_union_v2_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_union_v2_js__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("907a"); /* harmony import */ var core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_at_js__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("986a"); /* harmony import */ var core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_js__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("1d02"); /* harmony import */ var core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_find_last_index_js__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("3c5d"); /* harmony import */ var core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_set_js__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("6ce5"); /* harmony import */ var core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_reversed_js__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("2834"); /* harmony import */ var core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_to_sorted_js__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("4ea1"); /* harmony import */ var core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_typed_array_with_js__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var core_js_modules_es_uint8_array_set_from_base64_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("8407"); /* harmony import */ var core_js_modules_es_uint8_array_set_from_base64_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_uint8_array_set_from_base64_js__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var core_js_modules_es_uint8_array_set_from_hex_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("34af"); /* harmony import */ var core_js_modules_es_uint8_array_set_from_hex_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_uint8_array_set_from_hex_js__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var core_js_modules_es_uint8_array_to_base64_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("418f"); /* harmony import */ var core_js_modules_es_uint8_array_to_base64_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_uint8_array_to_base64_js__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var core_js_modules_es_uint8_array_to_hex_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("b848"); /* harmony import */ var core_js_modules_es_uint8_array_to_hex_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_uint8_array_to_hex_js__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var core_js_modules_es_weak_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("1296"); /* harmony import */ var core_js_modules_es_weak_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_weak_map_get_or_insert_js__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var core_js_modules_es_weak_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("97c7"); /* harmony import */ var core_js_modules_es_weak_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_weak_map_get_or_insert_computed_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("b7ef"); /* harmony import */ var core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_exception_stack_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("88a7"); /* harmony import */ var core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_delete_js__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("271a"); /* harmony import */ var core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_has_js__WEBPACK_IMPORTED_MODULE_28__); /* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("5494"); /* harmony import */ var core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_size_js__WEBPACK_IMPORTED_MODULE_29__); /* harmony import */ var _is_node_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("d00a"); /* Copyright 2017 Mozilla Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* eslint no-var: error */ // Skip compatibility checks for modern builds and if we already ran the module. if ((typeof PDFJSDev === "undefined" || !PDFJSDev.test("SKIP_BABEL")) && (typeof globalThis === "undefined" || !globalThis._pdfjsCompatibilityChecked)) { // Provides support for globalThis in legacy browsers. // Support: IE11/Edge, Opera if (typeof globalThis === "undefined" || globalThis.Math !== Math) { // eslint-disable-next-line no-global-assign globalThis = __webpack_require__("eb73"); } globalThis._pdfjsCompatibilityChecked = true; // Support: Node.js (function checkNodeBtoa() { if (globalThis.btoa || !_is_node_js__WEBPACK_IMPORTED_MODULE_30__[/* isNodeJS */ "a"]) { return; } globalThis.btoa = function (chars) { // eslint-disable-next-line no-undef return Buffer.from(chars, "binary").toString("base64"); }; })(); // Support: Node.js (function checkNodeAtob() { if (globalThis.atob || !_is_node_js__WEBPACK_IMPORTED_MODULE_30__[/* isNodeJS */ "a"]) { return; } globalThis.atob = function (input) { // eslint-disable-next-line no-undef return Buffer.from(input, "base64").toString("binary"); }; })(); // Provides support for String.prototype.startsWith in legacy browsers. // Support: IE, Chrome<41 (function checkStringStartsWith() { if (String.prototype.startsWith) { return; } __webpack_require__("d2a2"); })(); // Provides support for String.prototype.endsWith in legacy browsers. // Support: IE, Chrome<41 (function checkStringEndsWith() { if (String.prototype.endsWith) { return; } __webpack_require__("8f4c"); })(); // Provides support for String.prototype.includes in legacy browsers. // Support: IE, Chrome<41 (function checkStringIncludes() { if (String.prototype.includes) { return; } __webpack_require__("4661"); })(); // Provides support for Array.prototype.includes in legacy browsers. // Support: IE, Chrome<47 (function checkArrayIncludes() { if (Array.prototype.includes) { return; } __webpack_require__("bf2c"); })(); // Provides support for Array.from in legacy browsers. // Support: IE (function checkArrayFrom() { if (Array.from) { return; } __webpack_require__("6b84"); })(); // Provides support for Object.assign in legacy browsers. // Support: IE (function checkObjectAssign() { if (Object.assign) { return; } __webpack_require__("2418"); })(); // Provides support for Object.fromEntries in legacy browsers. // Support: IE, Chrome<73 (function checkObjectFromEntries() { if (Object.fromEntries) { return; } __webpack_require__("8ac5"); })(); // Provides support for Math.log2 in legacy browsers. // Support: IE, Chrome<38 (function checkMathLog2() { if (Math.log2) { return; } Math.log2 = __webpack_require__("dc57"); })(); // Provides support for Number.isNaN in legacy browsers. // Support: IE. (function checkNumberIsNaN() { if (Number.isNaN) { return; } Number.isNaN = __webpack_require__("9020"); })(); // Provides support for Number.isInteger in legacy browsers. // Support: IE, Chrome<34 (function checkNumberIsInteger() { if (Number.isInteger) { return; } Number.isInteger = __webpack_require__("f2e6"); })(); // Provides support for TypedArray.prototype.slice in legacy browsers. // Support: IE (function checkTypedArraySlice() { if (Uint8Array.prototype.slice) { return; } __webpack_require__("8f2a"); })(); // Provides support for *recent* additions to the Promise specification, // however basic Promise support is assumed to be available natively. // Support: Firefox<71, Safari<13, Chrome<76 (function checkPromise() { if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) { // The current image decoders are synchronous, hence `Promise` shouldn't // need to be polyfilled for the IMAGE_DECODERS build target. return; } if (globalThis.Promise.allSettled) { return; } globalThis.Promise = __webpack_require__("3980"); })(); // Support: IE (function checkURL() { if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")) { // Prevent "require is not a function" errors in development mode, // since the `URL` constructor should be available in modern browers. return; } else if (!PDFJSDev.test("GENERIC")) { // The `URL` constructor is assumed to be available in the extension // builds. return; } else if (PDFJSDev.test("IMAGE_DECODERS")) { // The current image decoders don't use the `URL` constructor, so it // doesn't need to be polyfilled for the IMAGE_DECODERS build target. return; } globalThis.URL = __webpack_require__("14d8"); })(); // Support: IE, Node.js (function checkReadableStream() { if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("IMAGE_DECODERS")) { // The current image decoders are synchronous, hence `ReadableStream` // shouldn't need to be polyfilled for the IMAGE_DECODERS build target. return; } let isReadableStreamSupported = false; if (typeof ReadableStream !== "undefined") { // MS Edge may say it has ReadableStream but they are not up to spec yet. try { // eslint-disable-next-line no-new new ReadableStream({ start(controller) { controller.close(); } }); isReadableStreamSupported = true; } catch (e) { // The ReadableStream constructor cannot be used. } } if (isReadableStreamSupported) { return; } globalThis.ReadableStream = __webpack_require__("87c2").ReadableStream; })(); // We want to support Map iteration, but it doesn't seem possible to easily // test for that specifically; hence using a similarly unsupported property. // Support: IE11 (function checkMapEntries() { if (globalThis.Map && globalThis.Map.prototype.entries) { return; } globalThis.Map = __webpack_require__("5eff"); })(); // We want to support Set iteration, but it doesn't seem possible to easily // test for that specifically; hence using a similarly unsupported property. // Support: IE11 (function checkSetEntries() { if (globalThis.Set && globalThis.Set.prototype.entries) { return; } globalThis.Set = __webpack_require__("9a35"); })(); // Support: IE<11, Safari<8, Chrome<36 (function checkWeakMap() { if (globalThis.WeakMap) { return; } globalThis.WeakMap = __webpack_require__("ad63"); })(); // Support: IE11 (function checkWeakSet() { if (globalThis.WeakSet) { return; } globalThis.WeakSet = __webpack_require__("ee42"); })(); // Provides support for String.codePointAt in legacy browsers. // Support: IE11. (function checkStringCodePointAt() { if (String.prototype.codePointAt) { return; } __webpack_require__("d627"); })(); // Provides support for String.fromCodePoint in legacy browsers. // Support: IE11. (function checkStringFromCodePoint() { if (String.fromCodePoint) { return; } String.fromCodePoint = __webpack_require__("1cd7"); })(); // Support: IE (function checkSymbol() { if (globalThis.Symbol) { return; } __webpack_require__("1f4a"); })(); // Provides support for String.prototype.padStart in legacy browsers. // Support: IE, Chrome<57 (function checkStringPadStart() { if (String.prototype.padStart) { return; } __webpack_require__("1920"); })(); // Provides support for String.prototype.padEnd in legacy browsers. // Support: IE, Chrome<57 (function checkStringPadEnd() { if (String.prototype.padEnd) { return; } __webpack_require__("476b"); })(); // Provides support for Object.values in legacy browsers. // Support: IE, Chrome<54 (function checkObjectValues() { if (Object.values) { return; } Object.values = __webpack_require__("4e28"); })(); // Provides support for Object.entries in legacy browsers. // Support: IE, Chrome<54 (function checkObjectEntries() { if (Object.entries) { return; } Object.entries = __webpack_require__("a960"); })(); } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("b639").Buffer)) /***/ }), /***/ "7f65": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var call = __webpack_require__("c65b"); var toIntegerOrInfinity = __webpack_require__("5926"); var getIteratorDirect = __webpack_require__("46c4"); var INVALID_SIZE = 'Invalid size'; var $RangeError = RangeError; var $TypeError = TypeError; var max = Math.max; var SetRecord = function (set, intSize) { this.set = set; this.size = max(intSize, 0); this.has = aCallable(set.has); this.keys = aCallable(set.keys); }; SetRecord.prototype = { getIterator: function () { return getIteratorDirect(anObject(call(this.keys, this.set))); }, includes: function (it) { return call(this.has, this.set, it); } }; // `GetSetRecord` abstract operation // https://tc39.es/proposal-set-methods/#sec-getsetrecord module.exports = function (obj) { anObject(obj); var numSize = +obj.size; // NOTE: If size is undefined, then numSize will be NaN // eslint-disable-next-line no-self-compare -- NaN check if (numSize !== numSize) throw new $TypeError(INVALID_SIZE); var intSize = toIntegerOrInfinity(numSize); if (intSize < 0) throw new $RangeError(INVALID_SIZE); return new SetRecord(obj, intSize); }; /***/ }), /***/ "8006": /***/ (function(module, exports, __webpack_require__) { "use strict"; const char = function(a) { return String.fromCharCode(a); }; const chars = { nilChar: char(176), missingChar: char(201), nilPremitive: char(175), missingPremitive: char(200), emptyChar: char(178), emptyValue: char(177), //empty Premitive boundryChar: char(179), objStart: char(198), arrStart: char(204), arrayEnd: char(185), }; const charsArr = [ chars.nilChar, chars.nilPremitive, chars.missingChar, chars.missingPremitive, chars.boundryChar, chars.emptyChar, chars.emptyValue, chars.arrayEnd, chars.objStart, chars.arrStart, ]; const _e = function(node, e_schema, options) { if (typeof e_schema === 'string') { //premitive if (node && node[0] && node[0].val !== undefined) { return getValue(node[0].val, e_schema); } else { return getValue(node, e_schema); } } else { const hasValidData = hasData(node); if (hasValidData === true) { let str = ''; if (Array.isArray(e_schema)) { //attributes can't be repeated. hence check in children tags only str += chars.arrStart; const itemSchema = e_schema[0]; //var itemSchemaType = itemSchema; const arr_len = node.length; if (typeof itemSchema === 'string') { for (let arr_i = 0; arr_i < arr_len; arr_i++) { const r = getValue(node[arr_i].val, itemSchema); str = processValue(str, r); } } else { for (let arr_i = 0; arr_i < arr_len; arr_i++) { const r = _e(node[arr_i], itemSchema, options); str = processValue(str, r); } } str += chars.arrayEnd; //indicates that next item is not array item } else { //object str += chars.objStart; const keys = Object.keys(e_schema); if (Array.isArray(node)) { node = node[0]; } for (let i in keys) { const key = keys[i]; //a property defined in schema can be present either in attrsMap or children tags //options.textNodeName will not present in both maps, take it's value from val //options.attrNodeName will be present in attrsMap let r; if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) { r = _e(node.attrsMap[key], e_schema[key], options); } else if (key === options.textNodeName) { r = _e(node.val, e_schema[key], options); } else { r = _e(node.child[key], e_schema[key], options); } str = processValue(str, r); } } return str; } else { return hasValidData; } } }; const getValue = function(a /*, type*/) { switch (a) { case undefined: return chars.missingPremitive; case null: return chars.nilPremitive; case '': return chars.emptyValue; default: return a; } }; const processValue = function(str, r) { if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) { str += chars.boundryChar; } return str + r; }; const isAppChar = function(ch) { return charsArr.indexOf(ch) !== -1; }; function hasData(jObj) { if (jObj === undefined) { return chars.missingChar; } else if (jObj === null) { return chars.nilChar; } else if ( jObj.child && Object.keys(jObj.child).length === 0 && (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0) ) { return chars.emptyChar; } else { return true; } } const x2j = __webpack_require__("8a24"); const buildOptions = __webpack_require__("90da").buildOptions; const convert2nimn = function(node, e_schema, options) { options = buildOptions(options, x2j.defaultOptions, x2j.props); return _e(node, e_schema, options); }; exports.convert2nimn = convert2nimn; /***/ }), /***/ "8060": /***/ (function(module, exports, __webpack_require__) { module.exports = { sm2: __webpack_require__("526b"), sm3: __webpack_require__("72fa"), sm4: __webpack_require__("10d11"), } /***/ }), /***/ "80e0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.replace` well-known symbol // https://tc39.es/ecma262/#sec-symbol.replace defineWellKnownSymbol('replace'); /***/ }), /***/ "8172": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); var defineSymbolToPrimitive = __webpack_require__("57b9"); // `Symbol.toPrimitive` well-known symbol // https://tc39.es/ecma262/#sec-symbol.toprimitive defineWellKnownSymbol('toPrimitive'); // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive defineSymbolToPrimitive(); /***/ }), /***/ "81a2": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return parseOfdDocument; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return renderOfd; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return renderOfdByScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return digestCheck; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setPageScale; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getPageScale; }); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("14d9"); /* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2c66"); /* harmony import */ var core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_detached_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("249d"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("40e9"); /* harmony import */ var core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_buffer_transfer_to_fixed_length_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("7efc"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__["a"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__["b"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "h", function() { return _utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__["c"]; }); /* harmony import */ var _utils_ofd_pipeline__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("3662"); /* harmony import */ var _utils_ofd_ofd_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("67d3"); /* harmony import */ var _utils_ofd_ses_signature_parser__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("a9c6"); /* harmony import */ var _utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("6b33"); /* harmony import */ var jszip_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("0083"); /* harmony import */ var jszip_utils__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jszip_utils__WEBPACK_IMPORTED_MODULE_9__); /* * ofd.js - A Javascript class for reading and rendering ofd files * * * Copyright (c) 2020. DLTech21 All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ const parseOfdDocument = function (options) { if (options.ofd instanceof File || options.ofd instanceof ArrayBuffer) { doParseOFD(options); } else { jszip_utils__WEBPACK_IMPORTED_MODULE_9__["getBinaryContent"](options.ofd, function (err, data) { if (err) { if (options.fail) { options.fail(err); } } else { options.ofd = data; doParseOFD(options); } }); } }; const doParseOFD = function (options) { global.xmlParseFlag = 0; _utils_ofd_pipeline__WEBPACK_IMPORTED_MODULE_5__[/* pipeline */ "a"].call(this, async () => await Object(_utils_ofd_ofd_parser__WEBPACK_IMPORTED_MODULE_6__[/* unzipOfd */ "c"])(options.ofd), _utils_ofd_ofd_parser__WEBPACK_IMPORTED_MODULE_6__[/* getDocRoots */ "a"], _utils_ofd_ofd_parser__WEBPACK_IMPORTED_MODULE_6__[/* parseSingleDoc */ "b"]).then(res => { if (options.success) { options.success(res); } }).catch(res => { console.log(res); if (options.fail) { options.fail(res); } }); }; const renderOfd = function (screenWidth, ofd) { let divArray = []; if (!ofd) { return divArray; } for (const page of ofd.pages) { let box = Object(_utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__[/* calPageBox */ "a"])(screenWidth, ofd.document, page); const pageId = Object.keys(page)[0]; let pageDiv = document.createElement('div'); pageDiv.id = pageId; pageDiv.setAttribute('style', `margin-bottom: 20px;position: relative;width:${box.w}px;height:${box.h}px;background: white;`); Object(_utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__[/* renderPage */ "c"])(pageDiv, page, ofd.tpls, ofd.fontResObj, ofd.drawParamResObj, ofd.multiMediaResObj); divArray.push(pageDiv); } return divArray; }; const renderOfdByScale = function (ofd) { let divArray = []; if (!ofd) { return divArray; } for (const page of ofd.pages) { let box = Object(_utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__[/* calPageBoxScale */ "b"])(ofd.document, page); const pageId = Object.keys(page)[0]; let pageDiv = document.createElement('div'); pageDiv.id = pageId; pageDiv.setAttribute('style', `margin-bottom: 20px;position: relative;width:${box.w}px;height:${box.h}px;background: white;`); Object(_utils_ofd_ofd_render__WEBPACK_IMPORTED_MODULE_4__[/* renderPage */ "c"])(pageDiv, page, ofd.tpls, ofd.fontResObj, ofd.drawParamResObj, ofd.multiMediaResObj); divArray.push(pageDiv); } return divArray; }; const digestCheck = function (options) { // pipeline.call(this, async () => await digestCheckProcess(options.arr)) // .then(res => { // if (options.success) { // options.success(res); // } // }); return Object(_utils_ofd_ses_signature_parser__WEBPACK_IMPORTED_MODULE_7__[/* digestCheckProcess */ "a"])(options); }; const setPageScale = function (scale) { Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_8__[/* setPageScal */ "o"])(scale); }; const getPageScale = function () { return Object(_utils_ofd_ofd_util__WEBPACK_IMPORTED_MODULE_8__[/* getPageScal */ "i"])(); }; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "81b8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.unscopables` well-known symbol // https://tc39.es/ecma262/#sec-symbol.unscopables defineWellKnownSymbol('unscopables'); /***/ }), /***/ "81fa": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) { var navigator = {}; navigator.userAgent = false; var window = {}; /* * jsrsasign(all) 9.1.9 (2020-09-08) (c) 2010-2020 Kenji Urushima | kjur.github.com/jsrsasign/license */ /*! Copyright (c) 2011, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 2.9.0 */ if(YAHOO===undefined){var YAHOO={}}YAHOO.lang={extend:function(g,h,f){if(!h||!g){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.")}var d=function(){};d.prototype=h.prototype;g.prototype=new d();g.prototype.constructor=g;g.superclass=h.prototype;if(h.prototype.constructor==Object.prototype.constructor){h.prototype.constructor=h}if(f){var b;for(b in f){g.prototype[b]=f[b]}var e=function(){},c=["toString","valueOf"];try{if(/MSIE/.test(navigator.userAgent)){e=function(j,i){for(b=0;b>>2]>>>(24-(r%4)*8))&255;q[(n+r)>>>2]|=o<<(24-((n+r)%4)*8)}}else{for(var r=0;r>>2]=p[r>>>2]}}this.sigBytes+=s;return this},clamp:function(){var o=this.words;var n=this.sigBytes;o[n>>>2]&=4294967295<<(32-(n%4)*8);o.length=e.ceil(n/4)},clone:function(){var n=j.clone.call(this);n.words=this.words.slice(0);return n},random:function(p){var o=[];for(var n=0;n>>2]>>>(24-(n%4)*8))&255;q.push((s>>>4).toString(16));q.push((s&15).toString(16))}return q.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o>>3]|=parseInt(p.substr(o,2),16)<<(24-(o%8)*4)}return new l.init(q,n/2)}};var d=m.Latin1={stringify:function(q){var r=q.words;var p=q.sigBytes;var n=[];for(var o=0;o>>2]>>>(24-(o%4)*8))&255;n.push(String.fromCharCode(s))}return n.join("")},parse:function(p){var n=p.length;var q=[];for(var o=0;o>>2]|=(p.charCodeAt(o)&255)<<(24-(o%4)*8)}return new l.init(q,n)}};var c=m.Utf8={stringify:function(n){try{return decodeURIComponent(escape(d.stringify(n)))}catch(o){throw new Error("Malformed UTF-8 data")}},parse:function(n){return d.parse(unescape(encodeURIComponent(n)))}};var i=b.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new l.init();this._nDataBytes=0},_append:function(n){if(typeof n=="string"){n=c.parse(n)}this._data.concat(n);this._nDataBytes+=n.sigBytes},_process:function(w){var q=this._data;var x=q.words;var n=q.sigBytes;var t=this.blockSize;var v=t*4;var u=n/v;if(w){u=e.ceil(u)}else{u=e.max((u|0)-this._minBufferSize,0)}var s=u*t;var r=e.min(s*4,n);if(s){for(var p=0;p>>2]&255}};f.BlockCipher=n.extend({cfg:n.cfg.extend({mode:m,padding:h}),reset:function(){n.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1; this._mode=c.call(a,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var p=f.CipherParams=k.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),m=(g.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt; return(a?l.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=l.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return p.create({ciphertext:a,salt:c})}},j=f.SerializableCipher=k.extend({cfg:k.extend({format:m}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d);b=e.finalize(b);e=e.cfg;return p.create({ciphertext:b,key:c,iv:e.iv,algorithm:a,mode:e.mode,padding:e.padding, blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),g=(g.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=l.random(8));a=v.create({keySize:b+c}).compute(a,d);c=l.create(a.words.slice(b),4*c);a.sigBytes=4*b;return p.create({key:a,iv:c,salt:d})}},s=f.PasswordBasedCipher=j.extend({cfg:j.cfg.extend({kdf:g}),encrypt:function(a, b,c,d){d=this.cfg.extend(d);c=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=c.iv;a=j.encrypt.call(this,a,b,c.key,d);a.mixIn(c);return a},decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);c=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=c.iv;return j.decrypt.call(this,a,b,c.key,d)}})}(); /* CryptoJS v3.1.2 aes.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){for(var q=CryptoJS,x=q.lib.BlockCipher,r=q.algo,j=[],y=[],z=[],A=[],B=[],C=[],s=[],u=[],v=[],w=[],g=[],k=0;256>k;k++)g[k]=128>k?k<<1:k<<1^283;for(var n=0,l=0,k=0;256>k;k++){var f=l^l<<1^l<<2^l<<3^l<<4,f=f>>>8^f&255^99;j[n]=f;y[f]=n;var t=g[n],D=g[t],E=g[D],b=257*g[f]^16843008*f;z[n]=b<<24|b>>>8;A[n]=b<<16|b>>>16;B[n]=b<<8|b>>>24;C[n]=b;b=16843009*E^65537*D^257*t^16843008*n;s[f]=b<<24|b>>>8;u[f]=b<<16|b>>>16;v[f]=b<<8|b>>>24;w[f]=b;n?(n=t^g[g[g[E^t]]],l^=g[g[l]]):n=l=1}var F=[0,1,2,4,8, 16,32,64,128,27,54],r=r.AES=x.extend({_doReset:function(){for(var c=this._key,e=c.words,a=c.sigBytes/4,c=4*((this._nRounds=a+6)+1),b=this._keySchedule=[],h=0;h>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255]):(d=d<<8|d>>>24,d=j[d>>>24]<<24|j[d>>>16&255]<<16|j[d>>>8&255]<<8|j[d&255],d^=F[h/a|0]<<24);b[h]=b[h-a]^d}e=this._invKeySchedule=[];for(a=0;aa||4>=h?d:s[j[d>>>24]]^u[j[d>>>16&255]]^v[j[d>>> 8&255]]^w[j[d&255]]},encryptBlock:function(c,e){this._doCryptBlock(c,e,this._keySchedule,z,A,B,C,j)},decryptBlock:function(c,e){var a=c[e+1];c[e+1]=c[e+3];c[e+3]=a;this._doCryptBlock(c,e,this._invKeySchedule,s,u,v,w,y);a=c[e+1];c[e+1]=c[e+3];c[e+3]=a},_doCryptBlock:function(c,e,a,b,h,d,j,m){for(var n=this._nRounds,f=c[e]^a[0],g=c[e+1]^a[1],k=c[e+2]^a[2],p=c[e+3]^a[3],l=4,t=1;t>>24]^h[g>>>16&255]^d[k>>>8&255]^j[p&255]^a[l++],r=b[g>>>24]^h[k>>>16&255]^d[p>>>8&255]^j[f&255]^a[l++],s= b[k>>>24]^h[p>>>16&255]^d[f>>>8&255]^j[g&255]^a[l++],p=b[p>>>24]^h[f>>>16&255]^d[g>>>8&255]^j[k&255]^a[l++],f=q,g=r,k=s;q=(m[f>>>24]<<24|m[g>>>16&255]<<16|m[k>>>8&255]<<8|m[p&255])^a[l++];r=(m[g>>>24]<<24|m[k>>>16&255]<<16|m[p>>>8&255]<<8|m[f&255])^a[l++];s=(m[k>>>24]<<24|m[p>>>16&255]<<16|m[f>>>8&255]<<8|m[g&255])^a[l++];p=(m[p>>>24]<<24|m[f>>>16&255]<<16|m[g>>>8&255]<<8|m[k&255])^a[l++];c[e]=q;c[e+1]=r;c[e+2]=s;c[e+3]=p},keySize:8});q.AES=x._createHelper(r)})(); /* CryptoJS v3.1.2 tripledes-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){function j(b,c){var a=(this._lBlock>>>b^this._rBlock)&c;this._rBlock^=a;this._lBlock^=a<>>b^this._lBlock)&c;this._lBlock^=a;this._rBlock^=a<a;a++){var f=q[a]-1;c[a]=b[f>>>5]>>>31-f%32&1}b=this._subKeys=[];for(f=0;16>f;f++){for(var d=b[f]=[],e=r[f],a=0;24>a;a++)d[a/6|0]|=c[(p[a]-1+e)%28]<<31-a%6,d[4+(a/6|0)]|=c[28+(p[a+24]-1+e)%28]<<31-a%6;d[0]=d[0]<<1|d[0]>>>31;for(a=1;7>a;a++)d[a]>>>= 4*(a-1)+3;d[7]=d[7]<<5|d[7]>>>27}c=this._invSubKeys=[];for(a=0;16>a;a++)c[a]=b[15-a]},encryptBlock:function(b,c){this._doCryptBlock(b,c,this._subKeys)},decryptBlock:function(b,c){this._doCryptBlock(b,c,this._invSubKeys)},_doCryptBlock:function(b,c,a){this._lBlock=b[c];this._rBlock=b[c+1];j.call(this,4,252645135);j.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);j.call(this,1,1431655765);for(var f=0;16>f;f++){for(var d=a[f],e=this._lBlock,h=this._rBlock,g=0,k=0;8>k;k++)g|=s[k][((h^ d[k])&t[k])>>>0];this._lBlock=h;this._rBlock=e^g}a=this._lBlock;this._lBlock=this._rBlock;this._rBlock=a;j.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);j.call(this,16,65535);j.call(this,4,252645135);b[c]=this._lBlock;b[c+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});h.DES=e._createHelper(m);g=g.TripleDES=e.extend({_doReset:function(){var b=this._key.words;this._des1=m.createEncryptor(n.create(b.slice(0,2)));this._des2=m.createEncryptor(n.create(b.slice(2,4)));this._des3= m.createEncryptor(n.create(b.slice(4,6)))},encryptBlock:function(b,c){this._des1.encryptBlock(b,c);this._des2.decryptBlock(b,c);this._des3.encryptBlock(b,c)},decryptBlock:function(b,c){this._des3.decryptBlock(b,c);this._des2.encryptBlock(b,c);this._des1.decryptBlock(b,c)},keySize:6,ivSize:2,blockSize:2});h.TripleDES=e._createHelper(g)})(); /* CryptoJS v3.1.2 enc-base64.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); /* CryptoJS v3.1.2 md5.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(E){function h(a,f,g,j,p,h,k){a=a+(f&g|~f&j)+p+k;return(a<>>32-h)+f}function k(a,f,g,j,p,h,k){a=a+(f&j|g&~j)+p+k;return(a<>>32-h)+f}function l(a,f,g,j,h,k,l){a=a+(f^g^j)+h+l;return(a<>>32-k)+f}function n(a,f,g,j,h,k,l){a=a+(g^(f|~j))+h+l;return(a<>>32-k)+f}for(var r=CryptoJS,q=r.lib,F=q.WordArray,s=q.Hasher,q=r.algo,a=[],t=0;64>t;t++)a[t]=4294967296*E.abs(E.sin(t+1))|0;q=q.MD5=s.extend({_doReset:function(){this._hash=new F.init([1732584193,4023233417,2562383102,271733878])}, _doProcessBlock:function(m,f){for(var g=0;16>g;g++){var j=f+g,p=m[j];m[j]=(p<<8|p>>>24)&16711935|(p<<24|p>>>8)&4278255360}var g=this._hash.words,j=m[f+0],p=m[f+1],q=m[f+2],r=m[f+3],s=m[f+4],t=m[f+5],u=m[f+6],v=m[f+7],w=m[f+8],x=m[f+9],y=m[f+10],z=m[f+11],A=m[f+12],B=m[f+13],C=m[f+14],D=m[f+15],b=g[0],c=g[1],d=g[2],e=g[3],b=h(b,c,d,e,j,7,a[0]),e=h(e,b,c,d,p,12,a[1]),d=h(d,e,b,c,q,17,a[2]),c=h(c,d,e,b,r,22,a[3]),b=h(b,c,d,e,s,7,a[4]),e=h(e,b,c,d,t,12,a[5]),d=h(d,e,b,c,u,17,a[6]),c=h(c,d,e,b,v,22,a[7]), b=h(b,c,d,e,w,7,a[8]),e=h(e,b,c,d,x,12,a[9]),d=h(d,e,b,c,y,17,a[10]),c=h(c,d,e,b,z,22,a[11]),b=h(b,c,d,e,A,7,a[12]),e=h(e,b,c,d,B,12,a[13]),d=h(d,e,b,c,C,17,a[14]),c=h(c,d,e,b,D,22,a[15]),b=k(b,c,d,e,p,5,a[16]),e=k(e,b,c,d,u,9,a[17]),d=k(d,e,b,c,z,14,a[18]),c=k(c,d,e,b,j,20,a[19]),b=k(b,c,d,e,t,5,a[20]),e=k(e,b,c,d,y,9,a[21]),d=k(d,e,b,c,D,14,a[22]),c=k(c,d,e,b,s,20,a[23]),b=k(b,c,d,e,x,5,a[24]),e=k(e,b,c,d,C,9,a[25]),d=k(d,e,b,c,r,14,a[26]),c=k(c,d,e,b,w,20,a[27]),b=k(b,c,d,e,B,5,a[28]),e=k(e,b, c,d,q,9,a[29]),d=k(d,e,b,c,v,14,a[30]),c=k(c,d,e,b,A,20,a[31]),b=l(b,c,d,e,t,4,a[32]),e=l(e,b,c,d,w,11,a[33]),d=l(d,e,b,c,z,16,a[34]),c=l(c,d,e,b,C,23,a[35]),b=l(b,c,d,e,p,4,a[36]),e=l(e,b,c,d,s,11,a[37]),d=l(d,e,b,c,v,16,a[38]),c=l(c,d,e,b,y,23,a[39]),b=l(b,c,d,e,B,4,a[40]),e=l(e,b,c,d,j,11,a[41]),d=l(d,e,b,c,r,16,a[42]),c=l(c,d,e,b,u,23,a[43]),b=l(b,c,d,e,x,4,a[44]),e=l(e,b,c,d,A,11,a[45]),d=l(d,e,b,c,D,16,a[46]),c=l(c,d,e,b,q,23,a[47]),b=n(b,c,d,e,j,6,a[48]),e=n(e,b,c,d,v,10,a[49]),d=n(d,e,b,c, C,15,a[50]),c=n(c,d,e,b,t,21,a[51]),b=n(b,c,d,e,A,6,a[52]),e=n(e,b,c,d,r,10,a[53]),d=n(d,e,b,c,y,15,a[54]),c=n(c,d,e,b,p,21,a[55]),b=n(b,c,d,e,w,6,a[56]),e=n(e,b,c,d,D,10,a[57]),d=n(d,e,b,c,u,15,a[58]),c=n(c,d,e,b,B,21,a[59]),b=n(b,c,d,e,s,6,a[60]),e=n(e,b,c,d,z,10,a[61]),d=n(d,e,b,c,q,15,a[62]),c=n(c,d,e,b,x,21,a[63]);g[0]=g[0]+b|0;g[1]=g[1]+c|0;g[2]=g[2]+d|0;g[3]=g[3]+e|0},_doFinalize:function(){var a=this._data,f=a.words,g=8*this._nDataBytes,j=8*a.sigBytes;f[j>>>5]|=128<<24-j%32;var h=E.floor(g/ 4294967296);f[(j+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;f[(j+64>>>9<<4)+14]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360;a.sigBytes=4*(f.length+1);this._process();a=this._hash;f=a.words;for(g=0;4>g;g++)j=f[g],f[g]=(j<<8|j>>>24)&16711935|(j<<24|j>>>8)&4278255360;return a},clone:function(){var a=s.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=s._createHelper(q);r.HmacMD5=s._createHmacHelper(q)})(Math); /* CryptoJS v3.1.2 sha1-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){var k=CryptoJS,b=k.lib,m=b.WordArray,l=b.Hasher,d=[],b=k.algo.SHA1=l.extend({_doReset:function(){this._hash=new m.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(n,p){for(var a=this._hash.words,e=a[0],f=a[1],h=a[2],j=a[3],b=a[4],c=0;80>c;c++){if(16>c)d[c]=n[p+c]|0;else{var g=d[c-3]^d[c-8]^d[c-14]^d[c-16];d[c]=g<<1|g>>>31}g=(e<<5|e>>>27)+b+d[c];g=20>c?g+((f&h|~f&j)+1518500249):40>c?g+((f^h^j)+1859775393):60>c?g+((f&h|f&j|h&j)-1894007588):g+((f^h^ j)-899497514);b=j;j=h;h=f<<30|f>>>2;f=e;e=g}a[0]=a[0]+e|0;a[1]=a[1]+f|0;a[2]=a[2]+h|0;a[3]=a[3]+j|0;a[4]=a[4]+b|0},_doFinalize:function(){var b=this._data,d=b.words,a=8*this._nDataBytes,e=8*b.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=Math.floor(a/4294967296);d[(e+64>>>9<<4)+15]=a;b.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var b=l.clone.call(this);b._hash=this._hash.clone();return b}});k.SHA1=l._createHelper(b);k.HmacSHA1=l._createHmacHelper(b)})(); /* CryptoJS v3.1.2 sha256-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(k){for(var g=CryptoJS,h=g.lib,v=h.WordArray,j=h.Hasher,h=g.algo,s=[],t=[],u=function(q){return 4294967296*(q-(q|0))|0},l=2,b=0;64>b;){var d;a:{d=l;for(var w=k.sqrt(d),r=2;r<=w;r++)if(!(d%r)){d=!1;break a}d=!0}d&&(8>b&&(s[b]=u(k.pow(l,0.5))),t[b]=u(k.pow(l,1/3)),b++);l++}var n=[],h=h.SHA256=j.extend({_doReset:function(){this._hash=new v.init(s.slice(0))},_doProcessBlock:function(q,h){for(var a=this._hash.words,c=a[0],d=a[1],b=a[2],k=a[3],f=a[4],g=a[5],j=a[6],l=a[7],e=0;64>e;e++){if(16>e)n[e]= q[h+e]|0;else{var m=n[e-15],p=n[e-2];n[e]=((m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3)+n[e-7]+((p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10)+n[e-16]}m=l+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&g^~f&j)+t[e]+n[e];p=((c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22))+(c&d^c&b^d&b);l=j;j=g;g=f;f=k+m|0;k=b;b=d;d=c;c=m+p|0}a[0]=a[0]+c|0;a[1]=a[1]+d|0;a[2]=a[2]+b|0;a[3]=a[3]+k|0;a[4]=a[4]+f|0;a[5]=a[5]+g|0;a[6]=a[6]+j|0;a[7]=a[7]+l|0},_doFinalize:function(){var d=this._data,b=d.words,a=8*this._nDataBytes,c=8*d.sigBytes; b[c>>>5]|=128<<24-c%32;b[(c+64>>>9<<4)+14]=k.floor(a/4294967296);b[(c+64>>>9<<4)+15]=a;d.sigBytes=4*b.length;this._process();return this._hash},clone:function(){var b=j.clone.call(this);b._hash=this._hash.clone();return b}});g.SHA256=j._createHelper(h);g.HmacSHA256=j._createHmacHelper(h)})(Math); /* CryptoJS v3.1.2 sha224-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){var b=CryptoJS,d=b.lib.WordArray,a=b.algo,c=a.SHA256,a=a.SHA224=c.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=c._doFinalize.call(this);a.sigBytes-=4;return a}});b.SHA224=c._createHelper(a);b.HmacSHA224=c._createHmacHelper(a)})(); /* CryptoJS v3.1.2 sha512-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){function a(){return d.create.apply(d,arguments)}for(var n=CryptoJS,r=n.lib.Hasher,e=n.x64,d=e.Word,T=e.WordArray,e=n.algo,ea=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317), a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291, 2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899), a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470, 3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],v=[],w=0;80>w;w++)v[w]=a();e=e.SHA512=r.extend({_doReset:function(){this._hash=new T.init([new d.init(1779033703,4089235720),new d.init(3144134277,2227873595),new d.init(1013904242,4271175723),new d.init(2773480762,1595750129),new d.init(1359893119,2917565137),new d.init(2600822924,725511199),new d.init(528734635,4215389547),new d.init(1541459225,327033209)])},_doProcessBlock:function(a,d){for(var f=this._hash.words, F=f[0],e=f[1],n=f[2],r=f[3],G=f[4],H=f[5],I=f[6],f=f[7],w=F.high,J=F.low,X=e.high,K=e.low,Y=n.high,L=n.low,Z=r.high,M=r.low,$=G.high,N=G.low,aa=H.high,O=H.low,ba=I.high,P=I.low,ca=f.high,Q=f.low,k=w,g=J,z=X,x=K,A=Y,y=L,U=Z,B=M,l=$,h=N,R=aa,C=O,S=ba,D=P,V=ca,E=Q,m=0;80>m;m++){var s=v[m];if(16>m)var j=s.high=a[d+2*m]|0,b=s.low=a[d+2*m+1]|0;else{var j=v[m-15],b=j.high,p=j.low,j=(b>>>1|p<<31)^(b>>>8|p<<24)^b>>>7,p=(p>>>1|b<<31)^(p>>>8|b<<24)^(p>>>7|b<<25),u=v[m-2],b=u.high,c=u.low,u=(b>>>19|c<<13)^(b<< 3|c>>>29)^b>>>6,c=(c>>>19|b<<13)^(c<<3|b>>>29)^(c>>>6|b<<26),b=v[m-7],W=b.high,t=v[m-16],q=t.high,t=t.low,b=p+b.low,j=j+W+(b>>>0

>>0?1:0),b=b+c,j=j+u+(b>>>0>>0?1:0),b=b+t,j=j+q+(b>>>0>>0?1:0);s.high=j;s.low=b}var W=l&R^~l&S,t=h&C^~h&D,s=k&z^k&A^z&A,T=g&x^g&y^x&y,p=(k>>>28|g<<4)^(k<<30|g>>>2)^(k<<25|g>>>7),u=(g>>>28|k<<4)^(g<<30|k>>>2)^(g<<25|k>>>7),c=ea[m],fa=c.high,da=c.low,c=E+((h>>>14|l<<18)^(h>>>18|l<<14)^(h<<23|l>>>9)),q=V+((l>>>14|h<<18)^(l>>>18|h<<14)^(l<<23|h>>>9))+(c>>>0>>0?1: 0),c=c+t,q=q+W+(c>>>0>>0?1:0),c=c+da,q=q+fa+(c>>>0>>0?1:0),c=c+b,q=q+j+(c>>>0>>0?1:0),b=u+T,s=p+s+(b>>>0>>0?1:0),V=S,E=D,S=R,D=C,R=l,C=h,h=B+c|0,l=U+q+(h>>>0>>0?1:0)|0,U=A,B=y,A=z,y=x,z=k,x=g,g=c+b|0,k=q+s+(g>>>0>>0?1:0)|0}J=F.low=J+g;F.high=w+k+(J>>>0>>0?1:0);K=e.low=K+x;e.high=X+z+(K>>>0>>0?1:0);L=n.low=L+y;n.high=Y+A+(L>>>0>>0?1:0);M=r.low=M+B;r.high=Z+U+(M>>>0>>0?1:0);N=G.low=N+h;G.high=$+l+(N>>>0>>0?1:0);O=H.low=O+C;H.high=aa+R+(O>>>0>>0?1:0);P=I.low=P+D; I.high=ba+S+(P>>>0>>0?1:0);Q=f.low=Q+E;f.high=ca+V+(Q>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,d=a.words,f=8*this._nDataBytes,e=8*a.sigBytes;d[e>>>5]|=128<<24-e%32;d[(e+128>>>10<<5)+30]=Math.floor(f/4294967296);d[(e+128>>>10<<5)+31]=f;a.sigBytes=4*d.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});n.SHA512=r._createHelper(e);n.HmacSHA512=r._createHmacHelper(e)})(); /* CryptoJS v3.1.2 sha384-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){var c=CryptoJS,a=c.x64,b=a.Word,e=a.WordArray,a=c.algo,d=a.SHA512,a=a.SHA384=d.extend({_doReset:function(){this._hash=new e.init([new b.init(3418070365,3238371032),new b.init(1654270250,914150663),new b.init(2438529370,812702999),new b.init(355462360,4144912697),new b.init(1731405415,4290775857),new b.init(2394180231,1750603025),new b.init(3675008525,1694076839),new b.init(1203062813,3204075428)])},_doFinalize:function(){var a=d._doFinalize.call(this);a.sigBytes-=16;return a}});c.SHA384= d._createHelper(a);c.HmacSHA384=d._createHmacHelper(a)})(); /* CryptoJS v3.1.2 ripemd160-min.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ /* (c) 2012 by Cedric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ (function(){var q=CryptoJS,d=q.lib,n=d.WordArray,p=d.Hasher,d=q.algo,x=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),y=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),z=n.create([11,14,15,12, 5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),A=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),B=n.create([0,1518500249,1859775393,2400959708,2840853838]),C=n.create([1352829926,1548603684,1836072691, 2053994217,0]),d=d.RIPEMD160=p.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,v){for(var b=0;16>b;b++){var c=v+b,f=e[c];e[c]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360}var c=this._hash.words,f=B.words,d=C.words,n=x.words,q=y.words,p=z.words,w=A.words,t,g,h,j,r,u,k,l,m,s;u=t=c[0];k=g=c[1];l=h=c[2];m=j=c[3];s=r=c[4];for(var a,b=0;80>b;b+=1)a=t+e[v+n[b]]|0,a=16>b?a+((g^h^j)+f[0]):32>b?a+((g&h|~g&j)+f[1]):48>b? a+(((g|~h)^j)+f[2]):64>b?a+((g&j|h&~j)+f[3]):a+((g^(h|~j))+f[4]),a|=0,a=a<>>32-p[b],a=a+r|0,t=r,r=j,j=h<<10|h>>>22,h=g,g=a,a=u+e[v+q[b]]|0,a=16>b?a+((k^(l|~m))+d[0]):32>b?a+((k&m|l&~m)+d[1]):48>b?a+(((k|~l)^m)+d[2]):64>b?a+((k&l|~k&m)+d[3]):a+((k^l^m)+d[4]),a|=0,a=a<>>32-w[b],a=a+s|0,u=s,s=m,m=l<<10|l>>>22,l=k,k=a;a=c[1]+h+m|0;c[1]=c[2]+j+s|0;c[2]=c[3]+r+u|0;c[3]=c[4]+t+k|0;c[4]=c[0]+g+l|0;c[0]=a},_doFinalize:function(){var e=this._data,d=e.words,b=8*this._nDataBytes,c=8*e.sigBytes; d[c>>>5]|=128<<24-c%32;d[(c+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;e.sigBytes=4*(d.length+1);this._process();e=this._hash;d=e.words;for(b=0;5>b;b++)c=d[b],d[b]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return e},clone:function(){var d=p.clone.call(this);d._hash=this._hash.clone();return d}});q.RIPEMD160=p._createHelper(d);q.HmacRIPEMD160=p._createHmacHelper(d)})(Math); /* CryptoJS v3.1.2 hmac.js code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ (function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d>6)+b64map.charAt(e&63)}if(b+1==d.length){e=parseInt(d.substring(b,b+1),16);a+=b64map.charAt(e<<2)}else{if(b+2==d.length){e=parseInt(d.substring(b,b+2),16);a+=b64map.charAt(e>>2)+b64map.charAt((e&3)<<4)}}if(b64pad){while((a.length&3)>0){a+=b64pad}}return a}function b64tohex(f){var d="";var e;var b=0;var c;var a;for(e=0;e>2);c=a&3;b=1}else{if(b==1){d+=int2char((c<<2)|(a>>4));c=a&15;b=2}else{if(b==2){d+=int2char(c);d+=int2char(a>>2);c=a&3;b=3}else{d+=int2char((c<<2)|(a>>4));d+=int2char(a&15);b=0}}}}if(b==1){d+=int2char(c<<2)}return d}function b64toBA(e){var d=b64tohex(e);var c;var b=new Array();for(c=0;2*c=0){var d=a*this[f++]+b[e]+h;h=Math.floor(d/67108864);b[e++]=d&67108863}return h}function am2(f,q,r,e,o,a){var k=q&32767,p=q>>15;while(--a>=0){var d=this[f]&32767;var g=this[f++]>>15;var b=p*d+g*k;d=k*d+((b&32767)<<15)+r[e]+(o&1073741823);o=(d>>>30)+(b>>>15)+p*g+(o>>>30);r[e++]=d&1073741823}return o}function am3(f,q,r,e,o,a){var k=q&16383,p=q>>14;while(--a>=0){var d=this[f]&16383;var g=this[f++]>>14;var b=p*d+g*k;d=k*d+((b&16383)<<14)+r[e]+o;o=(d>>28)+(b>>14)+p*g;r[e++]=d&268435455}return o}if(j_lm&&(navigator.appName=="Microsoft Internet Explorer")){BigInteger.prototype.am=am2;dbits=30}else{if(j_lm&&(navigator.appName!="Netscape")){BigInteger.prototype.am=am1;dbits=26}else{BigInteger.prototype.am=am3;dbits=28}}BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=((1<=0;--a){b[a]=this[a]}b.t=this.t;b.s=this.s}function bnpFromInt(a){this.t=1;this.s=(a<0)?-1:0;if(a>0){this[0]=a}else{if(a<-1){this[0]=a+this.DV}else{this.t=0}}}function nbv(a){var b=nbi();b.fromInt(a);return b}function bnpFromString(h,c){var e;if(c==16){e=4}else{if(c==8){e=3}else{if(c==256){e=8}else{if(c==2){e=1}else{if(c==32){e=5}else{if(c==4){e=2}else{this.fromRadix(h,c);return}}}}}}this.t=0;this.s=0;var g=h.length,d=false,f=0;while(--g>=0){var a=(e==8)?h[g]&255:intAt(h,g);if(a<0){if(h.charAt(g)=="-"){d=true}continue}d=false;if(f==0){this[this.t++]=a}else{if(f+e>this.DB){this[this.t-1]|=(a&((1<<(this.DB-f))-1))<>(this.DB-f))}else{this[this.t-1]|=a<=this.DB){f-=this.DB}}if(e==8&&(h[0]&128)!=0){this.s=-1;if(f>0){this[this.t-1]|=((1<<(this.DB-f))-1)<0&&this[this.t-1]==a){--this.t}}function bnToString(c){if(this.s<0){return"-"+this.negate().toString(c)}var e;if(c==16){e=4}else{if(c==8){e=3}else{if(c==2){e=1}else{if(c==32){e=5}else{if(c==4){e=2}else{return this.toRadix(c)}}}}}var g=(1<0){if(j>j)>0){a=true;h=int2char(l)}while(f>=0){if(j>(j+=this.DB-e)}else{l=(this[f]>>(j-=e))&g;if(j<=0){j+=this.DB;--f}}if(l>0){a=true}if(a){h+=int2char(l)}}}return a?h:"0"}function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a}function bnAbs(){return(this.s<0)?this.negate():this}function bnCompareTo(b){var d=this.s-b.s;if(d!=0){return d}var c=this.t;d=c-b.t;if(d!=0){return(this.s<0)?-d:d}while(--c>=0){if((d=this[c]-b[c])!=0){return d}}return 0}function nbits(a){var c=1,b;if((b=a>>>16)!=0){a=b;c+=16}if((b=a>>8)!=0){a=b;c+=8}if((b=a>>4)!=0){a=b;c+=4}if((b=a>>2)!=0){a=b;c+=2}if((b=a>>1)!=0){a=b;c+=1}return c}function bnBitLength(){if(this.t<=0){return 0}return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM))}function bnpDLShiftTo(c,b){var a;for(a=this.t-1;a>=0;--a){b[a+c]=this[a]}for(a=c-1;a>=0;--a){b[a]=0}b.t=this.t+c;b.s=this.s}function bnpDRShiftTo(c,b){for(var a=c;a=0;--d){e[d+f+1]=(this[d]>>a)|h;h=(this[d]&g)<=0;--d){e[d]=0}e[f]=h;e.t=this.t+f+1;e.s=this.s;e.clamp()}function bnpRShiftTo(g,d){d.s=this.s;var e=Math.floor(g/this.DB);if(e>=this.t){d.t=0;return}var b=g%this.DB;var a=this.DB-b;var f=(1<>b;for(var c=e+1;c>b}if(b>0){d[this.t-e-1]|=(this.s&f)<>=this.DB}if(d.t>=this.DB}g+=this.s}else{g+=this.s;while(e>=this.DB}g-=d.s}f.s=(g<0)?-1:0;if(g<-1){f[e++]=this.DV+g}else{if(g>0){f[e++]=g}}f.t=e;f.clamp()}function bnpMultiplyTo(c,e){var b=this.abs(),f=c.abs();var d=b.t;e.t=d+f.t;while(--d>=0){e[d]=0}for(d=0;d=0){d[b]=0}for(b=0;b=a.DV){d[b+a.t]-=a.DV;d[b+a.t+1]=1}}if(d.t>0){d[d.t-1]+=a.am(b,a[b],d,2*b,0,1)}d.s=0;d.clamp()}function bnpDivRemTo(n,h,g){var w=n.abs();if(w.t<=0){return}var k=this.abs();if(k.t0){w.lShiftTo(v,d);k.lShiftTo(v,g)}else{w.copyTo(d);k.copyTo(g)}var p=d.t;var b=d[p-1];if(b==0){return}var o=b*(1<1)?d[p-2]>>this.F2:0);var A=this.FV/o,z=(1<=0){g[g.t++]=1;g.subTo(f,g)}BigInteger.ONE.dlShiftTo(p,f);f.subTo(d,d);while(d.t=0){var c=(g[--u]==b)?this.DM:Math.floor(g[u]*A+(g[u-1]+x)*z);if((g[u]+=d.am(0,c,g,s,0,p))0){g.rShiftTo(v,g)}if(a<0){BigInteger.ZERO.subTo(g,g)}}function bnMod(b){var c=nbi();this.abs().divRemTo(b,null,c);if(this.s<0&&c.compareTo(BigInteger.ZERO)>0){b.subTo(c,c)}return c}function Classic(a){this.m=a}function cConvert(a){if(a.s<0||a.compareTo(this.m)>=0){return a.mod(this.m)}else{return a}}function cRevert(a){return a}function cReduce(a){a.divRemTo(this.m,null,a)}function cMulTo(a,c,b){a.multiplyTo(c,b);this.reduce(b)}function cSqrTo(a,b){a.squareTo(b);this.reduce(b)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1){return 0}var a=this[0];if((a&1)==0){return 0}var b=a&3;b=(b*(2-(a&15)*b))&15;b=(b*(2-(a&255)*b))&255;b=(b*(2-(((a&65535)*b)&65535)))&65535;b=(b*(2-a*b%this.DV))%this.DV;return(b>0)?this.DV-b:-b}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<(a.DB-15))-1;this.mt2=2*a.t}function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);if(a.s<0&&b.compareTo(BigInteger.ZERO)>0){this.m.subTo(b,b)}return b}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b}function montReduce(a){while(a.t<=this.mt2){a[a.t++]=0}for(var c=0;c>15)*this.mpl)&this.um)<<15))&a.DM;b=c+this.m.t;a[b]+=this.m.am(0,d,a,c,0,this.m.t);while(a[b]>=a.DV){a[b]-=a.DV;a[++b]++}}a.clamp();a.drShiftTo(this.m.t,a);if(a.compareTo(this.m)>=0){a.subTo(this.m,a)}}function montSqrTo(a,b){a.squareTo(b);this.reduce(b)}function montMulTo(a,c,b){a.multiplyTo(c,b);this.reduce(b)}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return((this.t>0)?(this[0]&1):this.s)==0}function bnpExp(h,j){if(h>4294967295||h<1){return BigInteger.ONE}var f=nbi(),a=nbi(),d=j.convert(this),c=nbits(h)-1;d.copyTo(f);while(--c>=0){j.sqrTo(f,a);if((h&(1<0){j.mulTo(a,d,f)}else{var b=f;f=a;a=b}}return j.revert(f)}function bnModPowInt(b,a){var c;if(b<256||a.isEven()){c=new Classic(a)}else{c=new Montgomery(a)}return this.exp(b,c)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1); /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */ function bnClone(){var a=nbi();this.copyTo(a);return a}function bnIntValue(){if(this.s<0){if(this.t==1){return this[0]-this.DV}else{if(this.t==0){return -1}}}else{if(this.t==1){return this[0]}else{if(this.t==0){return 0}}}return((this[1]&((1<<(32-this.DB))-1))<>24}function bnShortValue(){return(this.t==0)?this.s:(this[0]<<16)>>16}function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a))}function bnSigNum(){if(this.s<0){return -1}else{if(this.t<=0||(this.t==1&&this[0]<=0)){return 0}else{return 1}}}function bnpToRadix(c){if(c==null){c=10}if(this.signum()==0||c<2||c>36){return"0"}var f=this.chunkSize(c);var e=Math.pow(c,f);var i=nbv(e),j=nbi(),h=nbi(),g="";this.divRemTo(i,j,h);while(j.signum()>0){g=(e+h.intValue()).toString(c).substr(1)+g;j.divRemTo(i,j,h)}return h.intValue().toString(c)+g}function bnpFromRadix(m,h){this.fromInt(0);if(h==null){h=10}var f=this.chunkSize(h);var g=Math.pow(h,f),e=false,a=0,l=0;for(var c=0;c=f){this.dMultiply(g);this.dAddOffset(l,0);a=0;l=0}}if(a>0){this.dMultiply(Math.pow(h,a));this.dAddOffset(l,0)}if(e){BigInteger.ZERO.subTo(this,this)}}function bnpFromNumber(f,e,h){if("number"==typeof e){if(f<2){this.fromInt(1)}else{this.fromNumber(f,h);if(!this.testBit(f-1)){this.bitwiseTo(BigInteger.ONE.shiftLeft(f-1),op_or,this)}if(this.isEven()){this.dAddOffset(1,0)}while(!this.isProbablePrime(e)){this.dAddOffset(2,0);if(this.bitLength()>f){this.subTo(BigInteger.ONE.shiftLeft(f-1),this)}}}}else{var d=new Array(),g=f&7;d.length=(f>>3)+1;e.nextBytes(d);if(g>0){d[0]&=((1<0){if(e>e)!=(this.s&this.DM)>>e){c[a++]=f|(this.s<<(this.DB-e))}while(b>=0){if(e<8){f=(this[b]&((1<>(e+=this.DB-8)}else{f=(this[b]>>(e-=8))&255;if(e<=0){e+=this.DB;--b}}if((f&128)!=0){f|=-256}if(a==0&&(this.s&128)!=(f&128)){++a}if(a>0||f!=this.s){c[a++]=f}}}return c}function bnEquals(b){return(this.compareTo(b)==0)}function bnMin(b){return(this.compareTo(b)<0)?this:b}function bnMax(b){return(this.compareTo(b)>0)?this:b}function bnpBitwiseTo(c,h,e){var d,g,b=Math.min(c.t,this.t);for(d=0;d>=16;b+=16}if((a&255)==0){a>>=8;b+=8}if((a&15)==0){a>>=4;b+=4}if((a&3)==0){a>>=2;b+=2}if((a&1)==0){++b}return b}function bnGetLowestSetBit(){for(var a=0;a=this.t){return(this.s!=0)}return((this[a]&(1<<(b%this.DB)))!=0)}function bnpChangeBit(c,b){var a=BigInteger.ONE.shiftLeft(c);this.bitwiseTo(a,b,a);return a}function bnSetBit(a){return this.changeBit(a,op_or)}function bnClearBit(a){return this.changeBit(a,op_andnot)}function bnFlipBit(a){return this.changeBit(a,op_xor)}function bnpAddTo(d,f){var e=0,g=0,b=Math.min(d.t,this.t);while(e>=this.DB}if(d.t>=this.DB}g+=this.s}else{g+=this.s;while(e>=this.DB}g+=d.s}f.s=(g<0)?-1:0;if(g>0){f[e++]=g}else{if(g<-1){f[e++]=this.DV+g}}f.t=e;f.clamp()}function bnAdd(b){var c=nbi();this.addTo(b,c);return c}function bnSubtract(b){var c=nbi();this.subTo(b,c);return c}function bnMultiply(b){var c=nbi();this.multiplyTo(b,c);return c}function bnSquare(){var a=nbi();this.squareTo(a);return a}function bnDivide(b){var c=nbi();this.divRemTo(b,c,null);return c}function bnRemainder(b){var c=nbi();this.divRemTo(b,null,c);return c}function bnDivideAndRemainder(b){var d=nbi(),c=nbi();this.divRemTo(b,d,c);return new Array(d,c)}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()}function bnpDAddOffset(b,a){if(b==0){return}while(this.t<=a){this[this.t++]=0}this[a]+=b;while(this[a]>=this.DV){this[a]-=this.DV;if(++a>=this.t){this[this.t++]=0}++this[a]}}function NullExp(){}function nNop(a){return a}function nMulTo(a,c,b){a.multiplyTo(c,b)}function nSqrTo(a,b){a.squareTo(b)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp())}function bnpMultiplyLowerTo(b,f,e){var d=Math.min(this.t+b.t,f);e.s=0;e.t=d;while(d>0){e[--d]=0}var c;for(c=e.t-this.t;d=0){d[c]=0}for(c=Math.max(e-this.t,0);c2*this.m.t){return a.mod(this.m)}else{if(a.compareTo(this.m)<0){return a}else{var b=nbi();a.copyTo(b);this.reduce(b);return b}}}function barrettRevert(a){return a}function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1){a.t=this.m.t+1;a.clamp()}this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(a.compareTo(this.r2)<0){a.dAddOffset(1,this.m.t+1)}a.subTo(this.r2,a);while(a.compareTo(this.m)>=0){a.subTo(this.m,a)}}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b)}function barrettMulTo(a,c,b){a.multiplyTo(c,b);this.reduce(b)}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(q,f){var o=q.bitLength(),h,b=nbv(1),v;if(o<=0){return b}else{if(o<18){h=1}else{if(o<48){h=3}else{if(o<144){h=4}else{if(o<768){h=5}else{h=6}}}}}if(o<8){v=new Classic(f)}else{if(f.isEven()){v=new Barrett(f)}else{v=new Montgomery(f)}}var p=new Array(),d=3,s=h-1,a=(1<1){var A=nbi();v.sqrTo(p[1],A);while(d<=a){p[d]=nbi();v.mulTo(A,p[d-2],p[d]);d+=2}}var l=q.t-1,x,u=true,c=nbi(),y;o=nbits(q[l])-1;while(l>=0){if(o>=s){x=(q[l]>>(o-s))&a}else{x=(q[l]&((1<<(o+1))-1))<<(s-o);if(l>0){x|=q[l-1]>>(this.DB+o-s)}}d=h;while((x&1)==0){x>>=1;--d}if((o-=d)<0){o+=this.DB;--l}if(u){p[x].copyTo(b);u=false}else{while(d>1){v.sqrTo(b,c);v.sqrTo(c,b);d-=2}if(d>0){v.sqrTo(b,c)}else{y=b;b=c;c=y}v.mulTo(c,p[x],b)}while(l>=0&&(q[l]&(1<0){b.rShiftTo(f,b);h.rShiftTo(f,h)}while(b.signum()>0){if((d=b.getLowestSetBit())>0){b.rShiftTo(d,b)}if((d=h.getLowestSetBit())>0){h.rShiftTo(d,h)}if(b.compareTo(h)>=0){b.subTo(h,b);b.rShiftTo(1,b)}else{h.subTo(b,h);h.rShiftTo(1,h)}}if(f>0){h.lShiftTo(f,h)}return h}function bnpModInt(e){if(e<=0){return 0}var c=this.DV%e,b=(this.s<0)?e-1:0;if(this.t>0){if(c==0){b=this[0]%e}else{for(var a=this.t-1;a>=0;--a){b=(c*b+this[a])%e}}}return b}function bnModInverse(f){var j=f.isEven();if((this.isEven()&&j)||f.signum()==0){return BigInteger.ZERO}var i=f.clone(),h=this.clone();var g=nbv(1),e=nbv(0),l=nbv(0),k=nbv(1);while(i.signum()!=0){while(i.isEven()){i.rShiftTo(1,i);if(j){if(!g.isEven()||!e.isEven()){g.addTo(this,g);e.subTo(f,e)}g.rShiftTo(1,g)}else{if(!e.isEven()){e.subTo(f,e)}}e.rShiftTo(1,e)}while(h.isEven()){h.rShiftTo(1,h);if(j){if(!l.isEven()||!k.isEven()){l.addTo(this,l);k.subTo(f,k)}l.rShiftTo(1,l)}else{if(!k.isEven()){k.subTo(f,k)}}k.rShiftTo(1,k)}if(i.compareTo(h)>=0){i.subTo(h,i);if(j){g.subTo(l,g)}e.subTo(k,e)}else{h.subTo(i,h);if(j){l.subTo(g,l)}k.subTo(e,k)}}if(h.compareTo(BigInteger.ONE)!=0){return BigInteger.ZERO}if(k.compareTo(f)>=0){return k.subtract(f)}if(k.signum()<0){k.addTo(f,k)}else{return k}if(k.signum()<0){return k.add(f)}else{return k}}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];var lplim=(1<<26)/lowprimes[lowprimes.length-1];function bnIsProbablePrime(e){var d,b=this.abs();if(b.t==1&&b[0]<=lowprimes[lowprimes.length-1]){for(d=0;d>1;if(f>lowprimes.length){f=lowprimes.length}var b=nbi();for(var e=0;e>8)&255;rng_pool[rng_pptr++]^=(a>>16)&255;rng_pool[rng_pptr++]^=(a>>24)&255;if(rng_pptr>=rng_psize){rng_pptr-=rng_psize}}function rng_seed_time(){rng_seed_int(new Date().getTime())}if(rng_pool==null){rng_pool=new Array();rng_pptr=0;var t;if(window!==undefined&&(window.crypto!==undefined||window.msCrypto!==undefined)){var crypto=window.crypto||window.msCrypto;if(crypto.getRandomValues){var ua=new Uint8Array(32);crypto.getRandomValues(ua);for(t=0;t<32;++t){rng_pool[rng_pptr++]=ua[t]}}else{if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var z=window.crypto.random(32);for(t=0;t>>8;rng_pool[rng_pptr++]=t&255}rng_pptr=0;rng_seed_time()}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr=0&&h>0){var f=e.charCodeAt(d--);if(f<128){g[--h]=f}else{if((f>127)&&(f<2048)){g[--h]=(f&63)|128;g[--h]=(f>>6)|192}else{g[--h]=(f&63)|128;g[--h]=((f>>6)&63)|128;g[--h]=(f>>12)|224}}}g[--h]=0;var b=new SecureRandom();var a=new Array();while(h>2){a[0]=0;while(a[0]==0){b.nextBytes(a)}g[--h]=a[0]}g[--h]=2;g[--h]=0;return new BigInteger(g)}function oaep_mgf1_arr(c,a,e){var b="",d=0;while(b.length>24,(d&16711680)>>16,(d&65280)>>8,d&255])));d+=1}return b}function oaep_pad(q,a,f,l){var c=KJUR.crypto.MessageDigest;var o=KJUR.crypto.Util;var b=null;if(!f){f="sha1"}if(typeof f==="string"){b=c.getCanonicalAlgName(f);l=c.getHashLength(b);f=function(i){return hextorstr(o.hashHex(rstrtohex(i),b))}}if(q.length+2*l+2>a){throw"Message too long for RSA"}var k="",e;for(e=0;e0&&a.length>0){this.n=parseBigInt(b,16);this.e=parseInt(a,16)}else{throw"Invalid RSA public key"}}}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(d){var a=pkcs1pad2(d,(this.n.bitLength()+7)>>3);if(a==null){return null}var e=this.doPublic(a);if(e==null){return null}var b=e.toString(16);if((b.length&1)==0){return b}else{return"0"+b}}function RSAEncryptOAEP(f,e,b){var a=oaep_pad(f,(this.n.bitLength()+7)>>3,e,b);if(a==null){return null}var g=this.doPublic(a);if(g==null){return null}var d=g.toString(16);if((d.length&1)==0){return d}else{return"0"+d}}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;RSAKey.prototype.encryptOAEP=RSAEncryptOAEP;RSAKey.prototype.type="RSA"; /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */ function pkcs1unpad2(g,j){var a=g.toByteArray();var f=0;while(f=a.length){return null}}var e="";while(++f191)&&(h<224)){e+=String.fromCharCode(((h&31)<<6)|(a[f+1]&63));++f}else{e+=String.fromCharCode(((h&15)<<12)|((a[f+1]&63)<<6)|(a[f+2]&63));f+=2}}}return e}function oaep_mgf1_str(c,a,e){var b="",d=0;while(b.length>24,(d&16711680)>>16,(d&65280)>>8,d&255]));d+=1}return b}function oaep_unpad(o,b,g,p){var e=KJUR.crypto.MessageDigest;var r=KJUR.crypto.Util;var c=null;if(!g){g="sha1"}if(typeof g==="string"){c=e.getCanonicalAlgName(g);p=e.getHashLength(c);g=function(d){return hextorstr(r.hashHex(rstrtohex(d),c))}}o=o.toByteArray();var h;for(h=0;h0&&a.length>0){this.n=parseBigInt(c,16);this.e=parseInt(a,16);this.d=parseBigInt(b,16)}else{throw"Invalid RSA private key"}}}function RSASetPrivateEx(g,d,e,c,b,a,h,f){this.isPrivate=true;this.isPublic=false;if(g==null){throw"RSASetPrivateEx N == null"}if(d==null){throw"RSASetPrivateEx E == null"}if(g.length==0){throw"RSASetPrivateEx N.length == 0"}if(d.length==0){throw"RSASetPrivateEx E.length == 0"}if(g!=null&&d!=null&&g.length>0&&d.length>0){this.n=parseBigInt(g,16);this.e=parseInt(d,16);this.d=parseBigInt(e,16);this.p=parseBigInt(c,16);this.q=parseBigInt(b,16);this.dmp1=parseBigInt(a,16);this.dmq1=parseBigInt(h,16);this.coeff=parseBigInt(f,16)}else{throw"Invalid RSA private key in RSASetPrivateEx"}}function RSAGenerate(b,i){var a=new SecureRandom();var f=b>>1;this.e=parseInt(i,16);var c=new BigInteger(i,16);for(;;){for(;;){this.p=new BigInteger(b-f,1,a);if(this.p.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10)){break}}for(;;){this.q=new BigInteger(f,1,a);if(this.q.subtract(BigInteger.ONE).gcd(c).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10)){break}}if(this.p.compareTo(this.q)<=0){var h=this.p;this.p=this.q;this.q=h}var g=this.p.subtract(BigInteger.ONE);var d=this.q.subtract(BigInteger.ONE);var e=g.multiply(d);if(e.gcd(c).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);if(this.n.bitLength()==b){this.d=c.modInverse(e);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(d);this.coeff=this.q.modInverse(this.p);break}}}this.isPrivate=true}function RSADoPrivate(a){if(this.p==null||this.q==null){return a.modPow(this.d,this.n)}var c=a.mod(this.p).modPow(this.dmp1,this.p);var b=a.mod(this.q).modPow(this.dmq1,this.q);while(c.compareTo(b)<0){c=c.add(this.p)}return c.subtract(b).multiply(this.coeff).mod(this.p).multiply(this.q).add(b)}function RSADecrypt(b){if(b.length!=Math.ceil(this.n.bitLength()/4)){throw new Error("wrong ctext length")}var d=parseBigInt(b,16);var a=this.doPrivate(d);if(a==null){return null}return pkcs1unpad2(a,(this.n.bitLength()+7)>>3)}function RSADecryptOAEP(e,d,b){if(e.length!=Math.ceil(this.n.bitLength()/4)){throw new Error("wrong ctext length")}var f=parseBigInt(e,16);var a=this.doPrivate(f);if(a==null){return null}return oaep_unpad(a,(this.n.bitLength()+7)>>3,d,b)}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;RSAKey.prototype.decryptOAEP=RSADecryptOAEP; /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */ function ECFieldElementFp(b,a){this.x=a;this.q=b}function feFpEquals(a){if(a==this){return true}return(this.q.equals(a.q)&&this.x.equals(a.x))}function feFpToBigInteger(){return this.x}function feFpNegate(){return new ECFieldElementFp(this.q,this.x.negate().mod(this.q))}function feFpAdd(a){return new ECFieldElementFp(this.q,this.x.add(a.toBigInteger()).mod(this.q))}function feFpSubtract(a){return new ECFieldElementFp(this.q,this.x.subtract(a.toBigInteger()).mod(this.q))}function feFpMultiply(a){return new ECFieldElementFp(this.q,this.x.multiply(a.toBigInteger()).mod(this.q))}function feFpSquare(){return new ECFieldElementFp(this.q,this.x.square().mod(this.q))}function feFpDivide(a){return new ECFieldElementFp(this.q,this.x.multiply(a.toBigInteger().modInverse(this.q)).mod(this.q))}ECFieldElementFp.prototype.equals=feFpEquals;ECFieldElementFp.prototype.toBigInteger=feFpToBigInteger;ECFieldElementFp.prototype.negate=feFpNegate;ECFieldElementFp.prototype.add=feFpAdd;ECFieldElementFp.prototype.subtract=feFpSubtract;ECFieldElementFp.prototype.multiply=feFpMultiply;ECFieldElementFp.prototype.square=feFpSquare;ECFieldElementFp.prototype.divide=feFpDivide;function ECPointFp(c,a,d,b){this.curve=c;this.x=a;this.y=d;if(b==null){this.z=BigInteger.ONE}else{this.z=b}this.zinv=null}function pointFpGetX(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}return this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function pointFpGetY(){if(this.zinv==null){this.zinv=this.z.modInverse(this.curve.q)}return this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function pointFpEquals(a){if(a==this){return true}if(this.isInfinity()){return a.isInfinity()}if(a.isInfinity()){return this.isInfinity()}var c,b;c=a.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(a.z)).mod(this.curve.q);if(!c.equals(BigInteger.ZERO)){return false}b=a.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(a.z)).mod(this.curve.q);return b.equals(BigInteger.ZERO)}function pointFpIsInfinity(){if((this.x==null)&&(this.y==null)){return true}return this.z.equals(BigInteger.ZERO)&&!this.y.toBigInteger().equals(BigInteger.ZERO)}function pointFpNegate(){return new ECPointFp(this.curve,this.x,this.y.negate(),this.z)}function pointFpAdd(l){if(this.isInfinity()){return l}if(l.isInfinity()){return this}var p=l.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(l.z)).mod(this.curve.q);var o=l.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(l.z)).mod(this.curve.q);if(BigInteger.ZERO.equals(o)){if(BigInteger.ZERO.equals(p)){return this.twice()}return this.curve.getInfinity()}var j=new BigInteger("3");var e=this.x.toBigInteger();var n=this.y.toBigInteger();var c=l.x.toBigInteger();var k=l.y.toBigInteger();var m=o.square();var i=m.multiply(o);var d=e.multiply(m);var g=p.square().multiply(this.z);var a=g.subtract(d.shiftLeft(1)).multiply(l.z).subtract(i).multiply(o).mod(this.curve.q);var h=d.multiply(j).multiply(p).subtract(n.multiply(i)).subtract(g.multiply(p)).multiply(l.z).add(p.multiply(i)).mod(this.curve.q);var f=i.multiply(this.z).multiply(l.z).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(h),f)}function pointFpTwice(){if(this.isInfinity()){return this}if(this.y.toBigInteger().signum()==0){return this.curve.getInfinity()}var g=new BigInteger("3");var c=this.x.toBigInteger();var h=this.y.toBigInteger();var e=h.multiply(this.z);var j=e.multiply(h).mod(this.curve.q);var i=this.curve.a.toBigInteger();var k=c.square().multiply(g);if(!BigInteger.ZERO.equals(i)){k=k.add(this.z.square().multiply(i))}k=k.mod(this.curve.q);var b=k.square().subtract(c.shiftLeft(3).multiply(j)).shiftLeft(1).multiply(e).mod(this.curve.q);var f=k.multiply(g).multiply(c).subtract(j.shiftLeft(1)).shiftLeft(2).multiply(j).subtract(k.square().multiply(k)).mod(this.curve.q);var d=e.square().multiply(e).shiftLeft(3).mod(this.curve.q);return new ECPointFp(this.curve,this.curve.fromBigInteger(b),this.curve.fromBigInteger(f),d)}function pointFpMultiply(d){if(this.isInfinity()){return this}if(d.signum()==0){return this.curve.getInfinity()}var m=d;var l=m.multiply(new BigInteger("3"));var b=this.negate();var j=this;var q=this.curve.q.subtract(d);var o=q.multiply(new BigInteger("3"));var c=new ECPointFp(this.curve,this.x,this.y);var a=c.negate();var g;for(g=l.bitLength()-2;g>0;--g){j=j.twice();var n=l.testBit(g);var f=m.testBit(g);if(n!=f){j=j.add(n?this:b)}}for(g=o.bitLength()-2;g>0;--g){c=c.twice();var p=o.testBit(g);var r=q.testBit(g);if(p!=r){c=c.add(p?c:a)}}return j}function pointFpMultiplyTwo(c,a,b){var d;if(c.bitLength()>b.bitLength()){d=c.bitLength()-1}else{d=b.bitLength()-1}var f=this.curve.getInfinity();var e=this.add(a);while(d>=0){f=f.twice();if(c.testBit(d)){if(b.testBit(d)){f=f.add(e)}else{f=f.add(this)}}else{if(b.testBit(d)){f=f.add(a)}}--d}return f}ECPointFp.prototype.getX=pointFpGetX;ECPointFp.prototype.getY=pointFpGetY;ECPointFp.prototype.equals=pointFpEquals;ECPointFp.prototype.isInfinity=pointFpIsInfinity;ECPointFp.prototype.negate=pointFpNegate;ECPointFp.prototype.add=pointFpAdd;ECPointFp.prototype.twice=pointFpTwice;ECPointFp.prototype.multiply=pointFpMultiply;ECPointFp.prototype.multiplyTwo=pointFpMultiplyTwo;function ECCurveFp(e,d,c){this.q=e;this.a=this.fromBigInteger(d);this.b=this.fromBigInteger(c);this.infinity=new ECPointFp(this,null,null)}function curveFpGetQ(){return this.q}function curveFpGetA(){return this.a}function curveFpGetB(){return this.b}function curveFpEquals(a){if(a==this){return true}return(this.q.equals(a.q)&&this.a.equals(a.a)&&this.b.equals(a.b))}function curveFpGetInfinity(){return this.infinity}function curveFpFromBigInteger(a){return new ECFieldElementFp(this.q,a)}function curveFpDecodePointHex(d){switch(parseInt(d.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var a=(d.length-2)/2;var c=d.substr(2,a);var b=d.substr(a+2,a);return new ECPointFp(this,this.fromBigInteger(new BigInteger(c,16)),this.fromBigInteger(new BigInteger(b,16)));default:return null}}ECCurveFp.prototype.getQ=curveFpGetQ;ECCurveFp.prototype.getA=curveFpGetA;ECCurveFp.prototype.getB=curveFpGetB;ECCurveFp.prototype.equals=curveFpEquals;ECCurveFp.prototype.getInfinity=curveFpGetInfinity;ECCurveFp.prototype.fromBigInteger=curveFpFromBigInteger;ECCurveFp.prototype.decodePointHex=curveFpDecodePointHex; /*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib */ ECFieldElementFp.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)};ECPointFp.prototype.getEncoded=function(c){var d=function(h,f){var g=h.toByteArrayUnsigned();if(fg.length){g.unshift(0)}}return g};var a=this.getX().toBigInteger();var e=this.getY().toBigInteger();var b=d(a,32);if(c){if(e.isEven()){b.unshift(2)}else{b.unshift(3)}}else{b.unshift(4);b=b.concat(d(e,32))}return b};ECPointFp.decodeFrom=function(g,c){var f=c[0];var e=c.length-1;var d=c.slice(1,1+e/2);var b=c.slice(1+e/2,1+e);d.unshift(0);b.unshift(0);var a=new BigInteger(d);var h=new BigInteger(b);return new ECPointFp(g,g.fromBigInteger(a),g.fromBigInteger(h))};ECPointFp.decodeFromHex=function(g,c){var f=c.substr(0,2);var e=c.length-2;var d=c.substr(2,e/2);var b=c.substr(2+e/2,e/2);var a=new BigInteger(d,16);var h=new BigInteger(b,16);return new ECPointFp(g,g.fromBigInteger(a),g.fromBigInteger(h))};ECPointFp.prototype.add2D=function(c){if(this.isInfinity()){return c}if(c.isInfinity()){return this}if(this.x.equals(c.x)){if(this.y.equals(c.y)){return this.twice()}return this.curve.getInfinity()}var g=c.x.subtract(this.x);var e=c.y.subtract(this.y);var a=e.divide(g);var d=a.square().subtract(this.x).subtract(c.x);var f=a.multiply(this.x.subtract(d)).subtract(this.y);return new ECPointFp(this.curve,d,f)};ECPointFp.prototype.twice2D=function(){if(this.isInfinity()){return this}if(this.y.toBigInteger().signum()==0){return this.curve.getInfinity()}var b=this.curve.fromBigInteger(BigInteger.valueOf(2));var e=this.curve.fromBigInteger(BigInteger.valueOf(3));var a=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(b));var c=a.square().subtract(this.x.multiply(b));var d=a.multiply(this.x.subtract(c)).subtract(this.y);return new ECPointFp(this.curve,c,d)};ECPointFp.prototype.multiply2D=function(b){if(this.isInfinity()){return this}if(b.signum()==0){return this.curve.getInfinity()}var g=b;var f=g.multiply(new BigInteger("3"));var l=this.negate();var d=this;var c;for(c=f.bitLength()-2;c>0;--c){d=d.twice();var a=f.testBit(c);var j=g.testBit(c);if(a!=j){d=d.add2D(a?this:l)}}return d};ECPointFp.prototype.isOnCurve=function(){var d=this.getX().toBigInteger();var i=this.getY().toBigInteger();var f=this.curve.getA().toBigInteger();var c=this.curve.getB().toBigInteger();var h=this.curve.getQ();var e=i.multiply(i).mod(h);var g=d.multiply(d).multiply(d).add(f.multiply(d)).add(c).mod(h);return e.equals(g)};ECPointFp.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"};ECPointFp.prototype.validate=function(){var c=this.curve.getQ();if(this.isInfinity()){throw new Error("Point is at infinity.")}var a=this.getX().toBigInteger();var b=this.getY().toBigInteger();if(a.compareTo(BigInteger.ONE)<0||a.compareTo(c.subtract(BigInteger.ONE))>0){throw new Error("x coordinate out of bounds")}if(b.compareTo(BigInteger.ONE)<0||b.compareTo(c.subtract(BigInteger.ONE))>0){throw new Error("y coordinate out of bounds")}if(!this.isOnCurve()){throw new Error("Point is not on the curve.")}if(this.multiply(c).isInfinity()){throw new Error("Point is not a scalar multiple of G.")}return true}; /*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval */ var jsonParse=(function(){var e="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)";var j='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))';var i='(?:"'+j+'*")';var d=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+e+"|"+i+")","g");var k=new RegExp("\\\\(?:([^u])|u(.{4}))","g");var g={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function h(l,m,n){return m?g[m]:String.fromCharCode(parseInt(n,16))}var c=new String("");var a="\\";var f={"{":Object,"[":Array};var b=Object.hasOwnProperty;return function(u,q){var p=u.match(d);var x;var v=p[0];var l=false;if("{"===v){x={}}else{if("["===v){x=[]}else{x=[];l=true}}var t;var r=[x];for(var o=1-l,m=p.length;o=0;){delete D[n[A]]}}}return q.call(C,B,D)};x=s({"":x},"")}return x}})(); if(typeof KJUR=="undefined"||!KJUR){KJUR={}}if(typeof KJUR.asn1=="undefined"||!KJUR.asn1){KJUR.asn1={}}KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(a){var b=a.toString(16);if((b.length%2)==1){b="0"+b}return b};this.bigIntToMinTwosComplementsHex=function(j){var f=j.toString(16);if(f.substr(0,1)!="-"){if(f.length%2==1){f="0"+f}else{if(!f.match(/^[0-7]/)){f="00"+f}}}else{var a=f.substr(1);var e=a.length;if(e%2==1){e+=1}else{if(!f.match(/^[0-7]/)){e+=2}}var g="";for(var d=0;d15){throw"ASN.1 length too long to represent by 8x: n = "+j.toString(16)}var g=128+h;return g.toString(16)+i}};this.getEncodedHex=function(){if(this.hTLV==null||this.isModified){this.hV=this.getFreshValueHex();this.hL=this.getLengthHexFromValue();this.hTLV=this.hT+this.hL+this.hV;this.isModified=false}return this.hTLV};this.getValueHex=function(){this.getEncodedHex();return this.hV};this.getFreshValueHex=function(){return""};if(e!=undefined){if(e.tlv!=undefined){this.hTLV=e.tlv;this.isModified=false}}};KJUR.asn1.DERAbstractString=function(c){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);var b=null;var a=null;this.getString=function(){return this.s};this.setString=function(d){this.hTLV=null;this.isModified=true;this.s=d;this.hV=utf8tohex(this.s).toLowerCase()};this.setStringHex=function(d){this.hTLV=null;this.isModified=true;this.s=null;this.hV=d};this.getFreshValueHex=function(){return this.hV};if(typeof c!="undefined"){if(typeof c=="string"){this.setString(c)}else{if(typeof c.str!="undefined"){this.setString(c.str)}else{if(typeof c.hex!="undefined"){this.setStringHex(c.hex)}}}}};YAHOO.lang.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object);KJUR.asn1.DERAbstractTime=function(c){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);var b=null;var a=null;this.localDateToUTC=function(g){var e=g.getTime()+(g.getTimezoneOffset()*60000);var f=new Date(e);return f};this.formatDate=function(m,o,e){var g=this.zeroPadding;var n=this.localDateToUTC(m);var p=String(n.getFullYear());if(o=="utc"){p=p.substr(2,2)}var l=g(String(n.getMonth()+1),2);var q=g(String(n.getDate()),2);var h=g(String(n.getHours()),2);var i=g(String(n.getMinutes()),2);var j=g(String(n.getSeconds()),2);var r=p+l+q+h+i+j;if(e===true){var f=n.getMilliseconds();if(f!=0){var k=g(String(f),3);k=k.replace(/[0]+$/,"");r=r+"."+k}}return r+"Z"};this.zeroPadding=function(e,d){if(e.length>=d){return e}return new Array(d-e.length+1).join("0")+e};this.getString=function(){return this.s};this.setString=function(d){this.hTLV=null;this.isModified=true;this.s=d;this.hV=stohex(d)};this.setByDateValue=function(h,j,e,d,f,g){var i=new Date(Date.UTC(h,j-1,e,d,f,g,0));this.setByDate(i)};this.getFreshValueHex=function(){return this.hV}};YAHOO.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object);KJUR.asn1.DERAbstractStructured=function(b){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);var a=null;this.setByASN1ObjectArray=function(c){this.hTLV=null;this.isModified=true;this.asn1Array=c};this.appendASN1Object=function(c){this.hTLV=null;this.isModified=true;this.asn1Array.push(c)};this.asn1Array=new Array();if(typeof b!="undefined"){if(typeof b.array!="undefined"){this.asn1Array=b.array}}};YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object);KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this);this.hT="01";this.hTLV="0101ff"};YAHOO.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object);KJUR.asn1.DERInteger=function(a){KJUR.asn1.DERInteger.superclass.constructor.call(this);this.hT="02";this.setByBigInteger=function(b){this.hTLV=null;this.isModified=true;this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(b)};this.setByInteger=function(c){var b=new BigInteger(String(c),10);this.setByBigInteger(b)};this.setValueHex=function(b){this.hV=b};this.getFreshValueHex=function(){return this.hV};if(typeof a!="undefined"){if(typeof a.bigint!="undefined"){this.setByBigInteger(a.bigint)}else{if(typeof a["int"]!="undefined"){this.setByInteger(a["int"])}else{if(typeof a=="number"){this.setByInteger(a)}else{if(typeof a.hex!="undefined"){this.setValueHex(a.hex)}}}}}};YAHOO.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object);KJUR.asn1.DERBitString=function(b){if(b!==undefined&&typeof b.obj!=="undefined"){var a=KJUR.asn1.ASN1Util.newObject(b.obj);b.hex="00"+a.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this);this.hT="03";this.setHexValueIncludingUnusedBits=function(c){this.hTLV=null;this.isModified=true;this.hV=c};this.setUnusedBitsAndHexValue=function(c,e){if(c<0||7=f){break}}return j};ASN1HEX.getNthChildIdx=function(d,b,e){var c=ASN1HEX.getChildIdx(d,b);return c[e]};ASN1HEX.getIdxbyList=function(e,d,c,i){var g=ASN1HEX;var f,b;if(c.length==0){if(i!==undefined){if(e.substr(d,2)!==i){return -1}}return d}f=c.shift();b=g.getChildIdx(e,d);if(f>=b.length){return -1}return g.getIdxbyList(e,b[f],c,i)};ASN1HEX.getIdxbyListEx=function(f,k,b,g){var m=ASN1HEX;var d,l;if(b.length==0){if(g!==undefined){if(f.substr(k,2)!==g){return -1}}return k}d=b.shift();l=m.getChildIdx(f,k);var j=0;for(var e=0;e=d.length){return null}return e.getTLV(d,a)};ASN1HEX.getTLVbyListEx=function(d,c,b,f){var e=ASN1HEX;var a=e.getIdxbyListEx(d,c,b,f);if(a==-1){return null}return e.getTLV(d,a)};ASN1HEX.getVbyList=function(e,c,b,g,i){var f=ASN1HEX;var a,d;a=f.getIdxbyList(e,c,b,g);if(a==-1){return null}if(a>=e.length){return null}d=f.getV(e,a);if(i===true){d=d.substr(2)}return d};ASN1HEX.getVbyListEx=function(b,e,a,d,f){var j=ASN1HEX;var g,c,i;g=j.getIdxbyListEx(b,e,a,d);if(g==-1){return null}i=j.getV(b,g);if(b.substr(g,2)=="03"&&f!==false){i=i.substr(2)}return i};ASN1HEX.hextooidstr=function(e){var h=function(b,a){if(b.length>=a){return b}return new Array(a-b.length+1).join("0")+b};var l=[];var o=e.substr(0,2);var f=parseInt(o,16);l[0]=new String(Math.floor(f/40));l[1]=new String(f%40);var m=e.substr(2);var k=[];for(var g=0;g0){n=n+"."+j.join(".")}return n};ASN1HEX.dump=function(t,c,l,g){var p=ASN1HEX;var j=p.getV;var y=p.dump;var w=p.getChildIdx;var e=t;if(t instanceof KJUR.asn1.ASN1Object){e=t.getEncodedHex()}var q=function(A,i){if(A.length<=i*2){return A}else{var v=A.substr(0,i)+"..(total "+A.length/2+"bytes).."+A.substr(A.length-i,i);return v}};if(c===undefined){c={ommit_long_octet:32}}if(l===undefined){l=0}if(g===undefined){g=""}var x=c.ommit_long_octet;var z=e.substr(l,2);if(z=="01"){var h=j(e,l);if(h=="00"){return g+"BOOLEAN FALSE\n"}else{return g+"BOOLEAN TRUE\n"}}if(z=="02"){var h=j(e,l);return g+"INTEGER "+q(h,x)+"\n"}if(z=="03"){var h=j(e,l);if(p.isASN1HEX(h.substr(2))){var k=g+"BITSTRING, encapsulates\n";k=k+y(h.substr(2),c,0,g+" ");return k}else{return g+"BITSTRING "+q(h,x)+"\n"}}if(z=="04"){var h=j(e,l);if(p.isASN1HEX(h)){var k=g+"OCTETSTRING, encapsulates\n";k=k+y(h,c,0,g+" ");return k}else{return g+"OCTETSTRING "+q(h,x)+"\n"}}if(z=="05"){return g+"NULL\n"}if(z=="06"){var m=j(e,l);var b=KJUR.asn1.ASN1Util.oidHexToInt(m);var o=KJUR.asn1.x509.OID.oid2name(b);var a=b.replace(/\./g," ");if(o!=""){return g+"ObjectIdentifier "+o+" ("+a+")\n"}else{return g+"ObjectIdentifier ("+a+")\n"}}if(z=="0a"){return g+"ENUMERATED "+parseInt(j(e,l))+"\n"}if(z=="0c"){return g+"UTF8String '"+hextoutf8(j(e,l))+"'\n"}if(z=="13"){return g+"PrintableString '"+hextoutf8(j(e,l))+"'\n"}if(z=="14"){return g+"TeletexString '"+hextoutf8(j(e,l))+"'\n"}if(z=="16"){return g+"IA5String '"+hextoutf8(j(e,l))+"'\n"}if(z=="17"){return g+"UTCTime "+hextoutf8(j(e,l))+"\n"}if(z=="18"){return g+"GeneralizedTime "+hextoutf8(j(e,l))+"\n"}if(z=="1a"){return g+"VisualString '"+hextoutf8(j(e,l))+"'\n"}if(z=="1e"){return g+"BMPString '"+hextoutf8(j(e,l))+"'\n"}if(z=="30"){if(e.substr(l,4)=="3000"){return g+"SEQUENCE {}\n"}var k=g+"SEQUENCE\n";var d=w(e,l);var f=c;if((d.length==2||d.length==3)&&e.substr(d[0],2)=="06"&&e.substr(d[d.length-1],2)=="04"){var o=p.oidname(j(e,d[0]));var r=JSON.parse(JSON.stringify(c));r.x509ExtName=o;f=r}for(var u=0;u31){return false}if(((f&192)==128)&&((f&31)==e)){return true}return false}catch(d){return false}};ASN1HEX.isASN1HEX=function(e){var d=ASN1HEX;if(e.length%2==1){return false}var c=d.getVblen(e,0);var b=e.substr(0,2);var f=d.getL(e,0);var a=e.length-b.length-f.length;if(a==c*2){return true}return false};ASN1HEX.checkStrictDER=function(g,o,d,c,r){var s=ASN1HEX;if(d===undefined){if(typeof g!="string"){throw new Error("not hex string")}g=g.toLowerCase();if(!KJUR.lang.String.isHex(g)){throw new Error("not hex string")}d=g.length;c=g.length/2;if(c<128){r=1}else{r=Math.ceil(c.toString(16))+1}}var k=s.getL(g,o);if(k.length>r*2){throw new Error("L of TLV too long: idx="+o)}var n=s.getVblen(g,o);if(n>c){throw new Error("value of L too long than hex: idx="+o)}var q=s.getTLV(g,o);var f=q.length-2-s.getL(g,o).length;if(f!==(n*2)){throw new Error("V string length and L's value not the same:"+f+"/"+(n*2))}if(o===0){if(g.length!=q.length){throw new Error("total length and TLV length unmatch:"+g.length+"!="+q.length)}}var b=g.substr(o,2);if(b==="02"){var a=s.getVidx(g,o);if(g.substr(a,2)=="00"&&g.charCodeAt(a+2)<56){throw new Error("not least zeros for DER INTEGER")}}if(parseInt(b,16)&32){var p=s.getVblen(g,o);var m=0;var l=s.getChildIdx(g,o);for(var e=0;e0){n.push(new c({tag:"a3",obj:new j(q.ext)}))}var o=new KJUR.asn1.DERSequence({array:n});return o.getEncodedHex()};if(f!==undefined){this.setByParam(f)}};YAHOO.lang.extend(KJUR.asn1.x509.TBSCertificate,KJUR.asn1.ASN1Object);KJUR.asn1.x509.Extensions=function(d){KJUR.asn1.x509.Extensions.superclass.constructor.call(this);var c=KJUR,b=c.asn1,a=b.DERSequence,e=b.x509;this.aParam=[];this.setByParam=function(f){this.aParam=f};this.getEncodedHex=function(){var f=[];for(var h=0;h-1){i.push(new f({"int":this.pathLen}))}var h=new b({array:i});this.asn1ExtnValue=h;return this.asn1ExtnValue.getEncodedHex()};this.oid="2.5.29.19";this.cA=false;this.pathLen=-1;if(g!==undefined){if(g.cA!==undefined){this.cA=g.cA}if(g.pathLen!==undefined){this.pathLen=g.pathLen}}};YAHOO.lang.extend(KJUR.asn1.x509.BasicConstraints,KJUR.asn1.x509.Extension);KJUR.asn1.x509.CRLDistributionPoints=function(d){KJUR.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,d);var b=KJUR,a=b.asn1,c=a.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()};this.setByDPArray=function(e){var f=[];for(var g=0;g0){f.push(new b({array:j}))}}var g=new b({array:f});return g.getEncodedHex()};if(d!==undefined){this.params=d}};YAHOO.lang.extend(KJUR.asn1.x509.PolicyInformation,KJUR.asn1.ASN1Object);KJUR.asn1.x509.PolicyQualifierInfo=function(e){KJUR.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,e);var c=KJUR.asn1,b=c.DERSequence,d=c.DERIA5String,f=c.DERObjectIdentifier,a=c.x509.UserNotice;this.params=null;this.getEncodedHex=function(){if(this.params.cps!==undefined){var g=new b({array:[new f({oid:"1.3.6.1.5.5.7.2.1"}),new d({str:this.params.cps})]});return g.getEncodedHex()}if(this.params.unotice!=undefined){var g=new b({array:[new f({oid:"1.3.6.1.5.5.7.2.2"}),new a(this.params.unotice)]});return g.getEncodedHex()}};if(e!==undefined){this.params=e}};YAHOO.lang.extend(KJUR.asn1.x509.PolicyQualifierInfo,KJUR.asn1.ASN1Object);KJUR.asn1.x509.UserNotice=function(e){KJUR.asn1.x509.UserNotice.superclass.constructor.call(this,e);var a=KJUR.asn1.DERSequence,d=KJUR.asn1.DERInteger,c=KJUR.asn1.x509.DisplayText,b=KJUR.asn1.x509.NoticeReference;this.params=null;this.getEncodedHex=function(){var f=[];if(this.params.noticeref!==undefined){f.push(new b(this.params.noticeref))}if(this.params.exptext!==undefined){f.push(new c(this.params.exptext))}var g=new a({array:f});return g.getEncodedHex()};if(e!==undefined){this.params=e}};YAHOO.lang.extend(KJUR.asn1.x509.UserNotice,KJUR.asn1.ASN1Object);KJUR.asn1.x509.NoticeReference=function(d){KJUR.asn1.x509.NoticeReference.superclass.constructor.call(this,d);var a=KJUR.asn1.DERSequence,c=KJUR.asn1.DERInteger,b=KJUR.asn1.x509.DisplayText;this.params=null;this.getEncodedHex=function(){var f=[];if(this.params.org!==undefined){f.push(new b(this.params.org))}if(this.params.noticenum!==undefined){var h=[];var e=this.params.noticenum;for(var j=0;j0){for(var g=0;g0;f++){var h=c.shift();if(e===true){var d=b.pop();var j=(d+","+h).replace(/\\,/g,",");b.push(j);e=false}else{b.push(h)}if(h.substr(-1,1)==="\\"){e=true}}b=b.map(function(a){return a.replace("/","\\/")});b.reverse();return"/"+b.join("/")};KJUR.asn1.x509.X500Name.ldapToOneline=function(a){return KJUR.asn1.x509.X500Name.ldapToCompat(a)};KJUR.asn1.x509.RDN=function(b){KJUR.asn1.x509.RDN.superclass.constructor.call(this);this.asn1Array=[];this.paramArray=[];this.sRule="utf8";var a=KJUR.asn1.x509.AttributeTypeAndValue;this.setByParam=function(c){if(c.rule!==undefined){this.sRule=c.rule}if(c.str!==undefined){this.addByMultiValuedString(c.str)}if(c.array!==undefined){this.paramArray=c.array}};this.addByString=function(c){this.asn1Array.push(new KJUR.asn1.x509.AttributeTypeAndValue({str:c,rule:this.sRule}))};this.addByMultiValuedString=function(e){var c=KJUR.asn1.x509.RDN.parseString(e);for(var d=0;d0){for(var d=0;d0;g++){var k=j.shift();if(h===true){var f=c.pop();var d=(f+"+"+k).replace(/\\\+/g,"+");c.push(d);h=false}else{c.push(k)}if(k.substr(-1,1)==="\\"){h=true}}var l=false;var b=[];for(var g=0;c.length>0;g++){var k=c.shift();if(l===true){var e=b.pop();if(k.match(/"$/)){var d=(e+"+"+k).replace(/^([^=]+)="(.*)"$/,"$1=$2");b.push(d);l=false}else{b.push(e+"+"+k)}}else{b.push(k)}if(k.match(/^[^=]+="/)){l=true}}return b};KJUR.asn1.x509.AttributeTypeAndValue=function(c){KJUR.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);this.sRule="utf8";this.sType=null;this.sValue=null;this.dsType=null;var a=KJUR,g=a.asn1,d=g.DERSequence,l=g.DERUTF8String,i=g.DERPrintableString,h=g.DERTeletexString,b=g.DERIA5String,e=g.DERVisibleString,k=g.DERBMPString,f=a.lang.String.isMail,j=a.lang.String.isPrintable;this.setByParam=function(o){if(o.rule!==undefined){this.sRule=o.rule}if(o.ds!==undefined){this.dsType=o.ds}if(o.value===undefined&&o.str!==undefined){var n=o.str;var m=n.match(/^([^=]+)=(.+)$/);if(m){this.sType=m[1];this.sValue=m[2]}else{throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}}else{this.sType=o.type;this.sValue=o.value}};this.setByString=function(n,o){if(o!==undefined){this.sRule=o}var m=n.match(/^([^=]+)=(.+)$/);if(m){this.setByAttrTypeAndValueStr(m[1],m[2])}else{throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr)}};this._getDsType=function(){var o=this.sType;var n=this.sValue;var m=this.sRule;if(m==="prn"){if(o=="CN"&&f(n)){return"ia5"}if(j(n)){return"prn"}return"utf8"}else{if(m==="utf8"){if(o=="CN"&&f(n)){return"ia5"}if(o=="C"){return"prn"}return"utf8"}}return"utf8"};this.setByAttrTypeAndValueStr=function(o,n,m){if(m!==undefined){this.sRule=m}this.sType=o;this.sValue=n};this.getValueObj=function(n,m){if(n=="utf8"){return new l({str:m})}if(n=="prn"){return new i({str:m})}if(n=="tel"){return new h({str:m})}if(n=="ia5"){return new b({str:m})}if(n=="vis"){return new e({str:m})}if(n=="bmp"){return new k({str:m})}throw new Error("unsupported directory string type: type="+n+" value="+m)};this.getEncodedHex=function(){if(this.dsType==null){this.dsType=this._getDsType()}var n=KJUR.asn1.x509.OID.atype2obj(this.sType);var m=this.getValueObj(this.dsType,this.sValue);var p=new d({array:[n,m]});this.TLV=p.getEncodedHex();return this.TLV};if(c!==undefined){this.setByParam(c)}};YAHOO.lang.extend(KJUR.asn1.x509.AttributeTypeAndValue,KJUR.asn1.ASN1Object);KJUR.asn1.x509.SubjectPublicKeyInfo=function(f){KJUR.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var l=null,k=null,a=KJUR,j=a.asn1,i=j.DERInteger,b=j.DERBitString,m=j.DERObjectIdentifier,e=j.DERSequence,h=j.ASN1Util.newObject,d=j.x509,o=d.AlgorithmIdentifier,g=a.crypto,n=g.ECDSA,c=g.DSA;this.getASN1Object=function(){if(this.asn1AlgId==null||this.asn1SubjPKey==null){throw"algId and/or subjPubKey not set"}var p=new e({array:[this.asn1AlgId,this.asn1SubjPKey]});return p};this.getEncodedHex=function(){var p=this.getASN1Object();this.hTLV=p.getEncodedHex();return this.hTLV};this.setPubKey=function(q){try{if(q instanceof RSAKey){var u=h({seq:[{"int":{bigint:q.n}},{"int":{"int":q.e}}]});var s=u.getEncodedHex();this.asn1AlgId=new o({name:"rsaEncryption"});this.asn1SubjPKey=new b({hex:"00"+s})}}catch(p){}try{if(q instanceof KJUR.crypto.ECDSA){var r=new m({name:q.curveName});this.asn1AlgId=new o({name:"ecPublicKey",asn1params:r});this.asn1SubjPKey=new b({hex:"00"+q.pubKeyHex})}}catch(p){}try{if(q instanceof KJUR.crypto.DSA){var r=new h({seq:[{"int":{bigint:q.p}},{"int":{bigint:q.q}},{"int":{bigint:q.g}}]});this.asn1AlgId=new o({name:"dsa",asn1params:r});var t=new i({bigint:q.y});this.asn1SubjPKey=new b({hex:"00"+t.getEncodedHex()})}}catch(p){}};if(f!==undefined){this.setPubKey(f)}};YAHOO.lang.extend(KJUR.asn1.x509.SubjectPublicKeyInfo,KJUR.asn1.ASN1Object);KJUR.asn1.x509.Time=function(f){KJUR.asn1.x509.Time.superclass.constructor.call(this);var e=null,a=null,d=KJUR,c=d.asn1,b=c.DERUTCTime,g=c.DERGeneralizedTime;this.setTimeParams=function(h){this.timeParams=h};this.getEncodedHex=function(){var h=null;if(this.timeParams!=null){if(this.type=="utc"){h=new b(this.timeParams)}else{h=new g(this.timeParams)}}else{if(this.type=="utc"){h=new b()}else{h=new g()}}this.TLV=h.getEncodedHex();return this.TLV};this.type="utc";if(f!==undefined){if(f.type!==undefined){this.type=f.type}else{if(f.str!==undefined){if(f.str.match(/^[0-9]{12}Z$/)){this.type="utc"}if(f.str.match(/^[0-9]{14}Z$/)){this.type="gen"}}}this.timeParams=f}};YAHOO.lang.extend(KJUR.asn1.x509.Time,KJUR.asn1.ASN1Object);KJUR.asn1.x509.AlgorithmIdentifier=function(e){KJUR.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this);this.nameAlg=null;this.asn1Alg=null;this.asn1Params=null;this.paramEmpty=false;var b=KJUR,a=b.asn1,c=a.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;this.getEncodedHex=function(){if(this.nameAlg===null&&this.asn1Alg===null){throw new Error("algorithm not specified")}if(this.nameAlg!==null){var f=null;for(var h in c){if(h===this.nameAlg){f=c[h]}}if(f!==null){this.hTLV=f;return this.hTLV}}if(this.nameAlg!==null&&this.asn1Alg===null){this.asn1Alg=a.x509.OID.name2obj(this.nameAlg)}var g=[this.asn1Alg];if(this.asn1Params!==null){g.push(this.asn1Params)}var i=new a.DERSequence({array:g});this.hTLV=i.getEncodedHex();return this.hTLV};if(e!==undefined){if(e.name!==undefined){this.nameAlg=e.name}if(e.asn1params!==undefined){this.asn1Params=e.asn1params}if(e.paramempty!==undefined){this.paramEmpty=e.paramempty}}if(this.asn1Params===null&&this.paramEmpty===false&&this.nameAlg!==null){if(this.nameAlg.name!==undefined){this.nameAlg=this.nameAlg.name}var d=this.nameAlg.toLowerCase();if(d.substr(-7,7)!=="withdsa"&&d.substr(-9,9)!=="withecdsa"){this.asn1Params=new a.DERNull()}}};YAHOO.lang.extend(KJUR.asn1.x509.AlgorithmIdentifier,KJUR.asn1.ASN1Object);KJUR.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"};KJUR.asn1.x509.GeneralName=function(e){KJUR.asn1.x509.GeneralName.superclass.constructor.call(this);var m=null,i=null,k={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87"},b=KJUR,g=b.asn1,f=g.DERSequence,j=g.DEROctetString,d=g.DERIA5String,c=g.DERTaggedObject,l=g.ASN1Object,a=g.x509.X500Name,h=pemtohex;this.explicit=false;this.setByParam=function(p){var r=null;var u=null;if(p===undefined){return}if(p.rfc822!==undefined){this.type="rfc822";u=new d({str:p[this.type]})}if(p.dns!==undefined){this.type="dns";u=new d({str:p[this.type]})}if(p.uri!==undefined){this.type="uri";u=new d({str:p[this.type]})}if(p.dn!==undefined){this.type="dn";this.explicit=true;if(typeof p.dn==="string"){u=new a({str:p.dn})}else{if(p.dn instanceof KJUR.asn1.x509.X500Name){u=p.dn}else{u=new a(p.dn)}}}if(p.ldapdn!==undefined){this.type="dn";this.explicit=true;u=new a({ldapstr:p.ldapdn})}if(p.certissuer!==undefined){this.type="dn";this.explicit=true;var o=p.certissuer;var w=null;if(o.match(/^[0-9A-Fa-f]+$/)){w==o}if(o.indexOf("-----BEGIN ")!=-1){w=h(o)}if(w==null){throw"certissuer param not cert"}var t=new X509();t.hex=w;var y=t.getIssuerHex();u=new l();u.hTLV=y}if(p.certsubj!==undefined){this.type="dn";this.explicit=true;var o=p.certsubj;var w=null;if(o.match(/^[0-9A-Fa-f]+$/)){w==o}if(o.indexOf("-----BEGIN ")!=-1){w=h(o)}if(w==null){throw"certsubj param not cert"}var t=new X509();t.hex=w;var y=t.getSubjectHex();u=new l();u.hTLV=y}if(p.ip!==undefined){this.type="ip";this.explicit=false;var q=p.ip;var s;var n="malformed IP address";if(q.match(/^[0-9.]+[.][0-9.]+$/)){s=intarystrtohex("["+q.split(".").join(",")+"]");if(s.length!==8){throw n}}else{if(q.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/)){s=ipv6tohex(q)}else{if(q.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)){s=q}else{throw n}}}u=new j({hex:s})}if(this.type==null){throw"unsupported type in params="+p}this.asn1Obj=new c({explicit:this.explicit,tag:k[this.type],obj:u})};this.getEncodedHex=function(){return this.asn1Obj.getEncodedHex()};if(e!==undefined){this.setByParam(e)}};YAHOO.lang.extend(KJUR.asn1.x509.GeneralName,KJUR.asn1.ASN1Object);KJUR.asn1.x509.GeneralNames=function(d){KJUR.asn1.x509.GeneralNames.superclass.constructor.call(this);var a=null,c=KJUR,b=c.asn1;this.setByParamArray=function(g){for(var e=0;e0){r=new b({obj:this.dUnsignedAttrs,tag:"a1",explicit:false})}var q=[this.dCMSVersion,this.dSignerIdentifier,this.dDigestAlgorithm,o,this.dSigAlg,this.dSig,];if(r!=null){q.push(r)}var p=new h.DERSequence({array:q});this.hTLV=p.getEncodedHex();return this.hTLV}};YAHOO.lang.extend(KJUR.asn1.cms.SignerInfo,KJUR.asn1.ASN1Object);KJUR.asn1.cms.EncapsulatedContentInfo=function(g){var c=KJUR,b=c.asn1,e=b.DERTaggedObject,a=b.DERSequence,h=b.DERObjectIdentifier,d=b.DEROctetString,f=b.cms;f.EncapsulatedContentInfo.superclass.constructor.call(this);this.dEContentType=new h({name:"data"});this.dEContent=null;this.isDetached=false;this.eContentValueHex=null;this.setContentType=function(i){if(i.match(/^[0-2][.][0-9.]+$/)){this.dEContentType=new h({oid:i})}else{this.dEContentType=new h({name:i})}};this.setContentValue=function(i){if(i!==undefined){if(typeof i.hex=="string"){this.eContentValueHex=i.hex}else{if(typeof i.str=="string"){this.eContentValueHex=utf8tohex(i.str)}}}};this.setContentValueHex=function(i){this.eContentValueHex=i};this.setContentValueStr=function(i){this.eContentValueHex=utf8tohex(i)};this.getEncodedHex=function(){if(typeof this.eContentValueHex!="string"){throw"eContentValue not yet set"}var k=new d({hex:this.eContentValueHex});this.dEContent=new e({obj:k,tag:"a0",explicit:true});var i=[this.dEContentType];if(!this.isDetached){i.push(this.dEContent)}var j=new a({array:i});this.hTLV=j.getEncodedHex();return this.hTLV}};YAHOO.lang.extend(KJUR.asn1.cms.EncapsulatedContentInfo,KJUR.asn1.ASN1Object);KJUR.asn1.cms.ContentInfo=function(f){var c=KJUR,b=c.asn1,d=b.DERTaggedObject,a=b.DERSequence,e=b.x509;KJUR.asn1.cms.ContentInfo.superclass.constructor.call(this);this.dContentType=null;this.dContent=null;this.setContentType=function(g){if(typeof g=="string"){this.dContentType=e.OID.name2obj(g)}};this.getEncodedHex=function(){var h=new d({obj:this.dContent,tag:"a0",explicit:true});var g=new a({array:[this.dContentType,h]});this.hTLV=g.getEncodedHex();return this.hTLV};if(f!==undefined){if(f.type){this.setContentType(f.type)}if(f.obj&&f.obj instanceof b.ASN1Object){this.dContent=f.obj}}};YAHOO.lang.extend(KJUR.asn1.cms.ContentInfo,KJUR.asn1.ASN1Object);KJUR.asn1.cms.SignedData=function(e){var a=KJUR,h=a.asn1,j=h.ASN1Object,g=h.DERInteger,m=h.DERSet,f=h.DERSequence,b=h.DERTaggedObject,l=h.cms,i=l.EncapsulatedContentInfo,d=l.SignerInfo,n=l.ContentInfo,c=h.x509,k=c.AlgorithmIdentifier;KJUR.asn1.cms.SignedData.superclass.constructor.call(this);this.dCMSVersion=new g({"int":1});this.dDigestAlgs=null;this.digestAlgNameList=[];this.dEncapContentInfo=new i();this.dCerts=null;this.certificateList=[];this.crlList=[];this.signerInfoList=[new d()];this.addCertificatesByPEM=function(p){var q=pemtohex(p);var r=new j();r.hTLV=q;this.certificateList.push(r)};this.getEncodedHex=function(){if(typeof this.hTLV=="string"){return this.hTLV}if(this.dDigestAlgs==null){var u=[];for(var t=0;t0){var v=new m({array:this.certificateList});this.dCerts=new b({obj:v,tag:"a0",explicit:false})}}if(this.dCerts!=null){p.push(this.dCerts)}var r=new m({array:this.signerInfoList});p.push(r);var q=new f({array:p});this.hTLV=q.getEncodedHex();return this.hTLV};this.getContentInfo=function(){this.getEncodedHex();var o=new n({type:"signed-data",obj:this});return o};this.getContentInfoEncodedHex=function(){var o=this.getContentInfo();var p=o.getEncodedHex();return p};this.getPEM=function(){return hextopem(this.getContentInfoEncodedHex(),"CMS")}};YAHOO.lang.extend(KJUR.asn1.cms.SignedData,KJUR.asn1.ASN1Object);KJUR.asn1.cms.CMSUtil=new function(){};KJUR.asn1.cms.CMSUtil.newSignedData=function(d){var b=KJUR,j=b.asn1,q=j.cms,f=q.SignerInfo,n=q.SignedData,o=q.SigningTime,a=q.SigningCertificate,p=q.SigningCertificateV2,c=j.cades,e=c.SignaturePolicyIdentifier;var m=new n();m.dEncapContentInfo.setContentValue(d.content);if(typeof d.detached=="boolean"){m.dEncapContentInfo.isDetached=d.detached}if(typeof d.certs=="object"){for(var h=0;hf.length){f=c[d]}}e=e.replace(f,"::");return e.slice(1,-1)}function hextoip(b){var d="malformed hex value";if(!b.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)){throw d}if(b.length==8){var c;try{c=parseInt(b.substr(0,2),16)+"."+parseInt(b.substr(2,2),16)+"."+parseInt(b.substr(4,2),16)+"."+parseInt(b.substr(6,2),16);return c}catch(a){throw d}}else{if(b.length==32){return hextoipv6(b)}else{return b}}}function iptohex(f){var j="malformed IP address";f=f.toLowerCase(f);if(f.match(/^[0-9.]+$/)){var b=f.split(".");if(b.length!==4){throw j}var g="";try{for(var e=0;e<4;e++){var h=parseInt(b[e]);g+=("0"+h.toString(16)).slice(-2)}return g}catch(c){throw j}}else{if(f.match(/^[0-9a-f:]+$/)&&f.indexOf(":")!==-1){return ipv6tohex(f)}else{throw j}}}function encodeURIComponentAll(a){var d=encodeURIComponent(a);var b="";for(var c=0;c"7"){return"00"+a}return a}function intarystrtohex(b){b=b.replace(/^\s*\[\s*/,"");b=b.replace(/\s*\]\s*$/,"");b=b.replace(/\s*/g,"");try{var c=b.split(/,/).map(function(g,e,h){var f=parseInt(g);if(f<0||255a.length){d=a.length}for(var b=0;bd){throw"key is too short for SigAlg: keylen="+j+","+a}var b="0001";var k="00"+c;var g="";var l=d-b.length-k.length;for(var f=0;f=0;--u){v=v.twice2D();v.z=f.ONE;if(t.testBit(u)){if(s.testBit(u)){v=v.add2D(y)}else{v=v.add2D(x)}}else{if(s.testBit(u)){v=v.add2D(w)}}}return v}this.getBigRandom=function(r){return new f(r.bitLength(),a).mod(r.subtract(f.ONE)).add(f.ONE)};this.setNamedCurve=function(r){this.ecparams=c.getByName(r);this.prvKeyHex=null;this.pubKeyHex=null;this.curveName=r};this.setPrivateKeyHex=function(r){this.isPrivate=true;this.prvKeyHex=r};this.setPublicKeyHex=function(r){this.isPublic=true;this.pubKeyHex=r};this.getPublicKeyXYHex=function(){var t=this.pubKeyHex;if(t.substr(0,2)!=="04"){throw"this method supports uncompressed format(04) only"}var s=this.ecparams.keylen/4;if(t.length!==2+s*2){throw"malformed public key hex length"}var r={};r.x=t.substr(2,s);r.y=t.substr(2+s);return r};this.getShortNISTPCurveName=function(){var r=this.curveName;if(r==="secp256r1"||r==="NIST P-256"||r==="P-256"||r==="prime256v1"){return"P-256"}if(r==="secp384r1"||r==="NIST P-384"||r==="P-384"){return"P-384"}return null};this.generateKeyPairHex=function(){var t=this.ecparams.n;var w=this.getBigRandom(t);var u=this.ecparams.G.multiply(w);var z=u.getX().toBigInteger();var x=u.getY().toBigInteger();var r=this.ecparams.keylen/4;var v=("0000000000"+w.toString(16)).slice(-r);var A=("0000000000"+z.toString(16)).slice(-r);var y=("0000000000"+x.toString(16)).slice(-r);var s="04"+A+y;this.setPrivateKeyHex(v);this.setPublicKeyHex(s);return{ecprvhex:v,ecpubhex:s}};this.signWithMessageHash=function(r){return this.signHex(r,this.prvKeyHex)};this.signHex=function(x,u){var A=new f(u,16);var v=this.ecparams.n;var z=new f(x.substring(0,this.ecparams.keylen/4),16);do{var w=this.getBigRandom(v);var B=this.ecparams.G;var y=B.multiply(w);var t=y.getX().toBigInteger().mod(v)}while(t.compareTo(f.ZERO)<=0);var C=w.modInverse(v).multiply(z.add(A.multiply(t))).mod(v);return m.biRSSigToASN1Sig(t,C)};this.sign=function(w,B){var z=B;var u=this.ecparams.n;var y=f.fromByteArrayUnsigned(w);do{var v=this.getBigRandom(u);var A=this.ecparams.G;var x=A.multiply(v);var t=x.getX().toBigInteger().mod(u)}while(t.compareTo(BigInteger.ZERO)<=0);var C=v.modInverse(u).multiply(y.add(z.multiply(t))).mod(u);return this.serializeSig(t,C)};this.verifyWithMessageHash=function(s,r){return this.verifyHex(s,r,this.pubKeyHex)};this.verifyHex=function(v,y,u){try{var t,B;var w=m.parseSigHex(y);t=w.r;B=w.s;var x=h.decodeFromHex(this.ecparams.curve,u);var z=new f(v.substring(0,this.ecparams.keylen/4),16);return this.verifyRaw(z,t,B,x)}catch(A){return false}};this.verify=function(z,A,u){var w,t;if(Bitcoin.Util.isArray(A)){var y=this.parseSig(A);w=y.r;t=y.s}else{if("object"===typeof A&&A.r&&A.s){w=A.r;t=A.s}else{throw"Invalid value for signature"}}var v;if(u instanceof ECPointFp){v=u}else{if(Bitcoin.Util.isArray(u)){v=h.decodeFrom(this.ecparams.curve,u)}else{throw"Invalid format for pubkey value, must be byte array or ECPointFp"}}var x=f.fromByteArrayUnsigned(z);return this.verifyRaw(x,w,t,v)};this.verifyRaw=function(z,t,E,y){var x=this.ecparams.n;var D=this.ecparams.G;if(t.compareTo(f.ONE)<0||t.compareTo(x)>=0){return false}if(E.compareTo(f.ONE)<0||E.compareTo(x)>=0){return false}var A=E.modInverse(x);var w=z.multiply(A).mod(x);var u=t.multiply(A).mod(x);var B=D.multiply(w).add(y.multiply(u));var C=B.getX().toBigInteger().mod(x);return C.equals(t)};this.serializeSig=function(v,u){var w=v.toByteArraySigned();var t=u.toByteArraySigned();var x=[];x.push(2);x.push(w.length);x=x.concat(w);x.push(2);x.push(t.length);x=x.concat(t);x.unshift(x.length);x.unshift(48);return x};this.parseSig=function(y){var x;if(y[0]!=48){throw new Error("Signature not a valid DERSequence")}x=2;if(y[x]!=2){throw new Error("First element in signature must be a DERInteger")}var w=y.slice(x+2,x+2+y[x+1]);x+=2+y[x+1];if(y[x]!=2){throw new Error("Second element in signature must be a DERInteger")}var t=y.slice(x+2,x+2+y[x+1]);x+=2+y[x+1];var v=f.fromByteArrayUnsigned(w);var u=f.fromByteArrayUnsigned(t);return{r:v,s:u}};this.parseSigCompact=function(w){if(w.length!==65){throw"Signature has the wrong length"}var t=w[0]-27;if(t<0||t>7){throw"Invalid signature type"}var x=this.ecparams.n;var v=f.fromByteArrayUnsigned(w.slice(1,33)).mod(x);var u=f.fromByteArrayUnsigned(w.slice(33,65)).mod(x);return{r:v,s:u,i:t}};this.readPKCS5PrvKeyHex=function(u){if(k(u)===false){throw new Error("not ASN.1 hex string")}var r,t,v;try{r=n(u,0,["[0]",0],"06");t=n(u,0,[1],"04");try{v=n(u,0,["[1]",0],"03")}catch(s){}}catch(s){throw new Error("malformed PKCS#1/5 plain ECC private key")}this.curveName=d(r);if(this.curveName===undefined){throw"unsupported curve name"}this.setNamedCurve(this.curveName);this.setPublicKeyHex(v);this.setPrivateKeyHex(t);this.isPublic=false};this.readPKCS8PrvKeyHex=function(v){if(k(v)===false){throw new j("not ASN.1 hex string")}var t,r,u,w;try{t=n(v,0,[1,0],"06");r=n(v,0,[1,1],"06");u=n(v,0,[2,0,1],"04");try{w=n(v,0,[2,0,"[1]",0],"03")}catch(s){}}catch(s){throw new j("malformed PKCS#8 plain ECC private key")}this.curveName=d(r);if(this.curveName===undefined){throw new j("unsupported curve name")}this.setNamedCurve(this.curveName);this.setPublicKeyHex(w);this.setPrivateKeyHex(u);this.isPublic=false};this.readPKCS8PubKeyHex=function(u){if(k(u)===false){throw new j("not ASN.1 hex string")}var t,r,v;try{t=n(u,0,[0,0],"06");r=n(u,0,[0,1],"06");v=n(u,0,[1],"03")}catch(s){throw new j("malformed PKCS#8 ECC public key")}this.curveName=d(r);if(this.curveName===null){throw new j("unsupported curve name")}this.setNamedCurve(this.curveName);this.setPublicKeyHex(v)};this.readCertPubKeyHex=function(t,v){if(k(t)===false){throw new j("not ASN.1 hex string")}var r,u;try{r=n(t,0,[0,5,0,1],"06");u=n(t,0,[0,5,1],"03")}catch(s){throw new j("malformed X.509 certificate ECC public key")}this.curveName=d(r);if(this.curveName===null){throw new j("unsupported curve name")}this.setNamedCurve(this.curveName);this.setPublicKeyHex(u)};if(e!==undefined){if(e.curve!==undefined){this.curveName=e.curve}}if(this.curveName===undefined){this.curveName=g}this.setNamedCurve(this.curveName);if(e!==undefined){if(e.prv!==undefined){this.setPrivateKeyHex(e.prv)}if(e.pub!==undefined){this.setPublicKeyHex(e.pub)}}};KJUR.crypto.ECDSA.parseSigHex=function(a){var b=KJUR.crypto.ECDSA.parseSigHexInHexRS(a);var d=new BigInteger(b.r,16);var c=new BigInteger(b.s,16);return{r:d,s:c}};KJUR.crypto.ECDSA.parseSigHexInHexRS=function(f){var j=ASN1HEX,i=j.getChildIdx,g=j.getV;j.checkStrictDER(f,0);if(f.substr(0,2)!="30"){throw new Error("signature is not a ASN.1 sequence")}var h=i(f,0);if(h.length!=2){throw new Error("signature shall have two elements")}var e=h[0];var d=h[1];if(f.substr(e,2)!="02"){throw new Error("1st item not ASN.1 integer")}if(f.substr(d,2)!="02"){throw new Error("2nd item not ASN.1 integer")}var c=g(f,e);var b=g(f,d);return{r:c,s:b}};KJUR.crypto.ECDSA.asn1SigToConcatSig=function(c){var d=KJUR.crypto.ECDSA.parseSigHexInHexRS(c);var b=d.r;var a=d.s;if(b.substr(0,2)=="00"&&(b.length%32)==2){b=b.substr(2)}if(a.substr(0,2)=="00"&&(a.length%32)==2){a=a.substr(2)}if((b.length%32)==30){b="00"+b}if((a.length%32)==30){a="00"+a}if(b.length%32!=0){throw"unknown ECDSA sig r length error"}if(a.length%32!=0){throw"unknown ECDSA sig s length error"}return b+a};KJUR.crypto.ECDSA.concatSigToASN1Sig=function(a){if((((a.length/2)*8)%(16*8))!=0){throw"unknown ECDSA concatinated r-s sig length error"}var c=a.substr(0,a.length/2);var b=a.substr(a.length/2);return KJUR.crypto.ECDSA.hexRSSigToASN1Sig(c,b)};KJUR.crypto.ECDSA.hexRSSigToASN1Sig=function(b,a){var d=new BigInteger(b,16);var c=new BigInteger(a,16);return KJUR.crypto.ECDSA.biRSSigToASN1Sig(d,c)};KJUR.crypto.ECDSA.biRSSigToASN1Sig=function(f,d){var c=KJUR.asn1;var b=new c.DERInteger({bigint:f});var a=new c.DERInteger({bigint:d});var e=new c.DERSequence({array:[b,a]});return e.getEncodedHex()};KJUR.crypto.ECDSA.getName=function(a){if(a==="2b8104001f"){return"secp192k1"}if(a==="2a8648ce3d030107"){return"secp256r1"}if(a==="2b8104000a"){return"secp256k1"}if(a==="2b81040021"){return"secp224r1"}if(a==="2b81040022"){return"secp384r1"}if("|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(a)!==-1){return"secp256r1"}if("|secp256k1|".indexOf(a)!==-1){return"secp256k1"}if("|secp224r1|NIST P-224|P-224|".indexOf(a)!==-1){return"secp224r1"}if("|secp384r1|NIST P-384|P-384|".indexOf(a)!==-1){return"secp384r1"}return null}; if(typeof KJUR=="undefined"||!KJUR){KJUR={}}if(typeof KJUR.crypto=="undefined"||!KJUR.crypto){KJUR.crypto={}}KJUR.crypto.ECParameterDB=new function(){var b={};var c={};function a(d){return new BigInteger(d,16)}this.getByName=function(e){var d=e;if(typeof c[d]!="undefined"){d=c[e]}if(typeof b[d]!="undefined"){return b[d]}throw"unregistered EC curve name: "+d};this.regist=function(A,l,o,g,m,e,j,f,k,u,d,x){b[A]={};var s=a(o);var z=a(g);var y=a(m);var t=a(e);var w=a(j);var r=new ECCurveFp(s,z,y);var q=r.decodePointHex("04"+f+k);b[A]["name"]=A;b[A]["keylen"]=l;b[A]["curve"]=r;b[A]["G"]=q;b[A]["n"]=t;b[A]["h"]=w;b[A]["oid"]=d;b[A]["info"]=x;for(var v=0;v1){l=new BigInteger(n,16)}else{l=null}m=new BigInteger(o,16);this.setPrivate(h,f,j,l,m)};this.setPublic=function(i,h,f,j){this.isPublic=true;this.p=i;this.q=h;this.g=f;this.y=j;this.x=null};this.setPublicHex=function(k,j,i,l){var g,f,m,h;g=new BigInteger(k,16);f=new BigInteger(j,16);m=new BigInteger(i,16);h=new BigInteger(l,16);this.setPublic(g,f,m,h)};this.signWithMessageHash=function(j){var i=this.p;var h=this.q;var m=this.g;var o=this.y;var t=this.x;var l=KJUR.crypto.Util.getRandomBigIntegerMinToMax(BigInteger.ONE.add(BigInteger.ONE),h.subtract(BigInteger.ONE));var u=j.substr(0,h.bitLength()/4);var n=new BigInteger(u,16);var f=(m.modPow(l,i)).mod(h);var w=(l.modInverse(h).multiply(n.add(t.multiply(f)))).mod(h);var v=KJUR.asn1.ASN1Util.jsonToASN1HEX({seq:[{"int":{bigint:f}},{"int":{bigint:w}}]});return v};this.verifyWithMessageHash=function(m,l){var j=this.p;var h=this.q;var o=this.g;var u=this.y;var n=this.parseASN1Signature(l);var f=n[0];var C=n[1];var B=m.substr(0,h.bitLength()/4);var t=new BigInteger(B,16);if(BigInteger.ZERO.compareTo(f)>0||f.compareTo(h)>0){throw"invalid DSA signature"}if(BigInteger.ZERO.compareTo(C)>=0||C.compareTo(h)>0){throw"invalid DSA signature"}var x=C.modInverse(h);var k=t.multiply(x).mod(h);var i=f.multiply(x).mod(h);var A=o.modPow(k,j).multiply(u.modPow(i,j)).mod(j).mod(h);return A.compareTo(f)==0};this.parseASN1Signature=function(f){try{var i=new c(d(f,0,[0],"02"),16);var h=new c(d(f,0,[1],"02"),16);return[i,h]}catch(g){throw new Error("malformed ASN.1 DSA signature")}};this.readPKCS5PrvKeyHex=function(j){var k,i,g,l,m;if(a(j)===false){throw new Error("not ASN.1 hex string")}try{k=d(j,0,[1],"02");i=d(j,0,[2],"02");g=d(j,0,[3],"02");l=d(j,0,[4],"02");m=d(j,0,[5],"02")}catch(f){throw new Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(k,i,g,l,m)};this.readPKCS8PrvKeyHex=function(j){var k,i,g,l;if(a(j)===false){throw new Error("not ASN.1 hex string")}try{k=d(j,0,[1,1,0],"02");i=d(j,0,[1,1,1],"02");g=d(j,0,[1,1,2],"02");l=d(j,0,[2,0],"02")}catch(f){throw new Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(k,i,g,null,l)};this.readPKCS8PubKeyHex=function(j){var k,i,g,l;if(a(j)===false){throw new Error("not ASN.1 hex string")}try{k=d(j,0,[0,1,0],"02");i=d(j,0,[0,1,1],"02");g=d(j,0,[0,1,2],"02");l=d(j,0,[1,0],"02")}catch(f){throw new Error("malformed PKCS#8 DSA public key")}this.setPublicHex(k,i,g,l)};this.readCertPubKeyHex=function(j,m){var k,i,g,l;if(a(j)===false){throw new Error("not ASN.1 hex string")}try{k=d(j,0,[0,5,0,1,0],"02");i=d(j,0,[0,5,0,1,1],"02");g=d(j,0,[0,5,0,1,2],"02");l=d(j,0,[0,5,1,0],"02")}catch(f){throw new Error("malformed X.509 certificate DSA public key")}this.setPublicHex(k,i,g,l)}}; var KEYUTIL=function(){var d=function(p,r,q){return k(CryptoJS.AES,p,r,q)};var e=function(p,r,q){return k(CryptoJS.TripleDES,p,r,q)};var a=function(p,r,q){return k(CryptoJS.DES,p,r,q)};var k=function(s,x,u,q){var r=CryptoJS.enc.Hex.parse(x);var w=CryptoJS.enc.Hex.parse(u);var p=CryptoJS.enc.Hex.parse(q);var t={};t.key=w;t.iv=p;t.ciphertext=r;var v=s.decrypt(t,w,{iv:p});return CryptoJS.enc.Hex.stringify(v)};var l=function(p,r,q){return g(CryptoJS.AES,p,r,q)};var o=function(p,r,q){return g(CryptoJS.TripleDES,p,r,q)};var f=function(p,r,q){return g(CryptoJS.DES,p,r,q)};var g=function(t,y,v,q){var s=CryptoJS.enc.Hex.parse(y);var x=CryptoJS.enc.Hex.parse(v);var p=CryptoJS.enc.Hex.parse(q);var w=t.encrypt(s,x,{iv:p});var r=CryptoJS.enc.Hex.parse(w.toString());var u=CryptoJS.enc.Base64.stringify(r);return u};var i={"AES-256-CBC":{proc:d,eproc:l,keylen:32,ivlen:16},"AES-192-CBC":{proc:d,eproc:l,keylen:24,ivlen:16},"AES-128-CBC":{proc:d,eproc:l,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:o,keylen:24,ivlen:8},"DES-CBC":{proc:a,eproc:f,keylen:8,ivlen:8}};var c=function(p){return i[p]["proc"]};var m=function(p){var r=CryptoJS.lib.WordArray.random(p);var q=CryptoJS.enc.Hex.stringify(r);return q};var n=function(v){var w={};var q=v.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));if(q){w.cipher=q[1];w.ivsalt=q[2]}var p=v.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));if(p){w.type=p[1]}var u=-1;var x=0;if(v.indexOf("\r\n\r\n")!=-1){u=v.indexOf("\r\n\r\n");x=2}if(v.indexOf("\n\n")!=-1){u=v.indexOf("\n\n");x=1}var t=v.indexOf("-----END");if(u!=-1&&t!=-1){var r=v.substring(u+x*2,t-x);r=r.replace(/\s+/g,"");w.data=r}return w};var j=function(q,y,p){var v=p.substring(0,16);var t=CryptoJS.enc.Hex.parse(v);var r=CryptoJS.enc.Utf8.parse(y);var u=i[q]["keylen"]+i[q]["ivlen"];var x="";var w=null;for(;;){var s=CryptoJS.algo.MD5.create();if(w!=null){s.update(w)}s.update(r);s.update(t);w=s.finalize();x=x+CryptoJS.enc.Hex.stringify(w);if(x.length>=u*2){break}}var z={};z.keyhex=x.substr(0,i[q]["keylen"]*2);z.ivhex=x.substr(i[q]["keylen"]*2,i[q]["ivlen"]*2);return z};var b=function(p,v,r,w){var s=CryptoJS.enc.Base64.parse(p);var q=CryptoJS.enc.Hex.stringify(s);var u=i[v]["proc"];var t=u(q,r,w);return t};var h=function(p,s,q,u){var r=i[s]["eproc"];var t=r(p,q,u);return t};return{version:"1.0.0",parsePKCS5PEM:function(p){return n(p)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(q,p,r){return j(q,p,r)},decryptKeyB64:function(p,r,q,s){return b(p,r,q,s)},getDecryptedKeyHex:function(y,x){var q=n(y);var t=q.type;var r=q.cipher;var p=q.ivsalt;var s=q.data;var w=j(r,x,p);var v=w.keyhex;var u=b(s,r,v,p);return u},getEncryptedPKCS5PEMFromPrvKeyHex:function(x,s,A,t,r){var p="";if(typeof t=="undefined"||t==null){t="AES-256-CBC"}if(typeof i[t]=="undefined"){throw"KEYUTIL unsupported algorithm: "+t}if(typeof r=="undefined"||r==null){var v=i[t]["ivlen"];var u=m(v);r=u.toUpperCase()}var z=j(t,A,r);var y=z.keyhex;var w=h(s,t,y,r);var q=w.replace(/(.{64})/g,"$1\r\n");var p="-----BEGIN "+x+" PRIVATE KEY-----\r\n";p+="Proc-Type: 4,ENCRYPTED\r\n";p+="DEK-Info: "+t+","+r+"\r\n";p+="\r\n";p+=q;p+="\r\n-----END "+x+" PRIVATE KEY-----\r\n";return p},parseHexOfEncryptedPKCS8:function(y){var B=ASN1HEX;var z=B.getChildIdx;var w=B.getV;var t={};var r=z(y,0);if(r.length!=2){throw"malformed format: SEQUENCE(0).items != 2: "+r.length}t.ciphertext=w(y,r[1]);var A=z(y,r[0]);if(A.length!=2){throw"malformed format: SEQUENCE(0.0).items != 2: "+A.length}if(w(y,A[0])!="2a864886f70d01050d"){throw"this only supports pkcs5PBES2"}var p=z(y,A[1]);if(A.length!=2){throw"malformed format: SEQUENCE(0.0.1).items != 2: "+p.length}var q=z(y,p[1]);if(q.length!=2){throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+q.length}if(w(y,q[0])!="2a864886f70d0307"){throw"this only supports TripleDES"}t.encryptionSchemeAlg="TripleDES";t.encryptionSchemeIV=w(y,q[1]);var s=z(y,p[0]);if(s.length!=2){throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+s.length}if(w(y,s[0])!="2a864886f70d01050c"){throw"this only supports pkcs5PBKDF2"}var x=z(y,s[1]);if(x.length<2){throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+x.length}t.pbkdf2Salt=w(y,x[0]);var u=w(y,x[1]);try{t.pbkdf2Iter=parseInt(u,16)}catch(v){throw"malformed format pbkdf2Iter: "+u}return t},getPBKDF2KeyHexFromParam:function(u,p){var t=CryptoJS.enc.Hex.parse(u.pbkdf2Salt);var q=u.pbkdf2Iter;var s=CryptoJS.PBKDF2(p,t,{keySize:192/32,iterations:q});var r=CryptoJS.enc.Hex.stringify(s);return r},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(x,y){var r=pemtohex(x,"ENCRYPTED PRIVATE KEY");var p=this.parseHexOfEncryptedPKCS8(r);var u=KEYUTIL.getPBKDF2KeyHexFromParam(p,y);var v={};v.ciphertext=CryptoJS.enc.Hex.parse(p.ciphertext);var t=CryptoJS.enc.Hex.parse(u);var s=CryptoJS.enc.Hex.parse(p.encryptionSchemeIV);var w=CryptoJS.TripleDES.decrypt(v,t,{iv:s});var q=CryptoJS.enc.Hex.stringify(w);return q},getKeyFromEncryptedPKCS8PEM:function(s,q){var p=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(s,q);var r=this.getKeyFromPlainPrivatePKCS8Hex(p);return r},parsePlainPrivatePKCS8Hex:function(s){var v=ASN1HEX;var u=v.getChildIdx;var t=v.getV;var q={};q.algparam=null;if(s.substr(0,2)!="30"){throw"malformed plain PKCS8 private key(code:001)"}var r=u(s,0);if(r.length!=3){throw"malformed plain PKCS8 private key(code:002)"}if(s.substr(r[1],2)!="30"){throw"malformed PKCS8 private key(code:003)"}var p=u(s,r[1]);if(p.length!=2){throw"malformed PKCS8 private key(code:004)"}if(s.substr(p[0],2)!="06"){throw"malformed PKCS8 private key(code:005)"}q.algoid=t(s,p[0]);if(s.substr(p[1],2)=="06"){q.algparam=t(s,p[1])}if(s.substr(r[2],2)!="04"){throw"malformed PKCS8 private key(code:006)"}q.keyidx=v.getVidx(s,r[2]);return q},getKeyFromPlainPrivatePKCS8PEM:function(q){var p=pemtohex(q,"PRIVATE KEY");var r=this.getKeyFromPlainPrivatePKCS8Hex(p);return r},getKeyFromPlainPrivatePKCS8Hex:function(p){var q=this.parsePlainPrivatePKCS8Hex(p);var r;if(q.algoid=="2a864886f70d010101"){r=new RSAKey()}else{if(q.algoid=="2a8648ce380401"){r=new KJUR.crypto.DSA()}else{if(q.algoid=="2a8648ce3d0201"){r=new KJUR.crypto.ECDSA()}else{throw"unsupported private key algorithm"}}}r.readPKCS8PrvKeyHex(p);return r},_getKeyFromPublicPKCS8Hex:function(q){var p;var r=ASN1HEX.getVbyList(q,0,[0,0],"06");if(r==="2a864886f70d010101"){p=new RSAKey()}else{if(r==="2a8648ce380401"){p=new KJUR.crypto.DSA()}else{if(r==="2a8648ce3d0201"){p=new KJUR.crypto.ECDSA()}else{throw"unsupported PKCS#8 public key hex"}}}p.readPKCS8PubKeyHex(q);return p},parsePublicRawRSAKeyHex:function(r){var u=ASN1HEX;var t=u.getChildIdx;var s=u.getV;var p={};if(r.substr(0,2)!="30"){throw"malformed RSA key(code:001)"}var q=t(r,0);if(q.length!=2){throw"malformed RSA key(code:002)"}if(r.substr(q[0],2)!="02"){throw"malformed RSA key(code:003)"}p.n=s(r,q[0]);if(r.substr(q[1],2)!="02"){throw"malformed RSA key(code:004)"}p.e=s(r,q[1]);return p},parsePublicPKCS8Hex:function(t){var v=ASN1HEX;var u=v.getChildIdx;var s=v.getV;var q={};q.algparam=null;var r=u(t,0);if(r.length!=2){throw"outer DERSequence shall have 2 elements: "+r.length}var w=r[0];if(t.substr(w,2)!="30"){throw"malformed PKCS8 public key(code:001)"}var p=u(t,w);if(p.length!=2){throw"malformed PKCS8 public key(code:002)"}if(t.substr(p[0],2)!="06"){throw"malformed PKCS8 public key(code:003)"}q.algoid=s(t,p[0]);if(t.substr(p[1],2)=="06"){q.algparam=s(t,p[1])}else{if(t.substr(p[1],2)=="30"){q.algparam={};q.algparam.p=v.getVbyList(t,p[1],[0],"02");q.algparam.q=v.getVbyList(t,p[1],[1],"02");q.algparam.g=v.getVbyList(t,p[1],[2],"02")}}if(t.substr(r[1],2)!="03"){throw"malformed PKCS8 public key(code:004)"}q.key=s(t,r[1]).substr(2);return q},}}();KEYUTIL.getKey=function(l,k,n){var G=ASN1HEX,L=G.getChildIdx,v=G.getV,d=G.getVbyList,c=KJUR.crypto,i=c.ECDSA,C=c.DSA,w=RSAKey,M=pemtohex,F=KEYUTIL;if(typeof w!="undefined"&&l instanceof w){return l}if(typeof i!="undefined"&&l instanceof i){return l}if(typeof C!="undefined"&&l instanceof C){return l}if(l.curve!==undefined&&l.xy!==undefined&&l.d===undefined){return new i({pub:l.xy,curve:l.curve})}if(l.curve!==undefined&&l.d!==undefined){return new i({prv:l.d,curve:l.curve})}if(l.kty===undefined&&l.n!==undefined&&l.e!==undefined&&l.d===undefined){var P=new w();P.setPublic(l.n,l.e);return P}if(l.kty===undefined&&l.n!==undefined&&l.e!==undefined&&l.d!==undefined&&l.p!==undefined&&l.q!==undefined&&l.dp!==undefined&&l.dq!==undefined&&l.co!==undefined&&l.qi===undefined){var P=new w();P.setPrivateEx(l.n,l.e,l.d,l.p,l.q,l.dp,l.dq,l.co);return P}if(l.kty===undefined&&l.n!==undefined&&l.e!==undefined&&l.d!==undefined&&l.p===undefined){var P=new w();P.setPrivate(l.n,l.e,l.d);return P}if(l.p!==undefined&&l.q!==undefined&&l.g!==undefined&&l.y!==undefined&&l.x===undefined){var P=new C();P.setPublic(l.p,l.q,l.g,l.y);return P}if(l.p!==undefined&&l.q!==undefined&&l.g!==undefined&&l.y!==undefined&&l.x!==undefined){var P=new C();P.setPrivate(l.p,l.q,l.g,l.y,l.x);return P}if(l.kty==="RSA"&&l.n!==undefined&&l.e!==undefined&&l.d===undefined){var P=new w();P.setPublic(b64utohex(l.n),b64utohex(l.e));return P}if(l.kty==="RSA"&&l.n!==undefined&&l.e!==undefined&&l.d!==undefined&&l.p!==undefined&&l.q!==undefined&&l.dp!==undefined&&l.dq!==undefined&&l.qi!==undefined){var P=new w();P.setPrivateEx(b64utohex(l.n),b64utohex(l.e),b64utohex(l.d),b64utohex(l.p),b64utohex(l.q),b64utohex(l.dp),b64utohex(l.dq),b64utohex(l.qi));return P}if(l.kty==="RSA"&&l.n!==undefined&&l.e!==undefined&&l.d!==undefined){var P=new w();P.setPrivate(b64utohex(l.n),b64utohex(l.e),b64utohex(l.d));return P}if(l.kty==="EC"&&l.crv!==undefined&&l.x!==undefined&&l.y!==undefined&&l.d===undefined){var j=new i({curve:l.crv});var t=j.ecparams.keylen/4;var B=("0000000000"+b64utohex(l.x)).slice(-t);var z=("0000000000"+b64utohex(l.y)).slice(-t);var u="04"+B+z;j.setPublicKeyHex(u);return j}if(l.kty==="EC"&&l.crv!==undefined&&l.x!==undefined&&l.y!==undefined&&l.d!==undefined){var j=new i({curve:l.crv});var t=j.ecparams.keylen/4;var B=("0000000000"+b64utohex(l.x)).slice(-t);var z=("0000000000"+b64utohex(l.y)).slice(-t);var u="04"+B+z;var b=("0000000000"+b64utohex(l.d)).slice(-t);j.setPublicKeyHex(u);j.setPrivateKeyHex(b);return j}if(n==="pkcs5prv"){var J=l,G=ASN1HEX,N,P;N=L(J,0);if(N.length===9){P=new w();P.readPKCS5PrvKeyHex(J)}else{if(N.length===6){P=new C();P.readPKCS5PrvKeyHex(J)}else{if(N.length>2&&J.substr(N[1],2)==="04"){P=new i();P.readPKCS5PrvKeyHex(J)}else{throw"unsupported PKCS#1/5 hexadecimal key"}}}return P}if(n==="pkcs8prv"){var P=F.getKeyFromPlainPrivatePKCS8Hex(l);return P}if(n==="pkcs8pub"){return F._getKeyFromPublicPKCS8Hex(l)}if(n==="x509pub"){return X509.getPublicKeyFromCertHex(l)}if(l.indexOf("-END CERTIFICATE-",0)!=-1||l.indexOf("-END X509 CERTIFICATE-",0)!=-1||l.indexOf("-END TRUSTED CERTIFICATE-",0)!=-1){return X509.getPublicKeyFromCertPEM(l)}if(l.indexOf("-END PUBLIC KEY-")!=-1){var O=pemtohex(l,"PUBLIC KEY");return F._getKeyFromPublicPKCS8Hex(O)}if(l.indexOf("-END RSA PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")==-1){var m=M(l,"RSA PRIVATE KEY");return F.getKey(m,null,"pkcs5prv")}if(l.indexOf("-END DSA PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")==-1){var I=M(l,"DSA PRIVATE KEY");var E=d(I,0,[1],"02");var D=d(I,0,[2],"02");var K=d(I,0,[3],"02");var r=d(I,0,[4],"02");var s=d(I,0,[5],"02");var P=new C();P.setPrivate(new BigInteger(E,16),new BigInteger(D,16),new BigInteger(K,16),new BigInteger(r,16),new BigInteger(s,16));return P}if(l.indexOf("-END EC PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")==-1){var m=M(l,"EC PRIVATE KEY");return F.getKey(m,null,"pkcs5prv")}if(l.indexOf("-END PRIVATE KEY-")!=-1){return F.getKeyFromPlainPrivatePKCS8PEM(l)}if(l.indexOf("-END RSA PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")!=-1){var o=F.getDecryptedKeyHex(l,k);var H=new RSAKey();H.readPKCS5PrvKeyHex(o);return H}if(l.indexOf("-END EC PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")!=-1){var I=F.getDecryptedKeyHex(l,k);var P=d(I,0,[1],"04");var f=d(I,0,[2,0],"06");var A=d(I,0,[3,0],"03").substr(2);var e="";if(KJUR.crypto.OID.oidhex2name[f]!==undefined){e=KJUR.crypto.OID.oidhex2name[f]}else{throw"undefined OID(hex) in KJUR.crypto.OID: "+f}var j=new i({curve:e});j.setPublicKeyHex(A);j.setPrivateKeyHex(P);j.isPublic=false;return j}if(l.indexOf("-END DSA PRIVATE KEY-")!=-1&&l.indexOf("4,ENCRYPTED")!=-1){var I=F.getDecryptedKeyHex(l,k);var E=d(I,0,[1],"02");var D=d(I,0,[2],"02");var K=d(I,0,[3],"02");var r=d(I,0,[4],"02");var s=d(I,0,[5],"02");var P=new C();P.setPrivate(new BigInteger(E,16),new BigInteger(D,16),new BigInteger(K,16),new BigInteger(r,16),new BigInteger(s,16));return P}if(l.indexOf("-END ENCRYPTED PRIVATE KEY-")!=-1){return F.getKeyFromEncryptedPKCS8PEM(l,k)}throw new Error("not supported argument")};KEYUTIL.generateKeypair=function(a,c){if(a=="RSA"){var b=c;var h=new RSAKey();h.generate(b,"10001");h.isPrivate=true;h.isPublic=true;var f=new RSAKey();var e=h.n.toString(16);var i=h.e.toString(16);f.setPublic(e,i);f.isPrivate=false;f.isPublic=true;var k={};k.prvKeyObj=h;k.pubKeyObj=f;return k}else{if(a=="EC"){var d=c;var g=new KJUR.crypto.ECDSA({curve:d});var j=g.generateKeyPairHex();var h=new KJUR.crypto.ECDSA({curve:d});h.setPublicKeyHex(j.ecpubhex);h.setPrivateKeyHex(j.ecprvhex);h.isPrivate=true;h.isPublic=false;var f=new KJUR.crypto.ECDSA({curve:d});f.setPublicKeyHex(j.ecpubhex);f.isPrivate=false;f.isPublic=true;var k={};k.prvKeyObj=h;k.pubKeyObj=f;return k}else{throw"unknown algorithm: "+a}}};KEYUTIL.getPEM=function(b,D,y,m,q,j){var F=KJUR,k=F.asn1,z=k.DERObjectIdentifier,f=k.DERInteger,l=k.ASN1Util.newObject,a=k.x509,C=a.SubjectPublicKeyInfo,e=F.crypto,u=e.DSA,r=e.ECDSA,n=RSAKey;function A(s){var G=l({seq:[{"int":0},{"int":{bigint:s.n}},{"int":s.e},{"int":{bigint:s.d}},{"int":{bigint:s.p}},{"int":{bigint:s.q}},{"int":{bigint:s.dmp1}},{"int":{bigint:s.dmq1}},{"int":{bigint:s.coeff}}]});return G}function B(G){var s=l({seq:[{"int":1},{octstr:{hex:G.prvKeyHex}},{tag:["a0",true,{oid:{name:G.curveName}}]},{tag:["a1",true,{bitstr:{hex:"00"+G.pubKeyHex}}]}]});return s}function x(s){var G=l({seq:[{"int":0},{"int":{bigint:s.p}},{"int":{bigint:s.q}},{"int":{bigint:s.g}},{"int":{bigint:s.y}},{"int":{bigint:s.x}}]});return G}if(((n!==undefined&&b instanceof n)||(u!==undefined&&b instanceof u)||(r!==undefined&&b instanceof r))&&b.isPublic==true&&(D===undefined||D=="PKCS8PUB")){var E=new C(b);var w=E.getEncodedHex();return hextopem(w,"PUBLIC KEY")}if(D=="PKCS1PRV"&&n!==undefined&&b instanceof n&&(y===undefined||y==null)&&b.isPrivate==true){var E=A(b);var w=E.getEncodedHex();return hextopem(w,"RSA PRIVATE KEY")}if(D=="PKCS1PRV"&&r!==undefined&&b instanceof r&&(y===undefined||y==null)&&b.isPrivate==true){var i=new z({name:b.curveName});var v=i.getEncodedHex();var h=B(b);var t=h.getEncodedHex();var p="";p+=hextopem(v,"EC PARAMETERS");p+=hextopem(t,"EC PRIVATE KEY");return p}if(D=="PKCS1PRV"&&u!==undefined&&b instanceof u&&(y===undefined||y==null)&&b.isPrivate==true){var E=x(b);var w=E.getEncodedHex();return hextopem(w,"DSA PRIVATE KEY")}if(D=="PKCS5PRV"&&n!==undefined&&b instanceof n&&(y!==undefined&&y!=null)&&b.isPrivate==true){var E=A(b);var w=E.getEncodedHex();if(m===undefined){m="DES-EDE3-CBC"}return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",w,y,m,j)}if(D=="PKCS5PRV"&&r!==undefined&&b instanceof r&&(y!==undefined&&y!=null)&&b.isPrivate==true){var E=B(b);var w=E.getEncodedHex();if(m===undefined){m="DES-EDE3-CBC"}return this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",w,y,m,j)}if(D=="PKCS5PRV"&&u!==undefined&&b instanceof u&&(y!==undefined&&y!=null)&&b.isPrivate==true){var E=x(b);var w=E.getEncodedHex();if(m===undefined){m="DES-EDE3-CBC"}return this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",w,y,m,j)}var o=function(G,s){var I=c(G,s);var H=new l({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:I.pbkdf2Salt}},{"int":I.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:I.encryptionSchemeIV}}]}]}]},{octstr:{hex:I.ciphertext}}]});return H.getEncodedHex()};var c=function(N,O){var H=100;var M=CryptoJS.lib.WordArray.random(8);var L="DES-EDE3-CBC";var s=CryptoJS.lib.WordArray.random(8);var I=CryptoJS.PBKDF2(O,M,{keySize:192/32,iterations:H});var J=CryptoJS.enc.Hex.parse(N);var K=CryptoJS.TripleDES.encrypt(J,I,{iv:s})+"";var G={};G.ciphertext=K;G.pbkdf2Salt=CryptoJS.enc.Hex.stringify(M);G.pbkdf2Iter=H;G.encryptionSchemeAlg=L;G.encryptionSchemeIV=CryptoJS.enc.Hex.stringify(s);return G};if(D=="PKCS8PRV"&&n!=undefined&&b instanceof n&&b.isPrivate==true){var g=A(b);var d=g.getEncodedHex();var E=l({seq:[{"int":0},{seq:[{oid:{name:"rsaEncryption"}},{"null":true}]},{octstr:{hex:d}}]});var w=E.getEncodedHex();if(y===undefined||y==null){return hextopem(w,"PRIVATE KEY")}else{var t=o(w,y);return hextopem(t,"ENCRYPTED PRIVATE KEY")}}if(D=="PKCS8PRV"&&r!==undefined&&b instanceof r&&b.isPrivate==true){var g=new l({seq:[{"int":1},{octstr:{hex:b.prvKeyHex}},{tag:["a1",true,{bitstr:{hex:"00"+b.pubKeyHex}}]}]});var d=g.getEncodedHex();var E=l({seq:[{"int":0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:b.curveName}}]},{octstr:{hex:d}}]});var w=E.getEncodedHex();if(y===undefined||y==null){return hextopem(w,"PRIVATE KEY")}else{var t=o(w,y);return hextopem(t,"ENCRYPTED PRIVATE KEY")}}if(D=="PKCS8PRV"&&u!==undefined&&b instanceof u&&b.isPrivate==true){var g=new f({bigint:b.x});var d=g.getEncodedHex();var E=l({seq:[{"int":0},{seq:[{oid:{name:"dsa"}},{seq:[{"int":{bigint:b.p}},{"int":{bigint:b.q}},{"int":{bigint:b.g}}]}]},{octstr:{hex:d}}]});var w=E.getEncodedHex();if(y===undefined||y==null){return hextopem(w,"PRIVATE KEY")}else{var t=o(w,y);return hextopem(t,"ENCRYPTED PRIVATE KEY")}}throw new Error("unsupported object nor format")};KEYUTIL.getKeyFromCSRPEM=function(b){var a=pemtohex(b,"CERTIFICATE REQUEST");var c=KEYUTIL.getKeyFromCSRHex(a);return c};KEYUTIL.getKeyFromCSRHex=function(a){var c=KEYUTIL.parseCSRHex(a);var b=KEYUTIL.getKey(c.p8pubkeyhex,null,"pkcs8pub");return b};KEYUTIL.parseCSRHex=function(d){var i=ASN1HEX;var f=i.getChildIdx;var c=i.getTLV;var b={};var g=d;if(g.substr(0,2)!="30"){throw"malformed CSR(code:001)"}var e=f(g,0);if(e.length<1){throw"malformed CSR(code:002)"}if(g.substr(e[0],2)!="30"){throw"malformed CSR(code:003)"}var a=f(g,e[0]);if(a.length<3){throw"malformed CSR(code:004)"}b.p8pubkeyhex=c(g,a[2]);return b};KEYUTIL.getKeyID=function(f){var c=KEYUTIL;var e=ASN1HEX;if(typeof f==="string"&&f.indexOf("BEGIN ")!=-1){f=c.getKey(f)}var d=pemtohex(c.getPEM(f));var b=e.getIdxbyList(d,0,[1]);var a=e.getV(d,b).substring(2);return KJUR.crypto.Util.hashHex(a,"sha1")};KEYUTIL.getJWKFromKey=function(d){var b={};if(d instanceof RSAKey&&d.isPrivate){b.kty="RSA";b.n=hextob64u(d.n.toString(16));b.e=hextob64u(d.e.toString(16));b.d=hextob64u(d.d.toString(16));b.p=hextob64u(d.p.toString(16));b.q=hextob64u(d.q.toString(16));b.dp=hextob64u(d.dmp1.toString(16));b.dq=hextob64u(d.dmq1.toString(16));b.qi=hextob64u(d.coeff.toString(16));return b}else{if(d instanceof RSAKey&&d.isPublic){b.kty="RSA";b.n=hextob64u(d.n.toString(16));b.e=hextob64u(d.e.toString(16));return b}else{if(d instanceof KJUR.crypto.ECDSA&&d.isPrivate){var a=d.getShortNISTPCurveName();if(a!=="P-256"&&a!=="P-384"){throw"unsupported curve name for JWT: "+a}var c=d.getPublicKeyXYHex();b.kty="EC";b.crv=a;b.x=hextob64u(c.x);b.y=hextob64u(c.y);b.d=hextob64u(d.prvKeyHex);return b}else{if(d instanceof KJUR.crypto.ECDSA&&d.isPublic){var a=d.getShortNISTPCurveName();if(a!=="P-256"&&a!=="P-384"){throw"unsupported curve name for JWT: "+a}var c=d.getPublicKeyXYHex();b.kty="EC";b.crv=a;b.x=hextob64u(c.x);b.y=hextob64u(c.y);return b}}}}throw"not supported key object"}; RSAKey.getPosArrayOfChildrenFromHex=function(a){return ASN1HEX.getChildIdx(a,0)};RSAKey.getHexValueArrayOfChildrenFromHex=function(f){var n=ASN1HEX;var i=n.getV;var k=RSAKey.getPosArrayOfChildrenFromHex(f);var e=i(f,k[0]);var j=i(f,k[1]);var b=i(f,k[2]);var c=i(f,k[3]);var h=i(f,k[4]);var g=i(f,k[5]);var m=i(f,k[6]);var l=i(f,k[7]);var d=i(f,k[8]);var k=new Array();k.push(e,j,b,c,h,g,m,l,d);return k};RSAKey.prototype.readPrivateKeyFromPEMString=function(d){var c=pemtohex(d);var b=RSAKey.getHexValueArrayOfChildrenFromHex(c);this.setPrivateEx(b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8])};RSAKey.prototype.readPKCS5PrvKeyHex=function(c){var b=RSAKey.getHexValueArrayOfChildrenFromHex(c);this.setPrivateEx(b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8])};RSAKey.prototype.readPKCS8PrvKeyHex=function(e){var c,i,k,b,a,f,d,j;var m=ASN1HEX;var l=m.getVbyListEx;if(m.isASN1HEX(e)===false){throw new Error("not ASN.1 hex string")}try{c=l(e,0,[2,0,1],"02");i=l(e,0,[2,0,2],"02");k=l(e,0,[2,0,3],"02");b=l(e,0,[2,0,4],"02");a=l(e,0,[2,0,5],"02");f=l(e,0,[2,0,6],"02");d=l(e,0,[2,0,7],"02");j=l(e,0,[2,0,8],"02")}catch(g){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(c,i,k,b,a,f,d,j)};RSAKey.prototype.readPKCS5PubKeyHex=function(c){var e=ASN1HEX;var b=e.getV;if(e.isASN1HEX(c)===false){throw new Error("keyHex is not ASN.1 hex string")}var a=e.getChildIdx(c,0);if(a.length!==2||c.substr(a[0],2)!=="02"||c.substr(a[1],2)!=="02"){throw new Error("wrong hex for PKCS#5 public key")}var f=b(c,a[0]);var d=b(c,a[1]);this.setPublic(f,d)};RSAKey.prototype.readPKCS8PubKeyHex=function(b){var c=ASN1HEX;if(c.isASN1HEX(b)===false){throw new Error("not ASN.1 hex string")}if(c.getTLVbyListEx(b,0,[0,0])!=="06092a864886f70d010101"){throw new Error("not PKCS8 RSA public key")}var a=c.getTLVbyListEx(b,0,[1,0]);this.readPKCS5PubKeyHex(a)};RSAKey.prototype.readCertPubKeyHex=function(b,d){var a,c;a=new X509();a.readCertHex(b);c=a.getPublicKeyHex();this.readPKCS8PubKeyHex(c)}; var _RE_HEXDECONLY=new RegExp("[^0-9a-f]","gi");function _rsasign_getHexPaddedDigestInfoForString(d,e,a){var b=function(f){return KJUR.crypto.Util.hashString(f,a)};var c=b(d);return KJUR.crypto.Util.getPaddedDigestInfoHex(c,a,e)}function _zeroPaddingOfSignature(e,d){var c="";var a=d/4-e.length;for(var b=0;b>24,(d&16711680)>>16,(d&65280)>>8,d&255]))));d+=1}return b}RSAKey.prototype.signPSS=function(e,a,d){var c=function(f){return KJUR.crypto.Util.hashHex(f,a)};var b=c(rstrtohex(e));if(d===undefined){d=-1}return this.signWithMessageHashPSS(b,a,d)};RSAKey.prototype.signWithMessageHashPSS=function(l,a,k){var b=hextorstr(l);var g=b.length;var m=this.n.bitLength()-1;var c=Math.ceil(m/8);var d;var o=function(i){return KJUR.crypto.Util.hashHex(i,a)};if(k===-1||k===undefined){k=g}else{if(k===-2){k=c-g-2}else{if(k<-2){throw new Error("invalid salt length")}}}if(c<(g+k+2)){throw new Error("data too long")}var f="";if(k>0){f=new Array(k);new SecureRandom().nextBytes(f);f=String.fromCharCode.apply(String,f)}var n=hextorstr(o(rstrtohex("\x00\x00\x00\x00\x00\x00\x00\x00"+b+f)));var j=[];for(d=0;d>(8*c-m))&255;q[0]&=~p;for(d=0;dthis.n.bitLength()){return 0}var i=this.doPublic(b);var e=i.toString(16).replace(/^1f+00/,"");var g=_rsasign_getAlgNameAndHashFromHexDisgestInfo(e);if(g.length==0){return false}var d=g[0];var h=g[1];var a=function(k){return KJUR.crypto.Util.hashString(k,d)};var c=a(f);return(h==c)};RSAKey.prototype.verifyWithMessageHash=function(e,a){if(a.length!=Math.ceil(this.n.bitLength()/4)){return false}var b=parseBigInt(a,16);if(b.bitLength()>this.n.bitLength()){return 0}var h=this.doPublic(b);var g=h.toString(16).replace(/^1f+00/,"");var c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(g);if(c.length==0){return false}var d=c[0];var f=c[1];return(f==e)};RSAKey.prototype.verifyPSS=function(c,b,a,f){var e=function(g){return KJUR.crypto.Util.hashHex(g,a)};var d=e(rstrtohex(c));if(f===undefined){f=-1}return this.verifyWithMessageHashPSS(d,b,a,f)};RSAKey.prototype.verifyWithMessageHashPSS=function(f,s,l,c){if(s.length!=Math.ceil(this.n.bitLength()/4)){return false}var k=new BigInteger(s,16);var r=function(i){return KJUR.crypto.Util.hashHex(i,l)};var j=hextorstr(f);var h=j.length;var g=this.n.bitLength()-1;var m=Math.ceil(g/8);var q;if(c===-1||c===undefined){c=h}else{if(c===-2){c=m-h-2}else{if(c<-2){throw new Error("invalid salt length")}}}if(m<(h+c+2)){throw new Error("data too long")}var a=this.doPublic(k).toByteArray();for(q=0;q>(8*m-g))&255;if((d.charCodeAt(0)&p)!==0){throw new Error("bits beyond keysize not zero")}var n=pss_mgf1_str(e,d.length,r);var o=[];for(q=0;q0){r.ext=this.getExtParamArray()}r.sighex=this.getSignatureValueHex();return r};this.getExtParamArray=function(s){if(s==undefined){var u=i(this.hex,0,[0,"[3]"]);if(u!=-1){s=f(this.hex,0,[0,"[3]",0],"30")}}var r=[];var t=o(s,0);for(var v=0;v0){var b=":"+n.join(":")+":";if(b.indexOf(":"+k+":")==-1){throw"algorithm '"+k+"' not accepted in the list"}}if(k!="none"&&B===null){throw"key shall be specified to verify."}if(typeof B=="string"&&B.indexOf("-----BEGIN ")!=-1){B=KEYUTIL.getKey(B)}if(z=="RS"||z=="PS"){if(!(B instanceof m)){throw"key shall be a RSAKey obj for RS* and PS* algs"}}if(z=="ES"){if(!(B instanceof p)){throw"key shall be a ECDSA obj for ES* algs"}}if(k=="none"){}var u=null;if(t.jwsalg2sigalg[l.alg]===undefined){throw"unsupported alg name: "+k}else{u=t.jwsalg2sigalg[k]}if(u=="none"){throw"not supported"}else{if(u.substr(0,4)=="Hmac"){var o=null;if(B===undefined){throw"hexadecimal key shall be specified for HMAC"}var j=new s({alg:u,pass:B});j.updateString(c);o=j.doFinal();return A==o}else{if(u.indexOf("withECDSA")!=-1){var h=null;try{h=p.concatSigToASN1Sig(A)}catch(v){return false}var g=new d({alg:u});g.init(B);g.updateString(c);return g.verify(h)}else{var g=new d({alg:u});g.init(B);g.updateString(c);return g.verify(A)}}}};KJUR.jws.JWS.parse=function(g){var c=g.split(".");var b={};var f,e,d;if(c.length!=2&&c.length!=3){throw"malformed sJWS: wrong number of '.' splitted elements"}f=c[0];e=c[1];if(c.length==3){d=c[2]}b.headerObj=KJUR.jws.JWS.readSafeJSONString(b64utoutf8(f));b.payloadObj=KJUR.jws.JWS.readSafeJSONString(b64utoutf8(e));b.headerPP=JSON.stringify(b.headerObj,null," ");if(b.payloadObj==null){b.payloadPP=b64utoutf8(e)}else{b.payloadPP=JSON.stringify(b.payloadObj,null," ")}if(d!==undefined){b.sigHex=b64utohex(d)}return b};KJUR.jws.JWS.verifyJWT=function(e,l,r){var d=KJUR,j=d.jws,o=j.JWS,n=o.readSafeJSONString,p=o.inArray,f=o.includedArray;var k=e.split(".");var c=k[0];var i=k[1];var q=c+"."+i;var m=b64utohex(k[2]);var h=n(b64utoutf8(c));var g=n(b64utoutf8(i));if(h.alg===undefined){return false}if(r.alg===undefined){throw"acceptField.alg shall be specified"}if(!p(h.alg,r.alg)){return false}if(g.iss!==undefined&&typeof r.iss==="object"){if(!p(g.iss,r.iss)){return false}}if(g.sub!==undefined&&typeof r.sub==="object"){if(!p(g.sub,r.sub)){return false}}if(g.aud!==undefined&&typeof r.aud==="object"){if(typeof g.aud=="string"){if(!p(g.aud,r.aud)){return false}}else{if(typeof g.aud=="object"){if(!f(g.aud,r.aud)){return false}}}}var b=j.IntDate.getNow();if(r.verifyAt!==undefined&&typeof r.verifyAt==="number"){b=r.verifyAt}if(r.gracePeriod===undefined||typeof r.gracePeriod!=="number"){r.gracePeriod=0}if(g.exp!==undefined&&typeof g.exp=="number"){if(g.exp+r.gracePeriodl){this.aHeader.pop()}if(this.aSignature.length>l){this.aSignature.pop()}throw"addSignature failed: "+i}};this.verifyAll=function(h){if(this.aHeader.length!==h.length||this.aSignature.length!==h.length){return false}for(var g=0;g0){this.aHeader=g.headers}else{throw"malformed header"}if(typeof g.payload==="string"){this.sPayload=g.payload}else{throw"malformed signatures"}if(g.signatures.length>0){this.aSignature=g.signatures}else{throw"malformed signatures"}}catch(e){throw"malformed JWS-JS JSON object: "+e}}};this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}};this.isEmpty=function(){if(this.aHeader.length==0){return 1}return 0}}; exports.SecureRandom = SecureRandom; exports.rng_seed_time = rng_seed_time; exports.BigInteger = BigInteger; exports.RSAKey = RSAKey; exports.ECDSA = KJUR.crypto.ECDSA; exports.DSA = KJUR.crypto.DSA; exports.Signature = KJUR.crypto.Signature; exports.MessageDigest = KJUR.crypto.MessageDigest; exports.Mac = KJUR.crypto.Mac; exports.Cipher = KJUR.crypto.Cipher; exports.KEYUTIL = KEYUTIL; exports.ASN1HEX = ASN1HEX; exports.X509 = X509; exports.X509CRL = X509CRL; exports.CryptoJS = CryptoJS; // ext/base64.js exports.b64tohex = b64tohex; exports.b64toBA = b64toBA; // ext/ec*.js exports.ECFieldElementFp = ECFieldElementFp; exports.ECPointFp = ECPointFp; exports.ECCurveFp = ECCurveFp; // base64x.js exports.stoBA = stoBA; exports.BAtos = BAtos; exports.BAtohex = BAtohex; exports.stohex = stohex; exports.stob64 = stob64; exports.stob64u = stob64u; exports.b64utos = b64utos; exports.b64tob64u = b64tob64u; exports.b64utob64 = b64utob64; exports.hex2b64 = hex2b64; exports.hextob64u = hextob64u; exports.b64utohex = b64utohex; exports.utf8tob64u = utf8tob64u; exports.b64utoutf8 = b64utoutf8; exports.utf8tob64 = utf8tob64; exports.b64toutf8 = b64toutf8; exports.utf8tohex = utf8tohex; exports.hextoutf8 = hextoutf8; exports.hextorstr = hextorstr; exports.rstrtohex = rstrtohex; exports.hextob64 = hextob64; exports.hextob64nl = hextob64nl; exports.b64nltohex = b64nltohex; exports.hextopem = hextopem; exports.pemtohex = pemtohex; exports.hextoArrayBuffer = hextoArrayBuffer; exports.ArrayBuffertohex = ArrayBuffertohex; exports.zulutomsec = zulutomsec; exports.zulutosec = zulutosec; exports.zulutodate = zulutodate; exports.datetozulu = datetozulu; exports.uricmptohex = uricmptohex; exports.hextouricmp = hextouricmp; exports.ipv6tohex = ipv6tohex; exports.hextoipv6 = hextoipv6; exports.hextoip = hextoip; exports.iptohex = iptohex; exports.encodeURIComponentAll = encodeURIComponentAll; exports.newline_toUnix = newline_toUnix; exports.newline_toDos = newline_toDos; exports.hextoposhex = hextoposhex; exports.intarystrtohex = intarystrtohex; exports.strdiffidx = strdiffidx; // name spaces exports.KJUR = KJUR; exports.crypto = KJUR.crypto; exports.asn1 = KJUR.asn1; exports.jws = KJUR.jws; exports.lang = KJUR.lang; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("b639").Buffer)) /***/ }), /***/ "820e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var newPromiseCapabilityModule = __webpack_require__("f069"); var perform = __webpack_require__("e667"); var iterate = __webpack_require__("2266"); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__("5eed"); // `Promise.allSettled` method // https://tc39.es/ecma262/#sec-promise.allsettled $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { allSettled: function allSettled(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aCallable(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; remaining++; call(promiseResolve, C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'fulfilled', value: value }; --remaining || resolve(values); }, function (error) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'rejected', reason: error }; --remaining || resolve(values); }); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ "8237": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/** * [js-md5]{@link https://github.com/emn178/js-md5} * * @namespace md5 * @version 0.7.3 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2017 * @license MIT */ (function () { 'use strict'; var ERROR = 'input is invalid type'; var WINDOW = typeof window === 'object'; var root = WINDOW ? window : {}; if (root.JS_MD5_NO_WINDOW) { WINDOW = false; } var WEB_WORKER = !WINDOW && typeof self === 'object'; var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node; if (NODE_JS) { root = global; } else if (WEB_WORKER) { root = self; } var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports; var AMD = true && __webpack_require__("3c35"); var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; var HEX_CHARS = '0123456789abcdef'.split(''); var EXTRA = [128, 32768, 8388608, -2147483648]; var SHIFT = [0, 8, 16, 24]; var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64']; var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); var blocks = [], buffer8; if (ARRAY_BUFFER) { var buffer = new ArrayBuffer(68); buffer8 = new Uint8Array(buffer); blocks = new Uint32Array(buffer); } if (root.JS_MD5_NO_NODE_JS || !Array.isArray) { Array.isArray = function (obj) { return Object.prototype.toString.call(obj) === '[object Array]'; }; } if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { ArrayBuffer.isView = function (obj) { return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; }; } /** * @method hex * @memberof md5 * @description Output hash as hex string * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {String} Hex string * @example * md5.hex('The quick brown fox jumps over the lazy dog'); * // equal to * md5('The quick brown fox jumps over the lazy dog'); */ /** * @method digest * @memberof md5 * @description Output hash as bytes array * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {Array} Bytes array * @example * md5.digest('The quick brown fox jumps over the lazy dog'); */ /** * @method array * @memberof md5 * @description Output hash as bytes array * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {Array} Bytes array * @example * md5.array('The quick brown fox jumps over the lazy dog'); */ /** * @method arrayBuffer * @memberof md5 * @description Output hash as ArrayBuffer * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {ArrayBuffer} ArrayBuffer * @example * md5.arrayBuffer('The quick brown fox jumps over the lazy dog'); */ /** * @method buffer * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead. * @memberof md5 * @description Output hash as ArrayBuffer * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {ArrayBuffer} ArrayBuffer * @example * md5.buffer('The quick brown fox jumps over the lazy dog'); */ /** * @method base64 * @memberof md5 * @description Output hash as base64 string * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {String} base64 string * @example * md5.base64('The quick brown fox jumps over the lazy dog'); */ var createOutputMethod = function (outputType) { return function (message) { return new Md5(true).update(message)[outputType](); }; }; /** * @method create * @memberof md5 * @description Create Md5 object * @returns {Md5} Md5 object. * @example * var hash = md5.create(); */ /** * @method update * @memberof md5 * @description Create and update Md5 object * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {Md5} Md5 object. * @example * var hash = md5.update('The quick brown fox jumps over the lazy dog'); * // equal to * var hash = md5.create(); * hash.update('The quick brown fox jumps over the lazy dog'); */ var createMethod = function () { var method = createOutputMethod('hex'); if (NODE_JS) { method = nodeWrap(method); } method.create = function () { return new Md5(); }; method.update = function (message) { return method.create().update(message); }; for (var i = 0; i < OUTPUT_TYPES.length; ++i) { var type = OUTPUT_TYPES[i]; method[type] = createOutputMethod(type); } return method; }; var nodeWrap = function (method) { var crypto = eval("require('crypto')"); var Buffer = eval("require('buffer').Buffer"); var nodeMethod = function (message) { if (typeof message === 'string') { return crypto.createHash('md5').update(message, 'utf8').digest('hex'); } else { if (message === null || message === undefined) { throw ERROR; } else if (message.constructor === ArrayBuffer) { message = new Uint8Array(message); } } if (Array.isArray(message) || ArrayBuffer.isView(message) || message.constructor === Buffer) { return crypto.createHash('md5').update(new Buffer(message)).digest('hex'); } else { return method(message); } }; return nodeMethod; }; /** * Md5 class * @class Md5 * @description This is internal class. * @see {@link md5.create} */ function Md5(sharedMemory) { if (sharedMemory) { blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; this.blocks = blocks; this.buffer8 = buffer8; } else { if (ARRAY_BUFFER) { var buffer = new ArrayBuffer(68); this.buffer8 = new Uint8Array(buffer); this.blocks = new Uint32Array(buffer); } else { this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; } } this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0; this.finalized = this.hashed = false; this.first = true; } /** * @method update * @memberof Md5 * @instance * @description Update hash * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {Md5} Md5 object. * @see {@link md5.update} */ Md5.prototype.update = function (message) { if (this.finalized) { return; } var notString, type = typeof message; if (type !== 'string') { if (type === 'object') { if (message === null) { throw ERROR; } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { message = new Uint8Array(message); } else if (!Array.isArray(message)) { if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { throw ERROR; } } } else { throw ERROR; } notString = true; } var code, index = 0, i, length = message.length, blocks = this.blocks; var buffer8 = this.buffer8; while (index < length) { if (this.hashed) { this.hashed = false; blocks[0] = blocks[16]; blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; } if (notString) { if (ARRAY_BUFFER) { for (i = this.start; index < length && i < 64; ++index) { buffer8[i++] = message[index]; } } else { for (i = this.start; index < length && i < 64; ++index) { blocks[i >> 2] |= message[index] << SHIFT[i++ & 3]; } } } else { if (ARRAY_BUFFER) { for (i = this.start; index < length && i < 64; ++index) { code = message.charCodeAt(index); if (code < 0x80) { buffer8[i++] = code; } else if (code < 0x800) { buffer8[i++] = 0xc0 | (code >> 6); buffer8[i++] = 0x80 | (code & 0x3f); } else if (code < 0xd800 || code >= 0xe000) { buffer8[i++] = 0xe0 | (code >> 12); buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); buffer8[i++] = 0x80 | (code & 0x3f); } else { code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); buffer8[i++] = 0xf0 | (code >> 18); buffer8[i++] = 0x80 | ((code >> 12) & 0x3f); buffer8[i++] = 0x80 | ((code >> 6) & 0x3f); buffer8[i++] = 0x80 | (code & 0x3f); } } } else { for (i = this.start; index < length && i < 64; ++index) { code = message.charCodeAt(index); if (code < 0x80) { blocks[i >> 2] |= code << SHIFT[i++ & 3]; } else if (code < 0x800) { blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } else if (code < 0xd800 || code >= 0xe000) { blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } else { code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3]; blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; } } } } this.lastByteIndex = i; this.bytes += i - this.start; if (i >= 64) { this.start = i - 64; this.hash(); this.hashed = true; } else { this.start = i; } } if (this.bytes > 4294967295) { this.hBytes += this.bytes / 4294967296 << 0; this.bytes = this.bytes % 4294967296; } return this; }; Md5.prototype.finalize = function () { if (this.finalized) { return; } this.finalized = true; var blocks = this.blocks, i = this.lastByteIndex; blocks[i >> 2] |= EXTRA[i & 3]; if (i >= 56) { if (!this.hashed) { this.hash(); } blocks[0] = blocks[16]; blocks[16] = blocks[1] = blocks[2] = blocks[3] = blocks[4] = blocks[5] = blocks[6] = blocks[7] = blocks[8] = blocks[9] = blocks[10] = blocks[11] = blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; } blocks[14] = this.bytes << 3; blocks[15] = this.hBytes << 3 | this.bytes >>> 29; this.hash(); }; Md5.prototype.hash = function () { var a, b, c, d, bc, da, blocks = this.blocks; if (this.first) { a = blocks[0] - 680876937; a = (a << 7 | a >>> 25) - 271733879 << 0; d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708; d = (d << 12 | d >>> 20) + a << 0; c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375; c = (c << 17 | c >>> 15) + d << 0; b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209; b = (b << 22 | b >>> 10) + c << 0; } else { a = this.h0; b = this.h1; c = this.h2; d = this.h3; a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936; a = (a << 7 | a >>> 25) + b << 0; d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586; d = (d << 12 | d >>> 20) + a << 0; c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819; c = (c << 17 | c >>> 15) + d << 0; b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330; b = (b << 22 | b >>> 10) + c << 0; } a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897; a = (a << 7 | a >>> 25) + b << 0; d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426; d = (d << 12 | d >>> 20) + a << 0; c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341; c = (c << 17 | c >>> 15) + d << 0; b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983; b = (b << 22 | b >>> 10) + c << 0; a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416; a = (a << 7 | a >>> 25) + b << 0; d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417; d = (d << 12 | d >>> 20) + a << 0; c += (b ^ (d & (a ^ b))) + blocks[10] - 42063; c = (c << 17 | c >>> 15) + d << 0; b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162; b = (b << 22 | b >>> 10) + c << 0; a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682; a = (a << 7 | a >>> 25) + b << 0; d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101; d = (d << 12 | d >>> 20) + a << 0; c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290; c = (c << 17 | c >>> 15) + d << 0; b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329; b = (b << 22 | b >>> 10) + c << 0; a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510; a = (a << 5 | a >>> 27) + b << 0; d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632; d = (d << 9 | d >>> 23) + a << 0; c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713; c = (c << 14 | c >>> 18) + d << 0; b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302; b = (b << 20 | b >>> 12) + c << 0; a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691; a = (a << 5 | a >>> 27) + b << 0; d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083; d = (d << 9 | d >>> 23) + a << 0; c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335; c = (c << 14 | c >>> 18) + d << 0; b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848; b = (b << 20 | b >>> 12) + c << 0; a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438; a = (a << 5 | a >>> 27) + b << 0; d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690; d = (d << 9 | d >>> 23) + a << 0; c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961; c = (c << 14 | c >>> 18) + d << 0; b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501; b = (b << 20 | b >>> 12) + c << 0; a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467; a = (a << 5 | a >>> 27) + b << 0; d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784; d = (d << 9 | d >>> 23) + a << 0; c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473; c = (c << 14 | c >>> 18) + d << 0; b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734; b = (b << 20 | b >>> 12) + c << 0; bc = b ^ c; a += (bc ^ d) + blocks[5] - 378558; a = (a << 4 | a >>> 28) + b << 0; d += (bc ^ a) + blocks[8] - 2022574463; d = (d << 11 | d >>> 21) + a << 0; da = d ^ a; c += (da ^ b) + blocks[11] + 1839030562; c = (c << 16 | c >>> 16) + d << 0; b += (da ^ c) + blocks[14] - 35309556; b = (b << 23 | b >>> 9) + c << 0; bc = b ^ c; a += (bc ^ d) + blocks[1] - 1530992060; a = (a << 4 | a >>> 28) + b << 0; d += (bc ^ a) + blocks[4] + 1272893353; d = (d << 11 | d >>> 21) + a << 0; da = d ^ a; c += (da ^ b) + blocks[7] - 155497632; c = (c << 16 | c >>> 16) + d << 0; b += (da ^ c) + blocks[10] - 1094730640; b = (b << 23 | b >>> 9) + c << 0; bc = b ^ c; a += (bc ^ d) + blocks[13] + 681279174; a = (a << 4 | a >>> 28) + b << 0; d += (bc ^ a) + blocks[0] - 358537222; d = (d << 11 | d >>> 21) + a << 0; da = d ^ a; c += (da ^ b) + blocks[3] - 722521979; c = (c << 16 | c >>> 16) + d << 0; b += (da ^ c) + blocks[6] + 76029189; b = (b << 23 | b >>> 9) + c << 0; bc = b ^ c; a += (bc ^ d) + blocks[9] - 640364487; a = (a << 4 | a >>> 28) + b << 0; d += (bc ^ a) + blocks[12] - 421815835; d = (d << 11 | d >>> 21) + a << 0; da = d ^ a; c += (da ^ b) + blocks[15] + 530742520; c = (c << 16 | c >>> 16) + d << 0; b += (da ^ c) + blocks[2] - 995338651; b = (b << 23 | b >>> 9) + c << 0; a += (c ^ (b | ~d)) + blocks[0] - 198630844; a = (a << 6 | a >>> 26) + b << 0; d += (b ^ (a | ~c)) + blocks[7] + 1126891415; d = (d << 10 | d >>> 22) + a << 0; c += (a ^ (d | ~b)) + blocks[14] - 1416354905; c = (c << 15 | c >>> 17) + d << 0; b += (d ^ (c | ~a)) + blocks[5] - 57434055; b = (b << 21 | b >>> 11) + c << 0; a += (c ^ (b | ~d)) + blocks[12] + 1700485571; a = (a << 6 | a >>> 26) + b << 0; d += (b ^ (a | ~c)) + blocks[3] - 1894986606; d = (d << 10 | d >>> 22) + a << 0; c += (a ^ (d | ~b)) + blocks[10] - 1051523; c = (c << 15 | c >>> 17) + d << 0; b += (d ^ (c | ~a)) + blocks[1] - 2054922799; b = (b << 21 | b >>> 11) + c << 0; a += (c ^ (b | ~d)) + blocks[8] + 1873313359; a = (a << 6 | a >>> 26) + b << 0; d += (b ^ (a | ~c)) + blocks[15] - 30611744; d = (d << 10 | d >>> 22) + a << 0; c += (a ^ (d | ~b)) + blocks[6] - 1560198380; c = (c << 15 | c >>> 17) + d << 0; b += (d ^ (c | ~a)) + blocks[13] + 1309151649; b = (b << 21 | b >>> 11) + c << 0; a += (c ^ (b | ~d)) + blocks[4] - 145523070; a = (a << 6 | a >>> 26) + b << 0; d += (b ^ (a | ~c)) + blocks[11] - 1120210379; d = (d << 10 | d >>> 22) + a << 0; c += (a ^ (d | ~b)) + blocks[2] + 718787259; c = (c << 15 | c >>> 17) + d << 0; b += (d ^ (c | ~a)) + blocks[9] - 343485551; b = (b << 21 | b >>> 11) + c << 0; if (this.first) { this.h0 = a + 1732584193 << 0; this.h1 = b - 271733879 << 0; this.h2 = c - 1732584194 << 0; this.h3 = d + 271733878 << 0; this.first = false; } else { this.h0 = this.h0 + a << 0; this.h1 = this.h1 + b << 0; this.h2 = this.h2 + c << 0; this.h3 = this.h3 + d << 0; } }; /** * @method hex * @memberof Md5 * @instance * @description Output hash as hex string * @returns {String} Hex string * @see {@link md5.hex} * @example * hash.hex(); */ Md5.prototype.hex = function () { this.finalize(); var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3; return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] + HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] + HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] + HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] + HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] + HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] + HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] + HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] + HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] + HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] + HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] + HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F]; }; /** * @method toString * @memberof Md5 * @instance * @description Output hash as hex string * @returns {String} Hex string * @see {@link md5.hex} * @example * hash.toString(); */ Md5.prototype.toString = Md5.prototype.hex; /** * @method digest * @memberof Md5 * @instance * @description Output hash as bytes array * @returns {Array} Bytes array * @see {@link md5.digest} * @example * hash.digest(); */ Md5.prototype.digest = function () { this.finalize(); var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3; return [ h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF, h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF, h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF, h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF ]; }; /** * @method array * @memberof Md5 * @instance * @description Output hash as bytes array * @returns {Array} Bytes array * @see {@link md5.array} * @example * hash.array(); */ Md5.prototype.array = Md5.prototype.digest; /** * @method arrayBuffer * @memberof Md5 * @instance * @description Output hash as ArrayBuffer * @returns {ArrayBuffer} ArrayBuffer * @see {@link md5.arrayBuffer} * @example * hash.arrayBuffer(); */ Md5.prototype.arrayBuffer = function () { this.finalize(); var buffer = new ArrayBuffer(16); var blocks = new Uint32Array(buffer); blocks[0] = this.h0; blocks[1] = this.h1; blocks[2] = this.h2; blocks[3] = this.h3; return buffer; }; /** * @method buffer * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead. * @memberof Md5 * @instance * @description Output hash as ArrayBuffer * @returns {ArrayBuffer} ArrayBuffer * @see {@link md5.buffer} * @example * hash.buffer(); */ Md5.prototype.buffer = Md5.prototype.arrayBuffer; /** * @method base64 * @memberof Md5 * @instance * @description Output hash as base64 string * @returns {String} base64 string * @see {@link md5.base64} * @example * hash.base64(); */ Md5.prototype.base64 = function () { var v1, v2, v3, base64Str = '', bytes = this.array(); for (var i = 0; i < 15;) { v1 = bytes[i++]; v2 = bytes[i++]; v3 = bytes[i++]; base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] + BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] + BASE64_ENCODE_CHAR[v3 & 63]; } v1 = bytes[i]; base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] + BASE64_ENCODE_CHAR[(v1 << 4) & 63] + '=='; return base64Str; }; var exports = createMethod(); if (COMMON_JS) { module.exports = exports; } else { /** * @method md5 * @description Md5 hash function, export to global in browsers. * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash * @returns {String} md5 hashes * @example * md5(''); // d41d8cd98f00b204e9800998ecf8427e * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6 * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0 * * // It also supports UTF-8 encoding * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07 * * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer` * md5([]); // d41d8cd98f00b204e9800998ecf8427e * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e */ root.md5 = exports; if (AMD) { !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return exports; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } } })(); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362"), __webpack_require__("c8ba"))) /***/ }), /***/ "825a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var $String = String; var $TypeError = TypeError; // `Assert: Type(argument) is Object` module.exports = function (argument) { if (isObject(argument)) return argument; throw new $TypeError($String(argument) + ' is not an object'); }; /***/ }), /***/ "83ab": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); // Detect IE8's incomplete defineProperty implementation module.exports = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; }); /***/ }), /***/ "83b9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var SetHelpers = __webpack_require__("cb27"); var iterate = __webpack_require__("384f"); var Set = SetHelpers.Set; var add = SetHelpers.add; module.exports = function (set) { var result = new Set(); iterate(set, function (it) { add(result, it); }); return result; }; /***/ }), /***/ "8407": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var $fromBase64 = __webpack_require__("7192"); var anUint8Array = __webpack_require__("6b37"); var Uint8Array = globalThis.Uint8Array; var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.setFromBase64 || !function () { var target = new Uint8Array([255, 255, 255, 255, 255]); try { target.setFromBase64('', null); return; } catch (error) { /* empty */ } // Webkit not throw an error on odd length string try { target.setFromBase64('a'); return; } catch (error) { /* empty */ } try { target.setFromBase64('MjYyZg==='); } catch (error) { return target[0] === 50 && target[1] === 54 && target[2] === 50 && target[3] === 255 && target[4] === 255; } }(); // `Uint8Array.prototype.setFromBase64` method // https://tc39.es/ecma262/#sec-uint8array.prototype.setfrombase64 if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, { setFromBase64: function setFromBase64(string /* , options */) { anUint8Array(this); var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, this, this.length); return { read: result.read, written: result.written }; } }); /***/ }), /***/ "8418": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var definePropertyModule = __webpack_require__("9bf2"); var createPropertyDescriptor = __webpack_require__("5c6c"); module.exports = function (object, key, value) { if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value)); else object[key] = value; }; /***/ }), /***/ "843c": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $padEnd = __webpack_require__("0ccb").end; var WEBKIT_BUG = __webpack_require__("9a0c"); // `String.prototype.padEnd` method // https://tc39.es/ecma262/#sec-string.prototype.padend $({ target: 'String', proto: true, forced: WEBKIT_BUG }, { padEnd: function padEnd(maxLength /* , fillString = ' ' */) { return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ "8558": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* global Bun, Deno -- detection */ var globalThis = __webpack_require__("cfe9"); var userAgent = __webpack_require__("b5db"); var classof = __webpack_require__("c6b6"); var userAgentStartsWith = function (string) { return userAgent.slice(0, string.length) === string; }; module.exports = (function () { if (userAgentStartsWith('Bun/')) return 'BUN'; if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE'; if (userAgentStartsWith('Deno/')) return 'DENO'; if (userAgentStartsWith('Node.js/')) return 'NODE'; if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN'; if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO'; if (classof(globalThis.process) === 'process') return 'NODE'; if (globalThis.window && globalThis.document) return 'BROWSER'; return 'REST'; })(); /***/ }), /***/ "861d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isCallable = __webpack_require__("1626"); module.exports = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; /***/ }), /***/ "87c2": /***/ (function(module, exports, __webpack_require__) { /** * web-streams-polyfill v2.1.1 */ (function (global, factory) { true ? factory(exports) : undefined; }(this, (function (exports) { 'use strict'; /// var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol : function (description) { return "Symbol(" + description + ")"; }; /// function noop() { // do nothing } /// // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill var NumberIsNaN = Number.isNaN || function (x) { // eslint-disable-next-line no-self-compare return x !== x; }; var rethrowAssertionErrorRejection = noop; function typeIsObject(x) { return (typeof x === 'object' && x !== null) || typeof x === 'function'; } function createArrayFromList(elements) { // We use arrays to represent lists, so this is basically a no-op. // Do a slice though just in case we happen to depend on the unique-ness. return elements.slice(); } function ArrayBufferCopy(dest, destOffset, src, srcOffset, n) { new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); } function IsFiniteNonNegativeNumber(v) { if (IsNonNegativeNumber(v) === false) { return false; } if (v === Infinity) { return false; } return true; } function IsNonNegativeNumber(v) { if (typeof v !== 'number') { return false; } if (NumberIsNaN(v)) { return false; } if (v < 0) { return false; } return true; } function Call(F, V, args) { if (typeof F !== 'function') { throw new TypeError('Argument is not a function'); } return Function.prototype.apply.call(F, V, args); } function CreateAlgorithmFromUnderlyingMethod(underlyingObject, methodName, algoArgCount, extraArgs) { var method = underlyingObject[methodName]; if (method !== undefined) { if (typeof method !== 'function') { throw new TypeError(method + " is not a method"); } switch (algoArgCount) { case 0: { return function () { return PromiseCall(method, underlyingObject, extraArgs); }; } case 1: { return function (arg) { var fullArgs = [arg].concat(extraArgs); return PromiseCall(method, underlyingObject, fullArgs); }; } } } return function () { return promiseResolvedWith(undefined); }; } function InvokeOrNoop(O, P, args) { var method = O[P]; if (method === undefined) { return undefined; } return Call(method, O, args); } function PromiseCall(F, V, args) { try { return promiseResolvedWith(Call(F, V, args)); } catch (value) { return promiseRejectedWith(value); } } // Not implemented correctly function TransferArrayBuffer(O) { return O; } // Not implemented correctly function IsDetachedBuffer(O) { return false; } function ValidateAndNormalizeHighWaterMark(highWaterMark) { highWaterMark = Number(highWaterMark); if (NumberIsNaN(highWaterMark) || highWaterMark < 0) { throw new RangeError('highWaterMark property of a queuing strategy must be non-negative and non-NaN'); } return highWaterMark; } function MakeSizeAlgorithmFromSizeFunction(size) { if (size === undefined) { return function () { return 1; }; } if (typeof size !== 'function') { throw new TypeError('size property of a queuing strategy must be a function'); } return function (chunk) { return size(chunk); }; } var originalPromise = Promise; var originalPromiseThen = Promise.prototype.then; var originalPromiseResolve = Promise.resolve.bind(originalPromise); var originalPromiseReject = Promise.reject.bind(originalPromise); function newPromise(executor) { return new originalPromise(executor); } function promiseResolvedWith(value) { return originalPromiseResolve(value); } function promiseRejectedWith(reason) { return originalPromiseReject(reason); } function PerformPromiseThen(promise, onFulfilled, onRejected) { // There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an // approximation. return originalPromiseThen.call(promise, onFulfilled, onRejected); } function uponPromise(promise, onFulfilled, onRejected) { PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection); } function uponFulfillment(promise, onFulfilled) { uponPromise(promise, onFulfilled); } function uponRejection(promise, onRejected) { uponPromise(promise, undefined, onRejected); } function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler); } function setPromiseIsHandledToTrue(promise) { PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection); } // Original from Chromium // https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js var QUEUE_MAX_ARRAY_SIZE = 16384; /** * Simple queue structure. * * Avoids scalability issues with using a packed array directly by using * multiple arrays in a linked list and keeping the array size bounded. */ var SimpleQueue = /** @class */ (function () { function SimpleQueue() { this._cursor = 0; this._size = 0; // _front and _back are always defined. this._front = { _elements: [], _next: undefined }; this._back = this._front; // The cursor is used to avoid calling Array.shift(). // It contains the index of the front element of the array inside the // front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE). this._cursor = 0; // When there is only one node, size === elements.length - cursor. this._size = 0; } Object.defineProperty(SimpleQueue.prototype, "length", { get: function () { return this._size; }, enumerable: true, configurable: true }); // For exception safety, this method is structured in order: // 1. Read state // 2. Calculate required state mutations // 3. Perform state mutations SimpleQueue.prototype.push = function (element) { var oldBack = this._back; var newBack = oldBack; if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) { newBack = { _elements: [], _next: undefined }; } // push() is the mutation most likely to throw an exception, so it // goes first. oldBack._elements.push(element); if (newBack !== oldBack) { this._back = newBack; oldBack._next = newBack; } ++this._size; }; // Like push(), shift() follows the read -> calculate -> mutate pattern for // exception safety. SimpleQueue.prototype.shift = function () { // must not be called on an empty queue var oldFront = this._front; var newFront = oldFront; var oldCursor = this._cursor; var newCursor = oldCursor + 1; var elements = oldFront._elements; var element = elements[oldCursor]; if (newCursor === QUEUE_MAX_ARRAY_SIZE) { newFront = oldFront._next; newCursor = 0; } // No mutations before this point. --this._size; this._cursor = newCursor; if (oldFront !== newFront) { this._front = newFront; } // Permit shifted element to be garbage collected. elements[oldCursor] = undefined; return element; }; // The tricky thing about forEach() is that it can be called // re-entrantly. The queue may be mutated inside the callback. It is easy to // see that push() within the callback has no negative effects since the end // of the queue is checked for on every iteration. If shift() is called // repeatedly within the callback then the next iteration may return an // element that has been removed. In this case the callback will be called // with undefined values until we either "catch up" with elements that still // exist or reach the back of the queue. SimpleQueue.prototype.forEach = function (callback) { var i = this._cursor; var node = this._front; var elements = node._elements; while (i !== elements.length || node._next !== undefined) { if (i === elements.length) { node = node._next; elements = node._elements; i = 0; if (elements.length === 0) { break; } } callback(elements[i]); ++i; } }; // Return the element that would be returned if shift() was called now, // without modifying the queue. SimpleQueue.prototype.peek = function () { // must not be called on an empty queue var front = this._front; var cursor = this._cursor; return front._elements[cursor]; }; return SimpleQueue; }()); function ReadableStreamCreateReadResult(value, done, forAuthorCode) { var prototype = null; if (forAuthorCode === true) { prototype = Object.prototype; } var obj = Object.create(prototype); obj.value = value; obj.done = done; return obj; } function ReadableStreamReaderGenericInitialize(reader, stream) { reader._forAuthorCode = true; reader._ownerReadableStream = stream; stream._reader = reader; if (stream._state === 'readable') { defaultReaderClosedPromiseInitialize(reader); } else if (stream._state === 'closed') { defaultReaderClosedPromiseInitializeAsResolved(reader); } else { defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); } } // A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state // check. function ReadableStreamReaderGenericCancel(reader, reason) { var stream = reader._ownerReadableStream; return ReadableStreamCancel(stream, reason); } function ReadableStreamReaderGenericRelease(reader) { if (reader._ownerReadableStream._state === 'readable') { defaultReaderClosedPromiseReject(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); } else { defaultReaderClosedPromiseResetToRejected(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); } reader._ownerReadableStream._reader = undefined; reader._ownerReadableStream = undefined; } // Helper functions for the readers. function readerLockException(name) { return new TypeError('Cannot ' + name + ' a stream using a released reader'); } // Helper functions for the ReadableStreamDefaultReader. function defaultReaderClosedPromiseInitialize(reader) { reader._closedPromise = newPromise(function (resolve, reject) { reader._closedPromise_resolve = resolve; reader._closedPromise_reject = reject; }); } function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { defaultReaderClosedPromiseInitialize(reader); defaultReaderClosedPromiseReject(reader, reason); } function defaultReaderClosedPromiseInitializeAsResolved(reader) { defaultReaderClosedPromiseInitialize(reader); defaultReaderClosedPromiseResolve(reader); } function defaultReaderClosedPromiseReject(reader, reason) { setPromiseIsHandledToTrue(reader._closedPromise); reader._closedPromise_reject(reason); reader._closedPromise_resolve = undefined; reader._closedPromise_reject = undefined; } function defaultReaderClosedPromiseResetToRejected(reader, reason) { defaultReaderClosedPromiseInitializeAsRejected(reader, reason); } function defaultReaderClosedPromiseResolve(reader) { reader._closedPromise_resolve(undefined); reader._closedPromise_resolve = undefined; reader._closedPromise_reject = undefined; } var CancelSteps = SymbolPolyfill('[[CancelSteps]]'); var PullSteps = SymbolPolyfill('[[PullSteps]]'); // Abstract operations for the ReadableStream. function AcquireReadableStreamDefaultReader(stream, forAuthorCode) { if (forAuthorCode === void 0) { forAuthorCode = false; } var reader = new ReadableStreamDefaultReader(stream); reader._forAuthorCode = forAuthorCode; return reader; } // ReadableStream API exposed for controllers. function ReadableStreamAddReadRequest(stream) { var promise = newPromise(function (resolve, reject) { var readRequest = { _resolve: resolve, _reject: reject }; stream._reader._readRequests.push(readRequest); }); return promise; } function ReadableStreamFulfillReadRequest(stream, chunk, done) { var reader = stream._reader; var readRequest = reader._readRequests.shift(); readRequest._resolve(ReadableStreamCreateReadResult(chunk, done, reader._forAuthorCode)); } function ReadableStreamGetNumReadRequests(stream) { return stream._reader._readRequests.length; } function ReadableStreamHasDefaultReader(stream) { var reader = stream._reader; if (reader === undefined) { return false; } if (!IsReadableStreamDefaultReader(reader)) { return false; } return true; } var ReadableStreamDefaultReader = /** @class */ (function () { function ReadableStreamDefaultReader(stream) { if (IsReadableStream(stream) === false) { throw new TypeError('ReadableStreamDefaultReader can only be constructed with a ReadableStream instance'); } if (IsReadableStreamLocked(stream) === true) { throw new TypeError('This stream has already been locked for exclusive reading by another reader'); } ReadableStreamReaderGenericInitialize(this, stream); this._readRequests = new SimpleQueue(); } Object.defineProperty(ReadableStreamDefaultReader.prototype, "closed", { get: function () { if (!IsReadableStreamDefaultReader(this)) { return promiseRejectedWith(defaultReaderBrandCheckException('closed')); } return this._closedPromise; }, enumerable: true, configurable: true }); ReadableStreamDefaultReader.prototype.cancel = function (reason) { if (!IsReadableStreamDefaultReader(this)) { return promiseRejectedWith(defaultReaderBrandCheckException('cancel')); } if (this._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('cancel')); } return ReadableStreamReaderGenericCancel(this, reason); }; ReadableStreamDefaultReader.prototype.read = function () { if (!IsReadableStreamDefaultReader(this)) { return promiseRejectedWith(defaultReaderBrandCheckException('read')); } if (this._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('read from')); } return ReadableStreamDefaultReaderRead(this); }; ReadableStreamDefaultReader.prototype.releaseLock = function () { if (!IsReadableStreamDefaultReader(this)) { throw defaultReaderBrandCheckException('releaseLock'); } if (this._ownerReadableStream === undefined) { return; } if (this._readRequests.length > 0) { throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); } ReadableStreamReaderGenericRelease(this); }; return ReadableStreamDefaultReader; }()); // Abstract operations for the readers. function IsReadableStreamDefaultReader(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { return false; } return true; } function ReadableStreamDefaultReaderRead(reader) { var stream = reader._ownerReadableStream; stream._disturbed = true; if (stream._state === 'closed') { return promiseResolvedWith(ReadableStreamCreateReadResult(undefined, true, reader._forAuthorCode)); } if (stream._state === 'errored') { return promiseRejectedWith(stream._storedError); } return stream._readableStreamController[PullSteps](); } // Helper functions for the ReadableStreamDefaultReader. function defaultReaderBrandCheckException(name) { return new TypeError("ReadableStreamDefaultReader.prototype." + name + " can only be used on a ReadableStreamDefaultReader"); } /// var _a; var AsyncIteratorPrototype; if (typeof SymbolPolyfill.asyncIterator === 'symbol') { // We're running inside a ES2018+ environment, but we're compiling to an older syntax. // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it. AsyncIteratorPrototype = (_a = {}, // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( ) // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator _a[SymbolPolyfill.asyncIterator] = function () { return this; }, _a); Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false }); } /// var ReadableStreamAsyncIteratorPrototype = { next: function () { if (IsReadableStreamAsyncIterator(this) === false) { return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); } var reader = this._asyncIteratorReader; if (reader._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('iterate')); } return transformPromiseWith(ReadableStreamDefaultReaderRead(reader), function (result) { var done = result.done; if (done) { ReadableStreamReaderGenericRelease(reader); } var value = result.value; return ReadableStreamCreateReadResult(value, done, true); }); }, return: function (value) { if (IsReadableStreamAsyncIterator(this) === false) { return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); } var reader = this._asyncIteratorReader; if (reader._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('finish iterating')); } if (reader._readRequests.length > 0) { return promiseRejectedWith(new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled')); } if (this._preventCancel === false) { var result = ReadableStreamReaderGenericCancel(reader, value); ReadableStreamReaderGenericRelease(reader); return transformPromiseWith(result, function () { return ReadableStreamCreateReadResult(value, true, true); }); } ReadableStreamReaderGenericRelease(reader); return promiseResolvedWith(ReadableStreamCreateReadResult(value, true, true)); } }; if (AsyncIteratorPrototype !== undefined) { Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype); } Object.defineProperty(ReadableStreamAsyncIteratorPrototype, 'next', { enumerable: false }); Object.defineProperty(ReadableStreamAsyncIteratorPrototype, 'return', { enumerable: false }); // Abstract operations for the ReadableStream. function AcquireReadableStreamAsyncIterator(stream, preventCancel) { if (preventCancel === void 0) { preventCancel = false; } var reader = AcquireReadableStreamDefaultReader(stream); var iterator = Object.create(ReadableStreamAsyncIteratorPrototype); iterator._asyncIteratorReader = reader; iterator._preventCancel = Boolean(preventCancel); return iterator; } function IsReadableStreamAsyncIterator(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorReader')) { return false; } return true; } // Helper functions for the ReadableStream. function streamAsyncIteratorBrandCheckException(name) { return new TypeError("ReadableStreamAsyncIterator." + name + " can only be used on a ReadableSteamAsyncIterator"); } function DequeueValue(container) { var pair = container._queue.shift(); container._queueTotalSize -= pair.size; if (container._queueTotalSize < 0) { container._queueTotalSize = 0; } return pair.value; } function EnqueueValueWithSize(container, value, size) { size = Number(size); if (!IsFiniteNonNegativeNumber(size)) { throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); } container._queue.push({ value: value, size: size }); container._queueTotalSize += size; } function PeekQueueValue(container) { var pair = container._queue.peek(); return pair.value; } function ResetQueue(container) { container._queue = new SimpleQueue(); container._queueTotalSize = 0; } var AbortSteps = SymbolPolyfill('[[AbortSteps]]'); var ErrorSteps = SymbolPolyfill('[[ErrorSteps]]'); var WritableStream = /** @class */ (function () { function WritableStream(underlyingSink, strategy) { if (underlyingSink === void 0) { underlyingSink = {}; } if (strategy === void 0) { strategy = {}; } InitializeWritableStream(this); var size = strategy.size; var highWaterMark = strategy.highWaterMark; var type = underlyingSink.type; if (type !== undefined) { throw new RangeError('Invalid type is specified'); } var sizeAlgorithm = MakeSizeAlgorithmFromSizeFunction(size); if (highWaterMark === undefined) { highWaterMark = 1; } highWaterMark = ValidateAndNormalizeHighWaterMark(highWaterMark); SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm); } Object.defineProperty(WritableStream.prototype, "locked", { get: function () { if (IsWritableStream(this) === false) { throw streamBrandCheckException('locked'); } return IsWritableStreamLocked(this); }, enumerable: true, configurable: true }); WritableStream.prototype.abort = function (reason) { if (IsWritableStream(this) === false) { return promiseRejectedWith(streamBrandCheckException('abort')); } if (IsWritableStreamLocked(this) === true) { return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer')); } return WritableStreamAbort(this, reason); }; WritableStream.prototype.close = function () { if (IsWritableStream(this) === false) { return promiseRejectedWith(streamBrandCheckException('close')); } if (IsWritableStreamLocked(this) === true) { return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer')); } if (WritableStreamCloseQueuedOrInFlight(this) === true) { return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); } return WritableStreamClose(this); }; WritableStream.prototype.getWriter = function () { if (IsWritableStream(this) === false) { throw streamBrandCheckException('getWriter'); } return AcquireWritableStreamDefaultWriter(this); }; return WritableStream; }()); // Abstract operations for the WritableStream. function AcquireWritableStreamDefaultWriter(stream) { return new WritableStreamDefaultWriter(stream); } // Throws if and only if startAlgorithm throws. function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { if (highWaterMark === void 0) { highWaterMark = 1; } if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; } var stream = Object.create(WritableStream.prototype); InitializeWritableStream(stream); var controller = Object.create(WritableStreamDefaultController.prototype); SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); return stream; } function InitializeWritableStream(stream) { stream._state = 'writable'; // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is // 'erroring' or 'errored'. May be set to an undefined value. stream._storedError = undefined; stream._writer = undefined; // Initialize to undefined first because the constructor of the controller checks this // variable to validate the caller. stream._writableStreamController = undefined; // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data // producer without waiting for the queued writes to finish. stream._writeRequests = new SimpleQueue(); // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here. stream._inFlightWriteRequest = undefined; // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer // has been detached. stream._closeRequest = undefined; // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here. stream._inFlightCloseRequest = undefined; // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached. stream._pendingAbortRequest = undefined; // The backpressure signal set by the controller. stream._backpressure = false; } function IsWritableStream(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) { return false; } return true; } function IsWritableStreamLocked(stream) { if (stream._writer === undefined) { return false; } return true; } function WritableStreamAbort(stream, reason) { var state = stream._state; if (state === 'closed' || state === 'errored') { return promiseResolvedWith(undefined); } if (stream._pendingAbortRequest !== undefined) { return stream._pendingAbortRequest._promise; } var wasAlreadyErroring = false; if (state === 'erroring') { wasAlreadyErroring = true; // reason will not be used, so don't keep a reference to it. reason = undefined; } var promise = newPromise(function (resolve, reject) { stream._pendingAbortRequest = { _promise: undefined, _resolve: resolve, _reject: reject, _reason: reason, _wasAlreadyErroring: wasAlreadyErroring }; }); stream._pendingAbortRequest._promise = promise; if (wasAlreadyErroring === false) { WritableStreamStartErroring(stream, reason); } return promise; } function WritableStreamClose(stream) { var state = stream._state; if (state === 'closed' || state === 'errored') { return promiseRejectedWith(new TypeError("The stream (in " + state + " state) is not in the writable state and cannot be closed")); } var promise = newPromise(function (resolve, reject) { var closeRequest = { _resolve: resolve, _reject: reject }; stream._closeRequest = closeRequest; }); var writer = stream._writer; if (writer !== undefined && stream._backpressure === true && state === 'writable') { defaultWriterReadyPromiseResolve(writer); } WritableStreamDefaultControllerClose(stream._writableStreamController); return promise; } // WritableStream API exposed for controllers. function WritableStreamAddWriteRequest(stream) { var promise = newPromise(function (resolve, reject) { var writeRequest = { _resolve: resolve, _reject: reject }; stream._writeRequests.push(writeRequest); }); return promise; } function WritableStreamDealWithRejection(stream, error) { var state = stream._state; if (state === 'writable') { WritableStreamStartErroring(stream, error); return; } WritableStreamFinishErroring(stream); } function WritableStreamStartErroring(stream, reason) { var controller = stream._writableStreamController; stream._state = 'erroring'; stream._storedError = reason; var writer = stream._writer; if (writer !== undefined) { WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); } if (WritableStreamHasOperationMarkedInFlight(stream) === false && controller._started === true) { WritableStreamFinishErroring(stream); } } function WritableStreamFinishErroring(stream) { stream._state = 'errored'; stream._writableStreamController[ErrorSteps](); var storedError = stream._storedError; stream._writeRequests.forEach(function (writeRequest) { writeRequest._reject(storedError); }); stream._writeRequests = new SimpleQueue(); if (stream._pendingAbortRequest === undefined) { WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); return; } var abortRequest = stream._pendingAbortRequest; stream._pendingAbortRequest = undefined; if (abortRequest._wasAlreadyErroring === true) { abortRequest._reject(storedError); WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); return; } var promise = stream._writableStreamController[AbortSteps](abortRequest._reason); uponPromise(promise, function () { abortRequest._resolve(); WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); }, function (reason) { abortRequest._reject(reason); WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); }); } function WritableStreamFinishInFlightWrite(stream) { stream._inFlightWriteRequest._resolve(undefined); stream._inFlightWriteRequest = undefined; } function WritableStreamFinishInFlightWriteWithError(stream, error) { stream._inFlightWriteRequest._reject(error); stream._inFlightWriteRequest = undefined; WritableStreamDealWithRejection(stream, error); } function WritableStreamFinishInFlightClose(stream) { stream._inFlightCloseRequest._resolve(undefined); stream._inFlightCloseRequest = undefined; var state = stream._state; if (state === 'erroring') { // The error was too late to do anything, so it is ignored. stream._storedError = undefined; if (stream._pendingAbortRequest !== undefined) { stream._pendingAbortRequest._resolve(); stream._pendingAbortRequest = undefined; } } stream._state = 'closed'; var writer = stream._writer; if (writer !== undefined) { defaultWriterClosedPromiseResolve(writer); } } function WritableStreamFinishInFlightCloseWithError(stream, error) { stream._inFlightCloseRequest._reject(error); stream._inFlightCloseRequest = undefined; // Never execute sink abort() after sink close(). if (stream._pendingAbortRequest !== undefined) { stream._pendingAbortRequest._reject(error); stream._pendingAbortRequest = undefined; } WritableStreamDealWithRejection(stream, error); } // TODO(ricea): Fix alphabetical order. function WritableStreamCloseQueuedOrInFlight(stream) { if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) { return false; } return true; } function WritableStreamHasOperationMarkedInFlight(stream) { if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) { return false; } return true; } function WritableStreamMarkCloseRequestInFlight(stream) { stream._inFlightCloseRequest = stream._closeRequest; stream._closeRequest = undefined; } function WritableStreamMarkFirstWriteRequestInFlight(stream) { stream._inFlightWriteRequest = stream._writeRequests.shift(); } function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { if (stream._closeRequest !== undefined) { stream._closeRequest._reject(stream._storedError); stream._closeRequest = undefined; } var writer = stream._writer; if (writer !== undefined) { defaultWriterClosedPromiseReject(writer, stream._storedError); } } function WritableStreamUpdateBackpressure(stream, backpressure) { var writer = stream._writer; if (writer !== undefined && backpressure !== stream._backpressure) { if (backpressure === true) { defaultWriterReadyPromiseReset(writer); } else { defaultWriterReadyPromiseResolve(writer); } } stream._backpressure = backpressure; } var WritableStreamDefaultWriter = /** @class */ (function () { function WritableStreamDefaultWriter(stream) { if (IsWritableStream(stream) === false) { throw new TypeError('WritableStreamDefaultWriter can only be constructed with a WritableStream instance'); } if (IsWritableStreamLocked(stream) === true) { throw new TypeError('This stream has already been locked for exclusive writing by another writer'); } this._ownerWritableStream = stream; stream._writer = this; var state = stream._state; if (state === 'writable') { if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._backpressure === true) { defaultWriterReadyPromiseInitialize(this); } else { defaultWriterReadyPromiseInitializeAsResolved(this); } defaultWriterClosedPromiseInitialize(this); } else if (state === 'erroring') { defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); defaultWriterClosedPromiseInitialize(this); } else if (state === 'closed') { defaultWriterReadyPromiseInitializeAsResolved(this); defaultWriterClosedPromiseInitializeAsResolved(this); } else { var storedError = stream._storedError; defaultWriterReadyPromiseInitializeAsRejected(this, storedError); defaultWriterClosedPromiseInitializeAsRejected(this, storedError); } } Object.defineProperty(WritableStreamDefaultWriter.prototype, "closed", { get: function () { if (IsWritableStreamDefaultWriter(this) === false) { return promiseRejectedWith(defaultWriterBrandCheckException('closed')); } return this._closedPromise; }, enumerable: true, configurable: true }); Object.defineProperty(WritableStreamDefaultWriter.prototype, "desiredSize", { get: function () { if (IsWritableStreamDefaultWriter(this) === false) { throw defaultWriterBrandCheckException('desiredSize'); } if (this._ownerWritableStream === undefined) { throw defaultWriterLockException('desiredSize'); } return WritableStreamDefaultWriterGetDesiredSize(this); }, enumerable: true, configurable: true }); Object.defineProperty(WritableStreamDefaultWriter.prototype, "ready", { get: function () { if (IsWritableStreamDefaultWriter(this) === false) { return promiseRejectedWith(defaultWriterBrandCheckException('ready')); } return this._readyPromise; }, enumerable: true, configurable: true }); WritableStreamDefaultWriter.prototype.abort = function (reason) { if (IsWritableStreamDefaultWriter(this) === false) { return promiseRejectedWith(defaultWriterBrandCheckException('abort')); } if (this._ownerWritableStream === undefined) { return promiseRejectedWith(defaultWriterLockException('abort')); } return WritableStreamDefaultWriterAbort(this, reason); }; WritableStreamDefaultWriter.prototype.close = function () { if (IsWritableStreamDefaultWriter(this) === false) { return promiseRejectedWith(defaultWriterBrandCheckException('close')); } var stream = this._ownerWritableStream; if (stream === undefined) { return promiseRejectedWith(defaultWriterLockException('close')); } if (WritableStreamCloseQueuedOrInFlight(stream) === true) { return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); } return WritableStreamDefaultWriterClose(this); }; WritableStreamDefaultWriter.prototype.releaseLock = function () { if (IsWritableStreamDefaultWriter(this) === false) { throw defaultWriterBrandCheckException('releaseLock'); } var stream = this._ownerWritableStream; if (stream === undefined) { return; } WritableStreamDefaultWriterRelease(this); }; WritableStreamDefaultWriter.prototype.write = function (chunk) { if (IsWritableStreamDefaultWriter(this) === false) { return promiseRejectedWith(defaultWriterBrandCheckException('write')); } if (this._ownerWritableStream === undefined) { return promiseRejectedWith(defaultWriterLockException('write to')); } return WritableStreamDefaultWriterWrite(this, chunk); }; return WritableStreamDefaultWriter; }()); // Abstract operations for the WritableStreamDefaultWriter. function IsWritableStreamDefaultWriter(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) { return false; } return true; } // A client of WritableStreamDefaultWriter may use these functions directly to bypass state check. function WritableStreamDefaultWriterAbort(writer, reason) { var stream = writer._ownerWritableStream; return WritableStreamAbort(stream, reason); } function WritableStreamDefaultWriterClose(writer) { var stream = writer._ownerWritableStream; return WritableStreamClose(stream); } function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { var stream = writer._ownerWritableStream; var state = stream._state; if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') { return promiseResolvedWith(undefined); } if (state === 'errored') { return promiseRejectedWith(stream._storedError); } return WritableStreamDefaultWriterClose(writer); } function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { if (writer._closedPromiseState === 'pending') { defaultWriterClosedPromiseReject(writer, error); } else { defaultWriterClosedPromiseResetToRejected(writer, error); } } function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { if (writer._readyPromiseState === 'pending') { defaultWriterReadyPromiseReject(writer, error); } else { defaultWriterReadyPromiseResetToRejected(writer, error); } } function WritableStreamDefaultWriterGetDesiredSize(writer) { var stream = writer._ownerWritableStream; var state = stream._state; if (state === 'errored' || state === 'erroring') { return null; } if (state === 'closed') { return 0; } return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController); } function WritableStreamDefaultWriterRelease(writer) { var stream = writer._ownerWritableStream; var releasedError = new TypeError('Writer was released and can no longer be used to monitor the stream\'s closedness'); WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError); // The state transitions to "errored" before the sink abort() method runs, but the writer.closed promise is not // rejected until afterwards. This means that simply testing state will not work. WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError); stream._writer = undefined; writer._ownerWritableStream = undefined; } function WritableStreamDefaultWriterWrite(writer, chunk) { var stream = writer._ownerWritableStream; var controller = stream._writableStreamController; var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk); if (stream !== writer._ownerWritableStream) { return promiseRejectedWith(defaultWriterLockException('write to')); } var state = stream._state; if (state === 'errored') { return promiseRejectedWith(stream._storedError); } if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') { return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to')); } if (state === 'erroring') { return promiseRejectedWith(stream._storedError); } var promise = WritableStreamAddWriteRequest(stream); WritableStreamDefaultControllerWrite(controller, chunk, chunkSize); return promise; } var WritableStreamDefaultController = /** @class */ (function () { /** @internal */ function WritableStreamDefaultController() { throw new TypeError('WritableStreamDefaultController cannot be constructed explicitly'); } WritableStreamDefaultController.prototype.error = function (e) { if (IsWritableStreamDefaultController(this) === false) { throw new TypeError('WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController'); } var state = this._controlledWritableStream._state; if (state !== 'writable') { // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so // just treat it as a no-op. return; } WritableStreamDefaultControllerError(this, e); }; /** @internal */ WritableStreamDefaultController.prototype[AbortSteps] = function (reason) { var result = this._abortAlgorithm(reason); WritableStreamDefaultControllerClearAlgorithms(this); return result; }; /** @internal */ WritableStreamDefaultController.prototype[ErrorSteps] = function () { ResetQueue(this); }; return WritableStreamDefaultController; }()); // Abstract operations implementing interface required by the WritableStream. function IsWritableStreamDefaultController(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) { return false; } return true; } function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { controller._controlledWritableStream = stream; stream._writableStreamController = controller; // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. controller._queue = undefined; controller._queueTotalSize = undefined; ResetQueue(controller); controller._started = false; controller._strategySizeAlgorithm = sizeAlgorithm; controller._strategyHWM = highWaterMark; controller._writeAlgorithm = writeAlgorithm; controller._closeAlgorithm = closeAlgorithm; controller._abortAlgorithm = abortAlgorithm; var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); WritableStreamUpdateBackpressure(stream, backpressure); var startResult = startAlgorithm(); var startPromise = promiseResolvedWith(startResult); uponPromise(startPromise, function () { controller._started = true; WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, function (r) { controller._started = true; WritableStreamDealWithRejection(stream, r); }); } function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) { var controller = Object.create(WritableStreamDefaultController.prototype); function startAlgorithm() { return InvokeOrNoop(underlyingSink, 'start', [controller]); } var writeAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingSink, 'write', 1, [controller]); var closeAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingSink, 'close', 0, []); var abortAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingSink, 'abort', 1, []); SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); } // ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls. function WritableStreamDefaultControllerClearAlgorithms(controller) { controller._writeAlgorithm = undefined; controller._closeAlgorithm = undefined; controller._abortAlgorithm = undefined; controller._strategySizeAlgorithm = undefined; } function WritableStreamDefaultControllerClose(controller) { EnqueueValueWithSize(controller, 'close', 0); WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); } function WritableStreamDefaultControllerGetChunkSize(controller, chunk) { try { return controller._strategySizeAlgorithm(chunk); } catch (chunkSizeE) { WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); return 1; } } function WritableStreamDefaultControllerGetDesiredSize(controller) { return controller._strategyHWM - controller._queueTotalSize; } function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) { var writeRecord = { chunk: chunk }; try { EnqueueValueWithSize(controller, writeRecord, chunkSize); } catch (enqueueE) { WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); return; } var stream = controller._controlledWritableStream; if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._state === 'writable') { var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); WritableStreamUpdateBackpressure(stream, backpressure); } WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); } // Abstract operations for the WritableStreamDefaultController. function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { var stream = controller._controlledWritableStream; if (controller._started === false) { return; } if (stream._inFlightWriteRequest !== undefined) { return; } var state = stream._state; if (state === 'erroring') { WritableStreamFinishErroring(stream); return; } if (controller._queue.length === 0) { return; } var writeRecord = PeekQueueValue(controller); if (writeRecord === 'close') { WritableStreamDefaultControllerProcessClose(controller); } else { WritableStreamDefaultControllerProcessWrite(controller, writeRecord.chunk); } } function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { if (controller._controlledWritableStream._state === 'writable') { WritableStreamDefaultControllerError(controller, error); } } function WritableStreamDefaultControllerProcessClose(controller) { var stream = controller._controlledWritableStream; WritableStreamMarkCloseRequestInFlight(stream); DequeueValue(controller); var sinkClosePromise = controller._closeAlgorithm(); WritableStreamDefaultControllerClearAlgorithms(controller); uponPromise(sinkClosePromise, function () { WritableStreamFinishInFlightClose(stream); }, function (reason) { WritableStreamFinishInFlightCloseWithError(stream, reason); }); } function WritableStreamDefaultControllerProcessWrite(controller, chunk) { var stream = controller._controlledWritableStream; WritableStreamMarkFirstWriteRequestInFlight(stream); var sinkWritePromise = controller._writeAlgorithm(chunk); uponPromise(sinkWritePromise, function () { WritableStreamFinishInFlightWrite(stream); var state = stream._state; DequeueValue(controller); if (WritableStreamCloseQueuedOrInFlight(stream) === false && state === 'writable') { var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); WritableStreamUpdateBackpressure(stream, backpressure); } WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); }, function (reason) { if (stream._state === 'writable') { WritableStreamDefaultControllerClearAlgorithms(controller); } WritableStreamFinishInFlightWriteWithError(stream, reason); }); } function WritableStreamDefaultControllerGetBackpressure(controller) { var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); return desiredSize <= 0; } // A client of WritableStreamDefaultController may use these functions directly to bypass state check. function WritableStreamDefaultControllerError(controller, error) { var stream = controller._controlledWritableStream; WritableStreamDefaultControllerClearAlgorithms(controller); WritableStreamStartErroring(stream, error); } // Helper functions for the WritableStream. function streamBrandCheckException(name) { return new TypeError("WritableStream.prototype." + name + " can only be used on a WritableStream"); } // Helper functions for the WritableStreamDefaultWriter. function defaultWriterBrandCheckException(name) { return new TypeError("WritableStreamDefaultWriter.prototype." + name + " can only be used on a WritableStreamDefaultWriter"); } function defaultWriterLockException(name) { return new TypeError('Cannot ' + name + ' a stream using a released writer'); } function defaultWriterClosedPromiseInitialize(writer) { writer._closedPromise = newPromise(function (resolve, reject) { writer._closedPromise_resolve = resolve; writer._closedPromise_reject = reject; writer._closedPromiseState = 'pending'; }); } function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) { defaultWriterClosedPromiseInitialize(writer); defaultWriterClosedPromiseReject(writer, reason); } function defaultWriterClosedPromiseInitializeAsResolved(writer) { defaultWriterClosedPromiseInitialize(writer); defaultWriterClosedPromiseResolve(writer); } function defaultWriterClosedPromiseReject(writer, reason) { setPromiseIsHandledToTrue(writer._closedPromise); writer._closedPromise_reject(reason); writer._closedPromise_resolve = undefined; writer._closedPromise_reject = undefined; writer._closedPromiseState = 'rejected'; } function defaultWriterClosedPromiseResetToRejected(writer, reason) { defaultWriterClosedPromiseInitializeAsRejected(writer, reason); } function defaultWriterClosedPromiseResolve(writer) { writer._closedPromise_resolve(undefined); writer._closedPromise_resolve = undefined; writer._closedPromise_reject = undefined; writer._closedPromiseState = 'resolved'; } function defaultWriterReadyPromiseInitialize(writer) { writer._readyPromise = newPromise(function (resolve, reject) { writer._readyPromise_resolve = resolve; writer._readyPromise_reject = reject; }); writer._readyPromiseState = 'pending'; } function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) { defaultWriterReadyPromiseInitialize(writer); defaultWriterReadyPromiseReject(writer, reason); } function defaultWriterReadyPromiseInitializeAsResolved(writer) { defaultWriterReadyPromiseInitialize(writer); defaultWriterReadyPromiseResolve(writer); } function defaultWriterReadyPromiseReject(writer, reason) { setPromiseIsHandledToTrue(writer._readyPromise); writer._readyPromise_reject(reason); writer._readyPromise_resolve = undefined; writer._readyPromise_reject = undefined; writer._readyPromiseState = 'rejected'; } function defaultWriterReadyPromiseReset(writer) { defaultWriterReadyPromiseInitialize(writer); } function defaultWriterReadyPromiseResetToRejected(writer, reason) { defaultWriterReadyPromiseInitializeAsRejected(writer, reason); } function defaultWriterReadyPromiseResolve(writer) { writer._readyPromise_resolve(undefined); writer._readyPromise_resolve = undefined; writer._readyPromise_reject = undefined; writer._readyPromiseState = 'fulfilled'; } function isAbortSignal(value) { if (typeof value !== 'object' || value === null) { return false; } try { return typeof value.aborted === 'boolean'; } catch (_a) { // AbortSignal.prototype.aborted throws if its brand check fails return false; } } /// var NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined; /// function isDOMExceptionConstructor(ctor) { if (!(typeof ctor === 'function' || typeof ctor === 'object')) { return false; } try { new ctor(); return true; } catch (_a) { return false; } } function createDOMExceptionPolyfill() { var ctor = function DOMException(message, name) { this.message = message || ''; this.name = name || 'Error'; if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } }; ctor.prototype = Object.create(Error.prototype); Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true }); return ctor; } var DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill(); function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) { var reader = AcquireReadableStreamDefaultReader(source); var writer = AcquireWritableStreamDefaultWriter(dest); source._disturbed = true; var shuttingDown = false; // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown. var currentWrite = promiseResolvedWith(undefined); return newPromise(function (resolve, reject) { var abortAlgorithm; if (signal !== undefined) { abortAlgorithm = function () { var error = new DOMException$1('Aborted', 'AbortError'); var actions = []; if (preventAbort === false) { actions.push(function () { if (dest._state === 'writable') { return WritableStreamAbort(dest, error); } return promiseResolvedWith(undefined); }); } if (preventCancel === false) { actions.push(function () { if (source._state === 'readable') { return ReadableStreamCancel(source, error); } return promiseResolvedWith(undefined); }); } shutdownWithAction(function () { return Promise.all(actions.map(function (action) { return action(); })); }, true, error); }; if (signal.aborted === true) { abortAlgorithm(); return; } signal.addEventListener('abort', abortAlgorithm); } // Using reader and writer, read all chunks from this and write them to dest // - Backpressure must be enforced // - Shutdown must stop all activity function pipeLoop() { return newPromise(function (resolveLoop, rejectLoop) { function next(done) { if (done) { resolveLoop(); } else { // Use `PerformPromiseThen` instead of `uponPromise` to avoid // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers PerformPromiseThen(pipeStep(), next, rejectLoop); } } next(false); }); } function pipeStep() { if (shuttingDown === true) { return promiseResolvedWith(true); } return PerformPromiseThen(writer._readyPromise, function () { return PerformPromiseThen(ReadableStreamDefaultReaderRead(reader), function (result) { if (result.done === true) { return true; } currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, result.value), undefined, noop); return false; }); }); } // Errors must be propagated forward isOrBecomesErrored(source, reader._closedPromise, function (storedError) { if (preventAbort === false) { shutdownWithAction(function () { return WritableStreamAbort(dest, storedError); }, true, storedError); } else { shutdown(true, storedError); } }); // Errors must be propagated backward isOrBecomesErrored(dest, writer._closedPromise, function (storedError) { if (preventCancel === false) { shutdownWithAction(function () { return ReadableStreamCancel(source, storedError); }, true, storedError); } else { shutdown(true, storedError); } }); // Closing must be propagated forward isOrBecomesClosed(source, reader._closedPromise, function () { if (preventClose === false) { shutdownWithAction(function () { return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); }); } else { shutdown(); } }); // Closing must be propagated backward if (WritableStreamCloseQueuedOrInFlight(dest) === true || dest._state === 'closed') { var destClosed_1 = new TypeError('the destination writable stream closed before all data could be piped to it'); if (preventCancel === false) { shutdownWithAction(function () { return ReadableStreamCancel(source, destClosed_1); }, true, destClosed_1); } else { shutdown(true, destClosed_1); } } setPromiseIsHandledToTrue(pipeLoop()); function waitForWritesToFinish() { // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait // for that too. var oldCurrentWrite = currentWrite; return PerformPromiseThen(currentWrite, function () { return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; }); } function isOrBecomesErrored(stream, promise, action) { if (stream._state === 'errored') { action(stream._storedError); } else { uponRejection(promise, action); } } function isOrBecomesClosed(stream, promise, action) { if (stream._state === 'closed') { action(); } else { uponFulfillment(promise, action); } } function shutdownWithAction(action, originalIsError, originalError) { if (shuttingDown === true) { return; } shuttingDown = true; if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { uponFulfillment(waitForWritesToFinish(), doTheRest); } else { doTheRest(); } function doTheRest() { uponPromise(action(), function () { return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); }); } } function shutdown(isError, error) { if (shuttingDown === true) { return; } shuttingDown = true; if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { uponFulfillment(waitForWritesToFinish(), function () { return finalize(isError, error); }); } else { finalize(isError, error); } } function finalize(isError, error) { WritableStreamDefaultWriterRelease(writer); ReadableStreamReaderGenericRelease(reader); if (signal !== undefined) { signal.removeEventListener('abort', abortAlgorithm); } if (isError) { reject(error); } else { resolve(undefined); } } }); } var ReadableStreamDefaultController = /** @class */ (function () { /** @internal */ function ReadableStreamDefaultController() { throw new TypeError(); } Object.defineProperty(ReadableStreamDefaultController.prototype, "desiredSize", { get: function () { if (IsReadableStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException('desiredSize'); } return ReadableStreamDefaultControllerGetDesiredSize(this); }, enumerable: true, configurable: true }); ReadableStreamDefaultController.prototype.close = function () { if (IsReadableStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException('close'); } if (ReadableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { throw new TypeError('The stream is not in a state that permits close'); } ReadableStreamDefaultControllerClose(this); }; ReadableStreamDefaultController.prototype.enqueue = function (chunk) { if (IsReadableStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException('enqueue'); } if (ReadableStreamDefaultControllerCanCloseOrEnqueue(this) === false) { throw new TypeError('The stream is not in a state that permits enqueue'); } return ReadableStreamDefaultControllerEnqueue(this, chunk); }; ReadableStreamDefaultController.prototype.error = function (e) { if (IsReadableStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException('error'); } ReadableStreamDefaultControllerError(this, e); }; /** @internal */ ReadableStreamDefaultController.prototype[CancelSteps] = function (reason) { ResetQueue(this); var result = this._cancelAlgorithm(reason); ReadableStreamDefaultControllerClearAlgorithms(this); return result; }; /** @internal */ ReadableStreamDefaultController.prototype[PullSteps] = function () { var stream = this._controlledReadableStream; if (this._queue.length > 0) { var chunk = DequeueValue(this); if (this._closeRequested === true && this._queue.length === 0) { ReadableStreamDefaultControllerClearAlgorithms(this); ReadableStreamClose(stream); } else { ReadableStreamDefaultControllerCallPullIfNeeded(this); } return promiseResolvedWith(ReadableStreamCreateReadResult(chunk, false, stream._reader._forAuthorCode)); } var pendingPromise = ReadableStreamAddReadRequest(stream); ReadableStreamDefaultControllerCallPullIfNeeded(this); return pendingPromise; }; return ReadableStreamDefaultController; }()); // Abstract operations for the ReadableStreamDefaultController. function IsReadableStreamDefaultController(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) { return false; } return true; } function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); if (shouldPull === false) { return; } if (controller._pulling === true) { controller._pullAgain = true; return; } controller._pulling = true; var pullPromise = controller._pullAlgorithm(); uponPromise(pullPromise, function () { controller._pulling = false; if (controller._pullAgain === true) { controller._pullAgain = false; ReadableStreamDefaultControllerCallPullIfNeeded(controller); } }, function (e) { ReadableStreamDefaultControllerError(controller, e); }); } function ReadableStreamDefaultControllerShouldCallPull(controller) { var stream = controller._controlledReadableStream; if (ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) === false) { return false; } if (controller._started === false) { return false; } if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { return true; } var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); if (desiredSize > 0) { return true; } return false; } function ReadableStreamDefaultControllerClearAlgorithms(controller) { controller._pullAlgorithm = undefined; controller._cancelAlgorithm = undefined; controller._strategySizeAlgorithm = undefined; } // A client of ReadableStreamDefaultController may use these functions directly to bypass state check. function ReadableStreamDefaultControllerClose(controller) { var stream = controller._controlledReadableStream; controller._closeRequested = true; if (controller._queue.length === 0) { ReadableStreamDefaultControllerClearAlgorithms(controller); ReadableStreamClose(stream); } } function ReadableStreamDefaultControllerEnqueue(controller, chunk) { var stream = controller._controlledReadableStream; if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { ReadableStreamFulfillReadRequest(stream, chunk, false); } else { var chunkSize = void 0; try { chunkSize = controller._strategySizeAlgorithm(chunk); } catch (chunkSizeE) { ReadableStreamDefaultControllerError(controller, chunkSizeE); throw chunkSizeE; } try { EnqueueValueWithSize(controller, chunk, chunkSize); } catch (enqueueE) { ReadableStreamDefaultControllerError(controller, enqueueE); throw enqueueE; } } ReadableStreamDefaultControllerCallPullIfNeeded(controller); } function ReadableStreamDefaultControllerError(controller, e) { var stream = controller._controlledReadableStream; if (stream._state !== 'readable') { return; } ResetQueue(controller); ReadableStreamDefaultControllerClearAlgorithms(controller); ReadableStreamError(stream, e); } function ReadableStreamDefaultControllerGetDesiredSize(controller) { var stream = controller._controlledReadableStream; var state = stream._state; if (state === 'errored') { return null; } if (state === 'closed') { return 0; } return controller._strategyHWM - controller._queueTotalSize; } // This is used in the implementation of TransformStream. function ReadableStreamDefaultControllerHasBackpressure(controller) { if (ReadableStreamDefaultControllerShouldCallPull(controller) === true) { return false; } return true; } function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { var state = controller._controlledReadableStream._state; if (controller._closeRequested === false && state === 'readable') { return true; } return false; } function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { controller._controlledReadableStream = stream; controller._queue = undefined; controller._queueTotalSize = undefined; ResetQueue(controller); controller._started = false; controller._closeRequested = false; controller._pullAgain = false; controller._pulling = false; controller._strategySizeAlgorithm = sizeAlgorithm; controller._strategyHWM = highWaterMark; controller._pullAlgorithm = pullAlgorithm; controller._cancelAlgorithm = cancelAlgorithm; stream._readableStreamController = controller; var startResult = startAlgorithm(); uponPromise(promiseResolvedWith(startResult), function () { controller._started = true; ReadableStreamDefaultControllerCallPullIfNeeded(controller); }, function (r) { ReadableStreamDefaultControllerError(controller, r); }); } function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) { var controller = Object.create(ReadableStreamDefaultController.prototype); function startAlgorithm() { return InvokeOrNoop(underlyingSource, 'start', [controller]); } var pullAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingSource, 'pull', 0, [controller]); var cancelAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingSource, 'cancel', 1, []); SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); } // Helper functions for the ReadableStreamDefaultController. function defaultControllerBrandCheckException(name) { return new TypeError("ReadableStreamDefaultController.prototype." + name + " can only be used on a ReadableStreamDefaultController"); } function ReadableStreamTee(stream, cloneForBranch2) { var reader = AcquireReadableStreamDefaultReader(stream); var reading = false; var canceled1 = false; var canceled2 = false; var reason1; var reason2; var branch1; var branch2; var resolveCancelPromise; var cancelPromise = newPromise(function (resolve) { resolveCancelPromise = resolve; }); function pullAlgorithm() { if (reading === true) { return promiseResolvedWith(undefined); } reading = true; var readPromise = transformPromiseWith(ReadableStreamDefaultReaderRead(reader), function (result) { reading = false; var done = result.done; if (done === true) { if (canceled1 === false) { ReadableStreamDefaultControllerClose(branch1._readableStreamController); } if (canceled2 === false) { ReadableStreamDefaultControllerClose(branch2._readableStreamController); } return; } var value = result.value; var value1 = value; var value2 = value; // There is no way to access the cloning code right now in the reference implementation. // If we add one then we'll need an implementation for serializable objects. // if (canceled2 === false && cloneForBranch2 === true) { // value2 = StructuredDeserialize(StructuredSerialize(value2)); // } if (canceled1 === false) { ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, value1); } if (canceled2 === false) { ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, value2); } }); setPromiseIsHandledToTrue(readPromise); return promiseResolvedWith(undefined); } function cancel1Algorithm(reason) { canceled1 = true; reason1 = reason; if (canceled2 === true) { var compositeReason = createArrayFromList([reason1, reason2]); var cancelResult = ReadableStreamCancel(stream, compositeReason); resolveCancelPromise(cancelResult); } return cancelPromise; } function cancel2Algorithm(reason) { canceled2 = true; reason2 = reason; if (canceled1 === true) { var compositeReason = createArrayFromList([reason1, reason2]); var cancelResult = ReadableStreamCancel(stream, compositeReason); resolveCancelPromise(cancelResult); } return cancelPromise; } function startAlgorithm() { } branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); uponRejection(reader._closedPromise, function (r) { ReadableStreamDefaultControllerError(branch1._readableStreamController, r); ReadableStreamDefaultControllerError(branch2._readableStreamController, r); }); return [branch1, branch2]; } /// // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Polyfill var NumberIsInteger = Number.isInteger || function (value) { return typeof value === 'number' && isFinite(value) && Math.floor(value) === value; }; var ReadableStreamBYOBRequest = /** @class */ (function () { /** @internal */ function ReadableStreamBYOBRequest() { throw new TypeError('ReadableStreamBYOBRequest cannot be used directly'); } Object.defineProperty(ReadableStreamBYOBRequest.prototype, "view", { get: function () { if (IsReadableStreamBYOBRequest(this) === false) { throw byobRequestBrandCheckException('view'); } return this._view; }, enumerable: true, configurable: true }); ReadableStreamBYOBRequest.prototype.respond = function (bytesWritten) { if (IsReadableStreamBYOBRequest(this) === false) { throw byobRequestBrandCheckException('respond'); } if (this._associatedReadableByteStreamController === undefined) { throw new TypeError('This BYOB request has been invalidated'); } if (IsDetachedBuffer(this._view.buffer) === true) ; ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); }; ReadableStreamBYOBRequest.prototype.respondWithNewView = function (view) { if (IsReadableStreamBYOBRequest(this) === false) { throw byobRequestBrandCheckException('respond'); } if (this._associatedReadableByteStreamController === undefined) { throw new TypeError('This BYOB request has been invalidated'); } if (!ArrayBuffer.isView(view)) { throw new TypeError('You can only respond with array buffer views'); } if (IsDetachedBuffer(view.buffer) === true) ; ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); }; return ReadableStreamBYOBRequest; }()); var ReadableByteStreamController = /** @class */ (function () { /** @internal */ function ReadableByteStreamController() { throw new TypeError('ReadableByteStreamController constructor cannot be used directly'); } Object.defineProperty(ReadableByteStreamController.prototype, "byobRequest", { get: function () { if (IsReadableByteStreamController(this) === false) { throw byteStreamControllerBrandCheckException('byobRequest'); } if (this._byobRequest === undefined && this._pendingPullIntos.length > 0) { var firstDescriptor = this._pendingPullIntos.peek(); var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); var byobRequest = Object.create(ReadableStreamBYOBRequest.prototype); SetUpReadableStreamBYOBRequest(byobRequest, this, view); this._byobRequest = byobRequest; } return this._byobRequest; }, enumerable: true, configurable: true }); Object.defineProperty(ReadableByteStreamController.prototype, "desiredSize", { get: function () { if (IsReadableByteStreamController(this) === false) { throw byteStreamControllerBrandCheckException('desiredSize'); } return ReadableByteStreamControllerGetDesiredSize(this); }, enumerable: true, configurable: true }); ReadableByteStreamController.prototype.close = function () { if (IsReadableByteStreamController(this) === false) { throw byteStreamControllerBrandCheckException('close'); } if (this._closeRequested === true) { throw new TypeError('The stream has already been closed; do not close it again!'); } var state = this._controlledReadableByteStream._state; if (state !== 'readable') { throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be closed"); } ReadableByteStreamControllerClose(this); }; ReadableByteStreamController.prototype.enqueue = function (chunk) { if (IsReadableByteStreamController(this) === false) { throw byteStreamControllerBrandCheckException('enqueue'); } if (this._closeRequested === true) { throw new TypeError('stream is closed or draining'); } var state = this._controlledReadableByteStream._state; if (state !== 'readable') { throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be enqueued to"); } if (!ArrayBuffer.isView(chunk)) { throw new TypeError('You can only enqueue array buffer views when using a ReadableByteStreamController'); } if (IsDetachedBuffer(chunk.buffer) === true) ; ReadableByteStreamControllerEnqueue(this, chunk); }; ReadableByteStreamController.prototype.error = function (e) { if (IsReadableByteStreamController(this) === false) { throw byteStreamControllerBrandCheckException('error'); } ReadableByteStreamControllerError(this, e); }; /** @internal */ ReadableByteStreamController.prototype[CancelSteps] = function (reason) { if (this._pendingPullIntos.length > 0) { var firstDescriptor = this._pendingPullIntos.peek(); firstDescriptor.bytesFilled = 0; } ResetQueue(this); var result = this._cancelAlgorithm(reason); ReadableByteStreamControllerClearAlgorithms(this); return result; }; /** @internal */ ReadableByteStreamController.prototype[PullSteps] = function () { var stream = this._controlledReadableByteStream; if (this._queueTotalSize > 0) { var entry = this._queue.shift(); this._queueTotalSize -= entry.byteLength; ReadableByteStreamControllerHandleQueueDrain(this); var view = void 0; try { view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); } catch (viewE) { return promiseRejectedWith(viewE); } return promiseResolvedWith(ReadableStreamCreateReadResult(view, false, stream._reader._forAuthorCode)); } var autoAllocateChunkSize = this._autoAllocateChunkSize; if (autoAllocateChunkSize !== undefined) { var buffer = void 0; try { buffer = new ArrayBuffer(autoAllocateChunkSize); } catch (bufferE) { return promiseRejectedWith(bufferE); } var pullIntoDescriptor = { buffer: buffer, byteOffset: 0, byteLength: autoAllocateChunkSize, bytesFilled: 0, elementSize: 1, ctor: Uint8Array, readerType: 'default' }; this._pendingPullIntos.push(pullIntoDescriptor); } var promise = ReadableStreamAddReadRequest(stream); ReadableByteStreamControllerCallPullIfNeeded(this); return promise; }; return ReadableByteStreamController; }()); // Abstract operations for the ReadableByteStreamController. function IsReadableByteStreamController(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) { return false; } return true; } function IsReadableStreamBYOBRequest(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { return false; } return true; } function ReadableByteStreamControllerCallPullIfNeeded(controller) { var shouldPull = ReadableByteStreamControllerShouldCallPull(controller); if (shouldPull === false) { return; } if (controller._pulling === true) { controller._pullAgain = true; return; } controller._pulling = true; // TODO: Test controller argument var pullPromise = controller._pullAlgorithm(); uponPromise(pullPromise, function () { controller._pulling = false; if (controller._pullAgain === true) { controller._pullAgain = false; ReadableByteStreamControllerCallPullIfNeeded(controller); } }, function (e) { ReadableByteStreamControllerError(controller, e); }); } function ReadableByteStreamControllerClearPendingPullIntos(controller) { ReadableByteStreamControllerInvalidateBYOBRequest(controller); controller._pendingPullIntos = new SimpleQueue(); } function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { var done = false; if (stream._state === 'closed') { done = true; } var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); if (pullIntoDescriptor.readerType === 'default') { ReadableStreamFulfillReadRequest(stream, filledView, done); } else { ReadableStreamFulfillReadIntoRequest(stream, filledView, done); } } function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { var bytesFilled = pullIntoDescriptor.bytesFilled; var elementSize = pullIntoDescriptor.elementSize; return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); } function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { controller._queue.push({ buffer: buffer, byteOffset: byteOffset, byteLength: byteLength }); controller._queueTotalSize += byteLength; } function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { var elementSize = pullIntoDescriptor.elementSize; var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; var totalBytesToCopyRemaining = maxBytesToCopy; var ready = false; if (maxAlignedBytes > currentAlignedBytes) { totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; ready = true; } var queue = controller._queue; while (totalBytesToCopyRemaining > 0) { var headOfQueue = queue.peek(); var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; ArrayBufferCopy(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); if (headOfQueue.byteLength === bytesToCopy) { queue.shift(); } else { headOfQueue.byteOffset += bytesToCopy; headOfQueue.byteLength -= bytesToCopy; } controller._queueTotalSize -= bytesToCopy; ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); totalBytesToCopyRemaining -= bytesToCopy; } return ready; } function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { ReadableByteStreamControllerInvalidateBYOBRequest(controller); pullIntoDescriptor.bytesFilled += size; } function ReadableByteStreamControllerHandleQueueDrain(controller) { if (controller._queueTotalSize === 0 && controller._closeRequested === true) { ReadableByteStreamControllerClearAlgorithms(controller); ReadableStreamClose(controller._controlledReadableByteStream); } else { ReadableByteStreamControllerCallPullIfNeeded(controller); } } function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { if (controller._byobRequest === undefined) { return; } controller._byobRequest._associatedReadableByteStreamController = undefined; controller._byobRequest._view = undefined; controller._byobRequest = undefined; } function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { while (controller._pendingPullIntos.length > 0) { if (controller._queueTotalSize === 0) { return; } var pullIntoDescriptor = controller._pendingPullIntos.peek(); if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) { ReadableByteStreamControllerShiftPendingPullInto(controller); ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); } } } function ReadableByteStreamControllerPullInto(controller, view) { var stream = controller._controlledReadableByteStream; var elementSize = 1; if (view.constructor !== DataView) { elementSize = view.constructor.BYTES_PER_ELEMENT; } var ctor = view.constructor; var buffer = TransferArrayBuffer(view.buffer); var pullIntoDescriptor = { buffer: buffer, byteOffset: view.byteOffset, byteLength: view.byteLength, bytesFilled: 0, elementSize: elementSize, ctor: ctor, readerType: 'byob' }; if (controller._pendingPullIntos.length > 0) { controller._pendingPullIntos.push(pullIntoDescriptor); // No ReadableByteStreamControllerCallPullIfNeeded() call since: // - No change happens on desiredSize // - The source has already been notified of that there's at least 1 pending read(view) return ReadableStreamAddReadIntoRequest(stream); } if (stream._state === 'closed') { var emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); return promiseResolvedWith(ReadableStreamCreateReadResult(emptyView, true, stream._reader._forAuthorCode)); } if (controller._queueTotalSize > 0) { if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) { var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); ReadableByteStreamControllerHandleQueueDrain(controller); return promiseResolvedWith(ReadableStreamCreateReadResult(filledView, false, stream._reader._forAuthorCode)); } if (controller._closeRequested === true) { var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); ReadableByteStreamControllerError(controller, e); return promiseRejectedWith(e); } } controller._pendingPullIntos.push(pullIntoDescriptor); var promise = ReadableStreamAddReadIntoRequest(stream); ReadableByteStreamControllerCallPullIfNeeded(controller); return promise; } function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer); var stream = controller._controlledReadableByteStream; if (ReadableStreamHasBYOBReader(stream) === true) { while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); } } } function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { if (pullIntoDescriptor.bytesFilled + bytesWritten > pullIntoDescriptor.byteLength) { throw new RangeError('bytesWritten out of range'); } ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { // TODO: Figure out whether we should detach the buffer or not here. return; } ReadableByteStreamControllerShiftPendingPullInto(controller); var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; if (remainderSize > 0) { var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; var remainder = pullIntoDescriptor.buffer.slice(end - remainderSize, end); ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); } pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer); pullIntoDescriptor.bytesFilled -= remainderSize; ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); } function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { var firstDescriptor = controller._pendingPullIntos.peek(); var stream = controller._controlledReadableByteStream; if (stream._state === 'closed') { if (bytesWritten !== 0) { throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream'); } ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor); } else { ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); } ReadableByteStreamControllerCallPullIfNeeded(controller); } function ReadableByteStreamControllerShiftPendingPullInto(controller) { var descriptor = controller._pendingPullIntos.shift(); ReadableByteStreamControllerInvalidateBYOBRequest(controller); return descriptor; } function ReadableByteStreamControllerShouldCallPull(controller) { var stream = controller._controlledReadableByteStream; if (stream._state !== 'readable') { return false; } if (controller._closeRequested === true) { return false; } if (controller._started === false) { return false; } if (ReadableStreamHasDefaultReader(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { return true; } if (ReadableStreamHasBYOBReader(stream) === true && ReadableStreamGetNumReadIntoRequests(stream) > 0) { return true; } var desiredSize = ReadableByteStreamControllerGetDesiredSize(controller); if (desiredSize > 0) { return true; } return false; } function ReadableByteStreamControllerClearAlgorithms(controller) { controller._pullAlgorithm = undefined; controller._cancelAlgorithm = undefined; } // A client of ReadableByteStreamController may use these functions directly to bypass state check. function ReadableByteStreamControllerClose(controller) { var stream = controller._controlledReadableByteStream; if (controller._queueTotalSize > 0) { controller._closeRequested = true; return; } if (controller._pendingPullIntos.length > 0) { var firstPendingPullInto = controller._pendingPullIntos.peek(); if (firstPendingPullInto.bytesFilled > 0) { var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); ReadableByteStreamControllerError(controller, e); throw e; } } ReadableByteStreamControllerClearAlgorithms(controller); ReadableStreamClose(stream); } function ReadableByteStreamControllerEnqueue(controller, chunk) { var stream = controller._controlledReadableByteStream; var buffer = chunk.buffer; var byteOffset = chunk.byteOffset; var byteLength = chunk.byteLength; var transferredBuffer = TransferArrayBuffer(buffer); if (ReadableStreamHasDefaultReader(stream) === true) { if (ReadableStreamGetNumReadRequests(stream) === 0) { ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); } else { var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); ReadableStreamFulfillReadRequest(stream, transferredView, false); } } else if (ReadableStreamHasBYOBReader(stream) === true) { // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully. ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); } else { ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); } ReadableByteStreamControllerCallPullIfNeeded(controller); } function ReadableByteStreamControllerError(controller, e) { var stream = controller._controlledReadableByteStream; if (stream._state !== 'readable') { return; } ReadableByteStreamControllerClearPendingPullIntos(controller); ResetQueue(controller); ReadableByteStreamControllerClearAlgorithms(controller); ReadableStreamError(stream, e); } function ReadableByteStreamControllerGetDesiredSize(controller) { var stream = controller._controlledReadableByteStream; var state = stream._state; if (state === 'errored') { return null; } if (state === 'closed') { return 0; } return controller._strategyHWM - controller._queueTotalSize; } function ReadableByteStreamControllerRespond(controller, bytesWritten) { bytesWritten = Number(bytesWritten); if (IsFiniteNonNegativeNumber(bytesWritten) === false) { throw new RangeError('bytesWritten must be a finite'); } ReadableByteStreamControllerRespondInternal(controller, bytesWritten); } function ReadableByteStreamControllerRespondWithNewView(controller, view) { var firstDescriptor = controller._pendingPullIntos.peek(); if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) { throw new RangeError('The region specified by view does not match byobRequest'); } if (firstDescriptor.byteLength !== view.byteLength) { throw new RangeError('The buffer of view has different capacity than byobRequest'); } firstDescriptor.buffer = view.buffer; ReadableByteStreamControllerRespondInternal(controller, view.byteLength); } function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) { controller._controlledReadableByteStream = stream; controller._pullAgain = false; controller._pulling = false; controller._byobRequest = undefined; // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. controller._queue = controller._queueTotalSize = undefined; ResetQueue(controller); controller._closeRequested = false; controller._started = false; controller._strategyHWM = ValidateAndNormalizeHighWaterMark(highWaterMark); controller._pullAlgorithm = pullAlgorithm; controller._cancelAlgorithm = cancelAlgorithm; controller._autoAllocateChunkSize = autoAllocateChunkSize; controller._pendingPullIntos = new SimpleQueue(); stream._readableStreamController = controller; var startResult = startAlgorithm(); uponPromise(promiseResolvedWith(startResult), function () { controller._started = true; ReadableByteStreamControllerCallPullIfNeeded(controller); }, function (r) { ReadableByteStreamControllerError(controller, r); }); } function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) { var controller = Object.create(ReadableByteStreamController.prototype); function startAlgorithm() { return InvokeOrNoop(underlyingByteSource, 'start', [controller]); } var pullAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingByteSource, 'pull', 0, [controller]); var cancelAlgorithm = CreateAlgorithmFromUnderlyingMethod(underlyingByteSource, 'cancel', 1, []); var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; if (autoAllocateChunkSize !== undefined) { autoAllocateChunkSize = Number(autoAllocateChunkSize); if (NumberIsInteger(autoAllocateChunkSize) === false || autoAllocateChunkSize <= 0) { throw new RangeError('autoAllocateChunkSize must be a positive integer'); } } SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize); } function SetUpReadableStreamBYOBRequest(request, controller, view) { request._associatedReadableByteStreamController = controller; request._view = view; } // Helper functions for the ReadableStreamBYOBRequest. function byobRequestBrandCheckException(name) { return new TypeError("ReadableStreamBYOBRequest.prototype." + name + " can only be used on a ReadableStreamBYOBRequest"); } // Helper functions for the ReadableByteStreamController. function byteStreamControllerBrandCheckException(name) { return new TypeError("ReadableByteStreamController.prototype." + name + " can only be used on a ReadableByteStreamController"); } // Abstract operations for the ReadableStream. function AcquireReadableStreamBYOBReader(stream, forAuthorCode) { if (forAuthorCode === void 0) { forAuthorCode = false; } var reader = new ReadableStreamBYOBReader(stream); reader._forAuthorCode = forAuthorCode; return reader; } // ReadableStream API exposed for controllers. function ReadableStreamAddReadIntoRequest(stream) { var promise = newPromise(function (resolve, reject) { var readIntoRequest = { _resolve: resolve, _reject: reject }; stream._reader._readIntoRequests.push(readIntoRequest); }); return promise; } function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { var reader = stream._reader; var readIntoRequest = reader._readIntoRequests.shift(); readIntoRequest._resolve(ReadableStreamCreateReadResult(chunk, done, reader._forAuthorCode)); } function ReadableStreamGetNumReadIntoRequests(stream) { return stream._reader._readIntoRequests.length; } function ReadableStreamHasBYOBReader(stream) { var reader = stream._reader; if (reader === undefined) { return false; } if (!IsReadableStreamBYOBReader(reader)) { return false; } return true; } var ReadableStreamBYOBReader = /** @class */ (function () { function ReadableStreamBYOBReader(stream) { if (!IsReadableStream(stream)) { throw new TypeError('ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a ' + 'byte source'); } if (IsReadableByteStreamController(stream._readableStreamController) === false) { throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + 'source'); } if (IsReadableStreamLocked(stream)) { throw new TypeError('This stream has already been locked for exclusive reading by another reader'); } ReadableStreamReaderGenericInitialize(this, stream); this._readIntoRequests = new SimpleQueue(); } Object.defineProperty(ReadableStreamBYOBReader.prototype, "closed", { get: function () { if (!IsReadableStreamBYOBReader(this)) { return promiseRejectedWith(byobReaderBrandCheckException('closed')); } return this._closedPromise; }, enumerable: true, configurable: true }); ReadableStreamBYOBReader.prototype.cancel = function (reason) { if (!IsReadableStreamBYOBReader(this)) { return promiseRejectedWith(byobReaderBrandCheckException('cancel')); } if (this._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('cancel')); } return ReadableStreamReaderGenericCancel(this, reason); }; ReadableStreamBYOBReader.prototype.read = function (view) { if (!IsReadableStreamBYOBReader(this)) { return promiseRejectedWith(byobReaderBrandCheckException('read')); } if (this._ownerReadableStream === undefined) { return promiseRejectedWith(readerLockException('read from')); } if (!ArrayBuffer.isView(view)) { return promiseRejectedWith(new TypeError('view must be an array buffer view')); } if (IsDetachedBuffer(view.buffer) === true) ; if (view.byteLength === 0) { return promiseRejectedWith(new TypeError('view must have non-zero byteLength')); } return ReadableStreamBYOBReaderRead(this, view); }; ReadableStreamBYOBReader.prototype.releaseLock = function () { if (!IsReadableStreamBYOBReader(this)) { throw byobReaderBrandCheckException('releaseLock'); } if (this._ownerReadableStream === undefined) { return; } if (this._readIntoRequests.length > 0) { throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); } ReadableStreamReaderGenericRelease(this); }; return ReadableStreamBYOBReader; }()); // Abstract operations for the readers. function IsReadableStreamBYOBReader(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) { return false; } return true; } function ReadableStreamBYOBReaderRead(reader, view) { var stream = reader._ownerReadableStream; stream._disturbed = true; if (stream._state === 'errored') { return promiseRejectedWith(stream._storedError); } // Controllers must implement this. return ReadableByteStreamControllerPullInto(stream._readableStreamController, view); } // Helper functions for the ReadableStreamBYOBReader. function byobReaderBrandCheckException(name) { return new TypeError("ReadableStreamBYOBReader.prototype." + name + " can only be used on a ReadableStreamBYOBReader"); } var ReadableStream = /** @class */ (function () { function ReadableStream(underlyingSource, strategy) { if (underlyingSource === void 0) { underlyingSource = {}; } if (strategy === void 0) { strategy = {}; } InitializeReadableStream(this); var size = strategy.size; var highWaterMark = strategy.highWaterMark; var type = underlyingSource.type; var typeString = String(type); if (typeString === 'bytes') { if (size !== undefined) { throw new RangeError('The strategy for a byte stream cannot have a size function'); } if (highWaterMark === undefined) { highWaterMark = 0; } highWaterMark = ValidateAndNormalizeHighWaterMark(highWaterMark); SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark); } else if (type === undefined) { var sizeAlgorithm = MakeSizeAlgorithmFromSizeFunction(size); if (highWaterMark === undefined) { highWaterMark = 1; } highWaterMark = ValidateAndNormalizeHighWaterMark(highWaterMark); SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm); } else { throw new RangeError('Invalid type is specified'); } } Object.defineProperty(ReadableStream.prototype, "locked", { get: function () { if (IsReadableStream(this) === false) { throw streamBrandCheckException$1('locked'); } return IsReadableStreamLocked(this); }, enumerable: true, configurable: true }); ReadableStream.prototype.cancel = function (reason) { if (IsReadableStream(this) === false) { return promiseRejectedWith(streamBrandCheckException$1('cancel')); } if (IsReadableStreamLocked(this) === true) { return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader')); } return ReadableStreamCancel(this, reason); }; ReadableStream.prototype.getReader = function (_a) { var mode = (_a === void 0 ? {} : _a).mode; if (IsReadableStream(this) === false) { throw streamBrandCheckException$1('getReader'); } if (mode === undefined) { return AcquireReadableStreamDefaultReader(this, true); } mode = String(mode); if (mode === 'byob') { return AcquireReadableStreamBYOBReader(this, true); } throw new RangeError('Invalid mode is specified'); }; ReadableStream.prototype.pipeThrough = function (_a, _b) { var writable = _a.writable, readable = _a.readable; var _c = _b === void 0 ? {} : _b, preventClose = _c.preventClose, preventAbort = _c.preventAbort, preventCancel = _c.preventCancel, signal = _c.signal; if (IsReadableStream(this) === false) { throw streamBrandCheckException$1('pipeThrough'); } if (IsWritableStream(writable) === false) { throw new TypeError('writable argument to pipeThrough must be a WritableStream'); } if (IsReadableStream(readable) === false) { throw new TypeError('readable argument to pipeThrough must be a ReadableStream'); } preventClose = Boolean(preventClose); preventAbort = Boolean(preventAbort); preventCancel = Boolean(preventCancel); if (signal !== undefined && !isAbortSignal(signal)) { throw new TypeError('ReadableStream.prototype.pipeThrough\'s signal option must be an AbortSignal'); } if (IsReadableStreamLocked(this) === true) { throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream'); } if (IsWritableStreamLocked(writable) === true) { throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream'); } var promise = ReadableStreamPipeTo(this, writable, preventClose, preventAbort, preventCancel, signal); setPromiseIsHandledToTrue(promise); return readable; }; ReadableStream.prototype.pipeTo = function (dest, _a) { var _b = _a === void 0 ? {} : _a, preventClose = _b.preventClose, preventAbort = _b.preventAbort, preventCancel = _b.preventCancel, signal = _b.signal; if (IsReadableStream(this) === false) { return promiseRejectedWith(streamBrandCheckException$1('pipeTo')); } if (IsWritableStream(dest) === false) { return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo\'s first argument must be a WritableStream')); } preventClose = Boolean(preventClose); preventAbort = Boolean(preventAbort); preventCancel = Boolean(preventCancel); if (signal !== undefined && !isAbortSignal(signal)) { return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo\'s signal option must be an AbortSignal')); } if (IsReadableStreamLocked(this) === true) { return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream')); } if (IsWritableStreamLocked(dest) === true) { return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream')); } return ReadableStreamPipeTo(this, dest, preventClose, preventAbort, preventCancel, signal); }; ReadableStream.prototype.tee = function () { if (IsReadableStream(this) === false) { throw streamBrandCheckException$1('tee'); } var branches = ReadableStreamTee(this); return createArrayFromList(branches); }; ReadableStream.prototype.getIterator = function (_a) { var _b = (_a === void 0 ? {} : _a).preventCancel, preventCancel = _b === void 0 ? false : _b; if (IsReadableStream(this) === false) { throw streamBrandCheckException$1('getIterator'); } return AcquireReadableStreamAsyncIterator(this, preventCancel); }; return ReadableStream; }()); if (typeof SymbolPolyfill.asyncIterator === 'symbol') { Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, { value: ReadableStream.prototype.getIterator, enumerable: false, writable: true, configurable: true }); } // Abstract operations for the ReadableStream. // Throws if and only if startAlgorithm throws. function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { if (highWaterMark === void 0) { highWaterMark = 1; } if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; } var stream = Object.create(ReadableStream.prototype); InitializeReadableStream(stream); var controller = Object.create(ReadableStreamDefaultController.prototype); SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); return stream; } function InitializeReadableStream(stream) { stream._state = 'readable'; stream._reader = undefined; stream._storedError = undefined; stream._disturbed = false; } function IsReadableStream(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) { return false; } return true; } function IsReadableStreamLocked(stream) { if (stream._reader === undefined) { return false; } return true; } // ReadableStream API exposed for controllers. function ReadableStreamCancel(stream, reason) { stream._disturbed = true; if (stream._state === 'closed') { return promiseResolvedWith(undefined); } if (stream._state === 'errored') { return promiseRejectedWith(stream._storedError); } ReadableStreamClose(stream); var sourceCancelPromise = stream._readableStreamController[CancelSteps](reason); return transformPromiseWith(sourceCancelPromise, noop); } function ReadableStreamClose(stream) { stream._state = 'closed'; var reader = stream._reader; if (reader === undefined) { return; } if (IsReadableStreamDefaultReader(reader)) { reader._readRequests.forEach(function (readRequest) { readRequest._resolve(ReadableStreamCreateReadResult(undefined, true, reader._forAuthorCode)); }); reader._readRequests = new SimpleQueue(); } defaultReaderClosedPromiseResolve(reader); } function ReadableStreamError(stream, e) { stream._state = 'errored'; stream._storedError = e; var reader = stream._reader; if (reader === undefined) { return; } if (IsReadableStreamDefaultReader(reader)) { reader._readRequests.forEach(function (readRequest) { readRequest._reject(e); }); reader._readRequests = new SimpleQueue(); } else { reader._readIntoRequests.forEach(function (readIntoRequest) { readIntoRequest._reject(e); }); reader._readIntoRequests = new SimpleQueue(); } defaultReaderClosedPromiseReject(reader, e); } // Helper functions for the ReadableStream. function streamBrandCheckException$1(name) { return new TypeError("ReadableStream.prototype." + name + " can only be used on a ReadableStream"); } var ByteLengthQueuingStrategy = /** @class */ (function () { function ByteLengthQueuingStrategy(_a) { var highWaterMark = _a.highWaterMark; this.highWaterMark = highWaterMark; } ByteLengthQueuingStrategy.prototype.size = function (chunk) { return chunk.byteLength; }; return ByteLengthQueuingStrategy; }()); var CountQueuingStrategy = /** @class */ (function () { function CountQueuingStrategy(_a) { var highWaterMark = _a.highWaterMark; this.highWaterMark = highWaterMark; } CountQueuingStrategy.prototype.size = function () { return 1; }; return CountQueuingStrategy; }()); // Class TransformStream var TransformStream = /** @class */ (function () { function TransformStream(transformer, writableStrategy, readableStrategy) { if (transformer === void 0) { transformer = {}; } if (writableStrategy === void 0) { writableStrategy = {}; } if (readableStrategy === void 0) { readableStrategy = {}; } var writableSizeFunction = writableStrategy.size; var writableHighWaterMark = writableStrategy.highWaterMark; var readableSizeFunction = readableStrategy.size; var readableHighWaterMark = readableStrategy.highWaterMark; var writableType = transformer.writableType; if (writableType !== undefined) { throw new RangeError('Invalid writable type specified'); } var writableSizeAlgorithm = MakeSizeAlgorithmFromSizeFunction(writableSizeFunction); if (writableHighWaterMark === undefined) { writableHighWaterMark = 1; } writableHighWaterMark = ValidateAndNormalizeHighWaterMark(writableHighWaterMark); var readableType = transformer.readableType; if (readableType !== undefined) { throw new RangeError('Invalid readable type specified'); } var readableSizeAlgorithm = MakeSizeAlgorithmFromSizeFunction(readableSizeFunction); if (readableHighWaterMark === undefined) { readableHighWaterMark = 0; } readableHighWaterMark = ValidateAndNormalizeHighWaterMark(readableHighWaterMark); var startPromise_resolve; var startPromise = newPromise(function (resolve) { startPromise_resolve = resolve; }); InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm); SetUpTransformStreamDefaultControllerFromTransformer(this, transformer); var startResult = InvokeOrNoop(transformer, 'start', [this._transformStreamController]); startPromise_resolve(startResult); } Object.defineProperty(TransformStream.prototype, "readable", { get: function () { if (IsTransformStream(this) === false) { throw streamBrandCheckException$2('readable'); } return this._readable; }, enumerable: true, configurable: true }); Object.defineProperty(TransformStream.prototype, "writable", { get: function () { if (IsTransformStream(this) === false) { throw streamBrandCheckException$2('writable'); } return this._writable; }, enumerable: true, configurable: true }); return TransformStream; }()); function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) { function startAlgorithm() { return startPromise; } function writeAlgorithm(chunk) { return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk); } function abortAlgorithm(reason) { return TransformStreamDefaultSinkAbortAlgorithm(stream, reason); } function closeAlgorithm() { return TransformStreamDefaultSinkCloseAlgorithm(stream); } stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm); function pullAlgorithm() { return TransformStreamDefaultSourcePullAlgorithm(stream); } function cancelAlgorithm(reason) { TransformStreamErrorWritableAndUnblockWrite(stream, reason); return promiseResolvedWith(undefined); } stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm); // The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure. stream._backpressure = undefined; stream._backpressureChangePromise = undefined; stream._backpressureChangePromise_resolve = undefined; TransformStreamSetBackpressure(stream, true); // Used by IsWritableStream() which is called by SetUpTransformStreamDefaultController(). stream._transformStreamController = undefined; } function IsTransformStream(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) { return false; } return true; } // This is a no-op if both sides are already errored. function TransformStreamError(stream, e) { ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e); TransformStreamErrorWritableAndUnblockWrite(stream, e); } function TransformStreamErrorWritableAndUnblockWrite(stream, e) { TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController); WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e); if (stream._backpressure === true) { // Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure() // cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time // _backpressure is set. TransformStreamSetBackpressure(stream, false); } } function TransformStreamSetBackpressure(stream, backpressure) { // Passes also when called during construction. if (stream._backpressureChangePromise !== undefined) { stream._backpressureChangePromise_resolve(); } stream._backpressureChangePromise = newPromise(function (resolve) { stream._backpressureChangePromise_resolve = resolve; }); stream._backpressure = backpressure; } var TransformStreamDefaultController = /** @class */ (function () { /** @internal */ function TransformStreamDefaultController() { throw new TypeError('TransformStreamDefaultController instances cannot be created directly'); } Object.defineProperty(TransformStreamDefaultController.prototype, "desiredSize", { get: function () { if (IsTransformStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException$1('desiredSize'); } var readableController = this._controlledTransformStream._readable._readableStreamController; return ReadableStreamDefaultControllerGetDesiredSize(readableController); }, enumerable: true, configurable: true }); TransformStreamDefaultController.prototype.enqueue = function (chunk) { if (IsTransformStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException$1('enqueue'); } TransformStreamDefaultControllerEnqueue(this, chunk); }; TransformStreamDefaultController.prototype.error = function (reason) { if (IsTransformStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException$1('error'); } TransformStreamDefaultControllerError(this, reason); }; TransformStreamDefaultController.prototype.terminate = function () { if (IsTransformStreamDefaultController(this) === false) { throw defaultControllerBrandCheckException$1('terminate'); } TransformStreamDefaultControllerTerminate(this); }; return TransformStreamDefaultController; }()); // Transform Stream Default Controller Abstract Operations function IsTransformStreamDefaultController(x) { if (!typeIsObject(x)) { return false; } if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) { return false; } return true; } function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) { controller._controlledTransformStream = stream; stream._transformStreamController = controller; controller._transformAlgorithm = transformAlgorithm; controller._flushAlgorithm = flushAlgorithm; } function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) { var controller = Object.create(TransformStreamDefaultController.prototype); var transformAlgorithm = function (chunk) { try { TransformStreamDefaultControllerEnqueue(controller, chunk); return promiseResolvedWith(undefined); } catch (transformResultE) { return promiseRejectedWith(transformResultE); } }; var transformMethod = transformer.transform; if (transformMethod !== undefined) { if (typeof transformMethod !== 'function') { throw new TypeError('transform is not a method'); } transformAlgorithm = function (chunk) { return PromiseCall(transformMethod, transformer, [chunk, controller]); }; } var flushAlgorithm = CreateAlgorithmFromUnderlyingMethod(transformer, 'flush', 0, [controller]); SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm); } function TransformStreamDefaultControllerClearAlgorithms(controller) { controller._transformAlgorithm = undefined; controller._flushAlgorithm = undefined; } function TransformStreamDefaultControllerEnqueue(controller, chunk) { var stream = controller._controlledTransformStream; var readableController = stream._readable._readableStreamController; if (ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController) === false) { throw new TypeError('Readable side is not in a state that permits enqueue'); } // We throttle transform invocations based on the backpressure of the ReadableStream, but we still // accept TransformStreamDefaultControllerEnqueue() calls. try { ReadableStreamDefaultControllerEnqueue(readableController, chunk); } catch (e) { // This happens when readableStrategy.size() throws. TransformStreamErrorWritableAndUnblockWrite(stream, e); throw stream._readable._storedError; } var backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); if (backpressure !== stream._backpressure) { TransformStreamSetBackpressure(stream, true); } } function TransformStreamDefaultControllerError(controller, e) { TransformStreamError(controller._controlledTransformStream, e); } function TransformStreamDefaultControllerPerformTransform(controller, chunk) { var transformPromise = controller._transformAlgorithm(chunk); return transformPromiseWith(transformPromise, undefined, function (r) { TransformStreamError(controller._controlledTransformStream, r); throw r; }); } function TransformStreamDefaultControllerTerminate(controller) { var stream = controller._controlledTransformStream; var readableController = stream._readable._readableStreamController; if (ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController) === true) { ReadableStreamDefaultControllerClose(readableController); } var error = new TypeError('TransformStream terminated'); TransformStreamErrorWritableAndUnblockWrite(stream, error); } // TransformStreamDefaultSink Algorithms function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) { var controller = stream._transformStreamController; if (stream._backpressure === true) { var backpressureChangePromise = stream._backpressureChangePromise; return transformPromiseWith(backpressureChangePromise, function () { var writable = stream._writable; var state = writable._state; if (state === 'erroring') { throw writable._storedError; } return TransformStreamDefaultControllerPerformTransform(controller, chunk); }); } return TransformStreamDefaultControllerPerformTransform(controller, chunk); } function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) { // abort() is not called synchronously, so it is possible for abort() to be called when the stream is already // errored. TransformStreamError(stream, reason); return promiseResolvedWith(undefined); } function TransformStreamDefaultSinkCloseAlgorithm(stream) { // stream._readable cannot change after construction, so caching it across a call to user code is safe. var readable = stream._readable; var controller = stream._transformStreamController; var flushPromise = controller._flushAlgorithm(); TransformStreamDefaultControllerClearAlgorithms(controller); // Return a promise that is fulfilled with undefined on success. return transformPromiseWith(flushPromise, function () { if (readable._state === 'errored') { throw readable._storedError; } var readableController = readable._readableStreamController; if (ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController) === true) { ReadableStreamDefaultControllerClose(readableController); } }, function (r) { TransformStreamError(stream, r); throw readable._storedError; }); } // TransformStreamDefaultSource Algorithms function TransformStreamDefaultSourcePullAlgorithm(stream) { // Invariant. Enforced by the promises returned by start() and pull(). TransformStreamSetBackpressure(stream, false); // Prevent the next pull() call until there is backpressure. return stream._backpressureChangePromise; } // Helper functions for the TransformStreamDefaultController. function defaultControllerBrandCheckException$1(name) { return new TypeError("TransformStreamDefaultController.prototype." + name + " can only be used on a TransformStreamDefaultController"); } // Helper functions for the TransformStream. function streamBrandCheckException$2(name) { return new TypeError("TransformStream.prototype." + name + " can only be used on a TransformStream"); } exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy; exports.CountQueuingStrategy = CountQueuingStrategy; exports.ReadableStream = ReadableStream; exports.TransformStream = TransformStream; exports.WritableStream = WritableStream; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=ponyfill.js.map /***/ }), /***/ "88a7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineBuiltIn = __webpack_require__("cb2d"); var uncurryThis = __webpack_require__("e330"); var toString = __webpack_require__("577e"); var validateArgumentsLength = __webpack_require__("d6d6"); var $URLSearchParams = URLSearchParams; var URLSearchParamsPrototype = $URLSearchParams.prototype; var append = uncurryThis(URLSearchParamsPrototype.append); var $delete = uncurryThis(URLSearchParamsPrototype['delete']); var forEach = uncurryThis(URLSearchParamsPrototype.forEach); var push = uncurryThis([].push); var params = new $URLSearchParams('a=1&a=2&b=3'); params['delete']('a', 1); // `undefined` case is a Chromium 117 bug // https://bugs.chromium.org/p/v8/issues/detail?id=14222 params['delete']('b', undefined); if (params + '' !== 'a=2') { defineBuiltIn(URLSearchParamsPrototype, 'delete', function (name /* , value */) { var length = arguments.length; var $value = length < 2 ? undefined : arguments[1]; if (length && $value === undefined) return $delete(this, name); var entries = []; forEach(this, function (v, k) { // also validates `this` push(entries, { key: k, value: v }); }); validateArgumentsLength(length, 1); var key = toString(name); var value = toString($value); var index = 0; var entriesLength = entries.length; var entry; while (index < entriesLength) { entry = entries[index]; $delete(this, entry.key); index++; } index = 0; while (index < entriesLength) { entry = entries[index++]; if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value); } }, { enumerable: true, unsafe: true }); } /***/ }), /***/ "8925": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var isCallable = __webpack_require__("1626"); var store = __webpack_require__("c6cd"); var functionToString = uncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(store.inspectSource)) { store.inspectSource = function (it) { return functionToString(it); }; } module.exports = store.inspectSource; /***/ }), /***/ "8a24": /***/ (function(module, exports, __webpack_require__) { "use strict"; const util = __webpack_require__("90da"); const buildOptions = __webpack_require__("90da").buildOptions; const xmlNode = __webpack_require__("f480"); const regx = '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' .replace(/NAME/g, util.nameRegexp); //const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); //const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); //polyfill if (!Number.parseInt && window.parseInt) { Number.parseInt = window.parseInt; } if (!Number.parseFloat && window.parseFloat) { Number.parseFloat = window.parseFloat; } const defaultOptions = { attributeNamePrefix: '@_', attrNodeName: false, textNodeName: '#text', ignoreAttributes: true, ignoreNameSpace: false, allowBooleanAttributes: false, //a tag can have attributes without any value //ignoreRootElement : false, parseNodeValue: true, parseAttributeValue: false, arrayMode: false, trimValues: true, //Trim string values of tag and attributes cdataTagName: false, cdataPositionChar: '\\c', tagValueProcessor: function(a, tagName) { return a; }, attrValueProcessor: function(a, attrName) { return a; }, stopNodes: [] //decodeStrict: false, }; exports.defaultOptions = defaultOptions; const props = [ 'attributeNamePrefix', 'attrNodeName', 'textNodeName', 'ignoreAttributes', 'ignoreNameSpace', 'allowBooleanAttributes', 'parseNodeValue', 'parseAttributeValue', 'arrayMode', 'trimValues', 'cdataTagName', 'cdataPositionChar', 'tagValueProcessor', 'attrValueProcessor', 'parseTrueNumberOnly', 'stopNodes' ]; exports.props = props; /** * Trim -> valueProcessor -> parse value * @param {string} tagName * @param {string} val * @param {object} options */ function processTagValue(tagName, val, options) { if (val) { if (options.trimValues) { val = val.trim(); } val = options.tagValueProcessor(val, tagName); val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly); } return val; } function resolveNameSpace(tagname, options) { if (options.ignoreNameSpace) { const tags = tagname.split(':'); const prefix = tagname.charAt(0) === '/' ? '/' : ''; if (tags[0] === 'xmlns') { return ''; } if (tags.length === 2) { tagname = prefix + tags[1]; } } return tagname; } function parseValue(val, shouldParse, parseTrueNumberOnly) { if (shouldParse && typeof val === 'string') { let parsed; if (val.trim() === '' || isNaN(val)) { parsed = val === 'true' ? true : val === 'false' ? false : val; } else { if (val.indexOf('0x') !== -1) { //support hexa decimal parsed = Number.parseInt(val, 16); } else if (val.indexOf('.') !== -1) { parsed = Number.parseFloat(val); val = val.replace(/\.?0+$/, ""); } else { parsed = Number.parseInt(val, 10); } if (parseTrueNumberOnly) { parsed = String(parsed) === val ? parsed : val; } } return parsed; } else { if (util.isExist(val)) { return val; } else { return ''; } } } //TODO: change regex to capture NS //const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g'); function buildAttributesMap(attrStr, options) { if (!options.ignoreAttributes && typeof attrStr === 'string') { attrStr = attrStr.replace(/\r?\n/g, ' '); //attrStr = attrStr || attrStr.trim(); const matches = util.getAllMatches(attrStr, attrsRegx); const len = matches.length; //don't make it inline const attrs = {}; for (let i = 0; i < len; i++) { const attrName = resolveNameSpace(matches[i][1], options); if (attrName.length) { if (matches[i][4] !== undefined) { if (options.trimValues) { matches[i][4] = matches[i][4].trim(); } matches[i][4] = options.attrValueProcessor(matches[i][4], attrName); attrs[options.attributeNamePrefix + attrName] = parseValue( matches[i][4], options.parseAttributeValue, options.parseTrueNumberOnly ); } else if (options.allowBooleanAttributes) { attrs[options.attributeNamePrefix + attrName] = true; } } } if (!Object.keys(attrs).length) { return; } if (options.attrNodeName) { const attrCollection = {}; attrCollection[options.attrNodeName] = attrs; return attrCollection; } return attrs; } } const getTraversalObj = function(xmlData, options) { xmlData = xmlData.replace(/\r\n?/g, "\n"); options = buildOptions(options, defaultOptions, props); const xmlObj = new xmlNode('!xml'); let currentNode = xmlObj; let textData = ""; //function match(xmlData){ for(let i=0; i< xmlData.length; i++){ const ch = xmlData[i]; if(ch === '<'){ if( xmlData[i+1] === '/') {//Closing Tag const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") let tagName = xmlData.substring(i+2,closeIndex).trim(); if(options.ignoreNameSpace){ const colonIndex = tagName.indexOf(":"); if(colonIndex !== -1){ tagName = tagName.substr(colonIndex+1); } } /* if (currentNode.parent) { currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options); } */ if(currentNode){ if(currentNode.val){ currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options); }else{ currentNode.val = processTagValue(tagName, textData , options); } } if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) { currentNode.child = [] if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}} currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1) } currentNode = currentNode.parent; textData = ""; i = closeIndex; } else if( xmlData[i+1] === '?') { i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.") } else if(xmlData.substr(i + 1, 3) === '!--') { i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.") } else if( xmlData.substr(i + 1, 2) === '!D') { const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.") const tagExp = xmlData.substring(i, closeIndex); if(tagExp.indexOf("[") >= 0){ i = xmlData.indexOf("]>", i) + 1; }else{ i = closeIndex; } }else if(xmlData.substr(i + 1, 2) === '![') { const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2 const tagExp = xmlData.substring(i + 9,closeIndex); //considerations //1. CDATA will always have parent node //2. A tag with CDATA is not a leaf node so it's value would be string type. if(textData){ currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options); textData = ""; } if (options.cdataTagName) { //add cdata node const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp); currentNode.addChild(childNode); //for backtracking currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar; //add rest value to parent node if (tagExp) { childNode.val = tagExp; } } else { currentNode.val = (currentNode.val || '') + (tagExp || ''); } i = closeIndex + 2; }else {//Opening tag const result = closingIndexForOpeningTag(xmlData, i+1) let tagExp = result.data; const closeIndex = result.index; const separatorIndex = tagExp.indexOf(" "); let tagName = tagExp; if(separatorIndex !== -1){ tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ''); tagExp = tagExp.substr(separatorIndex + 1); } if(options.ignoreNameSpace){ const colonIndex = tagName.indexOf(":"); if(colonIndex !== -1){ tagName = tagName.substr(colonIndex+1); } } //save text to parent node if (currentNode && textData) { if(currentNode.tagname !== '!xml'){ currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options); } } if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' tagName = tagName.substr(0, tagName.length - 1); tagExp = tagName; }else{ tagExp = tagExp.substr(0, tagExp.length - 1); } const childNode = new xmlNode(tagName, currentNode, ''); if(tagName !== tagExp){ childNode.attrsMap = buildAttributesMap(tagExp, options); } currentNode.addChild(childNode); }else{//opening tag const childNode = new xmlNode( tagName, currentNode ); if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) { childNode.startIndex=closeIndex; } if(tagName !== tagExp){ childNode.attrsMap = buildAttributesMap(tagExp, options); } currentNode.addChild(childNode); currentNode = childNode; } textData = ""; i = closeIndex; } }else{ textData += xmlData[i]; } } return xmlObj; } function closingIndexForOpeningTag(data, i){ let attrBoundary; let tagExp = ""; for (let index = i; index < data.length; index++) { let ch = data[index]; if (attrBoundary) { if (ch === attrBoundary) attrBoundary = "";//reset } else if (ch === '"' || ch === "'") { attrBoundary = ch; } else if (ch === '>') { return { data: tagExp, index: index } } else if (ch === '\t') { ch = " " } tagExp += ch; } } function findClosingIndex(xmlData, str, i, errMsg){ const closingIndex = xmlData.indexOf(str, i); if(closingIndex === -1){ throw new Error(errMsg) }else{ return closingIndex + str.length - 1; } } exports.getTraversalObj = getTraversalObj; /***/ }), /***/ "8a79": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("4625"); var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var toLength = __webpack_require__("50c4"); var toString = __webpack_require__("577e"); var notARegExp = __webpack_require__("5a34"); var requireObjectCoercible = __webpack_require__("1d80"); var correctIsRegExpLogic = __webpack_require__("ab13"); var IS_PURE = __webpack_require__("c430"); var slice = uncurryThis(''.slice); var min = Math.min; var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith'); // https://github.com/zloirock/core-js/pull/702 var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () { var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith'); return descriptor && !descriptor.writable; }(); // `String.prototype.endsWith` method // https://tc39.es/ecma262/#sec-string.prototype.endswith $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, { endsWith: function endsWith(searchString /* , endPosition = @length */) { var that = toString(requireObjectCoercible(this)); notARegExp(searchString); var search = toString(searchString); var endPosition = arguments.length > 1 ? arguments[1] : undefined; var len = that.length; var end = endPosition === undefined ? len : min(toLength(endPosition), len); return slice(that, end - search.length, end) === search; } }); /***/ }), /***/ "8a96": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $TypeError = TypeError; module.exports = function (argument) { if (typeof argument == 'string') return argument; throw new $TypeError('Argument is not a string'); }; /***/ }), /***/ "8ac5": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("e260"); __webpack_require__("c1f9"); var path = __webpack_require__("428f"); module.exports = path.Object.fromEntries; /***/ }), /***/ "8b00": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var isSubsetOf = __webpack_require__("68df"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var INCORRECT = !setMethodAcceptSetLike('isSubsetOf', function (result) { return result; }); // `Set.prototype.isSubsetOf` method // https://tc39.es/ecma262/#sec-set.prototype.issubsetof $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { isSubsetOf: isSubsetOf }); /***/ }), /***/ "8ba4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var isIntegralNumber = __webpack_require__("eac5"); // `Number.isInteger` method // https://tc39.es/ecma262/#sec-number.isinteger $({ target: 'Number', stat: true }, { isInteger: isIntegralNumber }); /***/ }), /***/ "8e16": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThisAccessor = __webpack_require__("7282"); var SetHelpers = __webpack_require__("cb27"); module.exports = uncurryThisAccessor(SetHelpers.proto, 'size', 'get') || function (set) { return set.size; }; /***/ }), /***/ "8edd": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.matchAll` well-known symbol // https://tc39.es/ecma262/#sec-symbol.matchall defineWellKnownSymbol('matchAll'); /***/ }), /***/ "8f2a": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("2954"); /***/ }), /***/ "8f4c": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("8a79"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('String', 'endsWith'); /***/ }), /***/ "9020": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("9129"); var path = __webpack_require__("428f"); module.exports = path.Number.isNaN; /***/ }), /***/ "907a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var lengthOfArrayLike = __webpack_require__("07fa"); var toIntegerOrInfinity = __webpack_require__("5926"); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.at` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.at exportTypedArrayMethod('at', function at(index) { var O = aTypedArray(this); var len = lengthOfArrayLike(O); var relativeIndex = toIntegerOrInfinity(index); var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; return (k < 0 || k >= len) ? undefined : O[k]; }); /***/ }), /***/ "90d7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var log2 = __webpack_require__("4ff9"); // `Math.log2` method // https://tc39.es/ecma262/#sec-math.log2 $({ target: 'Math', stat: true }, { log2: log2 }); /***/ }), /***/ "90da": /***/ (function(module, exports, __webpack_require__) { "use strict"; const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' const regexName = new RegExp('^' + nameRegexp + '$'); const getAllMatches = function(string, regex) { const matches = []; let match = regex.exec(string); while (match) { const allmatches = []; const len = match.length; for (let index = 0; index < len; index++) { allmatches.push(match[index]); } matches.push(allmatches); match = regex.exec(string); } return matches; }; const isName = function(string) { const match = regexName.exec(string); return !(match === null || typeof match === 'undefined'); }; exports.isExist = function(v) { return typeof v !== 'undefined'; }; exports.isEmptyObject = function(obj) { return Object.keys(obj).length === 0; }; /** * Copy all the properties of a into b. * @param {*} target * @param {*} a */ exports.merge = function(target, a, arrayMode) { if (a) { const keys = Object.keys(a); // will return an array of own properties const len = keys.length; //don't make it inline for (let i = 0; i < len; i++) { if(arrayMode === 'strict'){ target[keys[i]] = [ a[keys[i]] ]; }else{ target[keys[i]] = a[keys[i]]; } } } }; /* exports.merge =function (b,a){ return Object.assign(b,a); } */ exports.getValue = function(v) { if (exports.isExist(v)) { return v; } else { return ''; } }; // const fakeCall = function(a) {return a;}; // const fakeCallNoReturn = function() {}; exports.buildOptions = function(options, defaultOptions, props) { var newOptions = {}; if (!options) { return defaultOptions; //if there are not options } for (let i = 0; i < props.length; i++) { if (options[props[i]] !== undefined) { newOptions[props[i]] = options[props[i]]; } else { newOptions[props[i]] = defaultOptions[props[i]]; } } return newOptions; }; exports.isName = isName; exports.getAllMatches = getAllMatches; exports.nameRegexp = nameRegexp; /***/ }), /***/ "90e3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var id = 0; var postfix = Math.random(); var toString = uncurryThis(1.1.toString); module.exports = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; /***/ }), /***/ "9112": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var definePropertyModule = __webpack_require__("9bf2"); var createPropertyDescriptor = __webpack_require__("5c6c"); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ "9129": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); // `Number.isNaN` method // https://tc39.es/ecma262/#sec-number.isnan $({ target: 'Number', stat: true }, { isNaN: function isNaN(number) { // eslint-disable-next-line no-self-compare -- NaN check return number !== number; } }); /***/ }), /***/ "9152": /***/ (function(module, exports) { /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var nBits = -7 var i = isLE ? (nBytes - 1) : 0 var d = isLE ? -1 : 1 var s = buffer[offset + i] i += d e = s & ((1 << (-nBits)) - 1) s >>= (-nBits) nBits += eLen for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} m = e & ((1 << (-nBits)) - 1) e >>= (-nBits) nBits += mLen for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} if (e === 0) { e = 1 - eBias } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity) } else { m = m + Math.pow(2, mLen) e = e - eBias } return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) var i = isLE ? 0 : (nBytes - 1) var d = isLE ? 1 : -1 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 value = Math.abs(value) if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0 e = eMax } else { e = Math.floor(Math.log(value) / Math.LN2) if (value * (c = Math.pow(2, -e)) < 1) { e-- c *= 2 } if (e + eBias >= 1) { value += rt / c } else { value += rt * Math.pow(2, 1 - eBias) } if (value * c >= 2) { e++ c /= 2 } if (e + eBias >= eMax) { m = 0 e = eMax } else if (e + eBias >= 1) { m = ((value * c) - 1) * Math.pow(2, mLen) e = e + eBias } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) e = 0 } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} e = (e << mLen) | m eLen += mLen for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} buffer[offset + i - d] |= s * 128 } /***/ }), /***/ "944a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var defineWellKnownSymbol = __webpack_require__("e065"); var setToStringTag = __webpack_require__("d44e"); // `Symbol.toStringTag` well-known symbol // https://tc39.es/ecma262/#sec-symbol.tostringtag defineWellKnownSymbol('toStringTag'); // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag(getBuiltIn('Symbol'), 'Symbol'); /***/ }), /***/ "9485": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var iterate = __webpack_require__("2266"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var getIteratorDirect = __webpack_require__("46c4"); var iteratorClose = __webpack_require__("2a62"); var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f"); var apply = __webpack_require__("2ba4"); var fails = __webpack_require__("d039"); var $TypeError = TypeError; // https://bugs.webkit.org/show_bug.cgi?id=291651 var FAILS_ON_INITIAL_UNDEFINED = fails(function () { // eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing [].keys().reduce(function () { /* empty */ }, undefined); }); var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError); // `Iterator.prototype.reduce` method // https://tc39.es/ecma262/#sec-iterator.prototype.reduce $({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, { reduce: function reduce(reducer /* , initialValue */) { anObject(this); try { aCallable(reducer); } catch (error) { iteratorClose(this, 'throw', error); } var noInitial = arguments.length < 2; var accumulator = noInitial ? undefined : arguments[1]; if (reduceWithoutClosingOnEarlyError) { return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]); } var record = getIteratorDirect(this); var counter = 0; iterate(record, function (value) { if (noInitial) { noInitial = false; accumulator = value; } else { accumulator = reducer(accumulator, value, counter); } counter++; }, { IS_RECORD: true }); if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value'); return accumulator; } }); /***/ }), /***/ "94ca": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; /***/ }), /***/ "953b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var SetHelpers = __webpack_require__("cb27"); var size = __webpack_require__("8e16"); var getSetRecord = __webpack_require__("7f65"); var iterateSet = __webpack_require__("384f"); var iterateSimple = __webpack_require__("5388"); var Set = SetHelpers.Set; var add = SetHelpers.add; var has = SetHelpers.has; // `Set.prototype.intersection` method // https://tc39.es/ecma262/#sec-set.prototype.intersection module.exports = function intersection(other) { var O = aSet(this); var otherRec = getSetRecord(other); var result = new Set(); if (size(O) > otherRec.size) { iterateSimple(otherRec.getIterator(), function (e) { if (has(O, e)) add(result, e); }); } else { iterateSet(O, function (e) { if (otherRec.includes(e)) add(result, e); }); } return result; }; /***/ }), /***/ "9606": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("9861"); __webpack_require__("88a7"); __webpack_require__("271a"); __webpack_require__("5494"); var path = __webpack_require__("428f"); module.exports = path.URLSearchParams; /***/ }), /***/ "967a": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("bb56"); /***/ }), /***/ "97c7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var aCallable = __webpack_require__("59ed"); var aWeakMap = __webpack_require__("6a29"); var aWeakKey = __webpack_require__("5751"); var WeakMapHelpers = __webpack_require__("6d3e"); var IS_PURE = __webpack_require__("c430"); var get = WeakMapHelpers.get; var has = WeakMapHelpers.has; var set = WeakMapHelpers.set; var FORCED = IS_PURE || !function () { try { // eslint-disable-next-line es/no-weak-map, no-throw-literal -- testing if (WeakMap.prototype.getOrInsertComputed) new WeakMap().getOrInsertComputed(1, function () { throw 1; }); } catch (error) { // FF144 Nightly - Beta 3 bug // https://bugzilla.mozilla.org/show_bug.cgi?id=1988369 return error instanceof TypeError; } }(); // `WeakMap.prototype.getOrInsertComputed` method // https://tc39.es/ecma262/#sec-weakmap.prototype.getorinsertcomputed $({ target: 'WeakMap', proto: true, real: true, forced: FORCED }, { getOrInsertComputed: function getOrInsertComputed(key, callbackfn) { if (!IS_PURE) aWeakMap(this); aWeakKey(key); aCallable(callbackfn); if (has(this, key)) return get(this, key); var value = callbackfn(key); set(this, key, value); return value; } }); /***/ }), /***/ "9861": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's replaced to module below __webpack_require__("5352"); /***/ }), /***/ "986a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__("ebb5"); var $findLast = __webpack_require__("a258").findLast; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findLast` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findlast exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) { return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ "9961": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var SetHelpers = __webpack_require__("cb27"); var clone = __webpack_require__("83b9"); var getSetRecord = __webpack_require__("7f65"); var iterateSimple = __webpack_require__("5388"); var add = SetHelpers.add; var has = SetHelpers.has; var remove = SetHelpers.remove; // `Set.prototype.symmetricDifference` method // https://tc39.es/ecma262/#sec-set.prototype.symmetricdifference module.exports = function symmetricDifference(other) { var O = aSet(this); var keysIter = getSetRecord(other).getIterator(); var result = clone(O); iterateSimple(keysIter, function (e) { if (has(O, e)) remove(result, e); else add(result, e); }); return result; }; /***/ }), /***/ "99af": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var fails = __webpack_require__("d039"); var isArray = __webpack_require__("e8b5"); var isObject = __webpack_require__("861d"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); var doesNotExceedSafeInteger = __webpack_require__("3511"); var createProperty = __webpack_require__("8418"); var setArrayLength = __webpack_require__("3a34"); var arraySpeciesCreate = __webpack_require__("65f0"); var arrayMethodHasSpeciesSupport = __webpack_require__("1dde"); var wellKnownSymbol = __webpack_require__("b622"); var V8_VERSION = __webpack_require__("1212"); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat'); // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); doesNotExceedSafeInteger(n + len); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { doesNotExceedSafeInteger(n + 1); createProperty(A, n++, E); } } setArrayLength(A, n); return A; } }); /***/ }), /***/ "9a0c": /***/ (function(module, exports, __webpack_require__) { "use strict"; // https://github.com/zloirock/core-js/issues/280 var userAgent = __webpack_require__("b5db"); module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent); /***/ }), /***/ "9a1f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var tryToString = __webpack_require__("0d51"); var getIteratorMethod = __webpack_require__("35a1"); var $TypeError = TypeError; module.exports = function (argument, usingIterator) { var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); throw new $TypeError(tryToString(argument) + ' is not iterable'); }; /***/ }), /***/ "9a35": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("e260"); __webpack_require__("d3b7"); __webpack_require__("6062"); __webpack_require__("1e70"); __webpack_require__("79a4"); __webpack_require__("c1a1"); __webpack_require__("8b00"); __webpack_require__("a4e7"); __webpack_require__("1e5a"); __webpack_require__("72c3"); __webpack_require__("3ca3"); var path = __webpack_require__("428f"); module.exports = path.Set; /***/ }), /***/ "9adc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ENVIRONMENT = __webpack_require__("8558"); module.exports = ENVIRONMENT === 'NODE'; /***/ }), /***/ "9bdd": /***/ (function(module, exports, __webpack_require__) { "use strict"; var anObject = __webpack_require__("825a"); var iteratorClose = __webpack_require__("2a62"); // call something on iterator step with safe closing on error module.exports = function (iterator, fn, value, ENTRIES) { try { return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); } catch (error) { iteratorClose(iterator, 'throw', error); } }; /***/ }), /***/ "9bf2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var IE8_DOM_DEFINE = __webpack_require__("0cfb"); var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__("aed9"); var anObject = __webpack_require__("825a"); var toPropertyKey = __webpack_require__("a04b"); var $TypeError = TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var ENUMERABLE = 'enumerable'; var CONFIGURABLE = 'configurable'; var WRITABLE = 'writable'; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { var current = $getOwnPropertyDescriptor(O, P); if (current && current[WRITABLE]) { O[P] = Attributes.value; Attributes = { configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE], enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], writable: false }; } } return $defineProperty(O, P, Attributes); } : $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ "9cf7": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-json -- safe */ var fails = __webpack_require__("d039"); module.exports = !fails(function () { var unsafeInt = '9007199254740993'; // eslint-disable-next-line es/no-json-rawjson -- feature detection var raw = JSON.rawJSON(unsafeInt); // eslint-disable-next-line es/no-json-israwjson -- feature detection return !JSON.isRawJSON(raw) || JSON.stringify(raw) !== unsafeInt; }); /***/ }), /***/ "a04b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toPrimitive = __webpack_require__("c04e"); var isSymbol = __webpack_require__("d9b5"); // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey module.exports = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; /***/ }), /***/ "a149": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var getBuiltIn = __webpack_require__("d066"); var fails = __webpack_require__("d039"); var validateArgumentsLength = __webpack_require__("d6d6"); var toString = __webpack_require__("577e"); var USE_NATIVE_URL = __webpack_require__("f354"); var URL = getBuiltIn('URL'); // https://github.com/nodejs/node/issues/47505 // https://github.com/denoland/deno/issues/18893 var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () { URL.canParse(); }); // Bun ~ 1.0.30 bug // https://github.com/oven-sh/bun/issues/9250 var WRONG_ARITY = fails(function () { return URL.canParse.length !== 1; }); // `URL.canParse` method // https://url.spec.whatwg.org/#dom-url-canparse $({ target: 'URL', stat: true, forced: !THROWS_WITHOUT_ARGUMENTS || WRONG_ARITY }, { canParse: function canParse(url) { var length = validateArgumentsLength(arguments.length, 1); var urlString = toString(url); var base = length < 2 || arguments[1] === undefined ? undefined : toString(arguments[1]); try { return !!new URL(urlString, base); } catch (error) { return false; } } }); /***/ }), /***/ "a258": /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__("0366"); var IndexedObject = __webpack_require__("44ad"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); // `Array.prototype.{ findLast, findLastIndex }` methods implementation var createMethod = function (TYPE) { var IS_FIND_LAST_INDEX = TYPE === 1; return function ($this, callbackfn, that) { var O = toObject($this); var self = IndexedObject(O); var index = lengthOfArrayLike(self); var boundFunction = bind(callbackfn, that); var value, result; while (index-- > 0) { value = self[index]; result = boundFunction(value, index, O); if (result) switch (TYPE) { case 0: return value; // findLast case 1: return index; // findLastIndex } } return IS_FIND_LAST_INDEX ? -1 : undefined; }; }; module.exports = { // `Array.prototype.findLast` method // https://github.com/tc39/proposal-array-find-from-last findLast: createMethod(0), // `Array.prototype.findLastIndex` method // https://github.com/tc39/proposal-array-find-from-last findLastIndex: createMethod(1) }; /***/ }), /***/ "a336": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable no-bitwise, no-mixed-operators, class-methods-use-this */ const {BigInteger} = __webpack_require__("f33e") const SM3Digest = __webpack_require__("41d0") const _ = __webpack_require__("dffd") class SM2Cipher { constructor() { this.ct = 1 this.p2 = null this.sm3keybase = null this.sm3c3 = null this.key = new Array(32) this.keyOff = 0 } reset() { this.sm3keybase = new SM3Digest() this.sm3c3 = new SM3Digest() const xWords = _.hexToArray(_.leftPad(this.p2.getX().toBigInteger().toRadix(16), 64)) const yWords = _.hexToArray(_.leftPad(this.p2.getY().toBigInteger().toRadix(16), 64)) this.sm3keybase.blockUpdate(xWords, 0, xWords.length) this.sm3c3.blockUpdate(xWords, 0, xWords.length) this.sm3keybase.blockUpdate(yWords, 0, yWords.length) this.ct = 1 this.nextKey() } nextKey() { const sm3keycur = new SM3Digest(this.sm3keybase) sm3keycur.update((this.ct >> 24 & 0x00ff)) sm3keycur.update((this.ct >> 16 & 0x00ff)) sm3keycur.update((this.ct >> 8 & 0x00ff)) sm3keycur.update((this.ct & 0x00ff)) sm3keycur.doFinal(this.key, 0) this.keyOff = 0 this.ct++ } initEncipher(userKey) { const keypair = _.generateKeyPairHex() const k = new BigInteger(keypair.privateKey, 16) let publicKey = keypair.publicKey this.p2 = userKey.multiply(k) // [k](Pb) this.reset() if (publicKey.length > 128) { publicKey = publicKey.substr(publicKey.length - 128) } return publicKey } encryptBlock(data) { this.sm3c3.blockUpdate(data, 0, data.length) for (let i = 0; i < data.length; i++) { if (this.keyOff === this.key.length) { this.nextKey() } data[i] ^= this.key[this.keyOff++] & 0xff } } initDecipher(userD, c1) { this.p2 = c1.multiply(userD) this.reset() } decryptBlock(data) { for (let i = 0; i < data.length; i++) { if (this.keyOff === this.key.length) { this.nextKey() } data[i] ^= this.key[this.keyOff++] & 0xff } this.sm3c3.blockUpdate(data, 0, data.length) } doFinal(c3) { const yWords = _.hexToArray(_.leftPad(this.p2.getY().toBigInteger().toRadix(16), 64)) this.sm3c3.blockUpdate(yWords, 0, yWords.length) this.sm3c3.doFinal(c3, 0) this.reset() } createPoint(x, y) { const publicKey = '04' + x + y const point = _.getGlobalCurve().decodePointHex(publicKey) return point } } module.exports = SM2Cipher /***/ }), /***/ "a476": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// ASN.1 JavaScript decoder // Copyright (c) 2008-2022 Lapo Luchini // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function (require) { "use strict"; var Int10 = __webpack_require__("cb1f"), oids = __webpack_require__("699f"), ellipsis = "\u2026", reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/, reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/; function stringCut(str, len) { if (str.length > len) str = str.substring(0, len) + ellipsis; return str; } function Stream(enc, pos) { if (enc instanceof Stream) { this.enc = enc.enc; this.pos = enc.pos; } else { // enc should be an array or a binary string this.enc = enc; this.pos = pos; } } Stream.prototype.get = function (pos) { if (pos === undefined) pos = this.pos++; if (pos >= this.enc.length) throw 'Requesting byte offset ' + pos + ' on a stream of length ' + this.enc.length; return (typeof this.enc == "string") ? this.enc.charCodeAt(pos) : this.enc[pos]; }; Stream.prototype.hexDigits = "0123456789ABCDEF"; Stream.prototype.hexByte = function (b) { return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF); }; Stream.prototype.hexDump = function (start, end, raw) { var s = ""; for (var i = start; i < end; ++i) { s += this.hexByte(this.get(i)); if (raw !== true) switch (i & 0xF) { case 0x7: s += " "; break; case 0xF: s += "\n"; break; default: s += " "; } } return s; }; var b64Safe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; Stream.prototype.b64Dump = function (start, end) { var extra = (end - start) % 3, s = '', i, c; for (i = start; i + 2 < end; i += 3) { c = this.get(i) << 16 | this.get(i + 1) << 8 | this.get(i + 2); s += b64Safe.charAt(c >> 18 & 0x3F); s += b64Safe.charAt(c >> 12 & 0x3F); s += b64Safe.charAt(c >> 6 & 0x3F); s += b64Safe.charAt(c & 0x3F); } if (extra > 0) { c = this.get(i) << 16; if (extra > 1) c |= this.get(i + 1) << 8; s += b64Safe.charAt(c >> 18 & 0x3F); s += b64Safe.charAt(c >> 12 & 0x3F); if (extra == 2) s += b64Safe.charAt(c >> 6 & 0x3F); } return s; }; Stream.prototype.isASCII = function (start, end) { for (var i = start; i < end; ++i) { var c = this.get(i); if (c < 32 || c > 176) return false; } return true; }; Stream.prototype.parseStringISO = function (start, end, maxLength) { var s = ""; for (var i = start; i < end; ++i) s += String.fromCharCode(this.get(i)); return { size: s.length, str: stringCut(s, maxLength) }; }; var tableT61 = [ ['', ''], ['AEIOUaeiou', 'ÀÈÌÒÙàèìòù'], // Grave ['ACEILNORSUYZacegilnorsuyz', 'ÁĆÉÍĹŃÓŔŚÚÝŹáćéģíĺńóŕśúýź'], // Acute ['ACEGHIJOSUWYaceghijosuwy', 'ÂĈÊĜĤÎĴÔŜÛŴŶâĉêĝĥîĵôŝûŵŷ'], // Circumflex ['AINOUainou', 'ÃĨÑÕŨãĩñõũ'], // Tilde ['AEIOUaeiou', 'ĀĒĪŌŪāēīōū'], // Macron ['AGUagu', 'ĂĞŬăğŭ'], // Breve ['CEGIZcegz', 'ĊĖĠİŻċėġż'], // Dot ['AEIOUYaeiouy', 'ÄËÏÖÜŸäëïöüÿ'], // Umlaut or diæresis ['', ''], ['AUau', 'ÅŮåů'], // Ring ['CGKLNRSTcklnrst', 'ÇĢĶĻŅŖŞŢçķļņŗşţ'], // Cedilla ['', ''], ['OUou', 'ŐŰőű'], // Double Acute ['AEIUaeiu', 'ĄĘĮŲąęįų'], // Ogonek ['CDELNRSTZcdelnrstz', 'ČĎĚĽŇŘŠŤŽčďěľňřšťž'] // Caron ]; Stream.prototype.parseStringT61 = function (start, end, maxLength) { // warning: this code is not very well tested so far function merge(c, d) { var t = tableT61[c - 0xC0]; var i = t[0].indexOf(String.fromCharCode(d)); return (i < 0) ? '\0' : t[1].charAt(i); } var s = "", c; for (var i = start; i < end; ++i) { c = this.get(i); if (c >= 0xA4 && c <= 0xBF) s += '$¥#§¤\0\0«\0\0\0\0°±²³×µ¶·÷\0\0»¼½¾¿'.charAt(c - 0xA4); else if (c >= 0xE0 && c <= 0xFF) s += 'ΩÆÐªĦ\0IJĿŁØŒºÞŦŊʼnĸæđðħıijŀłøœßþŧŋ\0'.charAt(c - 0xE0); else if (c >= 0xC0 && c <= 0xCF) s += merge(c, this.get(++i)); else // using ISO 8859-1 for characters undefined (or equal) in T.61 s += String.fromCharCode(c); } return { size: s.length, str: stringCut(s, maxLength) }; }; Stream.prototype.parseStringUTF = function (start, end, maxLength) { function ex(c) { // must be 10xxxxxx if ((c < 0x80) || (c >= 0xC0)) throw new Error('Invalid UTF-8 continuation byte: ' + c); return (c & 0x3F); } function surrogate(cp) { if (cp < 0x10000) throw new Error('UTF-8 overlong encoding, codepoint encoded in 4 bytes: ' + cp); // we could use String.fromCodePoint(cp) but let's be nice to older browsers and use surrogate pairs cp -= 0x10000; return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00); } var s = ""; for (var i = start; i < end; ) { var c = this.get(i++); if (c < 0x80) // 0xxxxxxx (7 bit) s += String.fromCharCode(c); else if (c < 0xC0) throw new Error('Invalid UTF-8 starting byte: ' + c); else if (c < 0xE0) // 110xxxxx 10xxxxxx (11 bit) s += String.fromCharCode(((c & 0x1F) << 6) | ex(this.get(i++))); else if (c < 0xF0) // 1110xxxx 10xxxxxx 10xxxxxx (16 bit) s += String.fromCharCode(((c & 0x0F) << 12) | (ex(this.get(i++)) << 6) | ex(this.get(i++))); else if (c < 0xF8) // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx (21 bit) s += surrogate(((c & 0x07) << 18) | (ex(this.get(i++)) << 12) | (ex(this.get(i++)) << 6) | ex(this.get(i++))); else throw new Error('Invalid UTF-8 starting byte (since 2003 it is restricted to 4 bytes): ' + c); } return { size: s.length, str: stringCut(s, maxLength) }; }; Stream.prototype.parseStringBMP = function (start, end, maxLength) { var s = "", hi, lo; for (var i = start; i < end; ) { hi = this.get(i++); lo = this.get(i++); s += String.fromCharCode((hi << 8) | lo); } return { size: s.length, str: stringCut(s, maxLength) }; }; Stream.prototype.parseTime = function (start, end, shortYear) { var s = this.parseStringISO(start, end).str, m = (shortYear ? reTimeS : reTimeL).exec(s); if (!m) return "Unrecognized time: " + s; if (shortYear) { // to avoid querying the timer, use the fixed range [1970, 2069] // it will conform with ITU X.400 [-10, +40] sliding window until 2030 m[1] = +m[1]; m[1] += (m[1] < 70) ? 2000 : 1900; } s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4]; if (m[5]) { s += ":" + m[5]; if (m[6]) { s += ":" + m[6]; if (m[7]) s += "." + m[7]; } } if (m[8]) { s += " UTC"; if (m[9]) s += m[9] + ":" + (m[10] || "00"); } return s; }; Stream.prototype.parseInteger = function (start, end) { var v = this.get(start), neg = (v > 127), pad = neg ? 255 : 0, len, s = ''; // skip unuseful bits (not allowed in DER) while (v == pad && ++start < end) v = this.get(start); len = end - start; if (len === 0) return neg ? '-1' : '0'; // show bit length of huge integers if (len > 4) { s = v; len <<= 3; while (((s ^ pad) & 0x80) == 0) { s <<= 1; --len; } s = "(" + len + " bit)\n"; } // decode the integer if (neg) v = v - 256; var n = new Int10(v); for (var i = start + 1; i < end; ++i) n.mulAdd(256, this.get(i)); return s + n.toString(); }; Stream.prototype.parseBitString = function (start, end, maxLength) { var unusedBits = this.get(start); if (unusedBits > 7) throw 'Invalid BitString with unusedBits=' + unusedBits; var lenBit = ((end - start - 1) << 3) - unusedBits, s = ""; for (var i = start + 1; i < end; ++i) { var b = this.get(i), skip = (i == end - 1) ? unusedBits : 0; for (var j = 7; j >= skip; --j) s += (b >> j) & 1 ? "1" : "0"; if (s.length > maxLength) s = stringCut(s, maxLength); } return { size: lenBit, str: s }; }; function checkPrintable(s) { var i, v; for (i = 0; i < s.length; ++i) { v = s.charCodeAt(i); if (v < 32 && v != 9 && v != 10 && v != 13) // [\t\r\n] are (kinda) printable throw new Error('Unprintable character at index ' + i + ' (code ' + s.str.charCodeAt(i) + ")"); } } Stream.prototype.parseOctetString = function (start, end, maxLength) { var len = end - start, s; try { s = this.parseStringUTF(start, end, maxLength); checkPrintable(s.str); return { size: end - start, str: s.str }; } catch (e) { // ignore } maxLength /= 2; // we work in bytes if (len > maxLength) end = start + maxLength; s = ''; for (var i = start; i < end; ++i) s += this.hexByte(this.get(i)); if (len > maxLength) s += ellipsis; return { size: len, str: s }; }; Stream.prototype.parseOID = function (start, end, maxLength, isRelative) { var s = '', n = new Int10(), bits = 0; for (var i = start; i < end; ++i) { var v = this.get(i); n.mulAdd(128, v & 0x7F); bits += 7; if (!(v & 0x80)) { // finished if (s === '') { n = n.simplify(); if (isRelative) { s = (n instanceof Int10) ? n.toString() : "" + n; } else if (n instanceof Int10) { n.sub(80); s = "2." + n.toString(); } else { var m = n < 80 ? n < 40 ? 0 : 1 : 2; s = m + "." + (n - m * 40); } } else s += "." + n.toString(); if (s.length > maxLength) return stringCut(s, maxLength); n = new Int10(); bits = 0; } } if (bits > 0) s += ".incomplete"; if (typeof oids === 'object' && !isRelative) { var oid = oids[s]; if (oid) { if (oid.d) s += "\n" + oid.d; if (oid.c) s += "\n" + oid.c; if (oid.w) s += "\n(warning!)"; } } return s; }; Stream.prototype.parseRelativeOID = function (start, end, maxLength) { return this.parseOID(start, end, maxLength, true); }; function ASN1(stream, header, length, tag, tagLen, sub) { if (!(tag instanceof ASN1Tag)) throw 'Invalid tag value.'; this.stream = stream; this.header = header; this.length = length; this.tag = tag; this.tagLen = tagLen; this.sub = sub; } ASN1.prototype.typeName = function () { switch (this.tag.tagClass) { case 0: // universal switch (this.tag.tagNumber) { case 0x00: return "EOC"; case 0x01: return "BOOLEAN"; case 0x02: return "INTEGER"; case 0x03: return "BIT_STRING"; case 0x04: return "OCTET_STRING"; case 0x05: return "NULL"; case 0x06: return "OBJECT_IDENTIFIER"; case 0x07: return "ObjectDescriptor"; case 0x08: return "EXTERNAL"; case 0x09: return "REAL"; case 0x0A: return "ENUMERATED"; case 0x0B: return "EMBEDDED_PDV"; case 0x0C: return "UTF8String"; case 0x0D: return "RELATIVE_OID"; case 0x10: return "SEQUENCE"; case 0x11: return "SET"; case 0x12: return "NumericString"; case 0x13: return "PrintableString"; // ASCII subset case 0x14: return "TeletexString"; // aka T61String case 0x15: return "VideotexString"; case 0x16: return "IA5String"; // ASCII case 0x17: return "UTCTime"; case 0x18: return "GeneralizedTime"; case 0x19: return "GraphicString"; case 0x1A: return "VisibleString"; // ASCII subset case 0x1B: return "GeneralString"; case 0x1C: return "UniversalString"; case 0x1E: return "BMPString"; } return "Universal_" + this.tag.tagNumber.toString(); case 1: return "Application_" + this.tag.tagNumber.toString(); case 2: return "[" + this.tag.tagNumber.toString() + "]"; // Context case 3: return "Private_" + this.tag.tagNumber.toString(); } }; function recurse(el, parser, maxLength) { var avoidRecurse = true; if (el.tag.tagConstructed && el.sub) { avoidRecurse = false; el.sub.forEach(function (e1) { if (e1.tag.tagClass != el.tag.tagClass || e1.tag.tagNumber != el.tag.tagNumber) avoidRecurse = true; }); } if (avoidRecurse) return el.stream[parser](el.posContent(), el.posContent() + Math.abs(el.length), maxLength); var d = { size: 0, str: '' }; el.sub.forEach(function (el) { var d1 = recurse(el, parser, maxLength - d.str.length); d.size += d1.size; d.str += d1.str; }); return d; } /** A string preview of the content (intended for humans). */ ASN1.prototype.content = function (maxLength) { if (this.tag === undefined) return null; if (maxLength === undefined) maxLength = Infinity; var content = this.posContent(), len = Math.abs(this.length); if (!this.tag.isUniversal()) { if (this.sub !== null) return "(" + this.sub.length + " elem)"; var d1 = this.stream.parseOctetString(content, content + len, maxLength); return "(" + d1.size + " byte)\n" + d1.str; } switch (this.tag.tagNumber) { case 0x01: // BOOLEAN return (this.stream.get(content) === 0) ? "false" : "true"; case 0x02: // INTEGER return this.stream.parseInteger(content, content + len); case 0x03: // BIT_STRING var d = recurse(this, 'parseBitString', maxLength); return "(" + d.size + " bit)\n" + d.str; case 0x04: // OCTET_STRING d = recurse(this, 'parseOctetString', maxLength); return "(" + d.size + " byte)\n" + d.str; //case 0x05: // NULL case 0x06: // OBJECT_IDENTIFIER return this.stream.parseOID(content, content + len, maxLength); //case 0x07: // ObjectDescriptor //case 0x08: // EXTERNAL //case 0x09: // REAL case 0x0A: // ENUMERATED return this.stream.parseInteger(content, content + len); //case 0x0B: // EMBEDDED_PDV case 0x0D: // RELATIVE-OID return this.stream.parseRelativeOID(content, content + len, maxLength); case 0x10: // SEQUENCE case 0x11: // SET if (this.sub !== null) return "(" + this.sub.length + " elem)"; else return "(no elem)"; case 0x0C: // UTF8String return recurse(this, 'parseStringUTF', maxLength).str; case 0x14: // TeletexString return recurse(this, 'parseStringT61', maxLength).str; case 0x12: // NumericString case 0x13: // PrintableString case 0x15: // VideotexString case 0x16: // IA5String case 0x1A: // VisibleString case 0x1B: // GeneralString //case 0x19: // GraphicString //case 0x1C: // UniversalString return recurse(this, 'parseStringISO', maxLength).str; case 0x1E: // BMPString return recurse(this, 'parseStringBMP', maxLength).str; case 0x17: // UTCTime case 0x18: // GeneralizedTime return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17)); } return null; }; ASN1.prototype.toString = function () { return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? 'null' : this.sub.length) + "]"; }; ASN1.prototype.toPrettyString = function (indent) { if (indent === undefined) indent = ''; var s = indent + this.typeName() + " @" + this.stream.pos; if (this.length >= 0) s += "+"; s += this.length; if (this.tag.tagConstructed) s += " (constructed)"; else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) s += " (encapsulates)"; var content = this.content(); if (content) s += ": " + content.replace(/\n/g, '|'); s += "\n"; if (this.sub !== null) { indent += ' '; for (var i = 0, max = this.sub.length; i < max; ++i) s += this.sub[i].toPrettyString(indent); } return s; }; ASN1.prototype.posStart = function () { return this.stream.pos; }; ASN1.prototype.posContent = function () { return this.stream.pos + this.header; }; ASN1.prototype.posEnd = function () { return this.stream.pos + this.header + Math.abs(this.length); }; /** Position of the length. */ ASN1.prototype.posLen = function() { return this.stream.pos + this.tagLen; }; ASN1.prototype.toHexString = function () { return this.stream.hexDump(this.posStart(), this.posEnd(), true); }; ASN1.prototype.toB64String = function () { return this.stream.b64Dump(this.posStart(), this.posEnd()); }; ASN1.decodeLength = function (stream) { var buf = stream.get(), len = buf & 0x7F; if (len == buf) // first bit was 0, short form return len; if (len === 0) // long form with length 0 is a special case return null; // undefined length if (len > 6) // no reason to use Int10, as it would be a huge buffer anyways throw "Length over 48 bits not supported at position " + (stream.pos - 1); buf = 0; for (var i = 0; i < len; ++i) buf = (buf * 256) + stream.get(); return buf; }; function ASN1Tag(stream) { var buf = stream.get(); this.tagClass = buf >> 6; this.tagConstructed = ((buf & 0x20) !== 0); this.tagNumber = buf & 0x1F; if (this.tagNumber == 0x1F) { // long tag var n = new Int10(); do { buf = stream.get(); n.mulAdd(128, buf & 0x7F); } while (buf & 0x80); this.tagNumber = n.simplify(); } } ASN1Tag.prototype.isUniversal = function () { return this.tagClass === 0x00; }; ASN1Tag.prototype.isEOC = function () { return this.tagClass === 0x00 && this.tagNumber === 0x00; }; ASN1.decode = function (stream, offset) { if (!(stream instanceof Stream)) stream = new Stream(stream, offset || 0); var streamStart = new Stream(stream), tag = new ASN1Tag(stream), tagLen = stream.pos - streamStart.pos, len = ASN1.decodeLength(stream), start = stream.pos, header = start - streamStart.pos, sub = null, getSub = function () { sub = []; if (len !== null) { // definite length var end = start + len; if (end > stream.enc.length) throw 'Container at offset ' + start + ' has a length of ' + len + ', which is past the end of the stream'; while (stream.pos < end) sub[sub.length] = ASN1.decode(stream); if (stream.pos != end) throw 'Content size is not correct for container at offset ' + start; } else { // undefined length try { for (;;) { var s = ASN1.decode(stream); if (s.tag.isEOC()) break; sub[sub.length] = s; } len = start - stream.pos; // undefined lengths are represented as negative values } catch (e) { throw 'Exception while decoding undefined length content at offset ' + start + ': ' + e; } } }; if (tag.tagConstructed) { // must have valid content getSub(); } else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) { // sometimes BitString and OctetString are used to encapsulate ASN.1 try { if (tag.tagNumber == 0x03) if (stream.get() != 0) throw "BIT STRINGs with unused bits cannot encapsulate."; getSub(); for (var i = 0; i < sub.length; ++i) if (sub[i].tag.isEOC()) throw 'EOC is not supposed to be actual content.'; } catch (e) { // but silently ignore when they don't sub = null; //DEBUG console.log('Could not decode structure at ' + start + ':', e); } } if (sub === null) { if (len === null) throw "We can't skip over an invalid tag with undefined length at offset " + start; stream.pos = start + Math.abs(len); } return new ASN1(streamStart, header, len, tag, tagLen, sub); }; return ASN1; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), /***/ "a4d3": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's split to modules listed below __webpack_require__("d9f5"); __webpack_require__("b4f8"); __webpack_require__("c513"); __webpack_require__("e9c4"); __webpack_require__("5a47"); /***/ }), /***/ "a4e7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var isSupersetOf = __webpack_require__("395e"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var INCORRECT = !setMethodAcceptSetLike('isSupersetOf', function (result) { return !result; }); // `Set.prototype.isSupersetOf` method // https://tc39.es/ecma262/#sec-set.prototype.issupersetof $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { isSupersetOf: isSupersetOf }); /***/ }), /***/ "a5f7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var SetHelpers = __webpack_require__("cb27"); var clone = __webpack_require__("83b9"); var size = __webpack_require__("8e16"); var getSetRecord = __webpack_require__("7f65"); var iterateSet = __webpack_require__("384f"); var iterateSimple = __webpack_require__("5388"); var has = SetHelpers.has; var remove = SetHelpers.remove; // `Set.prototype.difference` method // https://tc39.es/ecma262/#sec-set.prototype.difference module.exports = function difference(other) { var O = aSet(this); var otherRec = getSetRecord(other); var result = clone(O); if (size(result) <= otherRec.size) iterateSet(result, function (e) { if (otherRec.includes(e)) remove(result, e); }); else iterateSimple(otherRec.getIterator(), function (e) { if (has(result, e)) remove(result, e); }); return result; }; /***/ }), /***/ "a630": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var from = __webpack_require__("4df4"); var checkCorrectnessOfIteration = __webpack_require__("1c7e"); var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { // eslint-disable-next-line es/no-array-from -- required for testing Array.from(iterable); }); // `Array.from` method // https://tc39.es/ecma262/#sec-array.from $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { from: from }); /***/ }), /***/ "a640": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); module.exports = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call -- required for testing method.call(null, argument || function () { return 1; }, 1); }); }; /***/ }), /***/ "a732": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var iterate = __webpack_require__("2266"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var getIteratorDirect = __webpack_require__("46c4"); var iteratorClose = __webpack_require__("2a62"); var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f"); var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError); // `Iterator.prototype.some` method // https://tc39.es/ecma262/#sec-iterator.prototype.some $({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, { some: function some(predicate) { anObject(this); try { aCallable(predicate); } catch (error) { iteratorClose(this, 'throw', error); } if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate); var record = getIteratorDirect(this); var counter = 0; return iterate(record, function (value, stop) { if (predicate(value, counter++)) return stop(); }, { IS_RECORD: true, INTERRUPTED: true }).stopped; } }); /***/ }), /***/ "a79d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var IS_PURE = __webpack_require__("c430"); var NativePromiseConstructor = __webpack_require__("d256"); var fails = __webpack_require__("d039"); var getBuiltIn = __webpack_require__("d066"); var isCallable = __webpack_require__("1626"); var speciesConstructor = __webpack_require__("4840"); var promiseResolve = __webpack_require__("cdf9"); var defineBuiltIn = __webpack_require__("cb2d"); var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829 var NON_GENERIC = !!NativePromiseConstructor && fails(function () { // eslint-disable-next-line unicorn/no-thenable -- required for testing NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ }); }); // `Promise.prototype.finally` method // https://tc39.es/ecma262/#sec-promise.prototype.finally $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, { 'finally': function (onFinally) { var C = speciesConstructor(this, getBuiltIn('Promise')); var isFunction = isCallable(onFinally); return this.then( isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally ); } }); // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then` if (!IS_PURE && isCallable(NativePromiseConstructor)) { var method = getBuiltIn('Promise').prototype['finally']; if (NativePromisePrototype['finally'] !== method) { defineBuiltIn(NativePromisePrototype, 'finally', method, { unsafe: true }); } } /***/ }), /***/ "a960": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("4fadc"); var path = __webpack_require__("428f"); module.exports = path.Object.entries; /***/ }), /***/ "a9c6": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ parseSesSignature; }); __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ digestCheckProcess; }); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js var es_array_push = __webpack_require__("14d9"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js var es_iterator_constructor = __webpack_require__("e9f5"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js var es_iterator_for_each = __webpack_require__("7d54"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.get-or-insert.js var es_map_get_or_insert = __webpack_require__("625a"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.get-or-insert-computed.js var es_map_get_or_insert_computed = __webpack_require__("fafb"); // EXTERNAL MODULE: ./node_modules/@lapo/asn1js/hex.js var hex = __webpack_require__("6f9c"); var hex_default = /*#__PURE__*/__webpack_require__.n(hex); // EXTERNAL MODULE: ./node_modules/@lapo/asn1js/base64.js var base64 = __webpack_require__("64c1"); var base64_default = /*#__PURE__*/__webpack_require__.n(base64); // EXTERNAL MODULE: ./node_modules/@lapo/asn1js/asn1.js var asn1js_asn1 = __webpack_require__("a476"); var asn1_default = /*#__PURE__*/__webpack_require__.n(asn1js_asn1); // EXTERNAL MODULE: ./node_modules/sm-crypto/src/index.js var src = __webpack_require__("8060"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js var es_array_reduce = __webpack_require__("13d5"); // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.reduce.js var es_iterator_reduce = __webpack_require__("9485"); // CONCATENATED MODULE: ./src/utils/ofd/sm3.js /** * 左补0到指定长度 */ function leftPad(input, num) { if (input.length >= num) return input; return new Array(num - input.length + 1).join('0') + input; } /** * 二进制转化为十六进制 */ function binary2hex(binary) { const binaryLength = 8; let hex = ''; for (let i = 0; i < binary.length / binaryLength; i++) { hex += leftPad(parseInt(binary.substr(i * binaryLength, binaryLength), 2).toString(16), 2); } return hex; } /** * 十六进制转化为二进制 */ function hex2binary(hex) { const hexLength = 2; let binary = ''; for (let i = 0; i < hex.length / hexLength; i++) { binary += leftPad(parseInt(hex.substr(i * hexLength, hexLength), 16).toString(2), 8); } return binary; } /** * 普通字符串转化为二进制 */ function str2binary(str) { let binary = ''; for (let i = 0, len = str.length; i < len; i++) { const ch = str[i]; binary += leftPad(ch.codePointAt(0).toString(2), 8); } return binary; } /** * 循环左移 */ function rol(str, n) { return str.substring(n % str.length) + str.substr(0, n % str.length); } /** * 二进制运算 */ function binaryCal(x, y, method) { const a = x || ''; const b = y || ''; const result = []; let prevResult; for (let i = a.length - 1; i >= 0; i--) { // 大端 prevResult = method(a[i], b[i], prevResult); result[i] = prevResult[0]; } return result.join(''); } /** * 二进制异或运算 */ function xor(x, y) { return binaryCal(x, y, (a, b) => [a === b ? '0' : '1']); } /** * 二进制与运算 */ function and(x, y) { return binaryCal(x, y, (a, b) => [a === '1' && b === '1' ? '1' : '0']); } /** * 二进制或运算 */ function or(x, y) { return binaryCal(x, y, (a, b) => [a === '1' || b === '1' ? '1' : '0']); // a === '0' && b === '0' ? '0' : '1' } /** * 二进制与运算 */ function add(x, y) { const result = binaryCal(x, y, (a, b, prevResult) => { const carry = prevResult ? prevResult[1] : '0' || false; // a,b不等时,carry不变,结果与carry相反 // a,b相等时,结果等于原carry,新carry等于a if (a !== b) return [carry === '0' ? '1' : '0', carry]; return [carry, a]; }); return result; } /** * 二进制非运算 */ function not(x) { return binaryCal(x, undefined, a => [a === '1' ? '0' : '1']); } function calMulti(method) { return (...arr) => arr.reduce((prev, curr) => method(prev, curr)); } /** * 压缩函数中的置换函数 P1(X) = X xor (X <<< 9) xor (X <<< 17) */ function P0(X) { return calMulti(xor)(X, rol(X, 9), rol(X, 17)); } /** * 消息扩展中的置换函数 P1(X) = X xor (X <<< 15) xor (X <<< 23) */ function P1(X) { return calMulti(xor)(X, rol(X, 15), rol(X, 23)); } function FF(X, Y, Z, j) { return j >= 0 && j <= 15 ? calMulti(xor)(X, Y, Z) : calMulti(or)(and(X, Y), and(X, Z), and(Y, Z)); } function GG(X, Y, Z, j) { return j >= 0 && j <= 15 ? calMulti(xor)(X, Y, Z) : or(and(X, Y), and(not(X), Z)); } function T(j) { return j >= 0 && j <= 15 ? hex2binary('79cc4519') : hex2binary('7a879d8a'); } /** * 压缩函数 */ function CF(V, Bi) { // 消息扩展 const wordLength = 32; const W = []; const M = []; // W' // 将消息分组B划分为16个字W0, W1,…… ,W15 (字为长度为32的比特串) for (let i = 0; i < 16; i++) { W.push(Bi.substr(i * wordLength, wordLength)); } // W[j] <- P1(W[j−16] xor W[j−9] xor (W[j−3] <<< 15)) xor (W[j−13] <<< 7) xor W[j−6] for (let j = 16; j < 68; j++) { W.push(calMulti(xor)(P1(calMulti(xor)(W[j - 16], W[j - 9], rol(W[j - 3], 15))), rol(W[j - 13], 7), W[j - 6])); } // W′[j] = W[j] xor W[j+4] for (let j = 0; j < 64; j++) { M.push(xor(W[j], W[j + 4])); } // 压缩 const wordRegister = []; // 字寄存器 for (let j = 0; j < 8; j++) { wordRegister.push(V.substr(j * wordLength, wordLength)); } let A = wordRegister[0]; let B = wordRegister[1]; let C = wordRegister[2]; let D = wordRegister[3]; let E = wordRegister[4]; let F = wordRegister[5]; let G = wordRegister[6]; let H = wordRegister[7]; // 中间变量 let SS1; let SS2; let TT1; let TT2; for (let j = 0; j < 64; j++) { SS1 = rol(calMulti(add)(rol(A, 12), E, rol(T(j), j)), 7); SS2 = xor(SS1, rol(A, 12)); TT1 = calMulti(add)(FF(A, B, C, j), D, SS2, M[j]); TT2 = calMulti(add)(GG(E, F, G, j), H, SS1, W[j]); D = C; C = rol(B, 9); B = A; A = TT1; H = G; G = rol(F, 19); F = E; E = P0(TT2); } return xor([A, B, C, D, E, F, G, H].join(''), V); } //export function sm3(str: string): string; function sm3(hexstr) { const binary = hex2binary(hexstr); // 填充 const len = binary.length; // k是满足len + 1 + k = 448mod512的最小的非负整数 let k = len % 512; // 如果 448 <= (512 % len) < 512,需要多补充 (len % 448) 比特'0'以满足总比特长度为512的倍数 k = k >= 448 ? 512 - k % 448 - 1 : 448 - k - 1; const m = `${binary}1${leftPad('', k)}${leftPad(len.toString(2), 64)}`.toString(); // k个0 // 迭代压缩 const n = (len + k + 65) / 512; let V = hex2binary('7380166f4914b2b9172442d7da8a0600a96f30bc163138aae38dee4db0fb0e4e'); for (let i = 0; i <= n - 1; i++) { const B = m.substr(512 * i, 512); V = CF(V, B); } return binary2hex(V); } // EXTERNAL MODULE: ./node_modules/js-md5/src/md5.js var md5 = __webpack_require__("8237"); var md5_default = /*#__PURE__*/__webpack_require__.n(md5); // EXTERNAL MODULE: ./node_modules/js-sha1/src/sha1.js var sha1 = __webpack_require__("6199"); var sha1_default = /*#__PURE__*/__webpack_require__.n(sha1); // EXTERNAL MODULE: ./node_modules/jsrsasign/lib/jsrsasign.js var jsrsasign = __webpack_require__("81fa"); var jsrsasign_default = /*#__PURE__*/__webpack_require__.n(jsrsasign); // EXTERNAL MODULE: ./src/utils/ofd/ofd_util.js var ofd_util = __webpack_require__("6b33"); // CONCATENATED MODULE: ./src/utils/ofd/verify_signature_util.js const digestByteArray = function (data, hashedBase64, checkMethod) { const hashedHex = Object(ofd_util["a" /* Uint8ArrayToHexString */])(base64_default.a.decode(hashedBase64)); checkMethod = checkMethod.toLowerCase(); if (checkMethod.indexOf("1.2.156.10197.1.401") >= 0 || checkMethod.indexOf("sm3") >= 0) { return hashedHex == sm3(Object(ofd_util["a" /* Uint8ArrayToHexString */])(data)); } else if (checkMethod.indexOf("md5") >= 0) { return hashedHex == md5_default()(data); } else if (checkMethod.indexOf("sha1") >= 0) { return hashedHex == sha1_default()(data); } else { return ""; } }; const SES_Signature_Verify = function (SES_Signature) { try { let signAlg = SES_Signature.realVersion < 4 ? SES_Signature.toSign.signatureAlgorithm : SES_Signature.signatureAlgID; signAlg = signAlg.toLowerCase(); const msg = SES_Signature.toSignDer; if (signAlg.indexOf("1.2.156.10197.1.501") >= 0 || signAlg.indexOf("sm2") >= 0) { let sigValueHex = SES_Signature.signature.replace(/ /g, '').replace(/\n/g, ''); if (sigValueHex.indexOf('00') == 0) { sigValueHex = sigValueHex.substr(2, sigValueHex.length - 2); } const cert = SES_Signature.realVersion < 4 ? SES_Signature.toSign.cert : SES_Signature.cert; let publicKey = cert.subjectPublicKeyInfo.subjectPublicKey.replace(/ /g, '').replace(/\n/g, ''); if (publicKey.indexOf('00') == 0) { publicKey = publicKey.substr(2, publicKey.length - 2); } return src["sm2"].doVerifySignature(msg, sigValueHex, publicKey, { der: true, hash: true, userId: "1234567812345678" }); } else { let sig = new jsrsasign_default.a.KJUR.crypto.Signature({ "alg": "SHA1withRSA" }); const cert = SES_Signature.realVersion < 4 ? SES_Signature.toSign.cert : SES_Signature.cert; let sigValueHex = SES_Signature.signature.replace(/ /g, '').replace(/\n/g, ''); if (sigValueHex.indexOf('00') == 0) { sigValueHex = sigValueHex.substr(2, sigValueHex.length - 2); } sig.init(cert); sig.updateHex(msg); return sig.verify(sigValueHex); } } catch (e) { console.log(e); return false; } }; // CONCATENATED MODULE: ./src/utils/ofd/ses_signature_parser.js /* * ofd.js - A Javascript class for reading and rendering ofd files * * * Copyright (c) 2020. DLTech21 All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ let reHex = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/; const parseSesSignature = async function (zip, name) { return new Promise((resolve, reject) => { zip.files[name].async('base64').then(function (bytes) { let res = decodeText(bytes); resolve(res); }, function error(e) { reject(e); }); }); }; const digestCheckProcess = function (arr) { let ret = true; for (const val of arr) { const value = digestByteArray(val.fileData, val.hashed, val.checkMethod); ret = ret && value; } return ret; }; const decodeText = function (val) { try { let der = reHex.test(val) ? hex_default.a.decode(val) : base64_default.a.unarmor(val); return decode(der); } catch (e) { console.log(e); return {}; } }; const decode = function (der, offset) { offset = offset || 0; try { const SES_Signature = decodeSES_Signature(der, offset); const type = SES_Signature.toSign.eseal.esealInfo.picture.type; const ofdArray = SES_Signature.toSign.eseal.esealInfo.picture.data.byte; return { ofdArray, 'type': (type.str || type).toLowerCase(), SES_Signature, 'verifyRet': SES_Signature_Verify(SES_Signature) }; } catch (e) { console.log(e); return {}; } }; const decodeUTCTime = function (str) { str = str.replace('Unrecognized time: ', ''); const UTC = str.indexOf('Z') > 0; str = str.replace('Z', ''); str = str.substr(0, 1) < '5' ? '20' + str : '19' + str; return str; }; const decodeSES_Signature = function (der, offset) { offset = offset || 0; let asn1 = asn1_default.a.decode(der, offset); var SES_Signature; try { var _asn1$sub$, _asn1$sub$2, _asn1$sub$3, _asn1$sub$4, _asn1$sub$5, _asn1$sub$6, _asn1$sub$7, _asn1$sub$8, _asn1$sub$9, _asn1$sub$0, _asn1$sub$1, _asn1$sub$10, _asn1$sub$11, _asn1$sub$12, _asn1$sub$13, _asn1$sub$14, _asn1$sub$15, _asn1$sub$16, _asn1$sub$17, _asn1$sub$18, _asn1$sub$19, _asn1$sub$20, _asn1$sub$21, _asn1$sub$22, _asn1$sub$23, _asn1$sub$24, _asn1$sub$25; //V1 V4分支判断 //V1 //Unrecognized time: const createDate = decodeUTCTime((_asn1$sub$ = asn1.sub[0]) === null || _asn1$sub$ === void 0 || (_asn1$sub$ = _asn1$sub$.sub[1]) === null || _asn1$sub$ === void 0 || (_asn1$sub$ = _asn1$sub$.sub[0]) === null || _asn1$sub$ === void 0 || (_asn1$sub$ = _asn1$sub$.sub[2]) === null || _asn1$sub$ === void 0 || (_asn1$sub$ = _asn1$sub$.sub[3]) === null || _asn1$sub$ === void 0 ? void 0 : _asn1$sub$.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[3].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[3].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[3].length)); const validStart = decodeUTCTime((_asn1$sub$2 = asn1.sub[0]) === null || _asn1$sub$2 === void 0 || (_asn1$sub$2 = _asn1$sub$2.sub[1]) === null || _asn1$sub$2 === void 0 || (_asn1$sub$2 = _asn1$sub$2.sub[0]) === null || _asn1$sub$2 === void 0 || (_asn1$sub$2 = _asn1$sub$2.sub[2]) === null || _asn1$sub$2 === void 0 || (_asn1$sub$2 = _asn1$sub$2.sub[4]) === null || _asn1$sub$2 === void 0 ? void 0 : _asn1$sub$2.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[4].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[4].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].length)); const validEnd = decodeUTCTime((_asn1$sub$3 = asn1.sub[0]) === null || _asn1$sub$3 === void 0 || (_asn1$sub$3 = _asn1$sub$3.sub[1]) === null || _asn1$sub$3 === void 0 || (_asn1$sub$3 = _asn1$sub$3.sub[0]) === null || _asn1$sub$3 === void 0 || (_asn1$sub$3 = _asn1$sub$3.sub[2]) === null || _asn1$sub$3 === void 0 || (_asn1$sub$3 = _asn1$sub$3.sub[5]) === null || _asn1$sub$3 === void 0 ? void 0 : _asn1$sub$3.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[5].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[5].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].length)); const timeInfo = decodeUTCTime((_asn1$sub$4 = asn1.sub[0]) === null || _asn1$sub$4 === void 0 || (_asn1$sub$4 = _asn1$sub$4.sub[2]) === null || _asn1$sub$4 === void 0 ? void 0 : _asn1$sub$4.stream.parseTime(asn1.sub[0].sub[2].stream.pos + asn1.sub[0].sub[2].header, asn1.sub[0].sub[2].stream.pos + asn1.sub[0].sub[2].header + asn1.sub[0].sub[2].length, false)); const asn1CertList = (_asn1$sub$5 = asn1.sub[0]) === null || _asn1$sub$5 === void 0 || (_asn1$sub$5 = _asn1$sub$5.sub[1]) === null || _asn1$sub$5 === void 0 || (_asn1$sub$5 = _asn1$sub$5.sub[0]) === null || _asn1$sub$5 === void 0 || (_asn1$sub$5 = _asn1$sub$5.sub[2]) === null || _asn1$sub$5 === void 0 ? void 0 : _asn1$sub$5.sub[2]; let certList = new Array(); if (asn1CertList) { asn1CertList.sub.forEach(asn1Cert => { certList.push(asn1Cert.stream.parseOctetString(asn1Cert.stream.pos + asn1Cert.header, asn1Cert.stream.pos + asn1Cert.header + asn1Cert.length)); }); } const asn1ExtDatas = (_asn1$sub$6 = asn1.sub[0]) === null || _asn1$sub$6 === void 0 || (_asn1$sub$6 = _asn1$sub$6.sub[1]) === null || _asn1$sub$6 === void 0 || (_asn1$sub$6 = _asn1$sub$6.sub[0]) === null || _asn1$sub$6 === void 0 ? void 0 : _asn1$sub$6.sub[4]; let extDatas = new Array(); if (asn1ExtDatas) { asn1ExtDatas.sub.forEach(asn1ExtData => { var _asn1ExtData$sub$, _asn1ExtData$sub$2, _asn1ExtData$sub$3; extDatas.push({ 'extnID': (_asn1ExtData$sub$ = asn1ExtData.sub[0]) === null || _asn1ExtData$sub$ === void 0 ? void 0 : _asn1ExtData$sub$.stream.parseOID(asn1ExtData.sub[0].stream.pos + asn1ExtData.sub[0].header, asn1ExtData.sub[0].stream.pos + asn1ExtData.sub[0].header + asn1ExtData.sub[0].length), 'critical': (_asn1ExtData$sub$2 = asn1ExtData.sub[1]) === null || _asn1ExtData$sub$2 === void 0 ? void 0 : _asn1ExtData$sub$2.stream.parseInteger(asn1ExtData.sub[1].stream.pos + asn1ExtData.sub[1].header, asn1ExtData.sub[1].stream.pos + asn1ExtData.sub[1].header + asn1ExtData.sub[1].length), 'extnValue': (_asn1ExtData$sub$3 = asn1ExtData.sub[2]) === null || _asn1ExtData$sub$3 === void 0 ? void 0 : _asn1ExtData$sub$3.stream.parseOctetString(asn1ExtData.sub[2].stream.pos + asn1ExtData.sub[2].header, asn1ExtData.sub[2].stream.pos + asn1ExtData.sub[2].header + asn1ExtData.sub[2].length) }); }); } //ASN1.decode(asn1.sub[0]?.sub[1]?.sub[0]?.sub[2]?.sub[3]); SES_Signature = { 'realVersion': 1, 'toSignDer': (_asn1$sub$7 = asn1.sub[0]) === null || _asn1$sub$7 === void 0 ? void 0 : _asn1$sub$7.stream.enc.subarray(asn1.sub[0].stream.pos, asn1.sub[0].stream.pos + asn1.sub[0].header + asn1.sub[0].length), 'toSign': { 'version': (_asn1$sub$8 = asn1.sub[0]) === null || _asn1$sub$8 === void 0 || (_asn1$sub$8 = _asn1$sub$8.sub[0]) === null || _asn1$sub$8 === void 0 ? void 0 : _asn1$sub$8.stream.parseInteger(asn1.sub[0].sub[0].stream.pos + asn1.sub[0].sub[0].header, asn1.sub[0].sub[0].stream.pos + asn1.sub[0].sub[0].header + asn1.sub[0].sub[0].length), 'eseal': { 'esealInfo': { 'header': { 'ID': (_asn1$sub$9 = asn1.sub[0]) === null || _asn1$sub$9 === void 0 || (_asn1$sub$9 = _asn1$sub$9.sub[1]) === null || _asn1$sub$9 === void 0 || (_asn1$sub$9 = _asn1$sub$9.sub[0]) === null || _asn1$sub$9 === void 0 || (_asn1$sub$9 = _asn1$sub$9.sub[0]) === null || _asn1$sub$9 === void 0 || (_asn1$sub$9 = _asn1$sub$9.sub[0]) === null || _asn1$sub$9 === void 0 ? void 0 : _asn1$sub$9.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[0].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].length), 'version': (_asn1$sub$0 = asn1.sub[0]) === null || _asn1$sub$0 === void 0 || (_asn1$sub$0 = _asn1$sub$0.sub[1]) === null || _asn1$sub$0 === void 0 || (_asn1$sub$0 = _asn1$sub$0.sub[0]) === null || _asn1$sub$0 === void 0 || (_asn1$sub$0 = _asn1$sub$0.sub[0]) === null || _asn1$sub$0 === void 0 || (_asn1$sub$0 = _asn1$sub$0.sub[1]) === null || _asn1$sub$0 === void 0 ? void 0 : _asn1$sub$0.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].length), 'Vid': (_asn1$sub$1 = asn1.sub[0]) === null || _asn1$sub$1 === void 0 || (_asn1$sub$1 = _asn1$sub$1.sub[1]) === null || _asn1$sub$1 === void 0 || (_asn1$sub$1 = _asn1$sub$1.sub[0]) === null || _asn1$sub$1 === void 0 || (_asn1$sub$1 = _asn1$sub$1.sub[0]) === null || _asn1$sub$1 === void 0 || (_asn1$sub$1 = _asn1$sub$1.sub[2]) === null || _asn1$sub$1 === void 0 ? void 0 : _asn1$sub$1.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[0].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].length) }, 'esID': (_asn1$sub$10 = asn1.sub[0]) === null || _asn1$sub$10 === void 0 || (_asn1$sub$10 = _asn1$sub$10.sub[1]) === null || _asn1$sub$10 === void 0 || (_asn1$sub$10 = _asn1$sub$10.sub[0]) === null || _asn1$sub$10 === void 0 || (_asn1$sub$10 = _asn1$sub$10.sub[1]) === null || _asn1$sub$10 === void 0 ? void 0 : _asn1$sub$10.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[1].length), 'property': { 'type': (_asn1$sub$11 = asn1.sub[0]) === null || _asn1$sub$11 === void 0 || (_asn1$sub$11 = _asn1$sub$11.sub[1]) === null || _asn1$sub$11 === void 0 || (_asn1$sub$11 = _asn1$sub$11.sub[0]) === null || _asn1$sub$11 === void 0 || (_asn1$sub$11 = _asn1$sub$11.sub[2]) === null || _asn1$sub$11 === void 0 || (_asn1$sub$11 = _asn1$sub$11.sub[0]) === null || _asn1$sub$11 === void 0 ? void 0 : _asn1$sub$11.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[2].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].length), 'name': (_asn1$sub$12 = asn1.sub[0]) === null || _asn1$sub$12 === void 0 || (_asn1$sub$12 = _asn1$sub$12.sub[1]) === null || _asn1$sub$12 === void 0 || (_asn1$sub$12 = _asn1$sub$12.sub[0]) === null || _asn1$sub$12 === void 0 || (_asn1$sub$12 = _asn1$sub$12.sub[2]) === null || _asn1$sub$12 === void 0 || (_asn1$sub$12 = _asn1$sub$12.sub[1]) === null || _asn1$sub$12 === void 0 ? void 0 : _asn1$sub$12.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[2].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].length), 'certList': certList, 'createDate': createDate, 'validStart': validStart, 'validEnd': validEnd }, 'picture': { 'type': (_asn1$sub$13 = asn1.sub[0]) === null || _asn1$sub$13 === void 0 || (_asn1$sub$13 = _asn1$sub$13.sub[1]) === null || _asn1$sub$13 === void 0 || (_asn1$sub$13 = _asn1$sub$13.sub[0]) === null || _asn1$sub$13 === void 0 || (_asn1$sub$13 = _asn1$sub$13.sub[3]) === null || _asn1$sub$13 === void 0 || (_asn1$sub$13 = _asn1$sub$13.sub[0]) === null || _asn1$sub$13 === void 0 ? void 0 : _asn1$sub$13.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[3].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].length), 'data': { 'hex': (_asn1$sub$14 = asn1.sub[0]) === null || _asn1$sub$14 === void 0 || (_asn1$sub$14 = _asn1$sub$14.sub[1]) === null || _asn1$sub$14 === void 0 || (_asn1$sub$14 = _asn1$sub$14.sub[0]) === null || _asn1$sub$14 === void 0 || (_asn1$sub$14 = _asn1$sub$14.sub[3]) === null || _asn1$sub$14 === void 0 || (_asn1$sub$14 = _asn1$sub$14.sub[1]) === null || _asn1$sub$14 === void 0 ? void 0 : _asn1$sub$14.stream.parseOctetString(asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].length), byte: (_asn1$sub$15 = asn1.sub[0]) === null || _asn1$sub$15 === void 0 || (_asn1$sub$15 = _asn1$sub$15.sub[1]) === null || _asn1$sub$15 === void 0 || (_asn1$sub$15 = _asn1$sub$15.sub[0]) === null || _asn1$sub$15 === void 0 || (_asn1$sub$15 = _asn1$sub$15.sub[3]) === null || _asn1$sub$15 === void 0 || (_asn1$sub$15 = _asn1$sub$15.sub[1]) === null || _asn1$sub$15 === void 0 ? void 0 : _asn1$sub$15.stream.enc.subarray(asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].length) }, 'width': (_asn1$sub$16 = asn1.sub[0]) === null || _asn1$sub$16 === void 0 || (_asn1$sub$16 = _asn1$sub$16.sub[1]) === null || _asn1$sub$16 === void 0 || (_asn1$sub$16 = _asn1$sub$16.sub[0]) === null || _asn1$sub$16 === void 0 || (_asn1$sub$16 = _asn1$sub$16.sub[3]) === null || _asn1$sub$16 === void 0 || (_asn1$sub$16 = _asn1$sub$16.sub[2]) === null || _asn1$sub$16 === void 0 ? void 0 : _asn1$sub$16.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[3].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].length), 'height': (_asn1$sub$17 = asn1.sub[0]) === null || _asn1$sub$17 === void 0 || (_asn1$sub$17 = _asn1$sub$17.sub[1]) === null || _asn1$sub$17 === void 0 || (_asn1$sub$17 = _asn1$sub$17.sub[0]) === null || _asn1$sub$17 === void 0 || (_asn1$sub$17 = _asn1$sub$17.sub[3]) === null || _asn1$sub$17 === void 0 || (_asn1$sub$17 = _asn1$sub$17.sub[3]) === null || _asn1$sub$17 === void 0 ? void 0 : _asn1$sub$17.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[3].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].length) }, 'extDatas': extDatas }, 'signInfo': { 'cert': decodeCert((_asn1$sub$18 = asn1.sub[0]) === null || _asn1$sub$18 === void 0 || (_asn1$sub$18 = _asn1$sub$18.sub[1]) === null || _asn1$sub$18 === void 0 || (_asn1$sub$18 = _asn1$sub$18.sub[1]) === null || _asn1$sub$18 === void 0 ? void 0 : _asn1$sub$18.sub[0]), 'signatureAlgorithm': (_asn1$sub$19 = asn1.sub[0]) === null || _asn1$sub$19 === void 0 || (_asn1$sub$19 = _asn1$sub$19.sub[1]) === null || _asn1$sub$19 === void 0 || (_asn1$sub$19 = _asn1$sub$19.sub[1]) === null || _asn1$sub$19 === void 0 || (_asn1$sub$19 = _asn1$sub$19.sub[1]) === null || _asn1$sub$19 === void 0 ? void 0 : _asn1$sub$19.stream.parseOID(asn1.sub[0].sub[1].sub[1].sub[1].stream.pos + asn1.sub[0].sub[1].sub[1].sub[1].header, asn1.sub[0].sub[1].sub[1].sub[1].stream.pos + asn1.sub[0].sub[1].sub[1].sub[1].header + asn1.sub[0].sub[1].sub[1].sub[1].length), 'signData': (_asn1$sub$20 = asn1.sub[0]) === null || _asn1$sub$20 === void 0 || (_asn1$sub$20 = _asn1$sub$20.sub[1]) === null || _asn1$sub$20 === void 0 || (_asn1$sub$20 = _asn1$sub$20.sub[1]) === null || _asn1$sub$20 === void 0 || (_asn1$sub$20 = _asn1$sub$20.sub[2]) === null || _asn1$sub$20 === void 0 ? void 0 : _asn1$sub$20.stream.hexDump(asn1.sub[0].sub[1].sub[1].sub[2].stream.pos + asn1.sub[0].sub[1].sub[1].sub[2].header, asn1.sub[0].sub[1].sub[1].sub[2].stream.pos + asn1.sub[0].sub[1].sub[1].sub[2].header + asn1.sub[0].sub[1].sub[1].sub[2].length, false) } }, 'timeInfo': timeInfo, 'dataHash': (_asn1$sub$21 = asn1.sub[0]) === null || _asn1$sub$21 === void 0 || (_asn1$sub$21 = _asn1$sub$21.sub[3]) === null || _asn1$sub$21 === void 0 ? void 0 : _asn1$sub$21.stream.hexDump(asn1.sub[0].sub[3].stream.pos + asn1.sub[0].sub[3].header, asn1.sub[0].sub[3].stream.pos + asn1.sub[0].sub[3].header + asn1.sub[0].sub[3].length, false), 'propertyInfo': (_asn1$sub$22 = asn1.sub[0]) === null || _asn1$sub$22 === void 0 || (_asn1$sub$22 = _asn1$sub$22.sub[4]) === null || _asn1$sub$22 === void 0 ? void 0 : _asn1$sub$22.stream.parseStringUTF(asn1.sub[0].sub[4].stream.pos + asn1.sub[0].sub[4].header, asn1.sub[0].sub[4].stream.pos + asn1.sub[0].sub[4].header + asn1.sub[0].sub[4].length), 'cert': decodeCert((_asn1$sub$23 = asn1.sub[0]) === null || _asn1$sub$23 === void 0 ? void 0 : _asn1$sub$23.sub[5]), 'signatureAlgorithm': (_asn1$sub$24 = asn1.sub[0]) === null || _asn1$sub$24 === void 0 || (_asn1$sub$24 = _asn1$sub$24.sub[6]) === null || _asn1$sub$24 === void 0 ? void 0 : _asn1$sub$24.stream.parseOID(asn1.sub[0].sub[6].stream.pos + asn1.sub[0].sub[6].header, asn1.sub[0].sub[6].stream.pos + asn1.sub[0].sub[6].header + asn1.sub[0].sub[6].length) }, 'signature': (_asn1$sub$25 = asn1.sub[1]) === null || _asn1$sub$25 === void 0 ? void 0 : _asn1$sub$25.stream.hexDump(asn1.sub[1].stream.pos + asn1.sub[1].header, asn1.sub[1].stream.pos + asn1.sub[1].header + asn1.sub[1].length, false) }; } catch (e) { try { var _asn1$sub$26, _asn1$sub$27, _asn1$sub$28, _asn1$sub$29, _asn1$sub$30, _asn1$sub$31, _asn1$sub$32, _asn1$sub$33, _asn1$sub$34, _asn1$sub$35, _asn1$sub$36, _asn1$sub$37, _asn1$sub$38, _asn1$sub$39, _asn1$sub$40, _asn1$sub$41, _asn1$sub$42, _asn1$sub$43, _asn1$sub$44, _asn1$sub$45, _asn1$sub$46, _asn1$sub$47, _asn1$sub$48, _asn1$sub$49, _asn1$sub$50, _asn1$sub$51, _asn1$sub$52; //V4 const certListType = (_asn1$sub$26 = asn1.sub[0]) === null || _asn1$sub$26 === void 0 || (_asn1$sub$26 = _asn1$sub$26.sub[1]) === null || _asn1$sub$26 === void 0 || (_asn1$sub$26 = _asn1$sub$26.sub[0]) === null || _asn1$sub$26 === void 0 || (_asn1$sub$26 = _asn1$sub$26.sub[2]) === null || _asn1$sub$26 === void 0 || (_asn1$sub$26 = _asn1$sub$26.sub[2]) === null || _asn1$sub$26 === void 0 ? void 0 : _asn1$sub$26.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[2].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[2].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[2].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[2].length); const asn1CertList = (_asn1$sub$27 = asn1.sub[0]) === null || _asn1$sub$27 === void 0 || (_asn1$sub$27 = _asn1$sub$27.sub[1]) === null || _asn1$sub$27 === void 0 || (_asn1$sub$27 = _asn1$sub$27.sub[0]) === null || _asn1$sub$27 === void 0 || (_asn1$sub$27 = _asn1$sub$27.sub[2]) === null || _asn1$sub$27 === void 0 ? void 0 : _asn1$sub$27.sub[3]; let certList = new Array(); if (asn1CertList) { asn1CertList.sub.forEach(asn1Cert => { certList.push(asn1Cert.stream.parseOctetString(asn1Cert.stream.pos + asn1Cert.header, asn1Cert.stream.pos + asn1Cert.header + asn1Cert.length)); }); } const asn1ExtDatas = (_asn1$sub$28 = asn1.sub[0]) === null || _asn1$sub$28 === void 0 || (_asn1$sub$28 = _asn1$sub$28.sub[1]) === null || _asn1$sub$28 === void 0 || (_asn1$sub$28 = _asn1$sub$28.sub[0]) === null || _asn1$sub$28 === void 0 ? void 0 : _asn1$sub$28.sub[4]; let extDatas = new Array(); if (asn1ExtDatas) { asn1ExtDatas.sub.forEach(asn1ExtData => { var _asn1ExtData$sub$4, _asn1ExtData$sub$5, _asn1ExtData$sub$6; extDatas.push({ 'extnID': (_asn1ExtData$sub$4 = asn1ExtData.sub[0]) === null || _asn1ExtData$sub$4 === void 0 ? void 0 : _asn1ExtData$sub$4.stream.parseOID(asn1ExtData.sub[0].stream.pos + asn1ExtData.sub[0].header, asn1ExtData.sub[0].stream.pos + asn1ExtData.sub[0].header + asn1ExtData.sub[0].length), 'critical': (_asn1ExtData$sub$5 = asn1ExtData.sub[1]) === null || _asn1ExtData$sub$5 === void 0 ? void 0 : _asn1ExtData$sub$5.stream.parseInteger(asn1ExtData.sub[1].stream.pos + asn1ExtData.sub[1].header, asn1ExtData.sub[1].stream.pos + asn1ExtData.sub[1].header + asn1ExtData.sub[1].length), 'extnValue': (_asn1ExtData$sub$6 = asn1ExtData.sub[2]) === null || _asn1ExtData$sub$6 === void 0 ? void 0 : _asn1ExtData$sub$6.stream.parseOctetString(asn1ExtData.sub[2].stream.pos + asn1ExtData.sub[2].header, asn1ExtData.sub[2].stream.pos + asn1ExtData.sub[2].header + asn1ExtData.sub[2].length) }); }); } SES_Signature = { 'realVersion': 4, 'toSignDer': (_asn1$sub$29 = asn1.sub[0]) === null || _asn1$sub$29 === void 0 ? void 0 : _asn1$sub$29.stream.enc.subarray(asn1.sub[0].stream.pos, asn1.sub[0].stream.pos + asn1.sub[0].header + asn1.sub[0].length), 'toSign': { 'version': (_asn1$sub$30 = asn1.sub[0]) === null || _asn1$sub$30 === void 0 || (_asn1$sub$30 = _asn1$sub$30.sub[0]) === null || _asn1$sub$30 === void 0 ? void 0 : _asn1$sub$30.stream.parseInteger(asn1.sub[0].sub[0].stream.pos + asn1.sub[0].sub[0].header, asn1.sub[0].sub[0].stream.pos + asn1.sub[0].sub[0].header + asn1.sub[0].sub[0].length), 'eseal': { 'esealInfo': { 'header': { 'ID': (_asn1$sub$31 = asn1.sub[0]) === null || _asn1$sub$31 === void 0 || (_asn1$sub$31 = _asn1$sub$31.sub[1]) === null || _asn1$sub$31 === void 0 || (_asn1$sub$31 = _asn1$sub$31.sub[0]) === null || _asn1$sub$31 === void 0 || (_asn1$sub$31 = _asn1$sub$31.sub[0]) === null || _asn1$sub$31 === void 0 || (_asn1$sub$31 = _asn1$sub$31.sub[0]) === null || _asn1$sub$31 === void 0 ? void 0 : _asn1$sub$31.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[0].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[0].length), 'version': (_asn1$sub$32 = asn1.sub[0]) === null || _asn1$sub$32 === void 0 || (_asn1$sub$32 = _asn1$sub$32.sub[1]) === null || _asn1$sub$32 === void 0 || (_asn1$sub$32 = _asn1$sub$32.sub[0]) === null || _asn1$sub$32 === void 0 || (_asn1$sub$32 = _asn1$sub$32.sub[0]) === null || _asn1$sub$32 === void 0 || (_asn1$sub$32 = _asn1$sub$32.sub[1]) === null || _asn1$sub$32 === void 0 ? void 0 : _asn1$sub$32.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[1].length), 'Vid': (_asn1$sub$33 = asn1.sub[0]) === null || _asn1$sub$33 === void 0 || (_asn1$sub$33 = _asn1$sub$33.sub[1]) === null || _asn1$sub$33 === void 0 || (_asn1$sub$33 = _asn1$sub$33.sub[0]) === null || _asn1$sub$33 === void 0 || (_asn1$sub$33 = _asn1$sub$33.sub[0]) === null || _asn1$sub$33 === void 0 || (_asn1$sub$33 = _asn1$sub$33.sub[2]) === null || _asn1$sub$33 === void 0 ? void 0 : _asn1$sub$33.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[0].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].header, asn1.sub[0].sub[1].sub[0].sub[0].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].header + asn1.sub[0].sub[1].sub[0].sub[0].sub[2].length) }, 'esID': (_asn1$sub$34 = asn1.sub[0]) === null || _asn1$sub$34 === void 0 || (_asn1$sub$34 = _asn1$sub$34.sub[1]) === null || _asn1$sub$34 === void 0 || (_asn1$sub$34 = _asn1$sub$34.sub[0]) === null || _asn1$sub$34 === void 0 || (_asn1$sub$34 = _asn1$sub$34.sub[1]) === null || _asn1$sub$34 === void 0 ? void 0 : _asn1$sub$34.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[1].length), 'property': { 'type': (_asn1$sub$35 = asn1.sub[0]) === null || _asn1$sub$35 === void 0 || (_asn1$sub$35 = _asn1$sub$35.sub[1]) === null || _asn1$sub$35 === void 0 || (_asn1$sub$35 = _asn1$sub$35.sub[0]) === null || _asn1$sub$35 === void 0 || (_asn1$sub$35 = _asn1$sub$35.sub[2]) === null || _asn1$sub$35 === void 0 || (_asn1$sub$35 = _asn1$sub$35.sub[0]) === null || _asn1$sub$35 === void 0 ? void 0 : _asn1$sub$35.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[2].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[0].length), 'name': (_asn1$sub$36 = asn1.sub[0]) === null || _asn1$sub$36 === void 0 || (_asn1$sub$36 = _asn1$sub$36.sub[1]) === null || _asn1$sub$36 === void 0 || (_asn1$sub$36 = _asn1$sub$36.sub[0]) === null || _asn1$sub$36 === void 0 || (_asn1$sub$36 = _asn1$sub$36.sub[2]) === null || _asn1$sub$36 === void 0 || (_asn1$sub$36 = _asn1$sub$36.sub[1]) === null || _asn1$sub$36 === void 0 ? void 0 : _asn1$sub$36.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[2].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[1].length), 'certListType': certListType, 'certList': certList, 'createDate': (_asn1$sub$37 = asn1.sub[0]) === null || _asn1$sub$37 === void 0 || (_asn1$sub$37 = _asn1$sub$37.sub[1]) === null || _asn1$sub$37 === void 0 || (_asn1$sub$37 = _asn1$sub$37.sub[0]) === null || _asn1$sub$37 === void 0 || (_asn1$sub$37 = _asn1$sub$37.sub[2]) === null || _asn1$sub$37 === void 0 || (_asn1$sub$37 = _asn1$sub$37.sub[4]) === null || _asn1$sub$37 === void 0 ? void 0 : _asn1$sub$37.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[4].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[4].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[4].length), 'validStart': (_asn1$sub$38 = asn1.sub[0]) === null || _asn1$sub$38 === void 0 || (_asn1$sub$38 = _asn1$sub$38.sub[1]) === null || _asn1$sub$38 === void 0 || (_asn1$sub$38 = _asn1$sub$38.sub[0]) === null || _asn1$sub$38 === void 0 || (_asn1$sub$38 = _asn1$sub$38.sub[2]) === null || _asn1$sub$38 === void 0 || (_asn1$sub$38 = _asn1$sub$38.sub[5]) === null || _asn1$sub$38 === void 0 ? void 0 : _asn1$sub$38.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[5].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[5].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[5].length), 'validEnd': (_asn1$sub$39 = asn1.sub[0]) === null || _asn1$sub$39 === void 0 || (_asn1$sub$39 = _asn1$sub$39.sub[1]) === null || _asn1$sub$39 === void 0 || (_asn1$sub$39 = _asn1$sub$39.sub[0]) === null || _asn1$sub$39 === void 0 || (_asn1$sub$39 = _asn1$sub$39.sub[2]) === null || _asn1$sub$39 === void 0 || (_asn1$sub$39 = _asn1$sub$39.sub[6]) === null || _asn1$sub$39 === void 0 ? void 0 : _asn1$sub$39.stream.parseTime(asn1.sub[0].sub[1].sub[0].sub[2].sub[6].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[6].header, asn1.sub[0].sub[1].sub[0].sub[2].sub[6].stream.pos + asn1.sub[0].sub[1].sub[0].sub[2].sub[6].header + asn1.sub[0].sub[1].sub[0].sub[2].sub[6].length) }, 'picture': { 'type': (_asn1$sub$40 = asn1.sub[0]) === null || _asn1$sub$40 === void 0 || (_asn1$sub$40 = _asn1$sub$40.sub[1]) === null || _asn1$sub$40 === void 0 || (_asn1$sub$40 = _asn1$sub$40.sub[0]) === null || _asn1$sub$40 === void 0 || (_asn1$sub$40 = _asn1$sub$40.sub[3]) === null || _asn1$sub$40 === void 0 || (_asn1$sub$40 = _asn1$sub$40.sub[0]) === null || _asn1$sub$40 === void 0 ? void 0 : _asn1$sub$40.stream.parseStringUTF(asn1.sub[0].sub[1].sub[0].sub[3].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[0].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[0].length), 'data': { 'hex': (_asn1$sub$41 = asn1.sub[0]) === null || _asn1$sub$41 === void 0 || (_asn1$sub$41 = _asn1$sub$41.sub[1]) === null || _asn1$sub$41 === void 0 || (_asn1$sub$41 = _asn1$sub$41.sub[0]) === null || _asn1$sub$41 === void 0 || (_asn1$sub$41 = _asn1$sub$41.sub[3]) === null || _asn1$sub$41 === void 0 || (_asn1$sub$41 = _asn1$sub$41.sub[1]) === null || _asn1$sub$41 === void 0 ? void 0 : _asn1$sub$41.stream.parseOctetString(asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].length), byte: (_asn1$sub$42 = asn1.sub[0]) === null || _asn1$sub$42 === void 0 || (_asn1$sub$42 = _asn1$sub$42.sub[1]) === null || _asn1$sub$42 === void 0 || (_asn1$sub$42 = _asn1$sub$42.sub[0]) === null || _asn1$sub$42 === void 0 || (_asn1$sub$42 = _asn1$sub$42.sub[3]) === null || _asn1$sub$42 === void 0 || (_asn1$sub$42 = _asn1$sub$42.sub[1]) === null || _asn1$sub$42 === void 0 ? void 0 : _asn1$sub$42.stream.enc.subarray(asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[1].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[1].length) }, 'width': (_asn1$sub$43 = asn1.sub[0]) === null || _asn1$sub$43 === void 0 || (_asn1$sub$43 = _asn1$sub$43.sub[1]) === null || _asn1$sub$43 === void 0 || (_asn1$sub$43 = _asn1$sub$43.sub[0]) === null || _asn1$sub$43 === void 0 || (_asn1$sub$43 = _asn1$sub$43.sub[3]) === null || _asn1$sub$43 === void 0 || (_asn1$sub$43 = _asn1$sub$43.sub[2]) === null || _asn1$sub$43 === void 0 ? void 0 : _asn1$sub$43.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[3].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[2].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[2].length), 'height': (_asn1$sub$44 = asn1.sub[0]) === null || _asn1$sub$44 === void 0 || (_asn1$sub$44 = _asn1$sub$44.sub[1]) === null || _asn1$sub$44 === void 0 || (_asn1$sub$44 = _asn1$sub$44.sub[0]) === null || _asn1$sub$44 === void 0 || (_asn1$sub$44 = _asn1$sub$44.sub[3]) === null || _asn1$sub$44 === void 0 || (_asn1$sub$44 = _asn1$sub$44.sub[3]) === null || _asn1$sub$44 === void 0 ? void 0 : _asn1$sub$44.stream.parseInteger(asn1.sub[0].sub[1].sub[0].sub[3].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].header, asn1.sub[0].sub[1].sub[0].sub[3].sub[3].stream.pos + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].header + asn1.sub[0].sub[1].sub[0].sub[3].sub[3].length) }, 'extDatas': extDatas }, 'cert': decodeCert((_asn1$sub$45 = asn1.sub[0]) === null || _asn1$sub$45 === void 0 || (_asn1$sub$45 = _asn1$sub$45.sub[1]) === null || _asn1$sub$45 === void 0 ? void 0 : _asn1$sub$45.sub[1]), 'signAlgID': (_asn1$sub$46 = asn1.sub[0]) === null || _asn1$sub$46 === void 0 || (_asn1$sub$46 = _asn1$sub$46.sub[1]) === null || _asn1$sub$46 === void 0 || (_asn1$sub$46 = _asn1$sub$46.sub[2]) === null || _asn1$sub$46 === void 0 ? void 0 : _asn1$sub$46.stream.parseOID(asn1.sub[0].sub[1].sub[2].stream.pos + asn1.sub[0].sub[1].sub[2].header, asn1.sub[0].sub[1].sub[2].stream.pos + asn1.sub[0].sub[1].sub[2].header + asn1.sub[0].sub[1].sub[2].length), 'signedValue': (_asn1$sub$47 = asn1.sub[0]) === null || _asn1$sub$47 === void 0 || (_asn1$sub$47 = _asn1$sub$47.sub[1]) === null || _asn1$sub$47 === void 0 || (_asn1$sub$47 = _asn1$sub$47.sub[3]) === null || _asn1$sub$47 === void 0 ? void 0 : _asn1$sub$47.stream.hexDump(asn1.sub[0].sub[1].sub[3].stream.pos + asn1.sub[0].sub[1].sub[3].header, asn1.sub[0].sub[1].sub[3].stream.pos + asn1.sub[0].sub[1].sub[3].header + asn1.sub[0].sub[1].sub[3].length, false) }, 'timeInfo': (_asn1$sub$48 = asn1.sub[0]) === null || _asn1$sub$48 === void 0 || (_asn1$sub$48 = _asn1$sub$48.sub[2]) === null || _asn1$sub$48 === void 0 ? void 0 : _asn1$sub$48.stream.parseTime(asn1.sub[0].sub[2].stream.pos + asn1.sub[0].sub[2].header, asn1.sub[0].sub[2].stream.pos + asn1.sub[0].sub[2].header + asn1.sub[0].sub[2].length, false), 'dataHash': (_asn1$sub$49 = asn1.sub[0]) === null || _asn1$sub$49 === void 0 || (_asn1$sub$49 = _asn1$sub$49.sub[3]) === null || _asn1$sub$49 === void 0 ? void 0 : _asn1$sub$49.stream.hexDump(asn1.sub[0].sub[3].stream.pos + asn1.sub[0].sub[3].header, asn1.sub[0].sub[3].stream.pos + asn1.sub[0].sub[3].header + asn1.sub[0].sub[3].length, false), 'propertyInfo': Uint8ArrayToString(asn1.sub[0].sub[4]) }, 'cert': decodeCert(asn1.sub[1]), 'signatureAlgID': (_asn1$sub$50 = asn1.sub[2]) === null || _asn1$sub$50 === void 0 ? void 0 : _asn1$sub$50.stream.parseOID(asn1.sub[2].stream.pos + asn1.sub[2].header, asn1.sub[2].stream.pos + asn1.sub[2].header + asn1.sub[2].length), 'signature': (_asn1$sub$51 = asn1.sub[3]) === null || _asn1$sub$51 === void 0 ? void 0 : _asn1$sub$51.stream.hexDump(asn1.sub[3].stream.pos + asn1.sub[3].header, asn1.sub[3].stream.pos + asn1.sub[3].header + asn1.sub[3].length, false), 'timpStamp': (_asn1$sub$52 = asn1.sub[4]) === null || _asn1$sub$52 === void 0 ? void 0 : _asn1$sub$52.stream.parseTime(asn1.sub[4].stream.pos + asn1.sub[4].header, asn1.sub[4].stream.pos + asn1.sub[4].header + asn1.sub[4].length) }; } catch (e) { console.log(e); SES_Signature = {}; } } return SES_Signature; }; const decodeCert = function (asn1, offset) { offset = offset || 0; try { var _asn1PublicKeyInfo$su, _asn1PublicKeyInfo$su2; const asn1Subject = asn1.sub[0].sub[0].sub[5]; let subject = new Map(); asn1Subject.sub.forEach(element => { var _element$sub$0$sub$; const key = element.sub[0].sub[0].content().split('\n')[0]; const value = (_element$sub$0$sub$ = element.sub[0].sub[1]) === null || _element$sub$0$sub$ === void 0 ? void 0 : _element$sub$0$sub$.stream.parseStringUTF(element.sub[0].sub[1].stream.pos + element.sub[0].sub[1].header, element.sub[0].sub[1].stream.pos + element.sub[0].sub[1].header + element.sub[0].sub[1].length); subject.set(key, value); }); const asn1PublicKeyInfo = asn1.sub[0].sub[0].sub[6]; return { subject, 'commonName': subject.get("2.5.4.3"), 'subjectPublicKeyInfo': { 'algorithm': (_asn1PublicKeyInfo$su = asn1PublicKeyInfo.sub[0]) === null || _asn1PublicKeyInfo$su === void 0 ? void 0 : _asn1PublicKeyInfo$su.stream.parseOID(asn1PublicKeyInfo.sub[0].stream.pos + asn1PublicKeyInfo.sub[0].header, asn1PublicKeyInfo.sub[0].stream.pos + asn1PublicKeyInfo.sub[0].header + asn1PublicKeyInfo.sub[0].length), 'subjectPublicKey': (_asn1PublicKeyInfo$su2 = asn1PublicKeyInfo.sub[1]) === null || _asn1PublicKeyInfo$su2 === void 0 ? void 0 : _asn1PublicKeyInfo$su2.stream.hexDump(asn1PublicKeyInfo.sub[1].stream.pos + asn1PublicKeyInfo.sub[1].header, asn1PublicKeyInfo.sub[1].stream.pos + asn1PublicKeyInfo.sub[1].header + asn1PublicKeyInfo.sub[1].length) } }; } catch (e) { console.log(e); return {}; } }; const Uint8ArrayToString = function (fileData) { let dataString = ""; for (let i = 0; i < fileData.length; i++) { dataString += String.fromCharCode(fileData[i]); } return dataString; }; /***/ }), /***/ "ab13": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var MATCH = wellKnownSymbol('match'); module.exports = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; /***/ }), /***/ "ab36": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var createNonEnumerableProperty = __webpack_require__("9112"); // `InstallErrorCause` abstract operation // https://tc39.es/ecma262/#sec-installerrorcause module.exports = function (O, options) { if (isObject(options) && 'cause' in options) { createNonEnumerableProperty(O, 'cause', options.cause); } }; /***/ }), /***/ "ab43": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var getIteratorDirect = __webpack_require__("46c4"); var createIteratorProxy = __webpack_require__("c5cc"); var callWithSafeIterationClosing = __webpack_require__("9bdd"); var iteratorClose = __webpack_require__("2a62"); var iteratorHelperThrowsOnInvalidIterator = __webpack_require__("2baa"); var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f"); var IS_PURE = __webpack_require__("c430"); var MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR = !IS_PURE && !iteratorHelperThrowsOnInvalidIterator('map', function () { /* empty */ }); var mapWithoutClosingOnEarlyError = !IS_PURE && !MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR && iteratorHelperWithoutClosingOnEarlyError('map', TypeError); var FORCED = IS_PURE || MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarlyError; var IteratorProxy = createIteratorProxy(function () { var iterator = this.iterator; var result = anObject(call(this.next, iterator)); var done = this.done = !!result.done; if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true); }); // `Iterator.prototype.map` method // https://tc39.es/ecma262/#sec-iterator.prototype.map $({ target: 'Iterator', proto: true, real: true, forced: FORCED }, { map: function map(mapper) { anObject(this); try { aCallable(mapper); } catch (error) { iteratorClose(this, 'throw', error); } if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper); return new IteratorProxy(getIteratorDirect(this), { mapper: mapper }); } }); /***/ }), /***/ "acac": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var defineBuiltIns = __webpack_require__("6964"); var getWeakData = __webpack_require__("f183").getWeakData; var anInstance = __webpack_require__("19aa"); var anObject = __webpack_require__("825a"); var isNullOrUndefined = __webpack_require__("7234"); var isObject = __webpack_require__("861d"); var iterate = __webpack_require__("2266"); var ArrayIterationModule = __webpack_require__("b727"); var hasOwn = __webpack_require__("1a2d"); var InternalStateModule = __webpack_require__("69f3"); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; var find = ArrayIterationModule.find; var findIndex = ArrayIterationModule.findIndex; var splice = uncurryThis([].splice); var id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function (state) { return state.frozen || (state.frozen = new UncaughtFrozenStore()); }; var UncaughtFrozenStore = function () { this.entries = []; }; var findUncaughtFrozen = function (store, key) { return find(store.entries, function (it) { return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function (key) { var entry = findUncaughtFrozen(this, key); if (entry) return entry[1]; }, has: function (key) { return !!findUncaughtFrozen(this, key); }, set: function (key, value) { var entry = findUncaughtFrozen(this, key); if (entry) entry[1] = value; else this.entries.push([key, value]); }, 'delete': function (key) { var index = findIndex(this.entries, function (it) { return it[0] === key; }); if (~index) splice(this.entries, index, 1); return !!~index; } }; module.exports = { getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var Constructor = wrapper(function (that, iterable) { anInstance(that, Prototype); setInternalState(that, { type: CONSTRUCTOR_NAME, id: id++, frozen: null }); if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var Prototype = Constructor.prototype; var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function (that, key, value) { var state = getInternalState(that); var data = getWeakData(anObject(key), true); if (data === true) uncaughtFrozenStore(state).set(key, value); else data[state.id] = value; return that; }; defineBuiltIns(Prototype, { // `{ WeakMap, WeakSet }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-weakmap.prototype.delete // https://tc39.es/ecma262/#sec-weakset.prototype.delete 'delete': function (key) { var state = getInternalState(this); if (!isObject(key)) return false; var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state)['delete'](key); return data && hasOwn(data, state.id) && delete data[state.id]; }, // `{ WeakMap, WeakSet }.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-weakmap.prototype.has // https://tc39.es/ecma262/#sec-weakset.prototype.has has: function has(key) { var state = getInternalState(this); if (!isObject(key)) return false; var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state).has(key); return data && hasOwn(data, state.id); } }); defineBuiltIns(Prototype, IS_MAP ? { // `WeakMap.prototype.get(key)` method // https://tc39.es/ecma262/#sec-weakmap.prototype.get get: function get(key) { var state = getInternalState(this); if (isObject(key)) { var data = getWeakData(key); if (data === true) return uncaughtFrozenStore(state).get(key); if (data) return data[state.id]; } }, // `WeakMap.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-weakmap.prototype.set set: function set(key, value) { return define(this, key, value); } } : { // `WeakSet.prototype.add(value)` method // https://tc39.es/ecma262/#sec-weakset.prototype.add add: function add(value) { return define(this, value, true); } }); return Constructor; } }; /***/ }), /***/ "ad63": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("e260"); __webpack_require__("d3b7"); __webpack_require__("10d1"); __webpack_require__("1296"); __webpack_require__("97c7"); var path = __webpack_require__("428f"); module.exports = path.WeakMap; /***/ }), /***/ "adc3": /***/ (function(module, exports, __webpack_require__) { "use strict"; const util = __webpack_require__("90da"); const defaultOptions = { allowBooleanAttributes: false, //A tag can have attributes without any value }; const props = ['allowBooleanAttributes']; //const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); exports.validate = function (xmlData, options) { options = util.buildOptions(options, defaultOptions, props); //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE const tags = []; let tagFound = false; //indicates that the root tag has been closed (aka. depth 0 has been reached) let reachedRoot = false; if (xmlData[0] === '\ufeff') { // check for byte order mark (BOM) xmlData = xmlData.substr(1); } for (let i = 0; i < xmlData.length; i++) { if (xmlData[i] === '<') { //starting of tag //read until you reach to '>' avoiding any '>' in attribute value i++; if (xmlData[i] === '?') { i = readPI(xmlData, ++i); if (i.err) { return i; } } else if (xmlData[i] === '!') { i = readCommentAndCDATA(xmlData, i); continue; } else { let closingTag = false; if (xmlData[i] === '/') { //closing tag closingTag = true; i++; } //read tagname let tagName = ''; for (; i < xmlData.length && xmlData[i] !== '>' && xmlData[i] !== ' ' && xmlData[i] !== '\t' && xmlData[i] !== '\n' && xmlData[i] !== '\r'; i++ ) { tagName += xmlData[i]; } tagName = tagName.trim(); //console.log(tagName); if (tagName[tagName.length - 1] === '/') { //self closing tag without attributes tagName = tagName.substring(0, tagName.length - 1); //continue; i--; } if (!validateTagName(tagName)) { let msg; if (tagName.trim().length === 0) { msg = "There is an unnecessary space between tag name and backward slash ' 0) { return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, i)); } else { const otg = tags.pop(); if (tagName !== otg) { return getErrorObject('InvalidTag', "Closing tag '"+otg+"' is expected inplace of '"+tagName+"'.", getLineNumberForPosition(xmlData, i)); } //when there are no more tags, we reached the root level. if (tags.length == 0) { reachedRoot = true; } } } else { const isValid = validateAttributeString(attrStr, options); if (isValid !== true) { //the result from the nested function returns the position of the error within the attribute //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute //this gives us the absolute index in the entire xml, which we can use to find the line at last return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); } //if the root level has been reached before ... if (reachedRoot === true) { return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); } else { tags.push(tagName); } tagFound = true; } //skip tag text value //It may include comments and CDATA value for (i++; i < xmlData.length; i++) { if (xmlData[i] === '<') { if (xmlData[i + 1] === '!') { //comment or CADATA i++; i = readCommentAndCDATA(xmlData, i); continue; } else { break; } } else if (xmlData[i] === '&') { const afterAmp = validateAmpersand(xmlData, i); if (afterAmp == -1) return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); i = afterAmp; } } //end of reading tag text value if (xmlData[i] === '<') { i--; } } } else { if (xmlData[i] === ' ' || xmlData[i] === '\t' || xmlData[i] === '\n' || xmlData[i] === '\r') { continue; } return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); } } if (!tagFound) { return getErrorObject('InvalidXml', 'Start tag expected.', 1); } else if (tags.length > 0) { return getErrorObject('InvalidXml', "Invalid '"+JSON.stringify(tags, null, 4).replace(/\r?\n/g, '')+"' found.", 1); } return true; }; /** * Read Processing insstructions and skip * @param {*} xmlData * @param {*} i */ function readPI(xmlData, i) { var start = i; for (; i < xmlData.length; i++) { if (xmlData[i] == '?' || xmlData[i] == ' ') { //tagname var tagname = xmlData.substr(start, i - start); if (i > 5 && tagname === 'xml') { return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { //check if valid attribut string i++; break; } else { continue; } } } return i; } function readCommentAndCDATA(xmlData, i) { if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { //comment for (i += 3; i < xmlData.length; i++) { if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { i += 2; break; } } } else if ( xmlData.length > i + 8 && xmlData[i + 1] === 'D' && xmlData[i + 2] === 'O' && xmlData[i + 3] === 'C' && xmlData[i + 4] === 'T' && xmlData[i + 5] === 'Y' && xmlData[i + 6] === 'P' && xmlData[i + 7] === 'E' ) { let angleBracketsCount = 1; for (i += 8; i < xmlData.length; i++) { if (xmlData[i] === '<') { angleBracketsCount++; } else if (xmlData[i] === '>') { angleBracketsCount--; if (angleBracketsCount === 0) { break; } } } } else if ( xmlData.length > i + 9 && xmlData[i + 1] === '[' && xmlData[i + 2] === 'C' && xmlData[i + 3] === 'D' && xmlData[i + 4] === 'A' && xmlData[i + 5] === 'T' && xmlData[i + 6] === 'A' && xmlData[i + 7] === '[' ) { for (i += 8; i < xmlData.length; i++) { if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { i += 2; break; } } } return i; } var doubleQuote = '"'; var singleQuote = "'"; /** * Keep reading xmlData until '<' is found outside the attribute value. * @param {string} xmlData * @param {number} i */ function readAttributeStr(xmlData, i) { let attrStr = ''; let startChar = ''; let tagClosed = false; for (; i < xmlData.length; i++) { if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { if (startChar === '') { startChar = xmlData[i]; } else if (startChar !== xmlData[i]) { //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa continue; } else { startChar = ''; } } else if (xmlData[i] === '>') { if (startChar === '') { tagClosed = true; break; } } attrStr += xmlData[i]; } if (startChar !== '') { return false; } return { value: attrStr, index: i, tagClosed: tagClosed }; } /** * Select all the attributes whether valid or invalid. */ const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); //attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" function validateAttributeString(attrStr, options) { //console.log("start:"+attrStr+":end"); //if(attrStr.trim().length === 0) return true; //empty string const matches = util.getAllMatches(attrStr, validAttrStrRegxp); const attrNames = {}; for (let i = 0; i < matches.length; i++) { if (matches[i][1].length === 0) { //nospace before attribute name: a="sd"b="saf" return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(attrStr, matches[i][0])) } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { //independent attribute: ab return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(attrStr, matches[i][0])); } /* else if(matches[i][6] === undefined){//attribute without value: ab= return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; } */ const attrName = matches[i][2]; if (!validateAttrName(attrName)) { return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(attrStr, matches[i][0])); } if (!attrNames.hasOwnProperty(attrName)) { //check for duplicate attribute. attrNames[attrName] = 1; } else { return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(attrStr, matches[i][0])); } } return true; } function validateNumberAmpersand(xmlData, i) { let re = /\d/; if (xmlData[i] === 'x') { i++; re = /[\da-fA-F]/; } for (; i < xmlData.length; i++) { if (xmlData[i] === ';') return i; if (!xmlData[i].match(re)) break; } return -1; } function validateAmpersand(xmlData, i) { // https://www.w3.org/TR/xml/#dt-charref i++; if (xmlData[i] === ';') return -1; if (xmlData[i] === '#') { i++; return validateNumberAmpersand(xmlData, i); } let count = 0; for (; i < xmlData.length; i++, count++) { if (xmlData[i].match(/\w/) && count < 20) continue; if (xmlData[i] === ';') break; return -1; } return i; } function getErrorObject(code, message, lineNumber) { return { err: { code: code, msg: message, line: lineNumber, }, }; } function validateAttrName(attrName) { return util.isName(attrName); } // const startsWithXML = /^xml/i; function validateTagName(tagname) { return util.isName(tagname) /* && !tagname.match(startsWithXML) */; } //this function returns the line number for the character at the given index function getLineNumberForPosition(xmlData, index) { var lines = xmlData.substring(0, index).split(/\r?\n/); return lines.length; } //this function returns the position of the last character of match within attrStr function getPositionFromMatch(attrStr, match) { return attrStr.indexOf(match) + match.length; } /***/ }), /***/ "addb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var arraySlice = __webpack_require__("f36a"); var floor = Math.floor; var sort = function (array, comparefn) { var length = array.length; if (length < 8) { // insertion sort var i = 1; var element, j; while (i < length) { j = i; element = array[i]; while (j && comparefn(array[j - 1], element) > 0) { array[j] = array[--j]; } if (j !== i++) array[j] = element; } } else { // merge sort var middle = floor(length / 2); var left = sort(arraySlice(array, 0, middle), comparefn); var right = sort(arraySlice(array, middle), comparefn); var llength = left.length; var rlength = right.length; var lindex = 0; var rindex = 0; while (lindex < llength || rindex < rlength) { array[lindex + rindex] = (lindex < llength && rindex < rlength) ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++]; } } return array; }; module.exports = sort; /***/ }), /***/ "ae93": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var create = __webpack_require__("7c73"); var getPrototypeOf = __webpack_require__("e163"); var defineBuiltIn = __webpack_require__("cb2d"); var wellKnownSymbol = __webpack_require__("b622"); var IS_PURE = __webpack_require__("c430"); var ITERATOR = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; else { PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype[ITERATOR].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if (!isCallable(IteratorPrototype[ITERATOR])) { defineBuiltIn(IteratorPrototype, ITERATOR, function () { return this; }); } module.exports = { IteratorPrototype: IteratorPrototype, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; /***/ }), /***/ "aeb0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineProperty = __webpack_require__("9bf2").f; module.exports = function (Target, Source, key) { key in Target || defineProperty(Target, key, { configurable: true, get: function () { return Source[key]; }, set: function (it) { Source[key] = it; } }); }; /***/ }), /***/ "aed9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__("83ab"); var fails = __webpack_require__("d039"); // V8 ~ Chrome 36- // https://bugs.chromium.org/p/v8/issues/detail?id=3334 module.exports = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty(function () { /* empty */ }, 'prototype', { value: 42, writable: false }).prototype !== 42; }); /***/ }), /***/ "b041": /***/ (function(module, exports, __webpack_require__) { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); var classof = __webpack_require__("f5df"); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; /***/ }), /***/ "b109": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); module.exports = function (CONSTRUCTOR, METHOD) { return uncurryThis(globalThis[CONSTRUCTOR].prototype[METHOD]); }; /***/ }), /***/ "b42e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var ceil = Math.ceil; var floor = Math.floor; // `Math.trunc` method // https://tc39.es/ecma262/#sec-math.trunc // eslint-disable-next-line es/no-math-trunc -- safe module.exports = Math.trunc || function trunc(x) { var n = +x; return (n > 0 ? floor : ceil)(n); }; /***/ }), /***/ "b4bc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var has = __webpack_require__("cb27").has; var size = __webpack_require__("8e16"); var getSetRecord = __webpack_require__("7f65"); var iterateSet = __webpack_require__("384f"); var iterateSimple = __webpack_require__("5388"); var iteratorClose = __webpack_require__("2a62"); // `Set.prototype.isDisjointFrom` method // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom module.exports = function isDisjointFrom(other) { var O = aSet(this); var otherRec = getSetRecord(other); if (size(O) <= otherRec.size) return iterateSet(O, function (e) { if (otherRec.includes(e)) return false; }, true) !== false; var iterator = otherRec.getIterator(); return iterateSimple(iterator, function (e) { if (has(O, e)) return iteratorClose(iterator.iterator, 'normal', false); }) !== false; }; /***/ }), /***/ "b4f8": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var getBuiltIn = __webpack_require__("d066"); var hasOwn = __webpack_require__("1a2d"); var toString = __webpack_require__("577e"); var shared = __webpack_require__("5692"); var NATIVE_SYMBOL_REGISTRY = __webpack_require__("0b43"); var StringToSymbolRegistry = shared('string-to-symbol-registry'); var SymbolToStringRegistry = shared('symbol-to-string-registry'); // `Symbol.for` method // https://tc39.es/ecma262/#sec-symbol.for $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, { 'for': function (key) { var string = toString(key); if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; var symbol = getBuiltIn('Symbol')(string); StringToSymbolRegistry[string] = symbol; SymbolToStringRegistry[symbol] = string; return symbol; } }); /***/ }), /***/ "b575": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var safeGetBuiltIn = __webpack_require__("157a"); var bind = __webpack_require__("0366"); var macrotask = __webpack_require__("2cf4").set; var Queue = __webpack_require__("01b4"); var IS_IOS = __webpack_require__("52c8"); var IS_IOS_PEBBLE = __webpack_require__("ebc1"); var IS_WEBOS_WEBKIT = __webpack_require__("ec87"); var IS_NODE = __webpack_require__("9adc"); var MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver; var document = globalThis.document; var process = globalThis.process; var Promise = globalThis.Promise; var microtask = safeGetBuiltIn('queueMicrotask'); var notify, toggle, node, promise, then; // modern engines have queueMicrotask method if (!microtask) { var queue = new Queue(); var flush = function () { var parent, fn; if (IS_NODE && (parent = process.domain)) parent.exit(); while (fn = queue.get()) try { fn(); } catch (error) { if (queue.head) notify(); throw error; } if (parent) parent.enter(); }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { toggle = true; node = document.createTextNode(''); new MutationObserver(flush).observe(node, { characterData: true }); notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 promise = Promise.resolve(undefined); // workaround of WebKit ~ iOS Safari 10.1 bug promise.constructor = Promise; then = bind(promise.then, promise); notify = function () { then(flush); }; // Node.js without promises } else if (IS_NODE) { notify = function () { process.nextTick(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessage // - onreadystatechange // - setTimeout } else { // `webpack` dev server bug on IE global methods - use bind(fn, global) macrotask = bind(macrotask, globalThis); notify = function () { macrotask(flush); }; } microtask = function (fn) { if (!queue.head) notify(); queue.add(fn); }; } module.exports = microtask; /***/ }), /***/ "b5db": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var navigator = globalThis.navigator; var userAgent = navigator && navigator.userAgent; module.exports = userAgent ? String(userAgent) : ''; /***/ }), /***/ "b620": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var uncurryThisAccessor = __webpack_require__("7282"); var classof = __webpack_require__("c6b6"); var ArrayBuffer = globalThis.ArrayBuffer; var TypeError = globalThis.TypeError; // Includes // - Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // - If IsSharedArrayBuffer(O) is true, throw a TypeError exception. module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) { if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected'); return O.byteLength; }; /***/ }), /***/ "b622": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var shared = __webpack_require__("5692"); var hasOwn = __webpack_require__("1a2d"); var uid = __webpack_require__("90e3"); var NATIVE_SYMBOL = __webpack_require__("04f8"); var USE_SYMBOL_AS_UID = __webpack_require__("fdbf"); var Symbol = globalThis.Symbol; var WellKnownSymbolsStore = shared('wks'); var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!hasOwn(WellKnownSymbolsStore, name)) { WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) ? Symbol[name] : createWellKnownSymbol('Symbol.' + name); } return WellKnownSymbolsStore[name]; }; /***/ }), /***/ "b636": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.asyncIterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.asynciterator defineWellKnownSymbol('asyncIterator'); /***/ }), /***/ "b639": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ var base64 = __webpack_require__("1fb5") var ieee754 = __webpack_require__("9152") var isArray = __webpack_require__("e3db") exports.Buffer = Buffer exports.SlowBuffer = SlowBuffer exports.INSPECT_MAX_BYTES = 50 /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Use Object implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * Due to various browser bugs, sometimes the Object implementation will be used even * when the browser supports typed arrays. * * Note: * * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. * * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. * * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of * incorrect length in some situations. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport() /* * Export kMaxLength after typed array support is determined. */ exports.kMaxLength = kMaxLength() function typedArraySupport () { try { var arr = new Uint8Array(1) arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} return arr.foo() === 42 && // typed array instances can be augmented typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` } catch (e) { return false } } function kMaxLength () { return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } function createBuffer (that, length) { if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length) that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class if (that === null) { that = new Buffer(length) } that.length = length } return that } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer (arg, encodingOrOffset, length) { if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { return new Buffer(arg, encodingOrOffset, length) } // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new Error( 'If encoding is specified then the first argument must be a string' ) } return allocUnsafe(this, arg) } return from(this, arg, encodingOrOffset, length) } Buffer.poolSize = 8192 // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. Buffer._augment = function (arr) { arr.__proto__ = Buffer.prototype return arr } function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { return fromString(that, value, encodingOrOffset) } return fromObject(that, value) } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(null, value, encodingOrOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { Buffer.prototype.__proto__ = Uint8Array.prototype Buffer.__proto__ = Uint8Array if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) { // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: true }) } } function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { throw new RangeError('"size" argument must not be negative') } } function alloc (that, size, fill, encoding) { assertSize(size) if (size <= 0) { return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill) } return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(null, size, fill, encoding) } function allocUnsafe (that, size) { assertSize(size) that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0 } } return that } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(null, size) } /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(null, size) } function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8' } if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } var length = byteLength(string, encoding) | 0 that = createBuffer(that, length) var actual = that.write(string, encoding) if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') that = that.slice(0, actual) } return that } function fromArrayLike (that, array) { var length = array.length < 0 ? 0 : checked(array.length) | 0 that = createBuffer(that, length) for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255 } return that } function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('\'offset\' is out of bounds') } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('\'length\' is out of bounds') } if (byteOffset === undefined && length === undefined) { array = new Uint8Array(array) } else if (length === undefined) { array = new Uint8Array(array, byteOffset) } else { array = new Uint8Array(array, byteOffset, length) } if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array that.__proto__ = Buffer.prototype } else { // Fallback: Return an object instance of the Buffer class that = fromArrayLike(that, array) } return that } function fromObject (that, obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0 that = createBuffer(that, len) if (that.length === 0) { return that } obj.copy(that, 0, 0, len) return that } if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { if (typeof obj.length !== 'number' || isnan(obj.length)) { return createBuffer(that, 0) } return fromArrayLike(that, obj) } if (obj.type === 'Buffer' && isArray(obj.data)) { return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } function SlowBuffer (length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0 } return Buffer.alloc(+length) } Buffer.isBuffer = function isBuffer (b) { return !!(b != null && b._isBuffer) } Buffer.compare = function compare (a, b) { if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('Arguments must be Buffers') } if (a === b) return 0 var x = a.length var y = b.length for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i] y = b[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true default: return false } } Buffer.concat = function concat (list, length) { if (!isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { return Buffer.alloc(0) } var i if (length === undefined) { length = 0 for (i = 0; i < list.length; ++i) { length += list[i].length } } var buffer = Buffer.allocUnsafe(length) var pos = 0 for (i = 0; i < list.length; ++i) { var buf = list[i] if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos) pos += buf.length } return buffer } function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } if (typeof string !== 'string') { string = '' + string } var len = string.length if (len === 0) return 0 // Use a for loop to avoid recursion var loweredCase = false for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len case 'utf8': case 'utf-8': case undefined: return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2 case 'hex': return len >>> 1 case 'base64': return base64ToBytes(string).length default: if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.byteLength = byteLength function slowToString (encoding, start, end) { var loweredCase = false // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0 } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return '' } if (end === undefined || end > this.length) { end = this.length } if (end <= 0) { return '' } // Force coersion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0 start >>>= 0 if (end <= start) { return '' } if (!encoding) encoding = 'utf8' while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end) case 'utf8': case 'utf-8': return utf8Slice(this, start, end) case 'ascii': return asciiSlice(this, start, end) case 'latin1': case 'binary': return latin1Slice(this, start, end) case 'base64': return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = (encoding + '').toLowerCase() loweredCase = true } } } // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. Buffer.prototype._isBuffer = true function swap (b, n, m) { var i = b[n] b[n] = b[m] b[m] = i } Buffer.prototype.swap16 = function swap16 () { var len = this.length if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1) } return this } Buffer.prototype.swap32 = function swap32 () { var len = this.length if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3) swap(this, i + 1, i + 2) } return this } Buffer.prototype.swap64 = function swap64 () { var len = this.length if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7) swap(this, i + 1, i + 6) swap(this, i + 2, i + 5) swap(this, i + 3, i + 4) } return this } Buffer.prototype.toString = function toString () { var length = this.length | 0 if (length === 0) return '' if (arguments.length === 0) return utf8Slice(this, 0, length) return slowToString.apply(this, arguments) } Buffer.prototype.equals = function equals (b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true return Buffer.compare(this, b) === 0 } Buffer.prototype.inspect = function inspect () { var str = '' var max = exports.INSPECT_MAX_BYTES if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') if (this.length > max) str += ' ... ' } return '' } Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { if (!Buffer.isBuffer(target)) { throw new TypeError('Argument must be a Buffer') } if (start === undefined) { start = 0 } if (end === undefined) { end = target ? target.length : 0 } if (thisStart === undefined) { thisStart = 0 } if (thisEnd === undefined) { thisEnd = this.length } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index') } if (thisStart >= thisEnd && start >= end) { return 0 } if (thisStart >= thisEnd) { return -1 } if (start >= end) { return 1 } start >>>= 0 end >>>= 0 thisStart >>>= 0 thisEnd >>>= 0 if (this === target) return 0 var x = thisEnd - thisStart var y = end - start var len = Math.min(x, y) var thisCopy = this.slice(thisStart, thisEnd) var targetCopy = target.slice(start, end) for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i] y = targetCopy[i] break } } if (x < y) return -1 if (y < x) return 1 return 0 } // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset byteOffset = 0 } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000 } byteOffset = +byteOffset // Coerce to Number. if (isNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : (buffer.length - 1) } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset if (byteOffset >= buffer.length) { if (dir) return -1 else byteOffset = buffer.length - 1 } else if (byteOffset < 0) { if (dir) byteOffset = 0 else return -1 } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding) } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF // Search for a byte value [0-255] if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1 var arrLength = arr.length var valLength = val.length if (encoding !== undefined) { encoding = String(encoding).toLowerCase() if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1 } indexSize = 2 arrLength /= 2 valLength /= 2 byteOffset /= 2 } } function read (buf, i) { if (indexSize === 1) { return buf[i] } else { return buf.readUInt16BE(i * indexSize) } } var i if (dir) { var foundIndex = -1 for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i if (i - foundIndex + 1 === valLength) return foundIndex * indexSize } else { if (foundIndex !== -1) i -= i - foundIndex foundIndex = -1 } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength for (i = byteOffset; i >= 0; i--) { var found = true for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false break } } if (found) return i } } return -1 } Buffer.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 } Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true) } Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false) } function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0 var remaining = buf.length - offset if (!length) { length = remaining } else { length = Number(length) if (length > remaining) { length = remaining } } // must be an even number of digits var strLen = string.length if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') if (length > strLen / 2) { length = strLen / 2 } for (var i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16) if (isNaN(parsed)) return i buf[offset + i] = parsed } return i } function utf8Write (buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } function asciiWrite (buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length) } function latin1Write (buf, string, offset, length) { return asciiWrite(buf, string, offset, length) } function base64Write (buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length) } function ucs2Write (buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } Buffer.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8' length = this.length offset = 0 // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset length = this.length offset = 0 // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset | 0 if (isFinite(length)) { length = length | 0 if (encoding === undefined) encoding = 'utf8' } else { encoding = length length = undefined } // legacy write(string, encoding, offset, length) - remove in v0.13 } else { throw new Error( 'Buffer.write(string, encoding, offset[, length]) is no longer supported' ) } var remaining = this.length - offset if (length === undefined || length > remaining) length = remaining if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds') } if (!encoding) encoding = 'utf8' var loweredCase = false for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length) case 'ascii': return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) encoding = ('' + encoding).toLowerCase() loweredCase = true } } } Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } } function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf) } else { return base64.fromByteArray(buf.slice(start, end)) } } function utf8Slice (buf, start, end) { end = Math.min(buf.length, end) var res = [] var i = start while (i < end) { var firstByte = buf[i] var codePoint = null var bytesPerSequence = (firstByte > 0xEF) ? 4 : (firstByte > 0xDF) ? 3 : (firstByte > 0xBF) ? 2 : 1 if (i + bytesPerSequence <= end) { var secondByte, thirdByte, fourthByte, tempCodePoint switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte } break case 2: secondByte = buf[i + 1] if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) if (tempCodePoint > 0x7F) { codePoint = tempCodePoint } } break case 3: secondByte = buf[i + 1] thirdByte = buf[i + 2] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint } } break case 4: secondByte = buf[i + 1] thirdByte = buf[i + 2] fourthByte = buf[i + 3] if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD bytesPerSequence = 1 } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000 res.push(codePoint >>> 10 & 0x3FF | 0xD800) codePoint = 0xDC00 | codePoint & 0x3FF } res.push(codePoint) i += bytesPerSequence } return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000 function decodeCodePointsArray (codePoints) { var len = codePoints.length if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = '' var i = 0 while (i < len) { res += String.fromCharCode.apply( String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ) } return res } function asciiSlice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F) } return ret } function latin1Slice (buf, start, end) { var ret = '' end = Math.min(buf.length, end) for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]) } return ret } function hexSlice (buf, start, end) { var len = buf.length if (!start || start < 0) start = 0 if (!end || end < 0 || end > len) end = len var out = '' for (var i = start; i < end; ++i) { out += toHex(buf[i]) } return out } function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end) var res = '' for (var i = 0; i < bytes.length; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) } return res } Buffer.prototype.slice = function slice (start, end) { var len = this.length start = ~~start end = end === undefined ? len : ~~end if (start < 0) { start += len if (start < 0) start = 0 } else if (start > len) { start = len } if (end < 0) { end += len if (end < 0) end = 0 } else if (end > len) { end = len } if (end < start) end = start var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end) newBuf.__proto__ = Buffer.prototype } else { var sliceLen = end - start newBuf = new Buffer(sliceLen, undefined) for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start] } } return newBuf } /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } return val } Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { checkOffset(offset, byteLength, this.length) } var val = this[offset + --byteLength] var mul = 1 while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul } return val } Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) return this[offset] } Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return this[offset] | (this[offset + 1] << 8) } Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) return (this[offset] << 8) | this[offset + 1] } Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ((this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16)) + (this[offset + 3] * 0x1000000) } Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | (this[offset + 2] << 8) | this[offset + 3]) } Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var val = this[offset] var mul = 1 var i = 0 while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) checkOffset(offset, byteLength, this.length) var i = byteLength var mul = 1 var val = this[offset + --i] while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul } mul *= 0x80 if (val >= mul) val -= Math.pow(2, 8 * byteLength) return val } Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { if (!noAssert) checkOffset(offset, 1, this.length) if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) } Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset] | (this[offset + 1] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 2, this.length) var val = this[offset + 1] | (this[offset] << 8) return (val & 0x8000) ? val | 0xFFFF0000 : val } Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset]) | (this[offset + 1] << 8) | (this[offset + 2] << 16) | (this[offset + 3] << 24) } Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return (this[offset] << 24) | (this[offset + 1] << 16) | (this[offset + 2] << 8) | (this[offset + 3]) } Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, true, 23, 4) } Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 4, this.length) return ieee754.read(this, offset, false, 23, 4) } Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, true, 52, 8) } Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { if (!noAssert) checkOffset(offset, 8, this.length) return ieee754.read(this, offset, false, 52, 8) } function checkInt (buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var mul = 1 var i = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 byteLength = byteLength | 0 if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1 checkInt(this, value, offset, byteLength, maxBytes, 0) } var i = byteLength - 1 var mul = 1 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = (value / mul) & 0xFF } return offset + byteLength } Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) this[offset] = (value & 0xff) return offset + 1 } function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> (littleEndian ? i : 1 - i) * 8 } } Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff } } Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24) this[offset + 2] = (value >>> 16) this[offset + 1] = (value >>> 8) this[offset] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = 0 var mul = 1 var sub = 0 this[offset] = value & 0xFF while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value offset = offset | 0 if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1) checkInt(this, value, offset, byteLength, limit - 1, -limit) } var i = byteLength - 1 var mul = 1 var sub = 0 this[offset + i] = value & 0xFF while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1 } this[offset + i] = ((value / mul) >> 0) - sub & 0xFF } return offset + byteLength } Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) if (value < 0) value = 0xff + value + 1 this[offset] = (value & 0xff) return offset + 1 } Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) } else { objectWriteUInt16(this, value, offset, true) } return offset + 2 } Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8) this[offset + 1] = (value & 0xff) } else { objectWriteUInt16(this, value, offset, false) } return offset + 2 } Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff) this[offset + 1] = (value >>> 8) this[offset + 2] = (value >>> 16) this[offset + 3] = (value >>> 24) } else { objectWriteUInt32(this, value, offset, true) } return offset + 4 } Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value offset = offset | 0 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) if (value < 0) value = 0xffffffff + value + 1 if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24) this[offset + 1] = (value >>> 16) this[offset + 2] = (value >>> 8) this[offset + 3] = (value & 0xff) } else { objectWriteUInt32(this, value, offset, false) } return offset + 4 } function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) } ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 } Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert) } Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert) } function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) } ieee754.write(buf, value, offset, littleEndian, 52, 8) return offset + 8 } Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert) } Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert) } // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0 if (!end && end !== 0) end = this.length if (targetStart >= target.length) targetStart = target.length if (!targetStart) targetStart = 0 if (end > 0 && end < start) end = start // Copy 0 bytes; we're done if (end === start) return 0 if (target.length === 0 || this.length === 0) return 0 // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds') } if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') if (end < 0) throw new RangeError('sourceEnd out of bounds') // Are we oob? if (end > this.length) end = this.length if (target.length - targetStart < end - start) { end = target.length - targetStart + start } var len = end - start var i if (this === target && start < targetStart && targetStart < end) { // descending copy from end for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start] } } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start] } } else { Uint8Array.prototype.set.call( target, this.subarray(start, start + len), targetStart ) } return len } // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start start = 0 end = this.length } else if (typeof end === 'string') { encoding = end end = this.length } if (val.length === 1) { var code = val.charCodeAt(0) if (code < 256) { val = code } } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { val = val & 255 } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index') } if (end <= start) { return this } start = start >>> 0 end = end === undefined ? this.length : end >>> 0 if (!val) val = 0 var i if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val } } else { var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString()) var len = bytes.length for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len] } } return this } // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not str = stringtrim(str).replace(INVALID_BASE64_RE, '') // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '=' } return str } function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } function utf8ToBytes (string, units) { units = units || Infinity var codePoint var length = string.length var leadSurrogate = null var bytes = [] for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i) // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) continue } // valid lead leadSurrogate = codePoint continue } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) leadSurrogate = codePoint continue } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) } leadSurrogate = null // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break bytes.push(codePoint) } else if (codePoint < 0x800) { if ((units -= 2) < 0) break bytes.push( codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break bytes.push( codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) } else { throw new Error('Invalid code point') } } return bytes } function asciiToBytes (str) { var byteArray = [] for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF) } return byteArray } function utf16leToBytes (str, units) { var c, hi, lo var byteArray = [] for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break c = str.charCodeAt(i) hi = c >> 8 lo = c % 256 byteArray.push(lo) byteArray.push(hi) } return byteArray } function base64ToBytes (str) { return base64.toByteArray(base64clean(str)) } function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i] } return i } function isnan (val) { return val !== val // eslint-disable-line no-self-compare } /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("c8ba"))) /***/ }), /***/ "b64e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var iteratorClose = __webpack_require__("2a62"); module.exports = function (iters, kind, value) { for (var i = iters.length - 1; i >= 0; i--) { if (iters[i] === undefined) continue; try { value = iteratorClose(iters[i].iterator, kind, value); } catch (error) { kind = 'throw'; value = error; } } if (kind === 'throw') throw value; return value; }; /***/ }), /***/ "b727": /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__("0366"); var IndexedObject = __webpack_require__("44ad"); var toObject = __webpack_require__("7b0b"); var lengthOfArrayLike = __webpack_require__("07fa"); var arraySpeciesCreate = __webpack_require__("65f0"); var createProperty = __webpack_require__("8418"); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation var createMethod = function (TYPE) { var IS_MAP = TYPE === 1; var IS_FILTER = TYPE === 2; var IS_SOME = TYPE === 3; var IS_EVERY = TYPE === 4; var IS_FIND_INDEX = TYPE === 6; var IS_FILTER_REJECT = TYPE === 7; var NO_HOLES = TYPE === 5 || IS_FIND_INDEX; return function ($this, callbackfn, that) { var O = toObject($this); var self = IndexedObject(O); var length = lengthOfArrayLike(self); var boundFunction = bind(callbackfn, that); var index = 0; var resIndex = 0; var target = IS_MAP ? arraySpeciesCreate($this, length) : IS_FILTER || IS_FILTER_REJECT ? arraySpeciesCreate($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) createProperty(target, index, result); // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: createProperty(target, resIndex++, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: createProperty(target, resIndex++, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; module.exports = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod(6), // `Array.prototype.filterReject` method // https://github.com/tc39/proposal-array-filtering filterReject: createMethod(7) }; /***/ }), /***/ "b7ef": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var getBuiltIn = __webpack_require__("d066"); var createPropertyDescriptor = __webpack_require__("5c6c"); var defineProperty = __webpack_require__("9bf2").f; var hasOwn = __webpack_require__("1a2d"); var anInstance = __webpack_require__("19aa"); var inheritIfRequired = __webpack_require__("7156"); var normalizeStringArgument = __webpack_require__("e391"); var DOMExceptionConstants = __webpack_require__("cf98"); var clearErrorStack = __webpack_require__("0d26"); var DESCRIPTORS = __webpack_require__("83ab"); var IS_PURE = __webpack_require__("c430"); var DOM_EXCEPTION = 'DOMException'; var Error = getBuiltIn('Error'); var NativeDOMException = getBuiltIn(DOM_EXCEPTION); var $DOMException = function DOMException() { anInstance(this, DOMExceptionPrototype); var argumentsLength = arguments.length; var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]); var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error'); var that = new NativeDOMException(message, name); var error = new Error(message); error.name = DOM_EXCEPTION; defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1))); inheritIfRequired(that, this, $DOMException); return that; }; var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype; var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION); var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION); // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it // https://github.com/Jarred-Sumner/bun/issues/399 var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable); var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK; // `DOMException` constructor patch for `.stack` where it's required // https://webidl.spec.whatwg.org/#es-DOMException-specialness $({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException }); var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION); var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype; if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) { if (!IS_PURE) { defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException)); } for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) { var constant = DOMExceptionConstants[key]; var constantName = constant.s; if (!hasOwn(PolyfilledDOMException, constantName)) { defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c)); } } } /***/ }), /***/ "b848": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var uncurryThis = __webpack_require__("e330"); var anUint8Array = __webpack_require__("6b37"); var notDetached = __webpack_require__("2005"); var numberToString = uncurryThis(1.1.toString); var join = uncurryThis([].join); var $Array = Array; var Uint8Array = globalThis.Uint8Array; var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toHex || !(function () { try { var target = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]); return target.toHex() === 'ffffffffffffffff'; } catch (error) { return false; } })(); // `Uint8Array.prototype.toHex` method // https://tc39.es/ecma262/#sec-uint8array.prototype.tohex if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, { toHex: function toHex() { anUint8Array(this); notDetached(this.buffer); var result = $Array(this.length); for (var i = 0, length = this.length; i < length; i++) { var hex = numberToString(this[i], 16); result[i] = hex.length === 1 ? '0' + hex : hex; } return join(result, ''); } }); /***/ }), /***/ "b917": /***/ (function(module, exports, __webpack_require__) { "use strict"; var commonAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; var base64Alphabet = commonAlphabet + '+/'; var base64UrlAlphabet = commonAlphabet + '-_'; var inverse = function (characters) { // TODO: use `Object.create(null)` in `core-js@4` var result = {}; var index = 0; for (; index < 64; index++) result[characters.charAt(index)] = index; return result; }; module.exports = { i2c: base64Alphabet, c2i: inverse(base64Alphabet), i2cUrl: base64UrlAlphabet, c2iUrl: inverse(base64UrlAlphabet) }; /***/ }), /***/ "b980": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var createPropertyDescriptor = __webpack_require__("5c6c"); module.exports = !fails(function () { var error = new Error('a'); if (!('stack' in error)) return true; // eslint-disable-next-line es/no-object-defineproperty -- safe Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7)); return error.stack !== 7; }); /***/ }), /***/ "bb2f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); module.exports = !fails(function () { // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing return Object.isExtensible(Object.preventExtensions({})); }); /***/ }), /***/ "bb56": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var isPrototypeOf = __webpack_require__("3a9b"); var getPrototypeOf = __webpack_require__("e163"); var setPrototypeOf = __webpack_require__("d2bb"); var copyConstructorProperties = __webpack_require__("e893"); var create = __webpack_require__("7c73"); var createNonEnumerableProperty = __webpack_require__("9112"); var createPropertyDescriptor = __webpack_require__("5c6c"); var installErrorCause = __webpack_require__("ab36"); var installErrorStack = __webpack_require__("6f19"); var iterate = __webpack_require__("2266"); var normalizeStringArgument = __webpack_require__("e391"); var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $Error = Error; var push = [].push; var $AggregateError = function AggregateError(errors, message /* , options */) { var isInstance = isPrototypeOf(AggregateErrorPrototype, this); var that; if (setPrototypeOf) { that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype); } else { that = isInstance ? this : create(AggregateErrorPrototype); createNonEnumerableProperty(that, TO_STRING_TAG, 'Error'); } if (message !== undefined) createNonEnumerableProperty(that, 'message', normalizeStringArgument(message)); installErrorStack(that, $AggregateError, that.stack, 1); if (arguments.length > 2) installErrorCause(that, arguments[2]); var errorsArray = []; iterate(errors, push, { that: errorsArray }); createNonEnumerableProperty(that, 'errors', errorsArray); return that; }; if (setPrototypeOf) setPrototypeOf($AggregateError, $Error); else copyConstructorProperties($AggregateError, $Error, { name: true }); var AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, { constructor: createPropertyDescriptor(1, $AggregateError), message: createPropertyDescriptor(1, ''), name: createPropertyDescriptor(1, 'AggregateError') }); // `AggregateError` constructor // https://tc39.es/ecma262/#sec-aggregate-error-constructor $({ global: true, constructor: true, arity: 2 }, { AggregateError: $AggregateError }); /***/ }), /***/ "bcbf": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__("f5df"); module.exports = function (it) { var klass = classof(it); return klass === 'BigInt64Array' || klass === 'BigUint64Array'; }; /***/ }), /***/ "bf19": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); // `URL.prototype.toJSON` method // https://url.spec.whatwg.org/#dom-url-tojson $({ target: 'URL', proto: true, enumerable: true }, { toJSON: function toJSON() { return call(URL.prototype.toString, this); } }); /***/ }), /***/ "bf2c": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("caad"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('Array', 'includes'); /***/ }), /***/ "c04e": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var isObject = __webpack_require__("861d"); var isSymbol = __webpack_require__("d9b5"); var getMethod = __webpack_require__("dc4a"); var ordinaryToPrimitive = __webpack_require__("485a"); var wellKnownSymbol = __webpack_require__("b622"); var $TypeError = TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive module.exports = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw new $TypeError("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; /***/ }), /***/ "c1a1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var isDisjointFrom = __webpack_require__("b4bc"); var setMethodAcceptSetLike = __webpack_require__("dad2"); var INCORRECT = !setMethodAcceptSetLike('isDisjointFrom', function (result) { return !result; }); // `Set.prototype.isDisjointFrom` method // https://tc39.es/ecma262/#sec-set.prototype.isdisjointfrom $({ target: 'Set', proto: true, real: true, forced: INCORRECT }, { isDisjointFrom: isDisjointFrom }); /***/ }), /***/ "c1f9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var iterate = __webpack_require__("2266"); var createProperty = __webpack_require__("8418"); // `Object.fromEntries` method // https://tc39.es/ecma262/#sec-object.fromentries $({ target: 'Object', stat: true }, { fromEntries: function fromEntries(iterable) { var obj = {}; iterate(iterable, function (k, v) { createProperty(obj, k, v); }, { AS_ENTRIES: true }); return obj; } }); /***/ }), /***/ "c430": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = false; /***/ }), /***/ "c4e3": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer, global) {var require;var require;/*! JSZip v3.5.0 - A JavaScript class for generating and reading zip files (c) 2009-2016 Stuart Knightley Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE */ !function(t){if(true)module.exports=t();else {}}(function(){return function s(a,o,h){function u(r,t){if(!o[r]){if(!a[r]){var e="function"==typeof require&&require;if(!t&&e)return require(r,!0);if(l)return l(r,!0);var i=new Error("Cannot find module '"+r+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[r]={exports:{}};a[r][0].call(n.exports,function(t){var e=a[r][1][t];return u(e||t)},n,n.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,t=0;t>2,s=(3&e)<<4|r>>4,a=1>6:64,o=2>4,r=(15&n)<<4|(s=p.indexOf(t.charAt(o++)))>>2,i=(3&s)<<6|(a=p.indexOf(t.charAt(o++))),l[h++]=e,64!==s&&(l[h++]=r),64!==a&&(l[h++]=i);return l}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),s=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");s=t("./stream/DataLengthProbe");function o(t,e,r,i,n){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=i,this.compressedContent=n}o.prototype={getContentWorker:function(){var t=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),t},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils");var o=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==i.getTypeOf(t)?function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}(0|e,t,t.length,0):function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i=null;i="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(t){return new h("Deflate",t)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function A(t,e){var r,i="";for(r=0;r>>=8;return i}function i(t,e,r,i,n,s){var a,o,h=t.file,u=t.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),d=I.transformTo("string",O.utf8encode(h.name)),c=h.comment,p=I.transformTo("string",s(c)),m=I.transformTo("string",O.utf8encode(c)),_=d.length!==h.name.length,g=m.length!==c.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var S=0;e&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===n?(C=798,z|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(t){return 63&(t||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+d,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(i,4)+f+b+p}}var I=t("../utils"),n=t("../stream/GenericWorker"),O=t("../utf8"),B=t("../crc32"),R=t("../signature");function s(t,e,r,i){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,n),s.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,n.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-i-1))/r:100}}))},s.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return R.DATA_DESCRIPTOR+A(t.crc32,4)+A(t.compressedSize,4)+A(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return i.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},n.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},n.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},n.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(t){i.call(this,t)}t("../utils").inherits(n,i),n.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(t){var e=i.getTypeOf(t);return i.checkSupport(e),"string"!==e||n.uint8array?"nodebuffer"===e?new o(t):n.uint8array?new h(i.transformTo("uint8array",t)):new s(i.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function s(t){i.call(this,"ConvertWorker to "+t),this.destType=t}n.inherits(s,i),s.prototype.processChunk=function(t){this.push({data:n.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function s(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,i),s.prototype.processChunk=function(t){this.streamInfo.crc32=n(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}i.inherits(s,n),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}n.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function s(t){n.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then(function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=i.getTypeOf(t),e.isPaused||e._tickAndRepeat()},function(t){e.error(t)})}i.inherits(s,n),s.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function i(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=i},{}],29:[function(t,e,r){"use strict";var h=t("../utils"),n=t("./ConvertWorker"),s=t("./GenericWorker"),u=t("../base64"),i=t("../support"),a=t("../external"),o=null;if(i.nodestream)try{o=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,o){return new a.Promise(function(e,r){var i=[],n=t._internalType,s=t._outputType,a=t._mimeType;t.on("data",function(t,e){i.push(t),o&&o(e)}).on("error",function(t){i=[],r(t)}).on("end",function(){try{var t=function(t,e,r){switch(t){case"blob":return h.newBlob(h.transformTo("arraybuffer",e),r);case"base64":return u.encode(e);default:return h.transformTo(t,e)}}(s,function(t,e){var r,i=0,n=null,s=0;for(r=0;r>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},s.utf8decode=function(t){return h.nodebuffer?o.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,n,s=t.length,a=new Array(2*s);for(e=r=0;e>10&1023,a[r++]=56320|1023&i)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(t=o.transformTo(h.uint8array?"uint8array":"array",t))},o.inherits(a,i),a.prototype.processChunk=function(t){var e=o.transformTo(h.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=e;(e=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),e.set(r,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var i=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}(e),n=e;i!==e.length&&(h.uint8array?(n=e.subarray(0,i),this.leftOver=e.subarray(i,e.length)):(n=e.slice(0,i),this.leftOver=e.slice(i,e.length))),this.push({data:s.utf8decode(n),meta:t.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,i),l.prototype.processChunk=function(t){this.push({data:s.utf8encode(t.data),meta:t.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,a){"use strict";var o=t("./support"),h=t("./base64"),r=t("./nodejsUtils"),i=t("set-immediate-shim"),u=t("./external");function n(t){return t}function l(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=i(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,i,n=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return l(t,t.length)},r.binstring2buf=function(t){for(var e=new h.Buf8(t.length),r=0,i=e.length;r>10&1023,o[i++]=56320|1023&n)}return l(o,i)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0?e:0===r?e:r+u[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,i){for(var n=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var n=o,s=i+r;t^=-1;for(var a=i;a>>8^n[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var h,d=t("../utils/common"),u=t("./trees"),c=t("./adler32"),p=t("./crc32"),i=t("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,n=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(t,e){return t.msg=i[e],e}function T(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(d.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function N(t,e){u._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,F(t.strm)}function U(t,e){t.pending_buf[t.pending++]=e}function P(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var r,i,n=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-z?t.strstart-(t.w_size-z):0,u=t.window,l=t.w_mask,f=t.prev,d=t.strstart+S,c=u[s+a-1],p=u[s+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(u[(r=e)+a]===p&&u[r+a-1]===c&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&sh&&0!=--n);return a<=t.lookahead?a:t.lookahead}function j(t){var e,r,i,n,s,a,o,h,u,l,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-z)){for(d.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=r=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--r;);for(e=r=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--r;);n+=f}if(0===t.strm.avail_in)break;if(a=t.strm,o=t.window,h=t.strstart+t.lookahead,u=n,l=void 0,l=a.avail_in,u=x)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x)if(i=u._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=x&&(t.ins_h=(t.ins_h<=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=u._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(j(t),0===t.lookahead&&e===l)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+r;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,N(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-z&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(t,e){return Y(t,e,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?_:(t.state.gzhead=e,m):_},r.deflate=function(t,e){var r,i,n,s;if(!t||!t.state||5>8&255),U(i,i.gzhead.time>>16&255),U(i,i.gzhead.time>>24&255),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(U(i,255&i.gzhead.extra.length),U(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=p(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(U(i,0),U(i,0),U(i,0),U(i,0),U(i,0),U(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),U(i,3),i.status=E);else{var a=v+(i.w_bits-8<<4)<<8;a|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(a|=32),a+=31-a%31,i.status=E,P(i,a),0!==i.strstart&&(P(i,t.adler>>>16),P(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending!==i.pending_buf_size));)U(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindexn&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),F(t),n=i.pending,i.pending===i.pending_buf_size)){s=1;break}s=i.gzindexn&&(t.adler=p(t.adler,i.pending_buf,i.pending-n,n)),0===s&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(t),i.pending+2<=i.pending_buf_size&&(U(i,255&t.adler),U(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(F(t),0===t.avail_out)return i.last_flush=-1,m}else if(0===t.avail_in&&T(e)<=T(r)&&e!==f)return R(t,-5);if(666===i.status&&0!==t.avail_in)return R(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==l&&666!==i.status){var o=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(j(t),0===t.lookahead)){if(e===l)return A;break}if(t.match_length=0,r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):3===i.strategy?function(t,e){for(var r,i,n,s,a=t.window;;){if(t.lookahead<=S){if(j(t),t.lookahead<=S&&e===l)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(r=u._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=u._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(N(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(N(t,!0),0===t.strm.avail_out?O:B):t.last_lit&&(N(t,!1),0===t.strm.avail_out)?A:I}(i,e):h[i.level].func(i,e);if(o!==O&&o!==B||(i.status=666),o===A||o===O)return 0===t.avail_out&&(i.last_flush=-1),m;if(o===I&&(1===e?u._tr_align(i):5!==e&&(u._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),F(t),0===t.avail_out))return i.last_flush=-1,m}return e!==f?m:i.wrap<=0?1:(2===i.wrap?(U(i,255&t.adler),U(i,t.adler>>8&255),U(i,t.adler>>16&255),U(i,t.adler>>24&255),U(i,255&t.total_in),U(i,t.total_in>>8&255),U(i,t.total_in>>16&255),U(i,t.total_in>>24&255)):(P(i,t.adler>>>16),P(i,65535&t.adler)),F(t),0=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new d.Buf8(r.w_size),d.arraySet(u,e,l-r.w_size,r.w_size,0),e=u,l=r.w_size),a=t.avail_in,o=t.next_in,h=t.input,t.avail_in=l,t.next_in=0,t.input=e,j(r);r.lookahead>=x;){for(i=r.strstart,n=r.lookahead-(x-1);r.ins_h=(r.ins_h<>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(c&(1<>>=y,p-=y),p<15&&(c+=z[i++]<>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(c&(1<>>=y,p-=y,(y=s-a)>3,c&=(1<<(p-=w<<3))-1,t.next_in=i,t.next_out=s,t.avail_in=i>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=P,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new I.Buf32(i),e.distcode=e.distdyn=new I.Buf32(n),e.sane=1,e.back=-1,N):U}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,a(t)):U}function h(t,e){var r,i;return t&&t.state?(i=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=s.wsize?(I.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(n=s.wsize-s.wnext)&&(n=i),I.arraySet(s.window,e,r-i,n,s.wnext),(i-=n)?(I.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){t.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break t;o--,u+=i[s++]<>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break t;o--,u+=i[s++]<>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(c=r.length)&&(c=o),c&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,i,s,c,k)),512&r.flags&&(r.check=B(r.check,i,c,s)),o-=c,s+=c,r.length-=c),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break t;for(c=0;k=i[s+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&c>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break t;o--,u+=i[s++]<>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break t;o--,u+=i[s++]<>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==e)break;u>>>=2,l-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break t;o--,u+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(c=r.length){if(o>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l>>=_,l-=_,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],c=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l>>=_)),u>>>=3,l-=3}else{for(z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+c>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;c--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=o&&258<=h){t.next_out=a,t.avail_out=h,t.next_in=s,t.avail_in=o,r.hold=u,r.bits=l,R(t,d),a=t.next_out,n=t.output,h=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break t;o--,u+=i[s++]<>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){t.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break t;if(c=d-h,r.offset>c){if((c=r.offset-c)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}p=c>r.wnext?(c-=r.wnext,r.wsize-c):r.wnext-c,c>r.length&&(c=r.length),m=r.window}else m=n,p=a-r.offset,c=r.length;for(hc?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=e[r+a[v]]}if(k>>7)]}function U(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function P(t,e,r){t.bi_valid>c-r?(t.bi_buf|=e<>c-t.bi_valid,t.bi_valid+=r-c):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function Z(t,e,r){var i,n,s=new Array(g+1),a=0;for(i=1;i<=g;i++)s[i]=a=a+r[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=j(s[o]++,o))}}function W(t){var e;for(e=0;e>1;1<=r;r--)G(t,s,r);for(n=h;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,s,1),i=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=i,s[2*n]=s[2*r]+s[2*i],t.depth[n]=(t.depth[r]>=t.depth[i]?t.depth[r]:t.depth[i])+1,s[2*r+1]=s[2*i+1]=n,t.heap[1]=n++,G(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,i,n,s,a,o,h=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(s=0;s<=g;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<_;r++)p<(s=h[2*h[2*(i=t.heap[r])+1]+1]+1)&&(s=p,m++),h[2*i+1]=s,u>=7;i>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e>>3,(s=t.static_len+3+7>>>3)<=n&&(n=s)):n=s=r+5,r+4<=n&&-1!==e?J(t,e,r,i):4===t.strategy||s===n?(P(t,2+(i?1:0),3),K(t,z,C)):(P(t,4+(i?1:0),3),function(t,e,r,i){var n;for(P(t,e-257,5),P(t,r-1,5),P(t,i-4,4),n=0;n>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(A[r]+u+1)]++,t.dyn_dtree[2*N(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){P(t,2,3),L(t,m,z),function(t){16===t.bi_valid?(U(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}); /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("b639").Buffer, __webpack_require__("c8ba"))) /***/ }), /***/ "c513": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var hasOwn = __webpack_require__("1a2d"); var isSymbol = __webpack_require__("d9b5"); var tryToString = __webpack_require__("0d51"); var shared = __webpack_require__("5692"); var NATIVE_SYMBOL_REGISTRY = __webpack_require__("0b43"); var SymbolToStringRegistry = shared('symbol-to-string-registry'); // `Symbol.keyFor` method // https://tc39.es/ecma262/#sec-symbol.keyfor $({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, { keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol'); if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; } }); /***/ }), /***/ "c5cc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var call = __webpack_require__("c65b"); var create = __webpack_require__("7c73"); var createNonEnumerableProperty = __webpack_require__("9112"); var defineBuiltIns = __webpack_require__("6964"); var wellKnownSymbol = __webpack_require__("b622"); var InternalStateModule = __webpack_require__("69f3"); var getMethod = __webpack_require__("dc4a"); var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype; var createIterResultObject = __webpack_require__("4754"); var iteratorClose = __webpack_require__("2a62"); var iteratorCloseAll = __webpack_require__("b64e"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var ITERATOR_HELPER = 'IteratorHelper'; var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator'; var NORMAL = 'normal'; var THROW = 'throw'; var setInternalState = InternalStateModule.set; var createIteratorProxyPrototype = function (IS_ITERATOR) { var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER); return defineBuiltIns(create(IteratorPrototype), { next: function next() { var state = getInternalState(this); // for simplification: // for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject` // for `%IteratorHelperPrototype%.next` - just a value if (IS_ITERATOR) return state.nextHandler(); if (state.done) return createIterResultObject(undefined, true); try { var result = state.nextHandler(); return state.returnHandlerResult ? result : createIterResultObject(result, state.done); } catch (error) { state.done = true; throw error; } }, 'return': function () { var state = getInternalState(this); var iterator = state.iterator; var done = state.done; state.done = true; if (IS_ITERATOR) { var returnMethod = getMethod(iterator, 'return'); return returnMethod ? call(returnMethod, iterator) : createIterResultObject(undefined, true); } if (done) return createIterResultObject(undefined, true); if (state.inner) try { iteratorClose(state.inner.iterator, NORMAL); } catch (error) { return iteratorClose(iterator, THROW, error); } if (state.openIters) try { iteratorCloseAll(state.openIters, NORMAL); } catch (error) { if (iterator) return iteratorClose(iterator, THROW, error); throw error; } if (iterator) iteratorClose(iterator, NORMAL); return createIterResultObject(undefined, true); } }); }; var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true); var IteratorHelperPrototype = createIteratorProxyPrototype(false); createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper'); module.exports = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) { var IteratorProxy = function Iterator(record, state) { if (state) { state.iterator = record.iterator; state.next = record.next; } else state = record; state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER; state.returnHandlerResult = !!RETURN_HANDLER_RESULT; state.nextHandler = nextHandler; state.counter = 0; state.done = false; setInternalState(this, state); }; IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype; return IteratorProxy; }; /***/ }), /***/ "c65b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_BIND = __webpack_require__("40d5"); var call = Function.prototype.call; // eslint-disable-next-line es/no-function-prototype-bind -- safe module.exports = NATIVE_BIND ? call.bind(call) : function () { return call.apply(call, arguments); }; /***/ }), /***/ "c6b6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var toString = uncurryThis({}.toString); var stringSlice = uncurryThis(''.slice); module.exports = function (it) { return stringSlice(toString(it), 8, -1); }; /***/ }), /***/ "c6cd": /***/ (function(module, exports, __webpack_require__) { "use strict"; var IS_PURE = __webpack_require__("c430"); var globalThis = __webpack_require__("cfe9"); var defineGlobalProperty = __webpack_require__("6374"); var SHARED = '__core-js_shared__'; var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {}); (store.versions || (store.versions = [])).push({ version: '3.49.0', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.', license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE', source: 'https://github.com/zloirock/core-js' }); /***/ }), /***/ "c6d2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var IS_PURE = __webpack_require__("c430"); var FunctionName = __webpack_require__("5e77"); var isCallable = __webpack_require__("1626"); var createIteratorConstructor = __webpack_require__("dcc3"); var getPrototypeOf = __webpack_require__("e163"); var setPrototypeOf = __webpack_require__("d2bb"); var setToStringTag = __webpack_require__("d44e"); var createNonEnumerableProperty = __webpack_require__("9112"); var defineBuiltIn = __webpack_require__("cb2d"); var wellKnownSymbol = __webpack_require__("b622"); var Iterators = __webpack_require__("3f8c"); var IteratorsCore = __webpack_require__("ae93"); var PROPER_FUNCTION_NAME = FunctionName.PROPER; var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; var IteratorPrototype = IteratorsCore.IteratorPrototype; var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; var ITERATOR = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis = function () { return this; }; module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); var getIterationMethod = function (KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; } return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; var INCORRECT_VALUES_NAME = false; var IterablePrototype = Iterable.prototype; var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; var CurrentIteratorPrototype, methods, KEY; // fix native if (anyNativeIterator) { CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { if (setPrototypeOf) { setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis); } } // Set @@toStringTag to native iterators setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; } } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) { if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) { createNonEnumerableProperty(IterablePrototype, 'name', VALUES); } else { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return call(nativeIterator, this); }; } } // export additional methods if (DEFAULT) { methods = { values: getIterationMethod(VALUES), keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), entries: getIterationMethod(ENTRIES) }; if (FORCED) for (KEY in methods) { if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { defineBuiltIn(IterablePrototype, KEY, methods[KEY]); } } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } // define iterator if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); } Iterators[NAME] = defaultIterator; return methods; }; /***/ }), /***/ "c8ba": /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /***/ "ca84": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); var hasOwn = __webpack_require__("1a2d"); var toIndexedObject = __webpack_require__("fc6a"); var indexOf = __webpack_require__("4d64").indexOf; var hiddenKeys = __webpack_require__("d012"); var push = uncurryThis([].push); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn(O, key = names[i++])) { ~indexOf(result, key) || push(result, key); } return result; }; /***/ }), /***/ "caad": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var $includes = __webpack_require__("4d64").includes; var fails = __webpack_require__("d039"); var addToUnscopables = __webpack_require__("44d2"); // FF99+ bug var BROKEN_ON_SPARSE = fails(function () { // eslint-disable-next-line es/no-array-prototype-includes -- detection return !Array(1).includes(); }); // Safari 26.4- bug var BROKEN_ON_SPARSE_WITH_FROM_INDEX = fails(function () { // eslint-disable-next-line no-sparse-arrays, es/no-array-prototype-includes -- detection return [, 1].includes(undefined, 1); }); // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE || BROKEN_ON_SPARSE_WITH_FROM_INDEX }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); /***/ }), /***/ "cb1f": /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;// Big integer base-10 printing library // Copyright (c) 2008-2022 Lapo Luchini // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { "use strict"; var max = 10000000000000; // biggest 10^n integer that can still fit 2^53 when multiplied by 256 /** * Arbitrary length base-10 value. * @param {number} value - Optional initial value (will be 0 otherwise). */ function Int10(value) { this.buf = [+value || 0]; } /** * Multiply value by m and add c. * @param {number} m - multiplier, must be < =256 * @param {number} c - value to add */ Int10.prototype.mulAdd = function (m, c) { // assert(m <= 256) var b = this.buf, l = b.length, i, t; for (i = 0; i < l; ++i) { t = b[i] * m + c; if (t < max) c = 0; else { c = 0|(t / max); t -= c * max; } b[i] = t; } if (c > 0) b[i] = c; }; /** * Subtract value. * @param {number} c - value to subtract */ Int10.prototype.sub = function (c) { var b = this.buf, l = b.length, i, t; for (i = 0; i < l; ++i) { t = b[i] - c; if (t < 0) { t += max; c = 1; } else c = 0; b[i] = t; } while (b[b.length - 1] === 0) b.pop(); }; /** * Convert to decimal string representation. * @param {*} base - optional value, only value accepted is 10 */ Int10.prototype.toString = function (base) { if ((base || 10) != 10) throw 'only base 10 is supported'; var b = this.buf, s = b[b.length - 1].toString(); for (var i = b.length - 2; i >= 0; --i) s += (max + b[i]).toString().substring(1); return s; }; /** * Convert to Number value representation. * Will probably overflow 2^53 and thus become approximate. */ Int10.prototype.valueOf = function () { var b = this.buf, v = 0; for (var i = b.length - 1; i >= 0; --i) v = v * max + b[i]; return v; }; /** * Return value as a simple Number (if it is <= 10000000000000), or return this. */ Int10.prototype.simplify = function () { var b = this.buf; return (b.length == 1) ? b[0] : this; }; return Int10; }).call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }), /***/ "cb27": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); // eslint-disable-next-line es/no-set -- safe var SetPrototype = Set.prototype; module.exports = { // eslint-disable-next-line es/no-set -- safe Set: Set, add: uncurryThis(SetPrototype.add), has: uncurryThis(SetPrototype.has), remove: uncurryThis(SetPrototype['delete']), proto: SetPrototype }; /***/ }), /***/ "cb2d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isCallable = __webpack_require__("1626"); var definePropertyModule = __webpack_require__("9bf2"); var makeBuiltIn = __webpack_require__("13d2"); var defineGlobalProperty = __webpack_require__("6374"); module.exports = function (O, key, value, options) { if (!options) options = {}; var simple = options.enumerable; var name = options.name !== undefined ? options.name : key; if (isCallable(value)) makeBuiltIn(value, name, options); if (options.global) { if (simple) O[key] = value; else defineGlobalProperty(key, value); } else { try { if (!options.unsafe) delete O[key]; else if (O[key]) simple = true; } catch (error) { /* empty */ } if (simple) O[key] = value; else definePropertyModule.f(O, key, { value: value, enumerable: false, configurable: !options.nonConfigurable, writable: !options.nonWritable }); } return O; }; /***/ }), /***/ "cc12": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var isObject = __webpack_require__("861d"); var document = globalThis.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; /***/ }), /***/ "cc98": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var IS_PURE = __webpack_require__("c430"); var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__("4738").CONSTRUCTOR; var NativePromiseConstructor = __webpack_require__("d256"); var getBuiltIn = __webpack_require__("d066"); var isCallable = __webpack_require__("1626"); var defineBuiltIn = __webpack_require__("cb2d"); var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype; // `Promise.prototype.catch` method // https://tc39.es/ecma262/#sec-promise.prototype.catch $({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR, real: true }, { 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` if (!IS_PURE && isCallable(NativePromiseConstructor)) { var method = getBuiltIn('Promise').prototype['catch']; if (NativePromisePrototype['catch'] !== method) { defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true }); } } /***/ }), /***/ "cca6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var assign = __webpack_require__("60da"); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign // eslint-disable-next-line es/no-object-assign -- required for testing $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, { assign: assign }); /***/ }), /***/ "cd38": /***/ (function(module, exports, __webpack_require__) { "use strict"; //parse Empty Node as self closing node const buildOptions = __webpack_require__("90da").buildOptions; const defaultOptions = { attributeNamePrefix: '@_', attrNodeName: false, textNodeName: '#text', ignoreAttributes: true, cdataTagName: false, cdataPositionChar: '\\c', format: false, indentBy: ' ', supressEmptyNode: false, tagValueProcessor: function(a) { return a; }, attrValueProcessor: function(a) { return a; }, }; const props = [ 'attributeNamePrefix', 'attrNodeName', 'textNodeName', 'ignoreAttributes', 'cdataTagName', 'cdataPositionChar', 'format', 'indentBy', 'supressEmptyNode', 'tagValueProcessor', 'attrValueProcessor', ]; function Parser(options) { this.options = buildOptions(options, defaultOptions, props); if (this.options.ignoreAttributes || this.options.attrNodeName) { this.isAttribute = function(/*a*/) { return false; }; } else { this.attrPrefixLen = this.options.attributeNamePrefix.length; this.isAttribute = isAttribute; } if (this.options.cdataTagName) { this.isCDATA = isCDATA; } else { this.isCDATA = function(/*a*/) { return false; }; } this.replaceCDATAstr = replaceCDATAstr; this.replaceCDATAarr = replaceCDATAarr; if (this.options.format) { this.indentate = indentate; this.tagEndChar = '>\n'; this.newLine = '\n'; } else { this.indentate = function() { return ''; }; this.tagEndChar = '>'; this.newLine = ''; } if (this.options.supressEmptyNode) { this.buildTextNode = buildEmptyTextNode; this.buildObjNode = buildEmptyObjNode; } else { this.buildTextNode = buildTextValNode; this.buildObjNode = buildObjectNode; } this.buildTextValNode = buildTextValNode; this.buildObjectNode = buildObjectNode; } Parser.prototype.parse = function(jObj) { return this.j2x(jObj, 0).val; }; Parser.prototype.j2x = function(jObj, level) { let attrStr = ''; let val = ''; const keys = Object.keys(jObj); const len = keys.length; for (let i = 0; i < len; i++) { const key = keys[i]; if (typeof jObj[key] === 'undefined') { // supress undefined node } else if (jObj[key] === null) { val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; } else if (jObj[key] instanceof Date) { val += this.buildTextNode(jObj[key], key, '', level); } else if (typeof jObj[key] !== 'object') { //premitive type const attr = this.isAttribute(key); if (attr) { attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"'; } else if (this.isCDATA(key)) { if (jObj[this.options.textNodeName]) { val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]); } else { val += this.replaceCDATAstr('', jObj[key]); } } else { //tag value if (key === this.options.textNodeName) { if (jObj[this.options.cdataTagName]) { //value will added while processing cdata } else { val += this.options.tagValueProcessor('' + jObj[key]); } } else { val += this.buildTextNode(jObj[key], key, '', level); } } } else if (Array.isArray(jObj[key])) { //repeated nodes if (this.isCDATA(key)) { val += this.indentate(level); if (jObj[this.options.textNodeName]) { val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]); } else { val += this.replaceCDATAarr('', jObj[key]); } } else { //nested nodes const arrLen = jObj[key].length; for (let j = 0; j < arrLen; j++) { const item = jObj[key][j]; if (typeof item === 'undefined') { // supress undefined node } else if (item === null) { val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; } else if (typeof item === 'object') { const result = this.j2x(item, level + 1); val += this.buildObjNode(result.val, key, result.attrStr, level); } else { val += this.buildTextNode(item, key, '', level); } } } } else { //nested node if (this.options.attrNodeName && key === this.options.attrNodeName) { const Ks = Object.keys(jObj[key]); const L = Ks.length; for (let j = 0; j < L; j++) { attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"'; } } else { const result = this.j2x(jObj[key], level + 1); val += this.buildObjNode(result.val, key, result.attrStr, level); } } } return {attrStr: attrStr, val: val}; }; function replaceCDATAstr(str, cdata) { str = this.options.tagValueProcessor('' + str); if (this.options.cdataPositionChar === '' || str === '') { return str + ''); } return str + this.newLine; } } function buildObjectNode(val, key, attrStr, level) { if (attrStr && !val.includes('<')) { return ( this.indentate(level) + '<' + key + attrStr + '>' + val + //+ this.newLine // + this.indentate(level) '' + this.options.tagValueProcessor(val) + '= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; }; module.exports = { // `Array.prototype.reduce` method // https://tc39.es/ecma262/#sec-array.prototype.reduce left: createMethod(false), // `Array.prototype.reduceRight` method // https://tc39.es/ecma262/#sec-array.prototype.reduceright right: createMethod(true) }; /***/ }), /***/ "d627": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("f5b2"); var entryUnbind = __webpack_require__("b109"); module.exports = entryUnbind('String', 'codePointAt'); /***/ }), /***/ "d6d6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $TypeError = TypeError; module.exports = function (passed, required) { if (passed < required) throw new $TypeError('Not enough arguments'); return passed; }; /***/ }), /***/ "d866": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var iterate = __webpack_require__("2266"); var aCallable = __webpack_require__("59ed"); var anObject = __webpack_require__("825a"); var getIteratorDirect = __webpack_require__("46c4"); var iteratorClose = __webpack_require__("2a62"); var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f"); var everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('every', TypeError); // `Iterator.prototype.every` method // https://tc39.es/ecma262/#sec-iterator.prototype.every $({ target: 'Iterator', proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, { every: function every(predicate) { anObject(this); try { aCallable(predicate); } catch (error) { iteratorClose(this, 'throw', error); } if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate); var record = getIteratorDirect(this); var counter = 0; return !iterate(record, function (value, stop) { if (!predicate(value, counter++)) return stop(); }, { IS_RECORD: true, INTERRUPTED: true }).stopped; } }); /***/ }), /***/ "d86b": /***/ (function(module, exports, __webpack_require__) { "use strict"; // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it var fails = __webpack_require__("d039"); module.exports = fails(function () { if (typeof ArrayBuffer == 'function') { var buffer = new ArrayBuffer(8); // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 }); } }); /***/ }), /***/ "d9b5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var isCallable = __webpack_require__("1626"); var isPrototypeOf = __webpack_require__("3a9b"); var USE_SYMBOL_AS_UID = __webpack_require__("fdbf"); var $Object = Object; module.exports = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it)); }; /***/ }), /***/ "d9e2": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint-disable no-unused-vars -- required for functions `.length` */ var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var apply = __webpack_require__("2ba4"); var wrapErrorConstructorWithCause = __webpack_require__("e5cb"); var WEB_ASSEMBLY = 'WebAssembly'; var WebAssembly = globalThis[WEB_ASSEMBLY]; // eslint-disable-next-line es/no-error-cause -- feature detection var FORCED = new Error('e', { cause: 7 }).cause !== 7; var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) { var O = {}; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED); $({ global: true, constructor: true, arity: 1, forced: FORCED }, O); }; var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) { if (WebAssembly && WebAssembly[ERROR_NAME]) { var O = {}; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED); $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O); } }; // https://tc39.es/ecma262/#sec-nativeerror exportGlobalErrorCauseWrapper('Error', function (init) { return function Error(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('EvalError', function (init) { return function EvalError(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('RangeError', function (init) { return function RangeError(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('ReferenceError', function (init) { return function ReferenceError(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('SyntaxError', function (init) { return function SyntaxError(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('TypeError', function (init) { return function TypeError(message) { return apply(init, this, arguments); }; }); exportGlobalErrorCauseWrapper('URIError', function (init) { return function URIError(message) { return apply(init, this, arguments); }; }); exportWebAssemblyErrorCauseWrapper('CompileError', function (init) { return function CompileError(message) { return apply(init, this, arguments); }; }); exportWebAssemblyErrorCauseWrapper('LinkError', function (init) { return function LinkError(message) { return apply(init, this, arguments); }; }); exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) { return function RuntimeError(message) { return apply(init, this, arguments); }; }); /***/ }), /***/ "d9f5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var call = __webpack_require__("c65b"); var uncurryThis = __webpack_require__("e330"); var IS_PURE = __webpack_require__("c430"); var DESCRIPTORS = __webpack_require__("83ab"); var NATIVE_SYMBOL = __webpack_require__("04f8"); var fails = __webpack_require__("d039"); var hasOwn = __webpack_require__("1a2d"); var isPrototypeOf = __webpack_require__("3a9b"); var anObject = __webpack_require__("825a"); var toIndexedObject = __webpack_require__("fc6a"); var toPropertyKey = __webpack_require__("a04b"); var $toString = __webpack_require__("577e"); var createPropertyDescriptor = __webpack_require__("5c6c"); var nativeObjectCreate = __webpack_require__("7c73"); var objectKeys = __webpack_require__("df75"); var getOwnPropertyNamesModule = __webpack_require__("241c"); var getOwnPropertyNamesExternal = __webpack_require__("057f"); var getOwnPropertySymbolsModule = __webpack_require__("7418"); var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); var definePropertyModule = __webpack_require__("9bf2"); var definePropertiesModule = __webpack_require__("37e8"); var propertyIsEnumerableModule = __webpack_require__("d1e7"); var defineBuiltIn = __webpack_require__("cb2d"); var defineBuiltInAccessor = __webpack_require__("edd0"); var shared = __webpack_require__("5692"); var sharedKey = __webpack_require__("f772"); var hiddenKeys = __webpack_require__("d012"); var uid = __webpack_require__("90e3"); var wellKnownSymbol = __webpack_require__("b622"); var wrappedWellKnownSymbolModule = __webpack_require__("e538"); var defineWellKnownSymbol = __webpack_require__("e065"); var defineSymbolToPrimitive = __webpack_require__("57b9"); var setToStringTag = __webpack_require__("d44e"); var InternalStateModule = __webpack_require__("69f3"); var $forEach = __webpack_require__("b727").forEach; var HIDDEN = sharedKey('hidden'); var SYMBOL = 'Symbol'; var PROTOTYPE = 'prototype'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(SYMBOL); var ObjectPrototype = Object[PROTOTYPE]; var $Symbol = globalThis.Symbol; var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE]; var RangeError = globalThis.RangeError; var TypeError = globalThis.TypeError; var QObject = globalThis.QObject; var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; var push = uncurryThis([].push); var AllSymbols = shared('symbols'); var ObjectPrototypeSymbols = shared('op-symbols'); var WellKnownSymbolsStore = shared('wks'); // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var fallbackDefineProperty = function (O, P, Attributes) { var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; nativeDefineProperty(O, P, Attributes); if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); } return O; }; var setSymbolDescriptor = DESCRIPTORS && fails(function () { return nativeObjectCreate(nativeDefineProperty({}, 'a', { get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } })).a !== 7; }) ? fallbackDefineProperty : nativeDefineProperty; var wrap = function (tag, description) { var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype); setInternalState(symbol, { type: SYMBOL, tag: tag, description: description }); if (!DESCRIPTORS) symbol.description = description; return symbol; }; var $defineProperty = function defineProperty(O, P, Attributes) { if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); anObject(O); var key = toPropertyKey(P); anObject(Attributes); if (hasOwn(AllSymbols, key)) { // first definition - default non-enumerable; redefinition - preserve existing state if (!('enumerable' in Attributes) ? !hasOwn(O, key) || (hasOwn(O, HIDDEN) && O[HIDDEN][key]) : !Attributes.enumerable) { if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, nativeObjectCreate(null))); O[HIDDEN][key] = true; } else { if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); } return setSymbolDescriptor(O, key, Attributes); } return nativeDefineProperty(O, key, Attributes); }; var $defineProperties = function defineProperties(O, Properties) { anObject(O); var properties = toIndexedObject(Properties); var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); $forEach(keys, function (key) { if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]); }); return O; }; var $create = function create(O, Properties) { return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); }; var $propertyIsEnumerable = function propertyIsEnumerable(V) { var P = toPropertyKey(V); var enumerable = call(nativePropertyIsEnumerable, this, P); if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false; return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { var it = toIndexedObject(O); var key = toPropertyKey(P); if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return; var descriptor = nativeGetOwnPropertyDescriptor(it, key); if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) { descriptor.enumerable = true; } return descriptor; }; var $getOwnPropertyNames = function getOwnPropertyNames(O) { var names = nativeGetOwnPropertyNames(toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key); }); return result; }; var $getOwnPropertySymbols = function (O) { var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) { push(result, AllSymbols[key]); } }); return result; }; // `Symbol` constructor // https://tc39.es/ecma262/#sec-symbol-constructor if (!NATIVE_SYMBOL) { $Symbol = function Symbol() { if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor'); var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); var tag = uid(description); var setter = function (value) { var $this = this === undefined ? globalThis : this; if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value); if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false; var descriptor = createPropertyDescriptor(1, value); try { setSymbolDescriptor($this, tag, descriptor); } catch (error) { if (!(error instanceof RangeError)) throw error; fallbackDefineProperty($this, tag, descriptor); } }; if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); return wrap(tag, description); }; SymbolPrototype = $Symbol[PROTOTYPE]; defineBuiltIn(SymbolPrototype, 'toString', function toString() { return getInternalState(this).tag; }); defineBuiltIn($Symbol, 'withoutSetter', function (description) { return wrap(uid(description), description); }); propertyIsEnumerableModule.f = $propertyIsEnumerable; definePropertyModule.f = $defineProperty; definePropertiesModule.f = $defineProperties; getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; wrappedWellKnownSymbolModule.f = function (name) { return wrap(wellKnownSymbol(name), name); }; if (DESCRIPTORS) { // https://tc39.es/ecma262/#sec-symbol.prototype.description defineBuiltInAccessor(SymbolPrototype, 'description', { configurable: true, get: function description() { return getInternalState(this).description; } }); if (!IS_PURE) { defineBuiltIn(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); } } } $({ global: true, constructor: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { Symbol: $Symbol }); $forEach(objectKeys(WellKnownSymbolsStore), function (name) { defineWellKnownSymbol(name); }); $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { useSetter: function () { USE_SETTER = true; }, useSimple: function () { USE_SETTER = false; } }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { // `Object.create` method // https://tc39.es/ecma262/#sec-object.create create: $create, // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty defineProperty: $defineProperty, // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties defineProperties: $defineProperties, // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors getOwnPropertyDescriptor: $getOwnPropertyDescriptor }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames getOwnPropertyNames: $getOwnPropertyNames }); // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive defineSymbolToPrimitive(); // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag($Symbol, SYMBOL); hiddenKeys[HIDDEN] = true; /***/ }), /***/ "da63": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $TypeError = TypeError; module.exports = function (options) { var alphabet = options && options.alphabet; if (alphabet === undefined || alphabet === 'base64' || alphabet === 'base64url') return alphabet || 'base64'; throw new $TypeError('Incorrect `alphabet` option'); }; /***/ }), /***/ "dad2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var createSetLike = function (size) { return { size: size, has: function () { return false; }, keys: function () { return { next: function () { return { done: true }; } }; } }; }; var createSetLikeWithInfinitySize = function (size) { return { size: size, has: function () { return true; }, keys: function () { throw new Error('e'); } }; }; module.exports = function (name, callback) { var Set = getBuiltIn('Set'); try { new Set()[name](createSetLike(0)); try { // late spec change, early WebKit ~ Safari 17 implementation does not pass it // https://github.com/tc39/proposal-set-methods/pull/88 // also covered engines with // https://bugs.webkit.org/show_bug.cgi?id=272679 new Set()[name](createSetLike(-1)); return false; } catch (error2) { if (!callback) return true; // early V8 implementation bug // https://issues.chromium.org/issues/351332634 try { new Set()[name](createSetLikeWithInfinitySize(-Infinity)); return false; } catch (error) { var set = new Set([1, 2]); return callback(set[name](createSetLikeWithInfinitySize(Infinity))); } } } catch (error) { return false; } }; /***/ }), /***/ "dbe5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var fails = __webpack_require__("d039"); var V8 = __webpack_require__("1212"); var ENVIRONMENT = __webpack_require__("8558"); var structuredClone = globalThis.structuredClone; module.exports = !!structuredClone && !fails(function () { // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation // https://github.com/zloirock/core-js/issues/679 if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false; var buffer = new ArrayBuffer(8); var clone = structuredClone(buffer, { transfer: [buffer] }); return buffer.byteLength !== 0 || clone.byteLength !== 8; }); /***/ }), /***/ "dbfa": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var call = __webpack_require__("c65b"); var aCallable = __webpack_require__("59ed"); var getBuiltIn = __webpack_require__("d066"); var newPromiseCapabilityModule = __webpack_require__("f069"); var perform = __webpack_require__("e667"); var iterate = __webpack_require__("2266"); var PROMISE_STATICS_INCORRECT_ITERATION = __webpack_require__("5eed"); var PROMISE_ANY_ERROR = 'No one promise resolved'; // `Promise.any` method // https://tc39.es/ecma262/#sec-promise.any $({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, { any: function any(iterable) { var C = this; var AggregateError = getBuiltIn('AggregateError'); var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aCallable(C.resolve); var errors = []; var counter = 0; var remaining = 1; var alreadyResolved = false; iterate(iterable, function (promise) { var index = counter++; var alreadyRejected = false; remaining++; call(promiseResolve, C, promise).then(function (value) { if (alreadyRejected || alreadyResolved) return; alreadyResolved = true; resolve(value); }, function (error) { if (alreadyRejected || alreadyResolved) return; alreadyRejected = true; errors[index] = error; --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); }); }); --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ "dc19": /***/ (function(module, exports, __webpack_require__) { "use strict"; var has = __webpack_require__("cb27").has; // Perform ? RequireInternalSlot(M, [[SetData]]) module.exports = function (it) { has(it); return it; }; /***/ }), /***/ "dc4a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aCallable = __webpack_require__("59ed"); var isNullOrUndefined = __webpack_require__("7234"); // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod module.exports = function (V, P) { var func = V[P]; return isNullOrUndefined(func) ? undefined : aCallable(func); }; /***/ }), /***/ "dc57": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("90d7"); var path = __webpack_require__("428f"); module.exports = path.Math.log2; /***/ }), /***/ "dc8d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.hasInstance` well-known symbol // https://tc39.es/ecma262/#sec-symbol.hasinstance defineWellKnownSymbol('hasInstance'); /***/ }), /***/ "dcc3": /***/ (function(module, exports, __webpack_require__) { "use strict"; var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype; var create = __webpack_require__("7c73"); var createPropertyDescriptor = __webpack_require__("5c6c"); var setToStringTag = __webpack_require__("d44e"); var Iterators = __webpack_require__("3f8c"); var returnThis = function () { return this; }; module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); Iterators[TO_STRING_TAG] = returnThis; return IteratorConstructor; }; /***/ }), /***/ "dec7": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var defineWellKnownSymbol = __webpack_require__("e065"); var defineProperty = __webpack_require__("9bf2").f; var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var Symbol = globalThis.Symbol; // `Symbol.asyncDispose` well-known symbol // https://github.com/tc39/proposal-async-explicit-resource-management defineWellKnownSymbol('asyncDispose'); if (Symbol) { var descriptor = getOwnPropertyDescriptor(Symbol, 'asyncDispose'); // workaround of NodeJS 20.4 bug // https://github.com/nodejs/node/issues/48699 // and incorrect descriptor from some transpilers and userland helpers if (descriptor.enumerable && descriptor.configurable && descriptor.writable) { defineProperty(Symbol, 'asyncDispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false }); } } /***/ }), /***/ "df75": /***/ (function(module, exports, __webpack_require__) { "use strict"; var internalObjectKeys = __webpack_require__("ca84"); var enumBugKeys = __webpack_require__("7839"); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; /***/ }), /***/ "df7c": /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1, // backported and transplited with Babel, with backwards-compat fixes // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // resolves . and .. elements in a path array with directory names there // must be no slashes, empty elements, or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up--; up) { parts.unshift('..'); } } return parts; } // path.resolve([from ...], to) // posix version exports.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (typeof path !== 'string') { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version exports.normalize = function(path) { var isAbsolute = exports.isAbsolute(path), trailingSlash = substr(path, -1) === '/'; // Normalize the path path = normalizeArray(filter(path.split('/'), function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version exports.isAbsolute = function(path) { return path.charAt(0) === '/'; }; // posix version exports.join = function() { var paths = Array.prototype.slice.call(arguments, 0); return exports.normalize(filter(paths, function(p, index) { if (typeof p !== 'string') { throw new TypeError('Arguments to path.join must be strings'); } return p; }).join('/')); }; // path.relative(from, to) // posix version exports.relative = function(from, to) { from = exports.resolve(from).substr(1); to = exports.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }; exports.sep = '/'; exports.delimiter = ':'; exports.dirname = function (path) { if (typeof path !== 'string') path = path + ''; if (path.length === 0) return '.'; var code = path.charCodeAt(0); var hasRoot = code === 47 /*/*/; var end = -1; var matchedSlash = true; for (var i = path.length - 1; i >= 1; --i) { code = path.charCodeAt(i); if (code === 47 /*/*/) { if (!matchedSlash) { end = i; break; } } else { // We saw the first non-path separator matchedSlash = false; } } if (end === -1) return hasRoot ? '/' : '.'; if (hasRoot && end === 1) { // return '//'; // Backwards-compat fix: return '/'; } return path.slice(0, end); }; function basename(path) { if (typeof path !== 'string') path = path + ''; var start = 0; var end = -1; var matchedSlash = true; var i; for (i = path.length - 1; i >= 0; --i) { if (path.charCodeAt(i) === 47 /*/*/) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { start = i + 1; break; } } else if (end === -1) { // We saw the first non-path separator, mark this as the end of our // path component matchedSlash = false; end = i + 1; } } if (end === -1) return ''; return path.slice(start, end); } // Uses a mixed approach for backwards-compatibility, as ext behavior changed // in new Node.js versions, so only basename() above is backported here exports.basename = function (path, ext) { var f = basename(path); if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; exports.extname = function (path) { if (typeof path !== 'string') path = path + ''; var startDot = -1; var startPart = 0; var end = -1; var matchedSlash = true; // Track the state of characters (if any) we see before our first dot and // after any path separator we find var preDotState = 0; for (var i = path.length - 1; i >= 0; --i) { var code = path.charCodeAt(i); if (code === 47 /*/*/) { // If we reached a path separator that was not part of a set of path // separators at the end of the string, stop now if (!matchedSlash) { startPart = i + 1; break; } continue; } if (end === -1) { // We saw the first non-path separator, mark this as the end of our // extension matchedSlash = false; end = i + 1; } if (code === 46 /*.*/) { // If this is our first dot, mark it as the start of our extension if (startDot === -1) startDot = i; else if (preDotState !== 1) preDotState = 1; } else if (startDot !== -1) { // We saw a non-dot and non-path separator before our dot, so we should // have a good chance at having a non-empty extension preDotState = -1; } } if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot preDotState === 0 || // The (right-most) trimmed path component is exactly '..' preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { return ''; } return path.slice(startDot, end); }; function filter (xs, f) { if (xs.filter) return xs.filter(f); var res = []; for (var i = 0; i < xs.length; i++) { if (f(xs[i], i, xs)) res.push(xs[i]); } return res; } // String.prototype.substr - negative index don't work in IE8 var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { return str.substr(start, len) } : function (str, start, len) { if (start < 0) start = str.length + start; return str.substr(start, len); } ; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__("4362"))) /***/ }), /***/ "dfb9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var lengthOfArrayLike = __webpack_require__("07fa"); module.exports = function (Constructor, list, $length) { var index = 0; var length = arguments.length > 2 ? $length : lengthOfArrayLike(list); var result = new Constructor(length); while (length > index) result[index] = list[index++]; return result; }; /***/ }), /***/ "dffd": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable no-bitwise, no-mixed-operators, no-use-before-define, max-len */ const {BigInteger, SecureRandom} = __webpack_require__("f33e") const {ECCurveFp} = __webpack_require__("4701") const rng = new SecureRandom() const {curve, G, n} = generateEcparam() /** * 获取公共椭圆曲线 */ function getGlobalCurve() { return curve } /** * 生成ecparam */ function generateEcparam() { // 椭圆曲线 const p = new BigInteger('FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF', 16) const a = new BigInteger('FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC', 16) const b = new BigInteger('28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93', 16) const curve = new ECCurveFp(p, a, b) // 基点 const gxHex = '32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7' const gyHex = 'BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0' const G = curve.decodePointHex('04' + gxHex + gyHex) const n = new BigInteger('FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123', 16) return {curve, G, n} } /** * 生成密钥对 */ function generateKeyPairHex() { const d = new BigInteger(n.bitLength(), rng).mod(n.subtract(BigInteger.ONE)).add(BigInteger.ONE) // 随机数 const privateKey = leftPad(d.toString(16), 64) const P = G.multiply(d) // P = dG,p 为公钥,d 为私钥 const Px = leftPad(P.getX().toBigInteger().toString(16), 64) const Py = leftPad(P.getY().toBigInteger().toString(16), 64) const publicKey = '04' + Px + Py return {privateKey, publicKey} } /** * 解析utf8字符串到16进制 */ function parseUtf8StringToHex(input) { input = unescape(encodeURIComponent(input)) const length = input.length // 转换到字数组 const words = [] for (let i = 0; i < length; i++) { words[i >>> 2] |= (input.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8) } // 转换到16进制 const hexChars = [] for (let i = 0; i < length; i++) { const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff hexChars.push((bite >>> 4).toString(16)) hexChars.push((bite & 0x0f).toString(16)) } return hexChars.join('') } /** * 解析arrayBuffer到16进制字符串 */ function parseArrayBufferToHex(input) { return Array.prototype.map.call(new Uint8Array(input), x => ('00' + x.toString(16)).slice(-2)).join('') } /** * 补全16进制字符串 */ function leftPad(input, num) { if (input.length >= num) return input return (new Array(num - input.length + 1)).join('0') + input } /** * 转成16进制串 */ function arrayToHex(arr) { const words = [] let j = 0 for (let i = 0; i < arr.length * 2; i += 2) { words[i >>> 3] |= parseInt(arr[j], 10) << (24 - (i % 8) * 4) j++ } // 转换到16进制 const hexChars = [] for (let i = 0; i < arr.length; i++) { const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff hexChars.push((bite >>> 4).toString(16)) hexChars.push((bite & 0x0f).toString(16)) } return hexChars.join('') } /** * 转成utf8串 */ function arrayToUtf8(arr) { const words = [] let j = 0 for (let i = 0; i < arr.length * 2; i += 2) { words[i >>> 3] |= parseInt(arr[j], 10) << (24 - (i % 8) * 4) j++ } try { const latin1Chars = [] for (let i = 0; i < arr.length; i++) { const bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff latin1Chars.push(String.fromCharCode(bite)) } return decodeURIComponent(escape(latin1Chars.join(''))) } catch (e) { throw new Error('Malformed UTF-8 data') } } /** * 转成ascii码数组 */ function hexToArray(hexStr) { const words = [] let hexStrLength = hexStr.length if (hexStrLength % 2 !== 0) { hexStr = leftPad(hexStr, hexStrLength + 1) } hexStrLength = hexStr.length for (let i = 0; i < hexStrLength; i += 2) { words.push(parseInt(hexStr.substr(i, 2), 16)) } return words } module.exports = { getGlobalCurve, generateEcparam, generateKeyPairHex, parseUtf8StringToHex, parseArrayBufferToHex, leftPad, arrayToHex, arrayToUtf8, hexToArray, } /***/ }), /***/ "e01a": /***/ (function(module, exports, __webpack_require__) { "use strict"; // `Symbol.prototype.description` getter // https://tc39.es/ecma262/#sec-symbol.prototype.description var $ = __webpack_require__("23e7"); var DESCRIPTORS = __webpack_require__("83ab"); var globalThis = __webpack_require__("cfe9"); var call = __webpack_require__("c65b"); var uncurryThis = __webpack_require__("e330"); var hasOwn = __webpack_require__("1a2d"); var isCallable = __webpack_require__("1626"); var isPrototypeOf = __webpack_require__("3a9b"); var toString = __webpack_require__("577e"); var defineBuiltInAccessor = __webpack_require__("edd0"); var copyConstructorProperties = __webpack_require__("e893"); var NativeSymbol = globalThis.Symbol; var SymbolPrototype = NativeSymbol && NativeSymbol.prototype; if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) || // Safari 12 bug NativeSymbol().description !== undefined )) { var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description var SymbolWrapper = function Symbol() { var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]); var result = isPrototypeOf(SymbolPrototype, this) // eslint-disable-next-line sonarjs/inconsistent-function-call -- ok ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' : description === undefined ? NativeSymbol() : NativeSymbol(description); if (description === '') EmptyStringDescriptionStore[result] = true; return result; }; copyConstructorProperties(SymbolWrapper, NativeSymbol); // wrap Symbol.for for correct handling of empty string descriptions var nativeFor = SymbolWrapper['for']; SymbolWrapper['for'] = { 'for': function (key) { var stringKey = toString(key); var symbol = call(nativeFor, this, stringKey); if (stringKey === '') EmptyStringDescriptionStore[symbol] = true; return symbol; } }['for']; SymbolWrapper.prototype = SymbolPrototype; SymbolPrototype.constructor = SymbolWrapper; var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)'; var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf); var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString); var regexp = /^Symbol\((.*)\)[^)]+$/; var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); defineBuiltInAccessor(SymbolPrototype, 'description', { configurable: true, get: function description() { var symbol = thisSymbolValue(this); if (hasOwn(EmptyStringDescriptionStore, symbol)) return ''; var string = symbolDescriptiveString(symbol); var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1'); return desc === '' ? undefined : desc; } }); $({ global: true, constructor: true, forced: true }, { Symbol: SymbolWrapper }); } /***/ }), /***/ "e065": /***/ (function(module, exports, __webpack_require__) { "use strict"; var path = __webpack_require__("428f"); var hasOwn = __webpack_require__("1a2d"); var wrappedWellKnownSymbolModule = __webpack_require__("e538"); var defineProperty = __webpack_require__("9bf2").f; module.exports = function (NAME) { var Symbol = path.Symbol || (path.Symbol = {}); if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, { value: wrappedWellKnownSymbolModule.f(NAME) }); }; /***/ }), /***/ "e163": /***/ (function(module, exports, __webpack_require__) { "use strict"; var hasOwn = __webpack_require__("1a2d"); var isCallable = __webpack_require__("1626"); var toObject = __webpack_require__("7b0b"); var sharedKey = __webpack_require__("f772"); var CORRECT_PROTOTYPE_GETTER = __webpack_require__("e177"); var IE_PROTO = sharedKey('IE_PROTO'); var $Object = Object; var ObjectPrototype = $Object.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof // eslint-disable-next-line es/no-object-getprototypeof -- safe module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { var object = toObject(O); if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; if (isCallable(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof $Object ? ObjectPrototype : null; }; /***/ }), /***/ "e177": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); module.exports = !fails(function () { function F() { /* empty */ } F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing return Object.getPrototypeOf(new F()) !== F.prototype; }); /***/ }), /***/ "e260": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIndexedObject = __webpack_require__("fc6a"); var addToUnscopables = __webpack_require__("44d2"); var Iterators = __webpack_require__("3f8c"); var InternalStateModule = __webpack_require__("69f3"); var defineProperty = __webpack_require__("9bf2").f; var defineIterator = __webpack_require__("c6d2"); var createIterResultObject = __webpack_require__("4754"); var IS_PURE = __webpack_require__("c430"); var DESCRIPTORS = __webpack_require__("83ab"); var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.es/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.es/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.es/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.es/ecma262/#sec-createarrayiterator module.exports = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var index = state.index++; if (!target || index >= target.length) { state.target = null; return createIterResultObject(undefined, true); } switch (state.kind) { case 'keys': return createIterResultObject(index, false); case 'values': return createIterResultObject(target[index], false); } return createIterResultObject([index, target[index]], false); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.es/ecma262/#sec-createunmappedargumentsobject // https://tc39.es/ecma262/#sec-createmappedargumentsobject var values = Iterators.Arguments = Iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); // V8 ~ Chrome 45- bug if (!IS_PURE && DESCRIPTORS && values.name !== 'values') try { defineProperty(values, 'name', { value: 'values' }); } catch (error) { /* empty */ } /***/ }), /***/ "e283": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var apply = __webpack_require__("2ba4"); var slice = __webpack_require__("f36a"); var newPromiseCapabilityModule = __webpack_require__("f069"); var aCallable = __webpack_require__("59ed"); var perform = __webpack_require__("e667"); var Promise = globalThis.Promise; var ACCEPT_ARGUMENTS = false; // Avoiding the use of polyfills of the previous iteration of this proposal // that does not accept arguments of the callback var FORCED = !Promise || !Promise['try'] || perform(function () { Promise['try'](function (argument) { ACCEPT_ARGUMENTS = argument === 8; }, 8); }).error || !ACCEPT_ARGUMENTS; // `Promise.try` method // https://tc39.es/ecma262/#sec-promise.try $({ target: 'Promise', stat: true, forced: FORCED }, { 'try': function (callbackfn /* , ...args */) { var args = arguments.length > 1 ? slice(arguments, 1) : []; var promiseCapability = newPromiseCapabilityModule.f(this); var result = perform(function () { return apply(aCallable(callbackfn), undefined, args); }); (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value); return promiseCapability.promise; } }); /***/ }), /***/ "e330": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_BIND = __webpack_require__("40d5"); var FunctionPrototype = Function.prototype; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-function-prototype-bind -- safe var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) { return function () { return call.apply(fn, arguments); }; }; /***/ }), /***/ "e391": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toString = __webpack_require__("577e"); module.exports = function (argument, $default) { return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument); }; /***/ }), /***/ "e3db": /***/ (function(module, exports) { var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; /***/ }), /***/ "e538": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); exports.f = wellKnownSymbol; /***/ }), /***/ "e5cb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__("d066"); var hasOwn = __webpack_require__("1a2d"); var createNonEnumerableProperty = __webpack_require__("9112"); var isPrototypeOf = __webpack_require__("3a9b"); var setPrototypeOf = __webpack_require__("d2bb"); var copyConstructorProperties = __webpack_require__("e893"); var proxyAccessor = __webpack_require__("aeb0"); var inheritIfRequired = __webpack_require__("7156"); var normalizeStringArgument = __webpack_require__("e391"); var installErrorCause = __webpack_require__("ab36"); var installErrorStack = __webpack_require__("6f19"); var DESCRIPTORS = __webpack_require__("83ab"); var IS_PURE = __webpack_require__("c430"); module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) { var STACK_TRACE_LIMIT = 'stackTraceLimit'; var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1; var path = FULL_NAME.split('.'); var ERROR_NAME = path[path.length - 1]; var OriginalError = getBuiltIn.apply(null, path); if (!OriginalError) return; var OriginalErrorPrototype = OriginalError.prototype; // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006 if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause; if (!FORCED) return OriginalError; var BaseError = getBuiltIn('Error'); var WrappedError = wrapper(function (a, b) { var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined); var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError(); if (message !== undefined) createNonEnumerableProperty(result, 'message', message); installErrorStack(result, WrappedError, result.stack, 2); if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError); if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]); return result; }); WrappedError.prototype = OriginalErrorPrototype; if (ERROR_NAME !== 'Error') { if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError); else copyConstructorProperties(WrappedError, BaseError, { name: true }); } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) { proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT); proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace'); } copyConstructorProperties(WrappedError, OriginalError); if (!IS_PURE) try { // Safari 13- bug: WebAssembly errors does not have a proper `.name` if (OriginalErrorPrototype.name !== ERROR_NAME) { createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME); } OriginalErrorPrototype.constructor = WrappedError; } catch (error) { /* empty */ } return WrappedError; }; /***/ }), /***/ "e667": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function (exec) { try { return { error: false, value: exec() }; } catch (error) { return { error: true, value: error }; } }; /***/ }), /***/ "e691": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); var defineWellKnownSymbol = __webpack_require__("e065"); var defineProperty = __webpack_require__("9bf2").f; var getOwnPropertyDescriptor = __webpack_require__("06cf").f; var Symbol = globalThis.Symbol; // `Symbol.dispose` well-known symbol // https://github.com/tc39/proposal-explicit-resource-management defineWellKnownSymbol('dispose'); if (Symbol) { var descriptor = getOwnPropertyDescriptor(Symbol, 'dispose'); // workaround of NodeJS 20.4 bug // https://github.com/nodejs/node/issues/48699 // and incorrect descriptor from some transpilers and userland helpers if (descriptor.enumerable && descriptor.configurable && descriptor.writable) { defineProperty(Symbol, 'dispose', { value: descriptor.value, enumerable: false, configurable: false, writable: false }); } } /***/ }), /***/ "e6cf": /***/ (function(module, exports, __webpack_require__) { "use strict"; // TODO: Remove this module from `core-js@4` since it's split to modules listed below __webpack_require__("5e7e"); __webpack_require__("14e5"); __webpack_require__("cc98"); __webpack_require__("3529"); __webpack_require__("f22b"); __webpack_require__("7149"); /***/ }), /***/ "e893": /***/ (function(module, exports, __webpack_require__) { "use strict"; var hasOwn = __webpack_require__("1a2d"); var ownKeys = __webpack_require__("56ef"); var getOwnPropertyDescriptorModule = __webpack_require__("06cf"); var definePropertyModule = __webpack_require__("9bf2"); module.exports = function (target, source, exceptions) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } } }; /***/ }), /***/ "e8b5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var classof = __webpack_require__("c6b6"); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe module.exports = Array.isArray || function isArray(argument) { return classof(argument) === 'Array'; }; /***/ }), /***/ "e95a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var wellKnownSymbol = __webpack_require__("b622"); var Iterators = __webpack_require__("3f8c"); var ITERATOR = wellKnownSymbol('iterator'); var ArrayPrototype = Array.prototype; // check on default Array iterator module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); }; /***/ }), /***/ "e9bc": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aSet = __webpack_require__("dc19"); var add = __webpack_require__("cb27").add; var clone = __webpack_require__("83b9"); var getSetRecord = __webpack_require__("7f65"); var iterateSimple = __webpack_require__("5388"); // `Set.prototype.union` method // https://tc39.es/ecma262/#sec-set.prototype.union module.exports = function union(other) { var O = aSet(this); var keysIter = getSetRecord(other).getIterator(); var result = clone(O); iterateSimple(keysIter, function (it) { add(result, it); }); return result; }; /***/ }), /***/ "e9c4": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var getBuiltIn = __webpack_require__("d066"); var apply = __webpack_require__("2ba4"); var call = __webpack_require__("c65b"); var uncurryThis = __webpack_require__("e330"); var fails = __webpack_require__("d039"); var isArray = __webpack_require__("e8b5"); var isCallable = __webpack_require__("1626"); var isRawJSON = __webpack_require__("f748"); var isSymbol = __webpack_require__("d9b5"); var classof = __webpack_require__("c6b6"); var toString = __webpack_require__("577e"); var arraySlice = __webpack_require__("f36a"); var parseJSONString = __webpack_require__("d24a"); var uid = __webpack_require__("90e3"); var NATIVE_SYMBOL = __webpack_require__("04f8"); var NATIVE_RAW_JSON = __webpack_require__("9cf7"); var $String = String; var $stringify = getBuiltIn('JSON', 'stringify'); var exec = uncurryThis(/./.exec); var charAt = uncurryThis(''.charAt); var charCodeAt = uncurryThis(''.charCodeAt); var replace = uncurryThis(''.replace); var slice = uncurryThis(''.slice); var push = uncurryThis([].push); var numberToString = uncurryThis(1.1.toString); var surrogates = /[\uD800-\uDFFF]/g; var leadingSurrogates = /^[\uD800-\uDBFF]$/; var trailingSurrogates = /^[\uDC00-\uDFFF]$/; var MARK = uid(); var MARK_LENGTH = MARK.length; var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () { var symbol = getBuiltIn('Symbol')('stringify detection'); // MS Edge converts symbol values to JSON as {} return $stringify([symbol]) !== '[null]' // WebKit converts symbol values to JSON as null || $stringify({ a: symbol }) !== '{}' // V8 throws on boxed symbols || $stringify(Object(symbol)) !== '{}'; }); // https://github.com/tc39/proposal-well-formed-stringify var ILL_FORMED_UNICODE = fails(function () { return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"' || $stringify('\uDEAD') !== '"\\udead"'; }); var stringifyWithProperSymbolsConversion = WRONG_SYMBOLS_CONVERSION ? function (it, replacer) { var args = arraySlice(arguments); var $replacer = getReplacerFunction(replacer); if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined args[1] = function (key, value) { // some old implementations (like WebKit) could pass numbers as keys if (isCallable($replacer)) value = call($replacer, this, $String(key), value); if (!isSymbol(value)) return value; }; return apply($stringify, null, args); } : $stringify; var fixIllFormedJSON = function (match, offset, string) { var prev = charAt(string, offset - 1); var next = charAt(string, offset + 1); if ( (exec(leadingSurrogates, match) && !exec(trailingSurrogates, next)) || (exec(trailingSurrogates, match) && !exec(leadingSurrogates, prev)) ) { return '\\u' + numberToString(charCodeAt(match, 0), 16); } return match; }; var getReplacerFunction = function (replacer) { if (isCallable(replacer)) return replacer; if (!isArray(replacer)) return; var rawLength = replacer.length; var keys = []; for (var i = 0; i < rawLength; i++) { var element = replacer[i]; if (typeof element == 'string') push(keys, element); else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element)); } var keysLength = keys.length; var root = true; return function (key, value) { if (root) { root = false; return value; } if (isArray(this)) return value; for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value; }; }; // `JSON.stringify` method // https://tc39.es/ecma262/#sec-json.stringify // https://github.com/tc39/proposal-json-parse-with-source if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE || !NATIVE_RAW_JSON }, { stringify: function stringify(text, replacer, space) { var replacerFunction = getReplacerFunction(replacer); var rawStrings = []; var json = stringifyWithProperSymbolsConversion(text, function (key, value) { // some old implementations (like WebKit) could pass numbers as keys var v = isCallable(replacerFunction) ? call(replacerFunction, this, $String(key), value) : value; return !NATIVE_RAW_JSON && isRawJSON(v) ? MARK + (push(rawStrings, v.rawJSON) - 1) : v; }, space); if (typeof json != 'string') return json; if (ILL_FORMED_UNICODE) json = replace(json, surrogates, fixIllFormedJSON); if (NATIVE_RAW_JSON) return json; var result = ''; var length = json.length; for (var i = 0; i < length; i++) { var chr = charAt(json, i); if (chr === '"') { var end = parseJSONString(json, ++i).end - 1; var string = slice(json, i, end); result += slice(string, 0, MARK_LENGTH) === MARK ? rawStrings[slice(string, MARK_LENGTH)] : '"' + string + '"'; i = end; } else result += chr; } return result; } }); /***/ }), /***/ "e9f5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var anInstance = __webpack_require__("19aa"); var anObject = __webpack_require__("825a"); var isCallable = __webpack_require__("1626"); var getPrototypeOf = __webpack_require__("e163"); var defineBuiltInAccessor = __webpack_require__("edd0"); var createProperty = __webpack_require__("8418"); var fails = __webpack_require__("d039"); var hasOwn = __webpack_require__("1a2d"); var wellKnownSymbol = __webpack_require__("b622"); var IteratorPrototype = __webpack_require__("ae93").IteratorPrototype; var DESCRIPTORS = __webpack_require__("83ab"); var IS_PURE = __webpack_require__("c430"); var CONSTRUCTOR = 'constructor'; var ITERATOR = 'Iterator'; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $TypeError = TypeError; var NativeIterator = globalThis[ITERATOR]; // FF56- have non-standard global helper `Iterator` var FORCED = IS_PURE || !isCallable(NativeIterator) || NativeIterator.prototype !== IteratorPrototype // FF44- non-standard `Iterator` passes previous tests || !fails(function () { NativeIterator({}); }); var IteratorConstructor = function Iterator() { anInstance(this, IteratorPrototype); if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable'); }; var defineIteratorPrototypeAccessor = function (key, value) { if (DESCRIPTORS) { defineBuiltInAccessor(IteratorPrototype, key, { configurable: true, get: function () { return value; }, set: function (replacement) { anObject(this); if (this === IteratorPrototype) throw new $TypeError("You can't redefine this property"); if (hasOwn(this, key)) this[key] = replacement; else createProperty(this, key, replacement); } }); } else IteratorPrototype[key] = value; }; if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR); if (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) { defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor); } IteratorConstructor.prototype = IteratorPrototype; // `Iterator` constructor // https://tc39.es/ecma262/#sec-iterator $({ global: true, constructor: true, forced: FORCED }, { Iterator: IteratorConstructor }); /***/ }), /***/ "ea98": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("e330"); var requireObjectCoercible = __webpack_require__("1d80"); var toIntegerOrInfinity = __webpack_require__("5926"); var toString = __webpack_require__("577e"); var fails = __webpack_require__("d039"); var charAt = uncurryThis(''.charAt); var FORCED = fails(function () { // eslint-disable-next-line es/no-string-prototype-at -- safe return '𠮷'.at(-2) !== '\uD842'; }); // `String.prototype.at` method // https://tc39.es/ecma262/#sec-string.prototype.at $({ target: 'String', proto: true, forced: FORCED }, { at: function at(index) { var S = toString(requireObjectCoercible(this)); var len = S.length; var relativeIndex = toIntegerOrInfinity(index); var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex; return (k < 0 || k >= len) ? undefined : charAt(S, k); } }); /***/ }), /***/ "eac5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var floor = Math.floor; // `IsIntegralNumber` abstract operation // https://tc39.es/ecma262/#sec-isintegralnumber // eslint-disable-next-line es/no-number-isinteger -- safe module.exports = Number.isInteger || function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }), /***/ "eb73": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("6c57"); module.exports = __webpack_require__("cfe9"); /***/ }), /***/ "ebb5": /***/ (function(module, exports, __webpack_require__) { "use strict"; var NATIVE_ARRAY_BUFFER = __webpack_require__("4b11"); var DESCRIPTORS = __webpack_require__("83ab"); var globalThis = __webpack_require__("cfe9"); var isCallable = __webpack_require__("1626"); var isObject = __webpack_require__("861d"); var hasOwn = __webpack_require__("1a2d"); var classof = __webpack_require__("f5df"); var tryToString = __webpack_require__("0d51"); var createNonEnumerableProperty = __webpack_require__("9112"); var defineBuiltIn = __webpack_require__("cb2d"); var defineBuiltInAccessor = __webpack_require__("edd0"); var isPrototypeOf = __webpack_require__("3a9b"); var getPrototypeOf = __webpack_require__("e163"); var setPrototypeOf = __webpack_require__("d2bb"); var wellKnownSymbol = __webpack_require__("b622"); var uid = __webpack_require__("90e3"); var InternalStateModule = __webpack_require__("69f3"); var enforceInternalState = InternalStateModule.enforce; var getInternalState = InternalStateModule.get; var Int8Array = globalThis.Int8Array; var Int8ArrayPrototype = Int8Array && Int8Array.prototype; var Uint8ClampedArray = globalThis.Uint8ClampedArray; var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; var TypedArray = Int8Array && getPrototypeOf(Int8Array); var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype); var ObjectPrototype = Object.prototype; var TypeError = globalThis.TypeError; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor'; // Fixing native typed arrays in Opera Presto crashes the browser, see #595 var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis.opera) !== 'Opera'; var TYPED_ARRAY_TAG_REQUIRED = false; var NAME, Constructor, Prototype; var TypedArrayConstructorsList = { Int8Array: 1, Uint8Array: 1, Uint8ClampedArray: 1, Int16Array: 2, Uint16Array: 2, Int32Array: 4, Uint32Array: 4, Float32Array: 4, Float64Array: 8 }; var BigIntArrayConstructorsList = { BigInt64Array: 8, BigUint64Array: 8 }; var isView = function isView(it) { if (!isObject(it)) return false; var klass = classof(it); return klass === 'DataView' || hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass); }; var getTypedArrayConstructor = function (it) { var proto = getPrototypeOf(it); if (!isObject(proto)) return; var state = getInternalState(proto); return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto); }; var isTypedArray = function (it) { if (!isObject(it)) return false; var klass = classof(it); return hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass); }; var aTypedArray = function (it) { if (isTypedArray(it)) return it; throw new TypeError('Target is not a typed array'); }; var aTypedArrayConstructor = function (C) { if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C; throw new TypeError(tryToString(C) + ' is not a typed array constructor'); }; var exportTypedArrayMethod = function (KEY, property, forced, options) { if (!DESCRIPTORS) return; if (forced) for (var ARRAY in TypedArrayConstructorsList) { var TypedArrayConstructor = globalThis[ARRAY]; if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try { delete TypedArrayConstructor.prototype[KEY]; } catch (error) { // old WebKit bug - some methods are non-configurable try { TypedArrayConstructor.prototype[KEY] = property; } catch (error2) { /* empty */ } } } if (!TypedArrayPrototype[KEY] || forced) { defineBuiltIn(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options); } }; var exportTypedArrayStaticMethod = function (KEY, property, forced) { var ARRAY, TypedArrayConstructor; if (!DESCRIPTORS) return; if (setPrototypeOf) { if (forced) for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = globalThis[ARRAY]; if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try { delete TypedArrayConstructor[KEY]; } catch (error) { /* empty */ } } if (!TypedArray[KEY] || forced) { // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable try { return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property); } catch (error) { /* empty */ } } else return; } for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = globalThis[ARRAY]; if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { defineBuiltIn(TypedArrayConstructor, KEY, property); } } }; for (NAME in TypedArrayConstructorsList) { Constructor = globalThis[NAME]; Prototype = Constructor && Constructor.prototype; if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor; else NATIVE_ARRAY_BUFFER_VIEWS = false; } for (NAME in BigIntArrayConstructorsList) { Constructor = globalThis[NAME]; Prototype = Constructor && Constructor.prototype; if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor; } // WebKit bug - typed arrays constructors prototype is Object.prototype if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) { // eslint-disable-next-line no-shadow -- safe TypedArray = function TypedArray() { throw new TypeError('Incorrect invocation'); }; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (globalThis[NAME]) setPrototypeOf(globalThis[NAME], TypedArray); } } if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) { TypedArrayPrototype = TypedArray.prototype; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (globalThis[NAME]) setPrototypeOf(globalThis[NAME].prototype, TypedArrayPrototype); } } // WebKit bug - one more object in Uint8ClampedArray prototype chain if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) { setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype); } if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) { TYPED_ARRAY_TAG_REQUIRED = true; defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG, { configurable: true, get: function () { return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; } }); for (NAME in TypedArrayConstructorsList) if (globalThis[NAME]) { createNonEnumerableProperty(globalThis[NAME].prototype, TYPED_ARRAY_TAG, NAME); } } module.exports = { NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG, aTypedArray: aTypedArray, aTypedArrayConstructor: aTypedArrayConstructor, exportTypedArrayMethod: exportTypedArrayMethod, exportTypedArrayStaticMethod: exportTypedArrayStaticMethod, getTypedArrayConstructor: getTypedArrayConstructor, isView: isView, isTypedArray: isTypedArray, TypedArray: TypedArray, TypedArrayPrototype: TypedArrayPrototype }; /***/ }), /***/ "ebc1": /***/ (function(module, exports, __webpack_require__) { "use strict"; var userAgent = __webpack_require__("b5db"); module.exports = /ipad|iphone|ipod/i.test(userAgent) && typeof Pebble != 'undefined'; /***/ }), /***/ "ec87": /***/ (function(module, exports, __webpack_require__) { "use strict"; var userAgent = __webpack_require__("b5db"); module.exports = /web0s(?!.*chrome)/i.test(userAgent); /***/ }), /***/ "edd0": /***/ (function(module, exports, __webpack_require__) { "use strict"; var makeBuiltIn = __webpack_require__("13d2"); var defineProperty = __webpack_require__("9bf2"); module.exports = function (target, name, descriptor) { if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); return defineProperty.f(target, name, descriptor); }; /***/ }), /***/ "ee42": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("e260"); __webpack_require__("d3b7"); __webpack_require__("1fe2"); var path = __webpack_require__("428f"); module.exports = path.WeakSet; /***/ }), /***/ "efe9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var defineWellKnownSymbol = __webpack_require__("e065"); // `Symbol.isConcatSpreadable` well-known symbol // https://tc39.es/ecma262/#sec-symbol.isconcatspreadable defineWellKnownSymbol('isConcatSpreadable'); /***/ }), /***/ "f069": /***/ (function(module, exports, __webpack_require__) { "use strict"; var aCallable = __webpack_require__("59ed"); var $TypeError = TypeError; var PromiseCapability = function (C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aCallable(resolve); this.reject = aCallable(reject); }; // `NewPromiseCapability` abstract operation // https://tc39.es/ecma262/#sec-newpromisecapability module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /***/ "f183": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("e330"); var hiddenKeys = __webpack_require__("d012"); var isObject = __webpack_require__("861d"); var hasOwn = __webpack_require__("1a2d"); var defineProperty = __webpack_require__("9bf2").f; var getOwnPropertyNamesModule = __webpack_require__("241c"); var getOwnPropertyNamesExternalModule = __webpack_require__("057f"); var isExtensible = __webpack_require__("4fad"); var uid = __webpack_require__("90e3"); var FREEZING = __webpack_require__("bb2f"); var REQUIRED = false; var METADATA = uid('meta'); var id = 0; var setMetadata = function (it) { defineProperty(it, METADATA, { value: { objectID: 'O' + id++, // object ID weakData: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return a primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMetadata(it); // return object ID } return it[METADATA].objectID; }; var getWeakData = function (it, create) { if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMetadata(it); // return the store of weak collections IDs } return it[METADATA].weakData; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it); return it; }; var enable = function () { meta.enable = function () { /* empty */ }; REQUIRED = true; var getOwnPropertyNames = getOwnPropertyNamesModule.f; var splice = uncurryThis([].splice); var test = {}; // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation test[METADATA] = 1; // prevent exposing of metadata key if (getOwnPropertyNames(test).length) { getOwnPropertyNamesModule.f = function (it) { var result = getOwnPropertyNames(it); for (var i = 0, length = result.length; i < length; i++) { if (result[i] === METADATA) { splice(result, i, 1); break; } } return result; }; $({ target: 'Object', stat: true, forced: true }, { getOwnPropertyNames: getOwnPropertyNamesExternalModule.f }); } }; var meta = module.exports = { enable: enable, fastKey: fastKey, getWeakData: getWeakData, onFreeze: onFreeze }; hiddenKeys[METADATA] = true; /***/ }), /***/ "f22b": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var newPromiseCapabilityModule = __webpack_require__("f069"); var FORCED_PROMISE_CONSTRUCTOR = __webpack_require__("4738").CONSTRUCTOR; // `Promise.reject` method // https://tc39.es/ecma262/#sec-promise.reject $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, { reject: function reject(r) { var capability = newPromiseCapabilityModule.f(this); var capabilityReject = capability.reject; capabilityReject(r); return capability.promise; } }); /***/ }), /***/ "f2e6": /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__("8ba4"); var path = __webpack_require__("428f"); module.exports = path.Number.isInteger; /***/ }), /***/ "f33e": /***/ (function(module, exports, __webpack_require__) { (function(){ // Copyright (c) 2005 Tom Wu // All Rights Reserved. // See "LICENSE" for details. // Basic JavaScript BN library - subset useful for RSA encryption. // Bits per digit var dbits; // JavaScript engine analysis var canary = 0xdeadbeefcafe; var j_lm = ((canary&0xffffff)==0xefcafe); // (public) Constructor function BigInteger(a,b,c) { if(a != null) if("number" == typeof a) this.fromNumber(a,b,c); else if(b == null && "string" != typeof a) this.fromString(a,256); else this.fromString(a,b); } // return new, unset BigInteger function nbi() { return new BigInteger(null); } // am: Compute w_j += (x*this_i), propagate carries, // c is initial carry, returns final carry. // c < 3*dvalue, x < 2*dvalue, this_i < dvalue // We need to select the fastest one that works in this environment. // am1: use a single mult and divide to get the high bits, // max digit bits should be 26 because // max internal value = 2*dvalue^2-2*dvalue (< 2^53) function am1(i,x,w,j,c,n) { while(--n >= 0) { var v = x*this[i++]+w[j]+c; c = Math.floor(v/0x4000000); w[j++] = v&0x3ffffff; } return c; } // am2 avoids a big mult-and-extract completely. // Max digit bits should be <= 30 because we do bitwise ops // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) function am2(i,x,w,j,c,n) { var xl = x&0x7fff, xh = x>>15; while(--n >= 0) { var l = this[i]&0x7fff; var h = this[i++]>>15; var m = xh*l+h*xl; l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); w[j++] = l&0x3fffffff; } return c; } // Alternately, set max digit bits to 28 since some // browsers slow down when dealing with 32-bit numbers. function am3(i,x,w,j,c,n) { var xl = x&0x3fff, xh = x>>14; while(--n >= 0) { var l = this[i]&0x3fff; var h = this[i++]>>14; var m = xh*l+h*xl; l = xl*l+((m&0x3fff)<<14)+w[j]+c; c = (l>>28)+(m>>14)+xh*h; w[j++] = l&0xfffffff; } return c; } var inBrowser = typeof navigator !== "undefined"; if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { BigInteger.prototype.am = am2; dbits = 30; } else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { BigInteger.prototype.am = am1; dbits = 26; } else { // Mozilla/Netscape seems to prefer am3 BigInteger.prototype.am = am3; dbits = 28; } BigInteger.prototype.DB = dbits; BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; r.t = this.t; r.s = this.s; } // (protected) set from integer value x, -DV <= x < DV function bnpFromInt(x) { this.t = 1; this.s = (x<0)?-1:0; if(x > 0) this[0] = x; else if(x < -1) this[0] = x+this.DV; else this.t = 0; } // return bigint initialized to value function nbv(i) { var r = nbi(); r.fromInt(i); return r; } // (protected) set from string and radix function bnpFromString(s,b) { var k; if(b == 16) k = 4; else if(b == 8) k = 3; else if(b == 256) k = 8; // byte array else if(b == 2) k = 1; else if(b == 32) k = 5; else if(b == 4) k = 2; else { this.fromRadix(s,b); return; } this.t = 0; this.s = 0; var i = s.length, mi = false, sh = 0; while(--i >= 0) { var x = (k==8)?s[i]&0xff:intAt(s,i); if(x < 0) { if(s.charAt(i) == "-") mi = true; continue; } mi = false; if(sh == 0) this[this.t++] = x; else if(sh+k > this.DB) { this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); } else this[this.t-1] |= x<= this.DB) sh -= this.DB; } if(k == 8 && (s[0]&0x80) != 0) { this.s = -1; if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; } // (public) return string representation in given radix function bnToString(b) { if(this.s < 0) return "-"+this.negate().toString(b); var k; if(b == 16) k = 4; else if(b == 8) k = 3; else if(b == 2) k = 1; else if(b == 32) k = 5; else if(b == 4) k = 2; else return this.toRadix(b); var km = (1< 0) { if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } while(i >= 0) { if(p < k) { d = (this[i]&((1<>(p+=this.DB-k); } else { d = (this[i]>>(p-=k))&km; if(p <= 0) { p += this.DB; --i; } } if(d > 0) m = true; if(m) r += int2char(d); } } return m?r:"0"; } // (public) -this function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } // (public) |this| function bnAbs() { return (this.s<0)?this.negate():this; } // (public) return + if this > a, - if this < a, 0 if equal function bnCompareTo(a) { var r = this.s-a.s; if(r != 0) return r; var i = this.t; r = i-a.t; if(r != 0) return (this.s<0)?-r:r; while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; return 0; } // returns bit length of the integer x function nbits(x) { var r = 1, t; if((t=x>>>16) != 0) { x = t; r += 16; } if((t=x>>8) != 0) { x = t; r += 8; } if((t=x>>4) != 0) { x = t; r += 4; } if((t=x>>2) != 0) { x = t; r += 2; } if((t=x>>1) != 0) { x = t; r += 1; } return r; } // (public) return the number of bits in "this" function bnBitLength() { if(this.t <= 0) return 0; return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); } // (protected) r = this << n*DB function bnpDLShiftTo(n,r) { var i; for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; for(i = n-1; i >= 0; --i) r[i] = 0; r.t = this.t+n; r.s = this.s; } // (protected) r = this >> n*DB function bnpDRShiftTo(n,r) { for(var i = n; i < this.t; ++i) r[i-n] = this[i]; r.t = Math.max(this.t-n,0); r.s = this.s; } // (protected) r = this << n function bnpLShiftTo(n,r) { var bs = n%this.DB; var cbs = this.DB-bs; var bm = (1<= 0; --i) { r[i+ds+1] = (this[i]>>cbs)|c; c = (this[i]&bm)<= 0; --i) r[i] = 0; r[ds] = c; r.t = this.t+ds+1; r.s = this.s; r.clamp(); } // (protected) r = this >> n function bnpRShiftTo(n,r) { r.s = this.s; var ds = Math.floor(n/this.DB); if(ds >= this.t) { r.t = 0; return; } var bs = n%this.DB; var cbs = this.DB-bs; var bm = (1<>bs; for(var i = ds+1; i < this.t; ++i) { r[i-ds-1] |= (this[i]&bm)<>bs; } if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; } if(a.t < this.t) { c -= a.s; while(i < this.t) { c += this[i]; r[i++] = c&this.DM; c >>= this.DB; } c += this.s; } else { c += this.s; while(i < a.t) { c -= a[i]; r[i++] = c&this.DM; c >>= this.DB; } c -= a.s; } r.s = (c<0)?-1:0; if(c < -1) r[i++] = this.DV+c; else if(c > 0) r[i++] = c; r.t = i; r.clamp(); } // (protected) r = this * a, r != this,a (HAC 14.12) // "this" should be the larger one if appropriate. function bnpMultiplyTo(a,r) { var x = this.abs(), y = a.abs(); var i = x.t; r.t = i+y.t; while(--i >= 0) r[i] = 0; for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); r.s = 0; r.clamp(); if(this.s != a.s) BigInteger.ZERO.subTo(r,r); } // (protected) r = this^2, r != this (HAC 14.16) function bnpSquareTo(r) { var x = this.abs(); var i = r.t = 2*x.t; while(--i >= 0) r[i] = 0; for(i = 0; i < x.t-1; ++i) { var c = x.am(i,x[i],r,2*i,0,1); if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { r[i+x.t] -= x.DV; r[i+x.t+1] = 1; } } if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); r.s = 0; r.clamp(); } // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) // r != q, this != m. q or r may be null. function bnpDivRemTo(m,q,r) { var pm = m.abs(); if(pm.t <= 0) return; var pt = this.abs(); if(pt.t < pm.t) { if(q != null) q.fromInt(0); if(r != null) this.copyTo(r); return; } if(r == null) r = nbi(); var y = nbi(), ts = this.s, ms = m.s; var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } else { pm.copyTo(y); pt.copyTo(r); } var ys = y.t; var y0 = y[ys-1]; if(y0 == 0) return; var yt = y0*(1<1)?y[ys-2]>>this.F2:0); var d1 = this.FV/yt, d2 = (1<= 0) { r[r.t++] = 1; r.subTo(t,r); } BigInteger.ONE.dlShiftTo(ys,t); t.subTo(y,y); // "negative" y so we can replace sub with am later while(y.t < ys) y[y.t++] = 0; while(--j >= 0) { // Estimate quotient digit var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out y.dlShiftTo(j,t); r.subTo(t,r); while(r[i] < --qd) r.subTo(t,r); } } if(q != null) { r.drShiftTo(ys,q); if(ts != ms) BigInteger.ZERO.subTo(q,q); } r.t = ys; r.clamp(); if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder if(ts < 0) BigInteger.ZERO.subTo(r,r); } // (public) this mod a function bnMod(a) { var r = nbi(); this.abs().divRemTo(a,null,r); if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); return r; } // Modular reduction using "classic" algorithm function Classic(m) { this.m = m; } function cConvert(x) { if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); else return x; } function cRevert(x) { return x; } function cReduce(x) { x.divRemTo(this.m,null,x); } function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } Classic.prototype.convert = cConvert; Classic.prototype.revert = cRevert; Classic.prototype.reduce = cReduce; Classic.prototype.mulTo = cMulTo; Classic.prototype.sqrTo = cSqrTo; // (protected) return "-1/this % 2^DB"; useful for Mont. reduction // justification: // xy == 1 (mod m) // xy = 1+km // xy(2-xy) = (1+km)(1-km) // x[y(2-xy)] = 1-k^2m^2 // x[y(2-xy)] == 1 (mod m^2) // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. // JS multiply "overflows" differently from C/C++, so care is needed here. function bnpInvDigit() { if(this.t < 1) return 0; var x = this[0]; if((x&1) == 0) return 0; var y = x&3; // y == 1/x mod 2^2 y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 // last step - calculate inverse mod DV directly; // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits // we really want the negative inverse, and -DV < y < DV return (y>0)?this.DV-y:-y; } // Montgomery reduction function Montgomery(m) { this.m = m; this.mp = m.invDigit(); this.mpl = this.mp&0x7fff; this.mph = this.mp>>15; this.um = (1<<(m.DB-15))-1; this.mt2 = 2*m.t; } // xR mod m function montConvert(x) { var r = nbi(); x.abs().dlShiftTo(this.m.t,r); r.divRemTo(this.m,null,r); if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); return r; } // x/R mod m function montRevert(x) { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } // x = x/R mod m (HAC 14.32) function montReduce(x) { while(x.t <= this.mt2) // pad x so am has enough room later x[x.t++] = 0; for(var i = 0; i < this.m.t; ++i) { // faster way of calculating u0 = x[i]*mp mod DV var j = x[i]&0x7fff; var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; // use am to combine the multiply-shift-add into one call j = i+this.m.t; x[j] += this.m.am(0,u0,x,i,0,this.m.t); // propagate carry while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } } x.clamp(); x.drShiftTo(this.m.t,x); if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); } // r = "x^2/R mod m"; x != r function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } // r = "xy/R mod m"; x,y != r function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } Montgomery.prototype.convert = montConvert; Montgomery.prototype.revert = montRevert; Montgomery.prototype.reduce = montReduce; Montgomery.prototype.mulTo = montMulTo; Montgomery.prototype.sqrTo = montSqrTo; // (protected) true iff this is even function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) function bnpExp(e,z) { if(e > 0xffffffff || e < 1) return BigInteger.ONE; var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; g.copyTo(r); while(--i >= 0) { z.sqrTo(r,r2); if((e&(1< 0) z.mulTo(r2,g,r); else { var t = r; r = r2; r2 = t; } } return z.revert(r); } // (public) this^e % m, 0 <= e < 2^32 function bnModPowInt(e,m) { var z; if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); return this.exp(e,z); } // protected BigInteger.prototype.copyTo = bnpCopyTo; BigInteger.prototype.fromInt = bnpFromInt; BigInteger.prototype.fromString = bnpFromString; BigInteger.prototype.clamp = bnpClamp; BigInteger.prototype.dlShiftTo = bnpDLShiftTo; BigInteger.prototype.drShiftTo = bnpDRShiftTo; BigInteger.prototype.lShiftTo = bnpLShiftTo; BigInteger.prototype.rShiftTo = bnpRShiftTo; BigInteger.prototype.subTo = bnpSubTo; BigInteger.prototype.multiplyTo = bnpMultiplyTo; BigInteger.prototype.squareTo = bnpSquareTo; BigInteger.prototype.divRemTo = bnpDivRemTo; BigInteger.prototype.invDigit = bnpInvDigit; BigInteger.prototype.isEven = bnpIsEven; BigInteger.prototype.exp = bnpExp; // public BigInteger.prototype.toString = bnToString; BigInteger.prototype.negate = bnNegate; BigInteger.prototype.abs = bnAbs; BigInteger.prototype.compareTo = bnCompareTo; BigInteger.prototype.bitLength = bnBitLength; BigInteger.prototype.mod = bnMod; BigInteger.prototype.modPowInt = bnModPowInt; // "constants" BigInteger.ZERO = nbv(0); BigInteger.ONE = nbv(1); // Copyright (c) 2005-2009 Tom Wu // All Rights Reserved. // See "LICENSE" for details. // Extended JavaScript BN functions, required for RSA private ops. // Version 1.1: new BigInteger("0", 10) returns "proper" zero // Version 1.2: square() API, isProbablePrime fix // (public) function bnClone() { var r = nbi(); this.copyTo(r); return r; } // (public) return value as integer function bnIntValue() { if(this.s < 0) { if(this.t == 1) return this[0]-this.DV; else if(this.t == 0) return -1; } else if(this.t == 1) return this[0]; else if(this.t == 0) return 0; // assumes 16 < DB < 32 return ((this[1]&((1<<(32-this.DB))-1))<>24; } // (public) return value as short (assumes DB>=16) function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } // (protected) return x s.t. r^x < DV function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } // (public) 0 if this == 0, 1 if this > 0 function bnSigNum() { if(this.s < 0) return -1; else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; else return 1; } // (protected) convert to radix string function bnpToRadix(b) { if(b == null) b = 10; if(this.signum() == 0 || b < 2 || b > 36) return "0"; var cs = this.chunkSize(b); var a = Math.pow(b,cs); var d = nbv(a), y = nbi(), z = nbi(), r = ""; this.divRemTo(d,y,z); while(y.signum() > 0) { r = (a+z.intValue()).toString(b).substr(1) + r; y.divRemTo(d,y,z); } return z.intValue().toString(b) + r; } // (protected) convert from radix string function bnpFromRadix(s,b) { this.fromInt(0); if(b == null) b = 10; var cs = this.chunkSize(b); var d = Math.pow(b,cs), mi = false, j = 0, w = 0; for(var i = 0; i < s.length; ++i) { var x = intAt(s,i); if(x < 0) { if(s.charAt(i) == "-" && this.signum() == 0) mi = true; continue; } w = b*w+x; if(++j >= cs) { this.dMultiply(d); this.dAddOffset(w,0); j = 0; w = 0; } } if(j > 0) { this.dMultiply(Math.pow(b,j)); this.dAddOffset(w,0); } if(mi) BigInteger.ZERO.subTo(this,this); } // (protected) alternate constructor function bnpFromNumber(a,b,c) { if("number" == typeof b) { // new BigInteger(int,int,RNG) if(a < 2) this.fromInt(1); else { this.fromNumber(a,c); if(!this.testBit(a-1)) // force MSB set this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); if(this.isEven()) this.dAddOffset(1,0); // force odd while(!this.isProbablePrime(b)) { this.dAddOffset(2,0); if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); } } } else { // new BigInteger(int,RNG) var x = new Array(), t = a&7; x.length = (a>>3)+1; b.nextBytes(x); if(t > 0) x[0] &= ((1< 0) { if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) r[k++] = d|(this.s<<(this.DB-p)); while(i >= 0) { if(p < 8) { d = (this[i]&((1<>(p+=this.DB-8); } else { d = (this[i]>>(p-=8))&0xff; if(p <= 0) { p += this.DB; --i; } } if((d&0x80) != 0) d |= -256; if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; if(k > 0 || d != this.s) r[k++] = d; } } return r; } function bnEquals(a) { return(this.compareTo(a)==0); } function bnMin(a) { return(this.compareTo(a)<0)?this:a; } function bnMax(a) { return(this.compareTo(a)>0)?this:a; } // (protected) r = this op a (bitwise) function bnpBitwiseTo(a,op,r) { var i, f, m = Math.min(a.t,this.t); for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); if(a.t < this.t) { f = a.s&this.DM; for(i = m; i < this.t; ++i) r[i] = op(this[i],f); r.t = this.t; } else { f = this.s&this.DM; for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); r.t = a.t; } r.s = op(this.s,a.s); r.clamp(); } // (public) this & a function op_and(x,y) { return x&y; } function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } // (public) this | a function op_or(x,y) { return x|y; } function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } // (public) this ^ a function op_xor(x,y) { return x^y; } function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } // (public) this & ~a function op_andnot(x,y) { return x&~y; } function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } // (public) ~this function bnNot() { var r = nbi(); for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; r.t = this.t; r.s = ~this.s; return r; } // (public) this << n function bnShiftLeft(n) { var r = nbi(); if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); return r; } // (public) this >> n function bnShiftRight(n) { var r = nbi(); if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); return r; } // return index of lowest 1-bit in x, x < 2^31 function lbit(x) { if(x == 0) return -1; var r = 0; if((x&0xffff) == 0) { x >>= 16; r += 16; } if((x&0xff) == 0) { x >>= 8; r += 8; } if((x&0xf) == 0) { x >>= 4; r += 4; } if((x&3) == 0) { x >>= 2; r += 2; } if((x&1) == 0) ++r; return r; } // (public) returns index of lowest 1-bit (or -1 if none) function bnGetLowestSetBit() { for(var i = 0; i < this.t; ++i) if(this[i] != 0) return i*this.DB+lbit(this[i]); if(this.s < 0) return this.t*this.DB; return -1; } // return number of 1 bits in x function cbit(x) { var r = 0; while(x != 0) { x &= x-1; ++r; } return r; } // (public) return number of set bits function bnBitCount() { var r = 0, x = this.s&this.DM; for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); return r; } // (public) true iff nth bit is set function bnTestBit(n) { var j = Math.floor(n/this.DB); if(j >= this.t) return(this.s!=0); return((this[j]&(1<<(n%this.DB)))!=0); } // (protected) this op (1<>= this.DB; } if(a.t < this.t) { c += a.s; while(i < this.t) { c += this[i]; r[i++] = c&this.DM; c >>= this.DB; } c += this.s; } else { c += this.s; while(i < a.t) { c += a[i]; r[i++] = c&this.DM; c >>= this.DB; } c += a.s; } r.s = (c<0)?-1:0; if(c > 0) r[i++] = c; else if(c < -1) r[i++] = this.DV+c; r.t = i; r.clamp(); } // (public) this + a function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } // (public) this - a function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } // (public) this * a function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } // (public) this^2 function bnSquare() { var r = nbi(); this.squareTo(r); return r; } // (public) this / a function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } // (public) this % a function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } // (public) [this/a,this%a] function bnDivideAndRemainder(a) { var q = nbi(), r = nbi(); this.divRemTo(a,q,r); return new Array(q,r); } // (protected) this *= n, this >= 0, 1 < n < DV function bnpDMultiply(n) { this[this.t] = this.am(0,n-1,this,0,0,this.t); ++this.t; this.clamp(); } // (protected) this += n << w words, this >= 0 function bnpDAddOffset(n,w) { if(n == 0) return; while(this.t <= w) this[this.t++] = 0; this[w] += n; while(this[w] >= this.DV) { this[w] -= this.DV; if(++w >= this.t) this[this.t++] = 0; ++this[w]; } } // A "null" reducer function NullExp() {} function nNop(x) { return x; } function nMulTo(x,y,r) { x.multiplyTo(y,r); } function nSqrTo(x,r) { x.squareTo(r); } NullExp.prototype.convert = nNop; NullExp.prototype.revert = nNop; NullExp.prototype.mulTo = nMulTo; NullExp.prototype.sqrTo = nSqrTo; // (public) this^e function bnPow(e) { return this.exp(e,new NullExp()); } // (protected) r = lower n words of "this * a", a.t <= n // "this" should be the larger one if appropriate. function bnpMultiplyLowerTo(a,n,r) { var i = Math.min(this.t+a.t,n); r.s = 0; // assumes a,this >= 0 r.t = i; while(i > 0) r[--i] = 0; var j; for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); r.clamp(); } // (protected) r = "this * a" without lower n words, n > 0 // "this" should be the larger one if appropriate. function bnpMultiplyUpperTo(a,n,r) { --n; var i = r.t = this.t+a.t-n; r.s = 0; // assumes a,this >= 0 while(--i >= 0) r[i] = 0; for(i = Math.max(n-this.t,0); i < a.t; ++i) r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); r.clamp(); r.drShiftTo(1,r); } // Barrett modular reduction function Barrett(m) { // setup Barrett this.r2 = nbi(); this.q3 = nbi(); BigInteger.ONE.dlShiftTo(2*m.t,this.r2); this.mu = this.r2.divide(m); this.m = m; } function barrettConvert(x) { if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); else if(x.compareTo(this.m) < 0) return x; else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } } function barrettRevert(x) { return x; } // x = x mod m (HAC 14.42) function barrettReduce(x) { x.drShiftTo(this.m.t-1,this.r2); if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); x.subTo(this.r2,x); while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); } // r = x^2 mod m; x != r function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } // r = x*y mod m; x,y != r function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } Barrett.prototype.convert = barrettConvert; Barrett.prototype.revert = barrettRevert; Barrett.prototype.reduce = barrettReduce; Barrett.prototype.mulTo = barrettMulTo; Barrett.prototype.sqrTo = barrettSqrTo; // (public) this^e % m (HAC 14.85) function bnModPow(e,m) { var i = e.bitLength(), k, r = nbv(1), z; if(i <= 0) return r; else if(i < 18) k = 1; else if(i < 48) k = 3; else if(i < 144) k = 4; else if(i < 768) k = 5; else k = 6; if(i < 8) z = new Classic(m); else if(m.isEven()) z = new Barrett(m); else z = new Montgomery(m); // precomputation var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { var g2 = nbi(); z.sqrTo(g[1],g2); while(n <= km) { g[n] = nbi(); z.mulTo(g2,g[n-2],g[n]); n += 2; } } var j = e.t-1, w, is1 = true, r2 = nbi(), t; i = nbits(e[j])-1; while(j >= 0) { if(i >= k1) w = (e[j]>>(i-k1))&km; else { w = (e[j]&((1<<(i+1))-1))<<(k1-i); if(j > 0) w |= e[j-1]>>(this.DB+i-k1); } n = k; while((w&1) == 0) { w >>= 1; --n; } if((i -= n) < 0) { i += this.DB; --j; } if(is1) { // ret == 1, don't bother squaring or multiplying it g[w].copyTo(r); is1 = false; } else { while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } z.mulTo(r2,g[w],r); } while(j >= 0 && (e[j]&(1< 0) { x.rShiftTo(g,x); y.rShiftTo(g,y); } while(x.signum() > 0) { if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); if(x.compareTo(y) >= 0) { x.subTo(y,x); x.rShiftTo(1,x); } else { y.subTo(x,y); y.rShiftTo(1,y); } } if(g > 0) y.lShiftTo(g,y); return y; } // (protected) this % n, n < 2^26 function bnpModInt(n) { if(n <= 0) return 0; var d = this.DV%n, r = (this.s<0)?n-1:0; if(this.t > 0) if(d == 0) r = this[0]%n; else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; return r; } // (public) 1/this % m (HAC 14.61) function bnModInverse(m) { var ac = m.isEven(); if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; var u = m.clone(), v = this.clone(); var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); while(u.signum() != 0) { while(u.isEven()) { u.rShiftTo(1,u); if(ac) { if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } a.rShiftTo(1,a); } else if(!b.isEven()) b.subTo(m,b); b.rShiftTo(1,b); } while(v.isEven()) { v.rShiftTo(1,v); if(ac) { if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } c.rShiftTo(1,c); } else if(!d.isEven()) d.subTo(m,d); d.rShiftTo(1,d); } if(u.compareTo(v) >= 0) { u.subTo(v,u); if(ac) a.subTo(c,a); b.subTo(d,b); } else { v.subTo(u,v); if(ac) c.subTo(a,c); d.subTo(b,d); } } if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; if(d.compareTo(m) >= 0) return d.subtract(m); if(d.signum() < 0) d.addTo(m,d); else return d; if(d.signum() < 0) return d.add(m); else return d; } var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; var lplim = (1<<26)/lowprimes[lowprimes.length-1]; // (public) test primality with certainty >= 1-.5^t function bnIsProbablePrime(t) { var i, x = this.abs(); if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { for(i = 0; i < lowprimes.length; ++i) if(x[0] == lowprimes[i]) return true; return false; } if(x.isEven()) return false; i = 1; while(i < lowprimes.length) { var m = lowprimes[i], j = i+1; while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; m = x.modInt(m); while(i < j) if(m%lowprimes[i++] == 0) return false; } return x.millerRabin(t); } // (protected) true if probably prime (HAC 4.24, Miller-Rabin) function bnpMillerRabin(t) { var n1 = this.subtract(BigInteger.ONE); var k = n1.getLowestSetBit(); if(k <= 0) return false; var r = n1.shiftRight(k); t = (t+1)>>1; if(t > lowprimes.length) t = lowprimes.length; var a = nbi(); for(var i = 0; i < t; ++i) { //Pick bases at random, instead of starting at 2 a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); var y = a.modPow(r,this); if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { var j = 1; while(j++ < k && y.compareTo(n1) != 0) { y = y.modPowInt(2,this); if(y.compareTo(BigInteger.ONE) == 0) return false; } if(y.compareTo(n1) != 0) return false; } } return true; } // protected BigInteger.prototype.chunkSize = bnpChunkSize; BigInteger.prototype.toRadix = bnpToRadix; BigInteger.prototype.fromRadix = bnpFromRadix; BigInteger.prototype.fromNumber = bnpFromNumber; BigInteger.prototype.bitwiseTo = bnpBitwiseTo; BigInteger.prototype.changeBit = bnpChangeBit; BigInteger.prototype.addTo = bnpAddTo; BigInteger.prototype.dMultiply = bnpDMultiply; BigInteger.prototype.dAddOffset = bnpDAddOffset; BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; BigInteger.prototype.modInt = bnpModInt; BigInteger.prototype.millerRabin = bnpMillerRabin; // public BigInteger.prototype.clone = bnClone; BigInteger.prototype.intValue = bnIntValue; BigInteger.prototype.byteValue = bnByteValue; BigInteger.prototype.shortValue = bnShortValue; BigInteger.prototype.signum = bnSigNum; BigInteger.prototype.toByteArray = bnToByteArray; BigInteger.prototype.equals = bnEquals; BigInteger.prototype.min = bnMin; BigInteger.prototype.max = bnMax; BigInteger.prototype.and = bnAnd; BigInteger.prototype.or = bnOr; BigInteger.prototype.xor = bnXor; BigInteger.prototype.andNot = bnAndNot; BigInteger.prototype.not = bnNot; BigInteger.prototype.shiftLeft = bnShiftLeft; BigInteger.prototype.shiftRight = bnShiftRight; BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; BigInteger.prototype.bitCount = bnBitCount; BigInteger.prototype.testBit = bnTestBit; BigInteger.prototype.setBit = bnSetBit; BigInteger.prototype.clearBit = bnClearBit; BigInteger.prototype.flipBit = bnFlipBit; BigInteger.prototype.add = bnAdd; BigInteger.prototype.subtract = bnSubtract; BigInteger.prototype.multiply = bnMultiply; BigInteger.prototype.divide = bnDivide; BigInteger.prototype.remainder = bnRemainder; BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; BigInteger.prototype.modPow = bnModPow; BigInteger.prototype.modInverse = bnModInverse; BigInteger.prototype.pow = bnPow; BigInteger.prototype.gcd = bnGCD; BigInteger.prototype.isProbablePrime = bnIsProbablePrime; // JSBN-specific extension BigInteger.prototype.square = bnSquare; // Expose the Barrett function BigInteger.prototype.Barrett = Barrett // BigInteger interfaces not implemented in jsbn: // BigInteger(int signum, byte[] magnitude) // double doubleValue() // float floatValue() // int hashCode() // long longValue() // static BigInteger valueOf(long val) // Random number generator - requires a PRNG backend, e.g. prng4.js // For best results, put code like // // in your main HTML document. var rng_state; var rng_pool; var rng_pptr; // Mix in a 32-bit integer into the pool function rng_seed_int(x) { rng_pool[rng_pptr++] ^= x & 255; rng_pool[rng_pptr++] ^= (x >> 8) & 255; rng_pool[rng_pptr++] ^= (x >> 16) & 255; rng_pool[rng_pptr++] ^= (x >> 24) & 255; if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; } // Mix in the current time (w/milliseconds) into the pool function rng_seed_time() { rng_seed_int(new Date().getTime()); } // Initialize the pool with junk if needed. if(rng_pool == null) { rng_pool = new Array(); rng_pptr = 0; var t; if(typeof window !== "undefined" && window.crypto) { if (window.crypto.getRandomValues) { // Use webcrypto if available var ua = new Uint8Array(32); window.crypto.getRandomValues(ua); for(t = 0; t < 32; ++t) rng_pool[rng_pptr++] = ua[t]; } else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { // Extract entropy (256 bits) from NS4 RNG if available var z = window.crypto.random(32); for(t = 0; t < z.length; ++t) rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; } } while(rng_pptr < rng_psize) { // extract some randomness from Math.random() t = Math.floor(65536 * Math.random()); rng_pool[rng_pptr++] = t >>> 8; rng_pool[rng_pptr++] = t & 255; } rng_pptr = 0; rng_seed_time(); //rng_seed_int(window.screenX); //rng_seed_int(window.screenY); } function rng_get_byte() { if(rng_state == null) { rng_seed_time(); rng_state = prng_newstate(); rng_state.init(rng_pool); for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) rng_pool[rng_pptr] = 0; rng_pptr = 0; //rng_pool = null; } // TODO: allow reseeding after first request return rng_state.next(); } function rng_get_bytes(ba) { var i; for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); } function SecureRandom() {} SecureRandom.prototype.nextBytes = rng_get_bytes; // prng4.js - uses Arcfour as a PRNG function Arcfour() { this.i = 0; this.j = 0; this.S = new Array(); } // Initialize arcfour context from key, an array of ints, each from [0..255] function ARC4init(key) { var i, j, t; for(i = 0; i < 256; ++i) this.S[i] = i; j = 0; for(i = 0; i < 256; ++i) { j = (j + this.S[i] + key[i % key.length]) & 255; t = this.S[i]; this.S[i] = this.S[j]; this.S[j] = t; } this.i = 0; this.j = 0; } function ARC4next() { var t; this.i = (this.i + 1) & 255; this.j = (this.j + this.S[this.i]) & 255; t = this.S[this.i]; this.S[this.i] = this.S[this.j]; this.S[this.j] = t; return this.S[(t + this.S[this.i]) & 255]; } Arcfour.prototype.init = ARC4init; Arcfour.prototype.next = ARC4next; // Plug in your RNG constructor here function prng_newstate() { return new Arcfour(); } // Pool size must be a multiple of 4 and greater than 32. // An array of bytes the size of the pool will be passed to init() var rng_psize = 256; if (true) { exports = module.exports = { default: BigInteger, BigInteger: BigInteger, SecureRandom: SecureRandom, }; } else {} }).call(this); /***/ }), /***/ "f354": /***/ (function(module, exports, __webpack_require__) { "use strict"; var fails = __webpack_require__("d039"); var wellKnownSymbol = __webpack_require__("b622"); var DESCRIPTORS = __webpack_require__("83ab"); var IS_PURE = __webpack_require__("c430"); var ITERATOR = wellKnownSymbol('iterator'); module.exports = !fails(function () { // eslint-disable-next-line unicorn/relative-url-style -- required for testing var url = new URL('b?a=1&b=2&c=3', 'https://a'); var params = url.searchParams; var params2 = new URLSearchParams('a=1&a=2&b=3'); var result = ''; url.pathname = 'c%20d'; params.forEach(function (value, key) { params['delete']('b'); result += key + value; }); params2['delete']('a', 2); // `undefined` case is a Chromium 117 bug // https://bugs.chromium.org/p/v8/issues/detail?id=14222 params2['delete']('b', undefined); return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b'))) || (!params.size && (IS_PURE || !DESCRIPTORS)) || !params.sort || url.href !== 'https://a/c%20d?a=1&c=3' || params.get('c') !== '3' || String(new URLSearchParams('?a=1')) !== 'a=1' || !params[ITERATOR] // throws in Edge || new URL('https://a@b').username !== 'a' || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b' // not punycoded in Edge || new URL('https://тест').host !== 'xn--e1aybc' // not escaped in Chrome 62- || new URL('https://a#б').hash !== '#%D0%B1' // fails in Chrome 66- || result !== 'a1c3' // throws in Safari || new URL('https://x', undefined).host !== 'x'; }); /***/ }), /***/ "f36a": /***/ (function(module, exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__("e330"); module.exports = uncurryThis([].slice); /***/ }), /***/ "f480": /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = function(tagname, parent, val) { this.tagname = tagname; this.parent = parent; this.child = {}; //child tags this.attrsMap = {}; //attributes map this.val = val; //text only this.addChild = function(child) { if (Array.isArray(this.child[child.tagname])) { //already presents this.child[child.tagname].push(child); } else { this.child[child.tagname] = [child]; } }; }; /***/ }), /***/ "f495": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toPrimitive = __webpack_require__("c04e"); var $TypeError = TypeError; // `ToBigInt` abstract operation // https://tc39.es/ecma262/#sec-tobigint module.exports = function (argument) { var prim = toPrimitive(argument, 'number'); if (typeof prim == 'number') throw new $TypeError("Can't convert number to bigint"); // eslint-disable-next-line es/no-bigint -- safe return BigInt(prim); }; /***/ }), /***/ "f5b2": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var codeAt = __webpack_require__("6547").codeAt; // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat $({ target: 'String', proto: true }, { codePointAt: function codePointAt(pos) { return codeAt(this, pos); } }); /***/ }), /***/ "f5df": /***/ (function(module, exports, __webpack_require__) { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__("00ee"); var isCallable = __webpack_require__("1626"); var classofRaw = __webpack_require__("c6b6"); var wellKnownSymbol = __webpack_require__("b622"); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var $Object = Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; /***/ }), /***/ "f69d": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var $String = String; var $TypeError = TypeError; module.exports = function (argument) { if (argument === undefined || isObject(argument)) return argument; throw new $TypeError($String(argument) + ' is not an object or undefined'); }; /***/ }), /***/ "f6d6": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var uncurryThis = __webpack_require__("e330"); var toAbsoluteIndex = __webpack_require__("23cb"); var $RangeError = RangeError; var fromCharCode = String.fromCharCode; // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing var $fromCodePoint = String.fromCodePoint; var join = uncurryThis([].join); // length should be 1, old FF problem var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length !== 1; // `String.fromCodePoint` method // https://tc39.es/ecma262/#sec-string.fromcodepoint $({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, { // eslint-disable-next-line no-unused-vars -- required for `.length` fromCodePoint: function fromCodePoint(x) { var elements = []; var length = arguments.length; var i = 0; var code; while (length > i) { code = +arguments[i]; if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw new $RangeError(code + ' is not a valid code point'); elements[i++] = code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00); } return join(elements, ''); } }); /***/ }), /***/ "f748": /***/ (function(module, exports, __webpack_require__) { "use strict"; var isObject = __webpack_require__("861d"); var getInternalState = __webpack_require__("69f3").get; module.exports = function isRawJSON(O) { if (!isObject(O)) return false; var state = getInternalState(O); return !!state && state.type === 'RawJSON'; }; /***/ }), /***/ "f772": /***/ (function(module, exports, __webpack_require__) { "use strict"; var shared = __webpack_require__("5692"); var uid = __webpack_require__("90e3"); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; /***/ }), /***/ "f8c9": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var globalThis = __webpack_require__("cfe9"); var setToStringTag = __webpack_require__("d44e"); $({ global: true }, { Reflect: {} }); // Reflect[@@toStringTag] property // https://tc39.es/ecma262/#sec-reflect-@@tostringtag setToStringTag(globalThis.Reflect, 'Reflect', true); /***/ }), /***/ "f8cd": /***/ (function(module, exports, __webpack_require__) { "use strict"; var toIntegerOrInfinity = __webpack_require__("5926"); var $RangeError = RangeError; module.exports = function (it) { var result = toIntegerOrInfinity(it); if (result < 0) throw new $RangeError("The argument can't be less than 0"); return result; }; /***/ }), /***/ "f99f": /***/ (function(module, exports, __webpack_require__) { "use strict"; var globalThis = __webpack_require__("cfe9"); // https://github.com/tc39/ecma262/pull/3467 module.exports = function (METHOD_NAME, ExpectedError) { var Iterator = globalThis.Iterator; var IteratorPrototype = Iterator && Iterator.prototype; var method = IteratorPrototype && IteratorPrototype[METHOD_NAME]; var CLOSED = false; if (method) try { method.call({ next: function () { return { done: true }; }, 'return': function () { CLOSED = true; } }, -1); } catch (error) { // https://bugs.webkit.org/show_bug.cgi?id=291195 if (!(error instanceof ExpectedError)) CLOSED = false; } if (!CLOSED) return method; }; /***/ }), /***/ "f9dd": /***/ (function(module, exports, __webpack_require__) { /* eslint-disable class-methods-use-this */ const {BigInteger} = __webpack_require__("f33e") function bigIntToMinTwosComplementsHex(bigIntegerValue) { let h = bigIntegerValue.toString(16) if (h.substr(0, 1) !== '-') { if (h.length % 2 === 1) { h = '0' + h } else if (!h.match(/^[0-7]/)) { h = '00' + h } } else { const hPos = h.substr(1) let xorLen = hPos.length if (xorLen % 2 === 1) { xorLen += 1 } else if (!h.match(/^[0-7]/)) { xorLen += 2 } let hMask = '' for (let i = 0; i < xorLen; i++) { hMask += 'f' } const biMask = new BigInteger(hMask, 16) const biNeg = biMask.xor(bigIntegerValue).add(BigInteger.ONE) h = biNeg.toString(16).replace(/^-/, '') } return h } /** * base class for ASN.1 DER encoder object */ class ASN1Object { constructor() { this.isModified = true this.hTLV = null this.hT = '00' this.hL = '00' this.hV = '' } /** * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V) */ getLengthHexFromValue() { const n = this.hV.length / 2 let hN = n.toString(16) if (hN.length % 2 === 1) { hN = '0' + hN } if (n < 128) { return hN } else { const hNlen = hN.length / 2 const head = 128 + hNlen return head.toString(16) + hN } } /** * get hexadecimal string of ASN.1 TLV bytes */ getEncodedHex() { if (this.hTLV == null || this.isModified) { this.hV = this.getFreshValueHex() this.hL = this.getLengthHexFromValue() this.hTLV = this.hT + this.hL + this.hV this.isModified = false } return this.hTLV } getFreshValueHex() { return '' } } /** * class for ASN.1 DER Integer */ class DERInteger extends ASN1Object { constructor(options) { super() this.hT = '02' if (options && options.bigint) { this.hTLV = null this.isModified = true this.hV = bigIntToMinTwosComplementsHex(options.bigint) } } getFreshValueHex() { return this.hV } } /** * class for ASN.1 DER Sequence */ class DERSequence extends ASN1Object { constructor(options) { super() this.hT = '30' this.asn1Array = [] if (options && options.array) { this.asn1Array = options.array } } getFreshValueHex() { let h = '' for (let i = 0; i < this.asn1Array.length; i++) { const asn1Obj = this.asn1Array[i] h += asn1Obj.getEncodedHex() } this.hV = h return this.hV } } /** * get byte length for ASN.1 L(length) bytes */ function getByteLengthOfL(s, pos) { if (s.substring(pos + 2, pos + 3) !== '8') return 1 const i = parseInt(s.substring(pos + 3, pos + 4), 10) if (i === 0) return -1 // length octet '80' indefinite length if (i > 0 && i < 10) return i + 1 // including '8?' octet; return -2 // malformed format } /** * get hexadecimal string for ASN.1 L(length) bytes */ function getHexOfL(s, pos) { const len = getByteLengthOfL(s, pos) if (len < 1) return '' return s.substring(pos + 2, pos + 2 + len * 2) } /** * get integer value of ASN.1 length for ASN.1 data */ function getIntOfL(s, pos) { const hLength = getHexOfL(s, pos) if (hLength === '') return -1 let bi if (parseInt(hLength.substring(0, 1), 10) < 8) { bi = new BigInteger(hLength, 16) } else { bi = new BigInteger(hLength.substring(2), 16) } return bi.intValue() } /** * get ASN.1 value starting string position for ASN.1 object refered by index 'idx'. */ function getStartPosOfV(s, pos) { const lLen = getByteLengthOfL(s, pos) if (lLen < 0) return lLen return pos + (lLen + 1) * 2 } /** * get hexadecimal string of ASN.1 V(value) */ function getHexOfV(s, pos) { const pos1 = getStartPosOfV(s, pos) const len = getIntOfL(s, pos) return s.substring(pos1, pos1 + len * 2) } /** * get next sibling starting index for ASN.1 object string */ function getPosOfNextSibling(s, pos) { const pos1 = getStartPosOfV(s, pos) const len = getIntOfL(s, pos) return pos1 + len * 2 } /** * get array of indexes of child ASN.1 objects */ function getPosArrayOfChildren(h, pos) { const a = [] const p0 = getStartPosOfV(h, pos) a.push(p0) const len = getIntOfL(h, pos) let p = p0 let k = 0 for (;;) { const pNext = getPosOfNextSibling(h, p) if (pNext == null || (pNext - p0 >= (len * 2))) break if (k >= 200) break a.push(pNext) p = pNext k++ } return a } module.exports = { /** * ASN.1 DER编码 */ encodeDer(r, s) { const derR = new DERInteger({bigint: r}) const derS = new DERInteger({bigint: s}) const derSeq = new DERSequence({array: [derR, derS]}) return derSeq.getEncodedHex() }, /** * 解析 ASN.1 DER */ decodeDer(input) { // 1. Items of ASN.1 Sequence Check const a = getPosArrayOfChildren(input, 0) // 2. Integer check const iTLV1 = a[0] const iTLV2 = a[1] // 3. getting value const hR = getHexOfV(input, iTLV1) const hS = getHexOfV(input, iTLV2) const r = new BigInteger(hR, 16) const s = new BigInteger(hS, 16) return {r, s} } } /***/ }), /***/ "fae3": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "parseOfdDocument", function() { return /* reexport */ ofd["e" /* parseOfdDocument */]; }); __webpack_require__.d(__webpack_exports__, "renderOfd", function() { return /* reexport */ ofd["f" /* renderOfd */]; }); __webpack_require__.d(__webpack_exports__, "renderOfdByScale", function() { return /* reexport */ ofd["g" /* renderOfdByScale */]; }); __webpack_require__.d(__webpack_exports__, "digestCheck", function() { return /* reexport */ ofd["c" /* digestCheck */]; }); __webpack_require__.d(__webpack_exports__, "setPageScale", function() { return /* reexport */ ofd["i" /* setPageScale */]; }); __webpack_require__.d(__webpack_exports__, "getPageScale", function() { return /* reexport */ ofd["d" /* getPageScale */]; }); __webpack_require__.d(__webpack_exports__, "calPageBox", function() { return /* reexport */ ofd["a" /* calPageBox */]; }); __webpack_require__.d(__webpack_exports__, "calPageBoxScale", function() { return /* reexport */ ofd["b" /* calPageBoxScale */]; }); __webpack_require__.d(__webpack_exports__, "renderPage", function() { return /* reexport */ ofd["h" /* renderPage */]; }); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js // This file is imported into lib/wc client bundles. if (typeof window !== 'undefined') { var currentScript = window.document.currentScript if (false) { var getCurrentScript; } var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/) if (src) { __webpack_require__.p = src[1] // eslint-disable-line } } // Indicate to webpack that this file can be concatenated /* harmony default export */ var setPublicPath = (null); // EXTERNAL MODULE: ./src/utils/ofd/ofd.js var ofd = __webpack_require__("81a2"); // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib-no-default.js /***/ }), /***/ "fafb": /***/ (function(module, exports, __webpack_require__) { "use strict"; var $ = __webpack_require__("23e7"); var aCallable = __webpack_require__("59ed"); var MapHelpers = __webpack_require__("094a"); var IS_PURE = __webpack_require__("c430"); var get = MapHelpers.get; var has = MapHelpers.has; var set = MapHelpers.set; // `Map.prototype.getOrInsertComputed` method // https://tc39.es/ecma262/#sec-map.prototype.getorinsertcomputed $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, { getOrInsertComputed: function getOrInsertComputed(key, callbackfn) { var hasKey = has(this, key); aCallable(callbackfn); if (hasKey) return get(this, key); // CanonicalizeKeyedCollectionKey if (key === 0 && 1 / key === -Infinity) key = 0; var value = callbackfn(key); set(this, key, value); return value; } }); /***/ }), /***/ "fc6a": /***/ (function(module, exports, __webpack_require__) { "use strict"; // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__("44ad"); var requireObjectCoercible = __webpack_require__("1d80"); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /***/ "fdbf": /***/ (function(module, exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = __webpack_require__("04f8"); module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; /***/ }) /******/ }); }); //# sourceMappingURL=ofd.umd.js.map