so that we can get its inner HTML.\n\n var div = contents.ownerDocument.createElement('div');\n div.appendChild(contents);\n div.setAttribute('hidden', 'true');\n contents.ownerDocument.body.appendChild(div);\n data.setData('text/html', div.innerHTML);\n data.setData('text/plain', getPlainText(div));\n contents.ownerDocument.body.removeChild(div);\n return data;\n };\n\n e.insertData = data => {\n if (!e.insertFragmentData(data)) {\n e.insertTextData(data);\n }\n };\n\n e.insertFragmentData = data => {\n /**\r\n * Checking copied fragment from application/x-slate-fragment or data-slate-fragment\r\n */\n var fragment = data.getData('application/x-slate-fragment') || getSlateFragmentAttribute(data);\n\n if (fragment) {\n var decoded = decodeURIComponent(window.atob(fragment));\n var parsed = JSON.parse(decoded);\n e.insertFragment(parsed);\n return true;\n }\n\n return false;\n };\n\n e.insertTextData = data => {\n var text = data.getData('text/plain');\n\n if (text) {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var split = false;\n\n for (var line of lines) {\n if (split) {\n Transforms.splitNodes(e, {\n always: true\n });\n }\n\n e.insertText(line);\n split = true;\n }\n\n return true;\n }\n\n return false;\n };\n\n e.onChange = () => {\n // COMPAT: React doesn't batch `setState` hook calls, which means that the\n // children and selection can get out of sync for one render pass. So we\n // have to use this unstable API to ensure it batches them. (2019/12/03)\n // https://github.com/facebook/react/issues/14259#issuecomment-439702367\n ReactDOM.unstable_batchedUpdates(() => {\n var onContextChange = EDITOR_TO_ON_CHANGE.get(e);\n\n if (onContextChange) {\n onContextChange();\n }\n\n onChange();\n });\n };\n\n return e;\n};\n\nvar getMatches = (e, path) => {\n var matches = [];\n\n for (var [n, p] of Editor.levels(e, {\n at: path\n })) {\n var key = ReactEditor.findKey(e, n);\n matches.push([p, key]);\n }\n\n return matches;\n};\n\nexport { DefaultElement, DefaultLeaf, DefaultPlaceholder, Editable, ReactEditor, Slate, useEditor, useFocused, useReadOnly, useSelected, useSlate, useSlateSelection, useSlateSelector, useSlateStatic, useSlateWithV, withReact };\n//# sourceMappingURL=index.es.js.map\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * Constants.\n */\n\nvar IS_MAC = typeof window != 'undefined' && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);\n\nvar MODIFIERS = {\n alt: 'altKey',\n control: 'ctrlKey',\n meta: 'metaKey',\n shift: 'shiftKey'\n};\n\nvar ALIASES = {\n add: '+',\n break: 'pause',\n cmd: 'meta',\n command: 'meta',\n ctl: 'control',\n ctrl: 'control',\n del: 'delete',\n down: 'arrowdown',\n esc: 'escape',\n ins: 'insert',\n left: 'arrowleft',\n mod: IS_MAC ? 'meta' : 'control',\n opt: 'alt',\n option: 'alt',\n return: 'enter',\n right: 'arrowright',\n space: ' ',\n spacebar: ' ',\n up: 'arrowup',\n win: 'meta',\n windows: 'meta'\n};\n\nvar CODES = {\n backspace: 8,\n tab: 9,\n enter: 13,\n shift: 16,\n control: 17,\n alt: 18,\n pause: 19,\n capslock: 20,\n escape: 27,\n ' ': 32,\n pageup: 33,\n pagedown: 34,\n end: 35,\n home: 36,\n arrowleft: 37,\n arrowup: 38,\n arrowright: 39,\n arrowdown: 40,\n insert: 45,\n delete: 46,\n meta: 91,\n numlock: 144,\n scrolllock: 145,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n '\\'': 222\n};\n\nfor (var f = 1; f < 20; f++) {\n CODES['f' + f] = 111 + f;\n}\n\n/**\n * Is hotkey?\n */\n\nfunction isHotkey(hotkey, options, event) {\n if (options && !('byKey' in options)) {\n event = options;\n options = null;\n }\n\n if (!Array.isArray(hotkey)) {\n hotkey = [hotkey];\n }\n\n var array = hotkey.map(function (string) {\n return parseHotkey(string, options);\n });\n var check = function check(e) {\n return array.some(function (object) {\n return compareHotkey(object, e);\n });\n };\n var ret = event == null ? check : check(event);\n return ret;\n}\n\nfunction isCodeHotkey(hotkey, event) {\n return isHotkey(hotkey, event);\n}\n\nfunction isKeyHotkey(hotkey, event) {\n return isHotkey(hotkey, { byKey: true }, event);\n}\n\n/**\n * Parse.\n */\n\nfunction parseHotkey(hotkey, options) {\n var byKey = options && options.byKey;\n var ret = {};\n\n // Special case to handle the `+` key since we use it as a separator.\n hotkey = hotkey.replace('++', '+add');\n var values = hotkey.split('+');\n var length = values.length;\n\n // Ensure that all the modifiers are set to false unless the hotkey has them.\n\n for (var k in MODIFIERS) {\n ret[MODIFIERS[k]] = false;\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = values[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var value = _step.value;\n\n var optional = value.endsWith('?') && value.length > 1;\n\n if (optional) {\n value = value.slice(0, -1);\n }\n\n var name = toKeyName(value);\n var modifier = MODIFIERS[name];\n\n if (length === 1 || !modifier) {\n if (byKey) {\n ret.key = name;\n } else {\n ret.which = toKeyCode(value);\n }\n }\n\n if (modifier) {\n ret[modifier] = optional ? null : true;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return ret;\n}\n\n/**\n * Compare.\n */\n\nfunction compareHotkey(object, event) {\n for (var key in object) {\n var expected = object[key];\n var actual = void 0;\n\n if (expected == null) {\n continue;\n }\n\n if (key === 'key' && event.key != null) {\n actual = event.key.toLowerCase();\n } else if (key === 'which') {\n actual = expected === 91 && event.which === 93 ? 91 : event.which;\n } else {\n actual = event[key];\n }\n\n if (actual == null && expected === false) {\n continue;\n }\n\n if (actual !== expected) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Utils.\n */\n\nfunction toKeyCode(name) {\n name = toKeyName(name);\n var code = CODES[name] || name.toUpperCase().charCodeAt(0);\n return code;\n}\n\nfunction toKeyName(name) {\n name = name.toLowerCase();\n name = ALIASES[name] || name;\n return name;\n}\n\n/**\n * Export.\n */\n\nexports.default = isHotkey;\nexports.isHotkey = isHotkey;\nexports.isCodeHotkey = isCodeHotkey;\nexports.isKeyHotkey = isKeyHotkey;\nexports.parseHotkey = parseHotkey;\nexports.compareHotkey = compareHotkey;\nexports.toKeyCode = toKeyCode;\nexports.toKeyName = toKeyName;","/*!\n * is-plain-object
\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?(n.delete(r),n.add(t)):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0),n)}function h(){n(2)}function y(n){return null==n||\"object\"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return\"production\"===process.env.NODE_ENV||U||n(0),U}function j(n,r){r&&(b(\"Patches\"),n.u=[],n.s=[],n.v=r)}function O(n){g(n),n.p.forEach(S),n.p=null}function g(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b(\"ES5\").S(e,r,o),o?(i[Q].P&&(O(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b(\"Patches\").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),O(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b(\"Patches\").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if(\"production\"!==process.env.NODE_ENV&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function R(n,r,t){var e=s(r)?b(\"MapSet\").N(r,t):v(r)?b(\"MapSet\").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b(\"ES5\").J(r,t);return(t?t.A:_()).p.push(e),e}function D(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b(\"ES5\").K(u)))return u.t;u.I=!0,e=F(r,c),u.I=!1}else e=F(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return\"production\"!==process.env.NODE_ENV&&f(r),en.get(r,n)},set:function(r){var t=this[Q];\"production\"!==process.env.NODE_ENV&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e1?t-1:0),o=1;o1?t-1:0),o=1;o=0;e--){var i=t[e];if(0===i.path.length&&\"replace\"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b(\"Patches\").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);export default fn;export{un as Immer,pn as applyPatches,K as castDraft,$ as castImmutable,ln as createDraft,D as current,J as enableAllPlugins,N as enableES5,C as enableMapSet,T as enablePatches,dn as finishDraft,d as freeze,L as immerable,r as isDraft,t as isDraftable,H as nothing,e as original,fn as produce,cn as produceWithPatches,sn as setAutoFreeze,vn as setUseProxies};\n//# sourceMappingURL=immer.esm.js.map\n","import { isPlainObject } from 'is-plain-object';\nimport { produce, createDraft, finishDraft, isDraft } from 'immer';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nvar DIRTY_PATHS = new WeakMap();\nvar DIRTY_PATH_KEYS = new WeakMap();\nvar FLUSHING = new WeakMap();\nvar NORMALIZING = new WeakMap();\nvar PATH_REFS = new WeakMap();\nvar POINT_REFS = new WeakMap();\nvar RANGE_REFS = new WeakMap();\n\nfunction ownKeys$9(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$9(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$9(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n/**\r\n * Create a new Slate `Editor` object.\r\n */\n\nvar createEditor = () => {\n var editor = {\n children: [],\n operations: [],\n selection: null,\n marks: null,\n isInline: () => false,\n isVoid: () => false,\n onChange: () => {},\n apply: op => {\n for (var ref of Editor.pathRefs(editor)) {\n PathRef.transform(ref, op);\n }\n\n for (var _ref of Editor.pointRefs(editor)) {\n PointRef.transform(_ref, op);\n }\n\n for (var _ref2 of Editor.rangeRefs(editor)) {\n RangeRef.transform(_ref2, op);\n }\n\n var oldDirtyPaths = DIRTY_PATHS.get(editor) || [];\n var oldDirtyPathKeys = DIRTY_PATH_KEYS.get(editor) || new Set();\n var dirtyPaths;\n var dirtyPathKeys;\n\n var add = path => {\n if (path) {\n var key = path.join(',');\n\n if (!dirtyPathKeys.has(key)) {\n dirtyPathKeys.add(key);\n dirtyPaths.push(path);\n }\n }\n };\n\n if (Path.operationCanTransformPath(op)) {\n dirtyPaths = [];\n dirtyPathKeys = new Set();\n\n for (var path of oldDirtyPaths) {\n var newPath = Path.transform(path, op);\n add(newPath);\n }\n } else {\n dirtyPaths = oldDirtyPaths;\n dirtyPathKeys = oldDirtyPathKeys;\n }\n\n var newDirtyPaths = editor.getDirtyPaths(op);\n\n for (var _path of newDirtyPaths) {\n add(_path);\n }\n\n DIRTY_PATHS.set(editor, dirtyPaths);\n DIRTY_PATH_KEYS.set(editor, dirtyPathKeys);\n Transforms.transform(editor, op);\n editor.operations.push(op);\n Editor.normalize(editor); // Clear any formats applied to the cursor if the selection changes.\n\n if (op.type === 'set_selection') {\n editor.marks = null;\n }\n\n if (!FLUSHING.get(editor)) {\n FLUSHING.set(editor, true);\n Promise.resolve().then(() => {\n FLUSHING.set(editor, false);\n editor.onChange();\n editor.operations = [];\n });\n }\n },\n addMark: (key, value) => {\n var {\n selection\n } = editor;\n\n if (selection) {\n if (Range.isExpanded(selection)) {\n Transforms.setNodes(editor, {\n [key]: value\n }, {\n match: Text.isText,\n split: true\n });\n } else {\n var marks = _objectSpread$9(_objectSpread$9({}, Editor.marks(editor) || {}), {}, {\n [key]: value\n });\n\n editor.marks = marks;\n\n if (!FLUSHING.get(editor)) {\n editor.onChange();\n }\n }\n }\n },\n deleteBackward: unit => {\n var {\n selection\n } = editor;\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.delete(editor, {\n unit,\n reverse: true\n });\n }\n },\n deleteForward: unit => {\n var {\n selection\n } = editor;\n\n if (selection && Range.isCollapsed(selection)) {\n Transforms.delete(editor, {\n unit\n });\n }\n },\n deleteFragment: direction => {\n var {\n selection\n } = editor;\n\n if (selection && Range.isExpanded(selection)) {\n Transforms.delete(editor, {\n reverse: direction === 'backward'\n });\n }\n },\n getFragment: () => {\n var {\n selection\n } = editor;\n\n if (selection) {\n return Node.fragment(editor, selection);\n }\n\n return [];\n },\n insertBreak: () => {\n Transforms.splitNodes(editor, {\n always: true\n });\n },\n insertSoftBreak: () => {\n Transforms.splitNodes(editor, {\n always: true\n });\n },\n insertFragment: fragment => {\n Transforms.insertFragment(editor, fragment);\n },\n insertNode: node => {\n Transforms.insertNodes(editor, node);\n },\n insertText: text => {\n var {\n selection,\n marks\n } = editor;\n\n if (selection) {\n if (marks) {\n var node = _objectSpread$9({\n text\n }, marks);\n\n Transforms.insertNodes(editor, node);\n } else {\n Transforms.insertText(editor, text);\n }\n\n editor.marks = null;\n }\n },\n normalizeNode: entry => {\n var [node, path] = entry; // There are no core normalizations for text nodes.\n\n if (Text.isText(node)) {\n return;\n } // Ensure that block and inline nodes have at least one text child.\n\n\n if (Element.isElement(node) && node.children.length === 0) {\n var child = {\n text: ''\n };\n Transforms.insertNodes(editor, child, {\n at: path.concat(0),\n voids: true\n });\n return;\n } // Determine whether the node should have block or inline children.\n\n\n var shouldHaveInlines = Editor.isEditor(node) ? false : Element.isElement(node) && (editor.isInline(node) || node.children.length === 0 || Text.isText(node.children[0]) || editor.isInline(node.children[0])); // Since we'll be applying operations while iterating, keep track of an\n // index that accounts for any added/removed nodes.\n\n var n = 0;\n\n for (var i = 0; i < node.children.length; i++, n++) {\n var currentNode = Node.get(editor, path);\n if (Text.isText(currentNode)) continue;\n var _child = node.children[i];\n var prev = currentNode.children[n - 1];\n var isLast = i === node.children.length - 1;\n var isInlineOrText = Text.isText(_child) || Element.isElement(_child) && editor.isInline(_child); // Only allow block nodes in the top-level children and parent blocks\n // that only contain block nodes. Similarly, only allow inline nodes in\n // other inline nodes, or parent blocks that only contain inlines and\n // text.\n\n if (isInlineOrText !== shouldHaveInlines) {\n Transforms.removeNodes(editor, {\n at: path.concat(n),\n voids: true\n });\n n--;\n } else if (Element.isElement(_child)) {\n // Ensure that inline nodes are surrounded by text nodes.\n if (editor.isInline(_child)) {\n if (prev == null || !Text.isText(prev)) {\n var newChild = {\n text: ''\n };\n Transforms.insertNodes(editor, newChild, {\n at: path.concat(n),\n voids: true\n });\n n++;\n } else if (isLast) {\n var _newChild = {\n text: ''\n };\n Transforms.insertNodes(editor, _newChild, {\n at: path.concat(n + 1),\n voids: true\n });\n n++;\n }\n }\n } else {\n // Merge adjacent text nodes that are empty or match.\n if (prev != null && Text.isText(prev)) {\n if (Text.equals(_child, prev, {\n loose: true\n })) {\n Transforms.mergeNodes(editor, {\n at: path.concat(n),\n voids: true\n });\n n--;\n } else if (prev.text === '') {\n Transforms.removeNodes(editor, {\n at: path.concat(n - 1),\n voids: true\n });\n n--;\n } else if (_child.text === '') {\n Transforms.removeNodes(editor, {\n at: path.concat(n),\n voids: true\n });\n n--;\n }\n }\n }\n }\n },\n removeMark: key => {\n var {\n selection\n } = editor;\n\n if (selection) {\n if (Range.isExpanded(selection)) {\n Transforms.unsetNodes(editor, key, {\n match: Text.isText,\n split: true\n });\n } else {\n var marks = _objectSpread$9({}, Editor.marks(editor) || {});\n\n delete marks[key];\n editor.marks = marks;\n\n if (!FLUSHING.get(editor)) {\n editor.onChange();\n }\n }\n }\n },\n\n /**\r\n * Get the \"dirty\" paths generated from an operation.\r\n */\n getDirtyPaths: op => {\n switch (op.type) {\n case 'insert_text':\n case 'remove_text':\n case 'set_node':\n {\n var {\n path\n } = op;\n return Path.levels(path);\n }\n\n case 'insert_node':\n {\n var {\n node,\n path: _path2\n } = op;\n var levels = Path.levels(_path2);\n var descendants = Text.isText(node) ? [] : Array.from(Node.nodes(node), _ref3 => {\n var [, p] = _ref3;\n return _path2.concat(p);\n });\n return [...levels, ...descendants];\n }\n\n case 'merge_node':\n {\n var {\n path: _path3\n } = op;\n var ancestors = Path.ancestors(_path3);\n var previousPath = Path.previous(_path3);\n return [...ancestors, previousPath];\n }\n\n case 'move_node':\n {\n var {\n path: _path4,\n newPath\n } = op;\n\n if (Path.equals(_path4, newPath)) {\n return [];\n }\n\n var oldAncestors = [];\n var newAncestors = [];\n\n for (var ancestor of Path.ancestors(_path4)) {\n var p = Path.transform(ancestor, op);\n oldAncestors.push(p);\n }\n\n for (var _ancestor of Path.ancestors(newPath)) {\n var _p = Path.transform(_ancestor, op);\n\n newAncestors.push(_p);\n }\n\n var newParent = newAncestors[newAncestors.length - 1];\n var newIndex = newPath[newPath.length - 1];\n var resultPath = newParent.concat(newIndex);\n return [...oldAncestors, ...newAncestors, resultPath];\n }\n\n case 'remove_node':\n {\n var {\n path: _path5\n } = op;\n\n var _ancestors = Path.ancestors(_path5);\n\n return [..._ancestors];\n }\n\n case 'split_node':\n {\n var {\n path: _path6\n } = op;\n\n var _levels = Path.levels(_path6);\n\n var nextPath = Path.next(_path6);\n return [..._levels, nextPath];\n }\n\n default:\n {\n return [];\n }\n }\n }\n };\n return editor;\n};\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = _objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n// Character (grapheme cluster) boundaries are determined according to\n// the default grapheme cluster boundary specification, extended grapheme clusters variant[1].\n//\n// References:\n//\n// [1] https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table\n// [2] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt\n// [3] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.html\n// [4] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt\n\n/**\r\n * Get the distance to the end of the first character in a string of text.\r\n */\nvar getCharacterDistance = function getCharacterDistance(str) {\n var isRTL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var isLTR = !isRTL;\n var codepoints = isRTL ? codepointsIteratorRTL(str) : str;\n var left = CodepointType.None;\n var right = CodepointType.None;\n var distance = 0; // Evaluation of these conditions are deferred.\n\n var gb11 = null; // Is GB11 applicable?\n\n var gb12Or13 = null; // Is GB12 or GB13 applicable?\n\n for (var char of codepoints) {\n var code = char.codePointAt(0);\n if (!code) break;\n var type = getCodepointType(char, code);\n [left, right] = isLTR ? [right, type] : [type, left];\n\n if (intersects(left, CodepointType.ZWJ) && intersects(right, CodepointType.ExtPict)) {\n if (isLTR) {\n gb11 = endsWithEmojiZWJ(str.substring(0, distance));\n } else {\n gb11 = endsWithEmojiZWJ(str.substring(0, str.length - distance));\n }\n\n if (!gb11) break;\n }\n\n if (intersects(left, CodepointType.RI) && intersects(right, CodepointType.RI)) {\n if (gb12Or13 !== null) {\n gb12Or13 = !gb12Or13;\n } else {\n if (isLTR) {\n gb12Or13 = true;\n } else {\n gb12Or13 = endsWithOddNumberOfRIs(str.substring(0, str.length - distance));\n }\n }\n\n if (!gb12Or13) break;\n }\n\n if (left !== CodepointType.None && right !== CodepointType.None && isBoundaryPair(left, right)) {\n break;\n }\n\n distance += char.length;\n }\n\n return distance || 1;\n};\nvar SPACE = /\\s/;\nvar PUNCTUATION = /[\\u0021-\\u0023\\u0025-\\u002A\\u002C-\\u002F\\u003A\\u003B\\u003F\\u0040\\u005B-\\u005D\\u005F\\u007B\\u007D\\u00A1\\u00A7\\u00AB\\u00B6\\u00B7\\u00BB\\u00BF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E3B\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/;\nvar CHAMELEON = /['\\u2018\\u2019]/;\n/**\r\n * Get the distance to the end of the first word in a string of text.\r\n */\n\nvar getWordDistance = function getWordDistance(text) {\n var isRTL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var dist = 0;\n var started = false;\n\n while (text.length > 0) {\n var charDist = getCharacterDistance(text, isRTL);\n var [char, remaining] = splitByCharacterDistance(text, charDist, isRTL);\n\n if (isWordCharacter(char, remaining, isRTL)) {\n started = true;\n dist += charDist;\n } else if (!started) {\n dist += charDist;\n } else {\n break;\n }\n\n text = remaining;\n }\n\n return dist;\n};\n/**\r\n * Split a string in two parts at a given distance starting from the end when\r\n * `isRTL` is set to `true`.\r\n */\n\nvar splitByCharacterDistance = (str, dist, isRTL) => {\n if (isRTL) {\n var at = str.length - dist;\n return [str.slice(at, str.length), str.slice(0, at)];\n }\n\n return [str.slice(0, dist), str.slice(dist)];\n};\n/**\r\n * Check if a character is a word character. The `remaining` argument is used\r\n * because sometimes you must read subsequent characters to truly determine it.\r\n */\n\nvar isWordCharacter = function isWordCharacter(char, remaining) {\n var isRTL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n if (SPACE.test(char)) {\n return false;\n } // Chameleons count as word characters as long as they're in a word, so\n // recurse to see if the next one is a word character or not.\n\n\n if (CHAMELEON.test(char)) {\n var charDist = getCharacterDistance(remaining, isRTL);\n var [nextChar, nextRemaining] = splitByCharacterDistance(remaining, charDist, isRTL);\n\n if (isWordCharacter(nextChar, nextRemaining, isRTL)) {\n return true;\n }\n }\n\n if (PUNCTUATION.test(char)) {\n return false;\n }\n\n return true;\n};\n/**\r\n * Iterate on codepoints from right to left.\r\n */\n\n\nvar codepointsIteratorRTL = function* codepointsIteratorRTL(str) {\n var end = str.length - 1;\n\n for (var i = 0; i < str.length; i++) {\n var char1 = str.charAt(end - i);\n\n if (isLowSurrogate(char1.charCodeAt(0))) {\n var char2 = str.charAt(end - i - 1);\n\n if (isHighSurrogate(char2.charCodeAt(0))) {\n yield char2 + char1;\n i++;\n continue;\n }\n }\n\n yield char1;\n }\n};\n/**\r\n * Is `charCode` a high surrogate.\r\n *\r\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\r\n */\n\nvar isHighSurrogate = charCode => {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n};\n/**\r\n * Is `charCode` a low surrogate.\r\n *\r\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\r\n */\n\n\nvar isLowSurrogate = charCode => {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n};\n\nvar CodepointType;\n\n(function (CodepointType) {\n CodepointType[CodepointType[\"None\"] = 0] = \"None\";\n CodepointType[CodepointType[\"Extend\"] = 1] = \"Extend\";\n CodepointType[CodepointType[\"ZWJ\"] = 2] = \"ZWJ\";\n CodepointType[CodepointType[\"RI\"] = 4] = \"RI\";\n CodepointType[CodepointType[\"Prepend\"] = 8] = \"Prepend\";\n CodepointType[CodepointType[\"SpacingMark\"] = 16] = \"SpacingMark\";\n CodepointType[CodepointType[\"L\"] = 32] = \"L\";\n CodepointType[CodepointType[\"V\"] = 64] = \"V\";\n CodepointType[CodepointType[\"T\"] = 128] = \"T\";\n CodepointType[CodepointType[\"LV\"] = 256] = \"LV\";\n CodepointType[CodepointType[\"LVT\"] = 512] = \"LVT\";\n CodepointType[CodepointType[\"ExtPict\"] = 1024] = \"ExtPict\";\n CodepointType[CodepointType[\"Any\"] = 2048] = \"Any\";\n})(CodepointType || (CodepointType = {}));\n\nvar reExtend = /^(?:[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D3E\\u0D41-\\u0D44\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B03\\u1B34-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDEAB\\uDEAC\\uDF46-\\uDF50]|\\uD804[\\uDC01\\uDC38-\\uDC46\\uDC7F-\\uDC81\\uDCB3-\\uDCB6\\uDCB9\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD2B\\uDD2D-\\uDD34\\uDD73\\uDD80\\uDD81\\uDDB6-\\uDDBE\\uDDC9-\\uDDCC\\uDDCF\\uDE2F-\\uDE31\\uDE34\\uDE36\\uDE37\\uDE3E\\uDEDF\\uDEE3-\\uDEEA\\uDF00\\uDF01\\uDF3B\\uDF3C\\uDF3E\\uDF40\\uDF57\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC38-\\uDC3F\\uDC42-\\uDC44\\uDC46\\uDC5E\\uDCB0\\uDCB3-\\uDCB8\\uDCBA\\uDCBD\\uDCBF\\uDCC0\\uDCC2\\uDCC3\\uDDAF\\uDDB2-\\uDDB5\\uDDBC\\uDDBD\\uDDBF\\uDDC0\\uDDDC\\uDDDD\\uDE33-\\uDE3A\\uDE3D\\uDE3F\\uDE40\\uDEAB\\uDEAD\\uDEB0-\\uDEB5\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF25\\uDF27-\\uDF2B]|\\uD806[\\uDC2F-\\uDC37\\uDC39\\uDC3A\\uDD30\\uDD3B\\uDD3C\\uDD3E\\uDD43\\uDDD4-\\uDDD7\\uDDDA\\uDDDB\\uDDE0\\uDE01-\\uDE0A\\uDE33-\\uDE38\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE56\\uDE59-\\uDE5B\\uDE8A-\\uDE96\\uDE98\\uDE99]|\\uD807[\\uDC30-\\uDC36\\uDC38-\\uDC3D\\uDC3F\\uDC92-\\uDCA7\\uDCAA-\\uDCB0\\uDCB2\\uDCB3\\uDCB5\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD90\\uDD91\\uDD95\\uDD97\\uDEF3\\uDEF4]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF4F\\uDF8F-\\uDF92\\uDFE4]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65\\uDD67-\\uDD69\\uDD6E-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD30-\\uDD36\\uDEEC-\\uDEEF]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF])$/;\nvar rePrepend = /^(?:[\\u0600-\\u0605\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u0D4E]|\\uD804[\\uDCBD\\uDCCD\\uDDC2\\uDDC3]|\\uD806[\\uDD3F\\uDD41\\uDE3A\\uDE84-\\uDE89]|\\uD807\\uDD46)$/;\nvar reSpacingMark = /^(?:[\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BF\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0\\u0CC1\\u0CC3\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0D02\\u0D03\\u0D3F\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D82\\u0D83\\u0DD0\\u0DD1\\u0DD8-\\u0DDE\\u0DF2\\u0DF3\\u0E33\\u0EB3\\u0F3E\\u0F3F\\u0F7F\\u1031\\u103B\\u103C\\u1056\\u1057\\u1084\\u1715\\u1734\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A6D-\\u1A72\\u1B04\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]|\\uD804[\\uDC00\\uDC02\\uDC82\\uDCB0-\\uDCB2\\uDCB7\\uDCB8\\uDD2C\\uDD45\\uDD46\\uDD82\\uDDB3-\\uDDB5\\uDDBF\\uDDC0\\uDDCE\\uDE2C-\\uDE2E\\uDE32\\uDE33\\uDE35\\uDEE0-\\uDEE2\\uDF02\\uDF03\\uDF3F\\uDF41-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF62\\uDF63]|\\uD805[\\uDC35-\\uDC37\\uDC40\\uDC41\\uDC45\\uDCB1\\uDCB2\\uDCB9\\uDCBB\\uDCBC\\uDCBE\\uDCC1\\uDDB0\\uDDB1\\uDDB8-\\uDDBB\\uDDBE\\uDE30-\\uDE32\\uDE3B\\uDE3C\\uDE3E\\uDEAC\\uDEAE\\uDEAF\\uDEB6\\uDF26]|\\uD806[\\uDC2C-\\uDC2E\\uDC38\\uDD31-\\uDD35\\uDD37\\uDD38\\uDD3D\\uDD40\\uDD42\\uDDD1-\\uDDD3\\uDDDC-\\uDDDF\\uDDE4\\uDE39\\uDE57\\uDE58\\uDE97]|\\uD807[\\uDC2F\\uDC3E\\uDCA9\\uDCB1\\uDCB4\\uDD8A-\\uDD8E\\uDD93\\uDD94\\uDD96\\uDEF5\\uDEF6]|\\uD81B[\\uDF51-\\uDF87\\uDFF0\\uDFF1]|\\uD834[\\uDD66\\uDD6D])$/;\nvar reL = /^[\\u1100-\\u115F\\uA960-\\uA97C]$/;\nvar reV = /^[\\u1160-\\u11A7\\uD7B0-\\uD7C6]$/;\nvar reT = /^[\\u11A8-\\u11FF\\uD7CB-\\uD7FB]$/;\nvar reLV = /^[\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788]$/;\nvar reLVT = /^[\\uAC01-\\uAC1B\\uAC1D-\\uAC37\\uAC39-\\uAC53\\uAC55-\\uAC6F\\uAC71-\\uAC8B\\uAC8D-\\uACA7\\uACA9-\\uACC3\\uACC5-\\uACDF\\uACE1-\\uACFB\\uACFD-\\uAD17\\uAD19-\\uAD33\\uAD35-\\uAD4F\\uAD51-\\uAD6B\\uAD6D-\\uAD87\\uAD89-\\uADA3\\uADA5-\\uADBF\\uADC1-\\uADDB\\uADDD-\\uADF7\\uADF9-\\uAE13\\uAE15-\\uAE2F\\uAE31-\\uAE4B\\uAE4D-\\uAE67\\uAE69-\\uAE83\\uAE85-\\uAE9F\\uAEA1-\\uAEBB\\uAEBD-\\uAED7\\uAED9-\\uAEF3\\uAEF5-\\uAF0F\\uAF11-\\uAF2B\\uAF2D-\\uAF47\\uAF49-\\uAF63\\uAF65-\\uAF7F\\uAF81-\\uAF9B\\uAF9D-\\uAFB7\\uAFB9-\\uAFD3\\uAFD5-\\uAFEF\\uAFF1-\\uB00B\\uB00D-\\uB027\\uB029-\\uB043\\uB045-\\uB05F\\uB061-\\uB07B\\uB07D-\\uB097\\uB099-\\uB0B3\\uB0B5-\\uB0CF\\uB0D1-\\uB0EB\\uB0ED-\\uB107\\uB109-\\uB123\\uB125-\\uB13F\\uB141-\\uB15B\\uB15D-\\uB177\\uB179-\\uB193\\uB195-\\uB1AF\\uB1B1-\\uB1CB\\uB1CD-\\uB1E7\\uB1E9-\\uB203\\uB205-\\uB21F\\uB221-\\uB23B\\uB23D-\\uB257\\uB259-\\uB273\\uB275-\\uB28F\\uB291-\\uB2AB\\uB2AD-\\uB2C7\\uB2C9-\\uB2E3\\uB2E5-\\uB2FF\\uB301-\\uB31B\\uB31D-\\uB337\\uB339-\\uB353\\uB355-\\uB36F\\uB371-\\uB38B\\uB38D-\\uB3A7\\uB3A9-\\uB3C3\\uB3C5-\\uB3DF\\uB3E1-\\uB3FB\\uB3FD-\\uB417\\uB419-\\uB433\\uB435-\\uB44F\\uB451-\\uB46B\\uB46D-\\uB487\\uB489-\\uB4A3\\uB4A5-\\uB4BF\\uB4C1-\\uB4DB\\uB4DD-\\uB4F7\\uB4F9-\\uB513\\uB515-\\uB52F\\uB531-\\uB54B\\uB54D-\\uB567\\uB569-\\uB583\\uB585-\\uB59F\\uB5A1-\\uB5BB\\uB5BD-\\uB5D7\\uB5D9-\\uB5F3\\uB5F5-\\uB60F\\uB611-\\uB62B\\uB62D-\\uB647\\uB649-\\uB663\\uB665-\\uB67F\\uB681-\\uB69B\\uB69D-\\uB6B7\\uB6B9-\\uB6D3\\uB6D5-\\uB6EF\\uB6F1-\\uB70B\\uB70D-\\uB727\\uB729-\\uB743\\uB745-\\uB75F\\uB761-\\uB77B\\uB77D-\\uB797\\uB799-\\uB7B3\\uB7B5-\\uB7CF\\uB7D1-\\uB7EB\\uB7ED-\\uB807\\uB809-\\uB823\\uB825-\\uB83F\\uB841-\\uB85B\\uB85D-\\uB877\\uB879-\\uB893\\uB895-\\uB8AF\\uB8B1-\\uB8CB\\uB8CD-\\uB8E7\\uB8E9-\\uB903\\uB905-\\uB91F\\uB921-\\uB93B\\uB93D-\\uB957\\uB959-\\uB973\\uB975-\\uB98F\\uB991-\\uB9AB\\uB9AD-\\uB9C7\\uB9C9-\\uB9E3\\uB9E5-\\uB9FF\\uBA01-\\uBA1B\\uBA1D-\\uBA37\\uBA39-\\uBA53\\uBA55-\\uBA6F\\uBA71-\\uBA8B\\uBA8D-\\uBAA7\\uBAA9-\\uBAC3\\uBAC5-\\uBADF\\uBAE1-\\uBAFB\\uBAFD-\\uBB17\\uBB19-\\uBB33\\uBB35-\\uBB4F\\uBB51-\\uBB6B\\uBB6D-\\uBB87\\uBB89-\\uBBA3\\uBBA5-\\uBBBF\\uBBC1-\\uBBDB\\uBBDD-\\uBBF7\\uBBF9-\\uBC13\\uBC15-\\uBC2F\\uBC31-\\uBC4B\\uBC4D-\\uBC67\\uBC69-\\uBC83\\uBC85-\\uBC9F\\uBCA1-\\uBCBB\\uBCBD-\\uBCD7\\uBCD9-\\uBCF3\\uBCF5-\\uBD0F\\uBD11-\\uBD2B\\uBD2D-\\uBD47\\uBD49-\\uBD63\\uBD65-\\uBD7F\\uBD81-\\uBD9B\\uBD9D-\\uBDB7\\uBDB9-\\uBDD3\\uBDD5-\\uBDEF\\uBDF1-\\uBE0B\\uBE0D-\\uBE27\\uBE29-\\uBE43\\uBE45-\\uBE5F\\uBE61-\\uBE7B\\uBE7D-\\uBE97\\uBE99-\\uBEB3\\uBEB5-\\uBECF\\uBED1-\\uBEEB\\uBEED-\\uBF07\\uBF09-\\uBF23\\uBF25-\\uBF3F\\uBF41-\\uBF5B\\uBF5D-\\uBF77\\uBF79-\\uBF93\\uBF95-\\uBFAF\\uBFB1-\\uBFCB\\uBFCD-\\uBFE7\\uBFE9-\\uC003\\uC005-\\uC01F\\uC021-\\uC03B\\uC03D-\\uC057\\uC059-\\uC073\\uC075-\\uC08F\\uC091-\\uC0AB\\uC0AD-\\uC0C7\\uC0C9-\\uC0E3\\uC0E5-\\uC0FF\\uC101-\\uC11B\\uC11D-\\uC137\\uC139-\\uC153\\uC155-\\uC16F\\uC171-\\uC18B\\uC18D-\\uC1A7\\uC1A9-\\uC1C3\\uC1C5-\\uC1DF\\uC1E1-\\uC1FB\\uC1FD-\\uC217\\uC219-\\uC233\\uC235-\\uC24F\\uC251-\\uC26B\\uC26D-\\uC287\\uC289-\\uC2A3\\uC2A5-\\uC2BF\\uC2C1-\\uC2DB\\uC2DD-\\uC2F7\\uC2F9-\\uC313\\uC315-\\uC32F\\uC331-\\uC34B\\uC34D-\\uC367\\uC369-\\uC383\\uC385-\\uC39F\\uC3A1-\\uC3BB\\uC3BD-\\uC3D7\\uC3D9-\\uC3F3\\uC3F5-\\uC40F\\uC411-\\uC42B\\uC42D-\\uC447\\uC449-\\uC463\\uC465-\\uC47F\\uC481-\\uC49B\\uC49D-\\uC4B7\\uC4B9-\\uC4D3\\uC4D5-\\uC4EF\\uC4F1-\\uC50B\\uC50D-\\uC527\\uC529-\\uC543\\uC545-\\uC55F\\uC561-\\uC57B\\uC57D-\\uC597\\uC599-\\uC5B3\\uC5B5-\\uC5CF\\uC5D1-\\uC5EB\\uC5ED-\\uC607\\uC609-\\uC623\\uC625-\\uC63F\\uC641-\\uC65B\\uC65D-\\uC677\\uC679-\\uC693\\uC695-\\uC6AF\\uC6B1-\\uC6CB\\uC6CD-\\uC6E7\\uC6E9-\\uC703\\uC705-\\uC71F\\uC721-\\uC73B\\uC73D-\\uC757\\uC759-\\uC773\\uC775-\\uC78F\\uC791-\\uC7AB\\uC7AD-\\uC7C7\\uC7C9-\\uC7E3\\uC7E5-\\uC7FF\\uC801-\\uC81B\\uC81D-\\uC837\\uC839-\\uC853\\uC855-\\uC86F\\uC871-\\uC88B\\uC88D-\\uC8A7\\uC8A9-\\uC8C3\\uC8C5-\\uC8DF\\uC8E1-\\uC8FB\\uC8FD-\\uC917\\uC919-\\uC933\\uC935-\\uC94F\\uC951-\\uC96B\\uC96D-\\uC987\\uC989-\\uC9A3\\uC9A5-\\uC9BF\\uC9C1-\\uC9DB\\uC9DD-\\uC9F7\\uC9F9-\\uCA13\\uCA15-\\uCA2F\\uCA31-\\uCA4B\\uCA4D-\\uCA67\\uCA69-\\uCA83\\uCA85-\\uCA9F\\uCAA1-\\uCABB\\uCABD-\\uCAD7\\uCAD9-\\uCAF3\\uCAF5-\\uCB0F\\uCB11-\\uCB2B\\uCB2D-\\uCB47\\uCB49-\\uCB63\\uCB65-\\uCB7F\\uCB81-\\uCB9B\\uCB9D-\\uCBB7\\uCBB9-\\uCBD3\\uCBD5-\\uCBEF\\uCBF1-\\uCC0B\\uCC0D-\\uCC27\\uCC29-\\uCC43\\uCC45-\\uCC5F\\uCC61-\\uCC7B\\uCC7D-\\uCC97\\uCC99-\\uCCB3\\uCCB5-\\uCCCF\\uCCD1-\\uCCEB\\uCCED-\\uCD07\\uCD09-\\uCD23\\uCD25-\\uCD3F\\uCD41-\\uCD5B\\uCD5D-\\uCD77\\uCD79-\\uCD93\\uCD95-\\uCDAF\\uCDB1-\\uCDCB\\uCDCD-\\uCDE7\\uCDE9-\\uCE03\\uCE05-\\uCE1F\\uCE21-\\uCE3B\\uCE3D-\\uCE57\\uCE59-\\uCE73\\uCE75-\\uCE8F\\uCE91-\\uCEAB\\uCEAD-\\uCEC7\\uCEC9-\\uCEE3\\uCEE5-\\uCEFF\\uCF01-\\uCF1B\\uCF1D-\\uCF37\\uCF39-\\uCF53\\uCF55-\\uCF6F\\uCF71-\\uCF8B\\uCF8D-\\uCFA7\\uCFA9-\\uCFC3\\uCFC5-\\uCFDF\\uCFE1-\\uCFFB\\uCFFD-\\uD017\\uD019-\\uD033\\uD035-\\uD04F\\uD051-\\uD06B\\uD06D-\\uD087\\uD089-\\uD0A3\\uD0A5-\\uD0BF\\uD0C1-\\uD0DB\\uD0DD-\\uD0F7\\uD0F9-\\uD113\\uD115-\\uD12F\\uD131-\\uD14B\\uD14D-\\uD167\\uD169-\\uD183\\uD185-\\uD19F\\uD1A1-\\uD1BB\\uD1BD-\\uD1D7\\uD1D9-\\uD1F3\\uD1F5-\\uD20F\\uD211-\\uD22B\\uD22D-\\uD247\\uD249-\\uD263\\uD265-\\uD27F\\uD281-\\uD29B\\uD29D-\\uD2B7\\uD2B9-\\uD2D3\\uD2D5-\\uD2EF\\uD2F1-\\uD30B\\uD30D-\\uD327\\uD329-\\uD343\\uD345-\\uD35F\\uD361-\\uD37B\\uD37D-\\uD397\\uD399-\\uD3B3\\uD3B5-\\uD3CF\\uD3D1-\\uD3EB\\uD3ED-\\uD407\\uD409-\\uD423\\uD425-\\uD43F\\uD441-\\uD45B\\uD45D-\\uD477\\uD479-\\uD493\\uD495-\\uD4AF\\uD4B1-\\uD4CB\\uD4CD-\\uD4E7\\uD4E9-\\uD503\\uD505-\\uD51F\\uD521-\\uD53B\\uD53D-\\uD557\\uD559-\\uD573\\uD575-\\uD58F\\uD591-\\uD5AB\\uD5AD-\\uD5C7\\uD5C9-\\uD5E3\\uD5E5-\\uD5FF\\uD601-\\uD61B\\uD61D-\\uD637\\uD639-\\uD653\\uD655-\\uD66F\\uD671-\\uD68B\\uD68D-\\uD6A7\\uD6A9-\\uD6C3\\uD6C5-\\uD6DF\\uD6E1-\\uD6FB\\uD6FD-\\uD717\\uD719-\\uD733\\uD735-\\uD74F\\uD751-\\uD76B\\uD76D-\\uD787\\uD789-\\uD7A3]$/;\nvar reExtPict = /^(?:[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u2388\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2605\\u2607-\\u2612\\u2614-\\u2685\\u2690-\\u2705\\u2708-\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2767\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC00-\\uDCFF\\uDD0D-\\uDD0F\\uDD2F\\uDD6C-\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDAD-\\uDDE5\\uDE01-\\uDE0F\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE3C-\\uDE3F\\uDE49-\\uDFFA]|\\uD83D[\\uDC00-\\uDD3D\\uDD46-\\uDE4F\\uDE80-\\uDEFF\\uDF74-\\uDF7F\\uDFD5-\\uDFFF]|\\uD83E[\\uDC0C-\\uDC0F\\uDC48-\\uDC4F\\uDC5A-\\uDC5F\\uDC88-\\uDC8F\\uDCAE-\\uDCFF\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDEFF]|\\uD83F[\\uDC00-\\uDFFD])$/;\n\nvar getCodepointType = (char, code) => {\n var type = CodepointType.Any;\n\n if (char.search(reExtend) !== -1) {\n type |= CodepointType.Extend;\n }\n\n if (code === 0x200d) {\n type |= CodepointType.ZWJ;\n }\n\n if (code >= 0x1f1e6 && code <= 0x1f1ff) {\n type |= CodepointType.RI;\n }\n\n if (char.search(rePrepend) !== -1) {\n type |= CodepointType.Prepend;\n }\n\n if (char.search(reSpacingMark) !== -1) {\n type |= CodepointType.SpacingMark;\n }\n\n if (char.search(reL) !== -1) {\n type |= CodepointType.L;\n }\n\n if (char.search(reV) !== -1) {\n type |= CodepointType.V;\n }\n\n if (char.search(reT) !== -1) {\n type |= CodepointType.T;\n }\n\n if (char.search(reLV) !== -1) {\n type |= CodepointType.LV;\n }\n\n if (char.search(reLVT) !== -1) {\n type |= CodepointType.LVT;\n }\n\n if (char.search(reExtPict) !== -1) {\n type |= CodepointType.ExtPict;\n }\n\n return type;\n};\n\nfunction intersects(x, y) {\n return (x & y) !== 0;\n}\n\nvar NonBoundaryPairs = [// GB6\n[CodepointType.L, CodepointType.L | CodepointType.V | CodepointType.LV | CodepointType.LVT], // GB7\n[CodepointType.LV | CodepointType.V, CodepointType.V | CodepointType.T], // GB8\n[CodepointType.LVT | CodepointType.T, CodepointType.T], // GB9\n[CodepointType.Any, CodepointType.Extend | CodepointType.ZWJ], // GB9a\n[CodepointType.Any, CodepointType.SpacingMark], // GB9b\n[CodepointType.Prepend, CodepointType.Any], // GB11\n[CodepointType.ZWJ, CodepointType.ExtPict], // GB12 and GB13\n[CodepointType.RI, CodepointType.RI]];\n\nfunction isBoundaryPair(left, right) {\n return NonBoundaryPairs.findIndex(r => intersects(left, r[0]) && intersects(right, r[1])) === -1;\n}\n\nvar endingEmojiZWJ = /(?:[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u2388\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2605\\u2607-\\u2612\\u2614-\\u2685\\u2690-\\u2705\\u2708-\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2767\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC00-\\uDCFF\\uDD0D-\\uDD0F\\uDD2F\\uDD6C-\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDAD-\\uDDE5\\uDE01-\\uDE0F\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE3C-\\uDE3F\\uDE49-\\uDFFA]|\\uD83D[\\uDC00-\\uDD3D\\uDD46-\\uDE4F\\uDE80-\\uDEFF\\uDF74-\\uDF7F\\uDFD5-\\uDFFF]|\\uD83E[\\uDC0C-\\uDC0F\\uDC48-\\uDC4F\\uDC5A-\\uDC5F\\uDC88-\\uDC8F\\uDCAE-\\uDCFF\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDEFF]|\\uD83F[\\uDC00-\\uDFFD])(?:[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D3E\\u0D41-\\u0D44\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B03\\u1B34-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDEAB\\uDEAC\\uDF46-\\uDF50]|\\uD804[\\uDC01\\uDC38-\\uDC46\\uDC7F-\\uDC81\\uDCB3-\\uDCB6\\uDCB9\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD2B\\uDD2D-\\uDD34\\uDD73\\uDD80\\uDD81\\uDDB6-\\uDDBE\\uDDC9-\\uDDCC\\uDDCF\\uDE2F-\\uDE31\\uDE34\\uDE36\\uDE37\\uDE3E\\uDEDF\\uDEE3-\\uDEEA\\uDF00\\uDF01\\uDF3B\\uDF3C\\uDF3E\\uDF40\\uDF57\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC38-\\uDC3F\\uDC42-\\uDC44\\uDC46\\uDC5E\\uDCB0\\uDCB3-\\uDCB8\\uDCBA\\uDCBD\\uDCBF\\uDCC0\\uDCC2\\uDCC3\\uDDAF\\uDDB2-\\uDDB5\\uDDBC\\uDDBD\\uDDBF\\uDDC0\\uDDDC\\uDDDD\\uDE33-\\uDE3A\\uDE3D\\uDE3F\\uDE40\\uDEAB\\uDEAD\\uDEB0-\\uDEB5\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF25\\uDF27-\\uDF2B]|\\uD806[\\uDC2F-\\uDC37\\uDC39\\uDC3A\\uDD30\\uDD3B\\uDD3C\\uDD3E\\uDD43\\uDDD4-\\uDDD7\\uDDDA\\uDDDB\\uDDE0\\uDE01-\\uDE0A\\uDE33-\\uDE38\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE56\\uDE59-\\uDE5B\\uDE8A-\\uDE96\\uDE98\\uDE99]|\\uD807[\\uDC30-\\uDC36\\uDC38-\\uDC3D\\uDC3F\\uDC92-\\uDCA7\\uDCAA-\\uDCB0\\uDCB2\\uDCB3\\uDCB5\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD90\\uDD91\\uDD95\\uDD97\\uDEF3\\uDEF4]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF4F\\uDF8F-\\uDF92\\uDFE4]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65\\uDD67-\\uDD69\\uDD6E-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD30-\\uDD36\\uDEEC-\\uDEEF]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF])*\\u200D$/;\n\nvar endsWithEmojiZWJ = str => {\n return str.search(endingEmojiZWJ) !== -1;\n};\n\nvar endingRIs = /(?:\\uD83C[\\uDDE6-\\uDDFF])+$/g;\n\nvar endsWithOddNumberOfRIs = str => {\n var match = str.match(endingRIs);\n\n if (match === null) {\n return false;\n } else {\n // A RI is represented by a surrogate pair.\n var numRIs = match[0].length / 2;\n return numRIs % 2 === 1;\n }\n};\n\n/**\r\n * Shared the function with isElementType utility\r\n */\n\nvar isElement = value => {\n return isPlainObject(value) && Node.isNodeList(value.children) && !Editor.isEditor(value);\n}; // eslint-disable-next-line no-redeclare\n\n\nvar Element = {\n /**\r\n * Check if a value implements the 'Ancestor' interface.\r\n */\n isAncestor(value) {\n return isPlainObject(value) && Node.isNodeList(value.children);\n },\n\n /**\r\n * Check if a value implements the `Element` interface.\r\n */\n isElement,\n\n /**\r\n * Check if a value is an array of `Element` objects.\r\n */\n isElementList(value) {\n return Array.isArray(value) && value.every(val => Element.isElement(val));\n },\n\n /**\r\n * Check if a set of props is a partial of Element.\r\n */\n isElementProps(props) {\n return props.children !== undefined;\n },\n\n /**\r\n * Check if a value implements the `Element` interface and has elementKey with selected value.\r\n * Default it check to `type` key value\r\n */\n isElementType: function isElementType(value, elementVal) {\n var elementKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'type';\n return isElement(value) && value[elementKey] === elementVal;\n },\n\n /**\r\n * Check if an element matches set of properties.\r\n *\r\n * Note: this checks custom properties, and it does not ensure that any\r\n * children are equivalent.\r\n */\n matches(element, props) {\n for (var key in props) {\n if (key === 'children') {\n continue;\n }\n\n if (element[key] !== props[key]) {\n return false;\n }\n }\n\n return true;\n }\n\n};\n\nvar _excluded$4 = [\"text\"],\n _excluded2$3 = [\"text\"];\n\nfunction ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$8(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\nvar IS_EDITOR_CACHE = new WeakMap(); // eslint-disable-next-line no-redeclare\n\nvar Editor = {\n /**\r\n * Get the ancestor above a location in the document.\r\n */\n above(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n voids = false,\n mode = 'lowest',\n at = editor.selection,\n match\n } = options;\n\n if (!at) {\n return;\n }\n\n var path = Editor.path(editor, at);\n var reverse = mode === 'lowest';\n\n for (var [n, p] of Editor.levels(editor, {\n at: path,\n voids,\n match,\n reverse\n })) {\n if (!Text.isText(n) && !Path.equals(path, p)) {\n return [n, p];\n }\n }\n },\n\n /**\r\n * Add a custom property to the leaf text nodes in the current selection.\r\n *\r\n * If the selection is currently collapsed, the marks will be added to the\r\n * `editor.marks` property instead, and applied when text is inserted next.\r\n */\n addMark(editor, key, value) {\n editor.addMark(key, value);\n },\n\n /**\r\n * Get the point after a location.\r\n */\n after(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var anchor = Editor.point(editor, at, {\n edge: 'end'\n });\n var focus = Editor.end(editor, []);\n var range = {\n anchor,\n focus\n };\n var {\n distance = 1\n } = options;\n var d = 0;\n var target;\n\n for (var p of Editor.positions(editor, _objectSpread$8(_objectSpread$8({}, options), {}, {\n at: range\n }))) {\n if (d > distance) {\n break;\n }\n\n if (d !== 0) {\n target = p;\n }\n\n d++;\n }\n\n return target;\n },\n\n /**\r\n * Get the point before a location.\r\n */\n before(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var anchor = Editor.start(editor, []);\n var focus = Editor.point(editor, at, {\n edge: 'start'\n });\n var range = {\n anchor,\n focus\n };\n var {\n distance = 1\n } = options;\n var d = 0;\n var target;\n\n for (var p of Editor.positions(editor, _objectSpread$8(_objectSpread$8({}, options), {}, {\n at: range,\n reverse: true\n }))) {\n if (d > distance) {\n break;\n }\n\n if (d !== 0) {\n target = p;\n }\n\n d++;\n }\n\n return target;\n },\n\n /**\r\n * Delete content in the editor backward from the current selection.\r\n */\n deleteBackward(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n unit = 'character'\n } = options;\n editor.deleteBackward(unit);\n },\n\n /**\r\n * Delete content in the editor forward from the current selection.\r\n */\n deleteForward(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n unit = 'character'\n } = options;\n editor.deleteForward(unit);\n },\n\n /**\r\n * Delete the content in the current selection.\r\n */\n deleteFragment(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n direction = 'forward'\n } = options;\n editor.deleteFragment(direction);\n },\n\n /**\r\n * Get the start and end points of a location.\r\n */\n edges(editor, at) {\n return [Editor.start(editor, at), Editor.end(editor, at)];\n },\n\n /**\r\n * Get the end point of a location.\r\n */\n end(editor, at) {\n return Editor.point(editor, at, {\n edge: 'end'\n });\n },\n\n /**\r\n * Get the first node at a location.\r\n */\n first(editor, at) {\n var path = Editor.path(editor, at, {\n edge: 'start'\n });\n return Editor.node(editor, path);\n },\n\n /**\r\n * Get the fragment at a location.\r\n */\n fragment(editor, at) {\n var range = Editor.range(editor, at);\n var fragment = Node.fragment(editor, range);\n return fragment;\n },\n\n /**\r\n * Check if a node has block children.\r\n */\n hasBlocks(editor, element) {\n return element.children.some(n => Editor.isBlock(editor, n));\n },\n\n /**\r\n * Check if a node has inline and text children.\r\n */\n hasInlines(editor, element) {\n return element.children.some(n => Text.isText(n) || Editor.isInline(editor, n));\n },\n\n /**\r\n * Check if a node has text children.\r\n */\n hasTexts(editor, element) {\n return element.children.every(n => Text.isText(n));\n },\n\n /**\r\n * Insert a block break at the current selection.\r\n *\r\n * If the selection is currently expanded, it will be deleted first.\r\n */\n insertBreak(editor) {\n editor.insertBreak();\n },\n\n /**\r\n * Insert a soft break at the current selection.\r\n *\r\n * If the selection is currently expanded, it will be deleted first.\r\n */\n insertSoftBreak(editor) {\n editor.insertSoftBreak();\n },\n\n /**\r\n * Insert a fragment at the current selection.\r\n *\r\n * If the selection is currently expanded, it will be deleted first.\r\n */\n insertFragment(editor, fragment) {\n editor.insertFragment(fragment);\n },\n\n /**\r\n * Insert a node at the current selection.\r\n *\r\n * If the selection is currently expanded, it will be deleted first.\r\n */\n insertNode(editor, node) {\n editor.insertNode(node);\n },\n\n /**\r\n * Insert text at the current selection.\r\n *\r\n * If the selection is currently expanded, it will be deleted first.\r\n */\n insertText(editor, text) {\n editor.insertText(text);\n },\n\n /**\r\n * Check if a value is a block `Element` object.\r\n */\n isBlock(editor, value) {\n return Element.isElement(value) && !editor.isInline(value);\n },\n\n /**\r\n * Check if a value is an `Editor` object.\r\n */\n isEditor(value) {\n var cachedIsEditor = IS_EDITOR_CACHE.get(value);\n\n if (cachedIsEditor !== undefined) {\n return cachedIsEditor;\n }\n\n if (!isPlainObject(value)) {\n return false;\n }\n\n var isEditor = typeof value.addMark === 'function' && typeof value.apply === 'function' && typeof value.deleteBackward === 'function' && typeof value.deleteForward === 'function' && typeof value.deleteFragment === 'function' && typeof value.insertBreak === 'function' && typeof value.insertSoftBreak === 'function' && typeof value.insertFragment === 'function' && typeof value.insertNode === 'function' && typeof value.insertText === 'function' && typeof value.isInline === 'function' && typeof value.isVoid === 'function' && typeof value.normalizeNode === 'function' && typeof value.onChange === 'function' && typeof value.removeMark === 'function' && typeof value.getDirtyPaths === 'function' && (value.marks === null || isPlainObject(value.marks)) && (value.selection === null || Range.isRange(value.selection)) && Node.isNodeList(value.children) && Operation.isOperationList(value.operations);\n IS_EDITOR_CACHE.set(value, isEditor);\n return isEditor;\n },\n\n /**\r\n * Check if a point is the end point of a location.\r\n */\n isEnd(editor, point, at) {\n var end = Editor.end(editor, at);\n return Point.equals(point, end);\n },\n\n /**\r\n * Check if a point is an edge of a location.\r\n */\n isEdge(editor, point, at) {\n return Editor.isStart(editor, point, at) || Editor.isEnd(editor, point, at);\n },\n\n /**\r\n * Check if an element is empty, accounting for void nodes.\r\n */\n isEmpty(editor, element) {\n var {\n children\n } = element;\n var [first] = children;\n return children.length === 0 || children.length === 1 && Text.isText(first) && first.text === '' && !editor.isVoid(element);\n },\n\n /**\r\n * Check if a value is an inline `Element` object.\r\n */\n isInline(editor, value) {\n return Element.isElement(value) && editor.isInline(value);\n },\n\n /**\r\n * Check if the editor is currently normalizing after each operation.\r\n */\n isNormalizing(editor) {\n var isNormalizing = NORMALIZING.get(editor);\n return isNormalizing === undefined ? true : isNormalizing;\n },\n\n /**\r\n * Check if a point is the start point of a location.\r\n */\n isStart(editor, point, at) {\n // PERF: If the offset isn't `0` we know it's not the start.\n if (point.offset !== 0) {\n return false;\n }\n\n var start = Editor.start(editor, at);\n return Point.equals(point, start);\n },\n\n /**\r\n * Check if a value is a void `Element` object.\r\n */\n isVoid(editor, value) {\n return Element.isElement(value) && editor.isVoid(value);\n },\n\n /**\r\n * Get the last node at a location.\r\n */\n last(editor, at) {\n var path = Editor.path(editor, at, {\n edge: 'end'\n });\n return Editor.node(editor, path);\n },\n\n /**\r\n * Get the leaf text node at a location.\r\n */\n leaf(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var path = Editor.path(editor, at, options);\n var node = Node.leaf(editor, path);\n return [node, path];\n },\n\n /**\r\n * Iterate through all of the levels at a location.\r\n */\n *levels(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n at = editor.selection,\n reverse = false,\n voids = false\n } = options;\n var {\n match\n } = options;\n\n if (match == null) {\n match = () => true;\n }\n\n if (!at) {\n return;\n }\n\n var levels = [];\n var path = Editor.path(editor, at);\n\n for (var [n, p] of Node.levels(editor, path)) {\n if (!match(n, p)) {\n continue;\n }\n\n levels.push([n, p]);\n\n if (!voids && Editor.isVoid(editor, n)) {\n break;\n }\n }\n\n if (reverse) {\n levels.reverse();\n }\n\n yield* levels;\n },\n\n /**\r\n * Get the marks that would be added to text at the current selection.\r\n */\n marks(editor) {\n var {\n marks,\n selection\n } = editor;\n\n if (!selection) {\n return null;\n }\n\n if (marks) {\n return marks;\n }\n\n if (Range.isExpanded(selection)) {\n var [match] = Editor.nodes(editor, {\n match: Text.isText\n });\n\n if (match) {\n var [_node] = match;\n\n var _rest = _objectWithoutProperties(_node, _excluded$4);\n\n return _rest;\n } else {\n return {};\n }\n }\n\n var {\n anchor\n } = selection;\n var {\n path\n } = anchor;\n var [node] = Editor.leaf(editor, path);\n\n if (anchor.offset === 0) {\n var prev = Editor.previous(editor, {\n at: path,\n match: Text.isText\n });\n var block = Editor.above(editor, {\n match: n => Editor.isBlock(editor, n)\n });\n\n if (prev && block) {\n var [prevNode, prevPath] = prev;\n var [, blockPath] = block;\n\n if (Path.isAncestor(blockPath, prevPath)) {\n node = prevNode;\n }\n }\n }\n\n var rest = _objectWithoutProperties(node, _excluded2$3);\n\n return rest;\n },\n\n /**\r\n * Get the matching node in the branch of the document after a location.\r\n */\n next(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n mode = 'lowest',\n voids = false\n } = options;\n var {\n match,\n at = editor.selection\n } = options;\n\n if (!at) {\n return;\n }\n\n var pointAfterLocation = Editor.after(editor, at, {\n voids\n });\n if (!pointAfterLocation) return;\n var [, to] = Editor.last(editor, []);\n var span = [pointAfterLocation.path, to];\n\n if (Path.isPath(at) && at.length === 0) {\n throw new Error(\"Cannot get the next node from the root node!\");\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n var [parent] = Editor.parent(editor, at);\n\n match = n => parent.children.includes(n);\n } else {\n match = () => true;\n }\n }\n\n var [next] = Editor.nodes(editor, {\n at: span,\n match,\n mode,\n voids\n });\n return next;\n },\n\n /**\r\n * Get the node at a location.\r\n */\n node(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var path = Editor.path(editor, at, options);\n var node = Node.get(editor, path);\n return [node, path];\n },\n\n /**\r\n * Iterate through all of the nodes in the Editor.\r\n */\n *nodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n at = editor.selection,\n mode = 'all',\n universal = false,\n reverse = false,\n voids = false\n } = options;\n var {\n match\n } = options;\n\n if (!match) {\n match = () => true;\n }\n\n if (!at) {\n return;\n }\n\n var from;\n var to;\n\n if (Span.isSpan(at)) {\n from = at[0];\n to = at[1];\n } else {\n var first = Editor.path(editor, at, {\n edge: 'start'\n });\n var last = Editor.path(editor, at, {\n edge: 'end'\n });\n from = reverse ? last : first;\n to = reverse ? first : last;\n }\n\n var nodeEntries = Node.nodes(editor, {\n reverse,\n from,\n to,\n pass: _ref => {\n var [n] = _ref;\n return voids ? false : Editor.isVoid(editor, n);\n }\n });\n var matches = [];\n var hit;\n\n for (var [node, path] of nodeEntries) {\n var isLower = hit && Path.compare(path, hit[1]) === 0; // In highest mode any node lower than the last hit is not a match.\n\n if (mode === 'highest' && isLower) {\n continue;\n }\n\n if (!match(node, path)) {\n // If we've arrived at a leaf text node that is not lower than the last\n // hit, then we've found a branch that doesn't include a match, which\n // means the match is not universal.\n if (universal && !isLower && Text.isText(node)) {\n return;\n } else {\n continue;\n }\n } // If there's a match and it's lower than the last, update the hit.\n\n\n if (mode === 'lowest' && isLower) {\n hit = [node, path];\n continue;\n } // In lowest mode we emit the last hit, once it's guaranteed lowest.\n\n\n var emit = mode === 'lowest' ? hit : [node, path];\n\n if (emit) {\n if (universal) {\n matches.push(emit);\n } else {\n yield emit;\n }\n }\n\n hit = [node, path];\n } // Since lowest is always emitting one behind, catch up at the end.\n\n\n if (mode === 'lowest' && hit) {\n if (universal) {\n matches.push(hit);\n } else {\n yield hit;\n }\n } // Universal defers to ensure that the match occurs in every branch, so we\n // yield all of the matches after iterating.\n\n\n if (universal) {\n yield* matches;\n }\n },\n\n /**\r\n * Normalize any dirty objects in the editor.\r\n */\n normalize(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n force = false\n } = options;\n\n var getDirtyPaths = editor => {\n return DIRTY_PATHS.get(editor) || [];\n };\n\n var getDirtyPathKeys = editor => {\n return DIRTY_PATH_KEYS.get(editor) || new Set();\n };\n\n var popDirtyPath = editor => {\n var path = getDirtyPaths(editor).pop();\n var key = path.join(',');\n getDirtyPathKeys(editor).delete(key);\n return path;\n };\n\n if (!Editor.isNormalizing(editor)) {\n return;\n }\n\n if (force) {\n var allPaths = Array.from(Node.nodes(editor), _ref2 => {\n var [, p] = _ref2;\n return p;\n });\n var allPathKeys = new Set(allPaths.map(p => p.join(',')));\n DIRTY_PATHS.set(editor, allPaths);\n DIRTY_PATH_KEYS.set(editor, allPathKeys);\n }\n\n if (getDirtyPaths(editor).length === 0) {\n return;\n }\n\n Editor.withoutNormalizing(editor, () => {\n /*\r\n Fix dirty elements with no children.\r\n editor.normalizeNode() does fix this, but some normalization fixes also require it to work.\r\n Running an initial pass avoids the catch-22 race condition.\r\n */\n for (var dirtyPath of getDirtyPaths(editor)) {\n if (Node.has(editor, dirtyPath)) {\n var entry = Editor.node(editor, dirtyPath);\n var [node, _] = entry;\n /*\r\n The default normalizer inserts an empty text node in this scenario, but it can be customised.\r\n So there is some risk here.\r\n As long as the normalizer only inserts child nodes for this case it is safe to do in any order;\r\n by definition adding children to an empty node can't cause other paths to change.\r\n */\n\n if (Element.isElement(node) && node.children.length === 0) {\n editor.normalizeNode(entry);\n }\n }\n }\n\n var max = getDirtyPaths(editor).length * 42; // HACK: better way?\n\n var m = 0;\n\n while (getDirtyPaths(editor).length !== 0) {\n if (m > max) {\n throw new Error(\"\\n Could not completely normalize the editor after \".concat(max, \" iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\\n \"));\n }\n\n var _dirtyPath = popDirtyPath(editor); // If the node doesn't exist in the tree, it does not need to be normalized.\n\n\n if (Node.has(editor, _dirtyPath)) {\n var _entry = Editor.node(editor, _dirtyPath);\n\n editor.normalizeNode(_entry);\n }\n\n m++;\n }\n });\n },\n\n /**\r\n * Get the parent node of a location.\r\n */\n parent(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var path = Editor.path(editor, at, options);\n var parentPath = Path.parent(path);\n var entry = Editor.node(editor, parentPath);\n return entry;\n },\n\n /**\r\n * Get the path of a location.\r\n */\n path(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n depth,\n edge\n } = options;\n\n if (Path.isPath(at)) {\n if (edge === 'start') {\n var [, firstPath] = Node.first(editor, at);\n at = firstPath;\n } else if (edge === 'end') {\n var [, lastPath] = Node.last(editor, at);\n at = lastPath;\n }\n }\n\n if (Range.isRange(at)) {\n if (edge === 'start') {\n at = Range.start(at);\n } else if (edge === 'end') {\n at = Range.end(at);\n } else {\n at = Path.common(at.anchor.path, at.focus.path);\n }\n }\n\n if (Point.isPoint(at)) {\n at = at.path;\n }\n\n if (depth != null) {\n at = at.slice(0, depth);\n }\n\n return at;\n },\n\n hasPath(editor, path) {\n return Node.has(editor, path);\n },\n\n /**\r\n * Create a mutable ref for a `Path` object, which will stay in sync as new\r\n * operations are applied to the editor.\r\n */\n pathRef(editor, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n affinity = 'forward'\n } = options;\n var ref = {\n current: path,\n affinity,\n\n unref() {\n var {\n current\n } = ref;\n var pathRefs = Editor.pathRefs(editor);\n pathRefs.delete(ref);\n ref.current = null;\n return current;\n }\n\n };\n var refs = Editor.pathRefs(editor);\n refs.add(ref);\n return ref;\n },\n\n /**\r\n * Get the set of currently tracked path refs of the editor.\r\n */\n pathRefs(editor) {\n var refs = PATH_REFS.get(editor);\n\n if (!refs) {\n refs = new Set();\n PATH_REFS.set(editor, refs);\n }\n\n return refs;\n },\n\n /**\r\n * Get the start or end point of a location.\r\n */\n point(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n edge = 'start'\n } = options;\n\n if (Path.isPath(at)) {\n var path;\n\n if (edge === 'end') {\n var [, lastPath] = Node.last(editor, at);\n path = lastPath;\n } else {\n var [, firstPath] = Node.first(editor, at);\n path = firstPath;\n }\n\n var node = Node.get(editor, path);\n\n if (!Text.isText(node)) {\n throw new Error(\"Cannot get the \".concat(edge, \" point in the node at path [\").concat(at, \"] because it has no \").concat(edge, \" text node.\"));\n }\n\n return {\n path,\n offset: edge === 'end' ? node.text.length : 0\n };\n }\n\n if (Range.isRange(at)) {\n var [start, end] = Range.edges(at);\n return edge === 'start' ? start : end;\n }\n\n return at;\n },\n\n /**\r\n * Create a mutable ref for a `Point` object, which will stay in sync as new\r\n * operations are applied to the editor.\r\n */\n pointRef(editor, point) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n affinity = 'forward'\n } = options;\n var ref = {\n current: point,\n affinity,\n\n unref() {\n var {\n current\n } = ref;\n var pointRefs = Editor.pointRefs(editor);\n pointRefs.delete(ref);\n ref.current = null;\n return current;\n }\n\n };\n var refs = Editor.pointRefs(editor);\n refs.add(ref);\n return ref;\n },\n\n /**\r\n * Get the set of currently tracked point refs of the editor.\r\n */\n pointRefs(editor) {\n var refs = POINT_REFS.get(editor);\n\n if (!refs) {\n refs = new Set();\n POINT_REFS.set(editor, refs);\n }\n\n return refs;\n },\n\n /**\r\n * Return all the positions in `at` range where a `Point` can be placed.\r\n *\r\n * By default, moves forward by individual offsets at a time, but\r\n * the `unit` option can be used to to move by character, word, line, or block.\r\n *\r\n * The `reverse` option can be used to change iteration direction.\r\n *\r\n * Note: By default void nodes are treated as a single point and iteration\r\n * will not happen inside their content unless you pass in true for the\r\n * `voids` option, then iteration will occur.\r\n */\n *positions(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n at = editor.selection,\n unit = 'offset',\n reverse = false,\n voids = false\n } = options;\n\n if (!at) {\n return;\n }\n /**\r\n * Algorithm notes:\r\n *\r\n * Each step `distance` is dynamic depending on the underlying text\r\n * and the `unit` specified. Each step, e.g., a line or word, may\r\n * span multiple text nodes, so we iterate through the text both on\r\n * two levels in step-sync:\r\n *\r\n * `leafText` stores the text on a text leaf level, and is advanced\r\n * through using the counters `leafTextOffset` and `leafTextRemaining`.\r\n *\r\n * `blockText` stores the text on a block level, and is shortened\r\n * by `distance` every time it is advanced.\r\n *\r\n * We only maintain a window of one blockText and one leafText because\r\n * a block node always appears before all of its leaf nodes.\r\n */\n\n\n var range = Editor.range(editor, at);\n var [start, end] = Range.edges(range);\n var first = reverse ? end : start;\n var isNewBlock = false;\n var blockText = '';\n var distance = 0; // Distance for leafText to catch up to blockText.\n\n var leafTextRemaining = 0;\n var leafTextOffset = 0; // Iterate through all nodes in range, grabbing entire textual content\n // of block nodes in blockText, and text nodes in leafText.\n // Exploits the fact that nodes are sequenced in such a way that we first\n // encounter the block node, then all of its text nodes, so when iterating\n // through the blockText and leafText we just need to remember a window of\n // one block node and leaf node, respectively.\n\n for (var [node, path] of Editor.nodes(editor, {\n at,\n reverse,\n voids\n })) {\n /*\r\n * ELEMENT NODE - Yield position(s) for voids, collect blockText for blocks\r\n */\n if (Element.isElement(node)) {\n // Void nodes are a special case, so by default we will always\n // yield their first point. If the `voids` option is set to true,\n // then we will iterate over their content.\n if (!voids && editor.isVoid(node)) {\n yield Editor.start(editor, path);\n continue;\n } // Inline element nodes are ignored as they don't themselves\n // contribute to `blockText` or `leafText` - their parent and\n // children do.\n\n\n if (editor.isInline(node)) continue; // Block element node - set `blockText` to its text content.\n\n if (Editor.hasInlines(editor, node)) {\n // We always exhaust block nodes before encountering a new one:\n // console.assert(blockText === '',\n // `blockText='${blockText}' - `+\n // `not exhausted before new block node`, path)\n // Ensure range considered is capped to `range`, in the\n // start/end edge cases where block extends beyond range.\n // Equivalent to this, but presumably more performant:\n // blockRange = Editor.range(editor, ...Editor.edges(editor, path))\n // blockRange = Range.intersection(range, blockRange) // intersect\n // blockText = Editor.string(editor, blockRange, { voids })\n var e = Path.isAncestor(path, end.path) ? end : Editor.end(editor, path);\n var s = Path.isAncestor(path, start.path) ? start : Editor.start(editor, path);\n blockText = Editor.string(editor, {\n anchor: s,\n focus: e\n }, {\n voids\n });\n isNewBlock = true;\n }\n }\n /*\r\n * TEXT LEAF NODE - Iterate through text content, yielding\r\n * positions every `distance` offset according to `unit`.\r\n */\n\n\n if (Text.isText(node)) {\n var isFirst = Path.equals(path, first.path); // Proof that we always exhaust text nodes before encountering a new one:\n // console.assert(leafTextRemaining <= 0,\n // `leafTextRemaining=${leafTextRemaining} - `+\n // `not exhausted before new leaf text node`, path)\n // Reset `leafText` counters for new text node.\n\n if (isFirst) {\n leafTextRemaining = reverse ? first.offset : node.text.length - first.offset;\n leafTextOffset = first.offset; // Works for reverse too.\n } else {\n leafTextRemaining = node.text.length;\n leafTextOffset = reverse ? leafTextRemaining : 0;\n } // Yield position at the start of node (potentially).\n\n\n if (isFirst || isNewBlock || unit === 'offset') {\n yield {\n path,\n offset: leafTextOffset\n };\n isNewBlock = false;\n } // Yield positions every (dynamically calculated) `distance` offset.\n\n\n while (true) {\n // If `leafText` has caught up with `blockText` (distance=0),\n // and if blockText is exhausted, break to get another block node,\n // otherwise advance blockText forward by the new `distance`.\n if (distance === 0) {\n if (blockText === '') break;\n distance = calcDistance(blockText, unit, reverse); // Split the string at the previously found distance and use the\n // remaining string for the next iteration.\n\n blockText = splitByCharacterDistance(blockText, distance, reverse)[1];\n } // Advance `leafText` by the current `distance`.\n\n\n leafTextOffset = reverse ? leafTextOffset - distance : leafTextOffset + distance;\n leafTextRemaining = leafTextRemaining - distance; // If `leafText` is exhausted, break to get a new leaf node\n // and set distance to the overflow amount, so we'll (maybe)\n // catch up to blockText in the next leaf text node.\n\n if (leafTextRemaining < 0) {\n distance = -leafTextRemaining;\n break;\n } // Successfully walked `distance` offsets through `leafText`\n // to catch up with `blockText`, so we can reset `distance`\n // and yield this position in this node.\n\n\n distance = 0;\n yield {\n path,\n offset: leafTextOffset\n };\n }\n }\n } // Proof that upon completion, we've exahusted both leaf and block text:\n // console.assert(leafTextRemaining <= 0, \"leafText wasn't exhausted\")\n // console.assert(blockText === '', \"blockText wasn't exhausted\")\n // Helper:\n // Return the distance in offsets for a step of size `unit` on given string.\n\n\n function calcDistance(text, unit, reverse) {\n if (unit === 'character') {\n return getCharacterDistance(text, reverse);\n } else if (unit === 'word') {\n return getWordDistance(text, reverse);\n } else if (unit === 'line' || unit === 'block') {\n return text.length;\n }\n\n return 1;\n }\n },\n\n /**\r\n * Get the matching node in the branch of the document before a location.\r\n */\n previous(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n mode = 'lowest',\n voids = false\n } = options;\n var {\n match,\n at = editor.selection\n } = options;\n\n if (!at) {\n return;\n }\n\n var pointBeforeLocation = Editor.before(editor, at, {\n voids\n });\n\n if (!pointBeforeLocation) {\n return;\n }\n\n var [, to] = Editor.first(editor, []); // The search location is from the start of the document to the path of\n // the point before the location passed in\n\n var span = [pointBeforeLocation.path, to];\n\n if (Path.isPath(at) && at.length === 0) {\n throw new Error(\"Cannot get the previous node from the root node!\");\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n var [parent] = Editor.parent(editor, at);\n\n match = n => parent.children.includes(n);\n } else {\n match = () => true;\n }\n }\n\n var [previous] = Editor.nodes(editor, {\n reverse: true,\n at: span,\n match,\n mode,\n voids\n });\n return previous;\n },\n\n /**\r\n * Get a range of a location.\r\n */\n range(editor, at, to) {\n if (Range.isRange(at) && !to) {\n return at;\n }\n\n var start = Editor.start(editor, at);\n var end = Editor.end(editor, to || at);\n return {\n anchor: start,\n focus: end\n };\n },\n\n /**\r\n * Create a mutable ref for a `Range` object, which will stay in sync as new\r\n * operations are applied to the editor.\r\n */\n rangeRef(editor, range) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n affinity = 'forward'\n } = options;\n var ref = {\n current: range,\n affinity,\n\n unref() {\n var {\n current\n } = ref;\n var rangeRefs = Editor.rangeRefs(editor);\n rangeRefs.delete(ref);\n ref.current = null;\n return current;\n }\n\n };\n var refs = Editor.rangeRefs(editor);\n refs.add(ref);\n return ref;\n },\n\n /**\r\n * Get the set of currently tracked range refs of the editor.\r\n */\n rangeRefs(editor) {\n var refs = RANGE_REFS.get(editor);\n\n if (!refs) {\n refs = new Set();\n RANGE_REFS.set(editor, refs);\n }\n\n return refs;\n },\n\n /**\r\n * Remove a custom property from all of the leaf text nodes in the current\r\n * selection.\r\n *\r\n * If the selection is currently collapsed, the removal will be stored on\r\n * `editor.marks` and applied to the text inserted next.\r\n */\n removeMark(editor, key) {\n editor.removeMark(key);\n },\n\n /**\r\n * Manually set if the editor should currently be normalizing.\r\n *\r\n * Note: Using this incorrectly can leave the editor in an invalid state.\r\n *\r\n */\n setNormalizing(editor, isNormalizing) {\n NORMALIZING.set(editor, isNormalizing);\n },\n\n /**\r\n * Get the start point of a location.\r\n */\n start(editor, at) {\n return Editor.point(editor, at, {\n edge: 'start'\n });\n },\n\n /**\r\n * Get the text string content of a location.\r\n *\r\n * Note: by default the text of void nodes is considered to be an empty\r\n * string, regardless of content, unless you pass in true for the voids option\r\n */\n string(editor, at) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n voids = false\n } = options;\n var range = Editor.range(editor, at);\n var [start, end] = Range.edges(range);\n var text = '';\n\n for (var [node, path] of Editor.nodes(editor, {\n at: range,\n match: Text.isText,\n voids\n })) {\n var t = node.text;\n\n if (Path.equals(path, end.path)) {\n t = t.slice(0, end.offset);\n }\n\n if (Path.equals(path, start.path)) {\n t = t.slice(start.offset);\n }\n\n text += t;\n }\n\n return text;\n },\n\n /**\r\n * Convert a range into a non-hanging one.\r\n */\n unhangRange(editor, range) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n voids = false\n } = options;\n var [start, end] = Range.edges(range); // PERF: exit early if we can guarantee that the range isn't hanging.\n\n if (start.offset !== 0 || end.offset !== 0 || Range.isCollapsed(range)) {\n return range;\n }\n\n var endBlock = Editor.above(editor, {\n at: end,\n match: n => Editor.isBlock(editor, n)\n });\n var blockPath = endBlock ? endBlock[1] : [];\n var first = Editor.start(editor, start);\n var before = {\n anchor: first,\n focus: end\n };\n var skip = true;\n\n for (var [node, path] of Editor.nodes(editor, {\n at: before,\n match: Text.isText,\n reverse: true,\n voids\n })) {\n if (skip) {\n skip = false;\n continue;\n }\n\n if (node.text !== '' || Path.isBefore(path, blockPath)) {\n end = {\n path,\n offset: node.text.length\n };\n break;\n }\n }\n\n return {\n anchor: start,\n focus: end\n };\n },\n\n /**\r\n * Match a void node in the current branch of the editor.\r\n */\n void(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Editor.above(editor, _objectSpread$8(_objectSpread$8({}, options), {}, {\n match: n => Editor.isVoid(editor, n)\n }));\n },\n\n /**\r\n * Call a function, deferring normalization until after it completes.\r\n */\n withoutNormalizing(editor, fn) {\n var value = Editor.isNormalizing(editor);\n Editor.setNormalizing(editor, false);\n\n try {\n fn();\n } finally {\n Editor.setNormalizing(editor, value);\n }\n\n Editor.normalize(editor);\n }\n\n};\n\nvar Location = {\n /**\r\n * Check if a value implements the `Location` interface.\r\n */\n isLocation(value) {\n return Path.isPath(value) || Point.isPoint(value) || Range.isRange(value);\n }\n\n}; // eslint-disable-next-line no-redeclare\n\nvar Span = {\n /**\r\n * Check if a value implements the `Span` interface.\r\n */\n isSpan(value) {\n return Array.isArray(value) && value.length === 2 && value.every(Path.isPath);\n }\n\n};\n\nvar _excluded$3 = [\"children\"],\n _excluded2$2 = [\"text\"];\nvar IS_NODE_LIST_CACHE = new WeakMap(); // eslint-disable-next-line no-redeclare\n\nvar Node = {\n /**\r\n * Get the node at a specific path, asserting that it's an ancestor node.\r\n */\n ancestor(root, path) {\n var node = Node.get(root, path);\n\n if (Text.isText(node)) {\n throw new Error(\"Cannot get the ancestor node at path [\".concat(path, \"] because it refers to a text node instead: \").concat(Scrubber.stringify(node)));\n }\n\n return node;\n },\n\n /**\r\n * Return a generator of all the ancestor nodes above a specific path.\r\n *\r\n * By default the order is top-down, from highest to lowest ancestor in\r\n * the tree, but you can pass the `reverse: true` option to go bottom-up.\r\n */\n *ancestors(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n for (var p of Path.ancestors(path, options)) {\n var n = Node.ancestor(root, p);\n var entry = [n, p];\n yield entry;\n }\n },\n\n /**\r\n * Get the child of a node at a specific index.\r\n */\n child(root, index) {\n if (Text.isText(root)) {\n throw new Error(\"Cannot get the child of a text node: \".concat(Scrubber.stringify(root)));\n }\n\n var c = root.children[index];\n\n if (c == null) {\n throw new Error(\"Cannot get child at index `\".concat(index, \"` in node: \").concat(Scrubber.stringify(root)));\n }\n\n return c;\n },\n\n /**\r\n * Iterate over the children of a node at a specific path.\r\n */\n *children(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n reverse = false\n } = options;\n var ancestor = Node.ancestor(root, path);\n var {\n children\n } = ancestor;\n var index = reverse ? children.length - 1 : 0;\n\n while (reverse ? index >= 0 : index < children.length) {\n var child = Node.child(ancestor, index);\n var childPath = path.concat(index);\n yield [child, childPath];\n index = reverse ? index - 1 : index + 1;\n }\n },\n\n /**\r\n * Get an entry for the common ancesetor node of two paths.\r\n */\n common(root, path, another) {\n var p = Path.common(path, another);\n var n = Node.get(root, p);\n return [n, p];\n },\n\n /**\r\n * Get the node at a specific path, asserting that it's a descendant node.\r\n */\n descendant(root, path) {\n var node = Node.get(root, path);\n\n if (Editor.isEditor(node)) {\n throw new Error(\"Cannot get the descendant node at path [\".concat(path, \"] because it refers to the root editor node instead: \").concat(Scrubber.stringify(node)));\n }\n\n return node;\n },\n\n /**\r\n * Return a generator of all the descendant node entries inside a root node.\r\n */\n *descendants(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var [node, path] of Node.nodes(root, options)) {\n if (path.length !== 0) {\n // NOTE: we have to coerce here because checking the path's length does\n // guarantee that `node` is not a `Editor`, but TypeScript doesn't know.\n yield [node, path];\n }\n }\n },\n\n /**\r\n * Return a generator of all the element nodes inside a root node. Each iteration\r\n * will return an `ElementEntry` tuple consisting of `[Element, Path]`. If the\r\n * root node is an element it will be included in the iteration as well.\r\n */\n *elements(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var [node, path] of Node.nodes(root, options)) {\n if (Element.isElement(node)) {\n yield [node, path];\n }\n }\n },\n\n /**\r\n * Extract props from a Node.\r\n */\n extractProps(node) {\n if (Element.isAncestor(node)) {\n var properties = _objectWithoutProperties(node, _excluded$3);\n\n return properties;\n } else {\n var properties = _objectWithoutProperties(node, _excluded2$2);\n\n return properties;\n }\n },\n\n /**\r\n * Get the first node entry in a root node from a path.\r\n */\n first(root, path) {\n var p = path.slice();\n var n = Node.get(root, p);\n\n while (n) {\n if (Text.isText(n) || n.children.length === 0) {\n break;\n } else {\n n = n.children[0];\n p.push(0);\n }\n }\n\n return [n, p];\n },\n\n /**\r\n * Get the sliced fragment represented by a range inside a root node.\r\n */\n fragment(root, range) {\n if (Text.isText(root)) {\n throw new Error(\"Cannot get a fragment starting from a root text node: \".concat(Scrubber.stringify(root)));\n }\n\n var newRoot = produce({\n children: root.children\n }, r => {\n var [start, end] = Range.edges(range);\n var nodeEntries = Node.nodes(r, {\n reverse: true,\n pass: _ref => {\n var [, path] = _ref;\n return !Range.includes(range, path);\n }\n });\n\n for (var [, path] of nodeEntries) {\n if (!Range.includes(range, path)) {\n var parent = Node.parent(r, path);\n var index = path[path.length - 1];\n parent.children.splice(index, 1);\n }\n\n if (Path.equals(path, end.path)) {\n var leaf = Node.leaf(r, path);\n leaf.text = leaf.text.slice(0, end.offset);\n }\n\n if (Path.equals(path, start.path)) {\n var _leaf = Node.leaf(r, path);\n\n _leaf.text = _leaf.text.slice(start.offset);\n }\n }\n\n if (Editor.isEditor(r)) {\n r.selection = null;\n }\n });\n return newRoot.children;\n },\n\n /**\r\n * Get the descendant node referred to by a specific path. If the path is an\r\n * empty array, it refers to the root node itself.\r\n */\n get(root, path) {\n var node = root;\n\n for (var i = 0; i < path.length; i++) {\n var p = path[i];\n\n if (Text.isText(node) || !node.children[p]) {\n throw new Error(\"Cannot find a descendant at path [\".concat(path, \"] in node: \").concat(Scrubber.stringify(root)));\n }\n\n node = node.children[p];\n }\n\n return node;\n },\n\n /**\r\n * Check if a descendant node exists at a specific path.\r\n */\n has(root, path) {\n var node = root;\n\n for (var i = 0; i < path.length; i++) {\n var p = path[i];\n\n if (Text.isText(node) || !node.children[p]) {\n return false;\n }\n\n node = node.children[p];\n }\n\n return true;\n },\n\n /**\r\n * Check if a value implements the `Node` interface.\r\n */\n isNode(value) {\n return Text.isText(value) || Element.isElement(value) || Editor.isEditor(value);\n },\n\n /**\r\n * Check if a value is a list of `Node` objects.\r\n */\n isNodeList(value) {\n if (!Array.isArray(value)) {\n return false;\n }\n\n var cachedResult = IS_NODE_LIST_CACHE.get(value);\n\n if (cachedResult !== undefined) {\n return cachedResult;\n }\n\n var isNodeList = value.every(val => Node.isNode(val));\n IS_NODE_LIST_CACHE.set(value, isNodeList);\n return isNodeList;\n },\n\n /**\r\n * Get the last node entry in a root node from a path.\r\n */\n last(root, path) {\n var p = path.slice();\n var n = Node.get(root, p);\n\n while (n) {\n if (Text.isText(n) || n.children.length === 0) {\n break;\n } else {\n var i = n.children.length - 1;\n n = n.children[i];\n p.push(i);\n }\n }\n\n return [n, p];\n },\n\n /**\r\n * Get the node at a specific path, ensuring it's a leaf text node.\r\n */\n leaf(root, path) {\n var node = Node.get(root, path);\n\n if (!Text.isText(node)) {\n throw new Error(\"Cannot get the leaf node at path [\".concat(path, \"] because it refers to a non-leaf node: \").concat(Scrubber.stringify(node)));\n }\n\n return node;\n },\n\n /**\r\n * Return a generator of the in a branch of the tree, from a specific path.\r\n *\r\n * By default the order is top-down, from highest to lowest node in the tree,\r\n * but you can pass the `reverse: true` option to go bottom-up.\r\n */\n *levels(root, path) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n for (var p of Path.levels(path, options)) {\n var n = Node.get(root, p);\n yield [n, p];\n }\n },\n\n /**\r\n * Check if a node matches a set of props.\r\n */\n matches(node, props) {\n return Element.isElement(node) && Element.isElementProps(props) && Element.matches(node, props) || Text.isText(node) && Text.isTextProps(props) && Text.matches(node, props);\n },\n\n /**\r\n * Return a generator of all the node entries of a root node. Each entry is\r\n * returned as a `[Node, Path]` tuple, with the path referring to the node's\r\n * position inside the root node.\r\n */\n *nodes(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n pass,\n reverse = false\n } = options;\n var {\n from = [],\n to\n } = options;\n var visited = new Set();\n var p = [];\n var n = root;\n\n while (true) {\n if (to && (reverse ? Path.isBefore(p, to) : Path.isAfter(p, to))) {\n break;\n }\n\n if (!visited.has(n)) {\n yield [n, p];\n } // If we're allowed to go downward and we haven't descended yet, do.\n\n\n if (!visited.has(n) && !Text.isText(n) && n.children.length !== 0 && (pass == null || pass([n, p]) === false)) {\n visited.add(n);\n var nextIndex = reverse ? n.children.length - 1 : 0;\n\n if (Path.isAncestor(p, from)) {\n nextIndex = from[p.length];\n }\n\n p = p.concat(nextIndex);\n n = Node.get(root, p);\n continue;\n } // If we're at the root and we can't go down, we're done.\n\n\n if (p.length === 0) {\n break;\n } // If we're going forward...\n\n\n if (!reverse) {\n var newPath = Path.next(p);\n\n if (Node.has(root, newPath)) {\n p = newPath;\n n = Node.get(root, p);\n continue;\n }\n } // If we're going backward...\n\n\n if (reverse && p[p.length - 1] !== 0) {\n var _newPath = Path.previous(p);\n\n p = _newPath;\n n = Node.get(root, p);\n continue;\n } // Otherwise we're going upward...\n\n\n p = Path.parent(p);\n n = Node.get(root, p);\n visited.add(n);\n }\n },\n\n /**\r\n * Get the parent of a node at a specific path.\r\n */\n parent(root, path) {\n var parentPath = Path.parent(path);\n var p = Node.get(root, parentPath);\n\n if (Text.isText(p)) {\n throw new Error(\"Cannot get the parent of path [\".concat(path, \"] because it does not exist in the root.\"));\n }\n\n return p;\n },\n\n /**\r\n * Get the concatenated text string of a node's content.\r\n *\r\n * Note that this will not include spaces or line breaks between block nodes.\r\n * It is not a user-facing string, but a string for performing offset-related\r\n * computations for a node.\r\n */\n string(node) {\n if (Text.isText(node)) {\n return node.text;\n } else {\n return node.children.map(Node.string).join('');\n }\n },\n\n /**\r\n * Return a generator of all leaf text nodes in a root node.\r\n */\n *texts(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n for (var [node, path] of Node.nodes(root, options)) {\n if (Text.isText(node)) {\n yield [node, path];\n }\n }\n }\n\n};\n\nfunction ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar Operation = {\n /**\r\n * Check of a value is a `NodeOperation` object.\r\n */\n isNodeOperation(value) {\n return Operation.isOperation(value) && value.type.endsWith('_node');\n },\n\n /**\r\n * Check of a value is an `Operation` object.\r\n */\n isOperation(value) {\n if (!isPlainObject(value)) {\n return false;\n }\n\n switch (value.type) {\n case 'insert_node':\n return Path.isPath(value.path) && Node.isNode(value.node);\n\n case 'insert_text':\n return typeof value.offset === 'number' && typeof value.text === 'string' && Path.isPath(value.path);\n\n case 'merge_node':\n return typeof value.position === 'number' && Path.isPath(value.path) && isPlainObject(value.properties);\n\n case 'move_node':\n return Path.isPath(value.path) && Path.isPath(value.newPath);\n\n case 'remove_node':\n return Path.isPath(value.path) && Node.isNode(value.node);\n\n case 'remove_text':\n return typeof value.offset === 'number' && typeof value.text === 'string' && Path.isPath(value.path);\n\n case 'set_node':\n return Path.isPath(value.path) && isPlainObject(value.properties) && isPlainObject(value.newProperties);\n\n case 'set_selection':\n return value.properties === null && Range.isRange(value.newProperties) || value.newProperties === null && Range.isRange(value.properties) || isPlainObject(value.properties) && isPlainObject(value.newProperties);\n\n case 'split_node':\n return Path.isPath(value.path) && typeof value.position === 'number' && isPlainObject(value.properties);\n\n default:\n return false;\n }\n },\n\n /**\r\n * Check if a value is a list of `Operation` objects.\r\n */\n isOperationList(value) {\n return Array.isArray(value) && value.every(val => Operation.isOperation(val));\n },\n\n /**\r\n * Check of a value is a `SelectionOperation` object.\r\n */\n isSelectionOperation(value) {\n return Operation.isOperation(value) && value.type.endsWith('_selection');\n },\n\n /**\r\n * Check of a value is a `TextOperation` object.\r\n */\n isTextOperation(value) {\n return Operation.isOperation(value) && value.type.endsWith('_text');\n },\n\n /**\r\n * Invert an operation, returning a new operation that will exactly undo the\r\n * original when applied.\r\n */\n inverse(op) {\n switch (op.type) {\n case 'insert_node':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'remove_node'\n });\n }\n\n case 'insert_text':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'remove_text'\n });\n }\n\n case 'merge_node':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'split_node',\n path: Path.previous(op.path)\n });\n }\n\n case 'move_node':\n {\n var {\n newPath,\n path\n } = op; // PERF: in this case the move operation is a no-op anyways.\n\n if (Path.equals(newPath, path)) {\n return op;\n } // If the move happens completely within a single parent the path and\n // newPath are stable with respect to each other.\n\n\n if (Path.isSibling(path, newPath)) {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n path: newPath,\n newPath: path\n });\n } // If the move does not happen within a single parent it is possible\n // for the move to impact the true path to the location where the node\n // was removed from and where it was inserted. We have to adjust for this\n // and find the original path. We can accomplish this (only in non-sibling)\n // moves by looking at the impact of the move operation on the node\n // after the original move path.\n\n\n var inversePath = Path.transform(path, op);\n var inverseNewPath = Path.transform(Path.next(path), op);\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n path: inversePath,\n newPath: inverseNewPath\n });\n }\n\n case 'remove_node':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'insert_node'\n });\n }\n\n case 'remove_text':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'insert_text'\n });\n }\n\n case 'set_node':\n {\n var {\n properties,\n newProperties\n } = op;\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n properties: newProperties,\n newProperties: properties\n });\n }\n\n case 'set_selection':\n {\n var {\n properties: _properties,\n newProperties: _newProperties\n } = op;\n\n if (_properties == null) {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n properties: _newProperties,\n newProperties: null\n });\n } else if (_newProperties == null) {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n properties: null,\n newProperties: _properties\n });\n } else {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n properties: _newProperties,\n newProperties: _properties\n });\n }\n }\n\n case 'split_node':\n {\n return _objectSpread$7(_objectSpread$7({}, op), {}, {\n type: 'merge_node',\n path: Path.next(op.path)\n });\n }\n }\n }\n\n};\n\nvar Path = {\n /**\r\n * Get a list of ancestor paths for a given path.\r\n *\r\n * The paths are sorted from shallowest to deepest ancestor. However, if the\r\n * `reverse: true` option is passed, they are reversed.\r\n */\n ancestors(path) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var paths = Path.levels(path, options);\n\n if (reverse) {\n paths = paths.slice(1);\n } else {\n paths = paths.slice(0, -1);\n }\n\n return paths;\n },\n\n /**\r\n * Get the common ancestor path of two paths.\r\n */\n common(path, another) {\n var common = [];\n\n for (var i = 0; i < path.length && i < another.length; i++) {\n var av = path[i];\n var bv = another[i];\n\n if (av !== bv) {\n break;\n }\n\n common.push(av);\n }\n\n return common;\n },\n\n /**\r\n * Compare a path to another, returning an integer indicating whether the path\r\n * was before, at, or after the other.\r\n *\r\n * Note: Two paths of unequal length can still receive a `0` result if one is\r\n * directly above or below the other. If you want exact matching, use\r\n * [[Path.equals]] instead.\r\n */\n compare(path, another) {\n var min = Math.min(path.length, another.length);\n\n for (var i = 0; i < min; i++) {\n if (path[i] < another[i]) return -1;\n if (path[i] > another[i]) return 1;\n }\n\n return 0;\n },\n\n /**\r\n * Check if a path ends after one of the indexes in another.\r\n */\n endsAfter(path, another) {\n var i = path.length - 1;\n var as = path.slice(0, i);\n var bs = another.slice(0, i);\n var av = path[i];\n var bv = another[i];\n return Path.equals(as, bs) && av > bv;\n },\n\n /**\r\n * Check if a path ends at one of the indexes in another.\r\n */\n endsAt(path, another) {\n var i = path.length;\n var as = path.slice(0, i);\n var bs = another.slice(0, i);\n return Path.equals(as, bs);\n },\n\n /**\r\n * Check if a path ends before one of the indexes in another.\r\n */\n endsBefore(path, another) {\n var i = path.length - 1;\n var as = path.slice(0, i);\n var bs = another.slice(0, i);\n var av = path[i];\n var bv = another[i];\n return Path.equals(as, bs) && av < bv;\n },\n\n /**\r\n * Check if a path is exactly equal to another.\r\n */\n equals(path, another) {\n return path.length === another.length && path.every((n, i) => n === another[i]);\n },\n\n /**\r\n * Check if the path of previous sibling node exists\r\n */\n hasPrevious(path) {\n return path[path.length - 1] > 0;\n },\n\n /**\r\n * Check if a path is after another.\r\n */\n isAfter(path, another) {\n return Path.compare(path, another) === 1;\n },\n\n /**\r\n * Check if a path is an ancestor of another.\r\n */\n isAncestor(path, another) {\n return path.length < another.length && Path.compare(path, another) === 0;\n },\n\n /**\r\n * Check if a path is before another.\r\n */\n isBefore(path, another) {\n return Path.compare(path, another) === -1;\n },\n\n /**\r\n * Check if a path is a child of another.\r\n */\n isChild(path, another) {\n return path.length === another.length + 1 && Path.compare(path, another) === 0;\n },\n\n /**\r\n * Check if a path is equal to or an ancestor of another.\r\n */\n isCommon(path, another) {\n return path.length <= another.length && Path.compare(path, another) === 0;\n },\n\n /**\r\n * Check if a path is a descendant of another.\r\n */\n isDescendant(path, another) {\n return path.length > another.length && Path.compare(path, another) === 0;\n },\n\n /**\r\n * Check if a path is the parent of another.\r\n */\n isParent(path, another) {\n return path.length + 1 === another.length && Path.compare(path, another) === 0;\n },\n\n /**\r\n * Check is a value implements the `Path` interface.\r\n */\n isPath(value) {\n return Array.isArray(value) && (value.length === 0 || typeof value[0] === 'number');\n },\n\n /**\r\n * Check if a path is a sibling of another.\r\n */\n isSibling(path, another) {\n if (path.length !== another.length) {\n return false;\n }\n\n var as = path.slice(0, -1);\n var bs = another.slice(0, -1);\n var al = path[path.length - 1];\n var bl = another[another.length - 1];\n return al !== bl && Path.equals(as, bs);\n },\n\n /**\r\n * Get a list of paths at every level down to a path. Note: this is the same\r\n * as `Path.ancestors`, but including the path itself.\r\n *\r\n * The paths are sorted from shallowest to deepest. However, if the `reverse:\r\n * true` option is passed, they are reversed.\r\n */\n levels(path) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var list = [];\n\n for (var i = 0; i <= path.length; i++) {\n list.push(path.slice(0, i));\n }\n\n if (reverse) {\n list.reverse();\n }\n\n return list;\n },\n\n /**\r\n * Given a path, get the path to the next sibling node.\r\n */\n next(path) {\n if (path.length === 0) {\n throw new Error(\"Cannot get the next path of a root path [\".concat(path, \"], because it has no next index.\"));\n }\n\n var last = path[path.length - 1];\n return path.slice(0, -1).concat(last + 1);\n },\n\n /**\r\n * Returns whether this operation can affect paths or not. Used as an\r\n * optimization when updating dirty paths during normalization\r\n *\r\n * NOTE: This *must* be kept in sync with the implementation of 'transform'\r\n * below\r\n */\n operationCanTransformPath(operation) {\n switch (operation.type) {\n case 'insert_node':\n case 'remove_node':\n case 'merge_node':\n case 'split_node':\n case 'move_node':\n return true;\n\n default:\n return false;\n }\n },\n\n /**\r\n * Given a path, return a new path referring to the parent node above it.\r\n */\n parent(path) {\n if (path.length === 0) {\n throw new Error(\"Cannot get the parent path of the root path [\".concat(path, \"].\"));\n }\n\n return path.slice(0, -1);\n },\n\n /**\r\n * Given a path, get the path to the previous sibling node.\r\n */\n previous(path) {\n if (path.length === 0) {\n throw new Error(\"Cannot get the previous path of a root path [\".concat(path, \"], because it has no previous index.\"));\n }\n\n var last = path[path.length - 1];\n\n if (last <= 0) {\n throw new Error(\"Cannot get the previous path of a first child path [\".concat(path, \"] because it would result in a negative index.\"));\n }\n\n return path.slice(0, -1).concat(last - 1);\n },\n\n /**\r\n * Get a path relative to an ancestor.\r\n */\n relative(path, ancestor) {\n if (!Path.isAncestor(ancestor, path) && !Path.equals(path, ancestor)) {\n throw new Error(\"Cannot get the relative path of [\".concat(path, \"] inside ancestor [\").concat(ancestor, \"], because it is not above or equal to the path.\"));\n }\n\n return path.slice(ancestor.length);\n },\n\n /**\r\n * Transform a path by an operation.\r\n */\n transform(path, operation) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return produce(path, p => {\n var {\n affinity = 'forward'\n } = options; // PERF: Exit early if the operation is guaranteed not to have an effect.\n\n if (!path || (path === null || path === void 0 ? void 0 : path.length) === 0) {\n return;\n }\n\n if (p === null) {\n return null;\n }\n\n switch (operation.type) {\n case 'insert_node':\n {\n var {\n path: op\n } = operation;\n\n if (Path.equals(op, p) || Path.endsBefore(op, p) || Path.isAncestor(op, p)) {\n p[op.length - 1] += 1;\n }\n\n break;\n }\n\n case 'remove_node':\n {\n var {\n path: _op\n } = operation;\n\n if (Path.equals(_op, p) || Path.isAncestor(_op, p)) {\n return null;\n } else if (Path.endsBefore(_op, p)) {\n p[_op.length - 1] -= 1;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n var {\n path: _op2,\n position\n } = operation;\n\n if (Path.equals(_op2, p) || Path.endsBefore(_op2, p)) {\n p[_op2.length - 1] -= 1;\n } else if (Path.isAncestor(_op2, p)) {\n p[_op2.length - 1] -= 1;\n p[_op2.length] += position;\n }\n\n break;\n }\n\n case 'split_node':\n {\n var {\n path: _op3,\n position: _position\n } = operation;\n\n if (Path.equals(_op3, p)) {\n if (affinity === 'forward') {\n p[p.length - 1] += 1;\n } else if (affinity === 'backward') ; else {\n return null;\n }\n } else if (Path.endsBefore(_op3, p)) {\n p[_op3.length - 1] += 1;\n } else if (Path.isAncestor(_op3, p) && path[_op3.length] >= _position) {\n p[_op3.length - 1] += 1;\n p[_op3.length] -= _position;\n }\n\n break;\n }\n\n case 'move_node':\n {\n var {\n path: _op4,\n newPath: onp\n } = operation; // If the old and new path are the same, it's a no-op.\n\n if (Path.equals(_op4, onp)) {\n return;\n }\n\n if (Path.isAncestor(_op4, p) || Path.equals(_op4, p)) {\n var copy = onp.slice();\n\n if (Path.endsBefore(_op4, onp) && _op4.length < onp.length) {\n copy[_op4.length - 1] -= 1;\n }\n\n return copy.concat(p.slice(_op4.length));\n } else if (Path.isSibling(_op4, onp) && (Path.isAncestor(onp, p) || Path.equals(onp, p))) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n } else {\n p[_op4.length - 1] += 1;\n }\n } else if (Path.endsBefore(onp, p) || Path.equals(onp, p) || Path.isAncestor(onp, p)) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n }\n\n p[onp.length - 1] += 1;\n } else if (Path.endsBefore(_op4, p)) {\n if (Path.equals(onp, p)) {\n p[onp.length - 1] += 1;\n }\n\n p[_op4.length - 1] -= 1;\n }\n\n break;\n }\n }\n });\n }\n\n};\n\nvar PathRef = {\n /**\r\n * Transform the path ref's current value by an operation.\r\n */\n transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Path.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }\n\n};\n\nfunction ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar Point = {\n /**\r\n * Compare a point to another, returning an integer indicating whether the\r\n * point was before, at, or after the other.\r\n */\n compare(point, another) {\n var result = Path.compare(point.path, another.path);\n\n if (result === 0) {\n if (point.offset < another.offset) return -1;\n if (point.offset > another.offset) return 1;\n return 0;\n }\n\n return result;\n },\n\n /**\r\n * Check if a point is after another.\r\n */\n isAfter(point, another) {\n return Point.compare(point, another) === 1;\n },\n\n /**\r\n * Check if a point is before another.\r\n */\n isBefore(point, another) {\n return Point.compare(point, another) === -1;\n },\n\n /**\r\n * Check if a point is exactly equal to another.\r\n */\n equals(point, another) {\n // PERF: ensure the offsets are equal first since they are cheaper to check.\n return point.offset === another.offset && Path.equals(point.path, another.path);\n },\n\n /**\r\n * Check if a value implements the `Point` interface.\r\n */\n isPoint(value) {\n return isPlainObject(value) && typeof value.offset === 'number' && Path.isPath(value.path);\n },\n\n /**\r\n * Transform a point by an operation.\r\n */\n transform(point, op) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return produce(point, p => {\n if (p === null) {\n return null;\n }\n\n var {\n affinity = 'forward'\n } = options;\n var {\n path,\n offset\n } = p;\n\n switch (op.type) {\n case 'insert_node':\n case 'move_node':\n {\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'insert_text':\n {\n if (Path.equals(op.path, path) && (op.offset < offset || op.offset === offset && affinity === 'forward')) {\n p.offset += op.text.length;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n if (Path.equals(op.path, path)) {\n p.offset += op.position;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'remove_text':\n {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset -= Math.min(offset - op.offset, op.text.length);\n }\n\n break;\n }\n\n case 'remove_node':\n {\n if (Path.equals(op.path, path) || Path.isAncestor(op.path, path)) {\n return null;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'split_node':\n {\n if (Path.equals(op.path, path)) {\n if (op.position === offset && affinity == null) {\n return null;\n } else if (op.position < offset || op.position === offset && affinity === 'forward') {\n p.offset -= op.position;\n p.path = Path.transform(path, op, _objectSpread$6(_objectSpread$6({}, options), {}, {\n affinity: 'forward'\n }));\n }\n } else {\n p.path = Path.transform(path, op, options);\n }\n\n break;\n }\n }\n });\n }\n\n};\n\nvar PointRef = {\n /**\r\n * Transform the point ref's current value by an operation.\r\n */\n transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var point = Point.transform(current, op, {\n affinity\n });\n ref.current = point;\n\n if (point == null) {\n ref.unref();\n }\n }\n\n};\n\nvar _excluded$2 = [\"anchor\", \"focus\"];\n\nfunction ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar Range = {\n /**\r\n * Get the start and end points of a range, in the order in which they appear\r\n * in the document.\r\n */\n edges(range) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n reverse = false\n } = options;\n var {\n anchor,\n focus\n } = range;\n return Range.isBackward(range) === reverse ? [anchor, focus] : [focus, anchor];\n },\n\n /**\r\n * Get the end point of a range.\r\n */\n end(range) {\n var [, end] = Range.edges(range);\n return end;\n },\n\n /**\r\n * Check if a range is exactly equal to another.\r\n */\n equals(range, another) {\n return Point.equals(range.anchor, another.anchor) && Point.equals(range.focus, another.focus);\n },\n\n /**\r\n * Check if a range includes a path, a point or part of another range.\r\n */\n includes(range, target) {\n if (Range.isRange(target)) {\n if (Range.includes(range, target.anchor) || Range.includes(range, target.focus)) {\n return true;\n }\n\n var [rs, re] = Range.edges(range);\n var [ts, te] = Range.edges(target);\n return Point.isBefore(rs, ts) && Point.isAfter(re, te);\n }\n\n var [start, end] = Range.edges(range);\n var isAfterStart = false;\n var isBeforeEnd = false;\n\n if (Point.isPoint(target)) {\n isAfterStart = Point.compare(target, start) >= 0;\n isBeforeEnd = Point.compare(target, end) <= 0;\n } else {\n isAfterStart = Path.compare(target, start.path) >= 0;\n isBeforeEnd = Path.compare(target, end.path) <= 0;\n }\n\n return isAfterStart && isBeforeEnd;\n },\n\n /**\r\n * Get the intersection of a range with another.\r\n */\n intersection(range, another) {\n var rest = _objectWithoutProperties(range, _excluded$2);\n\n var [s1, e1] = Range.edges(range);\n var [s2, e2] = Range.edges(another);\n var start = Point.isBefore(s1, s2) ? s2 : s1;\n var end = Point.isBefore(e1, e2) ? e1 : e2;\n\n if (Point.isBefore(end, start)) {\n return null;\n } else {\n return _objectSpread$5({\n anchor: start,\n focus: end\n }, rest);\n }\n },\n\n /**\r\n * Check if a range is backward, meaning that its anchor point appears in the\r\n * document _after_ its focus point.\r\n */\n isBackward(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.isAfter(anchor, focus);\n },\n\n /**\r\n * Check if a range is collapsed, meaning that both its anchor and focus\r\n * points refer to the exact same position in the document.\r\n */\n isCollapsed(range) {\n var {\n anchor,\n focus\n } = range;\n return Point.equals(anchor, focus);\n },\n\n /**\r\n * Check if a range is expanded.\r\n *\r\n * This is the opposite of [[Range.isCollapsed]] and is provided for legibility.\r\n */\n isExpanded(range) {\n return !Range.isCollapsed(range);\n },\n\n /**\r\n * Check if a range is forward.\r\n *\r\n * This is the opposite of [[Range.isBackward]] and is provided for legibility.\r\n */\n isForward(range) {\n return !Range.isBackward(range);\n },\n\n /**\r\n * Check if a value implements the [[Range]] interface.\r\n */\n isRange(value) {\n return isPlainObject(value) && Point.isPoint(value.anchor) && Point.isPoint(value.focus);\n },\n\n /**\r\n * Iterate through all of the point entries in a range.\r\n */\n *points(range) {\n yield [range.anchor, 'anchor'];\n yield [range.focus, 'focus'];\n },\n\n /**\r\n * Get the start point of a range.\r\n */\n start(range) {\n var [start] = Range.edges(range);\n return start;\n },\n\n /**\r\n * Transform a range by an operation.\r\n */\n transform(range, op) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return produce(range, r => {\n if (r === null) {\n return null;\n }\n\n var {\n affinity = 'inward'\n } = options;\n var affinityAnchor;\n var affinityFocus;\n\n if (affinity === 'inward') {\n // If the range is collapsed, make sure to use the same affinity to\n // avoid the two points passing each other and expanding in the opposite\n // direction\n var isCollapsed = Range.isCollapsed(r);\n\n if (Range.isForward(r)) {\n affinityAnchor = 'forward';\n affinityFocus = isCollapsed ? affinityAnchor : 'backward';\n } else {\n affinityAnchor = 'backward';\n affinityFocus = isCollapsed ? affinityAnchor : 'forward';\n }\n } else if (affinity === 'outward') {\n if (Range.isForward(r)) {\n affinityAnchor = 'backward';\n affinityFocus = 'forward';\n } else {\n affinityAnchor = 'forward';\n affinityFocus = 'backward';\n }\n } else {\n affinityAnchor = affinity;\n affinityFocus = affinity;\n }\n\n var anchor = Point.transform(r.anchor, op, {\n affinity: affinityAnchor\n });\n var focus = Point.transform(r.focus, op, {\n affinity: affinityFocus\n });\n\n if (!anchor || !focus) {\n return null;\n }\n\n r.anchor = anchor;\n r.focus = focus;\n });\n }\n\n};\n\nvar RangeRef = {\n /**\r\n * Transform the range ref's current value by an operation.\r\n */\n transform(ref, op) {\n var {\n current,\n affinity\n } = ref;\n\n if (current == null) {\n return;\n }\n\n var path = Range.transform(current, op, {\n affinity\n });\n ref.current = path;\n\n if (path == null) {\n ref.unref();\n }\n }\n\n};\n\nvar _scrubber = undefined;\n/**\r\n * This interface implements a stringify() function, which is used by Slate\r\n * internally when generating exceptions containing end user data. Developers\r\n * using Slate may call Scrubber.setScrubber() to alter the behavior of this\r\n * stringify() function.\r\n *\r\n * For example, to prevent the cleartext logging of 'text' fields within Nodes:\r\n *\r\n * import { Scrubber } from 'slate';\r\n * Scrubber.setScrubber((key, val) => {\r\n * if (key === 'text') return '...scrubbed...'\r\n * return val\r\n * });\r\n *\r\n */\n// eslint-disable-next-line no-redeclare\n\nvar Scrubber = {\n setScrubber(scrubber) {\n _scrubber = scrubber;\n },\n\n stringify(value) {\n return JSON.stringify(value, _scrubber);\n }\n\n};\n\n/*\r\n Custom deep equal comparison for Slate nodes.\r\n\n We don't need general purpose deep equality;\r\n Slate only supports plain values, Arrays, and nested objects.\r\n Complex values nested inside Arrays are not supported.\r\n\n Slate objects are designed to be serialised, so\r\n missing keys are deliberately normalised to undefined.\r\n */\n\nvar isDeepEqual = (node, another) => {\n for (var key in node) {\n var a = node[key];\n var b = another[key];\n\n if (isPlainObject(a) && isPlainObject(b)) {\n if (!isDeepEqual(a, b)) return false;\n } else if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false;\n\n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n } else if (a !== b) {\n return false;\n }\n }\n /*\r\n Deep object equality is only necessary in one direction; in the reverse direction\r\n we are only looking for keys that are missing.\r\n As above, undefined keys are normalised to missing.\r\n */\n\n\n for (var _key in another) {\n if (node[_key] === undefined && another[_key] !== undefined) {\n return false;\n }\n }\n\n return true;\n};\n\nvar _excluded$1 = [\"text\"],\n _excluded2$1 = [\"anchor\", \"focus\"];\n\nfunction ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar Text = {\n /**\r\n * Check if two text nodes are equal.\r\n *\r\n * When loose is set, the text is not compared. This is\r\n * used to check whether sibling text nodes can be merged.\r\n */\n equals(text, another) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n loose = false\n } = options;\n\n function omitText(obj) {\n var rest = _objectWithoutProperties(obj, _excluded$1);\n\n return rest;\n }\n\n return isDeepEqual(loose ? omitText(text) : text, loose ? omitText(another) : another);\n },\n\n /**\r\n * Check if a value implements the `Text` interface.\r\n */\n isText(value) {\n return isPlainObject(value) && typeof value.text === 'string';\n },\n\n /**\r\n * Check if a value is a list of `Text` objects.\r\n */\n isTextList(value) {\n return Array.isArray(value) && value.every(val => Text.isText(val));\n },\n\n /**\r\n * Check if some props are a partial of Text.\r\n */\n isTextProps(props) {\n return props.text !== undefined;\n },\n\n /**\r\n * Check if an text matches set of properties.\r\n *\r\n * Note: this is for matching custom properties, and it does not ensure that\r\n * the `text` property are two nodes equal.\r\n */\n matches(text, props) {\n for (var key in props) {\n if (key === 'text') {\n continue;\n }\n\n if (!text.hasOwnProperty(key) || text[key] !== props[key]) {\n return false;\n }\n }\n\n return true;\n },\n\n /**\r\n * Get the leaves for a text node given decorations.\r\n */\n decorations(node, decorations) {\n var leaves = [_objectSpread$4({}, node)];\n\n for (var dec of decorations) {\n var rest = _objectWithoutProperties(dec, _excluded2$1);\n\n var [start, end] = Range.edges(dec);\n var next = [];\n var leafEnd = 0;\n var decorationStart = start.offset;\n var decorationEnd = end.offset;\n\n for (var leaf of leaves) {\n var {\n length\n } = leaf.text;\n var leafStart = leafEnd;\n leafEnd += length; // If the range encompasses the entire leaf, add the range.\n\n if (decorationStart <= leafStart && leafEnd <= decorationEnd) {\n Object.assign(leaf, rest);\n next.push(leaf);\n continue;\n } // If the range expanded and match the leaf, or starts after, or ends before it, continue.\n\n\n if (decorationStart !== decorationEnd && (decorationStart === leafEnd || decorationEnd === leafStart) || decorationStart > leafEnd || decorationEnd < leafStart || decorationEnd === leafStart && leafStart !== 0) {\n next.push(leaf);\n continue;\n } // Otherwise we need to split the leaf, at the start, end, or both,\n // and add the range to the middle intersecting section. Do the end\n // split first since we don't need to update the offset that way.\n\n\n var middle = leaf;\n var before = void 0;\n var after = void 0;\n\n if (decorationEnd < leafEnd) {\n var off = decorationEnd - leafStart;\n after = _objectSpread$4(_objectSpread$4({}, middle), {}, {\n text: middle.text.slice(off)\n });\n middle = _objectSpread$4(_objectSpread$4({}, middle), {}, {\n text: middle.text.slice(0, off)\n });\n }\n\n if (decorationStart > leafStart) {\n var _off = decorationStart - leafStart;\n\n before = _objectSpread$4(_objectSpread$4({}, middle), {}, {\n text: middle.text.slice(0, _off)\n });\n middle = _objectSpread$4(_objectSpread$4({}, middle), {}, {\n text: middle.text.slice(_off)\n });\n }\n\n Object.assign(middle, rest);\n\n if (before) {\n next.push(before);\n }\n\n next.push(middle);\n\n if (after) {\n next.push(after);\n }\n }\n\n leaves = next;\n }\n\n return leaves;\n }\n\n};\n\nfunction ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar applyToDraft = (editor, selection, op) => {\n switch (op.type) {\n case 'insert_node':\n {\n var {\n path,\n node\n } = op;\n var parent = Node.parent(editor, path);\n var index = path[path.length - 1];\n\n if (index > parent.children.length) {\n throw new Error(\"Cannot apply an \\\"insert_node\\\" operation at path [\".concat(path, \"] because the destination is past the end of the node.\"));\n }\n\n parent.children.splice(index, 0, node);\n\n if (selection) {\n for (var [point, key] of Range.points(selection)) {\n selection[key] = Point.transform(point, op);\n }\n }\n\n break;\n }\n\n case 'insert_text':\n {\n var {\n path: _path,\n offset,\n text\n } = op;\n if (text.length === 0) break;\n\n var _node = Node.leaf(editor, _path);\n\n var before = _node.text.slice(0, offset);\n\n var after = _node.text.slice(offset);\n\n _node.text = before + text + after;\n\n if (selection) {\n for (var [_point, _key] of Range.points(selection)) {\n selection[_key] = Point.transform(_point, op);\n }\n }\n\n break;\n }\n\n case 'merge_node':\n {\n var {\n path: _path2\n } = op;\n\n var _node2 = Node.get(editor, _path2);\n\n var prevPath = Path.previous(_path2);\n var prev = Node.get(editor, prevPath);\n\n var _parent = Node.parent(editor, _path2);\n\n var _index = _path2[_path2.length - 1];\n\n if (Text.isText(_node2) && Text.isText(prev)) {\n prev.text += _node2.text;\n } else if (!Text.isText(_node2) && !Text.isText(prev)) {\n prev.children.push(..._node2.children);\n } else {\n throw new Error(\"Cannot apply a \\\"merge_node\\\" operation at path [\".concat(_path2, \"] to nodes of different interfaces: \").concat(Scrubber.stringify(_node2), \" \").concat(Scrubber.stringify(prev)));\n }\n\n _parent.children.splice(_index, 1);\n\n if (selection) {\n for (var [_point2, _key2] of Range.points(selection)) {\n selection[_key2] = Point.transform(_point2, op);\n }\n }\n\n break;\n }\n\n case 'move_node':\n {\n var {\n path: _path3,\n newPath\n } = op;\n\n if (Path.isAncestor(_path3, newPath)) {\n throw new Error(\"Cannot move a path [\".concat(_path3, \"] to new path [\").concat(newPath, \"] because the destination is inside itself.\"));\n }\n\n var _node3 = Node.get(editor, _path3);\n\n var _parent2 = Node.parent(editor, _path3);\n\n var _index2 = _path3[_path3.length - 1]; // This is tricky, but since the `path` and `newPath` both refer to\n // the same snapshot in time, there's a mismatch. After either\n // removing the original position, the second step's path can be out\n // of date. So instead of using the `op.newPath` directly, we\n // transform `op.path` to ascertain what the `newPath` would be after\n // the operation was applied.\n\n _parent2.children.splice(_index2, 1);\n\n var truePath = Path.transform(_path3, op);\n var newParent = Node.get(editor, Path.parent(truePath));\n var newIndex = truePath[truePath.length - 1];\n newParent.children.splice(newIndex, 0, _node3);\n\n if (selection) {\n for (var [_point3, _key3] of Range.points(selection)) {\n selection[_key3] = Point.transform(_point3, op);\n }\n }\n\n break;\n }\n\n case 'remove_node':\n {\n var {\n path: _path4\n } = op;\n var _index3 = _path4[_path4.length - 1];\n\n var _parent3 = Node.parent(editor, _path4);\n\n _parent3.children.splice(_index3, 1); // Transform all of the points in the value, but if the point was in the\n // node that was removed we need to update the range or remove it.\n\n\n if (selection) {\n for (var [_point4, _key4] of Range.points(selection)) {\n var result = Point.transform(_point4, op);\n\n if (selection != null && result != null) {\n selection[_key4] = result;\n } else {\n var _prev = void 0;\n\n var next = void 0;\n\n for (var [n, p] of Node.texts(editor)) {\n if (Path.compare(p, _path4) === -1) {\n _prev = [n, p];\n } else {\n next = [n, p];\n break;\n }\n }\n\n var preferNext = false;\n\n if (_prev && next) {\n if (Path.equals(next[1], _path4)) {\n preferNext = !Path.hasPrevious(next[1]);\n } else {\n preferNext = Path.common(_prev[1], _path4).length < Path.common(next[1], _path4).length;\n }\n }\n\n if (_prev && !preferNext) {\n _point4.path = _prev[1];\n _point4.offset = _prev[0].text.length;\n } else if (next) {\n _point4.path = next[1];\n _point4.offset = 0;\n } else {\n selection = null;\n }\n }\n }\n }\n\n break;\n }\n\n case 'remove_text':\n {\n var {\n path: _path5,\n offset: _offset,\n text: _text\n } = op;\n if (_text.length === 0) break;\n\n var _node4 = Node.leaf(editor, _path5);\n\n var _before = _node4.text.slice(0, _offset);\n\n var _after = _node4.text.slice(_offset + _text.length);\n\n _node4.text = _before + _after;\n\n if (selection) {\n for (var [_point5, _key5] of Range.points(selection)) {\n selection[_key5] = Point.transform(_point5, op);\n }\n }\n\n break;\n }\n\n case 'set_node':\n {\n var {\n path: _path6,\n properties,\n newProperties\n } = op;\n\n if (_path6.length === 0) {\n throw new Error(\"Cannot set properties on the root node!\");\n }\n\n var _node5 = Node.get(editor, _path6);\n\n for (var _key6 in newProperties) {\n if (_key6 === 'children' || _key6 === 'text') {\n throw new Error(\"Cannot set the \\\"\".concat(_key6, \"\\\" property of nodes!\"));\n }\n\n var value = newProperties[_key6];\n\n if (value == null) {\n delete _node5[_key6];\n } else {\n _node5[_key6] = value;\n }\n } // properties that were previously defined, but are now missing, must be deleted\n\n\n for (var _key7 in properties) {\n if (!newProperties.hasOwnProperty(_key7)) {\n delete _node5[_key7];\n }\n }\n\n break;\n }\n\n case 'set_selection':\n {\n var {\n newProperties: _newProperties\n } = op;\n\n if (_newProperties == null) {\n selection = _newProperties;\n } else {\n if (selection == null) {\n if (!Range.isRange(_newProperties)) {\n throw new Error(\"Cannot apply an incomplete \\\"set_selection\\\" operation properties \".concat(Scrubber.stringify(_newProperties), \" when there is no current selection.\"));\n }\n\n selection = _objectSpread$3({}, _newProperties);\n }\n\n for (var _key8 in _newProperties) {\n var _value = _newProperties[_key8];\n\n if (_value == null) {\n if (_key8 === 'anchor' || _key8 === 'focus') {\n throw new Error(\"Cannot remove the \\\"\".concat(_key8, \"\\\" selection property\"));\n }\n\n delete selection[_key8];\n } else {\n selection[_key8] = _value;\n }\n }\n }\n\n break;\n }\n\n case 'split_node':\n {\n var {\n path: _path7,\n position,\n properties: _properties\n } = op;\n\n if (_path7.length === 0) {\n throw new Error(\"Cannot apply a \\\"split_node\\\" operation at path [\".concat(_path7, \"] because the root node cannot be split.\"));\n }\n\n var _node6 = Node.get(editor, _path7);\n\n var _parent4 = Node.parent(editor, _path7);\n\n var _index4 = _path7[_path7.length - 1];\n var newNode;\n\n if (Text.isText(_node6)) {\n var _before2 = _node6.text.slice(0, position);\n\n var _after2 = _node6.text.slice(position);\n\n _node6.text = _before2;\n newNode = _objectSpread$3(_objectSpread$3({}, _properties), {}, {\n text: _after2\n });\n } else {\n var _before3 = _node6.children.slice(0, position);\n\n var _after3 = _node6.children.slice(position);\n\n _node6.children = _before3;\n newNode = _objectSpread$3(_objectSpread$3({}, _properties), {}, {\n children: _after3\n });\n }\n\n _parent4.children.splice(_index4 + 1, 0, newNode);\n\n if (selection) {\n for (var [_point6, _key9] of Range.points(selection)) {\n selection[_key9] = Point.transform(_point6, op);\n }\n }\n\n break;\n }\n }\n\n return selection;\n}; // eslint-disable-next-line no-redeclare\n\n\nvar GeneralTransforms = {\n /**\r\n * Transform the editor by an operation.\r\n */\n transform(editor, op) {\n editor.children = createDraft(editor.children);\n var selection = editor.selection && createDraft(editor.selection);\n\n try {\n selection = applyToDraft(editor, selection, op);\n } finally {\n editor.children = finishDraft(editor.children);\n\n if (selection) {\n editor.selection = isDraft(selection) ? finishDraft(selection) : selection;\n } else {\n editor.selection = null;\n }\n }\n }\n\n};\n\nvar _excluded = [\"text\"],\n _excluded2 = [\"children\"];\n\nfunction ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar NodeTransforms = {\n /**\r\n * Insert nodes at a specific location in the Editor.\r\n */\n insertNodes(editor, nodes) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n hanging = false,\n voids = false,\n mode = 'lowest'\n } = options;\n var {\n at,\n match,\n select\n } = options;\n\n if (Node.isNode(nodes)) {\n nodes = [nodes];\n }\n\n if (nodes.length === 0) {\n return;\n }\n\n var [node] = nodes; // By default, use the selection as the target location. But if there is\n // no selection, insert at the end of the document since that is such a\n // common use case when inserting from a non-selected state.\n\n if (!at) {\n if (editor.selection) {\n at = editor.selection;\n } else if (editor.children.length > 0) {\n at = Editor.end(editor, []);\n } else {\n at = [0];\n }\n\n select = true;\n }\n\n if (select == null) {\n select = false;\n }\n\n if (Range.isRange(at)) {\n if (!hanging) {\n at = Editor.unhangRange(editor, at);\n }\n\n if (Range.isCollapsed(at)) {\n at = at.anchor;\n } else {\n var [, end] = Range.edges(at);\n var pointRef = Editor.pointRef(editor, end);\n Transforms.delete(editor, {\n at\n });\n at = pointRef.unref();\n }\n }\n\n if (Point.isPoint(at)) {\n if (match == null) {\n if (Text.isText(node)) {\n match = n => Text.isText(n);\n } else if (editor.isInline(node)) {\n match = n => Text.isText(n) || Editor.isInline(editor, n);\n } else {\n match = n => Editor.isBlock(editor, n);\n }\n }\n\n var [entry] = Editor.nodes(editor, {\n at: at.path,\n match,\n mode,\n voids\n });\n\n if (entry) {\n var [, _matchPath] = entry;\n var pathRef = Editor.pathRef(editor, _matchPath);\n var isAtEnd = Editor.isEnd(editor, at, _matchPath);\n Transforms.splitNodes(editor, {\n at,\n match,\n mode,\n voids\n });\n var path = pathRef.unref();\n at = isAtEnd ? Path.next(path) : path;\n } else {\n return;\n }\n }\n\n var parentPath = Path.parent(at);\n var index = at[at.length - 1];\n\n if (!voids && Editor.void(editor, {\n at: parentPath\n })) {\n return;\n }\n\n for (var _node of nodes) {\n var _path = parentPath.concat(index);\n\n index++;\n editor.apply({\n type: 'insert_node',\n path: _path,\n node: _node\n });\n at = Path.next(at);\n }\n\n at = Path.previous(at);\n\n if (select) {\n var point = Editor.end(editor, at);\n\n if (point) {\n Transforms.select(editor, point);\n }\n }\n });\n },\n\n /**\r\n * Lift nodes at a specific location upwards in the document tree, splitting\r\n * their parent in two if necessary.\r\n */\n liftNodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n at = editor.selection,\n mode = 'lowest',\n voids = false\n } = options;\n var {\n match\n } = options;\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n if (!at) {\n return;\n }\n\n var matches = Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n });\n var pathRefs = Array.from(matches, _ref => {\n var [, p] = _ref;\n return Editor.pathRef(editor, p);\n });\n\n for (var pathRef of pathRefs) {\n var path = pathRef.unref();\n\n if (path.length < 2) {\n throw new Error(\"Cannot lift node at a path [\".concat(path, \"] because it has a depth of less than `2`.\"));\n }\n\n var parentNodeEntry = Editor.node(editor, Path.parent(path));\n var [parent, parentPath] = parentNodeEntry;\n var index = path[path.length - 1];\n var {\n length\n } = parent.children;\n\n if (length === 1) {\n var toPath = Path.next(parentPath);\n Transforms.moveNodes(editor, {\n at: path,\n to: toPath,\n voids\n });\n Transforms.removeNodes(editor, {\n at: parentPath,\n voids\n });\n } else if (index === 0) {\n Transforms.moveNodes(editor, {\n at: path,\n to: parentPath,\n voids\n });\n } else if (index === length - 1) {\n var _toPath = Path.next(parentPath);\n\n Transforms.moveNodes(editor, {\n at: path,\n to: _toPath,\n voids\n });\n } else {\n var splitPath = Path.next(path);\n\n var _toPath2 = Path.next(parentPath);\n\n Transforms.splitNodes(editor, {\n at: splitPath,\n voids\n });\n Transforms.moveNodes(editor, {\n at: path,\n to: _toPath2,\n voids\n });\n }\n }\n });\n },\n\n /**\r\n * Merge a node at a location with the previous node of the same depth,\r\n * removing any empty containing nodes after the merge if necessary.\r\n */\n mergeNodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n match,\n at = editor.selection\n } = options;\n var {\n hanging = false,\n voids = false,\n mode = 'lowest'\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n var [parent] = Editor.parent(editor, at);\n\n match = n => parent.children.includes(n);\n } else {\n match = n => Editor.isBlock(editor, n);\n }\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at);\n }\n\n if (Range.isRange(at)) {\n if (Range.isCollapsed(at)) {\n at = at.anchor;\n } else {\n var [, end] = Range.edges(at);\n var pointRef = Editor.pointRef(editor, end);\n Transforms.delete(editor, {\n at\n });\n at = pointRef.unref();\n\n if (options.at == null) {\n Transforms.select(editor, at);\n }\n }\n }\n\n var [current] = Editor.nodes(editor, {\n at,\n match,\n voids,\n mode\n });\n var prev = Editor.previous(editor, {\n at,\n match,\n voids,\n mode\n });\n\n if (!current || !prev) {\n return;\n }\n\n var [node, path] = current;\n var [prevNode, prevPath] = prev;\n\n if (path.length === 0 || prevPath.length === 0) {\n return;\n }\n\n var newPath = Path.next(prevPath);\n var commonPath = Path.common(path, prevPath);\n var isPreviousSibling = Path.isSibling(path, prevPath);\n var levels = Array.from(Editor.levels(editor, {\n at: path\n }), _ref2 => {\n var [n] = _ref2;\n return n;\n }).slice(commonPath.length).slice(0, -1); // Determine if the merge will leave an ancestor of the path empty as a\n // result, in which case we'll want to remove it after merging.\n\n var emptyAncestor = Editor.above(editor, {\n at: path,\n mode: 'highest',\n match: n => levels.includes(n) && hasSingleChildNest(editor, n)\n });\n var emptyRef = emptyAncestor && Editor.pathRef(editor, emptyAncestor[1]);\n var properties;\n var position; // Ensure that the nodes are equivalent, and figure out what the position\n // and extra properties of the merge will be.\n\n if (Text.isText(node) && Text.isText(prevNode)) {\n var rest = _objectWithoutProperties(node, _excluded);\n\n position = prevNode.text.length;\n properties = rest;\n } else if (Element.isElement(node) && Element.isElement(prevNode)) {\n var rest = _objectWithoutProperties(node, _excluded2);\n\n position = prevNode.children.length;\n properties = rest;\n } else {\n throw new Error(\"Cannot merge the node at path [\".concat(path, \"] with the previous sibling because it is not the same kind: \").concat(Scrubber.stringify(node), \" \").concat(Scrubber.stringify(prevNode)));\n } // If the node isn't already the next sibling of the previous node, move\n // it so that it is before merging.\n\n\n if (!isPreviousSibling) {\n Transforms.moveNodes(editor, {\n at: path,\n to: newPath,\n voids\n });\n } // If there was going to be an empty ancestor of the node that was merged,\n // we remove it from the tree.\n\n\n if (emptyRef) {\n Transforms.removeNodes(editor, {\n at: emptyRef.current,\n voids\n });\n } // If the target node that we're merging with is empty, remove it instead\n // of merging the two. This is a common rich text editor behavior to\n // prevent losing formatting when deleting entire nodes when you have a\n // hanging selection.\n // if prevNode is first child in parent,don't remove it.\n\n\n if (Element.isElement(prevNode) && Editor.isEmpty(editor, prevNode) || Text.isText(prevNode) && prevNode.text === '' && prevPath[prevPath.length - 1] !== 0) {\n Transforms.removeNodes(editor, {\n at: prevPath,\n voids\n });\n } else {\n editor.apply({\n type: 'merge_node',\n path: newPath,\n position,\n properties\n });\n }\n\n if (emptyRef) {\n emptyRef.unref();\n }\n });\n },\n\n /**\r\n * Move the nodes at a location to a new location.\r\n */\n moveNodes(editor, options) {\n Editor.withoutNormalizing(editor, () => {\n var {\n to,\n at = editor.selection,\n mode = 'lowest',\n voids = false\n } = options;\n var {\n match\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n var toRef = Editor.pathRef(editor, to);\n var targets = Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n });\n var pathRefs = Array.from(targets, _ref3 => {\n var [, p] = _ref3;\n return Editor.pathRef(editor, p);\n });\n\n for (var pathRef of pathRefs) {\n var path = pathRef.unref();\n var newPath = toRef.current;\n\n if (path.length !== 0) {\n editor.apply({\n type: 'move_node',\n path,\n newPath\n });\n }\n\n if (toRef.current && Path.isSibling(newPath, path) && Path.isAfter(newPath, path)) {\n // When performing a sibling move to a later index, the path at the destination is shifted\n // to before the insertion point instead of after. To ensure our group of nodes are inserted\n // in the correct order we increment toRef to account for that\n toRef.current = Path.next(toRef.current);\n }\n }\n\n toRef.unref();\n });\n },\n\n /**\r\n * Remove the nodes at a specific location in the document.\r\n */\n removeNodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n hanging = false,\n voids = false,\n mode = 'lowest'\n } = options;\n var {\n at = editor.selection,\n match\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at);\n }\n\n var depths = Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n });\n var pathRefs = Array.from(depths, _ref4 => {\n var [, p] = _ref4;\n return Editor.pathRef(editor, p);\n });\n\n for (var pathRef of pathRefs) {\n var path = pathRef.unref();\n\n if (path) {\n var [node] = Editor.node(editor, path);\n editor.apply({\n type: 'remove_node',\n path,\n node\n });\n }\n }\n });\n },\n\n /**\r\n * Set new properties on the nodes at a location.\r\n */\n setNodes(editor, props) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n match,\n at = editor.selection,\n compare,\n merge\n } = options;\n var {\n hanging = false,\n mode = 'lowest',\n split = false,\n voids = false\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at);\n }\n\n if (split && Range.isRange(at)) {\n if (Range.isCollapsed(at) && Editor.leaf(editor, at.anchor)[0].text.length > 0) {\n // If the range is collapsed in a non-empty node and 'split' is true, there's nothing to\n // set that won't get normalized away\n return;\n }\n\n var rangeRef = Editor.rangeRef(editor, at, {\n affinity: 'inward'\n });\n var [start, end] = Range.edges(at);\n var splitMode = mode === 'lowest' ? 'lowest' : 'highest';\n var endAtEndOfNode = Editor.isEnd(editor, end, end.path);\n Transforms.splitNodes(editor, {\n at: end,\n match,\n mode: splitMode,\n voids,\n always: !endAtEndOfNode\n });\n var startAtStartOfNode = Editor.isStart(editor, start, start.path);\n Transforms.splitNodes(editor, {\n at: start,\n match,\n mode: splitMode,\n voids,\n always: !startAtStartOfNode\n });\n at = rangeRef.unref();\n\n if (options.at == null) {\n Transforms.select(editor, at);\n }\n }\n\n if (!compare) {\n compare = (prop, nodeProp) => prop !== nodeProp;\n }\n\n for (var [node, path] of Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n })) {\n var properties = {};\n var newProperties = {}; // You can't set properties on the editor node.\n\n if (path.length === 0) {\n continue;\n }\n\n var hasChanges = false;\n\n for (var k in props) {\n if (k === 'children' || k === 'text') {\n continue;\n }\n\n if (compare(props[k], node[k])) {\n hasChanges = true; // Omit new properties from the old properties list\n\n if (node.hasOwnProperty(k)) properties[k] = node[k]; // Omit properties that have been removed from the new properties list\n\n if (merge) {\n if (props[k] != null) newProperties[k] = merge(node[k], props[k]);\n } else {\n if (props[k] != null) newProperties[k] = props[k];\n }\n }\n }\n\n if (hasChanges) {\n editor.apply({\n type: 'set_node',\n path,\n properties,\n newProperties\n });\n }\n }\n });\n },\n\n /**\r\n * Split the nodes at a specific location.\r\n */\n splitNodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n mode = 'lowest',\n voids = false\n } = options;\n var {\n match,\n at = editor.selection,\n height = 0,\n always = false\n } = options;\n\n if (match == null) {\n match = n => Editor.isBlock(editor, n);\n }\n\n if (Range.isRange(at)) {\n at = deleteRange(editor, at);\n } // If the target is a path, the default height-skipping and position\n // counters need to account for us potentially splitting at a non-leaf.\n\n\n if (Path.isPath(at)) {\n var path = at;\n var point = Editor.point(editor, path);\n var [parent] = Editor.parent(editor, path);\n\n match = n => n === parent;\n\n height = point.path.length - path.length + 1;\n at = point;\n always = true;\n }\n\n if (!at) {\n return;\n }\n\n var beforeRef = Editor.pointRef(editor, at, {\n affinity: 'backward'\n });\n var afterRef;\n\n try {\n var [highest] = Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n });\n\n if (!highest) {\n return;\n }\n\n var voidMatch = Editor.void(editor, {\n at,\n mode: 'highest'\n });\n var nudge = 0;\n\n if (!voids && voidMatch) {\n var [voidNode, voidPath] = voidMatch;\n\n if (Element.isElement(voidNode) && editor.isInline(voidNode)) {\n var after = Editor.after(editor, voidPath);\n\n if (!after) {\n var text = {\n text: ''\n };\n var afterPath = Path.next(voidPath);\n Transforms.insertNodes(editor, text, {\n at: afterPath,\n voids\n });\n after = Editor.point(editor, afterPath);\n }\n\n at = after;\n always = true;\n }\n\n var siblingHeight = at.path.length - voidPath.length;\n height = siblingHeight + 1;\n always = true;\n }\n\n afterRef = Editor.pointRef(editor, at);\n var depth = at.path.length - height;\n var [, highestPath] = highest;\n var lowestPath = at.path.slice(0, depth);\n var position = height === 0 ? at.offset : at.path[depth] + nudge;\n\n for (var [node, _path2] of Editor.levels(editor, {\n at: lowestPath,\n reverse: true,\n voids\n })) {\n var split = false;\n\n if (_path2.length < highestPath.length || _path2.length === 0 || !voids && Editor.isVoid(editor, node)) {\n break;\n }\n\n var _point = beforeRef.current;\n var isEnd = Editor.isEnd(editor, _point, _path2);\n\n if (always || !beforeRef || !Editor.isEdge(editor, _point, _path2)) {\n split = true;\n var properties = Node.extractProps(node);\n editor.apply({\n type: 'split_node',\n path: _path2,\n position,\n properties\n });\n }\n\n position = _path2[_path2.length - 1] + (split || isEnd ? 1 : 0);\n }\n\n if (options.at == null) {\n var _point2 = afterRef.current || Editor.end(editor, []);\n\n Transforms.select(editor, _point2);\n }\n } finally {\n var _afterRef;\n\n beforeRef.unref();\n (_afterRef = afterRef) === null || _afterRef === void 0 ? void 0 : _afterRef.unref();\n }\n });\n },\n\n /**\r\n * Unset properties on the nodes at a location.\r\n */\n unsetNodes(editor, props) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!Array.isArray(props)) {\n props = [props];\n }\n\n var obj = {};\n\n for (var key of props) {\n obj[key] = null;\n }\n\n Transforms.setNodes(editor, obj, options);\n },\n\n /**\r\n * Unwrap the nodes at a location from a parent node, splitting the parent if\r\n * necessary to ensure that only the content in the range is unwrapped.\r\n */\n unwrapNodes(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n mode = 'lowest',\n split = false,\n voids = false\n } = options;\n var {\n at = editor.selection,\n match\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n if (Path.isPath(at)) {\n at = Editor.range(editor, at);\n }\n\n var rangeRef = Range.isRange(at) ? Editor.rangeRef(editor, at) : null;\n var matches = Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n });\n var pathRefs = Array.from(matches, _ref5 => {\n var [, p] = _ref5;\n return Editor.pathRef(editor, p);\n } // unwrapNode will call liftNode which does not support splitting the node when nested.\n // If we do not reverse the order and call it from top to the bottom, it will remove all blocks\n // that wrap target node. So we reverse the order.\n ).reverse();\n\n var _loop = function _loop(pathRef) {\n var path = pathRef.unref();\n var [node] = Editor.node(editor, path);\n var range = Editor.range(editor, path);\n\n if (split && rangeRef) {\n range = Range.intersection(rangeRef.current, range);\n }\n\n Transforms.liftNodes(editor, {\n at: range,\n match: n => Element.isAncestor(node) && node.children.includes(n),\n voids\n });\n };\n\n for (var pathRef of pathRefs) {\n _loop(pathRef);\n }\n\n if (rangeRef) {\n rangeRef.unref();\n }\n });\n },\n\n /**\r\n * Wrap the nodes at a location in a new container node, splitting the edges\r\n * of the range first to ensure that only the content in the range is wrapped.\r\n */\n wrapNodes(editor, element) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n mode = 'lowest',\n split = false,\n voids = false\n } = options;\n var {\n match,\n at = editor.selection\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n if (Path.isPath(at)) {\n match = matchPath(editor, at);\n } else if (editor.isInline(element)) {\n match = n => Editor.isInline(editor, n) || Text.isText(n);\n } else {\n match = n => Editor.isBlock(editor, n);\n }\n }\n\n if (split && Range.isRange(at)) {\n var [start, end] = Range.edges(at);\n var rangeRef = Editor.rangeRef(editor, at, {\n affinity: 'inward'\n });\n Transforms.splitNodes(editor, {\n at: end,\n match,\n voids\n });\n Transforms.splitNodes(editor, {\n at: start,\n match,\n voids\n });\n at = rangeRef.unref();\n\n if (options.at == null) {\n Transforms.select(editor, at);\n }\n }\n\n var roots = Array.from(Editor.nodes(editor, {\n at,\n match: editor.isInline(element) ? n => Editor.isBlock(editor, n) : n => Editor.isEditor(n),\n mode: 'lowest',\n voids\n }));\n\n for (var [, rootPath] of roots) {\n var a = Range.isRange(at) ? Range.intersection(at, Editor.range(editor, rootPath)) : at;\n\n if (!a) {\n continue;\n }\n\n var matches = Array.from(Editor.nodes(editor, {\n at: a,\n match,\n mode,\n voids\n }));\n\n if (matches.length > 0) {\n var _ret = function () {\n var [first] = matches;\n var last = matches[matches.length - 1];\n var [, firstPath] = first;\n var [, lastPath] = last;\n\n if (firstPath.length === 0 && lastPath.length === 0) {\n // if there's no matching parent - usually means the node is an editor - don't do anything\n return \"continue\";\n }\n\n var commonPath = Path.equals(firstPath, lastPath) ? Path.parent(firstPath) : Path.common(firstPath, lastPath);\n var range = Editor.range(editor, firstPath, lastPath);\n var commonNodeEntry = Editor.node(editor, commonPath);\n var [commonNode] = commonNodeEntry;\n var depth = commonPath.length + 1;\n var wrapperPath = Path.next(lastPath.slice(0, depth));\n\n var wrapper = _objectSpread$2(_objectSpread$2({}, element), {}, {\n children: []\n });\n\n Transforms.insertNodes(editor, wrapper, {\n at: wrapperPath,\n voids\n });\n Transforms.moveNodes(editor, {\n at: range,\n match: n => Element.isAncestor(commonNode) && commonNode.children.includes(n),\n to: wrapperPath.concat(0),\n voids\n });\n }();\n\n if (_ret === \"continue\") continue;\n }\n }\n });\n }\n\n};\n\nvar hasSingleChildNest = (editor, node) => {\n if (Element.isElement(node)) {\n var element = node;\n\n if (Editor.isVoid(editor, node)) {\n return true;\n } else if (element.children.length === 1) {\n return hasSingleChildNest(editor, element.children[0]);\n } else {\n return false;\n }\n } else if (Editor.isEditor(node)) {\n return false;\n } else {\n return true;\n }\n};\n/**\r\n * Convert a range into a point by deleting it's content.\r\n */\n\n\nvar deleteRange = (editor, range) => {\n if (Range.isCollapsed(range)) {\n return range.anchor;\n } else {\n var [, end] = Range.edges(range);\n var pointRef = Editor.pointRef(editor, end);\n Transforms.delete(editor, {\n at: range\n });\n return pointRef.unref();\n }\n};\n\nvar matchPath = (editor, path) => {\n var [node] = Editor.node(editor, path);\n return n => n === node;\n};\n\nfunction ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar SelectionTransforms = {\n /**\r\n * Collapse the selection.\r\n */\n collapse(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n edge = 'anchor'\n } = options;\n var {\n selection\n } = editor;\n\n if (!selection) {\n return;\n } else if (edge === 'anchor') {\n Transforms.select(editor, selection.anchor);\n } else if (edge === 'focus') {\n Transforms.select(editor, selection.focus);\n } else if (edge === 'start') {\n var [start] = Range.edges(selection);\n Transforms.select(editor, start);\n } else if (edge === 'end') {\n var [, end] = Range.edges(selection);\n Transforms.select(editor, end);\n }\n },\n\n /**\r\n * Unset the selection.\r\n */\n deselect(editor) {\n var {\n selection\n } = editor;\n\n if (selection) {\n editor.apply({\n type: 'set_selection',\n properties: selection,\n newProperties: null\n });\n }\n },\n\n /**\r\n * Move the selection's point forward or backward.\r\n */\n move(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var {\n selection\n } = editor;\n var {\n distance = 1,\n unit = 'character',\n reverse = false\n } = options;\n var {\n edge = null\n } = options;\n\n if (!selection) {\n return;\n }\n\n if (edge === 'start') {\n edge = Range.isBackward(selection) ? 'focus' : 'anchor';\n }\n\n if (edge === 'end') {\n edge = Range.isBackward(selection) ? 'anchor' : 'focus';\n }\n\n var {\n anchor,\n focus\n } = selection;\n var opts = {\n distance,\n unit\n };\n var props = {};\n\n if (edge == null || edge === 'anchor') {\n var point = reverse ? Editor.before(editor, anchor, opts) : Editor.after(editor, anchor, opts);\n\n if (point) {\n props.anchor = point;\n }\n }\n\n if (edge == null || edge === 'focus') {\n var _point = reverse ? Editor.before(editor, focus, opts) : Editor.after(editor, focus, opts);\n\n if (_point) {\n props.focus = _point;\n }\n }\n\n Transforms.setSelection(editor, props);\n },\n\n /**\r\n * Set the selection to a new value.\r\n */\n select(editor, target) {\n var {\n selection\n } = editor;\n target = Editor.range(editor, target);\n\n if (selection) {\n Transforms.setSelection(editor, target);\n return;\n }\n\n if (!Range.isRange(target)) {\n throw new Error(\"When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: \".concat(Scrubber.stringify(target)));\n }\n\n editor.apply({\n type: 'set_selection',\n properties: selection,\n newProperties: target\n });\n },\n\n /**\r\n * Set new properties on one of the selection's points.\r\n */\n setPoint(editor, props) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var {\n selection\n } = editor;\n var {\n edge = 'both'\n } = options;\n\n if (!selection) {\n return;\n }\n\n if (edge === 'start') {\n edge = Range.isBackward(selection) ? 'focus' : 'anchor';\n }\n\n if (edge === 'end') {\n edge = Range.isBackward(selection) ? 'anchor' : 'focus';\n }\n\n var {\n anchor,\n focus\n } = selection;\n var point = edge === 'anchor' ? anchor : focus;\n Transforms.setSelection(editor, {\n [edge === 'anchor' ? 'anchor' : 'focus']: _objectSpread$1(_objectSpread$1({}, point), props)\n });\n },\n\n /**\r\n * Set new properties on the selection.\r\n */\n setSelection(editor, props) {\n var {\n selection\n } = editor;\n var oldProps = {};\n var newProps = {};\n\n if (!selection) {\n return;\n }\n\n for (var k in props) {\n if (k === 'anchor' && props.anchor != null && !Point.equals(props.anchor, selection.anchor) || k === 'focus' && props.focus != null && !Point.equals(props.focus, selection.focus) || k !== 'anchor' && k !== 'focus' && props[k] !== selection[k]) {\n oldProps[k] = selection[k];\n newProps[k] = props[k];\n }\n }\n\n if (Object.keys(oldProps).length > 0) {\n editor.apply({\n type: 'set_selection',\n properties: oldProps,\n newProperties: newProps\n });\n }\n }\n\n};\n\nvar TextTransforms = {\n /**\r\n * Delete content in the editor.\r\n */\n delete(editor) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n reverse = false,\n unit = 'character',\n distance = 1,\n voids = false\n } = options;\n var {\n at = editor.selection,\n hanging = false\n } = options;\n\n if (!at) {\n return;\n }\n\n var isCollapsed = false;\n\n if (Range.isRange(at) && Range.isCollapsed(at)) {\n isCollapsed = true;\n at = at.anchor;\n }\n\n if (Point.isPoint(at)) {\n var furthestVoid = Editor.void(editor, {\n at,\n mode: 'highest'\n });\n\n if (!voids && furthestVoid) {\n var [, voidPath] = furthestVoid;\n at = voidPath;\n } else {\n var opts = {\n unit,\n distance\n };\n var target = reverse ? Editor.before(editor, at, opts) || Editor.start(editor, []) : Editor.after(editor, at, opts) || Editor.end(editor, []);\n at = {\n anchor: at,\n focus: target\n };\n hanging = true;\n }\n }\n\n if (Path.isPath(at)) {\n Transforms.removeNodes(editor, {\n at,\n voids\n });\n return;\n }\n\n if (Range.isCollapsed(at)) {\n return;\n }\n\n if (!hanging) {\n var [, _end] = Range.edges(at);\n var endOfDoc = Editor.end(editor, []);\n\n if (!Point.equals(_end, endOfDoc)) {\n at = Editor.unhangRange(editor, at, {\n voids\n });\n }\n }\n\n var [start, end] = Range.edges(at);\n var startBlock = Editor.above(editor, {\n match: n => Editor.isBlock(editor, n),\n at: start,\n voids\n });\n var endBlock = Editor.above(editor, {\n match: n => Editor.isBlock(editor, n),\n at: end,\n voids\n });\n var isAcrossBlocks = startBlock && endBlock && !Path.equals(startBlock[1], endBlock[1]);\n var isSingleText = Path.equals(start.path, end.path);\n var startVoid = voids ? null : Editor.void(editor, {\n at: start,\n mode: 'highest'\n });\n var endVoid = voids ? null : Editor.void(editor, {\n at: end,\n mode: 'highest'\n }); // If the start or end points are inside an inline void, nudge them out.\n\n if (startVoid) {\n var before = Editor.before(editor, start);\n\n if (before && startBlock && Path.isAncestor(startBlock[1], before.path)) {\n start = before;\n }\n }\n\n if (endVoid) {\n var after = Editor.after(editor, end);\n\n if (after && endBlock && Path.isAncestor(endBlock[1], after.path)) {\n end = after;\n }\n } // Get the highest nodes that are completely inside the range, as well as\n // the start and end nodes.\n\n\n var matches = [];\n var lastPath;\n\n for (var entry of Editor.nodes(editor, {\n at,\n voids\n })) {\n var [node, path] = entry;\n\n if (lastPath && Path.compare(path, lastPath) === 0) {\n continue;\n }\n\n if (!voids && Editor.isVoid(editor, node) || !Path.isCommon(path, start.path) && !Path.isCommon(path, end.path)) {\n matches.push(entry);\n lastPath = path;\n }\n }\n\n var pathRefs = Array.from(matches, _ref => {\n var [, p] = _ref;\n return Editor.pathRef(editor, p);\n });\n var startRef = Editor.pointRef(editor, start);\n var endRef = Editor.pointRef(editor, end);\n var removedText = '';\n\n if (!isSingleText && !startVoid) {\n var _point = startRef.current;\n var [_node] = Editor.leaf(editor, _point);\n var {\n path: _path\n } = _point;\n var {\n offset\n } = start;\n\n var text = _node.text.slice(offset);\n\n if (text.length > 0) {\n editor.apply({\n type: 'remove_text',\n path: _path,\n offset,\n text\n });\n removedText = text;\n }\n }\n\n for (var pathRef of pathRefs) {\n var _path2 = pathRef.unref();\n\n Transforms.removeNodes(editor, {\n at: _path2,\n voids\n });\n }\n\n if (!endVoid) {\n var _point2 = endRef.current;\n var [_node2] = Editor.leaf(editor, _point2);\n var {\n path: _path3\n } = _point2;\n\n var _offset = isSingleText ? start.offset : 0;\n\n var _text = _node2.text.slice(_offset, end.offset);\n\n if (_text.length > 0) {\n editor.apply({\n type: 'remove_text',\n path: _path3,\n offset: _offset,\n text: _text\n });\n removedText = _text;\n }\n }\n\n if (!isSingleText && isAcrossBlocks && endRef.current && startRef.current) {\n Transforms.mergeNodes(editor, {\n at: endRef.current,\n hanging: true,\n voids\n });\n } // For Thai script, deleting N character(s) backward should delete\n // N code point(s) instead of an entire grapheme cluster.\n // Therefore, the remaining code points should be inserted back.\n\n\n if (isCollapsed && reverse && unit === 'character' && removedText.length > 1 && removedText.match(/[\\u0E00-\\u0E7F]+/)) {\n Transforms.insertText(editor, removedText.slice(0, removedText.length - distance));\n }\n\n var startUnref = startRef.unref();\n var endUnref = endRef.unref();\n var point = reverse ? startUnref || endUnref : endUnref || startUnref;\n\n if (options.at == null && point) {\n Transforms.select(editor, point);\n }\n });\n },\n\n /**\r\n * Insert a fragment at a specific location in the editor.\r\n */\n insertFragment(editor, fragment) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n hanging = false,\n voids = false\n } = options;\n var {\n at = editor.selection\n } = options;\n\n if (!fragment.length) {\n return;\n }\n\n if (!at) {\n return;\n } else if (Range.isRange(at)) {\n if (!hanging) {\n at = Editor.unhangRange(editor, at);\n }\n\n if (Range.isCollapsed(at)) {\n at = at.anchor;\n } else {\n var [, end] = Range.edges(at);\n\n if (!voids && Editor.void(editor, {\n at: end\n })) {\n return;\n }\n\n var pointRef = Editor.pointRef(editor, end);\n Transforms.delete(editor, {\n at\n });\n at = pointRef.unref();\n }\n } else if (Path.isPath(at)) {\n at = Editor.start(editor, at);\n }\n\n if (!voids && Editor.void(editor, {\n at\n })) {\n return;\n } // If the insert point is at the edge of an inline node, move it outside\n // instead since it will need to be split otherwise.\n\n\n var inlineElementMatch = Editor.above(editor, {\n at,\n match: n => Editor.isInline(editor, n),\n mode: 'highest',\n voids\n });\n\n if (inlineElementMatch) {\n var [, _inlinePath] = inlineElementMatch;\n\n if (Editor.isEnd(editor, at, _inlinePath)) {\n var after = Editor.after(editor, _inlinePath);\n at = after;\n } else if (Editor.isStart(editor, at, _inlinePath)) {\n var before = Editor.before(editor, _inlinePath);\n at = before;\n }\n }\n\n var blockMatch = Editor.above(editor, {\n match: n => Editor.isBlock(editor, n),\n at,\n voids\n });\n var [, blockPath] = blockMatch;\n var isBlockStart = Editor.isStart(editor, at, blockPath);\n var isBlockEnd = Editor.isEnd(editor, at, blockPath);\n var isBlockEmpty = isBlockStart && isBlockEnd;\n var mergeStart = !isBlockStart || isBlockStart && isBlockEnd;\n var mergeEnd = !isBlockEnd;\n var [, firstPath] = Node.first({\n children: fragment\n }, []);\n var [, lastPath] = Node.last({\n children: fragment\n }, []);\n var matches = [];\n\n var matcher = _ref2 => {\n var [n, p] = _ref2;\n var isRoot = p.length === 0;\n\n if (isRoot) {\n return false;\n }\n\n if (isBlockEmpty) {\n return true;\n }\n\n if (mergeStart && Path.isAncestor(p, firstPath) && Element.isElement(n) && !editor.isVoid(n) && !editor.isInline(n)) {\n return false;\n }\n\n if (mergeEnd && Path.isAncestor(p, lastPath) && Element.isElement(n) && !editor.isVoid(n) && !editor.isInline(n)) {\n return false;\n }\n\n return true;\n };\n\n for (var entry of Node.nodes({\n children: fragment\n }, {\n pass: matcher\n })) {\n if (matcher(entry)) {\n matches.push(entry);\n }\n }\n\n var starts = [];\n var middles = [];\n var ends = [];\n var starting = true;\n var hasBlocks = false;\n\n for (var [node] of matches) {\n if (Element.isElement(node) && !editor.isInline(node)) {\n starting = false;\n hasBlocks = true;\n middles.push(node);\n } else if (starting) {\n starts.push(node);\n } else {\n ends.push(node);\n }\n }\n\n var [inlineMatch] = Editor.nodes(editor, {\n at,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids\n });\n var [, inlinePath] = inlineMatch;\n var isInlineStart = Editor.isStart(editor, at, inlinePath);\n var isInlineEnd = Editor.isEnd(editor, at, inlinePath);\n var middleRef = Editor.pathRef(editor, isBlockEnd && !ends.length ? Path.next(blockPath) : blockPath);\n var endRef = Editor.pathRef(editor, isInlineEnd ? Path.next(inlinePath) : inlinePath);\n Transforms.splitNodes(editor, {\n at,\n match: n => hasBlocks ? Editor.isBlock(editor, n) : Text.isText(n) || Editor.isInline(editor, n),\n mode: hasBlocks ? 'lowest' : 'highest',\n always: hasBlocks && (!isBlockStart || starts.length > 0) && (!isBlockEnd || ends.length > 0),\n voids\n });\n var startRef = Editor.pathRef(editor, !isInlineStart || isInlineStart && isInlineEnd ? Path.next(inlinePath) : inlinePath);\n Transforms.insertNodes(editor, starts, {\n at: startRef.current,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids\n });\n\n if (isBlockEmpty && !starts.length && middles.length && !ends.length) {\n Transforms.delete(editor, {\n at: blockPath,\n voids\n });\n }\n\n Transforms.insertNodes(editor, middles, {\n at: middleRef.current,\n match: n => Editor.isBlock(editor, n),\n mode: 'lowest',\n voids\n });\n Transforms.insertNodes(editor, ends, {\n at: endRef.current,\n match: n => Text.isText(n) || Editor.isInline(editor, n),\n mode: 'highest',\n voids\n });\n\n if (!options.at) {\n var path;\n\n if (ends.length > 0 && endRef.current) {\n path = Path.previous(endRef.current);\n } else if (middles.length > 0 && middleRef.current) {\n path = Path.previous(middleRef.current);\n } else if (startRef.current) {\n path = Path.previous(startRef.current);\n }\n\n if (path) {\n var _end2 = Editor.end(editor, path);\n\n Transforms.select(editor, _end2);\n }\n }\n\n startRef.unref();\n middleRef.unref();\n endRef.unref();\n });\n },\n\n /**\r\n * Insert a string of text in the Editor.\r\n */\n insertText(editor, text) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n voids = false\n } = options;\n var {\n at = editor.selection\n } = options;\n\n if (!at) {\n return;\n }\n\n if (Path.isPath(at)) {\n at = Editor.range(editor, at);\n }\n\n if (Range.isRange(at)) {\n if (Range.isCollapsed(at)) {\n at = at.anchor;\n } else {\n var end = Range.end(at);\n\n if (!voids && Editor.void(editor, {\n at: end\n })) {\n return;\n }\n\n var start = Range.start(at);\n var startRef = Editor.pointRef(editor, start);\n var endRef = Editor.pointRef(editor, end);\n Transforms.delete(editor, {\n at,\n voids\n });\n var startPoint = startRef.unref();\n var endPoint = endRef.unref();\n at = startPoint || endPoint;\n Transforms.setSelection(editor, {\n anchor: at,\n focus: at\n });\n }\n }\n\n if (!voids && Editor.void(editor, {\n at\n })) {\n return;\n }\n\n var {\n path,\n offset\n } = at;\n if (text.length > 0) editor.apply({\n type: 'insert_text',\n path,\n offset,\n text\n });\n });\n }\n\n};\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\nvar Transforms = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, GeneralTransforms), NodeTransforms), SelectionTransforms), TextTransforms);\n\nexport { Editor, Element, Location, Node, Operation, Path, PathRef, Point, PointRef, Range, RangeRef, Scrubber, Span, Text, Transforms, createEditor };\n//# sourceMappingURL=index.es.js.map\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default isPropValid;\n","import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useDebugValue as l,useLayoutEffect as d}from\"react\";import h from\"shallowequal\";import p from\"@emotion/stylis\";import f from\"@emotion/unitless\";import m from\"@emotion/is-prop-valid\";import y from\"hoist-non-react-statics\";function v(){return(v=Object.assign||function(e){for(var t=1;t ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function D(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n1?t-1:0),r=1;r0?\" Args: \"+n.join(\", \"):\"\")):new Error(D.apply(void 0,[R[e]].concat(n)).trim())}var T=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&j(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s1<<30)&&j(16,\"\"+t),x.set(e,t),k.set(t,e),t},z=function(e){return k.get(e)},M=function(e,t){t>=V&&(V=t+1),x.set(e,t),k.set(t,e)},G=\"style[\"+A+'][data-styled-version=\"5.3.5\"]',L=new RegExp(\"^\"+A+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),F=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(A))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(A,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.5\");var i=q();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},$=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),K=/(a)(d)/gi,Q=function(e){return String.fromCharCode(e+(e>25?39:97))};function ee(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=Q(t%52)+n;return(Q(t%52)+n).replace(K,\"$1-$2\")}var te=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},ne=function(e){return te(5381,e)};function re(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=te(this.baseHash,n.hash),l=\"\",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),ie=/^\\s*\\/\\/.*$/gm,ae=[\":\",\"[\",\".\",\"#\"];function ce(e){var t,n,r,o,s=void 0===e?E:e,i=s.options,a=void 0===i?E:i,c=s.plugins,u=void 0===c?w:c,l=new p(a),d=[],h=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ae.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(ie,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||j(15),te(e,t.name)}),5381).toString():\"\",m}var ue=r.createContext(),le=ue.Consumer,de=r.createContext(),he=(de.Consumer,new Z),pe=ce();function fe(){return s(ue)||he}function me(){return s(de)||pe}function ye(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=fe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ce({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){h(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ue.Provider,{value:u},r.createElement(de.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ve=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=pe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return j(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=pe),this.name+e.hash},e}(),ge=/([A-Z])/,Se=/([A-Z])/g,we=/^ms-/,Ee=function(e){return\"-\"+e.toLowerCase()};function be(e){return ge.test(e)?e.replace(Se,Ee).replace(we,\"-ms-\"):e}var _e=function(e){return null==e||!1===e||\"\"===e};function Ne(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r1?t-1:0),i=1;i?@[\\\\\\]^`{|}~-]+/g,je=/(^-|-$)/g;function Te(e){return e.replace(De,\"-\").replace(je,\"\")}var xe=function(e){return ee(ne(e)>>>0)};function ke(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var Ve=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Be=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function ze(e,t,n){var r=e[n];Ve(t)&&Ve(r)?Me(r,t):e[n]=t}function Me(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(ke(e)?e:Te(_(e)));return qe(e,v({},o,{attrs:S,componentId:s}),n)},Object.defineProperty(C,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?Me({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Oe(f,g),C.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),r=!0,n={}}}}(f,g)),C.toString=function(){return\".\"+C.styledComponentId},i&&y(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),C}var He=function(e){return function e(t,r,o){if(void 0===o&&(o=E),!n(r))return j(1,String(r));var s=function(){return t(r,o,Ce.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,v({},o,{},n))},s.attrs=function(n){return e(t,r,v({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(qe,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){He[e]=He(e)}));var $e=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=re(e),Z.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(Ne(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function We(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.server&&h(l,e,t,o,n),d((function(){if(!t.server)return h(l,e,t,o,n),function(){return u.removeStyles(l,t)}}),[l,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,O,n,o);else{var s=v({},t,{theme:Re(t,r,l.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Oe(a),r.memo(l)}function Ue(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\"+t+\"\"},this.getStyleTags=function(){return e.sealed?j(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return j(2);var n=((t={})[A]=\"\",t[\"data-styled-version\"]=\"5.3.5\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=q();return o&&(n.nonce=o),[r.createElement(\"style\",v({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?j(2):r.createElement(ye,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return j(3)},e}(),Xe=function(e){var t=r.forwardRef((function(t,n){var o=s(Ge),i=e.defaultProps,a=Re(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+_(e)+'\"'),r.createElement(e,v({},t,{theme:a,ref:n}))}));return y(t,e),t.displayName=\"WithTheme(\"+_(e)+\")\",t},Ze=function(){return s(Ge)},Ke={StyleSheet:Z,masterSheet:he};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default He;export{Je as ServerStyleSheet,le as StyleSheetConsumer,ue as StyleSheetContext,ye as StyleSheetManager,Le as ThemeConsumer,Ge as ThemeContext,Fe as ThemeProvider,Ke as __PRIVATE__,We as createGlobalStyle,Ce as css,N as isStyledComponent,Ue as keyframes,Ze as useTheme,C as version,Xe as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","// TinyColor v1.4.2\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// \n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// \n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// \n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// \nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// \nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // \n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // \n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n window.tinycolor = tinycolor;\n}\n\n})(Math);\n","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","import { urlAlphabet } from './url-alphabet/index.js'\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n return (size = defaultSize) => {\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let j = step\n while (j--) {\n id += alphabet[bytes[j] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n byte &= 63\n if (byte < 36) {\n id += byte.toString(36)\n } else if (byte < 62) {\n id += (byte - 26).toString(36).toUpperCase()\n } else if (byte > 62) {\n id += '-'\n } else {\n id += '_'\n }\n return id\n }, '')\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\n","import {MS, MOZ, WEBKIT} from './Enum.js'\nimport {hash, charat, strlen, indexof, replace} from './Utility.js'\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {string}\n */\nexport function prefix (value, length) {\n\tswitch (hash(value, length)) {\n\t\t// color-adjust\n\t\tcase 5103:\n\t\t\treturn WEBKIT + 'print-' + value + value\n\t\t// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\t\tcase 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:\n\t\t// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\t\tcase 5572: case 6356: case 5844: case 3191: case 6645: case 3005:\n\t\t// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\t\tcase 6391: case 5879: case 5623: case 6135: case 4599: case 4855:\n\t\t// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\t\tcase 4215: case 6389: case 5109: case 5365: case 5621: case 3829:\n\t\t\treturn WEBKIT + value + value\n\t\t// appearance, user-select, transform, hyphens, text-size-adjust\n\t\tcase 5349: case 4246: case 4810: case 6968: case 2756:\n\t\t\treturn WEBKIT + value + MOZ + value + MS + value + value\n\t\t// flex, flex-direction\n\t\tcase 6828: case 4268:\n\t\t\treturn WEBKIT + value + MS + value + value\n\t\t// order\n\t\tcase 6165:\n\t\t\treturn WEBKIT + value + MS + 'flex-' + value + value\n\t\t// align-items\n\t\tcase 5187:\n\t\t\treturn WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value\n\t\t// align-self\n\t\tcase 5443:\n\t\t\treturn WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value\n\t\t// align-content\n\t\tcase 4675:\n\t\t\treturn WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value\n\t\t// flex-shrink\n\t\tcase 5548:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value\n\t\t// flex-basis\n\t\tcase 5292:\n\t\t\treturn WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value\n\t\t// flex-grow\n\t\tcase 6060:\n\t\t\treturn WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value\n\t\t// transition\n\t\tcase 4554:\n\t\t\treturn WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value\n\t\t// cursor\n\t\tcase 6187:\n\t\t\treturn replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value\n\t\t// background, background-image\n\t\tcase 5495: case 3959:\n\t\t\treturn replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1')\n\t\t// justify-content\n\t\tcase 4968:\n\t\t\treturn replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value\n\t\t// (margin|padding)-inline-(start|end)\n\t\tcase 4095: case 3583: case 4068: case 2532:\n\t\t\treturn replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value\n\t\t// (min|max)?(width|height|inline-size|block-size)\n\t\tcase 8116: case 7059: case 5753: case 5535:\n\t\tcase 5445: case 5701: case 4933: case 4677:\n\t\tcase 5533: case 5789: case 5021: case 4765:\n\t\t\t// stretch, max-content, min-content, fill-available\n\t\t\tif (strlen(value) - 1 - length > 6)\n\t\t\t\tswitch (charat(value, length + 1)) {\n\t\t\t\t\t// (m)ax-content, (m)in-content\n\t\t\t\t\tcase 109:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (charat(value, length + 4) !== 45)\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t// (f)ill-available, (f)it-content\n\t\t\t\t\tcase 102:\n\t\t\t\t\t\treturn replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value\n\t\t\t\t\t// (s)tretch\n\t\t\t\t\tcase 115:\n\t\t\t\t\t\treturn ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value\n\t\t\t\t}\n\t\t\tbreak\n\t\t// position: sticky\n\t\tcase 4949:\n\t\t\t// (s)ticky?\n\t\t\tif (charat(value, length + 1) !== 115)\n\t\t\t\tbreak\n\t\t// display: (flex|inline-flex)\n\t\tcase 6444:\n\t\t\tswitch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n\t\t\t\t// stic(k)y\n\t\t\t\tcase 107:\n\t\t\t\t\treturn replace(value, ':', ':' + WEBKIT) + value\n\t\t\t\t// (inline-)?fl(e)x\n\t\t\t\tcase 101:\n\t\t\t\t\treturn replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value\n\t\t\t}\n\t\t\tbreak\n\t\t// writing-mode\n\t\tcase 5936:\n\t\t\tswitch (charat(value, length + 11)) {\n\t\t\t\t// vertical-l(r)\n\t\t\t\tcase 114:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value\n\t\t\t\t// vertical-r(l)\n\t\t\t\tcase 108:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value\n\t\t\t\t// horizontal(-)tb\n\t\t\t\tcase 45:\n\t\t\t\t\treturn WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value\n\t\t\t}\n\n\t\t\treturn WEBKIT + value + MS + value + value\n\t}\n\n\treturn value\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length)\n\t\t\t\t\tbreak\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && characters.charCodeAt(length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset:\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule) {\n\t\t\t\t\t\t\t\t\t// d m s\n\t\t\t\t\t\t\t\t\tcase 100: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3)\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","const appendQueryParams = (url, qp, replace, config) => {\n let queryString;\n if (typeof qp === \"string\") {\n queryString = qp;\n }\n else {\n const usp = config.polyfill(\"URLSearchParams\", true, true);\n for (const key in qp) {\n if (qp[key] instanceof Array) {\n for (const val of qp[key])\n usp.append(key, val);\n }\n else {\n usp.append(key, qp[key]);\n }\n }\n queryString = usp.toString();\n }\n const split = url.split(\"?\");\n if (!queryString)\n return replace ? split[0] : url;\n if (replace || split.length < 2)\n return split[0] + \"?\" + queryString;\n return url + \"&\" + queryString;\n};\n/**\n * Adds the ability to append query parameters from a javascript object.\n *\n * ```js\n * import QueryAddon from \"wretch/addons/queryString\"\n *\n * wretch().addon(QueryAddon)\n * ```\n */\nconst queryString = {\n wretch: {\n query(qp, replace = false) {\n return { ...this, _url: appendQueryParams(this._url, qp, replace, this._config) };\n }\n }\n};\nexport default queryString;\n//# sourceMappingURL=queryString.js.map","export const JSON_MIME = \"application/json\";\nexport const CONTENT_TYPE_HEADER = \"Content-Type\";\nexport const FETCH_ERROR = Symbol();\n//# sourceMappingURL=constants.js.map","import { CONTENT_TYPE_HEADER } from \"./constants.js\";\nexport function extractContentType(headers = {}) {\n var _a;\n return (_a = Object.entries(headers).find(([k]) => k.toLowerCase() === CONTENT_TYPE_HEADER.toLowerCase())) === null || _a === void 0 ? void 0 : _a[1];\n}\nexport function isLikelyJsonMime(value) {\n return /^application\\/.*json.*/.test(value);\n}\nexport const mix = function (one, two, mergeArrays = false) {\n return Object.entries(two).reduce((acc, [key, newValue]) => {\n const value = one[key];\n if (Array.isArray(value) && Array.isArray(newValue)) {\n acc[key] = mergeArrays ? [...value, ...newValue] : newValue;\n }\n else if (typeof value === \"object\" && typeof newValue === \"object\") {\n acc[key] = mix(value, newValue, mergeArrays);\n }\n else {\n acc[key] = newValue;\n }\n return acc;\n }, { ...one });\n};\n//# sourceMappingURL=utils.js.map","import { mix } from \"./utils.js\";\nconst config = {\n // Default options\n options: {},\n // Error type\n errorType: \"text\",\n // Polyfills\n polyfills: {\n // fetch: null,\n // FormData: null,\n // URLSearchParams: null,\n // performance: null,\n // PerformanceObserver: null,\n // AbortController: null\n },\n polyfill(p, doThrow = true, instance = false, ...args) {\n const res = this.polyfills[p] ||\n (typeof self !== \"undefined\" ? self[p] : null) ||\n (typeof global !== \"undefined\" ? global[p] : null);\n if (doThrow && !res)\n throw new Error(p + \" is not defined\");\n return instance && res ? new res(...args) : res;\n }\n};\n/**\n * Sets the default fetch options that will be stored internally when instantiating wretch objects.\n *\n * ```js\n * import wretch from \"wretch\"\n *\n * wretch.options({ headers: { \"Accept\": \"application/json\" } });\n *\n * // The fetch request is sent with both headers.\n * wretch(\"...\", { headers: { \"X-Custom\": \"Header\" } }).get().res();\n * ```\n *\n * @param options Default options\n * @param replace If true, completely replaces the existing options instead of mixing in\n */\nexport function setOptions(options, replace = false) {\n config.options = replace ? options : mix(config.options, options);\n}\n/**\n * Sets the default polyfills that will be stored internally when instantiating wretch objects.\n * Useful for browserless environments like `node.js`.\n *\n * Needed for libraries like [fetch-ponyfill](https://github.com/qubyte/fetch-ponyfill).\n *\n * ```js\n * import wretch from \"wretch\"\n *\n * wretch.polyfills({\n * fetch: require(\"node-fetch\"),\n * FormData: require(\"form-data\"),\n * URLSearchParams: require(\"url\").URLSearchParams,\n * });\n *\n * // Uses the above polyfills.\n * wretch(\"...\").get().res();\n * ```\n *\n * @param polyfills An object containing the polyfills\n * @param replace If true, replaces the current polyfills instead of mixing in\n */\nexport function setPolyfills(polyfills, replace = false) {\n config.polyfills = replace ? polyfills : mix(config.polyfills, polyfills);\n}\n/**\n * Sets the default method (text, json, …) used to parse the data contained in the response body in case of an HTTP error.\n * As with other static methods, it will affect wretch instances created after calling this function.\n *\n * ```js\n * import wretch from \"wretch\"\n *\n * wretch.errorType(\"json\")\n *\n * wretch(\"http://server/which/returns/an/error/with/a/json/body\")\n * .get()\n * .res()\n * .catch(error => {\n * // error[errorType] (here, json) contains the parsed body\n * console.log(error.json)\n * })\n * ```\n *\n * If null, defaults to \"text\".\n */\nexport function setErrorType(errorType) {\n config.errorType = errorType;\n}\nexport default config;\n//# sourceMappingURL=config.js.map","import { middlewareHelper } from \"./middleware.js\";\nimport { mix } from \"./utils.js\";\nimport { FETCH_ERROR } from \"./constants.js\";\n/**\n * This class inheriting from Error is thrown when the fetch response is not \"ok\".\n * It extends Error and adds status, text and body fields.\n */\nexport class WretchError extends Error {\n}\nexport const resolver = (wretch) => {\n const { _url: url, _options: opts, _config: config, _catchers: _catchers, _resolvers: resolvers, _middlewares: middlewares, _addons: addons } = wretch;\n const catchers = new Map(_catchers);\n const finalOptions = mix(config.options, opts);\n addons.forEach(addon => addon.beforeRequest && addon.beforeRequest(wretch, finalOptions));\n // The generated fetch request\n const _fetchReq = middlewareHelper(middlewares)(config.polyfill(\"fetch\"))(url, finalOptions);\n // Throws on an http error\n const referenceError = new Error();\n const throwingPromise = _fetchReq\n .catch(error => {\n throw { __wrap: error };\n })\n .then(response => {\n if (!response.ok) {\n const err = new WretchError();\n // Enhance the error object\n err[\"cause\"] = referenceError;\n err.stack = err.stack + \"\\nCAUSE: \" + referenceError.stack;\n err.response = response;\n if (response.type === \"opaque\") {\n throw err;\n }\n return response[config.errorType]().then((body) => {\n err.message = body;\n err[config.errorType] = body;\n err[\"status\"] = response.status;\n throw err;\n });\n }\n return response;\n });\n // Wraps the Promise in order to dispatch the error to a matching catcher\n const catchersWrapper = (promise) => {\n return promise.catch(err => {\n const error = err.__wrap || err;\n const catcher = err.__wrap && catchers.has(FETCH_ERROR) ? catchers.get(FETCH_ERROR) :\n (catchers.get(error.status) || catchers.get(error.name));\n if (catcher)\n return catcher(error, wretch);\n throw error;\n });\n };\n const bodyParser = funName => cb => funName ?\n // If a callback is provided, then callback with the body result otherwise return the parsed body itself.\n catchersWrapper(throwingPromise.then(_ => _ && _[funName]()).then(_ => cb ? cb(_) : _)) :\n // No body parsing method - return the response\n catchersWrapper(throwingPromise.then(_ => cb ? cb(_) : _));\n const responseChain = {\n _wretchReq: wretch,\n _fetchReq,\n res: bodyParser(null),\n json: bodyParser(\"json\"),\n blob: bodyParser(\"blob\"),\n formData: bodyParser(\"formData\"),\n arrayBuffer: bodyParser(\"arrayBuffer\"),\n text: bodyParser(\"text\"),\n error(errorId, cb) {\n catchers.set(errorId, cb);\n return this;\n },\n badRequest(cb) { return this.error(400, cb); },\n unauthorized(cb) { return this.error(401, cb); },\n forbidden(cb) { return this.error(403, cb); },\n notFound(cb) { return this.error(404, cb); },\n timeout(cb) { return this.error(408, cb); },\n internalError(cb) { return this.error(500, cb); },\n fetchError(cb) { return this.error(FETCH_ERROR, cb); },\n };\n const enhancedResponseChain = addons.reduce((chain, addon) => ({\n ...chain,\n ...addon.resolver\n }), responseChain);\n return resolvers.reduce((chain, r) => r(chain, wretch), enhancedResponseChain);\n};\n//# sourceMappingURL=resolver.js.map","/**\n * @private @internal\n */\nexport const middlewareHelper = (middlewares) => (fetchFunction) => {\n return middlewares.reduceRight((acc, curr) => curr(acc), fetchFunction) || fetchFunction;\n};\n//# sourceMappingURL=middleware.js.map","import { mix, extractContentType, isLikelyJsonMime } from \"./utils.js\";\nimport { JSON_MIME, CONTENT_TYPE_HEADER } from \"./constants.js\";\nimport { resolver } from \"./resolver.js\";\nimport config from \"./config.js\";\nexport const core = {\n _url: \"\",\n _options: {},\n _config: config,\n _catchers: new Map(),\n _resolvers: [],\n _deferred: [],\n _middlewares: [],\n _addons: [],\n addon(addon) {\n return { ...this, _addons: [...this._addons, addon], ...addon.wretch };\n },\n errorType(errorType) {\n return {\n ...this,\n _config: {\n ...this._config,\n errorType\n }\n };\n },\n polyfills(polyfills, replace = false) {\n return {\n ...this,\n _config: {\n ...this._config,\n polyfills: replace ? polyfills : mix(this._config.polyfills, polyfills)\n }\n };\n },\n url(_url, replace = false) {\n if (replace)\n return { ...this, _url };\n const split = this._url.split(\"?\");\n return {\n ...this,\n _url: split.length > 1 ?\n split[0] + _url + \"?\" + split[1] :\n this._url + _url\n };\n },\n options(options, replace = false) {\n return { ...this, _options: replace ? options : mix(this._options, options) };\n },\n headers(headerValues) {\n return { ...this, _options: mix(this._options, { headers: headerValues || {} }) };\n },\n accept(headerValue) {\n return this.headers({ Accept: headerValue });\n },\n content(headerValue) {\n return this.headers({ [CONTENT_TYPE_HEADER]: headerValue });\n },\n auth(headerValue) {\n return this.headers({ Authorization: headerValue });\n },\n catcher(errorId, catcher) {\n const newMap = new Map(this._catchers);\n newMap.set(errorId, catcher);\n return { ...this, _catchers: newMap };\n },\n resolve(resolver, clear = false) {\n return { ...this, _resolvers: clear ? [resolver] : [...this._resolvers, resolver] };\n },\n defer(callback, clear = false) {\n return {\n ...this,\n _deferred: clear ? [callback] : [...this._deferred, callback]\n };\n },\n middlewares(middlewares, clear = false) {\n return {\n ...this,\n _middlewares: clear ? middlewares : [...this._middlewares, ...middlewares]\n };\n },\n fetch(method = this._options.method, url = \"\", body = null) {\n let base = this.url(url).options({ method });\n // \"Jsonify\" the body if it is an object and if it is likely that the content type targets json.\n const contentType = extractContentType(base._options.headers);\n const jsonify = typeof body === \"object\" && (!base._options.headers || !contentType || isLikelyJsonMime(contentType));\n base =\n !body ? base :\n jsonify ? base.json(body, contentType) :\n base.body(body);\n return resolver(base\n ._deferred\n .reduce((acc, curr) => curr(acc, acc._url, acc._options), base));\n },\n get(url = \"\") {\n return this.fetch(\"GET\", url);\n },\n delete(url = \"\") {\n return this.fetch(\"DELETE\", url);\n },\n put(body, url = \"\") {\n return this.fetch(\"PUT\", url, body);\n },\n post(body, url = \"\") {\n return this.fetch(\"POST\", url, body);\n },\n patch(body, url = \"\") {\n return this.fetch(\"PATCH\", url, body);\n },\n head(url = \"\") {\n return this.fetch(\"HEAD\", url);\n },\n opts(url = \"\") {\n return this.fetch(\"OPTIONS\", url);\n },\n body(contents) {\n return { ...this, _options: { ...this._options, body: contents } };\n },\n json(jsObject, contentType) {\n const currentContentType = extractContentType(this._options.headers);\n return this.content(contentType ||\n isLikelyJsonMime(currentContentType) && currentContentType ||\n JSON_MIME).body(JSON.stringify(jsObject));\n }\n};\n//# sourceMappingURL=core.js.map","import { setOptions, setErrorType, setPolyfills } from \"./config.js\";\nimport { core } from \"./core.js\";\nimport { WretchError } from \"./resolver.js\";\n/**\n * Creates a new wretch instance with a base url and base\n * [fetch options](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch).\n *\n * ```ts\n * import wretch from \"wretch\"\n *\n * // Reusable instance\n * const w = wretch(\"https://domain.com\", { mode: \"cors\" })\n * ```\n *\n * @param _url The base url\n * @param _options The base fetch options\n * @returns A fresh wretch instance\n */\nfunction factory(_url = \"\", _options = {}) {\n return { ...core, _url, _options };\n}\nfactory[\"default\"] = factory;\n/** {@inheritDoc setOptions} */\nfactory.options = setOptions;\n/** {@inheritDoc setErrorType} */\nfactory.errorType = setErrorType;\n/** {@inheritDoc setPolyfills} */\nfactory.polyfills = setPolyfills;\nfactory.WretchError = WretchError;\nexport default factory;\n//# sourceMappingURL=index.js.map"],"names":["StyleSheet","options","_this","this","_insertTag","tag","before","tags","length","insertionPoint","nextSibling","prepend","container","firstChild","insertBefore","push","isSpeedy","undefined","speedy","ctr","nonce","key","_proto","prototype","hydrate","nodes","forEach","insert","rule","document","createElement","setAttribute","appendChild","createTextNode","createStyleElement","sheet","i","styleSheets","ownerNode","sheetForTag","insertRule","cssRules","e","flush","parentNode","removeChild","identifierWithPointTracking","begin","points","index","previous","character","getRules","value","parsed","toRules","fixedElements","WeakMap","compat","element","type","parent","isImplicitRule","column","line","props","charCodeAt","get","set","rules","parentRules","k","j","replace","removeLabel","defaultStylisPlugins","ssrStyles","querySelectorAll","Array","call","node","getAttribute","indexOf","head","stylisPlugins","_insert","inserted","nodesToHydrate","attrib","split","omnipresentPlugins","currentSheet","finalizingPlugins","serializer","concat","selector","serialized","shouldCache","styles","cache","name","registered","_tag","isImportRule","delimiter","toSheet","block","Sheet","current","ruleSheet","context","content","selectors","parents","ns","depth","at","stylisOptions","prefix","stylis","id","use","getRegisteredStyles","registeredStyles","classNames","rawClassName","className","insertStyles","isStringTag","next","hyphenateRegex","animationRegex","isCustomProperty","property","isProcessableValue","processStyleName","fn","arg","styleName","toLowerCase","processStyleValue","match","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","couldBeSelectorInterpolation","__emotion_styles","anim","obj","string","isArray","_key","interpolated","_i","createStringFromObject","previousCursor","result","cached","labelPattern","serializeStyles","args","stringMode","strings","raw","lastIndex","identifierName","exec","Object","hasOwnProperty","EmotionCacheContext","createContext","HTMLElement","ThemeContext","CacheProvider","Provider","withEmotionCache","func","render","ref","Consumer","forwardRef","typePropName","createEmotionProps","newProps","Noop","theme","cssProp","css","ele","possiblyStyleElement","Fragment","Emotion","_len","arguments","jsx","argsLength","createElementArgArray","Global","InnerGlobal","_React$Component","updater","componentDidMount","querySelector","componentDidUpdate","prevProps","nextElementSibling","componentWillUnmount","Component","keyframes","insertable","toString","classnames","len","cls","toAdd","merge","ClassNames","cx","_len2","_key2","children","str","h","create","useContext","w","T","sheetRef","useRef","constructor","rehydrating","sheetRefCurrent","apply","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","W","M","d","c","a","q","g","y","C","m","b","v","n","x","K","u","l","r","I","t","B","J","f","p","F","G","N","trim","charAt","substring","ca","O","A","H","X","D","z","join","da","ea","fa","L","P","Y","E","ha","Q","ia","Z","ja","ka","test","aa","ba","la","ma","R","na","oa","S","U","useInsertionEffect","useInsertionEffectAlwaysWithSyncFallback","useInsertionEffectWithLayoutFallback","useLayoutEffect","_extends","assign","target","source","_react","_react2","__esModule","default","exports","_ref","_ref$fill","fill","_ref$width","width","_ref$height","height","_ref$style","style","keys","_objectWithoutProperties","viewBox","mapEventPropToEvent","eventProp","disableReactTree","mouseEvent","onClickAway","touchEvent","movedRef","nodeRef","activatedRef","syntheticEventRef","setTimeout","handleRef","handleClickAway","event","insideReactTree","doc","documentElement","clientWidth","clientX","clientHeight","clientY","clickedRootScrollbar","insideDOM","composedPath","contains","createHandleSynthetic","handlerName","childrenPropsHandler","childrenProps","mappedTouchEvent","handleTouchMove","addEventListener","removeEventListener","mappedMouseEvent","Portal","disablePortal","mountNode","setMountNode","getContainer","body","candidatesSelector","defaultGetTabbable","root","regularTabNodes","orderedTabNodes","from","nodeTabIndex","tabindexAttr","parseInt","Number","isNaN","contentEditable","nodeName","tabIndex","getTabIndex","disabled","tagName","getRadio","ownerDocument","roving","isNonTabbableRadio","isNodeMatchingSelectorFocusable","documentOrder","sort","map","defaultIsEnabled","disableAutoFocus","disableEnforceFocus","disableRestoreFocus","getTabbable","isEnabled","open","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","rootRef","lastKeydown","activeElement","hasAttribute","focus","contain","nativeEvent","rootElement","hasFocus","tabbable","_lastKeydown$current","_lastKeydown$current2","isShiftTab","Boolean","shiftKey","focusNext","focusPrevious","loopFocus","interval","setInterval","clearInterval","handleFocusSentinel","relatedTarget","onFocus","appendOwnerState","elementType","otherProps","ownerState","resolveComponentProps","componentProps","omitEventHandlers","object","filter","prop","mergeSlotProps","parameters","getSlotProps","additionalProps","externalSlotProps","externalForwardedProps","joinedClasses","mergedStyle","internalRef","eventHandlers","excludeKeys","includes","extractEventHandlers","componentsPropsWithoutEventHandlers","otherPropsWithoutEventHandlers","internalSlotProps","_excluded","useSlotProps","_parameters$additiona","rest","resolvedComponentsProps","useForkRef","_interopRequireDefault","_createSvgIcon","_jsxRuntime","defineProperty","enumerable","_utils","createSvgIcon","getBackdropUtilityClass","slot","generateUtilityClass","BackdropRoot","styled","overridesResolver","invisible","position","display","alignItems","justifyContent","right","bottom","top","left","backgroundColor","WebkitTapHighlightColor","inProps","_components$Root","_componentsProps$root","useThemeProps","component","components","componentsProps","transitionDuration","TransitionComponent","Fade","other","classes","slots","composeClasses","useUtilityClasses","in","timeout","as","Root","Box","defaultTheme","defaultClassName","generateClassName","styleFunctionSx","BoxRoot","shouldForwardProp","useTheme","_extendSxProp","extendSxProp","createBox","ClassNameGenerator","getButtonUtilityClass","_excluded2","commonIconStyles","size","fontSize","ButtonRoot","ButtonBase","variant","capitalize","color","colorInherit","disableElevation","fullWidth","_theme$palette$getCon","_theme$palette","typography","button","minWidth","padding","borderRadius","vars","shape","transition","transitions","duration","short","textDecoration","palette","text","primaryChannel","action","hoverOpacity","primary","mainChannel","main","border","grey","A100","boxShadow","shadows","dark","disabledBackground","getContrastText","contrastText","borderColor","pxToRem","ButtonStartIcon","startIcon","marginRight","marginLeft","ButtonEndIcon","endIcon","contextProps","ButtonGroupContext","resolvedProps","resolveProps","disableFocusRipple","endIconProp","focusVisibleClassName","startIconProp","_useUtilityClasses","label","composedClasses","classesRoot","focusRipple","focusVisible","pulsate","rippleX","rippleY","rippleSize","inProp","onExited","leaving","setLeaving","rippleClassName","ripple","rippleVisible","ripplePulsate","rippleStyles","childClassName","child","childLeaving","childPulsate","timeoutId","clearTimeout","generateUtilityClasses","_t","_t2","_t3","_t4","_","enterKeyframe","exitKeyframe","pulsateKeyframe","TouchRippleRoot","overflow","pointerEvents","TouchRippleRipple","easing","easeInOut","shorter","center","centerProp","ripples","setRipples","nextKey","rippleCallback","ignoringMouseDown","startTimer","startTimerCommit","startCommit","params","cb","oldRipples","start","fakeElement","rect","getBoundingClientRect","touches","Math","round","sqrt","sizeX","max","abs","sizeY","stop","slice","TransitionGroup","exit","getButtonBaseUtilityClass","ButtonBaseRoot","boxSizing","outline","margin","userSelect","verticalAlign","MozAppearance","WebkitAppearance","borderStyle","colorAdjust","centerRipple","disableRipple","disableTouchRipple","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","TouchRippleProps","touchRippleRef","buttonRef","rippleRef","handleRippleRef","isFocusVisibleRef","handleFocusVisible","handleBlurVisible","focusVisibleRef","useIsFocusVisible","setFocusVisible","mountedState","setMountedState","enableTouchRipple","useRippleHandler","rippleAction","eventCallback","skipRippleAction","useEventCallback","handleMouseDown","handleContextMenu","handleDragLeave","handleMouseUp","handleMouseLeave","preventDefault","handleTouchStart","handleTouchEnd","handleBlur","handleFocus","currentTarget","isNonNativeButton","href","keydownRef","handleKeyDown","handleKeyUp","defaultPrevented","ComponentProp","to","buttonProps","role","handleOwnRef","CheckboxRoot","SwitchBase","indeterminate","secondary","activeChannel","active","checkboxClasses","defaultCheckedIcon","CheckBox","defaultIcon","CheckBoxOutlineBlank","defaultIndeterminateIcon","IndeterminateCheckBox","_icon$props$fontSize","_indeterminateIcon$pr","checkedIcon","icon","iconProp","indeterminateIcon","indeterminateIconProp","inputProps","getCheckboxUtilityClass","getChipUtilityClass","ChipRoot","clickable","onDelete","avatar","deleteIcon","deletable","deleteIconColor","textColor","mode","maxWidth","fontFamily","selected","whiteSpace","disabledOpacity","Chip","defaultAvatarColor","defaultIconColor","contrastTextChannel","selectedChannel","selectedOpacity","focusOpacity","defaultBorder","hover","ChipLabel","textOverflow","paddingLeft","paddingRight","isDeleteKeyboardEvent","keyboardEvent","avatarProp","clickableProp","deleteIconProp","chipRef","handleDeleteIconClick","stopPropagation","moreProps","Cancel","blur","getCircularProgressUtilityClass","SIZE","circularRotateKeyframe","circularDashKeyframe","CircularProgressRoot","CircularProgressSVG","svg","CircularProgressCircle","circle","disableShrink","circleDisableShrink","stroke","thickness","circleStyle","rootStyle","rootProps","circumference","PI","toFixed","transform","cy","getDialogActionsUtilityClass","DialogActionsRoot","disableSpacing","spacing","getDividerUtilityClass","dividerClasses","entering","entered","defaultTimeout","enter","enteringScreen","leavingScreen","addEndListener","appear","onEnter","onEntered","onEntering","onExit","onExiting","foreignRef","normalizedTransitionCallback","callback","maybeIsAppearing","handleEntering","handleEnter","isAppearing","transitionProps","webkitTransition","handleEntered","handleExiting","handleExit","handleExited","state","childProps","visibility","FilledInputRoot","disableUnderline","underline","_palette","light","bottomLineColor","hoverBackground","FilledInput","bg","borderTopLeftRadius","borderTopRightRadius","easeOut","hoverBg","disabledBg","borderBottom","borderBottomColor","error","common","onBackgroundChannel","inputUnderline","borderBottomStyle","startAdornment","endAdornment","multiline","paddingTop","paddingBottom","hiddenLabel","FilledInputInput","WebkitBoxShadow","WebkitTextFillColor","caretColor","getColorSchemeSelector","componentsPropsProp","inputComponent","input","filledInputComponentsProps","Input","muiName","getFilledInputUtilityClass","filledInputClasses","getFormControlUtilityClasses","FormControlRoot","flexDirection","marginTop","marginBottom","focused","visuallyFocused","required","adornedStart","setAdornedStart","initialAdornedStart","isMuiElement","filled","setFilled","initialFilled","focusedState","setFocused","onFilled","childContext","onEmpty","registerEffect","FormControlContext","formControlState","states","muiFormControl","reduce","acc","useFormControl","getFormControlLabelUtilityClasses","FormControlLabelRoot","labelPlacement","control","disabledProp","disableTypography","labelProp","controlProps","fcs","Typography","getFormHelperTextUtilityClasses","_span","FormHelperTextRoot","contained","caption","textAlign","FormLabelRoot","colorSecondary","body1","AsteriskComponent","asterisk","FormLabel","getFormLabelUtilityClasses","formLabelClasses","GlobalStyles","globalStyles","themeInput","getGridUtilityClass","GRID_SIZES","direction","wrap","getOffset","val","parse","parseFloat","String","extractZeroValueBreakpointKeys","breakpoints","values","nonZeroKey","sortedBreakpointKeysByValue","GridRoot","item","zeroMinWidth","spacingStyles","breakpoint","resolveSpacingStyles","breakpointsStyles","flexWrap","directionValues","propValue","output","rowSpacing","rowSpacingValues","zeroValueBreakpointKeys","_zeroValueBreakpointK","themeSpacing","columnSpacing","columnSpacingValues","_zeroValueBreakpointK2","flexBasis","columnsBreakpointValues","columnValue","more","up","spacingClasses","resolveSpacingClasses","breakpointsClasses","Grid","themeProps","columnsProp","columnSpacingProp","rowSpacingProp","columnsContext","breakpointsValues","otherFiltered","getScale","isWebKit154","navigator","userAgent","Grow","timer","autoTimeout","delay","transitionTimingFunction","getAutoHeightDuration","muiSupportAuto","getIconButtonUtilityClass","IconButtonRoot","edge","shortest","InputRoot","formControl","InputInput","inputComponentsProps","getInputUtilityClass","inputClasses","getInputAdornmentUtilityClass","InputAdornmentRoot","disablePointerEvents","maxHeight","variantProp","getStyleValue","computedStyle","isEmpty","onChange","maxRows","minRows","isControlled","inputRef","shadowRef","renders","setState","getUpdatedState","ownerWindow","getComputedStyle","inputShallow","placeholder","innerHeight","scrollHeight","singleRowHeight","outerHeight","min","outerHeightStyle","updateState","prevState","newState","syncHeight","handleResize","debounce","flushSync","syncHeightWithFlushSycn","containerWindow","resizeObserver","ResizeObserver","observe","clear","disconnect","useEnhancedEffect","rows","readOnly","rootOverridesResolver","adornedEnd","sizeSmall","inputOverridesResolver","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel","InputBaseRoot","inputBaseClasses","InputBaseComponent","inputPlaceholder","placeholderHidden","placeholderVisible","font","letterSpacing","background","animationName","animationDuration","resize","inputGlobalStyles","ariaDescribedby","autoComplete","autoFocus","defaultValue","disableInjectingGlobalStyles","inputPropsProp","inputRefProp","renderSuffix","valueProp","handleInputRefWarning","instance","handleInputPropsRefProp","handleInputRefProp","handleInputRef","checkDirty","InputComponent","isHostComponent","onAnimationStart","Error","getInputBaseUtilityClass","hasValue","isFilled","SSR","isAdornedStart","InputLabelRoot","shrink","disableAnimation","animated","transformOrigin","InputLabel","shrinkProp","getInputLabelUtilityClasses","inputLabelClasses","getListUtilityClass","ListRoot","disablePadding","dense","subheader","listStyle","ListContext","ListItemIconRoot","alignItemsFlexStart","ListItemIcon","getListItemIconUtilityClass","listItemIconClasses","ListItemTextRoot","inset","ListItemText","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","getListItemTextUtilityClass","listItemTextClasses","getMenuUtilityClass","RTL_ORIGIN","vertical","horizontal","LTR_ORIGIN","MenuRoot","Popover","MenuPaper","Paper","paper","WebkitOverflowScrolling","MenuMenuList","MenuList","list","disableAutoFocusItem","MenuListProps","onClose","PaperProps","PopoverClasses","TransitionProps","isRtl","autoFocusItem","menuListActionsRef","activeItemIndex","anchorOrigin","adjustStyleForScrollbar","actions","getMenuItemUtilityClass","MenuItemRoot","divider","disableGutters","gutters","minHeight","backgroundClip","body2","tabIndexProp","menuItemRef","nextItem","disableListWrap","previousItem","lastChild","previousElementSibling","textCriteriaMatches","nextFocus","textCriteria","innerText","textContent","repeating","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","listRef","textCriteriaRef","previousKeyMatched","lastTime","containerElement","noExplicitWidth","scrollbarSize","items","newChildProps","List","criteria","lowerKey","currTime","performance","now","keepFocusOnCurrent","ariaHidden","show","removeAttribute","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","isNotExcludedElement","isNotForbiddenElement","isForbiddenTagName","isInputHidden","isAriaHiddenForbiddenOnElement","findIndexOf","idx","some","handleContainer","containerInfo","restoreStyle","disableScrollLock","innerWidth","isOverflowing","getScrollbarSize","el","scrollContainer","DocumentFragment","parentElement","overflowY","overflowX","setProperty","removeProperty","getModalUtilityClass","defaultManager","containers","modals","add","modal","modalIndex","modalRef","hiddenSiblings","getHiddenSiblings","mount","containerIndex","restore","remove","ariaHiddenState","splice","nextTop","isTopModal","_props$ariaHidden","classesProp","closeAfterTransition","disableEscapeKeyDown","hideBackdrop","keepMounted","manager","onBackdropClick","onTransitionEnter","onTransitionExited","exited","setExited","mountNodeRef","hasTransition","getHasTransition","ariaHiddenProp","getModal","handleMounted","scrollTop","handleOpen","resolvedContainer","handlePortalRef","handleClose","createChainedFunction","BackdropComponent","Backdrop","backdropProps","backdrop","TrapFocus","ModalRoot","hidden","ModalBackdrop","BackdropProps","commonProps","extendUtilityClasses","defaultInput","NativeSelect","IconComponent","otherClasses","nativeSelectSelectStyles","NativeSelectSelect","select","multiple","nativeSelectIconStyles","NativeSelectIcon","iconOpen","NativeSelectInput","getNativeSelectUtilityClasses","nativeSelectClasses","NotchedOutlineRoot","borderWidth","NotchedOutlineLegend","float","withLabel","notched","OutlinedInputRoot","InputBase","outlinedInputClasses","notchedOutline","OutlinedInputInput","OutlinedInput","_React$Fragment","getOutlinedInputUtilityClass","getPaperUtilityClass","getOverlayAlpha","elevation","alphaValue","log","PaperRoot","square","rounded","_theme$vars$overlays","backgroundImage","overlays","getPopoverUtilityClass","getOffsetTop","offset","getOffsetLeft","getTransformOriginValue","resolveAnchorEl","anchorEl","PopoverRoot","Modal","PopoverPaper","anchorPosition","anchorReference","containerProp","marginThreshold","transitionDurationProp","paperRef","handlePaperRef","getAnchorOffset","resolvedAnchorEl","anchorRect","nodeType","getTransformOrigin","elemRect","getPositioningStyle","offsetWidth","offsetHeight","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","setPositioningStyles","positioning","updatePosition","getWindow","window","defaultView","isElement","Element","isHTMLElement","isShadowRoot","ShadowRoot","getUAString","uaData","userAgentData","brands","brand","version","isLayoutViewport","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","offsetLeft","offsetTop","getWindowScroll","win","scrollLeft","pageXOffset","pageYOffset","getNodeName","getDocumentElement","getWindowScrollBarX","isScrollParent","_getComputedStyle","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","isOffsetParentAnElement","offsetParentIsScaled","isElementScaled","scroll","offsets","clientLeft","clientTop","getLayoutRect","getParentNode","assignedSlot","host","getScrollParent","listScrollParents","_element$ownerDocumen","scrollParent","isBody","updatedList","isTableElement","getTrueOffsetParent","getOffsetParent","isFirefox","currentNode","perspective","willChange","getContainingBlock","auto","basePlacements","end","viewport","popper","variationPlacements","placement","modifierPhases","modifiers","Map","visited","Set","modifier","requires","requiresIfExists","dep","has","depModifier","DEFAULT_OPTIONS","strategy","areValidElements","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","reference","pending","orderedModifiers","modifiersData","elements","attributes","effectCleanupFns","isDestroyed","setOptions","setOptionsAction","cleanupModifierEffects","scrollParents","contextElement","phase","orderModifiers","merged","existing","data","mergeByName","enabled","_ref3","_ref3$options","effect","cleanupFn","noopFn","update","forceUpdate","_state$elements","rects","reset","_state$orderedModifie","_state$orderedModifie2","_options","Promise","resolve","then","destroy","onFirstUpdate","passive","getBasePlacement","getVariation","getMainAxisFromPlacement","computeOffsets","basePlacement","variation","commonX","commonY","mainAxis","unsetSides","mapToStyles","_ref2","_Object$assign2","popperRect","gpuAcceleration","adaptive","roundOffsets","_offsets$x","_offsets$y","hasX","hasY","sideX","sideY","heightProp","widthProp","_Object$assign","commonStyles","_ref4","dpr","devicePixelRatio","roundOffsetsByDPR","_options$offset","invertDistance","skidding","distance","distanceAndSkiddingToXY","_data$state$placement","popperOffsets","hash","getOppositePlacement","matched","getOppositeVariationPlacement","rootNode","getRootNode","isSameNode","rectToClientRect","getClientRectFromMixedType","clippingParent","html","layoutViewport","getViewportRect","getInnerBoundingClientRect","winScroll","scrollWidth","getDocumentRect","getClippingRect","boundary","rootBoundary","mainClippingParents","clippingParents","clipperElement","getClippingParents","firstClippingParent","clippingRect","accRect","mergePaddingObject","paddingObject","expandToHashMap","hashMap","detectOverflow","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","axis","within","_options$mainAxis","checkMainAxis","_options$altAxis","altAxis","checkAltAxis","_options$tether","tether","_options$tetherOffset","tetherOffset","isBasePlacement","referenceRect","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowElement","arrow","arrowRect","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","arrowOffsetParent","clientOffset","offsetModifierValue","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","withinMaxClamp","_state$modifiersData$","toPaddingObject","minProp","maxProp","endDiff","startDiff","clientSize","centerToReference","axisProp","centerOffset","_options$element","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","_options$scroll","_options$resize","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","initialStyles","attribute","_skip","specifiedFallbackPlacements","fallbackPlacements","_options$flipVariatio","flipVariations","allowedAutoPlacements","preferredPlacement","oppositePlacement","getExpandedFallbackPlacements","placements","_options$allowedAutoP","allowedPlacements","overflows","computeAutoPlacement","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","isVertical","mainVariationSide","altVariationSide","checks","every","check","_loop","fittingPlacement","find","preventOverflow","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","getPopperUnstyledUtilityClass","defaultPopperOptions","PopperTooltip","initialPlacement","popperOptions","popperRef","popperRefProp","tooltipRef","ownRef","handlePopperRef","handlePopperRefRef","rtlPlacement","flipPlacement","setPlacement","popperModifiers","PopperRoot","getSelectUtilityClasses","SelectSelect","SelectIcon","SelectNativeInput","nativeInput","areEqualValues","_StyledInput","_StyledFilledInput","ariaLabel","autoWidth","defaultOpen","displayEmpty","labelId","MenuProps","onOpen","openProp","renderValue","SelectDisplayProps","setValueState","useControlled","controlled","openState","setOpenState","displayRef","displayNode","setDisplayNode","isOpenControlled","menuMinWidthState","setMenuMinWidthState","handleDisplayRef","getElementById","handler","getSelection","isCollapsed","childrenArray","handleItemClick","newValue","itemIndex","clonedEvent","writable","displaySingle","displayMultiple","computeDisplay","foundMatch","arr","firstSelectableElement","isFirstSelectableElement","menuMinWidth","buttonId","Menu","styledRootConfig","StyledInput","StyledOutlinedInput","StyledFilledInput","Select","ArrowDropDown","native","standard","outlined","inputComponentRef","deepmerge","joinChildren","separator","StackRoot","transformer","base","spacingValues","previousDirectionValue","styleFromPropValue","row","Stack","getSvgIconUtilityClass","SvgIconRoot","_theme$transitions","_theme$transitions$cr","_theme$transitions2","_theme$transitions2$d","_theme$typography","_theme$typography$pxT","_theme$typography2","_theme$typography2$px","_theme$typography3","_theme$typography3$px","_palette$ownerState$c","_palette$ownerState$c2","_palette2","_palette2$action","_palette3","_palette3$action","inherit","small","medium","large","SvgIcon","htmlColor","inheritViewBox","titleAccess","instanceFontSize","focusable","getTextFieldUtilityClass","variantComponent","TextFieldRoot","FormControl","FormHelperTextProps","helperText","idOverride","InputLabelProps","InputProps","SelectProps","InputMore","useId","helperTextId","inputLabelId","InputElement","htmlFor","FormHelperText","TooltipPopper","disableInteractive","popperInteractive","popperArrow","popperClose","tooltip","TooltipTooltip","touch","tooltipArrow","Tooltip","white","wordWrap","fontWeightMedium","fontWeightRegular","TooltipArrow","hystersisOpen","hystersisTimer","composeEventHandler","eventHandler","_components$Popper","_components$Transitio","_components$Tooltip","_components$Arrow","_componentsProps$popp","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","PopperComponent","PopperComponentProp","PopperProps","title","TransitionComponentProp","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","prevUserSelect","stopTouchInteraction","WebkitUserSelect","handleLeave","setChildIsFocusVisible","detectTouchStart","handleMouseOver","handleUseRef","handleFocusRef","positionRef","nameOrDescProps","titleIsString","onMouseMove","interactiveWrapperListeners","onMouseOver","_PopperProps$popperOp","tooltipModifiers","Popper","Transition","TooltipComponent","ArrowComponent","Arrow","popperProps","tooltipProps","tooltipArrowProps","TransitionPropsInner","_componentsProps$tool","_componentsProps$arro","getTooltipUtilityClass","tooltipClasses","getTypographyUtilityClass","TypographyRoot","align","noWrap","gutterBottom","paragraph","defaultVariantMapping","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","colorTransformations","textPrimary","textSecondary","transformDeprecatedColors","variantMapping","A200","A400","A700","getSwitchBaseUtilityClass","SwitchBaseRoot","SwitchBaseInput","checked","checkedProp","defaultChecked","setCheckedState","hasLabelFor","newChecked","black","activatedOpacity","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","createPalette","contrastThreshold","blue","getDefaultPrimary","getDefaultSecondary","getDefaultError","info","getDefaultInfo","success","getDefaultSuccess","warning","getDefaultWarning","augmentColor","mainShade","lightShade","darkShade","JSON","stringify","modes","caseAllCaps","textTransform","defaultFontFamily","createTypography","fontWeightLight","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","buildVariant","casing","variants","overline","clone","createShadow","px","mobileStepper","fab","speedDial","appBar","drawer","snackbar","mixins","mixinsInput","paletteInput","transitionsInput","typographyInput","systemTheme","muiTheme","toolbar","createTransitions","argument","easeIn","sharp","complex","formatMs","milliseconds","constant","inputTransitions","mergedEasing","mergedDuration","durationOption","easingOption","animatedProp","rootShouldForwardProp","slotShouldForwardProp","reflow","getTransitionProps","_style$transitionDura","_style$transitionTimi","transitionDelay","path","displayName","validator","reason","componentNameInError","propName","componentName","location","propFullName","unstable_ClassNameGenerator","configure","generator","console","warn","muiNames","bind","reactPropsRegex","registerStyles","testOmitPropsOnStringTag","testOmitPropsOnComponent","getDefaultShouldForwardProp","composeShouldForwardProps","isReal","optionsShouldForwardProp","__emotion_forwardProp","Insertion","createStyled","targetClassName","__emotion_real","baseTag","__emotion_base","defaultShouldForwardProp","shouldUseAs","Styled","FinalTag","classInterpolations","finalShouldForwardProp","defaultProps","withComponent","nextTag","nextOptions","newStyled","internal_processStyles","processor","xs","sm","md","lg","xl","defaultBreakpoints","handleBreakpoints","themeBreakpoints","cssKey","createEmptyBreakpointObject","breakpointsInput","_breakpointsInput$key","removeUnusedBreakpoints","breakpointKeys","breakpointOutput","mergeBreakpointsInOrder","emptyBreakpoints","mergedOutput","prev","resolveBreakpointValues","breakpointValues","customBase","breakpointsKeys","computeBreakpointsBase","clamp","decomposeColor","re","RegExp","colors","hexToRgb","marker","colorSpace","shift","recomposeColor","getLuminance","rgb","s","hslToRgb","getContrastRatio","foreground","lumA","lumB","alpha","darken","coefficient","lighten","emphasize","propsToClassKey","classKey","_excluded3","systemDefaultTheme","createTheme","systemSx","__mui_systemSx","inputOptions","componentSlot","skipVariantsResolver","inputSkipVariantsResolver","skipSx","inputSkipSx","shouldForwardPropOption","defaultStyledResolver","muiStyledResolver","styleArg","expressions","expressionsWithDefaultTheme","stylesArg","transformedStyleArg","styleOverrides","getStyleOverrides","resolvedStyleOverrides","entries","slotKey","slotStyle","_theme$components","_theme$components$nam","variantsStyles","themeVariants","themeVariant","isMatch","variantsResolver","definition","getVariantStyles","numOfCustomFnsApplied","placeholders","withConfig","createBreakpoints","unit","step","sortedValues","breakpointsAsArray","breakpoint1","breakpoint2","sortBreakpointsValues","down","between","endIndex","only","not","keyIndex","spacingInput","shapeInput","mui","argsInput","createSpacing","handlers","filterProps","propTypes","getBorder","themeKey","borderTop","borderRight","borderLeft","borderTopColor","borderRightColor","borderLeftColor","cssProperty","gap","columnGap","rowGap","_props$theme","_props$theme$breakpoi","_props$theme$breakpoi2","fontStyle","filterPropsMapping","borders","flexbox","grid","positions","sizing","styleFunctionMapping","propToStyleFunction","styleFnName","properties","directions","aliases","marginX","marginY","paddingX","paddingY","getCssProperties","memoize","dir","marginKeys","paddingKeys","spacingKeys","createUnaryUnit","_getPath","createUnarySpacing","getValue","transformed","resolveCssProperty","cssProperties","getStyleFromPropValue","getPath","checkVars","themeMapping","propValueFinal","userValue","sx","inSx","systemProps","splitProps","finalSx","getThemeValue","styleFunction","traverse","sxInput","sxObject","styleKey","maybeFn","objects","allKeys","union","objectsHaveSameKeys","unstable_createStyleFunctionSx","getThemeProps","contextTheme","defaultGenerator","generate","createClassNameGenerator","toUpperCase","getUtilityClass","funcs","wait","debounced","isPlainObject","formatMuiErrorMessage","code","url","encodeURIComponent","globalStateClassesMapping","completed","expanded","globalStatePrefix","globalStateClass","documentWidth","setRef","defaultProp","valueState","setValue","refA","refB","refValue","globalId","maybeReactUseId","reactId","defaultId","setDefaultId","useGlobalId","hadFocusVisibleRecentlyTimeout","hadKeyboardEvent","hadFocusVisibleRecently","inputTypesWhitelist","search","tel","email","password","number","date","month","week","time","datetime","metaKey","altKey","ctrlKey","handlePointerDown","handleVisibilityChange","visibilityState","isFocusVisible","matches","isContentEditable","focusTriggersKeyboardModality","addDays","dirtyDate","dirtyAmount","requiredArgs","toDate","amount","toInteger","Date","NaN","setDate","getDate","MILLISECONDS_IN_HOUR","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addYears","differenceInCalendarYears","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","compareAsc","differenceInCalendarMonths","yearDiff","monthDiff","endOfDay","setHours","endOfMonth","isLastDayOfMonth","differenceInMonths","sign","difference","isLastMonthNotFull","roundingMap","ceil","floor","trunc","getRoundingMethod","method","startOfDay","MILLISECONDS_IN_DAY","differenceInCalendarDays","startOfDayLeft","startOfDayRight","timestampLeft","getTimezoneOffsetInMilliseconds","timestampRight","compareLocalAsc","getHours","getMinutes","getSeconds","getMilliseconds","differenceInDays","isLastDayNotFull","differenceInMilliseconds","endOfWeek","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","weekStartsOn","locale","RangeError","day","getDay","endOfYear","year","getDaysInMonth","monthIndex","lastDayOfMonth","isAfter","dirtyDateToCompare","dateToCompare","isBefore","startOfHour","setMinutes","startOfMonth","startOfWeek","startOfYear","cleanDate","defaultFormats","fullDate","fullDateWithWeekday","fullDateTime","fullDateTime12h","fullDateTime24h","fullTime","fullTime12h","fullTime24h","hours12h","hours24h","keyboardDate","keyboardDateTime","keyboardDateTime12h","keyboardDateTime24h","minutes","monthAndDate","monthAndYear","monthShort","weekday","weekdayShort","normalDate","normalDateWithWeekday","seconds","shortDate","formatTokenMap","yy","yyy","yyyy","MMMM","MM","DD","dd","HH","hh","mm","ss","aaa","AdapterDateFns","formats","lib","is12HourCycleInCurrentLocale","_a","formatLong","getFormatHelperText","format","_b","token","firstCharacter","longFormatter","toLocaleLowerCase","parseISO","isoString","toISO","formatISO","getCurrentLocaleCode","addSeconds","count","addMilliseconds","addMinutes","addHours","addWeeks","isValid","getDiff","comparing","isLastYearNotFull","differenceInYears","roundingMethod","differenceInQuarters","differenceInWeeks","differenceInHours","differenceInMinutes","differenceInSeconds","dirtyHours","hours","dirtyMinutes","setSeconds","dirtySeconds","isSameDay","dateLeftStartOfDay","dateRightStartOfDay","isSameMonth","isSameYear","isSameHour","dateLeftStartOfHour","dateRightStartOfHour","getYear","setYear","dirtyYear","toJsDate","formatString","formatKey","formatByString","isEqual","dirtyLeftDate","dirtyRightDate","isNull","isAfterDay","isBeforeDay","isBeforeYear","isAfterYear","isWithinRange","startTime","endTime","isWithinInterval","formatNumber","numberToFormat","dirtyDayOfMonth","dirtyMonth","dateWithDesiredMonth","getMeridiemText","ampm","getNextMonth","getPreviousMonth","getMonthArray","monthArray","prevMonth","mergeDateAndTime","getWeekdays","dirtyInterval","_options$step","startDate","dates","currentDate","eachDayOfInterval","getWeekArray","nestedWeeks","lastDay","weekNumber","getYearRange","endDate","years","isBeforeMonth","isAfterMonth","super","expandFormat","isYearOnlyView","views","isYearAndMonthViews","useDatePickerDefaultizedProps","_themeProps$views","utils","useUtils","defaultDates","openTo","disableFuture","disablePast","inputFormat","disableMaskedInput","getFormatAndMaskByViews","minDate","maxDate","datePickerValueManager","emptyValue","getTodayValue","parseInput","areValuesEqual","getDatePickerToolbarUtilityClass","DatePickerToolbarRoot","PickersToolbar","DatePickerToolbarTitle","isLandscape","DatePickerToolbar","parsedValue","isMobileKeyboardViewOpen","toggleMobileKeyboardView","toolbarFormat","toolbarPlaceholder","toolbarTitle","toolbarTitleProp","localeText","datePickerDefaultToolbarTitle","dateText","DesktopDatePicker","validationError","useDateValidation","pickerProps","wrapperProps","usePickerState","ToolbarComponent","AllDateInputProps","DesktopWrapper","DateInputProps","KeyboardDateInputComponent","KeyboardDateInput","CalendarOrClockPicker","enUSPickers","previousMonth","nextMonth","openPreviousView","openNextView","calendarViewSwitchingButtonAriaLabel","view","inputModeToggleButtonAriaLabel","isKeyboardInputOpen","viewType","cancelButtonLabel","clearButtonLabel","okButtonLabel","todayButtonLabel","dateTimePickerDefaultToolbarTitle","timePickerDefaultToolbarTitle","dateRangePickerDefaultToolbarTitle","clockLabelText","adapter","hoursClockNumberText","minutesClockNumberText","secondsClockNumberText","openDatePickerDialogue","rawValue","openTimePickerDialogue","timeTableLabel","dateTableLabel","DEFAULT_LOCALE","pickersTranslations","MuiPickersAdapterContext","LocalizationProvider","dateAdapter","Utils","dateFormats","dateLibInstance","adapterLocale","contextValue","useViews","onViewChange","_views","_views2","openView","setOpenView","previousView","nextView","changeView","newView","openNext","handleChangeAndOpenNext","currentViewSelectionState","isSelectionFinishedOnCurrentView","globalSelectionState","CLOCK_WIDTH","CLOCK_HOUR_WIDTH","clockCenter","getAngleValue","offsetX","offsetY","atan","atan2","deg","delta","getClockPointerUtilityClass","ClockPointerRoot","shouldAnimate","ClockPointerThumb","thumb","hasSelected","ClockPointer","isInner","previousType","angle","getAngleStyle","getClockUtilityClass","utilityClass","clock","wrapper","squareMask","pin","amButton","pmButton","ClockRoot","ClockClock","ClockWrapper","ClockSquareMask","touchAction","ClockPin","ClockAmButton","IconButton","ampmInClock","meridiemMode","ClockPmButton","Clock","getClockLabelText","handleMeridiemChange","isTimeDisabled","minutesStep","selectedId","wrapperVariant","WrapperVariantContext","isMoving","isSelectedTimeDisabled","isPointerInner","handleValueChange","isFinish","setTime","changedTouches","newSelectedValue","angleStep","hour","keyboardControlStep","listboxRef","buttons","getClockNumberUtilityClass","clockNumberClasses","ClockNumberRoot","inner","ClockNumber","cos","sin","getHourNumbers","getClockNumberText","isDisabled","currentHours","hourNumbers","endHour","isSelected","getMinutesNumbers","numberValue","getPickersArrowSwitcherUtilityClass","PickersArrowSwitcherRoot","PickersArrowSwitcherSpacer","spacer","PickersArrowSwitcherButton","PickersArrowSwitcher","isLeftDisabled","isLeftHidden","isRightDisabled","isRightHidden","leftArrowButtonText","onLeftClick","onRightClick","rightArrowButtonText","leftArrowButtonProps","leftArrowButton","LeftArrowIcon","rightArrowButtonProps","rightArrowButton","RightArrowIcon","LeftArrowButton","RightArrowButton","getClockPickerUtilityClass","PickerViewRoot","ClockPickerRoot","ClockPickerArrowSwitcher","arrowSwitcher","deprecatedPropsWarning","ClockPicker","disableIgnoringDatePartForTimeValidation","getClockLabelTextProp","getHoursClockNumberText","getHoursClockNumberTextProp","getMinutesClockNumberText","getMinutesClockNumberTextProp","getSecondsClockNumberText","getSecondsClockNumberTextProp","leftArrowButtonTextProp","maxTime","minTime","rightArrowButtonTextProp","shouldDisableTime","showViewSwitcher","dateOrMidnight","containsValidTime","isValidValue","dateWithNewHours","dateWithNewMinutes","dateWithNewSeconds","viewProps","handleHoursChange","valueWithMeridiem","minutesValue","handleMinutesChange","secondsValue","handleSecondsChange","getPickersMonthUtilityClass","pickersMonthClasses","PickersMonthRoot","noop","PickersMonth","onSelect","handleSelection","_ref$current","getMonthPickerUtilityClass","MonthPickerRoot","alignContent","MonthPicker","useMonthPickerDefaultizedProps","shouldDisableMonth","disableHighlightToday","onMonthFocus","onFocusedViewChange","selectedDateOrStartOfMonth","selectedMonth","focusedMonth","setFocusedMonth","isMonthDisabled","firstEnabledMonth","lastEnabledMonth","onMonthSelect","newDate","internalHasFocus","setInternalHasFocus","changeHasFocus","newHasFocus","focusMonth","prevFocusedMonth","monthsInYear","handleMonthFocus","handleMonthBlur","currentMonthNumber","monthNumber","monthText","useCalendarState","defaultCalendarMonth","disableSwitchToMonthOnDayFocus","onMonthChange","reduceAnimations","shouldDisableDate","reducerFn","slideDirection","currentMonth","newMonth","isMonthSwitchingAnimating","focusedDay","needMonthSwitch","withoutMonthSwitchingAnimation","createCalendarStateReducer","calendarState","dispatch","handleChangeMonth","payload","changeMonth","newDateRequested","isDateDisabled","onMonthSwitchingAnimationEnd","changeFocusedDay","newFocusedDate","getPickersFadeTransitionGroupUtilityClass","PickersFadeTransitionGroupRoot","PickersFadeTransitionGroup","transKey","mountOnEnter","unmountOnExit","getPickersDayUtilityClass","pickersDayClasses","disableMargin","outsideCurrentMonth","showDaysOutsideCurrentMonth","today","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","PickersDayRoot","PickersDayFiller","PickersDayRaw","forwardedRef","isAnimating","onDaySelect","isToday","areDayPropsEqual","nextProps","PickersDay","replaceClassName","origClass","classToRemove","removeClass","classList","baseVal","CSSTransition","appliedClasses","maybeNode","maybeAppearing","_this$resolveArgument","resolveArguments","appearing","removeClasses","addClass","_this$resolveArgument2","_this$resolveArgument3","getClassNames","isStringClassNames","baseClassName","activeClassName","doneClassName","hasClass","_addClass","_this$appliedClasses$","done","_this$props","getPickersSlideTransitionUtilityClass","pickersSlideTransitionClasses","PickersSlideTransitionRoot","slideEnterActive","slideExit","slideTransition","getDayPickerUtilityClass","defaultDayOfWeekFormatter","PickersCalendarDayHeader","header","PickersCalendarWeekDayLabel","weekDayLabel","PickersCalendarLoadingContainer","loadingContainer","PickersCalendarSlideTransition","transitionClasses","enterActive","exitActive","childFactory","PickersCalendarWeekContainer","monthContainer","PickersCalendarWeek","weekContainer","DayPicker","onFocusedDayChange","selectedDays","loading","onSelectedDaysChange","renderDay","renderLoading","dayOfWeekFormatter","gridLabelId","internalFocusedDay","setInternalFocusedDay","handleDaySelect","focusDay","newFocusedDayDefault","nextAvailableMonth","closestDayToFocus","validSelectedDays","transitionKey","slideNodeRef","startOfCurrentWeek","focusableDay","_dayOfWeekFormatter","isFocusableDay","selectedDay","pickersDayProps","getPickersCalendarHeaderUtilityClass","PickersCalendarHeaderRoot","PickersCalendarHeaderLabelContainer","labelContainer","PickersCalendarHeaderLabel","PickersCalendarHeaderSwitchViewButton","switchViewButton","PickersCalendarHeaderSwitchViewIcon","switchViewIcon","PickersCalendarHeader","getViewSwitchingButtonText","getViewSwitchingButtonTextProp","currentView","switchViewButtonProps","isNextMonthDisabled","isPreviousMonthDisabled","nextIndexToOpen","SwitchViewButton","SwitchViewIcon","getPickersYearUtilityClass","pickersYearClasses","PickersYearRoot","modeDesktop","modeMobile","PickersYearButton","PickersYear","refHandle","yearButton","getYearPickerUtilityClass","YearPickerRoot","YearPicker","useYearPickerDefaultizedProps","shouldDisableYear","onYearFocus","selectedDateOrStartOfYear","currentYear","selectedYearRef","focusedYear","setFocusedYear","isYearDisabled","dateToValidate","handleYearSelection","focusYear","prevFocusedYear","yearsInRow","nowYear","scrollerRef","tabbableButton","elementBottom","yearNumber","defaultReduceAnimations","getCalendarPickerUtilityClass","CalendarPickerRoot","CalendarPickerViewTransitionContainer","viewTransitionContainer","CalendarPicker","useCalendarPickerDefaultizedProps","onYearChange","focusedView","handleDateMonthChange","selectionState","closestEnabledDate","handleDateYearChange","onSelectedDayChange","baseDateValidationProps","minDateWithDisabled","maxDateWithDisabled","commonViewProps","internalFocusedView","setInternalFocusedView","handleFocusedViewChange","eventView","prevView","prevOpenViewRef","getOrientation","screen","orientation","getCalendarOrClockPickerUtilityClass","MobileKeyboardInputView","mobileKeyboardInputView","PickerRoot","MobileKeyboardTextFieldProps","isDatePickerView","isTimePickerView","_other$components","_other$componentsProp","onDateChange","showToolbar","dateRangeIcon","timeIcon","hideTabs","TabsComponent","Tabs","customOrientation","setOrientation","useIsLandscape","toShowToolbar","showTabs","handleDateChange","handleViewChange","setFocusedView","prevFocusedView","useFocusManagement","tabs","ignoreInvalidInputs","disableOpenPicker","TextFieldProps","useRifm","refresh","useReducer","valueRef","append","isDeleleteButtonDownRef","eventValue","isSizeIncreaseOperation","isDeleleteButtonDown","isNoOperation","deleteWasNoOp","acceptedCharIndexAfterDelete","selectionStart","accept","charsToSkipAfterDelete","clean","valueBeforeSelectionStart","substr","getCursorPosition","cleanPos","newPos","newCleanPos","mask","formattedValue","replacedValue","selectionEnd","useEffect","evt","getDisplayDate","MASK_USER_INPUT_SYMBOL","staticDateWith2DigitTokens","staticDateWith1DigitTokens","checkMaskIsValidForCurrentFormat","acceptRegex","inferredFormatPatternWith1Digits","inferredFormatPatternWith2Digits","isMaskValid","useMaskedInput","rifmFormatter","formatHelperText","shouldUseMaskedInput","maskToUse","computedMaskToUse","getMaskFromCurrentFormat","formatter","acceptRegexp","outputCharIndex","char","inputCharIndex","maskChar","nextMaskChar","acceptedChar","formattedChar","maskedDateFormatter","st","innerInputValue","setInnerInputValue","innerDisplayedInputValue","setInnerDisplayedInputValue","prevRawValue","prevLocale","prevInputFormat","rawValueHasChanged","localeHasChanged","inputFormatHasChanged","newParsedValue","isAcceptedValue","innerEqualsParsed","areEqual","newDisplayDate","handleChange","finalString","rifmProps","inputStateArgs","getOpenDialogAriaText","getOpenDialogAriaTextProp","InputAdornmentProps","openPicker","OpenPickerButtonProps","renderInput","textFieldProps","adornmentPosition","OpenPickerIcon","InputAdornment","PickersToolbarRoot","PickersToolbarContent","PickersToolbarPenIconButton","penIconButtonLandscape","penIconButton","getViewTypeIcon","getMobileKeyboardInputViewButtonText","landscapeDirection","ArrowLeft","ArrowRight","Calendar","Pen","getPickersToolbarUtilityClass","pickersToolbarClasses","PickersActionBar","onAccept","onClear","onCancel","onSetToday","actionsArray","actionType","Button","DialogActions","getPickersPopperUtilityClass","PickersPopperRoot","PickersPopperPaper","PickersPopper","_components$ActionBar","containerRef","TrapFocusProps","lastFocusedElementRef","clickAwayRef","onPaperClick","onPaperTouchStart","armClickAwayListener","handleSynthetic","useClickAwayListener","onPaperClickProp","onPaperTouchStartProp","otherPaperProps","ActionBar","PaperContent","paperContent","actionBar","onDismiss","ownInputRef","useNextMonthDisabled","usePreviousMonthDisabled","useMeridiemMode","timeWithMeridiem","valueManager","closeOnSelect","isOpen","setIsOpen","isControllingOpenProp","setIsOpenState","newIsOpen","useOpenState","parsedDateValue","lastValidDateValue","setLastValidDateValue","dateState","setDateState","committed","draft","resetFallback","forceOnChangeCall","skipOnChangeCall","setMobileKeyboardViewOpen","handleInputChange","keyboardInputValue","cleanParsedValue","valueReducer","pickerState","MuiPickerState","useLocalizationContext","localization","useDefaultDates","useLocaleText","useNow","validateDate","useIsDayDisabled","isSameDateError","useValidation","validate","isSameError","onError","previousValidationErrorRef","findClosestEnabledDate","forward","backward","parsePickerInputValue","parseNonNullablePickerDate","getMeridiem","convertValueToMeridiem","meridiem","convertToMeridiem","newHoursAmount","getSecondsInDay","createIsAfterIgnoreDatePart","arrayIncludes","array","itemOrItems","onSpaceOrEnter","innerFn","getActiveElement","activeEl","shadowRoot","createCommonjsModule","module","sparkMd5","factory","hex_chr","md5cycle","md5blk","md5blks","md5blk_array","md51","tail","tmp","lo","hi","md51_array","subarray","Uint8Array","rhex","hex","toUtf8","unescape","utf8Str2ArrayBuffer","returnUInt8Array","buff","ArrayBuffer","arrayBuffer2Utf8Str","fromCharCode","concatenateArrayBuffers","first","second","byteLength","buffer","hexToBinaryString","bytes","SparkMD5","num","targetArray","sourceArray","appendBinary","contents","_buff","_length","_hash","ret","_finish","getState","hashBinary","classCallCheck","Constructor","TypeError","createClass","defineProperties","descriptor","configurable","protoProps","staticProps","fileSlice","File","mozSlice","webkitSlice","FileChecksum","file","chunkSize","chunkCount","chunkIndex","md5Buffer","fileReader","FileReader","fileReaderDidLoad","fileReaderDidError","readNextChunk","binaryDigest","base64digest","btoa","readAsArrayBuffer","getMetaValue","findElement","findElements","toArray$1","dispatchEvent","eventInit","bubbles","cancelable","detail","createEvent","initEvent","BlobRecord","checksum","filename","content_type","byte_size","xhr","XMLHttpRequest","responseType","setRequestHeader","csrfToken","requestDidLoad","requestDidError","send","blob","status","response","direct_upload","directUploadData","toJSON","_xhr","BlobUpload","_blob$directUploadDat","headers","DirectUpload","delegate","notify","upload","methodName","messages","DirectUploadController","directUpload","hiddenInput","insertAdjacentElement","dispatchError","signed_id","progress","loaded","total","alert","_this2","uploadRequestDidProgress","inputSelector","DirectUploadsController","form","inputs","files","controllers","createDirectUploadControllers","startNextController","controller","processingAttribute","submitButtonsByForm","started","didClick","didSubmitForm","didSubmitRemoteElement","handleFormSubmissionEvent","disable","enable","submitForm","click","delete","autostart","ActiveStorage","frameElement","o","scrollMode","inline","skipOverflowHiddenElements","scrollingElement","scrollX","scrollY","V","borderLeftWidth","borderTopWidth","borderRightWidth","borderBottomWidth","dateLongFormatter","pattern","timeLongFormatter","_default","dateTimeFormat","matchResult","datePattern","timePattern","dateTime","addLeadingZeros","targetLength","getDefaultOptions","longFormatters","utcDate","UTC","setUTCFullYear","startOfUTCISOWeekYear","getUTCISOWeekYear","fourthOfJanuary","setUTCHours","startOfUTCISOWeek","MILLISECONDS_IN_WEEK","getUTCISOWeek","getUTCFullYear","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","startOfUTCWeekYear","_options$firstWeekCon","firstWeekContainsDate","getUTCWeekYear","firstWeek","startOfUTCWeek","getUTCWeek","firstWeekOfNextYear","firstWeekOfThisYear","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","getUTCDay","setUTCDate","getUTCDate","dirtyNumber","timestamp","pow","millisecondsInMinute","millisecondsInHour","millisecondsInSecond","signedYear","getUTCMonth","dayPeriodEnumValue","getUTCHours","getUTCMinutes","getUTCSeconds","numberOfDigits","getUTCMilliseconds","fractionalSeconds","dayPeriodEnum","localize","era","ordinalNumber","lightFormatters","signedWeekYear","weekYear","twoDigitYear","isoWeekYear","quarter","isoWeek","dayOfYear","setUTCMonth","startOfYearTimestamp","getUTCDayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","dayPeriod","_localize","timezoneOffset","_originalDate","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","originalDate","dirtyDelimiter","absOffset","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","dirtyFormatStr","_options$locale2","_options$locale2$opti","_ref6","_ref7","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatStr","defaultLocale","subMilliseconds","formatterOptions","cleanEscapedString","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","_options$format","_options$representati","representation","tzOffset","dateDelimiter","timeDelimiter","absoluteOffset","hourOffset","minuteOffset","minute","_typeof","Symbol","iterator","isDate","formatDistanceLocale","lessThanXSeconds","one","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","tokenValue","addSuffix","comparison","buildFormatLongFn","defaultWidth","full","long","formatRelativeLocale","lastWeek","yesterday","tomorrow","nextWeek","_date","_baseDate","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","argumentCallback","rem100","narrow","abbreviated","wide","am","pm","midnight","noon","morning","afternoon","evening","night","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchedString","parsePatterns","defaultParseWidth","findIndex","findKey","valueCallback","predicate","parsePattern","parseResult","any","formatDistance","formatRelative","_inherits","subClass","superClass","_setPrototypeOf","setPrototypeOf","__proto__","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","valueOf","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","getPrototypeOf","_classCallCheck","_defineProperties","_createClass","_defineProperty","Setter","_utcDate","ValueSetter","_Setter","_super","validateValue","priority","subPriority","flags","DateToSystemTimezoneSetter","_Setter2","_super2","timestampIsSet","convertedDate","Parser","dateString","setter","_value","EraParser","_Parser","numericPatterns","timezonePatterns","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","isCommonEra","absCurrentYear","rangeEnd","isLeapYearIndex","YearParser","isTwoDigitYear","normalizedTwoDigitYear","LocalWeekYearParser","ISOWeekYearParser","_flags","firstWeekOfYear","ExtendedYearParser","QuarterParser","StandAloneQuarterParser","MonthParser","StandAloneMonthParser","LocalWeekParser","dirtyWeek","setUTCWeek","ISOWeekParser","dirtyISOWeek","setUTCISOWeek","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","DateParser","isLeapYear","DayOfYearParser","setUTCDay","dirtyDay","currentDay","remainder","dayIndex","DayParser","LocalDayParser","wholeWeekDays","StandAloneLocalDayParser","ISODayParser","setUTCISODay","AMPMParser","AMPMMidnightParser","DayPeriodParser","Hour1to12Parser","isPM","Hour0to23Parser","Hour0To11Parser","Hour1To24Parser","MinuteParser","setUTCMinutes","SecondParser","setUTCSeconds","FractionOfSecondParser","setUTCMilliseconds","ISOTimezoneWithZParser","ISOTimezoneParser","TimestampSecondsParser","TimestampMillisecondsParser","parsers","_createForOfIteratorHelper","allowArrayLike","it","_arrayLikeToArray","_unsupportedIterableToArray","_e","err","normalCompletion","didErr","_e2","return","arr2","notWhitespaceRegExp","dirtyDateString","dirtyFormatString","dirtyReferenceDate","_step","subFnOptions","setters","tokens","usedTokens","_iterator","parser","incompatibleTokens","incompatibleToken","usedToken","fullToken","run","_ret","uniquePrioritySetters","setterArray","_step2","_iterator2","_options$additionalDi","additionalDigits","dateStrings","splitDateString","parseYearResult","parseYear","parseDate","restDateString","parseTime","timezone","parseTimezone","patterns","dateTimeDelimiter","timeZoneDelimiter","dateRegex","timeRegex","timezoneRegex","timeString","regex","captures","century","isWeekDate","parseDateUnit","_year","validateWeekDate","fourthOfJanuaryDay","dayOfISOWeekYear","daysInMonths","validateDayOfYearDate","parseTimeUnit","validateTime","timezoneString","_hours","validateTimezone","argStr","stack","rtl","ltr","RTL","LTR","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","isMemo","ForwardRef","Memo","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","inheritedComponent","targetStatics","sourceStatics","for","$$typeof","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Lazy","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","setCacheAdd","setCacheHas","SetCache","__data__","stackClear","stackDelete","stackGet","stackHas","stackSet","thisArg","iteratee","resIndex","baseIndexOf","comparator","baseTimes","isArguments","isBuffer","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","isType","skipIndexes","accumulator","initAccum","reAsciiWord","baseAssignValue","eq","objValue","copyObject","keysIn","arrayEach","assignValue","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeys","getAllKeysIn","getTag","initCloneArray","initCloneByTag","initCloneObject","isMap","isObject","isSet","argsTag","funcTag","objectTag","cloneableTags","baseClone","bitmask","customizer","isDeep","isFlat","isFull","isFunc","stacked","subValue","objectCreate","baseCreate","proto","baseForOwn","baseEach","createBaseEach","fromIndex","fromRight","baseFor","createBaseFor","castPath","toKey","arrayPush","keysFunc","symbolsFunc","getRawTag","objectToString","symToStringTag","toStringTag","baseFindIndex","baseIsNaN","strictIndexOf","baseGetTag","isObjectLike","baseIsEqualDeep","baseIsEqual","equalArrays","equalByTag","equalObjects","arrayTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","matchData","noCustomizer","srcValue","COMPARE_PARTIAL_FLAG","isFunction","isMasked","toSource","reIsHostCtor","funcProto","Function","objectProto","funcToString","reIsNative","isLength","typedArrayTags","baseMatches","baseMatchesProperty","identity","isPrototype","nativeKeys","nativeKeysIn","isProto","isArrayLike","collection","baseIsMatch","getMatchData","matchesStrictComparable","hasIn","isKey","isStrictComparable","assignMergeValue","baseMergeDeep","safeGet","baseMerge","srcIndex","cloneTypedArray","isArrayLikeObject","toPlainObject","mergeFunc","isCommon","isTyped","baseGet","overRest","setToString","baseSetToString","arrayMap","isSymbol","symbolProto","symbolToString","baseToString","trimmedEndIndex","reTrimStart","arrayIncludesWith","cacheHas","createSet","setToArray","seen","outer","computed","seenIndex","stringToPath","baseSlice","arrayBuffer","freeExports","freeModule","Buffer","allocUnsafe","copy","cloneArrayBuffer","dataView","byteOffset","reFlags","regexp","symbolValueOf","symbol","typedArray","isNew","getSymbols","getSymbolsIn","coreJsData","baseRest","isIterateeCall","assigner","sources","guard","eachFunc","iterable","arrayReduce","deburr","words","reApos","deburrLetter","basePropertyOf","arraySome","isPartial","arrLength","othLength","arrStacked","othStacked","arrValue","othValue","compared","othIndex","mapToArray","message","convert","objProps","objLength","objStacked","skipCtor","objCtor","othCtor","freeGlobal","baseGetAllKeys","isKeyable","baseIsNative","getPrototype","overArg","nativeObjectToString","isOwn","unmasked","arrayFilter","stubArray","propertyIsEnumerable","nativeGetSymbols","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","Ctor","ctorString","hasFunc","reHasUnicode","reHasUnicodeWord","nativeCreate","cloneDataView","cloneRegExp","cloneSymbol","reIsUint","reIsDeepProp","reIsPlainProp","uid","maskSrcKey","IE_PROTO","assocIndexOf","pop","getMapData","freeProcess","process","nodeUtil","types","require","binding","nativeMax","otherArgs","freeSelf","shortOut","nativeNow","lastCalled","stamp","remaining","pairs","LARGE_ARRAY_SIZE","asciiToArray","hasUnicode","unicodeToArray","memoizeCapped","rePropName","reEscapeChar","quote","subString","reWhitespace","rsAstral","rsCombo","rsFitz","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsSeq","rsSymbol","reUnicode","rsDingbatRange","rsLowerRange","rsUpperRange","rsBreakRange","rsMathOpRange","rsBreak","rsDigits","rsDingbat","rsLower","rsMisc","rsUpper","rsMiscLower","rsMiscUpper","rsOptContrLower","rsOptContrUpper","rsModifier","rsEmoji","reUnicodeWord","CLONE_DEEP_FLAG","toNumber","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","isInvoking","cancel","reLatin","reComboMark","baseIteratee","castFunction","baseHasIn","hasPath","baseIsArguments","stubFalse","baseKeys","baseIsMap","baseUnary","nodeIsMap","objectCtorString","baseIsSet","nodeIsSet","baseIsTypedArray","nodeIsTypedArray","arrayLikeKeys","baseKeysIn","baseMap","resolver","memoized","Cache","createAssigner","baseProperty","basePropertyDeep","INFINITY","toFinite","baseTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","isBinary","idCounter","asciiWords","hasUnicodeWord","unicodeWords","safeIsNaN","areInputsEqual","newInputs","lastInputs","resultFn","lastResult","calledOnce","newArgs","propIsEnumerable","toObject","test1","test2","test3","letter","shouldUseNative","symbols","_construct","Parent","Class","_wrapNativeSuper","_cache","Wrapper","PolishedError","_Error","colorToInt","convertToInt","red","green","hue","saturation","lightness","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellow","yellowgreen","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColor","normalizedColorName","nameToHex","_alpha","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","parseToHsl","rgbToHsl","reduceHexValue","numberToHex","colorToHex","convertToHex","hslToHex","hsl","hsla","rgba","firstValue","secondValue","thirdValue","fourthValue","rgbValue","toColorString","isRgba","isRgb","isHsla","isHsl","curried","combined","curry","lowerBoundary","upperBoundary","hslColor","curriedDarken","rgbColor","_Object$keys$map","channel","getContrast","color1","color2","luminance1","luminance2","curriedLighten","defaultReturnIfLightColor","defaultReturnIfDarkColor","readableColor","returnIfLightColor","returnIfDarkColor","strict","isColorLight","preferredReturnColor","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","secret","getShim","isRequired","ReactPropTypes","bigint","bool","arrayOf","instanceOf","objectOf","oneOf","oneOfType","exact","checkPropTypes","PropTypes","calculateChange","initialA","containerWidth","containerHeight","pageX","pageY","checkboardCache","c1","c2","serverCanvas","checkboard","canvas","ctx","getContext","fillStyle","fillRect","translate","toDataURL","Checkboard","renderers","absolute","isValidElement","Alpha","_temp","change","unbindEventListeners","radius","gradient","shadow","pointer","slider","overwrite","PureComponent","VALID_KEY_CODES","EditableInput","blurValue","setUpdatedValue","keyCode","getNumberValue","getArrowOffset","updatedValue","handleDrag","dragLabel","movementX","dragMax","getValueObjectWithLabel","inputId","arrowOffset","onChangeValue","spellCheck","hideLabel","_h","Hue","_props$direction","global","Raised","zDepth","_ref$styles","passedStyles","Saturation","throttle","_container$getBoundin","bright","renderWindow","getContainerRenderWindow","hsv","simpleCheckForValidColor","passed","toState","oldHue","toHsl","toHsv","toRgb","toHex","isValidHex","lh","getContrastingColor","col","isvalidColorString","stringWithoutDegree","_ok","Picker","ColorPicker","onChangeComplete","handleSwatchHover","onSwatchHover","optionalEvents","Span","Focus","_ref$onClick","onHover","_ref$title","_ref$focusStyle","focusStyle","transparent","swatch","picker","AlphaPicker","_ref$className","swatches","Block","triangle","hexCode","card","deepPurple","lightBlue","lightGreen","amber","deepOrange","blueGrey","CircleSwatch","circleSize","circleSpacing","Swatch","handleHover","Circle","ChromeFields","toggleViews","showHighlight","hideHighlight","fields","field","toggle","iconHighlight","UnfoldMoreHorizontalIcon","onMouseEnter","onMouseOut","Chrome","disableAlpha","controls","toggles","dot","HEXwrap","HEXinput","HEXlabel","RGBwrap","RGBinput","RGBlabel","Compact","compact","hoverSwatch","Github","triangleShadow","HuePicker","HuePointer","material","Hex","third","fieldSymbols","triangleBorder","Extend","leftInside","rightInside","currentColor","new","Photoshop","_props","_props$styles","_props$className","previews","PhotoshopPointer","PhotoshopFields","single","double","SketchPresetColors","swatchWrap","handleClick","colorObjOrString","Sketch","presetColors","sliders","activeColor","last","epsilon","Slider","CheckIcon","group","Swatches","Twitter","hexcode","GooglePointerCircle","GooglePointer","_values","_values2","hsvValue","input2","label2","hslValue","Google","_reactcss2","newObj","_interopRequireWildcard","_Checkboard2","cloneElement","ColorWrap","_debounce2","_propTypes2","_merge2","_throttle2","_interaction","_Alpha","_Checkboard","_EditableInput","_Hue","_Raised","_Saturation","_ColorWrap","_Swatch","_each2","_tinycolor2","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","pa","qa","setAttributeNS","xlinkHref","ra","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","sa","ta","ua","wa","xa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ma","Ka","La","Na","Oa","Pa","prepareStackTrace","Qa","_render","Ra","_context","_payload","_init","Sa","Ta","Va","_valueTracker","stopTracking","Ua","Wa","Xa","Ya","_wrapperState","initialChecked","Za","initialValue","$a","ab","bb","eb","Children","db","fb","defaultSelected","gb","dangerouslySetInnerHTML","hb","ib","jb","kb","lb","mb","nb","ob","namespaceURI","innerHTML","MSApp","execUnsafeLocalFunction","pb","nodeValue","qb","gridArea","lineClamp","rb","sb","tb","ub","menuitem","area","br","embed","hr","img","keygen","link","meta","param","track","wbr","vb","wb","is","xb","srcElement","correspondingUseElement","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Zb","alternate","$b","memoizedState","dehydrated","ac","cc","sibling","bc","dc","ec","fc","gc","hc","ic","jc","kc","lc","mc","nc","oc","pc","qc","rc","blockedOn","domEventName","eventSystemFlags","targetContainers","sc","pointerId","tc","vc","wc","lanePriority","unstable_runWithPriority","xc","yc","zc","Ac","Bc","unstable_scheduleCallback","unstable_NormalPriority","Cc","Dc","Ec","animationend","animationiteration","animationstart","transitionend","Fc","Gc","Hc","animation","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","unstable_now","Rc","Uc","pendingLanes","expiredLanes","suspendedLanes","pingedLanes","Vc","entangledLanes","entanglements","Wc","Xc","Yc","Zc","$c","eventTimes","clz32","bd","cd","LN2","unstable_UserBlockingPriority","ed","fd","gd","hd","uc","jd","kd","ld","nd","od","charCode","pd","qd","rd","_reactName","_targetInst","isDefaultPrevented","returnValue","isPropagationStopped","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","timeStamp","isTrusted","td","ud","vd","Ad","screenX","screenY","getModifierState","zd","fromElement","toElement","movementY","Bd","Dd","dataTransfer","Fd","Hd","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","repeat","which","Rd","Td","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","targetTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","range","me","ne","oe","listeners","pe","qe","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","Le","Me","compareDocumentPosition","Ne","HTMLIFrameElement","contentWindow","Oe","Pe","Qe","Re","Se","Te","Ue","anchorNode","focusNode","focusOffset","Ve","We","Xe","Ye","Ze","Yb","listener","$e","af","bf","random","cf","df","capture","Nb","ef","ff","parentWindow","gf","hf","je","ke","unshift","jf","kf","lf","mf","nf","__html","of","pf","qf","rf","sf","previousSibling","tf","vf","wf","xf","yf","zf","Af","Bf","Cf","Df","Ef","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Ff","Gf","Hf","If","getChildContext","Jf","__reactInternalMemoizedMergedChildContext","Kf","Lf","Mf","Nf","Of","Pf","unstable_cancelCallback","Qf","unstable_shouldYield","Rf","unstable_requestPaint","Sf","Tf","unstable_getCurrentPriorityLevel","Uf","unstable_ImmediatePriority","Vf","Wf","Xf","unstable_LowPriority","Yf","unstable_IdlePriority","Zf","$f","ag","cg","dg","eg","fg","gg","hg","ig","jg","kg","ReactCurrentBatchConfig","mg","ng","og","pg","qg","rg","_currentValue","sg","childLanes","tg","dependencies","firstContext","lanes","ug","vg","observedBits","responders","wg","xg","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","effects","yg","zg","eventTime","lane","Ag","Bg","Cg","Dg","Eg","Fg","refs","Gg","Kg","isMounted","_reactInternals","enqueueSetState","Hg","Ig","Jg","enqueueReplaceState","enqueueForceUpdate","Lg","shouldComponentUpdate","isPureReactComponent","Mg","Ng","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","Og","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","Pg","Qg","_owner","_stringRef","Rg","Sg","lastEffect","nextEffect","firstEffect","Tg","Ug","Vg","implementation","Wg","Xg","Yg","Zg","$g","ah","bh","ch","dh","eh","fh","gh","ih","memoizedProps","revealOrder","jh","kh","mh","nh","oh","pendingProps","ph","qh","rh","sh","th","uh","_workInProgressVersionPrimary","vh","ReactCurrentDispatcher","wh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","baseQueue","queue","Ih","Jh","Kh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","Lh","Mh","_getVersion","_source","mutableReadLanes","Nh","useState","getSnapshot","subscribe","setSnapshot","Oh","Ph","Qh","Rh","deps","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","bi","ci","di","readContext","useCallback","useImperativeHandle","useMemo","useDebugValue","useDeferredValue","useTransition","useMutableSource","useOpaqueIdentifier","unstable_isNewReconciler","uf","ei","ReactCurrentOwner","fi","gi","ii","ji","ki","li","mi","baseLanes","ni","oi","pi","UNSAFE_componentWillUpdate","componentWillUpdate","qi","ri","pendingContext","Bi","Di","Ei","si","retryLane","ti","fallback","unstable_avoidThisFallback","ui","unstable_expectedLoadTime","vi","wi","xi","yi","zi","isBackwards","rendering","renderingStartTime","tailMode","Ai","Fi","Gi","wasMultiple","onclick","createElementNS","Hi","Ii","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","componentDidCatch","Ti","componentStack","Ui","WeakSet","Vi","Wi","Xi","__reactInternalSnapshotBeforeUpdate","Yi","Zi","$i","aj","bj","onCommitFiberUnmount","cj","dj","ej","fj","gj","hj","_reactRootContainer","ij","jj","kj","lj","mj","nj","oj","pj","qj","rj","sj","tj","uj","vj","Infinity","wj","ck","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Sc","Kj","Lj","Mj","callbackNode","expirationTimes","callbackPriority","Tc","Nj","Oj","Pj","Qj","Rj","Sj","Tj","finishedWork","finishedLanes","Uj","timeoutHandle","Wj","Xj","pingCache","Yj","Zj","va","ak","bk","dk","rangeCount","focusedElem","selectionRange","ek","extend","createRange","setStart","removeAllRanges","addRange","setEnd","onCommitFiberRoot","fk","gk","ik","isReactComponent","pendingChildren","jk","mutableSourceEagerHydrationData","kk","lk","mk","nk","ok","qk","hydrationOptions","mutableSources","_internalRoot","rk","tk","sk","uk","hk","_calculateChangedBits","unstable_observedBits","unmount","Vj","vk","Events","wk","findFiberByHostInstance","bundleType","rendererPackageName","xk","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","__REACT_DEVTOOLS_GLOBAL_HOOK__","yk","supportsFiber","inject","createPortal","findDOMNode","unmountComponentAtNode","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","checkDCE","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","ChevronDown","_ref$color","_ref$size","xmlns","strokeLinecap","strokeLinejoin","Link","Mail","x1","y1","x2","y2","sizerStyle","INPUT_PROPS_BLACKLIST","copyStyles","isIE","generateId","AutosizeInput","_Component","placeHolderSizerRef","placeHolderSizer","sizerRef","sizer","inputWidth","prevId","mounted","copyInputStyles","updateInputWidth","onAutosize","inputStyles","newInputWidth","placeholderIsMinWidth","extraWidth","injectStyles","sizerValue","previousValue","currentValue","wrapperStyle","inputStyle","cleanInputProps","inputClassName","renderStyles","getModuleId","A11yText","defaultAriaLiveMessages","guidance","isSearchable","isMulti","tabSelectsValue","_props$label","_props$focused","_props$label2","selectValue","getArrayIndex","onFilter","inputValue","resultsMessage","LiveRegion","ariaSelection","focusedOption","focusedValue","focusableOptions","isFocused","selectProps","ariaLiveMessages","getOptionLabel","isOptionDisabled","menuIsOpen","screenReaderStatus","ariaLive","ariaSelected","option","removedValue","onChangeProps","ariaFocused","focusMsg","onFocusProps","ariaResults","resultsMsg","ariaGuidance","guidanceMsg","ariaContext","diacritics","letters","anyDiacritic","diacriticToBase","diacritic","stripDiacritics","memoizedStripDiacriticsForInput","trimString","defaultStringify","DummyInput","out","innerRef","emotion","STYLE_KEYS","LOCK_STYLES","preventTouchMove","allowTouchMove","preventInertiaScroll","totalScroll","currentScroll","isTouchDevice","maxTouchPoints","canUseDOM","activeScrollLocks","listenerOptions","blurSelectInput","ScrollManager","lockEnabled","_ref$captureEnabled","captureEnabled","setScrollCaptureTarget","onBottomArrive","onBottomLeave","onTopArrive","onTopLeave","isBottom","isTop","touchStart","scrollTarget","handleEventDelta","_scrollTarget$current","isDeltaPositive","availableScroll","shouldCancelScroll","cancelScroll","onWheel","startListening","notPassive","stopListening","useScrollCapture","setScrollLockTarget","_ref$accountForScroll","accountForScrollbars","originalStyles","addScrollLock","touchScrollTarget","targetStyle","currentPadding","adjustedPadding","removeScrollLock","useScrollLock","getOptionValue","defaultStyles","clearIndicator","dropdownIndicator","groupHeading","indicatorsContainer","indicatorSeparator","loadingIndicator","loadingMessage","menu","menuList","menuPortal","multiValue","multiValueLabel","multiValueRemove","noOptionsMessage","singleValue","valueContainer","config","primary75","primary50","primary25","danger","dangerLight","neutral0","neutral5","neutral10","neutral20","neutral30","neutral40","neutral50","neutral60","neutral70","neutral80","neutral90","baseUnit","controlHeight","menuGutter","backspaceRemovesValue","blurInputOnSelect","captureMenuScroll","closeMenuOnSelect","closeMenuOnScroll","controlShouldRenderValue","escapeClearsValue","filterOption","rawInput","_ignoreCase$ignoreAcc","ignoreCase","ignoreAccents","matchFrom","candidate","formatGroupLabel","isLoading","maxMenuHeight","minMenuHeight","menuPlacement","menuPosition","menuShouldBlockScroll","menuShouldScrollIntoView","openMenuOnFocus","openMenuOnClick","pageSize","toCategorizedOption","_isOptionDisabled","_isOptionSelected","getOptionLabel$1","getOptionValue$1","buildCategorizedOptions","groupOrOption","groupOrOptionIndex","categorizedOptions","optionIndex","categorizedOption","isFocusable","buildFocusableOptionsFromCategorizedOptions","optionsAccumulator","_props$inputValue","shouldHideSelectedOptions","_filterOption","isOptionSelected","hideSelectedOptions","instanceId","inputIsHidden","clearFocusValueOnUpdate","inputIsHiddenAfterUpdate","blockOptionHover","isComposing","initialTouchX","initialTouchY","instancePrefix","openAfterFocus","scrollToFocusedOptionOnUpdate","userIsDragging","controlRef","getControlRef","focusedOptionRef","getFocusedOptionRef","menuListRef","getMenuListRef","getInputRef","focusInput","blurInput","actionMeta","ariaOnChange","_this$props2","onInputChange","onMenuClose","selectOption","_this$props3","deselected","removeValue","newValueArray","clearValue","removedValues","popValue","lastSelectedValue","classNamePrefix","getStyles","custom","getElementId","getComponents","getCategorizedOptions","buildFocusableOptions","getFocusableOptions","onMenuMouseDown","onMenuMouseMove","onControlMouseDown","openMenu","onDropdownIndicatorMouseDown","_this$props4","onClearIndicatorMouseDown","onScroll","onCompositionStart","onCompositionEnd","onControlTouchEnd","onClearIndicatorTouchEnd","onDropdownIndicatorTouchEnd","onMenuOpen","onInputFocus","onInputBlur","onOptionHover","_this$props5","isClearable","_this$state","focusValue","focusOption","startListeningComposition","startListeningToTouch","_this$props6","stopListeningComposition","stopListeningToTouch","_this$state2","openAtIndex","selectedIndex","_this$state3","focusedIndex","getTheme","_this$props7","formatOptionLabel","_this$props8","ariaAttributes","autoCapitalize","autoCorrect","isHidden","_this3","_this$getComponents2","MultiValue","MultiValueContainer","MultiValueLabel","MultiValueRemove","SingleValue","Placeholder","_this$props9","_this$state4","opt","isOptionFocused","Container","Label","Remove","removeProps","ClearIndicator","_this$props10","innerProps","LoadingIndicator","_this$props11","_this$getComponents5","DropdownIndicator","IndicatorSeparator","_this4","_this$getComponents7","Group","GroupHeading","MenuPortal","LoadingMessage","NoOptionsMessage","Option","_this$props12","menuPortalTarget","onMenuScrollToTop","onMenuScrollToBottom","menuUI","optionId","hasOptions","groupIndex","groupId","headingId","Heading","headingProps","_message","menuPlacementProps","menuElement","_ref4$placerProps","placerProps","scrollTargetRef","appendTo","controlElement","_this5","_this$props13","_this$state5","_this$getComponents8","IndicatorsContainer","SelectContainer","ValueContainer","_this$props14","getCommonProps","renderLiveRegion","renderPlaceholderOrValue","renderClearIndicator","renderLoadingIndicator","renderIndicatorSeparator","renderDropdownIndicator","renderMenu","renderFormField","newMenuOptionsState","nextSelectValue","lastFocusedIndex","getNextFocusedValue","lastFocusedOption","getNextFocusedOption","newInputIsHiddenState","ownKeys","enumerableOnly","sym","_objectSpread2","getOwnPropertyDescriptors","applyPrefixToName","cleanValue","cleanCommonProps","isDocumentElement","getScrollTop","scrollTo","easeOutCubic","animatedScrollTo","increment","currentTime","animateScroll","requestAnimationFrame","scrollIntoView","menuEl","focusedEl","menuRect","focusedRect","overScroll","isTouchCapable","isMobileDevice","passiveOptionAccessed","supportsPassiveEvents","getMenuPlacement","shouldScroll","isFixedPosition","excludeStaticParent","overflowRx","docEl","defaultState","_menuEl$getBoundingCl","menuBottom","menuHeight","menuTop","containerTop","viewHeight","viewSpaceAbove","viewSpaceBelow","scrollSpaceAbove","scrollSpaceBelow","scrollDown","scrollUp","scrollDuration","_constrainedHeight","spaceAbove","_constrainedHeight2","coercePlacement","menuCSS","_ref2$theme","alignToControl","PortalPlacementContext","getPortalPlacement","MenuPlacer","getPlacement","getUpdatedProps","menuListCSS","noticeCSS","_ref5$theme","noOptionsMessageCSS","loadingMessageCSS","_templateObject","menuPortalCSS","_Component2","getBoundingClientObj","scrollDistance","menuWrapper","containerCSS","valueContainerCSS","indicatorsContainerCSS","alignSelf","Svg","CrossIcon","DownChevron","baseCSS","_ref3$theme","dropdownIndicatorCSS","clearIndicatorCSS","indicatorSeparatorCSS","_ref4$theme","loadingDotAnimations","freeze","loadingIndicatorCSS","LoadingDot","indicator","_ref$theme","groupCSS","groupHeadingCSS","inputCSS","multiValueCSS","multiValueLabelCSS","cropWithEllipsis","multiValueRemoveCSS","MultiValueGeneric","emotionCx","optionCSS","placeholderCSS","css$1","_cleanCommonProps","indicators","defaultComponents","defaultInputValue","defaultMenuIsOpen","manageState","SelectComponent","_class","StateManager","callProp","getProp","useInsertionEffectMaybe","WrappedComponent","serializedArr","extendStatics","__makeTemplateObject","cooked","__extends","__","__importStar","mod","templateObject_1","templateObject_2","React","core_1","helpers_1","pulse","Loader","cssValue","sizeMarginDefaults","BasicColors","calculateRgba","res_1","__export","commonValues","sizeDefaults","sizeValue","heightWidthDefaults","heightWidthRadiusDefaults","cssUnit","cm","pt","em","ex","rem","vw","vmin","vmax","parseLengthAndUnit","valueString","lengthWithunit","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","initialStatus","isMounting","appearStatus","nextCallback","updateStatus","nextStatus","cancelNextCallback","getTimeouts","mounting","performEnter","performExit","timeouts","enterTimeout","safeSetState","onTransitionEnd","nextState","setNextCallback","doesNotHaveTimeoutOrListener","maybeNextCallback","TransitionGroupContext","getChildMapping","mapper","getNextChildMapping","prevChildMapping","nextChildMapping","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","pendingNextKey","mergeChildMappings","hasPrev","hasNext","prevChild","isLeaving","firstRender","currentChildMapping","forceReflow","__self","__source","jsxs","escape","_status","_result","IsSomeRendererActing","toArray","_currentValue2","_threadCount","createFactory","createRef","lazy","memo","autoprefix","_forOwn2","_forOwn3","transforms","msBorderRadius","MozBorderRadius","OBorderRadius","WebkitBorderRadius","msBoxShadow","MozBoxShadow","OBoxShadow","WebkitTouchCallout","KhtmlUserSelect","MozUserSelect","msUserSelect","WebkitBoxFlex","MozBoxFlex","WebkitFlex","msFlex","WebkitFlexBasis","WebkitJustifyContent","msTransition","MozTransition","OTransition","WebkitTransition","msTransform","MozTransform","OTransform","WebkitTransform","otherElementStyles","otherStyle","prefixed","Active","Hover","handleMouseOut","flattenNames","_isString3","_isPlainObject3","_map3","things","names","thing","ReactCSS","loop","handleActive","_flattenNames2","_mergeClasses2","_autoprefix2","_hover3","_active2","_loop3","activations","activeNames","setProp","mergeClasses","_cloneDeep3","toMerge","formatProdErrorMessage","$$observable","observable","randomString","ActionTypes","INIT","REPLACE","PROBE_UNKNOWN_ACTION","createStore","reducer","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","isSubscribed","replaceReducer","nextReducer","outerSubscribe","observer","observeState","unsubscribe","legacy_createStore","combineReducers","reducers","reducerKeys","finalReducers","shapeAssertionError","finalReducerKeys","assertReducerShape","hasChanged","previousStateForKey","nextStateForKey","bindActionCreator","actionCreator","bindActionCreators","actionCreators","boundActionCreators","compose","applyMiddleware","middlewares","store","_dispatch","middlewareAPI","chain","middleware","MessageChannel","unstable_forceFrameRate","cancelAnimationFrame","port2","port1","onmessage","postMessage","sortIndex","expirationTime","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","objA","objB","compareContext","keysA","keysB","bHasOwnProperty","valueA","valueB","History","isHistory","ctor","prot","redos","undos","SAVING","MERGING","HistoryEditor","isHistoryEditor","history","isMerging","editor","isSaving","redo","undo","withoutMerging","withoutSaving","withHistory","batch","op","inverseOps","reverse","operations","lastBatch","lastOp","shouldOverwrite","save","shouldSave","shouldMerge","shouldClear","newProperties","isOptionsObject","isTargetAttached","isConnected","behavior","computeOptions","getOptions","canSmoothScroll","defaultBehavior","Key","NODE_TO_INDEX","NODE_TO_PARENT","EDITOR_TO_WINDOW","EDITOR_TO_ELEMENT","EDITOR_TO_PLACEHOLDER_ELEMENT","ELEMENT_TO_NODE","NODE_TO_ELEMENT","NODE_TO_KEY","EDITOR_TO_KEY_TO_ELEMENT","IS_READ_ONLY","IS_FOCUSED","IS_COMPOSING","EDITOR_TO_USER_SELECTION","EDITOR_TO_ON_CHANGE","EDITOR_TO_SCHEDULE_FLUSH","EDITOR_TO_PENDING_INSERTION_MARKS","EDITOR_TO_USER_MARKS","EDITOR_TO_PENDING_DIFFS","EDITOR_TO_PENDING_ACTION","EDITOR_TO_PENDING_SELECTION","EDITOR_TO_FORCE_RENDER","PLACEHOLDER_SYMBOL","MARK_PLACEHOLDER_SYMBOL","getDefaultView","isDOMElement","isDOMNode","Node","isDOMSelection","Selection","isDOMText","getEditableChildAndIndex","childNodes","triedForward","triedBackward","getEditableChild","getPlainText","domNode","getPropertyValue","catchSlateFragment","isTrackedMutation","mutation","ReactEditor","hasDOMNode","editable","parentMutation","addedNodes","removedNodes","_node","IS_REACT_VERSION_17_OR_ABOVE","IS_IOS","MSStream","IS_APPLE","IS_ANDROID","IS_FIREFOX","IS_SAFARI","IS_EDGE_LEGACY","IS_CHROME","IS_CHROME_LEGACY","IS_FIREFOX_LEGACY","IS_QQBROWSER","IS_UC_MOBILE","IS_WECHATBROWSER","CAN_USE_DOM","HAS_BEFORE_INPUT_SUPPORT","globalThis","InputEvent","getTargetRanges","findPath","findDocumentOrShadowRoot","toDOMNode","Document","isReadOnly","preventScroll","deselect","selection","domSelection","targetEl","editorEl","closest","insertData","insertFragmentData","insertTextData","setFragmentData","originEvent","KEY_TO_ELEMENT","toDOMPoint","point","domPoint","texts","attr","nextText","_nextText$textContent","startsWith","toDOMRange","anchor","isBackward","domAnchor","domFocus","domRange","startNode","startOffset","endNode","endOffset","isStartAtZeroWidth","isEndAtZeroWidth","toSlateNode","domEl","findEventRange","isPrev","isInline","caretRangeFromPoint","caretPositionFromPoint","offsetNode","toSlateRange","exactMatch","suppressThrow","toSlatePoint","nearestNode","nearestOffset","isLast","normalizeDOMPoint","textNode","_domNode$textContent","_domNode$textContent2","potentialVoidNode","voidNode","leafNode","cloneContents","textContext","leafNodes","endsWith","_slateNode","_path","slateNode","startContainer","endContainer","collapsed","voids","hasRange","androidScheduleFlush","_EDITOR_TO_SCHEDULE_F","androidPendingDiffs","useIsomorphicLayoutEffect","_excluded$3","_excluded2$1","shallowCompare","obj1","obj2","isDecoratorRangeListEqual","another","rangeOwnProps","otherOwnProps","leaf","useSlateStatic","parentPath","isMarkPlaceholder","isVoid","ZeroWidthString","TextString","isTrailing","isLineBreak","getTextContent","textWithTrailing","EditorContext","Leaf","renderPlaceholder","renderLeaf","DefaultLeaf","placeholderRef","placeholderEl","placeholderProps","MemoizedLeaf","Text","decorations","leaves","MemoizedText","renderElement","DefaultElement","useReadOnly","useChildren","Tag","_text","MemoizedElement","DecorateContext","SelectedContext","decorate","isLeafBlock","sel","ds","dec","ReadOnlyContext","SlateContext","useSlate","HOTKEYS","bold","moveBackward","moveForward","moveWordBackward","moveWordForward","deleteBackward","deleteForward","extendBackward","extendForward","italic","insertSoftBreak","splitBlock","APPLE_HOTKEYS","moveLineBackward","moveLineForward","deleteLineBackward","deleteLineForward","deleteWordBackward","deleteWordForward","extendLineBackward","extendLineForward","transposeCharacter","WINDOWS_HOTKEYS","generic","apple","windows","isGeneric","isApple","isWindows","Hotkeys","isBold","isCompose","isMoveBackward","isMoveForward","isDeleteBackward","isDeleteForward","isDeleteLineBackward","isDeleteLineForward","isDeleteWordBackward","isDeleteWordForward","isExtendBackward","isExtendForward","isExtendLineBackward","isExtendLineForward","isItalic","isMoveLineBackward","isMoveLineForward","isMoveWordBackward","isMoveWordForward","isRedo","isSoftBreak","isSplitBlock","isTransposeCharacter","isUndo","MUTATION_OBSERVER_CONFIG$1","subtree","childList","characterData","characterDataOldValue","RestoreDOMComponent","mutationObserver","_this$mutationObserve","receivedUserInput","bufferedMutations","registerMutations","mutations","trackedMutations","restoreDOM","oldValue","createRestoreDomManager","MutationObserver","_this$mutationObserve2","_this$mutationObserve3","_this$manager2","_this$manager","pendingMutations","takeRecords","_this$manager3","_this$mutationObserve4","RestoreDOM","verifyDiffState","textDiff","nextPath","nextNode","normalizeStringDiff","targetText","removedText","prefixLength","longestCommonPrefixLength","suffixLength","longestCommonSuffixLength","normalized","mergeStringDiffs","overlap","applied","diffs","applyStringDiff","sliceEnd","targetRange","normalizePoint","parentBlock","normalizeRange","transformPendingPoint","pendingDiffs","affinity","_anchor","_transformed","transformPendingRange","ownKeys$3","_objectSpread$3","createAndroidInputManager","scheduleOnDOMSelectionChange","onDOMSelectionChange","flushing","compositionEndTimeoutId","flushTimeoutId","actionTimeoutId","insertPositionHint","applyPendingSelection","pendingSelection","_EDITOR_TO_PENDING_DI","hasPendingDiffs","hasPendingAction","selectionRef","marks","scheduleSelectionChange","_EDITOR_TO_PENDING_DI2","_EDITOR_TO_PENDING_DI3","pendingMarks","unref","_targetRange","performAction","userMarks","updatePlaceholderVisibility","forceHide","placeholderElement","storeDiff","_EDITOR_TO_PENDING_DI4","scheduleAction","_EDITOR_TO_PENDING_DI5","scheduleFlush","hasPendingChanges","isFlushing","handleUserSelect","pathChanged","parentPathChanged","handleCompositionEnd","_event","handleCompositionStart","handleDOMBeforeInput","_targetRange2","inputType","nativeTargetRange","_start","_end","targetNode","_nativeTargetRange","_start2","_end2","hintPosition","handleDomMutations","_EDITOR_TO_FORCE_REND","handleInput","_excluded$2","ownKeys$2","MUTATION_OBSERVER_CONFIG","useAndroidInputManager","isMountedRef","inputManager","_objectSpread$2","useMutationObserver","_excluded$1","ownKeys$1","_objectSpread$1","Editable","defaultDecorate","onDOMBeforeInput","propsOnDOMBeforeInput","DefaultPlaceholder","scrollSelectionIntoView","defaultScrollSelectionIntoView","setIsComposing","deferredOperations","onUserInput","animationFrameIdRef","useTrackUserInput","forceRender","isDraggingInternally","isUpdatingSelection","latestElement","hasMarkPlaceholder","androidInputManager","anchorNodeSelectable","hasEditableTarget","isTargetInsideNonReadonlyVoid","focusNodeSelectable","setDomSelection","forceChange","hasDomSelection","editorElement","hasDomSelectionInEditor","slateRange","_anchorNode$parentEle","newDomRange","setBaseAndExtent","ensureSelection","animationFrameId","ensureDomSelection","isDOMEventHandled","_EDITOR_TO_USER_SELEC","isCompositionChange","_node$parentElement","_window$getComputedSt","_lastText$textContent","lastText","createTreeWalker","NodeFilter","SHOW_TEXT","_selection","toRestore","loose","unset","fromEntries","mark","zindex","suppressContentEditableWarning","onBeforeInput","isEventHandled","_text2","onInput","hasTarget","blockPath","_block$","startVoid","endVoid","_range","placeholderMarks","onCompositionUpdate","inlinePath","onCopy","onCut","onDragOver","onDragStart","onDrop","draggedRange","onDragEnd","isRTL","maybeHistoryEditor","_maybeHistoryEditor","onPaste","getData","isPlainTextOnlyPaste","leafEl","shouldTreatEventAsHandled","FocusedContext","useFocused","SlateSelectorContext","Slate","unmountRef","setContext","selectorContext","handleSelectorChange","eventListeners","slateRef","getSlate","getSelectorContext","onContextChange","prevContext","setIsFocused","doRectsIntersect","compareRect","middle","areRangesSameLine","range1","range2","rect1","rect2","_objectSpread","withReact","addMark","removeMark","parentBlockEntry","parentBlockPath","parentElementRange","currentLineRange","parentRange","parentRangeBoundary","findCurrentLineRange","newPath","transformTextDiff","pendingAction","getMatches","prevPath","commonPath","attach","cloneRange","setEndAfter","zw","isNewline","span","fragment","getFragment","encoded","setData","div","htmlData","getSlateFragmentAttribute","decoded","decodeURIComponent","atob","insertFragment","lines","always","insertText","IS_MAC","platform","MODIFIERS","alt","ALIASES","break","cmd","command","ctl","ctrl","del","esc","ins","space","spacebar","CODES","backspace","tab","pause","capslock","pageup","pagedown","home","arrowleft","arrowup","arrowright","arrowdown","numlock","scrolllock","isHotkey","hotkey","parseHotkey","compareHotkey","byKey","_iteratorNormalCompletion","_didIteratorError","_iteratorError","optional","toKeyName","toKeyCode","expected","actual","nn","rn","isFrozen","tn","en","on","revocable","revoke","proxy","deleteProperty","un","produce","produceWithPatches","useProxies","setUseProxies","autoFreeze","setAutoFreeze","createDraft","finishDraft","applyPatches","$","an","ln","dn","DIRTY_PATHS","DIRTY_PATH_KEYS","FLUSHING","NORMALIZING","PATH_REFS","POINT_REFS","RANGE_REFS","ownKeys$9","_objectSpread$9","createEditor","Editor","pathRefs","PathRef","pointRefs","PointRef","rangeRefs","RangeRef","dirtyPaths","dirtyPathKeys","oldDirtyPaths","oldDirtyPathKeys","Path","operationCanTransformPath","newDirtyPaths","getDirtyPaths","Transforms","normalize","Range","isExpanded","setNodes","isText","deleteFragment","insertBreak","splitNodes","insertNode","insertNodes","normalizeNode","shouldHaveInlines","isEditor","_child","removeNodes","equals","mergeNodes","unsetNodes","levels","_path2","descendants","_path3","ancestors","_path4","oldAncestors","newAncestors","ancestor","_ancestor","_p","newParent","newIndex","resultPath","_path5","_path6","CodepointType","getCharacterDistance","isLTR","codepoints","codepointsIteratorRTL","None","gb12Or13","codePointAt","getCodepointType","intersects","ZWJ","ExtPict","endsWithEmojiZWJ","RI","endsWithOddNumberOfRIs","isBoundaryPair","SPACE","PUNCTUATION","CHAMELEON","splitByCharacterDistance","dist","isWordCharacter","charDist","nextChar","nextRemaining","char1","isLowSurrogate","char2","isHighSurrogate","reExtend","rePrepend","reSpacingMark","reL","reV","reT","reLV","reLVT","reExtPict","Any","Prepend","SpacingMark","LV","LVT","NonBoundaryPairs","endingEmojiZWJ","endingRIs","isNodeList","isAncestor","isElementList","isElementProps","isElementType","elementVal","elementKey","_excluded$4","_excluded2$3","ownKeys$8","_objectSpread$8","IS_EDITOR_CACHE","above","after","edges","hasBlocks","isBlock","hasInlines","hasTexts","cachedIsEditor","isRange","Operation","isOperationList","isEnd","Point","isEdge","isStart","isNormalizing","prevNode","pointAfterLocation","isPath","universal","isSpan","hit","nodeEntries","pass","isLower","emit","force","popDirtyPath","getDirtyPathKeys","allPaths","allPathKeys","withoutNormalizing","dirtyPath","_dirtyPath","_entry","firstPath","lastPath","isPoint","pathRef","pointRef","isNewBlock","blockText","leafTextRemaining","leafTextOffset","isFirst","calcDistance","getWordDistance","pointBeforeLocation","rangeRef","setNormalizing","unhangRange","endBlock","skip","void","_excluded2$2","IS_NODE_LIST_CACHE","Scrubber","childPath","descendant","extractProps","newRoot","_leaf","isNode","cachedResult","isTextProps","nextIndex","ownKeys$7","_objectSpread$7","isNodeOperation","isOperation","isSelectionOperation","isTextOperation","inverse","isSibling","inversePath","inverseNewPath","_properties","_newProperties","paths","av","endsAfter","bs","bv","endsAt","endsBefore","hasPrevious","isChild","isDescendant","isParent","operation","relative","_op","_op2","_op3","_position","_op4","onp","ownKeys$6","_objectSpread$6","ownKeys$5","rs","ts","isAfterStart","isBeforeEnd","intersection","s1","e1","s2","e2","_objectSpread$5","isForward","affinityAnchor","affinityFocus","_scrubber","setScrubber","scrubber","isDeepEqual","ownKeys$4","_objectSpread$4","omitText","isTextList","leafEnd","decorationStart","decorationEnd","leafStart","off","_off","GeneralTransforms","_point","_node2","_parent","_index","_point2","_node3","_parent2","_index2","truePath","_point3","_key3","_index3","_point4","_key4","_prev","preferNext","_node4","_before","_after","_point5","_key5","_node5","_key6","_key7","_key8","_path7","newNode","_node6","_parent4","_index4","_before2","_after2","_before3","_after3","_point6","_key9","applyToDraft","NodeTransforms","hanging","_matchPath","isAtEnd","liftNodes","matchPath","parentNodeEntry","toPath","moveNodes","_toPath","splitPath","_toPath2","isPreviousSibling","emptyAncestor","hasSingleChildNest","emptyRef","toRef","targets","depths","splitMode","endAtEndOfNode","startAtStartOfNode","nodeProp","hasChanges","deleteRange","afterRef","beforeRef","highest","voidMatch","voidPath","afterPath","highestPath","lowestPath","_afterRef","unwrapNodes","wrapNodes","roots","rootPath","commonNodeEntry","commonNode","wrapperPath","SelectionTransforms","collapse","move","opts","setSelection","setPoint","oldProps","TextTransforms","furthestVoid","endOfDoc","startBlock","isAcrossBlocks","isSingleText","startRef","endRef","startUnref","endUnref","inlineElementMatch","_inlinePath","blockMatch","isBlockStart","isBlockEnd","isBlockEmpty","mergeStart","mergeEnd","matcher","starts","middles","ends","starting","inlineMatch","isInlineStart","isInlineEnd","middleRef","startPoint","endPoint","styledComponentId","env","REACT_APP_SC_ATTR","SC_ATTR","SC_DISABLE_SPEEDY","REACT_APP_SC_DISABLE_SPEEDY","groupSizes","Uint32Array","indexOfGroup","insertRules","clearGroup","deleteRule","getGroup","getRule","registerName","__webpack_nonce__","cssText","isServer","useCSSOMInjection","gs","server","registerId","reconstructWithOptions","allocateGSInstance","hasNameForId","clearNames","clearRules","clearTag","staticRulesId","isStatic","componentId","baseHash","baseStyle","generateAndInjectStyles","plugins","lastIndexOf","disableCSSOMInjection","disableVendorPrefixes","getName","isCss","Ge","attrs","parentComponentId","componentStyle","foldedComponentIds","$as","_foldedDefaultProps","createStyles","removeStyles","_emitSheetCSS","getStyleTags","sealed","getStyleElement","seal","collectStyles","interleaveWithNodeStream","trimLeft","trimRight","tinyCounter","mathRound","mathMin","mathMax","mathRandom","tinycolor","named","matchers","hsva","hex8","parseIntFromHex","convertHexToDecimal","hex6","hex4","hex3","stringInputToObject","isValidCSSUnit","bound01","rgbToRgb","convertToPercentage","hsvToRgb","hue2rgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_roundA","_format","_gradientType","gradientType","_tc_id","rgbToHsv","rgbToHex","allow3Char","pad2","rgbaToArgbHex","convertDecimalToHex","desaturate","clamp01","saturate","greyscale","brighten","spin","complement","triad","tetrad","splitcomplement","analogous","results","slices","part","monochromatic","modification","isDark","getBrightness","isLight","getOriginalInput","getFormat","getAlpha","RsRGB","GsRGB","BsRGB","setAlpha","toHsvString","toHslString","toHexString","toHex8","allow4Char","rgbaToHex","toHex8String","toRgbString","toPercentageRgb","toPercentageRgbString","toName","hexNames","toFilter","secondColor","hex8String","secondHex8String","formatSet","formattedString","hasAlpha","_applyModification","_applyCombination","fromRatio","newColor","mix","rgb1","rgb2","readability","isReadable","wcag2","wcag2Parms","parms","level","validateWCAG2Parms","mostReadable","baseColor","colorList","includeFallbackColors","bestColor","bestScore","burntsienna","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","_inheritsLoose","_iterableToArray","iter","_toConsumableArray","arrayLikeToArray","iterableToArray","unsupportedIterableToArray","nanoid","crypto","getRandomValues","byte","MS","MOZ","WEBKIT","COMMENT","RULESET","DECLARATION","IMPORT","KEYFRAMES","rulesheet","prefixer","compile","rulesets","pseudo","declarations","atrule","variable","scanning","ampersand","characters","comment","declaration","ruleset","post","serialize","peek","caret","alloc","dealloc","delimit","whitespace","escaping","commenter","identifier","charat","replacement","indexof","strlen","sizeof","combine","appendQueryParams","qp","queryString","usp","polyfill","wretch","query","_url","_config","CONTENT_TYPE_HEADER","FETCH_ERROR","extractContentType","isLikelyJsonMime","two","mergeArrays","errorType","polyfills","doThrow","res","WretchError","_catchers","_resolvers","resolvers","_middlewares","_addons","addons","catchers","finalOptions","addon","beforeRequest","_fetchReq","fetchFunction","reduceRight","curr","middlewareHelper","referenceError","throwingPromise","catch","__wrap","catchersWrapper","promise","catcher","bodyParser","funName","responseChain","_wretchReq","json","formData","errorId","badRequest","unauthorized","forbidden","notFound","internalError","fetchError","enhancedResponseChain","core","_deferred","headerValues","headerValue","Accept","auth","Authorization","newMap","defer","fetch","contentType","jsonify","put","patch","jsObject","currentContentType"],"sourceRoot":""}