var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; (function() { "use strict"; var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function getDefaultExportFromCjs(x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x; } var jsxRuntime = { exports: {} }; var reactJsxRuntime_development = {}; var react = { exports: {} }; var react_development = { exports: {} }; /** * @license React * react.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ react_development.exports; (function(module, exports) { { (function() { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var ReactVersion = "18.2.0"; var REACT_ELEMENT_TYPE = Symbol.for("react.element"); var REACT_PORTAL_TYPE = Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); var REACT_MEMO_TYPE = Symbol.for("react.memo"); var REACT_LAZY_TYPE = Symbol.for("react.lazy"); var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; var FAUX_ITERATOR_SYMBOL = "@@iterator"; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== "object") { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === "function") { return maybeIterator; } return null; } var ReactCurrentDispatcher = { /** * @internal * @type {ReactComponent} */ current: null }; var ReactCurrentBatchConfig = { transition: null }; var ReactCurrentActQueue = { current: null, // Used to reproduce behavior of `batchedUpdates` in legacy mode. isBatchingLegacy: false, didScheduleLegacyUpdate: false }; var ReactCurrentOwner = { /** * @internal * @type {ReactComponent} */ current: null }; var ReactDebugCurrentFrame = {}; var currentExtraStackFrame = null; function setExtraStackFrame(stack) { { currentExtraStackFrame = stack; } } { ReactDebugCurrentFrame.setExtraStackFrame = function(stack) { { currentExtraStackFrame = stack; } }; ReactDebugCurrentFrame.getCurrentStack = null; ReactDebugCurrentFrame.getStackAddendum = function() { var stack = ""; if (currentExtraStackFrame) { stack += currentExtraStackFrame; } var impl = ReactDebugCurrentFrame.getCurrentStack; if (impl) { stack += impl() || ""; } return stack; }; } var enableScopeAPI = false; var enableCacheElement = false; var enableTransitionTracing = false; var enableLegacyHidden = false; var enableDebugTracing = false; var ReactSharedInternals = { ReactCurrentDispatcher, ReactCurrentBatchConfig, ReactCurrentOwner }; { ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; } function warn(format) { { { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning("warn", format, args); } } } function error(format) { { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning("error", format, args); } } } function printWarning(level, format, args) { { var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame2.getStackAddendum(); if (stack !== "") { format += "%s"; args = args.concat([stack]); } var argsWithFormat = args.map(function(item) { return String(item); }); argsWithFormat.unshift("Warning: " + format); Function.prototype.apply.call(console[level], console, argsWithFormat); } } var didWarnStateUpdateForUnmountedComponent = {}; function warnNoop(publicInstance, callerName) { { var _constructor = publicInstance.constructor; var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass"; var warningKey = componentName + "." + callerName; if (didWarnStateUpdateForUnmountedComponent[warningKey]) { return; } error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName); didWarnStateUpdateForUnmountedComponent[warningKey] = true; } } var ReactNoopUpdateQueue = { /** * Checks whether or not this composite component is mounted. * @param {ReactClass} publicInstance The instance we want to test. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function(publicInstance) { return false; }, /** * Forces an update. This should only be invoked when it is known with * certainty that we are **not** in a DOM transaction. * * You may want to call this when you know that some deeper aspect of the * component's state has changed but `setState` was not called. * * This will not invoke `shouldComponentUpdate`, but it will invoke * `componentWillUpdate` and `componentDidUpdate`. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueForceUpdate: function(publicInstance, callback, callerName) { warnNoop(publicInstance, "forceUpdate"); }, /** * Replaces all of the state. Always use this or `setState` to mutate state. * You should treat `this.state` as immutable. * * There is no guarantee that `this.state` will be immediately updated, so * accessing `this.state` after calling this method may return the old value. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} completeState Next state. * @param {?function} callback Called after component is updated. * @param {?string} callerName name of the calling function in the public API. * @internal */ enqueueReplaceState: function(publicInstance, completeState, callback, callerName) { warnNoop(publicInstance, "replaceState"); }, /** * Sets a subset of the state. This only exists because _pendingState is * internal. This provides a merging strategy that is not available to deep * properties which is confusing. TODO: Expose pendingState or don't use it * during the merge. * * @param {ReactClass} publicInstance The instance that should rerender. * @param {object} partialState Next partial state to be merged with state. * @param {?function} callback Called after component is updated. * @param {?string} Name of the calling function in the public API. * @internal */ enqueueSetState: function(publicInstance, partialState, callback, callerName) { warnNoop(publicInstance, "setState"); } }; var assign2 = Object.assign; var emptyObject = {}; { Object.freeze(emptyObject); } function Component(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } Component.prototype.isReactComponent = {}; Component.prototype.setState = function(partialState, callback) { if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) { throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); } this.updater.enqueueSetState(this, partialState, callback, "setState"); }; Component.prototype.forceUpdate = function(callback) { this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); }; { var deprecatedAPIs = { isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] }; var defineDeprecationWarning = function(methodName, info) { Object.defineProperty(Component.prototype, methodName, { get: function() { warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); return void 0; } }); }; for (var fnName in deprecatedAPIs) { if (deprecatedAPIs.hasOwnProperty(fnName)) { defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } } } function ComponentDummy() { } ComponentDummy.prototype = Component.prototype; function PureComponent(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent; assign2(pureComponentPrototype, Component.prototype); pureComponentPrototype.isPureReactComponent = true; function createRef() { var refObject = { current: null }; { Object.seal(refObject); } return refObject; } var isArrayImpl = Array.isArray; function isArray(a) { return isArrayImpl(a); } function typeName(value) { { var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return type; } } function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } } function testStringCoercion(value) { return "" + value; } function checkKeyStringCoercion(value) { { if (willCoercionThrow(value)) { error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) { return displayName; } var functionName = innerType.displayName || innerType.name || ""; return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } function getContextName(type) { return type.displayName || "Context"; } function getComponentNameFromType(type) { if (type == null) { return null; } { if (typeof type.tag === "number") { error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); } } if (typeof type === "function") { return type.displayName || type.name || null; } if (typeof type === "string") { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return "Fragment"; case REACT_PORTAL_TYPE: return "Portal"; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return "StrictMode"; case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; } if (typeof type === "object") { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + ".Consumer"; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + ".Provider"; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: var outerName = type.displayName || null; if (outerName !== null) { return outerName; } return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch (x) { return null; } } } } return null; } var hasOwnProperty = Object.prototype.hasOwnProperty; var RESERVED_PROPS = { key: true, ref: true, __self: true, __source: true }; var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; { didWarnAboutStringRefs = {}; } function hasValidRef(config) { { if (hasOwnProperty.call(config, "ref")) { var getter = Object.getOwnPropertyDescriptor(config, "ref").get; if (getter && getter.isReactWarning) { return false; } } } return config.ref !== void 0; } function hasValidKey(config) { { if (hasOwnProperty.call(config, "key")) { var getter = Object.getOwnPropertyDescriptor(config, "key").get; if (getter && getter.isReactWarning) { return false; } } } return config.key !== void 0; } function defineKeyPropWarningGetter(props, displayName) { var warnAboutAccessingKey = function() { { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } } }; warnAboutAccessingKey.isReactWarning = true; Object.defineProperty(props, "key", { get: warnAboutAccessingKey, configurable: true }); } function defineRefPropWarningGetter(props, displayName) { var warnAboutAccessingRef = function() { { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } } }; warnAboutAccessingRef.isReactWarning = true; Object.defineProperty(props, "ref", { get: warnAboutAccessingRef, configurable: true }); } function warnIfStringRefCannotBeAutoConverted(config) { { if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); if (!didWarnAboutStringRefs[componentName]) { error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); didWarnAboutStringRefs[componentName] = true; } } } } var ReactElement = function(type, key, ref, self2, source2, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type, key, ref, props, // Record the component responsible for creating this element. _owner: owner }; { element._store = {}; Object.defineProperty(element._store, "validated", { configurable: false, enumerable: false, writable: true, value: false }); Object.defineProperty(element, "_self", { configurable: false, enumerable: false, writable: false, value: self2 }); Object.defineProperty(element, "_source", { configurable: false, enumerable: false, writable: false, value: source2 }); if (Object.freeze) { Object.freeze(element.props); Object.freeze(element); } } return element; }; function createElement(type, config, children) { var propName; var props = {}; var key = null; var ref = null; var self2 = null; var source2 = null; if (config != null) { if (hasValidRef(config)) { ref = config.ref; { warnIfStringRefCannotBeAutoConverted(config); } } if (hasValidKey(config)) { { checkKeyStringCoercion(config.key); } key = "" + config.key; } self2 = config.__self === void 0 ? null : config.__self; source2 = config.__source === void 0 ? null : config.__source; for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } } var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i2 = 0; i2 < childrenLength; i2++) { childArray[i2] = arguments[i2 + 2]; } { if (Object.freeze) { Object.freeze(childArray); } } props.children = childArray; } if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } { if (key || ref) { var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } } return ReactElement(type, key, ref, self2, source2, ReactCurrentOwner.current, props); } function cloneAndReplaceKey(oldElement, newKey) { var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); return newElement; } function cloneElement(element, config, children) { if (element === null || element === void 0) { throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + "."); } var propName; var props = assign2({}, element.props); var key = element.key; var ref = element.ref; var self2 = element._self; var source2 = element._source; var owner = element._owner; if (config != null) { if (hasValidRef(config)) { ref = config.ref; owner = ReactCurrentOwner.current; } if (hasValidKey(config)) { { checkKeyStringCoercion(config.key); } key = "" + config.key; } var defaultProps; if (element.type && element.type.defaultProps) { defaultProps = element.type.defaultProps; } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { if (config[propName] === void 0 && defaultProps !== void 0) { props[propName] = defaultProps[propName]; } else { props[propName] = config[propName]; } } } } var childrenLength = arguments.length - 2; if (childrenLength === 1) { props.children = children; } else if (childrenLength > 1) { var childArray = Array(childrenLength); for (var i2 = 0; i2 < childrenLength; i2++) { childArray[i2] = arguments[i2 + 2]; } props.children = childArray; } return ReactElement(element.type, key, ref, self2, source2, owner, props); } function isValidElement(object) { return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } var SEPARATOR = "."; var SUBSEPARATOR = ":"; function escape2(key) { var escapeRegex = /[=:]/g; var escaperLookup = { "=": "=0", ":": "=2" }; var escapedString = key.replace(escapeRegex, function(match) { return escaperLookup[match]; }); return "$" + escapedString; } var didWarnAboutMaps = false; var userProvidedKeyEscapeRegex = /\/+/g; function escapeUserProvidedKey(text) { return text.replace(userProvidedKeyEscapeRegex, "$&/"); } function getElementKey(element, index2) { if (typeof element === "object" && element !== null && element.key != null) { { checkKeyStringCoercion(element.key); } return escape2("" + element.key); } return index2.toString(36); } function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { var type = typeof children; if (type === "undefined" || type === "boolean") { children = null; } var invokeCallback = false; if (children === null) { invokeCallback = true; } else { switch (type) { case "string": case "number": invokeCallback = true; break; case "object": switch (children.$$typeof) { case REACT_ELEMENT_TYPE: case REACT_PORTAL_TYPE: invokeCallback = true; } } } if (invokeCallback) { var _child = children; var mappedChild = callback(_child); var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; if (isArray(mappedChild)) { var escapedChildKey = ""; if (childKey != null) { escapedChildKey = escapeUserProvidedKey(childKey) + "/"; } mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) { return c; }); } else if (mappedChild != null) { if (isValidElement(mappedChild)) { { if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) { checkKeyStringCoercion(mappedChild.key); } } mappedChild = cloneAndReplaceKey( mappedChild, // Keep both the (mapped) and old keys if they differ, just as // traverseAllChildren used to do for objects as children escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? ( // $FlowFixMe Flow incorrectly thinks existing element's key can be a number // eslint-disable-next-line react-internal/safe-string-coercion escapeUserProvidedKey("" + mappedChild.key) + "/" ) : "") + childKey ); } array.push(mappedChild); } return 1; } var child; var nextName; var subtreeCount = 0; var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR; if (isArray(children)) { for (var i2 = 0; i2 < children.length; i2++) { child = children[i2]; nextName = nextNamePrefix + getElementKey(child, i2); subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); } } else { var iteratorFn = getIteratorFn(children); if (typeof iteratorFn === "function") { var iterableChildren = children; { if (iteratorFn === iterableChildren.entries) { if (!didWarnAboutMaps) { warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."); } didWarnAboutMaps = true; } } var iterator = iteratorFn.call(iterableChildren); var step; var ii2 = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = nextNamePrefix + getElementKey(child, ii2++); subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); } } else if (type === "object") { var childrenString = String(children); throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead."); } } return subtreeCount; } function mapChildren(children, func, context) { if (children == null) { return children; } var result = []; var count = 0; mapIntoArray(children, result, "", "", function(child) { return func.call(context, child, count++); }); return result; } function countChildren(children) { var n = 0; mapChildren(children, function() { n++; }); return n; } function forEachChildren(children, forEachFunc, forEachContext) { mapChildren(children, function() { forEachFunc.apply(this, arguments); }, forEachContext); } function toArray(children) { return mapChildren(children, function(child) { return child; }) || []; } function onlyChild(children) { if (!isValidElement(children)) { throw new Error("React.Children.only expected to receive a single React element child."); } return children; } function createContext(defaultValue) { var context = { $$typeof: REACT_CONTEXT_TYPE, // As a workaround to support multiple concurrent renderers, we categorize // some renderers as primary and others as secondary. We only expect // there to be two concurrent renderers at most: React Native (primary) and // Fabric (secondary); React DOM (primary) and React ART (secondary). // Secondary renderers store their context values on separate fields. _currentValue: defaultValue, _currentValue2: defaultValue, // Used to track how many concurrent renderers this context currently // supports within in a single renderer. Such as parallel server rendering. _threadCount: 0, // These are circular Provider: null, Consumer: null, // Add these to use same hidden class in VM as ServerContext _defaultValue: null, _globalName: null }; context.Provider = { $$typeof: REACT_PROVIDER_TYPE, _context: context }; var hasWarnedAboutUsingNestedContextConsumers = false; var hasWarnedAboutUsingConsumerProvider = false; var hasWarnedAboutDisplayNameOnConsumer = false; { var Consumer = { $$typeof: REACT_CONTEXT_TYPE, _context: context }; Object.defineProperties(Consumer, { Provider: { get: function() { if (!hasWarnedAboutUsingConsumerProvider) { hasWarnedAboutUsingConsumerProvider = true; error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); } return context.Provider; }, set: function(_Provider) { context.Provider = _Provider; } }, _currentValue: { get: function() { return context._currentValue; }, set: function(_currentValue) { context._currentValue = _currentValue; } }, _currentValue2: { get: function() { return context._currentValue2; }, set: function(_currentValue2) { context._currentValue2 = _currentValue2; } }, _threadCount: { get: function() { return context._threadCount; }, set: function(_threadCount) { context._threadCount = _threadCount; } }, Consumer: { get: function() { if (!hasWarnedAboutUsingNestedContextConsumers) { hasWarnedAboutUsingNestedContextConsumers = true; error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?"); } return context.Consumer; } }, displayName: { get: function() { return context.displayName; }, set: function(displayName) { if (!hasWarnedAboutDisplayNameOnConsumer) { warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName); hasWarnedAboutDisplayNameOnConsumer = true; } } } }); context.Consumer = Consumer; } { context._currentRenderer = null; context._currentRenderer2 = null; } return context; } var Uninitialized = -1; var Pending = 0; var Resolved = 1; var Rejected = 2; function lazyInitializer(payload) { if (payload._status === Uninitialized) { var ctor = payload._result; var thenable = ctor(); thenable.then(function(moduleObject2) { if (payload._status === Pending || payload._status === Uninitialized) { var resolved = payload; resolved._status = Resolved; resolved._result = moduleObject2; } }, function(error2) { if (payload._status === Pending || payload._status === Uninitialized) { var rejected = payload; rejected._status = Rejected; rejected._result = error2; } }); if (payload._status === Uninitialized) { var pending = payload; pending._status = Pending; pending._result = thenable; } } if (payload._status === Resolved) { var moduleObject = payload._result; { if (moduleObject === void 0) { error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject); } } { if (!("default" in moduleObject)) { error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject); } } return moduleObject.default; } else { throw payload._result; } } function lazy(ctor) { var payload = { // We use these fields to store the result. _status: Uninitialized, _result: ctor }; var lazyType = { $$typeof: REACT_LAZY_TYPE, _payload: payload, _init: lazyInitializer }; { var defaultProps; var propTypes; Object.defineProperties(lazyType, { defaultProps: { configurable: true, get: function() { return defaultProps; }, set: function(newDefaultProps) { error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); defaultProps = newDefaultProps; Object.defineProperty(lazyType, "defaultProps", { enumerable: true }); } }, propTypes: { configurable: true, get: function() { return propTypes; }, set: function(newPropTypes) { error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."); propTypes = newPropTypes; Object.defineProperty(lazyType, "propTypes", { enumerable: true }); } } }); } return lazyType; } function forwardRef(render2) { { if (render2 != null && render2.$$typeof === REACT_MEMO_TYPE) { error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."); } else if (typeof render2 !== "function") { error("forwardRef requires a render function but was given %s.", render2 === null ? "null" : typeof render2); } else { if (render2.length !== 0 && render2.length !== 2) { error("forwardRef render functions accept exactly two parameters: props and ref. %s", render2.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); } } if (render2 != null) { if (render2.defaultProps != null || render2.propTypes != null) { error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"); } } } var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render2 }; { var ownName; Object.defineProperty(elementType, "displayName", { enumerable: false, configurable: true, get: function() { return ownName; }, set: function(name) { ownName = name; if (!render2.name && !render2.displayName) { render2.displayName = name; } } }); } return elementType; } var REACT_MODULE_REFERENCE; { REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); } function isValidElementType(type) { if (typeof type === "string" || typeof type === "function") { return true; } if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { return true; } if (typeof type === "object" && type !== null) { if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { return true; } } return false; } function memo(type, compare) { { if (!isValidElementType(type)) { error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type); } } var elementType = { $$typeof: REACT_MEMO_TYPE, type, compare: compare === void 0 ? null : compare }; { var ownName; Object.defineProperty(elementType, "displayName", { enumerable: false, configurable: true, get: function() { return ownName; }, set: function(name) { ownName = name; if (!type.name && !type.displayName) { type.displayName = name; } } }); } return elementType; } function resolveDispatcher() { var dispatcher = ReactCurrentDispatcher.current; { if (dispatcher === null) { error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."); } } return dispatcher; } function useContext(Context) { var dispatcher = resolveDispatcher(); { if (Context._context !== void 0) { var realContext = Context._context; if (realContext.Consumer === Context) { error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"); } else if (realContext.Provider === Context) { error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?"); } } } return dispatcher.useContext(Context); } function useState(initialState2) { var dispatcher = resolveDispatcher(); return dispatcher.useState(initialState2); } function useReducer(reducer, initialArg, init) { var dispatcher = resolveDispatcher(); return dispatcher.useReducer(reducer, initialArg, init); } function useRef(initialValue) { var dispatcher = resolveDispatcher(); return dispatcher.useRef(initialValue); } function useEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useEffect(create, deps); } function useInsertionEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useInsertionEffect(create, deps); } function useLayoutEffect(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useLayoutEffect(create, deps); } function useCallback(callback, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useCallback(callback, deps); } function useMemo(create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useMemo(create, deps); } function useImperativeHandle(ref, create, deps) { var dispatcher = resolveDispatcher(); return dispatcher.useImperativeHandle(ref, create, deps); } function useDebugValue(value, formatterFn) { { var dispatcher = resolveDispatcher(); return dispatcher.useDebugValue(value, formatterFn); } } function useTransition() { var dispatcher = resolveDispatcher(); return dispatcher.useTransition(); } function useDeferredValue(value) { var dispatcher = resolveDispatcher(); return dispatcher.useDeferredValue(value); } function useId() { var dispatcher = resolveDispatcher(); return dispatcher.useId(); } function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) { var dispatcher = resolveDispatcher(); return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); } var disabledDepth = 0; var prevLog; var prevInfo; var prevWarn; var prevError; var prevGroup; var prevGroupCollapsed; var prevGroupEnd; function disabledLog() { } disabledLog.__reactDisabledLog = true; function disableLogs() { { if (disabledDepth === 0) { prevLog = console.log; prevInfo = console.info; prevWarn = console.warn; prevError = console.error; prevGroup = console.group; prevGroupCollapsed = console.groupCollapsed; prevGroupEnd = console.groupEnd; var props = { configurable: true, enumerable: true, value: disabledLog, writable: true }; Object.defineProperties(console, { info: props, log: props, warn: props, error: props, group: props, groupCollapsed: props, groupEnd: props }); } disabledDepth++; } } function reenableLogs() { { disabledDepth--; if (disabledDepth === 0) { var props = { configurable: true, enumerable: true, writable: true }; Object.defineProperties(console, { log: assign2({}, props, { value: prevLog }), info: assign2({}, props, { value: prevInfo }), warn: assign2({}, props, { value: prevWarn }), error: assign2({}, props, { value: prevError }), group: assign2({}, props, { value: prevGroup }), groupCollapsed: assign2({}, props, { value: prevGroupCollapsed }), groupEnd: assign2({}, props, { value: prevGroupEnd }) }); } if (disabledDepth < 0) { error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } } var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source2, ownerFn) { { if (prefix === void 0) { try { throw Error(); } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = match && match[1] || ""; } } return "\n" + prefix + name; } } var reentry = false; var componentFrameCache; { var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; componentFrameCache = new PossiblyWeakMap(); } function describeNativeComponentFrame(fn, construct) { if (!fn || reentry) { return ""; } { var frame = componentFrameCache.get(fn); if (frame !== void 0) { return frame; } } var control; reentry = true; var previousPrepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var previousDispatcher; { previousDispatcher = ReactCurrentDispatcher$1.current; ReactCurrentDispatcher$1.current = null; disableLogs(); } try { if (construct) { var Fake = function() { throw Error(); }; Object.defineProperty(Fake.prototype, "props", { set: function() { throw Error(); } }); if (typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(Fake, []); } catch (x) { control = x; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); } catch (x) { control = x; } fn.call(Fake.prototype); } } else { try { throw Error(); } catch (x) { control = x; } fn(); } } catch (sample) { if (sample && control && typeof sample.stack === "string") { var sampleLines = sample.stack.split("\n"); var controlLines = control.stack.split("\n"); var s = sampleLines.length - 1; var c = controlLines.length - 1; while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { c--; } for (; s >= 1 && c >= 0; s--, c--) { if (sampleLines[s] !== controlLines[c]) { if (s !== 1 || c !== 1) { do { s--; c--; if (c < 0 || sampleLines[s] !== controlLines[c]) { var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); if (fn.displayName && _frame.includes("")) { _frame = _frame.replace("", fn.displayName); } { if (typeof fn === "function") { componentFrameCache.set(fn, _frame); } } return _frame; } } while (s >= 1 && c >= 0); } break; } } } } finally { reentry = false; { ReactCurrentDispatcher$1.current = previousDispatcher; reenableLogs(); } Error.prepareStackTrace = previousPrepareStackTrace; } var name = fn ? fn.displayName || fn.name : ""; var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; { if (typeof fn === "function") { componentFrameCache.set(fn, syntheticFrame); } } return syntheticFrame; } function describeFunctionComponentFrame(fn, source2, ownerFn) { { return describeNativeComponentFrame(fn, false); } } function shouldConstruct(Component2) { var prototype = Component2.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source2, ownerFn) { if (type == null) { return ""; } if (typeof type === "function") { { return describeNativeComponentFrame(type, shouldConstruct(type)); } } if (typeof type === "string") { return describeBuiltInComponentFrame(type); } switch (type) { case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense"); case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList"); } if (typeof type === "object") { switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render); case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source2, ownerFn); case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return describeUnknownElementTypeFrameInDEV(init(payload), source2, ownerFn); } catch (x) { } } } } return ""; } var loggedTypeFailures = {}; var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } } function checkPropTypes(typeSpecs, values, location, componentName, element) { { var has = Function.call.bind(hasOwnProperty); for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error$1 = void 0; try { if (typeof typeSpecs[typeSpecName] !== "function") { var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); err.name = "Invariant Violation"; throw err; } error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (ex) { error$1 = ex; } if (error$1 && !(error$1 instanceof Error)) { setCurrentlyValidatingElement(element); error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); setCurrentlyValidatingElement(null); } if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { loggedTypeFailures[error$1.message] = true; setCurrentlyValidatingElement(element); error("Failed %s type: %s", location, error$1.message); setCurrentlyValidatingElement(null); } } } } } function setCurrentlyValidatingElement$1(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); setExtraStackFrame(stack); } else { setExtraStackFrame(null); } } } var propTypesMisspellWarningShown; { propTypesMisspellWarningShown = false; } function getDeclarationErrorAddendum() { if (ReactCurrentOwner.current) { var name = getComponentNameFromType(ReactCurrentOwner.current.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; } } return ""; } function getSourceInfoErrorAddendum(source2) { if (source2 !== void 0) { var fileName = source2.fileName.replace(/^.*[\\\/]/, ""); var lineNumber = source2.lineNumber; return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } return ""; } function getSourceInfoErrorAddendumForProps(elementProps) { if (elementProps !== null && elementProps !== void 0) { return getSourceInfoErrorAddendum(elementProps.__source); } return ""; } var ownerHasKeyUseWarning = {}; function getCurrentComponentErrorInfo(parentType) { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } return info; } function validateExplicitKey(element, parentType) { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { return; } ownerHasKeyUseWarning[currentComponentErrorInfo] = true; var childOwner = ""; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; } { setCurrentlyValidatingElement$1(element); error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); setCurrentlyValidatingElement$1(null); } } function validateChildKeys(node2, parentType) { if (typeof node2 !== "object") { return; } if (isArray(node2)) { for (var i2 = 0; i2 < node2.length; i2++) { var child = node2[i2]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (isValidElement(node2)) { if (node2._store) { node2._store.validated = true; } } else if (node2) { var iteratorFn = getIteratorFn(node2); if (typeof iteratorFn === "function") { if (iteratorFn !== node2.entries) { var iterator = iteratorFn.call(node2); var step; while (!(step = iterator.next()).done) { if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } } } function validatePropTypes(element) { { var type = element.type; if (type === null || type === void 0 || typeof type === "string") { return; } var propTypes; if (typeof type === "function") { propTypes = type.propTypes; } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. type.$$typeof === REACT_MEMO_TYPE)) { propTypes = type.propTypes; } else { return; } if (propTypes) { var name = getComponentNameFromType(type); checkPropTypes(propTypes, element.props, "prop", name, element); } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; var _name = getComponentNameFromType(type); error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); } if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } } function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i2 = 0; i2 < keys.length; i2++) { var key = keys[i2]; if (key !== "children" && key !== "key") { setCurrentlyValidatingElement$1(fragment); error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); setCurrentlyValidatingElement$1(null); break; } } if (fragment.ref !== null) { setCurrentlyValidatingElement$1(fragment); error("Invalid attribute `ref` supplied to `React.Fragment`."); setCurrentlyValidatingElement$1(null); } } } function createElementWithValidation(type, props, children) { var validType = isValidElementType(type); if (!validType) { var info = ""; if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; } var sourceInfo = getSourceInfoErrorAddendumForProps(props); if (sourceInfo) { info += sourceInfo; } else { info += getDeclarationErrorAddendum(); } var typeString; if (type === null) { typeString = "null"; } else if (isArray(type)) { typeString = "array"; } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; info = " Did you accidentally export a JSX literal instead of a component?"; } else { typeString = typeof type; } { error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); } } var element = createElement.apply(this, arguments); if (element == null) { return element; } if (validType) { for (var i2 = 2; i2 < arguments.length; i2++) { validateChildKeys(arguments[i2], type); } } if (type === REACT_FRAGMENT_TYPE) { validateFragmentProps(element); } else { validatePropTypes(element); } return element; } var didWarnAboutDeprecatedCreateFactory = false; function createFactoryWithValidation(type) { var validatedFactory = createElementWithValidation.bind(null, type); validatedFactory.type = type; { if (!didWarnAboutDeprecatedCreateFactory) { didWarnAboutDeprecatedCreateFactory = true; warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead."); } Object.defineProperty(validatedFactory, "type", { enumerable: false, get: function() { warn("Factory.type is deprecated. Access the class directly before passing it to createFactory."); Object.defineProperty(this, "type", { value: type }); return type; } }); } return validatedFactory; } function cloneElementWithValidation(element, props, children) { var newElement = cloneElement.apply(this, arguments); for (var i2 = 2; i2 < arguments.length; i2++) { validateChildKeys(arguments[i2], newElement.type); } validatePropTypes(newElement); return newElement; } function startTransition(scope, options) { var prevTransition = ReactCurrentBatchConfig.transition; ReactCurrentBatchConfig.transition = {}; var currentTransition = ReactCurrentBatchConfig.transition; { ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set(); } try { scope(); } finally { ReactCurrentBatchConfig.transition = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { var updatedFibersCount = currentTransition._updatedFibers.size; if (updatedFibersCount > 10) { warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."); } currentTransition._updatedFibers.clear(); } } } } var didWarnAboutMessageChannel = false; var enqueueTaskImpl = null; function enqueueTask(task) { if (enqueueTaskImpl === null) { try { var requireString = ("require" + Math.random()).slice(0, 7); var nodeRequire = module && module[requireString]; enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate; } catch (_err) { enqueueTaskImpl = function(callback) { { if (didWarnAboutMessageChannel === false) { didWarnAboutMessageChannel = true; if (typeof MessageChannel === "undefined") { error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."); } } } var channel = new MessageChannel(); channel.port1.onmessage = callback; channel.port2.postMessage(void 0); }; } } return enqueueTaskImpl(task); } var actScopeDepth = 0; var didWarnNoAwaitAct = false; function act(callback) { { var prevActScopeDepth = actScopeDepth; actScopeDepth++; if (ReactCurrentActQueue.current === null) { ReactCurrentActQueue.current = []; } var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; var result; try { ReactCurrentActQueue.isBatchingLegacy = true; result = callback(); if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) { var queue = ReactCurrentActQueue.current; if (queue !== null) { ReactCurrentActQueue.didScheduleLegacyUpdate = false; flushActQueue(queue); } } } catch (error2) { popActScope(prevActScopeDepth); throw error2; } finally { ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; } if (result !== null && typeof result === "object" && typeof result.then === "function") { var thenableResult = result; var wasAwaited = false; var thenable = { then: function(resolve, reject) { wasAwaited = true; thenableResult.then(function(returnValue2) { popActScope(prevActScopeDepth); if (actScopeDepth === 0) { recursivelyFlushAsyncActWork(returnValue2, resolve, reject); } else { resolve(returnValue2); } }, function(error2) { popActScope(prevActScopeDepth); reject(error2); }); } }; { if (!didWarnNoAwaitAct && typeof Promise !== "undefined") { Promise.resolve().then(function() { }).then(function() { if (!wasAwaited) { didWarnNoAwaitAct = true; error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"); } }); } } return thenable; } else { var returnValue = result; popActScope(prevActScopeDepth); if (actScopeDepth === 0) { var _queue = ReactCurrentActQueue.current; if (_queue !== null) { flushActQueue(_queue); ReactCurrentActQueue.current = null; } var _thenable = { then: function(resolve, reject) { if (ReactCurrentActQueue.current === null) { ReactCurrentActQueue.current = []; recursivelyFlushAsyncActWork(returnValue, resolve, reject); } else { resolve(returnValue); } } }; return _thenable; } else { var _thenable2 = { then: function(resolve, reject) { resolve(returnValue); } }; return _thenable2; } } } } function popActScope(prevActScopeDepth) { { if (prevActScopeDepth !== actScopeDepth - 1) { error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); } actScopeDepth = prevActScopeDepth; } } function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { { var queue = ReactCurrentActQueue.current; if (queue !== null) { try { flushActQueue(queue); enqueueTask(function() { if (queue.length === 0) { ReactCurrentActQueue.current = null; resolve(returnValue); } else { recursivelyFlushAsyncActWork(returnValue, resolve, reject); } }); } catch (error2) { reject(error2); } } else { resolve(returnValue); } } } var isFlushing = false; function flushActQueue(queue) { { if (!isFlushing) { isFlushing = true; var i2 = 0; try { for (; i2 < queue.length; i2++) { var callback = queue[i2]; do { callback = callback(true); } while (callback !== null); } queue.length = 0; } catch (error2) { queue = queue.slice(i2 + 1); throw error2; } finally { isFlushing = false; } } } } var createElement$1 = createElementWithValidation; var cloneElement$1 = cloneElementWithValidation; var createFactory = createFactoryWithValidation; var Children = { map: mapChildren, forEach: forEachChildren, count: countChildren, toArray, only: onlyChild }; exports.Children = Children; exports.Component = Component; exports.Fragment = REACT_FRAGMENT_TYPE; exports.Profiler = REACT_PROFILER_TYPE; exports.PureComponent = PureComponent; exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; exports.cloneElement = cloneElement$1; exports.createContext = createContext; exports.createElement = createElement$1; exports.createFactory = createFactory; exports.createRef = createRef; exports.forwardRef = forwardRef; exports.isValidElement = isValidElement; exports.lazy = lazy; exports.memo = memo; exports.startTransition = startTransition; exports.unstable_act = act; exports.useCallback = useCallback; exports.useContext = useContext; exports.useDebugValue = useDebugValue; exports.useDeferredValue = useDeferredValue; exports.useEffect = useEffect; exports.useId = useId; exports.useImperativeHandle = useImperativeHandle; exports.useInsertionEffect = useInsertionEffect; exports.useLayoutEffect = useLayoutEffect; exports.useMemo = useMemo; exports.useReducer = useReducer; exports.useRef = useRef; exports.useState = useState; exports.useSyncExternalStore = useSyncExternalStore; exports.useTransition = useTransition; exports.version = ReactVersion; if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } })(react_development, react_development.exports); var react_developmentExports = react_development.exports; { react.exports = react_developmentExports; } var reactExports = react.exports; const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports); /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { (function() { var React2 = reactExports; var REACT_ELEMENT_TYPE = Symbol.for("react.element"); var REACT_PORTAL_TYPE = Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); var REACT_MEMO_TYPE = Symbol.for("react.memo"); var REACT_LAZY_TYPE = Symbol.for("react.lazy"); var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; var FAUX_ITERATOR_SYMBOL = "@@iterator"; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== "object") { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === "function") { return maybeIterator; } return null; } var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function error(format) { { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning("error", format, args); } } } function printWarning(level, format, args) { { var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame2.getStackAddendum(); if (stack !== "") { format += "%s"; args = args.concat([stack]); } var argsWithFormat = args.map(function(item) { return String(item); }); argsWithFormat.unshift("Warning: " + format); Function.prototype.apply.call(console[level], console, argsWithFormat); } } var enableScopeAPI = false; var enableCacheElement = false; var enableTransitionTracing = false; var enableLegacyHidden = false; var enableDebugTracing = false; var REACT_MODULE_REFERENCE; { REACT_MODULE_REFERENCE = Symbol.for("react.module.reference"); } function isValidElementType(type) { if (typeof type === "string" || typeof type === "function") { return true; } if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { return true; } if (typeof type === "object" && type !== null) { if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) { return true; } } return false; } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) { return displayName; } var functionName = innerType.displayName || innerType.name || ""; return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } function getContextName(type) { return type.displayName || "Context"; } function getComponentNameFromType(type) { if (type == null) { return null; } { if (typeof type.tag === "number") { error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); } } if (typeof type === "function") { return type.displayName || type.name || null; } if (typeof type === "string") { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return "Fragment"; case REACT_PORTAL_TYPE: return "Portal"; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return "StrictMode"; case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; } if (typeof type === "object") { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + ".Consumer"; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + ".Provider"; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: var outerName = type.displayName || null; if (outerName !== null) { return outerName; } return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch (x) { return null; } } } } return null; } var assign2 = Object.assign; var disabledDepth = 0; var prevLog; var prevInfo; var prevWarn; var prevError; var prevGroup; var prevGroupCollapsed; var prevGroupEnd; function disabledLog() { } disabledLog.__reactDisabledLog = true; function disableLogs() { { if (disabledDepth === 0) { prevLog = console.log; prevInfo = console.info; prevWarn = console.warn; prevError = console.error; prevGroup = console.group; prevGroupCollapsed = console.groupCollapsed; prevGroupEnd = console.groupEnd; var props = { configurable: true, enumerable: true, value: disabledLog, writable: true }; Object.defineProperties(console, { info: props, log: props, warn: props, error: props, group: props, groupCollapsed: props, groupEnd: props }); } disabledDepth++; } } function reenableLogs() { { disabledDepth--; if (disabledDepth === 0) { var props = { configurable: true, enumerable: true, writable: true }; Object.defineProperties(console, { log: assign2({}, props, { value: prevLog }), info: assign2({}, props, { value: prevInfo }), warn: assign2({}, props, { value: prevWarn }), error: assign2({}, props, { value: prevError }), group: assign2({}, props, { value: prevGroup }), groupCollapsed: assign2({}, props, { value: prevGroupCollapsed }), groupEnd: assign2({}, props, { value: prevGroupEnd }) }); } if (disabledDepth < 0) { error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } } var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source2, ownerFn) { { if (prefix === void 0) { try { throw Error(); } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = match && match[1] || ""; } } return "\n" + prefix + name; } } var reentry = false; var componentFrameCache; { var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; componentFrameCache = new PossiblyWeakMap(); } function describeNativeComponentFrame(fn, construct) { if (!fn || reentry) { return ""; } { var frame = componentFrameCache.get(fn); if (frame !== void 0) { return frame; } } var control; reentry = true; var previousPrepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var previousDispatcher; { previousDispatcher = ReactCurrentDispatcher.current; ReactCurrentDispatcher.current = null; disableLogs(); } try { if (construct) { var Fake = function() { throw Error(); }; Object.defineProperty(Fake.prototype, "props", { set: function() { throw Error(); } }); if (typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(Fake, []); } catch (x) { control = x; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); } catch (x) { control = x; } fn.call(Fake.prototype); } } else { try { throw Error(); } catch (x) { control = x; } fn(); } } catch (sample) { if (sample && control && typeof sample.stack === "string") { var sampleLines = sample.stack.split("\n"); var controlLines = control.stack.split("\n"); var s = sampleLines.length - 1; var c = controlLines.length - 1; while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { c--; } for (; s >= 1 && c >= 0; s--, c--) { if (sampleLines[s] !== controlLines[c]) { if (s !== 1 || c !== 1) { do { s--; c--; if (c < 0 || sampleLines[s] !== controlLines[c]) { var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); if (fn.displayName && _frame.includes("")) { _frame = _frame.replace("", fn.displayName); } { if (typeof fn === "function") { componentFrameCache.set(fn, _frame); } } return _frame; } } while (s >= 1 && c >= 0); } break; } } } } finally { reentry = false; { ReactCurrentDispatcher.current = previousDispatcher; reenableLogs(); } Error.prepareStackTrace = previousPrepareStackTrace; } var name = fn ? fn.displayName || fn.name : ""; var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; { if (typeof fn === "function") { componentFrameCache.set(fn, syntheticFrame); } } return syntheticFrame; } function describeFunctionComponentFrame(fn, source2, ownerFn) { { return describeNativeComponentFrame(fn, false); } } function shouldConstruct(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source2, ownerFn) { if (type == null) { return ""; } if (typeof type === "function") { { return describeNativeComponentFrame(type, shouldConstruct(type)); } } if (typeof type === "string") { return describeBuiltInComponentFrame(type); } switch (type) { case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense"); case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList"); } if (typeof type === "object") { switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render); case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source2, ownerFn); case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return describeUnknownElementTypeFrameInDEV(init(payload), source2, ownerFn); } catch (x) { } } } } return ""; } var hasOwnProperty = Object.prototype.hasOwnProperty; var loggedTypeFailures = {}; var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame.setExtraStackFrame(stack); } else { ReactDebugCurrentFrame.setExtraStackFrame(null); } } } function checkPropTypes(typeSpecs, values, location, componentName, element) { { var has = Function.call.bind(hasOwnProperty); for (var typeSpecName in typeSpecs) { if (has(typeSpecs, typeSpecName)) { var error$1 = void 0; try { if (typeof typeSpecs[typeSpecName] !== "function") { var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); err.name = "Invariant Violation"; throw err; } error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (ex) { error$1 = ex; } if (error$1 && !(error$1 instanceof Error)) { setCurrentlyValidatingElement(element); error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1); setCurrentlyValidatingElement(null); } if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { loggedTypeFailures[error$1.message] = true; setCurrentlyValidatingElement(element); error("Failed %s type: %s", location, error$1.message); setCurrentlyValidatingElement(null); } } } } } var isArrayImpl = Array.isArray; function isArray(a) { return isArrayImpl(a); } function typeName(value) { { var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return type; } } function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } } function testStringCoercion(value) { return "" + value; } function checkKeyStringCoercion(value) { { if (willCoercionThrow(value)) { error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } } var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; var RESERVED_PROPS = { key: true, ref: true, __self: true, __source: true }; var specialPropKeyWarningShown; var specialPropRefWarningShown; var didWarnAboutStringRefs; { didWarnAboutStringRefs = {}; } function hasValidRef(config) { { if (hasOwnProperty.call(config, "ref")) { var getter = Object.getOwnPropertyDescriptor(config, "ref").get; if (getter && getter.isReactWarning) { return false; } } } return config.ref !== void 0; } function hasValidKey(config) { { if (hasOwnProperty.call(config, "key")) { var getter = Object.getOwnPropertyDescriptor(config, "key").get; if (getter && getter.isReactWarning) { return false; } } } return config.key !== void 0; } function warnIfStringRefCannotBeAutoConverted(config, self2) { { if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) { var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); if (!didWarnAboutStringRefs[componentName]) { error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); didWarnAboutStringRefs[componentName] = true; } } } } function defineKeyPropWarningGetter(props, displayName) { { var warnAboutAccessingKey = function() { if (!specialPropKeyWarningShown) { specialPropKeyWarningShown = true; error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } }; warnAboutAccessingKey.isReactWarning = true; Object.defineProperty(props, "key", { get: warnAboutAccessingKey, configurable: true }); } } function defineRefPropWarningGetter(props, displayName) { { var warnAboutAccessingRef = function() { if (!specialPropRefWarningShown) { specialPropRefWarningShown = true; error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName); } }; warnAboutAccessingRef.isReactWarning = true; Object.defineProperty(props, "ref", { get: warnAboutAccessingRef, configurable: true }); } } var ReactElement = function(type, key, ref, self2, source2, owner, props) { var element = { // This tag allows us to uniquely identify this as a React Element $$typeof: REACT_ELEMENT_TYPE, // Built-in properties that belong on the element type, key, ref, props, // Record the component responsible for creating this element. _owner: owner }; { element._store = {}; Object.defineProperty(element._store, "validated", { configurable: false, enumerable: false, writable: true, value: false }); Object.defineProperty(element, "_self", { configurable: false, enumerable: false, writable: false, value: self2 }); Object.defineProperty(element, "_source", { configurable: false, enumerable: false, writable: false, value: source2 }); if (Object.freeze) { Object.freeze(element.props); Object.freeze(element); } } return element; }; function jsxDEV(type, config, maybeKey, source2, self2) { { var propName; var props = {}; var key = null; var ref = null; if (maybeKey !== void 0) { { checkKeyStringCoercion(maybeKey); } key = "" + maybeKey; } if (hasValidKey(config)) { { checkKeyStringCoercion(config.key); } key = "" + config.key; } if (hasValidRef(config)) { ref = config.ref; warnIfStringRefCannotBeAutoConverted(config, self2); } for (propName in config) { if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { props[propName] = config[propName]; } } if (type && type.defaultProps) { var defaultProps = type.defaultProps; for (propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; } } } if (key || ref) { var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type; if (key) { defineKeyPropWarningGetter(props, displayName); } if (ref) { defineRefPropWarningGetter(props, displayName); } } return ReactElement(type, key, ref, self2, source2, ReactCurrentOwner.current, props); } } var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; function setCurrentlyValidatingElement$1(element) { { if (element) { var owner = element._owner; var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); ReactDebugCurrentFrame$1.setExtraStackFrame(stack); } else { ReactDebugCurrentFrame$1.setExtraStackFrame(null); } } } var propTypesMisspellWarningShown; { propTypesMisspellWarningShown = false; } function isValidElement(object) { { return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } } function getDeclarationErrorAddendum() { { if (ReactCurrentOwner$1.current) { var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; } } return ""; } } function getSourceInfoErrorAddendum(source2) { { if (source2 !== void 0) { var fileName = source2.fileName.replace(/^.*[\\\/]/, ""); var lineNumber = source2.lineNumber; return "\n\nCheck your code at " + fileName + ":" + lineNumber + "."; } return ""; } } var ownerHasKeyUseWarning = {}; function getCurrentComponentErrorInfo(parentType) { { var info = getDeclarationErrorAddendum(); if (!info) { var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name; if (parentName) { info = "\n\nCheck the top-level render call using <" + parentName + ">."; } } return info; } } function validateExplicitKey(element, parentType) { { if (!element._store || element._store.validated || element.key != null) { return; } element._store.validated = true; var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { return; } ownerHasKeyUseWarning[currentComponentErrorInfo] = true; var childOwner = ""; if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; } setCurrentlyValidatingElement$1(element); error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); setCurrentlyValidatingElement$1(null); } } function validateChildKeys(node2, parentType) { { if (typeof node2 !== "object") { return; } if (isArray(node2)) { for (var i2 = 0; i2 < node2.length; i2++) { var child = node2[i2]; if (isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (isValidElement(node2)) { if (node2._store) { node2._store.validated = true; } } else if (node2) { var iteratorFn = getIteratorFn(node2); if (typeof iteratorFn === "function") { if (iteratorFn !== node2.entries) { var iterator = iteratorFn.call(node2); var step; while (!(step = iterator.next()).done) { if (isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } } } } function validatePropTypes(element) { { var type = element.type; if (type === null || type === void 0 || typeof type === "string") { return; } var propTypes; if (typeof type === "function") { propTypes = type.propTypes; } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. type.$$typeof === REACT_MEMO_TYPE)) { propTypes = type.propTypes; } else { return; } if (propTypes) { var name = getComponentNameFromType(type); checkPropTypes(propTypes, element.props, "prop", name, element); } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) { propTypesMisspellWarningShown = true; var _name = getComponentNameFromType(type); error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown"); } if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) { error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } } function validateFragmentProps(fragment) { { var keys = Object.keys(fragment.props); for (var i2 = 0; i2 < keys.length; i2++) { var key = keys[i2]; if (key !== "children" && key !== "key") { setCurrentlyValidatingElement$1(fragment); error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key); setCurrentlyValidatingElement$1(null); break; } } if (fragment.ref !== null) { setCurrentlyValidatingElement$1(fragment); error("Invalid attribute `ref` supplied to `React.Fragment`."); setCurrentlyValidatingElement$1(null); } } } function jsxWithValidation(type, props, key, isStaticChildren, source2, self2) { { var validType = isValidElementType(type); if (!validType) { var info = ""; if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) { info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."; } var sourceInfo = getSourceInfoErrorAddendum(source2); if (sourceInfo) { info += sourceInfo; } else { info += getDeclarationErrorAddendum(); } var typeString; if (type === null) { typeString = "null"; } else if (isArray(type)) { typeString = "array"; } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) { typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />"; info = " Did you accidentally export a JSX literal instead of a component?"; } else { typeString = typeof type; } error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info); } var element = jsxDEV(type, props, key, source2, self2); if (element == null) { return element; } if (validType) { var children = props.children; if (children !== void 0) { if (isStaticChildren) { if (isArray(children)) { for (var i2 = 0; i2 < children.length; i2++) { validateChildKeys(children[i2], type); } if (Object.freeze) { Object.freeze(children); } } else { error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); } } else { validateChildKeys(children, type); } } } if (type === REACT_FRAGMENT_TYPE) { validateFragmentProps(element); } else { validatePropTypes(element); } return element; } } function jsxWithValidationStatic(type, props, key) { { return jsxWithValidation(type, props, key, true); } } function jsxWithValidationDynamic(type, props, key) { { return jsxWithValidation(type, props, key, false); } } var jsx = jsxWithValidationDynamic; var jsxs = jsxWithValidationStatic; reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE; reactJsxRuntime_development.jsx = jsx; reactJsxRuntime_development.jsxs = jsxs; })(); } { jsxRuntime.exports = reactJsxRuntime_development; } var jsxRuntimeExports = jsxRuntime.exports; const rustEditorPlaceholder = ""; var classnames = { exports: {} }; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ (function(module) { (function() { var hasOwn = {}.hasOwnProperty; function classNames2() { var classes = []; for (var i2 = 0; i2 < arguments.length; i2++) { var arg = arguments[i2]; if (!arg) continue; var argType = typeof arg; if (argType === "string" || argType === "number") { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames2.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === "object") { if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) { classes.push(arg.toString()); continue; } for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(" "); } if (module.exports) { classNames2.default = classNames2; module.exports = classNames2; } else { window.classNames = classNames2; } })(); })(classnames); var classnamesExports = classnames.exports; const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports); var lodash = { exports: {} }; /** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ lodash.exports; (function(module, exports) { (function() { var undefined$1; var VERSION = "4.17.21"; var LARGE_ARRAY_SIZE = 200; var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; var HASH_UNDEFINED = "__lodash_hash_undefined__"; var MAX_MEMOIZE_SIZE = 500; var PLACEHOLDER = "__lodash_placeholder__"; var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; var HOT_COUNT = 800, HOT_SPAN = 16; var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; var wrapFlags = [ ["ary", WRAP_ARY_FLAG], ["bind", WRAP_BIND_FLAG], ["bindKey", WRAP_BIND_KEY_FLAG], ["curry", WRAP_CURRY_FLAG], ["curryRight", WRAP_CURRY_RIGHT_FLAG], ["flip", WRAP_FLIP_FLAG], ["partial", WRAP_PARTIAL_FLAG], ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], ["rearg", WRAP_REARG_FLAG] ]; var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]"; var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); var reTrimStart = /^\s+/; var reWhitespace = /\s/; var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; var reEscapeChar = /\\(\\)?/g; var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; var reFlags = /\w*$/; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsHostCtor = /^\[object .+?Constructor\]$/; var reIsOctal = /^0o[0-7]+$/i; var reIsUint = /^(?:0|[1-9]\d*)$/; var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; var reNoMatch = /($^)/; var reUnescapedString = /['\n\r\u2028\u2029\\]/g; var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; var rsApos = "['’]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d"; var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; var reApos = RegExp(rsApos, "g"); var reComboMark = RegExp(rsCombo, "g"); var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); var reUnicodeWord = RegExp([ rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, rsUpper + "+" + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji ].join("|"), "g"); var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; var contextProps = [ "Array", "Buffer", "DataView", "Date", "Error", "Float32Array", "Float64Array", "Function", "Int8Array", "Int16Array", "Int32Array", "Map", "Math", "Object", "Promise", "RegExp", "Set", "String", "Symbol", "TypeError", "Uint8Array", "Uint8ClampedArray", "Uint16Array", "Uint32Array", "WeakMap", "_", "clearTimeout", "isFinite", "parseInt", "setTimeout" ]; var templateCounter = -1; var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; var deburredLetters = { // Latin-1 Supplement block. "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "Ç": "C", "ç": "c", "Ð": "D", "ð": "d", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "è": "e", "é": "e", "ê": "e", "ë": "e", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "ì": "i", "í": "i", "î": "i", "ï": "i", "Ñ": "N", "ñ": "n", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "ù": "u", "ú": "u", "û": "u", "ü": "u", "Ý": "Y", "ý": "y", "ÿ": "y", "Æ": "Ae", "æ": "ae", "Þ": "Th", "þ": "th", "ß": "ss", // Latin Extended-A block. "Ā": "A", "Ă": "A", "Ą": "A", "ā": "a", "ă": "a", "ą": "a", "Ć": "C", "Ĉ": "C", "Ċ": "C", "Č": "C", "ć": "c", "ĉ": "c", "ċ": "c", "č": "c", "Ď": "D", "Đ": "D", "ď": "d", "đ": "d", "Ē": "E", "Ĕ": "E", "Ė": "E", "Ę": "E", "Ě": "E", "ē": "e", "ĕ": "e", "ė": "e", "ę": "e", "ě": "e", "Ĝ": "G", "Ğ": "G", "Ġ": "G", "Ģ": "G", "ĝ": "g", "ğ": "g", "ġ": "g", "ģ": "g", "Ĥ": "H", "Ħ": "H", "ĥ": "h", "ħ": "h", "Ĩ": "I", "Ī": "I", "Ĭ": "I", "Į": "I", "İ": "I", "ĩ": "i", "ī": "i", "ĭ": "i", "į": "i", "ı": "i", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "ĸ": "k", "Ĺ": "L", "Ļ": "L", "Ľ": "L", "Ŀ": "L", "Ł": "L", "ĺ": "l", "ļ": "l", "ľ": "l", "ŀ": "l", "ł": "l", "Ń": "N", "Ņ": "N", "Ň": "N", "Ŋ": "N", "ń": "n", "ņ": "n", "ň": "n", "ŋ": "n", "Ō": "O", "Ŏ": "O", "Ő": "O", "ō": "o", "ŏ": "o", "ő": "o", "Ŕ": "R", "Ŗ": "R", "Ř": "R", "ŕ": "r", "ŗ": "r", "ř": "r", "Ś": "S", "Ŝ": "S", "Ş": "S", "Š": "S", "ś": "s", "ŝ": "s", "ş": "s", "š": "s", "Ţ": "T", "Ť": "T", "Ŧ": "T", "ţ": "t", "ť": "t", "ŧ": "t", "Ũ": "U", "Ū": "U", "Ŭ": "U", "Ů": "U", "Ű": "U", "Ų": "U", "ũ": "u", "ū": "u", "ŭ": "u", "ů": "u", "ű": "u", "ų": "u", "Ŵ": "W", "ŵ": "w", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Ź": "Z", "Ż": "Z", "Ž": "Z", "ź": "z", "ż": "z", "ž": "z", "IJ": "IJ", "ij": "ij", "Œ": "Oe", "œ": "oe", "ʼn": "'n", "ſ": "s" }; var htmlEscapes = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }; var htmlUnescapes = { "&": "&", "<": "<", ">": ">", """: '"', "'": "'" }; var stringEscapes = { "\\": "\\", "'": "'", "\n": "n", "\r": "r", "\u2028": "u2028", "\u2029": "u2029" }; var freeParseFloat = parseFloat, freeParseInt = parseInt; var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root = freeGlobal || freeSelf || Function("return this")(); var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var freeProcess = moduleExports && freeGlobal.process; var nodeUtil = function() { try { var types = freeModule && freeModule.require && freeModule.require("util").types; if (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { } }(); var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } function arrayAggregator(array, setter, iteratee, accumulator) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { var value = array[index2]; setter(accumulator, value, iteratee(value), array); } return accumulator; } function arrayEach(array, iteratee) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { if (iteratee(array[index2], index2, array) === false) { break; } } return array; } function arrayEachRight(array, iteratee) { var length = array == null ? 0 : array.length; while (length--) { if (iteratee(array[length], length, array) === false) { break; } } return array; } function arrayEvery(array, predicate) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { if (!predicate(array[index2], index2, array)) { return false; } } return true; } function arrayFilter(array, predicate) { var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index2 < length) { var value = array[index2]; if (predicate(value, index2, array)) { result[resIndex++] = value; } } return result; } function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } function arrayIncludesWith(array, value, comparator) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { if (comparator(value, array[index2])) { return true; } } return false; } function arrayMap(array, iteratee) { var index2 = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index2 < length) { result[index2] = iteratee(array[index2], index2, array); } return result; } function arrayPush(array, values) { var index2 = -1, length = values.length, offset = array.length; while (++index2 < length) { array[offset + index2] = values[index2]; } return array; } function arrayReduce(array, iteratee, accumulator, initAccum) { var index2 = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index2]; } while (++index2 < length) { accumulator = iteratee(accumulator, array[index2], index2, array); } return accumulator; } function arrayReduceRight(array, iteratee, accumulator, initAccum) { var length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[--length]; } while (length--) { accumulator = iteratee(accumulator, array[length], length, array); } return accumulator; } function arraySome(array, predicate) { var index2 = -1, length = array == null ? 0 : array.length; while (++index2 < length) { if (predicate(array[index2], index2, array)) { return true; } } return false; } var asciiSize = baseProperty("length"); function asciiToArray(string) { return string.split(""); } function asciiWords(string) { return string.match(reAsciiWord) || []; } function baseFindKey(collection, predicate, eachFunc) { var result; eachFunc(collection, function(value, key, collection2) { if (predicate(value, key, collection2)) { result = key; return false; } }); return result; } function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index2 = fromIndex + (fromRight ? 1 : -1); while (fromRight ? index2-- : ++index2 < length) { if (predicate(array[index2], index2, array)) { return index2; } } return -1; } function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } function baseIndexOfWith(array, value, fromIndex, comparator) { var index2 = fromIndex - 1, length = array.length; while (++index2 < length) { if (comparator(array[index2], value)) { return index2; } } return -1; } function baseIsNaN(value) { return value !== value; } function baseMean(array, iteratee) { var length = array == null ? 0 : array.length; return length ? baseSum(array, iteratee) / length : NAN; } function baseProperty(key) { return function(object) { return object == null ? undefined$1 : object[key]; }; } function basePropertyOf(object) { return function(key) { return object == null ? undefined$1 : object[key]; }; } function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index2, collection2) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2); }); return accumulator; } function baseSortBy(array, comparer2) { var length = array.length; array.sort(comparer2); while (length--) { array[length] = array[length].value; } return array; } function baseSum(array, iteratee) { var result, index2 = -1, length = array.length; while (++index2 < length) { var current = iteratee(array[index2]); if (current !== undefined$1) { result = result === undefined$1 ? current : result + current; } } return result; } function baseTimes(n, iteratee) { var index2 = -1, result = Array(n); while (++index2 < n) { result[index2] = iteratee(index2); } return result; } function baseToPairs(object, props) { return arrayMap(props, function(key) { return [key, object[key]]; }); } function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } function baseUnary(func) { return function(value) { return func(value); }; } function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } function cacheHas(cache2, key) { return cache2.has(key); } function charsStartIndex(strSymbols, chrSymbols) { var index2 = -1, length = strSymbols.length; while (++index2 < length && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function charsEndIndex(strSymbols, chrSymbols) { var index2 = strSymbols.length; while (index2-- && baseIndexOf(chrSymbols, strSymbols[index2], 0) > -1) { } return index2; } function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { ++result; } } return result; } var deburrLetter = basePropertyOf(deburredLetters); var escapeHtmlChar = basePropertyOf(htmlEscapes); function escapeStringChar(chr) { return "\\" + stringEscapes[chr]; } function getValue(object, key) { return object == null ? undefined$1 : object[key]; } function hasUnicode(string) { return reHasUnicode.test(string); } function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } function iteratorToArray(iterator) { var data, result = []; while (!(data = iterator.next()).done) { result.push(data.value); } return result; } function mapToArray(map2) { var index2 = -1, result = Array(map2.size); map2.forEach(function(value, key) { result[++index2] = [key, value]; }); return result; } function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } function replaceHolders(array, placeholder) { var index2 = -1, length = array.length, resIndex = 0, result = []; while (++index2 < length) { var value = array[index2]; if (value === placeholder || value === PLACEHOLDER) { array[index2] = PLACEHOLDER; result[resIndex++] = index2; } } return result; } function setToArray(set2) { var index2 = -1, result = Array(set2.size); set2.forEach(function(value) { result[++index2] = value; }); return result; } function setToPairs(set2) { var index2 = -1, result = Array(set2.size); set2.forEach(function(value) { result[++index2] = [value, value]; }); return result; } function strictIndexOf(array, value, fromIndex) { var index2 = fromIndex - 1, length = array.length; while (++index2 < length) { if (array[index2] === value) { return index2; } } return -1; } function strictLastIndexOf(array, value, fromIndex) { var index2 = fromIndex + 1; while (index2--) { if (array[index2] === value) { return index2; } } return index2; } function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } function stringToArray(string) { return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); } function trimmedEndIndex(string) { var index2 = string.length; while (index2-- && reWhitespace.test(string.charAt(index2))) { } return index2; } var unescapeHtmlChar = basePropertyOf(htmlUnescapes); function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result; } return result; } function unicodeToArray(string) { return string.match(reUnicode) || []; } function unicodeWords(string) { return string.match(reUnicodeWord) || []; } var runInContext = function runInContext2(context) { context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps)); var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; var coreJsData = context["__core-js_shared__"]; var funcToString = funcProto.toString; var hasOwnProperty = objectProto.hasOwnProperty; var idCounter = 0; var maskSrcKey = function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); var nativeObjectToString = objectProto.toString; var objectCtorString = funcToString.call(Object2); var oldDash = root._; var reIsNative = RegExp2( "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" ); var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1; var defineProperty2 = function() { try { var func = getNative(Object2, "defineProperty"); func({}, "", {}); return func; } catch (e) { } }(); var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse; var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"); var metaMap = WeakMap2 && new WeakMap2(); var realNames = {}; var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2); var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1; function lodash2(value) { if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { if (value instanceof LodashWrapper) { return value; } if (hasOwnProperty.call(value, "__wrapped__")) { return wrapperClone(value); } } return new LodashWrapper(value); } var baseCreate = function() { function object() { } return function(proto) { if (!isObject2(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result2 = new object(); object.prototype = undefined$1; return result2; }; }(); function baseLodash() { } function LodashWrapper(value, chainAll) { this.__wrapped__ = value; this.__actions__ = []; this.__chain__ = !!chainAll; this.__index__ = 0; this.__values__ = undefined$1; } lodash2.templateSettings = { /** * Used to detect `data` property values to be HTML-escaped. * * @memberOf _.templateSettings * @type {RegExp} */ "escape": reEscape, /** * Used to detect code to be evaluated. * * @memberOf _.templateSettings * @type {RegExp} */ "evaluate": reEvaluate, /** * Used to detect `data` property values to inject. * * @memberOf _.templateSettings * @type {RegExp} */ "interpolate": reInterpolate, /** * Used to reference the data object in the template text. * * @memberOf _.templateSettings * @type {string} */ "variable": "", /** * Used to import variables into the compiled template. * * @memberOf _.templateSettings * @type {Object} */ "imports": { /** * A reference to the `lodash` function. * * @memberOf _.templateSettings.imports * @type {Function} */ "_": lodash2 } }; lodash2.prototype = baseLodash.prototype; lodash2.prototype.constructor = lodash2; LodashWrapper.prototype = baseCreate(baseLodash.prototype); LodashWrapper.prototype.constructor = LodashWrapper; function LazyWrapper(value) { this.__wrapped__ = value; this.__actions__ = []; this.__dir__ = 1; this.__filtered__ = false; this.__iteratees__ = []; this.__takeCount__ = MAX_ARRAY_LENGTH; this.__views__ = []; } function lazyClone() { var result2 = new LazyWrapper(this.__wrapped__); result2.__actions__ = copyArray(this.__actions__); result2.__dir__ = this.__dir__; result2.__filtered__ = this.__filtered__; result2.__iteratees__ = copyArray(this.__iteratees__); result2.__takeCount__ = this.__takeCount__; result2.__views__ = copyArray(this.__views__); return result2; } function lazyReverse() { if (this.__filtered__) { var result2 = new LazyWrapper(this); result2.__dir__ = -1; result2.__filtered__ = true; } else { result2 = this.clone(); result2.__dir__ *= -1; } return result2; } function lazyValue() { var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index2 = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); if (!isArr || !isRight && arrLength == length && takeCount == length) { return baseWrapperValue(array, this.__actions__); } var result2 = []; outer: while (length-- && resIndex < takeCount) { index2 += dir; var iterIndex = -1, value = array[index2]; while (++iterIndex < iterLength) { var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed2 = iteratee2(value); if (type == LAZY_MAP_FLAG) { value = computed2; } else if (!computed2) { if (type == LAZY_FILTER_FLAG) { continue outer; } else { break outer; } } } result2[resIndex++] = value; } return result2; } LazyWrapper.prototype = baseCreate(baseLodash.prototype); LazyWrapper.prototype.constructor = LazyWrapper; function Hash(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } function hashDelete(key) { var result2 = this.has(key) && delete this.__data__[key]; this.size -= result2 ? 1 : 0; return result2; } function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result2 = data[key]; return result2 === HASH_UNDEFINED ? undefined$1 : result2; } return hasOwnProperty.call(data, key) ? data[key] : undefined$1; } function hashHas(key) { var data = this.__data__; return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key); } function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value; return this; } Hash.prototype.clear = hashClear; Hash.prototype["delete"] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; function ListCache(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function listCacheClear() { this.__data__ = []; this.size = 0; } function listCacheDelete(key) { var data = this.__data__, index2 = assocIndexOf(data, key); if (index2 < 0) { return false; } var lastIndex = data.length - 1; if (index2 == lastIndex) { data.pop(); } else { splice.call(data, index2, 1); } --this.size; return true; } function listCacheGet(key) { var data = this.__data__, index2 = assocIndexOf(data, key); return index2 < 0 ? undefined$1 : data[index2][1]; } function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } function listCacheSet(key, value) { var data = this.__data__, index2 = assocIndexOf(data, key); if (index2 < 0) { ++this.size; data.push([key, value]); } else { data[index2][1] = value; } return this; } ListCache.prototype.clear = listCacheClear; ListCache.prototype["delete"] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; function MapCache(entries) { var index2 = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index2 < length) { var entry = entries[index2]; this.set(entry[0], entry[1]); } } function mapCacheClear() { this.size = 0; this.__data__ = { "hash": new Hash(), "map": new (Map2 || ListCache)(), "string": new Hash() }; } function mapCacheDelete(key) { var result2 = getMapData(this, key)["delete"](key); this.size -= result2 ? 1 : 0; return result2; } function mapCacheGet(key) { return getMapData(this, key).get(key); } function mapCacheHas(key) { return getMapData(this, key).has(key); } function mapCacheSet(key, value) { var data = getMapData(this, key), size2 = data.size; data.set(key, value); this.size += data.size == size2 ? 0 : 1; return this; } MapCache.prototype.clear = mapCacheClear; MapCache.prototype["delete"] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; function SetCache(values2) { var index2 = -1, length = values2 == null ? 0 : values2.length; this.__data__ = new MapCache(); while (++index2 < length) { this.add(values2[index2]); } } function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } function setCacheHas(value) { return this.__data__.has(value); } SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } function stackClear() { this.__data__ = new ListCache(); this.size = 0; } function stackDelete(key) { var data = this.__data__, result2 = data["delete"](key); this.size = data.size; return result2; } function stackGet(key) { return this.__data__.get(key); } function stackHas(key) { return this.__data__.has(key); } function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } Stack.prototype.clear = stackClear; Stack.prototype["delete"] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. isIndex(key, length)))) { result2.push(key); } } return result2; } function arraySample(array) { var length = array.length; return length ? array[baseRandom(0, length - 1)] : undefined$1; } function arraySampleSize(array, n) { return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); } function arrayShuffle(array) { return shuffleSelf(copyArray(array)); } function assignMergeValue(object, key, value) { if (value !== undefined$1 && !eq2(object[key], value) || value === undefined$1 && !(key in object)) { baseAssignValue(object, key, value); } } function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq2(objValue, value)) || value === undefined$1 && !(key in object)) { baseAssignValue(object, key, value); } } function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq2(array[length][0], key)) { return length; } } return -1; } function baseAggregator(collection, setter, iteratee2, accumulator) { baseEach(collection, function(value, key, collection2) { setter(accumulator, value, iteratee2(value), collection2); }); return accumulator; } function baseAssign(object, source2) { return object && copyObject(source2, keys(source2), object); } function baseAssignIn(object, source2) { return object && copyObject(source2, keysIn(source2), object); } function baseAssignValue(object, key, value) { if (key == "__proto__" && defineProperty2) { defineProperty2(object, key, { "configurable": true, "enumerable": true, "value": value, "writable": true }); } else { object[key] = value; } } function baseAt(object, paths) { var index2 = -1, length = paths.length, result2 = Array2(length), skip = object == null; while (++index2 < length) { result2[index2] = skip ? undefined$1 : get2(object, paths[index2]); } return result2; } function baseClamp(number, lower, upper) { if (number === number) { if (upper !== undefined$1) { number = number <= upper ? number : upper; } if (lower !== undefined$1) { number = number >= lower ? number : lower; } } return number; } function baseClone(value, bitmask, customizer, key, object, stack) { var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result2 = object ? customizer(value, key, object, stack) : customizer(value); } if (result2 !== undefined$1) { return result2; } if (!isObject2(value)) { return value; } var isArr = isArray(value); if (isArr) { result2 = initCloneArray(value); if (!isDeep) { return copyArray(value, result2); } } else { var tag2 = getTag(value), isFunc = tag2 == funcTag || tag2 == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag2 == objectTag || tag2 == argsTag || isFunc && !object) { result2 = isFlat || isFunc ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value)); } } else { if (!cloneableTags[tag2]) { return object ? value : {}; } result2 = initCloneByTag(value, tag2, isDeep); } } stack || (stack = new Stack()); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result2); if (isSet(value)) { value.forEach(function(subValue) { result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key2) { result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); }); } var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; var props = isArr ? undefined$1 : keysFunc(value); arrayEach(props || value, function(subValue, key2) { if (props) { key2 = subValue; subValue = value[key2]; } assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); }); return result2; } function baseConforms(source2) { var props = keys(source2); return function(object) { return baseConformsTo(object, source2, props); }; } function baseConformsTo(object, source2, props) { var length = props.length; if (object == null) { return !length; } object = Object2(object); while (length--) { var key = props[length], predicate = source2[key], value = object[key]; if (value === undefined$1 && !(key in object) || !predicate(value)) { return false; } } return true; } function baseDelay(func, wait, args) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return setTimeout2(function() { func.apply(undefined$1, args); }, wait); } function baseDifference(array, values2, iteratee2, comparator) { var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length; if (!length) { return result2; } if (iteratee2) { values2 = arrayMap(values2, baseUnary(iteratee2)); } if (comparator) { includes2 = arrayIncludesWith; isCommon = false; } else if (values2.length >= LARGE_ARRAY_SIZE) { includes2 = cacheHas; isCommon = false; values2 = new SetCache(values2); } outer: while (++index2 < length) { var value = array[index2], computed2 = iteratee2 == null ? value : iteratee2(value); value = comparator || value !== 0 ? value : 0; if (isCommon && computed2 === computed2) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values2[valuesIndex] === computed2) { continue outer; } } result2.push(value); } else if (!includes2(values2, computed2, comparator)) { result2.push(value); } } return result2; } var baseEach = createBaseEach(baseForOwn); var baseEachRight = createBaseEach(baseForOwnRight, true); function baseEvery(collection, predicate) { var result2 = true; baseEach(collection, function(value, index2, collection2) { result2 = !!predicate(value, index2, collection2); return result2; }); return result2; } function baseExtremum(array, iteratee2, comparator) { var index2 = -1, length = array.length; while (++index2 < length) { var value = array[index2], current = iteratee2(value); if (current != null && (computed2 === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed2))) { var computed2 = current, result2 = value; } } return result2; } function baseFill(array, value, start, end) { var length = array.length; start = toInteger(start); if (start < 0) { start = -start > length ? 0 : length + start; } end = end === undefined$1 || end > length ? length : toInteger(end); if (end < 0) { end += length; } end = start > end ? 0 : toLength(end); while (start < end) { array[start++] = value; } return array; } function baseFilter(collection, predicate) { var result2 = []; baseEach(collection, function(value, index2, collection2) { if (predicate(value, index2, collection2)) { result2.push(value); } }); return result2; } function baseFlatten(array, depth, predicate, isStrict, result2) { var index2 = -1, length = array.length; predicate || (predicate = isFlattenable); result2 || (result2 = []); while (++index2 < length) { var value = array[index2]; if (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten(value, depth - 1, predicate, isStrict, result2); } else { arrayPush(result2, value); } } else if (!isStrict) { result2[result2.length] = value; } } return result2; } var baseFor = createBaseFor(); var baseForRight = createBaseFor(true); function baseForOwn(object, iteratee2) { return object && baseFor(object, iteratee2, keys); } function baseForOwnRight(object, iteratee2) { return object && baseForRight(object, iteratee2, keys); } function baseFunctions(object, props) { return arrayFilter(props, function(key) { return isFunction2(object[key]); }); } function baseGet2(object, path) { path = castPath(path, object); var index2 = 0, length = path.length; while (object != null && index2 < length) { object = object[toKey(path[index2++])]; } return index2 && index2 == length ? object : undefined$1; } function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result2 = keysFunc(object); return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object)); } function baseGetTag(value) { if (value == null) { return value === undefined$1 ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value); } function baseGt(value, other) { return value > other; } function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } function baseHasIn(object, key) { return object != null && key in Object2(object); } function baseInRange(number, start, end) { return number >= nativeMin(start, end) && number < nativeMax(start, end); } function baseIntersection(arrays, iteratee2, comparator) { var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee2) { array = arrayMap(array, baseUnary(iteratee2)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1; } array = arrays[0]; var index2 = -1, seen = caches[0]; outer: while (++index2 < length && result2.length < maxLength) { var value = array[index2], computed2 = iteratee2 ? iteratee2(value) : value; value = comparator || value !== 0 ? value : 0; if (!(seen ? cacheHas(seen, computed2) : includes2(result2, computed2, comparator))) { othIndex = othLength; while (--othIndex) { var cache2 = caches[othIndex]; if (!(cache2 ? cacheHas(cache2, computed2) : includes2(arrays[othIndex], computed2, comparator))) { continue outer; } } if (seen) { seen.push(computed2); } result2.push(value); } } return result2; } function baseInverter(object, setter, iteratee2, accumulator) { baseForOwn(object, function(value, key, object2) { setter(accumulator, iteratee2(value), key, object2); }); return accumulator; } function baseInvoke(object, path, args) { path = castPath(path, object); object = parent(object, path); var func = object == null ? object : object[toKey(last(path))]; return func == null ? undefined$1 : apply(func, object, args); } function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } function baseIsArrayBuffer(value) { return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } function baseIsDate(value) { return isObjectLike(value) && baseGetTag(value) == dateTag; } function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack()); return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack()); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } function baseIsMatch(object, source2, matchData, customizer) { var index2 = matchData.length, length = index2, noCustomizer = !customizer; if (object == null) { return !length; } object = Object2(object); while (index2--) { var data = matchData[index2]; if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { return false; } } while (++index2 < length) { data = matchData[index2]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined$1 && !(key in object)) { return false; } } else { var stack = new Stack(); if (customizer) { var result2 = customizer(objValue, srcValue, key, object, source2, stack); } if (!(result2 === undefined$1 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) { return false; } } } return true; } function baseIsNative(value) { if (!isObject2(value) || isMasked(value)) { return false; } var pattern = isFunction2(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } function baseIsRegExp(value) { return isObjectLike(value) && baseGetTag(value) == regexpTag; } function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } function baseIteratee(value) { if (typeof value == "function") { return value; } if (value == null) { return identity; } if (typeof value == "object") { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result2 = []; for (var key in Object2(object)) { if (hasOwnProperty.call(object, key) && key != "constructor") { result2.push(key); } } return result2; } function baseKeysIn(object) { if (!isObject2(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result2 = []; for (var key in object) { if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { result2.push(key); } } return result2; } function baseLt(value, other) { return value < other; } function baseMap(collection, iteratee2) { var index2 = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : []; baseEach(collection, function(value, key, collection2) { result2[++index2] = iteratee2(value, key, collection2); }); return result2; } function baseMatches(source2) { var matchData = getMatchData(source2); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source2 || baseIsMatch(object, source2, matchData); }; } function baseMatchesProperty(path, srcValue) { if (isKey2(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get2(object, path); return objValue === undefined$1 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } function baseMerge(object, source2, srcIndex, customizer, stack) { if (object === source2) { return; } baseFor(source2, function(srcValue, key) { stack || (stack = new Stack()); if (isObject2(srcValue)) { baseMergeDeep(object, source2, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source2, stack) : undefined$1; if (newValue === undefined$1) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } function baseMergeDeep(object, source2, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source2, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source2, stack) : undefined$1; var isCommon = newValue === undefined$1; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject2(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject2(objValue) || isFunction2(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack["delete"](srcValue); } assignMergeValue(object, key, newValue); } function baseNth(array, n) { var length = array.length; if (!length) { return; } n += n < 0 ? length : 0; return isIndex(n, length) ? array[n] : undefined$1; } function baseOrderBy(collection, iteratees, orders) { if (iteratees.length) { iteratees = arrayMap(iteratees, function(iteratee2) { if (isArray(iteratee2)) { return function(value) { return baseGet2(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); }; } return iteratee2; }); } else { iteratees = [identity]; } var index2 = -1; iteratees = arrayMap(iteratees, baseUnary(getIteratee())); var result2 = baseMap(collection, function(value, key, collection2) { var criteria = arrayMap(iteratees, function(iteratee2) { return iteratee2(value); }); return { "criteria": criteria, "index": ++index2, "value": value }; }); return baseSortBy(result2, function(object, other) { return compareMultiple(object, other, orders); }); } function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } function basePickBy(object, paths, predicate) { var index2 = -1, length = paths.length, result2 = {}; while (++index2 < length) { var path = paths[index2], value = baseGet2(object, path); if (predicate(value, path)) { baseSet(result2, castPath(path, object), value); } } return result2; } function basePropertyDeep(path) { return function(object) { return baseGet2(object, path); }; } function basePullAll(array, values2, iteratee2, comparator) { var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index2 = -1, length = values2.length, seen = array; if (array === values2) { values2 = copyArray(values2); } if (iteratee2) { seen = arrayMap(array, baseUnary(iteratee2)); } while (++index2 < length) { var fromIndex = 0, value = values2[index2], computed2 = iteratee2 ? iteratee2(value) : value; while ((fromIndex = indexOf2(seen, computed2, fromIndex, comparator)) > -1) { if (seen !== array) { splice.call(seen, fromIndex, 1); } splice.call(array, fromIndex, 1); } } return array; } function basePullAt(array, indexes) { var length = array ? indexes.length : 0, lastIndex = length - 1; while (length--) { var index2 = indexes[length]; if (length == lastIndex || index2 !== previous) { var previous = index2; if (isIndex(index2)) { splice.call(array, index2, 1); } else { baseUnset(array, index2); } } } return array; } function baseRandom(lower, upper) { return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); } function baseRange(start, end, step, fromRight) { var index2 = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length); while (length--) { result2[fromRight ? length : ++index2] = start; start += step; } return result2; } function baseRepeat(string, n) { var result2 = ""; if (!string || n < 1 || n > MAX_SAFE_INTEGER) { return result2; } do { if (n % 2) { result2 += string; } n = nativeFloor(n / 2); if (n) { string += string; } } while (n); return result2; } function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ""); } function baseSample(collection) { return arraySample(values(collection)); } function baseSampleSize(collection, n) { var array = values(collection); return shuffleSelf(array, baseClamp(n, 0, array.length)); } function baseSet(object, path, value, customizer) { if (!isObject2(object)) { return object; } path = castPath(path, object); var index2 = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index2 < length) { var key = toKey(path[index2]), newValue = value; if (key === "__proto__" || key === "constructor" || key === "prototype") { return object; } if (index2 != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined$1; if (newValue === undefined$1) { newValue = isObject2(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {}; } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } var baseSetData = !metaMap ? identity : function(func, data) { metaMap.set(func, data); return func; }; var baseSetToString = !defineProperty2 ? identity : function(func, string) { return defineProperty2(func, "toString", { "configurable": true, "enumerable": false, "value": constant(string), "writable": true }); }; function baseShuffle(collection) { return shuffleSelf(values(collection)); } function baseSlice(array, start, end) { var index2 = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : length + start; } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : end - start >>> 0; start >>>= 0; var result2 = Array2(length); while (++index2 < length) { result2[index2] = array[index2 + start]; } return result2; } function baseSome(collection, predicate) { var result2; baseEach(collection, function(value, index2, collection2) { result2 = predicate(value, index2, collection2); return !result2; }); return !!result2; } function baseSortedIndex(array, value, retHighest) { var low = 0, high = array == null ? low : array.length; if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { while (low < high) { var mid2 = low + high >>> 1, computed2 = array[mid2]; if (computed2 !== null && !isSymbol(computed2) && (retHighest ? computed2 <= value : computed2 < value)) { low = mid2 + 1; } else { high = mid2; } } return high; } return baseSortedIndexBy(array, value, identity, retHighest); } function baseSortedIndexBy(array, value, iteratee2, retHighest) { var low = 0, high = array == null ? 0 : array.length; if (high === 0) { return 0; } value = iteratee2(value); var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined$1; while (low < high) { var mid2 = nativeFloor((low + high) / 2), computed2 = iteratee2(array[mid2]), othIsDefined = computed2 !== undefined$1, othIsNull = computed2 === null, othIsReflexive = computed2 === computed2, othIsSymbol = isSymbol(computed2); if (valIsNaN) { var setLow = retHighest || othIsReflexive; } else if (valIsUndefined) { setLow = othIsReflexive && (retHighest || othIsDefined); } else if (valIsNull) { setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); } else if (valIsSymbol) { setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); } else if (othIsNull || othIsSymbol) { setLow = false; } else { setLow = retHighest ? computed2 <= value : computed2 < value; } if (setLow) { low = mid2 + 1; } else { high = mid2; } } return nativeMin(high, MAX_ARRAY_INDEX); } function baseSortedUniq(array, iteratee2) { var index2 = -1, length = array.length, resIndex = 0, result2 = []; while (++index2 < length) { var value = array[index2], computed2 = iteratee2 ? iteratee2(value) : value; if (!index2 || !eq2(computed2, seen)) { var seen = computed2; result2[resIndex++] = value === 0 ? 0 : value; } } return result2; } function baseToNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } return +value; } function baseToString(value) { if (typeof value == "string") { return value; } if (isArray(value)) { return arrayMap(value, baseToString) + ""; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ""; } var result2 = value + ""; return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; } function baseUniq(array, iteratee2, comparator) { var index2 = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2; if (comparator) { isCommon = false; includes2 = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set3 = iteratee2 ? null : createSet(array); if (set3) { return setToArray(set3); } isCommon = false; includes2 = cacheHas; seen = new SetCache(); } else { seen = iteratee2 ? [] : result2; } outer: while (++index2 < length) { var value = array[index2], computed2 = iteratee2 ? iteratee2(value) : value; value = comparator || value !== 0 ? value : 0; if (isCommon && computed2 === computed2) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed2) { continue outer; } } if (iteratee2) { seen.push(computed2); } result2.push(value); } else if (!includes2(seen, computed2, comparator)) { if (seen !== result2) { seen.push(computed2); } result2.push(value); } } return result2; } function baseUnset(object, path) { path = castPath(path, object); object = parent(object, path); return object == null || delete object[toKey(last(path))]; } function baseUpdate(object, path, updater, customizer) { return baseSet(object, path, updater(baseGet2(object, path)), customizer); } function baseWhile(array, predicate, isDrop, fromRight) { var length = array.length, index2 = fromRight ? length : -1; while ((fromRight ? index2-- : ++index2 < length) && predicate(array[index2], index2, array)) { } return isDrop ? baseSlice(array, fromRight ? 0 : index2, fromRight ? index2 + 1 : length) : baseSlice(array, fromRight ? index2 + 1 : 0, fromRight ? length : index2); } function baseWrapperValue(value, actions) { var result2 = value; if (result2 instanceof LazyWrapper) { result2 = result2.value(); } return arrayReduce(actions, function(result3, action2) { return action2.func.apply(action2.thisArg, arrayPush([result3], action2.args)); }, result2); } function baseXor(arrays, iteratee2, comparator) { var length = arrays.length; if (length < 2) { return length ? baseUniq(arrays[0]) : []; } var index2 = -1, result2 = Array2(length); while (++index2 < length) { var array = arrays[index2], othIndex = -1; while (++othIndex < length) { if (othIndex != index2) { result2[index2] = baseDifference(result2[index2] || array, arrays[othIndex], iteratee2, comparator); } } } return baseUniq(baseFlatten(result2, 1), iteratee2, comparator); } function baseZipObject(props, values2, assignFunc) { var index2 = -1, length = props.length, valsLength = values2.length, result2 = {}; while (++index2 < length) { var value = index2 < valsLength ? values2[index2] : undefined$1; assignFunc(result2, props[index2], value); } return result2; } function castArrayLikeObject(value) { return isArrayLikeObject(value) ? value : []; } function castFunction(value) { return typeof value == "function" ? value : identity; } function castPath(value, object) { if (isArray(value)) { return value; } return isKey2(value, object) ? [value] : stringToPath2(toString2(value)); } var castRest = baseRest; function castSlice(array, start, end) { var length = array.length; end = end === undefined$1 ? length : end; return !start && end >= length ? array : baseSlice(array, start, end); } var clearTimeout2 = ctxClearTimeout || function(id) { return root.clearTimeout(id); }; function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result2); return result2; } function cloneArrayBuffer(arrayBuffer) { var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer)); return result2; } function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } function cloneRegExp(regexp) { var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result2.lastIndex = regexp.lastIndex; return result2; } function cloneSymbol(symbol) { return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {}; } function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined$1, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined$1, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { return 1; } if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { return -1; } } return 0; } function compareMultiple(object, other, orders) { var index2 = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index2 < length) { var result2 = compareAscending(objCriteria[index2], othCriteria[index2]); if (result2) { if (index2 >= ordersLength) { return result2; } var order2 = orders[index2]; return result2 * (order2 == "desc" ? -1 : 1); } } return object.index - other.index; } function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result2[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result2[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result2[leftIndex++] = args[argsIndex++]; } return result2; } function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result2[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result2[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result2[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result2; } function copyArray(source2, array) { var index2 = -1, length = source2.length; array || (array = Array2(length)); while (++index2 < length) { array[index2] = source2[index2]; } return array; } function copyObject(source2, props, object, customizer) { var isNew = !object; object || (object = {}); var index2 = -1, length = props.length; while (++index2 < length) { var key = props[index2]; var newValue = customizer ? customizer(object[key], source2[key], key, object, source2) : undefined$1; if (newValue === undefined$1) { newValue = source2[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } function copySymbols(source2, object) { return copyObject(source2, getSymbols(source2), object); } function copySymbolsIn(source2, object) { return copyObject(source2, getSymbolsIn(source2), object); } function createAggregator(setter, initializer) { return function(collection, iteratee2) { var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; return func(collection, setter, getIteratee(iteratee2, 2), accumulator); }; } function createAssigner(assigner) { return baseRest(function(object, sources) { var index2 = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1; customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined$1 : customizer; length = 1; } object = Object2(object); while (++index2 < length) { var source2 = sources[index2]; if (source2) { assigner(object, source2, index2, customizer); } } return object; }); } function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee2) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee2); } var length = collection.length, index2 = fromRight ? length : -1, iterable = Object2(collection); while (fromRight ? index2-- : ++index2 < length) { if (iteratee2(iterable[index2], index2, iterable) === false) { break; } } return collection; }; } function createBaseFor(fromRight) { return function(object, iteratee2, keysFunc) { var index2 = -1, iterable = Object2(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index2]; if (iteratee2(iterable[key], key, iterable) === false) { break; } } return object; }; } function createBind(func, bitmask, thisArg) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper2() { var fn = this && this !== root && this instanceof wrapper2 ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper2; } function createCaseFirst(methodName) { return function(string) { string = toString2(string); var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined$1; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1); return chr[methodName]() + trailing; }; } function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); }; } function createCtor(Ctor) { return function() { var args = arguments; switch (args.length) { case 0: return new Ctor(); case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args); return isObject2(result2) ? result2 : thisBinding; }; } function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper2() { var length = arguments.length, args = Array2(length), index2 = length, placeholder = getHolder(wrapper2); while (index2--) { args[index2] = arguments[index2]; } var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper2.placeholder, undefined$1, args, holders, undefined$1, undefined$1, arity - length ); } var fn = this && this !== root && this instanceof wrapper2 ? Ctor : func; return apply(fn, this, args); } return wrapper2; } function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object2(collection); if (!isArrayLike(collection)) { var iteratee2 = getIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee2(iterable[key], key, iterable); }; } var index2 = findIndexFunc(collection, predicate, fromIndex); return index2 > -1 ? iterable[iteratee2 ? collection[index2] : index2] : undefined$1; }; } function createFlow(fromRight) { return flatRest(function(funcs) { var length = funcs.length, index2 = length, prereq = LodashWrapper.prototype.thru; if (fromRight) { funcs.reverse(); } while (index2--) { var func = funcs[index2]; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } if (prereq && !wrapper2 && getFuncName(func) == "wrapper") { var wrapper2 = new LodashWrapper([], true); } } index2 = wrapper2 ? index2 : length; while (++index2 < length) { func = funcs[index2]; var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1; if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { wrapper2 = wrapper2[getFuncName(data[0])].apply(wrapper2, data[3]); } else { wrapper2 = func.length == 1 && isLaziable(func) ? wrapper2[funcName]() : wrapper2.thru(func); } } return function() { var args = arguments, value = args[0]; if (wrapper2 && args.length == 1 && isArray(value)) { return wrapper2.plant(value).value(); } var index3 = 0, result2 = length ? funcs[index3].apply(this, args) : value; while (++index3 < length) { result2 = funcs[index3].call(this, result2); } return result2; }; }); } function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func); function wrapper2() { var length = arguments.length, args = Array2(length), index2 = length; while (index2--) { args[index2] = arguments[index2]; } if (isCurried) { var placeholder = getHolder(wrapper2), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper2.placeholder, thisArg, args, newHolders, argPos, ary2, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary2 < length) { args.length = ary2; } if (this && this !== root && this instanceof wrapper2) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper2; } function createInverter(setter, toIteratee) { return function(object, iteratee2) { return baseInverter(object, setter, toIteratee(iteratee2), {}); }; } function createMathOperation(operator, defaultValue) { return function(value, other) { var result2; if (value === undefined$1 && other === undefined$1) { return defaultValue; } if (value !== undefined$1) { result2 = value; } if (other !== undefined$1) { if (result2 === undefined$1) { return other; } if (typeof value == "string" || typeof other == "string") { value = baseToString(value); other = baseToString(other); } else { value = baseToNumber(value); other = baseToNumber(other); } result2 = operator(value, other); } return result2; }; } function createOver(arrayFunc) { return flatRest(function(iteratees) { iteratees = arrayMap(iteratees, baseUnary(getIteratee())); return baseRest(function(args) { var thisArg = this; return arrayFunc(iteratees, function(iteratee2) { return apply(iteratee2, thisArg, args); }); }); }); } function createPadding(length, chars) { chars = chars === undefined$1 ? " " : baseToString(chars); var charsLength = chars.length; if (charsLength < 2) { return charsLength ? baseRepeat(chars, length) : chars; } var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars))); return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length); } function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); function wrapper2() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper2 ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper2; } function createRange(fromRight) { return function(start, end, step) { if (step && typeof step != "number" && isIterateeCall(start, end, step)) { end = step = undefined$1; } start = toFinite(start); if (end === undefined$1) { end = start; start = 0; } else { end = toFinite(end); } step = step === undefined$1 ? start < end ? 1 : -1 : toFinite(step); return baseRange(start, end, step, fromRight); }; } function createRelationalOperation(operator) { return function(value, other) { if (!(typeof value == "string" && typeof other == "string")) { value = toNumber(value); other = toNumber(other); } return operator(value, other); }; } function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined$1, newHoldersRight = isCurry ? undefined$1 : holders, newPartials = isCurry ? partials : undefined$1, newPartialsRight = isCurry ? undefined$1 : partials; bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); } var newData = [ func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary2, arity ]; var result2 = wrapFunc.apply(undefined$1, newData); if (isLaziable(func)) { setData(result2, newData); } result2.placeholder = placeholder; return setWrapToString(result2, func, bitmask); } function createRound(methodName) { var func = Math2[methodName]; return function(number, precision) { number = toNumber(number); precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); if (precision && nativeIsFinite(number)) { var pair = (toString2(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); pair = (toString2(value) + "e").split("e"); return +(pair[0] + "e" + (+pair[1] - precision)); } return func(number); }; } var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values2) { return new Set2(values2); }; function createToPairs(keysFunc) { return function(object) { var tag2 = getTag(object); if (tag2 == mapTag) { return mapToArray(object); } if (tag2 == setTag) { return setToPairs(object); } return baseToPairs(object, keysFunc(object)); }; } function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; if (!isBindKey && typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); partials = holders = undefined$1; } ary2 = ary2 === undefined$1 ? ary2 : nativeMax(toInteger(ary2), 0); arity = arity === undefined$1 ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined$1; } var data = isBindKey ? undefined$1 : getData(func); var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity ]; if (data) { mergeData(newData, data); } func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] === undefined$1 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == WRAP_BIND_FLAG) { var result2 = createBind(func, bitmask, thisArg); } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { result2 = createCurry(func, bitmask, arity); } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { result2 = createPartial(func, bitmask, thisArg, partials); } else { result2 = createHybrid.apply(undefined$1, newData); } var setter = data ? baseSetData : setData; return setWrapToString(setter(result2, newData), func, bitmask); } function customDefaultsAssignIn(objValue, srcValue, key, object) { if (objValue === undefined$1 || eq2(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { return srcValue; } return objValue; } function customDefaultsMerge(objValue, srcValue, key, object, source2, stack) { if (isObject2(objValue) && isObject2(srcValue)) { stack.set(srcValue, objValue); baseMerge(objValue, srcValue, undefined$1, customDefaultsMerge, stack); stack["delete"](srcValue); } return objValue; } function customOmitClone(value) { return isPlainObject2(value) ? undefined$1 : value; } function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index2 = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1; stack.set(array, other); stack.set(other, array); while (++index2 < arrLength) { var arrValue = array[index2], othValue = other[index2]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack); } if (compared !== undefined$1) { if (compared) { continue; } result2 = false; break; } if (seen) { if (!arraySome(other, function(othValue2, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result2 = false; break; } } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { result2 = false; break; } } stack["delete"](array); stack["delete"](other); return result2; } function equalByTag(object, other, tag2, bitmask, customizer, equalFunc, stack) { switch (tag2) { case dataViewTag: if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: return eq2(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: return object == other + ""; case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; stack.set(object, other); var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack["delete"](object); return result2; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index2 = objLength; while (index2--) { var key = objProps[index2]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } var result2 = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index2 < objLength) { key = objProps[index2]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } if (!(compared === undefined$1 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result2 = false; break; } skipCtor || (skipCtor = key == "constructor"); } if (result2 && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { result2 = false; } } stack["delete"](object); stack["delete"](other); return result2; } function flatRest(func) { return setToString(overRest(func, undefined$1, flatten), func + ""); } function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } var getData = !metaMap ? noop2 : function(func) { return metaMap.get(func); }; function getFuncName(func) { var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result2; } function getHolder(func) { var object = hasOwnProperty.call(lodash2, "placeholder") ? lodash2 : func; return object.placeholder; } function getIteratee() { var result2 = lodash2.iteratee || iteratee; result2 = result2 === iteratee ? baseIteratee : result2; return arguments.length ? result2(arguments[0], arguments[1]) : result2; } function getMapData(map3, key) { var data = map3.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } function getMatchData(object) { var result2 = keys(object), length = result2.length; while (length--) { var key = result2[length], value = object[key]; result2[length] = [key, value, isStrictComparable(value)]; } return result2; } function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined$1; } function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag2 = value[symToStringTag]; try { value[symToStringTag] = undefined$1; var unmasked = true; } catch (e) { } var result2 = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag2; } else { delete value[symToStringTag]; } } return result2; } var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object2(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result2 = []; while (object) { arrayPush(result2, getSymbols(object)); object = getPrototype(object); } return result2; }; var getTag = baseGetTag; if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { getTag = function(value) { var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result2; }; } function getView(start, end, transforms) { var index2 = -1, length = transforms.length; while (++index2 < length) { var data = transforms[index2], size2 = data.size; switch (data.type) { case "drop": start += size2; break; case "dropRight": end -= size2; break; case "take": end = nativeMin(end, start + size2); break; case "takeRight": start = nativeMax(start, end - size2); break; } } return { "start": start, "end": end }; } function getWrapDetails(source2) { var match = source2.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } function hasPath(object, path, hasFunc) { path = castPath(path, object); var index2 = -1, length = path.length, result2 = false; while (++index2 < length) { var key = toKey(path[index2]); if (!(result2 = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result2 || ++index2 != length) { return result2; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } function initCloneArray(array) { var length = array.length, result2 = new array.constructor(length); if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { result2.index = array.index; result2.input = array.input; } return result2; } function initCloneObject(object) { return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; } function initCloneByTag(object, tag2, isDeep) { var Ctor = object.constructor; switch (tag2) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor(); case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor(); case symbolTag: return cloneSymbol(object); } } function insertWrapDetails(source2, details) { var length = details.length; if (!length) { return source2; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; details = details.join(length > 2 ? ", " : " "); return source2.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); } function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } function isIterateeCall(value, index2, object) { if (!isObject2(object)) { return false; } var type = typeof index2; if (type == "number" ? isArrayLike(object) && isIndex(index2, object.length) : type == "string" && index2 in object) { return eq2(object[index2], value); } return false; } function isKey2(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object); } function isKeyable(value) { var type = typeof value; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } function isLaziable(func) { var funcName = getFuncName(func), other = lodash2[funcName]; if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { return false; } if (func === other) { return true; } var data = getData(other); return !!data && func === data[0]; } function isMasked(func) { return !!maskSrcKey && maskSrcKey in func; } var isMaskable = coreJsData ? isFunction2 : stubFalse; function isPrototype(value) { var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; return value === proto; } function isStrictComparable(value) { return value === value && !isObject2(value); } function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined$1 || key in Object2(object)); }; } function memoizeCapped(func) { var result2 = memoize(func, function(key) { if (cache2.size === MAX_MEMOIZE_SIZE) { cache2.clear(); } return key; }); var cache2 = result2.cache; return result2; } function mergeData(data, source2) { var bitmask = data[1], srcBitmask = source2[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source2[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source2[7].length <= source2[8] && bitmask == WRAP_CURRY_FLAG; if (!(isCommon || isCombo)) { return data; } if (srcBitmask & WRAP_BIND_FLAG) { data[2] = source2[2]; newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; } var value = source2[3]; if (value) { var partials = data[3]; data[3] = partials ? composeArgs(partials, value, source2[4]) : value; data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source2[4]; } value = source2[5]; if (value) { partials = data[5]; data[5] = partials ? composeArgsRight(partials, value, source2[6]) : value; data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source2[6]; } value = source2[7]; if (value) { data[7] = value; } if (srcBitmask & WRAP_ARY_FLAG) { data[8] = data[8] == null ? source2[8] : nativeMin(data[8], source2[8]); } if (data[9] == null) { data[9] = source2[9]; } data[0] = source2[0]; data[1] = newBitmask; return data; } function nativeKeysIn(object) { var result2 = []; if (object != null) { for (var key in Object2(object)) { result2.push(key); } } return result2; } function objectToString(value) { return nativeObjectToString.call(value); } function overRest(func, start, transform2) { start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0); return function() { var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array = Array2(length); while (++index2 < length) { array[index2] = args[start + index2]; } index2 = -1; var otherArgs = Array2(start + 1); while (++index2 < start) { otherArgs[index2] = args[index2]; } otherArgs[start] = transform2(array); return apply(func, this, otherArgs); }; } function parent(object, path) { return path.length < 2 ? object : baseGet2(object, baseSlice(path, 0, -1)); } function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index2 = indexes[length]; array[length] = isIndex(index2, arrLength) ? oldArray[index2] : undefined$1; } return array; } function safeGet(object, key) { if (key === "constructor" && typeof object[key] === "function") { return; } if (key == "__proto__") { return; } return object[key]; } var setData = shortOut(baseSetData); var setTimeout2 = ctxSetTimeout || function(func, wait) { return root.setTimeout(func, wait); }; var setToString = shortOut(baseSetToString); function setWrapToString(wrapper2, reference, bitmask) { var source2 = reference + ""; return setToString(wrapper2, insertWrapDetails(source2, updateWrapDetails(getWrapDetails(source2), bitmask))); } function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined$1, arguments); }; } function shuffleSelf(array, size2) { var index2 = -1, length = array.length, lastIndex = length - 1; size2 = size2 === undefined$1 ? length : size2; while (++index2 < size2) { var rand = baseRandom(index2, lastIndex), value = array[rand]; array[rand] = array[index2]; array[index2] = value; } array.length = size2; return array; } var stringToPath2 = memoizeCapped(function(string) { var result2 = []; if (string.charCodeAt(0) === 46) { result2.push(""); } string.replace(rePropName, function(match, number, quote, subString) { result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); }); return result2; }); function toKey(value) { if (typeof value == "string" || isSymbol(value)) { return value; } var result2 = value + ""; return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; } function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) { } try { return func + ""; } catch (e) { } } return ""; } function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = "_." + pair[0]; if (bitmask & pair[1] && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } function wrapperClone(wrapper2) { if (wrapper2 instanceof LazyWrapper) { return wrapper2.clone(); } var result2 = new LodashWrapper(wrapper2.__wrapped__, wrapper2.__chain__); result2.__actions__ = copyArray(wrapper2.__actions__); result2.__index__ = wrapper2.__index__; result2.__values__ = wrapper2.__values__; return result2; } function chunk(array, size2, guard) { if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined$1) { size2 = 1; } else { size2 = nativeMax(toInteger(size2), 0); } var length = array == null ? 0 : array.length; if (!length || size2 < 1) { return []; } var index2 = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2)); while (index2 < length) { result2[resIndex++] = baseSlice(array, index2, index2 += size2); } return result2; } function compact2(array) { var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = []; while (++index2 < length) { var value = array[index2]; if (value) { result2[resIndex++] = value; } } return result2; } function concat2() { var length = arguments.length; if (!length) { return []; } var args = Array2(length - 1), array = arguments[0], index2 = length; while (index2--) { args[index2 - 1] = arguments[index2]; } return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } var difference = baseRest(function(array, values2) { return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : []; }); var differenceBy = baseRest(function(array, values2) { var iteratee2 = last(values2); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : []; }); var differenceWith = baseRest(function(array, values2) { var comparator = last(values2); if (isArrayLikeObject(comparator)) { comparator = undefined$1; } return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined$1, comparator) : []; }); function drop(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = guard || n === undefined$1 ? 1 : toInteger(n); return baseSlice(array, n < 0 ? 0 : n, length); } function dropRight(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = guard || n === undefined$1 ? 1 : toInteger(n); n = length - n; return baseSlice(array, 0, n < 0 ? 0 : n); } function dropRightWhile(array, predicate) { return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; } function dropWhile(array, predicate) { return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; } function fill(array, value, start, end) { var length = array == null ? 0 : array.length; if (!length) { return []; } if (start && typeof start != "number" && isIterateeCall(array, value, start)) { start = 0; end = length; } return baseFill(array, value, start, end); } function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index2 = fromIndex == null ? 0 : toInteger(fromIndex); if (index2 < 0) { index2 = nativeMax(length + index2, 0); } return baseFindIndex(array, getIteratee(predicate, 3), index2); } function findLastIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index2 = length - 1; if (fromIndex !== undefined$1) { index2 = toInteger(fromIndex); index2 = fromIndex < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1); } return baseFindIndex(array, getIteratee(predicate, 3), index2, true); } function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } function flattenDeep(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, INFINITY) : []; } function flattenDepth(array, depth) { var length = array == null ? 0 : array.length; if (!length) { return []; } depth = depth === undefined$1 ? 1 : toInteger(depth); return baseFlatten(array, depth); } function fromPairs(pairs) { var index2 = -1, length = pairs == null ? 0 : pairs.length, result2 = {}; while (++index2 < length) { var pair = pairs[index2]; result2[pair[0]] = pair[1]; } return result2; } function head(array) { return array && array.length ? array[0] : undefined$1; } function indexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index2 = fromIndex == null ? 0 : toInteger(fromIndex); if (index2 < 0) { index2 = nativeMax(length + index2, 0); } return baseIndexOf(array, value, index2); } function initial(array) { var length = array == null ? 0 : array.length; return length ? baseSlice(array, 0, -1) : []; } var intersection = baseRest(function(arrays) { var mapped = arrayMap(arrays, castArrayLikeObject); return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; }); var intersectionBy = baseRest(function(arrays) { var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); if (iteratee2 === last(mapped)) { iteratee2 = undefined$1; } else { mapped.pop(); } return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : []; }); var intersectionWith = baseRest(function(arrays) { var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); comparator = typeof comparator == "function" ? comparator : undefined$1; if (comparator) { mapped.pop(); } return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined$1, comparator) : []; }); function join2(array, separator) { return array == null ? "" : nativeJoin.call(array, separator); } function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined$1; } function lastIndexOf(array, value, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index2 = length; if (fromIndex !== undefined$1) { index2 = toInteger(fromIndex); index2 = index2 < 0 ? nativeMax(length + index2, 0) : nativeMin(index2, length - 1); } return value === value ? strictLastIndexOf(array, value, index2) : baseFindIndex(array, baseIsNaN, index2, true); } function nth(array, n) { return array && array.length ? baseNth(array, toInteger(n)) : undefined$1; } var pull = baseRest(pullAll); function pullAll(array, values2) { return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array; } function pullAllBy(array, values2, iteratee2) { return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array; } function pullAllWith(array, values2, comparator) { return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined$1, comparator) : array; } var pullAt = flatRest(function(array, indexes) { var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes); basePullAt(array, arrayMap(indexes, function(index2) { return isIndex(index2, length) ? +index2 : index2; }).sort(compareAscending)); return result2; }); function remove(array, predicate) { var result2 = []; if (!(array && array.length)) { return result2; } var index2 = -1, indexes = [], length = array.length; predicate = getIteratee(predicate, 3); while (++index2 < length) { var value = array[index2]; if (predicate(value, index2, array)) { result2.push(value); indexes.push(index2); } } basePullAt(array, indexes); return result2; } function reverse(array) { return array == null ? array : nativeReverse.call(array); } function slice(array, start, end) { var length = array == null ? 0 : array.length; if (!length) { return []; } if (end && typeof end != "number" && isIterateeCall(array, start, end)) { start = 0; end = length; } else { start = start == null ? 0 : toInteger(start); end = end === undefined$1 ? length : toInteger(end); } return baseSlice(array, start, end); } function sortedIndex(array, value) { return baseSortedIndex(array, value); } function sortedIndexBy(array, value, iteratee2) { return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2)); } function sortedIndexOf(array, value) { var length = array == null ? 0 : array.length; if (length) { var index2 = baseSortedIndex(array, value); if (index2 < length && eq2(array[index2], value)) { return index2; } } return -1; } function sortedLastIndex(array, value) { return baseSortedIndex(array, value, true); } function sortedLastIndexBy(array, value, iteratee2) { return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true); } function sortedLastIndexOf(array, value) { var length = array == null ? 0 : array.length; if (length) { var index2 = baseSortedIndex(array, value, true) - 1; if (eq2(array[index2], value)) { return index2; } } return -1; } function sortedUniq(array) { return array && array.length ? baseSortedUniq(array) : []; } function sortedUniqBy(array, iteratee2) { return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : []; } function tail(array) { var length = array == null ? 0 : array.length; return length ? baseSlice(array, 1, length) : []; } function take(array, n, guard) { if (!(array && array.length)) { return []; } n = guard || n === undefined$1 ? 1 : toInteger(n); return baseSlice(array, 0, n < 0 ? 0 : n); } function takeRight(array, n, guard) { var length = array == null ? 0 : array.length; if (!length) { return []; } n = guard || n === undefined$1 ? 1 : toInteger(n); n = length - n; return baseSlice(array, n < 0 ? 0 : n, length); } function takeRightWhile(array, predicate) { return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; } function takeWhile(array, predicate) { return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; } var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); var unionBy = baseRest(function(arrays) { var iteratee2 = last(arrays); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)); }); var unionWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == "function" ? comparator : undefined$1; return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined$1, comparator); }); function uniq(array) { return array && array.length ? baseUniq(array) : []; } function uniqBy(array, iteratee2) { return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : []; } function uniqWith(array, comparator) { comparator = typeof comparator == "function" ? comparator : undefined$1; return array && array.length ? baseUniq(array, undefined$1, comparator) : []; } function unzip(array) { if (!(array && array.length)) { return []; } var length = 0; array = arrayFilter(array, function(group) { if (isArrayLikeObject(group)) { length = nativeMax(group.length, length); return true; } }); return baseTimes(length, function(index2) { return arrayMap(array, baseProperty(index2)); }); } function unzipWith(array, iteratee2) { if (!(array && array.length)) { return []; } var result2 = unzip(array); if (iteratee2 == null) { return result2; } return arrayMap(result2, function(group) { return apply(iteratee2, undefined$1, group); }); } var without = baseRest(function(array, values2) { return isArrayLikeObject(array) ? baseDifference(array, values2) : []; }); var xor = baseRest(function(arrays) { return baseXor(arrayFilter(arrays, isArrayLikeObject)); }); var xorBy = baseRest(function(arrays) { var iteratee2 = last(arrays); if (isArrayLikeObject(iteratee2)) { iteratee2 = undefined$1; } return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2)); }); var xorWith = baseRest(function(arrays) { var comparator = last(arrays); comparator = typeof comparator == "function" ? comparator : undefined$1; return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined$1, comparator); }); var zip = baseRest(unzip); function zipObject(props, values2) { return baseZipObject(props || [], values2 || [], assignValue); } function zipObjectDeep(props, values2) { return baseZipObject(props || [], values2 || [], baseSet); } var zipWith = baseRest(function(arrays) { var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined$1; iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined$1; return unzipWith(arrays, iteratee2); }); function chain(value) { var result2 = lodash2(value); result2.__chain__ = true; return result2; } function tap(value, interceptor) { interceptor(value); return value; } function thru(value, interceptor) { return interceptor(value); } var wrapperAt = flatRest(function(paths) { var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) { return baseAt(object, paths); }; if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { return this.thru(interceptor); } value = value.slice(start, +start + (length ? 1 : 0)); value.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 }); return new LodashWrapper(value, this.__chain__).thru(function(array) { if (length && !array.length) { array.push(undefined$1); } return array; }); }); function wrapperChain() { return chain(this); } function wrapperCommit() { return new LodashWrapper(this.value(), this.__chain__); } function wrapperNext() { if (this.__values__ === undefined$1) { this.__values__ = toArray(this.value()); } var done = this.__index__ >= this.__values__.length, value = done ? undefined$1 : this.__values__[this.__index__++]; return { "done": done, "value": value }; } function wrapperToIterator() { return this; } function wrapperPlant(value) { var result2, parent2 = this; while (parent2 instanceof baseLodash) { var clone2 = wrapperClone(parent2); clone2.__index__ = 0; clone2.__values__ = undefined$1; if (result2) { previous.__wrapped__ = clone2; } else { result2 = clone2; } var previous = clone2; parent2 = parent2.__wrapped__; } previous.__wrapped__ = value; return result2; } function wrapperReverse() { var value = this.__wrapped__; if (value instanceof LazyWrapper) { var wrapped = value; if (this.__actions__.length) { wrapped = new LazyWrapper(this); } wrapped = wrapped.reverse(); wrapped.__actions__.push({ "func": thru, "args": [reverse], "thisArg": undefined$1 }); return new LodashWrapper(wrapped, this.__chain__); } return this.thru(reverse); } function wrapperValue() { return baseWrapperValue(this.__wrapped__, this.__actions__); } var countBy = createAggregator(function(result2, value, key) { if (hasOwnProperty.call(result2, key)) { ++result2[key]; } else { baseAssignValue(result2, key, 1); } }); function every(collection, predicate, guard) { var func = isArray(collection) ? arrayEvery : baseEvery; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined$1; } return func(collection, getIteratee(predicate, 3)); } function filter2(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, getIteratee(predicate, 3)); } var find2 = createFind(findIndex); var findLast = createFind(findLastIndex); function flatMap(collection, iteratee2) { return baseFlatten(map2(collection, iteratee2), 1); } function flatMapDeep(collection, iteratee2) { return baseFlatten(map2(collection, iteratee2), INFINITY); } function flatMapDepth(collection, iteratee2, depth) { depth = depth === undefined$1 ? 1 : toInteger(depth); return baseFlatten(map2(collection, iteratee2), depth); } function forEach(collection, iteratee2) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, getIteratee(iteratee2, 3)); } function forEachRight(collection, iteratee2) { var func = isArray(collection) ? arrayEachRight : baseEachRight; return func(collection, getIteratee(iteratee2, 3)); } var groupBy = createAggregator(function(result2, value, key) { if (hasOwnProperty.call(result2, key)) { result2[key].push(value); } else { baseAssignValue(result2, key, [value]); } }); function includes(collection, value, fromIndex, guard) { collection = isArrayLike(collection) ? collection : values(collection); fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; var length = collection.length; if (fromIndex < 0) { fromIndex = nativeMax(length + fromIndex, 0); } return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; } var invokeMap = baseRest(function(collection, path, args) { var index2 = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : []; baseEach(collection, function(value) { result2[++index2] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); }); return result2; }); var keyBy = createAggregator(function(result2, value, key) { baseAssignValue(result2, key, value); }); function map2(collection, iteratee2) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, getIteratee(iteratee2, 3)); } function orderBy(collection, iteratees, orders, guard) { if (collection == null) { return []; } if (!isArray(iteratees)) { iteratees = iteratees == null ? [] : [iteratees]; } orders = guard ? undefined$1 : orders; if (!isArray(orders)) { orders = orders == null ? [] : [orders]; } return baseOrderBy(collection, iteratees, orders); } var partition = createAggregator(function(result2, value, key) { result2[key ? 0 : 1].push(value); }, function() { return [[], []]; }); function reduce(collection, iteratee2, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach); } function reduceRight(collection, iteratee2, accumulator) { var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight); } function reject(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, negate(getIteratee(predicate, 3))); } function sample(collection) { var func = isArray(collection) ? arraySample : baseSample; return func(collection); } function sampleSize(collection, n, guard) { if (guard ? isIterateeCall(collection, n, guard) : n === undefined$1) { n = 1; } else { n = toInteger(n); } var func = isArray(collection) ? arraySampleSize : baseSampleSize; return func(collection, n); } function shuffle(collection) { var func = isArray(collection) ? arrayShuffle : baseShuffle; return func(collection); } function size(collection) { if (collection == null) { return 0; } if (isArrayLike(collection)) { return isString2(collection) ? stringSize(collection) : collection.length; } var tag2 = getTag(collection); if (tag2 == mapTag || tag2 == setTag) { return collection.size; } return baseKeys(collection).length; } function some(collection, predicate, guard) { var func = isArray(collection) ? arraySome : baseSome; if (guard && isIterateeCall(collection, predicate, guard)) { predicate = undefined$1; } return func(collection, getIteratee(predicate, 3)); } var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } var length = iteratees.length; if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { iteratees = []; } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); var now2 = ctxNow || function() { return root.Date.now(); }; function after(n, func) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } n = toInteger(n); return function() { if (--n < 1) { return func.apply(this, arguments); } }; } function ary(func, n, guard) { n = guard ? undefined$1 : n; n = func && n == null ? func.length : n; return createWrap(func, WRAP_ARY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, n); } function before(n, func) { var result2; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } n = toInteger(n); return function() { if (--n > 0) { result2 = func.apply(this, arguments); } if (n <= 1) { func = undefined$1; } return result2; }; } var bind = baseRest(function(func, thisArg, partials) { var bitmask = WRAP_BIND_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bind)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(func, bitmask, thisArg, partials, holders); }); var bindKey = baseRest(function(object, key, partials) { var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; if (partials.length) { var holders = replaceHolders(partials, getHolder(bindKey)); bitmask |= WRAP_PARTIAL_FLAG; } return createWrap(key, bitmask, object, partials, holders); }); function curry(func, arity, guard) { arity = guard ? undefined$1 : arity; var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity); result2.placeholder = curry.placeholder; return result2; } function curryRight(func, arity, guard) { arity = guard ? undefined$1 : arity; var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined$1, undefined$1, undefined$1, undefined$1, undefined$1, arity); result2.placeholder = curryRight.placeholder; return result2; } function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject2(options)) { leading = !!options.leading; maxing = "maxWait" in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined$1; lastInvokeTime = time; result2 = func.apply(thisArg, args); return result2; } function leadingEdge(time) { lastInvokeTime = time; timerId = setTimeout2(timerExpired, wait); return leading ? invokeFunc(time) : result2; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; return lastCallTime === undefined$1 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { var time = now2(); if (shouldInvoke(time)) { return trailingEdge(time); } timerId = setTimeout2(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined$1; if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined$1; return result2; } function cancel() { if (timerId !== undefined$1) { clearTimeout2(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined$1; } function flush() { return timerId === undefined$1 ? result2 : trailingEdge(now2()); } function debounced() { var time = now2(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined$1) { return leadingEdge(lastCallTime); } if (maxing) { clearTimeout2(timerId); timerId = setTimeout2(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined$1) { timerId = setTimeout2(timerExpired, wait); } return result2; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } var defer = baseRest(function(func, args) { return baseDelay(func, 1, args); }); var delay = baseRest(function(func, wait, args) { return baseDelay(func, toNumber(wait) || 0, args); }); function flip(func) { return createWrap(func, WRAP_FLIP_FLAG); } function memoize(func, resolver) { if (typeof func != "function" || resolver != null && typeof resolver != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache2 = memoized.cache; if (cache2.has(key)) { return cache2.get(key); } var result2 = func.apply(this, args); memoized.cache = cache2.set(key, result2) || cache2; return result2; }; memoized.cache = new (memoize.Cache || MapCache)(); return memoized; } memoize.Cache = MapCache; function negate(predicate) { if (typeof predicate != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return function() { var args = arguments; switch (args.length) { case 0: return !predicate.call(this); case 1: return !predicate.call(this, args[0]); case 2: return !predicate.call(this, args[0], args[1]); case 3: return !predicate.call(this, args[0], args[1], args[2]); } return !predicate.apply(this, args); }; } function once2(func) { return before(2, func); } var overArgs = castRest(function(func, transforms) { transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); var funcsLength = transforms.length; return baseRest(function(args) { var index2 = -1, length = nativeMin(args.length, funcsLength); while (++index2 < length) { args[index2] = transforms[index2].call(this, args[index2]); } return apply(func, this, args); }); }); var partial = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partial)); return createWrap(func, WRAP_PARTIAL_FLAG, undefined$1, partials, holders); }); var partialRight = baseRest(function(func, partials) { var holders = replaceHolders(partials, getHolder(partialRight)); return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined$1, partials, holders); }); var rearg = flatRest(function(func, indexes) { return createWrap(func, WRAP_REARG_FLAG, undefined$1, undefined$1, undefined$1, indexes); }); function rest(func, start) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } start = start === undefined$1 ? start : toInteger(start); return baseRest(func, start); } function spread(func, start) { if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } start = start == null ? 0 : nativeMax(toInteger(start), 0); return baseRest(function(args) { var array = args[start], otherArgs = castSlice(args, 0, start); if (array) { arrayPush(otherArgs, array); } return apply(func, this, otherArgs); }); } function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } if (isObject2(options)) { leading = "leading" in options ? !!options.leading : leading; trailing = "trailing" in options ? !!options.trailing : trailing; } return debounce(func, wait, { "leading": leading, "maxWait": wait, "trailing": trailing }); } function unary(func) { return ary(func, 1); } function wrap(value, wrapper2) { return partial(castFunction(wrapper2), value); } function castArray() { if (!arguments.length) { return []; } var value = arguments[0]; return isArray(value) ? value : [value]; } function clone(value) { return baseClone(value, CLONE_SYMBOLS_FLAG); } function cloneWith(value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } function cloneDeepWith(value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); } function conformsTo(object, source2) { return source2 == null || baseConformsTo(object, source2, keys(source2)); } function eq2(value, other) { return value === other || value !== value && other !== other; } var gt2 = createRelationalOperation(baseGt); var gte = createRelationalOperation(function(value, other) { return value >= other; }); var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); }; var isArray = Array2.isArray; var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction2(value); } function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } function isBoolean2(value) { return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; } var isBuffer = nativeIsBuffer || stubFalse; var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; function isElement(value) { return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value); } function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag2 = getTag(value); if (tag2 == mapTag || tag2 == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } function isEqual(value, other) { return baseIsEqual(value, other); } function isEqualWith(value, other, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; var result2 = customizer ? customizer(value, other) : undefined$1; return result2 === undefined$1 ? baseIsEqual(value, other, undefined$1, customizer) : !!result2; } function isError(value) { if (!isObjectLike(value)) { return false; } var tag2 = baseGetTag(value); return tag2 == errorTag || tag2 == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value); } function isFinite2(value) { return typeof value == "number" && nativeIsFinite(value); } function isFunction2(value) { if (!isObject2(value)) { return false; } var tag2 = baseGetTag(value); return tag2 == funcTag || tag2 == genTag || tag2 == asyncTag || tag2 == proxyTag; } function isInteger(value) { return typeof value == "number" && value == toInteger(value); } function isLength(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } function isObject2(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } function isObjectLike(value) { return value != null && typeof value == "object"; } var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; function isMatch(object, source2) { return object === source2 || baseIsMatch(object, source2, getMatchData(source2)); } function isMatchWith(object, source2, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return baseIsMatch(object, source2, getMatchData(source2), customizer); } function isNaN2(value) { return isNumber(value) && value != +value; } function isNative(value) { if (isMaskable(value)) { throw new Error2(CORE_ERROR_TEXT); } return baseIsNative(value); } function isNull(value) { return value === null; } function isNil(value) { return value == null; } function isNumber(value) { return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; } function isPlainObject2(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; function isSafeInteger(value) { return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; } var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; function isString2(value) { return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; } function isSymbol(value) { return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; } var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; function isUndefined2(value) { return value === undefined$1; } function isWeakMap(value) { return isObjectLike(value) && getTag(value) == weakMapTag; } function isWeakSet(value) { return isObjectLike(value) && baseGetTag(value) == weakSetTag; } var lt2 = createRelationalOperation(baseLt); var lte = createRelationalOperation(function(value, other) { return value <= other; }); function toArray(value) { if (!value) { return []; } if (isArrayLike(value)) { return isString2(value) ? stringToArray(value) : copyArray(value); } if (symIterator && value[symIterator]) { return iteratorToArray(value[symIterator]()); } var tag2 = getTag(value), func = tag2 == mapTag ? mapToArray : tag2 == setTag ? setToArray : values; return func(value); } function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = value < 0 ? -1 : 1; return sign * MAX_INTEGER; } return value === value ? value : 0; } function toInteger(value) { var result2 = toFinite(value), remainder = result2 % 1; return result2 === result2 ? remainder ? result2 - remainder : result2 : 0; } function toLength(value) { return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; } function toNumber(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject2(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject2(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } function toPlainObject(value) { return copyObject(value, keysIn(value)); } function toSafeInteger(value) { return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0; } function toString2(value) { return value == null ? "" : baseToString(value); } var assign2 = createAssigner(function(object, source2) { if (isPrototype(source2) || isArrayLike(source2)) { copyObject(source2, keys(source2), object); return; } for (var key in source2) { if (hasOwnProperty.call(source2, key)) { assignValue(object, key, source2[key]); } } }); var assignIn = createAssigner(function(object, source2) { copyObject(source2, keysIn(source2), object); }); var assignInWith = createAssigner(function(object, source2, srcIndex, customizer) { copyObject(source2, keysIn(source2), object, customizer); }); var assignWith = createAssigner(function(object, source2, srcIndex, customizer) { copyObject(source2, keys(source2), object, customizer); }); var at = flatRest(baseAt); function create(prototype, properties) { var result2 = baseCreate(prototype); return properties == null ? result2 : baseAssign(result2, properties); } var defaults = baseRest(function(object, sources) { object = Object2(object); var index2 = -1; var length = sources.length; var guard = length > 2 ? sources[2] : undefined$1; if (guard && isIterateeCall(sources[0], sources[1], guard)) { length = 1; } while (++index2 < length) { var source2 = sources[index2]; var props = keysIn(source2); var propsIndex = -1; var propsLength = props.length; while (++propsIndex < propsLength) { var key = props[propsIndex]; var value = object[key]; if (value === undefined$1 || eq2(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { object[key] = source2[key]; } } } return object; }); var defaultsDeep = baseRest(function(args) { args.push(undefined$1, customDefaultsMerge); return apply(mergeWith, undefined$1, args); }); function findKey(object, predicate) { return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } function findLastKey(object, predicate) { return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } function forIn(object, iteratee2) { return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn); } function forInRight(object, iteratee2) { return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn); } function forOwn(object, iteratee2) { return object && baseForOwn(object, getIteratee(iteratee2, 3)); } function forOwnRight(object, iteratee2) { return object && baseForOwnRight(object, getIteratee(iteratee2, 3)); } function functions(object) { return object == null ? [] : baseFunctions(object, keys(object)); } function functionsIn(object) { return object == null ? [] : baseFunctions(object, keysIn(object)); } function get2(object, path, defaultValue) { var result2 = object == null ? undefined$1 : baseGet2(object, path); return result2 === undefined$1 ? defaultValue : result2; } function has(object, path) { return object != null && hasPath(object, path, baseHas); } function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } var invert = createInverter(function(result2, value, key) { if (value != null && typeof value.toString != "function") { value = nativeObjectToString.call(value); } result2[value] = key; }, constant(identity)); var invertBy = createInverter(function(result2, value, key) { if (value != null && typeof value.toString != "function") { value = nativeObjectToString.call(value); } if (hasOwnProperty.call(result2, value)) { result2[value].push(key); } else { result2[value] = [key]; } }, getIteratee); var invoke = baseRest(baseInvoke); function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } function mapKeys(object, iteratee2) { var result2 = {}; iteratee2 = getIteratee(iteratee2, 3); baseForOwn(object, function(value, key, object2) { baseAssignValue(result2, iteratee2(value, key, object2), value); }); return result2; } function mapValues(object, iteratee2) { var result2 = {}; iteratee2 = getIteratee(iteratee2, 3); baseForOwn(object, function(value, key, object2) { baseAssignValue(result2, key, iteratee2(value, key, object2)); }); return result2; } var merge = createAssigner(function(object, source2, srcIndex) { baseMerge(object, source2, srcIndex); }); var mergeWith = createAssigner(function(object, source2, srcIndex, customizer) { baseMerge(object, source2, srcIndex, customizer); }); var omit = flatRest(function(object, paths) { var result2 = {}; if (object == null) { return result2; } var isDeep = false; paths = arrayMap(paths, function(path) { path = castPath(path, object); isDeep || (isDeep = path.length > 1); return path; }); copyObject(object, getAllKeysIn(object), result2); if (isDeep) { result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } var length = paths.length; while (length--) { baseUnset(result2, paths[length]); } return result2; }); function omitBy(object, predicate) { return pickBy(object, negate(getIteratee(predicate))); } var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); function pickBy(object, predicate) { if (object == null) { return {}; } var props = arrayMap(getAllKeysIn(object), function(prop2) { return [prop2]; }); predicate = getIteratee(predicate); return basePickBy(object, props, function(value, path) { return predicate(value, path[0]); }); } function result(object, path, defaultValue) { path = castPath(path, object); var index2 = -1, length = path.length; if (!length) { length = 1; object = undefined$1; } while (++index2 < length) { var value = object == null ? undefined$1 : object[toKey(path[index2])]; if (value === undefined$1) { index2 = length; value = defaultValue; } object = isFunction2(value) ? value.call(object) : value; } return object; } function set2(object, path, value) { return object == null ? object : baseSet(object, path, value); } function setWith(object, path, value, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return object == null ? object : baseSet(object, path, value, customizer); } var toPairs = createToPairs(keys); var toPairsIn = createToPairs(keysIn); function transform(object, iteratee2, accumulator) { var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); iteratee2 = getIteratee(iteratee2, 4); if (accumulator == null) { var Ctor = object && object.constructor; if (isArrLike) { accumulator = isArr ? new Ctor() : []; } else if (isObject2(object)) { accumulator = isFunction2(Ctor) ? baseCreate(getPrototype(object)) : {}; } else { accumulator = {}; } } (isArrLike ? arrayEach : baseForOwn)(object, function(value, index2, object2) { return iteratee2(accumulator, value, index2, object2); }); return accumulator; } function unset2(object, path) { return object == null ? true : baseUnset(object, path); } function update(object, path, updater) { return object == null ? object : baseUpdate(object, path, castFunction(updater)); } function updateWith(object, path, updater, customizer) { customizer = typeof customizer == "function" ? customizer : undefined$1; return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); } function values(object) { return object == null ? [] : baseValues(object, keys(object)); } function valuesIn(object) { return object == null ? [] : baseValues(object, keysIn(object)); } function clamp(number, lower, upper) { if (upper === undefined$1) { upper = lower; lower = undefined$1; } if (upper !== undefined$1) { upper = toNumber(upper); upper = upper === upper ? upper : 0; } if (lower !== undefined$1) { lower = toNumber(lower); lower = lower === lower ? lower : 0; } return baseClamp(toNumber(number), lower, upper); } function inRange(number, start, end) { start = toFinite(start); if (end === undefined$1) { end = start; start = 0; } else { end = toFinite(end); } number = toNumber(number); return baseInRange(number, start, end); } function random(lower, upper, floating) { if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) { upper = floating = undefined$1; } if (floating === undefined$1) { if (typeof upper == "boolean") { floating = upper; upper = undefined$1; } else if (typeof lower == "boolean") { floating = lower; lower = undefined$1; } } if (lower === undefined$1 && upper === undefined$1) { lower = 0; upper = 1; } else { lower = toFinite(lower); if (upper === undefined$1) { upper = lower; lower = 0; } else { upper = toFinite(upper); } } if (lower > upper) { var temp = lower; lower = upper; upper = temp; } if (floating || lower % 1 || upper % 1) { var rand = nativeRandom(); return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); } return baseRandom(lower, upper); } var camelCase = createCompounder(function(result2, word, index2) { word = word.toLowerCase(); return result2 + (index2 ? capitalize(word) : word); }); function capitalize(string) { return upperFirst(toString2(string).toLowerCase()); } function deburr(string) { string = toString2(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); } function endsWith(string, target2, position) { string = toString2(string); target2 = baseToString(target2); var length = string.length; position = position === undefined$1 ? length : baseClamp(toInteger(position), 0, length); var end = position; position -= target2.length; return position >= 0 && string.slice(position, end) == target2; } function escape2(string) { string = toString2(string); return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; } function escapeRegExp(string) { string = toString2(string); return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; } var kebabCase = createCompounder(function(result2, word, index2) { return result2 + (index2 ? "-" : "") + word.toLowerCase(); }); var lowerCase = createCompounder(function(result2, word, index2) { return result2 + (index2 ? " " : "") + word.toLowerCase(); }); var lowerFirst = createCaseFirst("toLowerCase"); function pad(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; if (!length || strLength >= length) { return string; } var mid2 = (length - strLength) / 2; return createPadding(nativeFloor(mid2), chars) + string + createPadding(nativeCeil(mid2), chars); } function padEnd(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return length && strLength < length ? string + createPadding(length - strLength, chars) : string; } function padStart(string, length, chars) { string = toString2(string); length = toInteger(length); var strLength = length ? stringSize(string) : 0; return length && strLength < length ? createPadding(length - strLength, chars) + string : string; } function parseInt2(string, radix, guard) { if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } return nativeParseInt(toString2(string).replace(reTrimStart, ""), radix || 0); } function repeat(string, n, guard) { if (guard ? isIterateeCall(string, n, guard) : n === undefined$1) { n = 1; } else { n = toInteger(n); } return baseRepeat(toString2(string), n); } function replace() { var args = arguments, string = toString2(args[0]); return args.length < 3 ? string : string.replace(args[1], args[2]); } var snakeCase = createCompounder(function(result2, word, index2) { return result2 + (index2 ? "_" : "") + word.toLowerCase(); }); function split(string, separator, limit) { if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) { separator = limit = undefined$1; } limit = limit === undefined$1 ? MAX_ARRAY_LENGTH : limit >>> 0; if (!limit) { return []; } string = toString2(string); if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) { separator = baseToString(separator); if (!separator && hasUnicode(string)) { return castSlice(stringToArray(string), 0, limit); } } return string.split(separator, limit); } var startCase = createCompounder(function(result2, word, index2) { return result2 + (index2 ? " " : "") + upperFirst(word); }); function startsWith2(string, target2, position) { string = toString2(string); position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); target2 = baseToString(target2); return string.slice(position, position + target2.length) == target2; } function template(string, options, guard) { var settings = lodash2.templateSettings; if (guard && isIterateeCall(string, options, guard)) { options = undefined$1; } string = toString2(string); options = assignInWith({}, options, settings, customDefaultsAssignIn); var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); var isEscaping, isEvaluating, index2 = 0, interpolate = options.interpolate || reNoMatch, source2 = "__p += '"; var reDelimiters = RegExp2( (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", "g" ); var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n"; string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { interpolateValue || (interpolateValue = esTemplateValue); source2 += string.slice(index2, offset).replace(reUnescapedString, escapeStringChar); if (escapeValue) { isEscaping = true; source2 += "' +\n__e(" + escapeValue + ") +\n'"; } if (evaluateValue) { isEvaluating = true; source2 += "';\n" + evaluateValue + ";\n__p += '"; } if (interpolateValue) { source2 += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; } index2 = offset + match.length; return match; }); source2 += "';\n"; var variable = hasOwnProperty.call(options, "variable") && options.variable; if (!variable) { source2 = "with (obj) {\n" + source2 + "\n}\n"; } else if (reForbiddenIdentifierChars.test(variable)) { throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT); } source2 = (isEvaluating ? source2.replace(reEmptyStringLeading, "") : source2).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); source2 = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source2 + "return __p\n}"; var result2 = attempt(function() { return Function2(importsKeys, sourceURL + "return " + source2).apply(undefined$1, importsValues); }); result2.source = source2; if (isError(result2)) { throw result2; } return result2; } function toLower(value) { return toString2(value).toLowerCase(); } function toUpper(value) { return toString2(value).toUpperCase(); } function trim(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return baseTrim(string); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; return castSlice(strSymbols, start, end).join(""); } function trimEnd(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return string.slice(0, trimmedEndIndex(string) + 1); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; return castSlice(strSymbols, 0, end).join(""); } function trimStart(string, chars, guard) { string = toString2(string); if (string && (guard || chars === undefined$1)) { return string.replace(reTrimStart, ""); } if (!string || !(chars = baseToString(chars))) { return string; } var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); return castSlice(strSymbols, start).join(""); } function truncate(string, options) { var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; if (isObject2(options)) { var separator = "separator" in options ? options.separator : separator; length = "length" in options ? toInteger(options.length) : length; omission = "omission" in options ? baseToString(options.omission) : omission; } string = toString2(string); var strLength = string.length; if (hasUnicode(string)) { var strSymbols = stringToArray(string); strLength = strSymbols.length; } if (length >= strLength) { return string; } var end = length - stringSize(omission); if (end < 1) { return omission; } var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); if (separator === undefined$1) { return result2 + omission; } if (strSymbols) { end += result2.length - end; } if (isRegExp(separator)) { if (string.slice(end).search(separator)) { var match, substring = result2; if (!separator.global) { separator = RegExp2(separator.source, toString2(reFlags.exec(separator)) + "g"); } separator.lastIndex = 0; while (match = separator.exec(substring)) { var newEnd = match.index; } result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd); } } else if (string.indexOf(baseToString(separator), end) != end) { var index2 = result2.lastIndexOf(separator); if (index2 > -1) { result2 = result2.slice(0, index2); } } return result2 + omission; } function unescape(string) { string = toString2(string); return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; } var upperCase = createCompounder(function(result2, word, index2) { return result2 + (index2 ? " " : "") + word.toUpperCase(); }); var upperFirst = createCaseFirst("toUpperCase"); function words(string, pattern, guard) { string = toString2(string); pattern = guard ? undefined$1 : pattern; if (pattern === undefined$1) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } var attempt = baseRest(function(func, args) { try { return apply(func, undefined$1, args); } catch (e) { return isError(e) ? e : new Error2(e); } }); var bindAll = flatRest(function(object, methodNames) { arrayEach(methodNames, function(key) { key = toKey(key); baseAssignValue(object, key, bind(object[key], object)); }); return object; }); function cond(pairs) { var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); pairs = !length ? [] : arrayMap(pairs, function(pair) { if (typeof pair[1] != "function") { throw new TypeError2(FUNC_ERROR_TEXT); } return [toIteratee(pair[0]), pair[1]]; }); return baseRest(function(args) { var index2 = -1; while (++index2 < length) { var pair = pairs[index2]; if (apply(pair[0], this, args)) { return apply(pair[1], this, args); } } }); } function conforms(source2) { return baseConforms(baseClone(source2, CLONE_DEEP_FLAG)); } function constant(value) { return function() { return value; }; } function defaultTo(value, defaultValue) { return value == null || value !== value ? defaultValue : value; } var flow2 = createFlow(); var flowRight = createFlow(true); function identity(value) { return value; } function iteratee(func) { return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); } function matches(source2) { return baseMatches(baseClone(source2, CLONE_DEEP_FLAG)); } function matchesProperty(path, srcValue) { return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); } var method = baseRest(function(path, args) { return function(object) { return baseInvoke(object, path, args); }; }); var methodOf = baseRest(function(object, args) { return function(path) { return baseInvoke(object, path, args); }; }); function mixin(object, source2, options) { var props = keys(source2), methodNames = baseFunctions(source2, props); if (options == null && !(isObject2(source2) && (methodNames.length || !props.length))) { options = source2; source2 = object; object = this; methodNames = baseFunctions(source2, keys(source2)); } var chain2 = !(isObject2(options) && "chain" in options) || !!options.chain, isFunc = isFunction2(object); arrayEach(methodNames, function(methodName) { var func = source2[methodName]; object[methodName] = func; if (isFunc) { object.prototype[methodName] = function() { var chainAll = this.__chain__; if (chain2 || chainAll) { var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__); actions.push({ "func": func, "args": arguments, "thisArg": object }); result2.__chain__ = chainAll; return result2; } return func.apply(object, arrayPush([this.value()], arguments)); }; } }); return object; } function noConflict() { if (root._ === this) { root._ = oldDash; } return this; } function noop2() { } function nthArg(n) { n = toInteger(n); return baseRest(function(args) { return baseNth(args, n); }); } var over = createOver(arrayMap); var overEvery = createOver(arrayEvery); var overSome = createOver(arraySome); function property(path) { return isKey2(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } function propertyOf(object) { return function(path) { return object == null ? undefined$1 : baseGet2(object, path); }; } var range2 = createRange(); var rangeRight = createRange(true); function stubArray() { return []; } function stubFalse() { return false; } function stubObject() { return {}; } function stubString() { return ""; } function stubTrue() { return true; } function times2(n, iteratee2) { n = toInteger(n); if (n < 1 || n > MAX_SAFE_INTEGER) { return []; } var index2 = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); iteratee2 = getIteratee(iteratee2); n -= MAX_ARRAY_LENGTH; var result2 = baseTimes(length, iteratee2); while (++index2 < n) { iteratee2(index2); } return result2; } function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath2(toString2(value))); } function uniqueId(prefix) { var id = ++idCounter; return toString2(prefix) + id; } var add = createMathOperation(function(augend, addend) { return augend + addend; }, 0); var ceil = createRound("ceil"); var divide2 = createMathOperation(function(dividend, divisor) { return dividend / divisor; }, 1); var floor = createRound("floor"); function max(array) { return array && array.length ? baseExtremum(array, identity, baseGt) : undefined$1; } function maxBy(array, iteratee2) { return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined$1; } function mean(array) { return baseMean(array, identity); } function meanBy(array, iteratee2) { return baseMean(array, getIteratee(iteratee2, 2)); } function min(array) { return array && array.length ? baseExtremum(array, identity, baseLt) : undefined$1; } function minBy(array, iteratee2) { return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined$1; } var multiply = createMathOperation(function(multiplier, multiplicand) { return multiplier * multiplicand; }, 1); var round = createRound("round"); var subtract = createMathOperation(function(minuend, subtrahend) { return minuend - subtrahend; }, 0); function sum2(array) { return array && array.length ? baseSum(array, identity) : 0; } function sumBy(array, iteratee2) { return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0; } lodash2.after = after; lodash2.ary = ary; lodash2.assign = assign2; lodash2.assignIn = assignIn; lodash2.assignInWith = assignInWith; lodash2.assignWith = assignWith; lodash2.at = at; lodash2.before = before; lodash2.bind = bind; lodash2.bindAll = bindAll; lodash2.bindKey = bindKey; lodash2.castArray = castArray; lodash2.chain = chain; lodash2.chunk = chunk; lodash2.compact = compact2; lodash2.concat = concat2; lodash2.cond = cond; lodash2.conforms = conforms; lodash2.constant = constant; lodash2.countBy = countBy; lodash2.create = create; lodash2.curry = curry; lodash2.curryRight = curryRight; lodash2.debounce = debounce; lodash2.defaults = defaults; lodash2.defaultsDeep = defaultsDeep; lodash2.defer = defer; lodash2.delay = delay; lodash2.difference = difference; lodash2.differenceBy = differenceBy; lodash2.differenceWith = differenceWith; lodash2.drop = drop; lodash2.dropRight = dropRight; lodash2.dropRightWhile = dropRightWhile; lodash2.dropWhile = dropWhile; lodash2.fill = fill; lodash2.filter = filter2; lodash2.flatMap = flatMap; lodash2.flatMapDeep = flatMapDeep; lodash2.flatMapDepth = flatMapDepth; lodash2.flatten = flatten; lodash2.flattenDeep = flattenDeep; lodash2.flattenDepth = flattenDepth; lodash2.flip = flip; lodash2.flow = flow2; lodash2.flowRight = flowRight; lodash2.fromPairs = fromPairs; lodash2.functions = functions; lodash2.functionsIn = functionsIn; lodash2.groupBy = groupBy; lodash2.initial = initial; lodash2.intersection = intersection; lodash2.intersectionBy = intersectionBy; lodash2.intersectionWith = intersectionWith; lodash2.invert = invert; lodash2.invertBy = invertBy; lodash2.invokeMap = invokeMap; lodash2.iteratee = iteratee; lodash2.keyBy = keyBy; lodash2.keys = keys; lodash2.keysIn = keysIn; lodash2.map = map2; lodash2.mapKeys = mapKeys; lodash2.mapValues = mapValues; lodash2.matches = matches; lodash2.matchesProperty = matchesProperty; lodash2.memoize = memoize; lodash2.merge = merge; lodash2.mergeWith = mergeWith; lodash2.method = method; lodash2.methodOf = methodOf; lodash2.mixin = mixin; lodash2.negate = negate; lodash2.nthArg = nthArg; lodash2.omit = omit; lodash2.omitBy = omitBy; lodash2.once = once2; lodash2.orderBy = orderBy; lodash2.over = over; lodash2.overArgs = overArgs; lodash2.overEvery = overEvery; lodash2.overSome = overSome; lodash2.partial = partial; lodash2.partialRight = partialRight; lodash2.partition = partition; lodash2.pick = pick; lodash2.pickBy = pickBy; lodash2.property = property; lodash2.propertyOf = propertyOf; lodash2.pull = pull; lodash2.pullAll = pullAll; lodash2.pullAllBy = pullAllBy; lodash2.pullAllWith = pullAllWith; lodash2.pullAt = pullAt; lodash2.range = range2; lodash2.rangeRight = rangeRight; lodash2.rearg = rearg; lodash2.reject = reject; lodash2.remove = remove; lodash2.rest = rest; lodash2.reverse = reverse; lodash2.sampleSize = sampleSize; lodash2.set = set2; lodash2.setWith = setWith; lodash2.shuffle = shuffle; lodash2.slice = slice; lodash2.sortBy = sortBy; lodash2.sortedUniq = sortedUniq; lodash2.sortedUniqBy = sortedUniqBy; lodash2.split = split; lodash2.spread = spread; lodash2.tail = tail; lodash2.take = take; lodash2.takeRight = takeRight; lodash2.takeRightWhile = takeRightWhile; lodash2.takeWhile = takeWhile; lodash2.tap = tap; lodash2.throttle = throttle; lodash2.thru = thru; lodash2.toArray = toArray; lodash2.toPairs = toPairs; lodash2.toPairsIn = toPairsIn; lodash2.toPath = toPath; lodash2.toPlainObject = toPlainObject; lodash2.transform = transform; lodash2.unary = unary; lodash2.union = union; lodash2.unionBy = unionBy; lodash2.unionWith = unionWith; lodash2.uniq = uniq; lodash2.uniqBy = uniqBy; lodash2.uniqWith = uniqWith; lodash2.unset = unset2; lodash2.unzip = unzip; lodash2.unzipWith = unzipWith; lodash2.update = update; lodash2.updateWith = updateWith; lodash2.values = values; lodash2.valuesIn = valuesIn; lodash2.without = without; lodash2.words = words; lodash2.wrap = wrap; lodash2.xor = xor; lodash2.xorBy = xorBy; lodash2.xorWith = xorWith; lodash2.zip = zip; lodash2.zipObject = zipObject; lodash2.zipObjectDeep = zipObjectDeep; lodash2.zipWith = zipWith; lodash2.entries = toPairs; lodash2.entriesIn = toPairsIn; lodash2.extend = assignIn; lodash2.extendWith = assignInWith; mixin(lodash2, lodash2); lodash2.add = add; lodash2.attempt = attempt; lodash2.camelCase = camelCase; lodash2.capitalize = capitalize; lodash2.ceil = ceil; lodash2.clamp = clamp; lodash2.clone = clone; lodash2.cloneDeep = cloneDeep; lodash2.cloneDeepWith = cloneDeepWith; lodash2.cloneWith = cloneWith; lodash2.conformsTo = conformsTo; lodash2.deburr = deburr; lodash2.defaultTo = defaultTo; lodash2.divide = divide2; lodash2.endsWith = endsWith; lodash2.eq = eq2; lodash2.escape = escape2; lodash2.escapeRegExp = escapeRegExp; lodash2.every = every; lodash2.find = find2; lodash2.findIndex = findIndex; lodash2.findKey = findKey; lodash2.findLast = findLast; lodash2.findLastIndex = findLastIndex; lodash2.findLastKey = findLastKey; lodash2.floor = floor; lodash2.forEach = forEach; lodash2.forEachRight = forEachRight; lodash2.forIn = forIn; lodash2.forInRight = forInRight; lodash2.forOwn = forOwn; lodash2.forOwnRight = forOwnRight; lodash2.get = get2; lodash2.gt = gt2; lodash2.gte = gte; lodash2.has = has; lodash2.hasIn = hasIn; lodash2.head = head; lodash2.identity = identity; lodash2.includes = includes; lodash2.indexOf = indexOf; lodash2.inRange = inRange; lodash2.invoke = invoke; lodash2.isArguments = isArguments; lodash2.isArray = isArray; lodash2.isArrayBuffer = isArrayBuffer; lodash2.isArrayLike = isArrayLike; lodash2.isArrayLikeObject = isArrayLikeObject; lodash2.isBoolean = isBoolean2; lodash2.isBuffer = isBuffer; lodash2.isDate = isDate; lodash2.isElement = isElement; lodash2.isEmpty = isEmpty; lodash2.isEqual = isEqual; lodash2.isEqualWith = isEqualWith; lodash2.isError = isError; lodash2.isFinite = isFinite2; lodash2.isFunction = isFunction2; lodash2.isInteger = isInteger; lodash2.isLength = isLength; lodash2.isMap = isMap; lodash2.isMatch = isMatch; lodash2.isMatchWith = isMatchWith; lodash2.isNaN = isNaN2; lodash2.isNative = isNative; lodash2.isNil = isNil; lodash2.isNull = isNull; lodash2.isNumber = isNumber; lodash2.isObject = isObject2; lodash2.isObjectLike = isObjectLike; lodash2.isPlainObject = isPlainObject2; lodash2.isRegExp = isRegExp; lodash2.isSafeInteger = isSafeInteger; lodash2.isSet = isSet; lodash2.isString = isString2; lodash2.isSymbol = isSymbol; lodash2.isTypedArray = isTypedArray; lodash2.isUndefined = isUndefined2; lodash2.isWeakMap = isWeakMap; lodash2.isWeakSet = isWeakSet; lodash2.join = join2; lodash2.kebabCase = kebabCase; lodash2.last = last; lodash2.lastIndexOf = lastIndexOf; lodash2.lowerCase = lowerCase; lodash2.lowerFirst = lowerFirst; lodash2.lt = lt2; lodash2.lte = lte; lodash2.max = max; lodash2.maxBy = maxBy; lodash2.mean = mean; lodash2.meanBy = meanBy; lodash2.min = min; lodash2.minBy = minBy; lodash2.stubArray = stubArray; lodash2.stubFalse = stubFalse; lodash2.stubObject = stubObject; lodash2.stubString = stubString; lodash2.stubTrue = stubTrue; lodash2.multiply = multiply; lodash2.nth = nth; lodash2.noConflict = noConflict; lodash2.noop = noop2; lodash2.now = now2; lodash2.pad = pad; lodash2.padEnd = padEnd; lodash2.padStart = padStart; lodash2.parseInt = parseInt2; lodash2.random = random; lodash2.reduce = reduce; lodash2.reduceRight = reduceRight; lodash2.repeat = repeat; lodash2.replace = replace; lodash2.result = result; lodash2.round = round; lodash2.runInContext = runInContext2; lodash2.sample = sample; lodash2.size = size; lodash2.snakeCase = snakeCase; lodash2.some = some; lodash2.sortedIndex = sortedIndex; lodash2.sortedIndexBy = sortedIndexBy; lodash2.sortedIndexOf = sortedIndexOf; lodash2.sortedLastIndex = sortedLastIndex; lodash2.sortedLastIndexBy = sortedLastIndexBy; lodash2.sortedLastIndexOf = sortedLastIndexOf; lodash2.startCase = startCase; lodash2.startsWith = startsWith2; lodash2.subtract = subtract; lodash2.sum = sum2; lodash2.sumBy = sumBy; lodash2.template = template; lodash2.times = times2; lodash2.toFinite = toFinite; lodash2.toInteger = toInteger; lodash2.toLength = toLength; lodash2.toLower = toLower; lodash2.toNumber = toNumber; lodash2.toSafeInteger = toSafeInteger; lodash2.toString = toString2; lodash2.toUpper = toUpper; lodash2.trim = trim; lodash2.trimEnd = trimEnd; lodash2.trimStart = trimStart; lodash2.truncate = truncate; lodash2.unescape = unescape; lodash2.uniqueId = uniqueId; lodash2.upperCase = upperCase; lodash2.upperFirst = upperFirst; lodash2.each = forEach; lodash2.eachRight = forEachRight; lodash2.first = head; mixin(lodash2, function() { var source2 = {}; baseForOwn(lodash2, function(func, methodName) { if (!hasOwnProperty.call(lodash2.prototype, methodName)) { source2[methodName] = func; } }); return source2; }(), { "chain": false }); lodash2.VERSION = VERSION; arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { lodash2[methodName].placeholder = lodash2; }); arrayEach(["drop", "take"], function(methodName, index2) { LazyWrapper.prototype[methodName] = function(n) { n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0); var result2 = this.__filtered__ && !index2 ? new LazyWrapper(this) : this.clone(); if (result2.__filtered__) { result2.__takeCount__ = nativeMin(n, result2.__takeCount__); } else { result2.__views__.push({ "size": nativeMin(n, MAX_ARRAY_LENGTH), "type": methodName + (result2.__dir__ < 0 ? "Right" : "") }); } return result2; }; LazyWrapper.prototype[methodName + "Right"] = function(n) { return this.reverse()[methodName](n).reverse(); }; }); arrayEach(["filter", "map", "takeWhile"], function(methodName, index2) { var type = index2 + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; LazyWrapper.prototype[methodName] = function(iteratee2) { var result2 = this.clone(); result2.__iteratees__.push({ "iteratee": getIteratee(iteratee2, 3), "type": type }); result2.__filtered__ = result2.__filtered__ || isFilter; return result2; }; }); arrayEach(["head", "last"], function(methodName, index2) { var takeName = "take" + (index2 ? "Right" : ""); LazyWrapper.prototype[methodName] = function() { return this[takeName](1).value()[0]; }; }); arrayEach(["initial", "tail"], function(methodName, index2) { var dropName = "drop" + (index2 ? "" : "Right"); LazyWrapper.prototype[methodName] = function() { return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); }; }); LazyWrapper.prototype.compact = function() { return this.filter(identity); }; LazyWrapper.prototype.find = function(predicate) { return this.filter(predicate).head(); }; LazyWrapper.prototype.findLast = function(predicate) { return this.reverse().find(predicate); }; LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { if (typeof path == "function") { return new LazyWrapper(this); } return this.map(function(value) { return baseInvoke(value, path, args); }); }); LazyWrapper.prototype.reject = function(predicate) { return this.filter(negate(getIteratee(predicate))); }; LazyWrapper.prototype.slice = function(start, end) { start = toInteger(start); var result2 = this; if (result2.__filtered__ && (start > 0 || end < 0)) { return new LazyWrapper(result2); } if (start < 0) { result2 = result2.takeRight(-start); } else if (start) { result2 = result2.drop(start); } if (end !== undefined$1) { end = toInteger(end); result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start); } return result2; }; LazyWrapper.prototype.takeRightWhile = function(predicate) { return this.reverse().takeWhile(predicate).reverse(); }; LazyWrapper.prototype.toArray = function() { return this.take(MAX_ARRAY_LENGTH); }; baseForOwn(LazyWrapper.prototype, function(func, methodName) { var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash2[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); if (!lodashFunc) { return; } lodash2.prototype[methodName] = function() { var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value); var interceptor = function(value2) { var result3 = lodashFunc.apply(lodash2, arrayPush([value2], args)); return isTaker && chainAll ? result3[0] : result3; }; if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { isLazy = useLazy = false; } var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; if (!retUnwrapped && useLazy) { value = onlyLazy ? value : new LazyWrapper(this); var result2 = func.apply(value, args); result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined$1 }); return new LodashWrapper(result2, chainAll); } if (isUnwrapped && onlyLazy) { return func.apply(this, args); } result2 = this.thru(interceptor); return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2; }; }); arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); lodash2.prototype[methodName] = function() { var args = arguments; if (retUnwrapped && !this.__chain__) { var value = this.value(); return func.apply(isArray(value) ? value : [], args); } return this[chainName](function(value2) { return func.apply(isArray(value2) ? value2 : [], args); }); }; }); baseForOwn(LazyWrapper.prototype, function(func, methodName) { var lodashFunc = lodash2[methodName]; if (lodashFunc) { var key = lodashFunc.name + ""; if (!hasOwnProperty.call(realNames, key)) { realNames[key] = []; } realNames[key].push({ "name": methodName, "func": lodashFunc }); } }); realNames[createHybrid(undefined$1, WRAP_BIND_KEY_FLAG).name] = [{ "name": "wrapper", "func": undefined$1 }]; LazyWrapper.prototype.clone = lazyClone; LazyWrapper.prototype.reverse = lazyReverse; LazyWrapper.prototype.value = lazyValue; lodash2.prototype.at = wrapperAt; lodash2.prototype.chain = wrapperChain; lodash2.prototype.commit = wrapperCommit; lodash2.prototype.next = wrapperNext; lodash2.prototype.plant = wrapperPlant; lodash2.prototype.reverse = wrapperReverse; lodash2.prototype.toJSON = lodash2.prototype.valueOf = lodash2.prototype.value = wrapperValue; lodash2.prototype.first = lodash2.prototype.head; if (symIterator) { lodash2.prototype[symIterator] = wrapperToIterator; } return lodash2; }; var _2 = runInContext(); if (freeModule) { (freeModule.exports = _2)._ = _2; freeExports._ = _2; } else { root._ = _2; } }).call(commonjsGlobal); })(lodash, lodash.exports); var lodashExports = lodash.exports; const _ = /* @__PURE__ */ getDefaultExportFromCjs(lodashExports); var isCheckBoxInput = (element) => element.type === "checkbox"; var isDateObject = (value) => value instanceof Date; var isNullOrUndefined = (value) => value == null; const isObjectType = (value) => typeof value === "object"; var isObject$1 = (value) => !isNullOrUndefined(value) && !Array.isArray(value) && isObjectType(value) && !isDateObject(value); var getEventValue = (event) => isObject$1(event) && event.target ? isCheckBoxInput(event.target) ? event.target.checked : event.target.value : event; var getNodeParentName = (name) => name.substring(0, name.search(/\.\d+(\.|$)/)) || name; var isNameInFieldArray = (names, name) => names.has(getNodeParentName(name)); var isPlainObject$1 = (tempObject) => { const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype; return isObject$1(prototypeCopy) && prototypeCopy.hasOwnProperty("isPrototypeOf"); }; var isWeb = typeof window !== "undefined" && typeof window.HTMLElement !== "undefined" && typeof document !== "undefined"; function cloneObject(data) { let copy2; const isArray = Array.isArray(data); if (data instanceof Date) { copy2 = new Date(data); } else if (data instanceof Set) { copy2 = new Set(data); } else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) && (isArray || isObject$1(data))) { copy2 = isArray ? [] : {}; if (!Array.isArray(data) && !isPlainObject$1(data)) { copy2 = data; } else { for (const key in data) { copy2[key] = cloneObject(data[key]); } } } else { return data; } return copy2; } var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : []; var isUndefined = (val) => val === void 0; var get = (obj, path, defaultValue) => { if (!path || !isObject$1(obj)) { return defaultValue; } const result = compact(path.split(/[,[\].]+?/)).reduce((result2, key) => isNullOrUndefined(result2) ? result2 : result2[key], obj); return isUndefined(result) || result === obj ? isUndefined(obj[path]) ? defaultValue : obj[path] : result; }; const EVENTS = { BLUR: "blur", FOCUS_OUT: "focusout", CHANGE: "change" }; const VALIDATION_MODE = { onBlur: "onBlur", onChange: "onChange", onSubmit: "onSubmit", onTouched: "onTouched", all: "all" }; const INPUT_VALIDATION_RULES = { max: "max", min: "min", maxLength: "maxLength", minLength: "minLength", pattern: "pattern", required: "required", validate: "validate" }; React.createContext(null); var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => { const result = { defaultValues: control._defaultValues }; for (const key in formState) { Object.defineProperty(result, key, { get: () => { const _key = key; if (control._proxyFormState[_key] !== VALIDATION_MODE.all) { control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all; } localProxyFormState && (localProxyFormState[_key] = true); return formState[_key]; } }); } return result; }; var isEmptyObject = (value) => isObject$1(value) && !Object.keys(value).length; var shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => { updateFormState(formStateData); const { name, ...formState } = formStateData; return isEmptyObject(formState) || Object.keys(formState).length >= Object.keys(_proxyFormState).length || Object.keys(formState).find((key) => _proxyFormState[key] === (!isRoot || VALIDATION_MODE.all)); }; var convertToArrayPayload = (value) => Array.isArray(value) ? value : [value]; function useSubscribe(props) { const _props = React.useRef(props); _props.current = props; React.useEffect(() => { const subscription = !props.disabled && _props.current.subject && _props.current.subject.subscribe({ next: _props.current.next }); return () => { subscription && subscription.unsubscribe(); }; }, [props.disabled]); } var isString = (value) => typeof value === "string"; var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => { if (isString(names)) { isGlobal && _names.watch.add(names); return get(formValues, names, defaultValue); } if (Array.isArray(names)) { return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName))); } isGlobal && (_names.watchAll = true); return formValues; }; var isKey = (value) => /^\w*$/.test(value); var stringToPath = (input) => compact(input.replace(/["|']|\]/g, "").split(/\.|\[/)); function set(object, path, value) { let index2 = -1; const tempPath = isKey(path) ? [path] : stringToPath(path); const length = tempPath.length; const lastIndex = length - 1; while (++index2 < length) { const key = tempPath[index2]; let newValue = value; if (index2 !== lastIndex) { const objValue = object[key]; newValue = isObject$1(objValue) || Array.isArray(objValue) ? objValue : !isNaN(+tempPath[index2 + 1]) ? [] : {}; } object[key] = newValue; object = object[key]; } return object; } var appendErrors = (name, validateAllFieldCriteria, errors2, type, message) => validateAllFieldCriteria ? { ...errors2[name], types: { ...errors2[name] && errors2[name].types ? errors2[name].types : {}, [type]: message || true } } : {}; const focusFieldBy = (fields, callback, fieldsNames) => { for (const key of fieldsNames || Object.keys(fields)) { const field = get(fields, key); if (field) { const { _f, ...currentField } = field; if (_f && callback(_f.name)) { if (_f.ref.focus) { _f.ref.focus(); break; } else if (_f.refs && _f.refs[0].focus) { _f.refs[0].focus(); break; } } else if (isObject$1(currentField)) { focusFieldBy(currentField, callback); } } } }; var getValidationModes = (mode) => ({ isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit, isOnBlur: mode === VALIDATION_MODE.onBlur, isOnChange: mode === VALIDATION_MODE.onChange, isOnAll: mode === VALIDATION_MODE.all, isOnTouch: mode === VALIDATION_MODE.onTouched }); var isWatched = (name, _names, isBlurEvent) => !isBlurEvent && (_names.watchAll || _names.watch.has(name) || [..._names.watch].some((watchName) => name.startsWith(watchName) && /^\.\w+/.test(name.slice(watchName.length)))); var updateFieldArrayRootError = (errors2, error, name) => { const fieldArrayErrors = compact(get(errors2, name)); set(fieldArrayErrors, "root", error[name]); set(errors2, name, fieldArrayErrors); return errors2; }; var isBoolean = (value) => typeof value === "boolean"; var isFileInput = (element) => element.type === "file"; var isFunction$1 = (value) => typeof value === "function"; var isHTMLElement = (value) => { if (!isWeb) { return false; } const owner = value ? value.ownerDocument : 0; return value instanceof (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement); }; var isMessage = (value) => isString(value); var isRadioInput = (element) => element.type === "radio"; var isRegex = (value) => value instanceof RegExp; const defaultResult = { value: false, isValid: false }; const validResult = { value: true, isValid: true }; var getCheckboxValue = (options) => { if (Array.isArray(options)) { if (options.length > 1) { const values = options.filter((option) => option && option.checked && !option.disabled).map((option) => option.value); return { value: values, isValid: !!values.length }; } return options[0].checked && !options[0].disabled ? ( // @ts-expect-error expected to work in the browser options[0].attributes && !isUndefined(options[0].attributes.value) ? isUndefined(options[0].value) || options[0].value === "" ? validResult : { value: options[0].value, isValid: true } : validResult ) : defaultResult; } return defaultResult; }; const defaultReturn = { isValid: false, value: null }; var getRadioValue = (options) => Array.isArray(options) ? options.reduce((previous, option) => option && option.checked && !option.disabled ? { isValid: true, value: option.value } : previous, defaultReturn) : defaultReturn; function getValidateError(result, ref, type = "validate") { if (isMessage(result) || Array.isArray(result) && result.every(isMessage) || isBoolean(result) && !result) { return { type, message: isMessage(result) ? result : "", ref }; } } var getValueAndMessage = (validationData) => isObject$1(validationData) && !isRegex(validationData) ? validationData : { value: validationData, message: "" }; var validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => { const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled } = field._f; const inputValue = get(formValues, name); if (!mount || disabled) { return {}; } const inputRef = refs ? refs[0] : ref; const setCustomValidity = (message) => { if (shouldUseNativeValidation && inputRef.reportValidity) { inputRef.setCustomValidity(isBoolean(message) ? "" : message || ""); inputRef.reportValidity(); } }; const error = {}; const isRadio = isRadioInput(ref); const isCheckBox = isCheckBoxInput(ref); const isRadioOrCheckbox2 = isRadio || isCheckBox; const isEmpty = (valueAsNumber || isFileInput(ref)) && isUndefined(ref.value) && isUndefined(inputValue) || isHTMLElement(ref) && ref.value === "" || inputValue === "" || Array.isArray(inputValue) && !inputValue.length; const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error); const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => { const message = exceedMax ? maxLengthMessage : minLengthMessage; error[name] = { type: exceedMax ? maxType : minType, message, ref, ...appendErrorsCurry(exceedMax ? maxType : minType, message) }; }; if (isFieldArray ? !Array.isArray(inputValue) || !inputValue.length : required && (!isRadioOrCheckbox2 && (isEmpty || isNullOrUndefined(inputValue)) || isBoolean(inputValue) && !inputValue || isCheckBox && !getCheckboxValue(refs).isValid || isRadio && !getRadioValue(refs).isValid)) { const { value, message } = isMessage(required) ? { value: !!required, message: required } : getValueAndMessage(required); if (value) { error[name] = { type: INPUT_VALIDATION_RULES.required, message, ref: inputRef, ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message) }; if (!validateAllFieldCriteria) { setCustomValidity(message); return error; } } } if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) { let exceedMax; let exceedMin; const maxOutput = getValueAndMessage(max); const minOutput = getValueAndMessage(min); if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) { const valueNumber = ref.valueAsNumber || (inputValue ? +inputValue : inputValue); if (!isNullOrUndefined(maxOutput.value)) { exceedMax = valueNumber > maxOutput.value; } if (!isNullOrUndefined(minOutput.value)) { exceedMin = valueNumber < minOutput.value; } } else { const valueDate = ref.valueAsDate || new Date(inputValue); const convertTimeToDate = (time) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + time); const isTime = ref.type == "time"; const isWeek = ref.type == "week"; if (isString(maxOutput.value) && inputValue) { exceedMax = isTime ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value) : isWeek ? inputValue > maxOutput.value : valueDate > new Date(maxOutput.value); } if (isString(minOutput.value) && inputValue) { exceedMin = isTime ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value) : isWeek ? inputValue < minOutput.value : valueDate < new Date(minOutput.value); } } if (exceedMax || exceedMin) { getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min); if (!validateAllFieldCriteria) { setCustomValidity(error[name].message); return error; } } } if ((maxLength || minLength) && !isEmpty && (isString(inputValue) || isFieldArray && Array.isArray(inputValue))) { const maxLengthOutput = getValueAndMessage(maxLength); const minLengthOutput = getValueAndMessage(minLength); const exceedMax = !isNullOrUndefined(maxLengthOutput.value) && inputValue.length > +maxLengthOutput.value; const exceedMin = !isNullOrUndefined(minLengthOutput.value) && inputValue.length < +minLengthOutput.value; if (exceedMax || exceedMin) { getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message); if (!validateAllFieldCriteria) { setCustomValidity(error[name].message); return error; } } } if (pattern && !isEmpty && isString(inputValue)) { const { value: patternValue, message } = getValueAndMessage(pattern); if (isRegex(patternValue) && !inputValue.match(patternValue)) { error[name] = { type: INPUT_VALIDATION_RULES.pattern, message, ref, ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message) }; if (!validateAllFieldCriteria) { setCustomValidity(message); return error; } } } if (validate) { if (isFunction$1(validate)) { const result = await validate(inputValue, formValues); const validateError = getValidateError(result, inputRef); if (validateError) { error[name] = { ...validateError, ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message) }; if (!validateAllFieldCriteria) { setCustomValidity(validateError.message); return error; } } } else if (isObject$1(validate)) { let validationResult = {}; for (const key in validate) { if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) { break; } const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key); if (validateError) { validationResult = { ...validateError, ...appendErrorsCurry(key, validateError.message) }; setCustomValidity(validateError.message); if (validateAllFieldCriteria) { error[name] = validationResult; } } } if (!isEmptyObject(validationResult)) { error[name] = { ref: inputRef, ...validationResult }; if (!validateAllFieldCriteria) { return error; } } } } setCustomValidity(true); return error; }; function baseGet(object, updatePath) { const length = updatePath.slice(0, -1).length; let index2 = 0; while (index2 < length) { object = isUndefined(object) ? index2++ : object[updatePath[index2++]]; } return object; } function isEmptyArray(obj) { for (const key in obj) { if (!isUndefined(obj[key])) { return false; } } return true; } function unset(object, path) { const paths = Array.isArray(path) ? path : isKey(path) ? [path] : stringToPath(path); const childObject = paths.length === 1 ? object : baseGet(object, paths); const index2 = paths.length - 1; const key = paths[index2]; if (childObject) { delete childObject[key]; } if (index2 !== 0 && (isObject$1(childObject) && isEmptyObject(childObject) || Array.isArray(childObject) && isEmptyArray(childObject))) { unset(object, paths.slice(0, -1)); } return object; } function createSubject() { let _observers = []; const next = (value) => { for (const observer2 of _observers) { observer2.next && observer2.next(value); } }; const subscribe = (observer2) => { _observers.push(observer2); return { unsubscribe: () => { _observers = _observers.filter((o) => o !== observer2); } }; }; const unsubscribe = () => { _observers = []; }; return { get observers() { return _observers; }, next, subscribe, unsubscribe }; } var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value); function deepEqual$1(object1, object2) { if (isPrimitive(object1) || isPrimitive(object2)) { return object1 === object2; } if (isDateObject(object1) && isDateObject(object2)) { return object1.getTime() === object2.getTime(); } const keys1 = Object.keys(object1); const keys2 = Object.keys(object2); if (keys1.length !== keys2.length) { return false; } for (const key of keys1) { const val1 = object1[key]; if (!keys2.includes(key)) { return false; } if (key !== "ref") { const val2 = object2[key]; if (isDateObject(val1) && isDateObject(val2) || isObject$1(val1) && isObject$1(val2) || Array.isArray(val1) && Array.isArray(val2) ? !deepEqual$1(val1, val2) : val1 !== val2) { return false; } } } return true; } var isMultipleSelect = (element) => element.type === `select-multiple`; var isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref); var live = (ref) => isHTMLElement(ref) && ref.isConnected; var objectHasFunction = (data) => { for (const key in data) { if (isFunction$1(data[key])) { return true; } } return false; }; function markFieldsDirty(data, fields = {}) { const isParentNodeArray = Array.isArray(data); if (isObject$1(data) || isParentNodeArray) { for (const key in data) { if (Array.isArray(data[key]) || isObject$1(data[key]) && !objectHasFunction(data[key])) { fields[key] = Array.isArray(data[key]) ? [] : {}; markFieldsDirty(data[key], fields[key]); } else if (!isNullOrUndefined(data[key])) { fields[key] = true; } } } return fields; } function getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) { const isParentNodeArray = Array.isArray(data); if (isObject$1(data) || isParentNodeArray) { for (const key in data) { if (Array.isArray(data[key]) || isObject$1(data[key]) && !objectHasFunction(data[key])) { if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) { dirtyFieldsFromValues[key] = Array.isArray(data[key]) ? markFieldsDirty(data[key], []) : { ...markFieldsDirty(data[key]) }; } else { getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]); } } else { dirtyFieldsFromValues[key] = !deepEqual$1(data[key], formValues[key]); } } } return dirtyFieldsFromValues; } var getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues)); var getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value) ? value : valueAsNumber ? value === "" ? NaN : value ? +value : value : valueAsDate && isString(value) ? new Date(value) : setValueAs ? setValueAs(value) : value; function getFieldValue(_f) { const ref = _f.ref; if (_f.refs ? _f.refs.every((ref2) => ref2.disabled) : ref.disabled) { return; } if (isFileInput(ref)) { return ref.files; } if (isRadioInput(ref)) { return getRadioValue(_f.refs).value; } if (isMultipleSelect(ref)) { return [...ref.selectedOptions].map(({ value }) => value); } if (isCheckBoxInput(ref)) { return getCheckboxValue(_f.refs).value; } return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f); } var getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => { const fields = {}; for (const name of fieldsNames) { const field = get(_fields, name); field && set(fields, name, field._f); } return { criteriaMode, names: [...fieldsNames], fields, shouldUseNativeValidation }; }; var getRuleValue = (rule) => isUndefined(rule) ? rule : isRegex(rule) ? rule.source : isObject$1(rule) ? isRegex(rule.value) ? rule.value.source : rule.value : rule; var hasValidation = (options) => options.mount && (options.required || options.min || options.max || options.maxLength || options.minLength || options.pattern || options.validate); function schemaErrorLookup(errors2, _fields, name) { const error = get(errors2, name); if (error || isKey(name)) { return { error, name }; } const names = name.split("."); while (names.length) { const fieldName = names.join("."); const field = get(_fields, fieldName); const foundError = get(errors2, fieldName); if (field && !Array.isArray(field) && name !== fieldName) { return { name }; } if (foundError && foundError.type) { return { name: fieldName, error: foundError }; } names.pop(); } return { name }; } var skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => { if (mode.isOnAll) { return false; } else if (!isSubmitted && mode.isOnTouch) { return !(isTouched || isBlurEvent); } else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) { return !isBlurEvent; } else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) { return isBlurEvent; } return true; }; var unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name); const defaultOptions = { mode: VALIDATION_MODE.onSubmit, reValidateMode: VALIDATION_MODE.onChange, shouldFocusError: true }; function createFormControl(props = {}, flushRootRender) { let _options = { ...defaultOptions, ...props }; let _formState = { submitCount: 0, isDirty: false, isLoading: isFunction$1(_options.defaultValues), isValidating: false, isSubmitted: false, isSubmitting: false, isSubmitSuccessful: false, isValid: false, touchedFields: {}, dirtyFields: {}, errors: {} }; let _fields = {}; let _defaultValues = isObject$1(_options.defaultValues) || isObject$1(_options.values) ? cloneObject(_options.defaultValues || _options.values) || {} : {}; let _formValues = _options.shouldUnregister ? {} : cloneObject(_defaultValues); let _state = { action: false, mount: false, watch: false }; let _names = { mount: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set() }; let delayErrorCallback; let timer = 0; const _proxyFormState = { isDirty: false, dirtyFields: false, touchedFields: false, isValidating: false, isValid: false, errors: false }; const _subjects = { values: createSubject(), array: createSubject(), state: createSubject() }; const shouldCaptureDirtyFields = props.resetOptions && props.resetOptions.keepDirtyValues; const validationModeBeforeSubmit = getValidationModes(_options.mode); const validationModeAfterSubmit = getValidationModes(_options.reValidateMode); const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all; const debounce = (callback) => (wait) => { clearTimeout(timer); timer = setTimeout(callback, wait); }; const _updateValid = async (shouldUpdateValid) => { if (_proxyFormState.isValid || shouldUpdateValid) { const isValid = _options.resolver ? isEmptyObject((await _executeSchema()).errors) : await executeBuiltInValidation(_fields, true); if (isValid !== _formState.isValid) { _subjects.state.next({ isValid }); } } }; const _updateIsValidating = (value) => _proxyFormState.isValidating && _subjects.state.next({ isValidating: value }); const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => { if (args && method) { _state.action = true; if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) { const fieldValues = method(get(_fields, name), args.argA, args.argB); shouldSetValues && set(_fields, name, fieldValues); } if (shouldUpdateFieldsAndState && Array.isArray(get(_formState.errors, name))) { const errors2 = method(get(_formState.errors, name), args.argA, args.argB); shouldSetValues && set(_formState.errors, name, errors2); unsetEmptyArray(_formState.errors, name); } if (_proxyFormState.touchedFields && shouldUpdateFieldsAndState && Array.isArray(get(_formState.touchedFields, name))) { const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB); shouldSetValues && set(_formState.touchedFields, name, touchedFields); } if (_proxyFormState.dirtyFields) { _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues); } _subjects.state.next({ name, isDirty: _getDirty(name, values), dirtyFields: _formState.dirtyFields, errors: _formState.errors, isValid: _formState.isValid }); } else { set(_formValues, name, values); } }; const updateErrors = (name, error) => { set(_formState.errors, name, error); _subjects.state.next({ errors: _formState.errors }); }; const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => { const field = get(_fields, name); if (field) { const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value); isUndefined(defaultValue) || ref && ref.defaultChecked || shouldSkipSetValueAs ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f)) : setFieldValue(name, defaultValue); _state.mount && _updateValid(); } }; const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => { let shouldUpdateField = false; let isPreviousDirty = false; const output = { name }; if (!isBlurEvent || shouldDirty) { if (_proxyFormState.isDirty) { isPreviousDirty = _formState.isDirty; _formState.isDirty = output.isDirty = _getDirty(); shouldUpdateField = isPreviousDirty !== output.isDirty; } const isCurrentFieldPristine = deepEqual$1(get(_defaultValues, name), fieldValue); isPreviousDirty = get(_formState.dirtyFields, name); isCurrentFieldPristine ? unset(_formState.dirtyFields, name) : set(_formState.dirtyFields, name, true); output.dirtyFields = _formState.dirtyFields; shouldUpdateField = shouldUpdateField || _proxyFormState.dirtyFields && isPreviousDirty !== !isCurrentFieldPristine; } if (isBlurEvent) { const isPreviousFieldTouched = get(_formState.touchedFields, name); if (!isPreviousFieldTouched) { set(_formState.touchedFields, name, isBlurEvent); output.touchedFields = _formState.touchedFields; shouldUpdateField = shouldUpdateField || _proxyFormState.touchedFields && isPreviousFieldTouched !== isBlurEvent; } } shouldUpdateField && shouldRender && _subjects.state.next(output); return shouldUpdateField ? output : {}; }; const shouldRenderByError = (name, isValid, error, fieldState) => { const previousFieldError = get(_formState.errors, name); const shouldUpdateValid = _proxyFormState.isValid && isBoolean(isValid) && _formState.isValid !== isValid; if (props.delayError && error) { delayErrorCallback = debounce(() => updateErrors(name, error)); delayErrorCallback(props.delayError); } else { clearTimeout(timer); delayErrorCallback = null; error ? set(_formState.errors, name, error) : unset(_formState.errors, name); } if ((error ? !deepEqual$1(previousFieldError, error) : previousFieldError) || !isEmptyObject(fieldState) || shouldUpdateValid) { const updatedFormState = { ...fieldState, ...shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}, errors: _formState.errors, name }; _formState = { ..._formState, ...updatedFormState }; _subjects.state.next(updatedFormState); } _updateIsValidating(false); }; const _executeSchema = async (name) => _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation)); const executeSchemaAndUpdateState = async (names) => { const { errors: errors2 } = await _executeSchema(); if (names) { for (const name of names) { const error = get(errors2, name); error ? set(_formState.errors, name, error) : unset(_formState.errors, name); } } else { _formState.errors = errors2; } return errors2; }; const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = { valid: true }) => { for (const name in fields) { const field = fields[name]; if (field) { const { _f, ...fieldValue } = field; if (_f) { const isFieldArrayRoot = _names.array.has(_f.name); const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot); if (fieldError[_f.name]) { context.valid = false; if (shouldOnlyCheckValid) { break; } } !shouldOnlyCheckValid && (get(fieldError, _f.name) ? isFieldArrayRoot ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name) : set(_formState.errors, _f.name, fieldError[_f.name]) : unset(_formState.errors, _f.name)); } fieldValue && await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context); } } return context.valid; }; const _removeUnmounted = () => { for (const name of _names.unMount) { const field = get(_fields, name); field && (field._f.refs ? field._f.refs.every((ref) => !live(ref)) : !live(field._f.ref)) && unregister(name); } _names.unMount = /* @__PURE__ */ new Set(); }; const _getDirty = (name, data) => (name && data && set(_formValues, name, data), !deepEqual$1(getValues(), _defaultValues)); const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, { ..._state.mount ? _formValues : isUndefined(defaultValue) ? _defaultValues : isString(names) ? { [names]: defaultValue } : defaultValue }, isGlobal, defaultValue); const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : [])); const setFieldValue = (name, value, options = {}) => { const field = get(_fields, name); let fieldValue = value; if (field) { const fieldReference = field._f; if (fieldReference) { !fieldReference.disabled && set(_formValues, name, getFieldValueAs(value, fieldReference)); fieldValue = isHTMLElement(fieldReference.ref) && isNullOrUndefined(value) ? "" : value; if (isMultipleSelect(fieldReference.ref)) { [...fieldReference.ref.options].forEach((optionRef) => optionRef.selected = fieldValue.includes(optionRef.value)); } else if (fieldReference.refs) { if (isCheckBoxInput(fieldReference.ref)) { fieldReference.refs.length > 1 ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) && (checkboxRef.checked = Array.isArray(fieldValue) ? !!fieldValue.find((data) => data === checkboxRef.value) : fieldValue === checkboxRef.value)) : fieldReference.refs[0] && (fieldReference.refs[0].checked = !!fieldValue); } else { fieldReference.refs.forEach((radioRef) => radioRef.checked = radioRef.value === fieldValue); } } else if (isFileInput(fieldReference.ref)) { fieldReference.ref.value = ""; } else { fieldReference.ref.value = fieldValue; if (!fieldReference.ref.type) { _subjects.values.next({ name, values: { ..._formValues } }); } } } } (options.shouldDirty || options.shouldTouch) && updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true); options.shouldValidate && trigger(name); }; const setValues = (name, value, options) => { for (const fieldKey in value) { const fieldValue = value[fieldKey]; const fieldName = `${name}.${fieldKey}`; const field = get(_fields, fieldName); (_names.array.has(name) || !isPrimitive(fieldValue) || field && !field._f) && !isDateObject(fieldValue) ? setValues(fieldName, fieldValue, options) : setFieldValue(fieldName, fieldValue, options); } }; const setValue = (name, value, options = {}) => { const field = get(_fields, name); const isFieldArray = _names.array.has(name); const cloneValue = cloneObject(value); set(_formValues, name, cloneValue); if (isFieldArray) { _subjects.array.next({ name, values: { ..._formValues } }); if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) && options.shouldDirty) { _subjects.state.next({ name, dirtyFields: getDirtyFields(_defaultValues, _formValues), isDirty: _getDirty(name, cloneValue) }); } } else { field && !field._f && !isNullOrUndefined(cloneValue) ? setValues(name, cloneValue, options) : setFieldValue(name, cloneValue, options); } isWatched(name, _names) && _subjects.state.next({ ..._formState }); _subjects.values.next({ name, values: { ..._formValues } }); !_state.mount && flushRootRender(); }; const onChange = async (event) => { const target2 = event.target; let name = target2.name; let isFieldValueUpdated = true; const field = get(_fields, name); const getCurrentFieldValue = () => target2.type ? getFieldValue(field._f) : getEventValue(event); if (field) { let error; let isValid; const fieldValue = getCurrentFieldValue(); const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT; const shouldSkipValidation = !hasValidation(field._f) && !_options.resolver && !get(_formState.errors, name) && !field._f.deps || skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit); const watched = isWatched(name, _names, isBlurEvent); set(_formValues, name, fieldValue); if (isBlurEvent) { field._f.onBlur && field._f.onBlur(event); delayErrorCallback && delayErrorCallback(0); } else if (field._f.onChange) { field._f.onChange(event); } const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false); const shouldRender = !isEmptyObject(fieldState) || watched; !isBlurEvent && _subjects.values.next({ name, type: event.type, values: { ..._formValues } }); if (shouldSkipValidation) { _proxyFormState.isValid && _updateValid(); return shouldRender && _subjects.state.next({ name, ...watched ? {} : fieldState }); } !isBlurEvent && watched && _subjects.state.next({ ..._formState }); _updateIsValidating(true); if (_options.resolver) { const { errors: errors2 } = await _executeSchema([name]); const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name); const errorLookupResult = schemaErrorLookup(errors2, _fields, previousErrorLookupResult.name || name); error = errorLookupResult.error; name = errorLookupResult.name; isValid = isEmptyObject(errors2); } else { error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name]; isFieldValueUpdated = isNaN(fieldValue) || fieldValue === get(_formValues, name, fieldValue); if (isFieldValueUpdated) { if (error) { isValid = false; } else if (_proxyFormState.isValid) { isValid = await executeBuiltInValidation(_fields, true); } } } if (isFieldValueUpdated) { field._f.deps && trigger(field._f.deps); shouldRenderByError(name, isValid, error, fieldState); } } }; const trigger = async (name, options = {}) => { let isValid; let validationResult; const fieldNames = convertToArrayPayload(name); _updateIsValidating(true); if (_options.resolver) { const errors2 = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames); isValid = isEmptyObject(errors2); validationResult = name ? !fieldNames.some((name2) => get(errors2, name2)) : isValid; } else if (name) { validationResult = (await Promise.all(fieldNames.map(async (fieldName) => { const field = get(_fields, fieldName); return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field); }))).every(Boolean); !(!validationResult && !_formState.isValid) && _updateValid(); } else { validationResult = isValid = await executeBuiltInValidation(_fields); } _subjects.state.next({ ...!isString(name) || _proxyFormState.isValid && isValid !== _formState.isValid ? {} : { name }, ..._options.resolver || !name ? { isValid } : {}, errors: _formState.errors, isValidating: false }); options.shouldFocus && !validationResult && focusFieldBy(_fields, (key) => key && get(_formState.errors, key), name ? fieldNames : _names.mount); return validationResult; }; const getValues = (fieldNames) => { const values = { ..._defaultValues, ..._state.mount ? _formValues : {} }; return isUndefined(fieldNames) ? values : isString(fieldNames) ? get(values, fieldNames) : fieldNames.map((name) => get(values, name)); }; const getFieldState = (name, formState) => ({ invalid: !!get((formState || _formState).errors, name), isDirty: !!get((formState || _formState).dirtyFields, name), isTouched: !!get((formState || _formState).touchedFields, name), error: get((formState || _formState).errors, name) }); const clearErrors = (name) => { name && convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName)); _subjects.state.next({ errors: name ? _formState.errors : {} }); }; const setError = (name, error, options) => { const ref = (get(_fields, name, { _f: {} })._f || {}).ref; set(_formState.errors, name, { ...error, ref }); _subjects.state.next({ name, errors: _formState.errors, isValid: false }); options && options.shouldFocus && ref && ref.focus && ref.focus(); }; const watch = (name, defaultValue) => isFunction$1(name) ? _subjects.values.subscribe({ next: (payload) => name(_getWatch(void 0, defaultValue), payload) }) : _getWatch(name, defaultValue, true); const unregister = (name, options = {}) => { for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) { _names.mount.delete(fieldName); _names.array.delete(fieldName); if (!options.keepValue) { unset(_fields, fieldName); unset(_formValues, fieldName); } !options.keepError && unset(_formState.errors, fieldName); !options.keepDirty && unset(_formState.dirtyFields, fieldName); !options.keepTouched && unset(_formState.touchedFields, fieldName); !_options.shouldUnregister && !options.keepDefaultValue && unset(_defaultValues, fieldName); } _subjects.values.next({ values: { ..._formValues } }); _subjects.state.next({ ..._formState, ...!options.keepDirty ? {} : { isDirty: _getDirty() } }); !options.keepIsValid && _updateValid(); }; const register = (name, options = {}) => { let field = get(_fields, name); const disabledIsDefined = isBoolean(options.disabled); set(_fields, name, { ...field || {}, _f: { ...field && field._f ? field._f : { ref: { name } }, name, mount: true, ...options } }); _names.mount.add(name); field ? disabledIsDefined && set(_formValues, name, options.disabled ? void 0 : get(_formValues, name, getFieldValue(field._f))) : updateValidAndValue(name, true, options.value); return { ...disabledIsDefined ? { disabled: options.disabled } : {}, ..._options.shouldUseNativeValidation ? { required: !!options.required, min: getRuleValue(options.min), max: getRuleValue(options.max), minLength: getRuleValue(options.minLength), maxLength: getRuleValue(options.maxLength), pattern: getRuleValue(options.pattern) } : {}, name, onChange, onBlur: onChange, ref: (ref) => { if (ref) { register(name, options); field = get(_fields, name); const fieldRef = isUndefined(ref.value) ? ref.querySelectorAll ? ref.querySelectorAll("input,select,textarea")[0] || ref : ref : ref; const radioOrCheckbox = isRadioOrCheckbox(fieldRef); const refs = field._f.refs || []; if (radioOrCheckbox ? refs.find((option) => option === fieldRef) : fieldRef === field._f.ref) { return; } set(_fields, name, { _f: { ...field._f, ...radioOrCheckbox ? { refs: [ ...refs.filter(live), fieldRef, ...Array.isArray(get(_defaultValues, name)) ? [{}] : [] ], ref: { type: fieldRef.type, name } } : { ref: fieldRef } } }); updateValidAndValue(name, false, void 0, fieldRef); } else { field = get(_fields, name, {}); if (field._f) { field._f.mount = false; } (_options.shouldUnregister || options.shouldUnregister) && !(isNameInFieldArray(_names.array, name) && _state.action) && _names.unMount.add(name); } } }; }; const _focusError = () => _options.shouldFocusError && focusFieldBy(_fields, (key) => key && get(_formState.errors, key), _names.mount); const handleSubmit = (onValid, onInvalid) => async (e) => { if (e) { e.preventDefault && e.preventDefault(); e.persist && e.persist(); } let fieldValues = cloneObject(_formValues); _subjects.state.next({ isSubmitting: true }); if (_options.resolver) { const { errors: errors2, values } = await _executeSchema(); _formState.errors = errors2; fieldValues = values; } else { await executeBuiltInValidation(_fields); } unset(_formState.errors, "root"); if (isEmptyObject(_formState.errors)) { _subjects.state.next({ errors: {} }); await onValid(fieldValues, e); } else { if (onInvalid) { await onInvalid({ ..._formState.errors }, e); } _focusError(); setTimeout(_focusError); } _subjects.state.next({ isSubmitted: true, isSubmitting: false, isSubmitSuccessful: isEmptyObject(_formState.errors), submitCount: _formState.submitCount + 1, errors: _formState.errors }); }; const resetField = (name, options = {}) => { if (get(_fields, name)) { if (isUndefined(options.defaultValue)) { setValue(name, get(_defaultValues, name)); } else { setValue(name, options.defaultValue); set(_defaultValues, name, options.defaultValue); } if (!options.keepTouched) { unset(_formState.touchedFields, name); } if (!options.keepDirty) { unset(_formState.dirtyFields, name); _formState.isDirty = options.defaultValue ? _getDirty(name, get(_defaultValues, name)) : _getDirty(); } if (!options.keepError) { unset(_formState.errors, name); _proxyFormState.isValid && _updateValid(); } _subjects.state.next({ ..._formState }); } }; const _reset = (formValues, keepStateOptions = {}) => { const updatedValues = formValues || _defaultValues; const cloneUpdatedValues = cloneObject(updatedValues); const values = formValues && !isEmptyObject(formValues) ? cloneUpdatedValues : _defaultValues; if (!keepStateOptions.keepDefaultValues) { _defaultValues = updatedValues; } if (!keepStateOptions.keepValues) { if (keepStateOptions.keepDirtyValues || shouldCaptureDirtyFields) { for (const fieldName of _names.mount) { get(_formState.dirtyFields, fieldName) ? set(values, fieldName, get(_formValues, fieldName)) : setValue(fieldName, get(values, fieldName)); } } else { if (isWeb && isUndefined(formValues)) { for (const name of _names.mount) { const field = get(_fields, name); if (field && field._f) { const fieldReference = Array.isArray(field._f.refs) ? field._f.refs[0] : field._f.ref; if (isHTMLElement(fieldReference)) { const form = fieldReference.closest("form"); if (form) { form.reset(); break; } } } } } _fields = {}; } _formValues = props.shouldUnregister ? keepStateOptions.keepDefaultValues ? cloneObject(_defaultValues) : {} : cloneUpdatedValues; _subjects.array.next({ values: { ...values } }); _subjects.values.next({ values: { ...values } }); } _names = { mount: /* @__PURE__ */ new Set(), unMount: /* @__PURE__ */ new Set(), array: /* @__PURE__ */ new Set(), watch: /* @__PURE__ */ new Set(), watchAll: false, focus: "" }; !_state.mount && flushRootRender(); _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid; _state.watch = !!props.shouldUnregister; _subjects.state.next({ submitCount: keepStateOptions.keepSubmitCount ? _formState.submitCount : 0, isDirty: keepStateOptions.keepDirty ? _formState.isDirty : !!(keepStateOptions.keepDefaultValues && !deepEqual$1(formValues, _defaultValues)), isSubmitted: keepStateOptions.keepIsSubmitted ? _formState.isSubmitted : false, dirtyFields: keepStateOptions.keepDirtyValues ? _formState.dirtyFields : keepStateOptions.keepDefaultValues && formValues ? getDirtyFields(_defaultValues, formValues) : {}, touchedFields: keepStateOptions.keepTouched ? _formState.touchedFields : {}, errors: keepStateOptions.keepErrors ? _formState.errors : {}, isSubmitting: false, isSubmitSuccessful: false }); }; const reset = (formValues, keepStateOptions) => _reset(isFunction$1(formValues) ? formValues(_formValues) : formValues, keepStateOptions); const setFocus = (name, options = {}) => { const field = get(_fields, name); const fieldReference = field && field._f; if (fieldReference) { const fieldRef = fieldReference.refs ? fieldReference.refs[0] : fieldReference.ref; if (fieldRef.focus) { fieldRef.focus(); options.shouldSelect && fieldRef.select(); } } }; const _updateFormState = (updatedFormState) => { _formState = { ..._formState, ...updatedFormState }; }; if (isFunction$1(_options.defaultValues)) { _options.defaultValues().then((values) => { reset(values, _options.resetOptions); _subjects.state.next({ isLoading: false }); }); } return { control: { register, unregister, getFieldState, _executeSchema, _getWatch, _getDirty, _updateValid, _removeUnmounted, _updateFieldArray, _getFieldArray, _reset, _updateFormState, _subjects, _proxyFormState, get _fields() { return _fields; }, get _formValues() { return _formValues; }, get _state() { return _state; }, set _state(value) { _state = value; }, get _defaultValues() { return _defaultValues; }, get _names() { return _names; }, set _names(value) { _names = value; }, get _formState() { return _formState; }, set _formState(value) { _formState = value; }, get _options() { return _options; }, set _options(value) { _options = { ..._options, ...value }; } }, trigger, register, handleSubmit, watch, setValue, getValues, reset, resetField, clearErrors, unregister, setError, setFocus, getFieldState }; } function useForm(props = {}) { const _formControl = React.useRef(); const [formState, updateFormState] = React.useState({ isDirty: false, isValidating: false, isLoading: isFunction$1(props.defaultValues), isSubmitted: false, isSubmitting: false, isSubmitSuccessful: false, isValid: false, submitCount: 0, dirtyFields: {}, touchedFields: {}, errors: {}, defaultValues: isFunction$1(props.defaultValues) ? void 0 : props.defaultValues }); if (!_formControl.current) { _formControl.current = { ...createFormControl(props, () => updateFormState((formState2) => ({ ...formState2 }))), formState }; } const control = _formControl.current.control; control._options = props; useSubscribe({ subject: control._subjects.state, next: (value) => { if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) { updateFormState({ ...control._formState }); } } }); React.useEffect(() => { if (props.values && !deepEqual$1(props.values, control._defaultValues)) { control._reset(props.values, control._options.resetOptions); } }, [props.values, control]); React.useEffect(() => { if (!control._state.mount) { control._updateValid(); control._state.mount = true; } if (control._state.watch) { control._state.watch = false; control._subjects.state.next({ ...control._formState }); } control._removeUnmounted(); }); _formControl.current.formState = getProxyFormState(formState, control); return _formControl.current; } var showdown = { exports: {} }; (function(module) { (function() { function getDefaultOpts(simple) { var defaultOptions2 = { omitExtraWLInCodeBlocks: { defaultValue: false, describe: "Omit the default extra whiteline added to code blocks", type: "boolean" }, noHeaderId: { defaultValue: false, describe: "Turn on/off generated header id", type: "boolean" }, prefixHeaderId: { defaultValue: false, describe: "Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix", type: "string" }, rawPrefixHeaderId: { defaultValue: false, describe: 'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)', type: "boolean" }, ghCompatibleHeaderId: { defaultValue: false, describe: "Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)", type: "boolean" }, rawHeaderId: { defaultValue: false, describe: `Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`, type: "boolean" }, headerLevelStart: { defaultValue: false, describe: "The header blocks level start", type: "integer" }, parseImgDimensions: { defaultValue: false, describe: "Turn on/off image dimension parsing", type: "boolean" }, simplifiedAutoLink: { defaultValue: false, describe: "Turn on/off GFM autolink style", type: "boolean" }, excludeTrailingPunctuationFromURLs: { defaultValue: false, describe: "Excludes trailing punctuation from links generated with autoLinking", type: "boolean" }, literalMidWordUnderscores: { defaultValue: false, describe: "Parse midword underscores as literal underscores", type: "boolean" }, literalMidWordAsterisks: { defaultValue: false, describe: "Parse midword asterisks as literal asterisks", type: "boolean" }, strikethrough: { defaultValue: false, describe: "Turn on/off strikethrough support", type: "boolean" }, tables: { defaultValue: false, describe: "Turn on/off tables support", type: "boolean" }, tablesHeaderId: { defaultValue: false, describe: "Add an id to table headers", type: "boolean" }, ghCodeBlocks: { defaultValue: true, describe: "Turn on/off GFM fenced code blocks support", type: "boolean" }, tasklists: { defaultValue: false, describe: "Turn on/off GFM tasklist support", type: "boolean" }, smoothLivePreview: { defaultValue: false, describe: "Prevents weird effects in live previews due to incomplete input", type: "boolean" }, smartIndentationFix: { defaultValue: false, description: "Tries to smartly fix indentation in es6 strings", type: "boolean" }, disableForced4SpacesIndentedSublists: { defaultValue: false, description: "Disables the requirement of indenting nested sublists by 4 spaces", type: "boolean" }, simpleLineBreaks: { defaultValue: false, description: "Parses simple line breaks as
(GFM Style)", type: "boolean" }, requireSpaceBeforeHeadingText: { defaultValue: false, description: "Makes adding a space between `#` and the header text mandatory (GFM Style)", type: "boolean" }, ghMentions: { defaultValue: false, description: "Enables github @mentions", type: "boolean" }, ghMentionsLink: { defaultValue: "https://github.com/{u}", description: "Changes the link generated by @mentions. Only applies if ghMentions option is enabled.", type: "string" }, encodeEmails: { defaultValue: true, description: "Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities", type: "boolean" }, openLinksInNewWindow: { defaultValue: false, description: "Open all links in new windows", type: "boolean" }, backslashEscapesHTMLTags: { defaultValue: false, description: "Support for HTML Tag escaping. ex:
foo
", type: "boolean" }, emoji: { defaultValue: false, description: "Enable emoji support. Ex: `this is a :smile: emoji`", type: "boolean" }, underline: { defaultValue: false, description: "Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``", type: "boolean" }, completeHTMLDocument: { defaultValue: false, description: "Outputs a complete html document, including ``, `` and `` tags", type: "boolean" }, metadata: { defaultValue: false, description: "Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).", type: "boolean" }, splitAdjacentBlockquotes: { defaultValue: false, description: "Split adjacent blockquote blocks", type: "boolean" } }; if (simple === false) { return JSON.parse(JSON.stringify(defaultOptions2)); } var ret = {}; for (var opt in defaultOptions2) { if (defaultOptions2.hasOwnProperty(opt)) { ret[opt] = defaultOptions2[opt].defaultValue; } } return ret; } function allOptionsOn() { var options = getDefaultOpts(true), ret = {}; for (var opt in options) { if (options.hasOwnProperty(opt)) { ret[opt] = true; } } return ret; } var showdown2 = {}, parsers = {}, extensions = {}, globalOptions = getDefaultOpts(true), setFlavor = "vanilla", flavor = { github: { omitExtraWLInCodeBlocks: true, simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true, literalMidWordUnderscores: true, strikethrough: true, tables: true, tablesHeaderId: true, ghCodeBlocks: true, tasklists: true, disableForced4SpacesIndentedSublists: true, simpleLineBreaks: true, requireSpaceBeforeHeadingText: true, ghCompatibleHeaderId: true, ghMentions: true, backslashEscapesHTMLTags: true, emoji: true, splitAdjacentBlockquotes: true }, original: { noHeaderId: true, ghCodeBlocks: false }, ghost: { omitExtraWLInCodeBlocks: true, parseImgDimensions: true, simplifiedAutoLink: true, excludeTrailingPunctuationFromURLs: true, literalMidWordUnderscores: true, strikethrough: true, tables: true, tablesHeaderId: true, ghCodeBlocks: true, tasklists: true, smoothLivePreview: true, simpleLineBreaks: true, requireSpaceBeforeHeadingText: true, ghMentions: false, encodeEmails: true }, vanilla: getDefaultOpts(true), allOn: allOptionsOn() }; showdown2.helper = {}; showdown2.extensions = {}; showdown2.setOption = function(key, value) { globalOptions[key] = value; return this; }; showdown2.getOption = function(key) { return globalOptions[key]; }; showdown2.getOptions = function() { return globalOptions; }; showdown2.resetOptions = function() { globalOptions = getDefaultOpts(true); }; showdown2.setFlavor = function(name) { if (!flavor.hasOwnProperty(name)) { throw Error(name + " flavor was not found"); } showdown2.resetOptions(); var preset = flavor[name]; setFlavor = name; for (var option in preset) { if (preset.hasOwnProperty(option)) { globalOptions[option] = preset[option]; } } }; showdown2.getFlavor = function() { return setFlavor; }; showdown2.getFlavorOptions = function(name) { if (flavor.hasOwnProperty(name)) { return flavor[name]; } }; showdown2.getDefaultOptions = function(simple) { return getDefaultOpts(simple); }; showdown2.subParser = function(name, func) { if (showdown2.helper.isString(name)) { if (typeof func !== "undefined") { parsers[name] = func; } else { if (parsers.hasOwnProperty(name)) { return parsers[name]; } else { throw Error("SubParser named " + name + " not registered!"); } } } }; showdown2.extension = function(name, ext) { if (!showdown2.helper.isString(name)) { throw Error("Extension 'name' must be a string"); } name = showdown2.helper.stdExtName(name); if (showdown2.helper.isUndefined(ext)) { if (!extensions.hasOwnProperty(name)) { throw Error("Extension named " + name + " is not registered!"); } return extensions[name]; } else { if (typeof ext === "function") { ext = ext(); } if (!showdown2.helper.isArray(ext)) { ext = [ext]; } var validExtension = validate(ext, name); if (validExtension.valid) { extensions[name] = ext; } else { throw Error(validExtension.error); } } }; showdown2.getAllExtensions = function() { return extensions; }; showdown2.removeExtension = function(name) { delete extensions[name]; }; showdown2.resetExtensions = function() { extensions = {}; }; function validate(extension, name) { var errMsg = name ? "Error in " + name + " extension->" : "Error in unnamed extension", ret = { valid: true, error: "" }; if (!showdown2.helper.isArray(extension)) { extension = [extension]; } for (var i2 = 0; i2 < extension.length; ++i2) { var baseMsg = errMsg + " sub-extension " + i2 + ": ", ext = extension[i2]; if (typeof ext !== "object") { ret.valid = false; ret.error = baseMsg + "must be an object, but " + typeof ext + " given"; return ret; } if (!showdown2.helper.isString(ext.type)) { ret.valid = false; ret.error = baseMsg + 'property "type" must be a string, but ' + typeof ext.type + " given"; return ret; } var type = ext.type = ext.type.toLowerCase(); if (type === "language") { type = ext.type = "lang"; } if (type === "html") { type = ext.type = "output"; } if (type !== "lang" && type !== "output" && type !== "listener") { ret.valid = false; ret.error = baseMsg + "type " + type + ' is not recognized. Valid values: "lang/language", "output/html" or "listener"'; return ret; } if (type === "listener") { if (showdown2.helper.isUndefined(ext.listeners)) { ret.valid = false; ret.error = baseMsg + '. Extensions of type "listener" must have a property called "listeners"'; return ret; } } else { if (showdown2.helper.isUndefined(ext.filter) && showdown2.helper.isUndefined(ext.regex)) { ret.valid = false; ret.error = baseMsg + type + ' extensions must define either a "regex" property or a "filter" method'; return ret; } } if (ext.listeners) { if (typeof ext.listeners !== "object") { ret.valid = false; ret.error = baseMsg + '"listeners" property must be an object but ' + typeof ext.listeners + " given"; return ret; } for (var ln in ext.listeners) { if (ext.listeners.hasOwnProperty(ln)) { if (typeof ext.listeners[ln] !== "function") { ret.valid = false; ret.error = baseMsg + '"listeners" property must be an hash of [event name]: [callback]. listeners.' + ln + " must be a function but " + typeof ext.listeners[ln] + " given"; return ret; } } } } if (ext.filter) { if (typeof ext.filter !== "function") { ret.valid = false; ret.error = baseMsg + '"filter" must be a function, but ' + typeof ext.filter + " given"; return ret; } } else if (ext.regex) { if (showdown2.helper.isString(ext.regex)) { ext.regex = new RegExp(ext.regex, "g"); } if (!(ext.regex instanceof RegExp)) { ret.valid = false; ret.error = baseMsg + '"regex" property must either be a string or a RegExp object, but ' + typeof ext.regex + " given"; return ret; } if (showdown2.helper.isUndefined(ext.replace)) { ret.valid = false; ret.error = baseMsg + '"regex" extensions must implement a replace string or function'; return ret; } } } return ret; } showdown2.validateExtension = function(ext) { var validateExtension = validate(ext, null); if (!validateExtension.valid) { console.warn(validateExtension.error); return false; } return true; }; if (!showdown2.hasOwnProperty("helper")) { showdown2.helper = {}; } showdown2.helper.isString = function(a) { return typeof a === "string" || a instanceof String; }; showdown2.helper.isFunction = function(a) { var getType = {}; return a && getType.toString.call(a) === "[object Function]"; }; showdown2.helper.isArray = function(a) { return Array.isArray(a); }; showdown2.helper.isUndefined = function(value) { return typeof value === "undefined"; }; showdown2.helper.forEach = function(obj, callback) { if (showdown2.helper.isUndefined(obj)) { throw new Error("obj param is required"); } if (showdown2.helper.isUndefined(callback)) { throw new Error("callback param is required"); } if (!showdown2.helper.isFunction(callback)) { throw new Error("callback param must be a function/closure"); } if (typeof obj.forEach === "function") { obj.forEach(callback); } else if (showdown2.helper.isArray(obj)) { for (var i2 = 0; i2 < obj.length; i2++) { callback(obj[i2], i2, obj); } } else if (typeof obj === "object") { for (var prop2 in obj) { if (obj.hasOwnProperty(prop2)) { callback(obj[prop2], prop2, obj); } } } else { throw new Error("obj does not seem to be an array or an iterable object"); } }; showdown2.helper.stdExtName = function(s) { return s.replace(/[_?*+\/\\.^-]/g, "").replace(/\s/g, "").toLowerCase(); }; function escapeCharactersCallback(wholeMatch, m1) { var charCodeToEscape = m1.charCodeAt(0); return "¨E" + charCodeToEscape + "E"; } showdown2.helper.escapeCharactersCallback = escapeCharactersCallback; showdown2.helper.escapeCharacters = function(text, charsToEscape, afterBackslash) { var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g, "\\$1") + "])"; if (afterBackslash) { regexString = "\\\\" + regexString; } var regex = new RegExp(regexString, "g"); text = text.replace(regex, escapeCharactersCallback); return text; }; showdown2.helper.unescapeHTMLEntities = function(txt) { return txt.replace(/"/g, '"').replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); }; var rgxFindMatchPos = function(str, left, right, flags) { var f = flags || "", g = f.indexOf("g") > -1, x = new RegExp(left + "|" + right, "g" + f.replace(/g/g, "")), l = new RegExp(left, f.replace(/g/g, "")), pos = [], t, s, m2, start, end; do { t = 0; while (m2 = x.exec(str)) { if (l.test(m2[0])) { if (!t++) { s = x.lastIndex; start = s - m2[0].length; } } else if (t) { if (!--t) { end = m2.index + m2[0].length; var obj = { left: { start, end: s }, match: { start: s, end: m2.index }, right: { start: m2.index, end }, wholeMatch: { start, end } }; pos.push(obj); if (!g) { return pos; } } } } } while (t && (x.lastIndex = s)); return pos; }; showdown2.helper.matchRecursiveRegExp = function(str, left, right, flags) { var matchPos = rgxFindMatchPos(str, left, right, flags), results = []; for (var i2 = 0; i2 < matchPos.length; ++i2) { results.push([ str.slice(matchPos[i2].wholeMatch.start, matchPos[i2].wholeMatch.end), str.slice(matchPos[i2].match.start, matchPos[i2].match.end), str.slice(matchPos[i2].left.start, matchPos[i2].left.end), str.slice(matchPos[i2].right.start, matchPos[i2].right.end) ]); } return results; }; showdown2.helper.replaceRecursiveRegExp = function(str, replacement, left, right, flags) { if (!showdown2.helper.isFunction(replacement)) { var repStr = replacement; replacement = function() { return repStr; }; } var matchPos = rgxFindMatchPos(str, left, right, flags), finalStr = str, lng = matchPos.length; if (lng > 0) { var bits = []; if (matchPos[0].wholeMatch.start !== 0) { bits.push(str.slice(0, matchPos[0].wholeMatch.start)); } for (var i2 = 0; i2 < lng; ++i2) { bits.push( replacement( str.slice(matchPos[i2].wholeMatch.start, matchPos[i2].wholeMatch.end), str.slice(matchPos[i2].match.start, matchPos[i2].match.end), str.slice(matchPos[i2].left.start, matchPos[i2].left.end), str.slice(matchPos[i2].right.start, matchPos[i2].right.end) ) ); if (i2 < lng - 1) { bits.push(str.slice(matchPos[i2].wholeMatch.end, matchPos[i2 + 1].wholeMatch.start)); } } if (matchPos[lng - 1].wholeMatch.end < str.length) { bits.push(str.slice(matchPos[lng - 1].wholeMatch.end)); } finalStr = bits.join(""); } return finalStr; }; showdown2.helper.regexIndexOf = function(str, regex, fromIndex) { if (!showdown2.helper.isString(str)) { throw "InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string"; } if (regex instanceof RegExp === false) { throw "InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp"; } var indexOf = str.substring(fromIndex || 0).search(regex); return indexOf >= 0 ? indexOf + (fromIndex || 0) : indexOf; }; showdown2.helper.splitAtIndex = function(str, index2) { if (!showdown2.helper.isString(str)) { throw "InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string"; } return [str.substring(0, index2), str.substring(index2)]; }; showdown2.helper.encodeEmailAddress = function(mail) { var encode2 = [ function(ch) { return "&#" + ch.charCodeAt(0) + ";"; }, function(ch) { return "&#x" + ch.charCodeAt(0).toString(16) + ";"; }, function(ch) { return ch; } ]; mail = mail.replace(/./g, function(ch) { if (ch === "@") { ch = encode2[Math.floor(Math.random() * 2)](ch); } else { var r = Math.random(); ch = r > 0.9 ? encode2[2](ch) : r > 0.45 ? encode2[1](ch) : encode2[0](ch); } return ch; }); return mail; }; showdown2.helper.padEnd = function padEnd(str, targetLength, padString) { targetLength = targetLength >> 0; padString = String(padString || " "); if (str.length > targetLength) { return String(str); } else { targetLength = targetLength - str.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); } return String(str) + padString.slice(0, targetLength); } }; if (typeof console === "undefined") { console = { warn: function(msg) { alert(msg); }, log: function(msg) { alert(msg); }, error: function(msg) { throw msg; } }; } showdown2.helper.regexes = { asteriskDashAndColon: /([*_:~])/g }; showdown2.helper.emojis = { "+1": "👍", "-1": "👎", "100": "💯", "1234": "🔢", "1st_place_medal": "🥇", "2nd_place_medal": "🥈", "3rd_place_medal": "🥉", "8ball": "🎱", "a": "🅰️", "ab": "🆎", "abc": "🔤", "abcd": "🔡", "accept": "🉑", "aerial_tramway": "🚡", "airplane": "✈️", "alarm_clock": "⏰", "alembic": "⚗️", "alien": "👽", "ambulance": "🚑", "amphora": "🏺", "anchor": "⚓️", "angel": "👼", "anger": "💢", "angry": "😠", "anguished": "😧", "ant": "🐜", "apple": "🍎", "aquarius": "♒️", "aries": "♈️", "arrow_backward": "◀️", "arrow_double_down": "⏬", "arrow_double_up": "⏫", "arrow_down": "⬇️", "arrow_down_small": "🔽", "arrow_forward": "▶️", "arrow_heading_down": "⤵️", "arrow_heading_up": "⤴️", "arrow_left": "⬅️", "arrow_lower_left": "↙️", "arrow_lower_right": "↘️", "arrow_right": "➡️", "arrow_right_hook": "↪️", "arrow_up": "⬆️", "arrow_up_down": "↕️", "arrow_up_small": "🔼", "arrow_upper_left": "↖️", "arrow_upper_right": "↗️", "arrows_clockwise": "🔃", "arrows_counterclockwise": "🔄", "art": "🎨", "articulated_lorry": "🚛", "artificial_satellite": "🛰", "astonished": "😲", "athletic_shoe": "👟", "atm": "🏧", "atom_symbol": "⚛️", "avocado": "🥑", "b": "🅱️", "baby": "👶", "baby_bottle": "🍼", "baby_chick": "🐤", "baby_symbol": "🚼", "back": "🔙", "bacon": "🥓", "badminton": "🏸", "baggage_claim": "🛄", "baguette_bread": "🥖", "balance_scale": "⚖️", "balloon": "🎈", "ballot_box": "🗳", "ballot_box_with_check": "☑️", "bamboo": "🎍", "banana": "🍌", "bangbang": "‼️", "bank": "🏦", "bar_chart": "📊", "barber": "💈", "baseball": "⚾️", "basketball": "🏀", "basketball_man": "⛹️", "basketball_woman": "⛹️‍♀️", "bat": "🦇", "bath": "🛀", "bathtub": "🛁", "battery": "🔋", "beach_umbrella": "🏖", "bear": "🐻", "bed": "🛏", "bee": "🐝", "beer": "🍺", "beers": "🍻", "beetle": "🐞", "beginner": "🔰", "bell": "🔔", "bellhop_bell": "🛎", "bento": "🍱", "biking_man": "🚴", "bike": "🚲", "biking_woman": "🚴‍♀️", "bikini": "👙", "biohazard": "☣️", "bird": "🐦", "birthday": "🎂", "black_circle": "⚫️", "black_flag": "🏴", "black_heart": "🖤", "black_joker": "🃏", "black_large_square": "⬛️", "black_medium_small_square": "◾️", "black_medium_square": "◼️", "black_nib": "✒️", "black_small_square": "▪️", "black_square_button": "🔲", "blonde_man": "👱", "blonde_woman": "👱‍♀️", "blossom": "🌼", "blowfish": "🐡", "blue_book": "📘", "blue_car": "🚙", "blue_heart": "💙", "blush": "😊", "boar": "🐗", "boat": "⛵️", "bomb": "💣", "book": "📖", "bookmark": "🔖", "bookmark_tabs": "📑", "books": "📚", "boom": "💥", "boot": "👢", "bouquet": "💐", "bowing_man": "🙇", "bow_and_arrow": "🏹", "bowing_woman": "🙇‍♀️", "bowling": "🎳", "boxing_glove": "🥊", "boy": "👦", "bread": "🍞", "bride_with_veil": "👰", "bridge_at_night": "🌉", "briefcase": "💼", "broken_heart": "💔", "bug": "🐛", "building_construction": "🏗", "bulb": "💡", "bullettrain_front": "🚅", "bullettrain_side": "🚄", "burrito": "🌯", "bus": "🚌", "business_suit_levitating": "🕴", "busstop": "🚏", "bust_in_silhouette": "👤", "busts_in_silhouette": "👥", "butterfly": "🦋", "cactus": "🌵", "cake": "🍰", "calendar": "📆", "call_me_hand": "🤙", "calling": "📲", "camel": "🐫", "camera": "📷", "camera_flash": "📸", "camping": "🏕", "cancer": "♋️", "candle": "🕯", "candy": "🍬", "canoe": "🛶", "capital_abcd": "🔠", "capricorn": "♑️", "car": "🚗", "card_file_box": "🗃", "card_index": "📇", "card_index_dividers": "🗂", "carousel_horse": "🎠", "carrot": "🥕", "cat": "🐱", "cat2": "🐈", "cd": "💿", "chains": "⛓", "champagne": "🍾", "chart": "💹", "chart_with_downwards_trend": "📉", "chart_with_upwards_trend": "📈", "checkered_flag": "🏁", "cheese": "🧀", "cherries": "🍒", "cherry_blossom": "🌸", "chestnut": "🌰", "chicken": "🐔", "children_crossing": "🚸", "chipmunk": "🐿", "chocolate_bar": "🍫", "christmas_tree": "🎄", "church": "⛪️", "cinema": "🎦", "circus_tent": "🎪", "city_sunrise": "🌇", "city_sunset": "🌆", "cityscape": "🏙", "cl": "🆑", "clamp": "🗜", "clap": "👏", "clapper": "🎬", "classical_building": "🏛", "clinking_glasses": "🥂", "clipboard": "📋", "clock1": "🕐", "clock10": "🕙", "clock1030": "🕥", "clock11": "🕚", "clock1130": "🕦", "clock12": "🕛", "clock1230": "🕧", "clock130": "🕜", "clock2": "🕑", "clock230": "🕝", "clock3": "🕒", "clock330": "🕞", "clock4": "🕓", "clock430": "🕟", "clock5": "🕔", "clock530": "🕠", "clock6": "🕕", "clock630": "🕡", "clock7": "🕖", "clock730": "🕢", "clock8": "🕗", "clock830": "🕣", "clock9": "🕘", "clock930": "🕤", "closed_book": "📕", "closed_lock_with_key": "🔐", "closed_umbrella": "🌂", "cloud": "☁️", "cloud_with_lightning": "🌩", "cloud_with_lightning_and_rain": "⛈", "cloud_with_rain": "🌧", "cloud_with_snow": "🌨", "clown_face": "🤡", "clubs": "♣️", "cocktail": "🍸", "coffee": "☕️", "coffin": "⚰️", "cold_sweat": "😰", "comet": "☄️", "computer": "💻", "computer_mouse": "🖱", "confetti_ball": "🎊", "confounded": "😖", "confused": "😕", "congratulations": "㊗️", "construction": "🚧", "construction_worker_man": "👷", "construction_worker_woman": "👷‍♀️", "control_knobs": "🎛", "convenience_store": "🏪", "cookie": "🍪", "cool": "🆒", "policeman": "👮", "copyright": "©️", "corn": "🌽", "couch_and_lamp": "🛋", "couple": "👫", "couple_with_heart_woman_man": "💑", "couple_with_heart_man_man": "👨‍❤️‍👨", "couple_with_heart_woman_woman": "👩‍❤️‍👩", "couplekiss_man_man": "👨‍❤️‍💋‍👨", "couplekiss_man_woman": "💏", "couplekiss_woman_woman": "👩‍❤️‍💋‍👩", "cow": "🐮", "cow2": "🐄", "cowboy_hat_face": "🤠", "crab": "🦀", "crayon": "🖍", "credit_card": "💳", "crescent_moon": "🌙", "cricket": "🏏", "crocodile": "🐊", "croissant": "🥐", "crossed_fingers": "🤞", "crossed_flags": "🎌", "crossed_swords": "⚔️", "crown": "👑", "cry": "😢", "crying_cat_face": "😿", "crystal_ball": "🔮", "cucumber": "🥒", "cupid": "💘", "curly_loop": "➰", "currency_exchange": "💱", "curry": "🍛", "custard": "🍮", "customs": "🛃", "cyclone": "🌀", "dagger": "🗡", "dancer": "💃", "dancing_women": "👯", "dancing_men": "👯‍♂️", "dango": "🍡", "dark_sunglasses": "🕶", "dart": "🎯", "dash": "💨", "date": "📅", "deciduous_tree": "🌳", "deer": "🦌", "department_store": "🏬", "derelict_house": "🏚", "desert": "🏜", "desert_island": "🏝", "desktop_computer": "🖥", "male_detective": "🕵️", "diamond_shape_with_a_dot_inside": "💠", "diamonds": "♦️", "disappointed": "😞", "disappointed_relieved": "😥", "dizzy": "💫", "dizzy_face": "😵", "do_not_litter": "🚯", "dog": "🐶", "dog2": "🐕", "dollar": "💵", "dolls": "🎎", "dolphin": "🐬", "door": "🚪", "doughnut": "🍩", "dove": "🕊", "dragon": "🐉", "dragon_face": "🐲", "dress": "👗", "dromedary_camel": "🐪", "drooling_face": "🤤", "droplet": "💧", "drum": "🥁", "duck": "🦆", "dvd": "📀", "e-mail": "📧", "eagle": "🦅", "ear": "👂", "ear_of_rice": "🌾", "earth_africa": "🌍", "earth_americas": "🌎", "earth_asia": "🌏", "egg": "🥚", "eggplant": "🍆", "eight_pointed_black_star": "✴️", "eight_spoked_asterisk": "✳️", "electric_plug": "🔌", "elephant": "🐘", "email": "✉️", "end": "🔚", "envelope_with_arrow": "📩", "euro": "💶", "european_castle": "🏰", "european_post_office": "🏤", "evergreen_tree": "🌲", "exclamation": "❗️", "expressionless": "😑", "eye": "👁", "eye_speech_bubble": "👁‍🗨", "eyeglasses": "👓", "eyes": "👀", "face_with_head_bandage": "🤕", "face_with_thermometer": "🤒", "fist_oncoming": "👊", "factory": "🏭", "fallen_leaf": "🍂", "family_man_woman_boy": "👪", "family_man_boy": "👨‍👦", "family_man_boy_boy": "👨‍👦‍👦", "family_man_girl": "👨‍👧", "family_man_girl_boy": "👨‍👧‍👦", "family_man_girl_girl": "👨‍👧‍👧", "family_man_man_boy": "👨‍👨‍👦", "family_man_man_boy_boy": "👨‍👨‍👦‍👦", "family_man_man_girl": "👨‍👨‍👧", "family_man_man_girl_boy": "👨‍👨‍👧‍👦", "family_man_man_girl_girl": "👨‍👨‍👧‍👧", "family_man_woman_boy_boy": "👨‍👩‍👦‍👦", "family_man_woman_girl": "👨‍👩‍👧", "family_man_woman_girl_boy": "👨‍👩‍👧‍👦", "family_man_woman_girl_girl": "👨‍👩‍👧‍👧", "family_woman_boy": "👩‍👦", "family_woman_boy_boy": "👩‍👦‍👦", "family_woman_girl": "👩‍👧", "family_woman_girl_boy": "👩‍👧‍👦", "family_woman_girl_girl": "👩‍👧‍👧", "family_woman_woman_boy": "👩‍👩‍👦", "family_woman_woman_boy_boy": "👩‍👩‍👦‍👦", "family_woman_woman_girl": "👩‍👩‍👧", "family_woman_woman_girl_boy": "👩‍👩‍👧‍👦", "family_woman_woman_girl_girl": "👩‍👩‍👧‍👧", "fast_forward": "⏩", "fax": "📠", "fearful": "😨", "feet": "🐾", "female_detective": "🕵️‍♀️", "ferris_wheel": "🎡", "ferry": "⛴", "field_hockey": "🏑", "file_cabinet": "🗄", "file_folder": "📁", "film_projector": "📽", "film_strip": "🎞", "fire": "🔥", "fire_engine": "🚒", "fireworks": "🎆", "first_quarter_moon": "🌓", "first_quarter_moon_with_face": "🌛", "fish": "🐟", "fish_cake": "🍥", "fishing_pole_and_fish": "🎣", "fist_raised": "✊", "fist_left": "🤛", "fist_right": "🤜", "flags": "🎏", "flashlight": "🔦", "fleur_de_lis": "⚜️", "flight_arrival": "🛬", "flight_departure": "🛫", "floppy_disk": "💾", "flower_playing_cards": "🎴", "flushed": "😳", "fog": "🌫", "foggy": "🌁", "football": "🏈", "footprints": "👣", "fork_and_knife": "🍴", "fountain": "⛲️", "fountain_pen": "🖋", "four_leaf_clover": "🍀", "fox_face": "🦊", "framed_picture": "🖼", "free": "🆓", "fried_egg": "🍳", "fried_shrimp": "🍤", "fries": "🍟", "frog": "🐸", "frowning": "😦", "frowning_face": "☹️", "frowning_man": "🙍‍♂️", "frowning_woman": "🙍", "middle_finger": "🖕", "fuelpump": "⛽️", "full_moon": "🌕", "full_moon_with_face": "🌝", "funeral_urn": "⚱️", "game_die": "🎲", "gear": "⚙️", "gem": "💎", "gemini": "♊️", "ghost": "👻", "gift": "🎁", "gift_heart": "💝", "girl": "👧", "globe_with_meridians": "🌐", "goal_net": "🥅", "goat": "🐐", "golf": "⛳️", "golfing_man": "🏌️", "golfing_woman": "🏌️‍♀️", "gorilla": "🦍", "grapes": "🍇", "green_apple": "🍏", "green_book": "📗", "green_heart": "💚", "green_salad": "🥗", "grey_exclamation": "❕", "grey_question": "❔", "grimacing": "😬", "grin": "😁", "grinning": "😀", "guardsman": "💂", "guardswoman": "💂‍♀️", "guitar": "🎸", "gun": "🔫", "haircut_woman": "💇", "haircut_man": "💇‍♂️", "hamburger": "🍔", "hammer": "🔨", "hammer_and_pick": "⚒", "hammer_and_wrench": "🛠", "hamster": "🐹", "hand": "✋", "handbag": "👜", "handshake": "🤝", "hankey": "💩", "hatched_chick": "🐥", "hatching_chick": "🐣", "headphones": "🎧", "hear_no_evil": "🙉", "heart": "❤️", "heart_decoration": "💟", "heart_eyes": "😍", "heart_eyes_cat": "😻", "heartbeat": "💓", "heartpulse": "💗", "hearts": "♥️", "heavy_check_mark": "✔️", "heavy_division_sign": "➗", "heavy_dollar_sign": "💲", "heavy_heart_exclamation": "❣️", "heavy_minus_sign": "➖", "heavy_multiplication_x": "✖️", "heavy_plus_sign": "➕", "helicopter": "🚁", "herb": "🌿", "hibiscus": "🌺", "high_brightness": "🔆", "high_heel": "👠", "hocho": "🔪", "hole": "🕳", "honey_pot": "🍯", "horse": "🐴", "horse_racing": "🏇", "hospital": "🏥", "hot_pepper": "🌶", "hotdog": "🌭", "hotel": "🏨", "hotsprings": "♨️", "hourglass": "⌛️", "hourglass_flowing_sand": "⏳", "house": "🏠", "house_with_garden": "🏡", "houses": "🏘", "hugs": "🤗", "hushed": "😯", "ice_cream": "🍨", "ice_hockey": "🏒", "ice_skate": "⛸", "icecream": "🍦", "id": "🆔", "ideograph_advantage": "🉐", "imp": "👿", "inbox_tray": "📥", "incoming_envelope": "📨", "tipping_hand_woman": "💁", "information_source": "ℹ️", "innocent": "😇", "interrobang": "⁉️", "iphone": "📱", "izakaya_lantern": "🏮", "jack_o_lantern": "🎃", "japan": "🗾", "japanese_castle": "🏯", "japanese_goblin": "👺", "japanese_ogre": "👹", "jeans": "👖", "joy": "😂", "joy_cat": "😹", "joystick": "🕹", "kaaba": "🕋", "key": "🔑", "keyboard": "⌨️", "keycap_ten": "🔟", "kick_scooter": "🛴", "kimono": "👘", "kiss": "💋", "kissing": "😗", "kissing_cat": "😽", "kissing_closed_eyes": "😚", "kissing_heart": "😘", "kissing_smiling_eyes": "😙", "kiwi_fruit": "🥝", "koala": "🐨", "koko": "🈁", "label": "🏷", "large_blue_circle": "🔵", "large_blue_diamond": "🔷", "large_orange_diamond": "🔶", "last_quarter_moon": "🌗", "last_quarter_moon_with_face": "🌜", "latin_cross": "✝️", "laughing": "😆", "leaves": "🍃", "ledger": "📒", "left_luggage": "🛅", "left_right_arrow": "↔️", "leftwards_arrow_with_hook": "↩️", "lemon": "🍋", "leo": "♌️", "leopard": "🐆", "level_slider": "🎚", "libra": "♎️", "light_rail": "🚈", "link": "🔗", "lion": "🦁", "lips": "👄", "lipstick": "💄", "lizard": "🦎", "lock": "🔒", "lock_with_ink_pen": "🔏", "lollipop": "🍭", "loop": "➿", "loud_sound": "🔊", "loudspeaker": "📢", "love_hotel": "🏩", "love_letter": "💌", "low_brightness": "🔅", "lying_face": "🤥", "m": "Ⓜ️", "mag": "🔍", "mag_right": "🔎", "mahjong": "🀄️", "mailbox": "📫", "mailbox_closed": "📪", "mailbox_with_mail": "📬", "mailbox_with_no_mail": "📭", "man": "👨", "man_artist": "👨‍🎨", "man_astronaut": "👨‍🚀", "man_cartwheeling": "🤸‍♂️", "man_cook": "👨‍🍳", "man_dancing": "🕺", "man_facepalming": "🤦‍♂️", "man_factory_worker": "👨‍🏭", "man_farmer": "👨‍🌾", "man_firefighter": "👨‍🚒", "man_health_worker": "👨‍⚕️", "man_in_tuxedo": "🤵", "man_judge": "👨‍⚖️", "man_juggling": "🤹‍♂️", "man_mechanic": "👨‍🔧", "man_office_worker": "👨‍💼", "man_pilot": "👨‍✈️", "man_playing_handball": "🤾‍♂️", "man_playing_water_polo": "🤽‍♂️", "man_scientist": "👨‍🔬", "man_shrugging": "🤷‍♂️", "man_singer": "👨‍🎤", "man_student": "👨‍🎓", "man_teacher": "👨‍🏫", "man_technologist": "👨‍💻", "man_with_gua_pi_mao": "👲", "man_with_turban": "👳", "tangerine": "🍊", "mans_shoe": "👞", "mantelpiece_clock": "🕰", "maple_leaf": "🍁", "martial_arts_uniform": "🥋", "mask": "😷", "massage_woman": "💆", "massage_man": "💆‍♂️", "meat_on_bone": "🍖", "medal_military": "🎖", "medal_sports": "🏅", "mega": "📣", "melon": "🍈", "memo": "📝", "men_wrestling": "🤼‍♂️", "menorah": "🕎", "mens": "🚹", "metal": "🤘", "metro": "🚇", "microphone": "🎤", "microscope": "🔬", "milk_glass": "🥛", "milky_way": "🌌", "minibus": "🚐", "minidisc": "💽", "mobile_phone_off": "📴", "money_mouth_face": "🤑", "money_with_wings": "💸", "moneybag": "💰", "monkey": "🐒", "monkey_face": "🐵", "monorail": "🚝", "moon": "🌔", "mortar_board": "🎓", "mosque": "🕌", "motor_boat": "🛥", "motor_scooter": "🛵", "motorcycle": "🏍", "motorway": "🛣", "mount_fuji": "🗻", "mountain": "⛰", "mountain_biking_man": "🚵", "mountain_biking_woman": "🚵‍♀️", "mountain_cableway": "🚠", "mountain_railway": "🚞", "mountain_snow": "🏔", "mouse": "🐭", "mouse2": "🐁", "movie_camera": "🎥", "moyai": "🗿", "mrs_claus": "🤶", "muscle": "💪", "mushroom": "🍄", "musical_keyboard": "🎹", "musical_note": "🎵", "musical_score": "🎼", "mute": "🔇", "nail_care": "💅", "name_badge": "📛", "national_park": "🏞", "nauseated_face": "🤢", "necktie": "👔", "negative_squared_cross_mark": "❎", "nerd_face": "🤓", "neutral_face": "😐", "new": "🆕", "new_moon": "🌑", "new_moon_with_face": "🌚", "newspaper": "📰", "newspaper_roll": "🗞", "next_track_button": "⏭", "ng": "🆖", "no_good_man": "🙅‍♂️", "no_good_woman": "🙅", "night_with_stars": "🌃", "no_bell": "🔕", "no_bicycles": "🚳", "no_entry": "⛔️", "no_entry_sign": "🚫", "no_mobile_phones": "📵", "no_mouth": "😶", "no_pedestrians": "🚷", "no_smoking": "🚭", "non-potable_water": "🚱", "nose": "👃", "notebook": "📓", "notebook_with_decorative_cover": "📔", "notes": "🎶", "nut_and_bolt": "🔩", "o": "⭕️", "o2": "🅾️", "ocean": "🌊", "octopus": "🐙", "oden": "🍢", "office": "🏢", "oil_drum": "🛢", "ok": "🆗", "ok_hand": "👌", "ok_man": "🙆‍♂️", "ok_woman": "🙆", "old_key": "🗝", "older_man": "👴", "older_woman": "👵", "om": "🕉", "on": "🔛", "oncoming_automobile": "🚘", "oncoming_bus": "🚍", "oncoming_police_car": "🚔", "oncoming_taxi": "🚖", "open_file_folder": "📂", "open_hands": "👐", "open_mouth": "😮", "open_umbrella": "☂️", "ophiuchus": "⛎", "orange_book": "📙", "orthodox_cross": "☦️", "outbox_tray": "📤", "owl": "🦉", "ox": "🐂", "package": "📦", "page_facing_up": "📄", "page_with_curl": "📃", "pager": "📟", "paintbrush": "🖌", "palm_tree": "🌴", "pancakes": "🥞", "panda_face": "🐼", "paperclip": "📎", "paperclips": "🖇", "parasol_on_ground": "⛱", "parking": "🅿️", "part_alternation_mark": "〽️", "partly_sunny": "⛅️", "passenger_ship": "🛳", "passport_control": "🛂", "pause_button": "⏸", "peace_symbol": "☮️", "peach": "🍑", "peanuts": "🥜", "pear": "🍐", "pen": "🖊", "pencil2": "✏️", "penguin": "🐧", "pensive": "😔", "performing_arts": "🎭", "persevere": "😣", "person_fencing": "🤺", "pouting_woman": "🙎", "phone": "☎️", "pick": "⛏", "pig": "🐷", "pig2": "🐖", "pig_nose": "🐽", "pill": "💊", "pineapple": "🍍", "ping_pong": "🏓", "pisces": "♓️", "pizza": "🍕", "place_of_worship": "🛐", "plate_with_cutlery": "🍽", "play_or_pause_button": "⏯", "point_down": "👇", "point_left": "👈", "point_right": "👉", "point_up": "☝️", "point_up_2": "👆", "police_car": "🚓", "policewoman": "👮‍♀️", "poodle": "🐩", "popcorn": "🍿", "post_office": "🏣", "postal_horn": "📯", "postbox": "📮", "potable_water": "🚰", "potato": "🥔", "pouch": "👝", "poultry_leg": "🍗", "pound": "💷", "rage": "😡", "pouting_cat": "😾", "pouting_man": "🙎‍♂️", "pray": "🙏", "prayer_beads": "📿", "pregnant_woman": "🤰", "previous_track_button": "⏮", "prince": "🤴", "princess": "👸", "printer": "🖨", "purple_heart": "💜", "purse": "👛", "pushpin": "📌", "put_litter_in_its_place": "🚮", "question": "❓", "rabbit": "🐰", "rabbit2": "🐇", "racehorse": "🐎", "racing_car": "🏎", "radio": "📻", "radio_button": "🔘", "radioactive": "☢️", "railway_car": "🚃", "railway_track": "🛤", "rainbow": "🌈", "rainbow_flag": "🏳️‍🌈", "raised_back_of_hand": "🤚", "raised_hand_with_fingers_splayed": "🖐", "raised_hands": "🙌", "raising_hand_woman": "🙋", "raising_hand_man": "🙋‍♂️", "ram": "🐏", "ramen": "🍜", "rat": "🐀", "record_button": "⏺", "recycle": "♻️", "red_circle": "🔴", "registered": "®️", "relaxed": "☺️", "relieved": "😌", "reminder_ribbon": "🎗", "repeat": "🔁", "repeat_one": "🔂", "rescue_worker_helmet": "⛑", "restroom": "🚻", "revolving_hearts": "💞", "rewind": "⏪", "rhinoceros": "🦏", "ribbon": "🎀", "rice": "🍚", "rice_ball": "🍙", "rice_cracker": "🍘", "rice_scene": "🎑", "right_anger_bubble": "🗯", "ring": "💍", "robot": "🤖", "rocket": "🚀", "rofl": "🤣", "roll_eyes": "🙄", "roller_coaster": "🎢", "rooster": "🐓", "rose": "🌹", "rosette": "🏵", "rotating_light": "🚨", "round_pushpin": "📍", "rowing_man": "🚣", "rowing_woman": "🚣‍♀️", "rugby_football": "🏉", "running_man": "🏃", "running_shirt_with_sash": "🎽", "running_woman": "🏃‍♀️", "sa": "🈂️", "sagittarius": "♐️", "sake": "🍶", "sandal": "👡", "santa": "🎅", "satellite": "📡", "saxophone": "🎷", "school": "🏫", "school_satchel": "🎒", "scissors": "✂️", "scorpion": "🦂", "scorpius": "♏️", "scream": "😱", "scream_cat": "🙀", "scroll": "📜", "seat": "💺", "secret": "㊙️", "see_no_evil": "🙈", "seedling": "🌱", "selfie": "🤳", "shallow_pan_of_food": "🥘", "shamrock": "☘️", "shark": "🦈", "shaved_ice": "🍧", "sheep": "🐑", "shell": "🐚", "shield": "🛡", "shinto_shrine": "⛩", "ship": "🚢", "shirt": "👕", "shopping": "🛍", "shopping_cart": "🛒", "shower": "🚿", "shrimp": "🦐", "signal_strength": "📶", "six_pointed_star": "🔯", "ski": "🎿", "skier": "⛷", "skull": "💀", "skull_and_crossbones": "☠️", "sleeping": "😴", "sleeping_bed": "🛌", "sleepy": "😪", "slightly_frowning_face": "🙁", "slightly_smiling_face": "🙂", "slot_machine": "🎰", "small_airplane": "🛩", "small_blue_diamond": "🔹", "small_orange_diamond": "🔸", "small_red_triangle": "🔺", "small_red_triangle_down": "🔻", "smile": "😄", "smile_cat": "😸", "smiley": "😃", "smiley_cat": "😺", "smiling_imp": "😈", "smirk": "😏", "smirk_cat": "😼", "smoking": "🚬", "snail": "🐌", "snake": "🐍", "sneezing_face": "🤧", "snowboarder": "🏂", "snowflake": "❄️", "snowman": "⛄️", "snowman_with_snow": "☃️", "sob": "😭", "soccer": "⚽️", "soon": "🔜", "sos": "🆘", "sound": "🔉", "space_invader": "👾", "spades": "♠️", "spaghetti": "🍝", "sparkle": "❇️", "sparkler": "🎇", "sparkles": "✨", "sparkling_heart": "💖", "speak_no_evil": "🙊", "speaker": "🔈", "speaking_head": "🗣", "speech_balloon": "💬", "speedboat": "🚤", "spider": "🕷", "spider_web": "🕸", "spiral_calendar": "🗓", "spiral_notepad": "🗒", "spoon": "🥄", "squid": "🦑", "stadium": "🏟", "star": "⭐️", "star2": "🌟", "star_and_crescent": "☪️", "star_of_david": "✡️", "stars": "🌠", "station": "🚉", "statue_of_liberty": "🗽", "steam_locomotive": "🚂", "stew": "🍲", "stop_button": "⏹", "stop_sign": "🛑", "stopwatch": "⏱", "straight_ruler": "📏", "strawberry": "🍓", "stuck_out_tongue": "😛", "stuck_out_tongue_closed_eyes": "😝", "stuck_out_tongue_winking_eye": "😜", "studio_microphone": "🎙", "stuffed_flatbread": "🥙", "sun_behind_large_cloud": "🌥", "sun_behind_rain_cloud": "🌦", "sun_behind_small_cloud": "🌤", "sun_with_face": "🌞", "sunflower": "🌻", "sunglasses": "😎", "sunny": "☀️", "sunrise": "🌅", "sunrise_over_mountains": "🌄", "surfing_man": "🏄", "surfing_woman": "🏄‍♀️", "sushi": "🍣", "suspension_railway": "🚟", "sweat": "😓", "sweat_drops": "💦", "sweat_smile": "😅", "sweet_potato": "🍠", "swimming_man": "🏊", "swimming_woman": "🏊‍♀️", "symbols": "🔣", "synagogue": "🕍", "syringe": "💉", "taco": "🌮", "tada": "🎉", "tanabata_tree": "🎋", "taurus": "♉️", "taxi": "🚕", "tea": "🍵", "telephone_receiver": "📞", "telescope": "🔭", "tennis": "🎾", "tent": "⛺️", "thermometer": "🌡", "thinking": "🤔", "thought_balloon": "💭", "ticket": "🎫", "tickets": "🎟", "tiger": "🐯", "tiger2": "🐅", "timer_clock": "⏲", "tipping_hand_man": "💁‍♂️", "tired_face": "😫", "tm": "™️", "toilet": "🚽", "tokyo_tower": "🗼", "tomato": "🍅", "tongue": "👅", "top": "🔝", "tophat": "🎩", "tornado": "🌪", "trackball": "🖲", "tractor": "🚜", "traffic_light": "🚥", "train": "🚋", "train2": "🚆", "tram": "🚊", "triangular_flag_on_post": "🚩", "triangular_ruler": "📐", "trident": "🔱", "triumph": "😤", "trolleybus": "🚎", "trophy": "🏆", "tropical_drink": "🍹", "tropical_fish": "🐠", "truck": "🚚", "trumpet": "🎺", "tulip": "🌷", "tumbler_glass": "🥃", "turkey": "🦃", "turtle": "🐢", "tv": "📺", "twisted_rightwards_arrows": "🔀", "two_hearts": "💕", "two_men_holding_hands": "👬", "two_women_holding_hands": "👭", "u5272": "🈹", "u5408": "🈴", "u55b6": "🈺", "u6307": "🈯️", "u6708": "🈷️", "u6709": "🈶", "u6e80": "🈵", "u7121": "🈚️", "u7533": "🈸", "u7981": "🈲", "u7a7a": "🈳", "umbrella": "☔️", "unamused": "😒", "underage": "🔞", "unicorn": "🦄", "unlock": "🔓", "up": "🆙", "upside_down_face": "🙃", "v": "✌️", "vertical_traffic_light": "🚦", "vhs": "📼", "vibration_mode": "📳", "video_camera": "📹", "video_game": "🎮", "violin": "🎻", "virgo": "♍️", "volcano": "🌋", "volleyball": "🏐", "vs": "🆚", "vulcan_salute": "🖖", "walking_man": "🚶", "walking_woman": "🚶‍♀️", "waning_crescent_moon": "🌘", "waning_gibbous_moon": "🌖", "warning": "⚠️", "wastebasket": "🗑", "watch": "⌚️", "water_buffalo": "🐃", "watermelon": "🍉", "wave": "👋", "wavy_dash": "〰️", "waxing_crescent_moon": "🌒", "wc": "🚾", "weary": "😩", "wedding": "💒", "weight_lifting_man": "🏋️", "weight_lifting_woman": "🏋️‍♀️", "whale": "🐳", "whale2": "🐋", "wheel_of_dharma": "☸️", "wheelchair": "♿️", "white_check_mark": "✅", "white_circle": "⚪️", "white_flag": "🏳️", "white_flower": "💮", "white_large_square": "⬜️", "white_medium_small_square": "◽️", "white_medium_square": "◻️", "white_small_square": "▫️", "white_square_button": "🔳", "wilted_flower": "🥀", "wind_chime": "🎐", "wind_face": "🌬", "wine_glass": "🍷", "wink": "😉", "wolf": "🐺", "woman": "👩", "woman_artist": "👩‍🎨", "woman_astronaut": "👩‍🚀", "woman_cartwheeling": "🤸‍♀️", "woman_cook": "👩‍🍳", "woman_facepalming": "🤦‍♀️", "woman_factory_worker": "👩‍🏭", "woman_farmer": "👩‍🌾", "woman_firefighter": "👩‍🚒", "woman_health_worker": "👩‍⚕️", "woman_judge": "👩‍⚖️", "woman_juggling": "🤹‍♀️", "woman_mechanic": "👩‍🔧", "woman_office_worker": "👩‍💼", "woman_pilot": "👩‍✈️", "woman_playing_handball": "🤾‍♀️", "woman_playing_water_polo": "🤽‍♀️", "woman_scientist": "👩‍🔬", "woman_shrugging": "🤷‍♀️", "woman_singer": "👩‍🎤", "woman_student": "👩‍🎓", "woman_teacher": "👩‍🏫", "woman_technologist": "👩‍💻", "woman_with_turban": "👳‍♀️", "womans_clothes": "👚", "womans_hat": "👒", "women_wrestling": "🤼‍♀️", "womens": "🚺", "world_map": "🗺", "worried": "😟", "wrench": "🔧", "writing_hand": "✍️", "x": "❌", "yellow_heart": "💛", "yen": "💴", "yin_yang": "☯️", "yum": "😋", "zap": "⚡️", "zipper_mouth_face": "🤐", "zzz": "💤", /* special emojis :P */ "octocat": ':octocat:', "showdown": `S` }; showdown2.Converter = function(converterOptions) { var options = {}, langExtensions = [], outputModifiers = [], listeners = {}, setConvFlavor = setFlavor, metadata = { parsed: {}, raw: "", format: "" }; _constructor(); function _constructor() { converterOptions = converterOptions || {}; for (var gOpt in globalOptions) { if (globalOptions.hasOwnProperty(gOpt)) { options[gOpt] = globalOptions[gOpt]; } } if (typeof converterOptions === "object") { for (var opt in converterOptions) { if (converterOptions.hasOwnProperty(opt)) { options[opt] = converterOptions[opt]; } } } else { throw Error("Converter expects the passed parameter to be an object, but " + typeof converterOptions + " was passed instead."); } if (options.extensions) { showdown2.helper.forEach(options.extensions, _parseExtension); } } function _parseExtension(ext, name) { name = name || null; if (showdown2.helper.isString(ext)) { ext = showdown2.helper.stdExtName(ext); name = ext; if (showdown2.extensions[ext]) { console.warn("DEPRECATION WARNING: " + ext + " is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"); legacyExtensionLoading(showdown2.extensions[ext], ext); return; } else if (!showdown2.helper.isUndefined(extensions[ext])) { ext = extensions[ext]; } else { throw Error('Extension "' + ext + '" could not be loaded. It was either not found or is not a valid extension.'); } } if (typeof ext === "function") { ext = ext(); } if (!showdown2.helper.isArray(ext)) { ext = [ext]; } var validExt = validate(ext, name); if (!validExt.valid) { throw Error(validExt.error); } for (var i2 = 0; i2 < ext.length; ++i2) { switch (ext[i2].type) { case "lang": langExtensions.push(ext[i2]); break; case "output": outputModifiers.push(ext[i2]); break; } if (ext[i2].hasOwnProperty("listeners")) { for (var ln in ext[i2].listeners) { if (ext[i2].listeners.hasOwnProperty(ln)) { listen(ln, ext[i2].listeners[ln]); } } } } } function legacyExtensionLoading(ext, name) { if (typeof ext === "function") { ext = ext(new showdown2.Converter()); } if (!showdown2.helper.isArray(ext)) { ext = [ext]; } var valid = validate(ext, name); if (!valid.valid) { throw Error(valid.error); } for (var i2 = 0; i2 < ext.length; ++i2) { switch (ext[i2].type) { case "lang": langExtensions.push(ext[i2]); break; case "output": outputModifiers.push(ext[i2]); break; default: throw Error("Extension loader error: Type unrecognized!!!"); } } } function listen(name, callback) { if (!showdown2.helper.isString(name)) { throw Error("Invalid argument in converter.listen() method: name must be a string, but " + typeof name + " given"); } if (typeof callback !== "function") { throw Error("Invalid argument in converter.listen() method: callback must be a function, but " + typeof callback + " given"); } if (!listeners.hasOwnProperty(name)) { listeners[name] = []; } listeners[name].push(callback); } function rTrimInputText(text) { var rsp = text.match(/^\s*/)[0].length, rgx = new RegExp("^\\s{0," + rsp + "}", "gm"); return text.replace(rgx, ""); } this._dispatch = function dispatch(evtName, text, options2, globals) { if (listeners.hasOwnProperty(evtName)) { for (var ei = 0; ei < listeners[evtName].length; ++ei) { var nText = listeners[evtName][ei](evtName, text, this, options2, globals); if (nText && typeof nText !== "undefined") { text = nText; } } } return text; }; this.listen = function(name, callback) { listen(name, callback); return this; }; this.makeHtml = function(text) { if (!text) { return text; } var globals = { gHtmlBlocks: [], gHtmlMdBlocks: [], gHtmlSpans: [], gUrls: {}, gTitles: {}, gDimensions: {}, gListLevel: 0, hashLinkCounts: {}, langExtensions, outputModifiers, converter: this, ghCodeBlocks: [], metadata: { parsed: {}, raw: "", format: "" } }; text = text.replace(/¨/g, "¨T"); text = text.replace(/\$/g, "¨D"); text = text.replace(/\r\n/g, "\n"); text = text.replace(/\r/g, "\n"); text = text.replace(/\u00A0/g, " "); if (options.smartIndentationFix) { text = rTrimInputText(text); } text = "\n\n" + text + "\n\n"; text = showdown2.subParser("detab")(text, options, globals); text = text.replace(/^[ \t]+$/mg, ""); showdown2.helper.forEach(langExtensions, function(ext) { text = showdown2.subParser("runExtension")(ext, text, options, globals); }); text = showdown2.subParser("metadata")(text, options, globals); text = showdown2.subParser("hashPreCodeTags")(text, options, globals); text = showdown2.subParser("githubCodeBlocks")(text, options, globals); text = showdown2.subParser("hashHTMLBlocks")(text, options, globals); text = showdown2.subParser("hashCodeTags")(text, options, globals); text = showdown2.subParser("stripLinkDefinitions")(text, options, globals); text = showdown2.subParser("blockGamut")(text, options, globals); text = showdown2.subParser("unhashHTMLSpans")(text, options, globals); text = showdown2.subParser("unescapeSpecialChars")(text, options, globals); text = text.replace(/¨D/g, "$$"); text = text.replace(/¨T/g, "¨"); text = showdown2.subParser("completeHTMLDocument")(text, options, globals); showdown2.helper.forEach(outputModifiers, function(ext) { text = showdown2.subParser("runExtension")(ext, text, options, globals); }); metadata = globals.metadata; return text; }; this.makeMarkdown = this.makeMd = function(src, HTMLParser) { src = src.replace(/\r\n/g, "\n"); src = src.replace(/\r/g, "\n"); src = src.replace(/>[ \t]+¨NBSP;<"); if (!HTMLParser) { if (window && window.document) { HTMLParser = window.document; } else { throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM"); } } var doc = HTMLParser.createElement("div"); doc.innerHTML = src; var globals = { preList: substitutePreCodeTags(doc) }; clean(doc); var nodes = doc.childNodes, mdDoc = ""; for (var i2 = 0; i2 < nodes.length; i2++) { mdDoc += showdown2.subParser("makeMarkdown.node")(nodes[i2], globals); } function clean(node2) { for (var n = 0; n < node2.childNodes.length; ++n) { var child = node2.childNodes[n]; if (child.nodeType === 3) { if (!/\S/.test(child.nodeValue)) { node2.removeChild(child); --n; } else { child.nodeValue = child.nodeValue.split("\n").join(" "); child.nodeValue = child.nodeValue.replace(/(\s)+/g, "$1"); } } else if (child.nodeType === 1) { clean(child); } } } function substitutePreCodeTags(doc2) { var pres = doc2.querySelectorAll("pre"), presPH = []; for (var i3 = 0; i3 < pres.length; ++i3) { if (pres[i3].childElementCount === 1 && pres[i3].firstChild.tagName.toLowerCase() === "code") { var content = pres[i3].firstChild.innerHTML.trim(), language = pres[i3].firstChild.getAttribute("data-language") || ""; if (language === "") { var classes = pres[i3].firstChild.className.split(" "); for (var c = 0; c < classes.length; ++c) { var matches = classes[c].match(/^language-(.+)$/); if (matches !== null) { language = matches[1]; break; } } } content = showdown2.helper.unescapeHTMLEntities(content); presPH.push(content); pres[i3].outerHTML = ''; } else { presPH.push(pres[i3].innerHTML); pres[i3].innerHTML = ""; pres[i3].setAttribute("prenum", i3.toString()); } } return presPH; } return mdDoc; }; this.setOption = function(key, value) { options[key] = value; }; this.getOption = function(key) { return options[key]; }; this.getOptions = function() { return options; }; this.addExtension = function(extension, name) { name = name || null; _parseExtension(extension, name); }; this.useExtension = function(extensionName) { _parseExtension(extensionName); }; this.setFlavor = function(name) { if (!flavor.hasOwnProperty(name)) { throw Error(name + " flavor was not found"); } var preset = flavor[name]; setConvFlavor = name; for (var option in preset) { if (preset.hasOwnProperty(option)) { options[option] = preset[option]; } } }; this.getFlavor = function() { return setConvFlavor; }; this.removeExtension = function(extension) { if (!showdown2.helper.isArray(extension)) { extension = [extension]; } for (var a = 0; a < extension.length; ++a) { var ext = extension[a]; for (var i2 = 0; i2 < langExtensions.length; ++i2) { if (langExtensions[i2] === ext) { langExtensions[i2].splice(i2, 1); } } for (var ii2 = 0; ii2 < outputModifiers.length; ++i2) { if (outputModifiers[ii2] === ext) { outputModifiers[ii2].splice(i2, 1); } } } }; this.getAllExtensions = function() { return { language: langExtensions, output: outputModifiers }; }; this.getMetadata = function(raw) { if (raw) { return metadata.raw; } else { return metadata.parsed; } }; this.getMetadataFormat = function() { return metadata.format; }; this._setMetadataPair = function(key, value) { metadata.parsed[key] = value; }; this._setMetadataFormat = function(format) { metadata.format = format; }; this._setMetadataRaw = function(raw) { metadata.raw = raw; }; }; showdown2.subParser("anchors", function(text, options, globals) { text = globals.converter._dispatch("anchors.before", text, options, globals); var writeAnchorTag = function(wholeMatch, linkText, linkId, url, m5, m6, title) { if (showdown2.helper.isUndefined(title)) { title = ""; } linkId = linkId.toLowerCase(); if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { url = ""; } else if (!url) { if (!linkId) { linkId = linkText.toLowerCase().replace(/ ?\n/g, " "); } url = "#" + linkId; if (!showdown2.helper.isUndefined(globals.gUrls[linkId])) { url = globals.gUrls[linkId]; if (!showdown2.helper.isUndefined(globals.gTitles[linkId])) { title = globals.gTitles[linkId]; } } else { return wholeMatch; } } url = url.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); var result = '"; return result; }; text = text.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g, writeAnchorTag); text = text.replace( /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag ); text = text.replace( /\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g, writeAnchorTag ); text = text.replace(/\[([^\[\]]+)]()()()()()/g, writeAnchorTag); if (options.ghMentions) { text = text.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi, function(wm, st, escape2, mentions, username) { if (escape2 === "\\") { return st + mentions; } if (!showdown2.helper.isString(options.ghMentionsLink)) { throw new Error("ghMentionsLink option must be a string"); } var lnk = options.ghMentionsLink.replace(/\{u}/g, username), target2 = ""; if (options.openLinksInNewWindow) { target2 = ' rel="noopener noreferrer" target="¨E95Eblank"'; } return st + '" + mentions + ""; }); } text = globals.converter._dispatch("anchors.after", text, options, globals); return text; }); var simpleURLRegex = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi, simpleURLRegex2 = /([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi, delimUrlRegex = /()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi, simpleMailRegex = /(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi, delimMailRegex = /<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi, replaceLink = function(options) { return function(wm, leadingMagicChars, link, m2, m3, trailingPunctuation, trailingMagicChars) { link = link.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); var lnkTxt = link, append2 = "", target2 = "", lmc = leadingMagicChars || "", tmc = trailingMagicChars || ""; if (/^www\./i.test(link)) { link = link.replace(/^www\./i, "http://www."); } if (options.excludeTrailingPunctuationFromURLs && trailingPunctuation) { append2 = trailingPunctuation; } if (options.openLinksInNewWindow) { target2 = ' rel="noopener noreferrer" target="¨E95Eblank"'; } return lmc + '" + lnkTxt + "" + append2 + tmc; }; }, replaceMail = function(options, globals) { return function(wholeMatch, b, mail) { var href = "mailto:"; b = b || ""; mail = showdown2.subParser("unescapeSpecialChars")(mail, options, globals); if (options.encodeEmails) { href = showdown2.helper.encodeEmailAddress(href + mail); mail = showdown2.helper.encodeEmailAddress(mail); } else { href = href + mail; } return b + '' + mail + ""; }; }; showdown2.subParser("autoLinks", function(text, options, globals) { text = globals.converter._dispatch("autoLinks.before", text, options, globals); text = text.replace(delimUrlRegex, replaceLink(options)); text = text.replace(delimMailRegex, replaceMail(options, globals)); text = globals.converter._dispatch("autoLinks.after", text, options, globals); return text; }); showdown2.subParser("simplifiedAutoLinks", function(text, options, globals) { if (!options.simplifiedAutoLink) { return text; } text = globals.converter._dispatch("simplifiedAutoLinks.before", text, options, globals); if (options.excludeTrailingPunctuationFromURLs) { text = text.replace(simpleURLRegex2, replaceLink(options)); } else { text = text.replace(simpleURLRegex, replaceLink(options)); } text = text.replace(simpleMailRegex, replaceMail(options, globals)); text = globals.converter._dispatch("simplifiedAutoLinks.after", text, options, globals); return text; }); showdown2.subParser("blockGamut", function(text, options, globals) { text = globals.converter._dispatch("blockGamut.before", text, options, globals); text = showdown2.subParser("blockQuotes")(text, options, globals); text = showdown2.subParser("headers")(text, options, globals); text = showdown2.subParser("horizontalRule")(text, options, globals); text = showdown2.subParser("lists")(text, options, globals); text = showdown2.subParser("codeBlocks")(text, options, globals); text = showdown2.subParser("tables")(text, options, globals); text = showdown2.subParser("hashHTMLBlocks")(text, options, globals); text = showdown2.subParser("paragraphs")(text, options, globals); text = globals.converter._dispatch("blockGamut.after", text, options, globals); return text; }); showdown2.subParser("blockQuotes", function(text, options, globals) { text = globals.converter._dispatch("blockQuotes.before", text, options, globals); text = text + "\n\n"; var rgx = /(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm; if (options.splitAdjacentBlockquotes) { rgx = /^ {0,3}>[\s\S]*?(?:\n\n)/gm; } text = text.replace(rgx, function(bq) { bq = bq.replace(/^[ \t]*>[ \t]?/gm, ""); bq = bq.replace(/¨0/g, ""); bq = bq.replace(/^[ \t]+$/gm, ""); bq = showdown2.subParser("githubCodeBlocks")(bq, options, globals); bq = showdown2.subParser("blockGamut")(bq, options, globals); bq = bq.replace(/(^|\n)/g, "$1 "); bq = bq.replace(/(\s*
[^\r]+?<\/pre>)/gm, function(wholeMatch, m1) {
            var pre2 = m1;
            pre2 = pre2.replace(/^  /mg, "¨0");
            pre2 = pre2.replace(/¨0/g, "");
            return pre2;
          });
          return showdown2.subParser("hashBlock")("
\n" + bq + "\n
", options, globals); }); text = globals.converter._dispatch("blockQuotes.after", text, options, globals); return text; }); showdown2.subParser("codeBlocks", function(text, options, globals) { text = globals.converter._dispatch("codeBlocks.before", text, options, globals); text += "¨0"; var pattern = /(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g; text = text.replace(pattern, function(wholeMatch, m1, m2) { var codeblock = m1, nextChar = m2, end = "\n"; codeblock = showdown2.subParser("outdent")(codeblock, options, globals); codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals); codeblock = showdown2.subParser("detab")(codeblock, options, globals); codeblock = codeblock.replace(/^\n+/g, ""); codeblock = codeblock.replace(/\n+$/g, ""); if (options.omitExtraWLInCodeBlocks) { end = ""; } codeblock = "
" + codeblock + end + "
"; return showdown2.subParser("hashBlock")(codeblock, options, globals) + nextChar; }); text = text.replace(/¨0/, ""); text = globals.converter._dispatch("codeBlocks.after", text, options, globals); return text; }); showdown2.subParser("codeSpans", function(text, options, globals) { text = globals.converter._dispatch("codeSpans.before", text, options, globals); if (typeof text === "undefined") { text = ""; } text = text.replace( /(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, function(wholeMatch, m1, m2, m3) { var c = m3; c = c.replace(/^([ \t]*)/g, ""); c = c.replace(/[ \t]*$/g, ""); c = showdown2.subParser("encodeCode")(c, options, globals); c = m1 + "" + c + ""; c = showdown2.subParser("hashHTMLSpans")(c, options, globals); return c; } ); text = globals.converter._dispatch("codeSpans.after", text, options, globals); return text; }); showdown2.subParser("completeHTMLDocument", function(text, options, globals) { if (!options.completeHTMLDocument) { return text; } text = globals.converter._dispatch("completeHTMLDocument.before", text, options, globals); var doctype = "html", doctypeParsed = "\n", title = "", charset = '\n', lang2 = "", metadata = ""; if (typeof globals.metadata.parsed.doctype !== "undefined") { doctypeParsed = "\n"; doctype = globals.metadata.parsed.doctype.toString().toLowerCase(); if (doctype === "html" || doctype === "html5") { charset = ''; } } for (var meta in globals.metadata.parsed) { if (globals.metadata.parsed.hasOwnProperty(meta)) { switch (meta.toLowerCase()) { case "doctype": break; case "title": title = "" + globals.metadata.parsed.title + "\n"; break; case "charset": if (doctype === "html" || doctype === "html5") { charset = '\n'; } else { charset = '\n'; } break; case "language": case "lang": lang2 = ' lang="' + globals.metadata.parsed[meta] + '"'; metadata += '\n'; break; default: metadata += '\n'; } } } text = doctypeParsed + "\n\n" + title + charset + metadata + "\n\n" + text.trim() + "\n\n"; text = globals.converter._dispatch("completeHTMLDocument.after", text, options, globals); return text; }); showdown2.subParser("detab", function(text, options, globals) { text = globals.converter._dispatch("detab.before", text, options, globals); text = text.replace(/\t(?=\t)/g, " "); text = text.replace(/\t/g, "¨A¨B"); text = text.replace(/¨B(.+?)¨A/g, function(wholeMatch, m1) { var leadingText = m1, numSpaces = 4 - leadingText.length % 4; for (var i2 = 0; i2 < numSpaces; i2++) { leadingText += " "; } return leadingText; }); text = text.replace(/¨A/g, " "); text = text.replace(/¨B/g, ""); text = globals.converter._dispatch("detab.after", text, options, globals); return text; }); showdown2.subParser("ellipsis", function(text, options, globals) { text = globals.converter._dispatch("ellipsis.before", text, options, globals); text = text.replace(/\.\.\./g, "…"); text = globals.converter._dispatch("ellipsis.after", text, options, globals); return text; }); showdown2.subParser("emoji", function(text, options, globals) { if (!options.emoji) { return text; } text = globals.converter._dispatch("emoji.before", text, options, globals); var emojiRgx = /:([\S]+?):/g; text = text.replace(emojiRgx, function(wm, emojiCode) { if (showdown2.helper.emojis.hasOwnProperty(emojiCode)) { return showdown2.helper.emojis[emojiCode]; } return wm; }); text = globals.converter._dispatch("emoji.after", text, options, globals); return text; }); showdown2.subParser("encodeAmpsAndAngles", function(text, options, globals) { text = globals.converter._dispatch("encodeAmpsAndAngles.before", text, options, globals); text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&"); text = text.replace(/<(?![a-z\/?$!])/gi, "<"); text = text.replace(//g, ">"); text = globals.converter._dispatch("encodeAmpsAndAngles.after", text, options, globals); return text; }); showdown2.subParser("encodeBackslashEscapes", function(text, options, globals) { text = globals.converter._dispatch("encodeBackslashEscapes.before", text, options, globals); text = text.replace(/\\(\\)/g, showdown2.helper.escapeCharactersCallback); text = text.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g, showdown2.helper.escapeCharactersCallback); text = globals.converter._dispatch("encodeBackslashEscapes.after", text, options, globals); return text; }); showdown2.subParser("encodeCode", function(text, options, globals) { text = globals.converter._dispatch("encodeCode.before", text, options, globals); text = text.replace(/&/g, "&").replace(//g, ">").replace(/([*_{}\[\]\\=~-])/g, showdown2.helper.escapeCharactersCallback); text = globals.converter._dispatch("encodeCode.after", text, options, globals); return text; }); showdown2.subParser("escapeSpecialCharsWithinTagAttributes", function(text, options, globals) { text = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before", text, options, globals); var tags = /<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi, comments = /-]|-[^>])(?:[^-]|-[^-])*)--)>/gi; text = text.replace(tags, function(wholeMatch) { return wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`").replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback); }); text = text.replace(comments, function(wholeMatch) { return wholeMatch.replace(/([\\`*_~=|])/g, showdown2.helper.escapeCharactersCallback); }); text = globals.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after", text, options, globals); return text; }); showdown2.subParser("githubCodeBlocks", function(text, options, globals) { if (!options.ghCodeBlocks) { return text; } text = globals.converter._dispatch("githubCodeBlocks.before", text, options, globals); text += "¨0"; text = text.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g, function(wholeMatch, delim, language, codeblock) { var end = options.omitExtraWLInCodeBlocks ? "" : "\n"; codeblock = showdown2.subParser("encodeCode")(codeblock, options, globals); codeblock = showdown2.subParser("detab")(codeblock, options, globals); codeblock = codeblock.replace(/^\n+/g, ""); codeblock = codeblock.replace(/\n+$/g, ""); codeblock = "
" + codeblock + end + "
"; codeblock = showdown2.subParser("hashBlock")(codeblock, options, globals); return "\n\n¨G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n"; }); text = text.replace(/¨0/, ""); return globals.converter._dispatch("githubCodeBlocks.after", text, options, globals); }); showdown2.subParser("hashBlock", function(text, options, globals) { text = globals.converter._dispatch("hashBlock.before", text, options, globals); text = text.replace(/(^\n+|\n+$)/g, ""); text = "\n\n¨K" + (globals.gHtmlBlocks.push(text) - 1) + "K\n\n"; text = globals.converter._dispatch("hashBlock.after", text, options, globals); return text; }); showdown2.subParser("hashCodeTags", function(text, options, globals) { text = globals.converter._dispatch("hashCodeTags.before", text, options, globals); var repFunc = function(wholeMatch, match, left, right) { var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right; return "¨C" + (globals.gHtmlSpans.push(codeblock) - 1) + "C"; }; text = showdown2.helper.replaceRecursiveRegExp(text, repFunc, "]*>", "", "gim"); text = globals.converter._dispatch("hashCodeTags.after", text, options, globals); return text; }); showdown2.subParser("hashElement", function(text, options, globals) { return function(wholeMatch, m1) { var blockText = m1; blockText = blockText.replace(/\n\n/g, "\n"); blockText = blockText.replace(/^\n/, ""); blockText = blockText.replace(/\n+$/g, ""); blockText = "\n\n¨K" + (globals.gHtmlBlocks.push(blockText) - 1) + "K\n\n"; return blockText; }; }); showdown2.subParser("hashHTMLBlocks", function(text, options, globals) { text = globals.converter._dispatch("hashHTMLBlocks.before", text, options, globals); var blockTags = [ "pre", "div", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "table", "dl", "ol", "ul", "script", "noscript", "form", "fieldset", "iframe", "math", "style", "section", "header", "footer", "nav", "article", "aside", "address", "audio", "canvas", "figure", "hgroup", "output", "video", "p" ], repFunc = function(wholeMatch, match, left, right) { var txt = wholeMatch; if (left.search(/\bmarkdown\b/) !== -1) { txt = left + globals.converter.makeHtml(match) + right; } return "\n\n¨K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n"; }; if (options.backslashEscapesHTMLTags) { text = text.replace(/\\<(\/?[^>]+?)>/g, function(wm, inside) { return "<" + inside + ">"; }); } for (var i2 = 0; i2 < blockTags.length; ++i2) { var opTagPos, rgx1 = new RegExp("^ {0,3}(<" + blockTags[i2] + "\\b[^>]*>)", "im"), patLeft = "<" + blockTags[i2] + "\\b[^>]*>", patRight = ""; while ((opTagPos = showdown2.helper.regexIndexOf(text, rgx1)) !== -1) { var subTexts = showdown2.helper.splitAtIndex(text, opTagPos), newSubText1 = showdown2.helper.replaceRecursiveRegExp(subTexts[1], repFunc, patLeft, patRight, "im"); if (newSubText1 === subTexts[1]) { break; } text = subTexts[0].concat(newSubText1); } } text = text.replace( /(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, showdown2.subParser("hashElement")(text, options, globals) ); text = showdown2.helper.replaceRecursiveRegExp(text, function(txt) { return "\n\n¨K" + (globals.gHtmlBlocks.push(txt) - 1) + "K\n\n"; }, "^ {0,3}", "gm"); text = text.replace( /(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, showdown2.subParser("hashElement")(text, options, globals) ); text = globals.converter._dispatch("hashHTMLBlocks.after", text, options, globals); return text; }); showdown2.subParser("hashHTMLSpans", function(text, options, globals) { text = globals.converter._dispatch("hashHTMLSpans.before", text, options, globals); function hashHTMLSpan(html) { return "¨C" + (globals.gHtmlSpans.push(html) - 1) + "C"; } text = text.replace(/<[^>]+?\/>/gi, function(wm) { return hashHTMLSpan(wm); }); text = text.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g, function(wm) { return hashHTMLSpan(wm); }); text = text.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g, function(wm) { return hashHTMLSpan(wm); }); text = text.replace(/<[^>]+?>/gi, function(wm) { return hashHTMLSpan(wm); }); text = globals.converter._dispatch("hashHTMLSpans.after", text, options, globals); return text; }); showdown2.subParser("unhashHTMLSpans", function(text, options, globals) { text = globals.converter._dispatch("unhashHTMLSpans.before", text, options, globals); for (var i2 = 0; i2 < globals.gHtmlSpans.length; ++i2) { var repText = globals.gHtmlSpans[i2], limit = 0; while (/¨C(\d+)C/.test(repText)) { var num2 = RegExp.$1; repText = repText.replace("¨C" + num2 + "C", globals.gHtmlSpans[num2]); if (limit === 10) { console.error("maximum nesting of 10 spans reached!!!"); break; } ++limit; } text = text.replace("¨C" + i2 + "C", repText); } text = globals.converter._dispatch("unhashHTMLSpans.after", text, options, globals); return text; }); showdown2.subParser("hashPreCodeTags", function(text, options, globals) { text = globals.converter._dispatch("hashPreCodeTags.before", text, options, globals); var repFunc = function(wholeMatch, match, left, right) { var codeblock = left + showdown2.subParser("encodeCode")(match, options, globals) + right; return "\n\n¨G" + (globals.ghCodeBlocks.push({ text: wholeMatch, codeblock }) - 1) + "G\n\n"; }; text = showdown2.helper.replaceRecursiveRegExp(text, repFunc, "^ {0,3}]*>\\s*]*>", "^ {0,3}\\s*
", "gim"); text = globals.converter._dispatch("hashPreCodeTags.after", text, options, globals); return text; }); showdown2.subParser("headers", function(text, options, globals) { text = globals.converter._dispatch("headers.before", text, options, globals); var headerLevelStart = isNaN(parseInt(options.headerLevelStart)) ? 1 : parseInt(options.headerLevelStart), setextRegexH1 = options.smoothLivePreview ? /^(.+)[ \t]*\n={2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n=+[ \t]*\n+/gm, setextRegexH2 = options.smoothLivePreview ? /^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm : /^(.+)[ \t]*\n-+[ \t]*\n+/gm; text = text.replace(setextRegexH1, function(wholeMatch, m1) { var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart, hashBlock = "" + spanGamut + ""; return showdown2.subParser("hashBlock")(hashBlock, options, globals); }); text = text.replace(setextRegexH2, function(matchFound, m1) { var spanGamut = showdown2.subParser("spanGamut")(m1, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m1) + '"', hLevel = headerLevelStart + 1, hashBlock = "" + spanGamut + ""; return showdown2.subParser("hashBlock")(hashBlock, options, globals); }); var atxStyle = options.requireSpaceBeforeHeadingText ? /^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm : /^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm; text = text.replace(atxStyle, function(wholeMatch, m1, m2) { var hText = m2; if (options.customizedHeaderId) { hText = m2.replace(/\s?\{([^{]+?)}\s*$/, ""); } var span = showdown2.subParser("spanGamut")(hText, options, globals), hID = options.noHeaderId ? "" : ' id="' + headerId(m2) + '"', hLevel = headerLevelStart - 1 + m1.length, header = "" + span + ""; return showdown2.subParser("hashBlock")(header, options, globals); }); function headerId(m2) { var title, prefix; if (options.customizedHeaderId) { var match = m2.match(/\{([^{]+?)}\s*$/); if (match && match[1]) { m2 = match[1]; } } title = m2; if (showdown2.helper.isString(options.prefixHeaderId)) { prefix = options.prefixHeaderId; } else if (options.prefixHeaderId === true) { prefix = "section-"; } else { prefix = ""; } if (!options.rawPrefixHeaderId) { title = prefix + title; } if (options.ghCompatibleHeaderId) { title = title.replace(/ /g, "-").replace(/&/g, "").replace(/¨T/g, "").replace(/¨D/g, "").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g, "").toLowerCase(); } else if (options.rawHeaderId) { title = title.replace(/ /g, "-").replace(/&/g, "&").replace(/¨T/g, "¨").replace(/¨D/g, "$").replace(/["']/g, "-").toLowerCase(); } else { title = title.replace(/[^\w]/g, "").toLowerCase(); } if (options.rawPrefixHeaderId) { title = prefix + title; } if (globals.hashLinkCounts[title]) { title = title + "-" + globals.hashLinkCounts[title]++; } else { globals.hashLinkCounts[title] = 1; } return title; } text = globals.converter._dispatch("headers.after", text, options, globals); return text; }); showdown2.subParser("horizontalRule", function(text, options, globals) { text = globals.converter._dispatch("horizontalRule.before", text, options, globals); var key = showdown2.subParser("hashBlock")("
", options, globals); text = text.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm, key); text = text.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm, key); text = globals.converter._dispatch("horizontalRule.after", text, options, globals); return text; }); showdown2.subParser("images", function(text, options, globals) { text = globals.converter._dispatch("images.before", text, options, globals); var inlineRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, crazyRegExp = /!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g, base64RegExp = /!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g, referenceRegExp = /!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g, refShortcutRegExp = /!\[([^\[\]]+)]()()()()()/g; function writeImageTagBase64(wholeMatch, altText, linkId, url, width, height, m5, title) { url = url.replace(/\s/g, ""); return writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title); } function writeImageTag(wholeMatch, altText, linkId, url, width, height, m5, title) { var gUrls = globals.gUrls, gTitles = globals.gTitles, gDims = globals.gDimensions; linkId = linkId.toLowerCase(); if (!title) { title = ""; } if (wholeMatch.search(/\(? ?(['"].*['"])?\)$/m) > -1) { url = ""; } else if (url === "" || url === null) { if (linkId === "" || linkId === null) { linkId = altText.toLowerCase().replace(/ ?\n/g, " "); } url = "#" + linkId; if (!showdown2.helper.isUndefined(gUrls[linkId])) { url = gUrls[linkId]; if (!showdown2.helper.isUndefined(gTitles[linkId])) { title = gTitles[linkId]; } if (!showdown2.helper.isUndefined(gDims[linkId])) { width = gDims[linkId].width; height = gDims[linkId].height; } } else { return wholeMatch; } } altText = altText.replace(/"/g, """).replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); url = url.replace(showdown2.helper.regexes.asteriskDashAndColon, showdown2.helper.escapeCharactersCallback); var result = '' + altText + '", "
"); }); text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm, txt) { return parseInside(txt, "", ""); }); text = text.replace(/\b_(\S[\s\S]*?)_\b/g, function(wm, txt) { return parseInside(txt, "", ""); }); } else { text = text.replace(/___(\S[\s\S]*?)___/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); text = text.replace(/__(\S[\s\S]*?)__/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); text = text.replace(/_([^\s_][\s\S]*?)_/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); } if (options.literalMidWordAsterisks) { text = text.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g, function(wm, lead, txt) { return parseInside(txt, lead + "", ""); }); text = text.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g, function(wm, lead, txt) { return parseInside(txt, lead + "", ""); }); text = text.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g, function(wm, lead, txt) { return parseInside(txt, lead + "", ""); }); } else { text = text.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); text = text.replace(/\*\*(\S[\s\S]*?)\*\*/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); text = text.replace(/\*([^\s*][\s\S]*?)\*/g, function(wm, m2) { return /\S$/.test(m2) ? parseInside(m2, "", "") : wm; }); } text = globals.converter._dispatch("italicsAndBold.after", text, options, globals); return text; }); showdown2.subParser("lists", function(text, options, globals) { function processListItems(listStr, trimTrailing) { globals.gListLevel++; listStr = listStr.replace(/\n{2,}$/, "\n"); listStr += "¨0"; var rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm, isParagraphed = /\n[ \t]*\n(?!¨0)/.test(listStr); if (options.disableForced4SpacesIndentedSublists) { rgx = /(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm; } listStr = listStr.replace(rgx, function(wholeMatch, m1, m2, m3, m4, taskbtn, checked) { checked = checked && checked.trim() !== ""; var item = showdown2.subParser("outdent")(m4, options, globals), bulletStyle = ""; if (taskbtn && options.tasklists) { bulletStyle = ' class="task-list-item" style="list-style-type: none;"'; item = item.replace(/^[ \t]*\[(x|X| )?]/m, function() { var otp = ' -1) { item = showdown2.subParser("githubCodeBlocks")(item, options, globals); item = showdown2.subParser("blockGamut")(item, options, globals); } else { item = showdown2.subParser("lists")(item, options, globals); item = item.replace(/\n$/, ""); item = showdown2.subParser("hashHTMLBlocks")(item, options, globals); item = item.replace(/\n\n+/g, "\n\n"); if (isParagraphed) { item = showdown2.subParser("paragraphs")(item, options, globals); } else { item = showdown2.subParser("spanGamut")(item, options, globals); } } item = item.replace("¨A", ""); item = "" + item + "\n"; return item; }); listStr = listStr.replace(/¨0/g, ""); globals.gListLevel--; if (trimTrailing) { listStr = listStr.replace(/\s+$/, ""); } return listStr; } function styleStartNumber(list, listType) { if (listType === "ol") { var res = list.match(/^ *(\d+)\./); if (res && res[1] !== "1") { return ' start="' + res[1] + '"'; } } return ""; } function parseConsecutiveLists(list, listType, trimTrailing) { var olRgx = options.disableForced4SpacesIndentedSublists ? /^ ?\d+\.[ \t]/gm : /^ {0,3}\d+\.[ \t]/gm, ulRgx = options.disableForced4SpacesIndentedSublists ? /^ ?[*+-][ \t]/gm : /^ {0,3}[*+-][ \t]/gm, counterRxg = listType === "ul" ? olRgx : ulRgx, result = ""; if (list.search(counterRxg) !== -1) { (function parseCL(txt) { var pos = txt.search(counterRxg), style2 = styleStartNumber(list, listType); if (pos !== -1) { result += "\n\n<" + listType + style2 + ">\n" + processListItems(txt.slice(0, pos), !!trimTrailing) + "\n"; listType = listType === "ul" ? "ol" : "ul"; counterRxg = listType === "ul" ? olRgx : ulRgx; parseCL(txt.slice(pos)); } else { result += "\n\n<" + listType + style2 + ">\n" + processListItems(txt, !!trimTrailing) + "\n"; } })(list); } else { var style = styleStartNumber(list, listType); result = "\n\n<" + listType + style + ">\n" + processListItems(list, !!trimTrailing) + "\n"; } return result; } text = globals.converter._dispatch("lists.before", text, options, globals); text += "¨0"; if (globals.gListLevel) { text = text.replace( /^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function(wholeMatch, list, m2) { var listType = m2.search(/[*+-]/g) > -1 ? "ul" : "ol"; return parseConsecutiveLists(list, listType, true); } ); } else { text = text.replace( /(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm, function(wholeMatch, m1, list, m3) { var listType = m3.search(/[*+-]/g) > -1 ? "ul" : "ol"; return parseConsecutiveLists(list, listType, false); } ); } text = text.replace(/¨0/, ""); text = globals.converter._dispatch("lists.after", text, options, globals); return text; }); showdown2.subParser("metadata", function(text, options, globals) { if (!options.metadata) { return text; } text = globals.converter._dispatch("metadata.before", text, options, globals); function parseMetadataContents(content) { globals.metadata.raw = content; content = content.replace(/&/g, "&").replace(/"/g, """); content = content.replace(/\n {4}/g, " "); content.replace(/^([\S ]+): +([\s\S]+?)$/gm, function(wm, key, value) { globals.metadata.parsed[key] = value; return ""; }); } text = text.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/, function(wholematch, format, content) { parseMetadataContents(content); return "¨M"; }); text = text.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/, function(wholematch, format, content) { if (format) { globals.metadata.format = format; } parseMetadataContents(content); return "¨M"; }); text = text.replace(/¨M/g, ""); text = globals.converter._dispatch("metadata.after", text, options, globals); return text; }); showdown2.subParser("outdent", function(text, options, globals) { text = globals.converter._dispatch("outdent.before", text, options, globals); text = text.replace(/^(\t|[ ]{1,4})/gm, "¨0"); text = text.replace(/¨0/g, ""); text = globals.converter._dispatch("outdent.after", text, options, globals); return text; }); showdown2.subParser("paragraphs", function(text, options, globals) { text = globals.converter._dispatch("paragraphs.before", text, options, globals); text = text.replace(/^\n+/g, ""); text = text.replace(/\n+$/g, ""); var grafs = text.split(/\n{2,}/g), grafsOut = [], end = grafs.length; for (var i2 = 0; i2 < end; i2++) { var str = grafs[i2]; if (str.search(/¨(K|G)(\d+)\1/g) >= 0) { grafsOut.push(str); } else if (str.search(/\S/) >= 0) { str = showdown2.subParser("spanGamut")(str, options, globals); str = str.replace(/^([ \t]*)/g, "

"); str += "

"; grafsOut.push(str); } } end = grafsOut.length; for (i2 = 0; i2 < end; i2++) { var blockText = "", grafsOutIt = grafsOut[i2], codeFlag = false; while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) { var delim = RegExp.$1, num2 = RegExp.$2; if (delim === "K") { blockText = globals.gHtmlBlocks[num2]; } else { if (codeFlag) { blockText = showdown2.subParser("encodeCode")(globals.ghCodeBlocks[num2].text, options, globals); } else { blockText = globals.ghCodeBlocks[num2].codeblock; } } blockText = blockText.replace(/\$/g, "$$$$"); grafsOutIt = grafsOutIt.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/, blockText); if (/^]*>\s*]*>/.test(grafsOutIt)) { codeFlag = true; } } grafsOut[i2] = grafsOutIt; } text = grafsOut.join("\n"); text = text.replace(/^\n+/g, ""); text = text.replace(/\n+$/g, ""); return globals.converter._dispatch("paragraphs.after", text, options, globals); }); showdown2.subParser("runExtension", function(ext, text, options, globals) { if (ext.filter) { text = ext.filter(text, globals.converter, options); } else if (ext.regex) { var re = ext.regex; if (!(re instanceof RegExp)) { re = new RegExp(re, "g"); } text = text.replace(re, ext.replace); } return text; }); showdown2.subParser("spanGamut", function(text, options, globals) { text = globals.converter._dispatch("spanGamut.before", text, options, globals); text = showdown2.subParser("codeSpans")(text, options, globals); text = showdown2.subParser("escapeSpecialCharsWithinTagAttributes")(text, options, globals); text = showdown2.subParser("encodeBackslashEscapes")(text, options, globals); text = showdown2.subParser("images")(text, options, globals); text = showdown2.subParser("anchors")(text, options, globals); text = showdown2.subParser("autoLinks")(text, options, globals); text = showdown2.subParser("simplifiedAutoLinks")(text, options, globals); text = showdown2.subParser("emoji")(text, options, globals); text = showdown2.subParser("underline")(text, options, globals); text = showdown2.subParser("italicsAndBold")(text, options, globals); text = showdown2.subParser("strikethrough")(text, options, globals); text = showdown2.subParser("ellipsis")(text, options, globals); text = showdown2.subParser("hashHTMLSpans")(text, options, globals); text = showdown2.subParser("encodeAmpsAndAngles")(text, options, globals); if (options.simpleLineBreaks) { if (!/\n\n¨K/.test(text)) { text = text.replace(/\n+/g, "
\n"); } } else { text = text.replace(/ +\n/g, "
\n"); } text = globals.converter._dispatch("spanGamut.after", text, options, globals); return text; }); showdown2.subParser("strikethrough", function(text, options, globals) { function parseInside(txt) { if (options.simplifiedAutoLink) { txt = showdown2.subParser("simplifiedAutoLinks")(txt, options, globals); } return "" + txt + ""; } if (options.strikethrough) { text = globals.converter._dispatch("strikethrough.before", text, options, globals); text = text.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g, function(wm, txt) { return parseInside(txt); }); text = globals.converter._dispatch("strikethrough.after", text, options, globals); } return text; }); showdown2.subParser("stripLinkDefinitions", function(text, options, globals) { var regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm, base64Regex = /^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm; text += "¨0"; var replaceFunc = function(wholeMatch, linkId, url, width, height, blankLines, title) { linkId = linkId.toLowerCase(); if (url.match(/^data:.+?\/.+?;base64,/)) { globals.gUrls[linkId] = url.replace(/\s/g, ""); } else { globals.gUrls[linkId] = showdown2.subParser("encodeAmpsAndAngles")(url, options, globals); } if (blankLines) { return blankLines + title; } else { if (title) { globals.gTitles[linkId] = title.replace(/"|'/g, """); } if (options.parseImgDimensions && width && height) { globals.gDimensions[linkId] = { width, height }; } } return ""; }; text = text.replace(base64Regex, replaceFunc); text = text.replace(regex, replaceFunc); text = text.replace(/¨0/, ""); return text; }); showdown2.subParser("tables", function(text, options, globals) { if (!options.tables) { return text; } var tableRgx = /^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm, singeColTblRgx = /^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm; function parseStyles(sLine) { if (/^:[ \t]*--*$/.test(sLine)) { return ' style="text-align:left;"'; } else if (/^--*[ \t]*:[ \t]*$/.test(sLine)) { return ' style="text-align:right;"'; } else if (/^:[ \t]*--*[ \t]*:$/.test(sLine)) { return ' style="text-align:center;"'; } else { return ""; } } function parseHeaders(header, style) { var id = ""; header = header.trim(); if (options.tablesHeaderId || options.tableHeaderId) { id = ' id="' + header.replace(/ /g, "_").toLowerCase() + '"'; } header = showdown2.subParser("spanGamut")(header, options, globals); return "" + header + "\n"; } function parseCells(cell, style) { var subText = showdown2.subParser("spanGamut")(cell, options, globals); return "" + subText + "\n"; } function buildTable(headers, cells) { var tb = "\n\n\n", tblLgn = headers.length; for (var i2 = 0; i2 < tblLgn; ++i2) { tb += headers[i2]; } tb += "\n\n\n"; for (i2 = 0; i2 < cells.length; ++i2) { tb += "\n"; for (var ii2 = 0; ii2 < tblLgn; ++ii2) { tb += cells[i2][ii2]; } tb += "\n"; } tb += "\n
\n"; return tb; } function parseTable(rawTable) { var i2, tableLines = rawTable.split("\n"); for (i2 = 0; i2 < tableLines.length; ++i2) { if (/^ {0,3}\|/.test(tableLines[i2])) { tableLines[i2] = tableLines[i2].replace(/^ {0,3}\|/, ""); } if (/\|[ \t]*$/.test(tableLines[i2])) { tableLines[i2] = tableLines[i2].replace(/\|[ \t]*$/, ""); } tableLines[i2] = showdown2.subParser("codeSpans")(tableLines[i2], options, globals); } var rawHeaders = tableLines[0].split("|").map(function(s) { return s.trim(); }), rawStyles = tableLines[1].split("|").map(function(s) { return s.trim(); }), rawCells = [], headers = [], styles = [], cells = []; tableLines.shift(); tableLines.shift(); for (i2 = 0; i2 < tableLines.length; ++i2) { if (tableLines[i2].trim() === "") { continue; } rawCells.push( tableLines[i2].split("|").map(function(s) { return s.trim(); }) ); } if (rawHeaders.length < rawStyles.length) { return rawTable; } for (i2 = 0; i2 < rawStyles.length; ++i2) { styles.push(parseStyles(rawStyles[i2])); } for (i2 = 0; i2 < rawHeaders.length; ++i2) { if (showdown2.helper.isUndefined(styles[i2])) { styles[i2] = ""; } headers.push(parseHeaders(rawHeaders[i2], styles[i2])); } for (i2 = 0; i2 < rawCells.length; ++i2) { var row = []; for (var ii2 = 0; ii2 < headers.length; ++ii2) { if (showdown2.helper.isUndefined(rawCells[i2][ii2])) ; row.push(parseCells(rawCells[i2][ii2], styles[ii2])); } cells.push(row); } return buildTable(headers, cells); } text = globals.converter._dispatch("tables.before", text, options, globals); text = text.replace(/\\(\|)/g, showdown2.helper.escapeCharactersCallback); text = text.replace(tableRgx, parseTable); text = text.replace(singeColTblRgx, parseTable); text = globals.converter._dispatch("tables.after", text, options, globals); return text; }); showdown2.subParser("underline", function(text, options, globals) { if (!options.underline) { return text; } text = globals.converter._dispatch("underline.before", text, options, globals); if (options.literalMidWordUnderscores) { text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function(wm, txt) { return "" + txt + ""; }); text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function(wm, txt) { return "" + txt + ""; }); } else { text = text.replace(/___(\S[\s\S]*?)___/g, function(wm, m2) { return /\S$/.test(m2) ? "" + m2 + "" : wm; }); text = text.replace(/__(\S[\s\S]*?)__/g, function(wm, m2) { return /\S$/.test(m2) ? "" + m2 + "" : wm; }); } text = text.replace(/(_)/g, showdown2.helper.escapeCharactersCallback); text = globals.converter._dispatch("underline.after", text, options, globals); return text; }); showdown2.subParser("unescapeSpecialChars", function(text, options, globals) { text = globals.converter._dispatch("unescapeSpecialChars.before", text, options, globals); text = text.replace(/¨E(\d+)E/g, function(wholeMatch, m1) { var charCodeToReplace = parseInt(m1); return String.fromCharCode(charCodeToReplace); }); text = globals.converter._dispatch("unescapeSpecialChars.after", text, options, globals); return text; }); showdown2.subParser("makeMarkdown.blockquote", function(node2, globals) { var txt = ""; if (node2.hasChildNodes()) { var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { var innerTxt = showdown2.subParser("makeMarkdown.node")(children[i2], globals); if (innerTxt === "") { continue; } txt += innerTxt; } } txt = txt.trim(); txt = "> " + txt.split("\n").join("\n> "); return txt; }); showdown2.subParser("makeMarkdown.codeBlock", function(node2, globals) { var lang2 = node2.getAttribute("language"), num2 = node2.getAttribute("precodenum"); return "```" + lang2 + "\n" + globals.preList[num2] + "\n```"; }); showdown2.subParser("makeMarkdown.codeSpan", function(node2) { return "`" + node2.innerHTML + "`"; }); showdown2.subParser("makeMarkdown.emphasis", function(node2, globals) { var txt = ""; if (node2.hasChildNodes()) { txt += "*"; var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } txt += "*"; } return txt; }); showdown2.subParser("makeMarkdown.header", function(node2, globals, headerLevel) { var headerMark = new Array(headerLevel + 1).join("#"), txt = ""; if (node2.hasChildNodes()) { txt = headerMark + " "; var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } } return txt; }); showdown2.subParser("makeMarkdown.hr", function() { return "---"; }); showdown2.subParser("makeMarkdown.image", function(node2) { var txt = ""; if (node2.hasAttribute("src")) { txt += "![" + node2.getAttribute("alt") + "]("; txt += "<" + node2.getAttribute("src") + ">"; if (node2.hasAttribute("width") && node2.hasAttribute("height")) { txt += " =" + node2.getAttribute("width") + "x" + node2.getAttribute("height"); } if (node2.hasAttribute("title")) { txt += ' "' + node2.getAttribute("title") + '"'; } txt += ")"; } return txt; }); showdown2.subParser("makeMarkdown.links", function(node2, globals) { var txt = ""; if (node2.hasChildNodes() && node2.hasAttribute("href")) { var children = node2.childNodes, childrenLength = children.length; txt = "["; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } txt += "]("; txt += "<" + node2.getAttribute("href") + ">"; if (node2.hasAttribute("title")) { txt += ' "' + node2.getAttribute("title") + '"'; } txt += ")"; } return txt; }); showdown2.subParser("makeMarkdown.list", function(node2, globals, type) { var txt = ""; if (!node2.hasChildNodes()) { return ""; } var listItems = node2.childNodes, listItemsLenght = listItems.length, listNum = node2.getAttribute("start") || 1; for (var i2 = 0; i2 < listItemsLenght; ++i2) { if (typeof listItems[i2].tagName === "undefined" || listItems[i2].tagName.toLowerCase() !== "li") { continue; } var bullet2 = ""; if (type === "ol") { bullet2 = listNum.toString() + ". "; } else { bullet2 = "- "; } txt += bullet2 + showdown2.subParser("makeMarkdown.listItem")(listItems[i2], globals); ++listNum; } txt += "\n\n"; return txt.trim(); }); showdown2.subParser("makeMarkdown.listItem", function(node2, globals) { var listItemTxt = ""; var children = node2.childNodes, childrenLenght = children.length; for (var i2 = 0; i2 < childrenLenght; ++i2) { listItemTxt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } if (!/\n$/.test(listItemTxt)) { listItemTxt += "\n"; } else { listItemTxt = listItemTxt.split("\n").join("\n ").replace(/^ {4}$/gm, "").replace(/\n\n+/g, "\n\n"); } return listItemTxt; }); showdown2.subParser("makeMarkdown.node", function(node2, globals, spansOnly) { spansOnly = spansOnly || false; var txt = ""; if (node2.nodeType === 3) { return showdown2.subParser("makeMarkdown.txt")(node2, globals); } if (node2.nodeType === 8) { return "\n\n"; } if (node2.nodeType !== 1) { return ""; } var tagName = node2.tagName.toLowerCase(); switch (tagName) { case "h1": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 1) + "\n\n"; } break; case "h2": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 2) + "\n\n"; } break; case "h3": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 3) + "\n\n"; } break; case "h4": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 4) + "\n\n"; } break; case "h5": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 5) + "\n\n"; } break; case "h6": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.header")(node2, globals, 6) + "\n\n"; } break; case "p": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.paragraph")(node2, globals) + "\n\n"; } break; case "blockquote": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.blockquote")(node2, globals) + "\n\n"; } break; case "hr": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.hr")(node2, globals) + "\n\n"; } break; case "ol": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.list")(node2, globals, "ol") + "\n\n"; } break; case "ul": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.list")(node2, globals, "ul") + "\n\n"; } break; case "precode": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.codeBlock")(node2, globals) + "\n\n"; } break; case "pre": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.pre")(node2, globals) + "\n\n"; } break; case "table": if (!spansOnly) { txt = showdown2.subParser("makeMarkdown.table")(node2, globals) + "\n\n"; } break; case "code": txt = showdown2.subParser("makeMarkdown.codeSpan")(node2, globals); break; case "em": case "i": txt = showdown2.subParser("makeMarkdown.emphasis")(node2, globals); break; case "strong": case "b": txt = showdown2.subParser("makeMarkdown.strong")(node2, globals); break; case "del": txt = showdown2.subParser("makeMarkdown.strikethrough")(node2, globals); break; case "a": txt = showdown2.subParser("makeMarkdown.links")(node2, globals); break; case "img": txt = showdown2.subParser("makeMarkdown.image")(node2, globals); break; default: txt = node2.outerHTML + "\n\n"; } return txt; }); showdown2.subParser("makeMarkdown.paragraph", function(node2, globals) { var txt = ""; if (node2.hasChildNodes()) { var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } } txt = txt.trim(); return txt; }); showdown2.subParser("makeMarkdown.pre", function(node2, globals) { var num2 = node2.getAttribute("prenum"); return "
" + globals.preList[num2] + "
"; }); showdown2.subParser("makeMarkdown.strikethrough", function(node2, globals) { var txt = ""; if (node2.hasChildNodes()) { txt += "~~"; var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } txt += "~~"; } return txt; }); showdown2.subParser("makeMarkdown.strong", function(node2, globals) { var txt = ""; if (node2.hasChildNodes()) { txt += "**"; var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals); } txt += "**"; } return txt; }); showdown2.subParser("makeMarkdown.table", function(node2, globals) { var txt = "", tableArray = [[], []], headings = node2.querySelectorAll("thead>tr>th"), rows = node2.querySelectorAll("tbody>tr"), i2, ii2; for (i2 = 0; i2 < headings.length; ++i2) { var headContent = showdown2.subParser("makeMarkdown.tableCell")(headings[i2], globals), allign = "---"; if (headings[i2].hasAttribute("style")) { var style = headings[i2].getAttribute("style").toLowerCase().replace(/\s/g, ""); switch (style) { case "text-align:left;": allign = ":---"; break; case "text-align:right;": allign = "---:"; break; case "text-align:center;": allign = ":---:"; break; } } tableArray[0][i2] = headContent.trim(); tableArray[1][i2] = allign; } for (i2 = 0; i2 < rows.length; ++i2) { var r = tableArray.push([]) - 1, cols = rows[i2].getElementsByTagName("td"); for (ii2 = 0; ii2 < headings.length; ++ii2) { var cellContent = " "; if (typeof cols[ii2] !== "undefined") { cellContent = showdown2.subParser("makeMarkdown.tableCell")(cols[ii2], globals); } tableArray[r].push(cellContent); } } var cellSpacesCount = 3; for (i2 = 0; i2 < tableArray.length; ++i2) { for (ii2 = 0; ii2 < tableArray[i2].length; ++ii2) { var strLen = tableArray[i2][ii2].length; if (strLen > cellSpacesCount) { cellSpacesCount = strLen; } } } for (i2 = 0; i2 < tableArray.length; ++i2) { for (ii2 = 0; ii2 < tableArray[i2].length; ++ii2) { if (i2 === 1) { if (tableArray[i2][ii2].slice(-1) === ":") { tableArray[i2][ii2] = showdown2.helper.padEnd(tableArray[i2][ii2].slice(-1), cellSpacesCount - 1, "-") + ":"; } else { tableArray[i2][ii2] = showdown2.helper.padEnd(tableArray[i2][ii2], cellSpacesCount, "-"); } } else { tableArray[i2][ii2] = showdown2.helper.padEnd(tableArray[i2][ii2], cellSpacesCount); } } txt += "| " + tableArray[i2].join(" | ") + " |\n"; } return txt.trim(); }); showdown2.subParser("makeMarkdown.tableCell", function(node2, globals) { var txt = ""; if (!node2.hasChildNodes()) { return ""; } var children = node2.childNodes, childrenLength = children.length; for (var i2 = 0; i2 < childrenLength; ++i2) { txt += showdown2.subParser("makeMarkdown.node")(children[i2], globals, true); } return txt.trim(); }); showdown2.subParser("makeMarkdown.txt", function(node2) { var txt = node2.nodeValue; txt = txt.replace(/ +/g, " "); txt = txt.replace(/¨NBSP;/g, " "); txt = showdown2.helper.unescapeHTMLEntities(txt); txt = txt.replace(/([*_~|`])/g, "\\$1"); txt = txt.replace(/^(\s*)>/g, "\\$1>"); txt = txt.replace(/^#/gm, "\\#"); txt = txt.replace(/^(\s*)([-=]{3,})(\s*)$/, "$1\\$2$3"); txt = txt.replace(/^( {0,3}\d+)\./gm, "$1\\."); txt = txt.replace(/^( {0,3})([+-])/gm, "$1\\$2"); txt = txt.replace(/]([\s]*)\(/g, "\\]$1\\("); txt = txt.replace(/^ {0,3}\[([\S \t]*?)]:/gm, "\\[$1]:"); return txt; }); var root = this; if (module.exports) { module.exports = showdown2; } else { root.showdown = showdown2; } }).call(commonjsGlobal); })(showdown); var showdownExports = showdown.exports; var lib$5 = {}; var Parser$1 = {}; var Tokenizer$1 = {}; var decode_codepoint = {}; const require$$0$1 = { "0": 65533, "128": 8364, "130": 8218, "131": 402, "132": 8222, "133": 8230, "134": 8224, "135": 8225, "136": 710, "137": 8240, "138": 352, "139": 8249, "140": 338, "142": 381, "145": 8216, "146": 8217, "147": 8220, "148": 8221, "149": 8226, "150": 8211, "151": 8212, "152": 732, "153": 8482, "154": 353, "155": 8250, "156": 339, "158": 382, "159": 376 }; var __importDefault$6 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(decode_codepoint, "__esModule", { value: true }); var decode_json_1 = __importDefault$6(require$$0$1); var fromCodePoint = ( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition String.fromCodePoint || function(codePoint) { var output = ""; if (codePoint > 65535) { codePoint -= 65536; output += String.fromCharCode(codePoint >>> 10 & 1023 | 55296); codePoint = 56320 | codePoint & 1023; } output += String.fromCharCode(codePoint); return output; } ); function decodeCodePoint(codePoint) { if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { return "�"; } if (codePoint in decode_json_1.default) { codePoint = decode_json_1.default[codePoint]; } return fromCodePoint(codePoint); } decode_codepoint.default = decodeCodePoint; const Aacute$1 = "Á"; const aacute$1 = "á"; const Abreve = "Ă"; const abreve = "ă"; const ac = "∾"; const acd = "∿"; const acE = "∾̳"; const Acirc$1 = "Â"; const acirc$1 = "â"; const acute$1 = "´"; const Acy = "А"; const acy = "а"; const AElig$1 = "Æ"; const aelig$1 = "æ"; const af = "⁡"; const Afr = "𝔄"; const afr = "𝔞"; const Agrave$1 = "À"; const agrave$1 = "à"; const alefsym = "ℵ"; const aleph = "ℵ"; const Alpha = "Α"; const alpha = "α"; const Amacr = "Ā"; const amacr = "ā"; const amalg = "⨿"; const amp$2 = "&"; const AMP$1 = "&"; const andand = "⩕"; const And = "⩓"; const and = "∧"; const andd = "⩜"; const andslope = "⩘"; const andv = "⩚"; const ang = "∠"; const ange = "⦤"; const angle = "∠"; const angmsdaa = "⦨"; const angmsdab = "⦩"; const angmsdac = "⦪"; const angmsdad = "⦫"; const angmsdae = "⦬"; const angmsdaf = "⦭"; const angmsdag = "⦮"; const angmsdah = "⦯"; const angmsd = "∡"; const angrt = "∟"; const angrtvb = "⊾"; const angrtvbd = "⦝"; const angsph = "∢"; const angst = "Å"; const angzarr = "⍼"; const Aogon = "Ą"; const aogon = "ą"; const Aopf = "𝔸"; const aopf = "𝕒"; const apacir = "⩯"; const ap = "≈"; const apE = "⩰"; const ape = "≊"; const apid = "≋"; const apos$1 = "'"; const ApplyFunction = "⁡"; const approx = "≈"; const approxeq = "≊"; const Aring$1 = "Å"; const aring$1 = "å"; const Ascr = "𝒜"; const ascr = "𝒶"; const Assign = "≔"; const ast = "*"; const asymp = "≈"; const asympeq = "≍"; const Atilde$1 = "Ã"; const atilde$1 = "ã"; const Auml$1 = "Ä"; const auml$1 = "ä"; const awconint = "∳"; const awint = "⨑"; const backcong = "≌"; const backepsilon = "϶"; const backprime = "‵"; const backsim = "∽"; const backsimeq = "⋍"; const Backslash = "∖"; const Barv = "⫧"; const barvee = "⊽"; const barwed = "⌅"; const Barwed = "⌆"; const barwedge = "⌅"; const bbrk = "⎵"; const bbrktbrk = "⎶"; const bcong = "≌"; const Bcy = "Б"; const bcy = "б"; const bdquo = "„"; const becaus = "∵"; const because = "∵"; const Because = "∵"; const bemptyv = "⦰"; const bepsi = "϶"; const bernou = "ℬ"; const Bernoullis = "ℬ"; const Beta = "Β"; const beta = "β"; const beth = "ℶ"; const between = "≬"; const Bfr = "𝔅"; const bfr = "𝔟"; const bigcap = "⋂"; const bigcirc = "◯"; const bigcup = "⋃"; const bigodot = "⨀"; const bigoplus = "⨁"; const bigotimes = "⨂"; const bigsqcup = "⨆"; const bigstar = "★"; const bigtriangledown = "▽"; const bigtriangleup = "△"; const biguplus = "⨄"; const bigvee = "⋁"; const bigwedge = "⋀"; const bkarow = "⤍"; const blacklozenge = "⧫"; const blacksquare = "▪"; const blacktriangle = "▴"; const blacktriangledown = "▾"; const blacktriangleleft = "◂"; const blacktriangleright = "▸"; const blank = "␣"; const blk12 = "▒"; const blk14 = "░"; const blk34 = "▓"; const block = "█"; const bne = "=⃥"; const bnequiv = "≡⃥"; const bNot = "⫭"; const bnot = "⌐"; const Bopf = "𝔹"; const bopf = "𝕓"; const bot = "⊥"; const bottom = "⊥"; const bowtie = "⋈"; const boxbox = "⧉"; const boxdl = "┐"; const boxdL = "╕"; const boxDl = "╖"; const boxDL = "╗"; const boxdr = "┌"; const boxdR = "╒"; const boxDr = "╓"; const boxDR = "╔"; const boxh = "─"; const boxH = "═"; const boxhd = "┬"; const boxHd = "╤"; const boxhD = "╥"; const boxHD = "╦"; const boxhu = "┴"; const boxHu = "╧"; const boxhU = "╨"; const boxHU = "╩"; const boxminus = "⊟"; const boxplus = "⊞"; const boxtimes = "⊠"; const boxul = "┘"; const boxuL = "╛"; const boxUl = "╜"; const boxUL = "╝"; const boxur = "└"; const boxuR = "╘"; const boxUr = "╙"; const boxUR = "╚"; const boxv = "│"; const boxV = "║"; const boxvh = "┼"; const boxvH = "╪"; const boxVh = "╫"; const boxVH = "╬"; const boxvl = "┤"; const boxvL = "╡"; const boxVl = "╢"; const boxVL = "╣"; const boxvr = "├"; const boxvR = "╞"; const boxVr = "╟"; const boxVR = "╠"; const bprime = "‵"; const breve = "˘"; const Breve = "˘"; const brvbar$1 = "¦"; const bscr = "𝒷"; const Bscr = "ℬ"; const bsemi = "⁏"; const bsim = "∽"; const bsime = "⋍"; const bsolb = "⧅"; const bsol = "\\"; const bsolhsub = "⟈"; const bull = "•"; const bullet = "•"; const bump = "≎"; const bumpE = "⪮"; const bumpe = "≏"; const Bumpeq = "≎"; const bumpeq = "≏"; const Cacute = "Ć"; const cacute = "ć"; const capand = "⩄"; const capbrcup = "⩉"; const capcap = "⩋"; const cap = "∩"; const Cap = "⋒"; const capcup = "⩇"; const capdot = "⩀"; const CapitalDifferentialD = "ⅅ"; const caps = "∩︀"; const caret = "⁁"; const caron = "ˇ"; const Cayleys = "ℭ"; const ccaps = "⩍"; const Ccaron = "Č"; const ccaron = "č"; const Ccedil$1 = "Ç"; const ccedil$1 = "ç"; const Ccirc = "Ĉ"; const ccirc = "ĉ"; const Cconint = "∰"; const ccups = "⩌"; const ccupssm = "⩐"; const Cdot = "Ċ"; const cdot = "ċ"; const cedil$1 = "¸"; const Cedilla = "¸"; const cemptyv = "⦲"; const cent$1 = "¢"; const centerdot = "·"; const CenterDot = "·"; const cfr = "𝔠"; const Cfr = "ℭ"; const CHcy = "Ч"; const chcy = "ч"; const check = "✓"; const checkmark = "✓"; const Chi = "Χ"; const chi = "χ"; const circ = "ˆ"; const circeq = "≗"; const circlearrowleft = "↺"; const circlearrowright = "↻"; const circledast = "⊛"; const circledcirc = "⊚"; const circleddash = "⊝"; const CircleDot = "⊙"; const circledR = "®"; const circledS = "Ⓢ"; const CircleMinus = "⊖"; const CirclePlus = "⊕"; const CircleTimes = "⊗"; const cir = "○"; const cirE = "⧃"; const cire = "≗"; const cirfnint = "⨐"; const cirmid = "⫯"; const cirscir = "⧂"; const ClockwiseContourIntegral = "∲"; const CloseCurlyDoubleQuote = "”"; const CloseCurlyQuote = "’"; const clubs = "♣"; const clubsuit = "♣"; const colon = ":"; const Colon = "∷"; const Colone = "⩴"; const colone = "≔"; const coloneq = "≔"; const comma = ","; const commat = "@"; const comp = "∁"; const compfn = "∘"; const complement = "∁"; const complexes = "ℂ"; const cong = "≅"; const congdot = "⩭"; const Congruent = "≡"; const conint = "∮"; const Conint = "∯"; const ContourIntegral = "∮"; const copf = "𝕔"; const Copf = "ℂ"; const coprod = "∐"; const Coproduct = "∐"; const copy$1 = "©"; const COPY$1 = "©"; const copysr = "℗"; const CounterClockwiseContourIntegral = "∳"; const crarr = "↵"; const cross = "✗"; const Cross = "⨯"; const Cscr = "𝒞"; const cscr = "𝒸"; const csub = "⫏"; const csube = "⫑"; const csup = "⫐"; const csupe = "⫒"; const ctdot = "⋯"; const cudarrl = "⤸"; const cudarrr = "⤵"; const cuepr = "⋞"; const cuesc = "⋟"; const cularr = "↶"; const cularrp = "⤽"; const cupbrcap = "⩈"; const cupcap = "⩆"; const CupCap = "≍"; const cup = "∪"; const Cup = "⋓"; const cupcup = "⩊"; const cupdot = "⊍"; const cupor = "⩅"; const cups = "∪︀"; const curarr = "↷"; const curarrm = "⤼"; const curlyeqprec = "⋞"; const curlyeqsucc = "⋟"; const curlyvee = "⋎"; const curlywedge = "⋏"; const curren$1 = "¤"; const curvearrowleft = "↶"; const curvearrowright = "↷"; const cuvee = "⋎"; const cuwed = "⋏"; const cwconint = "∲"; const cwint = "∱"; const cylcty = "⌭"; const dagger = "†"; const Dagger = "‡"; const daleth = "ℸ"; const darr = "↓"; const Darr = "↡"; const dArr = "⇓"; const dash = "‐"; const Dashv = "⫤"; const dashv = "⊣"; const dbkarow = "⤏"; const dblac = "˝"; const Dcaron = "Ď"; const dcaron = "ď"; const Dcy = "Д"; const dcy = "д"; const ddagger = "‡"; const ddarr = "⇊"; const DD = "ⅅ"; const dd = "ⅆ"; const DDotrahd = "⤑"; const ddotseq = "⩷"; const deg$1 = "°"; const Del = "∇"; const Delta = "Δ"; const delta = "δ"; const demptyv = "⦱"; const dfisht = "⥿"; const Dfr = "𝔇"; const dfr = "𝔡"; const dHar = "⥥"; const dharl = "⇃"; const dharr = "⇂"; const DiacriticalAcute = "´"; const DiacriticalDot = "˙"; const DiacriticalDoubleAcute = "˝"; const DiacriticalGrave = "`"; const DiacriticalTilde = "˜"; const diam = "⋄"; const diamond = "⋄"; const Diamond = "⋄"; const diamondsuit = "♦"; const diams = "♦"; const die$1 = "¨"; const DifferentialD = "ⅆ"; const digamma = "ϝ"; const disin = "⋲"; const div = "÷"; const divide$1 = "÷"; const divideontimes = "⋇"; const divonx = "⋇"; const DJcy = "Ђ"; const djcy = "ђ"; const dlcorn = "⌞"; const dlcrop = "⌍"; const dollar = "$"; const Dopf = "𝔻"; const dopf = "𝕕"; const Dot = "¨"; const dot = "˙"; const DotDot = "⃜"; const doteq = "≐"; const doteqdot = "≑"; const DotEqual = "≐"; const dotminus = "∸"; const dotplus = "∔"; const dotsquare = "⊡"; const doublebarwedge = "⌆"; const DoubleContourIntegral = "∯"; const DoubleDot = "¨"; const DoubleDownArrow = "⇓"; const DoubleLeftArrow = "⇐"; const DoubleLeftRightArrow = "⇔"; const DoubleLeftTee = "⫤"; const DoubleLongLeftArrow = "⟸"; const DoubleLongLeftRightArrow = "⟺"; const DoubleLongRightArrow = "⟹"; const DoubleRightArrow = "⇒"; const DoubleRightTee = "⊨"; const DoubleUpArrow = "⇑"; const DoubleUpDownArrow = "⇕"; const DoubleVerticalBar = "∥"; const DownArrowBar = "⤓"; const downarrow = "↓"; const DownArrow = "↓"; const Downarrow = "⇓"; const DownArrowUpArrow = "⇵"; const DownBreve = "̑"; const downdownarrows = "⇊"; const downharpoonleft = "⇃"; const downharpoonright = "⇂"; const DownLeftRightVector = "⥐"; const DownLeftTeeVector = "⥞"; const DownLeftVectorBar = "⥖"; const DownLeftVector = "↽"; const DownRightTeeVector = "⥟"; const DownRightVectorBar = "⥗"; const DownRightVector = "⇁"; const DownTeeArrow = "↧"; const DownTee = "⊤"; const drbkarow = "⤐"; const drcorn = "⌟"; const drcrop = "⌌"; const Dscr = "𝒟"; const dscr = "𝒹"; const DScy = "Ѕ"; const dscy = "ѕ"; const dsol = "⧶"; const Dstrok = "Đ"; const dstrok = "đ"; const dtdot = "⋱"; const dtri = "▿"; const dtrif = "▾"; const duarr = "⇵"; const duhar = "⥯"; const dwangle = "⦦"; const DZcy = "Џ"; const dzcy = "џ"; const dzigrarr = "⟿"; const Eacute$1 = "É"; const eacute$1 = "é"; const easter = "⩮"; const Ecaron = "Ě"; const ecaron = "ě"; const Ecirc$1 = "Ê"; const ecirc$1 = "ê"; const ecir = "≖"; const ecolon = "≕"; const Ecy = "Э"; const ecy = "э"; const eDDot = "⩷"; const Edot = "Ė"; const edot = "ė"; const eDot = "≑"; const ee = "ⅇ"; const efDot = "≒"; const Efr = "𝔈"; const efr = "𝔢"; const eg = "⪚"; const Egrave$1 = "È"; const egrave$1 = "è"; const egs = "⪖"; const egsdot = "⪘"; const el = "⪙"; const Element$1 = "∈"; const elinters = "⏧"; const ell = "ℓ"; const els = "⪕"; const elsdot = "⪗"; const Emacr = "Ē"; const emacr = "ē"; const empty = "∅"; const emptyset = "∅"; const EmptySmallSquare = "◻"; const emptyv = "∅"; const EmptyVerySmallSquare = "▫"; const emsp13 = " "; const emsp14 = " "; const emsp = " "; const ENG = "Ŋ"; const eng = "ŋ"; const ensp = " "; const Eogon = "Ę"; const eogon = "ę"; const Eopf = "𝔼"; const eopf = "𝕖"; const epar = "⋕"; const eparsl = "⧣"; const eplus = "⩱"; const epsi = "ε"; const Epsilon = "Ε"; const epsilon = "ε"; const epsiv = "ϵ"; const eqcirc = "≖"; const eqcolon = "≕"; const eqsim = "≂"; const eqslantgtr = "⪖"; const eqslantless = "⪕"; const Equal = "⩵"; const equals = "="; const EqualTilde = "≂"; const equest = "≟"; const Equilibrium = "⇌"; const equiv = "≡"; const equivDD = "⩸"; const eqvparsl = "⧥"; const erarr = "⥱"; const erDot = "≓"; const escr = "ℯ"; const Escr = "ℰ"; const esdot = "≐"; const Esim = "⩳"; const esim = "≂"; const Eta = "Η"; const eta = "η"; const ETH$1 = "Ð"; const eth$1 = "ð"; const Euml$1 = "Ë"; const euml$1 = "ë"; const euro = "€"; const excl = "!"; const exist = "∃"; const Exists = "∃"; const expectation = "ℰ"; const exponentiale = "ⅇ"; const ExponentialE = "ⅇ"; const fallingdotseq = "≒"; const Fcy = "Ф"; const fcy = "ф"; const female = "♀"; const ffilig = "ffi"; const fflig = "ff"; const ffllig = "ffl"; const Ffr = "𝔉"; const ffr = "𝔣"; const filig = "fi"; const FilledSmallSquare = "◼"; const FilledVerySmallSquare = "▪"; const fjlig = "fj"; const flat = "♭"; const fllig = "fl"; const fltns = "▱"; const fnof = "ƒ"; const Fopf = "𝔽"; const fopf = "𝕗"; const forall = "∀"; const ForAll = "∀"; const fork = "⋔"; const forkv = "⫙"; const Fouriertrf = "ℱ"; const fpartint = "⨍"; const frac12$1 = "½"; const frac13 = "⅓"; const frac14$1 = "¼"; const frac15 = "⅕"; const frac16 = "⅙"; const frac18 = "⅛"; const frac23 = "⅔"; const frac25 = "⅖"; const frac34$1 = "¾"; const frac35 = "⅗"; const frac38 = "⅜"; const frac45 = "⅘"; const frac56 = "⅚"; const frac58 = "⅝"; const frac78 = "⅞"; const frasl = "⁄"; const frown = "⌢"; const fscr = "𝒻"; const Fscr = "ℱ"; const gacute = "ǵ"; const Gamma = "Γ"; const gamma = "γ"; const Gammad = "Ϝ"; const gammad = "ϝ"; const gap = "⪆"; const Gbreve = "Ğ"; const gbreve = "ğ"; const Gcedil = "Ģ"; const Gcirc = "Ĝ"; const gcirc = "ĝ"; const Gcy = "Г"; const gcy = "г"; const Gdot = "Ġ"; const gdot = "ġ"; const ge = "≥"; const gE = "≧"; const gEl = "⪌"; const gel = "⋛"; const geq = "≥"; const geqq = "≧"; const geqslant = "⩾"; const gescc = "⪩"; const ges = "⩾"; const gesdot = "⪀"; const gesdoto = "⪂"; const gesdotol = "⪄"; const gesl = "⋛︀"; const gesles = "⪔"; const Gfr = "𝔊"; const gfr = "𝔤"; const gg = "≫"; const Gg = "⋙"; const ggg = "⋙"; const gimel = "ℷ"; const GJcy = "Ѓ"; const gjcy = "ѓ"; const gla = "⪥"; const gl = "≷"; const glE = "⪒"; const glj = "⪤"; const gnap = "⪊"; const gnapprox = "⪊"; const gne = "⪈"; const gnE = "≩"; const gneq = "⪈"; const gneqq = "≩"; const gnsim = "⋧"; const Gopf = "𝔾"; const gopf = "𝕘"; const grave = "`"; const GreaterEqual = "≥"; const GreaterEqualLess = "⋛"; const GreaterFullEqual = "≧"; const GreaterGreater = "⪢"; const GreaterLess = "≷"; const GreaterSlantEqual = "⩾"; const GreaterTilde = "≳"; const Gscr = "𝒢"; const gscr = "ℊ"; const gsim = "≳"; const gsime = "⪎"; const gsiml = "⪐"; const gtcc = "⪧"; const gtcir = "⩺"; const gt$2 = ">"; const GT$1 = ">"; const Gt = "≫"; const gtdot = "⋗"; const gtlPar = "⦕"; const gtquest = "⩼"; const gtrapprox = "⪆"; const gtrarr = "⥸"; const gtrdot = "⋗"; const gtreqless = "⋛"; const gtreqqless = "⪌"; const gtrless = "≷"; const gtrsim = "≳"; const gvertneqq = "≩︀"; const gvnE = "≩︀"; const Hacek = "ˇ"; const hairsp = " "; const half = "½"; const hamilt = "ℋ"; const HARDcy = "Ъ"; const hardcy = "ъ"; const harrcir = "⥈"; const harr = "↔"; const hArr = "⇔"; const harrw = "↭"; const Hat = "^"; const hbar = "ℏ"; const Hcirc = "Ĥ"; const hcirc = "ĥ"; const hearts = "♥"; const heartsuit = "♥"; const hellip = "…"; const hercon = "⊹"; const hfr = "𝔥"; const Hfr = "ℌ"; const HilbertSpace = "ℋ"; const hksearow = "⤥"; const hkswarow = "⤦"; const hoarr = "⇿"; const homtht = "∻"; const hookleftarrow = "↩"; const hookrightarrow = "↪"; const hopf = "𝕙"; const Hopf = "ℍ"; const horbar = "―"; const HorizontalLine = "─"; const hscr = "𝒽"; const Hscr = "ℋ"; const hslash = "ℏ"; const Hstrok = "Ħ"; const hstrok = "ħ"; const HumpDownHump = "≎"; const HumpEqual = "≏"; const hybull = "⁃"; const hyphen = "‐"; const Iacute$1 = "Í"; const iacute$1 = "í"; const ic = "⁣"; const Icirc$1 = "Î"; const icirc$1 = "î"; const Icy = "И"; const icy = "и"; const Idot = "İ"; const IEcy = "Е"; const iecy = "е"; const iexcl$1 = "¡"; const iff = "⇔"; const ifr = "𝔦"; const Ifr = "ℑ"; const Igrave$1 = "Ì"; const igrave$1 = "ì"; const ii = "ⅈ"; const iiiint = "⨌"; const iiint = "∭"; const iinfin = "⧜"; const iiota = "℩"; const IJlig = "IJ"; const ijlig = "ij"; const Imacr = "Ī"; const imacr = "ī"; const image = "ℑ"; const ImaginaryI = "ⅈ"; const imagline = "ℐ"; const imagpart = "ℑ"; const imath = "ı"; const Im = "ℑ"; const imof = "⊷"; const imped = "Ƶ"; const Implies = "⇒"; const incare = "℅"; const infin = "∞"; const infintie = "⧝"; const inodot = "ı"; const intcal = "⊺"; const int = "∫"; const Int = "∬"; const integers = "ℤ"; const Integral = "∫"; const intercal = "⊺"; const Intersection = "⋂"; const intlarhk = "⨗"; const intprod = "⨼"; const InvisibleComma = "⁣"; const InvisibleTimes = "⁢"; const IOcy = "Ё"; const iocy = "ё"; const Iogon = "Į"; const iogon = "į"; const Iopf = "𝕀"; const iopf = "𝕚"; const Iota = "Ι"; const iota = "ι"; const iprod = "⨼"; const iquest$1 = "¿"; const iscr = "𝒾"; const Iscr = "ℐ"; const isin = "∈"; const isindot = "⋵"; const isinE = "⋹"; const isins = "⋴"; const isinsv = "⋳"; const isinv = "∈"; const it = "⁢"; const Itilde = "Ĩ"; const itilde = "ĩ"; const Iukcy = "І"; const iukcy = "і"; const Iuml$1 = "Ï"; const iuml$1 = "ï"; const Jcirc = "Ĵ"; const jcirc = "ĵ"; const Jcy = "Й"; const jcy = "й"; const Jfr = "𝔍"; const jfr = "𝔧"; const jmath = "ȷ"; const Jopf = "𝕁"; const jopf = "𝕛"; const Jscr = "𝒥"; const jscr = "𝒿"; const Jsercy = "Ј"; const jsercy = "ј"; const Jukcy = "Є"; const jukcy = "є"; const Kappa = "Κ"; const kappa = "κ"; const kappav = "ϰ"; const Kcedil = "Ķ"; const kcedil = "ķ"; const Kcy = "К"; const kcy = "к"; const Kfr = "𝔎"; const kfr = "𝔨"; const kgreen = "ĸ"; const KHcy = "Х"; const khcy = "х"; const KJcy = "Ќ"; const kjcy = "ќ"; const Kopf = "𝕂"; const kopf = "𝕜"; const Kscr = "𝒦"; const kscr = "𝓀"; const lAarr = "⇚"; const Lacute = "Ĺ"; const lacute = "ĺ"; const laemptyv = "⦴"; const lagran = "ℒ"; const Lambda = "Λ"; const lambda = "λ"; const lang = "⟨"; const Lang = "⟪"; const langd = "⦑"; const langle = "⟨"; const lap = "⪅"; const Laplacetrf = "ℒ"; const laquo$1 = "«"; const larrb = "⇤"; const larrbfs = "⤟"; const larr = "←"; const Larr = "↞"; const lArr = "⇐"; const larrfs = "⤝"; const larrhk = "↩"; const larrlp = "↫"; const larrpl = "⤹"; const larrsim = "⥳"; const larrtl = "↢"; const latail = "⤙"; const lAtail = "⤛"; const lat = "⪫"; const late = "⪭"; const lates = "⪭︀"; const lbarr = "⤌"; const lBarr = "⤎"; const lbbrk = "❲"; const lbrace = "{"; const lbrack = "["; const lbrke = "⦋"; const lbrksld = "⦏"; const lbrkslu = "⦍"; const Lcaron = "Ľ"; const lcaron = "ľ"; const Lcedil = "Ļ"; const lcedil = "ļ"; const lceil = "⌈"; const lcub = "{"; const Lcy = "Л"; const lcy = "л"; const ldca = "⤶"; const ldquo = "“"; const ldquor = "„"; const ldrdhar = "⥧"; const ldrushar = "⥋"; const ldsh = "↲"; const le = "≤"; const lE = "≦"; const LeftAngleBracket = "⟨"; const LeftArrowBar = "⇤"; const leftarrow = "←"; const LeftArrow = "←"; const Leftarrow = "⇐"; const LeftArrowRightArrow = "⇆"; const leftarrowtail = "↢"; const LeftCeiling = "⌈"; const LeftDoubleBracket = "⟦"; const LeftDownTeeVector = "⥡"; const LeftDownVectorBar = "⥙"; const LeftDownVector = "⇃"; const LeftFloor = "⌊"; const leftharpoondown = "↽"; const leftharpoonup = "↼"; const leftleftarrows = "⇇"; const leftrightarrow = "↔"; const LeftRightArrow = "↔"; const Leftrightarrow = "⇔"; const leftrightarrows = "⇆"; const leftrightharpoons = "⇋"; const leftrightsquigarrow = "↭"; const LeftRightVector = "⥎"; const LeftTeeArrow = "↤"; const LeftTee = "⊣"; const LeftTeeVector = "⥚"; const leftthreetimes = "⋋"; const LeftTriangleBar = "⧏"; const LeftTriangle = "⊲"; const LeftTriangleEqual = "⊴"; const LeftUpDownVector = "⥑"; const LeftUpTeeVector = "⥠"; const LeftUpVectorBar = "⥘"; const LeftUpVector = "↿"; const LeftVectorBar = "⥒"; const LeftVector = "↼"; const lEg = "⪋"; const leg = "⋚"; const leq = "≤"; const leqq = "≦"; const leqslant = "⩽"; const lescc = "⪨"; const les = "⩽"; const lesdot = "⩿"; const lesdoto = "⪁"; const lesdotor = "⪃"; const lesg = "⋚︀"; const lesges = "⪓"; const lessapprox = "⪅"; const lessdot = "⋖"; const lesseqgtr = "⋚"; const lesseqqgtr = "⪋"; const LessEqualGreater = "⋚"; const LessFullEqual = "≦"; const LessGreater = "≶"; const lessgtr = "≶"; const LessLess = "⪡"; const lesssim = "≲"; const LessSlantEqual = "⩽"; const LessTilde = "≲"; const lfisht = "⥼"; const lfloor = "⌊"; const Lfr = "𝔏"; const lfr = "𝔩"; const lg = "≶"; const lgE = "⪑"; const lHar = "⥢"; const lhard = "↽"; const lharu = "↼"; const lharul = "⥪"; const lhblk = "▄"; const LJcy = "Љ"; const ljcy = "љ"; const llarr = "⇇"; const ll = "≪"; const Ll = "⋘"; const llcorner = "⌞"; const Lleftarrow = "⇚"; const llhard = "⥫"; const lltri = "◺"; const Lmidot = "Ŀ"; const lmidot = "ŀ"; const lmoustache = "⎰"; const lmoust = "⎰"; const lnap = "⪉"; const lnapprox = "⪉"; const lne = "⪇"; const lnE = "≨"; const lneq = "⪇"; const lneqq = "≨"; const lnsim = "⋦"; const loang = "⟬"; const loarr = "⇽"; const lobrk = "⟦"; const longleftarrow = "⟵"; const LongLeftArrow = "⟵"; const Longleftarrow = "⟸"; const longleftrightarrow = "⟷"; const LongLeftRightArrow = "⟷"; const Longleftrightarrow = "⟺"; const longmapsto = "⟼"; const longrightarrow = "⟶"; const LongRightArrow = "⟶"; const Longrightarrow = "⟹"; const looparrowleft = "↫"; const looparrowright = "↬"; const lopar = "⦅"; const Lopf = "𝕃"; const lopf = "𝕝"; const loplus = "⨭"; const lotimes = "⨴"; const lowast = "∗"; const lowbar = "_"; const LowerLeftArrow = "↙"; const LowerRightArrow = "↘"; const loz = "◊"; const lozenge = "◊"; const lozf = "⧫"; const lpar = "("; const lparlt = "⦓"; const lrarr = "⇆"; const lrcorner = "⌟"; const lrhar = "⇋"; const lrhard = "⥭"; const lrm = "‎"; const lrtri = "⊿"; const lsaquo = "‹"; const lscr = "𝓁"; const Lscr = "ℒ"; const lsh = "↰"; const Lsh = "↰"; const lsim = "≲"; const lsime = "⪍"; const lsimg = "⪏"; const lsqb = "["; const lsquo = "‘"; const lsquor = "‚"; const Lstrok = "Ł"; const lstrok = "ł"; const ltcc = "⪦"; const ltcir = "⩹"; const lt$2 = "<"; const LT$1 = "<"; const Lt = "≪"; const ltdot = "⋖"; const lthree = "⋋"; const ltimes = "⋉"; const ltlarr = "⥶"; const ltquest = "⩻"; const ltri = "◃"; const ltrie = "⊴"; const ltrif = "◂"; const ltrPar = "⦖"; const lurdshar = "⥊"; const luruhar = "⥦"; const lvertneqq = "≨︀"; const lvnE = "≨︀"; const macr$1 = "¯"; const male = "♂"; const malt = "✠"; const maltese = "✠"; const map = "↦"; const mapsto = "↦"; const mapstodown = "↧"; const mapstoleft = "↤"; const mapstoup = "↥"; const marker = "▮"; const mcomma = "⨩"; const Mcy = "М"; const mcy = "м"; const mdash = "—"; const mDDot = "∺"; const measuredangle = "∡"; const MediumSpace = " "; const Mellintrf = "ℳ"; const Mfr = "𝔐"; const mfr = "𝔪"; const mho = "℧"; const micro$1 = "µ"; const midast = "*"; const midcir = "⫰"; const mid = "∣"; const middot$1 = "·"; const minusb = "⊟"; const minus = "−"; const minusd = "∸"; const minusdu = "⨪"; const MinusPlus = "∓"; const mlcp = "⫛"; const mldr = "…"; const mnplus = "∓"; const models = "⊧"; const Mopf = "𝕄"; const mopf = "𝕞"; const mp = "∓"; const mscr = "𝓂"; const Mscr = "ℳ"; const mstpos = "∾"; const Mu = "Μ"; const mu = "μ"; const multimap = "⊸"; const mumap = "⊸"; const nabla = "∇"; const Nacute = "Ń"; const nacute = "ń"; const nang = "∠⃒"; const nap = "≉"; const napE = "⩰̸"; const napid = "≋̸"; const napos = "ʼn"; const napprox = "≉"; const natural = "♮"; const naturals = "ℕ"; const natur = "♮"; const nbsp$1 = " "; const nbump = "≎̸"; const nbumpe = "≏̸"; const ncap = "⩃"; const Ncaron = "Ň"; const ncaron = "ň"; const Ncedil = "Ņ"; const ncedil = "ņ"; const ncong = "≇"; const ncongdot = "⩭̸"; const ncup = "⩂"; const Ncy = "Н"; const ncy = "н"; const ndash = "–"; const nearhk = "⤤"; const nearr = "↗"; const neArr = "⇗"; const nearrow = "↗"; const ne = "≠"; const nedot = "≐̸"; const NegativeMediumSpace = "​"; const NegativeThickSpace = "​"; const NegativeThinSpace = "​"; const NegativeVeryThinSpace = "​"; const nequiv = "≢"; const nesear = "⤨"; const nesim = "≂̸"; const NestedGreaterGreater = "≫"; const NestedLessLess = "≪"; const NewLine = "\n"; const nexist = "∄"; const nexists = "∄"; const Nfr = "𝔑"; const nfr = "𝔫"; const ngE = "≧̸"; const nge = "≱"; const ngeq = "≱"; const ngeqq = "≧̸"; const ngeqslant = "⩾̸"; const nges = "⩾̸"; const nGg = "⋙̸"; const ngsim = "≵"; const nGt = "≫⃒"; const ngt = "≯"; const ngtr = "≯"; const nGtv = "≫̸"; const nharr = "↮"; const nhArr = "⇎"; const nhpar = "⫲"; const ni = "∋"; const nis = "⋼"; const nisd = "⋺"; const niv = "∋"; const NJcy = "Њ"; const njcy = "њ"; const nlarr = "↚"; const nlArr = "⇍"; const nldr = "‥"; const nlE = "≦̸"; const nle = "≰"; const nleftarrow = "↚"; const nLeftarrow = "⇍"; const nleftrightarrow = "↮"; const nLeftrightarrow = "⇎"; const nleq = "≰"; const nleqq = "≦̸"; const nleqslant = "⩽̸"; const nles = "⩽̸"; const nless = "≮"; const nLl = "⋘̸"; const nlsim = "≴"; const nLt = "≪⃒"; const nlt = "≮"; const nltri = "⋪"; const nltrie = "⋬"; const nLtv = "≪̸"; const nmid = "∤"; const NoBreak = "⁠"; const NonBreakingSpace = " "; const nopf = "𝕟"; const Nopf = "ℕ"; const Not = "⫬"; const not$1 = "¬"; const NotCongruent = "≢"; const NotCupCap = "≭"; const NotDoubleVerticalBar = "∦"; const NotElement = "∉"; const NotEqual = "≠"; const NotEqualTilde = "≂̸"; const NotExists = "∄"; const NotGreater = "≯"; const NotGreaterEqual = "≱"; const NotGreaterFullEqual = "≧̸"; const NotGreaterGreater = "≫̸"; const NotGreaterLess = "≹"; const NotGreaterSlantEqual = "⩾̸"; const NotGreaterTilde = "≵"; const NotHumpDownHump = "≎̸"; const NotHumpEqual = "≏̸"; const notin = "∉"; const notindot = "⋵̸"; const notinE = "⋹̸"; const notinva = "∉"; const notinvb = "⋷"; const notinvc = "⋶"; const NotLeftTriangleBar = "⧏̸"; const NotLeftTriangle = "⋪"; const NotLeftTriangleEqual = "⋬"; const NotLess = "≮"; const NotLessEqual = "≰"; const NotLessGreater = "≸"; const NotLessLess = "≪̸"; const NotLessSlantEqual = "⩽̸"; const NotLessTilde = "≴"; const NotNestedGreaterGreater = "⪢̸"; const NotNestedLessLess = "⪡̸"; const notni = "∌"; const notniva = "∌"; const notnivb = "⋾"; const notnivc = "⋽"; const NotPrecedes = "⊀"; const NotPrecedesEqual = "⪯̸"; const NotPrecedesSlantEqual = "⋠"; const NotReverseElement = "∌"; const NotRightTriangleBar = "⧐̸"; const NotRightTriangle = "⋫"; const NotRightTriangleEqual = "⋭"; const NotSquareSubset = "⊏̸"; const NotSquareSubsetEqual = "⋢"; const NotSquareSuperset = "⊐̸"; const NotSquareSupersetEqual = "⋣"; const NotSubset = "⊂⃒"; const NotSubsetEqual = "⊈"; const NotSucceeds = "⊁"; const NotSucceedsEqual = "⪰̸"; const NotSucceedsSlantEqual = "⋡"; const NotSucceedsTilde = "≿̸"; const NotSuperset = "⊃⃒"; const NotSupersetEqual = "⊉"; const NotTilde = "≁"; const NotTildeEqual = "≄"; const NotTildeFullEqual = "≇"; const NotTildeTilde = "≉"; const NotVerticalBar = "∤"; const nparallel = "∦"; const npar = "∦"; const nparsl = "⫽⃥"; const npart = "∂̸"; const npolint = "⨔"; const npr = "⊀"; const nprcue = "⋠"; const nprec = "⊀"; const npreceq = "⪯̸"; const npre = "⪯̸"; const nrarrc = "⤳̸"; const nrarr = "↛"; const nrArr = "⇏"; const nrarrw = "↝̸"; const nrightarrow = "↛"; const nRightarrow = "⇏"; const nrtri = "⋫"; const nrtrie = "⋭"; const nsc = "⊁"; const nsccue = "⋡"; const nsce = "⪰̸"; const Nscr = "𝒩"; const nscr = "𝓃"; const nshortmid = "∤"; const nshortparallel = "∦"; const nsim = "≁"; const nsime = "≄"; const nsimeq = "≄"; const nsmid = "∤"; const nspar = "∦"; const nsqsube = "⋢"; const nsqsupe = "⋣"; const nsub = "⊄"; const nsubE = "⫅̸"; const nsube = "⊈"; const nsubset = "⊂⃒"; const nsubseteq = "⊈"; const nsubseteqq = "⫅̸"; const nsucc = "⊁"; const nsucceq = "⪰̸"; const nsup = "⊅"; const nsupE = "⫆̸"; const nsupe = "⊉"; const nsupset = "⊃⃒"; const nsupseteq = "⊉"; const nsupseteqq = "⫆̸"; const ntgl = "≹"; const Ntilde$1 = "Ñ"; const ntilde$1 = "ñ"; const ntlg = "≸"; const ntriangleleft = "⋪"; const ntrianglelefteq = "⋬"; const ntriangleright = "⋫"; const ntrianglerighteq = "⋭"; const Nu = "Ν"; const nu = "ν"; const num = "#"; const numero = "№"; const numsp = " "; const nvap = "≍⃒"; const nvdash = "⊬"; const nvDash = "⊭"; const nVdash = "⊮"; const nVDash = "⊯"; const nvge = "≥⃒"; const nvgt = ">⃒"; const nvHarr = "⤄"; const nvinfin = "⧞"; const nvlArr = "⤂"; const nvle = "≤⃒"; const nvlt = "<⃒"; const nvltrie = "⊴⃒"; const nvrArr = "⤃"; const nvrtrie = "⊵⃒"; const nvsim = "∼⃒"; const nwarhk = "⤣"; const nwarr = "↖"; const nwArr = "⇖"; const nwarrow = "↖"; const nwnear = "⤧"; const Oacute$1 = "Ó"; const oacute$1 = "ó"; const oast = "⊛"; const Ocirc$1 = "Ô"; const ocirc$1 = "ô"; const ocir = "⊚"; const Ocy = "О"; const ocy = "о"; const odash = "⊝"; const Odblac = "Ő"; const odblac = "ő"; const odiv = "⨸"; const odot = "⊙"; const odsold = "⦼"; const OElig = "Œ"; const oelig = "œ"; const ofcir = "⦿"; const Ofr = "𝔒"; const ofr = "𝔬"; const ogon = "˛"; const Ograve$1 = "Ò"; const ograve$1 = "ò"; const ogt = "⧁"; const ohbar = "⦵"; const ohm = "Ω"; const oint = "∮"; const olarr = "↺"; const olcir = "⦾"; const olcross = "⦻"; const oline = "‾"; const olt = "⧀"; const Omacr = "Ō"; const omacr = "ō"; const Omega = "Ω"; const omega = "ω"; const Omicron = "Ο"; const omicron = "ο"; const omid = "⦶"; const ominus = "⊖"; const Oopf = "𝕆"; const oopf = "𝕠"; const opar = "⦷"; const OpenCurlyDoubleQuote = "“"; const OpenCurlyQuote = "‘"; const operp = "⦹"; const oplus = "⊕"; const orarr = "↻"; const Or = "⩔"; const or = "∨"; const ord = "⩝"; const order = "ℴ"; const orderof = "ℴ"; const ordf$1 = "ª"; const ordm$1 = "º"; const origof = "⊶"; const oror = "⩖"; const orslope = "⩗"; const orv = "⩛"; const oS = "Ⓢ"; const Oscr = "𝒪"; const oscr = "ℴ"; const Oslash$1 = "Ø"; const oslash$1 = "ø"; const osol = "⊘"; const Otilde$1 = "Õ"; const otilde$1 = "õ"; const otimesas = "⨶"; const Otimes = "⨷"; const otimes = "⊗"; const Ouml$1 = "Ö"; const ouml$1 = "ö"; const ovbar = "⌽"; const OverBar = "‾"; const OverBrace = "⏞"; const OverBracket = "⎴"; const OverParenthesis = "⏜"; const para$1 = "¶"; const parallel = "∥"; const par = "∥"; const parsim = "⫳"; const parsl = "⫽"; const part = "∂"; const PartialD = "∂"; const Pcy = "П"; const pcy = "п"; const percnt = "%"; const period = "."; const permil = "‰"; const perp = "⊥"; const pertenk = "‱"; const Pfr = "𝔓"; const pfr = "𝔭"; const Phi = "Φ"; const phi = "φ"; const phiv = "ϕ"; const phmmat = "ℳ"; const phone = "☎"; const Pi = "Π"; const pi = "π"; const pitchfork = "⋔"; const piv = "ϖ"; const planck = "ℏ"; const planckh = "ℎ"; const plankv = "ℏ"; const plusacir = "⨣"; const plusb = "⊞"; const pluscir = "⨢"; const plus = "+"; const plusdo = "∔"; const plusdu = "⨥"; const pluse = "⩲"; const PlusMinus = "±"; const plusmn$1 = "±"; const plussim = "⨦"; const plustwo = "⨧"; const pm = "±"; const Poincareplane = "ℌ"; const pointint = "⨕"; const popf = "𝕡"; const Popf = "ℙ"; const pound$1 = "£"; const prap = "⪷"; const Pr = "⪻"; const pr = "≺"; const prcue = "≼"; const precapprox = "⪷"; const prec = "≺"; const preccurlyeq = "≼"; const Precedes = "≺"; const PrecedesEqual = "⪯"; const PrecedesSlantEqual = "≼"; const PrecedesTilde = "≾"; const preceq = "⪯"; const precnapprox = "⪹"; const precneqq = "⪵"; const precnsim = "⋨"; const pre = "⪯"; const prE = "⪳"; const precsim = "≾"; const prime = "′"; const Prime = "″"; const primes = "ℙ"; const prnap = "⪹"; const prnE = "⪵"; const prnsim = "⋨"; const prod = "∏"; const Product = "∏"; const profalar = "⌮"; const profline = "⌒"; const profsurf = "⌓"; const prop = "∝"; const Proportional = "∝"; const Proportion = "∷"; const propto = "∝"; const prsim = "≾"; const prurel = "⊰"; const Pscr = "𝒫"; const pscr = "𝓅"; const Psi = "Ψ"; const psi = "ψ"; const puncsp = " "; const Qfr = "𝔔"; const qfr = "𝔮"; const qint = "⨌"; const qopf = "𝕢"; const Qopf = "ℚ"; const qprime = "⁗"; const Qscr = "𝒬"; const qscr = "𝓆"; const quaternions = "ℍ"; const quatint = "⨖"; const quest = "?"; const questeq = "≟"; const quot$2 = '"'; const QUOT$1 = '"'; const rAarr = "⇛"; const race = "∽̱"; const Racute = "Ŕ"; const racute = "ŕ"; const radic = "√"; const raemptyv = "⦳"; const rang = "⟩"; const Rang = "⟫"; const rangd = "⦒"; const range = "⦥"; const rangle = "⟩"; const raquo$1 = "»"; const rarrap = "⥵"; const rarrb = "⇥"; const rarrbfs = "⤠"; const rarrc = "⤳"; const rarr = "→"; const Rarr = "↠"; const rArr = "⇒"; const rarrfs = "⤞"; const rarrhk = "↪"; const rarrlp = "↬"; const rarrpl = "⥅"; const rarrsim = "⥴"; const Rarrtl = "⤖"; const rarrtl = "↣"; const rarrw = "↝"; const ratail = "⤚"; const rAtail = "⤜"; const ratio = "∶"; const rationals = "ℚ"; const rbarr = "⤍"; const rBarr = "⤏"; const RBarr = "⤐"; const rbbrk = "❳"; const rbrace = "}"; const rbrack = "]"; const rbrke = "⦌"; const rbrksld = "⦎"; const rbrkslu = "⦐"; const Rcaron = "Ř"; const rcaron = "ř"; const Rcedil = "Ŗ"; const rcedil = "ŗ"; const rceil = "⌉"; const rcub = "}"; const Rcy = "Р"; const rcy = "р"; const rdca = "⤷"; const rdldhar = "⥩"; const rdquo = "”"; const rdquor = "”"; const rdsh = "↳"; const real = "ℜ"; const realine = "ℛ"; const realpart = "ℜ"; const reals = "ℝ"; const Re = "ℜ"; const rect = "▭"; const reg$1 = "®"; const REG$1 = "®"; const ReverseElement = "∋"; const ReverseEquilibrium = "⇋"; const ReverseUpEquilibrium = "⥯"; const rfisht = "⥽"; const rfloor = "⌋"; const rfr = "𝔯"; const Rfr = "ℜ"; const rHar = "⥤"; const rhard = "⇁"; const rharu = "⇀"; const rharul = "⥬"; const Rho = "Ρ"; const rho = "ρ"; const rhov = "ϱ"; const RightAngleBracket = "⟩"; const RightArrowBar = "⇥"; const rightarrow = "→"; const RightArrow = "→"; const Rightarrow = "⇒"; const RightArrowLeftArrow = "⇄"; const rightarrowtail = "↣"; const RightCeiling = "⌉"; const RightDoubleBracket = "⟧"; const RightDownTeeVector = "⥝"; const RightDownVectorBar = "⥕"; const RightDownVector = "⇂"; const RightFloor = "⌋"; const rightharpoondown = "⇁"; const rightharpoonup = "⇀"; const rightleftarrows = "⇄"; const rightleftharpoons = "⇌"; const rightrightarrows = "⇉"; const rightsquigarrow = "↝"; const RightTeeArrow = "↦"; const RightTee = "⊢"; const RightTeeVector = "⥛"; const rightthreetimes = "⋌"; const RightTriangleBar = "⧐"; const RightTriangle = "⊳"; const RightTriangleEqual = "⊵"; const RightUpDownVector = "⥏"; const RightUpTeeVector = "⥜"; const RightUpVectorBar = "⥔"; const RightUpVector = "↾"; const RightVectorBar = "⥓"; const RightVector = "⇀"; const ring = "˚"; const risingdotseq = "≓"; const rlarr = "⇄"; const rlhar = "⇌"; const rlm = "‏"; const rmoustache = "⎱"; const rmoust = "⎱"; const rnmid = "⫮"; const roang = "⟭"; const roarr = "⇾"; const robrk = "⟧"; const ropar = "⦆"; const ropf = "𝕣"; const Ropf = "ℝ"; const roplus = "⨮"; const rotimes = "⨵"; const RoundImplies = "⥰"; const rpar = ")"; const rpargt = "⦔"; const rppolint = "⨒"; const rrarr = "⇉"; const Rrightarrow = "⇛"; const rsaquo = "›"; const rscr = "𝓇"; const Rscr = "ℛ"; const rsh = "↱"; const Rsh = "↱"; const rsqb = "]"; const rsquo = "’"; const rsquor = "’"; const rthree = "⋌"; const rtimes = "⋊"; const rtri = "▹"; const rtrie = "⊵"; const rtrif = "▸"; const rtriltri = "⧎"; const RuleDelayed = "⧴"; const ruluhar = "⥨"; const rx = "℞"; const Sacute = "Ś"; const sacute = "ś"; const sbquo = "‚"; const scap = "⪸"; const Scaron = "Š"; const scaron = "š"; const Sc = "⪼"; const sc = "≻"; const sccue = "≽"; const sce = "⪰"; const scE = "⪴"; const Scedil = "Ş"; const scedil = "ş"; const Scirc = "Ŝ"; const scirc = "ŝ"; const scnap = "⪺"; const scnE = "⪶"; const scnsim = "⋩"; const scpolint = "⨓"; const scsim = "≿"; const Scy = "С"; const scy = "с"; const sdotb = "⊡"; const sdot = "⋅"; const sdote = "⩦"; const searhk = "⤥"; const searr = "↘"; const seArr = "⇘"; const searrow = "↘"; const sect$1 = "§"; const semi = ";"; const seswar = "⤩"; const setminus = "∖"; const setmn = "∖"; const sext = "✶"; const Sfr = "𝔖"; const sfr = "𝔰"; const sfrown = "⌢"; const sharp = "♯"; const SHCHcy = "Щ"; const shchcy = "щ"; const SHcy = "Ш"; const shcy = "ш"; const ShortDownArrow = "↓"; const ShortLeftArrow = "←"; const shortmid = "∣"; const shortparallel = "∥"; const ShortRightArrow = "→"; const ShortUpArrow = "↑"; const shy$1 = "­"; const Sigma = "Σ"; const sigma = "σ"; const sigmaf = "ς"; const sigmav = "ς"; const sim = "∼"; const simdot = "⩪"; const sime = "≃"; const simeq = "≃"; const simg = "⪞"; const simgE = "⪠"; const siml = "⪝"; const simlE = "⪟"; const simne = "≆"; const simplus = "⨤"; const simrarr = "⥲"; const slarr = "←"; const SmallCircle = "∘"; const smallsetminus = "∖"; const smashp = "⨳"; const smeparsl = "⧤"; const smid = "∣"; const smile = "⌣"; const smt = "⪪"; const smte = "⪬"; const smtes = "⪬︀"; const SOFTcy = "Ь"; const softcy = "ь"; const solbar = "⌿"; const solb = "⧄"; const sol = "/"; const Sopf = "𝕊"; const sopf = "𝕤"; const spades = "♠"; const spadesuit = "♠"; const spar = "∥"; const sqcap = "⊓"; const sqcaps = "⊓︀"; const sqcup = "⊔"; const sqcups = "⊔︀"; const Sqrt = "√"; const sqsub = "⊏"; const sqsube = "⊑"; const sqsubset = "⊏"; const sqsubseteq = "⊑"; const sqsup = "⊐"; const sqsupe = "⊒"; const sqsupset = "⊐"; const sqsupseteq = "⊒"; const square = "□"; const Square = "□"; const SquareIntersection = "⊓"; const SquareSubset = "⊏"; const SquareSubsetEqual = "⊑"; const SquareSuperset = "⊐"; const SquareSupersetEqual = "⊒"; const SquareUnion = "⊔"; const squarf = "▪"; const squ = "□"; const squf = "▪"; const srarr = "→"; const Sscr = "𝒮"; const sscr = "𝓈"; const ssetmn = "∖"; const ssmile = "⌣"; const sstarf = "⋆"; const Star = "⋆"; const star = "☆"; const starf = "★"; const straightepsilon = "ϵ"; const straightphi = "ϕ"; const strns = "¯"; const sub = "⊂"; const Sub = "⋐"; const subdot = "⪽"; const subE = "⫅"; const sube = "⊆"; const subedot = "⫃"; const submult = "⫁"; const subnE = "⫋"; const subne = "⊊"; const subplus = "⪿"; const subrarr = "⥹"; const subset = "⊂"; const Subset = "⋐"; const subseteq = "⊆"; const subseteqq = "⫅"; const SubsetEqual = "⊆"; const subsetneq = "⊊"; const subsetneqq = "⫋"; const subsim = "⫇"; const subsub = "⫕"; const subsup = "⫓"; const succapprox = "⪸"; const succ = "≻"; const succcurlyeq = "≽"; const Succeeds = "≻"; const SucceedsEqual = "⪰"; const SucceedsSlantEqual = "≽"; const SucceedsTilde = "≿"; const succeq = "⪰"; const succnapprox = "⪺"; const succneqq = "⪶"; const succnsim = "⋩"; const succsim = "≿"; const SuchThat = "∋"; const sum = "∑"; const Sum = "∑"; const sung = "♪"; const sup1$1 = "¹"; const sup2$1 = "²"; const sup3$1 = "³"; const sup = "⊃"; const Sup = "⋑"; const supdot = "⪾"; const supdsub = "⫘"; const supE = "⫆"; const supe = "⊇"; const supedot = "⫄"; const Superset = "⊃"; const SupersetEqual = "⊇"; const suphsol = "⟉"; const suphsub = "⫗"; const suplarr = "⥻"; const supmult = "⫂"; const supnE = "⫌"; const supne = "⊋"; const supplus = "⫀"; const supset = "⊃"; const Supset = "⋑"; const supseteq = "⊇"; const supseteqq = "⫆"; const supsetneq = "⊋"; const supsetneqq = "⫌"; const supsim = "⫈"; const supsub = "⫔"; const supsup = "⫖"; const swarhk = "⤦"; const swarr = "↙"; const swArr = "⇙"; const swarrow = "↙"; const swnwar = "⤪"; const szlig$1 = "ß"; const Tab = " "; const target = "⌖"; const Tau = "Τ"; const tau = "τ"; const tbrk = "⎴"; const Tcaron = "Ť"; const tcaron = "ť"; const Tcedil = "Ţ"; const tcedil = "ţ"; const Tcy = "Т"; const tcy = "т"; const tdot = "⃛"; const telrec = "⌕"; const Tfr = "𝔗"; const tfr = "𝔱"; const there4 = "∴"; const therefore = "∴"; const Therefore = "∴"; const Theta = "Θ"; const theta = "θ"; const thetasym = "ϑ"; const thetav = "ϑ"; const thickapprox = "≈"; const thicksim = "∼"; const ThickSpace = "  "; const ThinSpace = " "; const thinsp = " "; const thkap = "≈"; const thksim = "∼"; const THORN$1 = "Þ"; const thorn$1 = "þ"; const tilde = "˜"; const Tilde = "∼"; const TildeEqual = "≃"; const TildeFullEqual = "≅"; const TildeTilde = "≈"; const timesbar = "⨱"; const timesb = "⊠"; const times$1 = "×"; const timesd = "⨰"; const tint = "∭"; const toea = "⤨"; const topbot = "⌶"; const topcir = "⫱"; const top = "⊤"; const Topf = "𝕋"; const topf = "𝕥"; const topfork = "⫚"; const tosa = "⤩"; const tprime = "‴"; const trade = "™"; const TRADE = "™"; const triangle = "▵"; const triangledown = "▿"; const triangleleft = "◃"; const trianglelefteq = "⊴"; const triangleq = "≜"; const triangleright = "▹"; const trianglerighteq = "⊵"; const tridot = "◬"; const trie = "≜"; const triminus = "⨺"; const TripleDot = "⃛"; const triplus = "⨹"; const trisb = "⧍"; const tritime = "⨻"; const trpezium = "⏢"; const Tscr = "𝒯"; const tscr = "𝓉"; const TScy = "Ц"; const tscy = "ц"; const TSHcy = "Ћ"; const tshcy = "ћ"; const Tstrok = "Ŧ"; const tstrok = "ŧ"; const twixt = "≬"; const twoheadleftarrow = "↞"; const twoheadrightarrow = "↠"; const Uacute$1 = "Ú"; const uacute$1 = "ú"; const uarr = "↑"; const Uarr = "↟"; const uArr = "⇑"; const Uarrocir = "⥉"; const Ubrcy = "Ў"; const ubrcy = "ў"; const Ubreve = "Ŭ"; const ubreve = "ŭ"; const Ucirc$1 = "Û"; const ucirc$1 = "û"; const Ucy = "У"; const ucy = "у"; const udarr = "⇅"; const Udblac = "Ű"; const udblac = "ű"; const udhar = "⥮"; const ufisht = "⥾"; const Ufr = "𝔘"; const ufr = "𝔲"; const Ugrave$1 = "Ù"; const ugrave$1 = "ù"; const uHar = "⥣"; const uharl = "↿"; const uharr = "↾"; const uhblk = "▀"; const ulcorn = "⌜"; const ulcorner = "⌜"; const ulcrop = "⌏"; const ultri = "◸"; const Umacr = "Ū"; const umacr = "ū"; const uml$1 = "¨"; const UnderBar = "_"; const UnderBrace = "⏟"; const UnderBracket = "⎵"; const UnderParenthesis = "⏝"; const Union = "⋃"; const UnionPlus = "⊎"; const Uogon = "Ų"; const uogon = "ų"; const Uopf = "𝕌"; const uopf = "𝕦"; const UpArrowBar = "⤒"; const uparrow = "↑"; const UpArrow = "↑"; const Uparrow = "⇑"; const UpArrowDownArrow = "⇅"; const updownarrow = "↕"; const UpDownArrow = "↕"; const Updownarrow = "⇕"; const UpEquilibrium = "⥮"; const upharpoonleft = "↿"; const upharpoonright = "↾"; const uplus = "⊎"; const UpperLeftArrow = "↖"; const UpperRightArrow = "↗"; const upsi = "υ"; const Upsi = "ϒ"; const upsih = "ϒ"; const Upsilon = "Υ"; const upsilon = "υ"; const UpTeeArrow = "↥"; const UpTee = "⊥"; const upuparrows = "⇈"; const urcorn = "⌝"; const urcorner = "⌝"; const urcrop = "⌎"; const Uring = "Ů"; const uring = "ů"; const urtri = "◹"; const Uscr = "𝒰"; const uscr = "𝓊"; const utdot = "⋰"; const Utilde = "Ũ"; const utilde = "ũ"; const utri = "▵"; const utrif = "▴"; const uuarr = "⇈"; const Uuml$1 = "Ü"; const uuml$1 = "ü"; const uwangle = "⦧"; const vangrt = "⦜"; const varepsilon = "ϵ"; const varkappa = "ϰ"; const varnothing = "∅"; const varphi = "ϕ"; const varpi = "ϖ"; const varpropto = "∝"; const varr = "↕"; const vArr = "⇕"; const varrho = "ϱ"; const varsigma = "ς"; const varsubsetneq = "⊊︀"; const varsubsetneqq = "⫋︀"; const varsupsetneq = "⊋︀"; const varsupsetneqq = "⫌︀"; const vartheta = "ϑ"; const vartriangleleft = "⊲"; const vartriangleright = "⊳"; const vBar = "⫨"; const Vbar = "⫫"; const vBarv = "⫩"; const Vcy = "В"; const vcy = "в"; const vdash = "⊢"; const vDash = "⊨"; const Vdash = "⊩"; const VDash = "⊫"; const Vdashl = "⫦"; const veebar = "⊻"; const vee = "∨"; const Vee = "⋁"; const veeeq = "≚"; const vellip = "⋮"; const verbar = "|"; const Verbar = "‖"; const vert = "|"; const Vert = "‖"; const VerticalBar = "∣"; const VerticalLine = "|"; const VerticalSeparator = "❘"; const VerticalTilde = "≀"; const VeryThinSpace = " "; const Vfr = "𝔙"; const vfr = "𝔳"; const vltri = "⊲"; const vnsub = "⊂⃒"; const vnsup = "⊃⃒"; const Vopf = "𝕍"; const vopf = "𝕧"; const vprop = "∝"; const vrtri = "⊳"; const Vscr = "𝒱"; const vscr = "𝓋"; const vsubnE = "⫋︀"; const vsubne = "⊊︀"; const vsupnE = "⫌︀"; const vsupne = "⊋︀"; const Vvdash = "⊪"; const vzigzag = "⦚"; const Wcirc = "Ŵ"; const wcirc = "ŵ"; const wedbar = "⩟"; const wedge = "∧"; const Wedge = "⋀"; const wedgeq = "≙"; const weierp = "℘"; const Wfr = "𝔚"; const wfr = "𝔴"; const Wopf = "𝕎"; const wopf = "𝕨"; const wp = "℘"; const wr = "≀"; const wreath = "≀"; const Wscr = "𝒲"; const wscr = "𝓌"; const xcap = "⋂"; const xcirc = "◯"; const xcup = "⋃"; const xdtri = "▽"; const Xfr = "𝔛"; const xfr = "𝔵"; const xharr = "⟷"; const xhArr = "⟺"; const Xi = "Ξ"; const xi = "ξ"; const xlarr = "⟵"; const xlArr = "⟸"; const xmap = "⟼"; const xnis = "⋻"; const xodot = "⨀"; const Xopf = "𝕏"; const xopf = "𝕩"; const xoplus = "⨁"; const xotime = "⨂"; const xrarr = "⟶"; const xrArr = "⟹"; const Xscr = "𝒳"; const xscr = "𝓍"; const xsqcup = "⨆"; const xuplus = "⨄"; const xutri = "△"; const xvee = "⋁"; const xwedge = "⋀"; const Yacute$1 = "Ý"; const yacute$1 = "ý"; const YAcy = "Я"; const yacy = "я"; const Ycirc = "Ŷ"; const ycirc = "ŷ"; const Ycy = "Ы"; const ycy = "ы"; const yen$1 = "¥"; const Yfr = "𝔜"; const yfr = "𝔶"; const YIcy = "Ї"; const yicy = "ї"; const Yopf = "𝕐"; const yopf = "𝕪"; const Yscr = "𝒴"; const yscr = "𝓎"; const YUcy = "Ю"; const yucy = "ю"; const yuml$1 = "ÿ"; const Yuml = "Ÿ"; const Zacute = "Ź"; const zacute = "ź"; const Zcaron = "Ž"; const zcaron = "ž"; const Zcy = "З"; const zcy = "з"; const Zdot = "Ż"; const zdot = "ż"; const zeetrf = "ℨ"; const ZeroWidthSpace = "​"; const Zeta = "Ζ"; const zeta = "ζ"; const zfr = "𝔷"; const Zfr = "ℨ"; const ZHcy = "Ж"; const zhcy = "ж"; const zigrarr = "⇝"; const zopf = "𝕫"; const Zopf = "ℤ"; const Zscr = "𝒵"; const zscr = "𝓏"; const zwj = "‍"; const zwnj = "‌"; const require$$1$1 = { Aacute: Aacute$1, aacute: aacute$1, Abreve, abreve, ac, acd, acE, Acirc: Acirc$1, acirc: acirc$1, acute: acute$1, Acy, acy, AElig: AElig$1, aelig: aelig$1, af, Afr, afr, Agrave: Agrave$1, agrave: agrave$1, alefsym, aleph, Alpha, alpha, Amacr, amacr, amalg, amp: amp$2, AMP: AMP$1, andand, And, and, andd, andslope, andv, ang, ange, angle, angmsdaa, angmsdab, angmsdac, angmsdad, angmsdae, angmsdaf, angmsdag, angmsdah, angmsd, angrt, angrtvb, angrtvbd, angsph, angst, angzarr, Aogon, aogon, Aopf, aopf, apacir, ap, apE, ape, apid, apos: apos$1, ApplyFunction, approx, approxeq, Aring: Aring$1, aring: aring$1, Ascr, ascr, Assign, ast, asymp, asympeq, Atilde: Atilde$1, atilde: atilde$1, Auml: Auml$1, auml: auml$1, awconint, awint, backcong, backepsilon, backprime, backsim, backsimeq, Backslash, Barv, barvee, barwed, Barwed, barwedge, bbrk, bbrktbrk, bcong, Bcy, bcy, bdquo, becaus, because, Because, bemptyv, bepsi, bernou, Bernoullis, Beta, beta, beth, between, Bfr, bfr, bigcap, bigcirc, bigcup, bigodot, bigoplus, bigotimes, bigsqcup, bigstar, bigtriangledown, bigtriangleup, biguplus, bigvee, bigwedge, bkarow, blacklozenge, blacksquare, blacktriangle, blacktriangledown, blacktriangleleft, blacktriangleright, blank, blk12, blk14, blk34, block, bne, bnequiv, bNot, bnot, Bopf, bopf, bot, bottom, bowtie, boxbox, boxdl, boxdL, boxDl, boxDL, boxdr, boxdR, boxDr, boxDR, boxh, boxH, boxhd, boxHd, boxhD, boxHD, boxhu, boxHu, boxhU, boxHU, boxminus, boxplus, boxtimes, boxul, boxuL, boxUl, boxUL, boxur, boxuR, boxUr, boxUR, boxv, boxV, boxvh, boxvH, boxVh, boxVH, boxvl, boxvL, boxVl, boxVL, boxvr, boxvR, boxVr, boxVR, bprime, breve, Breve, brvbar: brvbar$1, bscr, Bscr, bsemi, bsim, bsime, bsolb, bsol, bsolhsub, bull, bullet, bump, bumpE, bumpe, Bumpeq, bumpeq, Cacute, cacute, capand, capbrcup, capcap, cap, Cap, capcup, capdot, CapitalDifferentialD, caps, caret, caron, Cayleys, ccaps, Ccaron, ccaron, Ccedil: Ccedil$1, ccedil: ccedil$1, Ccirc, ccirc, Cconint, ccups, ccupssm, Cdot, cdot, cedil: cedil$1, Cedilla, cemptyv, cent: cent$1, centerdot, CenterDot, cfr, Cfr, CHcy, chcy, check, checkmark, Chi, chi, circ, circeq, circlearrowleft, circlearrowright, circledast, circledcirc, circleddash, CircleDot, circledR, circledS, CircleMinus, CirclePlus, CircleTimes, cir, cirE, cire, cirfnint, cirmid, cirscir, ClockwiseContourIntegral, CloseCurlyDoubleQuote, CloseCurlyQuote, clubs, clubsuit, colon, Colon, Colone, colone, coloneq, comma, commat, comp, compfn, complement, complexes, cong, congdot, Congruent, conint, Conint, ContourIntegral, copf, Copf, coprod, Coproduct, copy: copy$1, COPY: COPY$1, copysr, CounterClockwiseContourIntegral, crarr, cross, Cross, Cscr, cscr, csub, csube, csup, csupe, ctdot, cudarrl, cudarrr, cuepr, cuesc, cularr, cularrp, cupbrcap, cupcap, CupCap, cup, Cup, cupcup, cupdot, cupor, cups, curarr, curarrm, curlyeqprec, curlyeqsucc, curlyvee, curlywedge, curren: curren$1, curvearrowleft, curvearrowright, cuvee, cuwed, cwconint, cwint, cylcty, dagger, Dagger, daleth, darr, Darr, dArr, dash, Dashv, dashv, dbkarow, dblac, Dcaron, dcaron, Dcy, dcy, ddagger, ddarr, DD, dd, DDotrahd, ddotseq, deg: deg$1, Del, Delta, delta, demptyv, dfisht, Dfr, dfr, dHar, dharl, dharr, DiacriticalAcute, DiacriticalDot, DiacriticalDoubleAcute, DiacriticalGrave, DiacriticalTilde, diam, diamond, Diamond, diamondsuit, diams, die: die$1, DifferentialD, digamma, disin, div, divide: divide$1, divideontimes, divonx, DJcy, djcy, dlcorn, dlcrop, dollar, Dopf, dopf, Dot, dot, DotDot, doteq, doteqdot, DotEqual, dotminus, dotplus, dotsquare, doublebarwedge, DoubleContourIntegral, DoubleDot, DoubleDownArrow, DoubleLeftArrow, DoubleLeftRightArrow, DoubleLeftTee, DoubleLongLeftArrow, DoubleLongLeftRightArrow, DoubleLongRightArrow, DoubleRightArrow, DoubleRightTee, DoubleUpArrow, DoubleUpDownArrow, DoubleVerticalBar, DownArrowBar, downarrow, DownArrow, Downarrow, DownArrowUpArrow, DownBreve, downdownarrows, downharpoonleft, downharpoonright, DownLeftRightVector, DownLeftTeeVector, DownLeftVectorBar, DownLeftVector, DownRightTeeVector, DownRightVectorBar, DownRightVector, DownTeeArrow, DownTee, drbkarow, drcorn, drcrop, Dscr, dscr, DScy, dscy, dsol, Dstrok, dstrok, dtdot, dtri, dtrif, duarr, duhar, dwangle, DZcy, dzcy, dzigrarr, Eacute: Eacute$1, eacute: eacute$1, easter, Ecaron, ecaron, Ecirc: Ecirc$1, ecirc: ecirc$1, ecir, ecolon, Ecy, ecy, eDDot, Edot, edot, eDot, ee, efDot, Efr, efr, eg, Egrave: Egrave$1, egrave: egrave$1, egs, egsdot, el, Element: Element$1, elinters, ell, els, elsdot, Emacr, emacr, empty, emptyset, EmptySmallSquare, emptyv, EmptyVerySmallSquare, emsp13, emsp14, emsp, ENG, eng, ensp, Eogon, eogon, Eopf, eopf, epar, eparsl, eplus, epsi, Epsilon, epsilon, epsiv, eqcirc, eqcolon, eqsim, eqslantgtr, eqslantless, Equal, equals, EqualTilde, equest, Equilibrium, equiv, equivDD, eqvparsl, erarr, erDot, escr, Escr, esdot, Esim, esim, Eta, eta, ETH: ETH$1, eth: eth$1, Euml: Euml$1, euml: euml$1, euro, excl, exist, Exists, expectation, exponentiale, ExponentialE, fallingdotseq, Fcy, fcy, female, ffilig, fflig, ffllig, Ffr, ffr, filig, FilledSmallSquare, FilledVerySmallSquare, fjlig, flat, fllig, fltns, fnof, Fopf, fopf, forall, ForAll, fork, forkv, Fouriertrf, fpartint, frac12: frac12$1, frac13, frac14: frac14$1, frac15, frac16, frac18, frac23, frac25, frac34: frac34$1, frac35, frac38, frac45, frac56, frac58, frac78, frasl, frown, fscr, Fscr, gacute, Gamma, gamma, Gammad, gammad, gap, Gbreve, gbreve, Gcedil, Gcirc, gcirc, Gcy, gcy, Gdot, gdot, ge, gE, gEl, gel, geq, geqq, geqslant, gescc, ges, gesdot, gesdoto, gesdotol, gesl, gesles, Gfr, gfr, gg, Gg, ggg, gimel, GJcy, gjcy, gla, gl, glE, glj, gnap, gnapprox, gne, gnE, gneq, gneqq, gnsim, Gopf, gopf, grave, GreaterEqual, GreaterEqualLess, GreaterFullEqual, GreaterGreater, GreaterLess, GreaterSlantEqual, GreaterTilde, Gscr, gscr, gsim, gsime, gsiml, gtcc, gtcir, gt: gt$2, GT: GT$1, Gt, gtdot, gtlPar, gtquest, gtrapprox, gtrarr, gtrdot, gtreqless, gtreqqless, gtrless, gtrsim, gvertneqq, gvnE, Hacek, hairsp, half, hamilt, HARDcy, hardcy, harrcir, harr, hArr, harrw, Hat, hbar, Hcirc, hcirc, hearts, heartsuit, hellip, hercon, hfr, Hfr, HilbertSpace, hksearow, hkswarow, hoarr, homtht, hookleftarrow, hookrightarrow, hopf, Hopf, horbar, HorizontalLine, hscr, Hscr, hslash, Hstrok, hstrok, HumpDownHump, HumpEqual, hybull, hyphen, Iacute: Iacute$1, iacute: iacute$1, ic, Icirc: Icirc$1, icirc: icirc$1, Icy, icy, Idot, IEcy, iecy, iexcl: iexcl$1, iff, ifr, Ifr, Igrave: Igrave$1, igrave: igrave$1, ii, iiiint, iiint, iinfin, iiota, IJlig, ijlig, Imacr, imacr, image, ImaginaryI, imagline, imagpart, imath, Im, imof, imped, Implies, incare, "in": "∈", infin, infintie, inodot, intcal, int, Int, integers, Integral, intercal, Intersection, intlarhk, intprod, InvisibleComma, InvisibleTimes, IOcy, iocy, Iogon, iogon, Iopf, iopf, Iota, iota, iprod, iquest: iquest$1, iscr, Iscr, isin, isindot, isinE, isins, isinsv, isinv, it, Itilde, itilde, Iukcy, iukcy, Iuml: Iuml$1, iuml: iuml$1, Jcirc, jcirc, Jcy, jcy, Jfr, jfr, jmath, Jopf, jopf, Jscr, jscr, Jsercy, jsercy, Jukcy, jukcy, Kappa, kappa, kappav, Kcedil, kcedil, Kcy, kcy, Kfr, kfr, kgreen, KHcy, khcy, KJcy, kjcy, Kopf, kopf, Kscr, kscr, lAarr, Lacute, lacute, laemptyv, lagran, Lambda, lambda, lang, Lang, langd, langle, lap, Laplacetrf, laquo: laquo$1, larrb, larrbfs, larr, Larr, lArr, larrfs, larrhk, larrlp, larrpl, larrsim, larrtl, latail, lAtail, lat, late, lates, lbarr, lBarr, lbbrk, lbrace, lbrack, lbrke, lbrksld, lbrkslu, Lcaron, lcaron, Lcedil, lcedil, lceil, lcub, Lcy, lcy, ldca, ldquo, ldquor, ldrdhar, ldrushar, ldsh, le, lE, LeftAngleBracket, LeftArrowBar, leftarrow, LeftArrow, Leftarrow, LeftArrowRightArrow, leftarrowtail, LeftCeiling, LeftDoubleBracket, LeftDownTeeVector, LeftDownVectorBar, LeftDownVector, LeftFloor, leftharpoondown, leftharpoonup, leftleftarrows, leftrightarrow, LeftRightArrow, Leftrightarrow, leftrightarrows, leftrightharpoons, leftrightsquigarrow, LeftRightVector, LeftTeeArrow, LeftTee, LeftTeeVector, leftthreetimes, LeftTriangleBar, LeftTriangle, LeftTriangleEqual, LeftUpDownVector, LeftUpTeeVector, LeftUpVectorBar, LeftUpVector, LeftVectorBar, LeftVector, lEg, leg, leq, leqq, leqslant, lescc, les, lesdot, lesdoto, lesdotor, lesg, lesges, lessapprox, lessdot, lesseqgtr, lesseqqgtr, LessEqualGreater, LessFullEqual, LessGreater, lessgtr, LessLess, lesssim, LessSlantEqual, LessTilde, lfisht, lfloor, Lfr, lfr, lg, lgE, lHar, lhard, lharu, lharul, lhblk, LJcy, ljcy, llarr, ll, Ll, llcorner, Lleftarrow, llhard, lltri, Lmidot, lmidot, lmoustache, lmoust, lnap, lnapprox, lne, lnE, lneq, lneqq, lnsim, loang, loarr, lobrk, longleftarrow, LongLeftArrow, Longleftarrow, longleftrightarrow, LongLeftRightArrow, Longleftrightarrow, longmapsto, longrightarrow, LongRightArrow, Longrightarrow, looparrowleft, looparrowright, lopar, Lopf, lopf, loplus, lotimes, lowast, lowbar, LowerLeftArrow, LowerRightArrow, loz, lozenge, lozf, lpar, lparlt, lrarr, lrcorner, lrhar, lrhard, lrm, lrtri, lsaquo, lscr, Lscr, lsh, Lsh, lsim, lsime, lsimg, lsqb, lsquo, lsquor, Lstrok, lstrok, ltcc, ltcir, lt: lt$2, LT: LT$1, Lt, ltdot, lthree, ltimes, ltlarr, ltquest, ltri, ltrie, ltrif, ltrPar, lurdshar, luruhar, lvertneqq, lvnE, macr: macr$1, male, malt, maltese, "Map": "⤅", map, mapsto, mapstodown, mapstoleft, mapstoup, marker, mcomma, Mcy, mcy, mdash, mDDot, measuredangle, MediumSpace, Mellintrf, Mfr, mfr, mho, micro: micro$1, midast, midcir, mid, middot: middot$1, minusb, minus, minusd, minusdu, MinusPlus, mlcp, mldr, mnplus, models, Mopf, mopf, mp, mscr, Mscr, mstpos, Mu, mu, multimap, mumap, nabla, Nacute, nacute, nang, nap, napE, napid, napos, napprox, natural, naturals, natur, nbsp: nbsp$1, nbump, nbumpe, ncap, Ncaron, ncaron, Ncedil, ncedil, ncong, ncongdot, ncup, Ncy, ncy, ndash, nearhk, nearr, neArr, nearrow, ne, nedot, NegativeMediumSpace, NegativeThickSpace, NegativeThinSpace, NegativeVeryThinSpace, nequiv, nesear, nesim, NestedGreaterGreater, NestedLessLess, NewLine, nexist, nexists, Nfr, nfr, ngE, nge, ngeq, ngeqq, ngeqslant, nges, nGg, ngsim, nGt, ngt, ngtr, nGtv, nharr, nhArr, nhpar, ni, nis, nisd, niv, NJcy, njcy, nlarr, nlArr, nldr, nlE, nle, nleftarrow, nLeftarrow, nleftrightarrow, nLeftrightarrow, nleq, nleqq, nleqslant, nles, nless, nLl, nlsim, nLt, nlt, nltri, nltrie, nLtv, nmid, NoBreak, NonBreakingSpace, nopf, Nopf, Not, not: not$1, NotCongruent, NotCupCap, NotDoubleVerticalBar, NotElement, NotEqual, NotEqualTilde, NotExists, NotGreater, NotGreaterEqual, NotGreaterFullEqual, NotGreaterGreater, NotGreaterLess, NotGreaterSlantEqual, NotGreaterTilde, NotHumpDownHump, NotHumpEqual, notin, notindot, notinE, notinva, notinvb, notinvc, NotLeftTriangleBar, NotLeftTriangle, NotLeftTriangleEqual, NotLess, NotLessEqual, NotLessGreater, NotLessLess, NotLessSlantEqual, NotLessTilde, NotNestedGreaterGreater, NotNestedLessLess, notni, notniva, notnivb, notnivc, NotPrecedes, NotPrecedesEqual, NotPrecedesSlantEqual, NotReverseElement, NotRightTriangleBar, NotRightTriangle, NotRightTriangleEqual, NotSquareSubset, NotSquareSubsetEqual, NotSquareSuperset, NotSquareSupersetEqual, NotSubset, NotSubsetEqual, NotSucceeds, NotSucceedsEqual, NotSucceedsSlantEqual, NotSucceedsTilde, NotSuperset, NotSupersetEqual, NotTilde, NotTildeEqual, NotTildeFullEqual, NotTildeTilde, NotVerticalBar, nparallel, npar, nparsl, npart, npolint, npr, nprcue, nprec, npreceq, npre, nrarrc, nrarr, nrArr, nrarrw, nrightarrow, nRightarrow, nrtri, nrtrie, nsc, nsccue, nsce, Nscr, nscr, nshortmid, nshortparallel, nsim, nsime, nsimeq, nsmid, nspar, nsqsube, nsqsupe, nsub, nsubE, nsube, nsubset, nsubseteq, nsubseteqq, nsucc, nsucceq, nsup, nsupE, nsupe, nsupset, nsupseteq, nsupseteqq, ntgl, Ntilde: Ntilde$1, ntilde: ntilde$1, ntlg, ntriangleleft, ntrianglelefteq, ntriangleright, ntrianglerighteq, Nu, nu, num, numero, numsp, nvap, nvdash, nvDash, nVdash, nVDash, nvge, nvgt, nvHarr, nvinfin, nvlArr, nvle, nvlt, nvltrie, nvrArr, nvrtrie, nvsim, nwarhk, nwarr, nwArr, nwarrow, nwnear, Oacute: Oacute$1, oacute: oacute$1, oast, Ocirc: Ocirc$1, ocirc: ocirc$1, ocir, Ocy, ocy, odash, Odblac, odblac, odiv, odot, odsold, OElig, oelig, ofcir, Ofr, ofr, ogon, Ograve: Ograve$1, ograve: ograve$1, ogt, ohbar, ohm, oint, olarr, olcir, olcross, oline, olt, Omacr, omacr, Omega, omega, Omicron, omicron, omid, ominus, Oopf, oopf, opar, OpenCurlyDoubleQuote, OpenCurlyQuote, operp, oplus, orarr, Or, or, ord, order, orderof, ordf: ordf$1, ordm: ordm$1, origof, oror, orslope, orv, oS, Oscr, oscr, Oslash: Oslash$1, oslash: oslash$1, osol, Otilde: Otilde$1, otilde: otilde$1, otimesas, Otimes, otimes, Ouml: Ouml$1, ouml: ouml$1, ovbar, OverBar, OverBrace, OverBracket, OverParenthesis, para: para$1, parallel, par, parsim, parsl, part, PartialD, Pcy, pcy, percnt, period, permil, perp, pertenk, Pfr, pfr, Phi, phi, phiv, phmmat, phone, Pi, pi, pitchfork, piv, planck, planckh, plankv, plusacir, plusb, pluscir, plus, plusdo, plusdu, pluse, PlusMinus, plusmn: plusmn$1, plussim, plustwo, pm, Poincareplane, pointint, popf, Popf, pound: pound$1, prap, Pr, pr, prcue, precapprox, prec, preccurlyeq, Precedes, PrecedesEqual, PrecedesSlantEqual, PrecedesTilde, preceq, precnapprox, precneqq, precnsim, pre, prE, precsim, prime, Prime, primes, prnap, prnE, prnsim, prod, Product, profalar, profline, profsurf, prop, Proportional, Proportion, propto, prsim, prurel, Pscr, pscr, Psi, psi, puncsp, Qfr, qfr, qint, qopf, Qopf, qprime, Qscr, qscr, quaternions, quatint, quest, questeq, quot: quot$2, QUOT: QUOT$1, rAarr, race, Racute, racute, radic, raemptyv, rang, Rang, rangd, range, rangle, raquo: raquo$1, rarrap, rarrb, rarrbfs, rarrc, rarr, Rarr, rArr, rarrfs, rarrhk, rarrlp, rarrpl, rarrsim, Rarrtl, rarrtl, rarrw, ratail, rAtail, ratio, rationals, rbarr, rBarr, RBarr, rbbrk, rbrace, rbrack, rbrke, rbrksld, rbrkslu, Rcaron, rcaron, Rcedil, rcedil, rceil, rcub, Rcy, rcy, rdca, rdldhar, rdquo, rdquor, rdsh, real, realine, realpart, reals, Re, rect, reg: reg$1, REG: REG$1, ReverseElement, ReverseEquilibrium, ReverseUpEquilibrium, rfisht, rfloor, rfr, Rfr, rHar, rhard, rharu, rharul, Rho, rho, rhov, RightAngleBracket, RightArrowBar, rightarrow, RightArrow, Rightarrow, RightArrowLeftArrow, rightarrowtail, RightCeiling, RightDoubleBracket, RightDownTeeVector, RightDownVectorBar, RightDownVector, RightFloor, rightharpoondown, rightharpoonup, rightleftarrows, rightleftharpoons, rightrightarrows, rightsquigarrow, RightTeeArrow, RightTee, RightTeeVector, rightthreetimes, RightTriangleBar, RightTriangle, RightTriangleEqual, RightUpDownVector, RightUpTeeVector, RightUpVectorBar, RightUpVector, RightVectorBar, RightVector, ring, risingdotseq, rlarr, rlhar, rlm, rmoustache, rmoust, rnmid, roang, roarr, robrk, ropar, ropf, Ropf, roplus, rotimes, RoundImplies, rpar, rpargt, rppolint, rrarr, Rrightarrow, rsaquo, rscr, Rscr, rsh, Rsh, rsqb, rsquo, rsquor, rthree, rtimes, rtri, rtrie, rtrif, rtriltri, RuleDelayed, ruluhar, rx, Sacute, sacute, sbquo, scap, Scaron, scaron, Sc, sc, sccue, sce, scE, Scedil, scedil, Scirc, scirc, scnap, scnE, scnsim, scpolint, scsim, Scy, scy, sdotb, sdot, sdote, searhk, searr, seArr, searrow, sect: sect$1, semi, seswar, setminus, setmn, sext, Sfr, sfr, sfrown, sharp, SHCHcy, shchcy, SHcy, shcy, ShortDownArrow, ShortLeftArrow, shortmid, shortparallel, ShortRightArrow, ShortUpArrow, shy: shy$1, Sigma, sigma, sigmaf, sigmav, sim, simdot, sime, simeq, simg, simgE, siml, simlE, simne, simplus, simrarr, slarr, SmallCircle, smallsetminus, smashp, smeparsl, smid, smile, smt, smte, smtes, SOFTcy, softcy, solbar, solb, sol, Sopf, sopf, spades, spadesuit, spar, sqcap, sqcaps, sqcup, sqcups, Sqrt, sqsub, sqsube, sqsubset, sqsubseteq, sqsup, sqsupe, sqsupset, sqsupseteq, square, Square, SquareIntersection, SquareSubset, SquareSubsetEqual, SquareSuperset, SquareSupersetEqual, SquareUnion, squarf, squ, squf, srarr, Sscr, sscr, ssetmn, ssmile, sstarf, Star, star, starf, straightepsilon, straightphi, strns, sub, Sub, subdot, subE, sube, subedot, submult, subnE, subne, subplus, subrarr, subset, Subset, subseteq, subseteqq, SubsetEqual, subsetneq, subsetneqq, subsim, subsub, subsup, succapprox, succ, succcurlyeq, Succeeds, SucceedsEqual, SucceedsSlantEqual, SucceedsTilde, succeq, succnapprox, succneqq, succnsim, succsim, SuchThat, sum, Sum, sung, sup1: sup1$1, sup2: sup2$1, sup3: sup3$1, sup, Sup, supdot, supdsub, supE, supe, supedot, Superset, SupersetEqual, suphsol, suphsub, suplarr, supmult, supnE, supne, supplus, supset, Supset, supseteq, supseteqq, supsetneq, supsetneqq, supsim, supsub, supsup, swarhk, swarr, swArr, swarrow, swnwar, szlig: szlig$1, Tab, target, Tau, tau, tbrk, Tcaron, tcaron, Tcedil, tcedil, Tcy, tcy, tdot, telrec, Tfr, tfr, there4, therefore, Therefore, Theta, theta, thetasym, thetav, thickapprox, thicksim, ThickSpace, ThinSpace, thinsp, thkap, thksim, THORN: THORN$1, thorn: thorn$1, tilde, Tilde, TildeEqual, TildeFullEqual, TildeTilde, timesbar, timesb, times: times$1, timesd, tint, toea, topbot, topcir, top, Topf, topf, topfork, tosa, tprime, trade, TRADE, triangle, triangledown, triangleleft, trianglelefteq, triangleq, triangleright, trianglerighteq, tridot, trie, triminus, TripleDot, triplus, trisb, tritime, trpezium, Tscr, tscr, TScy, tscy, TSHcy, tshcy, Tstrok, tstrok, twixt, twoheadleftarrow, twoheadrightarrow, Uacute: Uacute$1, uacute: uacute$1, uarr, Uarr, uArr, Uarrocir, Ubrcy, ubrcy, Ubreve, ubreve, Ucirc: Ucirc$1, ucirc: ucirc$1, Ucy, ucy, udarr, Udblac, udblac, udhar, ufisht, Ufr, ufr, Ugrave: Ugrave$1, ugrave: ugrave$1, uHar, uharl, uharr, uhblk, ulcorn, ulcorner, ulcrop, ultri, Umacr, umacr, uml: uml$1, UnderBar, UnderBrace, UnderBracket, UnderParenthesis, Union, UnionPlus, Uogon, uogon, Uopf, uopf, UpArrowBar, uparrow, UpArrow, Uparrow, UpArrowDownArrow, updownarrow, UpDownArrow, Updownarrow, UpEquilibrium, upharpoonleft, upharpoonright, uplus, UpperLeftArrow, UpperRightArrow, upsi, Upsi, upsih, Upsilon, upsilon, UpTeeArrow, UpTee, upuparrows, urcorn, urcorner, urcrop, Uring, uring, urtri, Uscr, uscr, utdot, Utilde, utilde, utri, utrif, uuarr, Uuml: Uuml$1, uuml: uuml$1, uwangle, vangrt, varepsilon, varkappa, varnothing, varphi, varpi, varpropto, varr, vArr, varrho, varsigma, varsubsetneq, varsubsetneqq, varsupsetneq, varsupsetneqq, vartheta, vartriangleleft, vartriangleright, vBar, Vbar, vBarv, Vcy, vcy, vdash, vDash, Vdash, VDash, Vdashl, veebar, vee, Vee, veeeq, vellip, verbar, Verbar, vert, Vert, VerticalBar, VerticalLine, VerticalSeparator, VerticalTilde, VeryThinSpace, Vfr, vfr, vltri, vnsub, vnsup, Vopf, vopf, vprop, vrtri, Vscr, vscr, vsubnE, vsubne, vsupnE, vsupne, Vvdash, vzigzag, Wcirc, wcirc, wedbar, wedge, Wedge, wedgeq, weierp, Wfr, wfr, Wopf, wopf, wp, wr, wreath, Wscr, wscr, xcap, xcirc, xcup, xdtri, Xfr, xfr, xharr, xhArr, Xi, xi, xlarr, xlArr, xmap, xnis, xodot, Xopf, xopf, xoplus, xotime, xrarr, xrArr, Xscr, xscr, xsqcup, xuplus, xutri, xvee, xwedge, Yacute: Yacute$1, yacute: yacute$1, YAcy, yacy, Ycirc, ycirc, Ycy, ycy, yen: yen$1, Yfr, yfr, YIcy, yicy, Yopf, yopf, Yscr, yscr, YUcy, yucy, yuml: yuml$1, Yuml, Zacute, zacute, Zcaron, zcaron, Zcy, zcy, Zdot, zdot, zeetrf, ZeroWidthSpace, Zeta, zeta, zfr, Zfr, ZHcy, zhcy, zigrarr, zopf, Zopf, Zscr, zscr, zwj, zwnj }; const Aacute = "Á"; const aacute = "á"; const Acirc = "Â"; const acirc = "â"; const acute = "´"; const AElig = "Æ"; const aelig = "æ"; const Agrave = "À"; const agrave = "à"; const amp$1 = "&"; const AMP = "&"; const Aring = "Å"; const aring = "å"; const Atilde = "Ã"; const atilde = "ã"; const Auml = "Ä"; const auml = "ä"; const brvbar = "¦"; const Ccedil = "Ç"; const ccedil = "ç"; const cedil = "¸"; const cent = "¢"; const copy = "©"; const COPY = "©"; const curren = "¤"; const deg = "°"; const divide = "÷"; const Eacute = "É"; const eacute = "é"; const Ecirc = "Ê"; const ecirc = "ê"; const Egrave = "È"; const egrave = "è"; const ETH = "Ð"; const eth = "ð"; const Euml = "Ë"; const euml = "ë"; const frac12 = "½"; const frac14 = "¼"; const frac34 = "¾"; const gt$1 = ">"; const GT = ">"; const Iacute = "Í"; const iacute = "í"; const Icirc = "Î"; const icirc = "î"; const iexcl = "¡"; const Igrave = "Ì"; const igrave = "ì"; const iquest = "¿"; const Iuml = "Ï"; const iuml = "ï"; const laquo = "«"; const lt$1 = "<"; const LT = "<"; const macr = "¯"; const micro = "µ"; const middot = "·"; const nbsp = " "; const not = "¬"; const Ntilde = "Ñ"; const ntilde = "ñ"; const Oacute = "Ó"; const oacute = "ó"; const Ocirc = "Ô"; const ocirc = "ô"; const Ograve = "Ò"; const ograve = "ò"; const ordf = "ª"; const ordm = "º"; const Oslash = "Ø"; const oslash = "ø"; const Otilde = "Õ"; const otilde = "õ"; const Ouml = "Ö"; const ouml = "ö"; const para = "¶"; const plusmn = "±"; const pound = "£"; const quot$1 = '"'; const QUOT = '"'; const raquo = "»"; const reg = "®"; const REG = "®"; const sect = "§"; const shy = "­"; const sup1 = "¹"; const sup2 = "²"; const sup3 = "³"; const szlig = "ß"; const THORN = "Þ"; const thorn = "þ"; const times = "×"; const Uacute = "Ú"; const uacute = "ú"; const Ucirc = "Û"; const ucirc = "û"; const Ugrave = "Ù"; const ugrave = "ù"; const uml = "¨"; const Uuml = "Ü"; const uuml = "ü"; const Yacute = "Ý"; const yacute = "ý"; const yen = "¥"; const yuml = "ÿ"; const require$$1 = { Aacute, aacute, Acirc, acirc, acute, AElig, aelig, Agrave, agrave, amp: amp$1, AMP, Aring, aring, Atilde, atilde, Auml, auml, brvbar, Ccedil, ccedil, cedil, cent, copy, COPY, curren, deg, divide, Eacute, eacute, Ecirc, ecirc, Egrave, egrave, ETH, eth, Euml, euml, frac12, frac14, frac34, gt: gt$1, GT, Iacute, iacute, Icirc, icirc, iexcl, Igrave, igrave, iquest, Iuml, iuml, laquo, lt: lt$1, LT, macr, micro, middot, nbsp, not, Ntilde, ntilde, Oacute, oacute, Ocirc, ocirc, Ograve, ograve, ordf, ordm, Oslash, oslash, Otilde, otilde, Ouml, ouml, para, plusmn, pound, quot: quot$1, QUOT, raquo, reg, REG, sect, shy, sup1, sup2, sup3, szlig, THORN, thorn, times, Uacute, uacute, Ucirc, ucirc, Ugrave, ugrave, uml, Uuml, uuml, Yacute, yacute, yen, yuml }; const amp = "&"; const apos = "'"; const gt = ">"; const lt = "<"; const quot = '"'; const require$$0 = { amp, apos, gt, lt, quot }; var __importDefault$5 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(Tokenizer$1, "__esModule", { value: true }); var decode_codepoint_1$1 = __importDefault$5(decode_codepoint); var entities_json_1$2 = __importDefault$5(require$$1$1); var legacy_json_1$1 = __importDefault$5(require$$1); var xml_json_1$2 = __importDefault$5(require$$0); function whitespace(c) { return c === " " || c === "\n" || c === " " || c === "\f" || c === "\r"; } function isASCIIAlpha(c) { return c >= "a" && c <= "z" || c >= "A" && c <= "Z"; } function ifElseState(upper, SUCCESS, FAILURE) { var lower = upper.toLowerCase(); if (upper === lower) { return function(t, c) { if (c === lower) { t._state = SUCCESS; } else { t._state = FAILURE; t._index--; } }; } return function(t, c) { if (c === lower || c === upper) { t._state = SUCCESS; } else { t._state = FAILURE; t._index--; } }; } function consumeSpecialNameChar(upper, NEXT_STATE) { var lower = upper.toLowerCase(); return function(t, c) { if (c === lower || c === upper) { t._state = NEXT_STATE; } else { t._state = 3; t._index--; } }; } var stateBeforeCdata1 = ifElseState( "C", 24, 16 /* InDeclaration */ ); var stateBeforeCdata2 = ifElseState( "D", 25, 16 /* InDeclaration */ ); var stateBeforeCdata3 = ifElseState( "A", 26, 16 /* InDeclaration */ ); var stateBeforeCdata4 = ifElseState( "T", 27, 16 /* InDeclaration */ ); var stateBeforeCdata5 = ifElseState( "A", 28, 16 /* InDeclaration */ ); var stateBeforeScript1 = consumeSpecialNameChar( "R", 35 /* BeforeScript2 */ ); var stateBeforeScript2 = consumeSpecialNameChar( "I", 36 /* BeforeScript3 */ ); var stateBeforeScript3 = consumeSpecialNameChar( "P", 37 /* BeforeScript4 */ ); var stateBeforeScript4 = consumeSpecialNameChar( "T", 38 /* BeforeScript5 */ ); var stateAfterScript1 = ifElseState( "R", 40, 1 /* Text */ ); var stateAfterScript2 = ifElseState( "I", 41, 1 /* Text */ ); var stateAfterScript3 = ifElseState( "P", 42, 1 /* Text */ ); var stateAfterScript4 = ifElseState( "T", 43, 1 /* Text */ ); var stateBeforeStyle1 = consumeSpecialNameChar( "Y", 45 /* BeforeStyle2 */ ); var stateBeforeStyle2 = consumeSpecialNameChar( "L", 46 /* BeforeStyle3 */ ); var stateBeforeStyle3 = consumeSpecialNameChar( "E", 47 /* BeforeStyle4 */ ); var stateAfterStyle1 = ifElseState( "Y", 49, 1 /* Text */ ); var stateAfterStyle2 = ifElseState( "L", 50, 1 /* Text */ ); var stateAfterStyle3 = ifElseState( "E", 51, 1 /* Text */ ); var stateBeforeSpecialT = consumeSpecialNameChar( "I", 54 /* BeforeTitle1 */ ); var stateBeforeTitle1 = consumeSpecialNameChar( "T", 55 /* BeforeTitle2 */ ); var stateBeforeTitle2 = consumeSpecialNameChar( "L", 56 /* BeforeTitle3 */ ); var stateBeforeTitle3 = consumeSpecialNameChar( "E", 57 /* BeforeTitle4 */ ); var stateAfterSpecialTEnd = ifElseState( "I", 58, 1 /* Text */ ); var stateAfterTitle1 = ifElseState( "T", 59, 1 /* Text */ ); var stateAfterTitle2 = ifElseState( "L", 60, 1 /* Text */ ); var stateAfterTitle3 = ifElseState( "E", 61, 1 /* Text */ ); var stateBeforeEntity = ifElseState( "#", 63, 64 /* InNamedEntity */ ); var stateBeforeNumericEntity = ifElseState( "X", 66, 65 /* InNumericEntity */ ); var Tokenizer = ( /** @class */ function() { function Tokenizer2(options, cbs) { var _a2; this._state = 1; this.buffer = ""; this.sectionStart = 0; this._index = 0; this.bufferOffset = 0; this.baseState = 1; this.special = 1; this.running = true; this.ended = false; this.cbs = cbs; this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode); this.decodeEntities = (_a2 = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a2 !== void 0 ? _a2 : true; } Tokenizer2.prototype.reset = function() { this._state = 1; this.buffer = ""; this.sectionStart = 0; this._index = 0; this.bufferOffset = 0; this.baseState = 1; this.special = 1; this.running = true; this.ended = false; }; Tokenizer2.prototype.write = function(chunk) { if (this.ended) this.cbs.onerror(Error(".write() after done!")); this.buffer += chunk; this.parse(); }; Tokenizer2.prototype.end = function(chunk) { if (this.ended) this.cbs.onerror(Error(".end() after done!")); if (chunk) this.write(chunk); this.ended = true; if (this.running) this.finish(); }; Tokenizer2.prototype.pause = function() { this.running = false; }; Tokenizer2.prototype.resume = function() { this.running = true; if (this._index < this.buffer.length) { this.parse(); } if (this.ended) { this.finish(); } }; Tokenizer2.prototype.getAbsoluteIndex = function() { return this.bufferOffset + this._index; }; Tokenizer2.prototype.stateText = function(c) { if (c === "<") { if (this._index > this.sectionStart) { this.cbs.ontext(this.getSection()); } this._state = 2; this.sectionStart = this._index; } else if (this.decodeEntities && c === "&" && (this.special === 1 || this.special === 4)) { if (this._index > this.sectionStart) { this.cbs.ontext(this.getSection()); } this.baseState = 1; this._state = 62; this.sectionStart = this._index; } }; Tokenizer2.prototype.isTagStartChar = function(c) { return isASCIIAlpha(c) || this.xmlMode && !whitespace(c) && c !== "/" && c !== ">"; }; Tokenizer2.prototype.stateBeforeTagName = function(c) { if (c === "/") { this._state = 5; } else if (c === "<") { this.cbs.ontext(this.getSection()); this.sectionStart = this._index; } else if (c === ">" || this.special !== 1 || whitespace(c)) { this._state = 1; } else if (c === "!") { this._state = 15; this.sectionStart = this._index + 1; } else if (c === "?") { this._state = 17; this.sectionStart = this._index + 1; } else if (!this.isTagStartChar(c)) { this._state = 1; } else { this._state = !this.xmlMode && (c === "s" || c === "S") ? 32 : !this.xmlMode && (c === "t" || c === "T") ? 52 : 3; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateInTagName = function(c) { if (c === "/" || c === ">" || whitespace(c)) { this.emitToken("onopentagname"); this._state = 8; this._index--; } }; Tokenizer2.prototype.stateBeforeClosingTagName = function(c) { if (whitespace(c)) ; else if (c === ">") { this._state = 1; } else if (this.special !== 1) { if (this.special !== 4 && (c === "s" || c === "S")) { this._state = 33; } else if (this.special === 4 && (c === "t" || c === "T")) { this._state = 53; } else { this._state = 1; this._index--; } } else if (!this.isTagStartChar(c)) { this._state = 20; this.sectionStart = this._index; } else { this._state = 6; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateInClosingTagName = function(c) { if (c === ">" || whitespace(c)) { this.emitToken("onclosetag"); this._state = 7; this._index--; } }; Tokenizer2.prototype.stateAfterClosingTagName = function(c) { if (c === ">") { this._state = 1; this.sectionStart = this._index + 1; } }; Tokenizer2.prototype.stateBeforeAttributeName = function(c) { if (c === ">") { this.cbs.onopentagend(); this._state = 1; this.sectionStart = this._index + 1; } else if (c === "/") { this._state = 4; } else if (!whitespace(c)) { this._state = 9; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateInSelfClosingTag = function(c) { if (c === ">") { this.cbs.onselfclosingtag(); this._state = 1; this.sectionStart = this._index + 1; this.special = 1; } else if (!whitespace(c)) { this._state = 8; this._index--; } }; Tokenizer2.prototype.stateInAttributeName = function(c) { if (c === "=" || c === "/" || c === ">" || whitespace(c)) { this.cbs.onattribname(this.getSection()); this.sectionStart = -1; this._state = 10; this._index--; } }; Tokenizer2.prototype.stateAfterAttributeName = function(c) { if (c === "=") { this._state = 11; } else if (c === "/" || c === ">") { this.cbs.onattribend(void 0); this._state = 8; this._index--; } else if (!whitespace(c)) { this.cbs.onattribend(void 0); this._state = 9; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateBeforeAttributeValue = function(c) { if (c === '"') { this._state = 12; this.sectionStart = this._index + 1; } else if (c === "'") { this._state = 13; this.sectionStart = this._index + 1; } else if (!whitespace(c)) { this._state = 14; this.sectionStart = this._index; this._index--; } }; Tokenizer2.prototype.handleInAttributeValue = function(c, quote) { if (c === quote) { this.emitToken("onattribdata"); this.cbs.onattribend(quote); this._state = 8; } else if (this.decodeEntities && c === "&") { this.emitToken("onattribdata"); this.baseState = this._state; this._state = 62; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateInAttributeValueDoubleQuotes = function(c) { this.handleInAttributeValue(c, '"'); }; Tokenizer2.prototype.stateInAttributeValueSingleQuotes = function(c) { this.handleInAttributeValue(c, "'"); }; Tokenizer2.prototype.stateInAttributeValueNoQuotes = function(c) { if (whitespace(c) || c === ">") { this.emitToken("onattribdata"); this.cbs.onattribend(null); this._state = 8; this._index--; } else if (this.decodeEntities && c === "&") { this.emitToken("onattribdata"); this.baseState = this._state; this._state = 62; this.sectionStart = this._index; } }; Tokenizer2.prototype.stateBeforeDeclaration = function(c) { this._state = c === "[" ? 23 : c === "-" ? 18 : 16; }; Tokenizer2.prototype.stateInDeclaration = function(c) { if (c === ">") { this.cbs.ondeclaration(this.getSection()); this._state = 1; this.sectionStart = this._index + 1; } }; Tokenizer2.prototype.stateInProcessingInstruction = function(c) { if (c === ">") { this.cbs.onprocessinginstruction(this.getSection()); this._state = 1; this.sectionStart = this._index + 1; } }; Tokenizer2.prototype.stateBeforeComment = function(c) { if (c === "-") { this._state = 19; this.sectionStart = this._index + 1; } else { this._state = 16; } }; Tokenizer2.prototype.stateInComment = function(c) { if (c === "-") this._state = 21; }; Tokenizer2.prototype.stateInSpecialComment = function(c) { if (c === ">") { this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index)); this._state = 1; this.sectionStart = this._index + 1; } }; Tokenizer2.prototype.stateAfterComment1 = function(c) { if (c === "-") { this._state = 22; } else { this._state = 19; } }; Tokenizer2.prototype.stateAfterComment2 = function(c) { if (c === ">") { this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2)); this._state = 1; this.sectionStart = this._index + 1; } else if (c !== "-") { this._state = 19; } }; Tokenizer2.prototype.stateBeforeCdata6 = function(c) { if (c === "[") { this._state = 29; this.sectionStart = this._index + 1; } else { this._state = 16; this._index--; } }; Tokenizer2.prototype.stateInCdata = function(c) { if (c === "]") this._state = 30; }; Tokenizer2.prototype.stateAfterCdata1 = function(c) { if (c === "]") this._state = 31; else this._state = 29; }; Tokenizer2.prototype.stateAfterCdata2 = function(c) { if (c === ">") { this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2)); this._state = 1; this.sectionStart = this._index + 1; } else if (c !== "]") { this._state = 29; } }; Tokenizer2.prototype.stateBeforeSpecialS = function(c) { if (c === "c" || c === "C") { this._state = 34; } else if (c === "t" || c === "T") { this._state = 44; } else { this._state = 3; this._index--; } }; Tokenizer2.prototype.stateBeforeSpecialSEnd = function(c) { if (this.special === 2 && (c === "c" || c === "C")) { this._state = 39; } else if (this.special === 3 && (c === "t" || c === "T")) { this._state = 48; } else this._state = 1; }; Tokenizer2.prototype.stateBeforeSpecialLast = function(c, special) { if (c === "/" || c === ">" || whitespace(c)) { this.special = special; } this._state = 3; this._index--; }; Tokenizer2.prototype.stateAfterSpecialLast = function(c, sectionStartOffset) { if (c === ">" || whitespace(c)) { this.special = 1; this._state = 6; this.sectionStart = this._index - sectionStartOffset; this._index--; } else this._state = 1; }; Tokenizer2.prototype.parseFixedEntity = function(map2) { if (map2 === void 0) { map2 = this.xmlMode ? xml_json_1$2.default : entities_json_1$2.default; } if (this.sectionStart + 1 < this._index) { var entity = this.buffer.substring(this.sectionStart + 1, this._index); if (Object.prototype.hasOwnProperty.call(map2, entity)) { this.emitPartial(map2[entity]); this.sectionStart = this._index + 1; } } }; Tokenizer2.prototype.parseLegacyEntity = function() { var start = this.sectionStart + 1; var limit = Math.min(this._index - start, 6); while (limit >= 2) { var entity = this.buffer.substr(start, limit); if (Object.prototype.hasOwnProperty.call(legacy_json_1$1.default, entity)) { this.emitPartial(legacy_json_1$1.default[entity]); this.sectionStart += limit + 1; return; } limit--; } }; Tokenizer2.prototype.stateInNamedEntity = function(c) { if (c === ";") { this.parseFixedEntity(); if (this.baseState === 1 && this.sectionStart + 1 < this._index && !this.xmlMode) { this.parseLegacyEntity(); } this._state = this.baseState; } else if ((c < "0" || c > "9") && !isASCIIAlpha(c)) { if (this.xmlMode || this.sectionStart + 1 === this._index) ; else if (this.baseState !== 1) { if (c !== "=") { this.parseFixedEntity(legacy_json_1$1.default); } } else { this.parseLegacyEntity(); } this._state = this.baseState; this._index--; } }; Tokenizer2.prototype.decodeNumericEntity = function(offset, base, strict) { var sectionStart = this.sectionStart + offset; if (sectionStart !== this._index) { var entity = this.buffer.substring(sectionStart, this._index); var parsed = parseInt(entity, base); this.emitPartial(decode_codepoint_1$1.default(parsed)); this.sectionStart = strict ? this._index + 1 : this._index; } this._state = this.baseState; }; Tokenizer2.prototype.stateInNumericEntity = function(c) { if (c === ";") { this.decodeNumericEntity(2, 10, true); } else if (c < "0" || c > "9") { if (!this.xmlMode) { this.decodeNumericEntity(2, 10, false); } else { this._state = this.baseState; } this._index--; } }; Tokenizer2.prototype.stateInHexEntity = function(c) { if (c === ";") { this.decodeNumericEntity(3, 16, true); } else if ((c < "a" || c > "f") && (c < "A" || c > "F") && (c < "0" || c > "9")) { if (!this.xmlMode) { this.decodeNumericEntity(3, 16, false); } else { this._state = this.baseState; } this._index--; } }; Tokenizer2.prototype.cleanup = function() { if (this.sectionStart < 0) { this.buffer = ""; this.bufferOffset += this._index; this._index = 0; } else if (this.running) { if (this._state === 1) { if (this.sectionStart !== this._index) { this.cbs.ontext(this.buffer.substr(this.sectionStart)); } this.buffer = ""; this.bufferOffset += this._index; this._index = 0; } else if (this.sectionStart === this._index) { this.buffer = ""; this.bufferOffset += this._index; this._index = 0; } else { this.buffer = this.buffer.substr(this.sectionStart); this._index -= this.sectionStart; this.bufferOffset += this.sectionStart; } this.sectionStart = 0; } }; Tokenizer2.prototype.parse = function() { while (this._index < this.buffer.length && this.running) { var c = this.buffer.charAt(this._index); if (this._state === 1) { this.stateText(c); } else if (this._state === 12) { this.stateInAttributeValueDoubleQuotes(c); } else if (this._state === 9) { this.stateInAttributeName(c); } else if (this._state === 19) { this.stateInComment(c); } else if (this._state === 20) { this.stateInSpecialComment(c); } else if (this._state === 8) { this.stateBeforeAttributeName(c); } else if (this._state === 3) { this.stateInTagName(c); } else if (this._state === 6) { this.stateInClosingTagName(c); } else if (this._state === 2) { this.stateBeforeTagName(c); } else if (this._state === 10) { this.stateAfterAttributeName(c); } else if (this._state === 13) { this.stateInAttributeValueSingleQuotes(c); } else if (this._state === 11) { this.stateBeforeAttributeValue(c); } else if (this._state === 5) { this.stateBeforeClosingTagName(c); } else if (this._state === 7) { this.stateAfterClosingTagName(c); } else if (this._state === 32) { this.stateBeforeSpecialS(c); } else if (this._state === 21) { this.stateAfterComment1(c); } else if (this._state === 14) { this.stateInAttributeValueNoQuotes(c); } else if (this._state === 4) { this.stateInSelfClosingTag(c); } else if (this._state === 16) { this.stateInDeclaration(c); } else if (this._state === 15) { this.stateBeforeDeclaration(c); } else if (this._state === 22) { this.stateAfterComment2(c); } else if (this._state === 18) { this.stateBeforeComment(c); } else if (this._state === 33) { this.stateBeforeSpecialSEnd(c); } else if (this._state === 53) { stateAfterSpecialTEnd(this, c); } else if (this._state === 39) { stateAfterScript1(this, c); } else if (this._state === 40) { stateAfterScript2(this, c); } else if (this._state === 41) { stateAfterScript3(this, c); } else if (this._state === 34) { stateBeforeScript1(this, c); } else if (this._state === 35) { stateBeforeScript2(this, c); } else if (this._state === 36) { stateBeforeScript3(this, c); } else if (this._state === 37) { stateBeforeScript4(this, c); } else if (this._state === 38) { this.stateBeforeSpecialLast( c, 2 /* Script */ ); } else if (this._state === 42) { stateAfterScript4(this, c); } else if (this._state === 43) { this.stateAfterSpecialLast(c, 6); } else if (this._state === 44) { stateBeforeStyle1(this, c); } else if (this._state === 29) { this.stateInCdata(c); } else if (this._state === 45) { stateBeforeStyle2(this, c); } else if (this._state === 46) { stateBeforeStyle3(this, c); } else if (this._state === 47) { this.stateBeforeSpecialLast( c, 3 /* Style */ ); } else if (this._state === 48) { stateAfterStyle1(this, c); } else if (this._state === 49) { stateAfterStyle2(this, c); } else if (this._state === 50) { stateAfterStyle3(this, c); } else if (this._state === 51) { this.stateAfterSpecialLast(c, 5); } else if (this._state === 52) { stateBeforeSpecialT(this, c); } else if (this._state === 54) { stateBeforeTitle1(this, c); } else if (this._state === 55) { stateBeforeTitle2(this, c); } else if (this._state === 56) { stateBeforeTitle3(this, c); } else if (this._state === 57) { this.stateBeforeSpecialLast( c, 4 /* Title */ ); } else if (this._state === 58) { stateAfterTitle1(this, c); } else if (this._state === 59) { stateAfterTitle2(this, c); } else if (this._state === 60) { stateAfterTitle3(this, c); } else if (this._state === 61) { this.stateAfterSpecialLast(c, 5); } else if (this._state === 17) { this.stateInProcessingInstruction(c); } else if (this._state === 64) { this.stateInNamedEntity(c); } else if (this._state === 23) { stateBeforeCdata1(this, c); } else if (this._state === 62) { stateBeforeEntity(this, c); } else if (this._state === 24) { stateBeforeCdata2(this, c); } else if (this._state === 25) { stateBeforeCdata3(this, c); } else if (this._state === 30) { this.stateAfterCdata1(c); } else if (this._state === 31) { this.stateAfterCdata2(c); } else if (this._state === 26) { stateBeforeCdata4(this, c); } else if (this._state === 27) { stateBeforeCdata5(this, c); } else if (this._state === 28) { this.stateBeforeCdata6(c); } else if (this._state === 66) { this.stateInHexEntity(c); } else if (this._state === 65) { this.stateInNumericEntity(c); } else if (this._state === 63) { stateBeforeNumericEntity(this, c); } else { this.cbs.onerror(Error("unknown _state"), this._state); } this._index++; } this.cleanup(); }; Tokenizer2.prototype.finish = function() { if (this.sectionStart < this._index) { this.handleTrailingData(); } this.cbs.onend(); }; Tokenizer2.prototype.handleTrailingData = function() { var data = this.buffer.substr(this.sectionStart); if (this._state === 29 || this._state === 30 || this._state === 31) { this.cbs.oncdata(data); } else if (this._state === 19 || this._state === 21 || this._state === 22) { this.cbs.oncomment(data); } else if (this._state === 64 && !this.xmlMode) { this.parseLegacyEntity(); if (this.sectionStart < this._index) { this._state = this.baseState; this.handleTrailingData(); } } else if (this._state === 65 && !this.xmlMode) { this.decodeNumericEntity(2, 10, false); if (this.sectionStart < this._index) { this._state = this.baseState; this.handleTrailingData(); } } else if (this._state === 66 && !this.xmlMode) { this.decodeNumericEntity(3, 16, false); if (this.sectionStart < this._index) { this._state = this.baseState; this.handleTrailingData(); } } else if (this._state !== 3 && this._state !== 8 && this._state !== 11 && this._state !== 10 && this._state !== 9 && this._state !== 13 && this._state !== 12 && this._state !== 14 && this._state !== 6) { this.cbs.ontext(data); } }; Tokenizer2.prototype.getSection = function() { return this.buffer.substring(this.sectionStart, this._index); }; Tokenizer2.prototype.emitToken = function(name) { this.cbs[name](this.getSection()); this.sectionStart = -1; }; Tokenizer2.prototype.emitPartial = function(value) { if (this.baseState !== 1) { this.cbs.onattribdata(value); } else { this.cbs.ontext(value); } }; return Tokenizer2; }() ); Tokenizer$1.default = Tokenizer; var __importDefault$4 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(Parser$1, "__esModule", { value: true }); Parser$1.Parser = void 0; var Tokenizer_1 = __importDefault$4(Tokenizer$1); var formTags = /* @__PURE__ */ new Set([ "input", "option", "optgroup", "select", "button", "datalist", "textarea" ]); var pTag = /* @__PURE__ */ new Set(["p"]); var openImpliesClose = { tr: /* @__PURE__ */ new Set(["tr", "th", "td"]), th: /* @__PURE__ */ new Set(["th"]), td: /* @__PURE__ */ new Set(["thead", "th", "td"]), body: /* @__PURE__ */ new Set(["head", "link", "script"]), li: /* @__PURE__ */ new Set(["li"]), p: pTag, h1: pTag, h2: pTag, h3: pTag, h4: pTag, h5: pTag, h6: pTag, select: formTags, input: formTags, output: formTags, button: formTags, datalist: formTags, textarea: formTags, option: /* @__PURE__ */ new Set(["option"]), optgroup: /* @__PURE__ */ new Set(["optgroup", "option"]), dd: /* @__PURE__ */ new Set(["dt", "dd"]), dt: /* @__PURE__ */ new Set(["dt", "dd"]), address: pTag, article: pTag, aside: pTag, blockquote: pTag, details: pTag, div: pTag, dl: pTag, fieldset: pTag, figcaption: pTag, figure: pTag, footer: pTag, form: pTag, header: pTag, hr: pTag, main: pTag, nav: pTag, ol: pTag, pre: pTag, section: pTag, table: pTag, ul: pTag, rt: /* @__PURE__ */ new Set(["rt", "rp"]), rp: /* @__PURE__ */ new Set(["rt", "rp"]), tbody: /* @__PURE__ */ new Set(["thead", "tbody"]), tfoot: /* @__PURE__ */ new Set(["thead", "tbody"]) }; var voidElements = /* @__PURE__ */ new Set([ "area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); var foreignContextElements = /* @__PURE__ */ new Set(["math", "svg"]); var htmlIntegrationElements = /* @__PURE__ */ new Set([ "mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title" ]); var reNameEnd = /\s|\//; var Parser = ( /** @class */ function() { function Parser2(cbs, options) { if (options === void 0) { options = {}; } var _a2, _b, _c, _d, _e; this.startIndex = 0; this.endIndex = null; this.tagname = ""; this.attribname = ""; this.attribvalue = ""; this.attribs = null; this.stack = []; this.foreignContext = []; this.options = options; this.cbs = cbs !== null && cbs !== void 0 ? cbs : {}; this.lowerCaseTagNames = (_a2 = options.lowerCaseTags) !== null && _a2 !== void 0 ? _a2 : !options.xmlMode; this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode; this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this); (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this); } Parser2.prototype.updatePosition = function(initialOffset) { if (this.endIndex === null) { if (this.tokenizer.sectionStart <= initialOffset) { this.startIndex = 0; } else { this.startIndex = this.tokenizer.sectionStart - initialOffset; } } else { this.startIndex = this.endIndex + 1; } this.endIndex = this.tokenizer.getAbsoluteIndex(); }; Parser2.prototype.ontext = function(data) { var _a2, _b; this.updatePosition(1); this.endIndex--; (_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, data); }; Parser2.prototype.onopentagname = function(name) { var _a2, _b; if (this.lowerCaseTagNames) { name = name.toLowerCase(); } this.tagname = name; if (!this.options.xmlMode && Object.prototype.hasOwnProperty.call(openImpliesClose, name)) { var el2 = void 0; while (this.stack.length > 0 && openImpliesClose[name].has(el2 = this.stack[this.stack.length - 1])) { this.onclosetag(el2); } } if (this.options.xmlMode || !voidElements.has(name)) { this.stack.push(name); if (foreignContextElements.has(name)) { this.foreignContext.push(true); } else if (htmlIntegrationElements.has(name)) { this.foreignContext.push(false); } } (_b = (_a2 = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a2, name); if (this.cbs.onopentag) this.attribs = {}; }; Parser2.prototype.onopentagend = function() { var _a2, _b; this.updatePosition(1); if (this.attribs) { (_b = (_a2 = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a2, this.tagname, this.attribs); this.attribs = null; } if (!this.options.xmlMode && this.cbs.onclosetag && voidElements.has(this.tagname)) { this.cbs.onclosetag(this.tagname); } this.tagname = ""; }; Parser2.prototype.onclosetag = function(name) { this.updatePosition(1); if (this.lowerCaseTagNames) { name = name.toLowerCase(); } if (foreignContextElements.has(name) || htmlIntegrationElements.has(name)) { this.foreignContext.pop(); } if (this.stack.length && (this.options.xmlMode || !voidElements.has(name))) { var pos = this.stack.lastIndexOf(name); if (pos !== -1) { if (this.cbs.onclosetag) { pos = this.stack.length - pos; while (pos--) { this.cbs.onclosetag(this.stack.pop()); } } else this.stack.length = pos; } else if (name === "p" && !this.options.xmlMode) { this.onopentagname(name); this.closeCurrentTag(); } } else if (!this.options.xmlMode && (name === "br" || name === "p")) { this.onopentagname(name); this.closeCurrentTag(); } }; Parser2.prototype.onselfclosingtag = function() { if (this.options.xmlMode || this.options.recognizeSelfClosing || this.foreignContext[this.foreignContext.length - 1]) { this.closeCurrentTag(); } else { this.onopentagend(); } }; Parser2.prototype.closeCurrentTag = function() { var _a2, _b; var name = this.tagname; this.onopentagend(); if (this.stack[this.stack.length - 1] === name) { (_b = (_a2 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a2, name); this.stack.pop(); } }; Parser2.prototype.onattribname = function(name) { if (this.lowerCaseAttributeNames) { name = name.toLowerCase(); } this.attribname = name; }; Parser2.prototype.onattribdata = function(value) { this.attribvalue += value; }; Parser2.prototype.onattribend = function(quote) { var _a2, _b; (_b = (_a2 = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a2, this.attribname, this.attribvalue, quote); if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { this.attribs[this.attribname] = this.attribvalue; } this.attribname = ""; this.attribvalue = ""; }; Parser2.prototype.getInstructionName = function(value) { var idx = value.search(reNameEnd); var name = idx < 0 ? value : value.substr(0, idx); if (this.lowerCaseTagNames) { name = name.toLowerCase(); } return name; }; Parser2.prototype.ondeclaration = function(value) { if (this.cbs.onprocessinginstruction) { var name_1 = this.getInstructionName(value); this.cbs.onprocessinginstruction("!" + name_1, "!" + value); } }; Parser2.prototype.onprocessinginstruction = function(value) { if (this.cbs.onprocessinginstruction) { var name_2 = this.getInstructionName(value); this.cbs.onprocessinginstruction("?" + name_2, "?" + value); } }; Parser2.prototype.oncomment = function(value) { var _a2, _b, _c, _d; this.updatePosition(4); (_b = (_a2 = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a2, value); (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); }; Parser2.prototype.oncdata = function(value) { var _a2, _b, _c, _d, _e, _f; this.updatePosition(1); if (this.options.xmlMode || this.options.recognizeCDATA) { (_b = (_a2 = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a2); (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); } else { this.oncomment("[CDATA[" + value + "]]"); } }; Parser2.prototype.onerror = function(err) { var _a2, _b; (_b = (_a2 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a2, err); }; Parser2.prototype.onend = function() { var _a2, _b; if (this.cbs.onclosetag) { for (var i2 = this.stack.length; i2 > 0; this.cbs.onclosetag(this.stack[--i2])) ; } (_b = (_a2 = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a2); }; Parser2.prototype.reset = function() { var _a2, _b, _c, _d; (_b = (_a2 = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a2); this.tokenizer.reset(); this.tagname = ""; this.attribname = ""; this.attribs = null; this.stack = []; (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); }; Parser2.prototype.parseComplete = function(data) { this.reset(); this.end(data); }; Parser2.prototype.write = function(chunk) { this.tokenizer.write(chunk); }; Parser2.prototype.end = function(chunk) { this.tokenizer.end(chunk); }; Parser2.prototype.pause = function() { this.tokenizer.pause(); }; Parser2.prototype.resume = function() { this.tokenizer.resume(); }; Parser2.prototype.parseChunk = function(chunk) { this.write(chunk); }; Parser2.prototype.done = function(chunk) { this.end(chunk); }; return Parser2; }() ); Parser$1.Parser = Parser; var lib$4 = {}; var lib$3 = {}; (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0; var ElementType2; (function(ElementType3) { ElementType3["Root"] = "root"; ElementType3["Text"] = "text"; ElementType3["Directive"] = "directive"; ElementType3["Comment"] = "comment"; ElementType3["Script"] = "script"; ElementType3["Style"] = "style"; ElementType3["Tag"] = "tag"; ElementType3["CDATA"] = "cdata"; ElementType3["Doctype"] = "doctype"; })(ElementType2 = exports.ElementType || (exports.ElementType = {})); function isTag2(elem) { return elem.type === ElementType2.Tag || elem.type === ElementType2.Script || elem.type === ElementType2.Style; } exports.isTag = isTag2; exports.Root = ElementType2.Root; exports.Text = ElementType2.Text; exports.Directive = ElementType2.Directive; exports.Comment = ElementType2.Comment; exports.Script = ElementType2.Script; exports.Style = ElementType2.Style; exports.Tag = ElementType2.Tag; exports.CDATA = ElementType2.CDATA; exports.Doctype = ElementType2.Doctype; })(lib$3); var node = {}; var __extends$1 = commonjsGlobal && commonjsGlobal.__extends || function() { var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }; return function(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; }(); var __assign$1 = commonjsGlobal && commonjsGlobal.__assign || function() { __assign$1 = Object.assign || function(t) { for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) { s = arguments[i2]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign$1.apply(this, arguments); }; Object.defineProperty(node, "__esModule", { value: true }); node.cloneNode = node.hasChildren = node.isDocument = node.isDirective = node.isComment = node.isText = node.isCDATA = node.isTag = node.Element = node.Document = node.NodeWithChildren = node.ProcessingInstruction = node.Comment = node.Text = node.DataNode = node.Node = void 0; var domelementtype_1$1 = lib$3; var nodeTypes = /* @__PURE__ */ new Map([ [domelementtype_1$1.ElementType.Tag, 1], [domelementtype_1$1.ElementType.Script, 1], [domelementtype_1$1.ElementType.Style, 1], [domelementtype_1$1.ElementType.Directive, 1], [domelementtype_1$1.ElementType.Text, 3], [domelementtype_1$1.ElementType.CDATA, 4], [domelementtype_1$1.ElementType.Comment, 8], [domelementtype_1$1.ElementType.Root, 9] ]); var Node = ( /** @class */ function() { function Node2(type) { this.type = type; this.parent = null; this.prev = null; this.next = null; this.startIndex = null; this.endIndex = null; } Object.defineProperty(Node2.prototype, "nodeType", { // Read-only aliases /** * [DOM spec](https://dom.spec.whatwg.org/#dom-node-nodetype)-compatible * node {@link type}. */ get: function() { var _a2; return (_a2 = nodeTypes.get(this.type)) !== null && _a2 !== void 0 ? _a2 : 1; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "parentNode", { // Read-write aliases for properties /** * Same as {@link parent}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.parent; }, set: function(parent) { this.parent = parent; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "previousSibling", { /** * Same as {@link prev}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.prev; }, set: function(prev) { this.prev = prev; }, enumerable: false, configurable: true }); Object.defineProperty(Node2.prototype, "nextSibling", { /** * Same as {@link next}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.next; }, set: function(next) { this.next = next; }, enumerable: false, configurable: true }); Node2.prototype.cloneNode = function(recursive) { if (recursive === void 0) { recursive = false; } return cloneNode(this, recursive); }; return Node2; }() ); node.Node = Node; var DataNode = ( /** @class */ function(_super) { __extends$1(DataNode2, _super); function DataNode2(type, data) { var _this = _super.call(this, type) || this; _this.data = data; return _this; } Object.defineProperty(DataNode2.prototype, "nodeValue", { /** * Same as {@link data}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.data; }, set: function(data) { this.data = data; }, enumerable: false, configurable: true }); return DataNode2; }(Node) ); node.DataNode = DataNode; var Text = ( /** @class */ function(_super) { __extends$1(Text2, _super); function Text2(data) { return _super.call(this, domelementtype_1$1.ElementType.Text, data) || this; } return Text2; }(DataNode) ); node.Text = Text; var Comment = ( /** @class */ function(_super) { __extends$1(Comment2, _super); function Comment2(data) { return _super.call(this, domelementtype_1$1.ElementType.Comment, data) || this; } return Comment2; }(DataNode) ); node.Comment = Comment; var ProcessingInstruction = ( /** @class */ function(_super) { __extends$1(ProcessingInstruction2, _super); function ProcessingInstruction2(name, data) { var _this = _super.call(this, domelementtype_1$1.ElementType.Directive, data) || this; _this.name = name; return _this; } return ProcessingInstruction2; }(DataNode) ); node.ProcessingInstruction = ProcessingInstruction; var NodeWithChildren = ( /** @class */ function(_super) { __extends$1(NodeWithChildren2, _super); function NodeWithChildren2(type, children) { var _this = _super.call(this, type) || this; _this.children = children; return _this; } Object.defineProperty(NodeWithChildren2.prototype, "firstChild", { // Aliases /** First child of the node. */ get: function() { var _a2; return (_a2 = this.children[0]) !== null && _a2 !== void 0 ? _a2 : null; }, enumerable: false, configurable: true }); Object.defineProperty(NodeWithChildren2.prototype, "lastChild", { /** Last child of the node. */ get: function() { return this.children.length > 0 ? this.children[this.children.length - 1] : null; }, enumerable: false, configurable: true }); Object.defineProperty(NodeWithChildren2.prototype, "childNodes", { /** * Same as {@link children}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.children; }, set: function(children) { this.children = children; }, enumerable: false, configurable: true }); return NodeWithChildren2; }(Node) ); node.NodeWithChildren = NodeWithChildren; var Document = ( /** @class */ function(_super) { __extends$1(Document2, _super); function Document2(children) { return _super.call(this, domelementtype_1$1.ElementType.Root, children) || this; } return Document2; }(NodeWithChildren) ); node.Document = Document; var Element = ( /** @class */ function(_super) { __extends$1(Element2, _super); function Element2(name, attribs, children, type) { if (children === void 0) { children = []; } if (type === void 0) { type = name === "script" ? domelementtype_1$1.ElementType.Script : name === "style" ? domelementtype_1$1.ElementType.Style : domelementtype_1$1.ElementType.Tag; } var _this = _super.call(this, type, children) || this; _this.name = name; _this.attribs = attribs; return _this; } Object.defineProperty(Element2.prototype, "tagName", { // DOM Level 1 aliases /** * Same as {@link name}. * [DOM spec](https://dom.spec.whatwg.org)-compatible alias. */ get: function() { return this.name; }, set: function(name) { this.name = name; }, enumerable: false, configurable: true }); Object.defineProperty(Element2.prototype, "attributes", { get: function() { var _this = this; return Object.keys(this.attribs).map(function(name) { var _a2, _b; return { name, value: _this.attribs[name], namespace: (_a2 = _this["x-attribsNamespace"]) === null || _a2 === void 0 ? void 0 : _a2[name], prefix: (_b = _this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name] }; }); }, enumerable: false, configurable: true }); return Element2; }(NodeWithChildren) ); node.Element = Element; function isTag(node2) { return (0, domelementtype_1$1.isTag)(node2); } node.isTag = isTag; function isCDATA(node2) { return node2.type === domelementtype_1$1.ElementType.CDATA; } node.isCDATA = isCDATA; function isText(node2) { return node2.type === domelementtype_1$1.ElementType.Text; } node.isText = isText; function isComment(node2) { return node2.type === domelementtype_1$1.ElementType.Comment; } node.isComment = isComment; function isDirective(node2) { return node2.type === domelementtype_1$1.ElementType.Directive; } node.isDirective = isDirective; function isDocument(node2) { return node2.type === domelementtype_1$1.ElementType.Root; } node.isDocument = isDocument; function hasChildren(node2) { return Object.prototype.hasOwnProperty.call(node2, "children"); } node.hasChildren = hasChildren; function cloneNode(node2, recursive) { if (recursive === void 0) { recursive = false; } var result; if (isText(node2)) { result = new Text(node2.data); } else if (isComment(node2)) { result = new Comment(node2.data); } else if (isTag(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_1 = new Element(node2.name, __assign$1({}, node2.attribs), children); children.forEach(function(child) { return child.parent = clone_1; }); if (node2.namespace != null) { clone_1.namespace = node2.namespace; } if (node2["x-attribsNamespace"]) { clone_1["x-attribsNamespace"] = __assign$1({}, node2["x-attribsNamespace"]); } if (node2["x-attribsPrefix"]) { clone_1["x-attribsPrefix"] = __assign$1({}, node2["x-attribsPrefix"]); } result = clone_1; } else if (isCDATA(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_2 = new NodeWithChildren(domelementtype_1$1.ElementType.CDATA, children); children.forEach(function(child) { return child.parent = clone_2; }); result = clone_2; } else if (isDocument(node2)) { var children = recursive ? cloneChildren(node2.children) : []; var clone_3 = new Document(children); children.forEach(function(child) { return child.parent = clone_3; }); if (node2["x-mode"]) { clone_3["x-mode"] = node2["x-mode"]; } result = clone_3; } else if (isDirective(node2)) { var instruction = new ProcessingInstruction(node2.name, node2.data); if (node2["x-name"] != null) { instruction["x-name"] = node2["x-name"]; instruction["x-publicId"] = node2["x-publicId"]; instruction["x-systemId"] = node2["x-systemId"]; } result = instruction; } else { throw new Error("Not implemented yet: ".concat(node2.type)); } result.startIndex = node2.startIndex; result.endIndex = node2.endIndex; if (node2.sourceCodeLocation != null) { result.sourceCodeLocation = node2.sourceCodeLocation; } return result; } node.cloneNode = cloneNode; function cloneChildren(childs) { var children = childs.map(function(child) { return cloneNode(child, true); }); for (var i2 = 1; i2 < children.length; i2++) { children[i2].prev = children[i2 - 1]; children[i2 - 1].next = children[i2]; } return children; } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m2, k); if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m2[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m2, exports2) { for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m2, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DomHandler = void 0; var domelementtype_12 = lib$3; var node_1 = node; __exportStar(node, exports); var reWhitespace = /\s+/g; var defaultOpts = { normalizeWhitespace: false, withStartIndices: false, withEndIndices: false, xmlMode: false }; var DomHandler = ( /** @class */ function() { function DomHandler2(callback, options, elementCB) { this.dom = []; this.root = new node_1.Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; if (typeof options === "function") { elementCB = options; options = defaultOpts; } if (typeof callback === "object") { options = callback; callback = void 0; } this.callback = callback !== null && callback !== void 0 ? callback : null; this.options = options !== null && options !== void 0 ? options : defaultOpts; this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null; } DomHandler2.prototype.onparserinit = function(parser) { this.parser = parser; }; DomHandler2.prototype.onreset = function() { this.dom = []; this.root = new node_1.Document(this.dom); this.done = false; this.tagStack = [this.root]; this.lastNode = null; this.parser = null; }; DomHandler2.prototype.onend = function() { if (this.done) return; this.done = true; this.parser = null; this.handleCallback(null); }; DomHandler2.prototype.onerror = function(error) { this.handleCallback(error); }; DomHandler2.prototype.onclosetag = function() { this.lastNode = null; var elem = this.tagStack.pop(); if (this.options.withEndIndices) { elem.endIndex = this.parser.endIndex; } if (this.elementCB) this.elementCB(elem); }; DomHandler2.prototype.onopentag = function(name, attribs) { var type = this.options.xmlMode ? domelementtype_12.ElementType.Tag : void 0; var element = new node_1.Element(name, attribs, void 0, type); this.addNode(element); this.tagStack.push(element); }; DomHandler2.prototype.ontext = function(data) { var normalizeWhitespace = this.options.normalizeWhitespace; var lastNode = this.lastNode; if (lastNode && lastNode.type === domelementtype_12.ElementType.Text) { if (normalizeWhitespace) { lastNode.data = (lastNode.data + data).replace(reWhitespace, " "); } else { lastNode.data += data; } if (this.options.withEndIndices) { lastNode.endIndex = this.parser.endIndex; } } else { if (normalizeWhitespace) { data = data.replace(reWhitespace, " "); } var node2 = new node_1.Text(data); this.addNode(node2); this.lastNode = node2; } }; DomHandler2.prototype.oncomment = function(data) { if (this.lastNode && this.lastNode.type === domelementtype_12.ElementType.Comment) { this.lastNode.data += data; return; } var node2 = new node_1.Comment(data); this.addNode(node2); this.lastNode = node2; }; DomHandler2.prototype.oncommentend = function() { this.lastNode = null; }; DomHandler2.prototype.oncdatastart = function() { var text = new node_1.Text(""); var node2 = new node_1.NodeWithChildren(domelementtype_12.ElementType.CDATA, [text]); this.addNode(node2); text.parent = node2; this.lastNode = text; }; DomHandler2.prototype.oncdataend = function() { this.lastNode = null; }; DomHandler2.prototype.onprocessinginstruction = function(name, data) { var node2 = new node_1.ProcessingInstruction(name, data); this.addNode(node2); }; DomHandler2.prototype.handleCallback = function(error) { if (typeof this.callback === "function") { this.callback(error, this.dom); } else if (error) { throw error; } }; DomHandler2.prototype.addNode = function(node2) { var parent = this.tagStack[this.tagStack.length - 1]; var previousSibling = parent.children[parent.children.length - 1]; if (this.options.withStartIndices) { node2.startIndex = this.parser.startIndex; } if (this.options.withEndIndices) { node2.endIndex = this.parser.endIndex; } parent.children.push(node2); if (previousSibling) { node2.prev = previousSibling; previousSibling.next = node2; } node2.parent = parent; this.lastNode = null; }; return DomHandler2; }() ); exports.DomHandler = DomHandler; exports.default = DomHandler; })(lib$4); var FeedHandler$1 = {}; var lib$2 = {}; var stringify = {}; var lib$1 = {}; var lib = {}; var decode = {}; var __importDefault$3 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(decode, "__esModule", { value: true }); decode.decodeHTML = decode.decodeHTMLStrict = decode.decodeXML = void 0; var entities_json_1$1 = __importDefault$3(require$$1$1); var legacy_json_1 = __importDefault$3(require$$1); var xml_json_1$1 = __importDefault$3(require$$0); var decode_codepoint_1 = __importDefault$3(decode_codepoint); var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; decode.decodeXML = getStrictDecoder(xml_json_1$1.default); decode.decodeHTMLStrict = getStrictDecoder(entities_json_1$1.default); function getStrictDecoder(map2) { var replace = getReplacer(map2); return function(str) { return String(str).replace(strictEntityRe, replace); }; } var sorter = function(a, b) { return a < b ? 1 : -1; }; decode.decodeHTML = function() { var legacy2 = Object.keys(legacy_json_1.default).sort(sorter); var keys = Object.keys(entities_json_1$1.default).sort(sorter); for (var i2 = 0, j = 0; i2 < keys.length; i2++) { if (legacy2[j] === keys[i2]) { keys[i2] += ";?"; j++; } else { keys[i2] += ";"; } } var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); var replace = getReplacer(entities_json_1$1.default); function replacer(str) { if (str.substr(-1) !== ";") str += ";"; return replace(str); } return function(str) { return String(str).replace(re, replacer); }; }(); function getReplacer(map2) { return function replace(str) { if (str.charAt(1) === "#") { var secondChar = str.charAt(2); if (secondChar === "X" || secondChar === "x") { return decode_codepoint_1.default(parseInt(str.substr(3), 16)); } return decode_codepoint_1.default(parseInt(str.substr(2), 10)); } return map2[str.slice(1, -1)] || str; }; } var encode = {}; var __importDefault$2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(encode, "__esModule", { value: true }); encode.escapeUTF8 = encode.escape = encode.encodeNonAsciiHTML = encode.encodeHTML = encode.encodeXML = void 0; var xml_json_1 = __importDefault$2(require$$0); var inverseXML = getInverseObj(xml_json_1.default); var xmlReplacer = getInverseReplacer(inverseXML); encode.encodeXML = getASCIIEncoder(inverseXML); var entities_json_1 = __importDefault$2(require$$1$1); var inverseHTML = getInverseObj(entities_json_1.default); var htmlReplacer = getInverseReplacer(inverseHTML); encode.encodeHTML = getInverse(inverseHTML, htmlReplacer); encode.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); function getInverseObj(obj) { return Object.keys(obj).sort().reduce(function(inverse, name) { inverse[obj[name]] = "&" + name + ";"; return inverse; }, {}); } function getInverseReplacer(inverse) { var single = []; var multiple = []; for (var _i = 0, _a2 = Object.keys(inverse); _i < _a2.length; _i++) { var k = _a2[_i]; if (k.length === 1) { single.push("\\" + k); } else { multiple.push(k); } } single.sort(); for (var start = 0; start < single.length - 1; start++) { var end = start; while (end < single.length - 1 && single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) { end += 1; } var count = 1 + end - start; if (count < 3) continue; single.splice(start, count, single[start] + "-" + single[end]); } multiple.unshift("[" + single.join("") + "]"); return new RegExp(multiple.join("|"), "g"); } var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g; var getCodePoint = ( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition String.prototype.codePointAt != null ? ( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion function(str) { return str.codePointAt(0); } ) : ( // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae function(c) { return (c.charCodeAt(0) - 55296) * 1024 + c.charCodeAt(1) - 56320 + 65536; } ) ); function singleCharReplacer(c) { return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)).toString(16).toUpperCase() + ";"; } function getInverse(inverse, re) { return function(data) { return data.replace(re, function(name) { return inverse[name]; }).replace(reNonASCII, singleCharReplacer); }; } var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); function escape$2(data) { return data.replace(reEscapeChars, singleCharReplacer); } encode.escape = escape$2; function escapeUTF8(data) { return data.replace(xmlReplacer, singleCharReplacer); } encode.escapeUTF8 = escapeUTF8; function getASCIIEncoder(obj) { return function(data) { return data.replace(reEscapeChars, function(c) { return obj[c] || singleCharReplacer(c); }); }; } (function(exports) { Object.defineProperty(exports, "__esModule", { value: true }); exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; var decode_1 = decode; var encode_1 = encode; function decode$1(data, level) { return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); } exports.decode = decode$1; function decodeStrict(data, level) { return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); } exports.decodeStrict = decodeStrict; function encode$1(data, level) { return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); } exports.encode = encode$1; var encode_2 = encode; Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function() { return encode_2.encodeXML; } }); Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function() { return encode_2.encodeNonAsciiHTML; } }); Object.defineProperty(exports, "escape", { enumerable: true, get: function() { return encode_2.escape; } }); Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function() { return encode_2.escapeUTF8; } }); Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function() { return encode_2.encodeHTML; } }); var decode_2 = decode; Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function() { return decode_2.decodeXML; } }); Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function() { return decode_2.decodeHTML; } }); Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function() { return decode_2.decodeHTMLStrict; } }); Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function() { return decode_2.decodeXML; } }); })(lib); var foreignNames = {}; Object.defineProperty(foreignNames, "__esModule", { value: true }); foreignNames.attributeNames = foreignNames.elementNames = void 0; foreignNames.elementNames = /* @__PURE__ */ new Map([ ["altglyph", "altGlyph"], ["altglyphdef", "altGlyphDef"], ["altglyphitem", "altGlyphItem"], ["animatecolor", "animateColor"], ["animatemotion", "animateMotion"], ["animatetransform", "animateTransform"], ["clippath", "clipPath"], ["feblend", "feBlend"], ["fecolormatrix", "feColorMatrix"], ["fecomponenttransfer", "feComponentTransfer"], ["fecomposite", "feComposite"], ["feconvolvematrix", "feConvolveMatrix"], ["fediffuselighting", "feDiffuseLighting"], ["fedisplacementmap", "feDisplacementMap"], ["fedistantlight", "feDistantLight"], ["fedropshadow", "feDropShadow"], ["feflood", "feFlood"], ["fefunca", "feFuncA"], ["fefuncb", "feFuncB"], ["fefuncg", "feFuncG"], ["fefuncr", "feFuncR"], ["fegaussianblur", "feGaussianBlur"], ["feimage", "feImage"], ["femerge", "feMerge"], ["femergenode", "feMergeNode"], ["femorphology", "feMorphology"], ["feoffset", "feOffset"], ["fepointlight", "fePointLight"], ["fespecularlighting", "feSpecularLighting"], ["fespotlight", "feSpotLight"], ["fetile", "feTile"], ["feturbulence", "feTurbulence"], ["foreignobject", "foreignObject"], ["glyphref", "glyphRef"], ["lineargradient", "linearGradient"], ["radialgradient", "radialGradient"], ["textpath", "textPath"] ]); foreignNames.attributeNames = /* @__PURE__ */ new Map([ ["definitionurl", "definitionURL"], ["attributename", "attributeName"], ["attributetype", "attributeType"], ["basefrequency", "baseFrequency"], ["baseprofile", "baseProfile"], ["calcmode", "calcMode"], ["clippathunits", "clipPathUnits"], ["diffuseconstant", "diffuseConstant"], ["edgemode", "edgeMode"], ["filterunits", "filterUnits"], ["glyphref", "glyphRef"], ["gradienttransform", "gradientTransform"], ["gradientunits", "gradientUnits"], ["kernelmatrix", "kernelMatrix"], ["kernelunitlength", "kernelUnitLength"], ["keypoints", "keyPoints"], ["keysplines", "keySplines"], ["keytimes", "keyTimes"], ["lengthadjust", "lengthAdjust"], ["limitingconeangle", "limitingConeAngle"], ["markerheight", "markerHeight"], ["markerunits", "markerUnits"], ["markerwidth", "markerWidth"], ["maskcontentunits", "maskContentUnits"], ["maskunits", "maskUnits"], ["numoctaves", "numOctaves"], ["pathlength", "pathLength"], ["patterncontentunits", "patternContentUnits"], ["patterntransform", "patternTransform"], ["patternunits", "patternUnits"], ["pointsatx", "pointsAtX"], ["pointsaty", "pointsAtY"], ["pointsatz", "pointsAtZ"], ["preservealpha", "preserveAlpha"], ["preserveaspectratio", "preserveAspectRatio"], ["primitiveunits", "primitiveUnits"], ["refx", "refX"], ["refy", "refY"], ["repeatcount", "repeatCount"], ["repeatdur", "repeatDur"], ["requiredextensions", "requiredExtensions"], ["requiredfeatures", "requiredFeatures"], ["specularconstant", "specularConstant"], ["specularexponent", "specularExponent"], ["spreadmethod", "spreadMethod"], ["startoffset", "startOffset"], ["stddeviation", "stdDeviation"], ["stitchtiles", "stitchTiles"], ["surfacescale", "surfaceScale"], ["systemlanguage", "systemLanguage"], ["tablevalues", "tableValues"], ["targetx", "targetX"], ["targety", "targetY"], ["textlength", "textLength"], ["viewbox", "viewBox"], ["viewtarget", "viewTarget"], ["xchannelselector", "xChannelSelector"], ["ychannelselector", "yChannelSelector"], ["zoomandpan", "zoomAndPan"] ]); var __assign = commonjsGlobal && commonjsGlobal.__assign || function() { __assign = Object.assign || function(t) { for (var s, i2 = 1, n = arguments.length; i2 < n; i2++) { s = arguments[i2]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __createBinding$1 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m2[k]; } }); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __setModuleDefault$1 = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar$1 = commonjsGlobal && commonjsGlobal.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding$1(result, mod, k); } __setModuleDefault$1(result, mod); return result; }; Object.defineProperty(lib$1, "__esModule", { value: true }); var ElementType = __importStar$1(lib$3); var entities_1 = lib; var foreignNames_1 = foreignNames; var unencodedElements = /* @__PURE__ */ new Set([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]); function formatAttributes(attributes, opts) { if (!attributes) return; return Object.keys(attributes).map(function(key) { var _a2, _b; var value = (_a2 = attributes[key]) !== null && _a2 !== void 0 ? _a2 : ""; if (opts.xmlMode === "foreign") { key = (_b = foreignNames_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; } if (!opts.emptyAttrs && !opts.xmlMode && value === "") { return key; } return key + '="' + (opts.decodeEntities !== false ? entities_1.encodeXML(value) : value.replace(/"/g, """)) + '"'; }).join(" "); } var singleTag = /* @__PURE__ */ new Set([ "area", "base", "basefont", "br", "col", "command", "embed", "frame", "hr", "img", "input", "isindex", "keygen", "link", "meta", "param", "source", "track", "wbr" ]); function render(node2, options) { if (options === void 0) { options = {}; } var nodes = "length" in node2 ? node2 : [node2]; var output = ""; for (var i2 = 0; i2 < nodes.length; i2++) { output += renderNode(nodes[i2], options); } return output; } lib$1.default = render; function renderNode(node2, options) { switch (node2.type) { case ElementType.Root: return render(node2.children, options); case ElementType.Directive: case ElementType.Doctype: return renderDirective(node2); case ElementType.Comment: return renderComment(node2); case ElementType.CDATA: return renderCdata(node2); case ElementType.Script: case ElementType.Style: case ElementType.Tag: return renderTag(node2, options); case ElementType.Text: return renderText(node2, options); } } var foreignModeIntegrationPoints = /* @__PURE__ */ new Set([ "mi", "mo", "mn", "ms", "mtext", "annotation-xml", "foreignObject", "desc", "title" ]); var foreignElements = /* @__PURE__ */ new Set(["svg", "math"]); function renderTag(elem, opts) { var _a2; if (opts.xmlMode === "foreign") { elem.name = (_a2 = foreignNames_1.elementNames.get(elem.name)) !== null && _a2 !== void 0 ? _a2 : elem.name; if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) { opts = __assign(__assign({}, opts), { xmlMode: false }); } } if (!opts.xmlMode && foreignElements.has(elem.name)) { opts = __assign(__assign({}, opts), { xmlMode: "foreign" }); } var tag2 = "<" + elem.name; var attribs = formatAttributes(elem.attribs, opts); if (attribs) { tag2 += " " + attribs; } if (elem.children.length === 0 && (opts.xmlMode ? ( // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags opts.selfClosingTags !== false ) : ( // User explicitly asked for self-closing tags, even in HTML mode opts.selfClosingTags && singleTag.has(elem.name) ))) { if (!opts.xmlMode) tag2 += " "; tag2 += "/>"; } else { tag2 += ">"; if (elem.children.length > 0) { tag2 += render(elem.children, opts); } if (opts.xmlMode || !singleTag.has(elem.name)) { tag2 += ""; } } return tag2; } function renderDirective(elem) { return "<" + elem.data + ">"; } function renderText(elem, opts) { var data = elem.data || ""; if (opts.decodeEntities !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) { data = entities_1.encodeXML(data); } return data; } function renderCdata(elem) { return ""; } function renderComment(elem) { return ""; } var __importDefault$1 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(stringify, "__esModule", { value: true }); stringify.innerText = stringify.textContent = stringify.getText = stringify.getInnerHTML = stringify.getOuterHTML = void 0; var domhandler_1$5 = lib$4; var dom_serializer_1 = __importDefault$1(lib$1); var domelementtype_1 = lib$3; function getOuterHTML(node2, options) { return (0, dom_serializer_1.default)(node2, options); } stringify.getOuterHTML = getOuterHTML; function getInnerHTML(node2, options) { return (0, domhandler_1$5.hasChildren)(node2) ? node2.children.map(function(node3) { return getOuterHTML(node3, options); }).join("") : ""; } stringify.getInnerHTML = getInnerHTML; function getText(node2) { if (Array.isArray(node2)) return node2.map(getText).join(""); if ((0, domhandler_1$5.isTag)(node2)) return node2.name === "br" ? "\n" : getText(node2.children); if ((0, domhandler_1$5.isCDATA)(node2)) return getText(node2.children); if ((0, domhandler_1$5.isText)(node2)) return node2.data; return ""; } stringify.getText = getText; function textContent(node2) { if (Array.isArray(node2)) return node2.map(textContent).join(""); if ((0, domhandler_1$5.hasChildren)(node2) && !(0, domhandler_1$5.isComment)(node2)) { return textContent(node2.children); } if ((0, domhandler_1$5.isText)(node2)) return node2.data; return ""; } stringify.textContent = textContent; function innerText(node2) { if (Array.isArray(node2)) return node2.map(innerText).join(""); if ((0, domhandler_1$5.hasChildren)(node2) && (node2.type === domelementtype_1.ElementType.Tag || (0, domhandler_1$5.isCDATA)(node2))) { return innerText(node2.children); } if ((0, domhandler_1$5.isText)(node2)) return node2.data; return ""; } stringify.innerText = innerText; var traversal = {}; Object.defineProperty(traversal, "__esModule", { value: true }); traversal.prevElementSibling = traversal.nextElementSibling = traversal.getName = traversal.hasAttrib = traversal.getAttributeValue = traversal.getSiblings = traversal.getParent = traversal.getChildren = void 0; var domhandler_1$4 = lib$4; var emptyArray = []; function getChildren(elem) { var _a2; return (_a2 = elem.children) !== null && _a2 !== void 0 ? _a2 : emptyArray; } traversal.getChildren = getChildren; function getParent(elem) { return elem.parent || null; } traversal.getParent = getParent; function getSiblings(elem) { var _a2, _b; var parent = getParent(elem); if (parent != null) return getChildren(parent); var siblings = [elem]; var prev = elem.prev, next = elem.next; while (prev != null) { siblings.unshift(prev); _a2 = prev, prev = _a2.prev; } while (next != null) { siblings.push(next); _b = next, next = _b.next; } return siblings; } traversal.getSiblings = getSiblings; function getAttributeValue(elem, name) { var _a2; return (_a2 = elem.attribs) === null || _a2 === void 0 ? void 0 : _a2[name]; } traversal.getAttributeValue = getAttributeValue; function hasAttrib(elem, name) { return elem.attribs != null && Object.prototype.hasOwnProperty.call(elem.attribs, name) && elem.attribs[name] != null; } traversal.hasAttrib = hasAttrib; function getName(elem) { return elem.name; } traversal.getName = getName; function nextElementSibling(elem) { var _a2; var next = elem.next; while (next !== null && !(0, domhandler_1$4.isTag)(next)) _a2 = next, next = _a2.next; return next; } traversal.nextElementSibling = nextElementSibling; function prevElementSibling(elem) { var _a2; var prev = elem.prev; while (prev !== null && !(0, domhandler_1$4.isTag)(prev)) _a2 = prev, prev = _a2.prev; return prev; } traversal.prevElementSibling = prevElementSibling; var manipulation = {}; Object.defineProperty(manipulation, "__esModule", { value: true }); manipulation.prepend = manipulation.prependChild = manipulation.append = manipulation.appendChild = manipulation.replaceElement = manipulation.removeElement = void 0; function removeElement(elem) { if (elem.prev) elem.prev.next = elem.next; if (elem.next) elem.next.prev = elem.prev; if (elem.parent) { var childs = elem.parent.children; childs.splice(childs.lastIndexOf(elem), 1); } } manipulation.removeElement = removeElement; function replaceElement(elem, replacement) { var prev = replacement.prev = elem.prev; if (prev) { prev.next = replacement; } var next = replacement.next = elem.next; if (next) { next.prev = replacement; } var parent = replacement.parent = elem.parent; if (parent) { var childs = parent.children; childs[childs.lastIndexOf(elem)] = replacement; } } manipulation.replaceElement = replaceElement; function appendChild(elem, child) { removeElement(child); child.next = null; child.parent = elem; if (elem.children.push(child) > 1) { var sibling = elem.children[elem.children.length - 2]; sibling.next = child; child.prev = sibling; } else { child.prev = null; } } manipulation.appendChild = appendChild; function append(elem, next) { removeElement(next); var parent = elem.parent; var currNext = elem.next; next.next = currNext; next.prev = elem; elem.next = next; next.parent = parent; if (currNext) { currNext.prev = next; if (parent) { var childs = parent.children; childs.splice(childs.lastIndexOf(currNext), 0, next); } } else if (parent) { parent.children.push(next); } } manipulation.append = append; function prependChild(elem, child) { removeElement(child); child.parent = elem; child.prev = null; if (elem.children.unshift(child) !== 1) { var sibling = elem.children[1]; sibling.prev = child; child.next = sibling; } else { child.next = null; } } manipulation.prependChild = prependChild; function prepend(elem, prev) { removeElement(prev); var parent = elem.parent; if (parent) { var childs = parent.children; childs.splice(childs.indexOf(elem), 0, prev); } if (elem.prev) { elem.prev.next = prev; } prev.parent = parent; prev.prev = elem.prev; prev.next = elem; elem.prev = prev; } manipulation.prepend = prepend; var querying = {}; Object.defineProperty(querying, "__esModule", { value: true }); querying.findAll = querying.existsOne = querying.findOne = querying.findOneChild = querying.find = querying.filter = void 0; var domhandler_1$3 = lib$4; function filter(test, node2, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } if (!Array.isArray(node2)) node2 = [node2]; return find(test, node2, recurse, limit); } querying.filter = filter; function find(test, nodes, recurse, limit) { var result = []; for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { var elem = nodes_1[_i]; if (test(elem)) { result.push(elem); if (--limit <= 0) break; } if (recurse && (0, domhandler_1$3.hasChildren)(elem) && elem.children.length > 0) { var children = find(test, elem.children, recurse, limit); result.push.apply(result, children); limit -= children.length; if (limit <= 0) break; } } return result; } querying.find = find; function findOneChild(test, nodes) { return nodes.find(test); } querying.findOneChild = findOneChild; function findOne(test, nodes, recurse) { if (recurse === void 0) { recurse = true; } var elem = null; for (var i2 = 0; i2 < nodes.length && !elem; i2++) { var checked = nodes[i2]; if (!(0, domhandler_1$3.isTag)(checked)) { continue; } else if (test(checked)) { elem = checked; } else if (recurse && checked.children.length > 0) { elem = findOne(test, checked.children); } } return elem; } querying.findOne = findOne; function existsOne(test, nodes) { return nodes.some(function(checked) { return (0, domhandler_1$3.isTag)(checked) && (test(checked) || checked.children.length > 0 && existsOne(test, checked.children)); }); } querying.existsOne = existsOne; function findAll(test, nodes) { var _a2; var result = []; var stack = nodes.filter(domhandler_1$3.isTag); var elem; while (elem = stack.shift()) { var children = (_a2 = elem.children) === null || _a2 === void 0 ? void 0 : _a2.filter(domhandler_1$3.isTag); if (children && children.length > 0) { stack.unshift.apply(stack, children); } if (test(elem)) result.push(elem); } return result; } querying.findAll = findAll; var legacy = {}; Object.defineProperty(legacy, "__esModule", { value: true }); legacy.getElementsByTagType = legacy.getElementsByTagName = legacy.getElementById = legacy.getElements = legacy.testElement = void 0; var domhandler_1$2 = lib$4; var querying_1 = querying; var Checks = { tag_name: function(name) { if (typeof name === "function") { return function(elem) { return (0, domhandler_1$2.isTag)(elem) && name(elem.name); }; } else if (name === "*") { return domhandler_1$2.isTag; } return function(elem) { return (0, domhandler_1$2.isTag)(elem) && elem.name === name; }; }, tag_type: function(type) { if (typeof type === "function") { return function(elem) { return type(elem.type); }; } return function(elem) { return elem.type === type; }; }, tag_contains: function(data) { if (typeof data === "function") { return function(elem) { return (0, domhandler_1$2.isText)(elem) && data(elem.data); }; } return function(elem) { return (0, domhandler_1$2.isText)(elem) && elem.data === data; }; } }; function getAttribCheck(attrib, value) { if (typeof value === "function") { return function(elem) { return (0, domhandler_1$2.isTag)(elem) && value(elem.attribs[attrib]); }; } return function(elem) { return (0, domhandler_1$2.isTag)(elem) && elem.attribs[attrib] === value; }; } function combineFuncs(a, b) { return function(elem) { return a(elem) || b(elem); }; } function compileTest(options) { var funcs = Object.keys(options).map(function(key) { var value = options[key]; return Object.prototype.hasOwnProperty.call(Checks, key) ? Checks[key](value) : getAttribCheck(key, value); }); return funcs.length === 0 ? null : funcs.reduce(combineFuncs); } function testElement(options, node2) { var test = compileTest(options); return test ? test(node2) : true; } legacy.testElement = testElement; function getElements$1(options, nodes, recurse, limit) { if (limit === void 0) { limit = Infinity; } var test = compileTest(options); return test ? (0, querying_1.filter)(test, nodes, recurse, limit) : []; } legacy.getElements = getElements$1; function getElementById(id, nodes, recurse) { if (recurse === void 0) { recurse = true; } if (!Array.isArray(nodes)) nodes = [nodes]; return (0, querying_1.findOne)(getAttribCheck("id", id), nodes, recurse); } legacy.getElementById = getElementById; function getElementsByTagName(tagName, nodes, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } return (0, querying_1.filter)(Checks.tag_name(tagName), nodes, recurse, limit); } legacy.getElementsByTagName = getElementsByTagName; function getElementsByTagType(type, nodes, recurse, limit) { if (recurse === void 0) { recurse = true; } if (limit === void 0) { limit = Infinity; } return (0, querying_1.filter)(Checks.tag_type(type), nodes, recurse, limit); } legacy.getElementsByTagType = getElementsByTagType; var helpers = {}; Object.defineProperty(helpers, "__esModule", { value: true }); helpers.uniqueSort = helpers.compareDocumentPosition = helpers.removeSubsets = void 0; var domhandler_1$1 = lib$4; function removeSubsets(nodes) { var idx = nodes.length; while (--idx >= 0) { var node2 = nodes[idx]; if (idx > 0 && nodes.lastIndexOf(node2, idx - 1) >= 0) { nodes.splice(idx, 1); continue; } for (var ancestor = node2.parent; ancestor; ancestor = ancestor.parent) { if (nodes.includes(ancestor)) { nodes.splice(idx, 1); break; } } } return nodes; } helpers.removeSubsets = removeSubsets; function compareDocumentPosition(nodeA, nodeB) { var aParents = []; var bParents = []; if (nodeA === nodeB) { return 0; } var current = (0, domhandler_1$1.hasChildren)(nodeA) ? nodeA : nodeA.parent; while (current) { aParents.unshift(current); current = current.parent; } current = (0, domhandler_1$1.hasChildren)(nodeB) ? nodeB : nodeB.parent; while (current) { bParents.unshift(current); current = current.parent; } var maxIdx = Math.min(aParents.length, bParents.length); var idx = 0; while (idx < maxIdx && aParents[idx] === bParents[idx]) { idx++; } if (idx === 0) { return 1; } var sharedParent = aParents[idx - 1]; var siblings = sharedParent.children; var aSibling = aParents[idx]; var bSibling = bParents[idx]; if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { if (sharedParent === nodeB) { return 4 | 16; } return 4; } if (sharedParent === nodeA) { return 2 | 8; } return 2; } helpers.compareDocumentPosition = compareDocumentPosition; function uniqueSort(nodes) { nodes = nodes.filter(function(node2, i2, arr) { return !arr.includes(node2, i2 + 1); }); nodes.sort(function(a, b) { var relative = compareDocumentPosition(a, b); if (relative & 2) { return -1; } else if (relative & 4) { return 1; } return 0; }); return nodes; } helpers.uniqueSort = uniqueSort; var feeds = {}; Object.defineProperty(feeds, "__esModule", { value: true }); feeds.getFeed = void 0; var stringify_1 = stringify; var legacy_1 = legacy; function getFeed(doc) { var feedRoot = getOneElement$1(isValidFeed$1, doc); return !feedRoot ? null : feedRoot.name === "feed" ? getAtomFeed(feedRoot) : getRssFeed(feedRoot); } feeds.getFeed = getFeed; function getAtomFeed(feedRoot) { var _a2; var childs = feedRoot.children; var feed = { type: "atom", items: (0, legacy_1.getElementsByTagName)("entry", childs).map(function(item) { var _a3; var children = item.children; var entry = { media: getMediaElements$1(children) }; addConditionally$1(entry, "id", "id", children); addConditionally$1(entry, "title", "title", children); var href2 = (_a3 = getOneElement$1("link", children)) === null || _a3 === void 0 ? void 0 : _a3.attribs.href; if (href2) { entry.link = href2; } var description = fetch$1("summary", children) || fetch$1("content", children); if (description) { entry.description = description; } var pubDate = fetch$1("updated", children); if (pubDate) { entry.pubDate = new Date(pubDate); } return entry; }) }; addConditionally$1(feed, "id", "id", childs); addConditionally$1(feed, "title", "title", childs); var href = (_a2 = getOneElement$1("link", childs)) === null || _a2 === void 0 ? void 0 : _a2.attribs.href; if (href) { feed.link = href; } addConditionally$1(feed, "description", "subtitle", childs); var updated = fetch$1("updated", childs); if (updated) { feed.updated = new Date(updated); } addConditionally$1(feed, "author", "email", childs, true); return feed; } function getRssFeed(feedRoot) { var _a2, _b; var childs = (_b = (_a2 = getOneElement$1("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b !== void 0 ? _b : []; var feed = { type: feedRoot.name.substr(0, 3), id: "", items: (0, legacy_1.getElementsByTagName)("item", feedRoot.children).map(function(item) { var children = item.children; var entry = { media: getMediaElements$1(children) }; addConditionally$1(entry, "id", "guid", children); addConditionally$1(entry, "title", "title", children); addConditionally$1(entry, "link", "link", children); addConditionally$1(entry, "description", "description", children); var pubDate = fetch$1("pubDate", children); if (pubDate) entry.pubDate = new Date(pubDate); return entry; }) }; addConditionally$1(feed, "title", "title", childs); addConditionally$1(feed, "link", "link", childs); addConditionally$1(feed, "description", "description", childs); var updated = fetch$1("lastBuildDate", childs); if (updated) { feed.updated = new Date(updated); } addConditionally$1(feed, "author", "managingEditor", childs, true); return feed; } var MEDIA_KEYS_STRING = ["url", "type", "lang"]; var MEDIA_KEYS_INT = [ "fileSize", "bitrate", "framerate", "samplingrate", "channels", "duration", "height", "width" ]; function getMediaElements$1(where) { return (0, legacy_1.getElementsByTagName)("media:content", where).map(function(elem) { var attribs = elem.attribs; var media = { medium: attribs.medium, isDefault: !!attribs.isDefault }; for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) { var attrib = MEDIA_KEYS_STRING_1[_i]; if (attribs[attrib]) { media[attrib] = attribs[attrib]; } } for (var _a2 = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a2 < MEDIA_KEYS_INT_1.length; _a2++) { var attrib = MEDIA_KEYS_INT_1[_a2]; if (attribs[attrib]) { media[attrib] = parseInt(attribs[attrib], 10); } } if (attribs.expression) { media.expression = attribs.expression; } return media; }); } function getOneElement$1(tagName, node2) { return (0, legacy_1.getElementsByTagName)(tagName, node2, true, 1)[0]; } function fetch$1(tagName, where, recurse) { if (recurse === void 0) { recurse = false; } return (0, stringify_1.textContent)((0, legacy_1.getElementsByTagName)(tagName, where, recurse, 1)).trim(); } function addConditionally$1(obj, prop2, tagName, where, recurse) { if (recurse === void 0) { recurse = false; } var val = fetch$1(tagName, where, recurse); if (val) obj[prop2] = val; } function isValidFeed$1(value) { return value === "rss" || value === "feed" || value === "rdf:RDF"; } (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m2[k]; } }); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m2, exports2) { for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m2, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasChildren = exports.isDocument = exports.isComment = exports.isText = exports.isCDATA = exports.isTag = void 0; __exportStar(stringify, exports); __exportStar(traversal, exports); __exportStar(manipulation, exports); __exportStar(querying, exports); __exportStar(legacy, exports); __exportStar(helpers, exports); __exportStar(feeds, exports); var domhandler_12 = lib$4; Object.defineProperty(exports, "isTag", { enumerable: true, get: function() { return domhandler_12.isTag; } }); Object.defineProperty(exports, "isCDATA", { enumerable: true, get: function() { return domhandler_12.isCDATA; } }); Object.defineProperty(exports, "isText", { enumerable: true, get: function() { return domhandler_12.isText; } }); Object.defineProperty(exports, "isComment", { enumerable: true, get: function() { return domhandler_12.isComment; } }); Object.defineProperty(exports, "isDocument", { enumerable: true, get: function() { return domhandler_12.isDocument; } }); Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function() { return domhandler_12.hasChildren; } }); })(lib$2); var __extends = commonjsGlobal && commonjsGlobal.__extends || function() { var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) { d2.__proto__ = b2; } || function(d2, b2) { for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p]; }; return extendStatics(d, b); }; return function(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; }(); var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m2[k]; } }); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __setModuleDefault = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = commonjsGlobal && commonjsGlobal.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(FeedHandler$1, "__esModule", { value: true }); FeedHandler$1.parseFeed = FeedHandler$1.FeedHandler = void 0; var domhandler_1 = __importDefault(lib$4); var DomUtils = __importStar(lib$2); var Parser_1 = Parser$1; var FeedItemMediaMedium; (function(FeedItemMediaMedium2) { FeedItemMediaMedium2[FeedItemMediaMedium2["image"] = 0] = "image"; FeedItemMediaMedium2[FeedItemMediaMedium2["audio"] = 1] = "audio"; FeedItemMediaMedium2[FeedItemMediaMedium2["video"] = 2] = "video"; FeedItemMediaMedium2[FeedItemMediaMedium2["document"] = 3] = "document"; FeedItemMediaMedium2[FeedItemMediaMedium2["executable"] = 4] = "executable"; })(FeedItemMediaMedium || (FeedItemMediaMedium = {})); var FeedItemMediaExpression; (function(FeedItemMediaExpression2) { FeedItemMediaExpression2[FeedItemMediaExpression2["sample"] = 0] = "sample"; FeedItemMediaExpression2[FeedItemMediaExpression2["full"] = 1] = "full"; FeedItemMediaExpression2[FeedItemMediaExpression2["nonstop"] = 2] = "nonstop"; })(FeedItemMediaExpression || (FeedItemMediaExpression = {})); var FeedHandler = ( /** @class */ function(_super) { __extends(FeedHandler2, _super); function FeedHandler2(callback, options) { var _this = this; if (typeof callback === "object") { callback = void 0; options = callback; } _this = _super.call(this, callback, options) || this; return _this; } FeedHandler2.prototype.onend = function() { var _a2, _b; var feedRoot = getOneElement(isValidFeed, this.dom); if (!feedRoot) { this.handleCallback(new Error("couldn't find root of feed")); return; } var feed = {}; if (feedRoot.name === "feed") { var childs = feedRoot.children; feed.type = "atom"; addConditionally(feed, "id", "id", childs); addConditionally(feed, "title", "title", childs); var href = getAttribute("href", getOneElement("link", childs)); if (href) { feed.link = href; } addConditionally(feed, "description", "subtitle", childs); var updated = fetch("updated", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "email", childs, true); feed.items = getElements("entry", childs).map(function(item) { var entry = {}; var children = item.children; addConditionally(entry, "id", "id", children); addConditionally(entry, "title", "title", children); var href2 = getAttribute("href", getOneElement("link", children)); if (href2) { entry.link = href2; } var description = fetch("summary", children) || fetch("content", children); if (description) { entry.description = description; } var pubDate = fetch("updated", children); if (pubDate) { entry.pubDate = new Date(pubDate); } entry.media = getMediaElements(children); return entry; }); } else { var childs = (_b = (_a2 = getOneElement("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b !== void 0 ? _b : []; feed.type = feedRoot.name.substr(0, 3); feed.id = ""; addConditionally(feed, "title", "title", childs); addConditionally(feed, "link", "link", childs); addConditionally(feed, "description", "description", childs); var updated = fetch("lastBuildDate", childs); if (updated) { feed.updated = new Date(updated); } addConditionally(feed, "author", "managingEditor", childs, true); feed.items = getElements("item", feedRoot.children).map(function(item) { var entry = {}; var children = item.children; addConditionally(entry, "id", "guid", children); addConditionally(entry, "title", "title", children); addConditionally(entry, "link", "link", children); addConditionally(entry, "description", "description", children); var pubDate = fetch("pubDate", children); if (pubDate) entry.pubDate = new Date(pubDate); entry.media = getMediaElements(children); return entry; }); } this.feed = feed; this.handleCallback(null); }; return FeedHandler2; }(domhandler_1.default) ); FeedHandler$1.FeedHandler = FeedHandler; function getMediaElements(where) { return getElements("media:content", where).map(function(elem) { var media = { medium: elem.attribs.medium, isDefault: !!elem.attribs.isDefault }; if (elem.attribs.url) { media.url = elem.attribs.url; } if (elem.attribs.fileSize) { media.fileSize = parseInt(elem.attribs.fileSize, 10); } if (elem.attribs.type) { media.type = elem.attribs.type; } if (elem.attribs.expression) { media.expression = elem.attribs.expression; } if (elem.attribs.bitrate) { media.bitrate = parseInt(elem.attribs.bitrate, 10); } if (elem.attribs.framerate) { media.framerate = parseInt(elem.attribs.framerate, 10); } if (elem.attribs.samplingrate) { media.samplingrate = parseInt(elem.attribs.samplingrate, 10); } if (elem.attribs.channels) { media.channels = parseInt(elem.attribs.channels, 10); } if (elem.attribs.duration) { media.duration = parseInt(elem.attribs.duration, 10); } if (elem.attribs.height) { media.height = parseInt(elem.attribs.height, 10); } if (elem.attribs.width) { media.width = parseInt(elem.attribs.width, 10); } if (elem.attribs.lang) { media.lang = elem.attribs.lang; } return media; }); } function getElements(tagName, where) { return DomUtils.getElementsByTagName(tagName, where, true); } function getOneElement(tagName, node2) { return DomUtils.getElementsByTagName(tagName, node2, true, 1)[0]; } function fetch(tagName, where, recurse) { if (recurse === void 0) { recurse = false; } return DomUtils.getText(DomUtils.getElementsByTagName(tagName, where, recurse, 1)).trim(); } function getAttribute(name, elem) { if (!elem) { return null; } var attribs = elem.attribs; return attribs[name]; } function addConditionally(obj, prop2, what, where, recurse) { if (recurse === void 0) { recurse = false; } var tmp = fetch(what, where, recurse); if (tmp) obj[prop2] = tmp; } function isValidFeed(value) { return value === "rss" || value === "feed" || value === "rdf:RDF"; } function parseFeed(feed, options) { if (options === void 0) { options = { xmlMode: true }; } var handler = new FeedHandler(options); new Parser_1.Parser(handler, options).end(feed); return handler.feed; } FeedHandler$1.parseFeed = parseFeed; (function(exports) { var __createBinding2 = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function(o, m2, k, k2) { if (k2 === void 0) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m2[k]; } }); } : function(o, m2, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m2[k]; }); var __setModuleDefault2 = commonjsGlobal && commonjsGlobal.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar2 = commonjsGlobal && commonjsGlobal.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); } __setModuleDefault2(result, mod); return result; }; var __exportStar = commonjsGlobal && commonjsGlobal.__exportStar || function(m2, exports2) { for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding2(exports2, m2, p); }; var __importDefault2 = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0; var Parser_12 = Parser$1; Object.defineProperty(exports, "Parser", { enumerable: true, get: function() { return Parser_12.Parser; } }); var domhandler_12 = lib$4; Object.defineProperty(exports, "DomHandler", { enumerable: true, get: function() { return domhandler_12.DomHandler; } }); Object.defineProperty(exports, "DefaultHandler", { enumerable: true, get: function() { return domhandler_12.DomHandler; } }); function parseDocument(data, options) { var handler = new domhandler_12.DomHandler(void 0, options); new Parser_12.Parser(handler, options).end(data); return handler.root; } exports.parseDocument = parseDocument; function parseDOM(data, options) { return parseDocument(data, options).children; } exports.parseDOM = parseDOM; function createDomStream(cb, options, elementCb) { var handler = new domhandler_12.DomHandler(cb, options, elementCb); return new Parser_12.Parser(handler, options); } exports.createDomStream = createDomStream; var Tokenizer_12 = Tokenizer$1; Object.defineProperty(exports, "Tokenizer", { enumerable: true, get: function() { return __importDefault2(Tokenizer_12).default; } }); var ElementType2 = __importStar2(lib$3); exports.ElementType = ElementType2; __exportStar(FeedHandler$1, exports); exports.DomUtils = __importStar2(lib$2); var FeedHandler_1 = FeedHandler$1; Object.defineProperty(exports, "RssHandler", { enumerable: true, get: function() { return FeedHandler_1.FeedHandler; } }); })(lib$5); function _extends$1() { _extends$1 = Object.assign || function(target2) { for (var i2 = 1; i2 < arguments.length; i2++) { var source2 = arguments[i2]; for (var key in source2) { if (Object.prototype.hasOwnProperty.call(source2, key)) { target2[key] = source2[key]; } } } return target2; }; return _extends$1.apply(this, arguments); } function _objectWithoutPropertiesLoose(source2, excluded) { if (source2 == null) return {}; var target2 = {}; var sourceKeys = Object.keys(source2); var key, i2; for (i2 = 0; i2 < sourceKeys.length; i2++) { key = sourceKeys[i2]; if (excluded.indexOf(key) >= 0) continue; target2[key] = source2[key]; } return target2; } function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i2 = 0, arr2 = new Array(len); i2 < len; i2++) arr2[i2] = arr[i2]; return arr2; } function _createForOfIteratorHelperLoose$1(o, allowArrayLike) { var it2; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it2 = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it2) o = it2; var i2 = 0; return function() { if (i2 >= o.length) return { done: true }; return { done: false, value: o[i2++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it2 = o[Symbol.iterator](); return it2.next.bind(it2); } function MarkdownView$1(props) { var dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, flavor = props.flavor, markdown = props.markdown, markup = props.markup, options = props.options, extensions = props.extensions, components = props.components, sanitizeHtml = props.sanitizeHtml, otherProps = _objectWithoutPropertiesLoose(props, ["dangerouslySetInnerHTML", "flavor", "markdown", "markup", "options", "extensions", "components", "sanitizeHtml"]); var mapElement = reactExports.useMemo(function() { return function mapElement2(node2, index2) { if (node2.type === "tag" && node2 instanceof lib$4.Element) { var elementType = (components === null || components === void 0 ? void 0 : components[node2.name]) || node2.name; var _props = _extends$1({ key: index2 }, node2.attribs); if (_props["class"] && !_props.className) { _props.className = _props["class"]; delete _props["class"]; } if (typeof _props.style === "string") { var styles = {}; _props.style.split(";").forEach(function(style) { if (style.indexOf(":") !== -1) { var _style$split = style.split(":"), key2 = _style$split[0], value = _style$split[1]; key2 = key2.trim().replace(/-([a-z])/g, function(match) { return match[1].toUpperCase(); }); value = value.trim(); styles[key2] = value; } }); _props.style = styles; } var children = skipAnyChildrenFor.includes(node2.name) ? null : skipWhitespaceElementsFor.includes(node2.name) ? node2.children.filter(filterWhitespaceElements).map(mapElement2) : node2.children.map(mapElement2); return reactExports.createElement(elementType, _props, children); } else if (node2.type === "text" && node2 instanceof lib$4.DataNode) { return node2.data; } else if (node2.type === "comment") { return null; } else if (node2.type === "style" && node2 instanceof lib$4.Element) { var _props2 = _extends$1({ key: index2 }, node2.attribs); var _children = node2.children.map(mapElement2); return reactExports.createElement("style", _props2, _children); } else { console.warn('Warning: Could not map element with type "' + node2.type + '".', node2); return null; } }; }, [components]); if (dangerouslySetInnerHTML && components) { console.warn("MarkdownView could not render custom components when dangerouslySetInnerHTML is enabled."); } var converter = new showdownExports.Converter(); if (flavor) { converter.setFlavor(flavor); } if (options) { for (var key in options) { if (key === "extensions" && options.extensions) { for (var _iterator = _createForOfIteratorHelperLoose$1(options.extensions), _step; !(_step = _iterator()).done; ) { var extension = _step.value; if (typeof extension === "string") { converter.useExtension(extension); } else { converter.addExtension(extension); } } } converter.setOption(key, options[key]); } } if (extensions) { converter.addExtension(extensions); } var html = converter.makeHtml(markdown !== null && markdown !== void 0 ? markdown : markup); if (sanitizeHtml) { html = sanitizeHtml(html); } if (dangerouslySetInnerHTML) { return React.createElement("div", { dangerouslySetInnerHTML: { __html: html } }); } var root = lib$5.parseDOM(html, { // Don't change the case of parsed html tags to match inline components. lowerCaseTags: false, // Don't change the attribute names so that stuff like `className` works correctly. lowerCaseAttributeNames: false, // Encode entities automatically, so that © and ü works correctly. decodeEntities: true, // Fix issue with content after a self closing tag. recognizeSelfClosing: true }); return reactExports.createElement("div", otherProps, root.map(mapElement)); } var skipAnyChildrenFor = ["area", "br", "col", "embed", "hr", "img", "input", "keygen", "param", "source", "track", "wbr"]; var skipWhitespaceElementsFor = ["table", "thead", "tbody", "tr"]; function filterWhitespaceElements(node2) { if (node2.type === "text" && node2 instanceof lib$4.DataNode) { return node2.data.trim().length > 0; } else { return true; } } var Markdown = MarkdownView$1; function deepFreeze(obj) { Object.freeze(obj); var objIsFunction = typeof obj === "function"; Object.getOwnPropertyNames(obj).forEach(function(prop2) { if (Object.hasOwnProperty.call(obj, prop2) && obj[prop2] !== null && (typeof obj[prop2] === "object" || typeof obj[prop2] === "function") && (objIsFunction ? prop2 !== "caller" && prop2 !== "callee" && prop2 !== "arguments" : true) && !Object.isFrozen(obj[prop2])) { deepFreeze(obj[prop2]); } }); return obj; } class Response { /** * @param {CompiledMode} mode */ constructor(mode) { if (mode.data === void 0) mode.data = {}; this.data = mode.data; } ignoreMatch() { this.ignore = true; } } function escapeHTML(value) { return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); } function inherit$1(original, ...objects) { var result = {}; for (const key in original) { result[key] = original[key]; } objects.forEach(function(obj) { for (const key in obj) { result[key] = obj[key]; } }); return ( /** @type {T} */ result ); } function tag(node2) { return node2.nodeName.toLowerCase(); } function nodeStream(node2) { var result = []; (function _nodeStream(node3, offset) { for (var child = node3.firstChild; child; child = child.nextSibling) { if (child.nodeType === 3) { offset += child.nodeValue.length; } else if (child.nodeType === 1) { result.push({ event: "start", offset, node: child }); offset = _nodeStream(child, offset); if (!tag(child).match(/br|hr|img|input/)) { result.push({ event: "stop", offset, node: child }); } } } return offset; })(node2, 0); return result; } function mergeStreams(original, highlighted, value) { var processed = 0; var result = ""; var nodeStack = []; function selectStream() { if (!original.length || !highlighted.length) { return original.length ? original : highlighted; } if (original[0].offset !== highlighted[0].offset) { return original[0].offset < highlighted[0].offset ? original : highlighted; } return highlighted[0].event === "start" ? original : highlighted; } function open(node2) { function attr_str(attr) { return " " + attr.nodeName + '="' + escapeHTML(attr.value) + '"'; } result += "<" + tag(node2) + [].map.call(node2.attributes, attr_str).join("") + ">"; } function close(node2) { result += ""; } function render2(event) { (event.event === "start" ? open : close)(event.node); } while (original.length || highlighted.length) { var stream = selectStream(); result += escapeHTML(value.substring(processed, stream[0].offset)); processed = stream[0].offset; if (stream === original) { nodeStack.reverse().forEach(close); do { render2(stream.splice(0, 1)[0]); stream = selectStream(); } while (stream === original && stream.length && stream[0].offset === processed); nodeStack.reverse().forEach(open); } else { if (stream[0].event === "start") { nodeStack.push(stream[0].node); } else { nodeStack.pop(); } render2(stream.splice(0, 1)[0]); } } return result + escapeHTML(value.substr(processed)); } var utils = /* @__PURE__ */ Object.freeze({ __proto__: null, escapeHTML, inherit: inherit$1, nodeStream, mergeStreams }); const SPAN_CLOSE = ""; const emitsWrappingTags = (node2) => { return !!node2.kind; }; class HTMLRenderer { /** * Creates a new HTMLRenderer * * @param {Tree} parseTree - the parse tree (must support `walk` API) * @param {{classPrefix: string}} options */ constructor(parseTree, options) { this.buffer = ""; this.classPrefix = options.classPrefix; parseTree.walk(this); } /** * Adds texts to the output stream * * @param {string} text */ addText(text) { this.buffer += escapeHTML(text); } /** * Adds a node open to the output stream (if needed) * * @param {Node} node */ openNode(node2) { if (!emitsWrappingTags(node2)) return; let className = node2.kind; if (!node2.sublanguage) { className = `${this.classPrefix}${className}`; } this.span(className); } /** * Adds a node close to the output stream (if needed) * * @param {Node} node */ closeNode(node2) { if (!emitsWrappingTags(node2)) return; this.buffer += SPAN_CLOSE; } /** * returns the accumulated buffer */ value() { return this.buffer; } // helpers /** * Builds a span element * * @param {string} className */ span(className) { this.buffer += ``; } } class TokenTree { constructor() { this.rootNode = { children: [] }; this.stack = [this.rootNode]; } get top() { return this.stack[this.stack.length - 1]; } get root() { return this.rootNode; } /** @param {Node} node */ add(node2) { this.top.children.push(node2); } /** @param {string} kind */ openNode(kind) { const node2 = { kind, children: [] }; this.add(node2); this.stack.push(node2); } closeNode() { if (this.stack.length > 1) { return this.stack.pop(); } return void 0; } closeAllNodes() { while (this.closeNode()) ; } toJSON() { return JSON.stringify(this.rootNode, null, 4); } /** * @typedef { import("./html_renderer").Renderer } Renderer * @param {Renderer} builder */ walk(builder) { return this.constructor._walk(builder, this.rootNode); } /** * @param {Renderer} builder * @param {Node} node */ static _walk(builder, node2) { if (typeof node2 === "string") { builder.addText(node2); } else if (node2.children) { builder.openNode(node2); node2.children.forEach((child) => this._walk(builder, child)); builder.closeNode(node2); } return builder; } /** * @param {Node} node */ static _collapse(node2) { if (typeof node2 === "string") return; if (!node2.children) return; if (node2.children.every((el2) => typeof el2 === "string")) { node2.children = [node2.children.join("")]; } else { node2.children.forEach((child) => { TokenTree._collapse(child); }); } } } class TokenTreeEmitter extends TokenTree { /** * @param {*} options */ constructor(options) { super(); this.options = options; } /** * @param {string} text * @param {string} kind */ addKeyword(text, kind) { if (text === "") { return; } this.openNode(kind); this.addText(text); this.closeNode(); } /** * @param {string} text */ addText(text) { if (text === "") { return; } this.add(text); } /** * @param {Emitter & {root: DataNode}} emitter * @param {string} name */ addSublanguage(emitter, name) { const node2 = emitter.root; node2.kind = name; node2.sublanguage = true; this.add(node2); } toHTML() { const renderer = new HTMLRenderer(this, this.options); return renderer.value(); } finalize() { return true; } } function escape(value) { return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "m"); } function source(re) { if (!re) return null; if (typeof re === "string") return re; return re.source; } function concat(...args) { const joined = args.map((x) => source(x)).join(""); return joined; } function countMatchGroups(re) { return new RegExp(re.toString() + "|").exec("").length - 1; } function startsWith(re, lexeme) { var match = re && re.exec(lexeme); return match && match.index === 0; } function join(regexps, separator = "|") { var backreferenceRe = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./; var numCaptures = 0; var ret = ""; for (var i2 = 0; i2 < regexps.length; i2++) { numCaptures += 1; var offset = numCaptures; var re = source(regexps[i2]); if (i2 > 0) { ret += separator; } ret += "("; while (re.length > 0) { var match = backreferenceRe.exec(re); if (match == null) { ret += re; break; } ret += re.substring(0, match.index); re = re.substring(match.index + match[0].length); if (match[0][0] === "\\" && match[1]) { ret += "\\" + String(Number(match[1]) + offset); } else { ret += match[0]; if (match[0] === "(") { numCaptures++; } } } ret += ")"; } return ret; } const IDENT_RE = "[a-zA-Z]\\w*"; const UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*"; const NUMBER_RE = "\\b\\d+(\\.\\d+)?"; const C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"; const BINARY_NUMBER_RE = "\\b(0b[01]+)"; const RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~"; const SHEBANG = (opts = {}) => { const beginShebang = /^#![ ]*\//; if (opts.binary) { opts.begin = concat( beginShebang, /.*\b/, opts.binary, /\b.*/ ); } return inherit$1({ className: "meta", begin: beginShebang, end: /$/, relevance: 0, /** @type {ModeCallback} */ "on:begin": (m2, resp) => { if (m2.index !== 0) resp.ignoreMatch(); } }, opts); }; const BACKSLASH_ESCAPE = { begin: "\\\\[\\s\\S]", relevance: 0 }; const APOS_STRING_MODE = { className: "string", begin: "'", end: "'", illegal: "\\n", contains: [BACKSLASH_ESCAPE] }; const QUOTE_STRING_MODE = { className: "string", begin: '"', end: '"', illegal: "\\n", contains: [BACKSLASH_ESCAPE] }; const PHRASAL_WORDS_MODE = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }; const COMMENT = function(begin, end, modeOptions = {}) { var mode = inherit$1( { className: "comment", begin, end, contains: [] }, modeOptions ); mode.contains.push(PHRASAL_WORDS_MODE); mode.contains.push({ className: "doctag", begin: "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):", relevance: 0 }); return mode; }; const C_LINE_COMMENT_MODE = COMMENT("//", "$"); const C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/"); const HASH_COMMENT_MODE = COMMENT("#", "$"); const NUMBER_MODE = { className: "number", begin: NUMBER_RE, relevance: 0 }; const C_NUMBER_MODE = { className: "number", begin: C_NUMBER_RE, relevance: 0 }; const BINARY_NUMBER_MODE = { className: "number", begin: BINARY_NUMBER_RE, relevance: 0 }; const CSS_NUMBER_MODE = { className: "number", begin: NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", relevance: 0 }; const REGEXP_MODE = { // this outer rule makes sure we actually have a WHOLE regex and not simply // an expression such as: // // 3 / something // // (which will then blow up when regex's `illegal` sees the newline) begin: /(?=\/[^/\n]*\/)/, contains: [{ className: "regexp", begin: /\//, end: /\/[gimuy]*/, illegal: /\n/, contains: [ BACKSLASH_ESCAPE, { begin: /\[/, end: /\]/, relevance: 0, contains: [BACKSLASH_ESCAPE] } ] }] }; const TITLE_MODE = { className: "title", begin: IDENT_RE, relevance: 0 }; const UNDERSCORE_TITLE_MODE = { className: "title", begin: UNDERSCORE_IDENT_RE, relevance: 0 }; const METHOD_GUARD = { // excludes method names from keyword processing begin: "\\.\\s*" + UNDERSCORE_IDENT_RE, relevance: 0 }; const END_SAME_AS_BEGIN = function(mode) { return Object.assign( mode, { /** @type {ModeCallback} */ "on:begin": (m2, resp) => { resp.data._beginMatch = m2[1]; }, /** @type {ModeCallback} */ "on:end": (m2, resp) => { if (resp.data._beginMatch !== m2[1]) resp.ignoreMatch(); } } ); }; var MODES = /* @__PURE__ */ Object.freeze({ __proto__: null, IDENT_RE, UNDERSCORE_IDENT_RE, NUMBER_RE, C_NUMBER_RE, BINARY_NUMBER_RE, RE_STARTERS_RE, SHEBANG, BACKSLASH_ESCAPE, APOS_STRING_MODE, QUOTE_STRING_MODE, PHRASAL_WORDS_MODE, COMMENT, C_LINE_COMMENT_MODE, C_BLOCK_COMMENT_MODE, HASH_COMMENT_MODE, NUMBER_MODE, C_NUMBER_MODE, BINARY_NUMBER_MODE, CSS_NUMBER_MODE, REGEXP_MODE, TITLE_MODE, UNDERSCORE_TITLE_MODE, METHOD_GUARD, END_SAME_AS_BEGIN }); var COMMON_KEYWORDS = "of and for in not or if then".split(" "); function compileLanguage(language) { function langRe(value, global2) { return new RegExp( source(value), "m" + (language.case_insensitive ? "i" : "") + (global2 ? "g" : "") ); } class MultiRegex { constructor() { this.matchIndexes = {}; this.regexes = []; this.matchAt = 1; this.position = 0; } // @ts-ignore addRule(re, opts) { opts.position = this.position++; this.matchIndexes[this.matchAt] = opts; this.regexes.push([opts, re]); this.matchAt += countMatchGroups(re) + 1; } compile() { if (this.regexes.length === 0) { this.exec = () => null; } const terminators = this.regexes.map((el2) => el2[1]); this.matcherRe = langRe(join(terminators), true); this.lastIndex = 0; } /** @param {string} s */ exec(s) { this.matcherRe.lastIndex = this.lastIndex; const match = this.matcherRe.exec(s); if (!match) { return null; } const i2 = match.findIndex((el2, i3) => i3 > 0 && el2 !== void 0); const matchData = this.matchIndexes[i2]; match.splice(0, i2); return Object.assign(match, matchData); } } class ResumableMultiRegex { constructor() { this.rules = []; this.multiRegexes = []; this.count = 0; this.lastIndex = 0; this.regexIndex = 0; } // @ts-ignore getMatcher(index2) { if (this.multiRegexes[index2]) return this.multiRegexes[index2]; const matcher = new MultiRegex(); this.rules.slice(index2).forEach(([re, opts]) => matcher.addRule(re, opts)); matcher.compile(); this.multiRegexes[index2] = matcher; return matcher; } considerAll() { this.regexIndex = 0; } // @ts-ignore addRule(re, opts) { this.rules.push([re, opts]); if (opts.type === "begin") this.count++; } /** @param {string} s */ exec(s) { const m2 = this.getMatcher(this.regexIndex); m2.lastIndex = this.lastIndex; const result = m2.exec(s); if (result) { this.regexIndex += result.position + 1; if (this.regexIndex === this.count) { this.regexIndex = 0; } } return result; } } function buildModeRegex(mode) { const mm = new ResumableMultiRegex(); mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" })); if (mode.terminator_end) { mm.addRule(mode.terminator_end, { type: "end" }); } if (mode.illegal) { mm.addRule(mode.illegal, { type: "illegal" }); } return mm; } function skipIfhasPrecedingOrTrailingDot(match, response) { const before = match.input[match.index - 1]; const after = match.input[match.index + match[0].length]; if (before === "." || after === ".") { response.ignoreMatch(); } } function compileMode(mode, parent) { const cmode = ( /** @type CompiledMode */ mode ); if (mode.compiled) return cmode; mode.compiled = true; mode.__beforeBegin = null; mode.keywords = mode.keywords || mode.beginKeywords; let kw_pattern = null; if (typeof mode.keywords === "object") { kw_pattern = mode.keywords.$pattern; delete mode.keywords.$pattern; } if (mode.keywords) { mode.keywords = compileKeywords(mode.keywords, language.case_insensitive); } if (mode.lexemes && kw_pattern) { throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) "); } cmode.keywordPatternRe = langRe(mode.lexemes || kw_pattern || /\w+/, true); if (parent) { if (mode.beginKeywords) { mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?=\\b|\\s)"; mode.__beforeBegin = skipIfhasPrecedingOrTrailingDot; } if (!mode.begin) mode.begin = /\B|\b/; cmode.beginRe = langRe(mode.begin); if (mode.endSameAsBegin) mode.end = mode.begin; if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/; if (mode.end) cmode.endRe = langRe(mode.end); cmode.terminator_end = source(mode.end) || ""; if (mode.endsWithParent && parent.terminator_end) { cmode.terminator_end += (mode.end ? "|" : "") + parent.terminator_end; } } if (mode.illegal) cmode.illegalRe = langRe(mode.illegal); if (mode.relevance === void 0) mode.relevance = 1; if (!mode.contains) mode.contains = []; mode.contains = [].concat(...mode.contains.map(function(c) { return expand_or_clone_mode(c === "self" ? mode : c); })); mode.contains.forEach(function(c) { compileMode( /** @type Mode */ c, cmode ); }); if (mode.starts) { compileMode(mode.starts, parent); } cmode.matcher = buildModeRegex(cmode); return cmode; } if (language.contains && language.contains.includes("self")) { throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation."); } return compileMode( /** @type Mode */ language ); } function dependencyOnParent(mode) { if (!mode) return false; return mode.endsWithParent || dependencyOnParent(mode.starts); } function expand_or_clone_mode(mode) { if (mode.variants && !mode.cached_variants) { mode.cached_variants = mode.variants.map(function(variant) { return inherit$1(mode, { variants: null }, variant); }); } if (mode.cached_variants) { return mode.cached_variants; } if (dependencyOnParent(mode)) { return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null }); } if (Object.isFrozen(mode)) { return inherit$1(mode); } return mode; } function compileKeywords(rawKeywords, case_insensitive) { var compiled_keywords = {}; if (typeof rawKeywords === "string") { splitAndCompile("keyword", rawKeywords); } else { Object.keys(rawKeywords).forEach(function(className) { splitAndCompile(className, rawKeywords[className]); }); } return compiled_keywords; function splitAndCompile(className, keywordList) { if (case_insensitive) { keywordList = keywordList.toLowerCase(); } keywordList.split(" ").forEach(function(keyword) { var pair = keyword.split("|"); compiled_keywords[pair[0]] = [className, scoreForKeyword(pair[0], pair[1])]; }); } } function scoreForKeyword(keyword, providedScore) { if (providedScore) { return Number(providedScore); } return commonKeyword(keyword) ? 0 : 1; } function commonKeyword(keyword) { return COMMON_KEYWORDS.includes(keyword.toLowerCase()); } var version = "10.1.1"; const escape$1 = escapeHTML; const inherit$1$1 = inherit$1; const { nodeStream: nodeStream$1, mergeStreams: mergeStreams$1 } = utils; const NO_MATCH = Symbol("nomatch"); const HLJS = function(hljs2) { var ArrayProto = []; var languages = {}; var aliases = {}; var plugins = []; var SAFE_MODE = true; var fixMarkupRe = /(^(<[^>]+>|\t|)+|\n)/gm; var LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?"; const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] }; var options = { noHighlightRe: /^(no-?highlight)$/i, languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, classPrefix: "hljs-", tabReplace: null, useBR: false, languages: null, // beta configuration options, subject to change, welcome to discuss // https://github.com/highlightjs/highlight.js/issues/1086 __emitter: TokenTreeEmitter }; function shouldNotHighlight(languageName) { return options.noHighlightRe.test(languageName); } function blockLanguage(block2) { var classes = block2.className + " "; classes += block2.parentNode ? block2.parentNode.className : ""; const match = options.languageDetectRe.exec(classes); if (match) { var language = getLanguage(match[1]); if (!language) { console.warn(LANGUAGE_NOT_FOUND.replace("{}", match[1])); console.warn("Falling back to no-highlight mode for this block.", block2); } return language ? match[1] : "no-highlight"; } return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class)); } function highlight2(languageName, code, ignoreIllegals, continuation) { var context = { code, language: languageName }; fire("before:highlight", context); var result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals, continuation); result.code = context.code; fire("after:highlight", result); return result; } function _highlight(languageName, code, ignoreIllegals, continuation) { var codeToHighlight = code; function keywordData(mode, match) { var matchText = language.case_insensitive ? match[0].toLowerCase() : match[0]; return Object.prototype.hasOwnProperty.call(mode.keywords, matchText) && mode.keywords[matchText]; } function processKeywords() { if (!top2.keywords) { emitter.addText(mode_buffer); return; } let last_index = 0; top2.keywordPatternRe.lastIndex = 0; let match = top2.keywordPatternRe.exec(mode_buffer); let buf = ""; while (match) { buf += mode_buffer.substring(last_index, match.index); const data = keywordData(top2, match); if (data) { const [kind, keywordRelevance] = data; emitter.addText(buf); buf = ""; relevance += keywordRelevance; emitter.addKeyword(match[0], kind); } else { buf += match[0]; } last_index = top2.keywordPatternRe.lastIndex; match = top2.keywordPatternRe.exec(mode_buffer); } buf += mode_buffer.substr(last_index); emitter.addText(buf); } function processSubLanguage() { if (mode_buffer === "") return; var result2 = null; if (typeof top2.subLanguage === "string") { if (!languages[top2.subLanguage]) { emitter.addText(mode_buffer); return; } result2 = _highlight(top2.subLanguage, mode_buffer, true, continuations[top2.subLanguage]); continuations[top2.subLanguage] = result2.top; } else { result2 = highlightAuto(mode_buffer, top2.subLanguage.length ? top2.subLanguage : null); } if (top2.relevance > 0) { relevance += result2.relevance; } emitter.addSublanguage(result2.emitter, result2.language); } function processBuffer() { if (top2.subLanguage != null) { processSubLanguage(); } else { processKeywords(); } mode_buffer = ""; } function startNewMode(mode) { if (mode.className) { emitter.openNode(mode.className); } top2 = Object.create(mode, { parent: { value: top2 } }); return top2; } function endOfMode(mode, match, matchPlusRemainder) { let matched = startsWith(mode.endRe, matchPlusRemainder); if (matched) { if (mode["on:end"]) { const resp = new Response(mode); mode["on:end"](match, resp); if (resp.ignore) matched = false; } if (matched) { while (mode.endsParent && mode.parent) { mode = mode.parent; } return mode; } } if (mode.endsWithParent) { return endOfMode(mode.parent, match, matchPlusRemainder); } } function doIgnore(lexeme) { if (top2.matcher.regexIndex === 0) { mode_buffer += lexeme[0]; return 1; } else { continueScanAtSamePosition = true; return 0; } } function doBeginMatch(match) { var lexeme = match[0]; var new_mode = match.rule; const resp = new Response(new_mode); const beforeCallbacks = [new_mode.__beforeBegin, new_mode["on:begin"]]; for (const cb of beforeCallbacks) { if (!cb) continue; cb(match, resp); if (resp.ignore) return doIgnore(lexeme); } if (new_mode && new_mode.endSameAsBegin) { new_mode.endRe = escape(lexeme); } if (new_mode.skip) { mode_buffer += lexeme; } else { if (new_mode.excludeBegin) { mode_buffer += lexeme; } processBuffer(); if (!new_mode.returnBegin && !new_mode.excludeBegin) { mode_buffer = lexeme; } } startNewMode(new_mode); return new_mode.returnBegin ? 0 : lexeme.length; } function doEndMatch(match) { var lexeme = match[0]; var matchPlusRemainder = codeToHighlight.substr(match.index); var end_mode = endOfMode(top2, match, matchPlusRemainder); if (!end_mode) { return NO_MATCH; } var origin = top2; if (origin.skip) { mode_buffer += lexeme; } else { if (!(origin.returnEnd || origin.excludeEnd)) { mode_buffer += lexeme; } processBuffer(); if (origin.excludeEnd) { mode_buffer = lexeme; } } do { if (top2.className) { emitter.closeNode(); } if (!top2.skip && !top2.subLanguage) { relevance += top2.relevance; } top2 = top2.parent; } while (top2 !== end_mode.parent); if (end_mode.starts) { if (end_mode.endSameAsBegin) { end_mode.starts.endRe = end_mode.endRe; } startNewMode(end_mode.starts); } return origin.returnEnd ? 0 : lexeme.length; } function processContinuations() { var list = []; for (var current = top2; current !== language; current = current.parent) { if (current.className) { list.unshift(current.className); } } list.forEach((item) => emitter.openNode(item)); } var lastMatch = {}; function processLexeme(textBeforeMatch, match) { var lexeme = match && match[0]; mode_buffer += textBeforeMatch; if (lexeme == null) { processBuffer(); return 0; } if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") { mode_buffer += codeToHighlight.slice(match.index, match.index + 1); if (!SAFE_MODE) { const err = new Error("0 width match regex"); err.languageName = languageName; err.badRule = lastMatch.rule; throw err; } return 1; } lastMatch = match; if (match.type === "begin") { return doBeginMatch(match); } else if (match.type === "illegal" && !ignoreIllegals) { const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top2.className || "") + '"'); err.mode = top2; throw err; } else if (match.type === "end") { var processed = doEndMatch(match); if (processed !== NO_MATCH) { return processed; } } if (match.type === "illegal" && lexeme === "") { return 1; } if (iterations > 1e5 && iterations > match.index * 3) { const err = new Error("potential infinite loop, way more iterations than matches"); throw err; } mode_buffer += lexeme; return lexeme.length; } var language = getLanguage(languageName); if (!language) { console.error(LANGUAGE_NOT_FOUND.replace("{}", languageName)); throw new Error('Unknown language: "' + languageName + '"'); } var md = compileLanguage(language); var result = ""; var top2 = continuation || md; var continuations = {}; var emitter = new options.__emitter(options); processContinuations(); var mode_buffer = ""; var relevance = 0; var index2 = 0; var iterations = 0; var continueScanAtSamePosition = false; try { top2.matcher.considerAll(); for (; ; ) { iterations++; if (continueScanAtSamePosition) { continueScanAtSamePosition = false; } else { top2.matcher.lastIndex = index2; top2.matcher.considerAll(); } const match = top2.matcher.exec(codeToHighlight); if (!match) break; const beforeMatch = codeToHighlight.substring(index2, match.index); const processedCount = processLexeme(beforeMatch, match); index2 = match.index + processedCount; } processLexeme(codeToHighlight.substr(index2)); emitter.closeAllNodes(); emitter.finalize(); result = emitter.toHTML(); return { relevance, value: result, language: languageName, illegal: false, emitter, top: top2 }; } catch (err) { if (err.message && err.message.includes("Illegal")) { return { illegal: true, illegalBy: { msg: err.message, context: codeToHighlight.slice(index2 - 100, index2 + 100), mode: err.mode }, sofar: result, relevance: 0, value: escape$1(codeToHighlight), emitter }; } else if (SAFE_MODE) { return { illegal: false, relevance: 0, value: escape$1(codeToHighlight), emitter, language: languageName, top: top2, errorRaised: err }; } else { throw err; } } } function justTextHighlightResult(code) { const result = { relevance: 0, emitter: new options.__emitter(options), value: escape$1(code), illegal: false, top: PLAINTEXT_LANGUAGE }; result.emitter.addText(code); return result; } function highlightAuto(code, languageSubset) { languageSubset = languageSubset || options.languages || Object.keys(languages); var result = justTextHighlightResult(code); var secondBest = result; languageSubset.filter(getLanguage).filter(autoDetection).forEach(function(name) { var current = _highlight(name, code, false); current.language = name; if (current.relevance > secondBest.relevance) { secondBest = current; } if (current.relevance > result.relevance) { secondBest = result; result = current; } }); if (secondBest.language) { result.second_best = secondBest; } return result; } function fixMarkup(html) { if (!(options.tabReplace || options.useBR)) { return html; } return html.replace(fixMarkupRe, (match) => { if (match === "\n") { return options.useBR ? "
" : match; } else if (options.tabReplace) { return match.replace(/\t/g, options.tabReplace); } return match; }); } function buildClassName(prevClassName, currentLang, resultLang) { var language = currentLang ? aliases[currentLang] : resultLang; var result = [prevClassName.trim()]; if (!prevClassName.match(/\bhljs\b/)) { result.push("hljs"); } if (!prevClassName.includes(language)) { result.push(language); } return result.join(" ").trim(); } function highlightBlock(element) { let node2 = null; const language = blockLanguage(element); if (shouldNotHighlight(language)) return; fire( "before:highlightBlock", { block: element, language } ); if (options.useBR) { node2 = document.createElement("div"); node2.innerHTML = element.innerHTML.replace(/\n/g, "").replace(//g, "\n"); } else { node2 = element; } const text = node2.textContent; const result = language ? highlight2(language, text, true) : highlightAuto(text); const originalStream = nodeStream$1(node2); if (originalStream.length) { const resultNode = document.createElement("div"); resultNode.innerHTML = result.value; result.value = mergeStreams$1(originalStream, nodeStream$1(resultNode), text); } result.value = fixMarkup(result.value); fire("after:highlightBlock", { block: element, result }); element.innerHTML = result.value; element.className = buildClassName(element.className, language, result.language); element.result = { language: result.language, // TODO: remove with version 11.0 re: result.relevance, relavance: result.relevance }; if (result.second_best) { element.second_best = { language: result.second_best.language, // TODO: remove with version 11.0 re: result.second_best.relevance, relavance: result.second_best.relevance }; } } function configure2(userOptions) { options = inherit$1$1(options, userOptions); } const initHighlighting = () => { if (initHighlighting.called) return; initHighlighting.called = true; var blocks = document.querySelectorAll("pre code"); ArrayProto.forEach.call(blocks, highlightBlock); }; function initHighlightingOnLoad() { window.addEventListener("DOMContentLoaded", initHighlighting, false); } function registerLanguage(languageName, languageDefinition) { var lang2 = null; try { lang2 = languageDefinition(hljs2); } catch (error) { console.error("Language definition for '{}' could not be registered.".replace("{}", languageName)); if (!SAFE_MODE) { throw error; } else { console.error(error); } lang2 = PLAINTEXT_LANGUAGE; } if (!lang2.name) lang2.name = languageName; languages[languageName] = lang2; lang2.rawDefinition = languageDefinition.bind(null, hljs2); if (lang2.aliases) { registerAliases(lang2.aliases, { languageName }); } } function listLanguages() { return Object.keys(languages); } function requireLanguage(name) { var lang2 = getLanguage(name); if (lang2) { return lang2; } var err = new Error("The '{}' language is required, but not loaded.".replace("{}", name)); throw err; } function getLanguage(name) { name = (name || "").toLowerCase(); return languages[name] || languages[aliases[name]]; } function registerAliases(aliasList, { languageName }) { if (typeof aliasList === "string") { aliasList = [aliasList]; } aliasList.forEach((alias) => { aliases[alias] = languageName; }); } function autoDetection(name) { var lang2 = getLanguage(name); return lang2 && !lang2.disableAutodetect; } function addPlugin(plugin) { plugins.push(plugin); } function fire(event, args) { var cb = event; plugins.forEach(function(plugin) { if (plugin[cb]) { plugin[cb](args); } }); } Object.assign(hljs2, { highlight: highlight2, highlightAuto, fixMarkup, highlightBlock, configure: configure2, initHighlighting, initHighlightingOnLoad, registerLanguage, listLanguages, getLanguage, registerAliases, requireLanguage, autoDetection, inherit: inherit$1$1, addPlugin }); hljs2.debugMode = function() { SAFE_MODE = false; }; hljs2.safeMode = function() { SAFE_MODE = true; }; hljs2.versionString = version; for (const key in MODES) { if (typeof MODES[key] === "object") { deepFreeze(MODES[key]); } } Object.assign(hljs2, MODES); return hljs2; }; var highlight = HLJS({}); var core = highlight; const hljs = /* @__PURE__ */ getDefaultExportFromCjs(core); function rust(hljs2) { var NUM_SUFFIX = "([ui](8|16|32|64|128|size)|f(32|64))?"; var KEYWORDS = "abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield"; var BUILTINS = ( // functions "drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" ); return { name: "Rust", aliases: ["rs"], keywords: { $pattern: hljs2.IDENT_RE + "!?", keyword: KEYWORDS, literal: "true false Some None Ok Err", built_in: BUILTINS }, illegal: "" } ] }; } var rust_1 = rust; const rust$1 = /* @__PURE__ */ getDefaultExportFromCjs(rust_1); var reactDom = { exports: {} }; var reactDom_development = {}; var scheduler = { exports: {} }; var scheduler_development = {}; /** * @license React * scheduler.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ (function(exports) { { (function() { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var enableSchedulerDebugging = false; var enableProfiling = false; var frameYieldMs = 5; function push(heap, node2) { var index2 = heap.length; heap.push(node2); siftUp(heap, node2, index2); } function peek(heap) { return heap.length === 0 ? null : heap[0]; } function pop(heap) { if (heap.length === 0) { return null; } var first = heap[0]; var last = heap.pop(); if (last !== first) { heap[0] = last; siftDown(heap, last, 0); } return first; } function siftUp(heap, node2, i2) { var index2 = i2; while (index2 > 0) { var parentIndex = index2 - 1 >>> 1; var parent = heap[parentIndex]; if (compare(parent, node2) > 0) { heap[parentIndex] = node2; heap[index2] = parent; index2 = parentIndex; } else { return; } } } function siftDown(heap, node2, i2) { var index2 = i2; var length = heap.length; var halfLength = length >>> 1; while (index2 < halfLength) { var leftIndex = (index2 + 1) * 2 - 1; var left = heap[leftIndex]; var rightIndex = leftIndex + 1; var right = heap[rightIndex]; if (compare(left, node2) < 0) { if (rightIndex < length && compare(right, left) < 0) { heap[index2] = right; heap[rightIndex] = node2; index2 = rightIndex; } else { heap[index2] = left; heap[leftIndex] = node2; index2 = leftIndex; } } else if (rightIndex < length && compare(right, node2) < 0) { heap[index2] = right; heap[rightIndex] = node2; index2 = rightIndex; } else { return; } } } function compare(a, b) { var diff = a.sortIndex - b.sortIndex; return diff !== 0 ? diff : a.id - b.id; } var ImmediatePriority = 1; var UserBlockingPriority = 2; var NormalPriority = 3; var LowPriority = 4; var IdlePriority = 5; function markTaskErrored(task, ms) { } var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function"; if (hasPerformanceNow) { var localPerformance = performance; exports.unstable_now = function() { return localPerformance.now(); }; } else { var localDate = Date; var initialTime = localDate.now(); exports.unstable_now = function() { return localDate.now() - initialTime; }; } var maxSigned31BitInt = 1073741823; var IMMEDIATE_PRIORITY_TIMEOUT = -1; var USER_BLOCKING_PRIORITY_TIMEOUT = 250; var NORMAL_PRIORITY_TIMEOUT = 5e3; var LOW_PRIORITY_TIMEOUT = 1e4; var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; var taskQueue = []; var timerQueue = []; var taskIdCounter = 1; var currentTask = null; var currentPriorityLevel = NormalPriority; var isPerformingWork = false; var isHostCallbackScheduled = false; var isHostTimeoutScheduled = false; var localSetTimeout = typeof setTimeout === "function" ? setTimeout : null; var localClearTimeout = typeof clearTimeout === "function" ? clearTimeout : null; var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null; typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null; function advanceTimers(currentTime) { var timer = peek(timerQueue); while (timer !== null) { if (timer.callback === null) { pop(timerQueue); } else if (timer.startTime <= currentTime) { pop(timerQueue); timer.sortIndex = timer.expirationTime; push(taskQueue, timer); } else { return; } timer = peek(timerQueue); } } function handleTimeout(currentTime) { isHostTimeoutScheduled = false; advanceTimers(currentTime); if (!isHostCallbackScheduled) { if (peek(taskQueue) !== null) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } else { var firstTimer = peek(timerQueue); if (firstTimer !== null) { requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); } } } } function flushWork(hasTimeRemaining, initialTime2) { isHostCallbackScheduled = false; if (isHostTimeoutScheduled) { isHostTimeoutScheduled = false; cancelHostTimeout(); } isPerformingWork = true; var previousPriorityLevel = currentPriorityLevel; try { var currentTime; if (enableProfiling) ; else { return workLoop(hasTimeRemaining, initialTime2); } } finally { currentTask = null; currentPriorityLevel = previousPriorityLevel; isPerformingWork = false; } } function workLoop(hasTimeRemaining, initialTime2) { var currentTime = initialTime2; advanceTimers(currentTime); currentTask = peek(taskQueue); while (currentTask !== null && !enableSchedulerDebugging) { if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { break; } var callback = currentTask.callback; if (typeof callback === "function") { currentTask.callback = null; currentPriorityLevel = currentTask.priorityLevel; var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; var continuationCallback = callback(didUserCallbackTimeout); currentTime = exports.unstable_now(); if (typeof continuationCallback === "function") { currentTask.callback = continuationCallback; } else { if (currentTask === peek(taskQueue)) { pop(taskQueue); } } advanceTimers(currentTime); } else { pop(taskQueue); } currentTask = peek(taskQueue); } if (currentTask !== null) { return true; } else { var firstTimer = peek(timerQueue); if (firstTimer !== null) { requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); } return false; } } function unstable_runWithPriority(priorityLevel, eventHandler) { switch (priorityLevel) { case ImmediatePriority: case UserBlockingPriority: case NormalPriority: case LowPriority: case IdlePriority: break; default: priorityLevel = NormalPriority; } var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = priorityLevel; try { return eventHandler(); } finally { currentPriorityLevel = previousPriorityLevel; } } function unstable_next(eventHandler) { var priorityLevel; switch (currentPriorityLevel) { case ImmediatePriority: case UserBlockingPriority: case NormalPriority: priorityLevel = NormalPriority; break; default: priorityLevel = currentPriorityLevel; break; } var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = priorityLevel; try { return eventHandler(); } finally { currentPriorityLevel = previousPriorityLevel; } } function unstable_wrapCallback(callback) { var parentPriorityLevel = currentPriorityLevel; return function() { var previousPriorityLevel = currentPriorityLevel; currentPriorityLevel = parentPriorityLevel; try { return callback.apply(this, arguments); } finally { currentPriorityLevel = previousPriorityLevel; } }; } function unstable_scheduleCallback(priorityLevel, callback, options) { var currentTime = exports.unstable_now(); var startTime2; if (typeof options === "object" && options !== null) { var delay = options.delay; if (typeof delay === "number" && delay > 0) { startTime2 = currentTime + delay; } else { startTime2 = currentTime; } } else { startTime2 = currentTime; } var timeout; switch (priorityLevel) { case ImmediatePriority: timeout = IMMEDIATE_PRIORITY_TIMEOUT; break; case UserBlockingPriority: timeout = USER_BLOCKING_PRIORITY_TIMEOUT; break; case IdlePriority: timeout = IDLE_PRIORITY_TIMEOUT; break; case LowPriority: timeout = LOW_PRIORITY_TIMEOUT; break; case NormalPriority: default: timeout = NORMAL_PRIORITY_TIMEOUT; break; } var expirationTime = startTime2 + timeout; var newTask = { id: taskIdCounter++, callback, priorityLevel, startTime: startTime2, expirationTime, sortIndex: -1 }; if (startTime2 > currentTime) { newTask.sortIndex = startTime2; push(timerQueue, newTask); if (peek(taskQueue) === null && newTask === peek(timerQueue)) { if (isHostTimeoutScheduled) { cancelHostTimeout(); } else { isHostTimeoutScheduled = true; } requestHostTimeout(handleTimeout, startTime2 - currentTime); } } else { newTask.sortIndex = expirationTime; push(taskQueue, newTask); if (!isHostCallbackScheduled && !isPerformingWork) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } } return newTask; } function unstable_pauseExecution() { } function unstable_continueExecution() { if (!isHostCallbackScheduled && !isPerformingWork) { isHostCallbackScheduled = true; requestHostCallback(flushWork); } } function unstable_getFirstCallbackNode() { return peek(taskQueue); } function unstable_cancelCallback(task) { task.callback = null; } function unstable_getCurrentPriorityLevel() { return currentPriorityLevel; } var isMessageLoopRunning = false; var scheduledHostCallback = null; var taskTimeoutID = -1; var frameInterval = frameYieldMs; var startTime = -1; function shouldYieldToHost() { var timeElapsed = exports.unstable_now() - startTime; if (timeElapsed < frameInterval) { return false; } return true; } function requestPaint() { } function forceFrameRate(fps) { if (fps < 0 || fps > 125) { console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"); return; } if (fps > 0) { frameInterval = Math.floor(1e3 / fps); } else { frameInterval = frameYieldMs; } } var performWorkUntilDeadline = function() { if (scheduledHostCallback !== null) { var currentTime = exports.unstable_now(); startTime = currentTime; var hasTimeRemaining = true; var hasMoreWork = true; try { hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); } finally { if (hasMoreWork) { schedulePerformWorkUntilDeadline(); } else { isMessageLoopRunning = false; scheduledHostCallback = null; } } } else { isMessageLoopRunning = false; } }; var schedulePerformWorkUntilDeadline; if (typeof localSetImmediate === "function") { schedulePerformWorkUntilDeadline = function() { localSetImmediate(performWorkUntilDeadline); }; } else if (typeof MessageChannel !== "undefined") { var channel = new MessageChannel(); var port = channel.port2; channel.port1.onmessage = performWorkUntilDeadline; schedulePerformWorkUntilDeadline = function() { port.postMessage(null); }; } else { schedulePerformWorkUntilDeadline = function() { localSetTimeout(performWorkUntilDeadline, 0); }; } function requestHostCallback(callback) { scheduledHostCallback = callback; if (!isMessageLoopRunning) { isMessageLoopRunning = true; schedulePerformWorkUntilDeadline(); } } function requestHostTimeout(callback, ms) { taskTimeoutID = localSetTimeout(function() { callback(exports.unstable_now()); }, ms); } function cancelHostTimeout() { localClearTimeout(taskTimeoutID); taskTimeoutID = -1; } var unstable_requestPaint = requestPaint; var unstable_Profiling = null; exports.unstable_IdlePriority = IdlePriority; exports.unstable_ImmediatePriority = ImmediatePriority; exports.unstable_LowPriority = LowPriority; exports.unstable_NormalPriority = NormalPriority; exports.unstable_Profiling = unstable_Profiling; exports.unstable_UserBlockingPriority = UserBlockingPriority; exports.unstable_cancelCallback = unstable_cancelCallback; exports.unstable_continueExecution = unstable_continueExecution; exports.unstable_forceFrameRate = forceFrameRate; exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; exports.unstable_next = unstable_next; exports.unstable_pauseExecution = unstable_pauseExecution; exports.unstable_requestPaint = unstable_requestPaint; exports.unstable_runWithPriority = unstable_runWithPriority; exports.unstable_scheduleCallback = unstable_scheduleCallback; exports.unstable_shouldYield = shouldYieldToHost; exports.unstable_wrapCallback = unstable_wrapCallback; if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } })(scheduler_development); { scheduler.exports = scheduler_development; } var schedulerExports = scheduler.exports; /** * @license React * react-dom.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ { (function() { if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React2 = reactExports; var Scheduler = schedulerExports; var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; var suppressWarning = false; function setSuppressWarning(newSuppressWarning) { { suppressWarning = newSuppressWarning; } } function warn(format) { { if (!suppressWarning) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } printWarning("warn", format, args); } } } function error(format) { { if (!suppressWarning) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning("error", format, args); } } } function printWarning(level, format, args) { { var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame2.getStackAddendum(); if (stack !== "") { format += "%s"; args = args.concat([stack]); } var argsWithFormat = args.map(function(item) { return String(item); }); argsWithFormat.unshift("Warning: " + format); Function.prototype.apply.call(console[level], console, argsWithFormat); } } var FunctionComponent = 0; var ClassComponent = 1; var IndeterminateComponent = 2; var HostRoot = 3; var HostPortal = 4; var HostComponent = 5; var HostText = 6; var Fragment = 7; var Mode = 8; var ContextConsumer = 9; var ContextProvider = 10; var ForwardRef = 11; var Profiler = 12; var SuspenseComponent = 13; var MemoComponent = 14; var SimpleMemoComponent = 15; var LazyComponent = 16; var IncompleteClassComponent = 17; var DehydratedFragment = 18; var SuspenseListComponent = 19; var ScopeComponent = 21; var OffscreenComponent = 22; var LegacyHiddenComponent = 23; var CacheComponent = 24; var TracingMarkerComponent = 25; var enableClientRenderFallbackOnTextMismatch = true; var enableNewReconciler = false; var enableLazyContextPropagation = false; var enableLegacyHidden = false; var enableSuspenseAvoidThisFallback = false; var disableCommentsAsDOMContainers = true; var enableCustomElementPropertySupport = false; var warnAboutStringRefs = false; var enableSchedulingProfiler = true; var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var allNativeEvents = /* @__PURE__ */ new Set(); var registrationNameDependencies = {}; var possibleRegistrationNames = {}; function registerTwoPhaseEvent(registrationName, dependencies) { registerDirectEvent(registrationName, dependencies); registerDirectEvent(registrationName + "Capture", dependencies); } function registerDirectEvent(registrationName, dependencies) { { if (registrationNameDependencies[registrationName]) { error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); } } registrationNameDependencies[registrationName] = dependencies; { var lowerCasedName = registrationName.toLowerCase(); possibleRegistrationNames[lowerCasedName] = registrationName; if (registrationName === "onDoubleClick") { possibleRegistrationNames.ondblclick = registrationName; } } for (var i2 = 0; i2 < dependencies.length; i2++) { allNativeEvents.add(dependencies[i2]); } } var canUseDOM = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined"); var hasOwnProperty = Object.prototype.hasOwnProperty; function typeName(value) { { var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; return type; } } function willCoercionThrow(value) { { try { testStringCoercion(value); return false; } catch (e) { return true; } } } function testStringCoercion(value) { return "" + value; } function checkAttributeStringCoercion(value, attributeName) { { if (willCoercionThrow(value)) { error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value)); return testStringCoercion(value); } } } function checkKeyStringCoercion(value) { { if (willCoercionThrow(value)) { error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } } function checkPropStringCoercion(value, propName) { { if (willCoercionThrow(value)) { error("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); return testStringCoercion(value); } } } function checkCSSPropertyStringCoercion(value, propName) { { if (willCoercionThrow(value)) { error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value)); return testStringCoercion(value); } } } function checkHtmlStringCoercion(value) { { if (willCoercionThrow(value)) { error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } } function checkFormFieldValueStringCoercion(value) { { if (willCoercionThrow(value)) { error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", typeName(value)); return testStringCoercion(value); } } } var RESERVED = 0; var STRING = 1; var BOOLEANISH_STRING = 2; var BOOLEAN = 3; var OVERLOADED_BOOLEAN = 4; var NUMERIC = 5; var POSITIVE_NUMERIC = 6; var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$"); var illegalAttributeNameCache = {}; var validatedAttributeNameCache = {}; function isAttributeNameSafe(attributeName) { if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { return true; } if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { return false; } if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { validatedAttributeNameCache[attributeName] = true; return true; } illegalAttributeNameCache[attributeName] = true; { error("Invalid attribute name: `%s`", attributeName); } return false; } function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { if (propertyInfo !== null) { return propertyInfo.type === RESERVED; } if (isCustomComponentTag) { return false; } if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) { return true; } return false; } function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { if (propertyInfo !== null && propertyInfo.type === RESERVED) { return false; } switch (typeof value) { case "function": case "symbol": return true; case "boolean": { if (isCustomComponentTag) { return false; } if (propertyInfo !== null) { return !propertyInfo.acceptsBooleans; } else { var prefix2 = name.toLowerCase().slice(0, 5); return prefix2 !== "data-" && prefix2 !== "aria-"; } } default: return false; } } function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { if (value === null || typeof value === "undefined") { return true; } if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { return true; } if (isCustomComponentTag) { return false; } if (propertyInfo !== null) { switch (propertyInfo.type) { case BOOLEAN: return !value; case OVERLOADED_BOOLEAN: return value === false; case NUMERIC: return isNaN(value); case POSITIVE_NUMERIC: return isNaN(value) || value < 1; } } return false; } function getPropertyInfo(name) { return properties.hasOwnProperty(name) ? properties[name] : null; } function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) { this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; this.attributeName = attributeName; this.attributeNamespace = attributeNamespace; this.mustUseProperty = mustUseProperty; this.propertyName = name; this.type = type; this.sanitizeURL = sanitizeURL2; this.removeEmptyString = removeEmptyString; } var properties = {}; var reservedProps = [ "children", "dangerouslySetInnerHTML", // TODO: This prevents the assignment of defaultValue to regular // elements (not just inputs). Now that ReactDOMInput assigns to the // defaultValue property -- do we need this? "defaultValue", "defaultChecked", "innerHTML", "suppressContentEditableWarning", "suppressHydrationWarning", "style" ]; reservedProps.forEach(function(name) { properties[name] = new PropertyInfoRecord( name, RESERVED, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) { var name = _ref[0], attributeName = _ref[1]; properties[name] = new PropertyInfoRecord( name, STRING, false, // mustUseProperty attributeName, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, BOOLEANISH_STRING, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, BOOLEANISH_STRING, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); [ "allowFullScreen", "async", // Note: there is a special case that prevents it from being written to the DOM // on the client side because the browsers are inconsistent. Instead we call focus(). "autoFocus", "autoPlay", "controls", "default", "defer", "disabled", "disablePictureInPicture", "disableRemotePlayback", "formNoValidate", "hidden", "loop", "noModule", "noValidate", "open", "playsInline", "readOnly", "required", "reversed", "scoped", "seamless", // Microdata "itemScope" ].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, BOOLEAN, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); [ "checked", // Note: `option.selected` is not updated if `select.multiple` is // disabled with `removeAttribute`. We have special logic for handling this. "multiple", "muted", "selected" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, BOOLEAN, true, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); [ "capture", "download" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, OVERLOADED_BOOLEAN, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); [ "cols", "rows", "size", "span" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, POSITIVE_NUMERIC, false, // mustUseProperty name, // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); ["rowSpan", "start"].forEach(function(name) { properties[name] = new PropertyInfoRecord( name, NUMERIC, false, // mustUseProperty name.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); var CAMELIZE = /[\-\:]([a-z])/g; var capitalize = function(token) { return token[1].toUpperCase(); }; [ "accent-height", "alignment-baseline", "arabic-form", "baseline-shift", "cap-height", "clip-path", "clip-rule", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "dominant-baseline", "enable-background", "fill-opacity", "fill-rule", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-name", "glyph-orientation-horizontal", "glyph-orientation-vertical", "horiz-adv-x", "horiz-origin-x", "image-rendering", "letter-spacing", "lighting-color", "marker-end", "marker-mid", "marker-start", "overline-position", "overline-thickness", "paint-order", "panose-1", "pointer-events", "rendering-intent", "shape-rendering", "stop-color", "stop-opacity", "strikethrough-position", "strikethrough-thickness", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-anchor", "text-decoration", "text-rendering", "underline-position", "underline-thickness", "unicode-bidi", "unicode-range", "units-per-em", "v-alphabetic", "v-hanging", "v-ideographic", "v-mathematical", "vector-effect", "vert-adv-y", "vert-origin-x", "vert-origin-y", "word-spacing", "writing-mode", "xmlns:xlink", "x-height" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord( name, STRING, false, // mustUseProperty attributeName, null, // attributeNamespace false, // sanitizeURL false ); }); [ "xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title", "xlink:type" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord( name, STRING, false, // mustUseProperty attributeName, "http://www.w3.org/1999/xlink", false, // sanitizeURL false ); }); [ "xml:base", "xml:lang", "xml:space" // NOTE: if you add a camelCased prop to this list, // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function(attributeName) { var name = attributeName.replace(CAMELIZE, capitalize); properties[name] = new PropertyInfoRecord( name, STRING, false, // mustUseProperty attributeName, "http://www.w3.org/XML/1998/namespace", false, // sanitizeURL false ); }); ["tabIndex", "crossOrigin"].forEach(function(attributeName) { properties[attributeName] = new PropertyInfoRecord( attributeName, STRING, false, // mustUseProperty attributeName.toLowerCase(), // attributeName null, // attributeNamespace false, // sanitizeURL false ); }); var xlinkHref = "xlinkHref"; properties[xlinkHref] = new PropertyInfoRecord( "xlinkHref", STRING, false, // mustUseProperty "xlink:href", "http://www.w3.org/1999/xlink", true, // sanitizeURL false ); ["src", "href", "action", "formAction"].forEach(function(attributeName) { properties[attributeName] = new PropertyInfoRecord( attributeName, STRING, false, // mustUseProperty attributeName.toLowerCase(), // attributeName null, // attributeNamespace true, // sanitizeURL true ); }); var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; var didWarn = false; function sanitizeURL(url) { { if (!didWarn && isJavaScriptProtocol.test(url)) { didWarn = true; error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url)); } } } function getValueForProperty(node2, name, expected, propertyInfo) { { if (propertyInfo.mustUseProperty) { var propertyName = propertyInfo.propertyName; return node2[propertyName]; } else { { checkAttributeStringCoercion(expected, name); } if (propertyInfo.sanitizeURL) { sanitizeURL("" + expected); } var attributeName = propertyInfo.attributeName; var stringValue = null; if (propertyInfo.type === OVERLOADED_BOOLEAN) { if (node2.hasAttribute(attributeName)) { var value = node2.getAttribute(attributeName); if (value === "") { return true; } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return value; } if (value === "" + expected) { return expected; } return value; } } else if (node2.hasAttribute(attributeName)) { if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return node2.getAttribute(attributeName); } if (propertyInfo.type === BOOLEAN) { return expected; } stringValue = node2.getAttribute(attributeName); } if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { return stringValue === null ? expected : stringValue; } else if (stringValue === "" + expected) { return expected; } else { return stringValue; } } } } function getValueForAttribute(node2, name, expected, isCustomComponentTag) { { if (!isAttributeNameSafe(name)) { return; } if (!node2.hasAttribute(name)) { return expected === void 0 ? void 0 : null; } var value = node2.getAttribute(name); { checkAttributeStringCoercion(expected, name); } if (value === "" + expected) { return expected; } return value; } } function setValueForProperty(node2, name, value, isCustomComponentTag) { var propertyInfo = getPropertyInfo(name); if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { return; } if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { value = null; } if (isCustomComponentTag || propertyInfo === null) { if (isAttributeNameSafe(name)) { var _attributeName = name; if (value === null) { node2.removeAttribute(_attributeName); } else { { checkAttributeStringCoercion(value, name); } node2.setAttribute(_attributeName, "" + value); } } return; } var mustUseProperty = propertyInfo.mustUseProperty; if (mustUseProperty) { var propertyName = propertyInfo.propertyName; if (value === null) { var type = propertyInfo.type; node2[propertyName] = type === BOOLEAN ? false : ""; } else { node2[propertyName] = value; } return; } var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace; if (value === null) { node2.removeAttribute(attributeName); } else { var _type = propertyInfo.type; var attributeValue; if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { attributeValue = ""; } else { { { checkAttributeStringCoercion(value, attributeName); } attributeValue = "" + value; } if (propertyInfo.sanitizeURL) { sanitizeURL(attributeValue.toString()); } } if (attributeNamespace) { node2.setAttributeNS(attributeNamespace, attributeName, attributeValue); } else { node2.setAttribute(attributeName, attributeValue); } } } var REACT_ELEMENT_TYPE = Symbol.for("react.element"); var REACT_PORTAL_TYPE = Symbol.for("react.portal"); var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"); var REACT_PROFILER_TYPE = Symbol.for("react.profiler"); var REACT_PROVIDER_TYPE = Symbol.for("react.provider"); var REACT_CONTEXT_TYPE = Symbol.for("react.context"); var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"); var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"); var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"); var REACT_MEMO_TYPE = Symbol.for("react.memo"); var REACT_LAZY_TYPE = Symbol.for("react.lazy"); var REACT_SCOPE_TYPE = Symbol.for("react.scope"); var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode"); var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"); var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"); var REACT_CACHE_TYPE = Symbol.for("react.cache"); var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker"); var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; var FAUX_ITERATOR_SYMBOL = "@@iterator"; function getIteratorFn(maybeIterable) { if (maybeIterable === null || typeof maybeIterable !== "object") { return null; } var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; if (typeof maybeIterator === "function") { return maybeIterator; } return null; } var assign2 = Object.assign; var disabledDepth = 0; var prevLog; var prevInfo; var prevWarn; var prevError; var prevGroup; var prevGroupCollapsed; var prevGroupEnd; function disabledLog() { } disabledLog.__reactDisabledLog = true; function disableLogs() { { if (disabledDepth === 0) { prevLog = console.log; prevInfo = console.info; prevWarn = console.warn; prevError = console.error; prevGroup = console.group; prevGroupCollapsed = console.groupCollapsed; prevGroupEnd = console.groupEnd; var props = { configurable: true, enumerable: true, value: disabledLog, writable: true }; Object.defineProperties(console, { info: props, log: props, warn: props, error: props, group: props, groupCollapsed: props, groupEnd: props }); } disabledDepth++; } } function reenableLogs() { { disabledDepth--; if (disabledDepth === 0) { var props = { configurable: true, enumerable: true, writable: true }; Object.defineProperties(console, { log: assign2({}, props, { value: prevLog }), info: assign2({}, props, { value: prevInfo }), warn: assign2({}, props, { value: prevWarn }), error: assign2({}, props, { value: prevError }), group: assign2({}, props, { value: prevGroup }), groupCollapsed: assign2({}, props, { value: prevGroupCollapsed }), groupEnd: assign2({}, props, { value: prevGroupEnd }) }); } if (disabledDepth < 0) { error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } } var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name, source2, ownerFn) { { if (prefix === void 0) { try { throw Error(); } catch (x) { var match = x.stack.trim().match(/\n( *(at )?)/); prefix = match && match[1] || ""; } } return "\n" + prefix + name; } } var reentry = false; var componentFrameCache; { var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; componentFrameCache = new PossiblyWeakMap(); } function describeNativeComponentFrame(fn, construct) { if (!fn || reentry) { return ""; } { var frame = componentFrameCache.get(fn); if (frame !== void 0) { return frame; } } var control; reentry = true; var previousPrepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var previousDispatcher; { previousDispatcher = ReactCurrentDispatcher.current; ReactCurrentDispatcher.current = null; disableLogs(); } try { if (construct) { var Fake = function() { throw Error(); }; Object.defineProperty(Fake.prototype, "props", { set: function() { throw Error(); } }); if (typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(Fake, []); } catch (x) { control = x; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); } catch (x) { control = x; } fn.call(Fake.prototype); } } else { try { throw Error(); } catch (x) { control = x; } fn(); } } catch (sample) { if (sample && control && typeof sample.stack === "string") { var sampleLines = sample.stack.split("\n"); var controlLines = control.stack.split("\n"); var s = sampleLines.length - 1; var c = controlLines.length - 1; while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { c--; } for (; s >= 1 && c >= 0; s--, c--) { if (sampleLines[s] !== controlLines[c]) { if (s !== 1 || c !== 1) { do { s--; c--; if (c < 0 || sampleLines[s] !== controlLines[c]) { var _frame = "\n" + sampleLines[s].replace(" at new ", " at "); if (fn.displayName && _frame.includes("")) { _frame = _frame.replace("", fn.displayName); } { if (typeof fn === "function") { componentFrameCache.set(fn, _frame); } } return _frame; } } while (s >= 1 && c >= 0); } break; } } } } finally { reentry = false; { ReactCurrentDispatcher.current = previousDispatcher; reenableLogs(); } Error.prepareStackTrace = previousPrepareStackTrace; } var name = fn ? fn.displayName || fn.name : ""; var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ""; { if (typeof fn === "function") { componentFrameCache.set(fn, syntheticFrame); } } return syntheticFrame; } function describeClassComponentFrame(ctor, source2, ownerFn) { { return describeNativeComponentFrame(ctor, true); } } function describeFunctionComponentFrame(fn, source2, ownerFn) { { return describeNativeComponentFrame(fn, false); } } function shouldConstruct(Component) { var prototype = Component.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source2, ownerFn) { if (type == null) { return ""; } if (typeof type === "function") { { return describeNativeComponentFrame(type, shouldConstruct(type)); } } if (typeof type === "string") { return describeBuiltInComponentFrame(type); } switch (type) { case REACT_SUSPENSE_TYPE: return describeBuiltInComponentFrame("Suspense"); case REACT_SUSPENSE_LIST_TYPE: return describeBuiltInComponentFrame("SuspenseList"); } if (typeof type === "object") { switch (type.$$typeof) { case REACT_FORWARD_REF_TYPE: return describeFunctionComponentFrame(type.render); case REACT_MEMO_TYPE: return describeUnknownElementTypeFrameInDEV(type.type, source2, ownerFn); case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return describeUnknownElementTypeFrameInDEV(init(payload), source2, ownerFn); } catch (x) { } } } } return ""; } function describeFiber(fiber) { fiber._debugOwner ? fiber._debugOwner.type : null; fiber._debugSource; switch (fiber.tag) { case HostComponent: return describeBuiltInComponentFrame(fiber.type); case LazyComponent: return describeBuiltInComponentFrame("Lazy"); case SuspenseComponent: return describeBuiltInComponentFrame("Suspense"); case SuspenseListComponent: return describeBuiltInComponentFrame("SuspenseList"); case FunctionComponent: case IndeterminateComponent: case SimpleMemoComponent: return describeFunctionComponentFrame(fiber.type); case ForwardRef: return describeFunctionComponentFrame(fiber.type.render); case ClassComponent: return describeClassComponentFrame(fiber.type); default: return ""; } } function getStackByFiberInDevAndProd(workInProgress2) { try { var info = ""; var node2 = workInProgress2; do { info += describeFiber(node2); node2 = node2.return; } while (node2); return info; } catch (x) { return "\nError generating stack: " + x.message + "\n" + x.stack; } } function getWrappedName(outerType, innerType, wrapperName) { var displayName = outerType.displayName; if (displayName) { return displayName; } var functionName = innerType.displayName || innerType.name || ""; return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName; } function getContextName(type) { return type.displayName || "Context"; } function getComponentNameFromType(type) { if (type == null) { return null; } { if (typeof type.tag === "number") { error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."); } } if (typeof type === "function") { return type.displayName || type.name || null; } if (typeof type === "string") { return type; } switch (type) { case REACT_FRAGMENT_TYPE: return "Fragment"; case REACT_PORTAL_TYPE: return "Portal"; case REACT_PROFILER_TYPE: return "Profiler"; case REACT_STRICT_MODE_TYPE: return "StrictMode"; case REACT_SUSPENSE_TYPE: return "Suspense"; case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; } if (typeof type === "object") { switch (type.$$typeof) { case REACT_CONTEXT_TYPE: var context = type; return getContextName(context) + ".Consumer"; case REACT_PROVIDER_TYPE: var provider = type; return getContextName(provider._context) + ".Provider"; case REACT_FORWARD_REF_TYPE: return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: var outerName = type.displayName || null; if (outerName !== null) { return outerName; } return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; var payload = lazyComponent._payload; var init = lazyComponent._init; try { return getComponentNameFromType(init(payload)); } catch (x) { return null; } } } } return null; } function getWrappedName$1(outerType, innerType, wrapperName) { var functionName = innerType.displayName || innerType.name || ""; return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName); } function getContextName$1(type) { return type.displayName || "Context"; } function getComponentNameFromFiber(fiber) { var tag2 = fiber.tag, type = fiber.type; switch (tag2) { case CacheComponent: return "Cache"; case ContextConsumer: var context = type; return getContextName$1(context) + ".Consumer"; case ContextProvider: var provider = type; return getContextName$1(provider._context) + ".Provider"; case DehydratedFragment: return "DehydratedFragment"; case ForwardRef: return getWrappedName$1(type, type.render, "ForwardRef"); case Fragment: return "Fragment"; case HostComponent: return type; case HostPortal: return "Portal"; case HostRoot: return "Root"; case HostText: return "Text"; case LazyComponent: return getComponentNameFromType(type); case Mode: if (type === REACT_STRICT_MODE_TYPE) { return "StrictMode"; } return "Mode"; case OffscreenComponent: return "Offscreen"; case Profiler: return "Profiler"; case ScopeComponent: return "Scope"; case SuspenseComponent: return "Suspense"; case SuspenseListComponent: return "SuspenseList"; case TracingMarkerComponent: return "TracingMarker"; case ClassComponent: case FunctionComponent: case IncompleteClassComponent: case IndeterminateComponent: case MemoComponent: case SimpleMemoComponent: if (typeof type === "function") { return type.displayName || type.name || null; } if (typeof type === "string") { return type; } break; } return null; } var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { { if (current === null) { return null; } var owner = current._debugOwner; if (owner !== null && typeof owner !== "undefined") { return getComponentNameFromFiber(owner); } } return null; } function getCurrentFiberStackInDev() { { if (current === null) { return ""; } return getStackByFiberInDevAndProd(current); } } function resetCurrentFiber() { { ReactDebugCurrentFrame.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; } } function getCurrentFiber() { { return current; } } function setIsRendering(rendering) { { isRendering = rendering; } } function toString2(value) { return "" + value; } function getToStringValue(value) { switch (typeof value) { case "boolean": case "number": case "string": case "undefined": return value; case "object": { checkFormFieldValueStringCoercion(value); } return value; default: return ""; } } var hasReadOnlyValue = { button: true, checkbox: true, image: true, hidden: true, radio: true, reset: true, submit: true }; function checkControlledValueProps(tagName, props) { { if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."); } if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); } } } function isCheckable(elem) { var type = elem.type; var nodeName = elem.nodeName; return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio"); } function getTracker(node2) { return node2._valueTracker; } function detachTracker(node2) { node2._valueTracker = null; } function getValueFromNode(node2) { var value = ""; if (!node2) { return value; } if (isCheckable(node2)) { value = node2.checked ? "true" : "false"; } else { value = node2.value; } return value; } function trackValueOnNode(node2) { var valueField = isCheckable(node2) ? "checked" : "value"; var descriptor = Object.getOwnPropertyDescriptor(node2.constructor.prototype, valueField); { checkFormFieldValueStringCoercion(node2[valueField]); } var currentValue = "" + node2[valueField]; if (node2.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") { return; } var get3 = descriptor.get, set3 = descriptor.set; Object.defineProperty(node2, valueField, { configurable: true, get: function() { return get3.call(this); }, set: function(value) { { checkFormFieldValueStringCoercion(value); } currentValue = "" + value; set3.call(this, value); } }); Object.defineProperty(node2, valueField, { enumerable: descriptor.enumerable }); var tracker = { getValue: function() { return currentValue; }, setValue: function(value) { { checkFormFieldValueStringCoercion(value); } currentValue = "" + value; }, stopTracking: function() { detachTracker(node2); delete node2[valueField]; } }; return tracker; } function track(node2) { if (getTracker(node2)) { return; } node2._valueTracker = trackValueOnNode(node2); } function updateValueIfChanged(node2) { if (!node2) { return false; } var tracker = getTracker(node2); if (!tracker) { return true; } var lastValue = tracker.getValue(); var nextValue = getValueFromNode(node2); if (nextValue !== lastValue) { tracker.setValue(nextValue); return true; } return false; } function getActiveElement(doc) { doc = doc || (typeof document !== "undefined" ? document : void 0); if (typeof doc === "undefined") { return null; } try { return doc.activeElement || doc.body; } catch (e) { return doc.body; } } var didWarnValueDefaultValue = false; var didWarnCheckedDefaultChecked = false; var didWarnControlledToUncontrolled = false; var didWarnUncontrolledToControlled = false; function isControlled(props) { var usesChecked = props.type === "checkbox" || props.type === "radio"; return usesChecked ? props.checked != null : props.value != null; } function getHostProps(element, props) { var node2 = element; var checked = props.checked; var hostProps = assign2({}, props, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: checked != null ? checked : node2._wrapperState.initialChecked }); return hostProps; } function initWrapperState(element, props) { { checkControlledValueProps("input", props); if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) { error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); didWarnCheckedDefaultChecked = true; } if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) { error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type); didWarnValueDefaultValue = true; } } var node2 = element; var defaultValue = props.defaultValue == null ? "" : props.defaultValue; node2._wrapperState = { initialChecked: props.checked != null ? props.checked : props.defaultChecked, initialValue: getToStringValue(props.value != null ? props.value : defaultValue), controlled: isControlled(props) }; } function updateChecked(element, props) { var node2 = element; var checked = props.checked; if (checked != null) { setValueForProperty(node2, "checked", checked, false); } } function updateWrapper(element, props) { var node2 = element; { var controlled = isControlled(props); if (!node2._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); didWarnUncontrolledToControlled = true; } if (node2._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"); didWarnControlledToUncontrolled = true; } } updateChecked(element, props); var value = getToStringValue(props.value); var type = props.type; if (value != null) { if (type === "number") { if (value === 0 && node2.value === "" || // We explicitly want to coerce to number here if possible. // eslint-disable-next-line node2.value != value) { node2.value = toString2(value); } } else if (node2.value !== toString2(value)) { node2.value = toString2(value); } } else if (type === "submit" || type === "reset") { node2.removeAttribute("value"); return; } { if (props.hasOwnProperty("value")) { setDefaultValue(node2, props.type, value); } else if (props.hasOwnProperty("defaultValue")) { setDefaultValue(node2, props.type, getToStringValue(props.defaultValue)); } } { if (props.checked == null && props.defaultChecked != null) { node2.defaultChecked = !!props.defaultChecked; } } } function postMountWrapper(element, props, isHydrating2) { var node2 = element; if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) { var type = props.type; var isButton = type === "submit" || type === "reset"; if (isButton && (props.value === void 0 || props.value === null)) { return; } var initialValue = toString2(node2._wrapperState.initialValue); if (!isHydrating2) { { if (initialValue !== node2.value) { node2.value = initialValue; } } } { node2.defaultValue = initialValue; } } var name = node2.name; if (name !== "") { node2.name = ""; } { node2.defaultChecked = !node2.defaultChecked; node2.defaultChecked = !!node2._wrapperState.initialChecked; } if (name !== "") { node2.name = name; } } function restoreControlledState(element, props) { var node2 = element; updateWrapper(node2, props); updateNamedCousins(node2, props); } function updateNamedCousins(rootNode, props) { var name = props.name; if (props.type === "radio" && name != null) { var queryRoot = rootNode; while (queryRoot.parentNode) { queryRoot = queryRoot.parentNode; } { checkAttributeStringCoercion(name, "name"); } var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]'); for (var i2 = 0; i2 < group.length; i2++) { var otherNode = group[i2]; if (otherNode === rootNode || otherNode.form !== rootNode.form) { continue; } var otherProps = getFiberCurrentPropsFromNode(otherNode); if (!otherProps) { throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."); } updateValueIfChanged(otherNode); updateWrapper(otherNode, otherProps); } } } function setDefaultValue(node2, type, value) { if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js type !== "number" || getActiveElement(node2.ownerDocument) !== node2 ) { if (value == null) { node2.defaultValue = toString2(node2._wrapperState.initialValue); } else if (node2.defaultValue !== toString2(value)) { node2.defaultValue = toString2(value); } } } var didWarnSelectedSetOnOption = false; var didWarnInvalidChild = false; var didWarnInvalidInnerHTML = false; function validateProps(element, props) { { if (props.value == null) { if (typeof props.children === "object" && props.children !== null) { React2.Children.forEach(props.children, function(child) { if (child == null) { return; } if (typeof child === "string" || typeof child === "number") { return; } if (!didWarnInvalidChild) { didWarnInvalidChild = true; error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to