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,oBAAqB8iB,EAAAA,GACrB,kBAAmB+vB,EACnB,mBAAoB7sB,EAAAA,GACpB,mBAAoBwuB,EACpB,gBAAiBoB,EACjB,iBAAkBO,IAGpB,MAAerkC,EAAK,gBjN9BpB","sources":["webpack://Quill/webpack/universalModuleDefinition","webpack://Quill/./src/blots/block.ts","webpack://Quill/./src/blots/break.ts","webpack://Quill/./src/blots/container.ts","webpack://Quill/./src/blots/cursor.ts","webpack://Quill/./src/blots/embed.ts","webpack://Quill/./src/blots/inline.ts","webpack://Quill/./src/blots/text.ts","webpack://Quill/./src/core/emitter.ts","webpack://Quill/./src/core/instances.ts","webpack://Quill/./src/core/logger.ts","webpack://Quill/./src/core/module.ts","webpack://Quill/./src/core/editor.ts","webpack://Quill/./src/core/composition.ts","webpack://Quill/./src/core/utils/scrollRectIntoView.ts","webpack://Quill/./src/core/utils/createRegistryWithFormats.ts","webpack://Quill/./src/core/quill.ts","webpack://Quill/./src/core/selection.ts","webpack://Quill/./src/core/theme.ts","webpack://Quill/./src/formats/align.ts","webpack://Quill/./src/formats/background.ts","webpack://Quill/./src/formats/code.ts","webpack://Quill/./src/formats/color.ts","webpack://Quill/./src/formats/direction.ts","webpack://Quill/./src/formats/font.ts","webpack://Quill/./src/formats/size.ts","webpack://Quill/./src/modules/normalizeExternalHTML/normalizers/googleDocs.ts","webpack://Quill/./src/modules/normalizeExternalHTML/normalizers/msWord.ts","webpack://Quill/./src/modules/normalizeExternalHTML/index.ts","webpack://Quill/./src/modules/clipboard.ts","webpack://Quill/./src/modules/keyboard.ts","webpack://Quill/../../node_modules/eventemitter3/index.js","webpack://Quill/../../node_modules/fast-diff/diff.js","webpack://Quill/../../node_modules/lodash.clonedeep/index.js","webpack://Quill/../../node_modules/lodash.isequal/index.js","webpack://Quill/../../node_modules/quill-delta/src/AttributeMap.ts","webpack://Quill/../../node_modules/quill-delta/src/Delta.ts","webpack://Quill/../../node_modules/quill-delta/src/Op.ts","webpack://Quill/../../node_modules/quill-delta/src/OpIterator.ts","webpack://Quill/../../node_modules/lodash-es/_listCacheClear.js","webpack://Quill/../../node_modules/lodash-es/_assocIndexOf.js","webpack://Quill/../../node_modules/lodash-es/_listCacheDelete.js","webpack://Quill/../../node_modules/lodash-es/_ListCache.js","webpack://Quill/../../node_modules/lodash-es/_listCacheGet.js","webpack://Quill/../../node_modules/lodash-es/_listCacheHas.js","webpack://Quill/../../node_modules/lodash-es/_listCacheSet.js","webpack://Quill/../../node_modules/lodash-es/_Map.js","webpack://Quill/../../node_modules/lodash-es/_nativeCreate.js","webpack://Quill/../../node_modules/lodash-es/_hashGet.js","webpack://Quill/../../node_modules/lodash-es/_hashHas.js","webpack://Quill/../../node_modules/lodash-es/_Hash.js","webpack://Quill/../../node_modules/lodash-es/_hashClear.js","webpack://Quill/../../node_modules/lodash-es/_hashDelete.js","webpack://Quill/../../node_modules/lodash-es/_hashSet.js","webpack://Quill/../../node_modules/lodash-es/_getMapData.js","webpack://Quill/../../node_modules/lodash-es/_isKeyable.js","webpack://Quill/../../node_modules/lodash-es/_MapCache.js","webpack://Quill/../../node_modules/lodash-es/_mapCacheClear.js","webpack://Quill/../../node_modules/lodash-es/_mapCacheDelete.js","webpack://Quill/../../node_modules/lodash-es/_mapCacheGet.js","webpack://Quill/../../node_modules/lodash-es/_mapCacheHas.js","webpack://Quill/../../node_modules/lodash-es/_mapCacheSet.js","webpack://Quill/../../node_modules/lodash-es/_Stack.js","webpack://Quill/../../node_modules/lodash-es/_stackClear.js","webpack://Quill/../../node_modules/lodash-es/_stackDelete.js","webpack://Quill/../../node_modules/lodash-es/_stackGet.js","webpack://Quill/../../node_modules/lodash-es/_stackHas.js","webpack://Quill/../../node_modules/lodash-es/_stackSet.js","webpack://Quill/../../node_modules/lodash-es/_Symbol.js","webpack://Quill/../../node_modules/lodash-es/_Uint8Array.js","webpack://Quill/../../node_modules/lodash-es/_baseTimes.js","webpack://Quill/../../node_modules/lodash-es/_arrayLikeKeys.js","webpack://Quill/../../node_modules/lodash-es/_arrayPush.js","webpack://Quill/../../node_modules/lodash-es/_assignValue.js","webpack://Quill/../../node_modules/lodash-es/_baseAssignValue.js","webpack://Quill/../../node_modules/lodash-es/_baseGetAllKeys.js","webpack://Quill/../../node_modules/lodash-es/_getRawTag.js","webpack://Quill/../../node_modules/lodash-es/_objectToString.js","webpack://Quill/../../node_modules/lodash-es/_baseGetTag.js","webpack://Quill/../../node_modules/lodash-es/_baseUnary.js","webpack://Quill/../../node_modules/lodash-es/_cloneArrayBuffer.js","webpack://Quill/../../node_modules/lodash-es/_cloneBuffer.js","webpack://Quill/../../node_modules/lodash-es/_cloneTypedArray.js","webpack://Quill/../../node_modules/lodash-es/_copyArray.js","webpack://Quill/../../node_modules/lodash-es/_copyObject.js","webpack://Quill/../../node_modules/lodash-es/_defineProperty.js","webpack://Quill/../../node_modules/lodash-es/_freeGlobal.js","webpack://Quill/../../node_modules/lodash-es/_getAllKeys.js","webpack://Quill/../../node_modules/lodash-es/_isMasked.js","webpack://Quill/../../node_modules/lodash-es/_coreJsData.js","webpack://Quill/../../node_modules/lodash-es/_baseIsNative.js","webpack://Quill/../../node_modules/lodash-es/_getNative.js","webpack://Quill/../../node_modules/lodash-es/_getValue.js","webpack://Quill/../../node_modules/lodash-es/_getPrototype.js","webpack://Quill/../../node_modules/lodash-es/_arrayFilter.js","webpack://Quill/../../node_modules/lodash-es/_getSymbols.js","webpack://Quill/../../node_modules/lodash-es/_DataView.js","webpack://Quill/../../node_modules/lodash-es/_Promise.js","webpack://Quill/../../node_modules/lodash-es/_Set.js","webpack://Quill/../../node_modules/lodash-es/_WeakMap.js","webpack://Quill/../../node_modules/lodash-es/_getTag.js","webpack://Quill/../../node_modules/lodash-es/_baseCreate.js","webpack://Quill/../../node_modules/lodash-es/_initCloneObject.js","webpack://Quill/../../node_modules/lodash-es/_isIndex.js","webpack://Quill/../../node_modules/lodash-es/_isPrototype.js","webpack://Quill/../../node_modules/lodash-es/_nodeUtil.js","webpack://Quill/../../node_modules/lodash-es/_overArg.js","webpack://Quill/../../node_modules/lodash-es/_root.js","webpack://Quill/../../node_modules/lodash-es/_toSource.js","webpack://Quill/../../node_modules/lodash-es/_getSymbolsIn.js","webpack://Quill/../../node_modules/lodash-es/_getAllKeysIn.js","webpack://Quill/../../node_modules/lodash-es/_initCloneArray.js","webpack://Quill/../../node_modules/lodash-es/_cloneRegExp.js","webpack://Quill/../../node_modules/lodash-es/_cloneSymbol.js","webpack://Quill/../../node_modules/lodash-es/_initCloneByTag.js","webpack://Quill/../../node_modules/lodash-es/_cloneDataView.js","webpack://Quill/../../node_modules/lodash-es/isMap.js","webpack://Quill/../../node_modules/lodash-es/_baseIsMap.js","webpack://Quill/../../node_modules/lodash-es/isSet.js","webpack://Quill/../../node_modules/lodash-es/_baseIsSet.js","webpack://Quill/../../node_modules/lodash-es/_baseClone.js","webpack://Quill/../../node_modules/lodash-es/_copySymbolsIn.js","webpack://Quill/../../node_modules/lodash-es/_baseAssignIn.js","webpack://Quill/../../node_modules/lodash-es/_copySymbols.js","webpack://Quill/../../node_modules/lodash-es/_baseAssign.js","webpack://Quill/../../node_modules/lodash-es/_arrayEach.js","webpack://Quill/../../node_modules/lodash-es/cloneDeep.js","webpack://Quill/../../node_modules/lodash-es/eq.js","webpack://Quill/../../node_modules/lodash-es/_baseIsArguments.js","webpack://Quill/../../node_modules/lodash-es/isArguments.js","webpack://Quill/../../node_modules/lodash-es/isArray.js","webpack://Quill/../../node_modules/lodash-es/isArrayLike.js","webpack://Quill/../../node_modules/lodash-es/isBuffer.js","webpack://Quill/../../node_modules/lodash-es/stubFalse.js","webpack://Quill/../../node_modules/lodash-es/_SetCache.js","webpack://Quill/../../node_modules/lodash-es/_setCacheAdd.js","webpack://Quill/../../node_modules/lodash-es/_setCacheHas.js","webpack://Quill/../../node_modules/lodash-es/_arraySome.js","webpack://Quill/../../node_modules/lodash-es/_equalArrays.js","webpack://Quill/../../node_modules/lodash-es/_cacheHas.js","webpack://Quill/../../node_modules/lodash-es/_mapToArray.js","webpack://Quill/../../node_modules/lodash-es/_setToArray.js","webpack://Quill/../../node_modules/lodash-es/_equalByTag.js","webpack://Quill/../../node_modules/lodash-es/_equalObjects.js","webpack://Quill/../../node_modules/lodash-es/_baseIsEqualDeep.js","webpack://Quill/../../node_modules/lodash-es/_baseIsEqual.js","webpack://Quill/../../node_modules/lodash-es/isEqual.js","webpack://Quill/../../node_modules/lodash-es/isFunction.js","webpack://Quill/../../node_modules/lodash-es/isLength.js","webpack://Quill/../../node_modules/lodash-es/isObject.js","webpack://Quill/../../node_modules/lodash-es/isObjectLike.js","webpack://Quill/../../node_modules/lodash-es/_baseIsTypedArray.js","webpack://Quill/../../node_modules/lodash-es/isTypedArray.js","webpack://Quill/../../node_modules/lodash-es/_nativeKeys.js","webpack://Quill/../../node_modules/lodash-es/_baseKeys.js","webpack://Quill/../../node_modules/lodash-es/keys.js","webpack://Quill/../../node_modules/lodash-es/_baseKeysIn.js","webpack://Quill/../../node_modules/lodash-es/_nativeKeysIn.js","webpack://Quill/../../node_modules/lodash-es/keysIn.js","webpack://Quill/../../node_modules/lodash-es/_shortOut.js","webpack://Quill/../../node_modules/lodash-es/_createAssigner.js","webpack://Quill/../../node_modules/lodash-es/_assignMergeValue.js","webpack://Quill/../../node_modules/lodash-es/_baseFor.js","webpack://Quill/../../node_modules/lodash-es/_createBaseFor.js","webpack://Quill/../../node_modules/lodash-es/isPlainObject.js","webpack://Quill/../../node_modules/lodash-es/_safeGet.js","webpack://Quill/../../node_modules/lodash-es/_baseMergeDeep.js","webpack://Quill/../../node_modules/lodash-es/isArrayLikeObject.js","webpack://Quill/../../node_modules/lodash-es/toPlainObject.js","webpack://Quill/../../node_modules/lodash-es/_baseMerge.js","webpack://Quill/../../node_modules/lodash-es/identity.js","webpack://Quill/../../node_modules/lodash-es/_overRest.js","webpack://Quill/../../node_modules/lodash-es/_baseSetToString.js","webpack://Quill/../../node_modules/lodash-es/constant.js","webpack://Quill/../../node_modules/lodash-es/_setToString.js","webpack://Quill/../../node_modules/lodash-es/_baseRest.js","webpack://Quill/../../node_modules/lodash-es/_apply.js","webpack://Quill/../../node_modules/lodash-es/merge.js","webpack://Quill/../../node_modules/lodash-es/_isIterateeCall.js","webpack://Quill/../../node_modules/lodash-es/stubArray.js","webpack://Quill/../../node_modules/parchment/src/scope.ts","webpack://Quill/../../node_modules/parchment/src/attributor/attributor.ts","webpack://Quill/../../node_modules/parchment/src/error.ts","webpack://Quill/../../node_modules/parchment/src/registry.ts","webpack://Quill/../../node_modules/parchment/src/attributor/class.ts","webpack://Quill/../../node_modules/parchment/src/attributor/style.ts","webpack://Quill/../../node_modules/parchment/src/attributor/store.ts","webpack://Quill/../../node_modules/parchment/src/blot/abstract/shadow.ts","webpack://Quill/../../node_modules/parchment/src/blot/abstract/leaf.ts","webpack://Quill/../../node_modules/parchment/src/collection/linked-list.ts","webpack://Quill/../../node_modules/parchment/src/blot/abstract/parent.ts","webpack://Quill/../../node_modules/parchment/src/blot/inline.ts","webpack://Quill/../../node_modules/parchment/src/blot/block.ts","webpack://Quill/../../node_modules/parchment/src/blot/abstract/container.ts","webpack://Quill/../../node_modules/parchment/src/blot/embed.ts","webpack://Quill/../../node_modules/parchment/src/blot/scroll.ts","webpack://Quill/../../node_modules/parchment/src/blot/text.ts","webpack://Quill/webpack/bootstrap","webpack://Quill/webpack/runtime/compat get default export","webpack://Quill/webpack/runtime/define property getters","webpack://Quill/webpack/runtime/global","webpack://Quill/webpack/runtime/hasOwnProperty shorthand","webpack://Quill/webpack/runtime/make namespace object","webpack://Quill/webpack/runtime/node module decorator","webpack://Quill/./src/blots/scroll.ts","webpack://Quill/./src/modules/history.ts","webpack://Quill/./src/modules/uploader.ts","webpack://Quill/./src/modules/input.ts","webpack://Quill/./src/modules/uiNode.ts","webpack://Quill/./src/core.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Quill\"] = factory();\n\telse\n\t\troot[\"Quill\"] = factory();\n})(self, function() {\nreturn ","import {\n AttributorStore,\n BlockBlot,\n EmbedBlot,\n LeafBlot,\n Scope,\n} from 'parchment';\nimport type { Blot, Parent } from 'parchment';\nimport Delta from 'quill-delta';\nimport Break from './break.js';\nimport Inline from './inline.js';\nimport TextBlot from './text.js';\n\nconst NEWLINE_LENGTH = 1;\n\nclass Block extends BlockBlot {\n cache: { delta?: Delta | null; length?: number } = {};\n\n delta(): Delta {\n if (this.cache.delta == null) {\n this.cache.delta = blockDelta(this);\n }\n return this.cache.delta;\n }\n\n deleteAt(index: number, length: number) {\n super.deleteAt(index, length);\n this.cache = {};\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n if (length <= 0) return;\n if (this.scroll.query(name, Scope.BLOCK)) {\n if (index + length === this.length()) {\n this.format(name, value);\n }\n } else {\n super.formatAt(\n index,\n Math.min(length, this.length() - index - 1),\n name,\n value,\n );\n }\n this.cache = {};\n }\n\n insertAt(index: number, value: string, def?: unknown) {\n if (def != null) {\n super.insertAt(index, value, def);\n this.cache = {};\n return;\n }\n if (value.length === 0) return;\n const lines = value.split('\\n');\n const text = lines.shift() as string;\n if (text.length > 0) {\n if (index < this.length() - 1 || this.children.tail == null) {\n super.insertAt(Math.min(index, this.length() - 1), text);\n } else {\n this.children.tail.insertAt(this.children.tail.length(), text);\n }\n this.cache = {};\n }\n // TODO: Fix this next time the file is edited.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let block: Blot | this = this;\n lines.reduce((lineIndex, line) => {\n // @ts-expect-error Fix me later\n block = block.split(lineIndex, true);\n block.insertAt(0, line);\n return line.length;\n }, index + text.length);\n }\n\n insertBefore(blot: Blot, ref?: Blot | null) {\n const { head } = this.children;\n super.insertBefore(blot, ref);\n if (head instanceof Break) {\n head.remove();\n }\n this.cache = {};\n }\n\n length() {\n if (this.cache.length == null) {\n this.cache.length = super.length() + NEWLINE_LENGTH;\n }\n return this.cache.length;\n }\n\n moveChildren(target: Parent, ref?: Blot | null) {\n // @ts-expect-error Parchment types are wrong\n super.moveChildren(target, ref);\n this.cache = {};\n }\n\n optimize(context: { [key: string]: any }) {\n super.optimize(context);\n this.cache = {};\n }\n\n path(index: number) {\n return super.path(index, true);\n }\n\n removeChild(child: Blot) {\n super.removeChild(child);\n this.cache = {};\n }\n\n split(index: number, force: boolean | undefined = false): Blot | null {\n if (force && (index === 0 || index >= this.length() - NEWLINE_LENGTH)) {\n const clone = this.clone();\n if (index === 0) {\n this.parent.insertBefore(clone, this);\n return this;\n }\n // @ts-expect-error Fix me later\n this.parent.insertBefore(clone, this.next);\n return clone;\n }\n const next = super.split(index, force);\n this.cache = {};\n return next;\n }\n}\nBlock.blotName = 'block';\nBlock.tagName = 'P';\nBlock.defaultChild = Break;\nBlock.allowedChildren = [Break, Inline, EmbedBlot, TextBlot];\n\nclass BlockEmbed extends EmbedBlot {\n attributes: AttributorStore;\n domNode: HTMLElement;\n\n attach() {\n super.attach();\n this.attributes = new AttributorStore(this.domNode);\n }\n\n delta() {\n return new Delta().insert(this.value(), {\n ...this.formats(),\n ...this.attributes.values(),\n });\n }\n\n format(name: string, value: unknown) {\n const attribute = this.scroll.query(name, Scope.BLOCK_ATTRIBUTE);\n if (attribute != null) {\n // @ts-expect-error TODO: Scroll#query() should return Attributor when scope is attribute\n this.attributes.attribute(attribute, value);\n }\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n this.format(name, value);\n }\n\n insertAt(index: number, value: string, def?: unknown) {\n if (def != null) {\n super.insertAt(index, value, def);\n return;\n }\n const lines = value.split('\\n');\n const text = lines.pop();\n const blocks = lines.map((line) => {\n const block = this.scroll.create(Block.blotName);\n block.insertAt(0, line);\n return block;\n });\n const ref = this.split(index);\n blocks.forEach((block) => {\n // @ts-expect-error Fix me later\n this.parent.insertBefore(block, ref);\n });\n if (text) {\n // @ts-expect-error Fix me later\n this.parent.insertBefore(this.scroll.create('text', text), ref);\n }\n }\n}\nBlockEmbed.scope = Scope.BLOCK_BLOT;\n// It is important for cursor behavior BlockEmbeds use tags that are block level elements\n\nfunction blockDelta(blot: BlockBlot, filter = true) {\n return blot\n .descendants(LeafBlot)\n .reduce((delta, leaf) => {\n if (leaf.length() === 0) {\n return delta;\n }\n return delta.insert(leaf.value(), bubbleFormats(leaf, {}, filter));\n }, new Delta())\n .insert('\\n', bubbleFormats(blot));\n}\n\nfunction bubbleFormats(\n blot: Blot | null,\n formats: Record = {},\n filter = true,\n): Record {\n if (blot == null) return formats;\n if ('formats' in blot && typeof blot.formats === 'function') {\n formats = {\n ...formats,\n ...blot.formats(),\n };\n if (filter) {\n // exclude syntax highlighting from deltas and getFormat()\n delete formats['code-token'];\n }\n }\n if (\n blot.parent == null ||\n blot.parent.statics.blotName === 'scroll' ||\n blot.parent.statics.scope !== blot.statics.scope\n ) {\n return formats;\n }\n return bubbleFormats(blot.parent, formats, filter);\n}\n\nexport { blockDelta, bubbleFormats, BlockEmbed, Block as default };\n","import { EmbedBlot } from 'parchment';\n\nclass Break extends EmbedBlot {\n static value() {\n return undefined;\n }\n\n optimize() {\n if (this.prev || this.next) {\n this.remove();\n }\n }\n\n length() {\n return 0;\n }\n\n value() {\n return '';\n }\n}\nBreak.blotName = 'break';\nBreak.tagName = 'BR';\n\nexport default Break;\n","import { ContainerBlot } from 'parchment';\n\nclass Container extends ContainerBlot {}\n\nexport default Container;\n","import { EmbedBlot, Scope } from 'parchment';\nimport type { Parent, ScrollBlot } from 'parchment';\nimport type Selection from '../core/selection.js';\nimport TextBlot from './text.js';\nimport type { EmbedContextRange } from './embed.js';\n\nclass Cursor extends EmbedBlot {\n static blotName = 'cursor';\n static className = 'ql-cursor';\n static tagName = 'span';\n static CONTENTS = '\\uFEFF'; // Zero width no break space\n\n static value() {\n return undefined;\n }\n\n selection: Selection;\n textNode: Text;\n savedLength: number;\n\n constructor(scroll: ScrollBlot, domNode: HTMLElement, selection: Selection) {\n super(scroll, domNode);\n this.selection = selection;\n this.textNode = document.createTextNode(Cursor.CONTENTS);\n this.domNode.appendChild(this.textNode);\n this.savedLength = 0;\n }\n\n detach() {\n // super.detach() will also clear domNode.__blot\n if (this.parent != null) this.parent.removeChild(this);\n }\n\n format(name: string, value: unknown) {\n if (this.savedLength !== 0) {\n super.format(name, value);\n return;\n }\n // TODO: Fix this next time the file is edited.\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let target: Parent | this = this;\n let index = 0;\n while (target != null && target.statics.scope !== Scope.BLOCK_BLOT) {\n index += target.offset(target.parent);\n target = target.parent;\n }\n if (target != null) {\n this.savedLength = Cursor.CONTENTS.length;\n // @ts-expect-error TODO: allow empty context in Parchment\n target.optimize();\n target.formatAt(index, Cursor.CONTENTS.length, name, value);\n this.savedLength = 0;\n }\n }\n\n index(node: Node, offset: number) {\n if (node === this.textNode) return 0;\n return super.index(node, offset);\n }\n\n length() {\n return this.savedLength;\n }\n\n position(): [Text, number] {\n return [this.textNode, this.textNode.data.length];\n }\n\n remove() {\n super.remove();\n // @ts-expect-error Fix me later\n this.parent = null;\n }\n\n restore(): EmbedContextRange | null {\n if (this.selection.composing || this.parent == null) return null;\n const range = this.selection.getNativeRange();\n // Browser may push down styles/nodes inside the cursor blot.\n // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#push-down-values\n while (\n this.domNode.lastChild != null &&\n this.domNode.lastChild !== this.textNode\n ) {\n // @ts-expect-error Fix me later\n this.domNode.parentNode.insertBefore(\n this.domNode.lastChild,\n this.domNode,\n );\n }\n\n const prevTextBlot = this.prev instanceof TextBlot ? this.prev : null;\n const prevTextLength = prevTextBlot ? prevTextBlot.length() : 0;\n const nextTextBlot = this.next instanceof TextBlot ? this.next : null;\n // @ts-expect-error TODO: make TextBlot.text public\n const nextText = nextTextBlot ? nextTextBlot.text : '';\n const { textNode } = this;\n // take text from inside this blot and reset it\n const newText = textNode.data.split(Cursor.CONTENTS).join('');\n textNode.data = Cursor.CONTENTS;\n\n // proactively merge TextBlots around cursor so that optimization\n // doesn't lose the cursor. the reason we are here in cursor.restore\n // could be that the user clicked in prevTextBlot or nextTextBlot, or\n // the user typed something.\n let mergedTextBlot;\n if (prevTextBlot) {\n mergedTextBlot = prevTextBlot;\n if (newText || nextTextBlot) {\n prevTextBlot.insertAt(prevTextBlot.length(), newText + nextText);\n if (nextTextBlot) {\n nextTextBlot.remove();\n }\n }\n } else if (nextTextBlot) {\n mergedTextBlot = nextTextBlot;\n nextTextBlot.insertAt(0, newText);\n } else {\n const newTextNode = document.createTextNode(newText);\n mergedTextBlot = this.scroll.create(newTextNode);\n this.parent.insertBefore(mergedTextBlot, this);\n }\n\n this.remove();\n if (range) {\n // calculate selection to restore\n const remapOffset = (node: Node, offset: number) => {\n if (prevTextBlot && node === prevTextBlot.domNode) {\n return offset;\n }\n if (node === textNode) {\n return prevTextLength + offset - 1;\n }\n if (nextTextBlot && node === nextTextBlot.domNode) {\n return prevTextLength + newText.length + offset;\n }\n return null;\n };\n\n const start = remapOffset(range.start.node, range.start.offset);\n const end = remapOffset(range.end.node, range.end.offset);\n if (start !== null && end !== null) {\n return {\n startNode: mergedTextBlot.domNode,\n startOffset: start,\n endNode: mergedTextBlot.domNode,\n endOffset: end,\n };\n }\n }\n return null;\n }\n\n update(mutations: MutationRecord[], context: Record) {\n if (\n mutations.some((mutation) => {\n return (\n mutation.type === 'characterData' && mutation.target === this.textNode\n );\n })\n ) {\n const range = this.restore();\n if (range) context.range = range;\n }\n }\n\n // Avoid .ql-cursor being a descendant of ``.\n // The reason is Safari pushes down `` on text insertion.\n // That will cause DOM nodes not sync with the model.\n //\n // For example ({I} is the caret), given the markup:\n // \\uFEFF{I}\n // When typing a char \"x\", `` will be pushed down inside the `` first:\n // \\uFEFF{I}\n // And then \"x\" will be inserted after ``:\n // \\uFEFFd{I}\n optimize(context?: unknown) {\n // @ts-expect-error Fix me later\n super.optimize(context);\n\n let { parent } = this;\n while (parent) {\n if (parent.domNode.tagName === 'A') {\n this.savedLength = Cursor.CONTENTS.length;\n // @ts-expect-error TODO: make isolate generic\n parent.isolate(this.offset(parent), this.length()).unwrap();\n this.savedLength = 0;\n break;\n }\n parent = parent.parent;\n }\n }\n\n value() {\n return '';\n }\n}\n\nexport default Cursor;\n","import type { ScrollBlot } from 'parchment';\nimport { EmbedBlot } from 'parchment';\nimport TextBlot from './text.js';\n\nconst GUARD_TEXT = '\\uFEFF';\n\nexport interface EmbedContextRange {\n startNode: Node | Text;\n startOffset: number;\n endNode?: Node | Text;\n endOffset?: number;\n}\n\nclass Embed extends EmbedBlot {\n contentNode: HTMLSpanElement;\n leftGuard: Text;\n rightGuard: Text;\n\n constructor(scroll: ScrollBlot, node: Node) {\n super(scroll, node);\n this.contentNode = document.createElement('span');\n this.contentNode.setAttribute('contenteditable', 'false');\n Array.from(this.domNode.childNodes).forEach((childNode) => {\n this.contentNode.appendChild(childNode);\n });\n this.leftGuard = document.createTextNode(GUARD_TEXT);\n this.rightGuard = document.createTextNode(GUARD_TEXT);\n this.domNode.appendChild(this.leftGuard);\n this.domNode.appendChild(this.contentNode);\n this.domNode.appendChild(this.rightGuard);\n }\n\n index(node: Node, offset: number) {\n if (node === this.leftGuard) return 0;\n if (node === this.rightGuard) return 1;\n return super.index(node, offset);\n }\n\n restore(node: Text): EmbedContextRange | null {\n let range: EmbedContextRange | null = null;\n let textNode: Text;\n const text = node.data.split(GUARD_TEXT).join('');\n if (node === this.leftGuard) {\n if (this.prev instanceof TextBlot) {\n const prevLength = this.prev.length();\n this.prev.insertAt(prevLength, text);\n range = {\n startNode: this.prev.domNode,\n startOffset: prevLength + text.length,\n };\n } else {\n textNode = document.createTextNode(text);\n this.parent.insertBefore(this.scroll.create(textNode), this);\n range = {\n startNode: textNode,\n startOffset: text.length,\n };\n }\n } else if (node === this.rightGuard) {\n if (this.next instanceof TextBlot) {\n this.next.insertAt(0, text);\n range = {\n startNode: this.next.domNode,\n startOffset: text.length,\n };\n } else {\n textNode = document.createTextNode(text);\n // @ts-expect-error Fix me later\n this.parent.insertBefore(this.scroll.create(textNode), this.next);\n range = {\n startNode: textNode,\n startOffset: text.length,\n };\n }\n }\n node.data = GUARD_TEXT;\n return range;\n }\n\n update(mutations: MutationRecord[], context: Record) {\n mutations.forEach((mutation) => {\n if (\n mutation.type === 'characterData' &&\n (mutation.target === this.leftGuard ||\n mutation.target === this.rightGuard)\n ) {\n const range = this.restore(mutation.target as Text);\n if (range) context.range = range;\n }\n });\n }\n}\n\nexport default Embed;\n","import { EmbedBlot, InlineBlot, Scope } from 'parchment';\nimport type { BlotConstructor } from 'parchment';\nimport Break from './break.js';\nimport Text from './text.js';\n\nclass Inline extends InlineBlot {\n static allowedChildren: BlotConstructor[] = [Inline, Break, EmbedBlot, Text];\n // Lower index means deeper in the DOM tree, since not found (-1) is for embeds\n static order = [\n 'cursor',\n 'inline', // Must be lower\n 'link', // Chrome wants to be lower\n 'underline',\n 'strike',\n 'italic',\n 'bold',\n 'script',\n 'code', // Must be higher\n ];\n\n static compare(self: string, other: string) {\n const selfIndex = Inline.order.indexOf(self);\n const otherIndex = Inline.order.indexOf(other);\n if (selfIndex >= 0 || otherIndex >= 0) {\n return selfIndex - otherIndex;\n }\n if (self === other) {\n return 0;\n }\n if (self < other) {\n return -1;\n }\n return 1;\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n if (\n Inline.compare(this.statics.blotName, name) < 0 &&\n this.scroll.query(name, Scope.BLOT)\n ) {\n const blot = this.isolate(index, length);\n if (value) {\n blot.wrap(name, value);\n }\n } else {\n super.formatAt(index, length, name, value);\n }\n }\n\n optimize(context: { [key: string]: any }) {\n super.optimize(context);\n if (\n this.parent instanceof Inline &&\n Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0\n ) {\n const parent = this.parent.isolate(this.offset(), this.length());\n // @ts-expect-error TODO: make isolate generic\n this.moveChildren(parent);\n parent.wrap(this);\n }\n }\n}\n\nexport default Inline;\n","import { TextBlot } from 'parchment';\n\nclass Text extends TextBlot {}\n\nfunction escapeText(text: string) {\n return text.replace(/[&<>\"']/g, (s) => {\n // https://lodash.com/docs#escape\n const entityMap: Record = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n };\n return entityMap[s];\n });\n}\n\nexport { Text as default, escapeText };\n","import { EventEmitter } from 'eventemitter3';\nimport instances from './instances.js';\nimport logger from './logger.js';\n\nconst debug = logger('quill:events');\nconst EVENTS = ['selectionchange', 'mousedown', 'mouseup', 'click'];\n\nEVENTS.forEach((eventName) => {\n document.addEventListener(eventName, (...args) => {\n Array.from(document.querySelectorAll('.ql-container')).forEach((node) => {\n const quill = instances.get(node);\n if (quill && quill.emitter) {\n quill.emitter.handleDOM(...args);\n }\n });\n });\n});\n\nclass Emitter extends EventEmitter {\n static events = {\n EDITOR_CHANGE: 'editor-change',\n SCROLL_BEFORE_UPDATE: 'scroll-before-update',\n SCROLL_BLOT_MOUNT: 'scroll-blot-mount',\n SCROLL_BLOT_UNMOUNT: 'scroll-blot-unmount',\n SCROLL_OPTIMIZE: 'scroll-optimize',\n SCROLL_UPDATE: 'scroll-update',\n SCROLL_EMBED_UPDATE: 'scroll-embed-update',\n SELECTION_CHANGE: 'selection-change',\n TEXT_CHANGE: 'text-change',\n COMPOSITION_BEFORE_START: 'composition-before-start',\n COMPOSITION_START: 'composition-start',\n COMPOSITION_BEFORE_END: 'composition-before-end',\n COMPOSITION_END: 'composition-end',\n } as const;\n\n static sources = {\n API: 'api',\n SILENT: 'silent',\n USER: 'user',\n } as const;\n\n protected domListeners: Record;\n\n constructor() {\n super();\n this.domListeners = {};\n this.on('error', debug.error);\n }\n\n emit(...args: unknown[]): boolean {\n debug.log.call(debug, ...args);\n // @ts-expect-error\n return super.emit(...args);\n }\n\n handleDOM(event: Event, ...args: unknown[]) {\n (this.domListeners[event.type] || []).forEach(({ node, handler }) => {\n if (event.target === node || node.contains(event.target as Node)) {\n handler(event, ...args);\n }\n });\n }\n\n listenDOM(eventName: string, node: Node, handler: EventListener) {\n if (!this.domListeners[eventName]) {\n this.domListeners[eventName] = [];\n }\n this.domListeners[eventName].push({ node, handler });\n }\n}\n\nexport type EmitterSource =\n (typeof Emitter.sources)[keyof typeof Emitter.sources];\n\nexport default Emitter;\n","import type Quill from '../core.js';\n\nexport default new WeakMap();\n","const levels = ['error', 'warn', 'log', 'info'] as const;\nexport type DebugLevel = (typeof levels)[number];\nlet level: DebugLevel | false = 'warn';\n\nfunction debug(method: DebugLevel, ...args: unknown[]) {\n if (level) {\n if (levels.indexOf(method) <= levels.indexOf(level)) {\n console[method](...args); // eslint-disable-line no-console\n }\n }\n}\n\nfunction namespace(\n ns: string,\n): Record void> {\n return levels.reduce(\n (logger, method) => {\n logger[method] = debug.bind(console, method, ns);\n return logger;\n },\n {} as Record void>,\n );\n}\n\nnamespace.level = (newLevel: DebugLevel | false) => {\n level = newLevel;\n};\ndebug.level = namespace.level;\n\nexport default namespace;\n","import type Quill from './quill.js';\n\nabstract class Module {\n static DEFAULTS = {};\n\n constructor(\n protected quill: Quill,\n protected options: Partial = {},\n ) {}\n}\n\nexport default Module;\n","import { cloneDeep, isEqual, merge } from 'lodash-es';\nimport { LeafBlot, EmbedBlot, Scope, ParentBlot } from 'parchment';\nimport type { Blot } from 'parchment';\nimport Delta, { AttributeMap, Op } from 'quill-delta';\nimport Block, { BlockEmbed, bubbleFormats } from '../blots/block.js';\nimport Break from '../blots/break.js';\nimport CursorBlot from '../blots/cursor.js';\nimport type Scroll from '../blots/scroll.js';\nimport TextBlot, { escapeText } from '../blots/text.js';\nimport { Range } from './selection.js';\n\nconst ASCII = /^[ -~]*$/;\n\ntype SelectionInfo = {\n newRange: Range;\n oldRange: Range;\n};\n\nclass Editor {\n scroll: Scroll;\n delta: Delta;\n\n constructor(scroll: Scroll) {\n this.scroll = scroll;\n this.delta = this.getDelta();\n }\n\n applyDelta(delta: Delta): Delta {\n this.scroll.update();\n let scrollLength = this.scroll.length();\n this.scroll.batchStart();\n const normalizedDelta = normalizeDelta(delta);\n const deleteDelta = new Delta();\n const normalizedOps = splitOpLines(normalizedDelta.ops.slice());\n normalizedOps.reduce((index, op) => {\n const length = Op.length(op);\n let attributes = op.attributes || {};\n let isImplicitNewlinePrepended = false;\n let isImplicitNewlineAppended = false;\n if (op.insert != null) {\n deleteDelta.retain(length);\n if (typeof op.insert === 'string') {\n const text = op.insert;\n isImplicitNewlineAppended =\n !text.endsWith('\\n') &&\n (scrollLength <= index ||\n !!this.scroll.descendant(BlockEmbed, index)[0]);\n this.scroll.insertAt(index, text);\n const [line, offset] = this.scroll.line(index);\n let formats = merge({}, bubbleFormats(line));\n if (line instanceof Block) {\n const [leaf] = line.descendant(LeafBlot, offset);\n if (leaf) {\n formats = merge(formats, bubbleFormats(leaf));\n }\n }\n attributes = AttributeMap.diff(formats, attributes) || {};\n } else if (typeof op.insert === 'object') {\n const key = Object.keys(op.insert)[0]; // There should only be one key\n if (key == null) return index;\n const isInlineEmbed = this.scroll.query(key, Scope.INLINE) != null;\n if (isInlineEmbed) {\n if (\n scrollLength <= index ||\n !!this.scroll.descendant(BlockEmbed, index)[0]\n ) {\n isImplicitNewlineAppended = true;\n }\n } else if (index > 0) {\n const [leaf, offset] = this.scroll.descendant(LeafBlot, index - 1);\n if (leaf instanceof TextBlot) {\n const text = leaf.value();\n if (text[offset] !== '\\n') {\n isImplicitNewlinePrepended = true;\n }\n } else if (\n leaf instanceof EmbedBlot &&\n leaf.statics.scope === Scope.INLINE_BLOT\n ) {\n isImplicitNewlinePrepended = true;\n }\n }\n this.scroll.insertAt(index, key, op.insert[key]);\n\n if (isInlineEmbed) {\n const [leaf] = this.scroll.descendant(LeafBlot, index);\n if (leaf) {\n const formats = merge({}, bubbleFormats(leaf));\n attributes = AttributeMap.diff(formats, attributes) || {};\n }\n }\n }\n scrollLength += length;\n } else {\n deleteDelta.push(op);\n\n if (op.retain !== null && typeof op.retain === 'object') {\n const key = Object.keys(op.retain)[0];\n if (key == null) return index;\n this.scroll.updateEmbedAt(index, key, op.retain[key]);\n }\n }\n Object.keys(attributes).forEach((name) => {\n this.scroll.formatAt(index, length, name, attributes[name]);\n });\n const prependedLength = isImplicitNewlinePrepended ? 1 : 0;\n const addedLength = isImplicitNewlineAppended ? 1 : 0;\n scrollLength += prependedLength + addedLength;\n deleteDelta.retain(prependedLength);\n deleteDelta.delete(addedLength);\n return index + length + prependedLength + addedLength;\n }, 0);\n deleteDelta.reduce((index, op) => {\n if (typeof op.delete === 'number') {\n this.scroll.deleteAt(index, op.delete);\n return index;\n }\n return index + Op.length(op);\n }, 0);\n this.scroll.batchEnd();\n this.scroll.optimize();\n return this.update(normalizedDelta);\n }\n\n deleteText(index: number, length: number): Delta {\n this.scroll.deleteAt(index, length);\n return this.update(new Delta().retain(index).delete(length));\n }\n\n formatLine(\n index: number,\n length: number,\n formats: Record = {},\n ): Delta {\n this.scroll.update();\n Object.keys(formats).forEach((format) => {\n this.scroll.lines(index, Math.max(length, 1)).forEach((line) => {\n line.format(format, formats[format]);\n });\n });\n this.scroll.optimize();\n const delta = new Delta().retain(index).retain(length, cloneDeep(formats));\n return this.update(delta);\n }\n\n formatText(\n index: number,\n length: number,\n formats: Record = {},\n ): Delta {\n Object.keys(formats).forEach((format) => {\n this.scroll.formatAt(index, length, format, formats[format]);\n });\n const delta = new Delta().retain(index).retain(length, cloneDeep(formats));\n return this.update(delta);\n }\n\n getContents(index: number, length: number): Delta {\n return this.delta.slice(index, index + length);\n }\n\n getDelta(): Delta {\n return this.scroll.lines().reduce((delta, line) => {\n return delta.concat(line.delta());\n }, new Delta());\n }\n\n getFormat(index: number, length = 0): Record {\n let lines: (Block | BlockEmbed)[] = [];\n let leaves: LeafBlot[] = [];\n if (length === 0) {\n this.scroll.path(index).forEach((path) => {\n const [blot] = path;\n if (blot instanceof Block) {\n lines.push(blot);\n } else if (blot instanceof LeafBlot) {\n leaves.push(blot);\n }\n });\n } else {\n lines = this.scroll.lines(index, length);\n leaves = this.scroll.descendants(LeafBlot, index, length);\n }\n const [lineFormats, leafFormats] = [lines, leaves].map((blots) => {\n const blot = blots.shift();\n if (blot == null) return {};\n let formats = bubbleFormats(blot);\n while (Object.keys(formats).length > 0) {\n const blot = blots.shift();\n if (blot == null) return formats;\n formats = combineFormats(bubbleFormats(blot), formats);\n }\n return formats;\n });\n return { ...lineFormats, ...leafFormats };\n }\n\n getHTML(index: number, length: number): string {\n const [line, lineOffset] = this.scroll.line(index);\n if (line) {\n const lineLength = line.length();\n const isWithinLine = line.length() >= lineOffset + length;\n if (isWithinLine && !(lineOffset === 0 && length === lineLength)) {\n return convertHTML(line, lineOffset, length, true);\n }\n return convertHTML(this.scroll, index, length, true);\n }\n return '';\n }\n\n getText(index: number, length: number): string {\n return this.getContents(index, length)\n .filter((op) => typeof op.insert === 'string')\n .map((op) => op.insert)\n .join('');\n }\n\n insertContents(index: number, contents: Delta): Delta {\n const normalizedDelta = normalizeDelta(contents);\n const change = new Delta().retain(index).concat(normalizedDelta);\n this.scroll.insertContents(index, normalizedDelta);\n return this.update(change);\n }\n\n insertEmbed(index: number, embed: string, value: unknown): Delta {\n this.scroll.insertAt(index, embed, value);\n return this.update(new Delta().retain(index).insert({ [embed]: value }));\n }\n\n insertText(\n index: number,\n text: string,\n formats: Record = {},\n ): Delta {\n text = text.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n this.scroll.insertAt(index, text);\n Object.keys(formats).forEach((format) => {\n this.scroll.formatAt(index, text.length, format, formats[format]);\n });\n return this.update(\n new Delta().retain(index).insert(text, cloneDeep(formats)),\n );\n }\n\n isBlank(): boolean {\n if (this.scroll.children.length === 0) return true;\n if (this.scroll.children.length > 1) return false;\n const blot = this.scroll.children.head;\n if (blot?.statics.blotName !== Block.blotName) return false;\n const block = blot as Block;\n if (block.children.length > 1) return false;\n return block.children.head instanceof Break;\n }\n\n removeFormat(index: number, length: number): Delta {\n const text = this.getText(index, length);\n const [line, offset] = this.scroll.line(index + length);\n let suffixLength = 0;\n let suffix = new Delta();\n if (line != null) {\n suffixLength = line.length() - offset;\n suffix = line\n .delta()\n .slice(offset, offset + suffixLength - 1)\n .insert('\\n');\n }\n const contents = this.getContents(index, length + suffixLength);\n const diff = contents.diff(new Delta().insert(text).concat(suffix));\n const delta = new Delta().retain(index).concat(diff);\n return this.applyDelta(delta);\n }\n\n update(\n change: Delta | null,\n mutations: MutationRecord[] = [],\n selectionInfo: SelectionInfo | undefined = undefined,\n ): Delta {\n const oldDelta = this.delta;\n if (\n mutations.length === 1 &&\n mutations[0].type === 'characterData' &&\n // @ts-expect-error Fix me later\n mutations[0].target.data.match(ASCII) &&\n this.scroll.find(mutations[0].target)\n ) {\n // Optimization for character changes\n const textBlot = this.scroll.find(mutations[0].target) as Blot;\n const formats = bubbleFormats(textBlot);\n const index = textBlot.offset(this.scroll);\n // @ts-expect-error Fix me later\n const oldValue = mutations[0].oldValue.replace(CursorBlot.CONTENTS, '');\n const oldText = new Delta().insert(oldValue);\n // @ts-expect-error\n const newText = new Delta().insert(textBlot.value());\n const relativeSelectionInfo = selectionInfo && {\n oldRange: shiftRange(selectionInfo.oldRange, -index),\n newRange: shiftRange(selectionInfo.newRange, -index),\n };\n const diffDelta = new Delta()\n .retain(index)\n .concat(oldText.diff(newText, relativeSelectionInfo));\n change = diffDelta.reduce((delta, op) => {\n if (op.insert) {\n return delta.insert(op.insert, formats);\n }\n return delta.push(op);\n }, new Delta());\n this.delta = oldDelta.compose(change);\n } else {\n this.delta = this.getDelta();\n if (!change || !isEqual(oldDelta.compose(change), this.delta)) {\n change = oldDelta.diff(this.delta, selectionInfo);\n }\n }\n return change;\n }\n}\n\ninterface ListItem {\n child: Blot;\n offset: number;\n length: number;\n indent: number;\n type: string;\n}\nfunction convertListHTML(\n items: ListItem[],\n lastIndent: number,\n types: string[],\n): string {\n if (items.length === 0) {\n const [endTag] = getListType(types.pop());\n if (lastIndent <= 0) {\n return ``;\n }\n return `${convertListHTML([], lastIndent - 1, types)}`;\n }\n const [{ child, offset, length, indent, type }, ...rest] = items;\n const [tag, attribute] = getListType(type);\n if (indent > lastIndent) {\n types.push(type);\n if (indent === lastIndent + 1) {\n return `<${tag}>${convertHTML(\n child,\n offset,\n length,\n )}${convertListHTML(rest, indent, types)}`;\n }\n return `<${tag}>
  • ${convertListHTML(items, lastIndent + 1, types)}`;\n }\n const previousType = types[types.length - 1];\n if (indent === lastIndent && type === previousType) {\n return `
  • ${convertHTML(\n child,\n offset,\n length,\n )}${convertListHTML(rest, indent, types)}`;\n }\n const [endTag] = getListType(types.pop());\n return `${convertListHTML(items, lastIndent - 1, types)}`;\n}\n\nfunction convertHTML(\n blot: Blot,\n index: number,\n length: number,\n isRoot = false,\n): string {\n if ('html' in blot && typeof blot.html === 'function') {\n return blot.html(index, length);\n }\n if (blot instanceof TextBlot) {\n return escapeText(blot.value().slice(index, index + length));\n }\n if (blot instanceof ParentBlot) {\n // TODO fix API\n if (blot.statics.blotName === 'list-container') {\n const items: any[] = [];\n blot.children.forEachAt(index, length, (child, offset, childLength) => {\n const formats =\n 'formats' in child && typeof child.formats === 'function'\n ? child.formats()\n : {};\n items.push({\n child,\n offset,\n length: childLength,\n indent: formats.indent || 0,\n type: formats.list,\n });\n });\n return convertListHTML(items, -1, []);\n }\n const parts: string[] = [];\n blot.children.forEachAt(index, length, (child, offset, childLength) => {\n parts.push(convertHTML(child, offset, childLength));\n });\n if (isRoot || blot.statics.blotName === 'list') {\n return parts.join('');\n }\n const { outerHTML, innerHTML } = blot.domNode as Element;\n const [start, end] = outerHTML.split(`>${innerHTML}<`);\n // TODO cleanup\n if (start === '${parts.join('')}<${end}`;\n }\n return `${start}>${parts.join('')}<${end}`;\n }\n return blot.domNode instanceof Element ? blot.domNode.outerHTML : '';\n}\n\nfunction combineFormats(\n formats: Record,\n combined: Record,\n): Record {\n return Object.keys(combined).reduce(\n (merged, name) => {\n if (formats[name] == null) return merged;\n const combinedValue = combined[name];\n if (combinedValue === formats[name]) {\n merged[name] = combinedValue;\n } else if (Array.isArray(combinedValue)) {\n if (combinedValue.indexOf(formats[name]) < 0) {\n merged[name] = combinedValue.concat([formats[name]]);\n } else {\n // If style already exists, don't add to an array, but don't lose other styles\n merged[name] = combinedValue;\n }\n } else {\n merged[name] = [combinedValue, formats[name]];\n }\n return merged;\n },\n {} as Record,\n );\n}\n\nfunction getListType(type: string | undefined) {\n const tag = type === 'ordered' ? 'ol' : 'ul';\n switch (type) {\n case 'checked':\n return [tag, ' data-list=\"checked\"'];\n case 'unchecked':\n return [tag, ' data-list=\"unchecked\"'];\n default:\n return [tag, ''];\n }\n}\n\nfunction normalizeDelta(delta: Delta) {\n return delta.reduce((normalizedDelta, op) => {\n if (typeof op.insert === 'string') {\n const text = op.insert.replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n return normalizedDelta.insert(text, op.attributes);\n }\n return normalizedDelta.push(op);\n }, new Delta());\n}\n\nfunction shiftRange({ index, length }: Range, amount: number) {\n return new Range(index + amount, length);\n}\n\nfunction splitOpLines(ops: Op[]) {\n const split: Op[] = [];\n ops.forEach((op) => {\n if (typeof op.insert === 'string') {\n const lines = op.insert.split('\\n');\n lines.forEach((line, index) => {\n if (index) split.push({ insert: '\\n', attributes: op.attributes });\n if (line) split.push({ insert: line, attributes: op.attributes });\n });\n } else {\n split.push(op);\n }\n });\n\n return split;\n}\n\nexport default Editor;\n","import Embed from '../blots/embed.js';\nimport type Scroll from '../blots/scroll.js';\nimport Emitter from './emitter.js';\n\nclass Composition {\n isComposing = false;\n\n constructor(\n private scroll: Scroll,\n private emitter: Emitter,\n ) {\n this.setupListeners();\n }\n\n private setupListeners() {\n this.scroll.domNode.addEventListener('compositionstart', (event) => {\n if (!this.isComposing) {\n this.handleCompositionStart(event);\n }\n });\n\n this.scroll.domNode.addEventListener('compositionend', (event) => {\n if (this.isComposing) {\n // Webkit makes DOM changes after compositionend, so we use microtask to\n // ensure the order.\n // https://bugs.webkit.org/show_bug.cgi?id=31902\n queueMicrotask(() => {\n this.handleCompositionEnd(event);\n });\n }\n });\n }\n\n private handleCompositionStart(event: CompositionEvent) {\n const blot =\n event.target instanceof Node\n ? this.scroll.find(event.target, true)\n : null;\n\n if (blot && !(blot instanceof Embed)) {\n this.emitter.emit(Emitter.events.COMPOSITION_BEFORE_START, event);\n this.scroll.batchStart();\n this.emitter.emit(Emitter.events.COMPOSITION_START, event);\n this.isComposing = true;\n }\n }\n\n private handleCompositionEnd(event: CompositionEvent) {\n this.emitter.emit(Emitter.events.COMPOSITION_BEFORE_END, event);\n this.scroll.batchEnd();\n this.emitter.emit(Emitter.events.COMPOSITION_END, event);\n this.isComposing = false;\n }\n}\n\nexport default Composition;\n","export type Rect = {\n top: number;\n right: number;\n bottom: number;\n left: number;\n};\n\nconst getParentElement = (element: Node): Element | null =>\n element.parentElement || (element.getRootNode() as ShadowRoot).host || null;\n\nconst getElementRect = (element: Element): Rect => {\n const rect = element.getBoundingClientRect();\n const scaleX =\n ('offsetWidth' in element &&\n Math.abs(rect.width) / (element as HTMLElement).offsetWidth) ||\n 1;\n const scaleY =\n ('offsetHeight' in element &&\n Math.abs(rect.height) / (element as HTMLElement).offsetHeight) ||\n 1;\n return {\n top: rect.top,\n right: rect.left + element.clientWidth * scaleX,\n bottom: rect.top + element.clientHeight * scaleY,\n left: rect.left,\n };\n};\n\nconst paddingValueToInt = (value: string) => {\n const number = parseInt(value, 10);\n return Number.isNaN(number) ? 0 : number;\n};\n\n// Follow the steps described in https://www.w3.org/TR/cssom-view-1/#element-scrolling-members,\n// assuming that the scroll option is set to 'nearest'.\nconst getScrollDistance = (\n targetStart: number,\n targetEnd: number,\n scrollStart: number,\n scrollEnd: number,\n scrollPaddingStart: number,\n scrollPaddingEnd: number,\n) => {\n if (targetStart < scrollStart && targetEnd > scrollEnd) {\n return 0;\n }\n\n if (targetStart < scrollStart) {\n return -(scrollStart - targetStart + scrollPaddingStart);\n }\n\n if (targetEnd > scrollEnd) {\n return targetEnd - targetStart > scrollEnd - scrollStart\n ? targetStart + scrollPaddingStart - scrollStart\n : targetEnd - scrollEnd + scrollPaddingEnd;\n }\n return 0;\n};\n\nconst scrollRectIntoView = (root: HTMLElement, targetRect: Rect) => {\n const document = root.ownerDocument;\n\n let rect = targetRect;\n\n let current: Element | null = root;\n while (current) {\n const isDocumentBody: boolean = current === document.body;\n const bounding = isDocumentBody\n ? {\n top: 0,\n right:\n window.visualViewport?.width ??\n document.documentElement.clientWidth,\n bottom:\n window.visualViewport?.height ??\n document.documentElement.clientHeight,\n left: 0,\n }\n : getElementRect(current);\n\n const style = getComputedStyle(current);\n const scrollDistanceX = getScrollDistance(\n rect.left,\n rect.right,\n bounding.left,\n bounding.right,\n paddingValueToInt(style.scrollPaddingLeft),\n paddingValueToInt(style.scrollPaddingRight),\n );\n const scrollDistanceY = getScrollDistance(\n rect.top,\n rect.bottom,\n bounding.top,\n bounding.bottom,\n paddingValueToInt(style.scrollPaddingTop),\n paddingValueToInt(style.scrollPaddingBottom),\n );\n if (scrollDistanceX || scrollDistanceY) {\n if (isDocumentBody) {\n document.defaultView?.scrollBy(scrollDistanceX, scrollDistanceY);\n } else {\n const { scrollLeft, scrollTop } = current;\n if (scrollDistanceY) {\n current.scrollTop += scrollDistanceY;\n }\n if (scrollDistanceX) {\n current.scrollLeft += scrollDistanceX;\n }\n const scrolledLeft = current.scrollLeft - scrollLeft;\n const scrolledTop = current.scrollTop - scrollTop;\n rect = {\n left: rect.left - scrolledLeft,\n top: rect.top - scrolledTop,\n right: rect.right - scrolledLeft,\n bottom: rect.bottom - scrolledTop,\n };\n }\n }\n\n current =\n isDocumentBody || style.position === 'fixed'\n ? null\n : getParentElement(current);\n }\n};\n\nexport default scrollRectIntoView;\n","import { Registry } from 'parchment';\n\nconst MAX_REGISTER_ITERATIONS = 100;\nconst CORE_FORMATS = ['block', 'break', 'cursor', 'inline', 'scroll', 'text'];\n\nconst createRegistryWithFormats = (\n formats: string[],\n sourceRegistry: Registry,\n debug: { error: (errorMessage: string) => void },\n) => {\n const registry = new Registry();\n CORE_FORMATS.forEach((name) => {\n const coreBlot = sourceRegistry.query(name);\n if (coreBlot) registry.register(coreBlot);\n });\n\n formats.forEach((name) => {\n let format = sourceRegistry.query(name);\n if (!format) {\n debug.error(\n `Cannot register \"${name}\" specified in \"formats\" config. Are you sure it was registered?`,\n );\n }\n let iterations = 0;\n while (format) {\n registry.register(format);\n format = 'blotName' in format ? format.requiredContainer ?? null : null;\n\n iterations += 1;\n if (iterations > MAX_REGISTER_ITERATIONS) {\n debug.error(\n `Cycle detected in registering blot requiredContainer: \"${name}\"`,\n );\n break;\n }\n }\n });\n\n return registry;\n};\n\nexport default createRegistryWithFormats;\n","import { merge } from 'lodash-es';\nimport * as Parchment from 'parchment';\nimport type { Op } from 'quill-delta';\nimport Delta from 'quill-delta';\nimport type { BlockEmbed } from '../blots/block.js';\nimport type Block from '../blots/block.js';\nimport type Scroll from '../blots/scroll.js';\nimport type Clipboard from '../modules/clipboard.js';\nimport type History from '../modules/history.js';\nimport type Keyboard from '../modules/keyboard.js';\nimport type Uploader from '../modules/uploader.js';\nimport Editor from './editor.js';\nimport Emitter from './emitter.js';\nimport type { EmitterSource } from './emitter.js';\nimport instances from './instances.js';\nimport logger from './logger.js';\nimport type { DebugLevel } from './logger.js';\nimport Module from './module.js';\nimport Selection, { Range } from './selection.js';\nimport type { Bounds } from './selection.js';\nimport Composition from './composition.js';\nimport Theme from './theme.js';\nimport type { ThemeConstructor } from './theme.js';\nimport scrollRectIntoView from './utils/scrollRectIntoView.js';\nimport type { Rect } from './utils/scrollRectIntoView.js';\nimport createRegistryWithFormats from './utils/createRegistryWithFormats.js';\n\nconst debug = logger('quill');\n\nconst globalRegistry = new Parchment.Registry();\nParchment.ParentBlot.uiClass = 'ql-ui';\n\ninterface Options {\n theme?: string;\n debug?: DebugLevel | boolean;\n registry?: Parchment.Registry;\n readOnly?: boolean;\n placeholder?: string;\n bounds?: HTMLElement | string | null;\n modules?: Record;\n formats?: string[] | null;\n}\n\ninterface ExpandedOptions extends Omit {\n theme: ThemeConstructor;\n registry: Parchment.Registry;\n container: HTMLElement;\n modules: Record;\n bounds?: HTMLElement | null;\n readOnly: boolean;\n}\n\nclass Quill {\n static DEFAULTS = {\n bounds: null,\n modules: {\n clipboard: true,\n keyboard: true,\n history: true,\n uploader: true,\n },\n placeholder: '',\n readOnly: false,\n registry: globalRegistry,\n theme: 'default',\n } as const satisfies Partial;\n static events = Emitter.events;\n static sources = Emitter.sources;\n static version = typeof QUILL_VERSION === 'undefined' ? 'dev' : QUILL_VERSION;\n\n static imports: Record = {\n delta: Delta,\n parchment: Parchment,\n 'core/module': Module,\n 'core/theme': Theme,\n };\n\n static debug(limit: DebugLevel | boolean) {\n if (limit === true) {\n limit = 'log';\n }\n logger.level(limit);\n }\n\n static find(node: Node, bubble = false) {\n return instances.get(node) || globalRegistry.find(node, bubble);\n }\n\n static import(name: 'core/module'): typeof Module;\n static import(name: `themes/${string}`): typeof Theme;\n static import(name: 'parchment'): typeof Parchment;\n static import(name: 'delta'): typeof Delta;\n static import(name: string): unknown;\n static import(name: string) {\n if (this.imports[name] == null) {\n debug.error(`Cannot import ${name}. Are you sure it was registered?`);\n }\n return this.imports[name];\n }\n\n static register(\n path:\n | string\n | Parchment.BlotConstructor\n | Parchment.Attributor\n | Record,\n target?: Parchment.BlotConstructor | Parchment.Attributor | boolean,\n overwrite = false,\n ) {\n if (typeof path !== 'string') {\n const name = 'attrName' in path ? path.attrName : path.blotName;\n if (typeof name === 'string') {\n // register(Blot | Attributor, overwrite)\n // @ts-expect-error\n this.register(`formats/${name}`, path, target);\n } else {\n Object.keys(path).forEach((key) => {\n // @ts-expect-error\n this.register(key, path[key], target);\n });\n }\n } else {\n if (this.imports[path] != null && !overwrite) {\n debug.warn(`Overwriting ${path} with`, target);\n }\n this.imports[path] = target;\n if (\n (path.startsWith('blots/') || path.startsWith('formats/')) &&\n target &&\n typeof target !== 'boolean' &&\n // @ts-expect-error\n target.blotName !== 'abstract'\n ) {\n globalRegistry.register(target);\n }\n // @ts-expect-error\n if (typeof target.register === 'function') {\n // @ts-expect-error\n target.register(globalRegistry);\n }\n }\n }\n\n container: HTMLElement;\n root: HTMLDivElement;\n scroll: Scroll;\n emitter: Emitter;\n allowReadOnlyEdits: boolean;\n editor: Editor;\n composition: Composition;\n selection: Selection;\n\n theme: Theme;\n keyboard: Keyboard;\n clipboard: Clipboard;\n history: History;\n uploader: Uploader;\n\n options: ExpandedOptions;\n\n constructor(container: HTMLElement | string, options: Options = {}) {\n this.options = expandConfig(container, options);\n this.container = this.options.container;\n if (this.container == null) {\n debug.error('Invalid Quill container', container);\n return;\n }\n if (this.options.debug) {\n Quill.debug(this.options.debug);\n }\n const html = this.container.innerHTML.trim();\n this.container.classList.add('ql-container');\n this.container.innerHTML = '';\n instances.set(this.container, this);\n this.root = this.addContainer('ql-editor');\n this.root.classList.add('ql-blank');\n this.emitter = new Emitter();\n const scrollBlotName = Parchment.ScrollBlot.blotName;\n const ScrollBlot = this.options.registry.query(scrollBlotName);\n if (!ScrollBlot || !('blotName' in ScrollBlot)) {\n throw new Error(\n `Cannot initialize Quill without \"${scrollBlotName}\" blot`,\n );\n }\n this.scroll = new ScrollBlot(this.options.registry, this.root, {\n emitter: this.emitter,\n }) as Scroll;\n this.editor = new Editor(this.scroll);\n this.selection = new Selection(this.scroll, this.emitter);\n this.composition = new Composition(this.scroll, this.emitter);\n this.theme = new this.options.theme(this, this.options); // eslint-disable-line new-cap\n this.keyboard = this.theme.addModule('keyboard');\n this.clipboard = this.theme.addModule('clipboard');\n this.history = this.theme.addModule('history');\n this.uploader = this.theme.addModule('uploader');\n this.theme.addModule('input');\n this.theme.addModule('uiNode');\n this.theme.init();\n this.emitter.on(Emitter.events.EDITOR_CHANGE, (type) => {\n if (type === Emitter.events.TEXT_CHANGE) {\n this.root.classList.toggle('ql-blank', this.editor.isBlank());\n }\n });\n this.emitter.on(Emitter.events.SCROLL_UPDATE, (source, mutations) => {\n const oldRange = this.selection.lastRange;\n const [newRange] = this.selection.getRange();\n const selectionInfo =\n oldRange && newRange ? { oldRange, newRange } : undefined;\n modify.call(\n this,\n () => this.editor.update(null, mutations, selectionInfo),\n source,\n );\n });\n this.emitter.on(Emitter.events.SCROLL_EMBED_UPDATE, (blot, delta) => {\n const oldRange = this.selection.lastRange;\n const [newRange] = this.selection.getRange();\n const selectionInfo =\n oldRange && newRange ? { oldRange, newRange } : undefined;\n modify.call(\n this,\n () => {\n const change = new Delta()\n .retain(blot.offset(this))\n .retain({ [blot.statics.blotName]: delta });\n return this.editor.update(change, [], selectionInfo);\n },\n Quill.sources.USER,\n );\n });\n if (html) {\n const contents = this.clipboard.convert({\n html: `${html}


    `,\n text: '\\n',\n });\n this.setContents(contents);\n }\n this.history.clear();\n if (this.options.placeholder) {\n this.root.setAttribute('data-placeholder', this.options.placeholder);\n }\n if (this.options.readOnly) {\n this.disable();\n }\n this.allowReadOnlyEdits = false;\n }\n\n addContainer(container: string, refNode?: Node | null): HTMLDivElement;\n addContainer(container: HTMLElement, refNode?: Node | null): HTMLElement;\n addContainer(\n container: string | HTMLElement,\n refNode: Node | null = null,\n ): HTMLDivElement | HTMLElement {\n if (typeof container === 'string') {\n const className = container;\n container = document.createElement('div');\n container.classList.add(className);\n }\n this.container.insertBefore(container, refNode);\n return container;\n }\n\n blur() {\n this.selection.setRange(null);\n }\n\n deleteText(range: Range, source?: EmitterSource): Delta;\n deleteText(index: number, length: number, source?: EmitterSource): Delta;\n deleteText(\n index: number | Range,\n length?: number | EmitterSource,\n source?: EmitterSource,\n ): Delta {\n // @ts-expect-error\n [index, length, , source] = overload(index, length, source);\n return modify.call(\n this,\n () => {\n return this.editor.deleteText(index, length);\n },\n source,\n index,\n -1 * length,\n );\n }\n\n disable() {\n this.enable(false);\n }\n\n editReadOnly(modifier: () => T): T {\n this.allowReadOnlyEdits = true;\n const value = modifier();\n this.allowReadOnlyEdits = false;\n return value;\n }\n\n enable(enabled = true) {\n this.scroll.enable(enabled);\n this.container.classList.toggle('ql-disabled', !enabled);\n }\n\n focus(options: { preventScroll?: boolean } = {}) {\n this.selection.focus();\n if (!options.preventScroll) {\n this.scrollSelectionIntoView();\n }\n }\n\n format(\n name: string,\n value: unknown,\n source: EmitterSource = Emitter.sources.API,\n ) {\n return modify.call(\n this,\n () => {\n const range = this.getSelection(true);\n let change = new Delta();\n if (range == null) return change;\n if (this.scroll.query(name, Parchment.Scope.BLOCK)) {\n change = this.editor.formatLine(range.index, range.length, {\n [name]: value,\n });\n } else if (range.length === 0) {\n this.selection.format(name, value);\n return change;\n } else {\n change = this.editor.formatText(range.index, range.length, {\n [name]: value,\n });\n }\n this.setSelection(range, Emitter.sources.SILENT);\n return change;\n },\n source,\n );\n }\n\n formatLine(\n index: number,\n length: number,\n formats: Record,\n source?: EmitterSource,\n ): Delta;\n formatLine(\n index: number,\n length: number,\n name: string,\n value?: unknown,\n source?: EmitterSource,\n ): Delta;\n formatLine(\n index: number,\n length: number,\n name: string | Record,\n value?: unknown | EmitterSource,\n source?: EmitterSource,\n ): Delta {\n let formats: Record;\n // eslint-disable-next-line prefer-const\n [index, length, formats, source] = overload(\n index,\n length,\n // @ts-expect-error\n name,\n value,\n source,\n );\n return modify.call(\n this,\n () => {\n return this.editor.formatLine(index, length, formats);\n },\n source,\n index,\n 0,\n );\n }\n\n formatText(\n range: { index: number; length: number },\n name: string,\n value: unknown,\n source?: EmitterSource,\n ): Delta;\n formatText(\n index: number,\n length: number,\n name: string,\n value: unknown,\n source: EmitterSource,\n ): Delta;\n formatText(\n index: number | { index: number; length: number },\n length: number | string,\n name: string | unknown,\n value?: unknown | EmitterSource,\n source?: EmitterSource,\n ): Delta {\n let formats: Record;\n // eslint-disable-next-line prefer-const\n [index, length, formats, source] = overload(\n // @ts-expect-error\n index,\n length,\n name,\n value,\n source,\n );\n return modify.call(\n this,\n () => {\n return this.editor.formatText(index, length, formats);\n },\n source,\n index,\n 0,\n );\n }\n\n getBounds(index: number | Range, length = 0): Bounds | null {\n let bounds: Bounds | null = null;\n if (typeof index === 'number') {\n bounds = this.selection.getBounds(index, length);\n } else {\n bounds = this.selection.getBounds(index.index, index.length);\n }\n if (!bounds) return null;\n const containerBounds = this.container.getBoundingClientRect();\n return {\n bottom: bounds.bottom - containerBounds.top,\n height: bounds.height,\n left: bounds.left - containerBounds.left,\n right: bounds.right - containerBounds.left,\n top: bounds.top - containerBounds.top,\n width: bounds.width,\n };\n }\n\n getContents(index = 0, length = this.getLength() - index) {\n [index, length] = overload(index, length);\n return this.editor.getContents(index, length);\n }\n\n getFormat(index?: number, length?: number): { [format: string]: unknown };\n getFormat(range?: { index: number; length: number }): {\n [format: string]: unknown;\n };\n getFormat(\n index: { index: number; length: number } | number = this.getSelection(true),\n length = 0,\n ): { [format: string]: unknown } {\n if (typeof index === 'number') {\n return this.editor.getFormat(index, length);\n }\n return this.editor.getFormat(index.index, index.length);\n }\n\n getIndex(blot: Parchment.Blot) {\n return blot.offset(this.scroll);\n }\n\n getLength() {\n return this.scroll.length();\n }\n\n getLeaf(index: number) {\n return this.scroll.leaf(index);\n }\n\n getLine(index: number) {\n return this.scroll.line(index);\n }\n\n getLines(range: { index: number; length: number }): (Block | BlockEmbed)[];\n getLines(index?: number, length?: number): (Block | BlockEmbed)[];\n getLines(\n index: { index: number; length: number } | number = 0,\n length = Number.MAX_VALUE,\n ): (Block | BlockEmbed)[] {\n if (typeof index !== 'number') {\n return this.scroll.lines(index.index, index.length);\n }\n return this.scroll.lines(index, length);\n }\n\n getModule(name: string) {\n return this.theme.modules[name];\n }\n\n getSelection(focus: true): Range;\n getSelection(focus?: boolean): Range | null;\n getSelection(focus = false): Range | null {\n if (focus) this.focus();\n this.update(); // Make sure we access getRange with editor in consistent state\n return this.selection.getRange()[0];\n }\n\n getSemanticHTML(range: { index: number; length: number }): string;\n getSemanticHTML(index?: number, length?: number): string;\n getSemanticHTML(\n index: { index: number; length: number } | number = 0,\n length?: number,\n ) {\n if (typeof index === 'number') {\n length = length ?? this.getLength() - index;\n }\n // @ts-expect-error\n [index, length] = overload(index, length);\n return this.editor.getHTML(index, length);\n }\n\n getText(range?: { index: number; length: number }): string;\n getText(index?: number, length?: number): string;\n getText(\n index: { index: number; length: number } | number = 0,\n length?: number,\n ): string {\n if (typeof index === 'number') {\n length = length ?? this.getLength() - index;\n }\n // @ts-expect-error\n [index, length] = overload(index, length);\n return this.editor.getText(index, length);\n }\n\n hasFocus() {\n return this.selection.hasFocus();\n }\n\n insertEmbed(\n index: number,\n embed: string,\n value: unknown,\n source: EmitterSource = Quill.sources.API,\n ) {\n return modify.call(\n this,\n () => {\n return this.editor.insertEmbed(index, embed, value);\n },\n source,\n index,\n );\n }\n\n insertText(index: number, text: string, source: EmitterSource): Delta;\n insertText(\n index: number,\n text: string,\n formats: Record,\n source: EmitterSource,\n ): Delta;\n insertText(\n index: number,\n text: string,\n name: string,\n value: unknown,\n source: EmitterSource,\n ): Delta;\n insertText(\n index: number,\n text: string,\n name: string | Record | EmitterSource,\n value?: unknown,\n source?: EmitterSource,\n ): Delta {\n let formats: Record;\n // eslint-disable-next-line prefer-const\n // @ts-expect-error\n [index, , formats, source] = overload(index, 0, name, value, source);\n return modify.call(\n this,\n () => {\n return this.editor.insertText(index, text, formats);\n },\n source,\n index,\n text.length,\n );\n }\n\n isEnabled() {\n return this.scroll.isEnabled();\n }\n\n off(...args: Parameters<(typeof Emitter)['prototype']['off']>) {\n return this.emitter.off(...args);\n }\n\n on(\n event: (typeof Emitter)['events']['TEXT_CHANGE'],\n handler: (delta: Delta, oldContent: Delta, source: EmitterSource) => void,\n ): Emitter;\n on(\n event: (typeof Emitter)['events']['SELECTION_CHANGE'],\n handler: (range: Range, oldRange: Range, source: EmitterSource) => void,\n ): Emitter;\n on(\n event: (typeof Emitter)['events']['EDITOR_CHANGE'],\n handler: (\n ...args:\n | [\n (typeof Emitter)['events']['TEXT_CHANGE'],\n Delta,\n Delta,\n EmitterSource,\n ]\n | [\n (typeof Emitter)['events']['SELECTION_CHANGE'],\n Range,\n Range,\n EmitterSource,\n ]\n ) => void,\n ): Emitter;\n on(event: string, ...args: unknown[]): Emitter;\n on(...args: Parameters<(typeof Emitter)['prototype']['on']>): Emitter {\n return this.emitter.on(...args);\n }\n\n once(...args: Parameters<(typeof Emitter)['prototype']['once']>) {\n return this.emitter.once(...args);\n }\n\n removeFormat(...args: Parameters) {\n const [index, length, , source] = overload(...args);\n return modify.call(\n this,\n () => {\n return this.editor.removeFormat(index, length);\n },\n source,\n index,\n );\n }\n\n scrollRectIntoView(rect: Rect) {\n scrollRectIntoView(this.root, rect);\n }\n\n /**\n * @deprecated Use Quill#scrollSelectionIntoView() instead.\n */\n scrollIntoView() {\n console.warn(\n 'Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead.',\n );\n this.scrollSelectionIntoView();\n }\n\n /**\n * Scroll the current selection into the visible area.\n * If the selection is already visible, no scrolling will occur.\n */\n scrollSelectionIntoView() {\n const range = this.selection.lastRange;\n const bounds = range && this.selection.getBounds(range.index, range.length);\n if (bounds) {\n this.scrollRectIntoView(bounds);\n }\n }\n\n setContents(\n delta: Delta | Op[],\n source: EmitterSource = Emitter.sources.API,\n ) {\n return modify.call(\n this,\n () => {\n delta = new Delta(delta);\n const length = this.getLength();\n // Quill will set empty editor to \\n\n const delete1 = this.editor.deleteText(0, length);\n const applied = this.editor.insertContents(0, delta);\n // Remove extra \\n from empty editor initialization\n const delete2 = this.editor.deleteText(this.getLength() - 1, 1);\n return delete1.compose(applied).compose(delete2);\n },\n source,\n );\n }\n setSelection(range: Range | null, source?: EmitterSource): void;\n setSelection(index: number, source?: EmitterSource): void;\n setSelection(index: number, length?: number, source?: EmitterSource): void;\n setSelection(index: number, source?: EmitterSource): void;\n setSelection(\n index: Range | null | number,\n length?: EmitterSource | number,\n source?: EmitterSource,\n ): void {\n if (index == null) {\n // @ts-expect-error https://github.com/microsoft/TypeScript/issues/22609\n this.selection.setRange(null, length || Quill.sources.API);\n } else {\n // @ts-expect-error\n [index, length, , source] = overload(index, length, source);\n this.selection.setRange(new Range(Math.max(0, index), length), source);\n if (source !== Emitter.sources.SILENT) {\n this.scrollSelectionIntoView();\n }\n }\n }\n\n setText(text: string, source: EmitterSource = Emitter.sources.API) {\n const delta = new Delta().insert(text);\n return this.setContents(delta, source);\n }\n\n update(source: EmitterSource = Emitter.sources.USER) {\n const change = this.scroll.update(source); // Will update selection before selection.update() does if text changes\n this.selection.update(source);\n // TODO this is usually undefined\n return change;\n }\n\n updateContents(\n delta: Delta | Op[],\n source: EmitterSource = Emitter.sources.API,\n ) {\n return modify.call(\n this,\n () => {\n delta = new Delta(delta);\n return this.editor.applyDelta(delta);\n },\n source,\n true,\n );\n }\n}\n\nfunction resolveSelector(selector: string | HTMLElement | null | undefined) {\n return typeof selector === 'string'\n ? document.querySelector(selector)\n : selector;\n}\n\nfunction expandModuleConfig(config: Record | undefined) {\n return Object.entries(config ?? {}).reduce(\n (expanded, [key, value]) => ({\n ...expanded,\n [key]: value === true ? {} : value,\n }),\n {},\n );\n}\n\nfunction expandConfig(\n containerOrSelector: HTMLElement | string,\n options: Options,\n): ExpandedOptions {\n const container = resolveSelector(containerOrSelector);\n if (!container) {\n throw new Error('Invalid Quill container');\n }\n\n const shouldUseDefaultTheme =\n !options.theme || options.theme === Quill.DEFAULTS.theme;\n const theme = shouldUseDefaultTheme\n ? Theme\n : Quill.import(`themes/${options.theme}`);\n if (!theme) {\n throw new Error(`Invalid theme ${options.theme}. Did you register it?`);\n }\n\n const { modules: quillModuleDefaults, ...quillDefaults } = Quill.DEFAULTS;\n const { modules: themeModuleDefaults, ...themeDefaults } = theme.DEFAULTS;\n\n const modules: ExpandedOptions['modules'] = merge(\n {},\n expandModuleConfig(quillModuleDefaults),\n expandModuleConfig(themeModuleDefaults),\n expandModuleConfig(options.modules),\n );\n // Special case toolbar shorthand\n if (\n modules != null &&\n modules.toolbar &&\n modules.toolbar.constructor !== Object\n ) {\n modules.toolbar = {\n container: modules.toolbar,\n };\n }\n\n const config = { ...quillDefaults, ...themeDefaults, ...options };\n\n let registry = options.registry;\n if (registry) {\n if (options.formats) {\n debug.warn('Ignoring \"formats\" option because \"registry\" is specified');\n }\n } else {\n registry = options.formats\n ? createRegistryWithFormats(options.formats, config.registry, debug)\n : config.registry;\n }\n\n return {\n ...config,\n registry,\n container,\n theme,\n modules: Object.entries(modules).reduce(\n (modulesWithDefaults, [name, value]) => {\n if (!value) return modulesWithDefaults;\n\n const moduleClass = Quill.import(`modules/${name}`);\n if (moduleClass == null) {\n debug.error(\n `Cannot load ${name} module. Are you sure you registered it?`,\n );\n return modulesWithDefaults;\n }\n return {\n ...modulesWithDefaults,\n // @ts-expect-error\n [name]: merge({}, moduleClass.DEFAULTS || {}, value),\n };\n },\n {},\n ),\n bounds: resolveSelector(config.bounds),\n };\n}\n\n// Handle selection preservation and TEXT_CHANGE emission\n// common to modification APIs\nfunction modify(\n modifier: () => Delta,\n source: EmitterSource,\n index: number | boolean,\n shift: number | null,\n) {\n if (\n !this.isEnabled() &&\n source === Emitter.sources.USER &&\n !this.allowReadOnlyEdits\n ) {\n return new Delta();\n }\n let range = index == null ? null : this.getSelection();\n const oldDelta = this.editor.delta;\n const change = modifier();\n if (range != null) {\n if (index === true) {\n index = range.index; // eslint-disable-line prefer-destructuring\n }\n if (shift == null) {\n range = shiftRange(range, change, source);\n } else if (shift !== 0) {\n // @ts-expect-error index should always be number\n range = shiftRange(range, index, shift, source);\n }\n this.setSelection(range, Emitter.sources.SILENT);\n }\n if (change.length() > 0) {\n const args = [Emitter.events.TEXT_CHANGE, change, oldDelta, source];\n this.emitter.emit(Emitter.events.EDITOR_CHANGE, ...args);\n if (source !== Emitter.sources.SILENT) {\n this.emitter.emit(...args);\n }\n }\n return change;\n}\n\ntype NormalizedIndexLength = [\n number,\n number,\n Record,\n EmitterSource,\n];\nfunction overload(index: number, source?: EmitterSource): NormalizedIndexLength;\nfunction overload(\n index: number,\n length: number,\n source?: EmitterSource,\n): NormalizedIndexLength;\nfunction overload(\n index: number,\n length: number,\n format: string,\n value: unknown,\n source?: EmitterSource,\n): NormalizedIndexLength;\nfunction overload(\n index: number,\n length: number,\n format: Record,\n source?: EmitterSource,\n): NormalizedIndexLength;\nfunction overload(range: Range, source?: EmitterSource): NormalizedIndexLength;\nfunction overload(\n range: Range,\n format: string,\n value: unknown,\n source?: EmitterSource,\n): NormalizedIndexLength;\nfunction overload(\n range: Range,\n format: Record,\n source?: EmitterSource,\n): NormalizedIndexLength;\nfunction overload(\n index: Range | number,\n length?: number | string | Record | EmitterSource,\n name?: string | unknown | Record | EmitterSource,\n value?: unknown | EmitterSource,\n source?: EmitterSource,\n): NormalizedIndexLength {\n let formats: Record = {};\n // @ts-expect-error\n if (typeof index.index === 'number' && typeof index.length === 'number') {\n // Allow for throwaway end (used by insertText/insertEmbed)\n if (typeof length !== 'number') {\n // @ts-expect-error\n source = value;\n value = name;\n name = length;\n // @ts-expect-error\n length = index.length; // eslint-disable-line prefer-destructuring\n // @ts-expect-error\n index = index.index; // eslint-disable-line prefer-destructuring\n } else {\n // @ts-expect-error\n length = index.length; // eslint-disable-line prefer-destructuring\n // @ts-expect-error\n index = index.index; // eslint-disable-line prefer-destructuring\n }\n } else if (typeof length !== 'number') {\n // @ts-expect-error\n source = value;\n value = name;\n name = length;\n length = 0;\n }\n // Handle format being object, two format name/value strings or excluded\n if (typeof name === 'object') {\n // @ts-expect-error Fix me later\n formats = name;\n // @ts-expect-error\n source = value;\n } else if (typeof name === 'string') {\n if (value != null) {\n formats[name] = value;\n } else {\n // @ts-expect-error\n source = name;\n }\n }\n // Handle optional source\n source = source || Emitter.sources.API;\n // @ts-expect-error\n return [index, length, formats, source];\n}\n\nfunction shiftRange(range: Range, change: Delta, source?: EmitterSource): Range;\nfunction shiftRange(\n range: Range,\n index: number,\n length?: number,\n source?: EmitterSource,\n): Range;\nfunction shiftRange(\n range: Range,\n index: number | Delta,\n lengthOrSource?: number | EmitterSource,\n source?: EmitterSource,\n) {\n const length = typeof lengthOrSource === 'number' ? lengthOrSource : 0;\n if (range == null) return null;\n let start;\n let end;\n // @ts-expect-error -- TODO: add a better type guard around `index`\n if (index && typeof index.transformPosition === 'function') {\n [start, end] = [range.index, range.index + range.length].map((pos) =>\n // @ts-expect-error -- TODO: add a better type guard around `index`\n index.transformPosition(pos, source !== Emitter.sources.USER),\n );\n } else {\n [start, end] = [range.index, range.index + range.length].map((pos) => {\n // @ts-expect-error -- TODO: add a better type guard around `index`\n if (pos < index || (pos === index && source === Emitter.sources.USER))\n return pos;\n if (length >= 0) {\n return pos + length;\n }\n // @ts-expect-error -- TODO: add a better type guard around `index`\n return Math.max(index, pos + length);\n });\n }\n return new Range(start, end - start);\n}\n\nexport { globalRegistry, expandConfig, overload, Quill as default };\n","import { LeafBlot, Scope } from 'parchment';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport Emitter from './emitter.js';\nimport type { EmitterSource } from './emitter.js';\nimport logger from './logger.js';\nimport type Cursor from '../blots/cursor.js';\nimport type Scroll from '../blots/scroll.js';\n\nconst debug = logger('quill:selection');\n\ntype NativeRange = AbstractRange;\n\ninterface NormalizedRange {\n start: {\n node: NativeRange['startContainer'];\n offset: NativeRange['startOffset'];\n };\n end: { node: NativeRange['endContainer']; offset: NativeRange['endOffset'] };\n native: NativeRange;\n}\n\nexport interface Bounds {\n bottom: number;\n height: number;\n left: number;\n right: number;\n top: number;\n width: number;\n}\n\nclass Range {\n constructor(\n public index: number,\n public length = 0,\n ) {}\n}\n\nclass Selection {\n scroll: Scroll;\n emitter: Emitter;\n composing: boolean;\n mouseDown: boolean;\n\n root: HTMLElement;\n cursor: Cursor;\n savedRange: Range;\n lastRange: Range | null;\n lastNative: NormalizedRange | null;\n\n constructor(scroll: Scroll, emitter: Emitter) {\n this.emitter = emitter;\n this.scroll = scroll;\n this.composing = false;\n this.mouseDown = false;\n this.root = this.scroll.domNode;\n // @ts-expect-error\n this.cursor = this.scroll.create('cursor', this);\n // savedRange is last non-null range\n this.savedRange = new Range(0, 0);\n this.lastRange = this.savedRange;\n this.lastNative = null;\n this.handleComposition();\n this.handleDragging();\n this.emitter.listenDOM('selectionchange', document, () => {\n if (!this.mouseDown && !this.composing) {\n setTimeout(this.update.bind(this, Emitter.sources.USER), 1);\n }\n });\n this.emitter.on(Emitter.events.SCROLL_BEFORE_UPDATE, () => {\n if (!this.hasFocus()) return;\n const native = this.getNativeRange();\n if (native == null) return;\n if (native.start.node === this.cursor.textNode) return; // cursor.restore() will handle\n this.emitter.once(\n Emitter.events.SCROLL_UPDATE,\n (source, mutations: MutationRecord[]) => {\n try {\n if (\n this.root.contains(native.start.node) &&\n this.root.contains(native.end.node)\n ) {\n this.setNativeRange(\n native.start.node,\n native.start.offset,\n native.end.node,\n native.end.offset,\n );\n }\n const triggeredByTyping = mutations.some(\n (mutation) =>\n mutation.type === 'characterData' ||\n mutation.type === 'childList' ||\n (mutation.type === 'attributes' &&\n mutation.target === this.root),\n );\n this.update(triggeredByTyping ? Emitter.sources.SILENT : source);\n } catch (ignored) {\n // ignore\n }\n },\n );\n });\n this.emitter.on(Emitter.events.SCROLL_OPTIMIZE, (mutations, context) => {\n if (context.range) {\n const { startNode, startOffset, endNode, endOffset } = context.range;\n this.setNativeRange(startNode, startOffset, endNode, endOffset);\n this.update(Emitter.sources.SILENT);\n }\n });\n this.update(Emitter.sources.SILENT);\n }\n\n handleComposition() {\n this.emitter.on(Emitter.events.COMPOSITION_BEFORE_START, () => {\n this.composing = true;\n });\n this.emitter.on(Emitter.events.COMPOSITION_END, () => {\n this.composing = false;\n if (this.cursor.parent) {\n const range = this.cursor.restore();\n if (!range) return;\n setTimeout(() => {\n this.setNativeRange(\n range.startNode,\n range.startOffset,\n range.endNode,\n range.endOffset,\n );\n }, 1);\n }\n });\n }\n\n handleDragging() {\n this.emitter.listenDOM('mousedown', document.body, () => {\n this.mouseDown = true;\n });\n this.emitter.listenDOM('mouseup', document.body, () => {\n this.mouseDown = false;\n this.update(Emitter.sources.USER);\n });\n }\n\n focus() {\n if (this.hasFocus()) return;\n this.root.focus({ preventScroll: true });\n this.setRange(this.savedRange);\n }\n\n format(format: string, value: unknown) {\n this.scroll.update();\n const nativeRange = this.getNativeRange();\n if (\n nativeRange == null ||\n !nativeRange.native.collapsed ||\n this.scroll.query(format, Scope.BLOCK)\n )\n return;\n if (nativeRange.start.node !== this.cursor.textNode) {\n const blot = this.scroll.find(nativeRange.start.node, false);\n if (blot == null) return;\n // TODO Give blot ability to not split\n if (blot instanceof LeafBlot) {\n const after = blot.split(nativeRange.start.offset);\n // @ts-expect-error Fix me later\n blot.parent.insertBefore(this.cursor, after);\n } else {\n // @ts-expect-error TODO: nativeRange.start.node doesn't seem to match function signature\n blot.insertBefore(this.cursor, nativeRange.start.node); // Should never happen\n }\n this.cursor.attach();\n }\n this.cursor.format(format, value);\n this.scroll.optimize();\n this.setNativeRange(this.cursor.textNode, this.cursor.textNode.data.length);\n this.update();\n }\n\n getBounds(index: number, length = 0) {\n const scrollLength = this.scroll.length();\n index = Math.min(index, scrollLength - 1);\n length = Math.min(index + length, scrollLength - 1) - index;\n let node: Node;\n let [leaf, offset] = this.scroll.leaf(index);\n if (leaf == null) return null;\n if (length > 0 && offset === leaf.length()) {\n const [next] = this.scroll.leaf(index + 1);\n if (next) {\n const [line] = this.scroll.line(index);\n const [nextLine] = this.scroll.line(index + 1);\n if (line === nextLine) {\n leaf = next;\n offset = 0;\n }\n }\n }\n [node, offset] = leaf.position(offset, true);\n const range = document.createRange();\n if (length > 0) {\n range.setStart(node, offset);\n [leaf, offset] = this.scroll.leaf(index + length);\n if (leaf == null) return null;\n [node, offset] = leaf.position(offset, true);\n range.setEnd(node, offset);\n return range.getBoundingClientRect();\n }\n let side: 'left' | 'right' = 'left';\n let rect: DOMRect;\n if (node instanceof Text) {\n // Return null if the text node is empty because it is\n // not able to get a useful client rect:\n // https://github.com/w3c/csswg-drafts/issues/2514.\n // Empty text nodes are most likely caused by TextBlot#optimize()\n // not getting called when editor content changes.\n if (!node.data.length) {\n return null;\n }\n if (offset < node.data.length) {\n range.setStart(node, offset);\n range.setEnd(node, offset + 1);\n } else {\n range.setStart(node, offset - 1);\n range.setEnd(node, offset);\n side = 'right';\n }\n rect = range.getBoundingClientRect();\n } else {\n if (!(leaf.domNode instanceof Element)) return null;\n rect = leaf.domNode.getBoundingClientRect();\n if (offset > 0) side = 'right';\n }\n return {\n bottom: rect.top + rect.height,\n height: rect.height,\n left: rect[side],\n right: rect[side],\n top: rect.top,\n width: 0,\n };\n }\n\n getNativeRange(): NormalizedRange | null {\n const selection = document.getSelection();\n if (selection == null || selection.rangeCount <= 0) return null;\n const nativeRange = selection.getRangeAt(0);\n if (nativeRange == null) return null;\n const range = this.normalizeNative(nativeRange);\n debug.info('getNativeRange', range);\n return range;\n }\n\n getRange(): [Range, NormalizedRange] | [null, null] {\n const root = this.scroll.domNode;\n if ('isConnected' in root && !root.isConnected) {\n // document.getSelection() forces layout on Blink, so we trend to\n // not calling it.\n return [null, null];\n }\n const normalized = this.getNativeRange();\n if (normalized == null) return [null, null];\n const range = this.normalizedToRange(normalized);\n return [range, normalized];\n }\n\n hasFocus(): boolean {\n return (\n document.activeElement === this.root ||\n (document.activeElement != null &&\n contains(this.root, document.activeElement))\n );\n }\n\n normalizedToRange(range: NormalizedRange) {\n const positions: [Node, number][] = [\n [range.start.node, range.start.offset],\n ];\n if (!range.native.collapsed) {\n positions.push([range.end.node, range.end.offset]);\n }\n const indexes = positions.map((position) => {\n const [node, offset] = position;\n const blot = this.scroll.find(node, true);\n // @ts-expect-error Fix me later\n const index = blot.offset(this.scroll);\n if (offset === 0) {\n return index;\n }\n if (blot instanceof LeafBlot) {\n return index + blot.index(node, offset);\n }\n // @ts-expect-error Fix me later\n return index + blot.length();\n });\n const end = Math.min(Math.max(...indexes), this.scroll.length() - 1);\n const start = Math.min(end, ...indexes);\n return new Range(start, end - start);\n }\n\n normalizeNative(nativeRange: NativeRange) {\n if (\n !contains(this.root, nativeRange.startContainer) ||\n (!nativeRange.collapsed && !contains(this.root, nativeRange.endContainer))\n ) {\n return null;\n }\n const range = {\n start: {\n node: nativeRange.startContainer,\n offset: nativeRange.startOffset,\n },\n end: { node: nativeRange.endContainer, offset: nativeRange.endOffset },\n native: nativeRange,\n };\n [range.start, range.end].forEach((position) => {\n let { node, offset } = position;\n while (!(node instanceof Text) && node.childNodes.length > 0) {\n if (node.childNodes.length > offset) {\n node = node.childNodes[offset];\n offset = 0;\n } else if (node.childNodes.length === offset) {\n // @ts-expect-error Fix me later\n node = node.lastChild;\n if (node instanceof Text) {\n offset = node.data.length;\n } else if (node.childNodes.length > 0) {\n // Container case\n offset = node.childNodes.length;\n } else {\n // Embed case\n offset = node.childNodes.length + 1;\n }\n } else {\n break;\n }\n }\n position.node = node;\n position.offset = offset;\n });\n return range;\n }\n\n rangeToNative(range: Range): [Node | null, number, Node | null, number] {\n const scrollLength = this.scroll.length();\n\n const getPosition = (\n index: number,\n inclusive: boolean,\n ): [Node | null, number] => {\n index = Math.min(scrollLength - 1, index);\n const [leaf, leafOffset] = this.scroll.leaf(index);\n return leaf ? leaf.position(leafOffset, inclusive) : [null, -1];\n };\n return [\n ...getPosition(range.index, false),\n ...getPosition(range.index + range.length, true),\n ];\n }\n\n setNativeRange(\n startNode: Node | null,\n startOffset?: number,\n endNode = startNode,\n endOffset = startOffset,\n force = false,\n ) {\n debug.info('setNativeRange', startNode, startOffset, endNode, endOffset);\n if (\n startNode != null &&\n (this.root.parentNode == null ||\n startNode.parentNode == null ||\n // @ts-expect-error Fix me later\n endNode.parentNode == null)\n ) {\n return;\n }\n const selection = document.getSelection();\n if (selection == null) return;\n if (startNode != null) {\n if (!this.hasFocus()) this.root.focus({ preventScroll: true });\n const { native } = this.getNativeRange() || {};\n if (\n native == null ||\n force ||\n startNode !== native.startContainer ||\n startOffset !== native.startOffset ||\n endNode !== native.endContainer ||\n endOffset !== native.endOffset\n ) {\n if (startNode instanceof Element && startNode.tagName === 'BR') {\n // @ts-expect-error Fix me later\n startOffset = Array.from(startNode.parentNode.childNodes).indexOf(\n startNode,\n );\n startNode = startNode.parentNode;\n }\n if (endNode instanceof Element && endNode.tagName === 'BR') {\n // @ts-expect-error Fix me later\n endOffset = Array.from(endNode.parentNode.childNodes).indexOf(\n endNode,\n );\n endNode = endNode.parentNode;\n }\n const range = document.createRange();\n // @ts-expect-error Fix me later\n range.setStart(startNode, startOffset);\n // @ts-expect-error Fix me later\n range.setEnd(endNode, endOffset);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n } else {\n selection.removeAllRanges();\n this.root.blur();\n }\n }\n\n setRange(range: Range | null, force: boolean, source?: EmitterSource): void;\n setRange(range: Range | null, source?: EmitterSource): void;\n setRange(\n range: Range | null,\n force: boolean | EmitterSource = false,\n source: EmitterSource = Emitter.sources.API,\n ): void {\n if (typeof force === 'string') {\n source = force;\n force = false;\n }\n debug.info('setRange', range);\n if (range != null) {\n const args = this.rangeToNative(range);\n this.setNativeRange(...args, force);\n } else {\n this.setNativeRange(null);\n }\n this.update(source);\n }\n\n update(source: EmitterSource = Emitter.sources.USER) {\n const oldRange = this.lastRange;\n const [lastRange, nativeRange] = this.getRange();\n this.lastRange = lastRange;\n this.lastNative = nativeRange;\n if (this.lastRange != null) {\n this.savedRange = this.lastRange;\n }\n if (!isEqual(oldRange, this.lastRange)) {\n if (\n !this.composing &&\n nativeRange != null &&\n nativeRange.native.collapsed &&\n nativeRange.start.node !== this.cursor.textNode\n ) {\n const range = this.cursor.restore();\n if (range) {\n this.setNativeRange(\n range.startNode,\n range.startOffset,\n range.endNode,\n range.endOffset,\n );\n }\n }\n const args = [\n Emitter.events.SELECTION_CHANGE,\n cloneDeep(this.lastRange),\n cloneDeep(oldRange),\n source,\n ];\n this.emitter.emit(Emitter.events.EDITOR_CHANGE, ...args);\n if (source !== Emitter.sources.SILENT) {\n this.emitter.emit(...args);\n }\n }\n }\n}\n\nfunction contains(parent: Node, descendant: Node) {\n try {\n // Firefox inserts inaccessible nodes around video elements\n descendant.parentNode; // eslint-disable-line @typescript-eslint/no-unused-expressions\n } catch (e) {\n return false;\n }\n return parent.contains(descendant);\n}\n\nexport { Range, Selection as default };\n","import type Quill from '../core.js';\nimport type Clipboard from '../modules/clipboard.js';\nimport type History from '../modules/history.js';\nimport type Keyboard from '../modules/keyboard.js';\nimport type { ToolbarProps } from '../modules/toolbar.js';\nimport type Uploader from '../modules/uploader.js';\n\nexport interface ThemeOptions {\n modules: Record & {\n toolbar?: null | ToolbarProps;\n };\n}\n\nclass Theme {\n static DEFAULTS: ThemeOptions = {\n modules: {},\n };\n\n static themes = {\n default: Theme,\n };\n\n modules: ThemeOptions['modules'] = {};\n\n constructor(\n protected quill: Quill,\n protected options: ThemeOptions,\n ) {}\n\n init() {\n Object.keys(this.options.modules).forEach((name) => {\n if (this.modules[name] == null) {\n this.addModule(name);\n }\n });\n }\n\n addModule(name: 'clipboard'): Clipboard;\n addModule(name: 'keyboard'): Keyboard;\n addModule(name: 'uploader'): Uploader;\n addModule(name: 'history'): History;\n addModule(name: string): unknown;\n addModule(name: string) {\n // @ts-expect-error\n const ModuleClass = this.quill.constructor.import(`modules/${name}`);\n this.modules[name] = new ModuleClass(\n this.quill,\n this.options.modules[name] || {},\n );\n return this.modules[name];\n }\n}\n\nexport interface ThemeConstructor {\n new (quill: Quill, options: unknown): Theme;\n DEFAULTS: ThemeOptions;\n}\n\nexport default Theme;\n","import { Attributor, ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst config = {\n scope: Scope.BLOCK,\n whitelist: ['right', 'center', 'justify'],\n};\n\nconst AlignAttribute = new Attributor('align', 'align', config);\nconst AlignClass = new ClassAttributor('align', 'ql-align', config);\nconst AlignStyle = new StyleAttributor('align', 'text-align', config);\n\nexport { AlignAttribute, AlignClass, AlignStyle };\n","import { ClassAttributor, Scope } from 'parchment';\nimport { ColorAttributor } from './color.js';\n\nconst BackgroundClass = new ClassAttributor('background', 'ql-bg', {\n scope: Scope.INLINE,\n});\nconst BackgroundStyle = new ColorAttributor('background', 'background-color', {\n scope: Scope.INLINE,\n});\n\nexport { BackgroundClass, BackgroundStyle };\n","import Block from '../blots/block.js';\nimport Break from '../blots/break.js';\nimport Cursor from '../blots/cursor.js';\nimport Inline from '../blots/inline.js';\nimport TextBlot, { escapeText } from '../blots/text.js';\nimport Container from '../blots/container.js';\nimport Quill from '../core/quill.js';\n\nclass CodeBlockContainer extends Container {\n static create(value: string) {\n const domNode = super.create(value) as Element;\n domNode.setAttribute('spellcheck', 'false');\n return domNode;\n }\n\n code(index: number, length: number) {\n return (\n this.children\n // @ts-expect-error\n .map((child) => (child.length() <= 1 ? '' : child.domNode.innerText))\n .join('\\n')\n .slice(index, index + length)\n );\n }\n\n html(index: number, length: number) {\n // `\\n`s are needed in order to support empty lines at the beginning and the end.\n // https://html.spec.whatwg.org/multipage/syntax.html#element-restrictions\n return `
    \\n${escapeText(this.code(index, length))}\\n
    `;\n }\n}\n\nclass CodeBlock extends Block {\n static TAB = ' ';\n\n static register() {\n Quill.register(CodeBlockContainer);\n }\n}\n\nclass Code extends Inline {}\nCode.blotName = 'code';\nCode.tagName = 'CODE';\n\nCodeBlock.blotName = 'code-block';\nCodeBlock.className = 'ql-code-block';\nCodeBlock.tagName = 'DIV';\nCodeBlockContainer.blotName = 'code-block-container';\nCodeBlockContainer.className = 'ql-code-block-container';\nCodeBlockContainer.tagName = 'DIV';\n\nCodeBlockContainer.allowedChildren = [CodeBlock];\n\nCodeBlock.allowedChildren = [TextBlot, Break, Cursor];\nCodeBlock.requiredContainer = CodeBlockContainer;\n\nexport { Code, CodeBlockContainer, CodeBlock as default };\n","import { ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nclass ColorAttributor extends StyleAttributor {\n value(domNode: HTMLElement) {\n let value = super.value(domNode) as string;\n if (!value.startsWith('rgb(')) return value;\n value = value.replace(/^[^\\d]+/, '').replace(/[^\\d]+$/, '');\n const hex = value\n .split(',')\n .map((component) => `00${parseInt(component, 10).toString(16)}`.slice(-2))\n .join('');\n return `#${hex}`;\n }\n}\n\nconst ColorClass = new ClassAttributor('color', 'ql-color', {\n scope: Scope.INLINE,\n});\nconst ColorStyle = new ColorAttributor('color', 'color', {\n scope: Scope.INLINE,\n});\n\nexport { ColorAttributor, ColorClass, ColorStyle };\n","import { Attributor, ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst config = {\n scope: Scope.BLOCK,\n whitelist: ['rtl'],\n};\n\nconst DirectionAttribute = new Attributor('direction', 'dir', config);\nconst DirectionClass = new ClassAttributor('direction', 'ql-direction', config);\nconst DirectionStyle = new StyleAttributor('direction', 'direction', config);\n\nexport { DirectionAttribute, DirectionClass, DirectionStyle };\n","import { ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst config = {\n scope: Scope.INLINE,\n whitelist: ['serif', 'monospace'],\n};\n\nconst FontClass = new ClassAttributor('font', 'ql-font', config);\n\nclass FontStyleAttributor extends StyleAttributor {\n value(node: HTMLElement) {\n return super.value(node).replace(/[\"']/g, '');\n }\n}\n\nconst FontStyle = new FontStyleAttributor('font', 'font-family', config);\n\nexport { FontStyle, FontClass };\n","import { ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst SizeClass = new ClassAttributor('size', 'ql-size', {\n scope: Scope.INLINE,\n whitelist: ['small', 'large', 'huge'],\n});\nconst SizeStyle = new StyleAttributor('size', 'font-size', {\n scope: Scope.INLINE,\n whitelist: ['10px', '18px', '32px'],\n});\n\nexport { SizeClass, SizeStyle };\n","const normalWeightRegexp = /font-weight:\\s*normal/;\nconst blockTagNames = ['P', 'OL', 'UL'];\n\nconst isBlockElement = (element: Element | null) => {\n return element && blockTagNames.includes(element.tagName);\n};\n\nconst normalizeEmptyLines = (doc: Document) => {\n Array.from(doc.querySelectorAll('br'))\n .filter(\n (br) =>\n isBlockElement(br.previousElementSibling) &&\n isBlockElement(br.nextElementSibling),\n )\n .forEach((br) => {\n br.parentNode?.removeChild(br);\n });\n};\n\nconst normalizeFontWeight = (doc: Document) => {\n Array.from(doc.querySelectorAll('b[style*=\"font-weight\"]'))\n .filter((node) => node.getAttribute('style')?.match(normalWeightRegexp))\n .forEach((node) => {\n const fragment = doc.createDocumentFragment();\n fragment.append(...node.childNodes);\n node.parentNode?.replaceChild(fragment, node);\n });\n};\n\nexport default function normalize(doc: Document) {\n if (doc.querySelector('[id^=\"docs-internal-guid-\"]')) {\n normalizeFontWeight(doc);\n normalizeEmptyLines(doc);\n }\n}\n","const ignoreRegexp = /\\bmso-list:[^;]*ignore/i;\nconst idRegexp = /\\bmso-list:[^;]*\\bl(\\d+)/i;\nconst indentRegexp = /\\bmso-list:[^;]*\\blevel(\\d+)/i;\n\nconst parseListItem = (element: Element, html: string) => {\n const style = element.getAttribute('style');\n const idMatch = style?.match(idRegexp);\n if (!idMatch) {\n return null;\n }\n const id = Number(idMatch[1]);\n\n const indentMatch = style?.match(indentRegexp);\n const indent = indentMatch ? Number(indentMatch[1]) : 1;\n\n const typeRegexp = new RegExp(\n `@list l${id}:level${indent}\\\\s*\\\\{[^\\\\}]*mso-level-number-format:\\\\s*([\\\\w-]+)`,\n 'i',\n );\n const typeMatch = html.match(typeRegexp);\n const type = typeMatch && typeMatch[1] === 'bullet' ? 'bullet' : 'ordered';\n\n return { id, indent, type, element };\n};\n\n// list items are represented as `p` tags with styles like `mso-list: l0 level1` where:\n// 1. \"0\" in \"l0\" means the list item id;\n// 2. \"1\" in \"level1\" means the indent level, starting from 1.\nconst normalizeListItem = (doc: Document) => {\n const msoList = Array.from(doc.querySelectorAll('[style*=mso-list]'));\n const ignored: Element[] = [];\n const others: Element[] = [];\n msoList.forEach((node) => {\n const shouldIgnore = (node.getAttribute('style') || '').match(ignoreRegexp);\n if (shouldIgnore) {\n ignored.push(node);\n } else {\n others.push(node);\n }\n });\n\n // Each list item contains a marker wrapped with \"mso-list: Ignore\".\n ignored.forEach((node) => node.parentNode?.removeChild(node));\n\n // The list stype is not defined inline with the tag, instead, it's in the\n // style tag so we need to pass the html as a string.\n const html = doc.documentElement.innerHTML;\n const listItems = others\n .map((element) => parseListItem(element, html))\n .filter((parsed) => parsed);\n\n while (listItems.length) {\n const childListItems = [];\n\n let current = listItems.shift();\n // Group continuous items into the same group (aka \"ul\")\n while (current) {\n childListItems.push(current);\n current =\n listItems.length &&\n listItems[0]?.element === current.element.nextElementSibling &&\n // Different id means the next item doesn't belong to this group.\n listItems[0].id === current.id\n ? listItems.shift()\n : null;\n }\n\n const ul = document.createElement('ul');\n childListItems.forEach((listItem) => {\n const li = document.createElement('li');\n li.setAttribute('data-list', listItem.type);\n if (listItem.indent > 1) {\n li.setAttribute('class', `ql-indent-${listItem.indent - 1}`);\n }\n li.innerHTML = listItem.element.innerHTML;\n ul.appendChild(li);\n });\n\n const element = childListItems[0]?.element;\n const { parentNode } = element ?? {};\n if (element) {\n parentNode?.replaceChild(ul, element);\n }\n childListItems.slice(1).forEach(({ element: e }) => {\n parentNode?.removeChild(e);\n });\n }\n};\n\nexport default function normalize(doc: Document) {\n if (\n doc.documentElement.getAttribute('xmlns:w') ===\n 'urn:schemas-microsoft-com:office:word'\n ) {\n normalizeListItem(doc);\n }\n}\n","import googleDocs from './normalizers/googleDocs.js';\nimport msWord from './normalizers/msWord.js';\n\nconst NORMALIZERS = [msWord, googleDocs];\n\nconst normalizeExternalHTML = (doc: Document) => {\n if (doc.documentElement) {\n NORMALIZERS.forEach((normalize) => {\n normalize(doc);\n });\n }\n};\n\nexport default normalizeExternalHTML;\n","import type { ScrollBlot } from 'parchment';\nimport {\n Attributor,\n BlockBlot,\n ClassAttributor,\n EmbedBlot,\n Scope,\n StyleAttributor,\n} from 'parchment';\nimport Delta from 'quill-delta';\nimport { BlockEmbed } from '../blots/block.js';\nimport type { EmitterSource } from '../core/emitter.js';\nimport logger from '../core/logger.js';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\nimport type { Range } from '../core/selection.js';\nimport { AlignAttribute, AlignStyle } from '../formats/align.js';\nimport { BackgroundStyle } from '../formats/background.js';\nimport CodeBlock from '../formats/code.js';\nimport { ColorStyle } from '../formats/color.js';\nimport { DirectionAttribute, DirectionStyle } from '../formats/direction.js';\nimport { FontStyle } from '../formats/font.js';\nimport { SizeStyle } from '../formats/size.js';\nimport { deleteRange } from './keyboard.js';\nimport normalizeExternalHTML from './normalizeExternalHTML/index.js';\n\nconst debug = logger('quill:clipboard');\n\ntype Selector = string | Node['TEXT_NODE'] | Node['ELEMENT_NODE'];\ntype Matcher = (node: Node, delta: Delta, scroll: ScrollBlot) => Delta;\n\nconst CLIPBOARD_CONFIG: [Selector, Matcher][] = [\n [Node.TEXT_NODE, matchText],\n [Node.TEXT_NODE, matchNewline],\n ['br', matchBreak],\n [Node.ELEMENT_NODE, matchNewline],\n [Node.ELEMENT_NODE, matchBlot],\n [Node.ELEMENT_NODE, matchAttributor],\n [Node.ELEMENT_NODE, matchStyles],\n ['li', matchIndent],\n ['ol, ul', matchList],\n ['pre', matchCodeBlock],\n ['tr', matchTable],\n ['b', createMatchAlias('bold')],\n ['i', createMatchAlias('italic')],\n ['strike', createMatchAlias('strike')],\n ['style', matchIgnore],\n];\n\nconst ATTRIBUTE_ATTRIBUTORS = [AlignAttribute, DirectionAttribute].reduce(\n (memo: Record, attr) => {\n memo[attr.keyName] = attr;\n return memo;\n },\n {},\n);\n\nconst STYLE_ATTRIBUTORS = [\n AlignStyle,\n BackgroundStyle,\n ColorStyle,\n DirectionStyle,\n FontStyle,\n SizeStyle,\n].reduce((memo: Record, attr) => {\n memo[attr.keyName] = attr;\n return memo;\n}, {});\n\ninterface ClipboardOptions {\n matchers: [Selector, Matcher][];\n}\n\nclass Clipboard extends Module {\n static DEFAULTS: ClipboardOptions;\n\n matchers: [Selector, Matcher][];\n\n constructor(quill: Quill, options: Partial) {\n super(quill, options);\n this.quill.root.addEventListener('copy', (e) =>\n this.onCaptureCopy(e, false),\n );\n this.quill.root.addEventListener('cut', (e) => this.onCaptureCopy(e, true));\n this.quill.root.addEventListener('paste', this.onCapturePaste.bind(this));\n this.matchers = [];\n // @ts-expect-error Fix me later\n CLIPBOARD_CONFIG.concat(this.options.matchers).forEach(\n ([selector, matcher]) => {\n this.addMatcher(selector, matcher);\n },\n );\n }\n\n addMatcher(selector: Selector, matcher: Matcher) {\n this.matchers.push([selector, matcher]);\n }\n\n convert(\n { html, text }: { html?: string; text?: string },\n formats: Record = {},\n ) {\n if (formats[CodeBlock.blotName]) {\n return new Delta().insert(text || '', {\n [CodeBlock.blotName]: formats[CodeBlock.blotName],\n });\n }\n if (!html) {\n return new Delta().insert(text || '', formats);\n }\n const delta = this.convertHTML(html);\n // Remove trailing newline\n if (\n deltaEndsWith(delta, '\\n') &&\n (delta.ops[delta.ops.length - 1].attributes == null || formats.table)\n ) {\n return delta.compose(new Delta().retain(delta.length() - 1).delete(1));\n }\n return delta;\n }\n\n protected normalizeHTML(doc: Document) {\n normalizeExternalHTML(doc);\n }\n\n protected convertHTML(html: string) {\n const doc = new DOMParser().parseFromString(html, 'text/html');\n this.normalizeHTML(doc);\n const container = doc.body;\n const nodeMatches = new WeakMap();\n const [elementMatchers, textMatchers] = this.prepareMatching(\n container,\n nodeMatches,\n );\n return traverse(\n this.quill.scroll,\n container,\n elementMatchers,\n textMatchers,\n nodeMatches,\n );\n }\n\n dangerouslyPasteHTML(html: string, source?: EmitterSource): void;\n dangerouslyPasteHTML(\n index: number,\n html: string,\n source?: EmitterSource,\n ): void;\n dangerouslyPasteHTML(\n index: number | string,\n html?: string,\n source: EmitterSource = Quill.sources.API,\n ) {\n if (typeof index === 'string') {\n const delta = this.convert({ html: index, text: '' });\n // @ts-expect-error\n this.quill.setContents(delta, html);\n this.quill.setSelection(0, Quill.sources.SILENT);\n } else {\n const paste = this.convert({ html, text: '' });\n this.quill.updateContents(\n new Delta().retain(index).concat(paste),\n source,\n );\n this.quill.setSelection(index + paste.length(), Quill.sources.SILENT);\n }\n }\n\n onCaptureCopy(e: ClipboardEvent, isCut = false) {\n if (e.defaultPrevented) return;\n e.preventDefault();\n const [range] = this.quill.selection.getRange();\n if (range == null) return;\n const { html, text } = this.onCopy(range, isCut);\n e.clipboardData?.setData('text/plain', text);\n e.clipboardData?.setData('text/html', html);\n if (isCut) {\n deleteRange({ range, quill: this.quill });\n }\n }\n\n onCapturePaste(e: ClipboardEvent) {\n if (e.defaultPrevented || !this.quill.isEnabled()) return;\n e.preventDefault();\n const range = this.quill.getSelection(true);\n if (range == null) return;\n const html = e.clipboardData?.getData('text/html');\n const text = e.clipboardData?.getData('text/plain');\n const files = Array.from(e.clipboardData?.files || []);\n if (!html && files.length > 0) {\n this.quill.uploader.upload(range, files);\n return;\n }\n if (html && files.length > 0) {\n const doc = new DOMParser().parseFromString(html, 'text/html');\n if (\n doc.body.childElementCount === 1 &&\n doc.body.firstElementChild?.tagName === 'IMG'\n ) {\n this.quill.uploader.upload(range, files);\n return;\n }\n }\n this.onPaste(range, { html, text });\n }\n\n onCopy(range: Range, isCut: boolean): { html: string; text: string };\n onCopy(range: Range) {\n const text = this.quill.getText(range);\n const html = this.quill.getSemanticHTML(range);\n return { html, text };\n }\n\n onPaste(range: Range, { text, html }: { text?: string; html?: string }) {\n const formats = this.quill.getFormat(range.index);\n const pastedDelta = this.convert({ text, html }, formats);\n debug.log('onPaste', pastedDelta, { text, html });\n const delta = new Delta()\n .retain(range.index)\n .delete(range.length)\n .concat(pastedDelta);\n this.quill.updateContents(delta, Quill.sources.USER);\n // range.length contributes to delta.length()\n this.quill.setSelection(\n delta.length() - range.length,\n Quill.sources.SILENT,\n );\n this.quill.scrollSelectionIntoView();\n }\n\n prepareMatching(container: Element, nodeMatches: WeakMap) {\n const elementMatchers: Matcher[] = [];\n const textMatchers: Matcher[] = [];\n this.matchers.forEach((pair) => {\n const [selector, matcher] = pair;\n switch (selector) {\n case Node.TEXT_NODE:\n textMatchers.push(matcher);\n break;\n case Node.ELEMENT_NODE:\n elementMatchers.push(matcher);\n break;\n default:\n Array.from(container.querySelectorAll(selector)).forEach((node) => {\n if (nodeMatches.has(node)) {\n const matches = nodeMatches.get(node);\n matches?.push(matcher);\n } else {\n nodeMatches.set(node, [matcher]);\n }\n });\n break;\n }\n });\n return [elementMatchers, textMatchers];\n }\n}\nClipboard.DEFAULTS = {\n matchers: [],\n};\n\nfunction applyFormat(\n delta: Delta,\n format: string,\n value: unknown,\n scroll: ScrollBlot,\n): Delta {\n if (!scroll.query(format)) {\n return delta;\n }\n\n return delta.reduce((newDelta, op) => {\n if (op.attributes && op.attributes[format]) {\n return newDelta.push(op);\n }\n const formats = value ? { [format]: value } : {};\n // @ts-expect-error Fix me later\n return newDelta.insert(op.insert, { ...formats, ...op.attributes });\n }, new Delta());\n}\n\nfunction deltaEndsWith(delta: Delta, text: string) {\n let endText = '';\n for (\n let i = delta.ops.length - 1;\n i >= 0 && endText.length < text.length;\n --i // eslint-disable-line no-plusplus\n ) {\n const op = delta.ops[i];\n if (typeof op.insert !== 'string') break;\n endText = op.insert + endText;\n }\n return endText.slice(-1 * text.length) === text;\n}\n\nfunction isLine(node: Node, scroll: ScrollBlot) {\n if (!(node instanceof Element)) return false;\n const match = scroll.query(node);\n // @ts-expect-error\n if (match && match.prototype instanceof EmbedBlot) return false;\n\n return [\n 'address',\n 'article',\n 'blockquote',\n 'canvas',\n 'dd',\n 'div',\n 'dl',\n 'dt',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'header',\n 'iframe',\n 'li',\n 'main',\n 'nav',\n 'ol',\n 'output',\n 'p',\n 'pre',\n 'section',\n 'table',\n 'td',\n 'tr',\n 'ul',\n 'video',\n ].includes(node.tagName.toLowerCase());\n}\n\nfunction isBetweenInlineElements(node: HTMLElement, scroll: ScrollBlot) {\n return (\n node.previousElementSibling &&\n node.nextElementSibling &&\n !isLine(node.previousElementSibling, scroll) &&\n !isLine(node.nextElementSibling, scroll)\n );\n}\n\nconst preNodes = new WeakMap();\nfunction isPre(node: Node | null) {\n if (node == null) return false;\n if (!preNodes.has(node)) {\n // @ts-expect-error\n if (node.tagName === 'PRE') {\n preNodes.set(node, true);\n } else {\n preNodes.set(node, isPre(node.parentNode));\n }\n }\n return preNodes.get(node);\n}\n\nfunction traverse(\n scroll: ScrollBlot,\n node: ChildNode,\n elementMatchers: Matcher[],\n textMatchers: Matcher[],\n nodeMatches: WeakMap,\n): Delta {\n // Post-order\n if (node.nodeType === node.TEXT_NODE) {\n return textMatchers.reduce((delta: Delta, matcher) => {\n return matcher(node, delta, scroll);\n }, new Delta());\n }\n if (node.nodeType === node.ELEMENT_NODE) {\n return Array.from(node.childNodes || []).reduce((delta, childNode) => {\n let childrenDelta = traverse(\n scroll,\n childNode,\n elementMatchers,\n textMatchers,\n nodeMatches,\n );\n if (childNode.nodeType === node.ELEMENT_NODE) {\n childrenDelta = elementMatchers.reduce((reducedDelta, matcher) => {\n return matcher(childNode as HTMLElement, reducedDelta, scroll);\n }, childrenDelta);\n childrenDelta = (nodeMatches.get(childNode) || []).reduce(\n (reducedDelta, matcher) => {\n return matcher(childNode, reducedDelta, scroll);\n },\n childrenDelta,\n );\n }\n return delta.concat(childrenDelta);\n }, new Delta());\n }\n return new Delta();\n}\n\nfunction createMatchAlias(format: string) {\n return (_node: Element, delta: Delta, scroll: ScrollBlot) => {\n return applyFormat(delta, format, true, scroll);\n };\n}\n\nfunction matchAttributor(node: HTMLElement, delta: Delta, scroll: ScrollBlot) {\n const attributes = Attributor.keys(node);\n const classes = ClassAttributor.keys(node);\n const styles = StyleAttributor.keys(node);\n const formats: Record = {};\n attributes\n .concat(classes)\n .concat(styles)\n .forEach((name) => {\n let attr = scroll.query(name, Scope.ATTRIBUTE) as Attributor;\n if (attr != null) {\n formats[attr.attrName] = attr.value(node);\n if (formats[attr.attrName]) return;\n }\n attr = ATTRIBUTE_ATTRIBUTORS[name];\n if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n formats[attr.attrName] = attr.value(node) || undefined;\n }\n attr = STYLE_ATTRIBUTORS[name];\n if (attr != null && (attr.attrName === name || attr.keyName === name)) {\n attr = STYLE_ATTRIBUTORS[name];\n formats[attr.attrName] = attr.value(node) || undefined;\n }\n });\n\n return Object.entries(formats).reduce(\n (newDelta, [name, value]) => applyFormat(newDelta, name, value, scroll),\n delta,\n );\n}\n\nfunction matchBlot(node: Node, delta: Delta, scroll: ScrollBlot) {\n const match = scroll.query(node);\n if (match == null) return delta;\n // @ts-expect-error\n if (match.prototype instanceof EmbedBlot) {\n const embed = {};\n // @ts-expect-error\n const value = match.value(node);\n if (value != null) {\n // @ts-expect-error\n embed[match.blotName] = value;\n // @ts-expect-error\n return new Delta().insert(embed, match.formats(node, scroll));\n }\n } else {\n // @ts-expect-error\n if (match.prototype instanceof BlockBlot && !deltaEndsWith(delta, '\\n')) {\n delta.insert('\\n');\n }\n if (\n 'blotName' in match &&\n 'formats' in match &&\n typeof match.formats === 'function'\n ) {\n return applyFormat(\n delta,\n match.blotName,\n match.formats(node, scroll),\n scroll,\n );\n }\n }\n return delta;\n}\n\nfunction matchBreak(node: Node, delta: Delta) {\n if (!deltaEndsWith(delta, '\\n')) {\n delta.insert('\\n');\n }\n return delta;\n}\n\nfunction matchCodeBlock(node: Node, delta: Delta, scroll: ScrollBlot) {\n const match = scroll.query('code-block');\n const language =\n match && 'formats' in match && typeof match.formats === 'function'\n ? match.formats(node, scroll)\n : true;\n return applyFormat(delta, 'code-block', language, scroll);\n}\n\nfunction matchIgnore() {\n return new Delta();\n}\n\nfunction matchIndent(node: Node, delta: Delta, scroll: ScrollBlot) {\n const match = scroll.query(node);\n if (\n match == null ||\n // @ts-expect-error\n match.blotName !== 'list' ||\n !deltaEndsWith(delta, '\\n')\n ) {\n return delta;\n }\n let indent = -1;\n let parent = node.parentNode;\n while (parent != null) {\n // @ts-expect-error\n if (['OL', 'UL'].includes(parent.tagName)) {\n indent += 1;\n }\n parent = parent.parentNode;\n }\n if (indent <= 0) return delta;\n return delta.reduce((composed, op) => {\n if (op.attributes && typeof op.attributes.indent === 'number') {\n return composed.push(op);\n }\n // @ts-expect-error Fix me later\n return composed.insert(op.insert, { indent, ...(op.attributes || {}) });\n }, new Delta());\n}\n\nfunction matchList(node: Node, delta: Delta, scroll: ScrollBlot) {\n // @ts-expect-error\n const list = node.tagName === 'OL' ? 'ordered' : 'bullet';\n return applyFormat(delta, 'list', list, scroll);\n}\n\nfunction matchNewline(node: Node, delta: Delta, scroll: ScrollBlot) {\n if (!deltaEndsWith(delta, '\\n')) {\n if (\n isLine(node, scroll) &&\n (node.childNodes.length > 0 || node instanceof HTMLParagraphElement)\n ) {\n return delta.insert('\\n');\n }\n if (delta.length() > 0 && node.nextSibling) {\n let nextSibling: Node | null = node.nextSibling;\n while (nextSibling != null) {\n if (isLine(nextSibling, scroll)) {\n return delta.insert('\\n');\n }\n const match = scroll.query(nextSibling);\n // @ts-expect-error\n if (match && match.prototype instanceof BlockEmbed) {\n return delta.insert('\\n');\n }\n nextSibling = nextSibling.firstChild;\n }\n }\n }\n return delta;\n}\n\nfunction matchStyles(node: HTMLElement, delta: Delta, scroll: ScrollBlot) {\n const formats: Record = {};\n const style: Partial = node.style || {};\n if (style.fontStyle === 'italic') {\n formats.italic = true;\n }\n if (style.textDecoration === 'underline') {\n formats.underline = true;\n }\n if (style.textDecoration === 'line-through') {\n formats.strike = true;\n }\n if (\n style.fontWeight?.startsWith('bold') ||\n // @ts-expect-error Fix me later\n parseInt(style.fontWeight, 10) >= 700\n ) {\n formats.bold = true;\n }\n delta = Object.entries(formats).reduce(\n (newDelta, [name, value]) => applyFormat(newDelta, name, value, scroll),\n delta,\n );\n // @ts-expect-error\n if (parseFloat(style.textIndent || 0) > 0) {\n // Could be 0.5in\n return new Delta().insert('\\t').concat(delta);\n }\n return delta;\n}\n\nfunction matchTable(\n node: HTMLTableRowElement,\n delta: Delta,\n scroll: ScrollBlot,\n) {\n const table =\n node.parentElement?.tagName === 'TABLE'\n ? node.parentElement\n : node.parentElement?.parentElement;\n if (table != null) {\n const rows = Array.from(table.querySelectorAll('tr'));\n const row = rows.indexOf(node) + 1;\n return applyFormat(delta, 'table', row, scroll);\n }\n return delta;\n}\n\nfunction matchText(node: HTMLElement, delta: Delta, scroll: ScrollBlot) {\n // @ts-expect-error\n let text = node.data;\n // Word represents empty line with  \n if (node.parentElement?.tagName === 'O:P') {\n return delta.insert(text.trim());\n }\n if (!isPre(node)) {\n if (\n text.trim().length === 0 &&\n text.includes('\\n') &&\n !isBetweenInlineElements(node, scroll)\n ) {\n return delta;\n }\n const replacer = (collapse: unknown, match: string) => {\n const replaced = match.replace(/[^\\u00a0]/g, ''); // \\u00a0 is nbsp;\n return replaced.length < 1 && collapse ? ' ' : replaced;\n };\n text = text.replace(/\\r\\n/g, ' ').replace(/\\n/g, ' ');\n text = text.replace(/\\s\\s+/g, replacer.bind(replacer, true)); // collapse whitespace\n if (\n (node.previousSibling == null &&\n node.parentElement != null &&\n isLine(node.parentElement, scroll)) ||\n (node.previousSibling instanceof Element &&\n isLine(node.previousSibling, scroll))\n ) {\n text = text.replace(/^\\s+/, replacer.bind(replacer, false));\n }\n if (\n (node.nextSibling == null &&\n node.parentElement != null &&\n isLine(node.parentElement, scroll)) ||\n (node.nextSibling instanceof Element && isLine(node.nextSibling, scroll))\n ) {\n text = text.replace(/\\s+$/, replacer.bind(replacer, false));\n }\n }\n return delta.insert(text);\n}\n\nexport {\n Clipboard as default,\n matchAttributor,\n matchBlot,\n matchNewline,\n matchText,\n traverse,\n};\n","import { cloneDeep, isEqual } from 'lodash-es';\nimport Delta, { AttributeMap } from 'quill-delta';\nimport { EmbedBlot, Scope, TextBlot } from 'parchment';\nimport type { Blot, BlockBlot } from 'parchment';\nimport Quill from '../core/quill.js';\nimport logger from '../core/logger.js';\nimport Module from '../core/module.js';\nimport type { BlockEmbed } from '../blots/block.js';\nimport type { Range } from '../core/selection.js';\n\nconst debug = logger('quill:keyboard');\n\nconst SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';\n\nexport interface Context {\n collapsed: boolean;\n empty: boolean;\n offset: number;\n prefix: string;\n suffix: string;\n format: Record;\n event: KeyboardEvent;\n line: BlockEmbed | BlockBlot;\n}\n\ninterface BindingObject\n extends Partial> {\n key: number | string | string[];\n shortKey?: boolean | null;\n shiftKey?: boolean | null;\n altKey?: boolean | null;\n metaKey?: boolean | null;\n ctrlKey?: boolean | null;\n prefix?: RegExp;\n suffix?: RegExp;\n format?: Record | string[];\n handler?: (\n this: { quill: Quill },\n range: Range,\n curContext: Context,\n // eslint-disable-next-line no-use-before-define\n binding: NormalizedBinding,\n ) => boolean | void;\n}\n\ntype Binding = BindingObject | string | number;\n\ninterface NormalizedBinding extends Omit {\n key: string | number;\n}\n\ninterface KeyboardOptions {\n bindings: Record;\n}\n\ninterface KeyboardOptions {\n bindings: Record;\n}\n\nclass Keyboard extends Module {\n static DEFAULTS: KeyboardOptions;\n\n static match(evt: KeyboardEvent, binding: BindingObject) {\n if (\n (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'] as const).some((key) => {\n return !!binding[key] !== evt[key] && binding[key] !== null;\n })\n ) {\n return false;\n }\n return binding.key === evt.key || binding.key === evt.which;\n }\n\n bindings: Record;\n\n constructor(quill: Quill, options: Partial) {\n super(quill, options);\n this.bindings = {};\n // @ts-expect-error Fix me later\n Object.keys(this.options.bindings).forEach((name) => {\n // @ts-expect-error Fix me later\n if (this.options.bindings[name]) {\n // @ts-expect-error Fix me later\n this.addBinding(this.options.bindings[name]);\n }\n });\n this.addBinding({ key: 'Enter', shiftKey: null }, this.handleEnter);\n this.addBinding(\n { key: 'Enter', metaKey: null, ctrlKey: null, altKey: null },\n () => {},\n );\n if (/Firefox/i.test(navigator.userAgent)) {\n // Need to handle delete and backspace for Firefox in the general case #1171\n this.addBinding(\n { key: 'Backspace' },\n { collapsed: true },\n this.handleBackspace,\n );\n this.addBinding(\n { key: 'Delete' },\n { collapsed: true },\n this.handleDelete,\n );\n } else {\n this.addBinding(\n { key: 'Backspace' },\n { collapsed: true, prefix: /^.?$/ },\n this.handleBackspace,\n );\n this.addBinding(\n { key: 'Delete' },\n { collapsed: true, suffix: /^.?$/ },\n this.handleDelete,\n );\n }\n this.addBinding(\n { key: 'Backspace' },\n { collapsed: false },\n this.handleDeleteRange,\n );\n this.addBinding(\n { key: 'Delete' },\n { collapsed: false },\n this.handleDeleteRange,\n );\n this.addBinding(\n {\n key: 'Backspace',\n altKey: null,\n ctrlKey: null,\n metaKey: null,\n shiftKey: null,\n },\n { collapsed: true, offset: 0 },\n this.handleBackspace,\n );\n this.listen();\n }\n\n addBinding(\n keyBinding: Binding,\n context:\n | Required\n | Partial> = {},\n handler:\n | Required\n | Partial> = {},\n ) {\n const binding = normalize(keyBinding);\n if (binding == null) {\n debug.warn('Attempted to add invalid keyboard binding', binding);\n return;\n }\n if (typeof context === 'function') {\n context = { handler: context };\n }\n if (typeof handler === 'function') {\n handler = { handler };\n }\n const keys = Array.isArray(binding.key) ? binding.key : [binding.key];\n keys.forEach((key) => {\n const singleBinding = {\n ...binding,\n key,\n ...context,\n ...handler,\n };\n this.bindings[singleBinding.key] = this.bindings[singleBinding.key] || [];\n this.bindings[singleBinding.key].push(singleBinding);\n });\n }\n\n listen() {\n this.quill.root.addEventListener('keydown', (evt) => {\n if (evt.defaultPrevented || evt.isComposing) return;\n const bindings = (this.bindings[evt.key] || []).concat(\n this.bindings[evt.which] || [],\n );\n const matches = bindings.filter((binding) =>\n Keyboard.match(evt, binding),\n );\n if (matches.length === 0) return;\n // @ts-expect-error\n const blot = Quill.find(evt.target, true);\n if (blot && blot.scroll !== this.quill.scroll) return;\n const range = this.quill.getSelection();\n if (range == null || !this.quill.hasFocus()) return;\n const [line, offset] = this.quill.getLine(range.index);\n const [leafStart, offsetStart] = this.quill.getLeaf(range.index);\n const [leafEnd, offsetEnd] =\n range.length === 0\n ? [leafStart, offsetStart]\n : this.quill.getLeaf(range.index + range.length);\n const prefixText =\n leafStart instanceof TextBlot\n ? leafStart.value().slice(0, offsetStart)\n : '';\n const suffixText =\n leafEnd instanceof TextBlot ? leafEnd.value().slice(offsetEnd) : '';\n const curContext = {\n collapsed: range.length === 0,\n // @ts-expect-error Fix me later\n empty: range.length === 0 && line.length() <= 1,\n format: this.quill.getFormat(range),\n line,\n offset,\n prefix: prefixText,\n suffix: suffixText,\n event: evt,\n };\n const prevented = matches.some((binding) => {\n if (\n binding.collapsed != null &&\n binding.collapsed !== curContext.collapsed\n ) {\n return false;\n }\n if (binding.empty != null && binding.empty !== curContext.empty) {\n return false;\n }\n if (binding.offset != null && binding.offset !== curContext.offset) {\n return false;\n }\n if (Array.isArray(binding.format)) {\n // any format is present\n if (binding.format.every((name) => curContext.format[name] == null)) {\n return false;\n }\n } else if (typeof binding.format === 'object') {\n // all formats must match\n if (\n !Object.keys(binding.format).every((name) => {\n // @ts-expect-error Fix me later\n if (binding.format[name] === true)\n return curContext.format[name] != null;\n // @ts-expect-error Fix me later\n if (binding.format[name] === false)\n return curContext.format[name] == null;\n // @ts-expect-error Fix me later\n return isEqual(binding.format[name], curContext.format[name]);\n })\n ) {\n return false;\n }\n }\n if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) {\n return false;\n }\n if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) {\n return false;\n }\n // @ts-expect-error Fix me later\n return binding.handler.call(this, range, curContext, binding) !== true;\n });\n if (prevented) {\n evt.preventDefault();\n }\n });\n }\n\n handleBackspace(range: Range, context: Context) {\n // Check for astral symbols\n const length = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(context.prefix)\n ? 2\n : 1;\n if (range.index === 0 || this.quill.getLength() <= 1) return;\n let formats = {};\n const [line] = this.quill.getLine(range.index);\n let delta = new Delta().retain(range.index - length).delete(length);\n if (context.offset === 0) {\n // Always deleting newline here, length always 1\n const [prev] = this.quill.getLine(range.index - 1);\n if (prev) {\n const isPrevLineEmpty =\n prev.statics.blotName === 'block' && prev.length() <= 1;\n if (!isPrevLineEmpty) {\n // @ts-expect-error Fix me later\n const curFormats = line.formats();\n const prevFormats = this.quill.getFormat(range.index - 1, 1);\n formats = AttributeMap.diff(curFormats, prevFormats) || {};\n if (Object.keys(formats).length > 0) {\n // line.length() - 1 targets \\n in line, another -1 for newline being deleted\n const formatDelta = new Delta()\n // @ts-expect-error Fix me later\n .retain(range.index + line.length() - 2)\n .retain(1, formats);\n delta = delta.compose(formatDelta);\n }\n }\n }\n }\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.focus();\n }\n\n handleDelete(range: Range, context: Context) {\n // Check for astral symbols\n const length = /^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/.test(context.suffix)\n ? 2\n : 1;\n if (range.index >= this.quill.getLength() - length) return;\n let formats = {};\n const [line] = this.quill.getLine(range.index);\n let delta = new Delta().retain(range.index).delete(length);\n // @ts-expect-error Fix me later\n if (context.offset >= line.length() - 1) {\n const [next] = this.quill.getLine(range.index + 1);\n if (next) {\n // @ts-expect-error Fix me later\n const curFormats = line.formats();\n const nextFormats = this.quill.getFormat(range.index, 1);\n formats = AttributeMap.diff(curFormats, nextFormats) || {};\n if (Object.keys(formats).length > 0) {\n delta = delta.retain(next.length() - 1).retain(1, formats);\n }\n }\n }\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.focus();\n }\n\n handleDeleteRange(range: Range) {\n deleteRange({ range, quill: this.quill });\n this.quill.focus();\n }\n\n handleEnter(range: Range, context: Context) {\n const lineFormats = Object.keys(context.format).reduce(\n (formats: Record, format) => {\n if (\n this.quill.scroll.query(format, Scope.BLOCK) &&\n !Array.isArray(context.format[format])\n ) {\n formats[format] = context.format[format];\n }\n return formats;\n },\n {},\n );\n const delta = new Delta()\n .retain(range.index)\n .delete(range.length)\n .insert('\\n', lineFormats);\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n this.quill.focus();\n }\n}\n\nconst defaultOptions: KeyboardOptions = {\n bindings: {\n bold: makeFormatHandler('bold'),\n italic: makeFormatHandler('italic'),\n underline: makeFormatHandler('underline'),\n indent: {\n // highlight tab or tab at beginning of list, indent or blockquote\n key: 'Tab',\n format: ['blockquote', 'indent', 'list'],\n handler(range, context) {\n if (context.collapsed && context.offset !== 0) return true;\n this.quill.format('indent', '+1', Quill.sources.USER);\n return false;\n },\n },\n outdent: {\n key: 'Tab',\n shiftKey: true,\n format: ['blockquote', 'indent', 'list'],\n // highlight tab or tab at beginning of list, indent or blockquote\n handler(range, context) {\n if (context.collapsed && context.offset !== 0) return true;\n this.quill.format('indent', '-1', Quill.sources.USER);\n return false;\n },\n },\n 'outdent backspace': {\n key: 'Backspace',\n collapsed: true,\n shiftKey: null,\n metaKey: null,\n ctrlKey: null,\n altKey: null,\n format: ['indent', 'list'],\n offset: 0,\n handler(range, context) {\n if (context.format.indent != null) {\n this.quill.format('indent', '-1', Quill.sources.USER);\n } else if (context.format.list != null) {\n this.quill.format('list', false, Quill.sources.USER);\n }\n },\n },\n 'indent code-block': makeCodeBlockHandler(true),\n 'outdent code-block': makeCodeBlockHandler(false),\n 'remove tab': {\n key: 'Tab',\n shiftKey: true,\n collapsed: true,\n prefix: /\\t$/,\n handler(range) {\n this.quill.deleteText(range.index - 1, 1, Quill.sources.USER);\n },\n },\n tab: {\n key: 'Tab',\n handler(range, context) {\n if (context.format.table) return true;\n this.quill.history.cutoff();\n const delta = new Delta()\n .retain(range.index)\n .delete(range.length)\n .insert('\\t');\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.history.cutoff();\n this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n return false;\n },\n },\n 'blockquote empty enter': {\n key: 'Enter',\n collapsed: true,\n format: ['blockquote'],\n empty: true,\n handler() {\n this.quill.format('blockquote', false, Quill.sources.USER);\n },\n },\n 'list empty enter': {\n key: 'Enter',\n collapsed: true,\n format: ['list'],\n empty: true,\n handler(range, context) {\n const formats: Record = { list: false };\n if (context.format.indent) {\n formats.indent = false;\n }\n this.quill.formatLine(\n range.index,\n range.length,\n formats,\n Quill.sources.USER,\n );\n },\n },\n 'checklist enter': {\n key: 'Enter',\n collapsed: true,\n format: { list: 'checked' },\n handler(range) {\n const [line, offset] = this.quill.getLine(range.index);\n const formats = {\n // @ts-expect-error Fix me later\n ...line.formats(),\n list: 'checked',\n };\n const delta = new Delta()\n .retain(range.index)\n .insert('\\n', formats)\n // @ts-expect-error Fix me later\n .retain(line.length() - offset - 1)\n .retain(1, { list: 'unchecked' });\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n this.quill.scrollSelectionIntoView();\n },\n },\n 'header enter': {\n key: 'Enter',\n collapsed: true,\n format: ['header'],\n suffix: /^$/,\n handler(range, context) {\n const [line, offset] = this.quill.getLine(range.index);\n const delta = new Delta()\n .retain(range.index)\n .insert('\\n', context.format)\n // @ts-expect-error Fix me later\n .retain(line.length() - offset - 1)\n .retain(1, { header: null });\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index + 1, Quill.sources.SILENT);\n this.quill.scrollSelectionIntoView();\n },\n },\n 'table backspace': {\n key: 'Backspace',\n format: ['table'],\n collapsed: true,\n offset: 0,\n handler() {},\n },\n 'table delete': {\n key: 'Delete',\n format: ['table'],\n collapsed: true,\n suffix: /^$/,\n handler() {},\n },\n 'table enter': {\n key: 'Enter',\n shiftKey: null,\n format: ['table'],\n handler(range) {\n const module = this.quill.getModule('table');\n if (module) {\n // @ts-expect-error\n const [table, row, cell, offset] = module.getTable(range);\n const shift = tableSide(table, row, cell, offset);\n if (shift == null) return;\n let index = table.offset();\n if (shift < 0) {\n const delta = new Delta().retain(index).insert('\\n');\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(\n range.index + 1,\n range.length,\n Quill.sources.SILENT,\n );\n } else if (shift > 0) {\n index += table.length();\n const delta = new Delta().retain(index).insert('\\n');\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(index, Quill.sources.USER);\n }\n }\n },\n },\n 'table tab': {\n key: 'Tab',\n shiftKey: null,\n format: ['table'],\n handler(range, context) {\n const { event, line: cell } = context;\n const offset = cell.offset(this.quill.scroll);\n if (event.shiftKey) {\n this.quill.setSelection(offset - 1, Quill.sources.USER);\n } else {\n this.quill.setSelection(offset + cell.length(), Quill.sources.USER);\n }\n },\n },\n 'list autofill': {\n key: ' ',\n shiftKey: null,\n collapsed: true,\n format: {\n 'code-block': false,\n blockquote: false,\n table: false,\n },\n prefix: /^\\s*?(\\d+\\.|-|\\*|\\[ ?\\]|\\[x\\])$/,\n handler(range, context) {\n if (this.quill.scroll.query('list') == null) return true;\n const { length } = context.prefix;\n const [line, offset] = this.quill.getLine(range.index);\n if (offset > length) return true;\n let value;\n switch (context.prefix.trim()) {\n case '[]':\n case '[ ]':\n value = 'unchecked';\n break;\n case '[x]':\n value = 'checked';\n break;\n case '-':\n case '*':\n value = 'bullet';\n break;\n default:\n value = 'ordered';\n }\n this.quill.insertText(range.index, ' ', Quill.sources.USER);\n this.quill.history.cutoff();\n const delta = new Delta()\n .retain(range.index - offset)\n .delete(length + 1)\n // @ts-expect-error Fix me later\n .retain(line.length() - 2 - offset)\n .retain(1, { list: value });\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.history.cutoff();\n this.quill.setSelection(range.index - length, Quill.sources.SILENT);\n return false;\n },\n },\n 'code exit': {\n key: 'Enter',\n collapsed: true,\n format: ['code-block'],\n prefix: /^$/,\n suffix: /^\\s*$/,\n handler(range) {\n const [line, offset] = this.quill.getLine(range.index);\n let numLines = 2;\n let cur = line;\n while (\n cur != null &&\n cur.length() <= 1 &&\n cur.formats()['code-block']\n ) {\n // @ts-expect-error\n cur = cur.prev;\n numLines -= 1;\n // Requisite prev lines are empty\n if (numLines <= 0) {\n const delta = new Delta()\n // @ts-expect-error Fix me later\n .retain(range.index + line.length() - offset - 2)\n .retain(1, { 'code-block': null })\n .delete(1);\n this.quill.updateContents(delta, Quill.sources.USER);\n this.quill.setSelection(range.index - 1, Quill.sources.SILENT);\n return false;\n }\n }\n return true;\n },\n },\n 'embed left': makeEmbedArrowHandler('ArrowLeft', false),\n 'embed left shift': makeEmbedArrowHandler('ArrowLeft', true),\n 'embed right': makeEmbedArrowHandler('ArrowRight', false),\n 'embed right shift': makeEmbedArrowHandler('ArrowRight', true),\n 'table down': makeTableArrowHandler(false),\n 'table up': makeTableArrowHandler(true),\n },\n};\n\nKeyboard.DEFAULTS = defaultOptions;\n\nfunction makeCodeBlockHandler(indent: boolean): BindingObject {\n return {\n key: 'Tab',\n shiftKey: !indent,\n format: { 'code-block': true },\n handler(range, { event }) {\n const CodeBlock = this.quill.scroll.query('code-block');\n // @ts-expect-error\n const { TAB } = CodeBlock;\n if (range.length === 0 && !event.shiftKey) {\n this.quill.insertText(range.index, TAB, Quill.sources.USER);\n this.quill.setSelection(range.index + TAB.length, Quill.sources.SILENT);\n return;\n }\n\n const lines =\n range.length === 0\n ? this.quill.getLines(range.index, 1)\n : this.quill.getLines(range);\n let { index, length } = range;\n lines.forEach((line, i) => {\n if (indent) {\n line.insertAt(0, TAB);\n if (i === 0) {\n index += TAB.length;\n } else {\n length += TAB.length;\n }\n // @ts-expect-error Fix me later\n } else if (line.domNode.textContent.startsWith(TAB)) {\n line.deleteAt(0, TAB.length);\n if (i === 0) {\n index -= TAB.length;\n } else {\n length -= TAB.length;\n }\n }\n });\n this.quill.update(Quill.sources.USER);\n this.quill.setSelection(index, length, Quill.sources.SILENT);\n },\n };\n}\n\nfunction makeEmbedArrowHandler(\n key: string,\n shiftKey: boolean | null,\n): BindingObject {\n const where = key === 'ArrowLeft' ? 'prefix' : 'suffix';\n return {\n key,\n shiftKey,\n altKey: null,\n [where]: /^$/,\n handler(range) {\n let { index } = range;\n if (key === 'ArrowRight') {\n index += range.length + 1;\n }\n const [leaf] = this.quill.getLeaf(index);\n if (!(leaf instanceof EmbedBlot)) return true;\n if (key === 'ArrowLeft') {\n if (shiftKey) {\n this.quill.setSelection(\n range.index - 1,\n range.length + 1,\n Quill.sources.USER,\n );\n } else {\n this.quill.setSelection(range.index - 1, Quill.sources.USER);\n }\n } else if (shiftKey) {\n this.quill.setSelection(\n range.index,\n range.length + 1,\n Quill.sources.USER,\n );\n } else {\n this.quill.setSelection(\n range.index + range.length + 1,\n Quill.sources.USER,\n );\n }\n return false;\n },\n };\n}\n\nfunction makeFormatHandler(format: string): BindingObject {\n return {\n key: format[0],\n shortKey: true,\n handler(range, context) {\n this.quill.format(format, !context.format[format], Quill.sources.USER);\n },\n };\n}\n\nfunction makeTableArrowHandler(up: boolean): BindingObject {\n return {\n key: up ? 'ArrowUp' : 'ArrowDown',\n collapsed: true,\n format: ['table'],\n handler(range, context) {\n // TODO move to table module\n const key = up ? 'prev' : 'next';\n const cell = context.line;\n const targetRow = cell.parent[key];\n if (targetRow != null) {\n if (targetRow.statics.blotName === 'table-row') {\n // @ts-expect-error\n let targetCell = targetRow.children.head;\n let cur = cell;\n while (cur.prev != null) {\n // @ts-expect-error\n cur = cur.prev;\n targetCell = targetCell.next;\n }\n const index =\n targetCell.offset(this.quill.scroll) +\n Math.min(context.offset, targetCell.length() - 1);\n this.quill.setSelection(index, 0, Quill.sources.USER);\n }\n } else {\n // @ts-expect-error\n const targetLine = cell.table()[key];\n if (targetLine != null) {\n if (up) {\n this.quill.setSelection(\n targetLine.offset(this.quill.scroll) + targetLine.length() - 1,\n 0,\n Quill.sources.USER,\n );\n } else {\n this.quill.setSelection(\n targetLine.offset(this.quill.scroll),\n 0,\n Quill.sources.USER,\n );\n }\n }\n }\n return false;\n },\n };\n}\n\nfunction normalize(binding: Binding): BindingObject | null {\n if (typeof binding === 'string' || typeof binding === 'number') {\n binding = { key: binding };\n } else if (typeof binding === 'object') {\n binding = cloneDeep(binding);\n } else {\n return null;\n }\n if (binding.shortKey) {\n binding[SHORTKEY] = binding.shortKey;\n delete binding.shortKey;\n }\n return binding;\n}\n\n// TODO: Move into quill.ts or editor.ts\nfunction deleteRange({ quill, range }: { quill: Quill; range: Range }) {\n const lines = quill.getLines(range);\n let formats = {};\n if (lines.length > 1) {\n const firstFormats = lines[0].formats();\n const lastFormats = lines[lines.length - 1].formats();\n formats = AttributeMap.diff(lastFormats, firstFormats) || {};\n }\n quill.deleteText(range, Quill.sources.USER);\n if (Object.keys(formats).length > 0) {\n quill.formatLine(range.index, 1, formats, Quill.sources.USER);\n }\n quill.setSelection(range.index, Quill.sources.SILENT);\n}\n\nfunction tableSide(_table: unknown, row: Blot, cell: Blot, offset: number) {\n if (row.prev == null && row.next == null) {\n if (cell.prev == null && cell.next == null) {\n return offset === 0 ? -1 : 1;\n }\n return cell.prev == null ? -1 : 1;\n }\n if (row.prev == null) {\n return -1;\n }\n if (row.next == null) {\n return 1;\n }\n return null;\n}\n\nexport { Keyboard as default, SHORTKEY, normalize, deleteRange };\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = cloneDeep;\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","import cloneDeep = require('lodash.clonedeep');\nimport isEqual = require('lodash.isequal');\n\ninterface AttributeMap {\n [key: string]: unknown;\n}\n\nnamespace AttributeMap {\n export function compose(\n a: AttributeMap = {},\n b: AttributeMap = {},\n keepNull = false,\n ): AttributeMap | undefined {\n if (typeof a !== 'object') {\n a = {};\n }\n if (typeof b !== 'object') {\n b = {};\n }\n let attributes = cloneDeep(b);\n if (!keepNull) {\n attributes = Object.keys(attributes).reduce((copy, key) => {\n if (attributes[key] != null) {\n copy[key] = attributes[key];\n }\n return copy;\n }, {});\n }\n for (const key in a) {\n if (a[key] !== undefined && b[key] === undefined) {\n attributes[key] = a[key];\n }\n }\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n }\n\n export function diff(\n a: AttributeMap = {},\n b: AttributeMap = {},\n ): AttributeMap | undefined {\n if (typeof a !== 'object') {\n a = {};\n }\n if (typeof b !== 'object') {\n b = {};\n }\n const attributes = Object.keys(a)\n .concat(Object.keys(b))\n .reduce((attrs, key) => {\n if (!isEqual(a[key], b[key])) {\n attrs[key] = b[key] === undefined ? null : b[key];\n }\n return attrs;\n }, {});\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n }\n\n export function invert(\n attr: AttributeMap = {},\n base: AttributeMap = {},\n ): AttributeMap {\n attr = attr || {};\n const baseInverted = Object.keys(base).reduce((memo, key) => {\n if (base[key] !== attr[key] && attr[key] !== undefined) {\n memo[key] = base[key];\n }\n return memo;\n }, {});\n return Object.keys(attr).reduce((memo, key) => {\n if (attr[key] !== base[key] && base[key] === undefined) {\n memo[key] = null;\n }\n return memo;\n }, baseInverted);\n }\n\n export function transform(\n a: AttributeMap | undefined,\n b: AttributeMap | undefined,\n priority = false,\n ): AttributeMap | undefined {\n if (typeof a !== 'object') {\n return b;\n }\n if (typeof b !== 'object') {\n return undefined;\n }\n if (!priority) {\n return b; // b simply overwrites us without priority\n }\n const attributes = Object.keys(b).reduce((attrs, key) => {\n if (a[key] === undefined) {\n attrs[key] = b[key]; // null is a valid value\n }\n return attrs;\n }, {});\n return Object.keys(attributes).length > 0 ? attributes : undefined;\n }\n}\n\nexport default AttributeMap;\n","import * as diff from 'fast-diff';\nimport cloneDeep = require('lodash.clonedeep');\nimport isEqual = require('lodash.isequal');\nimport AttributeMap from './AttributeMap';\nimport Op from './Op';\nimport OpIterator from './OpIterator';\n\nconst NULL_CHARACTER = String.fromCharCode(0); // Placeholder char for embed in diff()\n\ninterface EmbedHandler {\n compose(a: T, b: T, keepNull: boolean): T;\n invert(a: T, b: T): T;\n transform(a: T, b: T, priority: boolean): T;\n}\n\nconst getEmbedTypeAndData = (\n a: Op['insert'] | Op['retain'],\n b: Op['insert'],\n): [string, unknown, unknown] => {\n if (typeof a !== 'object' || a === null) {\n throw new Error(`cannot retain a ${typeof a}`);\n }\n if (typeof b !== 'object' || b === null) {\n throw new Error(`cannot retain a ${typeof b}`);\n }\n const embedType = Object.keys(a)[0];\n if (!embedType || embedType !== Object.keys(b)[0]) {\n throw new Error(\n `embed types not matched: ${embedType} != ${Object.keys(b)[0]}`,\n );\n }\n return [embedType, a[embedType], b[embedType]];\n};\n\nclass Delta {\n static Op = Op;\n static OpIterator = OpIterator;\n static AttributeMap = AttributeMap;\n private static handlers: { [embedType: string]: EmbedHandler } = {};\n\n static registerEmbed(embedType: string, handler: EmbedHandler): void {\n this.handlers[embedType] = handler;\n }\n\n static unregisterEmbed(embedType: string): void {\n delete this.handlers[embedType];\n }\n\n private static getHandler(embedType: string): EmbedHandler {\n const handler = this.handlers[embedType];\n if (!handler) {\n throw new Error(`no handlers for embed type \"${embedType}\"`);\n }\n return handler;\n }\n\n ops: Op[];\n constructor(ops?: Op[] | { ops: Op[] }) {\n // Assume we are given a well formed ops\n if (Array.isArray(ops)) {\n this.ops = ops;\n } else if (ops != null && Array.isArray(ops.ops)) {\n this.ops = ops.ops;\n } else {\n this.ops = [];\n }\n }\n\n insert(\n arg: string | Record,\n attributes?: AttributeMap | null,\n ): this {\n const newOp: Op = {};\n if (typeof arg === 'string' && arg.length === 0) {\n return this;\n }\n newOp.insert = arg;\n if (\n attributes != null &&\n typeof attributes === 'object' &&\n Object.keys(attributes).length > 0\n ) {\n newOp.attributes = attributes;\n }\n return this.push(newOp);\n }\n\n delete(length: number): this {\n if (length <= 0) {\n return this;\n }\n return this.push({ delete: length });\n }\n\n retain(\n length: number | Record,\n attributes?: AttributeMap | null,\n ): this {\n if (typeof length === 'number' && length <= 0) {\n return this;\n }\n const newOp: Op = { retain: length };\n if (\n attributes != null &&\n typeof attributes === 'object' &&\n Object.keys(attributes).length > 0\n ) {\n newOp.attributes = attributes;\n }\n return this.push(newOp);\n }\n\n push(newOp: Op): this {\n let index = this.ops.length;\n let lastOp = this.ops[index - 1];\n newOp = cloneDeep(newOp);\n if (typeof lastOp === 'object') {\n if (\n typeof newOp.delete === 'number' &&\n typeof lastOp.delete === 'number'\n ) {\n this.ops[index - 1] = { delete: lastOp.delete + newOp.delete };\n return this;\n }\n // Since it does not matter if we insert before or after deleting at the same index,\n // always prefer to insert first\n if (typeof lastOp.delete === 'number' && newOp.insert != null) {\n index -= 1;\n lastOp = this.ops[index - 1];\n if (typeof lastOp !== 'object') {\n this.ops.unshift(newOp);\n return this;\n }\n }\n if (isEqual(newOp.attributes, lastOp.attributes)) {\n if (\n typeof newOp.insert === 'string' &&\n typeof lastOp.insert === 'string'\n ) {\n this.ops[index - 1] = { insert: lastOp.insert + newOp.insert };\n if (typeof newOp.attributes === 'object') {\n this.ops[index - 1].attributes = newOp.attributes;\n }\n return this;\n } else if (\n typeof newOp.retain === 'number' &&\n typeof lastOp.retain === 'number'\n ) {\n this.ops[index - 1] = { retain: lastOp.retain + newOp.retain };\n if (typeof newOp.attributes === 'object') {\n this.ops[index - 1].attributes = newOp.attributes;\n }\n return this;\n }\n }\n }\n if (index === this.ops.length) {\n this.ops.push(newOp);\n } else {\n this.ops.splice(index, 0, newOp);\n }\n return this;\n }\n\n chop(): this {\n const lastOp = this.ops[this.ops.length - 1];\n if (lastOp && typeof lastOp.retain === 'number' && !lastOp.attributes) {\n this.ops.pop();\n }\n return this;\n }\n\n filter(predicate: (op: Op, index: number) => boolean): Op[] {\n return this.ops.filter(predicate);\n }\n\n forEach(predicate: (op: Op, index: number) => void): void {\n this.ops.forEach(predicate);\n }\n\n map(predicate: (op: Op, index: number) => T): T[] {\n return this.ops.map(predicate);\n }\n\n partition(predicate: (op: Op) => boolean): [Op[], Op[]] {\n const passed: Op[] = [];\n const failed: Op[] = [];\n this.forEach((op) => {\n const target = predicate(op) ? passed : failed;\n target.push(op);\n });\n return [passed, failed];\n }\n\n reduce(\n predicate: (accum: T, curr: Op, index: number) => T,\n initialValue: T,\n ): T {\n return this.ops.reduce(predicate, initialValue);\n }\n\n changeLength(): number {\n return this.reduce((length, elem) => {\n if (elem.insert) {\n return length + Op.length(elem);\n } else if (elem.delete) {\n return length - elem.delete;\n }\n return length;\n }, 0);\n }\n\n length(): number {\n return this.reduce((length, elem) => {\n return length + Op.length(elem);\n }, 0);\n }\n\n slice(start = 0, end = Infinity): Delta {\n const ops = [];\n const iter = new OpIterator(this.ops);\n let index = 0;\n while (index < end && iter.hasNext()) {\n let nextOp;\n if (index < start) {\n nextOp = iter.next(start - index);\n } else {\n nextOp = iter.next(end - index);\n ops.push(nextOp);\n }\n index += Op.length(nextOp);\n }\n return new Delta(ops);\n }\n\n compose(other: Delta): Delta {\n const thisIter = new OpIterator(this.ops);\n const otherIter = new OpIterator(other.ops);\n const ops = [];\n const firstOther = otherIter.peek();\n if (\n firstOther != null &&\n typeof firstOther.retain === 'number' &&\n firstOther.attributes == null\n ) {\n let firstLeft = firstOther.retain;\n while (\n thisIter.peekType() === 'insert' &&\n thisIter.peekLength() <= firstLeft\n ) {\n firstLeft -= thisIter.peekLength();\n ops.push(thisIter.next());\n }\n if (firstOther.retain - firstLeft > 0) {\n otherIter.next(firstOther.retain - firstLeft);\n }\n }\n const delta = new Delta(ops);\n while (thisIter.hasNext() || otherIter.hasNext()) {\n if (otherIter.peekType() === 'insert') {\n delta.push(otherIter.next());\n } else if (thisIter.peekType() === 'delete') {\n delta.push(thisIter.next());\n } else {\n const length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n const thisOp = thisIter.next(length);\n const otherOp = otherIter.next(length);\n if (otherOp.retain) {\n const newOp: Op = {};\n if (typeof thisOp.retain === 'number') {\n newOp.retain =\n typeof otherOp.retain === 'number' ? length : otherOp.retain;\n } else {\n if (typeof otherOp.retain === 'number') {\n if (thisOp.retain == null) {\n newOp.insert = thisOp.insert;\n } else {\n newOp.retain = thisOp.retain;\n }\n } else {\n const action = thisOp.retain == null ? 'insert' : 'retain';\n const [embedType, thisData, otherData] = getEmbedTypeAndData(\n thisOp[action],\n otherOp.retain,\n );\n const handler = Delta.getHandler(embedType);\n newOp[action] = {\n [embedType]: handler.compose(\n thisData,\n otherData,\n action === 'retain',\n ),\n };\n }\n }\n // Preserve null when composing with a retain, otherwise remove it for inserts\n const attributes = AttributeMap.compose(\n thisOp.attributes,\n otherOp.attributes,\n typeof thisOp.retain === 'number',\n );\n if (attributes) {\n newOp.attributes = attributes;\n }\n delta.push(newOp);\n\n // Optimization if rest of other is just retain\n if (\n !otherIter.hasNext() &&\n isEqual(delta.ops[delta.ops.length - 1], newOp)\n ) {\n const rest = new Delta(thisIter.rest());\n return delta.concat(rest).chop();\n }\n\n // Other op should be delete, we could be an insert or retain\n // Insert + delete cancels out\n } else if (\n typeof otherOp.delete === 'number' &&\n (typeof thisOp.retain === 'number' ||\n (typeof thisOp.retain === 'object' && thisOp.retain !== null))\n ) {\n delta.push(otherOp);\n }\n }\n }\n return delta.chop();\n }\n\n concat(other: Delta): Delta {\n const delta = new Delta(this.ops.slice());\n if (other.ops.length > 0) {\n delta.push(other.ops[0]);\n delta.ops = delta.ops.concat(other.ops.slice(1));\n }\n return delta;\n }\n\n diff(other: Delta, cursor?: number | diff.CursorInfo): Delta {\n if (this.ops === other.ops) {\n return new Delta();\n }\n const strings = [this, other].map((delta) => {\n return delta\n .map((op) => {\n if (op.insert != null) {\n return typeof op.insert === 'string' ? op.insert : NULL_CHARACTER;\n }\n const prep = delta === other ? 'on' : 'with';\n throw new Error('diff() called ' + prep + ' non-document');\n })\n .join('');\n });\n const retDelta = new Delta();\n const diffResult = diff(strings[0], strings[1], cursor, true);\n const thisIter = new OpIterator(this.ops);\n const otherIter = new OpIterator(other.ops);\n diffResult.forEach((component: diff.Diff) => {\n let length = component[1].length;\n while (length > 0) {\n let opLength = 0;\n switch (component[0]) {\n case diff.INSERT:\n opLength = Math.min(otherIter.peekLength(), length);\n retDelta.push(otherIter.next(opLength));\n break;\n case diff.DELETE:\n opLength = Math.min(length, thisIter.peekLength());\n thisIter.next(opLength);\n retDelta.delete(opLength);\n break;\n case diff.EQUAL:\n opLength = Math.min(\n thisIter.peekLength(),\n otherIter.peekLength(),\n length,\n );\n const thisOp = thisIter.next(opLength);\n const otherOp = otherIter.next(opLength);\n if (isEqual(thisOp.insert, otherOp.insert)) {\n retDelta.retain(\n opLength,\n AttributeMap.diff(thisOp.attributes, otherOp.attributes),\n );\n } else {\n retDelta.push(otherOp).delete(opLength);\n }\n break;\n }\n length -= opLength;\n }\n });\n return retDelta.chop();\n }\n\n eachLine(\n predicate: (\n line: Delta,\n attributes: AttributeMap,\n index: number,\n ) => boolean | void,\n newline = '\\n',\n ): void {\n const iter = new OpIterator(this.ops);\n let line = new Delta();\n let i = 0;\n while (iter.hasNext()) {\n if (iter.peekType() !== 'insert') {\n return;\n }\n const thisOp = iter.peek();\n const start = Op.length(thisOp) - iter.peekLength();\n const index =\n typeof thisOp.insert === 'string'\n ? thisOp.insert.indexOf(newline, start) - start\n : -1;\n if (index < 0) {\n line.push(iter.next());\n } else if (index > 0) {\n line.push(iter.next(index));\n } else {\n if (predicate(line, iter.next(1).attributes || {}, i) === false) {\n return;\n }\n i += 1;\n line = new Delta();\n }\n }\n if (line.length() > 0) {\n predicate(line, {}, i);\n }\n }\n\n invert(base: Delta): Delta {\n const inverted = new Delta();\n this.reduce((baseIndex, op) => {\n if (op.insert) {\n inverted.delete(Op.length(op));\n } else if (typeof op.retain === 'number' && op.attributes == null) {\n inverted.retain(op.retain);\n return baseIndex + op.retain;\n } else if (op.delete || typeof op.retain === 'number') {\n const length = (op.delete || op.retain) as number;\n const slice = base.slice(baseIndex, baseIndex + length);\n slice.forEach((baseOp) => {\n if (op.delete) {\n inverted.push(baseOp);\n } else if (op.retain && op.attributes) {\n inverted.retain(\n Op.length(baseOp),\n AttributeMap.invert(op.attributes, baseOp.attributes),\n );\n }\n });\n return baseIndex + length;\n } else if (typeof op.retain === 'object' && op.retain !== null) {\n const slice = base.slice(baseIndex, baseIndex + 1);\n const baseOp = new OpIterator(slice.ops).next();\n const [embedType, opData, baseOpData] = getEmbedTypeAndData(\n op.retain,\n baseOp.insert,\n );\n const handler = Delta.getHandler(embedType);\n inverted.retain(\n { [embedType]: handler.invert(opData, baseOpData) },\n AttributeMap.invert(op.attributes, baseOp.attributes),\n );\n return baseIndex + 1;\n }\n return baseIndex;\n }, 0);\n return inverted.chop();\n }\n\n transform(index: number, priority?: boolean): number;\n transform(other: Delta, priority?: boolean): Delta;\n transform(arg: number | Delta, priority = false): typeof arg {\n priority = !!priority;\n if (typeof arg === 'number') {\n return this.transformPosition(arg, priority);\n }\n const other: Delta = arg;\n const thisIter = new OpIterator(this.ops);\n const otherIter = new OpIterator(other.ops);\n const delta = new Delta();\n while (thisIter.hasNext() || otherIter.hasNext()) {\n if (\n thisIter.peekType() === 'insert' &&\n (priority || otherIter.peekType() !== 'insert')\n ) {\n delta.retain(Op.length(thisIter.next()));\n } else if (otherIter.peekType() === 'insert') {\n delta.push(otherIter.next());\n } else {\n const length = Math.min(thisIter.peekLength(), otherIter.peekLength());\n const thisOp = thisIter.next(length);\n const otherOp = otherIter.next(length);\n if (thisOp.delete) {\n // Our delete either makes their delete redundant or removes their retain\n continue;\n } else if (otherOp.delete) {\n delta.push(otherOp);\n } else {\n const thisData = thisOp.retain;\n const otherData = otherOp.retain;\n let transformedData: Op['retain'] =\n typeof otherData === 'object' && otherData !== null\n ? otherData\n : length;\n if (\n typeof thisData === 'object' &&\n thisData !== null &&\n typeof otherData === 'object' &&\n otherData !== null\n ) {\n const embedType = Object.keys(thisData)[0];\n if (embedType === Object.keys(otherData)[0]) {\n const handler = Delta.getHandler(embedType);\n if (handler) {\n transformedData = {\n [embedType]: handler.transform(\n thisData[embedType],\n otherData[embedType],\n priority,\n ),\n };\n }\n }\n }\n\n // We retain either their retain or insert\n delta.retain(\n transformedData,\n AttributeMap.transform(\n thisOp.attributes,\n otherOp.attributes,\n priority,\n ),\n );\n }\n }\n }\n return delta.chop();\n }\n\n transformPosition(index: number, priority = false): number {\n priority = !!priority;\n const thisIter = new OpIterator(this.ops);\n let offset = 0;\n while (thisIter.hasNext() && offset <= index) {\n const length = thisIter.peekLength();\n const nextType = thisIter.peekType();\n thisIter.next();\n if (nextType === 'delete') {\n index -= Math.min(length, index - offset);\n continue;\n } else if (nextType === 'insert' && (offset < index || !priority)) {\n index += length;\n }\n offset += length;\n }\n return index;\n }\n}\n\nexport default Delta;\n\nexport { Op, OpIterator, AttributeMap };\n\nif (typeof module === 'object') {\n module.exports = Delta;\n module.exports.default = Delta;\n}\n","import AttributeMap from './AttributeMap';\n\ninterface Op {\n // only one property out of {insert, delete, retain} will be present\n insert?: string | Record;\n delete?: number;\n retain?: number | Record;\n\n attributes?: AttributeMap;\n}\n\nnamespace Op {\n export function length(op: Op): number {\n if (typeof op.delete === 'number') {\n return op.delete;\n } else if (typeof op.retain === 'number') {\n return op.retain;\n } else if (typeof op.retain === 'object' && op.retain !== null) {\n return 1;\n } else {\n return typeof op.insert === 'string' ? op.insert.length : 1;\n }\n }\n}\n\nexport default Op;\n","import Op from './Op';\n\nexport default class Iterator {\n ops: Op[];\n index: number;\n offset: number;\n\n constructor(ops: Op[]) {\n this.ops = ops;\n this.index = 0;\n this.offset = 0;\n }\n\n hasNext(): boolean {\n return this.peekLength() < Infinity;\n }\n\n next(length?: number): Op {\n if (!length) {\n length = Infinity;\n }\n const nextOp = this.ops[this.index];\n if (nextOp) {\n const offset = this.offset;\n const opLength = Op.length(nextOp);\n if (length >= opLength - offset) {\n length = opLength - offset;\n this.index += 1;\n this.offset = 0;\n } else {\n this.offset += length;\n }\n if (typeof nextOp.delete === 'number') {\n return { delete: length };\n } else {\n const retOp: Op = {};\n if (nextOp.attributes) {\n retOp.attributes = nextOp.attributes;\n }\n if (typeof nextOp.retain === 'number') {\n retOp.retain = length;\n } else if (\n typeof nextOp.retain === 'object' &&\n nextOp.retain !== null\n ) {\n // offset should === 0, length should === 1\n retOp.retain = nextOp.retain;\n } else if (typeof nextOp.insert === 'string') {\n retOp.insert = nextOp.insert.substr(offset, length);\n } else {\n // offset should === 0, length should === 1\n retOp.insert = nextOp.insert;\n }\n return retOp;\n }\n } else {\n return { retain: Infinity };\n }\n }\n\n peek(): Op {\n return this.ops[this.index];\n }\n\n peekLength(): number {\n if (this.ops[this.index]) {\n // Should never return 0 if our index is being managed correctly\n return Op.length(this.ops[this.index]) - this.offset;\n } else {\n return Infinity;\n }\n }\n\n peekType(): string {\n const op = this.ops[this.index];\n if (op) {\n if (typeof op.delete === 'number') {\n return 'delete';\n } else if (\n typeof op.retain === 'number' ||\n (typeof op.retain === 'object' && op.retain !== null)\n ) {\n return 'retain';\n } else {\n return 'insert';\n }\n }\n return 'retain';\n }\n\n rest(): Op[] {\n if (!this.hasNext()) {\n return [];\n } else if (this.offset === 0) {\n return this.ops.slice(this.index);\n } else {\n const offset = this.offset;\n const index = this.index;\n const next = this.next();\n const rest = this.ops.slice(this.index);\n this.offset = offset;\n this.index = index;\n return [next].concat(rest);\n }\n }\n}\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nexport default listCacheClear;\n","import eq from './eq.js';\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nexport default assocIndexOf;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nexport default listCacheDelete;\n","import listCacheClear from './_listCacheClear.js';\nimport listCacheDelete from './_listCacheDelete.js';\nimport listCacheGet from './_listCacheGet.js';\nimport listCacheHas from './_listCacheHas.js';\nimport listCacheSet from './_listCacheSet.js';\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nexport default ListCache;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nexport default listCacheGet;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nexport default listCacheHas;\n","import assocIndexOf from './_assocIndexOf.js';\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nexport default listCacheSet;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nexport default Map;\n","import getNative from './_getNative.js';\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nexport default nativeCreate;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nexport default hashGet;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nexport default hashHas;\n","import hashClear from './_hashClear.js';\nimport hashDelete from './_hashDelete.js';\nimport hashGet from './_hashGet.js';\nimport hashHas from './_hashHas.js';\nimport hashSet from './_hashSet.js';\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nexport default Hash;\n","import nativeCreate from './_nativeCreate.js';\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nexport default hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default hashDelete;\n","import nativeCreate from './_nativeCreate.js';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nexport default hashSet;\n","import isKeyable from './_isKeyable.js';\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nexport default getMapData;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nexport default isKeyable;\n","import mapCacheClear from './_mapCacheClear.js';\nimport mapCacheDelete from './_mapCacheDelete.js';\nimport mapCacheGet from './_mapCacheGet.js';\nimport mapCacheHas from './_mapCacheHas.js';\nimport mapCacheSet from './_mapCacheSet.js';\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nexport default MapCache;\n","import Hash from './_Hash.js';\nimport ListCache from './_ListCache.js';\nimport Map from './_Map.js';\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nexport default mapCacheClear;\n","import getMapData from './_getMapData.js';\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nexport default mapCacheDelete;\n","import getMapData from './_getMapData.js';\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nexport default mapCacheGet;\n","import getMapData from './_getMapData.js';\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nexport default mapCacheHas;\n","import getMapData from './_getMapData.js';\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nexport default mapCacheSet;\n","import ListCache from './_ListCache.js';\nimport stackClear from './_stackClear.js';\nimport stackDelete from './_stackDelete.js';\nimport stackGet from './_stackGet.js';\nimport stackHas from './_stackHas.js';\nimport stackSet from './_stackSet.js';\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nexport default Stack;\n","import ListCache from './_ListCache.js';\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nexport default stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nexport default stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nexport default stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nexport default stackHas;\n","import ListCache from './_ListCache.js';\nimport Map from './_Map.js';\nimport MapCache from './_MapCache.js';\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nexport default stackSet;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nexport default Uint8Array;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nexport default baseTimes;\n","import baseTimes from './_baseTimes.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isIndex from './_isIndex.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default arrayLikeKeys;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nexport default arrayPush;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignValue;\n","import defineProperty from './_defineProperty.js';\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nexport default baseAssignValue;\n","import arrayPush from './_arrayPush.js';\nimport isArray from './isArray.js';\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nexport default baseGetAllKeys;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nexport default baseUnary;\n","import Uint8Array from './_Uint8Array.js';\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nexport default cloneArrayBuffer;\n","import root from './_root.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nexport default cloneBuffer;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nexport default cloneTypedArray;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nexport default copyArray;\n","import assignValue from './_assignValue.js';\nimport baseAssignValue from './_baseAssignValue.js';\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nexport default copyObject;\n","import getNative from './_getNative.js';\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nexport default defineProperty;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbols from './_getSymbols.js';\nimport keys from './keys.js';\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nexport default getAllKeys;\n","import coreJsData from './_coreJsData.js';\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nexport default isMasked;\n","import root from './_root.js';\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nexport default coreJsData;\n","import isFunction from './isFunction.js';\nimport isMasked from './_isMasked.js';\nimport isObject from './isObject.js';\nimport toSource from './_toSource.js';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nexport default baseIsNative;\n","import baseIsNative from './_baseIsNative.js';\nimport getValue from './_getValue.js';\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nexport default getNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nexport default getValue;\n","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nexport default arrayFilter;\n","import arrayFilter from './_arrayFilter.js';\nimport stubArray from './stubArray.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nexport default getSymbols;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nexport default DataView;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nexport default Promise;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nexport default Set;\n","import getNative from './_getNative.js';\nimport root from './_root.js';\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nexport default WeakMap;\n","import DataView from './_DataView.js';\nimport Map from './_Map.js';\nimport Promise from './_Promise.js';\nimport Set from './_Set.js';\nimport WeakMap from './_WeakMap.js';\nimport baseGetTag from './_baseGetTag.js';\nimport toSource from './_toSource.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nexport default getTag;\n","import isObject from './isObject.js';\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nexport default baseCreate;\n","import baseCreate from './_baseCreate.js';\nimport getPrototype from './_getPrototype.js';\nimport isPrototype from './_isPrototype.js';\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nexport default initCloneObject;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nexport default isIndex;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nexport default isPrototype;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nexport default nodeUtil;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nexport default toSource;\n","import arrayPush from './_arrayPush.js';\nimport getPrototype from './_getPrototype.js';\nimport getSymbols from './_getSymbols.js';\nimport stubArray from './stubArray.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nexport default getSymbolsIn;\n","import baseGetAllKeys from './_baseGetAllKeys.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nexport default getAllKeysIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nexport default initCloneArray;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nexport default cloneRegExp;\n","import Symbol from './_Symbol.js';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nexport default cloneSymbol;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\nimport cloneDataView from './_cloneDataView.js';\nimport cloneRegExp from './_cloneRegExp.js';\nimport cloneSymbol from './_cloneSymbol.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nexport default initCloneByTag;\n","import cloneArrayBuffer from './_cloneArrayBuffer.js';\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nexport default cloneDataView;\n","import baseIsMap from './_baseIsMap.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nexport default isMap;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nexport default baseIsMap;\n","import baseIsSet from './_baseIsSet.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nexport default isSet;\n","import getTag from './_getTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nexport default baseIsSet;\n","import Stack from './_Stack.js';\nimport arrayEach from './_arrayEach.js';\nimport assignValue from './_assignValue.js';\nimport baseAssign from './_baseAssign.js';\nimport baseAssignIn from './_baseAssignIn.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport copyArray from './_copyArray.js';\nimport copySymbols from './_copySymbols.js';\nimport copySymbolsIn from './_copySymbolsIn.js';\nimport getAllKeys from './_getAllKeys.js';\nimport getAllKeysIn from './_getAllKeysIn.js';\nimport getTag from './_getTag.js';\nimport initCloneArray from './_initCloneArray.js';\nimport initCloneByTag from './_initCloneByTag.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isMap from './isMap.js';\nimport isObject from './isObject.js';\nimport isSet from './isSet.js';\nimport keys from './keys.js';\nimport keysIn from './keysIn.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nexport default baseClone;\n","import copyObject from './_copyObject.js';\nimport getSymbolsIn from './_getSymbolsIn.js';\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nexport default copySymbolsIn;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nexport default baseAssignIn;\n","import copyObject from './_copyObject.js';\nimport getSymbols from './_getSymbols.js';\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nexport default copySymbols;\n","import copyObject from './_copyObject.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nexport default baseAssign;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nexport default arrayEach;\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nexport default cloneDeep;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nexport default eq;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nexport default baseIsArguments;\n","import baseIsArguments from './_baseIsArguments.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nexport default isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n","import isFunction from './isFunction.js';\nimport isLength from './isLength.js';\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nexport default isArrayLike;\n","import root from './_root.js';\nimport stubFalse from './stubFalse.js';\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nexport default isBuffer;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nexport default stubFalse;\n","import MapCache from './_MapCache.js';\nimport setCacheAdd from './_setCacheAdd.js';\nimport setCacheHas from './_setCacheHas.js';\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nexport default SetCache;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nexport default setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nexport default setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nexport default arraySome;\n","import SetCache from './_SetCache.js';\nimport arraySome from './_arraySome.js';\nimport cacheHas from './_cacheHas.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nexport default equalArrays;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nexport default cacheHas;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nexport default mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nexport default setToArray;\n","import Symbol from './_Symbol.js';\nimport Uint8Array from './_Uint8Array.js';\nimport eq from './eq.js';\nimport equalArrays from './_equalArrays.js';\nimport mapToArray from './_mapToArray.js';\nimport setToArray from './_setToArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nexport default equalByTag;\n","import getAllKeys from './_getAllKeys.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nexport default equalObjects;\n","import Stack from './_Stack.js';\nimport equalArrays from './_equalArrays.js';\nimport equalByTag from './_equalByTag.js';\nimport equalObjects from './_equalObjects.js';\nimport getTag from './_getTag.js';\nimport isArray from './isArray.js';\nimport isBuffer from './isBuffer.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nexport default baseIsEqualDeep;\n","import baseIsEqualDeep from './_baseIsEqualDeep.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nexport default baseIsEqual;\n","import baseIsEqual from './_baseIsEqual.js';\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nexport default isEqual;\n","import baseGetTag from './_baseGetTag.js';\nimport isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nexport default isLength;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isLength from './isLength.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nexport default baseIsTypedArray;\n","import baseIsTypedArray from './_baseIsTypedArray.js';\nimport baseUnary from './_baseUnary.js';\nimport nodeUtil from './_nodeUtil.js';\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nexport default isTypedArray;\n","import overArg from './_overArg.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nexport default nativeKeys;\n","import isPrototype from './_isPrototype.js';\nimport nativeKeys from './_nativeKeys.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeys;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeys from './_baseKeys.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nexport default keys;\n","import isObject from './isObject.js';\nimport isPrototype from './_isPrototype.js';\nimport nativeKeysIn from './_nativeKeysIn.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nexport default nativeKeysIn;\n","import arrayLikeKeys from './_arrayLikeKeys.js';\nimport baseKeysIn from './_baseKeysIn.js';\nimport isArrayLike from './isArrayLike.js';\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nexport default keysIn;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nexport default shortOut;\n","import baseRest from './_baseRest.js';\nimport isIterateeCall from './_isIterateeCall.js';\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nexport default createAssigner;\n","import baseAssignValue from './_baseAssignValue.js';\nimport eq from './eq.js';\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nexport default assignMergeValue;\n","import createBaseFor from './_createBaseFor.js';\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nexport default baseFor;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nexport default createBaseFor;\n","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nexport default safeGet;\n","import assignMergeValue from './_assignMergeValue.js';\nimport cloneBuffer from './_cloneBuffer.js';\nimport cloneTypedArray from './_cloneTypedArray.js';\nimport copyArray from './_copyArray.js';\nimport initCloneObject from './_initCloneObject.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLikeObject from './isArrayLikeObject.js';\nimport isBuffer from './isBuffer.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isPlainObject from './isPlainObject.js';\nimport isTypedArray from './isTypedArray.js';\nimport safeGet from './_safeGet.js';\nimport toPlainObject from './toPlainObject.js';\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nexport default baseMergeDeep;\n","import isArrayLike from './isArrayLike.js';\nimport isObjectLike from './isObjectLike.js';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n","import copyObject from './_copyObject.js';\nimport keysIn from './keysIn.js';\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nexport default toPlainObject;\n","import Stack from './_Stack.js';\nimport assignMergeValue from './_assignMergeValue.js';\nimport baseFor from './_baseFor.js';\nimport baseMergeDeep from './_baseMergeDeep.js';\nimport isObject from './isObject.js';\nimport keysIn from './keysIn.js';\nimport safeGet from './_safeGet.js';\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nexport default baseMerge;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nexport default identity;\n","import apply from './_apply.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nexport default overRest;\n","import constant from './constant.js';\nimport defineProperty from './_defineProperty.js';\nimport identity from './identity.js';\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nexport default baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nexport default constant;\n","import baseSetToString from './_baseSetToString.js';\nimport shortOut from './_shortOut.js';\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nexport default setToString;\n","import identity from './identity.js';\nimport overRest from './_overRest.js';\nimport setToString from './_setToString.js';\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nexport default baseRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nexport default apply;\n","import baseMerge from './_baseMerge.js';\nimport createAssigner from './_createAssigner.js';\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nexport default merge;\n","import eq from './eq.js';\nimport isArrayLike from './isArrayLike.js';\nimport isIndex from './_isIndex.js';\nimport isObject from './isObject.js';\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nexport default isIterateeCall;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nexport default stubArray;\n","enum Scope {\n TYPE = (1 << 2) - 1, // 0011 Lower two bits\n LEVEL = ((1 << 2) - 1) << 2, // 1100 Higher two bits\n\n ATTRIBUTE = (1 << 0) | LEVEL, // 1101\n BLOT = (1 << 1) | LEVEL, // 1110\n INLINE = (1 << 2) | TYPE, // 0111\n BLOCK = (1 << 3) | TYPE, // 1011\n\n BLOCK_BLOT = BLOCK & BLOT, // 1010\n INLINE_BLOT = INLINE & BLOT, // 0110\n BLOCK_ATTRIBUTE = BLOCK & ATTRIBUTE, // 1001\n INLINE_ATTRIBUTE = INLINE & ATTRIBUTE, // 0101\n\n ANY = TYPE | LEVEL,\n}\n\nexport default Scope;\n","import Scope from '../scope.js';\n\nexport interface AttributorOptions {\n scope?: Scope;\n whitelist?: string[];\n}\n\nexport default class Attributor {\n public static keys(node: HTMLElement): string[] {\n return Array.from(node.attributes).map((item: Attr) => item.name);\n }\n\n public scope: Scope;\n public whitelist: string[] | undefined;\n\n constructor(\n public readonly attrName: string,\n public readonly keyName: string,\n options: AttributorOptions = {},\n ) {\n const attributeBit = Scope.TYPE & Scope.ATTRIBUTE;\n this.scope =\n options.scope != null\n ? // Ignore type bits, force attribute bit\n (options.scope & Scope.LEVEL) | attributeBit\n : Scope.ATTRIBUTE;\n if (options.whitelist != null) {\n this.whitelist = options.whitelist;\n }\n }\n\n public add(node: HTMLElement, value: any): boolean {\n if (!this.canAdd(node, value)) {\n return false;\n }\n node.setAttribute(this.keyName, value);\n return true;\n }\n\n public canAdd(_node: HTMLElement, value: any): boolean {\n if (this.whitelist == null) {\n return true;\n }\n if (typeof value === 'string') {\n return this.whitelist.indexOf(value.replace(/[\"']/g, '')) > -1;\n } else {\n return this.whitelist.indexOf(value) > -1;\n }\n }\n\n public remove(node: HTMLElement): void {\n node.removeAttribute(this.keyName);\n }\n\n public value(node: HTMLElement): any {\n const value = node.getAttribute(this.keyName);\n if (this.canAdd(node, value) && value) {\n return value;\n }\n return '';\n }\n}\n","export default class ParchmentError extends Error {\n public message: string;\n public name: string;\n public stack!: string;\n\n constructor(message: string) {\n message = '[Parchment] ' + message;\n super(message);\n this.message = message;\n this.name = this.constructor.name;\n }\n}\n","import Attributor from './attributor/attributor.js';\nimport {\n type Blot,\n type BlotConstructor,\n type Root,\n} from './blot/abstract/blot.js';\nimport ParchmentError from './error.js';\nimport Scope from './scope.js';\n\nexport type RegistryDefinition = Attributor | BlotConstructor;\n\nexport interface RegistryInterface {\n create(scroll: Root, input: Node | string | Scope, value?: any): Blot;\n query(query: string | Node | Scope, scope: Scope): RegistryDefinition | null;\n register(...definitions: any[]): any;\n}\n\nexport default class Registry implements RegistryInterface {\n public static blots = new WeakMap();\n\n public static find(node?: Node | null, bubble = false): Blot | null {\n if (node == null) {\n return null;\n }\n if (this.blots.has(node)) {\n return this.blots.get(node) || null;\n }\n if (bubble) {\n let parentNode: Node | null = null;\n try {\n parentNode = node.parentNode;\n } catch (err) {\n // Probably hit a permission denied error.\n // A known case is in Firefox, event targets can be anonymous DIVs\n // inside an input element.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n return null;\n }\n return this.find(parentNode, bubble);\n }\n return null;\n }\n\n private attributes: { [key: string]: Attributor } = {};\n private classes: { [key: string]: BlotConstructor } = {};\n private tags: { [key: string]: BlotConstructor } = {};\n private types: { [key: string]: RegistryDefinition } = {};\n\n public create(scroll: Root, input: Node | string | Scope, value?: any): Blot {\n const match = this.query(input);\n if (match == null) {\n throw new ParchmentError(`Unable to create ${input} blot`);\n }\n const blotClass = match as BlotConstructor;\n const node =\n // @ts-expect-error Fix me later\n input instanceof Node || input.nodeType === Node.TEXT_NODE\n ? input\n : blotClass.create(value);\n\n const blot = new blotClass(scroll, node as Node, value);\n Registry.blots.set(blot.domNode, blot);\n return blot;\n }\n\n public find(node: Node | null, bubble = false): Blot | null {\n return Registry.find(node, bubble);\n }\n\n public query(\n query: string | Node | Scope,\n scope: Scope = Scope.ANY,\n ): RegistryDefinition | null {\n let match;\n if (typeof query === 'string') {\n match = this.types[query] || this.attributes[query];\n // @ts-expect-error Fix me later\n } else if (query instanceof Text || query.nodeType === Node.TEXT_NODE) {\n match = this.types.text;\n } else if (typeof query === 'number') {\n if (query & Scope.LEVEL & Scope.BLOCK) {\n match = this.types.block;\n } else if (query & Scope.LEVEL & Scope.INLINE) {\n match = this.types.inline;\n }\n } else if (query instanceof Element) {\n const names = (query.getAttribute('class') || '').split(/\\s+/);\n names.some((name) => {\n match = this.classes[name];\n if (match) {\n return true;\n }\n return false;\n });\n match = match || this.tags[query.tagName];\n }\n if (match == null) {\n return null;\n }\n if (\n 'scope' in match &&\n scope & Scope.LEVEL & match.scope &&\n scope & Scope.TYPE & match.scope\n ) {\n return match;\n }\n return null;\n }\n\n public register(...definitions: RegistryDefinition[]): RegistryDefinition[] {\n return definitions.map((definition) => {\n const isBlot = 'blotName' in definition;\n const isAttr = 'attrName' in definition;\n if (!isBlot && !isAttr) {\n throw new ParchmentError('Invalid definition');\n } else if (isBlot && definition.blotName === 'abstract') {\n throw new ParchmentError('Cannot register abstract class');\n }\n const key = isBlot\n ? definition.blotName\n : isAttr\n ? definition.attrName\n : (undefined as never); // already handled by above checks\n this.types[key] = definition;\n\n if (isAttr) {\n if (typeof definition.keyName === 'string') {\n this.attributes[definition.keyName] = definition;\n }\n } else if (isBlot) {\n if (definition.className) {\n this.classes[definition.className] = definition;\n }\n if (definition.tagName) {\n if (Array.isArray(definition.tagName)) {\n definition.tagName = definition.tagName.map((tagName: string) => {\n return tagName.toUpperCase();\n });\n } else {\n definition.tagName = definition.tagName.toUpperCase();\n }\n const tagNames = Array.isArray(definition.tagName)\n ? definition.tagName\n : [definition.tagName];\n tagNames.forEach((tag: string) => {\n if (this.tags[tag] == null || definition.className == null) {\n this.tags[tag] = definition;\n }\n });\n }\n }\n return definition;\n });\n }\n}\n","import Attributor from './attributor.js';\n\nfunction match(node: HTMLElement, prefix: string): string[] {\n const className = node.getAttribute('class') || '';\n return className\n .split(/\\s+/)\n .filter((name) => name.indexOf(`${prefix}-`) === 0);\n}\n\nclass ClassAttributor extends Attributor {\n public static keys(node: HTMLElement): string[] {\n return (node.getAttribute('class') || '')\n .split(/\\s+/)\n .map((name) => name.split('-').slice(0, -1).join('-'));\n }\n\n public add(node: HTMLElement, value: any): boolean {\n if (!this.canAdd(node, value)) {\n return false;\n }\n this.remove(node);\n node.classList.add(`${this.keyName}-${value}`);\n return true;\n }\n\n public remove(node: HTMLElement): void {\n const matches = match(node, this.keyName);\n matches.forEach((name) => {\n node.classList.remove(name);\n });\n if (node.classList.length === 0) {\n node.removeAttribute('class');\n }\n }\n\n public value(node: HTMLElement): any {\n const result = match(node, this.keyName)[0] || '';\n const value = result.slice(this.keyName.length + 1); // +1 for hyphen\n return this.canAdd(node, value) ? value : '';\n }\n}\n\nexport default ClassAttributor;\n","import Attributor from './attributor.js';\n\nfunction camelize(name: string): string {\n const parts = name.split('-');\n const rest = parts\n .slice(1)\n .map((part: string) => part[0].toUpperCase() + part.slice(1))\n .join('');\n return parts[0] + rest;\n}\n\nclass StyleAttributor extends Attributor {\n public static keys(node: HTMLElement): string[] {\n return (node.getAttribute('style') || '').split(';').map((value) => {\n const arr = value.split(':');\n return arr[0].trim();\n });\n }\n\n public add(node: HTMLElement, value: any): boolean {\n if (!this.canAdd(node, value)) {\n return false;\n }\n // @ts-expect-error Fix me later\n node.style[camelize(this.keyName)] = value;\n return true;\n }\n\n public remove(node: HTMLElement): void {\n // @ts-expect-error Fix me later\n node.style[camelize(this.keyName)] = '';\n if (!node.getAttribute('style')) {\n node.removeAttribute('style');\n }\n }\n\n public value(node: HTMLElement): any {\n // @ts-expect-error Fix me later\n const value = node.style[camelize(this.keyName)];\n return this.canAdd(node, value) ? value : '';\n }\n}\n\nexport default StyleAttributor;\n","import type { Formattable } from '../blot/abstract/blot.js';\nimport Registry from '../registry.js';\nimport Scope from '../scope.js';\nimport Attributor from './attributor.js';\nimport ClassAttributor from './class.js';\nimport StyleAttributor from './style.js';\n\nclass AttributorStore {\n private attributes: { [key: string]: Attributor } = {};\n private domNode: HTMLElement;\n\n constructor(domNode: HTMLElement) {\n this.domNode = domNode;\n this.build();\n }\n\n public attribute(attribute: Attributor, value: any): void {\n // verb\n if (value) {\n if (attribute.add(this.domNode, value)) {\n if (attribute.value(this.domNode) != null) {\n this.attributes[attribute.attrName] = attribute;\n } else {\n delete this.attributes[attribute.attrName];\n }\n }\n } else {\n attribute.remove(this.domNode);\n delete this.attributes[attribute.attrName];\n }\n }\n\n public build(): void {\n this.attributes = {};\n const blot = Registry.find(this.domNode);\n if (blot == null) {\n return;\n }\n const attributes = Attributor.keys(this.domNode);\n const classes = ClassAttributor.keys(this.domNode);\n const styles = StyleAttributor.keys(this.domNode);\n attributes\n .concat(classes)\n .concat(styles)\n .forEach((name) => {\n const attr = blot.scroll.query(name, Scope.ATTRIBUTE);\n if (attr instanceof Attributor) {\n this.attributes[attr.attrName] = attr;\n }\n });\n }\n\n public copy(target: Formattable): void {\n Object.keys(this.attributes).forEach((key) => {\n const value = this.attributes[key].value(this.domNode);\n target.format(key, value);\n });\n }\n\n public move(target: Formattable): void {\n this.copy(target);\n Object.keys(this.attributes).forEach((key) => {\n this.attributes[key].remove(this.domNode);\n });\n this.attributes = {};\n }\n\n public values(): { [key: string]: any } {\n return Object.keys(this.attributes).reduce(\n (attributes: { [key: string]: any }, name: string) => {\n attributes[name] = this.attributes[name].value(this.domNode);\n return attributes;\n },\n {},\n );\n }\n}\n\nexport default AttributorStore;\n","import ParchmentError from '../../error.js';\nimport Registry from '../../registry.js';\nimport Scope from '../../scope.js';\nimport type {\n Blot,\n BlotConstructor,\n Formattable,\n Parent,\n Root,\n} from './blot.js';\n\nclass ShadowBlot implements Blot {\n public static blotName = 'abstract';\n public static className: string;\n public static requiredContainer: BlotConstructor;\n public static scope: Scope;\n public static tagName: string | string[];\n\n public static create(rawValue?: unknown): Node {\n if (this.tagName == null) {\n throw new ParchmentError('Blot definition missing tagName');\n }\n let node: HTMLElement;\n let value: string | number | undefined;\n if (Array.isArray(this.tagName)) {\n if (typeof rawValue === 'string') {\n value = rawValue.toUpperCase();\n if (parseInt(value, 10).toString() === value) {\n value = parseInt(value, 10);\n }\n } else if (typeof rawValue === 'number') {\n value = rawValue;\n }\n if (typeof value === 'number') {\n node = document.createElement(this.tagName[value - 1]);\n } else if (value && this.tagName.indexOf(value) > -1) {\n node = document.createElement(value);\n } else {\n node = document.createElement(this.tagName[0]);\n }\n } else {\n node = document.createElement(this.tagName);\n }\n if (this.className) {\n node.classList.add(this.className);\n }\n return node;\n }\n\n public prev: Blot | null;\n public next: Blot | null;\n // @ts-expect-error Fix me later\n public parent: Parent;\n\n // Hack for accessing inherited static methods\n get statics(): any {\n return this.constructor;\n }\n constructor(\n public scroll: Root,\n public domNode: Node,\n ) {\n Registry.blots.set(domNode, this);\n this.prev = null;\n this.next = null;\n }\n\n public attach(): void {\n // Nothing to do\n }\n\n public clone(): Blot {\n const domNode = this.domNode.cloneNode(false);\n return this.scroll.create(domNode);\n }\n\n public detach(): void {\n if (this.parent != null) {\n this.parent.removeChild(this);\n }\n Registry.blots.delete(this.domNode);\n }\n\n public deleteAt(index: number, length: number): void {\n const blot = this.isolate(index, length);\n blot.remove();\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n const blot = this.isolate(index, length);\n if (this.scroll.query(name, Scope.BLOT) != null && value) {\n blot.wrap(name, value);\n } else if (this.scroll.query(name, Scope.ATTRIBUTE) != null) {\n const parent = this.scroll.create(this.statics.scope) as Parent &\n Formattable;\n blot.wrap(parent);\n parent.format(name, value);\n }\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n const blot =\n def == null\n ? this.scroll.create('text', value)\n : this.scroll.create(value, def);\n const ref = this.split(index);\n this.parent.insertBefore(blot, ref || undefined);\n }\n\n public isolate(index: number, length: number): Blot {\n const target = this.split(index);\n if (target == null) {\n throw new Error('Attempt to isolate at end');\n }\n target.split(length);\n return target;\n }\n\n public length(): number {\n return 1;\n }\n\n public offset(root: Blot = this.parent): number {\n if (this.parent == null || this === root) {\n return 0;\n }\n return this.parent.children.offset(this) + this.parent.offset(root);\n }\n\n public optimize(_context?: { [key: string]: any }): void {\n if (\n this.statics.requiredContainer &&\n !(this.parent instanceof this.statics.requiredContainer)\n ) {\n this.wrap(this.statics.requiredContainer.blotName);\n }\n }\n\n public remove(): void {\n if (this.domNode.parentNode != null) {\n this.domNode.parentNode.removeChild(this.domNode);\n }\n this.detach();\n }\n\n public replaceWith(name: string | Blot, value?: any): Blot {\n const replacement =\n typeof name === 'string' ? this.scroll.create(name, value) : name;\n if (this.parent != null) {\n this.parent.insertBefore(replacement, this.next || undefined);\n this.remove();\n }\n return replacement;\n }\n\n public split(index: number, _force?: boolean): Blot | null {\n return index === 0 ? this : this.next;\n }\n\n public update(\n _mutations: MutationRecord[],\n _context: { [key: string]: any },\n ): void {\n // Nothing to do by default\n }\n\n public wrap(name: string | Parent, value?: any): Parent {\n const wrapper =\n typeof name === 'string'\n ? (this.scroll.create(name, value) as Parent)\n : name;\n if (this.parent != null) {\n this.parent.insertBefore(wrapper, this.next || undefined);\n }\n if (typeof wrapper.appendChild !== 'function') {\n throw new ParchmentError(`Cannot wrap ${name}`);\n }\n wrapper.appendChild(this);\n return wrapper;\n }\n}\n\nexport default ShadowBlot;\n","import Scope from '../../scope.js';\nimport type { Leaf } from './blot.js';\nimport ShadowBlot from './shadow.js';\n\nclass LeafBlot extends ShadowBlot implements Leaf {\n public static scope = Scope.INLINE_BLOT;\n\n /**\n * Returns the value represented by domNode if it is this Blot's type\n * No checking that domNode can represent this Blot type is required so\n * applications needing it should check externally before calling.\n */\n public static value(_domNode: Node): any {\n return true;\n }\n\n /**\n * Given location represented by node and offset from DOM Selection Range,\n * return index to that location.\n */\n public index(node: Node, offset: number): number {\n if (\n this.domNode === node ||\n this.domNode.compareDocumentPosition(node) &\n Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return Math.min(offset, 1);\n }\n return -1;\n }\n\n /**\n * Given index to location within blot, return node and offset representing\n * that location, consumable by DOM Selection Range\n */\n public position(index: number, _inclusive?: boolean): [Node, number] {\n const childNodes: Node[] = Array.from(this.parent.domNode.childNodes);\n let offset = childNodes.indexOf(this.domNode);\n if (index > 0) {\n offset += 1;\n }\n return [this.parent.domNode, offset];\n }\n\n /**\n * Return value represented by this blot\n * Should not change without interaction from API or\n * user change detectable by update()\n */\n public value(): any {\n return {\n [this.statics.blotName]: this.statics.value(this.domNode) || true,\n };\n }\n}\n\nexport default LeafBlot;\n","import type LinkedNode from './linked-node.js';\n\nclass LinkedList {\n public head: T | null;\n public tail: T | null;\n public length: number;\n\n constructor() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n public append(...nodes: T[]): void {\n this.insertBefore(nodes[0], null);\n if (nodes.length > 1) {\n const rest = nodes.slice(1);\n this.append(...rest);\n }\n }\n\n public at(index: number): T | null {\n const next = this.iterator();\n let cur = next();\n while (cur && index > 0) {\n index -= 1;\n cur = next();\n }\n return cur;\n }\n\n public contains(node: T): boolean {\n const next = this.iterator();\n let cur = next();\n while (cur) {\n if (cur === node) {\n return true;\n }\n cur = next();\n }\n return false;\n }\n\n public indexOf(node: T): number {\n const next = this.iterator();\n let cur = next();\n let index = 0;\n while (cur) {\n if (cur === node) {\n return index;\n }\n index += 1;\n cur = next();\n }\n return -1;\n }\n\n public insertBefore(node: T | null, refNode: T | null): void {\n if (node == null) {\n return;\n }\n this.remove(node);\n node.next = refNode;\n if (refNode != null) {\n node.prev = refNode.prev;\n if (refNode.prev != null) {\n refNode.prev.next = node;\n }\n refNode.prev = node;\n if (refNode === this.head) {\n this.head = node;\n }\n } else if (this.tail != null) {\n this.tail.next = node;\n node.prev = this.tail;\n this.tail = node;\n } else {\n node.prev = null;\n this.head = this.tail = node;\n }\n this.length += 1;\n }\n\n public offset(target: T): number {\n let index = 0;\n let cur = this.head;\n while (cur != null) {\n if (cur === target) {\n return index;\n }\n index += cur.length();\n cur = cur.next as T;\n }\n return -1;\n }\n\n public remove(node: T): void {\n if (!this.contains(node)) {\n return;\n }\n if (node.prev != null) {\n node.prev.next = node.next;\n }\n if (node.next != null) {\n node.next.prev = node.prev;\n }\n if (node === this.head) {\n this.head = node.next as T;\n }\n if (node === this.tail) {\n this.tail = node.prev as T;\n }\n this.length -= 1;\n }\n\n public iterator(curNode: T | null = this.head): () => T | null {\n // TODO use yield when we can\n return (): T | null => {\n const ret = curNode;\n if (curNode != null) {\n curNode = curNode.next as T;\n }\n return ret;\n };\n }\n\n public find(index: number, inclusive = false): [T | null, number] {\n const next = this.iterator();\n let cur = next();\n while (cur) {\n const length = cur.length();\n if (\n index < length ||\n (inclusive &&\n index === length &&\n (cur.next == null || cur.next.length() !== 0))\n ) {\n return [cur, index];\n }\n index -= length;\n cur = next();\n }\n return [null, 0];\n }\n\n public forEach(callback: (cur: T) => void): void {\n const next = this.iterator();\n let cur = next();\n while (cur) {\n callback(cur);\n cur = next();\n }\n }\n\n public forEachAt(\n index: number,\n length: number,\n callback: (cur: T, offset: number, length: number) => void,\n ): void {\n if (length <= 0) {\n return;\n }\n const [startNode, offset] = this.find(index);\n let curIndex = index - offset;\n const next = this.iterator(startNode);\n let cur = next();\n while (cur && curIndex < index + length) {\n const curLength = cur.length();\n if (index > curIndex) {\n callback(\n cur,\n index - curIndex,\n Math.min(length, curIndex + curLength - index),\n );\n } else {\n callback(cur, 0, Math.min(curLength, index + length - curIndex));\n }\n curIndex += curLength;\n cur = next();\n }\n }\n\n public map(callback: (cur: T) => any): any[] {\n return this.reduce((memo: T[], cur: T) => {\n memo.push(callback(cur));\n return memo;\n }, []);\n }\n\n public reduce(callback: (memo: M, cur: T) => M, memo: M): M {\n const next = this.iterator();\n let cur = next();\n while (cur) {\n memo = callback(memo, cur);\n cur = next();\n }\n return memo;\n }\n}\n\nexport default LinkedList;\n","import LinkedList from '../../collection/linked-list.js';\nimport ParchmentError from '../../error.js';\nimport Scope from '../../scope.js';\nimport type { Blot, BlotConstructor, Parent, Root } from './blot.js';\nimport ShadowBlot from './shadow.js';\n\nfunction makeAttachedBlot(node: Node, scroll: Root): Blot {\n const found = scroll.find(node);\n if (found) return found;\n try {\n return scroll.create(node);\n } catch (e) {\n const blot = scroll.create(Scope.INLINE);\n Array.from(node.childNodes).forEach((child: Node) => {\n blot.domNode.appendChild(child);\n });\n if (node.parentNode) {\n node.parentNode.replaceChild(blot.domNode, node);\n }\n blot.attach();\n return blot;\n }\n}\n\nclass ParentBlot extends ShadowBlot implements Parent {\n /**\n * Whitelist array of Blots that can be direct children.\n */\n public static allowedChildren?: BlotConstructor[];\n\n /**\n * Default child blot to be inserted if this blot becomes empty.\n */\n public static defaultChild?: BlotConstructor;\n public static uiClass = '';\n\n public children!: LinkedList;\n public domNode!: HTMLElement;\n public uiNode: HTMLElement | null = null;\n\n constructor(scroll: Root, domNode: Node) {\n super(scroll, domNode);\n this.build();\n }\n\n public appendChild(other: Blot): void {\n this.insertBefore(other);\n }\n\n public attach(): void {\n super.attach();\n this.children.forEach((child) => {\n child.attach();\n });\n }\n\n public attachUI(node: HTMLElement): void {\n if (this.uiNode != null) {\n this.uiNode.remove();\n }\n this.uiNode = node;\n if (ParentBlot.uiClass) {\n this.uiNode.classList.add(ParentBlot.uiClass);\n }\n this.uiNode.setAttribute('contenteditable', 'false');\n this.domNode.insertBefore(this.uiNode, this.domNode.firstChild);\n }\n\n /**\n * Called during construction, should fill its own children LinkedList.\n */\n public build(): void {\n this.children = new LinkedList();\n // Need to be reversed for if DOM nodes already in order\n Array.from(this.domNode.childNodes)\n .filter((node: Node) => node !== this.uiNode)\n .reverse()\n .forEach((node: Node) => {\n try {\n const child = makeAttachedBlot(node, this.scroll);\n this.insertBefore(child, this.children.head || undefined);\n } catch (err) {\n if (err instanceof ParchmentError) {\n return;\n } else {\n throw err;\n }\n }\n });\n }\n\n public deleteAt(index: number, length: number): void {\n if (index === 0 && length === this.length()) {\n return this.remove();\n }\n this.children.forEachAt(index, length, (child, offset, childLength) => {\n child.deleteAt(offset, childLength);\n });\n }\n\n public descendant(\n criteria: new (...args: any[]) => T,\n index: number,\n ): [T | null, number];\n public descendant(\n criteria: (blot: Blot) => boolean,\n index: number,\n ): [Blot | null, number];\n public descendant(criteria: any, index = 0): [Blot | null, number] {\n const [child, offset] = this.children.find(index);\n if (\n (criteria.blotName == null && criteria(child)) ||\n (criteria.blotName != null && child instanceof criteria)\n ) {\n return [child as any, offset];\n } else if (child instanceof ParentBlot) {\n return child.descendant(criteria, offset);\n } else {\n return [null, -1];\n }\n }\n\n public descendants(\n criteria: new (...args: any[]) => T,\n index?: number,\n length?: number,\n ): T[];\n public descendants(\n criteria: (blot: Blot) => boolean,\n index?: number,\n length?: number,\n ): Blot[];\n public descendants(\n criteria: any,\n index = 0,\n length: number = Number.MAX_VALUE,\n ): Blot[] {\n let descendants: Blot[] = [];\n let lengthLeft = length;\n this.children.forEachAt(\n index,\n length,\n (child: Blot, childIndex: number, childLength: number) => {\n if (\n (criteria.blotName == null && criteria(child)) ||\n (criteria.blotName != null && child instanceof criteria)\n ) {\n descendants.push(child);\n }\n if (child instanceof ParentBlot) {\n descendants = descendants.concat(\n child.descendants(criteria, childIndex, lengthLeft),\n );\n }\n lengthLeft -= childLength;\n },\n );\n return descendants;\n }\n\n public detach(): void {\n this.children.forEach((child) => {\n child.detach();\n });\n super.detach();\n }\n\n public enforceAllowedChildren(): void {\n let done = false;\n this.children.forEach((child: Blot) => {\n if (done) {\n return;\n }\n const allowed = this.statics.allowedChildren.some(\n (def: BlotConstructor) => child instanceof def,\n );\n if (allowed) {\n return;\n }\n if (child.statics.scope === Scope.BLOCK_BLOT) {\n if (child.next != null) {\n this.splitAfter(child);\n }\n if (child.prev != null) {\n this.splitAfter(child.prev);\n }\n child.parent.unwrap();\n done = true;\n } else if (child instanceof ParentBlot) {\n child.unwrap();\n } else {\n child.remove();\n }\n });\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n this.children.forEachAt(index, length, (child, offset, childLength) => {\n child.formatAt(offset, childLength, name, value);\n });\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n const [child, offset] = this.children.find(index);\n if (child) {\n child.insertAt(offset, value, def);\n } else {\n const blot =\n def == null\n ? this.scroll.create('text', value)\n : this.scroll.create(value, def);\n this.appendChild(blot);\n }\n }\n\n public insertBefore(childBlot: Blot, refBlot?: Blot | null): void {\n if (childBlot.parent != null) {\n childBlot.parent.children.remove(childBlot);\n }\n let refDomNode: Node | null = null;\n this.children.insertBefore(childBlot, refBlot || null);\n childBlot.parent = this;\n if (refBlot != null) {\n refDomNode = refBlot.domNode;\n }\n if (\n this.domNode.parentNode !== childBlot.domNode ||\n this.domNode.nextSibling !== refDomNode\n ) {\n this.domNode.insertBefore(childBlot.domNode, refDomNode);\n }\n childBlot.attach();\n }\n\n public length(): number {\n return this.children.reduce((memo, child) => {\n return memo + child.length();\n }, 0);\n }\n\n public moveChildren(targetParent: Parent, refNode?: Blot): void {\n this.children.forEach((child) => {\n targetParent.insertBefore(child, refNode);\n });\n }\n\n public optimize(context?: { [key: string]: any }): void {\n super.optimize(context);\n this.enforceAllowedChildren();\n if (this.uiNode != null && this.uiNode !== this.domNode.firstChild) {\n this.domNode.insertBefore(this.uiNode, this.domNode.firstChild);\n }\n if (this.children.length === 0) {\n if (this.statics.defaultChild != null) {\n const child = this.scroll.create(this.statics.defaultChild.blotName);\n this.appendChild(child);\n // TODO double check if necessary\n // child.optimize(context);\n } else {\n this.remove();\n }\n }\n }\n\n public path(index: number, inclusive = false): [Blot, number][] {\n const [child, offset] = this.children.find(index, inclusive);\n const position: [Blot, number][] = [[this, index]];\n if (child instanceof ParentBlot) {\n return position.concat(child.path(offset, inclusive));\n } else if (child != null) {\n position.push([child, offset]);\n }\n return position;\n }\n\n public removeChild(child: Blot): void {\n this.children.remove(child);\n }\n\n public replaceWith(name: string | Blot, value?: any): Blot {\n const replacement =\n typeof name === 'string' ? this.scroll.create(name, value) : name;\n if (replacement instanceof ParentBlot) {\n this.moveChildren(replacement);\n }\n return super.replaceWith(replacement);\n }\n\n public split(index: number, force = false): Blot | null {\n if (!force) {\n if (index === 0) {\n return this;\n }\n if (index === this.length()) {\n return this.next;\n }\n }\n const after = this.clone() as ParentBlot;\n if (this.parent) {\n this.parent.insertBefore(after, this.next || undefined);\n }\n this.children.forEachAt(index, this.length(), (child, offset, _length) => {\n const split = child.split(offset, force);\n if (split != null) {\n after.appendChild(split);\n }\n });\n return after;\n }\n\n public splitAfter(child: Blot): Parent {\n const after = this.clone() as ParentBlot;\n while (child.next != null) {\n after.appendChild(child.next);\n }\n if (this.parent) {\n this.parent.insertBefore(after, this.next || undefined);\n }\n return after;\n }\n\n public unwrap(): void {\n if (this.parent) {\n this.moveChildren(this.parent, this.next || undefined);\n }\n this.remove();\n }\n\n public update(\n mutations: MutationRecord[],\n _context: { [key: string]: any },\n ): void {\n const addedNodes: Node[] = [];\n const removedNodes: Node[] = [];\n mutations.forEach((mutation) => {\n if (mutation.target === this.domNode && mutation.type === 'childList') {\n addedNodes.push(...mutation.addedNodes);\n removedNodes.push(...mutation.removedNodes);\n }\n });\n removedNodes.forEach((node: Node) => {\n // Check node has actually been removed\n // One exception is Chrome does not immediately remove IFRAMEs\n // from DOM but MutationRecord is correct in its reported removal\n if (\n node.parentNode != null &&\n // @ts-expect-error Fix me later\n node.tagName !== 'IFRAME' &&\n document.body.compareDocumentPosition(node) &\n Node.DOCUMENT_POSITION_CONTAINED_BY\n ) {\n return;\n }\n const blot = this.scroll.find(node);\n if (blot == null) {\n return;\n }\n if (\n blot.domNode.parentNode == null ||\n blot.domNode.parentNode === this.domNode\n ) {\n blot.detach();\n }\n });\n addedNodes\n .filter((node) => {\n return node.parentNode === this.domNode && node !== this.uiNode;\n })\n .sort((a, b) => {\n if (a === b) {\n return 0;\n }\n if (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) {\n return 1;\n }\n return -1;\n })\n .forEach((node) => {\n let refBlot: Blot | null = null;\n if (node.nextSibling != null) {\n refBlot = this.scroll.find(node.nextSibling);\n }\n const blot = makeAttachedBlot(node, this.scroll);\n if (blot.next !== refBlot || blot.next == null) {\n if (blot.parent != null) {\n blot.parent.removeChild(this);\n }\n this.insertBefore(blot, refBlot || undefined);\n }\n });\n this.enforceAllowedChildren();\n }\n}\n\nexport default ParentBlot;\n","import Attributor from '../attributor/attributor.js';\nimport AttributorStore from '../attributor/store.js';\nimport Scope from '../scope.js';\nimport type {\n Blot,\n BlotConstructor,\n Formattable,\n Parent,\n Root,\n} from './abstract/blot.js';\nimport LeafBlot from './abstract/leaf.js';\nimport ParentBlot from './abstract/parent.js';\n\n// Shallow object comparison\nfunction isEqual(\n obj1: Record,\n obj2: Record,\n): boolean {\n if (Object.keys(obj1).length !== Object.keys(obj2).length) {\n return false;\n }\n for (const prop in obj1) {\n if (obj1[prop] !== obj2[prop]) {\n return false;\n }\n }\n return true;\n}\n\nclass InlineBlot extends ParentBlot implements Formattable {\n public static allowedChildren: BlotConstructor[] = [InlineBlot, LeafBlot];\n public static blotName = 'inline';\n public static scope = Scope.INLINE_BLOT;\n public static tagName: string | string[] = 'SPAN';\n\n static create(value?: unknown) {\n return super.create(value) as HTMLElement;\n }\n\n public static formats(domNode: HTMLElement, scroll: Root): any {\n const match = scroll.query(InlineBlot.blotName);\n if (\n match != null &&\n domNode.tagName === (match as BlotConstructor).tagName\n ) {\n return undefined;\n } else if (typeof this.tagName === 'string') {\n return true;\n } else if (Array.isArray(this.tagName)) {\n return domNode.tagName.toLowerCase();\n }\n return undefined;\n }\n\n protected attributes: AttributorStore;\n\n constructor(scroll: Root, domNode: Node) {\n super(scroll, domNode);\n this.attributes = new AttributorStore(this.domNode);\n }\n\n public format(name: string, value: any): void {\n if (name === this.statics.blotName && !value) {\n this.children.forEach((child) => {\n if (!(child instanceof InlineBlot)) {\n child = child.wrap(InlineBlot.blotName, true);\n }\n this.attributes.copy(child as InlineBlot);\n });\n this.unwrap();\n } else {\n const format = this.scroll.query(name, Scope.INLINE);\n if (format == null) {\n return;\n }\n if (format instanceof Attributor) {\n this.attributes.attribute(format, value);\n } else if (\n value &&\n (name !== this.statics.blotName || this.formats()[name] !== value)\n ) {\n this.replaceWith(name, value);\n }\n }\n }\n\n public formats(): { [index: string]: any } {\n const formats = this.attributes.values();\n const format = this.statics.formats(this.domNode, this.scroll);\n if (format != null) {\n formats[this.statics.blotName] = format;\n }\n return formats;\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n if (\n this.formats()[name] != null ||\n this.scroll.query(name, Scope.ATTRIBUTE)\n ) {\n const blot = this.isolate(index, length) as InlineBlot;\n blot.format(name, value);\n } else {\n super.formatAt(index, length, name, value);\n }\n }\n\n public optimize(context: { [key: string]: any }): void {\n super.optimize(context);\n const formats = this.formats();\n if (Object.keys(formats).length === 0) {\n return this.unwrap(); // unformatted span\n }\n const next = this.next;\n if (\n next instanceof InlineBlot &&\n next.prev === this &&\n isEqual(formats, next.formats())\n ) {\n next.moveChildren(this);\n next.remove();\n }\n }\n\n public replaceWith(name: string | Blot, value?: any): Blot {\n const replacement = super.replaceWith(name, value) as InlineBlot;\n this.attributes.copy(replacement);\n return replacement;\n }\n\n public update(\n mutations: MutationRecord[],\n context: { [key: string]: any },\n ): void {\n super.update(mutations, context);\n const attributeChanged = mutations.some(\n (mutation) =>\n mutation.target === this.domNode && mutation.type === 'attributes',\n );\n if (attributeChanged) {\n this.attributes.build();\n }\n }\n\n public wrap(name: string | Parent, value?: any): Parent {\n const wrapper = super.wrap(name, value);\n if (wrapper instanceof InlineBlot) {\n this.attributes.move(wrapper);\n }\n return wrapper;\n }\n}\n\nexport default InlineBlot;\n","import Attributor from '../attributor/attributor.js';\nimport AttributorStore from '../attributor/store.js';\nimport Scope from '../scope.js';\nimport type {\n Blot,\n BlotConstructor,\n Formattable,\n Root,\n} from './abstract/blot.js';\nimport LeafBlot from './abstract/leaf.js';\nimport ParentBlot from './abstract/parent.js';\nimport InlineBlot from './inline.js';\n\nclass BlockBlot extends ParentBlot implements Formattable {\n public static blotName = 'block';\n public static scope = Scope.BLOCK_BLOT;\n public static tagName: string | string[] = 'P';\n public static allowedChildren: BlotConstructor[] = [\n InlineBlot,\n BlockBlot,\n LeafBlot,\n ];\n\n static create(value?: unknown) {\n return super.create(value) as HTMLElement;\n }\n\n public static formats(domNode: HTMLElement, scroll: Root): any {\n const match = scroll.query(BlockBlot.blotName);\n if (\n match != null &&\n domNode.tagName === (match as BlotConstructor).tagName\n ) {\n return undefined;\n } else if (typeof this.tagName === 'string') {\n return true;\n } else if (Array.isArray(this.tagName)) {\n return domNode.tagName.toLowerCase();\n }\n }\n\n protected attributes: AttributorStore;\n\n constructor(scroll: Root, domNode: Node) {\n super(scroll, domNode);\n this.attributes = new AttributorStore(this.domNode);\n }\n\n public format(name: string, value: any): void {\n const format = this.scroll.query(name, Scope.BLOCK);\n if (format == null) {\n return;\n } else if (format instanceof Attributor) {\n this.attributes.attribute(format, value);\n } else if (name === this.statics.blotName && !value) {\n this.replaceWith(BlockBlot.blotName);\n } else if (\n value &&\n (name !== this.statics.blotName || this.formats()[name] !== value)\n ) {\n this.replaceWith(name, value);\n }\n }\n\n public formats(): { [index: string]: any } {\n const formats = this.attributes.values();\n const format = this.statics.formats(this.domNode, this.scroll);\n if (format != null) {\n formats[this.statics.blotName] = format;\n }\n return formats;\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n if (this.scroll.query(name, Scope.BLOCK) != null) {\n this.format(name, value);\n } else {\n super.formatAt(index, length, name, value);\n }\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n if (def == null || this.scroll.query(value, Scope.INLINE) != null) {\n // Insert text or inline\n super.insertAt(index, value, def);\n } else {\n const after = this.split(index);\n if (after != null) {\n const blot = this.scroll.create(value, def);\n after.parent.insertBefore(blot, after);\n } else {\n throw new Error('Attempt to insertAt after block boundaries');\n }\n }\n }\n\n public replaceWith(name: string | Blot, value?: any): Blot {\n const replacement = super.replaceWith(name, value) as BlockBlot;\n this.attributes.copy(replacement);\n return replacement;\n }\n\n public update(\n mutations: MutationRecord[],\n context: { [key: string]: any },\n ): void {\n super.update(mutations, context);\n const attributeChanged = mutations.some(\n (mutation) =>\n mutation.target === this.domNode && mutation.type === 'attributes',\n );\n if (attributeChanged) {\n this.attributes.build();\n }\n }\n}\n\nexport default BlockBlot;\n","import Scope from '../../scope.js';\nimport BlockBlot from '../block.js';\nimport ParentBlot from './parent.js';\n\nclass ContainerBlot extends ParentBlot {\n public static blotName = 'container';\n public static scope = Scope.BLOCK_BLOT;\n public static tagName: string | string[];\n\n public prev!: BlockBlot | ContainerBlot | null;\n public next!: BlockBlot | ContainerBlot | null;\n\n public checkMerge(): boolean {\n return (\n this.next !== null && this.next.statics.blotName === this.statics.blotName\n );\n }\n\n public deleteAt(index: number, length: number): void {\n super.deleteAt(index, length);\n this.enforceAllowedChildren();\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n super.formatAt(index, length, name, value);\n this.enforceAllowedChildren();\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n super.insertAt(index, value, def);\n this.enforceAllowedChildren();\n }\n\n public optimize(context: { [key: string]: any }): void {\n super.optimize(context);\n if (this.children.length > 0 && this.next != null && this.checkMerge()) {\n this.next.moveChildren(this);\n this.next.remove();\n }\n }\n}\n\nexport default ContainerBlot;\n","import type { Formattable, Root } from './abstract/blot.js';\nimport LeafBlot from './abstract/leaf.js';\n\nclass EmbedBlot extends LeafBlot implements Formattable {\n public static formats(_domNode: HTMLElement, _scroll: Root): any {\n return undefined;\n }\n\n public format(name: string, value: any): void {\n // super.formatAt wraps, which is what we want in general,\n // but this allows subclasses to overwrite for formats\n // that just apply to particular embeds\n super.formatAt(0, this.length(), name, value);\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n if (index === 0 && length === this.length()) {\n this.format(name, value);\n } else {\n super.formatAt(index, length, name, value);\n }\n }\n\n public formats(): { [index: string]: any } {\n return this.statics.formats(this.domNode, this.scroll);\n }\n}\n\nexport default EmbedBlot;\n","import Registry, { type RegistryDefinition } from '../registry.js';\nimport Scope from '../scope.js';\nimport type { Blot, BlotConstructor, Root } from './abstract/blot.js';\nimport ContainerBlot from './abstract/container.js';\nimport ParentBlot from './abstract/parent.js';\nimport BlockBlot from './block.js';\n\nconst OBSERVER_CONFIG = {\n attributes: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n};\n\nconst MAX_OPTIMIZE_ITERATIONS = 100;\n\nclass ScrollBlot extends ParentBlot implements Root {\n public static blotName = 'scroll';\n public static defaultChild = BlockBlot;\n public static allowedChildren: BlotConstructor[] = [BlockBlot, ContainerBlot];\n public static scope = Scope.BLOCK_BLOT;\n public static tagName = 'DIV';\n\n public observer: MutationObserver;\n\n constructor(\n public registry: Registry,\n node: HTMLDivElement,\n ) {\n // @ts-expect-error scroll is the root with no parent\n super(null, node);\n this.scroll = this;\n this.build();\n this.observer = new MutationObserver((mutations: MutationRecord[]) => {\n this.update(mutations);\n });\n this.observer.observe(this.domNode, OBSERVER_CONFIG);\n this.attach();\n }\n\n public create(input: Node | string | Scope, value?: any): Blot {\n return this.registry.create(this, input, value);\n }\n\n public find(node: Node | null, bubble = false): Blot | null {\n const blot = this.registry.find(node, bubble);\n if (!blot) {\n return null;\n }\n if (blot.scroll === this) {\n return blot;\n }\n return bubble ? this.find(blot.scroll.domNode.parentNode, true) : null;\n }\n\n public query(\n query: string | Node | Scope,\n scope: Scope = Scope.ANY,\n ): RegistryDefinition | null {\n return this.registry.query(query, scope);\n }\n\n public register(...definitions: RegistryDefinition[]) {\n return this.registry.register(...definitions);\n }\n\n public build(): void {\n if (this.scroll == null) {\n return;\n }\n super.build();\n }\n\n public detach(): void {\n super.detach();\n this.observer.disconnect();\n }\n\n public deleteAt(index: number, length: number): void {\n this.update();\n if (index === 0 && length === this.length()) {\n this.children.forEach((child) => {\n child.remove();\n });\n } else {\n super.deleteAt(index, length);\n }\n }\n\n public formatAt(\n index: number,\n length: number,\n name: string,\n value: any,\n ): void {\n this.update();\n super.formatAt(index, length, name, value);\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n this.update();\n super.insertAt(index, value, def);\n }\n\n public optimize(context?: { [key: string]: any }): void;\n public optimize(\n mutations: MutationRecord[],\n context: { [key: string]: any },\n ): void;\n public optimize(mutations: any = [], context: any = {}): void {\n super.optimize(context);\n const mutationsMap = context.mutationsMap || new WeakMap();\n // We must modify mutations directly, cannot make copy and then modify\n let records = Array.from(this.observer.takeRecords());\n // Array.push currently seems to be implemented by a non-tail recursive function\n // so we cannot just mutations.push.apply(mutations, this.observer.takeRecords());\n while (records.length > 0) {\n mutations.push(records.pop());\n }\n const mark = (blot: Blot | null, markParent = true): void => {\n if (blot == null || blot === this) {\n return;\n }\n if (blot.domNode.parentNode == null) {\n return;\n }\n if (!mutationsMap.has(blot.domNode)) {\n mutationsMap.set(blot.domNode, []);\n }\n if (markParent) {\n mark(blot.parent);\n }\n };\n const optimize = (blot: Blot): void => {\n // Post-order traversal\n if (!mutationsMap.has(blot.domNode)) {\n return;\n }\n if (blot instanceof ParentBlot) {\n blot.children.forEach(optimize);\n }\n mutationsMap.delete(blot.domNode);\n blot.optimize(context);\n };\n let remaining = mutations;\n for (let i = 0; remaining.length > 0; i += 1) {\n if (i >= MAX_OPTIMIZE_ITERATIONS) {\n throw new Error('[Parchment] Maximum optimize iterations reached');\n }\n remaining.forEach((mutation: MutationRecord) => {\n const blot = this.find(mutation.target, true);\n if (blot == null) {\n return;\n }\n if (blot.domNode === mutation.target) {\n if (mutation.type === 'childList') {\n mark(this.find(mutation.previousSibling, false));\n Array.from(mutation.addedNodes).forEach((node: Node) => {\n const child = this.find(node, false);\n mark(child, false);\n if (child instanceof ParentBlot) {\n child.children.forEach((grandChild: Blot) => {\n mark(grandChild, false);\n });\n }\n });\n } else if (mutation.type === 'attributes') {\n mark(blot.prev);\n }\n }\n mark(blot);\n });\n this.children.forEach(optimize);\n remaining = Array.from(this.observer.takeRecords());\n records = remaining.slice();\n while (records.length > 0) {\n mutations.push(records.pop());\n }\n }\n }\n\n public update(\n mutations?: MutationRecord[],\n context: { [key: string]: any } = {},\n ): void {\n mutations = mutations || this.observer.takeRecords();\n const mutationsMap = new WeakMap();\n mutations\n .map((mutation: MutationRecord) => {\n const blot = this.find(mutation.target, true);\n if (blot == null) {\n return null;\n }\n if (mutationsMap.has(blot.domNode)) {\n mutationsMap.get(blot.domNode).push(mutation);\n return null;\n } else {\n mutationsMap.set(blot.domNode, [mutation]);\n return blot;\n }\n })\n .forEach((blot: Blot | null) => {\n if (blot != null && blot !== this && mutationsMap.has(blot.domNode)) {\n blot.update(mutationsMap.get(blot.domNode) || [], context);\n }\n });\n context.mutationsMap = mutationsMap;\n if (mutationsMap.has(this.domNode)) {\n super.update(mutationsMap.get(this.domNode), context);\n }\n this.optimize(mutations, context);\n }\n}\n\nexport default ScrollBlot;\n","import Scope from '../scope.js';\nimport type { Blot, Leaf, Root } from './abstract/blot.js';\nimport LeafBlot from './abstract/leaf.js';\n\nclass TextBlot extends LeafBlot implements Leaf {\n public static readonly blotName = 'text';\n public static scope = Scope.INLINE_BLOT;\n\n public static create(value: string): Text {\n return document.createTextNode(value);\n }\n\n public static value(domNode: Text): string {\n return domNode.data;\n }\n\n public domNode!: Text;\n protected text: string;\n\n constructor(scroll: Root, node: Node) {\n super(scroll, node);\n this.text = this.statics.value(this.domNode);\n }\n\n public deleteAt(index: number, length: number): void {\n this.domNode.data = this.text =\n this.text.slice(0, index) + this.text.slice(index + length);\n }\n\n public index(node: Node, offset: number): number {\n if (this.domNode === node) {\n return offset;\n }\n return -1;\n }\n\n public insertAt(index: number, value: string, def?: any): void {\n if (def == null) {\n this.text = this.text.slice(0, index) + value + this.text.slice(index);\n this.domNode.data = this.text;\n } else {\n super.insertAt(index, value, def);\n }\n }\n\n public length(): number {\n return this.text.length;\n }\n\n public optimize(context: { [key: string]: any }): void {\n super.optimize(context);\n this.text = this.statics.value(this.domNode);\n if (this.text.length === 0) {\n this.remove();\n } else if (this.next instanceof TextBlot && this.next.prev === this) {\n this.insertAt(this.length(), (this.next as TextBlot).value());\n this.next.remove();\n }\n }\n\n public position(index: number, _inclusive = false): [Node, number] {\n return [this.domNode, index];\n }\n\n public split(index: number, force = false): Blot | null {\n if (!force) {\n if (index === 0) {\n return this;\n }\n if (index === this.length()) {\n return this.next;\n }\n }\n const after = this.scroll.create(this.domNode.splitText(index));\n this.parent.insertBefore(after, this.next || undefined);\n this.text = this.statics.value(this.domNode);\n return after;\n }\n\n public update(\n mutations: MutationRecord[],\n _context: { [key: string]: any },\n ): void {\n if (\n mutations.some((mutation) => {\n return (\n mutation.type === 'characterData' && mutation.target === this.domNode\n );\n })\n ) {\n this.text = this.statics.value(this.domNode);\n }\n }\n\n public value(): string {\n return this.text;\n }\n}\n\nexport default TextBlot;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import { ContainerBlot, LeafBlot, Scope, ScrollBlot } from 'parchment';\nimport type { Blot, Parent, EmbedBlot, ParentBlot, Registry } from 'parchment';\nimport Delta, { AttributeMap, Op } from 'quill-delta';\nimport Emitter from '../core/emitter.js';\nimport type { EmitterSource } from '../core/emitter.js';\nimport Block, { BlockEmbed, bubbleFormats } from './block.js';\nimport Break from './break.js';\nimport Container from './container.js';\n\ntype RenderBlock =\n | {\n type: 'blockEmbed';\n attributes: AttributeMap;\n key: string;\n value: unknown;\n }\n | { type: 'block'; attributes: AttributeMap; delta: Delta };\n\nfunction isLine(blot: unknown): blot is Block | BlockEmbed {\n return blot instanceof Block || blot instanceof BlockEmbed;\n}\n\ninterface UpdatableEmbed {\n updateContent(change: unknown): void;\n}\n\nfunction isUpdatable(blot: Blot): blot is Blot & UpdatableEmbed {\n return typeof (blot as unknown as any).updateContent === 'function';\n}\n\nclass Scroll extends ScrollBlot {\n static blotName = 'scroll';\n static className = 'ql-editor';\n static tagName = 'DIV';\n static defaultChild = Block;\n static allowedChildren = [Block, BlockEmbed, Container];\n\n emitter: Emitter;\n batch: false | MutationRecord[];\n\n constructor(\n registry: Registry,\n domNode: HTMLDivElement,\n { emitter }: { emitter: Emitter },\n ) {\n super(registry, domNode);\n this.emitter = emitter;\n this.batch = false;\n this.optimize();\n this.enable();\n this.domNode.addEventListener('dragstart', (e) => this.handleDragStart(e));\n }\n\n batchStart() {\n if (!Array.isArray(this.batch)) {\n this.batch = [];\n }\n }\n\n batchEnd() {\n if (!this.batch) return;\n const mutations = this.batch;\n this.batch = false;\n this.update(mutations);\n }\n\n emitMount(blot: Blot) {\n this.emitter.emit(Emitter.events.SCROLL_BLOT_MOUNT, blot);\n }\n\n emitUnmount(blot: Blot) {\n this.emitter.emit(Emitter.events.SCROLL_BLOT_UNMOUNT, blot);\n }\n\n emitEmbedUpdate(blot: Blot, change: unknown) {\n this.emitter.emit(Emitter.events.SCROLL_EMBED_UPDATE, blot, change);\n }\n\n deleteAt(index: number, length: number) {\n const [first, offset] = this.line(index);\n const [last] = this.line(index + length);\n super.deleteAt(index, length);\n if (last != null && first !== last && offset > 0) {\n if (first instanceof BlockEmbed || last instanceof BlockEmbed) {\n this.optimize();\n return;\n }\n const ref =\n last.children.head instanceof Break ? null : last.children.head;\n // @ts-expect-error\n first.moveChildren(last, ref);\n // @ts-expect-error\n first.remove();\n }\n this.optimize();\n }\n\n enable(enabled = true) {\n this.domNode.setAttribute('contenteditable', enabled ? 'true' : 'false');\n }\n\n formatAt(index: number, length: number, format: string, value: unknown) {\n super.formatAt(index, length, format, value);\n this.optimize();\n }\n\n insertAt(index: number, value: string, def?: unknown) {\n if (index >= this.length()) {\n if (def == null || this.scroll.query(value, Scope.BLOCK) == null) {\n const blot = this.scroll.create(this.statics.defaultChild.blotName);\n this.appendChild(blot);\n if (def == null && value.endsWith('\\n')) {\n blot.insertAt(0, value.slice(0, -1), def);\n } else {\n blot.insertAt(0, value, def);\n }\n } else {\n const embed = this.scroll.create(value, def);\n this.appendChild(embed);\n }\n } else {\n super.insertAt(index, value, def);\n }\n this.optimize();\n }\n\n insertBefore(blot: Blot, ref?: Blot) {\n if (blot.statics.scope === Scope.INLINE_BLOT) {\n const wrapper = this.scroll.create(\n this.statics.defaultChild.blotName,\n ) as Parent;\n wrapper.appendChild(blot);\n super.insertBefore(wrapper, ref);\n } else {\n super.insertBefore(blot, ref);\n }\n }\n\n insertContents(index: number, delta: Delta) {\n const renderBlocks = this.deltaToRenderBlocks(\n delta.concat(new Delta().insert('\\n')),\n );\n const last = renderBlocks.pop();\n if (last == null) return;\n\n this.batchStart();\n\n const first = renderBlocks.shift();\n if (first) {\n const shouldInsertNewlineChar =\n first.type === 'block' &&\n (first.delta.length() === 0 ||\n (!this.descendant(BlockEmbed, index)[0] && index < this.length()));\n const delta =\n first.type === 'block'\n ? first.delta\n : new Delta().insert({ [first.key]: first.value });\n insertInlineContents(this, index, delta);\n const newlineCharLength = first.type === 'block' ? 1 : 0;\n const lineEndIndex = index + delta.length() + newlineCharLength;\n if (shouldInsertNewlineChar) {\n this.insertAt(lineEndIndex - 1, '\\n');\n }\n\n const formats = bubbleFormats(this.line(index)[0]);\n const attributes = AttributeMap.diff(formats, first.attributes) || {};\n Object.keys(attributes).forEach((name) => {\n this.formatAt(lineEndIndex - 1, 1, name, attributes[name]);\n });\n\n index = lineEndIndex;\n }\n\n let [refBlot, refBlotOffset] = this.children.find(index);\n if (renderBlocks.length) {\n if (refBlot) {\n refBlot = refBlot.split(refBlotOffset);\n refBlotOffset = 0;\n }\n\n renderBlocks.forEach((renderBlock) => {\n if (renderBlock.type === 'block') {\n const block = this.createBlock(\n renderBlock.attributes,\n refBlot || undefined,\n );\n insertInlineContents(block, 0, renderBlock.delta);\n } else {\n const blockEmbed = this.create(\n renderBlock.key,\n renderBlock.value,\n ) as EmbedBlot;\n this.insertBefore(blockEmbed, refBlot || undefined);\n Object.keys(renderBlock.attributes).forEach((name) => {\n blockEmbed.format(name, renderBlock.attributes[name]);\n });\n }\n });\n }\n\n if (last.type === 'block' && last.delta.length()) {\n const offset = refBlot\n ? refBlot.offset(refBlot.scroll) + refBlotOffset\n : this.length();\n insertInlineContents(this, offset, last.delta);\n }\n\n this.batchEnd();\n this.optimize();\n }\n\n isEnabled() {\n return this.domNode.getAttribute('contenteditable') === 'true';\n }\n\n leaf(index: number): [LeafBlot | null, number] {\n const last = this.path(index).pop();\n if (!last) {\n return [null, -1];\n }\n\n const [blot, offset] = last;\n return blot instanceof LeafBlot ? [blot, offset] : [null, -1];\n }\n\n line(index: number): [Block | BlockEmbed | null, number] {\n if (index === this.length()) {\n return this.line(index - 1);\n }\n // @ts-expect-error TODO: make descendant() generic\n return this.descendant(isLine, index);\n }\n\n lines(index = 0, length = Number.MAX_VALUE): (Block | BlockEmbed)[] {\n const getLines = (\n blot: ParentBlot,\n blotIndex: number,\n blotLength: number,\n ) => {\n let lines: (Block | BlockEmbed)[] = [];\n let lengthLeft = blotLength;\n blot.children.forEachAt(\n blotIndex,\n blotLength,\n (child, childIndex, childLength) => {\n if (isLine(child)) {\n lines.push(child);\n } else if (child instanceof ContainerBlot) {\n lines = lines.concat(getLines(child, childIndex, lengthLeft));\n }\n lengthLeft -= childLength;\n },\n );\n return lines;\n };\n return getLines(this, index, length);\n }\n\n optimize(context?: { [key: string]: any }): void;\n optimize(\n mutations?: MutationRecord[],\n context?: { [key: string]: any },\n ): void;\n optimize(mutations = [], context = {}) {\n if (this.batch) return;\n super.optimize(mutations, context);\n if (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_OPTIMIZE, mutations, context);\n }\n }\n\n path(index: number) {\n return super.path(index).slice(1); // Exclude self\n }\n\n remove() {\n // Never remove self\n }\n\n update(source?: EmitterSource): void;\n update(mutations?: MutationRecord[]): void;\n update(mutations?: MutationRecord[] | EmitterSource): void {\n if (this.batch) {\n if (Array.isArray(mutations)) {\n this.batch = this.batch.concat(mutations);\n }\n return;\n }\n let source: EmitterSource = Emitter.sources.USER;\n if (typeof mutations === 'string') {\n source = mutations;\n }\n if (!Array.isArray(mutations)) {\n mutations = this.observer.takeRecords();\n }\n mutations = mutations.filter(({ target }) => {\n const blot = this.find(target, true);\n return blot && !isUpdatable(blot);\n });\n if (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_BEFORE_UPDATE, source, mutations);\n }\n super.update(mutations.concat([])); // pass copy\n if (mutations.length > 0) {\n this.emitter.emit(Emitter.events.SCROLL_UPDATE, source, mutations);\n }\n }\n\n updateEmbedAt(index: number, key: string, change: unknown) {\n // Currently it only supports top-level embeds (BlockEmbed).\n // We can update `ParentBlot` in parchment to support inline embeds.\n const [blot] = this.descendant((b: Blot) => b instanceof BlockEmbed, index);\n if (blot && blot.statics.blotName === key && isUpdatable(blot)) {\n blot.updateContent(change);\n }\n }\n\n protected handleDragStart(event: DragEvent) {\n event.preventDefault();\n }\n\n private deltaToRenderBlocks(delta: Delta) {\n const renderBlocks: RenderBlock[] = [];\n\n let currentBlockDelta = new Delta();\n delta.forEach((op) => {\n const insert = op?.insert;\n if (!insert) return;\n if (typeof insert === 'string') {\n const splitted = insert.split('\\n');\n splitted.slice(0, -1).forEach((text) => {\n currentBlockDelta.insert(text, op.attributes);\n renderBlocks.push({\n type: 'block',\n delta: currentBlockDelta,\n attributes: op.attributes ?? {},\n });\n currentBlockDelta = new Delta();\n });\n const last = splitted[splitted.length - 1];\n if (last) {\n currentBlockDelta.insert(last, op.attributes);\n }\n } else {\n const key = Object.keys(insert)[0];\n if (!key) return;\n if (this.query(key, Scope.INLINE)) {\n currentBlockDelta.push(op);\n } else {\n if (currentBlockDelta.length()) {\n renderBlocks.push({\n type: 'block',\n delta: currentBlockDelta,\n attributes: {},\n });\n }\n currentBlockDelta = new Delta();\n renderBlocks.push({\n type: 'blockEmbed',\n key,\n value: insert[key],\n attributes: op.attributes ?? {},\n });\n }\n }\n });\n\n if (currentBlockDelta.length()) {\n renderBlocks.push({\n type: 'block',\n delta: currentBlockDelta,\n attributes: {},\n });\n }\n\n return renderBlocks;\n }\n\n private createBlock(attributes: AttributeMap, refBlot?: Blot) {\n let blotName: string | undefined;\n const formats: AttributeMap = {};\n\n Object.entries(attributes).forEach(([key, value]) => {\n const isBlockBlot = this.query(key, Scope.BLOCK & Scope.BLOT) != null;\n if (isBlockBlot) {\n blotName = key;\n } else {\n formats[key] = value;\n }\n });\n\n const block = this.create(\n blotName || this.statics.defaultChild.blotName,\n blotName ? attributes[blotName] : undefined,\n ) as ParentBlot;\n\n this.insertBefore(block, refBlot || undefined);\n\n const length = block.length();\n Object.entries(formats).forEach(([key, value]) => {\n block.formatAt(0, length, key, value);\n });\n\n return block;\n }\n}\n\nfunction insertInlineContents(\n parent: ParentBlot,\n index: number,\n inlineContents: Delta,\n) {\n inlineContents.reduce((index, op) => {\n const length = Op.length(op);\n let attributes = op.attributes || {};\n if (op.insert != null) {\n if (typeof op.insert === 'string') {\n const text = op.insert;\n parent.insertAt(index, text);\n const [leaf] = parent.descendant(LeafBlot, index);\n const formats = bubbleFormats(leaf);\n attributes = AttributeMap.diff(formats, attributes) || {};\n } else if (typeof op.insert === 'object') {\n const key = Object.keys(op.insert)[0]; // There should only be one key\n if (key == null) return index;\n parent.insertAt(index, key, op.insert[key]);\n const isInlineEmbed = parent.scroll.query(key, Scope.INLINE) != null;\n if (isInlineEmbed) {\n const [leaf] = parent.descendant(LeafBlot, index);\n const formats = bubbleFormats(leaf);\n attributes = AttributeMap.diff(formats, attributes) || {};\n }\n }\n }\n Object.keys(attributes).forEach((key) => {\n parent.formatAt(index, length, key, attributes[key]);\n });\n return index + length;\n }, index);\n}\n\nexport default Scroll;\n","import { Scope } from 'parchment';\nimport type Delta from 'quill-delta';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\nimport type Scroll from '../blots/scroll.js';\nimport type { Range } from '../core/selection.js';\n\nexport interface HistoryOptions {\n userOnly: boolean;\n delay: number;\n maxStack: number;\n}\n\nexport interface StackItem {\n delta: Delta;\n range: Range | null;\n}\n\ninterface Stack {\n undo: StackItem[];\n redo: StackItem[];\n}\n\nclass History extends Module {\n static DEFAULTS: HistoryOptions;\n\n lastRecorded = 0;\n ignoreChange = false;\n stack: Stack = { undo: [], redo: [] };\n currentRange: Range | null = null;\n\n constructor(quill: Quill, options: Partial) {\n super(quill, options);\n this.quill.on(\n Quill.events.EDITOR_CHANGE,\n (eventName, value, oldValue, source) => {\n if (eventName === Quill.events.SELECTION_CHANGE) {\n if (value && source !== Quill.sources.SILENT) {\n this.currentRange = value;\n }\n } else if (eventName === Quill.events.TEXT_CHANGE) {\n if (!this.ignoreChange) {\n if (!this.options.userOnly || source === Quill.sources.USER) {\n this.record(value, oldValue);\n } else {\n this.transform(value);\n }\n }\n\n this.currentRange = transformRange(this.currentRange, value);\n }\n },\n );\n\n this.quill.keyboard.addBinding(\n { key: 'z', shortKey: true },\n this.undo.bind(this),\n );\n this.quill.keyboard.addBinding(\n { key: ['z', 'Z'], shortKey: true, shiftKey: true },\n this.redo.bind(this),\n );\n if (/Win/i.test(navigator.platform)) {\n this.quill.keyboard.addBinding(\n { key: 'y', shortKey: true },\n this.redo.bind(this),\n );\n }\n\n this.quill.root.addEventListener('beforeinput', (event) => {\n if (event.inputType === 'historyUndo') {\n this.undo();\n event.preventDefault();\n } else if (event.inputType === 'historyRedo') {\n this.redo();\n event.preventDefault();\n }\n });\n }\n\n change(source: 'undo' | 'redo', dest: 'redo' | 'undo') {\n if (this.stack[source].length === 0) return;\n const item = this.stack[source].pop();\n if (!item) return;\n const base = this.quill.getContents();\n const inverseDelta = item.delta.invert(base);\n this.stack[dest].push({\n delta: inverseDelta,\n range: transformRange(item.range, inverseDelta),\n });\n this.lastRecorded = 0;\n this.ignoreChange = true;\n this.quill.updateContents(item.delta, Quill.sources.USER);\n this.ignoreChange = false;\n\n this.restoreSelection(item);\n }\n\n clear() {\n this.stack = { undo: [], redo: [] };\n }\n\n cutoff() {\n this.lastRecorded = 0;\n }\n\n record(changeDelta: Delta, oldDelta: Delta) {\n if (changeDelta.ops.length === 0) return;\n this.stack.redo = [];\n let undoDelta = changeDelta.invert(oldDelta);\n let undoRange = this.currentRange;\n const timestamp = Date.now();\n if (\n // @ts-expect-error Fix me later\n this.lastRecorded + this.options.delay > timestamp &&\n this.stack.undo.length > 0\n ) {\n const item = this.stack.undo.pop();\n if (item) {\n undoDelta = undoDelta.compose(item.delta);\n undoRange = item.range;\n }\n } else {\n this.lastRecorded = timestamp;\n }\n if (undoDelta.length() === 0) return;\n this.stack.undo.push({ delta: undoDelta, range: undoRange });\n // @ts-expect-error Fix me later\n if (this.stack.undo.length > this.options.maxStack) {\n this.stack.undo.shift();\n }\n }\n\n redo() {\n this.change('redo', 'undo');\n }\n\n transform(delta: Delta) {\n transformStack(this.stack.undo, delta);\n transformStack(this.stack.redo, delta);\n }\n\n undo() {\n this.change('undo', 'redo');\n }\n\n protected restoreSelection(stackItem: StackItem) {\n if (stackItem.range) {\n this.quill.setSelection(stackItem.range, Quill.sources.USER);\n } else {\n const index = getLastChangeIndex(this.quill.scroll, stackItem.delta);\n this.quill.setSelection(index, Quill.sources.USER);\n }\n }\n}\nHistory.DEFAULTS = {\n delay: 1000,\n maxStack: 100,\n userOnly: false,\n};\n\nfunction transformStack(stack: StackItem[], delta: Delta) {\n let remoteDelta = delta;\n for (let i = stack.length - 1; i >= 0; i -= 1) {\n const oldItem = stack[i];\n stack[i] = {\n delta: remoteDelta.transform(oldItem.delta, true),\n range: oldItem.range && transformRange(oldItem.range, remoteDelta),\n };\n remoteDelta = oldItem.delta.transform(remoteDelta);\n if (stack[i].delta.length() === 0) {\n stack.splice(i, 1);\n }\n }\n}\n\nfunction endsWithNewlineChange(scroll: Scroll, delta: Delta) {\n const lastOp = delta.ops[delta.ops.length - 1];\n if (lastOp == null) return false;\n if (lastOp.insert != null) {\n return typeof lastOp.insert === 'string' && lastOp.insert.endsWith('\\n');\n }\n if (lastOp.attributes != null) {\n return Object.keys(lastOp.attributes).some((attr) => {\n return scroll.query(attr, Scope.BLOCK) != null;\n });\n }\n return false;\n}\n\nfunction getLastChangeIndex(scroll: Scroll, delta: Delta) {\n const deleteLength = delta.reduce((length, op) => {\n return length + (op.delete || 0);\n }, 0);\n let changeIndex = delta.length() - deleteLength;\n if (endsWithNewlineChange(scroll, delta)) {\n changeIndex -= 1;\n }\n return changeIndex;\n}\n\nfunction transformRange(range: Range | null, delta: Delta) {\n if (!range) return range;\n const start = delta.transformPosition(range.index);\n const end = delta.transformPosition(range.index + range.length);\n return { index: start, length: end - start };\n}\n\nexport { History as default, getLastChangeIndex };\n","import Delta from 'quill-delta';\nimport type Quill from '../core/quill.js';\nimport Emitter from '../core/emitter.js';\nimport Module from '../core/module.js';\nimport type { Range } from '../core/selection.js';\n\ninterface UploaderOptions {\n mimetypes: string[];\n handler: (this: { quill: Quill }, range: Range, files: File[]) => void;\n}\n\nclass Uploader extends Module {\n static DEFAULTS: UploaderOptions;\n\n constructor(quill: Quill, options: Partial) {\n super(quill, options);\n quill.root.addEventListener('drop', (e) => {\n e.preventDefault();\n let native: ReturnType | null = null;\n if (document.caretRangeFromPoint) {\n native = document.caretRangeFromPoint(e.clientX, e.clientY);\n // @ts-expect-error\n } else if (document.caretPositionFromPoint) {\n // @ts-expect-error\n const position = document.caretPositionFromPoint(e.clientX, e.clientY);\n native = document.createRange();\n native.setStart(position.offsetNode, position.offset);\n native.setEnd(position.offsetNode, position.offset);\n }\n\n const normalized = native && quill.selection.normalizeNative(native);\n if (normalized) {\n const range = quill.selection.normalizedToRange(normalized);\n if (e.dataTransfer?.files) {\n this.upload(range, e.dataTransfer.files);\n }\n }\n });\n }\n\n upload(range: Range, files: FileList | File[]) {\n const uploads: File[] = [];\n Array.from(files).forEach((file) => {\n if (file && this.options.mimetypes?.includes(file.type)) {\n uploads.push(file);\n }\n });\n if (uploads.length > 0) {\n // @ts-expect-error Fix me later\n this.options.handler.call(this, range, uploads);\n }\n }\n}\n\nUploader.DEFAULTS = {\n mimetypes: ['image/png', 'image/jpeg'],\n handler(range: Range, files: File[]) {\n const promises = files.map((file) => {\n return new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload = (e) => {\n // @ts-expect-error Fix me later\n resolve(e.target.result);\n };\n reader.readAsDataURL(file);\n });\n });\n Promise.all(promises).then((images) => {\n const update = images.reduce((delta: Delta, image) => {\n return delta.insert({ image });\n }, new Delta().retain(range.index).delete(range.length)) as Delta;\n this.quill.updateContents(update, Emitter.sources.USER);\n this.quill.setSelection(\n range.index + images.length,\n Emitter.sources.SILENT,\n );\n });\n },\n};\n\nexport default Uploader;\n","import Delta from 'quill-delta';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\nimport type { Range } from '../core/selection.js';\nimport { deleteRange } from './keyboard.js';\n\nconst INSERT_TYPES = ['insertText', 'insertReplacementText'];\n\nclass Input extends Module {\n constructor(quill: Quill, options: Record) {\n super(quill, options);\n\n quill.root.addEventListener('beforeinput', (event) => {\n this.handleBeforeInput(event);\n });\n\n // Gboard with English input on Android triggers `compositionstart` sometimes even\n // users are not going to type anything.\n if (!/Android/i.test(navigator.userAgent)) {\n quill.on(Quill.events.COMPOSITION_BEFORE_START, () => {\n this.handleCompositionStart();\n });\n }\n }\n\n private deleteRange(range: Range) {\n deleteRange({ range, quill: this.quill });\n }\n\n private replaceText(range: Range, text = '') {\n if (range.length === 0) return false;\n\n if (text) {\n // Follow the native behavior that inherits the formats of the first character\n const formats = this.quill.getFormat(range.index, 1);\n this.deleteRange(range);\n this.quill.updateContents(\n new Delta().retain(range.index).insert(text, formats),\n Quill.sources.USER,\n );\n } else {\n this.deleteRange(range);\n }\n\n this.quill.setSelection(range.index + text.length, 0, Quill.sources.SILENT);\n return true;\n }\n\n private handleBeforeInput(event: InputEvent) {\n if (\n this.quill.composition.isComposing ||\n event.defaultPrevented ||\n !INSERT_TYPES.includes(event.inputType)\n ) {\n return;\n }\n\n const staticRange = event.getTargetRanges\n ? event.getTargetRanges()[0]\n : null;\n if (!staticRange || staticRange.collapsed === true) {\n return;\n }\n\n const text = getPlainTextFromInputEvent(event);\n if (text == null) {\n return;\n }\n const normalized = this.quill.selection.normalizeNative(staticRange);\n const range = normalized\n ? this.quill.selection.normalizedToRange(normalized)\n : null;\n if (range && this.replaceText(range, text)) {\n event.preventDefault();\n }\n }\n\n private handleCompositionStart() {\n const range = this.quill.getSelection();\n if (range) {\n this.replaceText(range);\n }\n }\n}\n\nfunction getPlainTextFromInputEvent(event: InputEvent) {\n // When `inputType` is \"insertText\":\n // - `event.data` should be string (Safari uses `event.dataTransfer`).\n // - `event.dataTransfer` should be null.\n // When `inputType` is \"insertReplacementText\":\n // - `event.data` should be null.\n // - `event.dataTransfer` should contain \"text/plain\" data.\n\n if (typeof event.data === 'string') {\n return event.data;\n }\n if (event.dataTransfer?.types.includes('text/plain')) {\n return event.dataTransfer.getData('text/plain');\n }\n return null;\n}\n\nexport default Input;\n","import { ParentBlot } from 'parchment';\nimport Module from '../core/module.js';\nimport Quill from '../core/quill.js';\n\nconst isMac = /Mac/i.test(navigator.platform);\n\n// Export for testing\nexport const TTL_FOR_VALID_SELECTION_CHANGE = 100;\n\n// A loose check to determine if the shortcut can move the caret before a UI node:\n// [CARET]
    [CONTENT]
    \nconst canMoveCaretBeforeUINode = (event: KeyboardEvent) => {\n if (\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight' || // RTL scripts or moving from the end of the previous line\n event.key === 'ArrowUp' ||\n event.key === 'ArrowDown' ||\n event.key === 'Home'\n ) {\n return true;\n }\n\n if (isMac && event.key === 'a' && event.ctrlKey === true) {\n return true;\n }\n\n return false;\n};\n\nclass UINode extends Module {\n isListening = false;\n selectionChangeDeadline = 0;\n\n constructor(quill: Quill, options: Record) {\n super(quill, options);\n\n this.handleArrowKeys();\n this.handleNavigationShortcuts();\n }\n\n private handleArrowKeys() {\n this.quill.keyboard.addBinding({\n key: ['ArrowLeft', 'ArrowRight'],\n offset: 0,\n shiftKey: null,\n handler(range, { line, event }) {\n if (!(line instanceof ParentBlot) || !line.uiNode) {\n return true;\n }\n\n const isRTL = getComputedStyle(line.domNode)['direction'] === 'rtl';\n if (\n (isRTL && event.key !== 'ArrowRight') ||\n (!isRTL && event.key !== 'ArrowLeft')\n ) {\n return true;\n }\n\n this.quill.setSelection(\n range.index - 1,\n range.length + (event.shiftKey ? 1 : 0),\n Quill.sources.USER,\n );\n return false;\n },\n });\n }\n\n private handleNavigationShortcuts() {\n this.quill.root.addEventListener('keydown', (event) => {\n if (!event.defaultPrevented && canMoveCaretBeforeUINode(event)) {\n this.ensureListeningToSelectionChange();\n }\n });\n }\n\n /**\n * We only listen to the `selectionchange` event when\n * there is an intention of moving the caret to the beginning using shortcuts.\n * This is primarily implemented to prevent infinite loops, as we are changing\n * the selection within the handler of a `selectionchange` event.\n */\n private ensureListeningToSelectionChange() {\n this.selectionChangeDeadline = Date.now() + TTL_FOR_VALID_SELECTION_CHANGE;\n\n if (this.isListening) return;\n this.isListening = true;\n\n const listener = () => {\n this.isListening = false;\n\n if (Date.now() <= this.selectionChangeDeadline) {\n this.handleSelectionChange();\n }\n };\n\n document.addEventListener('selectionchange', listener, {\n once: true,\n });\n }\n\n private handleSelectionChange() {\n const selection = document.getSelection();\n if (!selection) return;\n const range = selection.getRangeAt(0);\n if (range.collapsed !== true || range.startOffset !== 0) return;\n\n const line = this.quill.scroll.find(range.startContainer);\n if (!(line instanceof ParentBlot) || !line.uiNode) return;\n\n const newRange = document.createRange();\n newRange.setStartAfter(line.uiNode);\n newRange.setEndAfter(line.uiNode);\n selection.removeAllRanges();\n selection.addRange(newRange);\n }\n}\n\nexport default UINode;\n","import Quill from './core/quill.js';\n\nimport Block, { BlockEmbed } from './blots/block.js';\nimport Break from './blots/break.js';\nimport Container from './blots/container.js';\nimport Cursor from './blots/cursor.js';\nimport Embed from './blots/embed.js';\nimport Inline from './blots/inline.js';\nimport Scroll from './blots/scroll.js';\nimport TextBlot from './blots/text.js';\n\nimport Clipboard from './modules/clipboard.js';\nimport History from './modules/history.js';\nimport Keyboard from './modules/keyboard.js';\nimport Uploader from './modules/uploader.js';\nimport Delta, { Op, OpIterator, AttributeMap } from 'quill-delta';\nimport Input from './modules/input.js';\nimport UINode from './modules/uiNode.js';\n\nexport { Delta, Op, OpIterator, AttributeMap };\n\nQuill.register({\n 'blots/block': Block,\n 'blots/block/embed': BlockEmbed,\n 'blots/break': Break,\n 'blots/container': Container,\n 'blots/cursor': Cursor,\n 'blots/embed': Embed,\n 'blots/inline': Inline,\n 'blots/scroll': Scroll,\n 'blots/text': TextBlot,\n\n 'modules/clipboard': Clipboard,\n 'modules/history': History,\n 'modules/keyboard': Keyboard,\n 'modules/uploader': Uploader,\n 'modules/input': Input,\n 'modules/uiNode': UINode,\n});\n\nexport default Quill;\n"],"names":["root","factory","exports","module","define","amd","self","Block","BlockBlot","cache","delta","this","blot","filter","arguments","length","undefined","descendants","LeafBlot","reduce","leaf","insert","value","bubbleFormats","Delta","blockDelta","deleteAt","index","super","formatAt","name","scroll","query","Scope","BLOCK","format","Math","min","insertAt","def","lines","split","text","shift","children","tail","block","lineIndex","line","insertBefore","ref","head","Break","remove","moveChildren","target","optimize","context","path","removeChild","child","force","clone","parent","next","blotName","tagName","defaultChild","allowedChildren","Inline","EmbedBlot","TextBlot","BlockEmbed","attach","attributes","AttributorStore","domNode","formats","values","attribute","BLOCK_ATTRIBUTE","pop","blocks","map","create","forEach","statics","scope","BLOCK_BLOT","prev","Container","ContainerBlot","Cursor","static","constructor","selection","textNode","document","createTextNode","CONTENTS","appendChild","savedLength","detach","offset","node","position","data","restore","composing","range","getNativeRange","lastChild","parentNode","prevTextBlot","prevTextLength","nextTextBlot","nextText","newText","join","mergedTextBlot","newTextNode","remapOffset","start","end","startNode","startOffset","endNode","endOffset","update","mutations","some","mutation","type","isolate","unwrap","GUARD_TEXT","Embed","contentNode","createElement","setAttribute","Array","from","childNodes","childNode","leftGuard","rightGuard","prevLength","InlineBlot","Text","compare","other","selfIndex","order","indexOf","otherIndex","BLOT","wrap","escapeText","replace","s","debug","logger","eventName","addEventListener","_len","args","_key","querySelectorAll","quill","instances","get","emitter","handleDOM","EventEmitter","EDITOR_CHANGE","SCROLL_BEFORE_UPDATE","SCROLL_BLOT_MOUNT","SCROLL_BLOT_UNMOUNT","SCROLL_OPTIMIZE","SCROLL_UPDATE","SCROLL_EMBED_UPDATE","SELECTION_CHANGE","TEXT_CHANGE","COMPOSITION_BEFORE_START","COMPOSITION_START","COMPOSITION_BEFORE_END","COMPOSITION_END","API","SILENT","USER","domListeners","on","error","emit","_len2","_key2","log","call","event","_len3","_key3","_ref","handler","contains","listenDOM","push","WeakMap","levels","level","method","console","namespace","ns","bind","newLevel","options","ASCII","convertListHTML","items","lastIndent","types","endTag","getListType","indent","rest","tag","convertHTML","previousType","isRoot","html","slice","ParentBlot","forEachAt","childLength","list","parts","outerHTML","innerHTML","Element","combineFormats","combined","Object","keys","merged","combinedValue","isArray","concat","normalizeDelta","normalizedDelta","op","shiftRange","amount","Range","getDelta","applyDelta","scrollLength","batchStart","deleteDelta","ops","splitOpLines","Op","isImplicitNewlinePrepended","isImplicitNewlineAppended","retain","endsWith","descendant","merge","AttributeMap","diff","key","isInlineEmbed","INLINE","INLINE_BLOT","updateEmbedAt","prependedLength","addedLength","delete","batchEnd","deleteText","formatLine","max","cloneDeep","formatText","getContents","getFormat","leaves","lineFormats","leafFormats","blots","getHTML","lineOffset","lineLength","getText","insertContents","contents","change","insertEmbed","embed","insertText","isBlank","removeFormat","suffixLength","suffix","selectionInfo","oldDelta","match","find","textBlot","oldValue","CursorBlot","oldText","relativeSelectionInfo","oldRange","newRange","compose","isEqual","isComposing","setupListeners","handleCompositionStart","queueMicrotask","handleCompositionEnd","Node","Emitter","events","getElementRect","element","rect","getBoundingClientRect","scaleX","abs","width","offsetWidth","scaleY","height","offsetHeight","top","right","left","clientWidth","bottom","clientHeight","paddingValueToInt","number","parseInt","Number","isNaN","getScrollDistance","targetStart","targetEnd","scrollStart","scrollEnd","scrollPaddingStart","scrollPaddingEnd","CORE_FORMATS","globalRegistry","Parchment","uiClass","Quill","bounds","modules","clipboard","keyboard","history","uploader","placeholder","readOnly","registry","theme","sources","parchment","Module","Theme","limit","bubble","import","imports","register","overwrite","attrName","warn","startsWith","container","containerOrSelector","resolveSelector","Error","DEFAULTS","quillModuleDefaults","quillDefaults","themeModuleDefaults","themeDefaults","expandModuleConfig","toolbar","config","createRegistryWithFormats","sourceRegistry","Registry","coreBlot","iterations","requiredContainer","entries","modulesWithDefaults","_ref2","moduleClass","expandConfig","trim","classList","add","set","addContainer","scrollBlotName","ScrollBlot","editor","Editor","Selection","composition","Composition","addModule","init","toggle","source","lastRange","getRange","modify","convert","setContents","clear","disable","allowReadOnlyEdits","refNode","className","blur","setRange","overload","enable","editReadOnly","modifier","enabled","focus","preventScroll","scrollSelectionIntoView","getSelection","setSelection","getBounds","containerBounds","getLength","getIndex","getLeaf","getLine","getLines","MAX_VALUE","getModule","getSemanticHTML","hasFocus","isEnabled","off","once","scrollRectIntoView","targetRect","ownerDocument","current","isDocumentBody","body","bounding","window","visualViewport","documentElement","style","getComputedStyle","scrollDistanceX","scrollPaddingLeft","scrollPaddingRight","scrollDistanceY","scrollPaddingTop","scrollPaddingBottom","defaultView","scrollBy","scrollLeft","scrollTop","scrolledLeft","scrolledTop","parentElement","getRootNode","host","scrollIntoView","delete1","applied","delete2","setText","updateContents","selector","querySelector","expanded","lengthOrSource","transformPosition","pos","mouseDown","cursor","savedRange","lastNative","handleComposition","handleDragging","setTimeout","native","setNativeRange","triggeredByTyping","ignored","nativeRange","collapsed","after","nextLine","createRange","setStart","setEnd","side","rangeCount","getRangeAt","normalizeNative","info","isConnected","normalized","normalizedToRange","activeElement","positions","indexes","startContainer","endContainer","rangeToNative","getPosition","inclusive","leafOffset","removeAllRanges","addRange","e","default","ModuleClass","whitelist","AlignAttribute","Attributor","AlignStyle","ClassAttributor","StyleAttributor","BackgroundStyle","ColorAttributor","CodeBlockContainer","code","innerText","CodeBlock","Code","component","toString","ColorStyle","DirectionAttribute","DirectionStyle","FontStyleAttributor","FontStyle","SizeStyle","normalWeightRegexp","blockTagNames","isBlockElement","includes","ignoreRegexp","idRegexp","indentRegexp","NORMALIZERS","doc","getAttribute","msoList","others","listItems","parseListItem","idMatch","id","indentMatch","typeRegexp","RegExp","typeMatch","parsed","childListItems","nextElementSibling","ul","listItem","li","replaceChild","normalizeListItem","fragment","createDocumentFragment","append","normalizeFontWeight","br","previousElementSibling","normalizeEmptyLines","CLIPBOARD_CONFIG","TEXT_NODE","isPre","isLine","isBetweenInlineElements","replacer","collapse","replaced","previousSibling","nextSibling","matchNewline","deltaEndsWith","ELEMENT_NODE","prototype","applyFormat","classes","styles","attr","ATTRIBUTE","ATTRIBUTE_ATTRIBUTORS","keyName","STYLE_ATTRIBUTORS","newDelta","_ref4","fontStyle","italic","textDecoration","underline","strike","fontWeight","bold","_ref5","parseFloat","textIndent","composed","table","createMatchAlias","memo","Clipboard","onCaptureCopy","onCapturePaste","matchers","matcher","addMatcher","normalizeHTML","normalize","normalizeExternalHTML","DOMParser","parseFromString","nodeMatches","elementMatchers","textMatchers","prepareMatching","traverse","dangerouslyPasteHTML","paste","isCut","defaultPrevented","preventDefault","onCopy","clipboardData","setData","deleteRange","getData","files","upload","childElementCount","firstElementChild","onPaste","_ref3","pastedDelta","pair","has","matches","endText","i","toLowerCase","preNodes","nodeType","childrenDelta","reducedDelta","_node","HTMLParagraphElement","firstChild","SHORTKEY","test","navigator","platform","Keyboard","evt","binding","which","bindings","addBinding","shiftKey","handleEnter","metaKey","ctrlKey","altKey","userAgent","handleBackspace","handleDelete","prefix","handleDeleteRange","listen","keyBinding","shortKey","singleBinding","leafStart","offsetStart","leafEnd","offsetEnd","prefixText","suffixText","curContext","empty","every","curFormats","prevFormats","formatDelta","nextFormats","defaultOptions","makeFormatHandler","outdent","makeCodeBlockHandler","tab","cutoff","header","row","cell","getTable","_table","tableSide","blockquote","numLines","cur","makeEmbedArrowHandler","makeTableArrowHandler","TAB","textContent","up","targetRow","targetCell","targetLine","firstFormats","lastFormats","hasOwnProperty","Events","EE","fn","addListener","TypeError","listener","_events","_eventsCount","clearEvent","__proto__","eventNames","names","getOwnPropertySymbols","listeners","handlers","l","ee","listenerCount","a1","a2","a3","a4","a5","len","removeListener","apply","j","removeAllListeners","prefixed","DIFF_DELETE","DIFF_INSERT","DIFF_EQUAL","diff_main","text1","text2","cursor_pos","cleanup","_fix_unicode","editdiff","oldLength","newLength","oldCursor","oldBefore","oldAfter","maybeNewCursor","newCursor","newBefore","newAfter","prefixLength","oldPrefix","newPrefix","make_edit_splice","oldSuffix","newSuffix","find_cursor_edit_diff","commonlength","diff_commonPrefix","commonprefix","substring","diff_commonSuffix","commonsuffix","diffs","longtext","shorttext","hm","diff_halfMatchI_","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","seed","floor","best_common","text1_a","text1_b","text2_a","text2_b","hm1","ceil","hm2","diff_halfMatch_","mid_common","diffs_a","diffs_b","text1_length","text2_length","max_d","v_offset","v_length","v1","v2","x","front","k1start","k1end","k2start","k2end","d","k1","k1_offset","y1","x1","charAt","k2_offset","x2","diff_bisectSplit_","k2","y2","diff_bisect_","diff_compute_","unshift","diff_cleanupMerge","changes","equalities","equalitiesLength","lastequality","pointer","length_insertions1","length_deletions1","length_insertions2","length_deletions2","splice","diff_cleanupSemanticScore_","one","two","char1","char2","nonAlphaNumeric1","nonAlphaNumericRegex_","nonAlphaNumeric2","whitespace1","whitespaceRegex_","whitespace2","lineBreak1","linebreakRegex_","lineBreak2","blankLine1","blanklineEndRegex_","blankLine2","blanklineStartRegex_","equality1","edit","equality2","commonOffset","commonString","bestEquality1","bestEdit","bestEquality2","bestScore","score","diff_cleanupSemanticLossless","deletion","insertion","overlap_length1","diff_commonOverlap_","overlap_length2","diff_cleanupSemantic","y","text1a","text2a","text1b","text2b","diffsb","pointermin","pointermax","pointermid","pointerstart","is_surrogate_pair_start","charCodeAt","text_length","best","pattern","found","pointerend","is_surrogate_pair_end","fix_unicode","count_delete","count_insert","text_delete","text_insert","previous_equality","ends_with_pair_start","stray","k","starts_with_pair_end","n","charCode","str","before","oldMiddle","newMiddle","tuples","ret","remove_empty_tuples","INSERT","DELETE","EQUAL","HASH_UNDEFINED","MAX_SAFE_INTEGER","argsTag","boolTag","dateTag","funcTag","genTag","mapTag","numberTag","objectTag","promiseTag","regexpTag","setTag","stringTag","symbolTag","weakMapTag","arrayBufferTag","dataViewTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","reFlags","reIsHostCtor","reIsUint","cloneableTags","freeGlobal","g","freeSelf","Function","freeExports","freeModule","moduleExports","addMapEntry","addSetEntry","arrayReduce","array","iteratee","accumulator","initAccum","isHostObject","result","mapToArray","size","overArg","func","transform","arg","setToArray","uid","arrayProto","funcProto","objectProto","coreJsData","maskSrcKey","exec","IE_PROTO","funcToString","objectToString","reIsNative","Buffer","Symbol","Uint8Array","getPrototype","getPrototypeOf","objectCreate","propertyIsEnumerable","nativeGetSymbols","nativeIsBuffer","isBuffer","nativeKeys","DataView","getNative","Map","Promise","Set","nativeCreate","dataViewCtorString","toSource","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","symbolValueOf","valueOf","Hash","entry","ListCache","MapCache","Stack","__data__","assignValue","object","objValue","eq","assocIndexOf","baseClone","isDeep","isFull","customizer","stack","isObject","isArr","input","initCloneArray","copyArray","getTag","isFunc","buffer","copy","cloneBuffer","isPrototype","proto","initCloneObject","copyObject","getSymbols","copySymbols","baseAssign","cloneFunc","symbol","Ctor","cloneArrayBuffer","dataView","byteOffset","byteLength","cloneDataView","typedArray","cloneTypedArray","cloneMap","regexp","lastIndex","cloneRegExp","cloneSet","initCloneByTag","stacked","props","keysFunc","symbolsFunc","arrayPush","baseGetAllKeys","getAllKeys","arrayEach","subValue","arrayBuffer","newValue","getMapData","getValue","isFunction","baseIsNative","pairs","LARGE_ARRAY_SIZE","isIndex","ArrayBuffer","resolve","ctorString","isArrayLike","isLength","inherited","isObjectLike","isArrayLikeObject","isArguments","baseTimes","String","skipIndexes","arrayLikeKeys","baseKeys","COMPARE_PARTIAL_FLAG","COMPARE_UNORDERED_FLAG","arrayTag","asyncTag","errorTag","nullTag","proxyTag","undefinedTag","typedArrayTags","freeProcess","process","nodeUtil","nodeIsTypedArray","isTypedArray","arraySome","predicate","nativeObjectToString","symToStringTag","toStringTag","SetCache","baseGetTag","isOwn","unmasked","getRawTag","baseIsArguments","baseIsEqual","bitmask","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","message","isPartial","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","objLength","skipCtor","othValue","compared","objCtor","othCtor","equalObjects","baseIsEqualDeep","arrLength","othLength","seen","arrValue","othIndex","isMasked","resIndex","arrayFilter","baseUnary","isArg","isBuff","isType","a","b","keepNull","attrs","invert","base","baseInverted","priority","OpIterator","NULL_CHARACTER","fromCharCode","getEmbedTypeAndData","embedType","registerEmbed","unregisterEmbed","getHandler","newOp","lastOp","chop","partition","passed","failed","initialValue","changeLength","elem","Infinity","iter","hasNext","nextOp","thisIter","otherIter","firstOther","peek","firstLeft","peekType","peekLength","thisOp","otherOp","action","thisData","otherData","strings","retDelta","diffResult","opLength","eachLine","newline","inverted","baseIndex","baseOp","opData","baseOpData","transformedData","nextType","retOp","substr","allocUnsafe","isNew","defineProperty","global","stubArray","require","keysIn","nodeIsMap","isMap","nodeIsSet","isSet","isFlat","arrStacked","othStacked","objStacked","isProto","count","lastCalled","assigner","iterable","objectCtorString","srcIndex","mergeFunc","srcValue","isCommon","isTyped","baseMerge","nativeMax","string","nativeNow","Date","now","stamp","remaining","otherArgs","thisArg","guard","TYPE","LEVEL","INLINE_ATTRIBUTE","ANY","attributeBit","item","canAdd","removeAttribute","ParchmentError","_Registry","tags","blotClass","inline","definitions","definition","isBlot","isAttr","toUpperCase","camelize","part","build","move","_ShadowBlot","rawValue","cloneNode","_context","replaceWith","replacement","_force","_mutations","wrapper","ShadowBlot","_LeafBlot","_domNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","_inclusive","LinkedList","nodes","at","iterator","curNode","callback","curIndex","curLength","makeAttachedBlot","_ParentBlot","uiNode","attachUI","reverse","err","criteria","lengthLeft","childIndex","enforceAllowedChildren","done","splitAfter","childBlot","refBlot","refDomNode","targetParent","_length","addedNodes","removedNodes","sort","DOCUMENT_POSITION_FOLLOWING","_InlineBlot","obj1","obj2","prop","_BlockBlot","_ContainerBlot","checkMerge","_scroll","OBSERVER_CONFIG","characterData","characterDataOldValue","childList","subtree","_ScrollBlot","observer","MutationObserver","observe","disconnect","mutationsMap","records","takeRecords","mark","markParent","grandChild","_TextBlot","splitText","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","getter","__esModule","o","enumerable","globalThis","obj","r","nmd","paths","isUpdatable","updateContent","Scroll","batch","handleDragStart","emitMount","emitUnmount","emitEmbedUpdate","first","last","renderBlocks","deltaToRenderBlocks","shouldInsertNewlineChar","insertInlineContents","newlineCharLength","lineEndIndex","refBlotOffset","renderBlock","createBlock","blockEmbed","blotIndex","blotLength","currentBlockDelta","splitted","inlineContents","History","lastRecorded","ignoreChange","undo","redo","currentRange","userOnly","record","transformRange","inputType","dest","inverseDelta","restoreSelection","changeDelta","undoDelta","undoRange","timestamp","delay","maxStack","transformStack","stackItem","deleteLength","changeIndex","endsWithNewlineChange","getLastChangeIndex","remoteDelta","oldItem","Uploader","caretRangeFromPoint","clientX","clientY","caretPositionFromPoint","offsetNode","dataTransfer","uploads","file","mimetypes","promises","reader","FileReader","onload","readAsDataURL","all","then","images","image","INSERT_TYPES","Input","handleBeforeInput","replaceText","staticRange","getTargetRanges","getPlainTextFromInputEvent","isMac","UINode","isListening","selectionChangeDeadline","handleArrowKeys","handleNavigationShortcuts","isRTL","canMoveCaretBeforeUINode","ensureListeningToSelectionChange","handleSelectionChange","setStartAfter","setEndAfter"],"sourceRoot":""}