{"version":3,"file":"vendor.0fa03cf8.js","sources":["../../node_modules/.pnpm/svelte@3.37.0/node_modules/svelte/internal/index.mjs","../../node_modules/.pnpm/rope-sequence@1.3.2/node_modules/rope-sequence/dist/index.es.js","../../node_modules/.pnpm/orderedmap@1.1.1/node_modules/orderedmap/index.es.js","../../node_modules/.pnpm/prosemirror-model@1.14.1/node_modules/prosemirror-model/dist/index.es.js","../../node_modules/.pnpm/prosemirror-transform@1.3.2/node_modules/prosemirror-transform/dist/index.es.js","../../node_modules/.pnpm/prosemirror-state@1.3.4/node_modules/prosemirror-state/dist/index.es.js","../../node_modules/.pnpm/prosemirror-history@1.1.3/node_modules/prosemirror-history/dist/index.es.js","../../node_modules/.pnpm/w3c-keyname@2.2.4/node_modules/w3c-keyname/index.es.js","../../node_modules/.pnpm/prosemirror-keymap@1.1.4/node_modules/prosemirror-keymap/dist/index.es.js","../../node_modules/.pnpm/prosemirror-view@1.18.4/node_modules/prosemirror-view/dist/index.es.js","../../node_modules/.pnpm/prosemirror-dropcursor@1.3.4/node_modules/prosemirror-dropcursor/dist/index.es.js","../../node_modules/.pnpm/prosemirror-gapcursor@1.1.5/node_modules/prosemirror-gapcursor/dist/index.es.js","../../node_modules/.pnpm/prosemirror-commands@1.1.7/node_modules/prosemirror-commands/dist/index.es.js","../../node_modules/.pnpm/@rails+activestorage@6.0.3-7/node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js","../../node_modules/.pnpm/prosemirror-schema-list@1.1.4/node_modules/prosemirror-schema-list/dist/index.es.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n let j = 0;\n const remove = [];\n while (j < node.attributes.length) {\n const attribute = node.attributes[j++];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n for (let k = 0; k < remove.length; k++) {\n node.removeAttribute(remove[k]);\n }\n return nodes.splice(i, 1)[0];\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(anchor = null) {\n this.a = anchor;\n this.e = this.n = null;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n this.h(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${String(value).replace(/\"/g, '"').replace(/'/g, ''')}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.37.0' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * \n * \n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","var GOOD_LEAF_SIZE = 200;\n\n// :: class A rope sequence is a persistent sequence data structure\n// that supports appending, prepending, and slicing without doing a\n// full copy. It is represented as a mostly-balanced tree.\nvar RopeSequence = function RopeSequence () {};\n\nRopeSequence.prototype.append = function append (other) {\n if (!other.length) { return this }\n other = RopeSequence.from(other);\n\n return (!this.length && other) ||\n (other.length < GOOD_LEAF_SIZE && this.leafAppend(other)) ||\n (this.length < GOOD_LEAF_SIZE && other.leafPrepend(this)) ||\n this.appendInner(other)\n};\n\n// :: (union<[T], RopeSequence>) → RopeSequence\n// Prepend an array or other rope to this one, returning a new rope.\nRopeSequence.prototype.prepend = function prepend (other) {\n if (!other.length) { return this }\n return RopeSequence.from(other).append(this)\n};\n\nRopeSequence.prototype.appendInner = function appendInner (other) {\n return new Append(this, other)\n};\n\n// :: (?number, ?number) → RopeSequence\n// Create a rope repesenting a sub-sequence of this rope.\nRopeSequence.prototype.slice = function slice (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from >= to) { return RopeSequence.empty }\n return this.sliceInner(Math.max(0, from), Math.min(this.length, to))\n};\n\n// :: (number) → T\n// Retrieve the element at the given position from this rope.\nRopeSequence.prototype.get = function get (i) {\n if (i < 0 || i >= this.length) { return undefined }\n return this.getInner(i)\n};\n\n// :: ((element: T, index: number) → ?bool, ?number, ?number)\n// Call the given function for each element between the given\n// indices. This tends to be more efficient than looping over the\n// indices and calling `get`, because it doesn't have to descend the\n// tree for every element.\nRopeSequence.prototype.forEach = function forEach (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n if (from <= to)\n { this.forEachInner(f, from, to, 0); }\n else\n { this.forEachInvertedInner(f, from, to, 0); }\n};\n\n// :: ((element: T, index: number) → U, ?number, ?number) → [U]\n// Map the given functions over the elements of the rope, producing\n// a flat array.\nRopeSequence.prototype.map = function map (f, from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.length;\n\n var result = [];\n this.forEach(function (elt, i) { return result.push(f(elt, i)); }, from, to);\n return result\n};\n\n// :: (?union<[T], RopeSequence>) → RopeSequence\n// Create a rope representing the given array, or return the rope\n// itself if a rope was given.\nRopeSequence.from = function from (values) {\n if (values instanceof RopeSequence) { return values }\n return values && values.length ? new Leaf(values) : RopeSequence.empty\n};\n\nvar Leaf = /*@__PURE__*/(function (RopeSequence) {\n function Leaf(values) {\n RopeSequence.call(this);\n this.values = values;\n }\n\n if ( RopeSequence ) Leaf.__proto__ = RopeSequence;\n Leaf.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Leaf.prototype.constructor = Leaf;\n\n var prototypeAccessors = { length: { configurable: true },depth: { configurable: true } };\n\n Leaf.prototype.flatten = function flatten () {\n return this.values\n };\n\n Leaf.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n return new Leaf(this.values.slice(from, to))\n };\n\n Leaf.prototype.getInner = function getInner (i) {\n return this.values[i]\n };\n\n Leaf.prototype.forEachInner = function forEachInner (f, from, to, start) {\n for (var i = from; i < to; i++)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n for (var i = from - 1; i >= to; i--)\n { if (f(this.values[i], start + i) === false) { return false } }\n };\n\n Leaf.prototype.leafAppend = function leafAppend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(this.values.concat(other.flatten())) }\n };\n\n Leaf.prototype.leafPrepend = function leafPrepend (other) {\n if (this.length + other.length <= GOOD_LEAF_SIZE)\n { return new Leaf(other.flatten().concat(this.values)) }\n };\n\n prototypeAccessors.length.get = function () { return this.values.length };\n\n prototypeAccessors.depth.get = function () { return 0 };\n\n Object.defineProperties( Leaf.prototype, prototypeAccessors );\n\n return Leaf;\n}(RopeSequence));\n\n// :: RopeSequence\n// The empty rope sequence.\nRopeSequence.empty = new Leaf([]);\n\nvar Append = /*@__PURE__*/(function (RopeSequence) {\n function Append(left, right) {\n RopeSequence.call(this);\n this.left = left;\n this.right = right;\n this.length = left.length + right.length;\n this.depth = Math.max(left.depth, right.depth) + 1;\n }\n\n if ( RopeSequence ) Append.__proto__ = RopeSequence;\n Append.prototype = Object.create( RopeSequence && RopeSequence.prototype );\n Append.prototype.constructor = Append;\n\n Append.prototype.flatten = function flatten () {\n return this.left.flatten().concat(this.right.flatten())\n };\n\n Append.prototype.getInner = function getInner (i) {\n return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length)\n };\n\n Append.prototype.forEachInner = function forEachInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from < leftLen &&\n this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false)\n { return false }\n if (to > leftLen &&\n this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false)\n { return false }\n };\n\n Append.prototype.forEachInvertedInner = function forEachInvertedInner (f, from, to, start) {\n var leftLen = this.left.length;\n if (from > leftLen &&\n this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false)\n { return false }\n if (to < leftLen &&\n this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false)\n { return false }\n };\n\n Append.prototype.sliceInner = function sliceInner (from, to) {\n if (from == 0 && to == this.length) { return this }\n var leftLen = this.left.length;\n if (to <= leftLen) { return this.left.slice(from, to) }\n if (from >= leftLen) { return this.right.slice(from - leftLen, to - leftLen) }\n return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen))\n };\n\n Append.prototype.leafAppend = function leafAppend (other) {\n var inner = this.right.leafAppend(other);\n if (inner) { return new Append(this.left, inner) }\n };\n\n Append.prototype.leafPrepend = function leafPrepend (other) {\n var inner = this.left.leafPrepend(other);\n if (inner) { return new Append(inner, this.right) }\n };\n\n Append.prototype.appendInner = function appendInner (other) {\n if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1)\n { return new Append(this.left, new Append(this.right, other)) }\n return new Append(this, other)\n };\n\n return Append;\n}(RopeSequence));\n\nvar ropeSequence = RopeSequence;\n\nexport default ropeSequence;\n","// ::- Persistent data structure representing an ordered mapping from\n// strings to values, with some convenient update methods.\nfunction OrderedMap(content) {\n this.content = content;\n}\n\nOrderedMap.prototype = {\n constructor: OrderedMap,\n\n find: function(key) {\n for (var i = 0; i < this.content.length; i += 2)\n if (this.content[i] === key) return i\n return -1\n },\n\n // :: (string) → ?any\n // Retrieve the value stored under `key`, or return undefined when\n // no such key exists.\n get: function(key) {\n var found = this.find(key);\n return found == -1 ? undefined : this.content[found + 1]\n },\n\n // :: (string, any, ?string) → OrderedMap\n // Create a new map by replacing the value of `key` with a new\n // value, or adding a binding to the end of the map. If `newKey` is\n // given, the key of the binding will be replaced with that key.\n update: function(key, value, newKey) {\n var self = newKey && newKey != key ? this.remove(newKey) : this;\n var found = self.find(key), content = self.content.slice();\n if (found == -1) {\n content.push(newKey || key, value);\n } else {\n content[found + 1] = value;\n if (newKey) content[found] = newKey;\n }\n return new OrderedMap(content)\n },\n\n // :: (string) → OrderedMap\n // Return a map with the given key removed, if it existed.\n remove: function(key) {\n var found = this.find(key);\n if (found == -1) return this\n var content = this.content.slice();\n content.splice(found, 2);\n return new OrderedMap(content)\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the start of the map.\n addToStart: function(key, value) {\n return new OrderedMap([key, value].concat(this.remove(key).content))\n },\n\n // :: (string, any) → OrderedMap\n // Add a new key to the end of the map.\n addToEnd: function(key, value) {\n var content = this.remove(key).content.slice();\n content.push(key, value);\n return new OrderedMap(content)\n },\n\n // :: (string, string, any) → OrderedMap\n // Add a key after the given key. If `place` is not found, the new\n // key is added to the end.\n addBefore: function(place, key, value) {\n var without = this.remove(key), content = without.content.slice();\n var found = without.find(place);\n content.splice(found == -1 ? content.length : found, 0, key, value);\n return new OrderedMap(content)\n },\n\n // :: ((key: string, value: any))\n // Call the given function for each key/value pair in the map, in\n // order.\n forEach: function(f) {\n for (var i = 0; i < this.content.length; i += 2)\n f(this.content[i], this.content[i + 1]);\n },\n\n // :: (union) → OrderedMap\n // Create a new map by prepending the keys in this map that don't\n // appear in `map` before the keys in `map`.\n prepend: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(map.content.concat(this.subtract(map).content))\n },\n\n // :: (union) → OrderedMap\n // Create a new map by appending the keys in this map that don't\n // appear in `map` after the keys in `map`.\n append: function(map) {\n map = OrderedMap.from(map);\n if (!map.size) return this\n return new OrderedMap(this.subtract(map).content.concat(map.content))\n },\n\n // :: (union) → OrderedMap\n // Create a map containing all the keys in this map that don't\n // appear in `map`.\n subtract: function(map) {\n var result = this;\n map = OrderedMap.from(map);\n for (var i = 0; i < map.content.length; i += 2)\n result = result.remove(map.content[i]);\n return result\n },\n\n // :: number\n // The amount of keys in this map.\n get size() {\n return this.content.length >> 1\n }\n};\n\n// :: (?union) → OrderedMap\n// Return a map with the given content. If null, create an empty\n// map. If given an ordered map, return that map itself. If given an\n// object, create a map from the object's properties.\nOrderedMap.from = function(value) {\n if (value instanceof OrderedMap) return value\n var content = [];\n if (value) for (var prop in value) content.push(prop, value[prop]);\n return new OrderedMap(content)\n};\n\nvar orderedmap = OrderedMap;\n\nexport default orderedmap;\n","import OrderedMap from 'orderedmap';\n\nfunction findDiffStart(a, b, pos) {\n for (var i = 0;; i++) {\n if (i == a.childCount || i == b.childCount)\n { return a.childCount == b.childCount ? null : pos }\n\n var childA = a.child(i), childB = b.child(i);\n if (childA == childB) { pos += childA.nodeSize; continue }\n\n if (!childA.sameMarkup(childB)) { return pos }\n\n if (childA.isText && childA.text != childB.text) {\n for (var j = 0; childA.text[j] == childB.text[j]; j++)\n { pos++; }\n return pos\n }\n if (childA.content.size || childB.content.size) {\n var inner = findDiffStart(childA.content, childB.content, pos + 1);\n if (inner != null) { return inner }\n }\n pos += childA.nodeSize;\n }\n}\n\nfunction findDiffEnd(a, b, posA, posB) {\n for (var iA = a.childCount, iB = b.childCount;;) {\n if (iA == 0 || iB == 0)\n { return iA == iB ? null : {a: posA, b: posB} }\n\n var childA = a.child(--iA), childB = b.child(--iB), size = childA.nodeSize;\n if (childA == childB) {\n posA -= size; posB -= size;\n continue\n }\n\n if (!childA.sameMarkup(childB)) { return {a: posA, b: posB} }\n\n if (childA.isText && childA.text != childB.text) {\n var same = 0, minSize = Math.min(childA.text.length, childB.text.length);\n while (same < minSize && childA.text[childA.text.length - same - 1] == childB.text[childB.text.length - same - 1]) {\n same++; posA--; posB--;\n }\n return {a: posA, b: posB}\n }\n if (childA.content.size || childB.content.size) {\n var inner = findDiffEnd(childA.content, childB.content, posA - 1, posB - 1);\n if (inner) { return inner }\n }\n posA -= size; posB -= size;\n }\n}\n\n// ::- A fragment represents a node's collection of child nodes.\n//\n// Like nodes, fragments are persistent data structures, and you\n// should not mutate them or their content. Rather, you create new\n// instances whenever needed. The API tries to make this easy.\nvar Fragment = function Fragment(content, size) {\n this.content = content;\n // :: number\n // The size of the fragment, which is the total of the size of its\n // content nodes.\n this.size = size || 0;\n if (size == null) { for (var i = 0; i < content.length; i++)\n { this.size += content[i].nodeSize; } }\n};\n\nvar prototypeAccessors = { firstChild: { configurable: true },lastChild: { configurable: true },childCount: { configurable: true } };\n\n// :: (number, number, (node: Node, start: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes between the given two\n// positions (relative to start of this fragment). Doesn't descend\n// into a node when the callback returns `false`.\nFragment.prototype.nodesBetween = function nodesBetween (from, to, f, nodeStart, parent) {\n if ( nodeStart === void 0 ) nodeStart = 0;\n\n for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i], end = pos + child.nodeSize;\n if (end > from && f(child, nodeStart + pos, parent, i) !== false && child.content.size) {\n var start = pos + 1;\n child.nodesBetween(Math.max(0, from - start),\n Math.min(child.content.size, to - start),\n f, nodeStart + start);\n }\n pos = end;\n }\n};\n\n// :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. The callback\n// may return `false` to prevent traversal of a given node's children.\nFragment.prototype.descendants = function descendants (f) {\n this.nodesBetween(0, this.size, f);\n};\n\n// :: (number, number, ?string, ?string) → string\n// Extract the text between `from` and `to`. See the same method on\n// [`Node`](#model.Node.textBetween).\nFragment.prototype.textBetween = function textBetween (from, to, blockSeparator, leafText) {\n var text = \"\", separated = true;\n this.nodesBetween(from, to, function (node, pos) {\n if (node.isText) {\n text += node.text.slice(Math.max(from, pos) - pos, to - pos);\n separated = !blockSeparator;\n } else if (node.isLeaf && leafText) {\n text += leafText;\n separated = !blockSeparator;\n } else if (!separated && node.isBlock) {\n text += blockSeparator;\n separated = true;\n }\n }, 0);\n return text\n};\n\n// :: (Fragment) → Fragment\n// Create a new fragment containing the combined content of this\n// fragment and the other.\nFragment.prototype.append = function append (other) {\n if (!other.size) { return this }\n if (!this.size) { return other }\n var last = this.lastChild, first = other.firstChild, content = this.content.slice(), i = 0;\n if (last.isText && last.sameMarkup(first)) {\n content[content.length - 1] = last.withText(last.text + first.text);\n i = 1;\n }\n for (; i < other.content.length; i++) { content.push(other.content[i]); }\n return new Fragment(content, this.size + other.size)\n};\n\n// :: (number, ?number) → Fragment\n// Cut out the sub-fragment between the two given positions.\nFragment.prototype.cut = function cut (from, to) {\n if (to == null) { to = this.size; }\n if (from == 0 && to == this.size) { return this }\n var result = [], size = 0;\n if (to > from) { for (var i = 0, pos = 0; pos < to; i++) {\n var child = this.content[i], end = pos + child.nodeSize;\n if (end > from) {\n if (pos < from || end > to) {\n if (child.isText)\n { child = child.cut(Math.max(0, from - pos), Math.min(child.text.length, to - pos)); }\n else\n { child = child.cut(Math.max(0, from - pos - 1), Math.min(child.content.size, to - pos - 1)); }\n }\n result.push(child);\n size += child.nodeSize;\n }\n pos = end;\n } }\n return new Fragment(result, size)\n};\n\nFragment.prototype.cutByIndex = function cutByIndex (from, to) {\n if (from == to) { return Fragment.empty }\n if (from == 0 && to == this.content.length) { return this }\n return new Fragment(this.content.slice(from, to))\n};\n\n// :: (number, Node) → Fragment\n// Create a new fragment in which the node at the given index is\n// replaced by the given node.\nFragment.prototype.replaceChild = function replaceChild (index, node) {\n var current = this.content[index];\n if (current == node) { return this }\n var copy = this.content.slice();\n var size = this.size + node.nodeSize - current.nodeSize;\n copy[index] = node;\n return new Fragment(copy, size)\n};\n\n// : (Node) → Fragment\n// Create a new fragment by prepending the given node to this\n// fragment.\nFragment.prototype.addToStart = function addToStart (node) {\n return new Fragment([node].concat(this.content), this.size + node.nodeSize)\n};\n\n// : (Node) → Fragment\n// Create a new fragment by appending the given node to this\n// fragment.\nFragment.prototype.addToEnd = function addToEnd (node) {\n return new Fragment(this.content.concat(node), this.size + node.nodeSize)\n};\n\n// :: (Fragment) → bool\n// Compare this fragment to another one.\nFragment.prototype.eq = function eq (other) {\n if (this.content.length != other.content.length) { return false }\n for (var i = 0; i < this.content.length; i++)\n { if (!this.content[i].eq(other.content[i])) { return false } }\n return true\n};\n\n// :: ?Node\n// The first child of the fragment, or `null` if it is empty.\nprototypeAccessors.firstChild.get = function () { return this.content.length ? this.content[0] : null };\n\n// :: ?Node\n// The last child of the fragment, or `null` if it is empty.\nprototypeAccessors.lastChild.get = function () { return this.content.length ? this.content[this.content.length - 1] : null };\n\n// :: number\n// The number of child nodes in this fragment.\nprototypeAccessors.childCount.get = function () { return this.content.length };\n\n// :: (number) → Node\n// Get the child node at the given index. Raise an error when the\n// index is out of range.\nFragment.prototype.child = function child (index) {\n var found = this.content[index];\n if (!found) { throw new RangeError(\"Index \" + index + \" out of range for \" + this) }\n return found\n};\n\n// :: (number) → ?Node\n// Get the child node at the given index, if it exists.\nFragment.prototype.maybeChild = function maybeChild (index) {\n return this.content[index]\n};\n\n// :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\nFragment.prototype.forEach = function forEach (f) {\n for (var i = 0, p = 0; i < this.content.length; i++) {\n var child = this.content[i];\n f(child, p, i);\n p += child.nodeSize;\n }\n};\n\n// :: (Fragment) → ?number\n// Find the first position at which this fragment and another\n// fragment differ, or `null` if they are the same.\nFragment.prototype.findDiffStart = function findDiffStart$1 (other, pos) {\n if ( pos === void 0 ) pos = 0;\n\n return findDiffStart(this, other, pos)\n};\n\n// :: (Fragment) → ?{a: number, b: number}\n// Find the first position, searching from the end, at which this\n// fragment and the given fragment differ, or `null` if they are the\n// same. Since this position will not be the same in both nodes, an\n// object with two separate positions is returned.\nFragment.prototype.findDiffEnd = function findDiffEnd$1 (other, pos, otherPos) {\n if ( pos === void 0 ) pos = this.size;\n if ( otherPos === void 0 ) otherPos = other.size;\n\n return findDiffEnd(this, other, pos, otherPos)\n};\n\n// : (number, ?number) → {index: number, offset: number}\n// Find the index and inner offset corresponding to a given relative\n// position in this fragment. The result object will be reused\n// (overwritten) the next time the function is called. (Not public.)\nFragment.prototype.findIndex = function findIndex (pos, round) {\n if ( round === void 0 ) round = -1;\n\n if (pos == 0) { return retIndex(0, pos) }\n if (pos == this.size) { return retIndex(this.content.length, pos) }\n if (pos > this.size || pos < 0) { throw new RangeError((\"Position \" + pos + \" outside of fragment (\" + (this) + \")\")) }\n for (var i = 0, curPos = 0;; i++) {\n var cur = this.child(i), end = curPos + cur.nodeSize;\n if (end >= pos) {\n if (end == pos || round > 0) { return retIndex(i + 1, end) }\n return retIndex(i, curPos)\n }\n curPos = end;\n }\n};\n\n// :: () → string\n// Return a debugging string that describes this fragment.\nFragment.prototype.toString = function toString () { return \"<\" + this.toStringInner() + \">\" };\n\nFragment.prototype.toStringInner = function toStringInner () { return this.content.join(\", \") };\n\n// :: () → ?Object\n// Create a JSON-serializeable representation of this fragment.\nFragment.prototype.toJSON = function toJSON () {\n return this.content.length ? this.content.map(function (n) { return n.toJSON(); }) : null\n};\n\n// :: (Schema, ?Object) → Fragment\n// Deserialize a fragment from its JSON representation.\nFragment.fromJSON = function fromJSON (schema, value) {\n if (!value) { return Fragment.empty }\n if (!Array.isArray(value)) { throw new RangeError(\"Invalid input for Fragment.fromJSON\") }\n return new Fragment(value.map(schema.nodeFromJSON))\n};\n\n// :: ([Node]) → Fragment\n// Build a fragment from an array of nodes. Ensures that adjacent\n// text nodes with the same marks are joined together.\nFragment.fromArray = function fromArray (array) {\n if (!array.length) { return Fragment.empty }\n var joined, size = 0;\n for (var i = 0; i < array.length; i++) {\n var node = array[i];\n size += node.nodeSize;\n if (i && node.isText && array[i - 1].sameMarkup(node)) {\n if (!joined) { joined = array.slice(0, i); }\n joined[joined.length - 1] = node.withText(joined[joined.length - 1].text + node.text);\n } else if (joined) {\n joined.push(node);\n }\n }\n return new Fragment(joined || array, size)\n};\n\n// :: (?union) → Fragment\n// Create a fragment from something that can be interpreted as a set\n// of nodes. For `null`, it returns the empty fragment. For a\n// fragment, the fragment itself. For a node or array of nodes, a\n// fragment containing those nodes.\nFragment.from = function from (nodes) {\n if (!nodes) { return Fragment.empty }\n if (nodes instanceof Fragment) { return nodes }\n if (Array.isArray(nodes)) { return this.fromArray(nodes) }\n if (nodes.attrs) { return new Fragment([nodes], nodes.nodeSize) }\n throw new RangeError(\"Can not convert \" + nodes + \" to a Fragment\" +\n (nodes.nodesBetween ? \" (looks like multiple versions of prosemirror-model were loaded)\" : \"\"))\n};\n\nObject.defineProperties( Fragment.prototype, prototypeAccessors );\n\nvar found = {index: 0, offset: 0};\nfunction retIndex(index, offset) {\n found.index = index;\n found.offset = offset;\n return found\n}\n\n// :: Fragment\n// An empty fragment. Intended to be reused whenever a node doesn't\n// contain anything (rather than allocating a new empty fragment for\n// each leaf node).\nFragment.empty = new Fragment([], 0);\n\nfunction compareDeep(a, b) {\n if (a === b) { return true }\n if (!(a && typeof a == \"object\") ||\n !(b && typeof b == \"object\")) { return false }\n var array = Array.isArray(a);\n if (Array.isArray(b) != array) { return false }\n if (array) {\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++) { if (!compareDeep(a[i], b[i])) { return false } }\n } else {\n for (var p in a) { if (!(p in b) || !compareDeep(a[p], b[p])) { return false } }\n for (var p$1 in b) { if (!(p$1 in a)) { return false } }\n }\n return true\n}\n\n// ::- A mark is a piece of information that can be attached to a node,\n// such as it being emphasized, in code font, or a link. It has a type\n// and optionally a set of attributes that provide further information\n// (such as the target of the link). Marks are created through a\n// `Schema`, which controls which types exist and which\n// attributes they have.\nvar Mark = function Mark(type, attrs) {\n // :: MarkType\n // The type of this mark.\n this.type = type;\n // :: Object\n // The attributes associated with this mark.\n this.attrs = attrs;\n};\n\n// :: ([Mark]) → [Mark]\n// Given a set of marks, create a new set which contains this one as\n// well, in the right position. If this mark is already in the set,\n// the set itself is returned. If any marks that are set to be\n// [exclusive](#model.MarkSpec.excludes) with this mark are present,\n// those are replaced by this one.\nMark.prototype.addToSet = function addToSet (set) {\n var copy, placed = false;\n for (var i = 0; i < set.length; i++) {\n var other = set[i];\n if (this.eq(other)) { return set }\n if (this.type.excludes(other.type)) {\n if (!copy) { copy = set.slice(0, i); }\n } else if (other.type.excludes(this.type)) {\n return set\n } else {\n if (!placed && other.type.rank > this.type.rank) {\n if (!copy) { copy = set.slice(0, i); }\n copy.push(this);\n placed = true;\n }\n if (copy) { copy.push(other); }\n }\n }\n if (!copy) { copy = set.slice(); }\n if (!placed) { copy.push(this); }\n return copy\n};\n\n// :: ([Mark]) → [Mark]\n// Remove this mark from the given set, returning a new set. If this\n// mark is not in the set, the set itself is returned.\nMark.prototype.removeFromSet = function removeFromSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (this.eq(set[i]))\n { return set.slice(0, i).concat(set.slice(i + 1)) } }\n return set\n};\n\n// :: ([Mark]) → bool\n// Test whether this mark is in the given set of marks.\nMark.prototype.isInSet = function isInSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (this.eq(set[i])) { return true } }\n return false\n};\n\n// :: (Mark) → bool\n// Test whether this mark has the same type and attributes as\n// another mark.\nMark.prototype.eq = function eq (other) {\n return this == other ||\n (this.type == other.type && compareDeep(this.attrs, other.attrs))\n};\n\n// :: () → Object\n// Convert this mark to a JSON-serializeable representation.\nMark.prototype.toJSON = function toJSON () {\n var obj = {type: this.type.name};\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break\n }\n return obj\n};\n\n// :: (Schema, Object) → Mark\nMark.fromJSON = function fromJSON (schema, json) {\n if (!json) { throw new RangeError(\"Invalid input for Mark.fromJSON\") }\n var type = schema.marks[json.type];\n if (!type) { throw new RangeError((\"There is no mark type \" + (json.type) + \" in this schema\")) }\n return type.create(json.attrs)\n};\n\n// :: ([Mark], [Mark]) → bool\n// Test whether two sets of marks are identical.\nMark.sameSet = function sameSet (a, b) {\n if (a == b) { return true }\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++)\n { if (!a[i].eq(b[i])) { return false } }\n return true\n};\n\n// :: (?union) → [Mark]\n// Create a properly sorted mark set from null, a single mark, or an\n// unsorted array of marks.\nMark.setFrom = function setFrom (marks) {\n if (!marks || marks.length == 0) { return Mark.none }\n if (marks instanceof Mark) { return [marks] }\n var copy = marks.slice();\n copy.sort(function (a, b) { return a.type.rank - b.type.rank; });\n return copy\n};\n\n// :: [Mark] The empty set of marks.\nMark.none = [];\n\n// ReplaceError:: class extends Error\n// Error type raised by [`Node.replace`](#model.Node.replace) when\n// given an invalid replacement.\n\nfunction ReplaceError(message) {\n var err = Error.call(this, message);\n err.__proto__ = ReplaceError.prototype;\n return err\n}\n\nReplaceError.prototype = Object.create(Error.prototype);\nReplaceError.prototype.constructor = ReplaceError;\nReplaceError.prototype.name = \"ReplaceError\";\n\n// ::- A slice represents a piece cut out of a larger document. It\n// stores not only a fragment, but also the depth up to which nodes on\n// both side are ‘open’ (cut through).\nvar Slice = function Slice(content, openStart, openEnd) {\n // :: Fragment The slice's content.\n this.content = content;\n // :: number The open depth at the start.\n this.openStart = openStart;\n // :: number The open depth at the end.\n this.openEnd = openEnd;\n};\n\nvar prototypeAccessors$1 = { size: { configurable: true } };\n\n// :: number\n// The size this slice would add when inserted into a document.\nprototypeAccessors$1.size.get = function () {\n return this.content.size - this.openStart - this.openEnd\n};\n\nSlice.prototype.insertAt = function insertAt (pos, fragment) {\n var content = insertInto(this.content, pos + this.openStart, fragment, null);\n return content && new Slice(content, this.openStart, this.openEnd)\n};\n\nSlice.prototype.removeBetween = function removeBetween (from, to) {\n return new Slice(removeRange(this.content, from + this.openStart, to + this.openStart), this.openStart, this.openEnd)\n};\n\n// :: (Slice) → bool\n// Tests whether this slice is equal to another slice.\nSlice.prototype.eq = function eq (other) {\n return this.content.eq(other.content) && this.openStart == other.openStart && this.openEnd == other.openEnd\n};\n\nSlice.prototype.toString = function toString () {\n return this.content + \"(\" + this.openStart + \",\" + this.openEnd + \")\"\n};\n\n// :: () → ?Object\n// Convert a slice to a JSON-serializable representation.\nSlice.prototype.toJSON = function toJSON () {\n if (!this.content.size) { return null }\n var json = {content: this.content.toJSON()};\n if (this.openStart > 0) { json.openStart = this.openStart; }\n if (this.openEnd > 0) { json.openEnd = this.openEnd; }\n return json\n};\n\n// :: (Schema, ?Object) → Slice\n// Deserialize a slice from its JSON representation.\nSlice.fromJSON = function fromJSON (schema, json) {\n if (!json) { return Slice.empty }\n var openStart = json.openStart || 0, openEnd = json.openEnd || 0;\n if (typeof openStart != \"number\" || typeof openEnd != \"number\")\n { throw new RangeError(\"Invalid input for Slice.fromJSON\") }\n return new Slice(Fragment.fromJSON(schema, json.content), openStart, openEnd)\n};\n\n// :: (Fragment, ?bool) → Slice\n// Create a slice from a fragment by taking the maximum possible\n// open value on both side of the fragment.\nSlice.maxOpen = function maxOpen (fragment, openIsolating) {\n if ( openIsolating === void 0 ) openIsolating=true;\n\n var openStart = 0, openEnd = 0;\n for (var n = fragment.firstChild; n && !n.isLeaf && (openIsolating || !n.type.spec.isolating); n = n.firstChild) { openStart++; }\n for (var n$1 = fragment.lastChild; n$1 && !n$1.isLeaf && (openIsolating || !n$1.type.spec.isolating); n$1 = n$1.lastChild) { openEnd++; }\n return new Slice(fragment, openStart, openEnd)\n};\n\nObject.defineProperties( Slice.prototype, prototypeAccessors$1 );\n\nfunction removeRange(content, from, to) {\n var ref = content.findIndex(from);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n var ref$1 = content.findIndex(to);\n var indexTo = ref$1.index;\n var offsetTo = ref$1.offset;\n if (offset == from || child.isText) {\n if (offsetTo != to && !content.child(indexTo).isText) { throw new RangeError(\"Removing non-flat range\") }\n return content.cut(0, from).append(content.cut(to))\n }\n if (index != indexTo) { throw new RangeError(\"Removing non-flat range\") }\n return content.replaceChild(index, child.copy(removeRange(child.content, from - offset - 1, to - offset - 1)))\n}\n\nfunction insertInto(content, dist, insert, parent) {\n var ref = content.findIndex(dist);\n var index = ref.index;\n var offset = ref.offset;\n var child = content.maybeChild(index);\n if (offset == dist || child.isText) {\n if (parent && !parent.canReplace(index, index, insert)) { return null }\n return content.cut(0, dist).append(insert).append(content.cut(dist))\n }\n var inner = insertInto(child.content, dist - offset - 1, insert);\n return inner && content.replaceChild(index, child.copy(inner))\n}\n\n// :: Slice\n// The empty slice.\nSlice.empty = new Slice(Fragment.empty, 0, 0);\n\nfunction replace($from, $to, slice) {\n if (slice.openStart > $from.depth)\n { throw new ReplaceError(\"Inserted content deeper than insertion position\") }\n if ($from.depth - slice.openStart != $to.depth - slice.openEnd)\n { throw new ReplaceError(\"Inconsistent open depths\") }\n return replaceOuter($from, $to, slice, 0)\n}\n\nfunction replaceOuter($from, $to, slice, depth) {\n var index = $from.index(depth), node = $from.node(depth);\n if (index == $to.index(depth) && depth < $from.depth - slice.openStart) {\n var inner = replaceOuter($from, $to, slice, depth + 1);\n return node.copy(node.content.replaceChild(index, inner))\n } else if (!slice.content.size) {\n return close(node, replaceTwoWay($from, $to, depth))\n } else if (!slice.openStart && !slice.openEnd && $from.depth == depth && $to.depth == depth) { // Simple, flat case\n var parent = $from.parent, content = parent.content;\n return close(parent, content.cut(0, $from.parentOffset).append(slice.content).append(content.cut($to.parentOffset)))\n } else {\n var ref = prepareSliceForReplace(slice, $from);\n var start = ref.start;\n var end = ref.end;\n return close(node, replaceThreeWay($from, start, end, $to, depth))\n }\n}\n\nfunction checkJoin(main, sub) {\n if (!sub.type.compatibleContent(main.type))\n { throw new ReplaceError(\"Cannot join \" + sub.type.name + \" onto \" + main.type.name) }\n}\n\nfunction joinable($before, $after, depth) {\n var node = $before.node(depth);\n checkJoin(node, $after.node(depth));\n return node\n}\n\nfunction addNode(child, target) {\n var last = target.length - 1;\n if (last >= 0 && child.isText && child.sameMarkup(target[last]))\n { target[last] = child.withText(target[last].text + child.text); }\n else\n { target.push(child); }\n}\n\nfunction addRange($start, $end, depth, target) {\n var node = ($end || $start).node(depth);\n var startIndex = 0, endIndex = $end ? $end.index(depth) : node.childCount;\n if ($start) {\n startIndex = $start.index(depth);\n if ($start.depth > depth) {\n startIndex++;\n } else if ($start.textOffset) {\n addNode($start.nodeAfter, target);\n startIndex++;\n }\n }\n for (var i = startIndex; i < endIndex; i++) { addNode(node.child(i), target); }\n if ($end && $end.depth == depth && $end.textOffset)\n { addNode($end.nodeBefore, target); }\n}\n\nfunction close(node, content) {\n if (!node.type.validContent(content))\n { throw new ReplaceError(\"Invalid content for node \" + node.type.name) }\n return node.copy(content)\n}\n\nfunction replaceThreeWay($from, $start, $end, $to, depth) {\n var openStart = $from.depth > depth && joinable($from, $start, depth + 1);\n var openEnd = $to.depth > depth && joinable($end, $to, depth + 1);\n\n var content = [];\n addRange(null, $from, depth, content);\n if (openStart && openEnd && $start.index(depth) == $end.index(depth)) {\n checkJoin(openStart, openEnd);\n addNode(close(openStart, replaceThreeWay($from, $start, $end, $to, depth + 1)), content);\n } else {\n if (openStart)\n { addNode(close(openStart, replaceTwoWay($from, $start, depth + 1)), content); }\n addRange($start, $end, depth, content);\n if (openEnd)\n { addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content); }\n }\n addRange($to, null, depth, content);\n return new Fragment(content)\n}\n\nfunction replaceTwoWay($from, $to, depth) {\n var content = [];\n addRange(null, $from, depth, content);\n if ($from.depth > depth) {\n var type = joinable($from, $to, depth + 1);\n addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);\n }\n addRange($to, null, depth, content);\n return new Fragment(content)\n}\n\nfunction prepareSliceForReplace(slice, $along) {\n var extra = $along.depth - slice.openStart, parent = $along.node(extra);\n var node = parent.copy(slice.content);\n for (var i = extra - 1; i >= 0; i--)\n { node = $along.node(i).copy(Fragment.from(node)); }\n return {start: node.resolveNoCache(slice.openStart + extra),\n end: node.resolveNoCache(node.content.size - slice.openEnd - extra)}\n}\n\n// ::- You can [_resolve_](#model.Node.resolve) a position to get more\n// information about it. Objects of this class represent such a\n// resolved position, providing various pieces of context information,\n// and some helper methods.\n//\n// Throughout this interface, methods that take an optional `depth`\n// parameter will interpret undefined as `this.depth` and negative\n// numbers as `this.depth + value`.\nvar ResolvedPos = function ResolvedPos(pos, path, parentOffset) {\n // :: number The position that was resolved.\n this.pos = pos;\n this.path = path;\n // :: number\n // The number of levels the parent node is from the root. If this\n // position points directly into the root node, it is 0. If it\n // points into a top-level paragraph, 1, and so on.\n this.depth = path.length / 3 - 1;\n // :: number The offset this position has into its parent node.\n this.parentOffset = parentOffset;\n};\n\nvar prototypeAccessors$2 = { parent: { configurable: true },doc: { configurable: true },textOffset: { configurable: true },nodeAfter: { configurable: true },nodeBefore: { configurable: true } };\n\nResolvedPos.prototype.resolveDepth = function resolveDepth (val) {\n if (val == null) { return this.depth }\n if (val < 0) { return this.depth + val }\n return val\n};\n\n// :: Node\n// The parent node that the position points into. Note that even if\n// a position points into a text node, that node is not considered\n// the parent—text nodes are ‘flat’ in this model, and have no content.\nprototypeAccessors$2.parent.get = function () { return this.node(this.depth) };\n\n// :: Node\n// The root node in which the position was resolved.\nprototypeAccessors$2.doc.get = function () { return this.node(0) };\n\n// :: (?number) → Node\n// The ancestor node at the given level. `p.node(p.depth)` is the\n// same as `p.parent`.\nResolvedPos.prototype.node = function node (depth) { return this.path[this.resolveDepth(depth) * 3] };\n\n// :: (?number) → number\n// The index into the ancestor at the given level. If this points at\n// the 3rd node in the 2nd paragraph on the top level, for example,\n// `p.index(0)` is 1 and `p.index(1)` is 2.\nResolvedPos.prototype.index = function index (depth) { return this.path[this.resolveDepth(depth) * 3 + 1] };\n\n// :: (?number) → number\n// The index pointing after this position into the ancestor at the\n// given level.\nResolvedPos.prototype.indexAfter = function indexAfter (depth) {\n depth = this.resolveDepth(depth);\n return this.index(depth) + (depth == this.depth && !this.textOffset ? 0 : 1)\n};\n\n// :: (?number) → number\n// The (absolute) position at the start of the node at the given\n// level.\nResolvedPos.prototype.start = function start (depth) {\n depth = this.resolveDepth(depth);\n return depth == 0 ? 0 : this.path[depth * 3 - 1] + 1\n};\n\n// :: (?number) → number\n// The (absolute) position at the end of the node at the given\n// level.\nResolvedPos.prototype.end = function end (depth) {\n depth = this.resolveDepth(depth);\n return this.start(depth) + this.node(depth).content.size\n};\n\n// :: (?number) → number\n// The (absolute) position directly before the wrapping node at the\n// given level, or, when `depth` is `this.depth + 1`, the original\n// position.\nResolvedPos.prototype.before = function before (depth) {\n depth = this.resolveDepth(depth);\n if (!depth) { throw new RangeError(\"There is no position before the top-level node\") }\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1]\n};\n\n// :: (?number) → number\n// The (absolute) position directly after the wrapping node at the\n// given level, or the original position when `depth` is `this.depth + 1`.\nResolvedPos.prototype.after = function after (depth) {\n depth = this.resolveDepth(depth);\n if (!depth) { throw new RangeError(\"There is no position after the top-level node\") }\n return depth == this.depth + 1 ? this.pos : this.path[depth * 3 - 1] + this.path[depth * 3].nodeSize\n};\n\n// :: number\n// When this position points into a text node, this returns the\n// distance between the position and the start of the text node.\n// Will be zero for positions that point between nodes.\nprototypeAccessors$2.textOffset.get = function () { return this.pos - this.path[this.path.length - 1] };\n\n// :: ?Node\n// Get the node directly after the position, if any. If the position\n// points into a text node, only the part of that node after the\n// position is returned.\nprototypeAccessors$2.nodeAfter.get = function () {\n var parent = this.parent, index = this.index(this.depth);\n if (index == parent.childCount) { return null }\n var dOff = this.pos - this.path[this.path.length - 1], child = parent.child(index);\n return dOff ? parent.child(index).cut(dOff) : child\n};\n\n// :: ?Node\n// Get the node directly before the position, if any. If the\n// position points into a text node, only the part of that node\n// before the position is returned.\nprototypeAccessors$2.nodeBefore.get = function () {\n var index = this.index(this.depth);\n var dOff = this.pos - this.path[this.path.length - 1];\n if (dOff) { return this.parent.child(index).cut(0, dOff) }\n return index == 0 ? null : this.parent.child(index - 1)\n};\n\n// :: (number, ?number) → number\n// Get the position at the given index in the parent node at the\n// given depth (which defaults to `this.depth`).\nResolvedPos.prototype.posAtIndex = function posAtIndex (index, depth) {\n depth = this.resolveDepth(depth);\n var node = this.path[depth * 3], pos = depth == 0 ? 0 : this.path[depth * 3 - 1] + 1;\n for (var i = 0; i < index; i++) { pos += node.child(i).nodeSize; }\n return pos\n};\n\n// :: () → [Mark]\n// Get the marks at this position, factoring in the surrounding\n// marks' [`inclusive`](#model.MarkSpec.inclusive) property. If the\n// position is at the start of a non-empty node, the marks of the\n// node after it (if any) are returned.\nResolvedPos.prototype.marks = function marks () {\n var parent = this.parent, index = this.index();\n\n // In an empty parent, return the empty array\n if (parent.content.size == 0) { return Mark.none }\n\n // When inside a text node, just return the text node's marks\n if (this.textOffset) { return parent.child(index).marks }\n\n var main = parent.maybeChild(index - 1), other = parent.maybeChild(index);\n // If the `after` flag is true of there is no node before, make\n // the node after this position the main reference.\n if (!main) { var tmp = main; main = other; other = tmp; }\n\n // Use all marks in the main node, except those that have\n // `inclusive` set to false and are not present in the other node.\n var marks = main.marks;\n for (var i = 0; i < marks.length; i++)\n { if (marks[i].type.spec.inclusive === false && (!other || !marks[i].isInSet(other.marks)))\n { marks = marks[i--].removeFromSet(marks); } }\n\n return marks\n};\n\n// :: (ResolvedPos) → ?[Mark]\n// Get the marks after the current position, if any, except those\n// that are non-inclusive and not present at position `$end`. This\n// is mostly useful for getting the set of marks to preserve after a\n// deletion. Will return `null` if this position is at the end of\n// its parent node or its parent node isn't a textblock (in which\n// case no marks should be preserved).\nResolvedPos.prototype.marksAcross = function marksAcross ($end) {\n var after = this.parent.maybeChild(this.index());\n if (!after || !after.isInline) { return null }\n\n var marks = after.marks, next = $end.parent.maybeChild($end.index());\n for (var i = 0; i < marks.length; i++)\n { if (marks[i].type.spec.inclusive === false && (!next || !marks[i].isInSet(next.marks)))\n { marks = marks[i--].removeFromSet(marks); } }\n return marks\n};\n\n// :: (number) → number\n// The depth up to which this position and the given (non-resolved)\n// position share the same parent nodes.\nResolvedPos.prototype.sharedDepth = function sharedDepth (pos) {\n for (var depth = this.depth; depth > 0; depth--)\n { if (this.start(depth) <= pos && this.end(depth) >= pos) { return depth } }\n return 0\n};\n\n// :: (?ResolvedPos, ?(Node) → bool) → ?NodeRange\n// Returns a range based on the place where this position and the\n// given position diverge around block content. If both point into\n// the same textblock, for example, a range around that textblock\n// will be returned. If they point into different blocks, the range\n// around those blocks in their shared ancestor is returned. You can\n// pass in an optional predicate that will be called with a parent\n// node to see if a range into that parent is acceptable.\nResolvedPos.prototype.blockRange = function blockRange (other, pred) {\n if ( other === void 0 ) other = this;\n\n if (other.pos < this.pos) { return other.blockRange(this) }\n for (var d = this.depth - (this.parent.inlineContent || this.pos == other.pos ? 1 : 0); d >= 0; d--)\n { if (other.pos <= this.end(d) && (!pred || pred(this.node(d))))\n { return new NodeRange(this, other, d) } }\n};\n\n// :: (ResolvedPos) → bool\n// Query whether the given position shares the same parent node.\nResolvedPos.prototype.sameParent = function sameParent (other) {\n return this.pos - this.parentOffset == other.pos - other.parentOffset\n};\n\n// :: (ResolvedPos) → ResolvedPos\n// Return the greater of this and the given position.\nResolvedPos.prototype.max = function max (other) {\n return other.pos > this.pos ? other : this\n};\n\n// :: (ResolvedPos) → ResolvedPos\n// Return the smaller of this and the given position.\nResolvedPos.prototype.min = function min (other) {\n return other.pos < this.pos ? other : this\n};\n\nResolvedPos.prototype.toString = function toString () {\n var str = \"\";\n for (var i = 1; i <= this.depth; i++)\n { str += (str ? \"/\" : \"\") + this.node(i).type.name + \"_\" + this.index(i - 1); }\n return str + \":\" + this.parentOffset\n};\n\nResolvedPos.resolve = function resolve (doc, pos) {\n if (!(pos >= 0 && pos <= doc.content.size)) { throw new RangeError(\"Position \" + pos + \" out of range\") }\n var path = [];\n var start = 0, parentOffset = pos;\n for (var node = doc;;) {\n var ref = node.content.findIndex(parentOffset);\n var index = ref.index;\n var offset = ref.offset;\n var rem = parentOffset - offset;\n path.push(node, index, start + offset);\n if (!rem) { break }\n node = node.child(index);\n if (node.isText) { break }\n parentOffset = rem - 1;\n start += offset + 1;\n }\n return new ResolvedPos(pos, path, parentOffset)\n};\n\nResolvedPos.resolveCached = function resolveCached (doc, pos) {\n for (var i = 0; i < resolveCache.length; i++) {\n var cached = resolveCache[i];\n if (cached.pos == pos && cached.doc == doc) { return cached }\n }\n var result = resolveCache[resolveCachePos] = ResolvedPos.resolve(doc, pos);\n resolveCachePos = (resolveCachePos + 1) % resolveCacheSize;\n return result\n};\n\nObject.defineProperties( ResolvedPos.prototype, prototypeAccessors$2 );\n\nvar resolveCache = [], resolveCachePos = 0, resolveCacheSize = 12;\n\n// ::- Represents a flat range of content, i.e. one that starts and\n// ends in the same node.\nvar NodeRange = function NodeRange($from, $to, depth) {\n // :: ResolvedPos A resolved position along the start of the\n // content. May have a `depth` greater than this object's `depth`\n // property, since these are the positions that were used to\n // compute the range, not re-resolved positions directly at its\n // boundaries.\n this.$from = $from;\n // :: ResolvedPos A position along the end of the content. See\n // caveat for [`$from`](#model.NodeRange.$from).\n this.$to = $to;\n // :: number The depth of the node that this range points into.\n this.depth = depth;\n};\n\nvar prototypeAccessors$1$1 = { start: { configurable: true },end: { configurable: true },parent: { configurable: true },startIndex: { configurable: true },endIndex: { configurable: true } };\n\n// :: number The position at the start of the range.\nprototypeAccessors$1$1.start.get = function () { return this.$from.before(this.depth + 1) };\n// :: number The position at the end of the range.\nprototypeAccessors$1$1.end.get = function () { return this.$to.after(this.depth + 1) };\n\n// :: Node The parent node that the range points into.\nprototypeAccessors$1$1.parent.get = function () { return this.$from.node(this.depth) };\n// :: number The start index of the range in the parent node.\nprototypeAccessors$1$1.startIndex.get = function () { return this.$from.index(this.depth) };\n// :: number The end index of the range in the parent node.\nprototypeAccessors$1$1.endIndex.get = function () { return this.$to.indexAfter(this.depth) };\n\nObject.defineProperties( NodeRange.prototype, prototypeAccessors$1$1 );\n\nvar emptyAttrs = Object.create(null);\n\n// ::- This class represents a node in the tree that makes up a\n// ProseMirror document. So a document is an instance of `Node`, with\n// children that are also instances of `Node`.\n//\n// Nodes are persistent data structures. Instead of changing them, you\n// create new ones with the content you want. Old ones keep pointing\n// at the old document shape. This is made cheaper by sharing\n// structure between the old and new data as much as possible, which a\n// tree shape like this (without back pointers) makes easy.\n//\n// **Do not** directly mutate the properties of a `Node` object. See\n// [the guide](/docs/guide/#doc) for more information.\nvar Node = function Node(type, attrs, content, marks) {\n // :: NodeType\n // The type of node that this is.\n this.type = type;\n\n // :: Object\n // An object mapping attribute names to values. The kind of\n // attributes allowed and required are\n // [determined](#model.NodeSpec.attrs) by the node type.\n this.attrs = attrs;\n\n // :: Fragment\n // A container holding the node's children.\n this.content = content || Fragment.empty;\n\n // :: [Mark]\n // The marks (things like whether it is emphasized or part of a\n // link) applied to this node.\n this.marks = marks || Mark.none;\n};\n\nvar prototypeAccessors$3 = { nodeSize: { configurable: true },childCount: { configurable: true },textContent: { configurable: true },firstChild: { configurable: true },lastChild: { configurable: true },isBlock: { configurable: true },isTextblock: { configurable: true },inlineContent: { configurable: true },isInline: { configurable: true },isText: { configurable: true },isLeaf: { configurable: true },isAtom: { configurable: true } };\n\n// text:: ?string\n// For text nodes, this contains the node's text content.\n\n// :: number\n// The size of this node, as defined by the integer-based [indexing\n// scheme](/docs/guide/#doc.indexing). For text nodes, this is the\n// amount of characters. For other leaf nodes, it is one. For\n// non-leaf nodes, it is the size of the content plus two (the start\n// and end token).\nprototypeAccessors$3.nodeSize.get = function () { return this.isLeaf ? 1 : 2 + this.content.size };\n\n// :: number\n// The number of children that the node has.\nprototypeAccessors$3.childCount.get = function () { return this.content.childCount };\n\n// :: (number) → Node\n// Get the child node at the given index. Raises an error when the\n// index is out of range.\nNode.prototype.child = function child (index) { return this.content.child(index) };\n\n// :: (number) → ?Node\n// Get the child node at the given index, if it exists.\nNode.prototype.maybeChild = function maybeChild (index) { return this.content.maybeChild(index) };\n\n// :: ((node: Node, offset: number, index: number))\n// Call `f` for every child node, passing the node, its offset\n// into this parent node, and its index.\nNode.prototype.forEach = function forEach (f) { this.content.forEach(f); };\n\n// :: (number, number, (node: Node, pos: number, parent: Node, index: number) → ?bool, ?number)\n// Invoke a callback for all descendant nodes recursively between\n// the given two positions that are relative to start of this node's\n// content. The callback is invoked with the node, its\n// parent-relative position, its parent node, and its child index.\n// When the callback returns false for a given node, that node's\n// children will not be recursed over. The last parameter can be\n// used to specify a starting position to count from.\nNode.prototype.nodesBetween = function nodesBetween (from, to, f, startPos) {\n if ( startPos === void 0 ) startPos = 0;\n\n this.content.nodesBetween(from, to, f, startPos, this);\n};\n\n// :: ((node: Node, pos: number, parent: Node) → ?bool)\n// Call the given callback for every descendant node. Doesn't\n// descend into a node when the callback returns `false`.\nNode.prototype.descendants = function descendants (f) {\n this.nodesBetween(0, this.content.size, f);\n};\n\n// :: string\n// Concatenates all the text nodes found in this fragment and its\n// children.\nprototypeAccessors$3.textContent.get = function () { return this.textBetween(0, this.content.size, \"\") };\n\n// :: (number, number, ?string, ?string) → string\n// Get all text between positions `from` and `to`. When\n// `blockSeparator` is given, it will be inserted whenever a new\n// block node is started. When `leafText` is given, it'll be\n// inserted for every non-text leaf node encountered.\nNode.prototype.textBetween = function textBetween (from, to, blockSeparator, leafText) {\n return this.content.textBetween(from, to, blockSeparator, leafText)\n};\n\n// :: ?Node\n// Returns this node's first child, or `null` if there are no\n// children.\nprototypeAccessors$3.firstChild.get = function () { return this.content.firstChild };\n\n// :: ?Node\n// Returns this node's last child, or `null` if there are no\n// children.\nprototypeAccessors$3.lastChild.get = function () { return this.content.lastChild };\n\n// :: (Node) → bool\n// Test whether two nodes represent the same piece of document.\nNode.prototype.eq = function eq (other) {\n return this == other || (this.sameMarkup(other) && this.content.eq(other.content))\n};\n\n// :: (Node) → bool\n// Compare the markup (type, attributes, and marks) of this node to\n// those of another. Returns `true` if both have the same markup.\nNode.prototype.sameMarkup = function sameMarkup (other) {\n return this.hasMarkup(other.type, other.attrs, other.marks)\n};\n\n// :: (NodeType, ?Object, ?[Mark]) → bool\n// Check whether this node's markup correspond to the given type,\n// attributes, and marks.\nNode.prototype.hasMarkup = function hasMarkup (type, attrs, marks) {\n return this.type == type &&\n compareDeep(this.attrs, attrs || type.defaultAttrs || emptyAttrs) &&\n Mark.sameSet(this.marks, marks || Mark.none)\n};\n\n// :: (?Fragment) → Node\n// Create a new node with the same markup as this node, containing\n// the given content (or empty, if no content is given).\nNode.prototype.copy = function copy (content) {\n if ( content === void 0 ) content = null;\n\n if (content == this.content) { return this }\n return new this.constructor(this.type, this.attrs, content, this.marks)\n};\n\n// :: ([Mark]) → Node\n// Create a copy of this node, with the given set of marks instead\n// of the node's own marks.\nNode.prototype.mark = function mark (marks) {\n return marks == this.marks ? this : new this.constructor(this.type, this.attrs, this.content, marks)\n};\n\n// :: (number, ?number) → Node\n// Create a copy of this node with only the content between the\n// given positions. If `to` is not given, it defaults to the end of\n// the node.\nNode.prototype.cut = function cut (from, to) {\n if (from == 0 && to == this.content.size) { return this }\n return this.copy(this.content.cut(from, to))\n};\n\n// :: (number, ?number) → Slice\n// Cut out the part of the document between the given positions, and\n// return it as a `Slice` object.\nNode.prototype.slice = function slice (from, to, includeParents) {\n if ( to === void 0 ) to = this.content.size;\n if ( includeParents === void 0 ) includeParents = false;\n\n if (from == to) { return Slice.empty }\n\n var $from = this.resolve(from), $to = this.resolve(to);\n var depth = includeParents ? 0 : $from.sharedDepth(to);\n var start = $from.start(depth), node = $from.node(depth);\n var content = node.content.cut($from.pos - start, $to.pos - start);\n return new Slice(content, $from.depth - depth, $to.depth - depth)\n};\n\n// :: (number, number, Slice) → Node\n// Replace the part of the document between the given positions with\n// the given slice. The slice must 'fit', meaning its open sides\n// must be able to connect to the surrounding content, and its\n// content nodes must be valid children for the node they are placed\n// into. If any of this is violated, an error of type\n// [`ReplaceError`](#model.ReplaceError) is thrown.\nNode.prototype.replace = function replace$1 (from, to, slice) {\n return replace(this.resolve(from), this.resolve(to), slice)\n};\n\n// :: (number) → ?Node\n// Find the node directly after the given position.\nNode.prototype.nodeAt = function nodeAt (pos) {\n for (var node = this;;) {\n var ref = node.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n node = node.maybeChild(index);\n if (!node) { return null }\n if (offset == pos || node.isText) { return node }\n pos -= offset + 1;\n }\n};\n\n// :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node after the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\nNode.prototype.childAfter = function childAfter (pos) {\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n return {node: this.content.maybeChild(index), index: index, offset: offset}\n};\n\n// :: (number) → {node: ?Node, index: number, offset: number}\n// Find the (direct) child node before the given offset, if any,\n// and return it along with its index and offset relative to this\n// node.\nNode.prototype.childBefore = function childBefore (pos) {\n if (pos == 0) { return {node: null, index: 0, offset: 0} }\n var ref = this.content.findIndex(pos);\n var index = ref.index;\n var offset = ref.offset;\n if (offset < pos) { return {node: this.content.child(index), index: index, offset: offset} }\n var node = this.content.child(index - 1);\n return {node: node, index: index - 1, offset: offset - node.nodeSize}\n};\n\n// :: (number) → ResolvedPos\n// Resolve the given position in the document, returning an\n// [object](#model.ResolvedPos) with information about its context.\nNode.prototype.resolve = function resolve (pos) { return ResolvedPos.resolveCached(this, pos) };\n\nNode.prototype.resolveNoCache = function resolveNoCache (pos) { return ResolvedPos.resolve(this, pos) };\n\n// :: (number, number, union) → bool\n// Test whether a given mark or mark type occurs in this document\n// between the two given positions.\nNode.prototype.rangeHasMark = function rangeHasMark (from, to, type) {\n var found = false;\n if (to > from) { this.nodesBetween(from, to, function (node) {\n if (type.isInSet(node.marks)) { found = true; }\n return !found\n }); }\n return found\n};\n\n// :: bool\n// True when this is a block (non-inline node)\nprototypeAccessors$3.isBlock.get = function () { return this.type.isBlock };\n\n// :: bool\n// True when this is a textblock node, a block node with inline\n// content.\nprototypeAccessors$3.isTextblock.get = function () { return this.type.isTextblock };\n\n// :: bool\n// True when this node allows inline content.\nprototypeAccessors$3.inlineContent.get = function () { return this.type.inlineContent };\n\n// :: bool\n// True when this is an inline node (a text node or a node that can\n// appear among text).\nprototypeAccessors$3.isInline.get = function () { return this.type.isInline };\n\n// :: bool\n// True when this is a text node.\nprototypeAccessors$3.isText.get = function () { return this.type.isText };\n\n// :: bool\n// True when this is a leaf node.\nprototypeAccessors$3.isLeaf.get = function () { return this.type.isLeaf };\n\n// :: bool\n// True when this is an atom, i.e. when it does not have directly\n// editable content. This is usually the same as `isLeaf`, but can\n// be configured with the [`atom` property](#model.NodeSpec.atom) on\n// a node's spec (typically used when the node is displayed as an\n// uneditable [node view](#view.NodeView)).\nprototypeAccessors$3.isAtom.get = function () { return this.type.isAtom };\n\n// :: () → string\n// Return a string representation of this node for debugging\n// purposes.\nNode.prototype.toString = function toString () {\n if (this.type.spec.toDebugString) { return this.type.spec.toDebugString(this) }\n var name = this.type.name;\n if (this.content.size)\n { name += \"(\" + this.content.toStringInner() + \")\"; }\n return wrapMarks(this.marks, name)\n};\n\n// :: (number) → ContentMatch\n// Get the content match in this node at the given index.\nNode.prototype.contentMatchAt = function contentMatchAt (index) {\n var match = this.type.contentMatch.matchFragment(this.content, 0, index);\n if (!match) { throw new Error(\"Called contentMatchAt on a node with invalid content\") }\n return match\n};\n\n// :: (number, number, ?Fragment, ?number, ?number) → bool\n// Test whether replacing the range between `from` and `to` (by\n// child index) with the given replacement fragment (which defaults\n// to the empty fragment) would leave the node's content valid. You\n// can optionally pass `start` and `end` indices into the\n// replacement fragment.\nNode.prototype.canReplace = function canReplace (from, to, replacement, start, end) {\n if ( replacement === void 0 ) replacement = Fragment.empty;\n if ( start === void 0 ) start = 0;\n if ( end === void 0 ) end = replacement.childCount;\n\n var one = this.contentMatchAt(from).matchFragment(replacement, start, end);\n var two = one && one.matchFragment(this.content, to);\n if (!two || !two.validEnd) { return false }\n for (var i = start; i < end; i++) { if (!this.type.allowsMarks(replacement.child(i).marks)) { return false } }\n return true\n};\n\n// :: (number, number, NodeType, ?[Mark]) → bool\n// Test whether replacing the range `from` to `to` (by index) with a\n// node of the given type would leave the node's content valid.\nNode.prototype.canReplaceWith = function canReplaceWith (from, to, type, marks) {\n if (marks && !this.type.allowsMarks(marks)) { return false }\n var start = this.contentMatchAt(from).matchType(type);\n var end = start && start.matchFragment(this.content, to);\n return end ? end.validEnd : false\n};\n\n// :: (Node) → bool\n// Test whether the given node's content could be appended to this\n// node. If that node is empty, this will only return true if there\n// is at least one node type that can appear in both nodes (to avoid\n// merging completely incompatible nodes).\nNode.prototype.canAppend = function canAppend (other) {\n if (other.content.size) { return this.canReplace(this.childCount, this.childCount, other.content) }\n else { return this.type.compatibleContent(other.type) }\n};\n\n// :: ()\n// Check whether this node and its descendants conform to the\n// schema, and raise error when they do not.\nNode.prototype.check = function check () {\n if (!this.type.validContent(this.content))\n { throw new RangeError((\"Invalid content for node \" + (this.type.name) + \": \" + (this.content.toString().slice(0, 50)))) }\n var copy = Mark.none;\n for (var i = 0; i < this.marks.length; i++) { copy = this.marks[i].addToSet(copy); }\n if (!Mark.sameSet(copy, this.marks))\n { throw new RangeError((\"Invalid collection of marks for node \" + (this.type.name) + \": \" + (this.marks.map(function (m) { return m.type.name; })))) }\n this.content.forEach(function (node) { return node.check(); });\n};\n\n// :: () → Object\n// Return a JSON-serializeable representation of this node.\nNode.prototype.toJSON = function toJSON () {\n var obj = {type: this.type.name};\n for (var _ in this.attrs) {\n obj.attrs = this.attrs;\n break\n }\n if (this.content.size)\n { obj.content = this.content.toJSON(); }\n if (this.marks.length)\n { obj.marks = this.marks.map(function (n) { return n.toJSON(); }); }\n return obj\n};\n\n// :: (Schema, Object) → Node\n// Deserialize a node from its JSON representation.\nNode.fromJSON = function fromJSON (schema, json) {\n if (!json) { throw new RangeError(\"Invalid input for Node.fromJSON\") }\n var marks = null;\n if (json.marks) {\n if (!Array.isArray(json.marks)) { throw new RangeError(\"Invalid mark data for Node.fromJSON\") }\n marks = json.marks.map(schema.markFromJSON);\n }\n if (json.type == \"text\") {\n if (typeof json.text != \"string\") { throw new RangeError(\"Invalid text node in JSON\") }\n return schema.text(json.text, marks)\n }\n var content = Fragment.fromJSON(schema, json.content);\n return schema.nodeType(json.type).create(json.attrs, content, marks)\n};\n\nObject.defineProperties( Node.prototype, prototypeAccessors$3 );\n\nvar TextNode = /*@__PURE__*/(function (Node) {\n function TextNode(type, attrs, content, marks) {\n Node.call(this, type, attrs, null, marks);\n\n if (!content) { throw new RangeError(\"Empty text nodes are not allowed\") }\n\n this.text = content;\n }\n\n if ( Node ) TextNode.__proto__ = Node;\n TextNode.prototype = Object.create( Node && Node.prototype );\n TextNode.prototype.constructor = TextNode;\n\n var prototypeAccessors$1 = { textContent: { configurable: true },nodeSize: { configurable: true } };\n\n TextNode.prototype.toString = function toString () {\n if (this.type.spec.toDebugString) { return this.type.spec.toDebugString(this) }\n return wrapMarks(this.marks, JSON.stringify(this.text))\n };\n\n prototypeAccessors$1.textContent.get = function () { return this.text };\n\n TextNode.prototype.textBetween = function textBetween (from, to) { return this.text.slice(from, to) };\n\n prototypeAccessors$1.nodeSize.get = function () { return this.text.length };\n\n TextNode.prototype.mark = function mark (marks) {\n return marks == this.marks ? this : new TextNode(this.type, this.attrs, this.text, marks)\n };\n\n TextNode.prototype.withText = function withText (text) {\n if (text == this.text) { return this }\n return new TextNode(this.type, this.attrs, text, this.marks)\n };\n\n TextNode.prototype.cut = function cut (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.text.length;\n\n if (from == 0 && to == this.text.length) { return this }\n return this.withText(this.text.slice(from, to))\n };\n\n TextNode.prototype.eq = function eq (other) {\n return this.sameMarkup(other) && this.text == other.text\n };\n\n TextNode.prototype.toJSON = function toJSON () {\n var base = Node.prototype.toJSON.call(this);\n base.text = this.text;\n return base\n };\n\n Object.defineProperties( TextNode.prototype, prototypeAccessors$1 );\n\n return TextNode;\n}(Node));\n\nfunction wrapMarks(marks, str) {\n for (var i = marks.length - 1; i >= 0; i--)\n { str = marks[i].type.name + \"(\" + str + \")\"; }\n return str\n}\n\n// ::- Instances of this class represent a match state of a node\n// type's [content expression](#model.NodeSpec.content), and can be\n// used to find out whether further content matches here, and whether\n// a given position is a valid end of the node.\nvar ContentMatch = function ContentMatch(validEnd) {\n // :: bool\n // True when this match state represents a valid end of the node.\n this.validEnd = validEnd;\n this.next = [];\n this.wrapCache = [];\n};\n\nvar prototypeAccessors$4 = { inlineContent: { configurable: true },defaultType: { configurable: true },edgeCount: { configurable: true } };\n\nContentMatch.parse = function parse (string, nodeTypes) {\n var stream = new TokenStream(string, nodeTypes);\n if (stream.next == null) { return ContentMatch.empty }\n var expr = parseExpr(stream);\n if (stream.next) { stream.err(\"Unexpected trailing text\"); }\n var match = dfa(nfa(expr));\n checkForDeadEnds(match, stream);\n return match\n};\n\n// :: (NodeType) → ?ContentMatch\n// Match a node type, returning a match after that node if\n// successful.\nContentMatch.prototype.matchType = function matchType (type) {\n for (var i = 0; i < this.next.length; i += 2)\n { if (this.next[i] == type) { return this.next[i + 1] } }\n return null\n};\n\n// :: (Fragment, ?number, ?number) → ?ContentMatch\n// Try to match a fragment. Returns the resulting match when\n// successful.\nContentMatch.prototype.matchFragment = function matchFragment (frag, start, end) {\n if ( start === void 0 ) start = 0;\n if ( end === void 0 ) end = frag.childCount;\n\n var cur = this;\n for (var i = start; cur && i < end; i++)\n { cur = cur.matchType(frag.child(i).type); }\n return cur\n};\n\nprototypeAccessors$4.inlineContent.get = function () {\n var first = this.next[0];\n return first ? first.isInline : false\n};\n\n// :: ?NodeType\n// Get the first matching node type at this match position that can\n// be generated.\nprototypeAccessors$4.defaultType.get = function () {\n for (var i = 0; i < this.next.length; i += 2) {\n var type = this.next[i];\n if (!(type.isText || type.hasRequiredAttrs())) { return type }\n }\n};\n\nContentMatch.prototype.compatible = function compatible (other) {\n for (var i = 0; i < this.next.length; i += 2)\n { for (var j = 0; j < other.next.length; j += 2)\n { if (this.next[i] == other.next[j]) { return true } } }\n return false\n};\n\n// :: (Fragment, bool, ?number) → ?Fragment\n// Try to match the given fragment, and if that fails, see if it can\n// be made to match by inserting nodes in front of it. When\n// successful, return a fragment of inserted nodes (which may be\n// empty if nothing had to be inserted). When `toEnd` is true, only\n// return a fragment if the resulting match goes to the end of the\n// content expression.\nContentMatch.prototype.fillBefore = function fillBefore (after, toEnd, startIndex) {\n if ( toEnd === void 0 ) toEnd = false;\n if ( startIndex === void 0 ) startIndex = 0;\n\n var seen = [this];\n function search(match, types) {\n var finished = match.matchFragment(after, startIndex);\n if (finished && (!toEnd || finished.validEnd))\n { return Fragment.from(types.map(function (tp) { return tp.createAndFill(); })) }\n\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i], next = match.next[i + 1];\n if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {\n seen.push(next);\n var found = search(next, types.concat(type));\n if (found) { return found }\n }\n }\n }\n\n return search(this, [])\n};\n\n// :: (NodeType) → ?[NodeType]\n// Find a set of wrapping node types that would allow a node of the\n// given type to appear at this position. The result may be empty\n// (when it fits directly) and will be null when no such wrapping\n// exists.\nContentMatch.prototype.findWrapping = function findWrapping (target) {\n for (var i = 0; i < this.wrapCache.length; i += 2)\n { if (this.wrapCache[i] == target) { return this.wrapCache[i + 1] } }\n var computed = this.computeWrapping(target);\n this.wrapCache.push(target, computed);\n return computed\n};\n\nContentMatch.prototype.computeWrapping = function computeWrapping (target) {\n var seen = Object.create(null), active = [{match: this, type: null, via: null}];\n while (active.length) {\n var current = active.shift(), match = current.match;\n if (match.matchType(target)) {\n var result = [];\n for (var obj = current; obj.type; obj = obj.via)\n { result.push(obj.type); }\n return result.reverse()\n }\n for (var i = 0; i < match.next.length; i += 2) {\n var type = match.next[i];\n if (!type.isLeaf && !type.hasRequiredAttrs() && !(type.name in seen) && (!current.type || match.next[i + 1].validEnd)) {\n active.push({match: type.contentMatch, type: type, via: current});\n seen[type.name] = true;\n }\n }\n }\n};\n\n// :: number\n// The number of outgoing edges this node has in the finite\n// automaton that describes the content expression.\nprototypeAccessors$4.edgeCount.get = function () {\n return this.next.length >> 1\n};\n\n// :: (number) → {type: NodeType, next: ContentMatch}\n// Get the _n_​th outgoing edge from this node in the finite\n// automaton that describes the content expression.\nContentMatch.prototype.edge = function edge (n) {\n var i = n << 1;\n if (i >= this.next.length) { throw new RangeError((\"There's no \" + n + \"th edge in this content match\")) }\n return {type: this.next[i], next: this.next[i + 1]}\n};\n\nContentMatch.prototype.toString = function toString () {\n var seen = [];\n function scan(m) {\n seen.push(m);\n for (var i = 1; i < m.next.length; i += 2)\n { if (seen.indexOf(m.next[i]) == -1) { scan(m.next[i]); } }\n }\n scan(this);\n return seen.map(function (m, i) {\n var out = i + (m.validEnd ? \"*\" : \" \") + \" \";\n for (var i$1 = 0; i$1 < m.next.length; i$1 += 2)\n { out += (i$1 ? \", \" : \"\") + m.next[i$1].name + \"->\" + seen.indexOf(m.next[i$1 + 1]); }\n return out\n }).join(\"\\n\")\n};\n\nObject.defineProperties( ContentMatch.prototype, prototypeAccessors$4 );\n\nContentMatch.empty = new ContentMatch(true);\n\nvar TokenStream = function TokenStream(string, nodeTypes) {\n this.string = string;\n this.nodeTypes = nodeTypes;\n this.inline = null;\n this.pos = 0;\n this.tokens = string.split(/\\s*(?=\\b|\\W|$)/);\n if (this.tokens[this.tokens.length - 1] == \"\") { this.tokens.pop(); }\n if (this.tokens[0] == \"\") { this.tokens.shift(); }\n};\n\nvar prototypeAccessors$1$2 = { next: { configurable: true } };\n\nprototypeAccessors$1$2.next.get = function () { return this.tokens[this.pos] };\n\nTokenStream.prototype.eat = function eat (tok) { return this.next == tok && (this.pos++ || true) };\n\nTokenStream.prototype.err = function err (str) { throw new SyntaxError(str + \" (in content expression '\" + this.string + \"')\") };\n\nObject.defineProperties( TokenStream.prototype, prototypeAccessors$1$2 );\n\nfunction parseExpr(stream) {\n var exprs = [];\n do { exprs.push(parseExprSeq(stream)); }\n while (stream.eat(\"|\"))\n return exprs.length == 1 ? exprs[0] : {type: \"choice\", exprs: exprs}\n}\n\nfunction parseExprSeq(stream) {\n var exprs = [];\n do { exprs.push(parseExprSubscript(stream)); }\n while (stream.next && stream.next != \")\" && stream.next != \"|\")\n return exprs.length == 1 ? exprs[0] : {type: \"seq\", exprs: exprs}\n}\n\nfunction parseExprSubscript(stream) {\n var expr = parseExprAtom(stream);\n for (;;) {\n if (stream.eat(\"+\"))\n { expr = {type: \"plus\", expr: expr}; }\n else if (stream.eat(\"*\"))\n { expr = {type: \"star\", expr: expr}; }\n else if (stream.eat(\"?\"))\n { expr = {type: \"opt\", expr: expr}; }\n else if (stream.eat(\"{\"))\n { expr = parseExprRange(stream, expr); }\n else { break }\n }\n return expr\n}\n\nfunction parseNum(stream) {\n if (/\\D/.test(stream.next)) { stream.err(\"Expected number, got '\" + stream.next + \"'\"); }\n var result = Number(stream.next);\n stream.pos++;\n return result\n}\n\nfunction parseExprRange(stream, expr) {\n var min = parseNum(stream), max = min;\n if (stream.eat(\",\")) {\n if (stream.next != \"}\") { max = parseNum(stream); }\n else { max = -1; }\n }\n if (!stream.eat(\"}\")) { stream.err(\"Unclosed braced range\"); }\n return {type: \"range\", min: min, max: max, expr: expr}\n}\n\nfunction resolveName(stream, name) {\n var types = stream.nodeTypes, type = types[name];\n if (type) { return [type] }\n var result = [];\n for (var typeName in types) {\n var type$1 = types[typeName];\n if (type$1.groups.indexOf(name) > -1) { result.push(type$1); }\n }\n if (result.length == 0) { stream.err(\"No node type or group '\" + name + \"' found\"); }\n return result\n}\n\nfunction parseExprAtom(stream) {\n if (stream.eat(\"(\")) {\n var expr = parseExpr(stream);\n if (!stream.eat(\")\")) { stream.err(\"Missing closing paren\"); }\n return expr\n } else if (!/\\W/.test(stream.next)) {\n var exprs = resolveName(stream, stream.next).map(function (type) {\n if (stream.inline == null) { stream.inline = type.isInline; }\n else if (stream.inline != type.isInline) { stream.err(\"Mixing inline and block content\"); }\n return {type: \"name\", value: type}\n });\n stream.pos++;\n return exprs.length == 1 ? exprs[0] : {type: \"choice\", exprs: exprs}\n } else {\n stream.err(\"Unexpected token '\" + stream.next + \"'\");\n }\n}\n\n// The code below helps compile a regular-expression-like language\n// into a deterministic finite automaton. For a good introduction to\n// these concepts, see https://swtch.com/~rsc/regexp/regexp1.html\n\n// : (Object) → [[{term: ?any, to: number}]]\n// Construct an NFA from an expression as returned by the parser. The\n// NFA is represented as an array of states, which are themselves\n// arrays of edges, which are `{term, to}` objects. The first state is\n// the entry state and the last node is the success state.\n//\n// Note that unlike typical NFAs, the edge ordering in this one is\n// significant, in that it is used to contruct filler content when\n// necessary.\nfunction nfa(expr) {\n var nfa = [[]];\n connect(compile(expr, 0), node());\n return nfa\n\n function node() { return nfa.push([]) - 1 }\n function edge(from, to, term) {\n var edge = {term: term, to: to};\n nfa[from].push(edge);\n return edge\n }\n function connect(edges, to) { edges.forEach(function (edge) { return edge.to = to; }); }\n\n function compile(expr, from) {\n if (expr.type == \"choice\") {\n return expr.exprs.reduce(function (out, expr) { return out.concat(compile(expr, from)); }, [])\n } else if (expr.type == \"seq\") {\n for (var i = 0;; i++) {\n var next = compile(expr.exprs[i], from);\n if (i == expr.exprs.length - 1) { return next }\n connect(next, from = node());\n }\n } else if (expr.type == \"star\") {\n var loop = node();\n edge(from, loop);\n connect(compile(expr.expr, loop), loop);\n return [edge(loop)]\n } else if (expr.type == \"plus\") {\n var loop$1 = node();\n connect(compile(expr.expr, from), loop$1);\n connect(compile(expr.expr, loop$1), loop$1);\n return [edge(loop$1)]\n } else if (expr.type == \"opt\") {\n return [edge(from)].concat(compile(expr.expr, from))\n } else if (expr.type == \"range\") {\n var cur = from;\n for (var i$1 = 0; i$1 < expr.min; i$1++) {\n var next$1 = node();\n connect(compile(expr.expr, cur), next$1);\n cur = next$1;\n }\n if (expr.max == -1) {\n connect(compile(expr.expr, cur), cur);\n } else {\n for (var i$2 = expr.min; i$2 < expr.max; i$2++) {\n var next$2 = node();\n edge(cur, next$2);\n connect(compile(expr.expr, cur), next$2);\n cur = next$2;\n }\n }\n return [edge(cur)]\n } else if (expr.type == \"name\") {\n return [edge(from, null, expr.value)]\n }\n }\n}\n\nfunction cmp(a, b) { return b - a }\n\n// Get the set of nodes reachable by null edges from `node`. Omit\n// nodes with only a single null-out-edge, since they may lead to\n// needless duplicated nodes.\nfunction nullFrom(nfa, node) {\n var result = [];\n scan(node);\n return result.sort(cmp)\n\n function scan(node) {\n var edges = nfa[node];\n if (edges.length == 1 && !edges[0].term) { return scan(edges[0].to) }\n result.push(node);\n for (var i = 0; i < edges.length; i++) {\n var ref = edges[i];\n var term = ref.term;\n var to = ref.to;\n if (!term && result.indexOf(to) == -1) { scan(to); }\n }\n }\n}\n\n// : ([[{term: ?any, to: number}]]) → ContentMatch\n// Compiles an NFA as produced by `nfa` into a DFA, modeled as a set\n// of state objects (`ContentMatch` instances) with transitions\n// between them.\nfunction dfa(nfa) {\n var labeled = Object.create(null);\n return explore(nullFrom(nfa, 0))\n\n function explore(states) {\n var out = [];\n states.forEach(function (node) {\n nfa[node].forEach(function (ref) {\n var term = ref.term;\n var to = ref.to;\n\n if (!term) { return }\n var known = out.indexOf(term), set = known > -1 && out[known + 1];\n nullFrom(nfa, to).forEach(function (node) {\n if (!set) { out.push(term, set = []); }\n if (set.indexOf(node) == -1) { set.push(node); }\n });\n });\n });\n var state = labeled[states.join(\",\")] = new ContentMatch(states.indexOf(nfa.length - 1) > -1);\n for (var i = 0; i < out.length; i += 2) {\n var states$1 = out[i + 1].sort(cmp);\n state.next.push(out[i], labeled[states$1.join(\",\")] || explore(states$1));\n }\n return state\n }\n}\n\nfunction checkForDeadEnds(match, stream) {\n for (var i = 0, work = [match]; i < work.length; i++) {\n var state = work[i], dead = !state.validEnd, nodes = [];\n for (var j = 0; j < state.next.length; j += 2) {\n var node = state.next[j], next = state.next[j + 1];\n nodes.push(node.name);\n if (dead && !(node.isText || node.hasRequiredAttrs())) { dead = false; }\n if (work.indexOf(next) == -1) { work.push(next); }\n }\n if (dead) { stream.err(\"Only non-generatable nodes (\" + nodes.join(\", \") + \") in a required position (see https://prosemirror.net/docs/guide/#generatable)\"); }\n }\n}\n\n// For node types where all attrs have a default value (or which don't\n// have any attributes), build up a single reusable default attribute\n// object, and use it for all nodes that don't specify specific\n// attributes.\nfunction defaultAttrs(attrs) {\n var defaults = Object.create(null);\n for (var attrName in attrs) {\n var attr = attrs[attrName];\n if (!attr.hasDefault) { return null }\n defaults[attrName] = attr.default;\n }\n return defaults\n}\n\nfunction computeAttrs(attrs, value) {\n var built = Object.create(null);\n for (var name in attrs) {\n var given = value && value[name];\n if (given === undefined) {\n var attr = attrs[name];\n if (attr.hasDefault) { given = attr.default; }\n else { throw new RangeError(\"No value supplied for attribute \" + name) }\n }\n built[name] = given;\n }\n return built\n}\n\nfunction initAttrs(attrs) {\n var result = Object.create(null);\n if (attrs) { for (var name in attrs) { result[name] = new Attribute(attrs[name]); } }\n return result\n}\n\n// ::- Node types are objects allocated once per `Schema` and used to\n// [tag](#model.Node.type) `Node` instances. They contain information\n// about the node type, such as its name and what kind of node it\n// represents.\nvar NodeType = function NodeType(name, schema, spec) {\n // :: string\n // The name the node type has in this schema.\n this.name = name;\n\n // :: Schema\n // A link back to the `Schema` the node type belongs to.\n this.schema = schema;\n\n // :: NodeSpec\n // The spec that this type is based on\n this.spec = spec;\n\n this.groups = spec.group ? spec.group.split(\" \") : [];\n this.attrs = initAttrs(spec.attrs);\n\n this.defaultAttrs = defaultAttrs(this.attrs);\n\n // :: ContentMatch\n // The starting match of the node type's content expression.\n this.contentMatch = null;\n\n // : ?[MarkType]\n // The set of marks allowed in this node. `null` means all marks\n // are allowed.\n this.markSet = null;\n\n // :: bool\n // True if this node type has inline content.\n this.inlineContent = null;\n\n // :: bool\n // True if this is a block type\n this.isBlock = !(spec.inline || name == \"text\");\n\n // :: bool\n // True if this is the text node type.\n this.isText = name == \"text\";\n};\n\nvar prototypeAccessors$5 = { isInline: { configurable: true },isTextblock: { configurable: true },isLeaf: { configurable: true },isAtom: { configurable: true } };\n\n// :: bool\n// True if this is an inline type.\nprototypeAccessors$5.isInline.get = function () { return !this.isBlock };\n\n// :: bool\n// True if this is a textblock type, a block that contains inline\n// content.\nprototypeAccessors$5.isTextblock.get = function () { return this.isBlock && this.inlineContent };\n\n// :: bool\n// True for node types that allow no content.\nprototypeAccessors$5.isLeaf.get = function () { return this.contentMatch == ContentMatch.empty };\n\n// :: bool\n// True when this node is an atom, i.e. when it does not have\n// directly editable content.\nprototypeAccessors$5.isAtom.get = function () { return this.isLeaf || this.spec.atom };\n\n// :: () → bool\n// Tells you whether this node type has any required attributes.\nNodeType.prototype.hasRequiredAttrs = function hasRequiredAttrs () {\n for (var n in this.attrs) { if (this.attrs[n].isRequired) { return true } }\n return false\n};\n\nNodeType.prototype.compatibleContent = function compatibleContent (other) {\n return this == other || this.contentMatch.compatible(other.contentMatch)\n};\n\nNodeType.prototype.computeAttrs = function computeAttrs$1 (attrs) {\n if (!attrs && this.defaultAttrs) { return this.defaultAttrs }\n else { return computeAttrs(this.attrs, attrs) }\n};\n\n// :: (?Object, ?union, ?[Mark]) → Node\n// Create a `Node` of this type. The given attributes are\n// checked and defaulted (you can pass `null` to use the type's\n// defaults entirely, if no required attributes exist). `content`\n// may be a `Fragment`, a node, an array of nodes, or\n// `null`. Similarly `marks` may be `null` to default to the empty\n// set of marks.\nNodeType.prototype.create = function create (attrs, content, marks) {\n if (this.isText) { throw new Error(\"NodeType.create can't construct text nodes\") }\n return new Node(this, this.computeAttrs(attrs), Fragment.from(content), Mark.setFrom(marks))\n};\n\n// :: (?Object, ?union, ?[Mark]) → Node\n// Like [`create`](#model.NodeType.create), but check the given content\n// against the node type's content restrictions, and throw an error\n// if it doesn't match.\nNodeType.prototype.createChecked = function createChecked (attrs, content, marks) {\n content = Fragment.from(content);\n if (!this.validContent(content))\n { throw new RangeError(\"Invalid content for node \" + this.name) }\n return new Node(this, this.computeAttrs(attrs), content, Mark.setFrom(marks))\n};\n\n// :: (?Object, ?union, ?[Mark]) → ?Node\n// Like [`create`](#model.NodeType.create), but see if it is necessary to\n// add nodes to the start or end of the given fragment to make it\n// fit the node. If no fitting wrapping can be found, return null.\n// Note that, due to the fact that required nodes can always be\n// created, this will always succeed if you pass null or\n// `Fragment.empty` as content.\nNodeType.prototype.createAndFill = function createAndFill (attrs, content, marks) {\n attrs = this.computeAttrs(attrs);\n content = Fragment.from(content);\n if (content.size) {\n var before = this.contentMatch.fillBefore(content);\n if (!before) { return null }\n content = before.append(content);\n }\n var after = this.contentMatch.matchFragment(content).fillBefore(Fragment.empty, true);\n if (!after) { return null }\n return new Node(this, attrs, content.append(after), Mark.setFrom(marks))\n};\n\n// :: (Fragment) → bool\n// Returns true if the given fragment is valid content for this node\n// type with the given attributes.\nNodeType.prototype.validContent = function validContent (content) {\n var result = this.contentMatch.matchFragment(content);\n if (!result || !result.validEnd) { return false }\n for (var i = 0; i < content.childCount; i++)\n { if (!this.allowsMarks(content.child(i).marks)) { return false } }\n return true\n};\n\n// :: (MarkType) → bool\n// Check whether the given mark type is allowed in this node.\nNodeType.prototype.allowsMarkType = function allowsMarkType (markType) {\n return this.markSet == null || this.markSet.indexOf(markType) > -1\n};\n\n// :: ([Mark]) → bool\n// Test whether the given set of marks are allowed in this node.\nNodeType.prototype.allowsMarks = function allowsMarks (marks) {\n if (this.markSet == null) { return true }\n for (var i = 0; i < marks.length; i++) { if (!this.allowsMarkType(marks[i].type)) { return false } }\n return true\n};\n\n// :: ([Mark]) → [Mark]\n// Removes the marks that are not allowed in this node from the given set.\nNodeType.prototype.allowedMarks = function allowedMarks (marks) {\n if (this.markSet == null) { return marks }\n var copy;\n for (var i = 0; i < marks.length; i++) {\n if (!this.allowsMarkType(marks[i].type)) {\n if (!copy) { copy = marks.slice(0, i); }\n } else if (copy) {\n copy.push(marks[i]);\n }\n }\n return !copy ? marks : copy.length ? copy : Mark.empty\n};\n\nNodeType.compile = function compile (nodes, schema) {\n var result = Object.create(null);\n nodes.forEach(function (name, spec) { return result[name] = new NodeType(name, schema, spec); });\n\n var topType = schema.spec.topNode || \"doc\";\n if (!result[topType]) { throw new RangeError(\"Schema is missing its top node type ('\" + topType + \"')\") }\n if (!result.text) { throw new RangeError(\"Every schema needs a 'text' type\") }\n for (var _ in result.text.attrs) { throw new RangeError(\"The text node type should not have attributes\") }\n\n return result\n};\n\nObject.defineProperties( NodeType.prototype, prototypeAccessors$5 );\n\n// Attribute descriptors\n\nvar Attribute = function Attribute(options) {\n this.hasDefault = Object.prototype.hasOwnProperty.call(options, \"default\");\n this.default = options.default;\n};\n\nvar prototypeAccessors$1$3 = { isRequired: { configurable: true } };\n\nprototypeAccessors$1$3.isRequired.get = function () {\n return !this.hasDefault\n};\n\nObject.defineProperties( Attribute.prototype, prototypeAccessors$1$3 );\n\n// Marks\n\n// ::- Like nodes, marks (which are associated with nodes to signify\n// things like emphasis or being part of a link) are\n// [tagged](#model.Mark.type) with type objects, which are\n// instantiated once per `Schema`.\nvar MarkType = function MarkType(name, rank, schema, spec) {\n // :: string\n // The name of the mark type.\n this.name = name;\n\n // :: Schema\n // The schema that this mark type instance is part of.\n this.schema = schema;\n\n // :: MarkSpec\n // The spec on which the type is based.\n this.spec = spec;\n\n this.attrs = initAttrs(spec.attrs);\n\n this.rank = rank;\n this.excluded = null;\n var defaults = defaultAttrs(this.attrs);\n this.instance = defaults && new Mark(this, defaults);\n};\n\n// :: (?Object) → Mark\n// Create a mark of this type. `attrs` may be `null` or an object\n// containing only some of the mark's attributes. The others, if\n// they have defaults, will be added.\nMarkType.prototype.create = function create (attrs) {\n if (!attrs && this.instance) { return this.instance }\n return new Mark(this, computeAttrs(this.attrs, attrs))\n};\n\nMarkType.compile = function compile (marks, schema) {\n var result = Object.create(null), rank = 0;\n marks.forEach(function (name, spec) { return result[name] = new MarkType(name, rank++, schema, spec); });\n return result\n};\n\n// :: ([Mark]) → [Mark]\n// When there is a mark of this type in the given set, a new set\n// without it is returned. Otherwise, the input set is returned.\nMarkType.prototype.removeFromSet = function removeFromSet (set) {\n for (var i = 0; i < set.length; i++) { if (set[i].type == this) {\n set = set.slice(0, i).concat(set.slice(i + 1));\n i--;\n } }\n return set\n};\n\n// :: ([Mark]) → ?Mark\n// Tests whether there is a mark of this type in the given set.\nMarkType.prototype.isInSet = function isInSet (set) {\n for (var i = 0; i < set.length; i++)\n { if (set[i].type == this) { return set[i] } }\n};\n\n// :: (MarkType) → bool\n// Queries whether a given mark type is\n// [excluded](#model.MarkSpec.excludes) by this one.\nMarkType.prototype.excludes = function excludes (other) {\n return this.excluded.indexOf(other) > -1\n};\n\n// SchemaSpec:: interface\n// An object describing a schema, as passed to the [`Schema`](#model.Schema)\n// constructor.\n//\n// nodes:: union, OrderedMap>\n// The node types in this schema. Maps names to\n// [`NodeSpec`](#model.NodeSpec) objects that describe the node type\n// associated with that name. Their order is significant—it\n// determines which [parse rules](#model.NodeSpec.parseDOM) take\n// precedence by default, and which nodes come first in a given\n// [group](#model.NodeSpec.group).\n//\n// marks:: ?union, OrderedMap>\n// The mark types that exist in this schema. The order in which they\n// are provided determines the order in which [mark\n// sets](#model.Mark.addToSet) are sorted and in which [parse\n// rules](#model.MarkSpec.parseDOM) are tried.\n//\n// topNode:: ?string\n// The name of the default top-level node for the schema. Defaults\n// to `\"doc\"`.\n\n// NodeSpec:: interface\n//\n// content:: ?string\n// The content expression for this node, as described in the [schema\n// guide](/docs/guide/#schema.content_expressions). When not given,\n// the node does not allow any content.\n//\n// marks:: ?string\n// The marks that are allowed inside of this node. May be a\n// space-separated string referring to mark names or groups, `\"_\"`\n// to explicitly allow all marks, or `\"\"` to disallow marks. When\n// not given, nodes with inline content default to allowing all\n// marks, other nodes default to not allowing marks.\n//\n// group:: ?string\n// The group or space-separated groups to which this node belongs,\n// which can be referred to in the content expressions for the\n// schema.\n//\n// inline:: ?bool\n// Should be set to true for inline nodes. (Implied for text nodes.)\n//\n// atom:: ?bool\n// Can be set to true to indicate that, though this isn't a [leaf\n// node](#model.NodeType.isLeaf), it doesn't have directly editable\n// content and should be treated as a single unit in the view.\n//\n// attrs:: ?Object\n// The attributes that nodes of this type get.\n//\n// selectable:: ?bool\n// Controls whether nodes of this type can be selected as a [node\n// selection](#state.NodeSelection). Defaults to true for non-text\n// nodes.\n//\n// draggable:: ?bool\n// Determines whether nodes of this type can be dragged without\n// being selected. Defaults to false.\n//\n// code:: ?bool\n// Can be used to indicate that this node contains code, which\n// causes some commands to behave differently.\n//\n// defining:: ?bool\n// Determines whether this node is considered an important parent\n// node during replace operations (such as paste). Non-defining (the\n// default) nodes get dropped when their entire content is replaced,\n// whereas defining nodes persist and wrap the inserted content.\n// Likewise, in _inserted_ content the defining parents of the\n// content are preserved when possible. Typically,\n// non-default-paragraph textblock types, and possibly list items,\n// are marked as defining.\n//\n// isolating:: ?bool\n// When enabled (default is false), the sides of nodes of this type\n// count as boundaries that regular editing operations, like\n// backspacing or lifting, won't cross. An example of a node that\n// should probably have this enabled is a table cell.\n//\n// toDOM:: ?(node: Node) → DOMOutputSpec\n// Defines the default way a node of this type should be serialized\n// to DOM/HTML (as used by\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)).\n// Should return a DOM node or an [array\n// structure](#model.DOMOutputSpec) that describes one, with an\n// optional number zero (“hole”) in it to indicate where the node's\n// content should be inserted.\n//\n// For text nodes, the default is to create a text DOM node. Though\n// it is possible to create a serializer where text is rendered\n// differently, this is not supported inside the editor, so you\n// shouldn't override that in your text node spec.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this node, which can be\n// used by [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) to\n// automatically derive a parser. The `node` field in the rules is\n// implied (the name of this node will be filled in automatically).\n// If you supply your own parser, you do not need to also specify\n// parsing rules in your schema.\n//\n// toDebugString:: ?(node: Node) -> string\n// Defines the default way a node of this type should be serialized\n// to a string representation for debugging (e.g. in error messages).\n\n// MarkSpec:: interface\n//\n// attrs:: ?Object\n// The attributes that marks of this type get.\n//\n// inclusive:: ?bool\n// Whether this mark should be active when the cursor is positioned\n// at its end (or at its start when that is also the start of the\n// parent node). Defaults to true.\n//\n// excludes:: ?string\n// Determines which other marks this mark can coexist with. Should\n// be a space-separated strings naming other marks or groups of marks.\n// When a mark is [added](#model.Mark.addToSet) to a set, all marks\n// that it excludes are removed in the process. If the set contains\n// any mark that excludes the new mark but is not, itself, excluded\n// by the new mark, the mark can not be added an the set. You can\n// use the value `\"_\"` to indicate that the mark excludes all\n// marks in the schema.\n//\n// Defaults to only being exclusive with marks of the same type. You\n// can set it to an empty string (or any string not containing the\n// mark's own name) to allow multiple marks of a given type to\n// coexist (as long as they have different attributes).\n//\n// group:: ?string\n// The group or space-separated groups to which this mark belongs.\n//\n// spanning:: ?bool\n// Determines whether marks of this type can span multiple adjacent\n// nodes when serialized to DOM/HTML. Defaults to true.\n//\n// toDOM:: ?(mark: Mark, inline: bool) → DOMOutputSpec\n// Defines the default way marks of this type should be serialized\n// to DOM/HTML. When the resulting spec contains a hole, that is\n// where the marked content is placed. Otherwise, it is appended to\n// the top node.\n//\n// parseDOM:: ?[ParseRule]\n// Associates DOM parser information with this mark (see the\n// corresponding [node spec field](#model.NodeSpec.parseDOM)). The\n// `mark` field in the rules is implied.\n\n// AttributeSpec:: interface\n//\n// Used to [define](#model.NodeSpec.attrs) attributes on nodes or\n// marks.\n//\n// default:: ?any\n// The default value for this attribute, to use when no explicit\n// value is provided. Attributes that have no default must be\n// provided whenever a node or mark of a type that has them is\n// created.\n\n// ::- A document schema. Holds [node](#model.NodeType) and [mark\n// type](#model.MarkType) objects for the nodes and marks that may\n// occur in conforming documents, and provides functionality for\n// creating and deserializing such documents.\nvar Schema = function Schema(spec) {\n // :: SchemaSpec\n // The [spec](#model.SchemaSpec) on which the schema is based,\n // with the added guarantee that its `nodes` and `marks`\n // properties are\n // [`OrderedMap`](https://github.com/marijnh/orderedmap) instances\n // (not raw objects).\n this.spec = {};\n for (var prop in spec) { this.spec[prop] = spec[prop]; }\n this.spec.nodes = OrderedMap.from(spec.nodes);\n this.spec.marks = OrderedMap.from(spec.marks);\n\n // :: Object\n // An object mapping the schema's node names to node type objects.\n this.nodes = NodeType.compile(this.spec.nodes, this);\n\n // :: Object\n // A map from mark names to mark type objects.\n this.marks = MarkType.compile(this.spec.marks, this);\n\n var contentExprCache = Object.create(null);\n for (var prop$1 in this.nodes) {\n if (prop$1 in this.marks)\n { throw new RangeError(prop$1 + \" can not be both a node and a mark\") }\n var type = this.nodes[prop$1], contentExpr = type.spec.content || \"\", markExpr = type.spec.marks;\n type.contentMatch = contentExprCache[contentExpr] ||\n (contentExprCache[contentExpr] = ContentMatch.parse(contentExpr, this.nodes));\n type.inlineContent = type.contentMatch.inlineContent;\n type.markSet = markExpr == \"_\" ? null :\n markExpr ? gatherMarks(this, markExpr.split(\" \")) :\n markExpr == \"\" || !type.inlineContent ? [] : null;\n }\n for (var prop$2 in this.marks) {\n var type$1 = this.marks[prop$2], excl = type$1.spec.excludes;\n type$1.excluded = excl == null ? [type$1] : excl == \"\" ? [] : gatherMarks(this, excl.split(\" \"));\n }\n\n this.nodeFromJSON = this.nodeFromJSON.bind(this);\n this.markFromJSON = this.markFromJSON.bind(this);\n\n // :: NodeType\n // The type of the [default top node](#model.SchemaSpec.topNode)\n // for this schema.\n this.topNodeType = this.nodes[this.spec.topNode || \"doc\"];\n\n // :: Object\n // An object for storing whatever values modules may want to\n // compute and cache per schema. (If you want to store something\n // in it, try to use property names unlikely to clash.)\n this.cached = Object.create(null);\n this.cached.wrappings = Object.create(null);\n};\n\n// :: (union, ?Object, ?union, ?[Mark]) → Node\n// Create a node in this schema. The `type` may be a string or a\n// `NodeType` instance. Attributes will be extended\n// with defaults, `content` may be a `Fragment`,\n// `null`, a `Node`, or an array of nodes.\nSchema.prototype.node = function node (type, attrs, content, marks) {\n if (typeof type == \"string\")\n { type = this.nodeType(type); }\n else if (!(type instanceof NodeType))\n { throw new RangeError(\"Invalid node type: \" + type) }\n else if (type.schema != this)\n { throw new RangeError(\"Node type from different schema used (\" + type.name + \")\") }\n\n return type.createChecked(attrs, content, marks)\n};\n\n// :: (string, ?[Mark]) → Node\n// Create a text node in the schema. Empty text nodes are not\n// allowed.\nSchema.prototype.text = function text (text$1, marks) {\n var type = this.nodes.text;\n return new TextNode(type, type.defaultAttrs, text$1, Mark.setFrom(marks))\n};\n\n// :: (union, ?Object) → Mark\n// Create a mark with the given type and attributes.\nSchema.prototype.mark = function mark (type, attrs) {\n if (typeof type == \"string\") { type = this.marks[type]; }\n return type.create(attrs)\n};\n\n// :: (Object) → Node\n// Deserialize a node from its JSON representation. This method is\n// bound.\nSchema.prototype.nodeFromJSON = function nodeFromJSON (json) {\n return Node.fromJSON(this, json)\n};\n\n// :: (Object) → Mark\n// Deserialize a mark from its JSON representation. This method is\n// bound.\nSchema.prototype.markFromJSON = function markFromJSON (json) {\n return Mark.fromJSON(this, json)\n};\n\nSchema.prototype.nodeType = function nodeType (name) {\n var found = this.nodes[name];\n if (!found) { throw new RangeError(\"Unknown node type: \" + name) }\n return found\n};\n\nfunction gatherMarks(schema, marks) {\n var found = [];\n for (var i = 0; i < marks.length; i++) {\n var name = marks[i], mark = schema.marks[name], ok = mark;\n if (mark) {\n found.push(mark);\n } else {\n for (var prop in schema.marks) {\n var mark$1 = schema.marks[prop];\n if (name == \"_\" || (mark$1.spec.group && mark$1.spec.group.split(\" \").indexOf(name) > -1))\n { found.push(ok = mark$1); }\n }\n }\n if (!ok) { throw new SyntaxError(\"Unknown mark type: '\" + marks[i] + \"'\") }\n }\n return found\n}\n\n// ParseOptions:: interface\n// These are the options recognized by the\n// [`parse`](#model.DOMParser.parse) and\n// [`parseSlice`](#model.DOMParser.parseSlice) methods.\n//\n// preserveWhitespace:: ?union\n// By default, whitespace is collapsed as per HTML's rules. Pass\n// `true` to preserve whitespace, but normalize newlines to\n// spaces, and `\"full\"` to preserve whitespace entirely.\n//\n// findPositions:: ?[{node: dom.Node, offset: number}]\n// When given, the parser will, beside parsing the content,\n// record the document positions of the given DOM positions. It\n// will do so by writing to the objects, adding a `pos` property\n// that holds the document position. DOM positions that are not\n// in the parsed content will not be written to.\n//\n// from:: ?number\n// The child node index to start parsing from.\n//\n// to:: ?number\n// The child node index to stop parsing at.\n//\n// topNode:: ?Node\n// By default, the content is parsed into the schema's default\n// [top node type](#model.Schema.topNodeType). You can pass this\n// option to use the type and attributes from a different node\n// as the top container.\n//\n// topMatch:: ?ContentMatch\n// Provide the starting content match that content parsed into the\n// top node is matched against.\n//\n// context:: ?ResolvedPos\n// A set of additional nodes to count as\n// [context](#model.ParseRule.context) when parsing, above the\n// given [top node](#model.ParseOptions.topNode).\n\n// ParseRule:: interface\n// A value that describes how to parse a given DOM node or inline\n// style as a ProseMirror node or mark.\n//\n// tag:: ?string\n// A CSS selector describing the kind of DOM elements to match. A\n// single rule should have _either_ a `tag` or a `style` property.\n//\n// namespace:: ?string\n// The namespace to match. This should be used with `tag`.\n// Nodes are only matched when the namespace matches or this property\n// is null.\n//\n// style:: ?string\n// A CSS property name to match. When given, this rule matches\n// inline styles that list that property. May also have the form\n// `\"property=value\"`, in which case the rule only matches if the\n// property's value exactly matches the given value. (For more\n// complicated filters, use [`getAttrs`](#model.ParseRule.getAttrs)\n// and return false to indicate that the match failed.) Rules\n// matching styles may only produce [marks](#model.ParseRule.mark),\n// not nodes.\n//\n// priority:: ?number\n// Can be used to change the order in which the parse rules in a\n// schema are tried. Those with higher priority come first. Rules\n// without a priority are counted as having priority 50. This\n// property is only meaningful in a schema—when directly\n// constructing a parser, the order of the rule array is used.\n//\n// consuming:: ?boolean\n// By default, when a rule matches an element or style, no further\n// rules get a chance to match it. By setting this to `false`, you\n// indicate that even when this rule matches, other rules that come\n// after it should also run.\n//\n// context:: ?string\n// When given, restricts this rule to only match when the current\n// context—the parent nodes into which the content is being\n// parsed—matches this expression. Should contain one or more node\n// names or node group names followed by single or double slashes.\n// For example `\"paragraph/\"` means the rule only matches when the\n// parent node is a paragraph, `\"blockquote/paragraph/\"` restricts\n// it to be in a paragraph that is inside a blockquote, and\n// `\"section//\"` matches any position inside a section—a double\n// slash matches any sequence of ancestor nodes. To allow multiple\n// different contexts, they can be separated by a pipe (`|`)\n// character, as in `\"blockquote/|list_item/\"`.\n//\n// node:: ?string\n// The name of the node type to create when this rule matches. Only\n// valid for rules with a `tag` property, not for style rules. Each\n// rule should have one of a `node`, `mark`, or `ignore` property\n// (except when it appears in a [node](#model.NodeSpec.parseDOM) or\n// [mark spec](#model.MarkSpec.parseDOM), in which case the `node`\n// or `mark` property will be derived from its position).\n//\n// mark:: ?string\n// The name of the mark type to wrap the matched content in.\n//\n// ignore:: ?bool\n// When true, ignore content that matches this rule.\n//\n// closeParent:: ?bool\n// When true, finding an element that matches this rule will close\n// the current node.\n//\n// skip:: ?bool\n// When true, ignore the node that matches this rule, but do parse\n// its content.\n//\n// attrs:: ?Object\n// Attributes for the node or mark created by this rule. When\n// `getAttrs` is provided, it takes precedence.\n//\n// getAttrs:: ?(union) → ?union\n// A function used to compute the attributes for the node or mark\n// created by this rule. Can also be used to describe further\n// conditions the DOM element or style must match. When it returns\n// `false`, the rule won't match. When it returns null or undefined,\n// that is interpreted as an empty/default set of attributes.\n//\n// Called with a DOM Element for `tag` rules, and with a string (the\n// style's value) for `style` rules.\n//\n// contentElement:: ?union\n// For `tag` rules that produce non-leaf nodes or marks, by default\n// the content of the DOM element is parsed as content of the mark\n// or node. If the child nodes are in a descendent node, this may be\n// a CSS selector string that the parser must use to find the actual\n// content element, or a function that returns the actual content\n// element to the parser.\n//\n// getContent:: ?(dom.Node, schema: Schema) → Fragment\n// Can be used to override the content of a matched node. When\n// present, instead of parsing the node's child nodes, the result of\n// this function is used.\n//\n// preserveWhitespace:: ?union\n// Controls whether whitespace should be preserved when parsing the\n// content inside the matched element. `false` means whitespace may\n// be collapsed, `true` means that whitespace should be preserved\n// but newlines normalized to spaces, and `\"full\"` means that\n// newlines should also be preserved.\n\n// ::- A DOM parser represents a strategy for parsing DOM content into\n// a ProseMirror document conforming to a given schema. Its behavior\n// is defined by an array of [rules](#model.ParseRule).\nvar DOMParser = function DOMParser(schema, rules) {\n var this$1 = this;\n\n // :: Schema\n // The schema into which the parser parses.\n this.schema = schema;\n // :: [ParseRule]\n // The set of [parse rules](#model.ParseRule) that the parser\n // uses, in order of precedence.\n this.rules = rules;\n this.tags = [];\n this.styles = [];\n\n rules.forEach(function (rule) {\n if (rule.tag) { this$1.tags.push(rule); }\n else if (rule.style) { this$1.styles.push(rule); }\n });\n\n // Only normalize list elements when lists in the schema can't directly contain themselves\n this.normalizeLists = !this.tags.some(function (r) {\n if (!/^(ul|ol)\\b/.test(r.tag) || !r.node) { return false }\n var node = schema.nodes[r.node];\n return node.contentMatch.matchType(node)\n });\n};\n\n// :: (dom.Node, ?ParseOptions) → Node\n// Parse a document from the content of a DOM node.\nDOMParser.prototype.parse = function parse (dom, options) {\n if ( options === void 0 ) options = {};\n\n var context = new ParseContext(this, options, false);\n context.addAll(dom, null, options.from, options.to);\n return context.finish()\n};\n\n// :: (dom.Node, ?ParseOptions) → Slice\n// Parses the content of the given DOM node, like\n// [`parse`](#model.DOMParser.parse), and takes the same set of\n// options. But unlike that method, which produces a whole node,\n// this one returns a slice that is open at the sides, meaning that\n// the schema constraints aren't applied to the start of nodes to\n// the left of the input and the end of nodes at the end.\nDOMParser.prototype.parseSlice = function parseSlice (dom, options) {\n if ( options === void 0 ) options = {};\n\n var context = new ParseContext(this, options, true);\n context.addAll(dom, null, options.from, options.to);\n return Slice.maxOpen(context.finish())\n};\n\nDOMParser.prototype.matchTag = function matchTag (dom, context, after) {\n for (var i = after ? this.tags.indexOf(after) + 1 : 0; i < this.tags.length; i++) {\n var rule = this.tags[i];\n if (matches(dom, rule.tag) &&\n (rule.namespace === undefined || dom.namespaceURI == rule.namespace) &&\n (!rule.context || context.matchesContext(rule.context))) {\n if (rule.getAttrs) {\n var result = rule.getAttrs(dom);\n if (result === false) { continue }\n rule.attrs = result;\n }\n return rule\n }\n }\n};\n\nDOMParser.prototype.matchStyle = function matchStyle (prop, value, context, after) {\n for (var i = after ? this.styles.indexOf(after) + 1 : 0; i < this.styles.length; i++) {\n var rule = this.styles[i];\n if (rule.style.indexOf(prop) != 0 ||\n rule.context && !context.matchesContext(rule.context) ||\n // Test that the style string either precisely matches the prop,\n // or has an '=' sign after the prop, followed by the given\n // value.\n rule.style.length > prop.length &&\n (rule.style.charCodeAt(prop.length) != 61 || rule.style.slice(prop.length + 1) != value))\n { continue }\n if (rule.getAttrs) {\n var result = rule.getAttrs(value);\n if (result === false) { continue }\n rule.attrs = result;\n }\n return rule\n }\n};\n\n// : (Schema) → [ParseRule]\nDOMParser.schemaRules = function schemaRules (schema) {\n var result = [];\n function insert(rule) {\n var priority = rule.priority == null ? 50 : rule.priority, i = 0;\n for (; i < result.length; i++) {\n var next = result[i], nextPriority = next.priority == null ? 50 : next.priority;\n if (nextPriority < priority) { break }\n }\n result.splice(i, 0, rule);\n }\n\n var loop = function ( name ) {\n var rules = schema.marks[name].spec.parseDOM;\n if (rules) { rules.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.mark = name;\n }); }\n };\n\n for (var name in schema.marks) loop( name );\n var loop$1 = function ( name ) {\n var rules$1 = schema.nodes[name$1].spec.parseDOM;\n if (rules$1) { rules$1.forEach(function (rule) {\n insert(rule = copy(rule));\n rule.node = name$1;\n }); }\n };\n\n for (var name$1 in schema.nodes) loop$1();\n return result\n};\n\n// :: (Schema) → DOMParser\n// Construct a DOM parser using the parsing rules listed in a\n// schema's [node specs](#model.NodeSpec.parseDOM), reordered by\n// [priority](#model.ParseRule.priority).\nDOMParser.fromSchema = function fromSchema (schema) {\n return schema.cached.domParser ||\n (schema.cached.domParser = new DOMParser(schema, DOMParser.schemaRules(schema)))\n};\n\n// : Object The block-level tags in HTML5\nvar blockTags = {\n address: true, article: true, aside: true, blockquote: true, canvas: true,\n dd: true, div: true, dl: true, fieldset: true, figcaption: true, figure: true,\n footer: true, form: true, h1: true, h2: true, h3: true, h4: true, h5: true,\n h6: true, header: true, hgroup: true, hr: true, li: true, noscript: true, ol: true,\n output: true, p: true, pre: true, section: true, table: true, tfoot: true, ul: true\n};\n\n// : Object The tags that we normally ignore.\nvar ignoreTags = {\n head: true, noscript: true, object: true, script: true, style: true, title: true\n};\n\n// : Object List tags.\nvar listTags = {ol: true, ul: true};\n\n// Using a bitfield for node context options\nvar OPT_PRESERVE_WS = 1, OPT_PRESERVE_WS_FULL = 2, OPT_OPEN_LEFT = 4;\n\nfunction wsOptionsFor(preserveWhitespace) {\n return (preserveWhitespace ? OPT_PRESERVE_WS : 0) | (preserveWhitespace === \"full\" ? OPT_PRESERVE_WS_FULL : 0)\n}\n\nvar NodeContext = function NodeContext(type, attrs, marks, pendingMarks, solid, match, options) {\n this.type = type;\n this.attrs = attrs;\n this.solid = solid;\n this.match = match || (options & OPT_OPEN_LEFT ? null : type.contentMatch);\n this.options = options;\n this.content = [];\n // Marks applied to this node itself\n this.marks = marks;\n // Marks applied to its children\n this.activeMarks = Mark.none;\n // Marks that can't apply here, but will be used in children if possible\n this.pendingMarks = pendingMarks;\n // Nested Marks with same type\n this.stashMarks = [];\n};\n\nNodeContext.prototype.findWrapping = function findWrapping (node) {\n if (!this.match) {\n if (!this.type) { return [] }\n var fill = this.type.contentMatch.fillBefore(Fragment.from(node));\n if (fill) {\n this.match = this.type.contentMatch.matchFragment(fill);\n } else {\n var start = this.type.contentMatch, wrap;\n if (wrap = start.findWrapping(node.type)) {\n this.match = start;\n return wrap\n } else {\n return null\n }\n }\n }\n return this.match.findWrapping(node.type)\n};\n\nNodeContext.prototype.finish = function finish (openEnd) {\n if (!(this.options & OPT_PRESERVE_WS)) { // Strip trailing whitespace\n var last = this.content[this.content.length - 1], m;\n if (last && last.isText && (m = /[ \\t\\r\\n\\u000c]+$/.exec(last.text))) {\n if (last.text.length == m[0].length) { this.content.pop(); }\n else { this.content[this.content.length - 1] = last.withText(last.text.slice(0, last.text.length - m[0].length)); }\n }\n }\n var content = Fragment.from(this.content);\n if (!openEnd && this.match)\n { content = content.append(this.match.fillBefore(Fragment.empty, true)); }\n return this.type ? this.type.create(this.attrs, content, this.marks) : content\n};\n\nNodeContext.prototype.popFromStashMark = function popFromStashMark (mark) {\n for (var i = this.stashMarks.length - 1; i >= 0; i--)\n { if (mark.eq(this.stashMarks[i])) { return this.stashMarks.splice(i, 1)[0] } }\n};\n\nNodeContext.prototype.applyPending = function applyPending (nextType) {\n for (var i = 0, pending = this.pendingMarks; i < pending.length; i++) {\n var mark = pending[i];\n if ((this.type ? this.type.allowsMarkType(mark.type) : markMayApply(mark.type, nextType)) &&\n !mark.isInSet(this.activeMarks)) {\n this.activeMarks = mark.addToSet(this.activeMarks);\n this.pendingMarks = mark.removeFromSet(this.pendingMarks);\n }\n }\n};\n\nvar ParseContext = function ParseContext(parser, options, open) {\n // : DOMParser The parser we are using.\n this.parser = parser;\n // : Object The options passed to this parse.\n this.options = options;\n this.isOpen = open;\n var topNode = options.topNode, topContext;\n var topOptions = wsOptionsFor(options.preserveWhitespace) | (open ? OPT_OPEN_LEFT : 0);\n if (topNode)\n { topContext = new NodeContext(topNode.type, topNode.attrs, Mark.none, Mark.none, true,\n options.topMatch || topNode.type.contentMatch, topOptions); }\n else if (open)\n { topContext = new NodeContext(null, null, Mark.none, Mark.none, true, null, topOptions); }\n else\n { topContext = new NodeContext(parser.schema.topNodeType, null, Mark.none, Mark.none, true, null, topOptions); }\n this.nodes = [topContext];\n // : [Mark] The current set of marks\n this.open = 0;\n this.find = options.findPositions;\n this.needsBlock = false;\n};\n\nvar prototypeAccessors$6 = { top: { configurable: true },currentPos: { configurable: true } };\n\nprototypeAccessors$6.top.get = function () {\n return this.nodes[this.open]\n};\n\n// : (dom.Node)\n// Add a DOM node to the content. Text is inserted as text node,\n// otherwise, the node is passed to `addElement` or, if it has a\n// `style` attribute, `addElementWithStyles`.\nParseContext.prototype.addDOM = function addDOM (dom) {\n if (dom.nodeType == 3) {\n this.addTextNode(dom);\n } else if (dom.nodeType == 1) {\n var style = dom.getAttribute(\"style\");\n var marks = style ? this.readStyles(parseStyles(style)) : null, top = this.top;\n if (marks != null) { for (var i = 0; i < marks.length; i++) { this.addPendingMark(marks[i]); } }\n this.addElement(dom);\n if (marks != null) { for (var i$1 = 0; i$1 < marks.length; i$1++) { this.removePendingMark(marks[i$1], top); } }\n }\n};\n\nParseContext.prototype.addTextNode = function addTextNode (dom) {\n var value = dom.nodeValue;\n var top = this.top;\n if (top.options & OPT_PRESERVE_WS_FULL ||\n (top.type ? top.type.inlineContent : top.content.length && top.content[0].isInline) ||\n /[^ \\t\\r\\n\\u000c]/.test(value)) {\n if (!(top.options & OPT_PRESERVE_WS)) {\n value = value.replace(/[ \\t\\r\\n\\u000c]+/g, \" \");\n // If this starts with whitespace, and there is no node before it, or\n // a hard break, or a text node that ends with whitespace, strip the\n // leading space.\n if (/^[ \\t\\r\\n\\u000c]/.test(value) && this.open == this.nodes.length - 1) {\n var nodeBefore = top.content[top.content.length - 1];\n var domNodeBefore = dom.previousSibling;\n if (!nodeBefore ||\n (domNodeBefore && domNodeBefore.nodeName == 'BR') ||\n (nodeBefore.isText && /[ \\t\\r\\n\\u000c]$/.test(nodeBefore.text)))\n { value = value.slice(1); }\n }\n } else if (!(top.options & OPT_PRESERVE_WS_FULL)) {\n value = value.replace(/\\r?\\n|\\r/g, \" \");\n } else {\n value = value.replace(/\\r\\n?/g, \"\\n\");\n }\n if (value) { this.insertNode(this.parser.schema.text(value)); }\n this.findInText(dom);\n } else {\n this.findInside(dom);\n }\n};\n\n// : (dom.Element, ?ParseRule)\n// Try to find a handler for the given tag and use that to parse. If\n// none is found, the element's content nodes are added directly.\nParseContext.prototype.addElement = function addElement (dom, matchAfter) {\n var name = dom.nodeName.toLowerCase(), ruleID;\n if (listTags.hasOwnProperty(name) && this.parser.normalizeLists) { normalizeList(dom); }\n var rule = (this.options.ruleFromNode && this.options.ruleFromNode(dom)) ||\n (ruleID = this.parser.matchTag(dom, this, matchAfter));\n if (rule ? rule.ignore : ignoreTags.hasOwnProperty(name)) {\n this.findInside(dom);\n this.ignoreFallback(dom);\n } else if (!rule || rule.skip || rule.closeParent) {\n if (rule && rule.closeParent) { this.open = Math.max(0, this.open - 1); }\n else if (rule && rule.skip.nodeType) { dom = rule.skip; }\n var sync, top = this.top, oldNeedsBlock = this.needsBlock;\n if (blockTags.hasOwnProperty(name)) {\n sync = true;\n if (!top.type) { this.needsBlock = true; }\n } else if (!dom.firstChild) {\n this.leafFallback(dom);\n return\n }\n this.addAll(dom);\n if (sync) { this.sync(top); }\n this.needsBlock = oldNeedsBlock;\n } else {\n this.addElementByRule(dom, rule, rule.consuming === false ? ruleID : null);\n }\n};\n\n// Called for leaf DOM nodes that would otherwise be ignored\nParseContext.prototype.leafFallback = function leafFallback (dom) {\n if (dom.nodeName == \"BR\" && this.top.type && this.top.type.inlineContent)\n { this.addTextNode(dom.ownerDocument.createTextNode(\"\\n\")); }\n};\n\n// Called for ignored nodes\nParseContext.prototype.ignoreFallback = function ignoreFallback (dom) {\n // Ignored BR nodes should at least create an inline context\n if (dom.nodeName == \"BR\" && (!this.top.type || !this.top.type.inlineContent))\n { this.findPlace(this.parser.schema.text(\"-\")); }\n};\n\n// Run any style parser associated with the node's styles. Either\n// return an array of marks, or null to indicate some of the styles\n// had a rule with `ignore` set.\nParseContext.prototype.readStyles = function readStyles (styles) {\n var marks = Mark.none;\n style: for (var i = 0; i < styles.length; i += 2) {\n for (var after = null;;) {\n var rule = this.parser.matchStyle(styles[i], styles[i + 1], this, after);\n if (!rule) { continue style }\n if (rule.ignore) { return null }\n marks = this.parser.schema.marks[rule.mark].create(rule.attrs).addToSet(marks);\n if (rule.consuming === false) { after = rule; }\n else { break }\n }\n }\n return marks\n};\n\n// : (dom.Element, ParseRule) → bool\n// Look up a handler for the given node. If none are found, return\n// false. Otherwise, apply it, use its return value to drive the way\n// the node's content is wrapped, and return true.\nParseContext.prototype.addElementByRule = function addElementByRule (dom, rule, continueAfter) {\n var this$1 = this;\n\n var sync, nodeType, markType, mark;\n if (rule.node) {\n nodeType = this.parser.schema.nodes[rule.node];\n if (!nodeType.isLeaf) {\n sync = this.enter(nodeType, rule.attrs, rule.preserveWhitespace);\n } else if (!this.insertNode(nodeType.create(rule.attrs))) {\n this.leafFallback(dom);\n }\n } else {\n markType = this.parser.schema.marks[rule.mark];\n mark = markType.create(rule.attrs);\n this.addPendingMark(mark);\n }\n var startIn = this.top;\n\n if (nodeType && nodeType.isLeaf) {\n this.findInside(dom);\n } else if (continueAfter) {\n this.addElement(dom, continueAfter);\n } else if (rule.getContent) {\n this.findInside(dom);\n rule.getContent(dom, this.parser.schema).forEach(function (node) { return this$1.insertNode(node); });\n } else {\n var contentDOM = rule.contentElement;\n if (typeof contentDOM == \"string\") { contentDOM = dom.querySelector(contentDOM); }\n else if (typeof contentDOM == \"function\") { contentDOM = contentDOM(dom); }\n if (!contentDOM) { contentDOM = dom; }\n this.findAround(dom, contentDOM, true);\n this.addAll(contentDOM, sync);\n }\n if (sync) { this.sync(startIn); this.open--; }\n if (mark) { this.removePendingMark(mark, startIn); }\n};\n\n// : (dom.Node, ?NodeBuilder, ?number, ?number)\n// Add all child nodes between `startIndex` and `endIndex` (or the\n// whole node, if not given). If `sync` is passed, use it to\n// synchronize after every block element.\nParseContext.prototype.addAll = function addAll (parent, sync, startIndex, endIndex) {\n var index = startIndex || 0;\n for (var dom = startIndex ? parent.childNodes[startIndex] : parent.firstChild,\n end = endIndex == null ? null : parent.childNodes[endIndex];\n dom != end; dom = dom.nextSibling, ++index) {\n this.findAtPoint(parent, index);\n this.addDOM(dom);\n if (sync && blockTags.hasOwnProperty(dom.nodeName.toLowerCase()))\n { this.sync(sync); }\n }\n this.findAtPoint(parent, index);\n};\n\n// Try to find a way to fit the given node type into the current\n// context. May add intermediate wrappers and/or leave non-solid\n// nodes that we're in.\nParseContext.prototype.findPlace = function findPlace (node) {\n var route, sync;\n for (var depth = this.open; depth >= 0; depth--) {\n var cx = this.nodes[depth];\n var found = cx.findWrapping(node);\n if (found && (!route || route.length > found.length)) {\n route = found;\n sync = cx;\n if (!found.length) { break }\n }\n if (cx.solid) { break }\n }\n if (!route) { return false }\n this.sync(sync);\n for (var i = 0; i < route.length; i++)\n { this.enterInner(route[i], null, false); }\n return true\n};\n\n// : (Node) → ?Node\n// Try to insert the given node, adjusting the context when needed.\nParseContext.prototype.insertNode = function insertNode (node) {\n if (node.isInline && this.needsBlock && !this.top.type) {\n var block = this.textblockFromContext();\n if (block) { this.enterInner(block); }\n }\n if (this.findPlace(node)) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(node.type);\n if (top.match) { top.match = top.match.matchType(node.type); }\n var marks = top.activeMarks;\n for (var i = 0; i < node.marks.length; i++)\n { if (!top.type || top.type.allowsMarkType(node.marks[i].type))\n { marks = node.marks[i].addToSet(marks); } }\n top.content.push(node.mark(marks));\n return true\n }\n return false\n};\n\n// : (NodeType, ?Object) → bool\n// Try to start a node of the given type, adjusting the context when\n// necessary.\nParseContext.prototype.enter = function enter (type, attrs, preserveWS) {\n var ok = this.findPlace(type.create(attrs));\n if (ok) { this.enterInner(type, attrs, true, preserveWS); }\n return ok\n};\n\n// Open a node of the given type\nParseContext.prototype.enterInner = function enterInner (type, attrs, solid, preserveWS) {\n this.closeExtra();\n var top = this.top;\n top.applyPending(type);\n top.match = top.match && top.match.matchType(type, attrs);\n var options = preserveWS == null ? top.options & ~OPT_OPEN_LEFT : wsOptionsFor(preserveWS);\n if ((top.options & OPT_OPEN_LEFT) && top.content.length == 0) { options |= OPT_OPEN_LEFT; }\n this.nodes.push(new NodeContext(type, attrs, top.activeMarks, top.pendingMarks, solid, null, options));\n this.open++;\n};\n\n// Make sure all nodes above this.open are finished and added to\n// their parents\nParseContext.prototype.closeExtra = function closeExtra (openEnd) {\n var i = this.nodes.length - 1;\n if (i > this.open) {\n for (; i > this.open; i--) { this.nodes[i - 1].content.push(this.nodes[i].finish(openEnd)); }\n this.nodes.length = this.open + 1;\n }\n};\n\nParseContext.prototype.finish = function finish () {\n this.open = 0;\n this.closeExtra(this.isOpen);\n return this.nodes[0].finish(this.isOpen || this.options.topOpen)\n};\n\nParseContext.prototype.sync = function sync (to) {\n for (var i = this.open; i >= 0; i--) { if (this.nodes[i] == to) {\n this.open = i;\n return\n } }\n};\n\nprototypeAccessors$6.currentPos.get = function () {\n this.closeExtra();\n var pos = 0;\n for (var i = this.open; i >= 0; i--) {\n var content = this.nodes[i].content;\n for (var j = content.length - 1; j >= 0; j--)\n { pos += content[j].nodeSize; }\n if (i) { pos++; }\n }\n return pos\n};\n\nParseContext.prototype.findAtPoint = function findAtPoint (parent, offset) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == parent && this.find[i].offset == offset)\n { this.find[i].pos = this.currentPos; }\n } }\n};\n\nParseContext.prototype.findInside = function findInside (parent) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node))\n { this.find[i].pos = this.currentPos; }\n } }\n};\n\nParseContext.prototype.findAround = function findAround (parent, content, before) {\n if (parent != content && this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].pos == null && parent.nodeType == 1 && parent.contains(this.find[i].node)) {\n var pos = content.compareDocumentPosition(this.find[i].node);\n if (pos & (before ? 2 : 4))\n { this.find[i].pos = this.currentPos; }\n }\n } }\n};\n\nParseContext.prototype.findInText = function findInText (textNode) {\n if (this.find) { for (var i = 0; i < this.find.length; i++) {\n if (this.find[i].node == textNode)\n { this.find[i].pos = this.currentPos - (textNode.nodeValue.length - this.find[i].offset); }\n } }\n};\n\n// : (string) → bool\n// Determines whether the given [context\n// string](#ParseRule.context) matches this context.\nParseContext.prototype.matchesContext = function matchesContext (context) {\n var this$1 = this;\n\n if (context.indexOf(\"|\") > -1)\n { return context.split(/\\s*\\|\\s*/).some(this.matchesContext, this) }\n\n var parts = context.split(\"/\");\n var option = this.options.context;\n var useRoot = !this.isOpen && (!option || option.parent.type == this.nodes[0].type);\n var minDepth = -(option ? option.depth + 1 : 0) + (useRoot ? 0 : 1);\n var match = function (i, depth) {\n for (; i >= 0; i--) {\n var part = parts[i];\n if (part == \"\") {\n if (i == parts.length - 1 || i == 0) { continue }\n for (; depth >= minDepth; depth--)\n { if (match(i - 1, depth)) { return true } }\n return false\n } else {\n var next = depth > 0 || (depth == 0 && useRoot) ? this$1.nodes[depth].type\n : option && depth >= minDepth ? option.node(depth - minDepth).type\n : null;\n if (!next || (next.name != part && next.groups.indexOf(part) == -1))\n { return false }\n depth--;\n }\n }\n return true\n };\n return match(parts.length - 1, this.open)\n};\n\nParseContext.prototype.textblockFromContext = function textblockFromContext () {\n var $context = this.options.context;\n if ($context) { for (var d = $context.depth; d >= 0; d--) {\n var deflt = $context.node(d).contentMatchAt($context.indexAfter(d)).defaultType;\n if (deflt && deflt.isTextblock && deflt.defaultAttrs) { return deflt }\n } }\n for (var name in this.parser.schema.nodes) {\n var type = this.parser.schema.nodes[name];\n if (type.isTextblock && type.defaultAttrs) { return type }\n }\n};\n\nParseContext.prototype.addPendingMark = function addPendingMark (mark) {\n var found = findSameMarkInSet(mark, this.top.pendingMarks);\n if (found) { this.top.stashMarks.push(found); }\n this.top.pendingMarks = mark.addToSet(this.top.pendingMarks);\n};\n\nParseContext.prototype.removePendingMark = function removePendingMark (mark, upto) {\n for (var depth = this.open; depth >= 0; depth--) {\n var level = this.nodes[depth];\n var found = level.pendingMarks.lastIndexOf(mark);\n if (found > -1) {\n level.pendingMarks = mark.removeFromSet(level.pendingMarks);\n } else {\n level.activeMarks = mark.removeFromSet(level.activeMarks);\n var stashMark = level.popFromStashMark(mark);\n if (stashMark && level.type && level.type.allowsMarkType(stashMark.type))\n { level.activeMarks = stashMark.addToSet(level.activeMarks); }\n }\n if (level == upto) { break }\n }\n};\n\nObject.defineProperties( ParseContext.prototype, prototypeAccessors$6 );\n\n// Kludge to work around directly nested list nodes produced by some\n// tools and allowed by browsers to mean that the nested list is\n// actually part of the list item above it.\nfunction normalizeList(dom) {\n for (var child = dom.firstChild, prevItem = null; child; child = child.nextSibling) {\n var name = child.nodeType == 1 ? child.nodeName.toLowerCase() : null;\n if (name && listTags.hasOwnProperty(name) && prevItem) {\n prevItem.appendChild(child);\n child = prevItem;\n } else if (name == \"li\") {\n prevItem = child;\n } else if (name) {\n prevItem = null;\n }\n }\n}\n\n// Apply a CSS selector.\nfunction matches(dom, selector) {\n return (dom.matches || dom.msMatchesSelector || dom.webkitMatchesSelector || dom.mozMatchesSelector).call(dom, selector)\n}\n\n// : (string) → [string]\n// Tokenize a style attribute into property/value pairs.\nfunction parseStyles(style) {\n var re = /\\s*([\\w-]+)\\s*:\\s*([^;]+)/g, m, result = [];\n while (m = re.exec(style)) { result.push(m[1], m[2].trim()); }\n return result\n}\n\nfunction copy(obj) {\n var copy = {};\n for (var prop in obj) { copy[prop] = obj[prop]; }\n return copy\n}\n\n// Used when finding a mark at the top level of a fragment parse.\n// Checks whether it would be reasonable to apply a given mark type to\n// a given node, by looking at the way the mark occurs in the schema.\nfunction markMayApply(markType, nodeType) {\n var nodes = nodeType.schema.nodes;\n var loop = function ( name ) {\n var parent = nodes[name];\n if (!parent.allowsMarkType(markType)) { return }\n var seen = [], scan = function (match) {\n seen.push(match);\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n var next = ref.next;\n if (type == nodeType) { return true }\n if (seen.indexOf(next) < 0 && scan(next)) { return true }\n }\n };\n if (scan(parent.contentMatch)) { return { v: true } }\n };\n\n for (var name in nodes) {\n var returned = loop( name );\n\n if ( returned ) return returned.v;\n }\n}\n\nfunction findSameMarkInSet(mark, set) {\n for (var i = 0; i < set.length; i++) {\n if (mark.eq(set[i])) { return set[i] }\n }\n}\n\n// DOMOutputSpec:: interface\n// A description of a DOM structure. Can be either a string, which is\n// interpreted as a text node, a DOM node, which is interpreted as\n// itself, a `{dom: Node, contentDOM: ?Node}` object, or an array.\n//\n// An array describes a DOM element. The first value in the array\n// should be a string—the name of the DOM element, optionally prefixed\n// by a namespace URL and a space. If the second element is plain\n// object, it is interpreted as a set of attributes for the element.\n// Any elements after that (including the 2nd if it's not an attribute\n// object) are interpreted as children of the DOM elements, and must\n// either be valid `DOMOutputSpec` values, or the number zero.\n//\n// The number zero (pronounced “hole”) is used to indicate the place\n// where a node's child nodes should be inserted. If it occurs in an\n// output spec, it should be the only child element in its parent\n// node.\n\n// ::- A DOM serializer knows how to convert ProseMirror nodes and\n// marks of various types to DOM nodes.\nvar DOMSerializer = function DOMSerializer(nodes, marks) {\n // :: Object<(node: Node) → DOMOutputSpec>\n // The node serialization functions.\n this.nodes = nodes || {};\n // :: Object\n // The mark serialization functions.\n this.marks = marks || {};\n};\n\n// :: (Fragment, ?Object) → dom.DocumentFragment\n// Serialize the content of this fragment to a DOM fragment. When\n// not in the browser, the `document` option, containing a DOM\n// document, should be passed so that the serializer can create\n// nodes.\nDOMSerializer.prototype.serializeFragment = function serializeFragment (fragment, options, target) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n if (!target) { target = doc(options).createDocumentFragment(); }\n\n var top = target, active = null;\n fragment.forEach(function (node) {\n if (active || node.marks.length) {\n if (!active) { active = []; }\n var keep = 0, rendered = 0;\n while (keep < active.length && rendered < node.marks.length) {\n var next = node.marks[rendered];\n if (!this$1.marks[next.type.name]) { rendered++; continue }\n if (!next.eq(active[keep]) || next.type.spec.spanning === false) { break }\n keep += 2; rendered++;\n }\n while (keep < active.length) {\n top = active.pop();\n active.pop();\n }\n while (rendered < node.marks.length) {\n var add = node.marks[rendered++];\n var markDOM = this$1.serializeMark(add, node.isInline, options);\n if (markDOM) {\n active.push(add, top);\n top.appendChild(markDOM.dom);\n top = markDOM.contentDOM || markDOM.dom;\n }\n }\n }\n top.appendChild(this$1.serializeNode(node, options));\n });\n\n return target\n};\n\n// :: (Node, ?Object) → dom.Node\n// Serialize this node to a DOM node. This can be useful when you\n// need to serialize a part of a document, as opposed to the whole\n// document. To serialize a whole document, use\n// [`serializeFragment`](#model.DOMSerializer.serializeFragment) on\n// its [content](#model.Node.content).\nDOMSerializer.prototype.serializeNode = function serializeNode (node, options) {\n if ( options === void 0 ) options = {};\n\n var ref =\n DOMSerializer.renderSpec(doc(options), this.nodes[node.type.name](node));\n var dom = ref.dom;\n var contentDOM = ref.contentDOM;\n if (contentDOM) {\n if (node.isLeaf)\n { throw new RangeError(\"Content hole not allowed in a leaf node spec\") }\n if (options.onContent)\n { options.onContent(node, contentDOM, options); }\n else\n { this.serializeFragment(node.content, options, contentDOM); }\n }\n return dom\n};\n\nDOMSerializer.prototype.serializeNodeAndMarks = function serializeNodeAndMarks (node, options) {\n if ( options === void 0 ) options = {};\n\n var dom = this.serializeNode(node, options);\n for (var i = node.marks.length - 1; i >= 0; i--) {\n var wrap = this.serializeMark(node.marks[i], node.isInline, options);\n if (wrap) {\n(wrap.contentDOM || wrap.dom).appendChild(dom);\n dom = wrap.dom;\n }\n }\n return dom\n};\n\nDOMSerializer.prototype.serializeMark = function serializeMark (mark, inline, options) {\n if ( options === void 0 ) options = {};\n\n var toDOM = this.marks[mark.type.name];\n return toDOM && DOMSerializer.renderSpec(doc(options), toDOM(mark, inline))\n};\n\n// :: (dom.Document, DOMOutputSpec) → {dom: dom.Node, contentDOM: ?dom.Node}\n// Render an [output spec](#model.DOMOutputSpec) to a DOM node. If\n// the spec has a hole (zero) in it, `contentDOM` will point at the\n// node with the hole.\nDOMSerializer.renderSpec = function renderSpec (doc, structure, xmlNS) {\n if ( xmlNS === void 0 ) xmlNS = null;\n\n if (typeof structure == \"string\")\n { return {dom: doc.createTextNode(structure)} }\n if (structure.nodeType != null)\n { return {dom: structure} }\n if (structure.dom && structure.dom.nodeType != null)\n { return structure }\n var tagName = structure[0], space = tagName.indexOf(\" \");\n if (space > 0) {\n xmlNS = tagName.slice(0, space);\n tagName = tagName.slice(space + 1);\n }\n var contentDOM = null, dom = xmlNS ? doc.createElementNS(xmlNS, tagName) : doc.createElement(tagName);\n var attrs = structure[1], start = 1;\n if (attrs && typeof attrs == \"object\" && attrs.nodeType == null && !Array.isArray(attrs)) {\n start = 2;\n for (var name in attrs) { if (attrs[name] != null) {\n var space$1 = name.indexOf(\" \");\n if (space$1 > 0) { dom.setAttributeNS(name.slice(0, space$1), name.slice(space$1 + 1), attrs[name]); }\n else { dom.setAttribute(name, attrs[name]); }\n } }\n }\n for (var i = start; i < structure.length; i++) {\n var child = structure[i];\n if (child === 0) {\n if (i < structure.length - 1 || i > start)\n { throw new RangeError(\"Content hole must be the only child of its parent node\") }\n return {dom: dom, contentDOM: dom}\n } else {\n var ref = DOMSerializer.renderSpec(doc, child, xmlNS);\n var inner = ref.dom;\n var innerContent = ref.contentDOM;\n dom.appendChild(inner);\n if (innerContent) {\n if (contentDOM) { throw new RangeError(\"Multiple content holes\") }\n contentDOM = innerContent;\n }\n }\n }\n return {dom: dom, contentDOM: contentDOM}\n};\n\n// :: (Schema) → DOMSerializer\n// Build a serializer using the [`toDOM`](#model.NodeSpec.toDOM)\n// properties in a schema's node and mark specs.\nDOMSerializer.fromSchema = function fromSchema (schema) {\n return schema.cached.domSerializer ||\n (schema.cached.domSerializer = new DOMSerializer(this.nodesFromSchema(schema), this.marksFromSchema(schema)))\n};\n\n// : (Schema) → Object<(node: Node) → DOMOutputSpec>\n// Gather the serializers in a schema's node specs into an object.\n// This can be useful as a base to build a custom serializer from.\nDOMSerializer.nodesFromSchema = function nodesFromSchema (schema) {\n var result = gatherToDOM(schema.nodes);\n if (!result.text) { result.text = function (node) { return node.text; }; }\n return result\n};\n\n// : (Schema) → Object<(mark: Mark) → DOMOutputSpec>\n// Gather the serializers in a schema's mark specs into an object.\nDOMSerializer.marksFromSchema = function marksFromSchema (schema) {\n return gatherToDOM(schema.marks)\n};\n\nfunction gatherToDOM(obj) {\n var result = {};\n for (var name in obj) {\n var toDOM = obj[name].spec.toDOM;\n if (toDOM) { result[name] = toDOM; }\n }\n return result\n}\n\nfunction doc(options) {\n // declare global: window\n return options.document || window.document\n}\n\nexport { ContentMatch, DOMParser, DOMSerializer, Fragment, Mark, MarkType, Node, NodeRange, NodeType, ReplaceError, ResolvedPos, Schema, Slice };\n//# sourceMappingURL=index.es.js.map\n","import { ReplaceError, Slice, Fragment, MarkType } from 'prosemirror-model';\n\n// Mappable:: interface\n// There are several things that positions can be mapped through.\n// Such objects conform to this interface.\n//\n// map:: (pos: number, assoc: ?number) → number\n// Map a position through this object. When given, `assoc` (should\n// be -1 or 1, defaults to 1) determines with which side the\n// position is associated, which determines in which direction to\n// move when a chunk of content is inserted at the mapped position.\n//\n// mapResult:: (pos: number, assoc: ?number) → MapResult\n// Map a position, and return an object containing additional\n// information about the mapping. The result's `deleted` field tells\n// you whether the position was deleted (completely enclosed in a\n// replaced range) during the mapping. When content on only one side\n// is deleted, the position itself is only considered deleted when\n// `assoc` points in the direction of the deleted content.\n\n// Recovery values encode a range index and an offset. They are\n// represented as numbers, because tons of them will be created when\n// mapping, for example, a large number of decorations. The number's\n// lower 16 bits provide the index, the remaining bits the offset.\n//\n// Note: We intentionally don't use bit shift operators to en- and\n// decode these, since those clip to 32 bits, which we might in rare\n// cases want to overflow. A 64-bit float can represent 48-bit\n// integers precisely.\n\nvar lower16 = 0xffff;\nvar factor16 = Math.pow(2, 16);\n\nfunction makeRecover(index, offset) { return index + offset * factor16 }\nfunction recoverIndex(value) { return value & lower16 }\nfunction recoverOffset(value) { return (value - (value & lower16)) / factor16 }\n\n// ::- An object representing a mapped position with extra\n// information.\nvar MapResult = function MapResult(pos, deleted, recover) {\n if ( deleted === void 0 ) deleted = false;\n if ( recover === void 0 ) recover = null;\n\n // :: number The mapped version of the position.\n this.pos = pos;\n // :: bool Tells you whether the position was deleted, that is,\n // whether the step removed its surroundings from the document.\n this.deleted = deleted;\n this.recover = recover;\n};\n\n// :: class extends Mappable\n// A map describing the deletions and insertions made by a step, which\n// can be used to find the correspondence between positions in the\n// pre-step version of a document and the same position in the\n// post-step version.\nvar StepMap = function StepMap(ranges, inverted) {\n if ( inverted === void 0 ) inverted = false;\n\n this.ranges = ranges;\n this.inverted = inverted;\n};\n\nStepMap.prototype.recover = function recover (value) {\n var diff = 0, index = recoverIndex(value);\n if (!this.inverted) { for (var i = 0; i < index; i++)\n { diff += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1]; } }\n return this.ranges[index * 3] + diff + recoverOffset(value)\n};\n\n// : (number, ?number) → MapResult\nStepMap.prototype.mapResult = function mapResult (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, false) };\n\n// : (number, ?number) → number\nStepMap.prototype.map = function map (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, true) };\n\nStepMap.prototype._map = function _map (pos, assoc, simple) {\n var diff = 0, oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) { break }\n var oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex], end = start + oldSize;\n if (pos <= end) {\n var side = !oldSize ? assoc : pos == start ? -1 : pos == end ? 1 : assoc;\n var result = start + diff + (side < 0 ? 0 : newSize);\n if (simple) { return result }\n var recover = pos == (assoc < 0 ? start : end) ? null : makeRecover(i / 3, pos - start);\n return new MapResult(result, assoc < 0 ? pos != start : pos != end, recover)\n }\n diff += newSize - oldSize;\n }\n return simple ? pos + diff : new MapResult(pos + diff)\n};\n\nStepMap.prototype.touches = function touches (pos, recover) {\n var diff = 0, index = recoverIndex(recover);\n var oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i] - (this.inverted ? diff : 0);\n if (start > pos) { break }\n var oldSize = this.ranges[i + oldIndex], end = start + oldSize;\n if (pos <= end && i == index * 3) { return true }\n diff += this.ranges[i + newIndex] - oldSize;\n }\n return false\n};\n\n// :: ((oldStart: number, oldEnd: number, newStart: number, newEnd: number))\n// Calls the given function on each of the changed ranges included in\n// this map.\nStepMap.prototype.forEach = function forEach (f) {\n var oldIndex = this.inverted ? 2 : 1, newIndex = this.inverted ? 1 : 2;\n for (var i = 0, diff = 0; i < this.ranges.length; i += 3) {\n var start = this.ranges[i], oldStart = start - (this.inverted ? diff : 0), newStart = start + (this.inverted ? 0 : diff);\n var oldSize = this.ranges[i + oldIndex], newSize = this.ranges[i + newIndex];\n f(oldStart, oldStart + oldSize, newStart, newStart + newSize);\n diff += newSize - oldSize;\n }\n};\n\n// :: () → StepMap\n// Create an inverted version of this map. The result can be used to\n// map positions in the post-step document to the pre-step document.\nStepMap.prototype.invert = function invert () {\n return new StepMap(this.ranges, !this.inverted)\n};\n\nStepMap.prototype.toString = function toString () {\n return (this.inverted ? \"-\" : \"\") + JSON.stringify(this.ranges)\n};\n\n// :: (n: number) → StepMap\n// Create a map that moves all positions by offset `n` (which may be\n// negative). This can be useful when applying steps meant for a\n// sub-document to a larger document, or vice-versa.\nStepMap.offset = function offset (n) {\n return n == 0 ? StepMap.empty : new StepMap(n < 0 ? [0, -n, 0] : [0, 0, n])\n};\n\nStepMap.empty = new StepMap([]);\n\n// :: class extends Mappable\n// A mapping represents a pipeline of zero or more [step\n// maps](#transform.StepMap). It has special provisions for losslessly\n// handling mapping positions through a series of steps in which some\n// steps are inverted versions of earlier steps. (This comes up when\n// ‘[rebasing](/docs/guide/#transform.rebasing)’ steps for\n// collaboration or history management.)\nvar Mapping = function Mapping(maps, mirror, from, to) {\n // :: [StepMap]\n // The step maps in this mapping.\n this.maps = maps || [];\n // :: number\n // The starting position in the `maps` array, used when `map` or\n // `mapResult` is called.\n this.from = from || 0;\n // :: number\n // The end position in the `maps` array.\n this.to = to == null ? this.maps.length : to;\n this.mirror = mirror;\n};\n\n// :: (?number, ?number) → Mapping\n// Create a mapping that maps only through a part of this one.\nMapping.prototype.slice = function slice (from, to) {\n if ( from === void 0 ) from = 0;\n if ( to === void 0 ) to = this.maps.length;\n\n return new Mapping(this.maps, this.mirror, from, to)\n};\n\nMapping.prototype.copy = function copy () {\n return new Mapping(this.maps.slice(), this.mirror && this.mirror.slice(), this.from, this.to)\n};\n\n// :: (StepMap, ?number)\n// Add a step map to the end of this mapping. If `mirrors` is\n// given, it should be the index of the step map that is the mirror\n// image of this one.\nMapping.prototype.appendMap = function appendMap (map, mirrors) {\n this.to = this.maps.push(map);\n if (mirrors != null) { this.setMirror(this.maps.length - 1, mirrors); }\n};\n\n// :: (Mapping)\n// Add all the step maps in a given mapping to this one (preserving\n// mirroring information).\nMapping.prototype.appendMapping = function appendMapping (mapping) {\n for (var i = 0, startSize = this.maps.length; i < mapping.maps.length; i++) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i], mirr != null && mirr < i ? startSize + mirr : null);\n }\n};\n\n// :: (number) → ?number\n// Finds the offset of the step map that mirrors the map at the\n// given offset, in this mapping (as per the second argument to\n// `appendMap`).\nMapping.prototype.getMirror = function getMirror (n) {\n if (this.mirror) { for (var i = 0; i < this.mirror.length; i++)\n { if (this.mirror[i] == n) { return this.mirror[i + (i % 2 ? -1 : 1)] } } }\n};\n\nMapping.prototype.setMirror = function setMirror (n, m) {\n if (!this.mirror) { this.mirror = []; }\n this.mirror.push(n, m);\n};\n\n// :: (Mapping)\n// Append the inverse of the given mapping to this one.\nMapping.prototype.appendMappingInverted = function appendMappingInverted (mapping) {\n for (var i = mapping.maps.length - 1, totalSize = this.maps.length + mapping.maps.length; i >= 0; i--) {\n var mirr = mapping.getMirror(i);\n this.appendMap(mapping.maps[i].invert(), mirr != null && mirr > i ? totalSize - mirr - 1 : null);\n }\n};\n\n// :: () → Mapping\n// Create an inverted version of this mapping.\nMapping.prototype.invert = function invert () {\n var inverse = new Mapping;\n inverse.appendMappingInverted(this);\n return inverse\n};\n\n// : (number, ?number) → number\n// Map a position through this mapping.\nMapping.prototype.map = function map (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n\n if (this.mirror) { return this._map(pos, assoc, true) }\n for (var i = this.from; i < this.to; i++)\n { pos = this.maps[i].map(pos, assoc); }\n return pos\n};\n\n// : (number, ?number) → MapResult\n// Map a position through this mapping, returning a mapping\n// result.\nMapping.prototype.mapResult = function mapResult (pos, assoc) {\n if ( assoc === void 0 ) assoc = 1;\n return this._map(pos, assoc, false) };\n\nMapping.prototype._map = function _map (pos, assoc, simple) {\n var deleted = false;\n\n for (var i = this.from; i < this.to; i++) {\n var map = this.maps[i], result = map.mapResult(pos, assoc);\n if (result.recover != null) {\n var corr = this.getMirror(i);\n if (corr != null && corr > i && corr < this.to) {\n i = corr;\n pos = this.maps[corr].recover(result.recover);\n continue\n }\n }\n\n if (result.deleted) { deleted = true; }\n pos = result.pos;\n }\n\n return simple ? pos : new MapResult(pos, deleted)\n};\n\nfunction TransformError(message) {\n var err = Error.call(this, message);\n err.__proto__ = TransformError.prototype;\n return err\n}\n\nTransformError.prototype = Object.create(Error.prototype);\nTransformError.prototype.constructor = TransformError;\nTransformError.prototype.name = \"TransformError\";\n\n// ::- Abstraction to build up and track an array of\n// [steps](#transform.Step) representing a document transformation.\n//\n// Most transforming methods return the `Transform` object itself, so\n// that they can be chained.\nvar Transform = function Transform(doc) {\n // :: Node\n // The current document (the result of applying the steps in the\n // transform).\n this.doc = doc;\n // :: [Step]\n // The steps in this transform.\n this.steps = [];\n // :: [Node]\n // The documents before each of the steps.\n this.docs = [];\n // :: Mapping\n // A mapping with the maps for each of the steps in this transform.\n this.mapping = new Mapping;\n};\n\nvar prototypeAccessors = { before: { configurable: true },docChanged: { configurable: true } };\n\n// :: Node The starting document.\nprototypeAccessors.before.get = function () { return this.docs.length ? this.docs[0] : this.doc };\n\n// :: (step: Step) → this\n// Apply a new step in this transform, saving the result. Throws an\n// error when the step fails.\nTransform.prototype.step = function step (object) {\n var result = this.maybeStep(object);\n if (result.failed) { throw new TransformError(result.failed) }\n return this\n};\n\n// :: (Step) → StepResult\n// Try to apply a step in this transformation, ignoring it if it\n// fails. Returns the step result.\nTransform.prototype.maybeStep = function maybeStep (step) {\n var result = step.apply(this.doc);\n if (!result.failed) { this.addStep(step, result.doc); }\n return result\n};\n\n// :: bool\n// True when the document has been changed (when there are any\n// steps).\nprototypeAccessors.docChanged.get = function () {\n return this.steps.length > 0\n};\n\nTransform.prototype.addStep = function addStep (step, doc) {\n this.docs.push(this.doc);\n this.steps.push(step);\n this.mapping.appendMap(step.getMap());\n this.doc = doc;\n};\n\nObject.defineProperties( Transform.prototype, prototypeAccessors );\n\nfunction mustOverride() { throw new Error(\"Override me\") }\n\nvar stepsByID = Object.create(null);\n\n// ::- A step object represents an atomic change. It generally applies\n// only to the document it was created for, since the positions\n// stored in it will only make sense for that document.\n//\n// New steps are defined by creating classes that extend `Step`,\n// overriding the `apply`, `invert`, `map`, `getMap` and `fromJSON`\n// methods, and registering your class with a unique\n// JSON-serialization identifier using\n// [`Step.jsonID`](#transform.Step^jsonID).\nvar Step = function Step () {};\n\nStep.prototype.apply = function apply (_doc) { return mustOverride() };\n\n// :: () → StepMap\n// Get the step map that represents the changes made by this step,\n// and which can be used to transform between positions in the old\n// and the new document.\nStep.prototype.getMap = function getMap () { return StepMap.empty };\n\n// :: (doc: Node) → Step\n// Create an inverted version of this step. Needs the document as it\n// was before the step as argument.\nStep.prototype.invert = function invert (_doc) { return mustOverride() };\n\n// :: (mapping: Mappable) → ?Step\n// Map this step through a mappable thing, returning either a\n// version of that step with its positions adjusted, or `null` if\n// the step was entirely deleted by the mapping.\nStep.prototype.map = function map (_mapping) { return mustOverride() };\n\n// :: (other: Step) → ?Step\n// Try to merge this step with another one, to be applied directly\n// after it. Returns the merged step when possible, null if the\n// steps can't be merged.\nStep.prototype.merge = function merge (_other) { return null };\n\n// :: () → Object\n// Create a JSON-serializeable representation of this step. When\n// defining this for a custom subclass, make sure the result object\n// includes the step type's [JSON id](#transform.Step^jsonID) under\n// the `stepType` property.\nStep.prototype.toJSON = function toJSON () { return mustOverride() };\n\n// :: (Schema, Object) → Step\n// Deserialize a step from its JSON representation. Will call\n// through to the step class' own implementation of this method.\nStep.fromJSON = function fromJSON (schema, json) {\n if (!json || !json.stepType) { throw new RangeError(\"Invalid input for Step.fromJSON\") }\n var type = stepsByID[json.stepType];\n if (!type) { throw new RangeError((\"No step type \" + (json.stepType) + \" defined\")) }\n return type.fromJSON(schema, json)\n};\n\n// :: (string, constructor)\n// To be able to serialize steps to JSON, each step needs a string\n// ID to attach to its JSON representation. Use this method to\n// register an ID for your step classes. Try to pick something\n// that's unlikely to clash with steps from other modules.\nStep.jsonID = function jsonID (id, stepClass) {\n if (id in stepsByID) { throw new RangeError(\"Duplicate use of step JSON ID \" + id) }\n stepsByID[id] = stepClass;\n stepClass.prototype.jsonID = id;\n return stepClass\n};\n\n// ::- The result of [applying](#transform.Step.apply) a step. Contains either a\n// new document or a failure value.\nvar StepResult = function StepResult(doc, failed) {\n // :: ?Node The transformed document.\n this.doc = doc;\n // :: ?string Text providing information about a failed step.\n this.failed = failed;\n};\n\n// :: (Node) → StepResult\n// Create a successful step result.\nStepResult.ok = function ok (doc) { return new StepResult(doc, null) };\n\n// :: (string) → StepResult\n// Create a failed step result.\nStepResult.fail = function fail (message) { return new StepResult(null, message) };\n\n// :: (Node, number, number, Slice) → StepResult\n// Call [`Node.replace`](#model.Node.replace) with the given\n// arguments. Create a successful result if it succeeds, and a\n// failed one if it throws a `ReplaceError`.\nStepResult.fromReplace = function fromReplace (doc, from, to, slice) {\n try {\n return StepResult.ok(doc.replace(from, to, slice))\n } catch (e) {\n if (e instanceof ReplaceError) { return StepResult.fail(e.message) }\n throw e\n }\n};\n\n// ::- Replace a part of the document with a slice of new content.\nvar ReplaceStep = /*@__PURE__*/(function (Step) {\n function ReplaceStep(from, to, slice, structure) {\n Step.call(this);\n // :: number\n // The start position of the replaced range.\n this.from = from;\n // :: number\n // The end position of the replaced range.\n this.to = to;\n // :: Slice\n // The slice to insert.\n this.slice = slice;\n this.structure = !!structure;\n }\n\n if ( Step ) ReplaceStep.__proto__ = Step;\n ReplaceStep.prototype = Object.create( Step && Step.prototype );\n ReplaceStep.prototype.constructor = ReplaceStep;\n\n ReplaceStep.prototype.apply = function apply (doc) {\n if (this.structure && contentBetween(doc, this.from, this.to))\n { return StepResult.fail(\"Structure replace would overwrite content\") }\n return StepResult.fromReplace(doc, this.from, this.to, this.slice)\n };\n\n ReplaceStep.prototype.getMap = function getMap () {\n return new StepMap([this.from, this.to - this.from, this.slice.size])\n };\n\n ReplaceStep.prototype.invert = function invert (doc) {\n return new ReplaceStep(this.from, this.from + this.slice.size, doc.slice(this.from, this.to))\n };\n\n ReplaceStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted) { return null }\n return new ReplaceStep(from.pos, Math.max(from.pos, to.pos), this.slice)\n };\n\n ReplaceStep.prototype.merge = function merge (other) {\n if (!(other instanceof ReplaceStep) || other.structure || this.structure) { return null }\n\n if (this.from + this.slice.size == other.from && !this.slice.openEnd && !other.slice.openStart) {\n var slice = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(this.slice.content.append(other.slice.content), this.slice.openStart, other.slice.openEnd);\n return new ReplaceStep(this.from, this.to + (other.to - other.from), slice, this.structure)\n } else if (other.to == this.from && !this.slice.openStart && !other.slice.openEnd) {\n var slice$1 = this.slice.size + other.slice.size == 0 ? Slice.empty\n : new Slice(other.slice.content.append(this.slice.content), other.slice.openStart, this.slice.openEnd);\n return new ReplaceStep(other.from, this.to, slice$1, this.structure)\n } else {\n return null\n }\n };\n\n ReplaceStep.prototype.toJSON = function toJSON () {\n var json = {stepType: \"replace\", from: this.from, to: this.to};\n if (this.slice.size) { json.slice = this.slice.toJSON(); }\n if (this.structure) { json.structure = true; }\n return json\n };\n\n ReplaceStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for ReplaceStep.fromJSON\") }\n return new ReplaceStep(json.from, json.to, Slice.fromJSON(schema, json.slice), !!json.structure)\n };\n\n return ReplaceStep;\n}(Step));\n\nStep.jsonID(\"replace\", ReplaceStep);\n\n// ::- Replace a part of the document with a slice of content, but\n// preserve a range of the replaced content by moving it into the\n// slice.\nvar ReplaceAroundStep = /*@__PURE__*/(function (Step) {\n function ReplaceAroundStep(from, to, gapFrom, gapTo, slice, insert, structure) {\n Step.call(this);\n // :: number\n // The start position of the replaced range.\n this.from = from;\n // :: number\n // The end position of the replaced range.\n this.to = to;\n // :: number\n // The start of preserved range.\n this.gapFrom = gapFrom;\n // :: number\n // The end of preserved range.\n this.gapTo = gapTo;\n // :: Slice\n // The slice to insert.\n this.slice = slice;\n // :: number\n // The position in the slice where the preserved range should be\n // inserted.\n this.insert = insert;\n this.structure = !!structure;\n }\n\n if ( Step ) ReplaceAroundStep.__proto__ = Step;\n ReplaceAroundStep.prototype = Object.create( Step && Step.prototype );\n ReplaceAroundStep.prototype.constructor = ReplaceAroundStep;\n\n ReplaceAroundStep.prototype.apply = function apply (doc) {\n if (this.structure && (contentBetween(doc, this.from, this.gapFrom) ||\n contentBetween(doc, this.gapTo, this.to)))\n { return StepResult.fail(\"Structure gap-replace would overwrite content\") }\n\n var gap = doc.slice(this.gapFrom, this.gapTo);\n if (gap.openStart || gap.openEnd)\n { return StepResult.fail(\"Gap is not a flat range\") }\n var inserted = this.slice.insertAt(this.insert, gap.content);\n if (!inserted) { return StepResult.fail(\"Content does not fit in gap\") }\n return StepResult.fromReplace(doc, this.from, this.to, inserted)\n };\n\n ReplaceAroundStep.prototype.getMap = function getMap () {\n return new StepMap([this.from, this.gapFrom - this.from, this.insert,\n this.gapTo, this.to - this.gapTo, this.slice.size - this.insert])\n };\n\n ReplaceAroundStep.prototype.invert = function invert (doc) {\n var gap = this.gapTo - this.gapFrom;\n return new ReplaceAroundStep(this.from, this.from + this.slice.size + gap,\n this.from + this.insert, this.from + this.insert + gap,\n doc.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from),\n this.gapFrom - this.from, this.structure)\n };\n\n ReplaceAroundStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n var gapFrom = mapping.map(this.gapFrom, -1), gapTo = mapping.map(this.gapTo, 1);\n if ((from.deleted && to.deleted) || gapFrom < from.pos || gapTo > to.pos) { return null }\n return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure)\n };\n\n ReplaceAroundStep.prototype.toJSON = function toJSON () {\n var json = {stepType: \"replaceAround\", from: this.from, to: this.to,\n gapFrom: this.gapFrom, gapTo: this.gapTo, insert: this.insert};\n if (this.slice.size) { json.slice = this.slice.toJSON(); }\n if (this.structure) { json.structure = true; }\n return json\n };\n\n ReplaceAroundStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\" ||\n typeof json.gapFrom != \"number\" || typeof json.gapTo != \"number\" || typeof json.insert != \"number\")\n { throw new RangeError(\"Invalid input for ReplaceAroundStep.fromJSON\") }\n return new ReplaceAroundStep(json.from, json.to, json.gapFrom, json.gapTo,\n Slice.fromJSON(schema, json.slice), json.insert, !!json.structure)\n };\n\n return ReplaceAroundStep;\n}(Step));\n\nStep.jsonID(\"replaceAround\", ReplaceAroundStep);\n\nfunction contentBetween(doc, from, to) {\n var $from = doc.resolve(from), dist = to - from, depth = $from.depth;\n while (dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount) {\n depth--;\n dist--;\n }\n if (dist > 0) {\n var next = $from.node(depth).maybeChild($from.indexAfter(depth));\n while (dist > 0) {\n if (!next || next.isLeaf) { return true }\n next = next.firstChild;\n dist--;\n }\n }\n return false\n}\n\nfunction canCut(node, start, end) {\n return (start == 0 || node.canReplace(start, node.childCount)) &&\n (end == node.childCount || node.canReplace(0, end))\n}\n\n// :: (NodeRange) → ?number\n// Try to find a target depth to which the content in the given range\n// can be lifted. Will not go across\n// [isolating](#model.NodeSpec.isolating) parent nodes.\nfunction liftTarget(range) {\n var parent = range.parent;\n var content = parent.content.cutByIndex(range.startIndex, range.endIndex);\n for (var depth = range.depth;; --depth) {\n var node = range.$from.node(depth);\n var index = range.$from.index(depth), endIndex = range.$to.indexAfter(depth);\n if (depth < range.depth && node.canReplace(index, endIndex, content))\n { return depth }\n if (depth == 0 || node.type.spec.isolating || !canCut(node, index, endIndex)) { break }\n }\n}\n\n// :: (NodeRange, number) → this\n// Split the content in the given range off from its parent, if there\n// is sibling content before or after it, and move it up the tree to\n// the depth specified by `target`. You'll probably want to use\n// [`liftTarget`](#transform.liftTarget) to compute `target`, to make\n// sure the lift is valid.\nTransform.prototype.lift = function(range, target) {\n var $from = range.$from;\n var $to = range.$to;\n var depth = range.depth;\n\n var gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);\n var start = gapStart, end = gapEnd;\n\n var before = Fragment.empty, openStart = 0;\n for (var d = depth, splitting = false; d > target; d--)\n { if (splitting || $from.index(d) > 0) {\n splitting = true;\n before = Fragment.from($from.node(d).copy(before));\n openStart++;\n } else {\n start--;\n } }\n var after = Fragment.empty, openEnd = 0;\n for (var d$1 = depth, splitting$1 = false; d$1 > target; d$1--)\n { if (splitting$1 || $to.after(d$1 + 1) < $to.end(d$1)) {\n splitting$1 = true;\n after = Fragment.from($to.node(d$1).copy(after));\n openEnd++;\n } else {\n end++;\n } }\n\n return this.step(new ReplaceAroundStep(start, end, gapStart, gapEnd,\n new Slice(before.append(after), openStart, openEnd),\n before.size - openStart, true))\n};\n\n// :: (NodeRange, NodeType, ?Object, ?NodeRange) → ?[{type: NodeType, attrs: ?Object}]\n// Try to find a valid way to wrap the content in the given range in a\n// node of the given type. May introduce extra nodes around and inside\n// the wrapper node, if necessary. Returns null if no valid wrapping\n// could be found. When `innerRange` is given, that range's content is\n// used as the content to fit into the wrapping, instead of the\n// content of `range`.\nfunction findWrapping(range, nodeType, attrs, innerRange) {\n if ( innerRange === void 0 ) innerRange = range;\n\n var around = findWrappingOutside(range, nodeType);\n var inner = around && findWrappingInside(innerRange, nodeType);\n if (!inner) { return null }\n return around.map(withAttrs).concat({type: nodeType, attrs: attrs}).concat(inner.map(withAttrs))\n}\n\nfunction withAttrs(type) { return {type: type, attrs: null} }\n\nfunction findWrappingOutside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var around = parent.contentMatchAt(startIndex).findWrapping(type);\n if (!around) { return null }\n var outer = around.length ? around[0] : type;\n return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null\n}\n\nfunction findWrappingInside(range, type) {\n var parent = range.parent;\n var startIndex = range.startIndex;\n var endIndex = range.endIndex;\n var inner = parent.child(startIndex);\n var inside = type.contentMatch.findWrapping(inner.type);\n if (!inside) { return null }\n var lastType = inside.length ? inside[inside.length - 1] : type;\n var innerMatch = lastType.contentMatch;\n for (var i = startIndex; innerMatch && i < endIndex; i++)\n { innerMatch = innerMatch.matchType(parent.child(i).type); }\n if (!innerMatch || !innerMatch.validEnd) { return null }\n return inside\n}\n\n// :: (NodeRange, [{type: NodeType, attrs: ?Object}]) → this\n// Wrap the given [range](#model.NodeRange) in the given set of wrappers.\n// The wrappers are assumed to be valid in this position, and should\n// probably be computed with [`findWrapping`](#transform.findWrapping).\nTransform.prototype.wrap = function(range, wrappers) {\n var content = Fragment.empty;\n for (var i = wrappers.length - 1; i >= 0; i--)\n { content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content)); }\n\n var start = range.start, end = range.end;\n return this.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true))\n};\n\n// :: (number, ?number, NodeType, ?Object) → this\n// Set the type of all textblocks (partly) between `from` and `to` to\n// the given node type with the given attributes.\nTransform.prototype.setBlockType = function(from, to, type, attrs) {\n var this$1 = this;\n if ( to === void 0 ) to = from;\n\n if (!type.isTextblock) { throw new RangeError(\"Type given to setBlockType should be a textblock\") }\n var mapFrom = this.steps.length;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (node.isTextblock && !node.hasMarkup(type, attrs) && canChangeType(this$1.doc, this$1.mapping.slice(mapFrom).map(pos), type)) {\n // Ensure all markup that isn't allowed in the new node type is cleared\n this$1.clearIncompatible(this$1.mapping.slice(mapFrom).map(pos, 1), type);\n var mapping = this$1.mapping.slice(mapFrom);\n var startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);\n this$1.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1,\n new Slice(Fragment.from(type.create(attrs, null, node.marks)), 0, 0), 1, true));\n return false\n }\n });\n return this\n};\n\nfunction canChangeType(doc, pos, type) {\n var $pos = doc.resolve(pos), index = $pos.index();\n return $pos.parent.canReplaceWith(index, index + 1, type)\n}\n\n// :: (number, ?NodeType, ?Object, ?[Mark]) → this\n// Change the type, attributes, and/or marks of the node at `pos`.\n// When `type` isn't given, the existing node type is preserved,\nTransform.prototype.setNodeMarkup = function(pos, type, attrs, marks) {\n var node = this.doc.nodeAt(pos);\n if (!node) { throw new RangeError(\"No node at given position\") }\n if (!type) { type = node.type; }\n var newNode = type.create(attrs, null, marks || node.marks);\n if (node.isLeaf)\n { return this.replaceWith(pos, pos + node.nodeSize, newNode) }\n\n if (!type.validContent(node.content))\n { throw new RangeError(\"Invalid content for node type \" + type.name) }\n\n return this.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1,\n new Slice(Fragment.from(newNode), 0, 0), 1, true))\n};\n\n// :: (Node, number, number, ?[?{type: NodeType, attrs: ?Object}]) → bool\n// Check whether splitting at the given position is allowed.\nfunction canSplit(doc, pos, depth, typesAfter) {\n if ( depth === void 0 ) depth = 1;\n\n var $pos = doc.resolve(pos), base = $pos.depth - depth;\n var innerType = (typesAfter && typesAfter[typesAfter.length - 1]) || $pos.parent;\n if (base < 0 || $pos.parent.type.spec.isolating ||\n !$pos.parent.canReplace($pos.index(), $pos.parent.childCount) ||\n !innerType.type.validContent($pos.parent.content.cutByIndex($pos.index(), $pos.parent.childCount)))\n { return false }\n for (var d = $pos.depth - 1, i = depth - 2; d > base; d--, i--) {\n var node = $pos.node(d), index$1 = $pos.index(d);\n if (node.type.spec.isolating) { return false }\n var rest = node.content.cutByIndex(index$1, node.childCount);\n var after = (typesAfter && typesAfter[i]) || node;\n if (after != node) { rest = rest.replaceChild(0, after.type.create(after.attrs)); }\n if (!node.canReplace(index$1 + 1, node.childCount) || !after.type.validContent(rest))\n { return false }\n }\n var index = $pos.indexAfter(base);\n var baseType = typesAfter && typesAfter[0];\n return $pos.node(base).canReplaceWith(index, index, baseType ? baseType.type : $pos.node(base + 1).type)\n}\n\n// :: (number, ?number, ?[?{type: NodeType, attrs: ?Object}]) → this\n// Split the node at the given position, and optionally, if `depth` is\n// greater than one, any number of nodes above that. By default, the\n// parts split off will inherit the node type of the original node.\n// This can be changed by passing an array of types and attributes to\n// use after the split.\nTransform.prototype.split = function(pos, depth, typesAfter) {\n if ( depth === void 0 ) depth = 1;\n\n var $pos = this.doc.resolve(pos), before = Fragment.empty, after = Fragment.empty;\n for (var d = $pos.depth, e = $pos.depth - depth, i = depth - 1; d > e; d--, i--) {\n before = Fragment.from($pos.node(d).copy(before));\n var typeAfter = typesAfter && typesAfter[i];\n after = Fragment.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d).copy(after));\n }\n return this.step(new ReplaceStep(pos, pos, new Slice(before.append(after), depth, depth), true))\n};\n\n// :: (Node, number) → bool\n// Test whether the blocks before and after a given position can be\n// joined.\nfunction canJoin(doc, pos) {\n var $pos = doc.resolve(pos), index = $pos.index();\n return joinable($pos.nodeBefore, $pos.nodeAfter) &&\n $pos.parent.canReplace(index, index + 1)\n}\n\nfunction joinable(a, b) {\n return a && b && !a.isLeaf && a.canAppend(b)\n}\n\n// :: (Node, number, ?number) → ?number\n// Find an ancestor of the given position that can be joined to the\n// block before (or after if `dir` is positive). Returns the joinable\n// point, if any.\nfunction joinPoint(doc, pos, dir) {\n if ( dir === void 0 ) dir = -1;\n\n var $pos = doc.resolve(pos);\n for (var d = $pos.depth;; d--) {\n var before = (void 0), after = (void 0), index = $pos.index(d);\n if (d == $pos.depth) {\n before = $pos.nodeBefore;\n after = $pos.nodeAfter;\n } else if (dir > 0) {\n before = $pos.node(d + 1);\n index++;\n after = $pos.node(d).maybeChild(index);\n } else {\n before = $pos.node(d).maybeChild(index - 1);\n after = $pos.node(d + 1);\n }\n if (before && !before.isTextblock && joinable(before, after) &&\n $pos.node(d).canReplace(index, index + 1)) { return pos }\n if (d == 0) { break }\n pos = dir < 0 ? $pos.before(d) : $pos.after(d);\n }\n}\n\n// :: (number, ?number) → this\n// Join the blocks around the given position. If depth is 2, their\n// last and first siblings are also joined, and so on.\nTransform.prototype.join = function(pos, depth) {\n if ( depth === void 0 ) depth = 1;\n\n var step = new ReplaceStep(pos - depth, pos + depth, Slice.empty, true);\n return this.step(step)\n};\n\n// :: (Node, number, NodeType) → ?number\n// Try to find a point where a node of the given type can be inserted\n// near `pos`, by searching up the node hierarchy when `pos` itself\n// isn't a valid place but is at the start or end of a node. Return\n// null if no position was found.\nfunction insertPoint(doc, pos, nodeType) {\n var $pos = doc.resolve(pos);\n if ($pos.parent.canReplaceWith($pos.index(), $pos.index(), nodeType)) { return pos }\n\n if ($pos.parentOffset == 0)\n { for (var d = $pos.depth - 1; d >= 0; d--) {\n var index = $pos.index(d);\n if ($pos.node(d).canReplaceWith(index, index, nodeType)) { return $pos.before(d + 1) }\n if (index > 0) { return null }\n } }\n if ($pos.parentOffset == $pos.parent.content.size)\n { for (var d$1 = $pos.depth - 1; d$1 >= 0; d$1--) {\n var index$1 = $pos.indexAfter(d$1);\n if ($pos.node(d$1).canReplaceWith(index$1, index$1, nodeType)) { return $pos.after(d$1 + 1) }\n if (index$1 < $pos.node(d$1).childCount) { return null }\n } }\n}\n\n// :: (Node, number, Slice) → ?number\n// Finds a position at or around the given position where the given\n// slice can be inserted. Will look at parent nodes' nearest boundary\n// and try there, even if the original position wasn't directly at the\n// start or end of that node. Returns null when no position was found.\nfunction dropPoint(doc, pos, slice) {\n var $pos = doc.resolve(pos);\n if (!slice.content.size) { return pos }\n var content = slice.content;\n for (var i = 0; i < slice.openStart; i++) { content = content.firstChild.content; }\n for (var pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) {\n for (var d = $pos.depth; d >= 0; d--) {\n var bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1;\n var insertPos = $pos.index(d) + (bias > 0 ? 1 : 0);\n var parent = $pos.node(d), fits = false;\n if (pass == 1) {\n fits = parent.canReplace(insertPos, insertPos, content);\n } else {\n var wrapping = parent.contentMatchAt(insertPos).findWrapping(content.firstChild.type);\n fits = wrapping && parent.canReplaceWith(insertPos, insertPos, wrapping[0]);\n }\n if (fits)\n { return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1) }\n }\n }\n return null\n}\n\nfunction mapFragment(fragment, f, parent) {\n var mapped = [];\n for (var i = 0; i < fragment.childCount; i++) {\n var child = fragment.child(i);\n if (child.content.size) { child = child.copy(mapFragment(child.content, f, child)); }\n if (child.isInline) { child = f(child, parent, i); }\n mapped.push(child);\n }\n return Fragment.fromArray(mapped)\n}\n\n// ::- Add a mark to all inline content between two positions.\nvar AddMarkStep = /*@__PURE__*/(function (Step) {\n function AddMarkStep(from, to, mark) {\n Step.call(this);\n // :: number\n // The start of the marked range.\n this.from = from;\n // :: number\n // The end of the marked range.\n this.to = to;\n // :: Mark\n // The mark to add.\n this.mark = mark;\n }\n\n if ( Step ) AddMarkStep.__proto__ = Step;\n AddMarkStep.prototype = Object.create( Step && Step.prototype );\n AddMarkStep.prototype.constructor = AddMarkStep;\n\n AddMarkStep.prototype.apply = function apply (doc) {\n var this$1 = this;\n\n var oldSlice = doc.slice(this.from, this.to), $from = doc.resolve(this.from);\n var parent = $from.node($from.sharedDepth(this.to));\n var slice = new Slice(mapFragment(oldSlice.content, function (node, parent) {\n if (!node.isAtom || !parent.type.allowsMarkType(this$1.mark.type)) { return node }\n return node.mark(this$1.mark.addToSet(node.marks))\n }, parent), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice)\n };\n\n AddMarkStep.prototype.invert = function invert () {\n return new RemoveMarkStep(this.from, this.to, this.mark)\n };\n\n AddMarkStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) { return null }\n return new AddMarkStep(from.pos, to.pos, this.mark)\n };\n\n AddMarkStep.prototype.merge = function merge (other) {\n if (other instanceof AddMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n { return new AddMarkStep(Math.min(this.from, other.from),\n Math.max(this.to, other.to), this.mark) }\n };\n\n AddMarkStep.prototype.toJSON = function toJSON () {\n return {stepType: \"addMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to}\n };\n\n AddMarkStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for AddMarkStep.fromJSON\") }\n return new AddMarkStep(json.from, json.to, schema.markFromJSON(json.mark))\n };\n\n return AddMarkStep;\n}(Step));\n\nStep.jsonID(\"addMark\", AddMarkStep);\n\n// ::- Remove a mark from all inline content between two positions.\nvar RemoveMarkStep = /*@__PURE__*/(function (Step) {\n function RemoveMarkStep(from, to, mark) {\n Step.call(this);\n // :: number\n // The start of the unmarked range.\n this.from = from;\n // :: number\n // The end of the unmarked range.\n this.to = to;\n // :: Mark\n // The mark to remove.\n this.mark = mark;\n }\n\n if ( Step ) RemoveMarkStep.__proto__ = Step;\n RemoveMarkStep.prototype = Object.create( Step && Step.prototype );\n RemoveMarkStep.prototype.constructor = RemoveMarkStep;\n\n RemoveMarkStep.prototype.apply = function apply (doc) {\n var this$1 = this;\n\n var oldSlice = doc.slice(this.from, this.to);\n var slice = new Slice(mapFragment(oldSlice.content, function (node) {\n return node.mark(this$1.mark.removeFromSet(node.marks))\n }), oldSlice.openStart, oldSlice.openEnd);\n return StepResult.fromReplace(doc, this.from, this.to, slice)\n };\n\n RemoveMarkStep.prototype.invert = function invert () {\n return new AddMarkStep(this.from, this.to, this.mark)\n };\n\n RemoveMarkStep.prototype.map = function map (mapping) {\n var from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);\n if (from.deleted && to.deleted || from.pos >= to.pos) { return null }\n return new RemoveMarkStep(from.pos, to.pos, this.mark)\n };\n\n RemoveMarkStep.prototype.merge = function merge (other) {\n if (other instanceof RemoveMarkStep &&\n other.mark.eq(this.mark) &&\n this.from <= other.to && this.to >= other.from)\n { return new RemoveMarkStep(Math.min(this.from, other.from),\n Math.max(this.to, other.to), this.mark) }\n };\n\n RemoveMarkStep.prototype.toJSON = function toJSON () {\n return {stepType: \"removeMark\", mark: this.mark.toJSON(),\n from: this.from, to: this.to}\n };\n\n RemoveMarkStep.fromJSON = function fromJSON (schema, json) {\n if (typeof json.from != \"number\" || typeof json.to != \"number\")\n { throw new RangeError(\"Invalid input for RemoveMarkStep.fromJSON\") }\n return new RemoveMarkStep(json.from, json.to, schema.markFromJSON(json.mark))\n };\n\n return RemoveMarkStep;\n}(Step));\n\nStep.jsonID(\"removeMark\", RemoveMarkStep);\n\n// :: (number, number, Mark) → this\n// Add the given mark to the inline content between `from` and `to`.\nTransform.prototype.addMark = function(from, to, mark) {\n var this$1 = this;\n\n var removed = [], added = [], removing = null, adding = null;\n this.doc.nodesBetween(from, to, function (node, pos, parent) {\n if (!node.isInline) { return }\n var marks = node.marks;\n if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {\n var start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);\n var newSet = mark.addToSet(marks);\n\n for (var i = 0; i < marks.length; i++) {\n if (!marks[i].isInSet(newSet)) {\n if (removing && removing.to == start && removing.mark.eq(marks[i]))\n { removing.to = end; }\n else\n { removed.push(removing = new RemoveMarkStep(start, end, marks[i])); }\n }\n }\n\n if (adding && adding.to == start)\n { adding.to = end; }\n else\n { added.push(adding = new AddMarkStep(start, end, mark)); }\n }\n });\n\n removed.forEach(function (s) { return this$1.step(s); });\n added.forEach(function (s) { return this$1.step(s); });\n return this\n};\n\n// :: (number, number, ?union) → this\n// Remove marks from inline nodes between `from` and `to`. When `mark`\n// is a single mark, remove precisely that mark. When it is a mark type,\n// remove all marks of that type. When it is null, remove all marks of\n// any type.\nTransform.prototype.removeMark = function(from, to, mark) {\n var this$1 = this;\n if ( mark === void 0 ) mark = null;\n\n var matched = [], step = 0;\n this.doc.nodesBetween(from, to, function (node, pos) {\n if (!node.isInline) { return }\n step++;\n var toRemove = null;\n if (mark instanceof MarkType) {\n var set = node.marks, found;\n while (found = mark.isInSet(set)) {\n(toRemove || (toRemove = [])).push(found);\n set = found.removeFromSet(set);\n }\n } else if (mark) {\n if (mark.isInSet(node.marks)) { toRemove = [mark]; }\n } else {\n toRemove = node.marks;\n }\n if (toRemove && toRemove.length) {\n var end = Math.min(pos + node.nodeSize, to);\n for (var i = 0; i < toRemove.length; i++) {\n var style = toRemove[i], found$1 = (void 0);\n for (var j = 0; j < matched.length; j++) {\n var m = matched[j];\n if (m.step == step - 1 && style.eq(matched[j].style)) { found$1 = m; }\n }\n if (found$1) {\n found$1.to = end;\n found$1.step = step;\n } else {\n matched.push({style: style, from: Math.max(pos, from), to: end, step: step});\n }\n }\n }\n });\n matched.forEach(function (m) { return this$1.step(new RemoveMarkStep(m.from, m.to, m.style)); });\n return this\n};\n\n// :: (number, NodeType, ?ContentMatch) → this\n// Removes all marks and nodes from the content of the node at `pos`\n// that don't match the given new parent node type. Accepts an\n// optional starting [content match](#model.ContentMatch) as third\n// argument.\nTransform.prototype.clearIncompatible = function(pos, parentType, match) {\n if ( match === void 0 ) match = parentType.contentMatch;\n\n var node = this.doc.nodeAt(pos);\n var delSteps = [], cur = pos + 1;\n for (var i = 0; i < node.childCount; i++) {\n var child = node.child(i), end = cur + child.nodeSize;\n var allowed = match.matchType(child.type, child.attrs);\n if (!allowed) {\n delSteps.push(new ReplaceStep(cur, end, Slice.empty));\n } else {\n match = allowed;\n for (var j = 0; j < child.marks.length; j++) { if (!parentType.allowsMarkType(child.marks[j].type))\n { this.step(new RemoveMarkStep(cur, end, child.marks[j])); } }\n }\n cur = end;\n }\n if (!match.validEnd) {\n var fill = match.fillBefore(Fragment.empty, true);\n this.replace(cur, cur, new Slice(fill, 0, 0));\n }\n for (var i$1 = delSteps.length - 1; i$1 >= 0; i$1--) { this.step(delSteps[i$1]); }\n return this\n};\n\n// :: (Node, number, ?number, ?Slice) → ?Step\n// ‘Fit’ a slice into a given position in the document, producing a\n// [step](#transform.Step) that inserts it. Will return null if\n// there's no meaningful way to insert the slice here, or inserting it\n// would be a no-op (an empty slice over an empty range).\nfunction replaceStep(doc, from, to, slice) {\n if ( to === void 0 ) to = from;\n if ( slice === void 0 ) slice = Slice.empty;\n\n if (from == to && !slice.size) { return null }\n\n var $from = doc.resolve(from), $to = doc.resolve(to);\n // Optimization -- avoid work if it's obvious that it's not needed.\n if (fitsTrivially($from, $to, slice)) { return new ReplaceStep(from, to, slice) }\n return new Fitter($from, $to, slice).fit()\n}\n\n// :: (number, ?number, ?Slice) → this\n// Replace the part of the document between `from` and `to` with the\n// given `slice`.\nTransform.prototype.replace = function(from, to, slice) {\n if ( to === void 0 ) to = from;\n if ( slice === void 0 ) slice = Slice.empty;\n\n var step = replaceStep(this.doc, from, to, slice);\n if (step) { this.step(step); }\n return this\n};\n\n// :: (number, number, union) → this\n// Replace the given range with the given content, which may be a\n// fragment, node, or array of nodes.\nTransform.prototype.replaceWith = function(from, to, content) {\n return this.replace(from, to, new Slice(Fragment.from(content), 0, 0))\n};\n\n// :: (number, number) → this\n// Delete the content between the given positions.\nTransform.prototype.delete = function(from, to) {\n return this.replace(from, to, Slice.empty)\n};\n\n// :: (number, union) → this\n// Insert the given content at the given position.\nTransform.prototype.insert = function(pos, content) {\n return this.replaceWith(pos, pos, content)\n};\n\nfunction fitsTrivially($from, $to, slice) {\n return !slice.openStart && !slice.openEnd && $from.start() == $to.start() &&\n $from.parent.canReplace($from.index(), $to.index(), slice.content)\n}\n\n// Algorithm for 'placing' the elements of a slice into a gap:\n//\n// We consider the content of each node that is open to the left to be\n// independently placeable. I.e. in , when the\n// paragraph on the left is open, \"foo\" can be placed (somewhere on\n// the left side of the replacement gap) independently from p(\"bar\").\n//\n// This class tracks the state of the placement progress in the\n// following properties:\n//\n// - `frontier` holds a stack of `{type, match}` objects that\n// represent the open side of the replacement. It starts at\n// `$from`, then moves forward as content is placed, and is finally\n// reconciled with `$to`.\n//\n// - `unplaced` is a slice that represents the content that hasn't\n// been placed yet.\n//\n// - `placed` is a fragment of placed content. Its open-start value\n// is implicit in `$from`, and its open-end value in `frontier`.\nvar Fitter = function Fitter($from, $to, slice) {\n this.$to = $to;\n this.$from = $from;\n this.unplaced = slice;\n\n this.frontier = [];\n for (var i = 0; i <= $from.depth; i++) {\n var node = $from.node(i);\n this.frontier.push({\n type: node.type,\n match: node.contentMatchAt($from.indexAfter(i))\n });\n }\n\n this.placed = Fragment.empty;\n for (var i$1 = $from.depth; i$1 > 0; i$1--)\n { this.placed = Fragment.from($from.node(i$1).copy(this.placed)); }\n};\n\nvar prototypeAccessors$1 = { depth: { configurable: true } };\n\nprototypeAccessors$1.depth.get = function () { return this.frontier.length - 1 };\n\nFitter.prototype.fit = function fit () {\n // As long as there's unplaced content, try to place some of it.\n // If that fails, either increase the open score of the unplaced\n // slice, or drop nodes from it, and then try again.\n while (this.unplaced.size) {\n var fit = this.findFittable();\n if (fit) { this.placeNodes(fit); }\n else { this.openMore() || this.dropNode(); }\n }\n // When there's inline content directly after the frontier _and_\n // directly after `this.$to`, we must generate a `ReplaceAround`\n // step that pulls that content into the node after the frontier.\n // That means the fitting must be done to the end of the textblock\n // node after `this.$to`, not `this.$to` itself.\n var moveInline = this.mustMoveInline(), placedSize = this.placed.size - this.depth - this.$from.depth;\n var $from = this.$from, $to = this.close(moveInline < 0 ? this.$to : $from.doc.resolve(moveInline));\n if (!$to) { return null }\n\n // If closing to `$to` succeeded, create a step\n var content = this.placed, openStart = $from.depth, openEnd = $to.depth;\n while (openStart && openEnd && content.childCount == 1) { // Normalize by dropping open parent nodes\n content = content.firstChild.content;\n openStart--; openEnd--;\n }\n var slice = new Slice(content, openStart, openEnd);\n if (moveInline > -1)\n { return new ReplaceAroundStep($from.pos, moveInline, this.$to.pos, this.$to.end(), slice, placedSize) }\n if (slice.size || $from.pos != this.$to.pos) // Don't generate no-op steps\n { return new ReplaceStep($from.pos, $to.pos, slice) }\n};\n\n// Find a position on the start spine of `this.unplaced` that has\n// content that can be moved somewhere on the frontier. Returns two\n// depths, one for the slice and one for the frontier.\nFitter.prototype.findFittable = function findFittable () {\n // Only try wrapping nodes (pass 2) after finding a place without\n // wrapping failed.\n for (var pass = 1; pass <= 2; pass++) {\n for (var sliceDepth = this.unplaced.openStart; sliceDepth >= 0; sliceDepth--) {\n var fragment = (void 0), parent = (void 0);\n if (sliceDepth) {\n parent = contentAt(this.unplaced.content, sliceDepth - 1).firstChild;\n fragment = parent.content;\n } else {\n fragment = this.unplaced.content;\n }\n var first = fragment.firstChild;\n for (var frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {\n var ref = this.frontier[frontierDepth];\n var type = ref.type;\n var match = ref.match;\n var wrap = (void 0), inject = (void 0);\n // In pass 1, if the next node matches, or there is no next\n // node but the parents look compatible, we've found a\n // place.\n if (pass == 1 && (first ? match.matchType(first.type) || (inject = match.fillBefore(Fragment.from(first), false))\n : type.compatibleContent(parent.type)))\n { return {sliceDepth: sliceDepth, frontierDepth: frontierDepth, parent: parent, inject: inject} }\n // In pass 2, look for a set of wrapping nodes that make\n // `first` fit here.\n else if (pass == 2 && first && (wrap = match.findWrapping(first.type)))\n { return {sliceDepth: sliceDepth, frontierDepth: frontierDepth, parent: parent, wrap: wrap} }\n // Don't continue looking further up if the parent node\n // would fit here.\n if (parent && match.matchType(parent.type)) { break }\n }\n }\n }\n};\n\nFitter.prototype.openMore = function openMore () {\n var ref = this.unplaced;\n var content = ref.content;\n var openStart = ref.openStart;\n var openEnd = ref.openEnd;\n var inner = contentAt(content, openStart);\n if (!inner.childCount || inner.firstChild.isLeaf) { return false }\n this.unplaced = new Slice(content, openStart + 1,\n Math.max(openEnd, inner.size + openStart >= content.size - openEnd ? openStart + 1 : 0));\n return true\n};\n\nFitter.prototype.dropNode = function dropNode () {\n var ref = this.unplaced;\n var content = ref.content;\n var openStart = ref.openStart;\n var openEnd = ref.openEnd;\n var inner = contentAt(content, openStart);\n if (inner.childCount <= 1 && openStart > 0) {\n var openAtEnd = content.size - openStart <= openStart + inner.size;\n this.unplaced = new Slice(dropFromFragment(content, openStart - 1, 1), openStart - 1,\n openAtEnd ? openStart - 1 : openEnd);\n } else {\n this.unplaced = new Slice(dropFromFragment(content, openStart, 1), openStart, openEnd);\n }\n};\n\n// : ({sliceDepth: number, frontierDepth: number, parent: ?Node, wrap: ?[NodeType], inject: ?Fragment})\n// Move content from the unplaced slice at `sliceDepth` to the\n// frontier node at `frontierDepth`. Close that frontier node when\n// applicable.\nFitter.prototype.placeNodes = function placeNodes (ref) {\n var sliceDepth = ref.sliceDepth;\n var frontierDepth = ref.frontierDepth;\n var parent = ref.parent;\n var inject = ref.inject;\n var wrap = ref.wrap;\n\n while (this.depth > frontierDepth) { this.closeFrontierNode(); }\n if (wrap) { for (var i = 0; i < wrap.length; i++) { this.openFrontierNode(wrap[i]); } }\n\n var slice = this.unplaced, fragment = parent ? parent.content : slice.content;\n var openStart = slice.openStart - sliceDepth;\n var taken = 0, add = [];\n var ref$1 = this.frontier[frontierDepth];\n var match = ref$1.match;\n var type = ref$1.type;\n if (inject) {\n for (var i$1 = 0; i$1 < inject.childCount; i$1++) { add.push(inject.child(i$1)); }\n match = match.matchFragment(inject);\n }\n // Computes the amount of (end) open nodes at the end of the\n // fragment. When 0, the parent is open, but no more. When\n // negative, nothing is open.\n var openEndCount = (fragment.size + sliceDepth) - (slice.content.size - slice.openEnd);\n // Scan over the fragment, fitting as many child nodes as\n // possible.\n while (taken < fragment.childCount) {\n var next = fragment.child(taken), matches = match.matchType(next.type);\n if (!matches) { break }\n taken++;\n if (taken > 1 || openStart == 0 || next.content.size) { // Drop empty open nodes\n match = matches;\n add.push(closeNodeStart(next.mark(type.allowedMarks(next.marks)), taken == 1 ? openStart : 0,\n taken == fragment.childCount ? openEndCount : -1));\n }\n }\n var toEnd = taken == fragment.childCount;\n if (!toEnd) { openEndCount = -1; }\n\n this.placed = addToFragment(this.placed, frontierDepth, Fragment.from(add));\n this.frontier[frontierDepth].match = match;\n\n // If the parent types match, and the entire node was moved, and\n // it's not open, close this frontier node right away.\n if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)\n { this.closeFrontierNode(); }\n\n // Add new frontier nodes for any open nodes at the end.\n for (var i$2 = 0, cur = fragment; i$2 < openEndCount; i$2++) {\n var node = cur.lastChild;\n this.frontier.push({type: node.type, match: node.contentMatchAt(node.childCount)});\n cur = node.content;\n }\n\n // Update `this.unplaced`. Drop the entire node from which we\n // placed it we got to its end, otherwise just drop the placed\n // nodes.\n this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd)\n : sliceDepth == 0 ? Slice.empty\n : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1),\n sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);\n};\n\nFitter.prototype.mustMoveInline = function mustMoveInline () {\n if (!this.$to.parent.isTextblock || this.$to.end() == this.$to.pos) { return -1 }\n var top = this.frontier[this.depth], level;\n if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||\n (this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth)) { return -1 }\n\n var ref = this.$to;\n var depth = ref.depth;\n var after = this.$to.after(depth);\n while (depth > 1 && after == this.$to.end(--depth)) { ++after; }\n return after\n};\n\nFitter.prototype.findCloseLevel = function findCloseLevel ($to) {\n scan: for (var i = Math.min(this.depth, $to.depth); i >= 0; i--) {\n var ref = this.frontier[i];\n var match = ref.match;\n var type = ref.type;\n var dropInner = i < $to.depth && $to.end(i + 1) == $to.pos + ($to.depth - (i + 1));\n var fit = contentAfterFits($to, i, type, match, dropInner);\n if (!fit) { continue }\n for (var d = i - 1; d >= 0; d--) {\n var ref$1 = this.frontier[d];\n var match$1 = ref$1.match;\n var type$1 = ref$1.type;\n var matches = contentAfterFits($to, d, type$1, match$1, true);\n if (!matches || matches.childCount) { continue scan }\n }\n return {depth: i, fit: fit, move: dropInner ? $to.doc.resolve($to.after(i + 1)) : $to}\n }\n};\n\nFitter.prototype.close = function close ($to) {\n var close = this.findCloseLevel($to);\n if (!close) { return null }\n\n while (this.depth > close.depth) { this.closeFrontierNode(); }\n if (close.fit.childCount) { this.placed = addToFragment(this.placed, close.depth, close.fit); }\n $to = close.move;\n for (var d = close.depth + 1; d <= $to.depth; d++) {\n var node = $to.node(d), add = node.type.contentMatch.fillBefore(node.content, true, $to.index(d));\n this.openFrontierNode(node.type, node.attrs, add);\n }\n return $to\n};\n\nFitter.prototype.openFrontierNode = function openFrontierNode (type, attrs, content) {\n var top = this.frontier[this.depth];\n top.match = top.match.matchType(type);\n this.placed = addToFragment(this.placed, this.depth, Fragment.from(type.create(attrs, content)));\n this.frontier.push({type: type, match: type.contentMatch});\n};\n\nFitter.prototype.closeFrontierNode = function closeFrontierNode () {\n var open = this.frontier.pop();\n var add = open.match.fillBefore(Fragment.empty, true);\n if (add.childCount) { this.placed = addToFragment(this.placed, this.frontier.length, add); }\n};\n\nObject.defineProperties( Fitter.prototype, prototypeAccessors$1 );\n\nfunction dropFromFragment(fragment, depth, count) {\n if (depth == 0) { return fragment.cutByIndex(count) }\n return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count)))\n}\n\nfunction addToFragment(fragment, depth, content) {\n if (depth == 0) { return fragment.append(content) }\n return fragment.replaceChild(fragment.childCount - 1,\n fragment.lastChild.copy(addToFragment(fragment.lastChild.content, depth - 1, content)))\n}\n\nfunction contentAt(fragment, depth) {\n for (var i = 0; i < depth; i++) { fragment = fragment.firstChild.content; }\n return fragment\n}\n\nfunction closeNodeStart(node, openStart, openEnd) {\n if (openStart <= 0) { return node }\n var frag = node.content;\n if (openStart > 1)\n { frag = frag.replaceChild(0, closeNodeStart(frag.firstChild, openStart - 1, frag.childCount == 1 ? openEnd - 1 : 0)); }\n if (openStart > 0) {\n frag = node.type.contentMatch.fillBefore(frag).append(frag);\n if (openEnd <= 0) { frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment.empty, true)); }\n }\n return node.copy(frag)\n}\n\nfunction contentAfterFits($to, depth, type, match, open) {\n var node = $to.node(depth), index = open ? $to.indexAfter(depth) : $to.index(depth);\n if (index == node.childCount && !type.compatibleContent(node.type)) { return null }\n var fit = match.fillBefore(node.content, true, index);\n return fit && !invalidMarks(type, node.content, index) ? fit : null\n}\n\nfunction invalidMarks(type, fragment, start) {\n for (var i = start; i < fragment.childCount; i++)\n { if (!type.allowsMarks(fragment.child(i).marks)) { return true } }\n return false\n}\n\n// :: (number, number, Slice) → this\n// Replace a range of the document with a given slice, using `from`,\n// `to`, and the slice's [`openStart`](#model.Slice.openStart) property\n// as hints, rather than fixed start and end points. This method may\n// grow the replaced area or close open nodes in the slice in order to\n// get a fit that is more in line with WYSIWYG expectations, by\n// dropping fully covered parent nodes of the replaced region when\n// they are marked [non-defining](#model.NodeSpec.defining), or\n// including an open parent node from the slice that _is_ marked as\n// [defining](#model.NodeSpec.defining).\n//\n// This is the method, for example, to handle paste. The similar\n// [`replace`](#transform.Transform.replace) method is a more\n// primitive tool which will _not_ move the start and end of its given\n// range, and is useful in situations where you need more precise\n// control over what happens.\nTransform.prototype.replaceRange = function(from, to, slice) {\n if (!slice.size) { return this.deleteRange(from, to) }\n\n var $from = this.doc.resolve(from), $to = this.doc.resolve(to);\n if (fitsTrivially($from, $to, slice))\n { return this.step(new ReplaceStep(from, to, slice)) }\n\n var targetDepths = coveredDepths($from, this.doc.resolve(to));\n // Can't replace the whole document, so remove 0 if it's present\n if (targetDepths[targetDepths.length - 1] == 0) { targetDepths.pop(); }\n // Negative numbers represent not expansion over the whole node at\n // that depth, but replacing from $from.before(-D) to $to.pos.\n var preferredTarget = -($from.depth + 1);\n targetDepths.unshift(preferredTarget);\n // This loop picks a preferred target depth, if one of the covering\n // depths is not outside of a defining node, and adds negative\n // depths for any depth that has $from at its start and does not\n // cross a defining node.\n for (var d = $from.depth, pos = $from.pos - 1; d > 0; d--, pos--) {\n var spec = $from.node(d).type.spec;\n if (spec.defining || spec.isolating) { break }\n if (targetDepths.indexOf(d) > -1) { preferredTarget = d; }\n else if ($from.before(d) == pos) { targetDepths.splice(1, 0, -d); }\n }\n // Try to fit each possible depth of the slice into each possible\n // target depth, starting with the preferred depths.\n var preferredTargetIndex = targetDepths.indexOf(preferredTarget);\n\n var leftNodes = [], preferredDepth = slice.openStart;\n for (var content = slice.content, i = 0;; i++) {\n var node = content.firstChild;\n leftNodes.push(node);\n if (i == slice.openStart) { break }\n content = node.content;\n }\n // Back up if the node directly above openStart, or the node above\n // that separated only by a non-defining textblock node, is defining.\n if (preferredDepth > 0 && leftNodes[preferredDepth - 1].type.spec.defining &&\n $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 1].type)\n { preferredDepth -= 1; }\n else if (preferredDepth >= 2 && leftNodes[preferredDepth - 1].isTextblock && leftNodes[preferredDepth - 2].type.spec.defining &&\n $from.node(preferredTargetIndex).type != leftNodes[preferredDepth - 2].type)\n { preferredDepth -= 2; }\n\n for (var j = slice.openStart; j >= 0; j--) {\n var openDepth = (j + preferredDepth + 1) % (slice.openStart + 1);\n var insert = leftNodes[openDepth];\n if (!insert) { continue }\n for (var i$1 = 0; i$1 < targetDepths.length; i$1++) {\n // Loop over possible expansion levels, starting with the\n // preferred one\n var targetDepth = targetDepths[(i$1 + preferredTargetIndex) % targetDepths.length], expand = true;\n if (targetDepth < 0) { expand = false; targetDepth = -targetDepth; }\n var parent = $from.node(targetDepth - 1), index = $from.index(targetDepth - 1);\n if (parent.canReplaceWith(index, index, insert.type, insert.marks))\n { return this.replace($from.before(targetDepth), expand ? $to.after(targetDepth) : to,\n new Slice(closeFragment(slice.content, 0, slice.openStart, openDepth),\n openDepth, slice.openEnd)) }\n }\n }\n\n var startSteps = this.steps.length;\n for (var i$2 = targetDepths.length - 1; i$2 >= 0; i$2--) {\n this.replace(from, to, slice);\n if (this.steps.length > startSteps) { break }\n var depth = targetDepths[i$2];\n if (depth < 0) { continue }\n from = $from.before(depth); to = $to.after(depth);\n }\n return this\n};\n\nfunction closeFragment(fragment, depth, oldOpen, newOpen, parent) {\n if (depth < oldOpen) {\n var first = fragment.firstChild;\n fragment = fragment.replaceChild(0, first.copy(closeFragment(first.content, depth + 1, oldOpen, newOpen, first)));\n }\n if (depth > newOpen) {\n var match = parent.contentMatchAt(0);\n var start = match.fillBefore(fragment).append(fragment);\n fragment = start.append(match.matchFragment(start).fillBefore(Fragment.empty, true));\n }\n return fragment\n}\n\n// :: (number, number, Node) → this\n// Replace the given range with a node, but use `from` and `to` as\n// hints, rather than precise positions. When from and to are the same\n// and are at the start or end of a parent node in which the given\n// node doesn't fit, this method may _move_ them out towards a parent\n// that does allow the given node to be placed. When the given range\n// completely covers a parent node, this method may completely replace\n// that parent node.\nTransform.prototype.replaceRangeWith = function(from, to, node) {\n if (!node.isInline && from == to && this.doc.resolve(from).parent.content.size) {\n var point = insertPoint(this.doc, from, node.type);\n if (point != null) { from = to = point; }\n }\n return this.replaceRange(from, to, new Slice(Fragment.from(node), 0, 0))\n};\n\n// :: (number, number) → this\n// Delete the given range, expanding it to cover fully covered\n// parent nodes until a valid replace is found.\nTransform.prototype.deleteRange = function(from, to) {\n var $from = this.doc.resolve(from), $to = this.doc.resolve(to);\n var covered = coveredDepths($from, $to);\n for (var i = 0; i < covered.length; i++) {\n var depth = covered[i], last = i == covered.length - 1;\n if ((last && depth == 0) || $from.node(depth).type.contentMatch.validEnd)\n { return this.delete($from.start(depth), $to.end(depth)) }\n if (depth > 0 && (last || $from.node(depth - 1).canReplace($from.index(depth - 1), $to.indexAfter(depth - 1))))\n { return this.delete($from.before(depth), $to.after(depth)) }\n }\n for (var d = 1; d <= $from.depth && d <= $to.depth; d++) {\n if (from - $from.start(d) == $from.depth - d && to > $from.end(d) && $to.end(d) - to != $to.depth - d)\n { return this.delete($from.before(d), to) }\n }\n return this.delete(from, to)\n};\n\n// : (ResolvedPos, ResolvedPos) → [number]\n// Returns an array of all depths for which $from - $to spans the\n// whole content of the nodes at that depth.\nfunction coveredDepths($from, $to) {\n var result = [], minDepth = Math.min($from.depth, $to.depth);\n for (var d = minDepth; d >= 0; d--) {\n var start = $from.start(d);\n if (start < $from.pos - ($from.depth - d) ||\n $to.end(d) > $to.pos + ($to.depth - d) ||\n $from.node(d).type.spec.isolating ||\n $to.node(d).type.spec.isolating) { break }\n if (start == $to.start(d)) { result.push(d); }\n }\n return result\n}\n\nexport { AddMarkStep, MapResult, Mapping, RemoveMarkStep, ReplaceAroundStep, ReplaceStep, Step, StepMap, StepResult, Transform, TransformError, canJoin, canSplit, dropPoint, findWrapping, insertPoint, joinPoint, liftTarget, replaceStep };\n//# sourceMappingURL=index.es.js.map\n","import { Slice, Fragment, Mark, Node } from 'prosemirror-model';\nimport { ReplaceStep, ReplaceAroundStep, Transform } from 'prosemirror-transform';\n\nvar classesById = Object.create(null);\n\n// ::- Superclass for editor selections. Every selection type should\n// extend this. Should not be instantiated directly.\nvar Selection = function Selection($anchor, $head, ranges) {\n // :: [SelectionRange]\n // The ranges covered by the selection.\n this.ranges = ranges || [new SelectionRange($anchor.min($head), $anchor.max($head))];\n // :: ResolvedPos\n // The resolved anchor of the selection (the side that stays in\n // place when the selection is modified).\n this.$anchor = $anchor;\n // :: ResolvedPos\n // The resolved head of the selection (the side that moves when\n // the selection is modified).\n this.$head = $head;\n};\n\nvar prototypeAccessors = { anchor: { configurable: true },head: { configurable: true },from: { configurable: true },to: { configurable: true },$from: { configurable: true },$to: { configurable: true },empty: { configurable: true } };\n\n// :: number\n// The selection's anchor, as an unresolved position.\nprototypeAccessors.anchor.get = function () { return this.$anchor.pos };\n\n// :: number\n// The selection's head.\nprototypeAccessors.head.get = function () { return this.$head.pos };\n\n// :: number\n// The lower bound of the selection's main range.\nprototypeAccessors.from.get = function () { return this.$from.pos };\n\n// :: number\n// The upper bound of the selection's main range.\nprototypeAccessors.to.get = function () { return this.$to.pos };\n\n// :: ResolvedPos\n// The resolved lowerbound of the selection's main range.\nprototypeAccessors.$from.get = function () {\n return this.ranges[0].$from\n};\n\n// :: ResolvedPos\n// The resolved upper bound of the selection's main range.\nprototypeAccessors.$to.get = function () {\n return this.ranges[0].$to\n};\n\n// :: bool\n// Indicates whether the selection contains any content.\nprototypeAccessors.empty.get = function () {\n var ranges = this.ranges;\n for (var i = 0; i < ranges.length; i++)\n { if (ranges[i].$from.pos != ranges[i].$to.pos) { return false } }\n return true\n};\n\n// eq:: (Selection) → bool\n// Test whether the selection is the same as another selection.\n\n// map:: (doc: Node, mapping: Mappable) → Selection\n// Map this selection through a [mappable](#transform.Mappable) thing. `doc`\n// should be the new document to which we are mapping.\n\n// :: () → Slice\n// Get the content of this selection as a slice.\nSelection.prototype.content = function content () {\n return this.$from.node(0).slice(this.from, this.to, true)\n};\n\n// :: (Transaction, ?Slice)\n// Replace the selection with a slice or, if no slice is given,\n// delete the selection. Will append to the given transaction.\nSelection.prototype.replace = function replace (tr, content) {\n if ( content === void 0 ) content = Slice.empty;\n\n // Put the new selection at the position after the inserted\n // content. When that ended in an inline node, search backwards,\n // to get the position after that node. If not, search forward.\n var lastNode = content.content.lastChild, lastParent = null;\n for (var i = 0; i < content.openEnd; i++) {\n lastParent = lastNode;\n lastNode = lastNode.lastChild;\n }\n\n var mapFrom = tr.steps.length, ranges = this.ranges;\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref = ranges[i$1];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n tr.replaceRange(mapping.map($from.pos), mapping.map($to.pos), i$1 ? Slice.empty : content);\n if (i$1 == 0)\n { selectionToInsertionEnd(tr, mapFrom, (lastNode ? lastNode.isInline : lastParent && lastParent.isTextblock) ? -1 : 1); }\n }\n};\n\n// :: (Transaction, Node)\n// Replace the selection with the given node, appending the changes\n// to the given transaction.\nSelection.prototype.replaceWith = function replaceWith (tr, node) {\n var mapFrom = tr.steps.length, ranges = this.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var mapping = tr.mapping.slice(mapFrom);\n var from = mapping.map($from.pos), to = mapping.map($to.pos);\n if (i) {\n tr.deleteRange(from, to);\n } else {\n tr.replaceRangeWith(from, to, node);\n selectionToInsertionEnd(tr, mapFrom, node.isInline ? -1 : 1);\n }\n }\n};\n\n// toJSON:: () → Object\n// Convert the selection to a JSON representation. When implementing\n// this for a custom selection class, make sure to give the object a\n// `type` property whose value matches the ID under which you\n// [registered](#state.Selection^jsonID) your class.\n\n// :: (ResolvedPos, number, ?bool) → ?Selection\n// Find a valid cursor or leaf node selection starting at the given\n// position and searching back if `dir` is negative, and forward if\n// positive. When `textOnly` is true, only consider cursor\n// selections. Will return null when no valid selection position is\n// found.\nSelection.findFrom = function findFrom ($pos, dir, textOnly) {\n var inner = $pos.parent.inlineContent ? new TextSelection($pos)\n : findSelectionIn($pos.node(0), $pos.parent, $pos.pos, $pos.index(), dir, textOnly);\n if (inner) { return inner }\n\n for (var depth = $pos.depth - 1; depth >= 0; depth--) {\n var found = dir < 0\n ? findSelectionIn($pos.node(0), $pos.node(depth), $pos.before(depth + 1), $pos.index(depth), dir, textOnly)\n : findSelectionIn($pos.node(0), $pos.node(depth), $pos.after(depth + 1), $pos.index(depth) + 1, dir, textOnly);\n if (found) { return found }\n }\n};\n\n// :: (ResolvedPos, ?number) → Selection\n// Find a valid cursor or leaf node selection near the given\n// position. Searches forward first by default, but if `bias` is\n// negative, it will search backwards first.\nSelection.near = function near ($pos, bias) {\n if ( bias === void 0 ) bias = 1;\n\n return this.findFrom($pos, bias) || this.findFrom($pos, -bias) || new AllSelection($pos.node(0))\n};\n\n// :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the start of\n// the given document. Will return an\n// [`AllSelection`](#state.AllSelection) if no valid position\n// exists.\nSelection.atStart = function atStart (doc) {\n return findSelectionIn(doc, doc, 0, 0, 1) || new AllSelection(doc)\n};\n\n// :: (Node) → Selection\n// Find the cursor or leaf node selection closest to the end of the\n// given document.\nSelection.atEnd = function atEnd (doc) {\n return findSelectionIn(doc, doc, doc.content.size, doc.childCount, -1) || new AllSelection(doc)\n};\n\n// :: (Node, Object) → Selection\n// Deserialize the JSON representation of a selection. Must be\n// implemented for custom classes (as a static class method).\nSelection.fromJSON = function fromJSON (doc, json) {\n if (!json || !json.type) { throw new RangeError(\"Invalid input for Selection.fromJSON\") }\n var cls = classesById[json.type];\n if (!cls) { throw new RangeError((\"No selection type \" + (json.type) + \" defined\")) }\n return cls.fromJSON(doc, json)\n};\n\n// :: (string, constructor)\n// To be able to deserialize selections from JSON, custom selection\n// classes must register themselves with an ID string, so that they\n// can be disambiguated. Try to pick something that's unlikely to\n// clash with classes from other modules.\nSelection.jsonID = function jsonID (id, selectionClass) {\n if (id in classesById) { throw new RangeError(\"Duplicate use of selection JSON ID \" + id) }\n classesById[id] = selectionClass;\n selectionClass.prototype.jsonID = id;\n return selectionClass\n};\n\n// :: () → SelectionBookmark\n// Get a [bookmark](#state.SelectionBookmark) for this selection,\n// which is a value that can be mapped without having access to a\n// current document, and later resolved to a real selection for a\n// given document again. (This is used mostly by the history to\n// track and restore old selections.) The default implementation of\n// this method just converts the selection to a text selection and\n// returns the bookmark for that.\nSelection.prototype.getBookmark = function getBookmark () {\n return TextSelection.between(this.$anchor, this.$head).getBookmark()\n};\n\nObject.defineProperties( Selection.prototype, prototypeAccessors );\n\n// :: bool\n// Controls whether, when a selection of this type is active in the\n// browser, the selected range should be visible to the user. Defaults\n// to `true`.\nSelection.prototype.visible = true;\n\n// SelectionBookmark:: interface\n// A lightweight, document-independent representation of a selection.\n// You can define a custom bookmark type for a custom selection class\n// to make the history handle it well.\n//\n// map:: (mapping: Mapping) → SelectionBookmark\n// Map the bookmark through a set of changes.\n//\n// resolve:: (doc: Node) → Selection\n// Resolve the bookmark to a real selection again. This may need to\n// do some error checking and may fall back to a default (usually\n// [`TextSelection.between`](#state.TextSelection^between)) if\n// mapping made the bookmark invalid.\n\n// ::- Represents a selected range in a document.\nvar SelectionRange = function SelectionRange($from, $to) {\n // :: ResolvedPos\n // The lower bound of the range.\n this.$from = $from;\n // :: ResolvedPos\n // The upper bound of the range.\n this.$to = $to;\n};\n\n// ::- A text selection represents a classical editor selection, with\n// a head (the moving side) and anchor (immobile side), both of which\n// point into textblock nodes. It can be empty (a regular cursor\n// position).\nvar TextSelection = /*@__PURE__*/(function (Selection) {\n function TextSelection($anchor, $head) {\n if ( $head === void 0 ) $head = $anchor;\n\n Selection.call(this, $anchor, $head);\n }\n\n if ( Selection ) TextSelection.__proto__ = Selection;\n TextSelection.prototype = Object.create( Selection && Selection.prototype );\n TextSelection.prototype.constructor = TextSelection;\n\n var prototypeAccessors$1 = { $cursor: { configurable: true } };\n\n // :: ?ResolvedPos\n // Returns a resolved position if this is a cursor selection (an\n // empty text selection), and null otherwise.\n prototypeAccessors$1.$cursor.get = function () { return this.$anchor.pos == this.$head.pos ? this.$head : null };\n\n TextSelection.prototype.map = function map (doc, mapping) {\n var $head = doc.resolve(mapping.map(this.head));\n if (!$head.parent.inlineContent) { return Selection.near($head) }\n var $anchor = doc.resolve(mapping.map(this.anchor));\n return new TextSelection($anchor.parent.inlineContent ? $anchor : $head, $head)\n };\n\n TextSelection.prototype.replace = function replace (tr, content) {\n if ( content === void 0 ) content = Slice.empty;\n\n Selection.prototype.replace.call(this, tr, content);\n if (content == Slice.empty) {\n var marks = this.$from.marksAcross(this.$to);\n if (marks) { tr.ensureMarks(marks); }\n }\n };\n\n TextSelection.prototype.eq = function eq (other) {\n return other instanceof TextSelection && other.anchor == this.anchor && other.head == this.head\n };\n\n TextSelection.prototype.getBookmark = function getBookmark () {\n return new TextBookmark(this.anchor, this.head)\n };\n\n TextSelection.prototype.toJSON = function toJSON () {\n return {type: \"text\", anchor: this.anchor, head: this.head}\n };\n\n TextSelection.fromJSON = function fromJSON (doc, json) {\n if (typeof json.anchor != \"number\" || typeof json.head != \"number\")\n { throw new RangeError(\"Invalid input for TextSelection.fromJSON\") }\n return new TextSelection(doc.resolve(json.anchor), doc.resolve(json.head))\n };\n\n // :: (Node, number, ?number) → TextSelection\n // Create a text selection from non-resolved positions.\n TextSelection.create = function create (doc, anchor, head) {\n if ( head === void 0 ) head = anchor;\n\n var $anchor = doc.resolve(anchor);\n return new this($anchor, head == anchor ? $anchor : doc.resolve(head))\n };\n\n // :: (ResolvedPos, ResolvedPos, ?number) → Selection\n // Return a text selection that spans the given positions or, if\n // they aren't text positions, find a text selection near them.\n // `bias` determines whether the method searches forward (default)\n // or backwards (negative number) first. Will fall back to calling\n // [`Selection.near`](#state.Selection^near) when the document\n // doesn't contain a valid text position.\n TextSelection.between = function between ($anchor, $head, bias) {\n var dPos = $anchor.pos - $head.pos;\n if (!bias || dPos) { bias = dPos >= 0 ? 1 : -1; }\n if (!$head.parent.inlineContent) {\n var found = Selection.findFrom($head, bias, true) || Selection.findFrom($head, -bias, true);\n if (found) { $head = found.$head; }\n else { return Selection.near($head, bias) }\n }\n if (!$anchor.parent.inlineContent) {\n if (dPos == 0) {\n $anchor = $head;\n } else {\n $anchor = (Selection.findFrom($anchor, -bias, true) || Selection.findFrom($anchor, bias, true)).$anchor;\n if (($anchor.pos < $head.pos) != (dPos < 0)) { $anchor = $head; }\n }\n }\n return new TextSelection($anchor, $head)\n };\n\n Object.defineProperties( TextSelection.prototype, prototypeAccessors$1 );\n\n return TextSelection;\n}(Selection));\n\nSelection.jsonID(\"text\", TextSelection);\n\nvar TextBookmark = function TextBookmark(anchor, head) {\n this.anchor = anchor;\n this.head = head;\n};\nTextBookmark.prototype.map = function map (mapping) {\n return new TextBookmark(mapping.map(this.anchor), mapping.map(this.head))\n};\nTextBookmark.prototype.resolve = function resolve (doc) {\n return TextSelection.between(doc.resolve(this.anchor), doc.resolve(this.head))\n};\n\n// ::- A node selection is a selection that points at a single node.\n// All nodes marked [selectable](#model.NodeSpec.selectable) can be\n// the target of a node selection. In such a selection, `from` and\n// `to` point directly before and after the selected node, `anchor`\n// equals `from`, and `head` equals `to`..\nvar NodeSelection = /*@__PURE__*/(function (Selection) {\n function NodeSelection($pos) {\n var node = $pos.nodeAfter;\n var $end = $pos.node(0).resolve($pos.pos + node.nodeSize);\n Selection.call(this, $pos, $end);\n // :: Node The selected node.\n this.node = node;\n }\n\n if ( Selection ) NodeSelection.__proto__ = Selection;\n NodeSelection.prototype = Object.create( Selection && Selection.prototype );\n NodeSelection.prototype.constructor = NodeSelection;\n\n NodeSelection.prototype.map = function map (doc, mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n var $pos = doc.resolve(pos);\n if (deleted) { return Selection.near($pos) }\n return new NodeSelection($pos)\n };\n\n NodeSelection.prototype.content = function content () {\n return new Slice(Fragment.from(this.node), 0, 0)\n };\n\n NodeSelection.prototype.eq = function eq (other) {\n return other instanceof NodeSelection && other.anchor == this.anchor\n };\n\n NodeSelection.prototype.toJSON = function toJSON () {\n return {type: \"node\", anchor: this.anchor}\n };\n\n NodeSelection.prototype.getBookmark = function getBookmark () { return new NodeBookmark(this.anchor) };\n\n NodeSelection.fromJSON = function fromJSON (doc, json) {\n if (typeof json.anchor != \"number\")\n { throw new RangeError(\"Invalid input for NodeSelection.fromJSON\") }\n return new NodeSelection(doc.resolve(json.anchor))\n };\n\n // :: (Node, number) → NodeSelection\n // Create a node selection from non-resolved positions.\n NodeSelection.create = function create (doc, from) {\n return new this(doc.resolve(from))\n };\n\n // :: (Node) → bool\n // Determines whether the given node may be selected as a node\n // selection.\n NodeSelection.isSelectable = function isSelectable (node) {\n return !node.isText && node.type.spec.selectable !== false\n };\n\n return NodeSelection;\n}(Selection));\n\nNodeSelection.prototype.visible = false;\n\nSelection.jsonID(\"node\", NodeSelection);\n\nvar NodeBookmark = function NodeBookmark(anchor) {\n this.anchor = anchor;\n};\nNodeBookmark.prototype.map = function map (mapping) {\n var ref = mapping.mapResult(this.anchor);\n var deleted = ref.deleted;\n var pos = ref.pos;\n return deleted ? new TextBookmark(pos, pos) : new NodeBookmark(pos)\n};\nNodeBookmark.prototype.resolve = function resolve (doc) {\n var $pos = doc.resolve(this.anchor), node = $pos.nodeAfter;\n if (node && NodeSelection.isSelectable(node)) { return new NodeSelection($pos) }\n return Selection.near($pos)\n};\n\n// ::- A selection type that represents selecting the whole document\n// (which can not necessarily be expressed with a text selection, when\n// there are for example leaf block nodes at the start or end of the\n// document).\nvar AllSelection = /*@__PURE__*/(function (Selection) {\n function AllSelection(doc) {\n Selection.call(this, doc.resolve(0), doc.resolve(doc.content.size));\n }\n\n if ( Selection ) AllSelection.__proto__ = Selection;\n AllSelection.prototype = Object.create( Selection && Selection.prototype );\n AllSelection.prototype.constructor = AllSelection;\n\n AllSelection.prototype.replace = function replace (tr, content) {\n if ( content === void 0 ) content = Slice.empty;\n\n if (content == Slice.empty) {\n tr.delete(0, tr.doc.content.size);\n var sel = Selection.atStart(tr.doc);\n if (!sel.eq(tr.selection)) { tr.setSelection(sel); }\n } else {\n Selection.prototype.replace.call(this, tr, content);\n }\n };\n\n AllSelection.prototype.toJSON = function toJSON () { return {type: \"all\"} };\n\n AllSelection.fromJSON = function fromJSON (doc) { return new AllSelection(doc) };\n\n AllSelection.prototype.map = function map (doc) { return new AllSelection(doc) };\n\n AllSelection.prototype.eq = function eq (other) { return other instanceof AllSelection };\n\n AllSelection.prototype.getBookmark = function getBookmark () { return AllBookmark };\n\n return AllSelection;\n}(Selection));\n\nSelection.jsonID(\"all\", AllSelection);\n\nvar AllBookmark = {\n map: function map() { return this },\n resolve: function resolve(doc) { return new AllSelection(doc) }\n};\n\n// FIXME we'll need some awareness of text direction when scanning for selections\n\n// Try to find a selection inside the given node. `pos` points at the\n// position where the search starts. When `text` is true, only return\n// text selections.\nfunction findSelectionIn(doc, node, pos, index, dir, text) {\n if (node.inlineContent) { return TextSelection.create(doc, pos) }\n for (var i = index - (dir > 0 ? 0 : 1); dir > 0 ? i < node.childCount : i >= 0; i += dir) {\n var child = node.child(i);\n if (!child.isAtom) {\n var inner = findSelectionIn(doc, child, pos + dir, dir < 0 ? child.childCount : 0, dir, text);\n if (inner) { return inner }\n } else if (!text && NodeSelection.isSelectable(child)) {\n return NodeSelection.create(doc, pos - (dir < 0 ? child.nodeSize : 0))\n }\n pos += child.nodeSize * dir;\n }\n}\n\nfunction selectionToInsertionEnd(tr, startLen, bias) {\n var last = tr.steps.length - 1;\n if (last < startLen) { return }\n var step = tr.steps[last];\n if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) { return }\n var map = tr.mapping.maps[last], end;\n map.forEach(function (_from, _to, _newFrom, newTo) { if (end == null) { end = newTo; } });\n tr.setSelection(Selection.near(tr.doc.resolve(end), bias));\n}\n\nvar UPDATED_SEL = 1, UPDATED_MARKS = 2, UPDATED_SCROLL = 4;\n\n// ::- An editor state transaction, which can be applied to a state to\n// create an updated state. Use\n// [`EditorState.tr`](#state.EditorState.tr) to create an instance.\n//\n// Transactions track changes to the document (they are a subclass of\n// [`Transform`](#transform.Transform)), but also other state changes,\n// like selection updates and adjustments of the set of [stored\n// marks](#state.EditorState.storedMarks). In addition, you can store\n// metadata properties in a transaction, which are extra pieces of\n// information that client code or plugins can use to describe what a\n// transacion represents, so that they can update their [own\n// state](#state.StateField) accordingly.\n//\n// The [editor view](#view.EditorView) uses a few metadata properties:\n// it will attach a property `\"pointer\"` with the value `true` to\n// selection transactions directly caused by mouse or touch input, and\n// a `\"uiEvent\"` property of that may be `\"paste\"`, `\"cut\"`, or `\"drop\"`.\nvar Transaction = /*@__PURE__*/(function (Transform) {\n function Transaction(state) {\n Transform.call(this, state.doc);\n // :: number\n // The timestamp associated with this transaction, in the same\n // format as `Date.now()`.\n this.time = Date.now();\n this.curSelection = state.selection;\n // The step count for which the current selection is valid.\n this.curSelectionFor = 0;\n // :: ?[Mark]\n // The stored marks set by this transaction, if any.\n this.storedMarks = state.storedMarks;\n // Bitfield to track which aspects of the state were updated by\n // this transaction.\n this.updated = 0;\n // Object used to store metadata properties for the transaction.\n this.meta = Object.create(null);\n }\n\n if ( Transform ) Transaction.__proto__ = Transform;\n Transaction.prototype = Object.create( Transform && Transform.prototype );\n Transaction.prototype.constructor = Transaction;\n\n var prototypeAccessors = { selection: { configurable: true },selectionSet: { configurable: true },storedMarksSet: { configurable: true },isGeneric: { configurable: true },scrolledIntoView: { configurable: true } };\n\n // :: Selection\n // The transaction's current selection. This defaults to the editor\n // selection [mapped](#state.Selection.map) through the steps in the\n // transaction, but can be overwritten with\n // [`setSelection`](#state.Transaction.setSelection).\n prototypeAccessors.selection.get = function () {\n if (this.curSelectionFor < this.steps.length) {\n this.curSelection = this.curSelection.map(this.doc, this.mapping.slice(this.curSelectionFor));\n this.curSelectionFor = this.steps.length;\n }\n return this.curSelection\n };\n\n // :: (Selection) → Transaction\n // Update the transaction's current selection. Will determine the\n // selection that the editor gets when the transaction is applied.\n Transaction.prototype.setSelection = function setSelection (selection) {\n if (selection.$from.doc != this.doc)\n { throw new RangeError(\"Selection passed to setSelection must point at the current document\") }\n this.curSelection = selection;\n this.curSelectionFor = this.steps.length;\n this.updated = (this.updated | UPDATED_SEL) & ~UPDATED_MARKS;\n this.storedMarks = null;\n return this\n };\n\n // :: bool\n // Whether the selection was explicitly updated by this transaction.\n prototypeAccessors.selectionSet.get = function () {\n return (this.updated & UPDATED_SEL) > 0\n };\n\n // :: (?[Mark]) → Transaction\n // Set the current stored marks.\n Transaction.prototype.setStoredMarks = function setStoredMarks (marks) {\n this.storedMarks = marks;\n this.updated |= UPDATED_MARKS;\n return this\n };\n\n // :: ([Mark]) → Transaction\n // Make sure the current stored marks or, if that is null, the marks\n // at the selection, match the given set of marks. Does nothing if\n // this is already the case.\n Transaction.prototype.ensureMarks = function ensureMarks (marks) {\n if (!Mark.sameSet(this.storedMarks || this.selection.$from.marks(), marks))\n { this.setStoredMarks(marks); }\n return this\n };\n\n // :: (Mark) → Transaction\n // Add a mark to the set of stored marks.\n Transaction.prototype.addStoredMark = function addStoredMark (mark) {\n return this.ensureMarks(mark.addToSet(this.storedMarks || this.selection.$head.marks()))\n };\n\n // :: (union) → Transaction\n // Remove a mark or mark type from the set of stored marks.\n Transaction.prototype.removeStoredMark = function removeStoredMark (mark) {\n return this.ensureMarks(mark.removeFromSet(this.storedMarks || this.selection.$head.marks()))\n };\n\n // :: bool\n // Whether the stored marks were explicitly set for this transaction.\n prototypeAccessors.storedMarksSet.get = function () {\n return (this.updated & UPDATED_MARKS) > 0\n };\n\n Transaction.prototype.addStep = function addStep (step, doc) {\n Transform.prototype.addStep.call(this, step, doc);\n this.updated = this.updated & ~UPDATED_MARKS;\n this.storedMarks = null;\n };\n\n // :: (number) → Transaction\n // Update the timestamp for the transaction.\n Transaction.prototype.setTime = function setTime (time) {\n this.time = time;\n return this\n };\n\n // :: (Slice) → Transaction\n // Replace the current selection with the given slice.\n Transaction.prototype.replaceSelection = function replaceSelection (slice) {\n this.selection.replace(this, slice);\n return this\n };\n\n // :: (Node, ?bool) → Transaction\n // Replace the selection with the given node. When `inheritMarks` is\n // true and the content is inline, it inherits the marks from the\n // place where it is inserted.\n Transaction.prototype.replaceSelectionWith = function replaceSelectionWith (node, inheritMarks) {\n var selection = this.selection;\n if (inheritMarks !== false)\n { node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || Mark.none))); }\n selection.replaceWith(this, node);\n return this\n };\n\n // :: () → Transaction\n // Delete the selection.\n Transaction.prototype.deleteSelection = function deleteSelection () {\n this.selection.replace(this);\n return this\n };\n\n // :: (string, from: ?number, to: ?number) → Transaction\n // Replace the given range, or the selection if no range is given,\n // with a text node containing the given string.\n Transaction.prototype.insertText = function insertText (text, from, to) {\n if ( to === void 0 ) to = from;\n\n var schema = this.doc.type.schema;\n if (from == null) {\n if (!text) { return this.deleteSelection() }\n return this.replaceSelectionWith(schema.text(text), true)\n } else {\n if (!text) { return this.deleteRange(from, to) }\n var marks = this.storedMarks;\n if (!marks) {\n var $from = this.doc.resolve(from);\n marks = to == from ? $from.marks() : $from.marksAcross(this.doc.resolve(to));\n }\n this.replaceRangeWith(from, to, schema.text(text, marks));\n if (!this.selection.empty) { this.setSelection(Selection.near(this.selection.$to)); }\n return this\n }\n };\n\n // :: (union, any) → Transaction\n // Store a metadata property in this transaction, keyed either by\n // name or by plugin.\n Transaction.prototype.setMeta = function setMeta (key, value) {\n this.meta[typeof key == \"string\" ? key : key.key] = value;\n return this\n };\n\n // :: (union) → any\n // Retrieve a metadata property for a given name or plugin.\n Transaction.prototype.getMeta = function getMeta (key) {\n return this.meta[typeof key == \"string\" ? key : key.key]\n };\n\n // :: bool\n // Returns true if this transaction doesn't contain any metadata,\n // and can thus safely be extended.\n prototypeAccessors.isGeneric.get = function () {\n for (var _ in this.meta) { return false }\n return true\n };\n\n // :: () → Transaction\n // Indicate that the editor should scroll the selection into view\n // when updated to the state produced by this transaction.\n Transaction.prototype.scrollIntoView = function scrollIntoView () {\n this.updated |= UPDATED_SCROLL;\n return this\n };\n\n prototypeAccessors.scrolledIntoView.get = function () {\n return (this.updated & UPDATED_SCROLL) > 0\n };\n\n Object.defineProperties( Transaction.prototype, prototypeAccessors );\n\n return Transaction;\n}(Transform));\n\nfunction bind(f, self) {\n return !self || !f ? f : f.bind(self)\n}\n\nvar FieldDesc = function FieldDesc(name, desc, self) {\n this.name = name;\n this.init = bind(desc.init, self);\n this.apply = bind(desc.apply, self);\n};\n\nvar baseFields = [\n new FieldDesc(\"doc\", {\n init: function init(config) { return config.doc || config.schema.topNodeType.createAndFill() },\n apply: function apply(tr) { return tr.doc }\n }),\n\n new FieldDesc(\"selection\", {\n init: function init(config, instance) { return config.selection || Selection.atStart(instance.doc) },\n apply: function apply(tr) { return tr.selection }\n }),\n\n new FieldDesc(\"storedMarks\", {\n init: function init(config) { return config.storedMarks || null },\n apply: function apply(tr, _marks, _old, state) { return state.selection.$cursor ? tr.storedMarks : null }\n }),\n\n new FieldDesc(\"scrollToSelection\", {\n init: function init() { return 0 },\n apply: function apply(tr, prev) { return tr.scrolledIntoView ? prev + 1 : prev }\n })\n];\n\n// Object wrapping the part of a state object that stays the same\n// across transactions. Stored in the state's `config` property.\nvar Configuration = function Configuration(schema, plugins) {\n var this$1 = this;\n\n this.schema = schema;\n this.fields = baseFields.concat();\n this.plugins = [];\n this.pluginsByKey = Object.create(null);\n if (plugins) { plugins.forEach(function (plugin) {\n if (this$1.pluginsByKey[plugin.key])\n { throw new RangeError(\"Adding different instances of a keyed plugin (\" + plugin.key + \")\") }\n this$1.plugins.push(plugin);\n this$1.pluginsByKey[plugin.key] = plugin;\n if (plugin.spec.state)\n { this$1.fields.push(new FieldDesc(plugin.key, plugin.spec.state, plugin)); }\n }); }\n};\n\n// ::- The state of a ProseMirror editor is represented by an object\n// of this type. A state is a persistent data structure—it isn't\n// updated, but rather a new state value is computed from an old one\n// using the [`apply`](#state.EditorState.apply) method.\n//\n// A state holds a number of built-in fields, and plugins can\n// [define](#state.PluginSpec.state) additional fields.\nvar EditorState = function EditorState(config) {\n this.config = config;\n};\n\nvar prototypeAccessors$1 = { schema: { configurable: true },plugins: { configurable: true },tr: { configurable: true } };\n\n// doc:: Node\n// The current document.\n\n// selection:: Selection\n// The selection.\n\n// storedMarks:: ?[Mark]\n// A set of marks to apply to the next input. Will be null when\n// no explicit marks have been set.\n\n// :: Schema\n// The schema of the state's document.\nprototypeAccessors$1.schema.get = function () {\n return this.config.schema\n};\n\n// :: [Plugin]\n// The plugins that are active in this state.\nprototypeAccessors$1.plugins.get = function () {\n return this.config.plugins\n};\n\n// :: (Transaction) → EditorState\n// Apply the given transaction to produce a new state.\nEditorState.prototype.apply = function apply (tr) {\n return this.applyTransaction(tr).state\n};\n\n// : (Transaction) → bool\nEditorState.prototype.filterTransaction = function filterTransaction (tr, ignore) {\n if ( ignore === void 0 ) ignore = -1;\n\n for (var i = 0; i < this.config.plugins.length; i++) { if (i != ignore) {\n var plugin = this.config.plugins[i];\n if (plugin.spec.filterTransaction && !plugin.spec.filterTransaction.call(plugin, tr, this))\n { return false }\n } }\n return true\n};\n\n// :: (Transaction) → {state: EditorState, transactions: [Transaction]}\n// Verbose variant of [`apply`](#state.EditorState.apply) that\n// returns the precise transactions that were applied (which might\n// be influenced by the [transaction\n// hooks](#state.PluginSpec.filterTransaction) of\n// plugins) along with the new state.\nEditorState.prototype.applyTransaction = function applyTransaction (rootTr) {\n if (!this.filterTransaction(rootTr)) { return {state: this, transactions: []} }\n\n var trs = [rootTr], newState = this.applyInner(rootTr), seen = null;\n // This loop repeatedly gives plugins a chance to respond to\n // transactions as new transactions are added, making sure to only\n // pass the transactions the plugin did not see before.\n for (;;) {\n var haveNew = false;\n for (var i = 0; i < this.config.plugins.length; i++) {\n var plugin = this.config.plugins[i];\n if (plugin.spec.appendTransaction) {\n var n = seen ? seen[i].n : 0, oldState = seen ? seen[i].state : this;\n var tr = n < trs.length &&\n plugin.spec.appendTransaction.call(plugin, n ? trs.slice(n) : trs, oldState, newState);\n if (tr && newState.filterTransaction(tr, i)) {\n tr.setMeta(\"appendedTransaction\", rootTr);\n if (!seen) {\n seen = [];\n for (var j = 0; j < this.config.plugins.length; j++)\n { seen.push(j < i ? {state: newState, n: trs.length} : {state: this, n: 0}); }\n }\n trs.push(tr);\n newState = newState.applyInner(tr);\n haveNew = true;\n }\n if (seen) { seen[i] = {state: newState, n: trs.length}; }\n }\n }\n if (!haveNew) { return {state: newState, transactions: trs} }\n }\n};\n\n// : (Transaction) → EditorState\nEditorState.prototype.applyInner = function applyInner (tr) {\n if (!tr.before.eq(this.doc)) { throw new RangeError(\"Applying a mismatched transaction\") }\n var newInstance = new EditorState(this.config), fields = this.config.fields;\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n newInstance[field.name] = field.apply(tr, this[field.name], this, newInstance);\n }\n for (var i$1 = 0; i$1 < applyListeners.length; i$1++) { applyListeners[i$1](this, tr, newInstance); }\n return newInstance\n};\n\n// :: Transaction\n// Start a [transaction](#state.Transaction) from this state.\nprototypeAccessors$1.tr.get = function () { return new Transaction(this) };\n\n// :: (Object) → EditorState\n// Create a new state.\n//\n// config::- Configuration options. Must contain `schema` or `doc` (or both).\n//\n// schema:: ?Schema\n// The schema to use (only relevant if no `doc` is specified).\n//\n// doc:: ?Node\n// The starting document.\n//\n// selection:: ?Selection\n// A valid selection in the document.\n//\n// storedMarks:: ?[Mark]\n// The initial set of [stored marks](#state.EditorState.storedMarks).\n//\n// plugins:: ?[Plugin]\n// The plugins that should be active in this state.\nEditorState.create = function create (config) {\n var $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins);\n var instance = new EditorState($config);\n for (var i = 0; i < $config.fields.length; i++)\n { instance[$config.fields[i].name] = $config.fields[i].init(config, instance); }\n return instance\n};\n\n// :: (Object) → EditorState\n// Create a new state based on this one, but with an adjusted set of\n// active plugins. State fields that exist in both sets of plugins\n// are kept unchanged. Those that no longer exist are dropped, and\n// those that are new are initialized using their\n// [`init`](#state.StateField.init) method, passing in the new\n// configuration object..\n//\n// config::- configuration options\n//\n// plugins:: [Plugin]\n// New set of active plugins.\nEditorState.prototype.reconfigure = function reconfigure (config) {\n var $config = new Configuration(this.schema, config.plugins);\n var fields = $config.fields, instance = new EditorState($config);\n for (var i = 0; i < fields.length; i++) {\n var name = fields[i].name;\n instance[name] = this.hasOwnProperty(name) ? this[name] : fields[i].init(config, instance);\n }\n return instance\n};\n\n// :: (?union, string, number>) → Object\n// Serialize this state to JSON. If you want to serialize the state\n// of plugins, pass an object mapping property names to use in the\n// resulting JSON object to plugin objects. The argument may also be\n// a string or number, in which case it is ignored, to support the\n// way `JSON.stringify` calls `toString` methods.\nEditorState.prototype.toJSON = function toJSON (pluginFields) {\n var result = {doc: this.doc.toJSON(), selection: this.selection.toJSON()};\n if (this.storedMarks) { result.storedMarks = this.storedMarks.map(function (m) { return m.toJSON(); }); }\n if (pluginFields && typeof pluginFields == 'object') { for (var prop in pluginFields) {\n if (prop == \"doc\" || prop == \"selection\")\n { throw new RangeError(\"The JSON fields `doc` and `selection` are reserved\") }\n var plugin = pluginFields[prop], state = plugin.spec.state;\n if (state && state.toJSON) { result[prop] = state.toJSON.call(plugin, this[plugin.key]); }\n } }\n return result\n};\n\n// :: (Object, Object, ?Object) → EditorState\n// Deserialize a JSON representation of a state. `config` should\n// have at least a `schema` field, and should contain array of\n// plugins to initialize the state with. `pluginFields` can be used\n// to deserialize the state of plugins, by associating plugin\n// instances with the property names they use in the JSON object.\n//\n// config::- configuration options\n//\n// schema:: Schema\n// The schema to use.\n//\n// plugins:: ?[Plugin]\n// The set of active plugins.\nEditorState.fromJSON = function fromJSON (config, json, pluginFields) {\n if (!json) { throw new RangeError(\"Invalid input for EditorState.fromJSON\") }\n if (!config.schema) { throw new RangeError(\"Required config field 'schema' missing\") }\n var $config = new Configuration(config.schema, config.plugins);\n var instance = new EditorState($config);\n $config.fields.forEach(function (field) {\n if (field.name == \"doc\") {\n instance.doc = Node.fromJSON(config.schema, json.doc);\n } else if (field.name == \"selection\") {\n instance.selection = Selection.fromJSON(instance.doc, json.selection);\n } else if (field.name == \"storedMarks\") {\n if (json.storedMarks) { instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON); }\n } else {\n if (pluginFields) { for (var prop in pluginFields) {\n var plugin = pluginFields[prop], state = plugin.spec.state;\n if (plugin.key == field.name && state && state.fromJSON &&\n Object.prototype.hasOwnProperty.call(json, prop)) {\n // This field belongs to a plugin mapped to a JSON field, read it from there.\n instance[field.name] = state.fromJSON.call(plugin, config, json[prop], instance);\n return\n }\n } }\n instance[field.name] = field.init(config, instance);\n }\n });\n return instance\n};\n\n// Kludge to allow the view to track mappings between different\n// instances of a state.\n//\n// FIXME this is no longer needed as of prosemirror-view 1.9.0,\n// though due to backwards-compat we should probably keep it around\n// for a while (if only as a no-op)\nEditorState.addApplyListener = function addApplyListener (f) {\n applyListeners.push(f);\n};\nEditorState.removeApplyListener = function removeApplyListener (f) {\n var found = applyListeners.indexOf(f);\n if (found > -1) { applyListeners.splice(found, 1); }\n};\n\nObject.defineProperties( EditorState.prototype, prototypeAccessors$1 );\n\nvar applyListeners = [];\n\n// PluginSpec:: interface\n//\n// This is the type passed to the [`Plugin`](#state.Plugin)\n// constructor. It provides a definition for a plugin.\n//\n// props:: ?EditorProps\n// The [view props](#view.EditorProps) added by this plugin. Props\n// that are functions will be bound to have the plugin instance as\n// their `this` binding.\n//\n// state:: ?StateField\n// Allows a plugin to define a [state field](#state.StateField), an\n// extra slot in the state object in which it can keep its own data.\n//\n// key:: ?PluginKey\n// Can be used to make this a keyed plugin. You can have only one\n// plugin with a given key in a given state, but it is possible to\n// access the plugin's configuration and state through the key,\n// without having access to the plugin instance object.\n//\n// view:: ?(EditorView) → Object\n// When the plugin needs to interact with the editor view, or\n// set something up in the DOM, use this field. The function\n// will be called when the plugin's state is associated with an\n// editor view.\n//\n// return::-\n// Should return an object with the following optional\n// properties:\n//\n// update:: ?(view: EditorView, prevState: EditorState)\n// Called whenever the view's state is updated.\n//\n// destroy:: ?()\n// Called when the view is destroyed or receives a state\n// with different plugins.\n//\n// filterTransaction:: ?(Transaction, EditorState) → bool\n// When present, this will be called before a transaction is\n// applied by the state, allowing the plugin to cancel it (by\n// returning false).\n//\n// appendTransaction:: ?(transactions: [Transaction], oldState: EditorState, newState: EditorState) → ?Transaction\n// Allows the plugin to append another transaction to be applied\n// after the given array of transactions. When another plugin\n// appends a transaction after this was called, it is called again\n// with the new state and new transactions—but only the new\n// transactions, i.e. it won't be passed transactions that it\n// already saw.\n\nfunction bindProps(obj, self, target) {\n for (var prop in obj) {\n var val = obj[prop];\n if (val instanceof Function) { val = val.bind(self); }\n else if (prop == \"handleDOMEvents\") { val = bindProps(val, self, {}); }\n target[prop] = val;\n }\n return target\n}\n\n// ::- Plugins bundle functionality that can be added to an editor.\n// They are part of the [editor state](#state.EditorState) and\n// may influence that state and the view that contains it.\nvar Plugin = function Plugin(spec) {\n // :: EditorProps\n // The [props](#view.EditorProps) exported by this plugin.\n this.props = {};\n if (spec.props) { bindProps(spec.props, this, this.props); }\n // :: Object\n // The plugin's [spec object](#state.PluginSpec).\n this.spec = spec;\n this.key = spec.key ? spec.key.key : createKey(\"plugin\");\n};\n\n// :: (EditorState) → any\n// Extract the plugin's state field from an editor state.\nPlugin.prototype.getState = function getState (state) { return state[this.key] };\n\n// StateField:: interface\n// A plugin spec may provide a state field (under its\n// [`state`](#state.PluginSpec.state) property) of this type, which\n// describes the state it wants to keep. Functions provided here are\n// always called with the plugin instance as their `this` binding.\n//\n// init:: (config: Object, instance: EditorState) → T\n// Initialize the value of the field. `config` will be the object\n// passed to [`EditorState.create`](#state.EditorState^create). Note\n// that `instance` is a half-initialized state instance, and will\n// not have values for plugin fields initialized after this one.\n//\n// apply:: (tr: Transaction, value: T, oldState: EditorState, newState: EditorState) → T\n// Apply the given transaction to this state field, producing a new\n// field value. Note that the `newState` argument is again a partially\n// constructed state does not yet contain the state from plugins\n// coming after this one.\n//\n// toJSON:: ?(value: T) → *\n// Convert this field to JSON. Optional, can be left off to disable\n// JSON serialization for the field.\n//\n// fromJSON:: ?(config: Object, value: *, state: EditorState) → T\n// Deserialize the JSON representation of this field. Note that the\n// `state` argument is again a half-initialized state.\n\nvar keys = Object.create(null);\n\nfunction createKey(name) {\n if (name in keys) { return name + \"$\" + ++keys[name] }\n keys[name] = 0;\n return name + \"$\"\n}\n\n// ::- A key is used to [tag](#state.PluginSpec.key)\n// plugins in a way that makes it possible to find them, given an\n// editor state. Assigning a key does mean only one plugin of that\n// type can be active in a state.\nvar PluginKey = function PluginKey(name) {\nif ( name === void 0 ) name = \"key\";\n this.key = createKey(name); };\n\n// :: (EditorState) → ?Plugin\n// Get the active plugin with this key, if any, from an editor\n// state.\nPluginKey.prototype.get = function get (state) { return state.config.pluginsByKey[this.key] };\n\n// :: (EditorState) → ?any\n// Get the plugin's state from an editor state.\nPluginKey.prototype.getState = function getState (state) { return state[this.key] };\n\nexport { AllSelection, EditorState, NodeSelection, Plugin, PluginKey, Selection, SelectionRange, TextSelection, Transaction };\n//# sourceMappingURL=index.es.js.map\n","import RopeSequence from 'rope-sequence';\nimport { Mapping } from 'prosemirror-transform';\nimport { PluginKey, Plugin } from 'prosemirror-state';\n\n// ProseMirror's history isn't simply a way to roll back to a previous\n// state, because ProseMirror supports applying changes without adding\n// them to the history (for example during collaboration).\n//\n// To this end, each 'Branch' (one for the undo history and one for\n// the redo history) keeps an array of 'Items', which can optionally\n// hold a step (an actual undoable change), and always hold a position\n// map (which is needed to move changes below them to apply to the\n// current document).\n//\n// An item that has both a step and a selection bookmark is the start\n// of an 'event' — a group of changes that will be undone or redone at\n// once. (It stores only the bookmark, since that way we don't have to\n// provide a document until the selection is actually applied, which\n// is useful when compressing.)\n\n// Used to schedule history compression\nvar max_empty_items = 500;\n\nvar Branch = function Branch(items, eventCount) {\n this.items = items;\n this.eventCount = eventCount;\n};\n\n// : (EditorState, bool) → ?{transform: Transform, selection: ?SelectionBookmark, remaining: Branch}\n// Pop the latest event off the branch's history and apply it\n// to a document transform.\nBranch.prototype.popEvent = function popEvent (state, preserveItems) {\n var this$1 = this;\n\n if (this.eventCount == 0) { return null }\n\n var end = this.items.length;\n for (;; end--) {\n var next = this.items.get(end - 1);\n if (next.selection) { --end; break }\n }\n\n var remap, mapFrom;\n if (preserveItems) {\n remap = this.remapping(end, this.items.length);\n mapFrom = remap.maps.length;\n }\n var transform = state.tr;\n var selection, remaining;\n var addAfter = [], addBefore = [];\n\n this.items.forEach(function (item, i) {\n if (!item.step) {\n if (!remap) {\n remap = this$1.remapping(end, i + 1);\n mapFrom = remap.maps.length;\n }\n mapFrom--;\n addBefore.push(item);\n return\n }\n\n if (remap) {\n addBefore.push(new Item(item.map));\n var step = item.step.map(remap.slice(mapFrom)), map;\n\n if (step && transform.maybeStep(step).doc) {\n map = transform.mapping.maps[transform.mapping.maps.length - 1];\n addAfter.push(new Item(map, null, null, addAfter.length + addBefore.length));\n }\n mapFrom--;\n if (map) { remap.appendMap(map, mapFrom); }\n } else {\n transform.maybeStep(item.step);\n }\n\n if (item.selection) {\n selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;\n remaining = new Branch(this$1.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this$1.eventCount - 1);\n return false\n }\n }, this.items.length, 0);\n\n return {remaining: remaining, transform: transform, selection: selection}\n};\n\n// : (Transform, ?SelectionBookmark, Object) → Branch\n// Create a new branch with the given transform added.\nBranch.prototype.addTransform = function addTransform (transform, selection, histOptions, preserveItems) {\n var newItems = [], eventCount = this.eventCount;\n var oldItems = this.items, lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;\n\n for (var i = 0; i < transform.steps.length; i++) {\n var step = transform.steps[i].invert(transform.docs[i]);\n var item = new Item(transform.mapping.maps[i], step, selection), merged = (void 0);\n if (merged = lastItem && lastItem.merge(item)) {\n item = merged;\n if (i) { newItems.pop(); }\n else { oldItems = oldItems.slice(0, oldItems.length - 1); }\n }\n newItems.push(item);\n if (selection) {\n eventCount++;\n selection = null;\n }\n if (!preserveItems) { lastItem = item; }\n }\n var overflow = eventCount - histOptions.depth;\n if (overflow > DEPTH_OVERFLOW) {\n oldItems = cutOffEvents(oldItems, overflow);\n eventCount -= overflow;\n }\n return new Branch(oldItems.append(newItems), eventCount)\n};\n\nBranch.prototype.remapping = function remapping (from, to) {\n var maps = new Mapping;\n this.items.forEach(function (item, i) {\n var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from\n ? maps.maps.length - item.mirrorOffset : null;\n maps.appendMap(item.map, mirrorPos);\n }, from, to);\n return maps\n};\n\nBranch.prototype.addMaps = function addMaps (array) {\n if (this.eventCount == 0) { return this }\n return new Branch(this.items.append(array.map(function (map) { return new Item(map); })), this.eventCount)\n};\n\n// : (Transform, number)\n// When the collab module receives remote changes, the history has\n// to know about those, so that it can adjust the steps that were\n// rebased on top of the remote changes, and include the position\n// maps for the remote changes in its array of items.\nBranch.prototype.rebased = function rebased (rebasedTransform, rebasedCount) {\n if (!this.eventCount) { return this }\n\n var rebasedItems = [], start = Math.max(0, this.items.length - rebasedCount);\n\n var mapping = rebasedTransform.mapping;\n var newUntil = rebasedTransform.steps.length;\n var eventCount = this.eventCount;\n this.items.forEach(function (item) { if (item.selection) { eventCount--; } }, start);\n\n var iRebased = rebasedCount;\n this.items.forEach(function (item) {\n var pos = mapping.getMirror(--iRebased);\n if (pos == null) { return }\n newUntil = Math.min(newUntil, pos);\n var map = mapping.maps[pos];\n if (item.step) {\n var step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);\n var selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));\n if (selection) { eventCount++; }\n rebasedItems.push(new Item(map, step, selection));\n } else {\n rebasedItems.push(new Item(map));\n }\n }, start);\n\n var newMaps = [];\n for (var i = rebasedCount; i < newUntil; i++)\n { newMaps.push(new Item(mapping.maps[i])); }\n var items = this.items.slice(0, start).append(newMaps).append(rebasedItems);\n var branch = new Branch(items, eventCount);\n\n if (branch.emptyItemCount() > max_empty_items)\n { branch = branch.compress(this.items.length - rebasedItems.length); }\n return branch\n};\n\nBranch.prototype.emptyItemCount = function emptyItemCount () {\n var count = 0;\n this.items.forEach(function (item) { if (!item.step) { count++; } });\n return count\n};\n\n// Compressing a branch means rewriting it to push the air (map-only\n// items) out. During collaboration, these naturally accumulate\n// because each remote change adds one. The `upto` argument is used\n// to ensure that only the items below a given level are compressed,\n// because `rebased` relies on a clean, untouched set of items in\n// order to associate old items with rebased steps.\nBranch.prototype.compress = function compress (upto) {\n if ( upto === void 0 ) upto = this.items.length;\n\n var remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n var items = [], events = 0;\n this.items.forEach(function (item, i) {\n if (i >= upto) {\n items.push(item);\n if (item.selection) { events++; }\n } else if (item.step) {\n var step = item.step.map(remap.slice(mapFrom)), map = step && step.getMap();\n mapFrom--;\n if (map) { remap.appendMap(map, mapFrom); }\n if (step) {\n var selection = item.selection && item.selection.map(remap.slice(mapFrom));\n if (selection) { events++; }\n var newItem = new Item(map.invert(), step, selection), merged, last = items.length - 1;\n if (merged = items.length && items[last].merge(newItem))\n { items[last] = merged; }\n else\n { items.push(newItem); }\n }\n } else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(RopeSequence.from(items.reverse()), events)\n};\n\nBranch.empty = new Branch(RopeSequence.empty, 0);\n\nfunction cutOffEvents(items, n) {\n var cutPoint;\n items.forEach(function (item, i) {\n if (item.selection && (n-- == 0)) {\n cutPoint = i;\n return false\n }\n });\n return items.slice(cutPoint)\n}\n\nvar Item = function Item(map, step, selection, mirrorOffset) {\n // The (forward) step map for this item.\n this.map = map;\n // The inverted step\n this.step = step;\n // If this is non-null, this item is the start of a group, and\n // this selection is the starting selection for the group (the one\n // that was active before the first step was applied)\n this.selection = selection;\n // If this item is the inverse of a previous mapping on the stack,\n // this points at the inverse's offset\n this.mirrorOffset = mirrorOffset;\n};\n\nItem.prototype.merge = function merge (other) {\n if (this.step && other.step && !other.selection) {\n var step = other.step.merge(this.step);\n if (step) { return new Item(step.getMap().invert(), step, this.selection) }\n }\n};\n\n// The value of the state field that tracks undo/redo history for that\n// state. Will be stored in the plugin state when the history plugin\n// is active.\nvar HistoryState = function HistoryState(done, undone, prevRanges, prevTime) {\n this.done = done;\n this.undone = undone;\n this.prevRanges = prevRanges;\n this.prevTime = prevTime;\n};\n\nvar DEPTH_OVERFLOW = 20;\n\n// : (HistoryState, EditorState, Transaction, Object)\n// Record a transformation in undo history.\nfunction applyTransaction(history, state, tr, options) {\n var historyTr = tr.getMeta(historyKey), rebased;\n if (historyTr) { return historyTr.historyState }\n\n if (tr.getMeta(closeHistoryKey)) { history = new HistoryState(history.done, history.undone, null, 0); }\n\n var appended = tr.getMeta(\"appendedTransaction\");\n\n if (tr.steps.length == 0) {\n return history\n } else if (appended && appended.getMeta(historyKey)) {\n if (appended.getMeta(historyKey).redo)\n { return new HistoryState(history.done.addTransform(tr, null, options, mustPreserveItems(state)),\n history.undone, rangesFor(tr.mapping.maps[tr.steps.length - 1]), history.prevTime) }\n else\n { return new HistoryState(history.done, history.undone.addTransform(tr, null, options, mustPreserveItems(state)),\n null, history.prevTime) }\n } else if (tr.getMeta(\"addToHistory\") !== false && !(appended && appended.getMeta(\"addToHistory\") === false)) {\n // Group transforms that occur in quick succession into one event.\n var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay ||\n !isAdjacentTo(tr, history.prevRanges));\n var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);\n return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null,\n options, mustPreserveItems(state)),\n Branch.empty, prevRanges, tr.time)\n } else if (rebased = tr.getMeta(\"rebased\")) {\n // Used by the collab module to tell the history that some of its\n // content has been rebased.\n return new HistoryState(history.done.rebased(tr, rebased),\n history.undone.rebased(tr, rebased),\n mapRanges(history.prevRanges, tr.mapping), history.prevTime)\n } else {\n return new HistoryState(history.done.addMaps(tr.mapping.maps),\n history.undone.addMaps(tr.mapping.maps),\n mapRanges(history.prevRanges, tr.mapping), history.prevTime)\n }\n}\n\nfunction isAdjacentTo(transform, prevRanges) {\n if (!prevRanges) { return false }\n if (!transform.docChanged) { return true }\n var adjacent = false;\n transform.mapping.maps[0].forEach(function (start, end) {\n for (var i = 0; i < prevRanges.length; i += 2)\n { if (start <= prevRanges[i + 1] && end >= prevRanges[i])\n { adjacent = true; } }\n });\n return adjacent\n}\n\nfunction rangesFor(map) {\n var result = [];\n map.forEach(function (_from, _to, from, to) { return result.push(from, to); });\n return result\n}\n\nfunction mapRanges(ranges, mapping) {\n if (!ranges) { return null }\n var result = [];\n for (var i = 0; i < ranges.length; i += 2) {\n var from = mapping.map(ranges[i], 1), to = mapping.map(ranges[i + 1], -1);\n if (from <= to) { result.push(from, to); }\n }\n return result\n}\n\n// : (HistoryState, EditorState, (tr: Transaction), bool)\n// Apply the latest event from one branch to the document and shift the event\n// onto the other branch.\nfunction histTransaction(history, state, dispatch, redo) {\n var preserveItems = mustPreserveItems(state), histOptions = historyKey.get(state).spec.config;\n var pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);\n if (!pop) { return }\n\n var selection = pop.selection.resolve(pop.transform.doc);\n var added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(),\n histOptions, preserveItems);\n\n var newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0);\n dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {redo: redo, historyState: newHist}).scrollIntoView());\n}\n\nvar cachedPreserveItems = false, cachedPreserveItemsPlugins = null;\n// Check whether any plugin in the given state has a\n// `historyPreserveItems` property in its spec, in which case we must\n// preserve steps exactly as they came in, so that they can be\n// rebased.\nfunction mustPreserveItems(state) {\n var plugins = state.plugins;\n if (cachedPreserveItemsPlugins != plugins) {\n cachedPreserveItems = false;\n cachedPreserveItemsPlugins = plugins;\n for (var i = 0; i < plugins.length; i++) { if (plugins[i].spec.historyPreserveItems) {\n cachedPreserveItems = true;\n break\n } }\n }\n return cachedPreserveItems\n}\n\n// :: (Transaction) → Transaction\n// Set a flag on the given transaction that will prevent further steps\n// from being appended to an existing history event (so that they\n// require a separate undo command to undo).\nfunction closeHistory(tr) {\n return tr.setMeta(closeHistoryKey, true)\n}\n\nvar historyKey = new PluginKey(\"history\");\nvar closeHistoryKey = new PluginKey(\"closeHistory\");\n\n// :: (?Object) → Plugin\n// Returns a plugin that enables the undo history for an editor. The\n// plugin will track undo and redo stacks, which can be used with the\n// [`undo`](#history.undo) and [`redo`](#history.redo) commands.\n//\n// You can set an `\"addToHistory\"` [metadata\n// property](#state.Transaction.setMeta) of `false` on a transaction\n// to prevent it from being rolled back by undo.\n//\n// config::-\n// Supports the following configuration options:\n//\n// depth:: ?number\n// The amount of history events that are collected before the\n// oldest events are discarded. Defaults to 100.\n//\n// newGroupDelay:: ?number\n// The delay between changes after which a new group should be\n// started. Defaults to 500 (milliseconds). Note that when changes\n// aren't adjacent, a new group is always started.\nfunction history(config) {\n config = {depth: config && config.depth || 100,\n newGroupDelay: config && config.newGroupDelay || 500};\n return new Plugin({\n key: historyKey,\n\n state: {\n init: function init() {\n return new HistoryState(Branch.empty, Branch.empty, null, 0)\n },\n apply: function apply(tr, hist, state) {\n return applyTransaction(hist, state, tr, config)\n }\n },\n\n config: config\n })\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that undoes the last change, if any.\nfunction undo(state, dispatch) {\n var hist = historyKey.getState(state);\n if (!hist || hist.done.eventCount == 0) { return false }\n if (dispatch) { histTransaction(hist, state, dispatch, false); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// A command function that redoes the last undone change, if any.\nfunction redo(state, dispatch) {\n var hist = historyKey.getState(state);\n if (!hist || hist.undone.eventCount == 0) { return false }\n if (dispatch) { histTransaction(hist, state, dispatch, true); }\n return true\n}\n\n// :: (EditorState) → number\n// The amount of undoable events available in a given state.\nfunction undoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.done.eventCount : 0\n}\n\n// :: (EditorState) → number\n// The amount of redoable events available in a given editor state.\nfunction redoDepth(state) {\n var hist = historyKey.getState(state);\n return hist ? hist.undone.eventCount : 0\n}\n\nexport { HistoryState, closeHistory, history, redo, redoDepth, undo, undoDepth };\n//# sourceMappingURL=index.es.js.map\n","export var base = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 10: \"Enter\",\n 12: \"NumLock\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 44: \"PrintScreen\",\n 45: \"Insert\",\n 46: \"Delete\",\n 59: \";\",\n 61: \"=\",\n 91: \"Meta\",\n 92: \"Meta\",\n 106: \"*\",\n 107: \"+\",\n 108: \",\",\n 109: \"-\",\n 110: \".\",\n 111: \"/\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 160: \"Shift\",\n 161: \"Shift\",\n 162: \"Control\",\n 163: \"Control\",\n 164: \"Alt\",\n 165: \"Alt\",\n 173: \"-\",\n 186: \";\",\n 187: \"=\",\n 188: \",\",\n 189: \"-\",\n 190: \".\",\n 191: \"/\",\n 192: \"`\",\n 219: \"[\",\n 220: \"\\\\\",\n 221: \"]\",\n 222: \"'\",\n 229: \"q\"\n}\n\nexport var shift = {\n 48: \")\",\n 49: \"!\",\n 50: \"@\",\n 51: \"#\",\n 52: \"$\",\n 53: \"%\",\n 54: \"^\",\n 55: \"&\",\n 56: \"*\",\n 57: \"(\",\n 59: \":\",\n 61: \"+\",\n 173: \"_\",\n 186: \":\",\n 187: \"+\",\n 188: \"<\",\n 189: \"_\",\n 190: \">\",\n 191: \"?\",\n 192: \"~\",\n 219: \"{\",\n 220: \"|\",\n 221: \"}\",\n 222: \"\\\"\",\n 229: \"Q\"\n}\n\nvar chrome = typeof navigator != \"undefined\" && /Chrome\\/(\\d+)/.exec(navigator.userAgent)\nvar safari = typeof navigator != \"undefined\" && /Apple Computer/.test(navigator.vendor)\nvar gecko = typeof navigator != \"undefined\" && /Gecko\\/\\d+/.test(navigator.userAgent)\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform)\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent)\nvar brokenModifierNames = chrome && (mac || +chrome[1] < 57) || gecko && mac\n\n// Fill in the digit keys\nfor (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i)\n\n// The function keys\nfor (var i = 1; i <= 24; i++) base[i + 111] = \"F\" + i\n\n// And the alphabetic keys\nfor (var i = 65; i <= 90; i++) {\n base[i] = String.fromCharCode(i + 32)\n shift[i] = String.fromCharCode(i)\n}\n\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code]\n\nexport function keyName(event) {\n // Don't trust event.key in Chrome when there are modifiers until\n // they fix https://bugs.chromium.org/p/chromium/issues/detail?id=633838\n var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) ||\n (safari || ie) && event.shiftKey && event.key && event.key.length == 1\n var name = (!ignoreKey && event.key) ||\n (event.shiftKey ? shift : base)[event.keyCode] ||\n event.key || \"Unidentified\"\n // Edge sometimes produces wrong names (Issue #3)\n if (name == \"Esc\") name = \"Escape\"\n if (name == \"Del\") name = \"Delete\"\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n if (name == \"Left\") name = \"ArrowLeft\"\n if (name == \"Up\") name = \"ArrowUp\"\n if (name == \"Right\") name = \"ArrowRight\"\n if (name == \"Down\") name = \"ArrowDown\"\n return name\n}\n","import { keyName, base } from 'w3c-keyname';\nimport { Plugin } from 'prosemirror-state';\n\n// declare global: navigator\n\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform) : false;\n\nfunction normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/), result = parts[parts.length - 1];\n if (result == \"Space\") { result = \" \"; }\n var alt, ctrl, shift, meta;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { meta = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else if (/^mod$/i.test(mod)) { if (mac) { meta = true; } else { ctrl = true; } }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { result = \"Alt-\" + result; }\n if (ctrl) { result = \"Ctrl-\" + result; }\n if (meta) { result = \"Meta-\" + result; }\n if (shift) { result = \"Shift-\" + result; }\n return result\n}\n\nfunction normalize(map) {\n var copy = Object.create(null);\n for (var prop in map) { copy[normalizeKeyName(prop)] = map[prop]; }\n return copy\n}\n\nfunction modifiers(name, event, shift) {\n if (event.altKey) { name = \"Alt-\" + name; }\n if (event.ctrlKey) { name = \"Ctrl-\" + name; }\n if (event.metaKey) { name = \"Meta-\" + name; }\n if (shift !== false && event.shiftKey) { name = \"Shift-\" + name; }\n return name\n}\n\n// :: (Object) → Plugin\n// Create a keymap plugin for the given set of bindings.\n//\n// Bindings should map key names to [command](#commands)-style\n// functions, which will be called with `(EditorState, dispatch,\n// EditorView)` arguments, and should return true when they've handled\n// the key. Note that the view argument isn't part of the command\n// protocol, but can be used as an escape hatch if a binding needs to\n// directly interact with the UI.\n//\n// Key names may be strings like `\"Shift-Ctrl-Enter\"`—a key\n// identifier prefixed with zero or more modifiers. Key identifiers\n// are based on the strings that can appear in\n// [`KeyEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key).\n// Use lowercase letters to refer to letter keys (or uppercase letters\n// if you want shift to be held). You may use `\"Space\"` as an alias\n// for the `\" \"` name.\n//\n// Modifiers can be given in any order. `Shift-` (or `s-`), `Alt-` (or\n// `a-`), `Ctrl-` (or `c-` or `Control-`) and `Cmd-` (or `m-` or\n// `Meta-`) are recognized. For characters that are created by holding\n// shift, the `Shift-` prefix is implied, and should not be added\n// explicitly.\n//\n// You can use `Mod-` as a shorthand for `Cmd-` on Mac and `Ctrl-` on\n// other platforms.\n//\n// You can add multiple keymap plugins to an editor. The order in\n// which they appear determines their precedence (the ones early in\n// the array get to dispatch first).\nfunction keymap(bindings) {\n return new Plugin({props: {handleKeyDown: keydownHandler(bindings)}})\n}\n\n// :: (Object) → (view: EditorView, event: dom.Event) → bool\n// Given a set of bindings (using the same format as\n// [`keymap`](#keymap.keymap), return a [keydown\n// handler](#view.EditorProps.handleKeyDown) that handles them.\nfunction keydownHandler(bindings) {\n var map = normalize(bindings);\n return function(view, event) {\n var name = keyName(event), isChar = name.length == 1 && name != \" \", baseName;\n var direct = map[modifiers(name, event, !isChar)];\n if (direct && direct(view.state, view.dispatch, view)) { return true }\n if (isChar && (event.shiftKey || event.altKey || event.metaKey || name.charCodeAt(0) > 127) &&\n (baseName = base[event.keyCode]) && baseName != name) {\n // Try falling back to the keyCode when there's a modifier\n // active or the character produced isn't ASCII, and our table\n // produces a different name from the the keyCode. See #668,\n // #1060\n var fromCode = map[modifiers(baseName, event, true)];\n if (fromCode && fromCode(view.state, view.dispatch, view)) { return true }\n } else if (isChar && event.shiftKey) {\n // Otherwise, if shift is active, also try the binding with the\n // Shift- prefix enabled. See #997\n var withShift = map[modifiers(name, event, true)];\n if (withShift && withShift(view.state, view.dispatch, view)) { return true }\n }\n return false\n }\n}\n\nexport { keydownHandler, keymap };\n//# sourceMappingURL=index.es.js.map\n","import { TextSelection, NodeSelection, Selection, AllSelection } from 'prosemirror-state';\nimport { DOMSerializer, Fragment, Mark, DOMParser, Slice } from 'prosemirror-model';\nimport { dropPoint } from 'prosemirror-transform';\n\nvar result = {};\n\nif (typeof navigator != \"undefined\" && typeof document != \"undefined\") {\n var ie_edge = /Edge\\/(\\d+)/.exec(navigator.userAgent);\n var ie_upto10 = /MSIE \\d/.test(navigator.userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent);\n\n result.mac = /Mac/.test(navigator.platform);\n var ie = result.ie = !!(ie_upto10 || ie_11up || ie_edge);\n result.ie_version = ie_upto10 ? document.documentMode || 6 : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : null;\n result.gecko = !ie && /gecko\\/(\\d+)/i.test(navigator.userAgent);\n result.gecko_version = result.gecko && +(/Firefox\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n var chrome = !ie && /Chrome\\/(\\d+)/.exec(navigator.userAgent);\n result.chrome = !!chrome;\n result.chrome_version = chrome && +chrome[1];\n // Is true for both iOS and iPadOS for convenience\n result.safari = !ie && /Apple Computer/.test(navigator.vendor);\n result.ios = result.safari && (/Mobile\\/\\w+/.test(navigator.userAgent) || navigator.maxTouchPoints > 2);\n result.android = /Android \\d/.test(navigator.userAgent);\n result.webkit = \"webkitFontSmoothing\" in document.documentElement.style;\n result.webkit_version = result.webkit && +(/\\bAppleWebKit\\/(\\d+)/.exec(navigator.userAgent) || [0, 0])[1];\n}\n\nvar domIndex = function(node) {\n for (var index = 0;; index++) {\n node = node.previousSibling;\n if (!node) { return index }\n }\n};\n\nvar parentNode = function(node) {\n var parent = node.assignedSlot || node.parentNode;\n return parent && parent.nodeType == 11 ? parent.host : parent\n};\n\nvar reusedRange = null;\n\n// Note that this will always return the same range, because DOM range\n// objects are every expensive, and keep slowing down subsequent DOM\n// updates, for some reason.\nvar textRange = function(node, from, to) {\n var range = reusedRange || (reusedRange = document.createRange());\n range.setEnd(node, to == null ? node.nodeValue.length : to);\n range.setStart(node, from || 0);\n return range\n};\n\n// Scans forward and backward through DOM positions equivalent to the\n// given one to see if the two are in the same place (i.e. after a\n// text node vs at the end of that text node)\nvar isEquivalentPosition = function(node, off, targetNode, targetOff) {\n return targetNode && (scanFor(node, off, targetNode, targetOff, -1) ||\n scanFor(node, off, targetNode, targetOff, 1))\n};\n\nvar atomElements = /^(img|br|input|textarea|hr)$/i;\n\nfunction scanFor(node, off, targetNode, targetOff, dir) {\n for (;;) {\n if (node == targetNode && off == targetOff) { return true }\n if (off == (dir < 0 ? 0 : nodeSize(node))) {\n var parent = node.parentNode;\n if (parent.nodeType != 1 || hasBlockDesc(node) || atomElements.test(node.nodeName) || node.contentEditable == \"false\")\n { return false }\n off = domIndex(node) + (dir < 0 ? 0 : 1);\n node = parent;\n } else if (node.nodeType == 1) {\n node = node.childNodes[off + (dir < 0 ? -1 : 0)];\n if (node.contentEditable == \"false\") { return false }\n off = dir < 0 ? nodeSize(node) : 0;\n } else {\n return false\n }\n }\n}\n\nfunction nodeSize(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length\n}\n\nfunction isOnEdge(node, offset, parent) {\n for (var atStart = offset == 0, atEnd = offset == nodeSize(node); atStart || atEnd;) {\n if (node == parent) { return true }\n var index = domIndex(node);\n node = node.parentNode;\n if (!node) { return false }\n atStart = atStart && index == 0;\n atEnd = atEnd && index == nodeSize(node);\n }\n}\n\nfunction hasBlockDesc(dom) {\n var desc;\n for (var cur = dom; cur; cur = cur.parentNode) { if (desc = cur.pmViewDesc) { break } }\n return desc && desc.node && desc.node.isBlock && (desc.dom == dom || desc.contentDOM == dom)\n}\n\n// Work around Chrome issue https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n// (isCollapsed inappropriately returns true in shadow dom)\nvar selectionCollapsed = function(domSel) {\n var collapsed = domSel.isCollapsed;\n if (collapsed && result.chrome && domSel.rangeCount && !domSel.getRangeAt(0).collapsed)\n { collapsed = false; }\n return collapsed\n};\n\nfunction keyEvent(keyCode, key) {\n var event = document.createEvent(\"Event\");\n event.initEvent(\"keydown\", true, true);\n event.keyCode = keyCode;\n event.key = event.code = key;\n return event\n}\n\nfunction windowRect(doc) {\n return {left: 0, right: doc.documentElement.clientWidth,\n top: 0, bottom: doc.documentElement.clientHeight}\n}\n\nfunction getSide(value, side) {\n return typeof value == \"number\" ? value : value[side]\n}\n\nfunction clientRect(node) {\n var rect = node.getBoundingClientRect();\n // Adjust for elements with style \"transform: scale()\"\n var scaleX = (rect.width / node.offsetWidth) || 1;\n var scaleY = (rect.height / node.offsetHeight) || 1;\n // Make sure scrollbar width isn't included in the rectangle\n return {left: rect.left, right: rect.left + node.clientWidth * scaleX,\n top: rect.top, bottom: rect.top + node.clientHeight * scaleY}\n}\n\nfunction scrollRectIntoView(view, rect, startDOM) {\n var scrollThreshold = view.someProp(\"scrollThreshold\") || 0, scrollMargin = view.someProp(\"scrollMargin\") || 5;\n var doc = view.dom.ownerDocument;\n for (var parent = startDOM || view.dom;; parent = parentNode(parent)) {\n if (!parent) { break }\n if (parent.nodeType != 1) { continue }\n var atTop = parent == doc.body || parent.nodeType != 1;\n var bounding = atTop ? windowRect(doc) : clientRect(parent);\n var moveX = 0, moveY = 0;\n if (rect.top < bounding.top + getSide(scrollThreshold, \"top\"))\n { moveY = -(bounding.top - rect.top + getSide(scrollMargin, \"top\")); }\n else if (rect.bottom > bounding.bottom - getSide(scrollThreshold, \"bottom\"))\n { moveY = rect.bottom - bounding.bottom + getSide(scrollMargin, \"bottom\"); }\n if (rect.left < bounding.left + getSide(scrollThreshold, \"left\"))\n { moveX = -(bounding.left - rect.left + getSide(scrollMargin, \"left\")); }\n else if (rect.right > bounding.right - getSide(scrollThreshold, \"right\"))\n { moveX = rect.right - bounding.right + getSide(scrollMargin, \"right\"); }\n if (moveX || moveY) {\n if (atTop) {\n doc.defaultView.scrollBy(moveX, moveY);\n } else {\n var startX = parent.scrollLeft, startY = parent.scrollTop;\n if (moveY) { parent.scrollTop += moveY; }\n if (moveX) { parent.scrollLeft += moveX; }\n var dX = parent.scrollLeft - startX, dY = parent.scrollTop - startY;\n rect = {left: rect.left - dX, top: rect.top - dY, right: rect.right - dX, bottom: rect.bottom - dY};\n }\n }\n if (atTop) { break }\n }\n}\n\n// Store the scroll position of the editor's parent nodes, along with\n// the top position of an element near the top of the editor, which\n// will be used to make sure the visible viewport remains stable even\n// when the size of the content above changes.\nfunction storeScrollPos(view) {\n var rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);\n var refDOM, refTop;\n for (var x = (rect.left + rect.right) / 2, y = startY + 1;\n y < Math.min(innerHeight, rect.bottom); y += 5) {\n var dom = view.root.elementFromPoint(x, y);\n if (dom == view.dom || !view.dom.contains(dom)) { continue }\n var localRect = dom.getBoundingClientRect();\n if (localRect.top >= startY - 20) {\n refDOM = dom;\n refTop = localRect.top;\n break\n }\n }\n return {refDOM: refDOM, refTop: refTop, stack: scrollStack(view.dom)}\n}\n\nfunction scrollStack(dom) {\n var stack = [], doc = dom.ownerDocument;\n for (; dom; dom = parentNode(dom)) {\n stack.push({dom: dom, top: dom.scrollTop, left: dom.scrollLeft});\n if (dom == doc) { break }\n }\n return stack\n}\n\n// Reset the scroll position of the editor's parent nodes to that what\n// it was before, when storeScrollPos was called.\nfunction resetScrollPos(ref) {\n var refDOM = ref.refDOM;\n var refTop = ref.refTop;\n var stack = ref.stack;\n\n var newRefTop = refDOM ? refDOM.getBoundingClientRect().top : 0;\n restoreScrollStack(stack, newRefTop == 0 ? 0 : newRefTop - refTop);\n}\n\nfunction restoreScrollStack(stack, dTop) {\n for (var i = 0; i < stack.length; i++) {\n var ref = stack[i];\n var dom = ref.dom;\n var top = ref.top;\n var left = ref.left;\n if (dom.scrollTop != top + dTop) { dom.scrollTop = top + dTop; }\n if (dom.scrollLeft != left) { dom.scrollLeft = left; }\n }\n}\n\nvar preventScrollSupported = null;\n// Feature-detects support for .focus({preventScroll: true}), and uses\n// a fallback kludge when not supported.\nfunction focusPreventScroll(dom) {\n if (dom.setActive) { return dom.setActive() } // in IE\n if (preventScrollSupported) { return dom.focus(preventScrollSupported) }\n\n var stored = scrollStack(dom);\n dom.focus(preventScrollSupported == null ? {\n get preventScroll() {\n preventScrollSupported = {preventScroll: true};\n return true\n }\n } : undefined);\n if (!preventScrollSupported) {\n preventScrollSupported = false;\n restoreScrollStack(stored, 0);\n }\n}\n\nfunction findOffsetInNode(node, coords) {\n var closest, dxClosest = 2e8, coordsClosest, offset = 0;\n var rowBot = coords.top, rowTop = coords.top;\n for (var child = node.firstChild, childIndex = 0; child; child = child.nextSibling, childIndex++) {\n var rects = (void 0);\n if (child.nodeType == 1) { rects = child.getClientRects(); }\n else if (child.nodeType == 3) { rects = textRange(child).getClientRects(); }\n else { continue }\n\n for (var i = 0; i < rects.length; i++) {\n var rect = rects[i];\n if (rect.top <= rowBot && rect.bottom >= rowTop) {\n rowBot = Math.max(rect.bottom, rowBot);\n rowTop = Math.min(rect.top, rowTop);\n var dx = rect.left > coords.left ? rect.left - coords.left\n : rect.right < coords.left ? coords.left - rect.right : 0;\n if (dx < dxClosest) {\n closest = child;\n dxClosest = dx;\n coordsClosest = dx && closest.nodeType == 3 ? {left: rect.right < coords.left ? rect.right : rect.left, top: coords.top} : coords;\n if (child.nodeType == 1 && dx)\n { offset = childIndex + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0); }\n continue\n }\n }\n if (!closest && (coords.left >= rect.right && coords.top >= rect.top ||\n coords.left >= rect.left && coords.top >= rect.bottom))\n { offset = childIndex + 1; }\n }\n }\n if (closest && closest.nodeType == 3) { return findOffsetInText(closest, coordsClosest) }\n if (!closest || (dxClosest && closest.nodeType == 1)) { return {node: node, offset: offset} }\n return findOffsetInNode(closest, coordsClosest)\n}\n\nfunction findOffsetInText(node, coords) {\n var len = node.nodeValue.length;\n var range = document.createRange();\n for (var i = 0; i < len; i++) {\n range.setEnd(node, i + 1);\n range.setStart(node, i);\n var rect = singleRect(range, 1);\n if (rect.top == rect.bottom) { continue }\n if (inRect(coords, rect))\n { return {node: node, offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0)} }\n }\n return {node: node, offset: 0}\n}\n\nfunction inRect(coords, rect) {\n return coords.left >= rect.left - 1 && coords.left <= rect.right + 1&&\n coords.top >= rect.top - 1 && coords.top <= rect.bottom + 1\n}\n\nfunction targetKludge(dom, coords) {\n var parent = dom.parentNode;\n if (parent && /^li$/i.test(parent.nodeName) && coords.left < dom.getBoundingClientRect().left)\n { return parent }\n return dom\n}\n\nfunction posFromElement(view, elt, coords) {\n var ref = findOffsetInNode(elt, coords);\n var node = ref.node;\n var offset = ref.offset;\n var bias = -1;\n if (node.nodeType == 1 && !node.firstChild) {\n var rect = node.getBoundingClientRect();\n bias = rect.left != rect.right && coords.left > (rect.left + rect.right) / 2 ? 1 : -1;\n }\n return view.docView.posFromDOM(node, offset, bias)\n}\n\nfunction posFromCaret(view, node, offset, coords) {\n // Browser (in caretPosition/RangeFromPoint) will agressively\n // normalize towards nearby inline nodes. Since we are interested in\n // positions between block nodes too, we first walk up the hierarchy\n // of nodes to see if there are block nodes that the coordinates\n // fall outside of. If so, we take the position before/after that\n // block. If not, we call `posFromDOM` on the raw node/offset.\n var outside = -1;\n for (var cur = node;;) {\n if (cur == view.dom) { break }\n var desc = view.docView.nearestDesc(cur, true);\n if (!desc) { return null }\n if (desc.node.isBlock && desc.parent) {\n var rect = desc.dom.getBoundingClientRect();\n if (rect.left > coords.left || rect.top > coords.top) { outside = desc.posBefore; }\n else if (rect.right < coords.left || rect.bottom < coords.top) { outside = desc.posAfter; }\n else { break }\n }\n cur = desc.dom.parentNode;\n }\n return outside > -1 ? outside : view.docView.posFromDOM(node, offset)\n}\n\nfunction elementFromPoint(element, coords, box) {\n var len = element.childNodes.length;\n if (len && box.top < box.bottom) {\n for (var startI = Math.max(0, Math.min(len - 1, Math.floor(len * (coords.top - box.top) / (box.bottom - box.top)) - 2)), i = startI;;) {\n var child = element.childNodes[i];\n if (child.nodeType == 1) {\n var rects = child.getClientRects();\n for (var j = 0; j < rects.length; j++) {\n var rect = rects[j];\n if (inRect(coords, rect)) { return elementFromPoint(child, coords, rect) }\n }\n }\n if ((i = (i + 1) % len) == startI) { break }\n }\n }\n return element\n}\n\n// Given an x,y position on the editor, get the position in the document.\nfunction posAtCoords(view, coords) {\n var assign, assign$1;\n\n var root = view.root, node, offset;\n if (root.caretPositionFromPoint) {\n try { // Firefox throws for this call in hard-to-predict circumstances (#994)\n var pos$1 = root.caretPositionFromPoint(coords.left, coords.top);\n if (pos$1) { ((assign = pos$1, node = assign.offsetNode, offset = assign.offset)); }\n } catch (_) {}\n }\n if (!node && root.caretRangeFromPoint) {\n var range = root.caretRangeFromPoint(coords.left, coords.top);\n if (range) { ((assign$1 = range, node = assign$1.startContainer, offset = assign$1.startOffset)); }\n }\n\n var elt = root.elementFromPoint(coords.left, coords.top + 1), pos;\n if (!elt || !view.dom.contains(elt.nodeType != 1 ? elt.parentNode : elt)) {\n var box = view.dom.getBoundingClientRect();\n if (!inRect(coords, box)) { return null }\n elt = elementFromPoint(view.dom, coords, box);\n if (!elt) { return null }\n }\n // Safari's caretRangeFromPoint returns nonsense when on a draggable element\n if (result.safari && elt.draggable) { node = offset = null; }\n elt = targetKludge(elt, coords);\n if (node) {\n if (result.gecko && node.nodeType == 1) {\n // Firefox will sometimes return offsets into nodes, which\n // have no actual children, from caretPositionFromPoint (#953)\n offset = Math.min(offset, node.childNodes.length);\n // It'll also move the returned position before image nodes,\n // even if those are behind it.\n if (offset < node.childNodes.length) {\n var next = node.childNodes[offset], box$1;\n if (next.nodeName == \"IMG\" && (box$1 = next.getBoundingClientRect()).right <= coords.left &&\n box$1.bottom > coords.top)\n { offset++; }\n }\n }\n // Suspiciously specific kludge to work around caret*FromPoint\n // never returning a position at the end of the document\n if (node == view.dom && offset == node.childNodes.length - 1 && node.lastChild.nodeType == 1 &&\n coords.top > node.lastChild.getBoundingClientRect().bottom)\n { pos = view.state.doc.content.size; }\n // Ignore positions directly after a BR, since caret*FromPoint\n // 'round up' positions that would be more accurately placed\n // before the BR node.\n else if (offset == 0 || node.nodeType != 1 || node.childNodes[offset - 1].nodeName != \"BR\")\n { pos = posFromCaret(view, node, offset, coords); }\n }\n if (pos == null) { pos = posFromElement(view, elt, coords); }\n\n var desc = view.docView.nearestDesc(elt, true);\n return {pos: pos, inside: desc ? desc.posAtStart - desc.border : -1}\n}\n\nfunction singleRect(object, bias) {\n var rects = object.getClientRects();\n return !rects.length ? object.getBoundingClientRect() : rects[bias < 0 ? 0 : rects.length - 1]\n}\n\nvar BIDI = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n\n// : (EditorView, number, number) → {left: number, top: number, right: number, bottom: number}\n// Given a position in the document model, get a bounding box of the\n// character at that position, relative to the window.\nfunction coordsAtPos(view, pos, side) {\n var ref = view.docView.domFromPos(pos, side < 0 ? -1 : 1);\n var node = ref.node;\n var offset = ref.offset;\n\n var supportEmptyRange = result.webkit || result.gecko;\n if (node.nodeType == 3) {\n // These browsers support querying empty text ranges. Prefer that in\n // bidi context or when at the end of a node.\n if (supportEmptyRange && (BIDI.test(node.nodeValue) || (side < 0 ? !offset : offset == node.nodeValue.length))) {\n var rect = singleRect(textRange(node, offset, offset), side);\n // Firefox returns bad results (the position before the space)\n // when querying a position directly after line-broken\n // whitespace. Detect this situation and and kludge around it\n if (result.gecko && offset && /\\s/.test(node.nodeValue[offset - 1]) && offset < node.nodeValue.length) {\n var rectBefore = singleRect(textRange(node, offset - 1, offset - 1), -1);\n if (rectBefore.top == rect.top) {\n var rectAfter = singleRect(textRange(node, offset, offset + 1), -1);\n if (rectAfter.top != rect.top)\n { return flattenV(rectAfter, rectAfter.left < rectBefore.left) }\n }\n }\n return rect\n } else {\n var from = offset, to = offset, takeSide = side < 0 ? 1 : -1;\n if (side < 0 && !offset) { to++; takeSide = -1; }\n else if (side >= 0 && offset == node.nodeValue.length) { from--; takeSide = 1; }\n else if (side < 0) { from--; }\n else { to ++; }\n return flattenV(singleRect(textRange(node, from, to), takeSide), takeSide < 0)\n }\n }\n\n // Return a horizontal line in block context\n if (!view.state.doc.resolve(pos).parent.inlineContent) {\n if (offset && (side < 0 || offset == nodeSize(node))) {\n var before = node.childNodes[offset - 1];\n if (before.nodeType == 1) { return flattenH(before.getBoundingClientRect(), false) }\n }\n if (offset < nodeSize(node)) {\n var after = node.childNodes[offset];\n if (after.nodeType == 1) { return flattenH(after.getBoundingClientRect(), true) }\n }\n return flattenH(node.getBoundingClientRect(), side >= 0)\n }\n\n // Inline, not in text node (this is not Bidi-safe)\n if (offset && (side < 0 || offset == nodeSize(node))) {\n var before$1 = node.childNodes[offset - 1];\n var target = before$1.nodeType == 3 ? textRange(before$1, nodeSize(before$1) - (supportEmptyRange ? 0 : 1))\n // BR nodes tend to only return the rectangle before them.\n // Only use them if they are the last element in their parent\n : before$1.nodeType == 1 && (before$1.nodeName != \"BR\" || !before$1.nextSibling) ? before$1 : null;\n if (target) { return flattenV(singleRect(target, 1), false) }\n }\n if (offset < nodeSize(node)) {\n var after$1 = node.childNodes[offset];\n var target$1 = after$1.nodeType == 3 ? textRange(after$1, 0, (supportEmptyRange ? 0 : 1))\n : after$1.nodeType == 1 ? after$1 : null;\n if (target$1) { return flattenV(singleRect(target$1, -1), true) }\n }\n // All else failed, just try to get a rectangle for the target node\n return flattenV(singleRect(node.nodeType == 3 ? textRange(node) : node, -side), side >= 0)\n}\n\nfunction flattenV(rect, left) {\n if (rect.width == 0) { return rect }\n var x = left ? rect.left : rect.right;\n return {top: rect.top, bottom: rect.bottom, left: x, right: x}\n}\n\nfunction flattenH(rect, top) {\n if (rect.height == 0) { return rect }\n var y = top ? rect.top : rect.bottom;\n return {top: y, bottom: y, left: rect.left, right: rect.right}\n}\n\nfunction withFlushedState(view, state, f) {\n var viewState = view.state, active = view.root.activeElement;\n if (viewState != state) { view.updateState(state); }\n if (active != view.dom) { view.focus(); }\n try {\n return f()\n } finally {\n if (viewState != state) { view.updateState(viewState); }\n if (active != view.dom && active) { active.focus(); }\n }\n}\n\n// : (EditorView, number, number)\n// Whether vertical position motion in a given direction\n// from a position would leave a text block.\nfunction endOfTextblockVertical(view, state, dir) {\n var sel = state.selection;\n var $pos = dir == \"up\" ? sel.$from : sel.$to;\n return withFlushedState(view, state, function () {\n var ref = view.docView.domFromPos($pos.pos, dir == \"up\" ? -1 : 1);\n var dom = ref.node;\n for (;;) {\n var nearest = view.docView.nearestDesc(dom, true);\n if (!nearest) { break }\n if (nearest.node.isBlock) { dom = nearest.dom; break }\n dom = nearest.dom.parentNode;\n }\n var coords = coordsAtPos(view, $pos.pos, 1);\n for (var child = dom.firstChild; child; child = child.nextSibling) {\n var boxes = (void 0);\n if (child.nodeType == 1) { boxes = child.getClientRects(); }\n else if (child.nodeType == 3) { boxes = textRange(child, 0, child.nodeValue.length).getClientRects(); }\n else { continue }\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n if (box.bottom > box.top && (dir == \"up\" ? box.bottom < coords.top + 1 : box.top > coords.bottom - 1))\n { return false }\n }\n }\n return true\n })\n}\n\nvar maybeRTL = /[\\u0590-\\u08ac]/;\n\nfunction endOfTextblockHorizontal(view, state, dir) {\n var ref = state.selection;\n var $head = ref.$head;\n if (!$head.parent.isTextblock) { return false }\n var offset = $head.parentOffset, atStart = !offset, atEnd = offset == $head.parent.content.size;\n var sel = getSelection();\n // If the textblock is all LTR, or the browser doesn't support\n // Selection.modify (Edge), fall back to a primitive approach\n if (!maybeRTL.test($head.parent.textContent) || !sel.modify)\n { return dir == \"left\" || dir == \"backward\" ? atStart : atEnd }\n\n return withFlushedState(view, state, function () {\n // This is a huge hack, but appears to be the best we can\n // currently do: use `Selection.modify` to move the selection by\n // one character, and see if that moves the cursor out of the\n // textblock (or doesn't move it at all, when at the start/end of\n // the document).\n var oldRange = sel.getRangeAt(0), oldNode = sel.focusNode, oldOff = sel.focusOffset;\n var oldBidiLevel = sel.caretBidiLevel; // Only for Firefox\n sel.modify(\"move\", dir, \"character\");\n var parentDOM = $head.depth ? view.docView.domAfterPos($head.before()) : view.dom;\n var result = !parentDOM.contains(sel.focusNode.nodeType == 1 ? sel.focusNode : sel.focusNode.parentNode) ||\n (oldNode == sel.focusNode && oldOff == sel.focusOffset);\n // Restore the previous selection\n sel.removeAllRanges();\n sel.addRange(oldRange);\n if (oldBidiLevel != null) { sel.caretBidiLevel = oldBidiLevel; }\n return result\n })\n}\n\nvar cachedState = null, cachedDir = null, cachedResult = false;\nfunction endOfTextblock(view, state, dir) {\n if (cachedState == state && cachedDir == dir) { return cachedResult }\n cachedState = state; cachedDir = dir;\n return cachedResult = dir == \"up\" || dir == \"down\"\n ? endOfTextblockVertical(view, state, dir)\n : endOfTextblockHorizontal(view, state, dir)\n}\n\n// NodeView:: interface\n//\n// By default, document nodes are rendered using the result of the\n// [`toDOM`](#model.NodeSpec.toDOM) method of their spec, and managed\n// entirely by the editor. For some use cases, such as embedded\n// node-specific editing interfaces, you want more control over\n// the behavior of a node's in-editor representation, and need to\n// [define](#view.EditorProps.nodeViews) a custom node view.\n//\n// Mark views only support `dom` and `contentDOM`, and don't support\n// any of the node view methods.\n//\n// Objects returned as node views must conform to this interface.\n//\n// dom:: ?dom.Node\n// The outer DOM node that represents the document node. When not\n// given, the default strategy is used to create a DOM node.\n//\n// contentDOM:: ?dom.Node\n// The DOM node that should hold the node's content. Only meaningful\n// if the node view also defines a `dom` property and if its node\n// type is not a leaf node type. When this is present, ProseMirror\n// will take care of rendering the node's children into it. When it\n// is not present, the node view itself is responsible for rendering\n// (or deciding not to render) its child nodes.\n//\n// update:: ?(node: Node, decorations: [Decoration], innerDecorations: DecorationSource) → bool\n// When given, this will be called when the view is updating itself.\n// It will be given a node (possibly of a different type), an array\n// of active decorations around the node (which are automatically\n// drawn, and the node view may ignore if it isn't interested in\n// them), and a [decoration source](#view.DecorationSource) that\n// represents any decorations that apply to the content of the node\n// (which again may be ignored). It should return true if it was\n// able to update to that node, and false otherwise. If the node\n// view has a `contentDOM` property (or no `dom` property), updating\n// its child nodes will be handled by ProseMirror.\n//\n// selectNode:: ?()\n// Can be used to override the way the node's selected status (as a\n// node selection) is displayed.\n//\n// deselectNode:: ?()\n// When defining a `selectNode` method, you should also provide a\n// `deselectNode` method to remove the effect again.\n//\n// setSelection:: ?(anchor: number, head: number, root: dom.Document)\n// This will be called to handle setting the selection inside the\n// node. The `anchor` and `head` positions are relative to the start\n// of the node. By default, a DOM selection will be created between\n// the DOM positions corresponding to those positions, but if you\n// override it you can do something else.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to prevent the editor view from trying to handle some\n// or all DOM events that bubble up from the node view. Events for\n// which this returns true are not handled by the editor.\n//\n// ignoreMutation:: ?(dom.MutationRecord) → bool\n// Called when a DOM\n// [mutation](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)\n// or a selection change happens within the view. When the change is\n// a selection change, the record will have a `type` property of\n// `\"selection\"` (which doesn't occur for native mutation records).\n// Return false if the editor should re-read the selection or\n// re-parse the range around the mutation, true if it can safely be\n// ignored.\n//\n// destroy:: ?()\n// Called when the node view is removed from the editor or the whole\n// editor is destroyed. (Not available for marks.)\n\n// View descriptions are data structures that describe the DOM that is\n// used to represent the editor's content. They are used for:\n//\n// - Incremental redrawing when the document changes\n//\n// - Figuring out what part of the document a given DOM position\n// corresponds to\n//\n// - Wiring in custom implementations of the editing interface for a\n// given node\n//\n// They form a doubly-linked mutable tree, starting at `view.docView`.\n\nvar NOT_DIRTY = 0, CHILD_DIRTY = 1, CONTENT_DIRTY = 2, NODE_DIRTY = 3;\n\n// Superclass for the various kinds of descriptions. Defines their\n// basic structure and shared methods.\nvar ViewDesc = function ViewDesc(parent, children, dom, contentDOM) {\n this.parent = parent;\n this.children = children;\n this.dom = dom;\n // An expando property on the DOM node provides a link back to its\n // description.\n dom.pmViewDesc = this;\n // This is the node that holds the child views. It may be null for\n // descs that don't have children.\n this.contentDOM = contentDOM;\n this.dirty = NOT_DIRTY;\n};\n\nvar prototypeAccessors = { beforePosition: { configurable: true },size: { configurable: true },border: { configurable: true },posBefore: { configurable: true },posAtStart: { configurable: true },posAfter: { configurable: true },posAtEnd: { configurable: true },contentLost: { configurable: true },domAtom: { configurable: true } };\n\n// Used to check whether a given description corresponds to a\n// widget/mark/node.\nViewDesc.prototype.matchesWidget = function matchesWidget () { return false };\nViewDesc.prototype.matchesMark = function matchesMark () { return false };\nViewDesc.prototype.matchesNode = function matchesNode () { return false };\nViewDesc.prototype.matchesHack = function matchesHack () { return false };\n\nprototypeAccessors.beforePosition.get = function () { return false };\n\n// : () → ?ParseRule\n// When parsing in-editor content (in domchange.js), we allow\n// descriptions to determine the parse rules that should be used to\n// parse them.\nViewDesc.prototype.parseRule = function parseRule () { return null };\n\n// : (dom.Event) → bool\n// Used by the editor's event handler to ignore events that come\n// from certain descs.\nViewDesc.prototype.stopEvent = function stopEvent () { return false };\n\n// The size of the content represented by this desc.\nprototypeAccessors.size.get = function () {\n var size = 0;\n for (var i = 0; i < this.children.length; i++) { size += this.children[i].size; }\n return size\n};\n\n// For block nodes, this represents the space taken up by their\n// start/end tokens.\nprototypeAccessors.border.get = function () { return 0 };\n\nViewDesc.prototype.destroy = function destroy () {\n this.parent = null;\n if (this.dom.pmViewDesc == this) { this.dom.pmViewDesc = null; }\n for (var i = 0; i < this.children.length; i++)\n { this.children[i].destroy(); }\n};\n\nViewDesc.prototype.posBeforeChild = function posBeforeChild (child) {\n for (var i = 0, pos = this.posAtStart; i < this.children.length; i++) {\n var cur = this.children[i];\n if (cur == child) { return pos }\n pos += cur.size;\n }\n};\n\nprototypeAccessors.posBefore.get = function () {\n return this.parent.posBeforeChild(this)\n};\n\nprototypeAccessors.posAtStart.get = function () {\n return this.parent ? this.parent.posBeforeChild(this) + this.border : 0\n};\n\nprototypeAccessors.posAfter.get = function () {\n return this.posBefore + this.size\n};\n\nprototypeAccessors.posAtEnd.get = function () {\n return this.posAtStart + this.size - 2 * this.border\n};\n\n// : (dom.Node, number, ?number) → number\nViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset, bias) {\n // If the DOM position is in the content, use the child desc after\n // it to figure out a position.\n if (this.contentDOM && this.contentDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode)) {\n if (bias < 0) {\n var domBefore, desc;\n if (dom == this.contentDOM) {\n domBefore = dom.childNodes[offset - 1];\n } else {\n while (dom.parentNode != this.contentDOM) { dom = dom.parentNode; }\n domBefore = dom.previousSibling;\n }\n while (domBefore && !((desc = domBefore.pmViewDesc) && desc.parent == this)) { domBefore = domBefore.previousSibling; }\n return domBefore ? this.posBeforeChild(desc) + desc.size : this.posAtStart\n } else {\n var domAfter, desc$1;\n if (dom == this.contentDOM) {\n domAfter = dom.childNodes[offset];\n } else {\n while (dom.parentNode != this.contentDOM) { dom = dom.parentNode; }\n domAfter = dom.nextSibling;\n }\n while (domAfter && !((desc$1 = domAfter.pmViewDesc) && desc$1.parent == this)) { domAfter = domAfter.nextSibling; }\n return domAfter ? this.posBeforeChild(desc$1) : this.posAtEnd\n }\n }\n // Otherwise, use various heuristics, falling back on the bias\n // parameter, to determine whether to return the position at the\n // start or at the end of this view desc.\n var atEnd;\n if (dom == this.dom && this.contentDOM) {\n atEnd = offset > domIndex(this.contentDOM);\n } else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {\n atEnd = dom.compareDocumentPosition(this.contentDOM) & 2;\n } else if (this.dom.firstChild) {\n if (offset == 0) { for (var search = dom;; search = search.parentNode) {\n if (search == this.dom) { atEnd = false; break }\n if (search.parentNode.firstChild != search) { break }\n } }\n if (atEnd == null && offset == dom.childNodes.length) { for (var search$1 = dom;; search$1 = search$1.parentNode) {\n if (search$1 == this.dom) { atEnd = true; break }\n if (search$1.parentNode.lastChild != search$1) { break }\n } }\n }\n return (atEnd == null ? bias > 0 : atEnd) ? this.posAtEnd : this.posAtStart\n};\n\n// Scan up the dom finding the first desc that is a descendant of\n// this one.\nViewDesc.prototype.nearestDesc = function nearestDesc (dom, onlyNodes) {\n for (var first = true, cur = dom; cur; cur = cur.parentNode) {\n var desc = this.getDesc(cur);\n if (desc && (!onlyNodes || desc.node)) {\n // If dom is outside of this desc's nodeDOM, don't count it.\n if (first && desc.nodeDOM &&\n !(desc.nodeDOM.nodeType == 1 ? desc.nodeDOM.contains(dom.nodeType == 1 ? dom : dom.parentNode) : desc.nodeDOM == dom))\n { first = false; }\n else\n { return desc }\n }\n }\n};\n\nViewDesc.prototype.getDesc = function getDesc (dom) {\n var desc = dom.pmViewDesc;\n for (var cur = desc; cur; cur = cur.parent) { if (cur == this) { return desc } }\n};\n\nViewDesc.prototype.posFromDOM = function posFromDOM (dom, offset, bias) {\n for (var scan = dom; scan; scan = scan.parentNode) {\n var desc = this.getDesc(scan);\n if (desc) { return desc.localPosFromDOM(dom, offset, bias) }\n }\n return -1\n};\n\n// : (number) → ?NodeViewDesc\n// Find the desc for the node after the given pos, if any. (When a\n// parent node overrode rendering, there might not be one.)\nViewDesc.prototype.descAt = function descAt (pos) {\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (offset == pos && end != offset) {\n while (!child.border && child.children.length) { child = child.children[0]; }\n return child\n }\n if (pos < end) { return child.descAt(pos - offset - child.border) }\n offset = end;\n }\n};\n\n// : (number, number) → {node: dom.Node, offset: number}\nViewDesc.prototype.domFromPos = function domFromPos (pos, side) {\n if (!this.contentDOM) { return {node: this.dom, offset: 0} }\n for (var offset = 0, i = 0, first = true;; i++, first = false) {\n // Skip removed or always-before children\n while (i < this.children.length && (this.children[i].beforePosition ||\n this.children[i].dom.parentNode != this.contentDOM))\n { offset += this.children[i++].size; }\n var child = i == this.children.length ? null : this.children[i];\n if (offset == pos && (side == 0 || !child || !child.size || child.border || (side < 0 && first)) ||\n child && child.domAtom && pos < offset + child.size) { return {\n node: this.contentDOM,\n offset: child ? domIndex(child.dom) : this.contentDOM.childNodes.length\n } }\n if (!child) { throw new Error(\"Invalid position \" + pos) }\n var end = offset + child.size;\n if (!child.domAtom && (side < 0 && !child.border ? end >= pos : end > pos) &&\n (end > pos || i + 1 >= this.children.length || !this.children[i + 1].beforePosition))\n { return child.domFromPos(pos - offset - child.border, side) }\n offset = end;\n }\n};\n\n// Used to find a DOM range in a single parent for a given changed\n// range.\nViewDesc.prototype.parseRange = function parseRange (from, to, base) {\n if ( base === void 0 ) base = 0;\n\n if (this.children.length == 0)\n { return {node: this.contentDOM, from: from, to: to, fromOffset: 0, toOffset: this.contentDOM.childNodes.length} }\n\n var fromOffset = -1, toOffset = -1;\n for (var offset = base, i = 0;; i++) {\n var child = this.children[i], end = offset + child.size;\n if (fromOffset == -1 && from <= end) {\n var childBase = offset + child.border;\n // FIXME maybe descend mark views to parse a narrower range?\n if (from >= childBase && to <= end - child.border && child.node &&\n child.contentDOM && this.contentDOM.contains(child.contentDOM))\n { return child.parseRange(from, to, childBase) }\n\n from = offset;\n for (var j = i; j > 0; j--) {\n var prev = this.children[j - 1];\n if (prev.size && prev.dom.parentNode == this.contentDOM && !prev.emptyChildAt(1)) {\n fromOffset = domIndex(prev.dom) + 1;\n break\n }\n from -= prev.size;\n }\n if (fromOffset == -1) { fromOffset = 0; }\n }\n if (fromOffset > -1 && (end > to || i == this.children.length - 1)) {\n to = end;\n for (var j$1 = i + 1; j$1 < this.children.length; j$1++) {\n var next = this.children[j$1];\n if (next.size && next.dom.parentNode == this.contentDOM && !next.emptyChildAt(-1)) {\n toOffset = domIndex(next.dom);\n break\n }\n to += next.size;\n }\n if (toOffset == -1) { toOffset = this.contentDOM.childNodes.length; }\n break\n }\n offset = end;\n }\n return {node: this.contentDOM, from: from, to: to, fromOffset: fromOffset, toOffset: toOffset}\n};\n\nViewDesc.prototype.emptyChildAt = function emptyChildAt (side) {\n if (this.border || !this.contentDOM || !this.children.length) { return false }\n var child = this.children[side < 0 ? 0 : this.children.length - 1];\n return child.size == 0 || child.emptyChildAt(side)\n};\n\n// : (number) → dom.Node\nViewDesc.prototype.domAfterPos = function domAfterPos (pos) {\n var ref = this.domFromPos(pos, 0);\n var node = ref.node;\n var offset = ref.offset;\n if (node.nodeType != 1 || offset == node.childNodes.length)\n { throw new RangeError(\"No node after pos \" + pos) }\n return node.childNodes[offset]\n};\n\n// : (number, number, dom.Document)\n// View descs are responsible for setting any selection that falls\n// entirely inside of them, so that custom implementations can do\n// custom things with the selection. Note that this falls apart when\n// a selection starts in such a node and ends in another, in which\n// case we just use whatever domFromPos produces as a best effort.\nViewDesc.prototype.setSelection = function setSelection (anchor, head, root, force) {\n // If the selection falls entirely in a child, give it to that child\n var from = Math.min(anchor, head), to = Math.max(anchor, head);\n for (var i = 0, offset = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (from > offset && to < end)\n { return child.setSelection(anchor - offset - child.border, head - offset - child.border, root, force) }\n offset = end;\n }\n\n var anchorDOM = this.domFromPos(anchor, anchor ? -1 : 1);\n var headDOM = head == anchor ? anchorDOM : this.domFromPos(head, head ? -1 : 1);\n var domSel = root.getSelection();\n\n var brKludge = false;\n // On Firefox, using Selection.collapse to put the cursor after a\n // BR node for some reason doesn't always work (#1073). On Safari,\n // the cursor sometimes inexplicable visually lags behind its\n // reported position in such situations (#1092).\n if ((result.gecko || result.safari) && anchor == head) {\n var node = anchorDOM.node;\n var offset$1 = anchorDOM.offset;\n if (node.nodeType == 3) {\n brKludge = offset$1 && node.nodeValue[offset$1 - 1] == \"\\n\";\n // Issue #1128\n if (brKludge && offset$1 == node.nodeValue.length &&\n node.nextSibling && node.nextSibling.nodeName == \"BR\")\n { anchorDOM = headDOM = {node: node.parentNode, offset: domIndex(node) + 1}; }\n } else {\n var prev = node.childNodes[offset$1 - 1];\n brKludge = prev && (prev.nodeName == \"BR\" || prev.contentEditable == \"false\");\n }\n }\n\n if (!(force || brKludge && result.safari) &&\n isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset) &&\n isEquivalentPosition(headDOM.node, headDOM.offset, domSel.focusNode, domSel.focusOffset))\n { return }\n\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n var domSelExtended = false;\n if ((domSel.extend || anchor == head) && !brKludge) {\n domSel.collapse(anchorDOM.node, anchorDOM.offset);\n try {\n if (anchor != head) { domSel.extend(headDOM.node, headDOM.offset); }\n domSelExtended = true;\n } catch (err) {\n // In some cases with Chrome the selection is empty after calling\n // collapse, even when it should be valid. This appears to be a bug, but\n // it is difficult to isolate. If this happens fallback to the old path\n // without using extend.\n if (!(err instanceof DOMException)) { throw err }\n // declare global: DOMException\n }\n }\n if (!domSelExtended) {\n if (anchor > head) { var tmp = anchorDOM; anchorDOM = headDOM; headDOM = tmp; }\n var range = document.createRange();\n range.setEnd(headDOM.node, headDOM.offset);\n range.setStart(anchorDOM.node, anchorDOM.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n};\n\n// : (dom.MutationRecord) → bool\nViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return !this.contentDOM && mutation.type != \"selection\"\n};\n\nprototypeAccessors.contentLost.get = function () {\n return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM)\n};\n\n// Remove a subtree of the element tree that has been touched\n// by a DOM change, so that the next update will redraw it.\nViewDesc.prototype.markDirty = function markDirty (from, to) {\n for (var offset = 0, i = 0; i < this.children.length; i++) {\n var child = this.children[i], end = offset + child.size;\n if (offset == end ? from <= end && to >= offset : from < end && to > offset) {\n var startInside = offset + child.border, endInside = end - child.border;\n if (from >= startInside && to <= endInside) {\n this.dirty = from == offset || to == end ? CONTENT_DIRTY : CHILD_DIRTY;\n if (from == startInside && to == endInside &&\n (child.contentLost || child.dom.parentNode != this.contentDOM)) { child.dirty = NODE_DIRTY; }\n else { child.markDirty(from - startInside, to - startInside); }\n return\n } else {\n child.dirty = NODE_DIRTY;\n }\n }\n offset = end;\n }\n this.dirty = CONTENT_DIRTY;\n};\n\nViewDesc.prototype.markParentsDirty = function markParentsDirty () {\n var level = 1;\n for (var node = this.parent; node; node = node.parent, level++) {\n var dirty = level == 1 ? CONTENT_DIRTY : CHILD_DIRTY;\n if (node.dirty < dirty) { node.dirty = dirty; }\n }\n};\n\nprototypeAccessors.domAtom.get = function () { return false };\n\nObject.defineProperties( ViewDesc.prototype, prototypeAccessors );\n\n// Reused array to avoid allocating fresh arrays for things that will\n// stay empty anyway.\nvar nothing = [];\n\n// A widget desc represents a widget decoration, which is a DOM node\n// drawn between the document nodes.\nvar WidgetViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function WidgetViewDesc(parent, widget, view, pos) {\n var self, dom = widget.type.toDOM;\n if (typeof dom == \"function\") { dom = dom(view, function () {\n if (!self) { return pos }\n if (self.parent) { return self.parent.posBeforeChild(self) }\n }); }\n if (!widget.type.spec.raw) {\n if (dom.nodeType != 1) {\n var wrap = document.createElement(\"span\");\n wrap.appendChild(dom);\n dom = wrap;\n }\n dom.contentEditable = false;\n dom.classList.add(\"ProseMirror-widget\");\n }\n ViewDesc.call(this, parent, nothing, dom, null);\n this.widget = widget;\n self = this;\n }\n\n if ( ViewDesc ) WidgetViewDesc.__proto__ = ViewDesc;\n WidgetViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n WidgetViewDesc.prototype.constructor = WidgetViewDesc;\n\n var prototypeAccessors$1 = { beforePosition: { configurable: true },domAtom: { configurable: true } };\n\n prototypeAccessors$1.beforePosition.get = function () {\n return this.widget.type.side < 0\n };\n\n WidgetViewDesc.prototype.matchesWidget = function matchesWidget (widget) {\n return this.dirty == NOT_DIRTY && widget.type.eq(this.widget.type)\n };\n\n WidgetViewDesc.prototype.parseRule = function parseRule () { return {ignore: true} };\n\n WidgetViewDesc.prototype.stopEvent = function stopEvent (event) {\n var stop = this.widget.spec.stopEvent;\n return stop ? stop(event) : false\n };\n\n WidgetViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return mutation.type != \"selection\" || this.widget.spec.ignoreSelection\n };\n\n prototypeAccessors$1.domAtom.get = function () { return true };\n\n Object.defineProperties( WidgetViewDesc.prototype, prototypeAccessors$1 );\n\n return WidgetViewDesc;\n}(ViewDesc));\n\nvar CompositionViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function CompositionViewDesc(parent, dom, textDOM, text) {\n ViewDesc.call(this, parent, nothing, dom, null);\n this.textDOM = textDOM;\n this.text = text;\n }\n\n if ( ViewDesc ) CompositionViewDesc.__proto__ = ViewDesc;\n CompositionViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n CompositionViewDesc.prototype.constructor = CompositionViewDesc;\n\n var prototypeAccessors$2 = { size: { configurable: true } };\n\n prototypeAccessors$2.size.get = function () { return this.text.length };\n\n CompositionViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset) {\n if (dom != this.textDOM) { return this.posAtStart + (offset ? this.size : 0) }\n return this.posAtStart + offset\n };\n\n CompositionViewDesc.prototype.domFromPos = function domFromPos (pos) {\n return {node: this.textDOM, offset: pos}\n };\n\n CompositionViewDesc.prototype.ignoreMutation = function ignoreMutation (mut) {\n return mut.type === 'characterData' && mut.target.nodeValue == mut.oldValue\n };\n\n Object.defineProperties( CompositionViewDesc.prototype, prototypeAccessors$2 );\n\n return CompositionViewDesc;\n}(ViewDesc));\n\n// A mark desc represents a mark. May have multiple children,\n// depending on how the mark is split. Note that marks are drawn using\n// a fixed nesting order, for simplicity and predictability, so in\n// some cases they will be split more often than would appear\n// necessary.\nvar MarkViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function MarkViewDesc(parent, mark, dom, contentDOM) {\n ViewDesc.call(this, parent, [], dom, contentDOM);\n this.mark = mark;\n }\n\n if ( ViewDesc ) MarkViewDesc.__proto__ = ViewDesc;\n MarkViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n MarkViewDesc.prototype.constructor = MarkViewDesc;\n\n MarkViewDesc.create = function create (parent, mark, inline, view) {\n var custom = view.nodeViews[mark.type.name];\n var spec = custom && custom(mark, view, inline);\n if (!spec || !spec.dom)\n { spec = DOMSerializer.renderSpec(document, mark.type.spec.toDOM(mark, inline)); }\n return new MarkViewDesc(parent, mark, spec.dom, spec.contentDOM || spec.dom)\n };\n\n MarkViewDesc.prototype.parseRule = function parseRule () { return {mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM} };\n\n MarkViewDesc.prototype.matchesMark = function matchesMark (mark) { return this.dirty != NODE_DIRTY && this.mark.eq(mark) };\n\n MarkViewDesc.prototype.markDirty = function markDirty (from, to) {\n ViewDesc.prototype.markDirty.call(this, from, to);\n // Move dirty info to nearest node view\n if (this.dirty != NOT_DIRTY) {\n var parent = this.parent;\n while (!parent.node) { parent = parent.parent; }\n if (parent.dirty < this.dirty) { parent.dirty = this.dirty; }\n this.dirty = NOT_DIRTY;\n }\n };\n\n MarkViewDesc.prototype.slice = function slice (from, to, view) {\n var copy = MarkViewDesc.create(this.parent, this.mark, true, view);\n var nodes = this.children, size = this.size;\n if (to < size) { nodes = replaceNodes(nodes, to, size, view); }\n if (from > 0) { nodes = replaceNodes(nodes, 0, from, view); }\n for (var i = 0; i < nodes.length; i++) { nodes[i].parent = copy; }\n copy.children = nodes;\n return copy\n };\n\n return MarkViewDesc;\n}(ViewDesc));\n\n// Node view descs are the main, most common type of view desc, and\n// correspond to an actual node in the document. Unlike mark descs,\n// they populate their child array themselves.\nvar NodeViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos) {\n ViewDesc.call(this, parent, node.isLeaf ? nothing : [], dom, contentDOM);\n this.nodeDOM = nodeDOM;\n this.node = node;\n this.outerDeco = outerDeco;\n this.innerDeco = innerDeco;\n if (contentDOM) { this.updateChildren(view, pos); }\n }\n\n if ( ViewDesc ) NodeViewDesc.__proto__ = ViewDesc;\n NodeViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n NodeViewDesc.prototype.constructor = NodeViewDesc;\n\n var prototypeAccessors$3 = { size: { configurable: true },border: { configurable: true },domAtom: { configurable: true } };\n\n // By default, a node is rendered using the `toDOM` method from the\n // node type spec. But client code can use the `nodeViews` spec to\n // supply a custom node view, which can influence various aspects of\n // the way the node works.\n //\n // (Using subclassing for this was intentionally decided against,\n // since it'd require exposing a whole slew of finnicky\n // implementation details to the user code that they probably will\n // never need.)\n NodeViewDesc.create = function create (parent, node, outerDeco, innerDeco, view, pos) {\n var assign;\n\n var custom = view.nodeViews[node.type.name], descObj;\n var spec = custom && custom(node, view, function () {\n // (This is a function that allows the custom view to find its\n // own position)\n if (!descObj) { return pos }\n if (descObj.parent) { return descObj.parent.posBeforeChild(descObj) }\n }, outerDeco, innerDeco);\n\n var dom = spec && spec.dom, contentDOM = spec && spec.contentDOM;\n if (node.isText) {\n if (!dom) { dom = document.createTextNode(node.text); }\n else if (dom.nodeType != 3) { throw new RangeError(\"Text must be rendered as a DOM text node\") }\n } else if (!dom) {\n((assign = DOMSerializer.renderSpec(document, node.type.spec.toDOM(node)), dom = assign.dom, contentDOM = assign.contentDOM));\n }\n if (!contentDOM && !node.isText && dom.nodeName != \"BR\") { // Chrome gets confused by
\n if (!dom.hasAttribute(\"contenteditable\")) { dom.contentEditable = false; }\n if (node.type.spec.draggable) { dom.draggable = true; }\n }\n\n var nodeDOM = dom;\n dom = applyOuterDeco(dom, outerDeco, node);\n\n if (spec)\n { return descObj = new CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM,\n spec, view, pos + 1) }\n else if (node.isText)\n { return new TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) }\n else\n { return new NodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos + 1) }\n };\n\n NodeViewDesc.prototype.parseRule = function parseRule () {\n var this$1 = this;\n\n // Experimental kludge to allow opt-in re-parsing of nodes\n if (this.node.type.spec.reparseInView) { return null }\n // FIXME the assumption that this can always return the current\n // attrs means that if the user somehow manages to change the\n // attrs in the dom, that won't be picked up. Not entirely sure\n // whether this is a problem\n var rule = {node: this.node.type.name, attrs: this.node.attrs};\n if (this.node.type.spec.code) { rule.preserveWhitespace = \"full\"; }\n if (this.contentDOM && !this.contentLost) { rule.contentElement = this.contentDOM; }\n else { rule.getContent = function () { return this$1.contentDOM ? Fragment.empty : this$1.node.content; }; }\n return rule\n };\n\n NodeViewDesc.prototype.matchesNode = function matchesNode (node, outerDeco, innerDeco) {\n return this.dirty == NOT_DIRTY && node.eq(this.node) &&\n sameOuterDeco(outerDeco, this.outerDeco) && innerDeco.eq(this.innerDeco)\n };\n\n prototypeAccessors$3.size.get = function () { return this.node.nodeSize };\n\n prototypeAccessors$3.border.get = function () { return this.node.isLeaf ? 0 : 1 };\n\n // Syncs `this.children` to match `this.node.content` and the local\n // decorations, possibly introducing nesting for marks. Then, in a\n // separate step, syncs the DOM inside `this.contentDOM` to\n // `this.children`.\n NodeViewDesc.prototype.updateChildren = function updateChildren (view, pos) {\n var this$1 = this;\n\n var inline = this.node.inlineContent, off = pos;\n var composition = inline && view.composing && this.localCompositionNode(view, pos);\n var updater = new ViewTreeUpdater(this, composition && composition.node);\n iterDeco(this.node, this.innerDeco, function (widget, i, insideNode) {\n if (widget.spec.marks)\n { updater.syncToMarks(widget.spec.marks, inline, view); }\n else if (widget.type.side >= 0 && !insideNode)\n { updater.syncToMarks(i == this$1.node.childCount ? Mark.none : this$1.node.child(i).marks, inline, view); }\n // If the next node is a desc matching this widget, reuse it,\n // otherwise insert the widget as a new view desc.\n updater.placeWidget(widget, view, off);\n }, function (child, outerDeco, innerDeco, i) {\n // Make sure the wrapping mark descs match the node's marks.\n updater.syncToMarks(child.marks, inline, view);\n // Either find an existing desc that exactly matches this node,\n // and drop the descs before it.\n updater.findNodeMatch(child, outerDeco, innerDeco, i) ||\n // Or try updating the next desc to reflect this node.\n updater.updateNextNode(child, outerDeco, innerDeco, view, i) ||\n // Or just add it as a new desc.\n updater.addNode(child, outerDeco, innerDeco, view, off);\n off += child.nodeSize;\n });\n // Drop all remaining descs after the current position.\n updater.syncToMarks(nothing, inline, view);\n if (this.node.isTextblock) { updater.addTextblockHacks(); }\n updater.destroyRest();\n\n // Sync the DOM if anything changed\n if (updater.changed || this.dirty == CONTENT_DIRTY) {\n // May have to protect focused DOM from being changed if a composition is active\n if (composition) { this.protectLocalComposition(view, composition); }\n renderDescs(this.contentDOM, this.children, view);\n if (result.ios) { iosHacks(this.dom); }\n }\n };\n\n NodeViewDesc.prototype.localCompositionNode = function localCompositionNode (view, pos) {\n // Only do something if both the selection and a focused text node\n // are inside of this node, and the node isn't already part of a\n // view that's a child of this view\n var ref = view.state.selection;\n var from = ref.from;\n var to = ref.to;\n if (!(view.state.selection instanceof TextSelection) || from < pos || to > pos + this.node.content.size) { return }\n var sel = view.root.getSelection();\n var textNode = nearbyTextNode(sel.focusNode, sel.focusOffset);\n if (!textNode || !this.dom.contains(textNode.parentNode)) { return }\n\n // Find the text in the focused node in the node, stop if it's not\n // there (may have been modified through other means, in which\n // case it should overwritten)\n var text = textNode.nodeValue;\n var textPos = findTextInFragment(this.node.content, text, from - pos, to - pos);\n\n return textPos < 0 ? null : {node: textNode, pos: textPos, text: text}\n };\n\n NodeViewDesc.prototype.protectLocalComposition = function protectLocalComposition (view, ref) {\n var node = ref.node;\n var pos = ref.pos;\n var text = ref.text;\n\n // The node is already part of a local view desc, leave it there\n if (this.getDesc(node)) { return }\n\n // Create a composition view for the orphaned nodes\n var topNode = node;\n for (;; topNode = topNode.parentNode) {\n if (topNode.parentNode == this.contentDOM) { break }\n while (topNode.previousSibling) { topNode.parentNode.removeChild(topNode.previousSibling); }\n while (topNode.nextSibling) { topNode.parentNode.removeChild(topNode.nextSibling); }\n if (topNode.pmViewDesc) { topNode.pmViewDesc = null; }\n }\n var desc = new CompositionViewDesc(this, topNode, node, text);\n view.compositionNodes.push(desc);\n\n // Patch up this.children to contain the composition view\n this.children = replaceNodes(this.children, pos, pos + text.length, view, desc);\n };\n\n // : (Node, [Decoration], DecorationSource, EditorView) → bool\n // If this desc be updated to match the given node decoration,\n // do so and return true.\n NodeViewDesc.prototype.update = function update (node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY ||\n !node.sameMarkup(this.node)) { return false }\n this.updateInner(node, outerDeco, innerDeco, view);\n return true\n };\n\n NodeViewDesc.prototype.updateInner = function updateInner (node, outerDeco, innerDeco, view) {\n this.updateOuterDeco(outerDeco);\n this.node = node;\n this.innerDeco = innerDeco;\n if (this.contentDOM) { this.updateChildren(view, this.posAtStart); }\n this.dirty = NOT_DIRTY;\n };\n\n NodeViewDesc.prototype.updateOuterDeco = function updateOuterDeco (outerDeco) {\n if (sameOuterDeco(outerDeco, this.outerDeco)) { return }\n var needsWrap = this.nodeDOM.nodeType != 1;\n var oldDOM = this.dom;\n this.dom = patchOuterDeco(this.dom, this.nodeDOM,\n computeOuterDeco(this.outerDeco, this.node, needsWrap),\n computeOuterDeco(outerDeco, this.node, needsWrap));\n if (this.dom != oldDOM) {\n oldDOM.pmViewDesc = null;\n this.dom.pmViewDesc = this;\n }\n this.outerDeco = outerDeco;\n };\n\n // Mark this node as being the selected node.\n NodeViewDesc.prototype.selectNode = function selectNode () {\n this.nodeDOM.classList.add(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) { this.dom.draggable = true; }\n };\n\n // Remove selected node marking from this node.\n NodeViewDesc.prototype.deselectNode = function deselectNode () {\n this.nodeDOM.classList.remove(\"ProseMirror-selectednode\");\n if (this.contentDOM || !this.node.type.spec.draggable) { this.dom.removeAttribute(\"draggable\"); }\n };\n\n prototypeAccessors$3.domAtom.get = function () { return this.node.isAtom };\n\n Object.defineProperties( NodeViewDesc.prototype, prototypeAccessors$3 );\n\n return NodeViewDesc;\n}(ViewDesc));\n\n// Create a view desc for the top-level document node, to be exported\n// and used by the view class.\nfunction docViewDesc(doc, outerDeco, innerDeco, dom, view) {\n applyOuterDeco(dom, outerDeco, doc);\n return new NodeViewDesc(null, doc, outerDeco, innerDeco, dom, dom, dom, view, 0)\n}\n\nvar TextViewDesc = /*@__PURE__*/(function (NodeViewDesc) {\n function TextViewDesc(parent, node, outerDeco, innerDeco, dom, nodeDOM, view) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, null, nodeDOM, view);\n }\n\n if ( NodeViewDesc ) TextViewDesc.__proto__ = NodeViewDesc;\n TextViewDesc.prototype = Object.create( NodeViewDesc && NodeViewDesc.prototype );\n TextViewDesc.prototype.constructor = TextViewDesc;\n\n var prototypeAccessors$4 = { domAtom: { configurable: true } };\n\n TextViewDesc.prototype.parseRule = function parseRule () {\n var skip = this.nodeDOM.parentNode;\n while (skip && skip != this.dom && !skip.pmIsDeco) { skip = skip.parentNode; }\n return {skip: skip || true}\n };\n\n TextViewDesc.prototype.update = function update (node, outerDeco, _, view) {\n if (this.dirty == NODE_DIRTY || (this.dirty != NOT_DIRTY && !this.inParent()) ||\n !node.sameMarkup(this.node)) { return false }\n this.updateOuterDeco(outerDeco);\n if ((this.dirty != NOT_DIRTY || node.text != this.node.text) && node.text != this.nodeDOM.nodeValue) {\n this.nodeDOM.nodeValue = node.text;\n if (view.trackWrites == this.nodeDOM) { view.trackWrites = null; }\n }\n this.node = node;\n this.dirty = NOT_DIRTY;\n return true\n };\n\n TextViewDesc.prototype.inParent = function inParent () {\n var parentDOM = this.parent.contentDOM;\n for (var n = this.nodeDOM; n; n = n.parentNode) { if (n == parentDOM) { return true } }\n return false\n };\n\n TextViewDesc.prototype.domFromPos = function domFromPos (pos) {\n return {node: this.nodeDOM, offset: pos}\n };\n\n TextViewDesc.prototype.localPosFromDOM = function localPosFromDOM (dom, offset, bias) {\n if (dom == this.nodeDOM) { return this.posAtStart + Math.min(offset, this.node.text.length) }\n return NodeViewDesc.prototype.localPosFromDOM.call(this, dom, offset, bias)\n };\n\n TextViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return mutation.type != \"characterData\" && mutation.type != \"selection\"\n };\n\n TextViewDesc.prototype.slice = function slice (from, to, view) {\n var node = this.node.cut(from, to), dom = document.createTextNode(node.text);\n return new TextViewDesc(this.parent, node, this.outerDeco, this.innerDeco, dom, dom, view)\n };\n\n prototypeAccessors$4.domAtom.get = function () { return false };\n\n Object.defineProperties( TextViewDesc.prototype, prototypeAccessors$4 );\n\n return TextViewDesc;\n}(NodeViewDesc));\n\n// A dummy desc used to tag trailing BR or span nodes created to work\n// around contentEditable terribleness.\nvar BRHackViewDesc = /*@__PURE__*/(function (ViewDesc) {\n function BRHackViewDesc () {\n ViewDesc.apply(this, arguments);\n }\n\n if ( ViewDesc ) BRHackViewDesc.__proto__ = ViewDesc;\n BRHackViewDesc.prototype = Object.create( ViewDesc && ViewDesc.prototype );\n BRHackViewDesc.prototype.constructor = BRHackViewDesc;\n\n var prototypeAccessors$5 = { domAtom: { configurable: true } };\n\n BRHackViewDesc.prototype.parseRule = function parseRule () { return {ignore: true} };\n BRHackViewDesc.prototype.matchesHack = function matchesHack () { return this.dirty == NOT_DIRTY };\n prototypeAccessors$5.domAtom.get = function () { return true };\n\n Object.defineProperties( BRHackViewDesc.prototype, prototypeAccessors$5 );\n\n return BRHackViewDesc;\n}(ViewDesc));\n\n// A separate subclass is used for customized node views, so that the\n// extra checks only have to be made for nodes that are actually\n// customized.\nvar CustomNodeViewDesc = /*@__PURE__*/(function (NodeViewDesc) {\n function CustomNodeViewDesc(parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, spec, view, pos) {\n NodeViewDesc.call(this, parent, node, outerDeco, innerDeco, dom, contentDOM, nodeDOM, view, pos);\n this.spec = spec;\n }\n\n if ( NodeViewDesc ) CustomNodeViewDesc.__proto__ = NodeViewDesc;\n CustomNodeViewDesc.prototype = Object.create( NodeViewDesc && NodeViewDesc.prototype );\n CustomNodeViewDesc.prototype.constructor = CustomNodeViewDesc;\n\n // A custom `update` method gets to decide whether the update goes\n // through. If it does, and there's a `contentDOM` node, our logic\n // updates the children.\n CustomNodeViewDesc.prototype.update = function update (node, outerDeco, innerDeco, view) {\n if (this.dirty == NODE_DIRTY) { return false }\n if (this.spec.update) {\n var result = this.spec.update(node, outerDeco, innerDeco);\n if (result) { this.updateInner(node, outerDeco, innerDeco, view); }\n return result\n } else if (!this.contentDOM && !node.isLeaf) {\n return false\n } else {\n return NodeViewDesc.prototype.update.call(this, node, outerDeco, innerDeco, view)\n }\n };\n\n CustomNodeViewDesc.prototype.selectNode = function selectNode () {\n this.spec.selectNode ? this.spec.selectNode() : NodeViewDesc.prototype.selectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.deselectNode = function deselectNode () {\n this.spec.deselectNode ? this.spec.deselectNode() : NodeViewDesc.prototype.deselectNode.call(this);\n };\n\n CustomNodeViewDesc.prototype.setSelection = function setSelection (anchor, head, root, force) {\n this.spec.setSelection ? this.spec.setSelection(anchor, head, root)\n : NodeViewDesc.prototype.setSelection.call(this, anchor, head, root, force);\n };\n\n CustomNodeViewDesc.prototype.destroy = function destroy () {\n if (this.spec.destroy) { this.spec.destroy(); }\n NodeViewDesc.prototype.destroy.call(this);\n };\n\n CustomNodeViewDesc.prototype.stopEvent = function stopEvent (event) {\n return this.spec.stopEvent ? this.spec.stopEvent(event) : false\n };\n\n CustomNodeViewDesc.prototype.ignoreMutation = function ignoreMutation (mutation) {\n return this.spec.ignoreMutation ? this.spec.ignoreMutation(mutation) : NodeViewDesc.prototype.ignoreMutation.call(this, mutation)\n };\n\n return CustomNodeViewDesc;\n}(NodeViewDesc));\n\n// : (dom.Node, [ViewDesc])\n// Sync the content of the given DOM node with the nodes associated\n// with the given array of view descs, recursing into mark descs\n// because this should sync the subtree for a whole node at a time.\nfunction renderDescs(parentDOM, descs, view) {\n var dom = parentDOM.firstChild, written = false;\n for (var i = 0; i < descs.length; i++) {\n var desc = descs[i], childDOM = desc.dom;\n if (childDOM.parentNode == parentDOM) {\n while (childDOM != dom) { dom = rm(dom); written = true; }\n dom = dom.nextSibling;\n } else {\n written = true;\n parentDOM.insertBefore(childDOM, dom);\n }\n if (desc instanceof MarkViewDesc) {\n var pos = dom ? dom.previousSibling : parentDOM.lastChild;\n renderDescs(desc.contentDOM, desc.children, view);\n dom = pos ? pos.nextSibling : parentDOM.firstChild;\n }\n }\n while (dom) { dom = rm(dom); written = true; }\n if (written && view.trackWrites == parentDOM) { view.trackWrites = null; }\n}\n\nfunction OuterDecoLevel(nodeName) {\n if (nodeName) { this.nodeName = nodeName; }\n}\nOuterDecoLevel.prototype = Object.create(null);\n\nvar noDeco = [new OuterDecoLevel];\n\nfunction computeOuterDeco(outerDeco, node, needsWrap) {\n if (outerDeco.length == 0) { return noDeco }\n\n var top = needsWrap ? noDeco[0] : new OuterDecoLevel, result = [top];\n\n for (var i = 0; i < outerDeco.length; i++) {\n var attrs = outerDeco[i].type.attrs;\n if (!attrs) { continue }\n if (attrs.nodeName)\n { result.push(top = new OuterDecoLevel(attrs.nodeName)); }\n\n for (var name in attrs) {\n var val = attrs[name];\n if (val == null) { continue }\n if (needsWrap && result.length == 1)\n { result.push(top = new OuterDecoLevel(node.isInline ? \"span\" : \"div\")); }\n if (name == \"class\") { top.class = (top.class ? top.class + \" \" : \"\") + val; }\n else if (name == \"style\") { top.style = (top.style ? top.style + \";\" : \"\") + val; }\n else if (name != \"nodeName\") { top[name] = val; }\n }\n }\n\n return result\n}\n\nfunction patchOuterDeco(outerDOM, nodeDOM, prevComputed, curComputed) {\n // Shortcut for trivial case\n if (prevComputed == noDeco && curComputed == noDeco) { return nodeDOM }\n\n var curDOM = nodeDOM;\n for (var i = 0; i < curComputed.length; i++) {\n var deco = curComputed[i], prev = prevComputed[i];\n if (i) {\n var parent = (void 0);\n if (prev && prev.nodeName == deco.nodeName && curDOM != outerDOM &&\n (parent = curDOM.parentNode) && parent.tagName.toLowerCase() == deco.nodeName) {\n curDOM = parent;\n } else {\n parent = document.createElement(deco.nodeName);\n parent.pmIsDeco = true;\n parent.appendChild(curDOM);\n prev = noDeco[0];\n curDOM = parent;\n }\n }\n patchAttributes(curDOM, prev || noDeco[0], deco);\n }\n return curDOM\n}\n\nfunction patchAttributes(dom, prev, cur) {\n for (var name in prev)\n { if (name != \"class\" && name != \"style\" && name != \"nodeName\" && !(name in cur))\n { dom.removeAttribute(name); } }\n for (var name$1 in cur)\n { if (name$1 != \"class\" && name$1 != \"style\" && name$1 != \"nodeName\" && cur[name$1] != prev[name$1])\n { dom.setAttribute(name$1, cur[name$1]); } }\n if (prev.class != cur.class) {\n var prevList = prev.class ? prev.class.split(\" \").filter(Boolean) : nothing;\n var curList = cur.class ? cur.class.split(\" \").filter(Boolean) : nothing;\n for (var i = 0; i < prevList.length; i++) { if (curList.indexOf(prevList[i]) == -1)\n { dom.classList.remove(prevList[i]); } }\n for (var i$1 = 0; i$1 < curList.length; i$1++) { if (prevList.indexOf(curList[i$1]) == -1)\n { dom.classList.add(curList[i$1]); } }\n }\n if (prev.style != cur.style) {\n if (prev.style) {\n var prop = /\\s*([\\w\\-\\xa1-\\uffff]+)\\s*:(?:\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|\\(.*?\\)|[^;])*/g, m;\n while (m = prop.exec(prev.style))\n { dom.style.removeProperty(m[1]); }\n }\n if (cur.style)\n { dom.style.cssText += cur.style; }\n }\n}\n\nfunction applyOuterDeco(dom, deco, node) {\n return patchOuterDeco(dom, dom, noDeco, computeOuterDeco(deco, node, dom.nodeType != 1))\n}\n\n// : ([Decoration], [Decoration]) → bool\nfunction sameOuterDeco(a, b) {\n if (a.length != b.length) { return false }\n for (var i = 0; i < a.length; i++) { if (!a[i].type.eq(b[i].type)) { return false } }\n return true\n}\n\n// Remove a DOM node and return its next sibling.\nfunction rm(dom) {\n var next = dom.nextSibling;\n dom.parentNode.removeChild(dom);\n return next\n}\n\n// Helper class for incrementally updating a tree of mark descs and\n// the widget and node descs inside of them.\nvar ViewTreeUpdater = function ViewTreeUpdater(top, lockedNode) {\n this.top = top;\n this.lock = lockedNode;\n // Index into `this.top`'s child array, represents the current\n // update position.\n this.index = 0;\n // When entering a mark, the current top and index are pushed\n // onto this.\n this.stack = [];\n // Tracks whether anything was changed\n this.changed = false;\n\n this.preMatch = preMatch(top.node.content, top.children);\n};\n\n// Destroy and remove the children between the given indices in\n// `this.top`.\nViewTreeUpdater.prototype.destroyBetween = function destroyBetween (start, end) {\n if (start == end) { return }\n for (var i = start; i < end; i++) { this.top.children[i].destroy(); }\n this.top.children.splice(start, end - start);\n this.changed = true;\n};\n\n// Destroy all remaining children in `this.top`.\nViewTreeUpdater.prototype.destroyRest = function destroyRest () {\n this.destroyBetween(this.index, this.top.children.length);\n};\n\n// : ([Mark], EditorView)\n// Sync the current stack of mark descs with the given array of\n// marks, reusing existing mark descs when possible.\nViewTreeUpdater.prototype.syncToMarks = function syncToMarks (marks, inline, view) {\n var keep = 0, depth = this.stack.length >> 1;\n var maxKeep = Math.min(depth, marks.length);\n while (keep < maxKeep &&\n (keep == depth - 1 ? this.top : this.stack[(keep + 1) << 1]).matchesMark(marks[keep]) && marks[keep].type.spec.spanning !== false)\n { keep++; }\n\n while (keep < depth) {\n this.destroyRest();\n this.top.dirty = NOT_DIRTY;\n this.index = this.stack.pop();\n this.top = this.stack.pop();\n depth--;\n }\n while (depth < marks.length) {\n this.stack.push(this.top, this.index + 1);\n var found = -1;\n for (var i = this.index; i < Math.min(this.index + 3, this.top.children.length); i++) {\n if (this.top.children[i].matchesMark(marks[depth])) { found = i; break }\n }\n if (found > -1) {\n if (found > this.index) {\n this.changed = true;\n this.destroyBetween(this.index, found);\n }\n this.top = this.top.children[this.index];\n } else {\n var markDesc = MarkViewDesc.create(this.top, marks[depth], inline, view);\n this.top.children.splice(this.index, 0, markDesc);\n this.top = markDesc;\n this.changed = true;\n }\n this.index = 0;\n depth++;\n }\n};\n\n// : (Node, [Decoration], DecorationSource) → bool\n// Try to find a node desc matching the given data. Skip over it and\n// return true when successful.\nViewTreeUpdater.prototype.findNodeMatch = function findNodeMatch (node, outerDeco, innerDeco, index) {\n var children = this.top.children, found = -1;\n if (index >= this.preMatch.index) {\n for (var i = this.index; i < children.length; i++) { if (children[i].matchesNode(node, outerDeco, innerDeco)) {\n found = i;\n break\n } }\n } else {\n for (var i$1 = this.index, e = Math.min(children.length, i$1 + 1); i$1 < e; i$1++) {\n var child = children[i$1];\n if (child.matchesNode(node, outerDeco, innerDeco) && !this.preMatch.matched.has(child)) {\n found = i$1;\n break\n }\n }\n }\n if (found < 0) { return false }\n this.destroyBetween(this.index, found);\n this.index++;\n return true\n};\n\n// : (Node, [Decoration], DecorationSource, EditorView, Fragment, number) → bool\n// Try to update the next node, if any, to the given data. Checks\n// pre-matches to avoid overwriting nodes that could still be used.\nViewTreeUpdater.prototype.updateNextNode = function updateNextNode (node, outerDeco, innerDeco, view, index) {\n for (var i = this.index; i < this.top.children.length; i++) {\n var next = this.top.children[i];\n if (next instanceof NodeViewDesc) {\n var preMatch = this.preMatch.matched.get(next);\n if (preMatch != null && preMatch != index) { return false }\n var nextDOM = next.dom;\n\n // Can't update if nextDOM is or contains this.lock, except if\n // it's a text node whose content already matches the new text\n // and whose decorations match the new ones.\n var locked = this.lock && (nextDOM == this.lock || nextDOM.nodeType == 1 && nextDOM.contains(this.lock.parentNode)) &&\n !(node.isText && next.node && next.node.isText && next.nodeDOM.nodeValue == node.text &&\n next.dirty != NODE_DIRTY && sameOuterDeco(outerDeco, next.outerDeco));\n if (!locked && next.update(node, outerDeco, innerDeco, view)) {\n this.destroyBetween(this.index, i);\n if (next.dom != nextDOM) { this.changed = true; }\n this.index++;\n return true\n }\n break\n }\n }\n return false\n};\n\n// : (Node, [Decoration], DecorationSource, EditorView)\n// Insert the node as a newly created node desc.\nViewTreeUpdater.prototype.addNode = function addNode (node, outerDeco, innerDeco, view, pos) {\n this.top.children.splice(this.index++, 0, NodeViewDesc.create(this.top, node, outerDeco, innerDeco, view, pos));\n this.changed = true;\n};\n\nViewTreeUpdater.prototype.placeWidget = function placeWidget (widget, view, pos) {\n var next = this.index < this.top.children.length ? this.top.children[this.index] : null;\n if (next && next.matchesWidget(widget) && (widget == next.widget || !next.widget.type.toDOM.parentNode)) {\n this.index++;\n } else {\n var desc = new WidgetViewDesc(this.top, widget, view, pos);\n this.top.children.splice(this.index++, 0, desc);\n this.changed = true;\n }\n};\n\n// Make sure a textblock looks and behaves correctly in\n// contentEditable.\nViewTreeUpdater.prototype.addTextblockHacks = function addTextblockHacks () {\n var lastChild = this.top.children[this.index - 1];\n while (lastChild instanceof MarkViewDesc) { lastChild = lastChild.children[lastChild.children.length - 1]; }\n\n if (!lastChild || // Empty textblock\n !(lastChild instanceof TextViewDesc) ||\n /\\n$/.test(lastChild.node.text)) {\n if (this.index < this.top.children.length && this.top.children[this.index].matchesHack()) {\n this.index++;\n } else {\n var dom = document.createElement(\"br\");\n this.top.children.splice(this.index++, 0, new BRHackViewDesc(this.top, nothing, dom, null));\n this.changed = true;\n }\n }\n};\n\n// : (Fragment, [ViewDesc]) → {index: number, matched: Map}\n// Iterate from the end of the fragment and array of descs to find\n// directly matching ones, in order to avoid overeagerly reusing those\n// for other nodes. Returns the fragment index of the first node that\n// is part of the sequence of matched nodes at the end of the\n// fragment.\nfunction preMatch(frag, descs) {\n var fI = frag.childCount, dI = descs.length, matched = new Map;\n for (; fI > 0 && dI > 0; dI--) {\n var desc = descs[dI - 1], node = desc.node;\n if (!node) { continue }\n if (node != frag.child(fI - 1)) { break }\n --fI;\n matched.set(desc, fI);\n }\n return {index: fI, matched: matched}\n}\n\nfunction compareSide(a, b) { return a.type.side - b.type.side }\n\n// : (ViewDesc, DecorationSource, (Decoration, number), (Node, [Decoration], DecorationSource, number))\n// This function abstracts iterating over the nodes and decorations in\n// a fragment. Calls `onNode` for each node, with its local and child\n// decorations. Splits text nodes when there is a decoration starting\n// or ending inside of them. Calls `onWidget` for each widget.\nfunction iterDeco(parent, deco, onWidget, onNode) {\n var locals = deco.locals(parent), offset = 0;\n // Simple, cheap variant for when there are no local decorations\n if (locals.length == 0) {\n for (var i = 0; i < parent.childCount; i++) {\n var child = parent.child(i);\n onNode(child, locals, deco.forChild(offset, child), i);\n offset += child.nodeSize;\n }\n return\n }\n\n var decoIndex = 0, active = [], restNode = null;\n for (var parentIndex = 0;;) {\n if (decoIndex < locals.length && locals[decoIndex].to == offset) {\n var widget = locals[decoIndex++], widgets = (void 0);\n while (decoIndex < locals.length && locals[decoIndex].to == offset)\n { (widgets || (widgets = [widget])).push(locals[decoIndex++]); }\n if (widgets) {\n widgets.sort(compareSide);\n for (var i$1 = 0; i$1 < widgets.length; i$1++) { onWidget(widgets[i$1], parentIndex, !!restNode); }\n } else {\n onWidget(widget, parentIndex, !!restNode);\n }\n }\n\n var child$1 = (void 0), index = (void 0);\n if (restNode) {\n index = -1;\n child$1 = restNode;\n restNode = null;\n } else if (parentIndex < parent.childCount) {\n index = parentIndex;\n child$1 = parent.child(parentIndex++);\n } else {\n break\n }\n\n for (var i$2 = 0; i$2 < active.length; i$2++) { if (active[i$2].to <= offset) { active.splice(i$2--, 1); } }\n while (decoIndex < locals.length && locals[decoIndex].from <= offset && locals[decoIndex].to > offset)\n { active.push(locals[decoIndex++]); }\n\n var end = offset + child$1.nodeSize;\n if (child$1.isText) {\n var cutAt = end;\n if (decoIndex < locals.length && locals[decoIndex].from < cutAt) { cutAt = locals[decoIndex].from; }\n for (var i$3 = 0; i$3 < active.length; i$3++) { if (active[i$3].to < cutAt) { cutAt = active[i$3].to; } }\n if (cutAt < end) {\n restNode = child$1.cut(cutAt - offset);\n child$1 = child$1.cut(0, cutAt - offset);\n end = cutAt;\n index = -1;\n }\n }\n\n var outerDeco = !active.length ? nothing\n : child$1.isInline && !child$1.isLeaf ? active.filter(function (d) { return !d.inline; })\n : active.slice();\n onNode(child$1, outerDeco, deco.forChild(offset, child$1), index);\n offset = end;\n }\n}\n\n// List markers in Mobile Safari will mysteriously disappear\n// sometimes. This works around that.\nfunction iosHacks(dom) {\n if (dom.nodeName == \"UL\" || dom.nodeName == \"OL\") {\n var oldCSS = dom.style.cssText;\n dom.style.cssText = oldCSS + \"; list-style: square !important\";\n window.getComputedStyle(dom).listStyle;\n dom.style.cssText = oldCSS;\n }\n}\n\nfunction nearbyTextNode(node, offset) {\n for (;;) {\n if (node.nodeType == 3) { return node }\n if (node.nodeType == 1 && offset > 0) {\n if (node.childNodes.length > offset && node.childNodes[offset].nodeType == 3)\n { return node.childNodes[offset] }\n node = node.childNodes[offset - 1];\n offset = nodeSize(node);\n } else if (node.nodeType == 1 && offset < node.childNodes.length) {\n node = node.childNodes[offset];\n offset = 0;\n } else {\n return null\n }\n }\n}\n\n// Find a piece of text in an inline fragment, overlapping from-to\nfunction findTextInFragment(frag, text, from, to) {\n for (var i = 0, pos = 0; i < frag.childCount && pos <= to;) {\n var child = frag.child(i++), childStart = pos;\n pos += child.nodeSize;\n if (!child.isText) { continue }\n var str = child.text;\n while (i < frag.childCount) {\n var next = frag.child(i++);\n pos += next.nodeSize;\n if (!next.isText) { break }\n str += next.text;\n }\n if (pos >= from) {\n var found = str.lastIndexOf(text, to - childStart);\n if (found >= 0 && found + text.length + childStart >= from)\n { return childStart + found }\n }\n }\n return -1\n}\n\n// Replace range from-to in an array of view descs with replacement\n// (may be null to just delete). This goes very much against the grain\n// of the rest of this code, which tends to create nodes with the\n// right shape in one go, rather than messing with them after\n// creation, but is necessary in the composition hack.\nfunction replaceNodes(nodes, from, to, view, replacement) {\n var result = [];\n for (var i = 0, off = 0; i < nodes.length; i++) {\n var child = nodes[i], start = off, end = off += child.size;\n if (start >= to || end <= from) {\n result.push(child);\n } else {\n if (start < from) { result.push(child.slice(0, from - start, view)); }\n if (replacement) {\n result.push(replacement);\n replacement = null;\n }\n if (end > to) { result.push(child.slice(to - start, child.size, view)); }\n }\n }\n return result\n}\n\nfunction selectionFromDOM(view, origin) {\n var domSel = view.root.getSelection(), doc = view.state.doc;\n if (!domSel.focusNode) { return null }\n var nearestDesc = view.docView.nearestDesc(domSel.focusNode), inWidget = nearestDesc && nearestDesc.size == 0;\n var head = view.docView.posFromDOM(domSel.focusNode, domSel.focusOffset);\n if (head < 0) { return null }\n var $head = doc.resolve(head), $anchor, selection;\n if (selectionCollapsed(domSel)) {\n $anchor = $head;\n while (nearestDesc && !nearestDesc.node) { nearestDesc = nearestDesc.parent; }\n if (nearestDesc && nearestDesc.node.isAtom && NodeSelection.isSelectable(nearestDesc.node) && nearestDesc.parent\n && !(nearestDesc.node.isInline && isOnEdge(domSel.focusNode, domSel.focusOffset, nearestDesc.dom))) {\n var pos = nearestDesc.posBefore;\n selection = new NodeSelection(head == pos ? $head : doc.resolve(pos));\n }\n } else {\n var anchor = view.docView.posFromDOM(domSel.anchorNode, domSel.anchorOffset);\n if (anchor < 0) { return null }\n $anchor = doc.resolve(anchor);\n }\n\n if (!selection) {\n var bias = origin == \"pointer\" || (view.state.selection.head < $head.pos && !inWidget) ? 1 : -1;\n selection = selectionBetween(view, $anchor, $head, bias);\n }\n return selection\n}\n\nfunction editorOwnsSelection(view) {\n return view.editable ? view.hasFocus() :\n hasSelection(view) && document.activeElement && document.activeElement.contains(view.dom)\n}\n\nfunction selectionToDOM(view, force) {\n var sel = view.state.selection;\n syncNodeSelection(view, sel);\n\n if (!editorOwnsSelection(view)) { return }\n\n view.domObserver.disconnectSelection();\n\n if (view.cursorWrapper) {\n selectCursorWrapper(view);\n } else {\n var anchor = sel.anchor;\n var head = sel.head;\n var resetEditableFrom, resetEditableTo;\n if (brokenSelectBetweenUneditable && !(sel instanceof TextSelection)) {\n if (!sel.$from.parent.inlineContent)\n { resetEditableFrom = temporarilyEditableNear(view, sel.from); }\n if (!sel.empty && !sel.$from.parent.inlineContent)\n { resetEditableTo = temporarilyEditableNear(view, sel.to); }\n }\n view.docView.setSelection(anchor, head, view.root, force);\n if (brokenSelectBetweenUneditable) {\n if (resetEditableFrom) { resetEditable(resetEditableFrom); }\n if (resetEditableTo) { resetEditable(resetEditableTo); }\n }\n if (sel.visible) {\n view.dom.classList.remove(\"ProseMirror-hideselection\");\n } else {\n view.dom.classList.add(\"ProseMirror-hideselection\");\n if (\"onselectionchange\" in document) { removeClassOnSelectionChange(view); }\n }\n }\n\n view.domObserver.setCurSelection();\n view.domObserver.connectSelection();\n}\n\n// Kludge to work around Webkit not allowing a selection to start/end\n// between non-editable block nodes. We briefly make something\n// editable, set the selection, then set it uneditable again.\n\nvar brokenSelectBetweenUneditable = result.safari || result.chrome && result.chrome_version < 63;\n\nfunction temporarilyEditableNear(view, pos) {\n var ref = view.docView.domFromPos(pos, 0);\n var node = ref.node;\n var offset = ref.offset;\n var after = offset < node.childNodes.length ? node.childNodes[offset] : null;\n var before = offset ? node.childNodes[offset - 1] : null;\n if (result.safari && after && after.contentEditable == \"false\") { return setEditable(after) }\n if ((!after || after.contentEditable == \"false\") && (!before || before.contentEditable == \"false\")) {\n if (after) { return setEditable(after) }\n else if (before) { return setEditable(before) }\n }\n}\n\nfunction setEditable(element) {\n element.contentEditable = \"true\";\n if (result.safari && element.draggable) { element.draggable = false; element.wasDraggable = true; }\n return element\n}\n\nfunction resetEditable(element) {\n element.contentEditable = \"false\";\n if (element.wasDraggable) { element.draggable = true; element.wasDraggable = null; }\n}\n\nfunction removeClassOnSelectionChange(view) {\n var doc = view.dom.ownerDocument;\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n var domSel = view.root.getSelection();\n var node = domSel.anchorNode, offset = domSel.anchorOffset;\n doc.addEventListener(\"selectionchange\", view.hideSelectionGuard = function () {\n if (domSel.anchorNode != node || domSel.anchorOffset != offset) {\n doc.removeEventListener(\"selectionchange\", view.hideSelectionGuard);\n setTimeout(function () {\n if (!editorOwnsSelection(view) || view.state.selection.visible)\n { view.dom.classList.remove(\"ProseMirror-hideselection\"); }\n }, 20);\n }\n });\n}\n\nfunction selectCursorWrapper(view) {\n var domSel = view.root.getSelection(), range = document.createRange();\n var node = view.cursorWrapper.dom, img = node.nodeName == \"IMG\";\n if (img) { range.setEnd(node.parentNode, domIndex(node) + 1); }\n else { range.setEnd(node, 0); }\n range.collapse(false);\n domSel.removeAllRanges();\n domSel.addRange(range);\n // Kludge to kill 'control selection' in IE11 when selecting an\n // invisible cursor wrapper, since that would result in those weird\n // resize handles and a selection that considers the absolutely\n // positioned wrapper, rather than the root editable node, the\n // focused element.\n if (!img && !view.state.selection.visible && result.ie && result.ie_version <= 11) {\n node.disabled = true;\n node.disabled = false;\n }\n}\n\nfunction syncNodeSelection(view, sel) {\n if (sel instanceof NodeSelection) {\n var desc = view.docView.descAt(sel.from);\n if (desc != view.lastSelectedViewDesc) {\n clearNodeSelection(view);\n if (desc) { desc.selectNode(); }\n view.lastSelectedViewDesc = desc;\n }\n } else {\n clearNodeSelection(view);\n }\n}\n\n// Clear all DOM statefulness of the last node selection.\nfunction clearNodeSelection(view) {\n if (view.lastSelectedViewDesc) {\n if (view.lastSelectedViewDesc.parent)\n { view.lastSelectedViewDesc.deselectNode(); }\n view.lastSelectedViewDesc = null;\n }\n}\n\nfunction selectionBetween(view, $anchor, $head, bias) {\n return view.someProp(\"createSelectionBetween\", function (f) { return f(view, $anchor, $head); })\n || TextSelection.between($anchor, $head, bias)\n}\n\nfunction hasFocusAndSelection(view) {\n if (view.editable && view.root.activeElement != view.dom) { return false }\n return hasSelection(view)\n}\n\nfunction hasSelection(view) {\n var sel = view.root.getSelection();\n if (!sel.anchorNode) { return false }\n try {\n // Firefox will raise 'permission denied' errors when accessing\n // properties of `sel.anchorNode` when it's in a generated CSS\n // element.\n return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) &&\n (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode))\n } catch(_) {\n return false\n }\n}\n\nfunction anchorInRightPlace(view) {\n var anchorDOM = view.docView.domFromPos(view.state.selection.anchor, 0);\n var domSel = view.root.getSelection();\n return isEquivalentPosition(anchorDOM.node, anchorDOM.offset, domSel.anchorNode, domSel.anchorOffset)\n}\n\nfunction moveSelectionBlock(state, dir) {\n var ref = state.selection;\n var $anchor = ref.$anchor;\n var $head = ref.$head;\n var $side = dir > 0 ? $anchor.max($head) : $anchor.min($head);\n var $start = !$side.parent.inlineContent ? $side : $side.depth ? state.doc.resolve(dir > 0 ? $side.after() : $side.before()) : null;\n return $start && Selection.findFrom($start, dir)\n}\n\nfunction apply(view, sel) {\n view.dispatch(view.state.tr.setSelection(sel).scrollIntoView());\n return true\n}\n\nfunction selectHorizontally(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof TextSelection) {\n if (!sel.empty || mods.indexOf(\"s\") > -1) {\n return false\n } else if (view.endOfTextblock(dir > 0 ? \"right\" : \"left\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && (next instanceof NodeSelection)) { return apply(view, next) }\n return false\n } else if (!(result.mac && mods.indexOf(\"m\") > -1)) {\n var $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc;\n if (!node || node.isText) { return false }\n var nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;\n if (!(node.isAtom || (desc = view.docView.descAt(nodePos)) && !desc.contentDOM)) { return false }\n if (NodeSelection.isSelectable(node)) {\n return apply(view, new NodeSelection(dir < 0 ? view.state.doc.resolve($head.pos - node.nodeSize) : $head))\n } else if (result.webkit) {\n // Chrome and Safari will introduce extra pointless cursor\n // positions around inline uneditable nodes, so we have to\n // take over and move the cursor past them (#937)\n return apply(view, new TextSelection(view.state.doc.resolve(dir < 0 ? nodePos : nodePos + node.nodeSize)))\n } else {\n return false\n }\n }\n } else if (sel instanceof NodeSelection && sel.node.isInline) {\n return apply(view, new TextSelection(dir > 0 ? sel.$to : sel.$from))\n } else {\n var next$1 = moveSelectionBlock(view.state, dir);\n if (next$1) { return apply(view, next$1) }\n return false\n }\n}\n\nfunction nodeLen(node) {\n return node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length\n}\n\nfunction isIgnorable(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.size == 0 && (dom.nextSibling || dom.nodeName != \"BR\")\n}\n\n// Make sure the cursor isn't directly after one or more ignored\n// nodes, which will confuse the browser's cursor motion logic.\nfunction skipIgnoredNodesLeft(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode, offset = sel.focusOffset;\n if (!node) { return }\n var moveNode, moveOffset, force = false;\n // Gecko will do odd things when the selection is directly in front\n // of a non-editable node, so in that case, move it into the next\n // node if possible. Issue prosemirror/prosemirror#832.\n if (result.gecko && node.nodeType == 1 && offset < nodeLen(node) && isIgnorable(node.childNodes[offset])) { force = true; }\n for (;;) {\n if (offset > 0) {\n if (node.nodeType != 1) {\n break\n } else {\n var before = node.childNodes[offset - 1];\n if (isIgnorable(before)) {\n moveNode = node;\n moveOffset = --offset;\n } else if (before.nodeType == 3) {\n node = before;\n offset = node.nodeValue.length;\n } else { break }\n }\n } else if (isBlockNode(node)) {\n break\n } else {\n var prev = node.previousSibling;\n while (prev && isIgnorable(prev)) {\n moveNode = node.parentNode;\n moveOffset = domIndex(prev);\n prev = prev.previousSibling;\n }\n if (!prev) {\n node = node.parentNode;\n if (node == view.dom) { break }\n offset = 0;\n } else {\n node = prev;\n offset = nodeLen(node);\n }\n }\n }\n if (force) { setSelFocus(view, sel, node, offset); }\n else if (moveNode) { setSelFocus(view, sel, moveNode, moveOffset); }\n}\n\n// Make sure the cursor isn't directly before one or more ignored\n// nodes.\nfunction skipIgnoredNodesRight(view) {\n var sel = view.root.getSelection();\n var node = sel.focusNode, offset = sel.focusOffset;\n if (!node) { return }\n var len = nodeLen(node);\n var moveNode, moveOffset;\n for (;;) {\n if (offset < len) {\n if (node.nodeType != 1) { break }\n var after = node.childNodes[offset];\n if (isIgnorable(after)) {\n moveNode = node;\n moveOffset = ++offset;\n }\n else { break }\n } else if (isBlockNode(node)) {\n break\n } else {\n var next = node.nextSibling;\n while (next && isIgnorable(next)) {\n moveNode = next.parentNode;\n moveOffset = domIndex(next) + 1;\n next = next.nextSibling;\n }\n if (!next) {\n node = node.parentNode;\n if (node == view.dom) { break }\n offset = len = 0;\n } else {\n node = next;\n offset = 0;\n len = nodeLen(node);\n }\n }\n }\n if (moveNode) { setSelFocus(view, sel, moveNode, moveOffset); }\n}\n\nfunction isBlockNode(dom) {\n var desc = dom.pmViewDesc;\n return desc && desc.node && desc.node.isBlock\n}\n\nfunction setSelFocus(view, sel, node, offset) {\n if (selectionCollapsed(sel)) {\n var range = document.createRange();\n range.setEnd(node, offset);\n range.setStart(node, offset);\n sel.removeAllRanges();\n sel.addRange(range);\n } else if (sel.extend) {\n sel.extend(node, offset);\n }\n view.domObserver.setCurSelection();\n var state = view.state;\n // If no state update ends up happening, reset the selection.\n setTimeout(function () {\n if (view.state == state) { selectionToDOM(view); }\n }, 50);\n}\n\n// : (EditorState, number)\n// Check whether vertical selection motion would involve node\n// selections. If so, apply it (if not, the result is left to the\n// browser)\nfunction selectVertically(view, dir, mods) {\n var sel = view.state.selection;\n if (sel instanceof TextSelection && !sel.empty || mods.indexOf(\"s\") > -1) { return false }\n if (result.mac && mods.indexOf(\"m\") > -1) { return false }\n var $from = sel.$from;\n var $to = sel.$to;\n\n if (!$from.parent.inlineContent || view.endOfTextblock(dir < 0 ? \"up\" : \"down\")) {\n var next = moveSelectionBlock(view.state, dir);\n if (next && (next instanceof NodeSelection))\n { return apply(view, next) }\n }\n if (!$from.parent.inlineContent) {\n var side = dir < 0 ? $from : $to;\n var beyond = sel instanceof AllSelection ? Selection.near(side, dir) : Selection.findFrom(side, dir);\n return beyond ? apply(view, beyond) : false\n }\n return false\n}\n\nfunction stopNativeHorizontalDelete(view, dir) {\n if (!(view.state.selection instanceof TextSelection)) { return true }\n var ref = view.state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n var empty = ref.empty;\n if (!$head.sameParent($anchor)) { return true }\n if (!empty) { return false }\n if (view.endOfTextblock(dir > 0 ? \"forward\" : \"backward\")) { return true }\n var nextNode = !$head.textOffset && (dir < 0 ? $head.nodeBefore : $head.nodeAfter);\n if (nextNode && !nextNode.isText) {\n var tr = view.state.tr;\n if (dir < 0) { tr.delete($head.pos - nextNode.nodeSize, $head.pos); }\n else { tr.delete($head.pos, $head.pos + nextNode.nodeSize); }\n view.dispatch(tr);\n return true\n }\n return false\n}\n\nfunction switchEditable(view, node, state) {\n view.domObserver.stop();\n node.contentEditable = state;\n view.domObserver.start();\n}\n\n// Issue #867 / #1090 / https://bugs.chromium.org/p/chromium/issues/detail?id=903821\n// In which Safari (and at some point in the past, Chrome) does really\n// wrong things when the down arrow is pressed when the cursor is\n// directly at the start of a textblock and has an uneditable node\n// after it\nfunction safariDownArrowBug(view) {\n if (!result.safari || view.state.selection.$head.parentOffset > 0) { return }\n var ref = view.root.getSelection();\n var focusNode = ref.focusNode;\n var focusOffset = ref.focusOffset;\n if (focusNode && focusNode.nodeType == 1 && focusOffset == 0 &&\n focusNode.firstChild && focusNode.firstChild.contentEditable == \"false\") {\n var child = focusNode.firstChild;\n switchEditable(view, child, true);\n setTimeout(function () { return switchEditable(view, child, false); }, 20);\n }\n}\n\n// A backdrop key mapping used to make sure we always suppress keys\n// that have a dangerous default effect, even if the commands they are\n// bound to return false, and to make sure that cursor-motion keys\n// find a cursor (as opposed to a node selection) when pressed. For\n// cursor-motion keys, the code in the handlers also takes care of\n// block selections.\n\nfunction getMods(event) {\n var result = \"\";\n if (event.ctrlKey) { result += \"c\"; }\n if (event.metaKey) { result += \"m\"; }\n if (event.altKey) { result += \"a\"; }\n if (event.shiftKey) { result += \"s\"; }\n return result\n}\n\nfunction captureKeyDown(view, event) {\n var code = event.keyCode, mods = getMods(event);\n if (code == 8 || (result.mac && code == 72 && mods == \"c\")) { // Backspace, Ctrl-h on Mac\n return stopNativeHorizontalDelete(view, -1) || skipIgnoredNodesLeft(view)\n } else if (code == 46 || (result.mac && code == 68 && mods == \"c\")) { // Delete, Ctrl-d on Mac\n return stopNativeHorizontalDelete(view, 1) || skipIgnoredNodesRight(view)\n } else if (code == 13 || code == 27) { // Enter, Esc\n return true\n } else if (code == 37) { // Left arrow\n return selectHorizontally(view, -1, mods) || skipIgnoredNodesLeft(view)\n } else if (code == 39) { // Right arrow\n return selectHorizontally(view, 1, mods) || skipIgnoredNodesRight(view)\n } else if (code == 38) { // Up arrow\n return selectVertically(view, -1, mods) || skipIgnoredNodesLeft(view)\n } else if (code == 40) { // Down arrow\n return safariDownArrowBug(view) || selectVertically(view, 1, mods) || skipIgnoredNodesRight(view)\n } else if (mods == (result.mac ? \"m\" : \"c\") &&\n (code == 66 || code == 73 || code == 89 || code == 90)) { // Mod-[biyz]\n return true\n }\n return false\n}\n\n// Note that all referencing and parsing is done with the\n// start-of-operation selection and document, since that's the one\n// that the DOM represents. If any changes came in in the meantime,\n// the modification is mapped over those before it is applied, in\n// readDOMChange.\n\nfunction parseBetween(view, from_, to_) {\n var ref = view.docView.parseRange(from_, to_);\n var parent = ref.node;\n var fromOffset = ref.fromOffset;\n var toOffset = ref.toOffset;\n var from = ref.from;\n var to = ref.to;\n\n var domSel = view.root.getSelection(), find = null, anchor = domSel.anchorNode;\n if (anchor && view.dom.contains(anchor.nodeType == 1 ? anchor : anchor.parentNode)) {\n find = [{node: anchor, offset: domSel.anchorOffset}];\n if (!selectionCollapsed(domSel))\n { find.push({node: domSel.focusNode, offset: domSel.focusOffset}); }\n }\n // Work around issue in Chrome where backspacing sometimes replaces\n // the deleted content with a random BR node (issues #799, #831)\n if (result.chrome && view.lastKeyCode === 8) {\n for (var off = toOffset; off > fromOffset; off--) {\n var node = parent.childNodes[off - 1], desc = node.pmViewDesc;\n if (node.nodeName == \"BR\" && !desc) { toOffset = off; break }\n if (!desc || desc.size) { break }\n }\n }\n var startDoc = view.state.doc;\n var parser = view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n var $from = startDoc.resolve(from);\n\n var sel = null, doc = parser.parse(parent, {\n topNode: $from.parent,\n topMatch: $from.parent.contentMatchAt($from.index()),\n topOpen: true,\n from: fromOffset,\n to: toOffset,\n preserveWhitespace: $from.parent.type.spec.code ? \"full\" : true,\n editableContent: true,\n findPositions: find,\n ruleFromNode: ruleFromNode,\n context: $from\n });\n if (find && find[0].pos != null) {\n var anchor$1 = find[0].pos, head = find[1] && find[1].pos;\n if (head == null) { head = anchor$1; }\n sel = {anchor: anchor$1 + from, head: head + from};\n }\n return {doc: doc, sel: sel, from: from, to: to}\n}\n\nfunction ruleFromNode(dom) {\n var desc = dom.pmViewDesc;\n if (desc) {\n return desc.parseRule()\n } else if (dom.nodeName == \"BR\" && dom.parentNode) {\n // Safari replaces the list item or table cell with a BR\n // directly in the list node (?!) if you delete the last\n // character in a list item or table cell (#708, #862)\n if (result.safari && /^(ul|ol)$/i.test(dom.parentNode.nodeName)) {\n var skip = document.createElement(\"div\");\n skip.appendChild(document.createElement(\"li\"));\n return {skip: skip}\n } else if (dom.parentNode.lastChild == dom || result.safari && /^(tr|table)$/i.test(dom.parentNode.nodeName)) {\n return {ignore: true}\n }\n } else if (dom.nodeName == \"IMG\" && dom.getAttribute(\"mark-placeholder\")) {\n return {ignore: true}\n }\n}\n\nfunction readDOMChange(view, from, to, typeOver, addedNodes) {\n if (from < 0) {\n var origin = view.lastSelectionTime > Date.now() - 50 ? view.lastSelectionOrigin : null;\n var newSel = selectionFromDOM(view, origin);\n if (newSel && !view.state.selection.eq(newSel)) {\n var tr$1 = view.state.tr.setSelection(newSel);\n if (origin == \"pointer\") { tr$1.setMeta(\"pointer\", true); }\n else if (origin == \"key\") { tr$1.scrollIntoView(); }\n view.dispatch(tr$1);\n }\n return\n }\n\n var $before = view.state.doc.resolve(from);\n var shared = $before.sharedDepth(to);\n from = $before.before(shared + 1);\n to = view.state.doc.resolve(to).after(shared + 1);\n\n var sel = view.state.selection;\n var parse = parseBetween(view, from, to);\n // Chrome sometimes leaves the cursor before the inserted text when\n // composing after a cursor wrapper. This moves it forward.\n if (result.chrome && view.cursorWrapper && parse.sel && parse.sel.anchor == view.cursorWrapper.deco.from) {\n var text = view.cursorWrapper.deco.type.toDOM.nextSibling;\n var size = text && text.nodeValue ? text.nodeValue.length : 1;\n parse.sel = {anchor: parse.sel.anchor + size, head: parse.sel.anchor + size};\n }\n\n var doc = view.state.doc, compare = doc.slice(parse.from, parse.to);\n var preferredPos, preferredSide;\n // Prefer anchoring to end when Backspace is pressed\n if (view.lastKeyCode === 8 && Date.now() - 100 < view.lastKeyCodeTime) {\n preferredPos = view.state.selection.to;\n preferredSide = \"end\";\n } else {\n preferredPos = view.state.selection.from;\n preferredSide = \"start\";\n }\n view.lastKeyCode = null;\n\n var change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);\n if (!change) {\n if (typeOver && sel instanceof TextSelection && !sel.empty && sel.$head.sameParent(sel.$anchor) &&\n !view.composing && !(parse.sel && parse.sel.anchor != parse.sel.head)) {\n change = {start: sel.from, endA: sel.to, endB: sel.to};\n } else if ((result.ios && view.lastIOSEnter > Date.now() - 225 || result.android) &&\n addedNodes.some(function (n) { return n.nodeName == \"DIV\" || n.nodeName == \"P\"; }) &&\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); })) {\n view.lastIOSEnter = 0;\n return\n } else {\n if (parse.sel) {\n var sel$1 = resolveSelection(view, view.state.doc, parse.sel);\n if (sel$1 && !sel$1.eq(view.state.selection)) { view.dispatch(view.state.tr.setSelection(sel$1)); }\n }\n return\n }\n }\n view.domChangeCount++;\n // Handle the case where overwriting a selection by typing matches\n // the start or end of the selected content, creating a change\n // that's smaller than what was actually overwritten.\n if (view.state.selection.from < view.state.selection.to &&\n change.start == change.endB &&\n view.state.selection instanceof TextSelection) {\n if (change.start > view.state.selection.from && change.start <= view.state.selection.from + 2) {\n change.start = view.state.selection.from;\n } else if (change.endA < view.state.selection.to && change.endA >= view.state.selection.to - 2) {\n change.endB += (view.state.selection.to - change.endA);\n change.endA = view.state.selection.to;\n }\n }\n\n // IE11 will insert a non-breaking space _ahead_ of the space after\n // the cursor space when adding a space before another space. When\n // that happened, adjust the change to cover the space instead.\n if (result.ie && result.ie_version <= 11 && change.endB == change.start + 1 &&\n change.endA == change.start && change.start > parse.from &&\n parse.doc.textBetween(change.start - parse.from - 1, change.start - parse.from + 1) == \" \\u00a0\") {\n change.start--;\n change.endA--;\n change.endB--;\n }\n\n var $from = parse.doc.resolveNoCache(change.start - parse.from);\n var $to = parse.doc.resolveNoCache(change.endB - parse.from);\n var inlineChange = $from.sameParent($to) && $from.parent.inlineContent;\n var nextSel;\n // If this looks like the effect of pressing Enter (or was recorded\n // as being an iOS enter press), just dispatch an Enter key instead.\n if (((result.ios && view.lastIOSEnter > Date.now() - 225 &&\n (!inlineChange || addedNodes.some(function (n) { return n.nodeName == \"DIV\" || n.nodeName == \"P\"; }))) ||\n (!inlineChange && $from.pos < parse.doc.content.size &&\n (nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) &&\n nextSel.head == $to.pos)) &&\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); })) {\n view.lastIOSEnter = 0;\n return\n }\n // Same for backspace\n if (view.state.selection.anchor > change.start &&\n looksLikeJoin(doc, change.start, change.endA, $from, $to) &&\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(8, \"Backspace\")); })) {\n if (result.android && result.chrome) { view.domObserver.suppressSelectionUpdates(); } // #820\n return\n }\n\n // Chrome Android will occasionally, during composition, delete the\n // entire composition and then immediately insert it again. This is\n // used to detect that situation.\n if (result.chrome && result.android && change.toB == change.from)\n { view.lastAndroidDelete = Date.now(); }\n\n // This tries to detect Android virtual keyboard\n // enter-and-pick-suggestion action. That sometimes (see issue\n // #1059) first fires a DOM mutation, before moving the selection to\n // the newly created block. And then, because ProseMirror cleans up\n // the DOM selection, it gives up moving the selection entirely,\n // leaving the cursor in the wrong place. When that happens, we drop\n // the new paragraph from the initial change, and fire a simulated\n // enter key afterwards.\n if (result.android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth &&\n parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {\n change.endB -= 2;\n $to = parse.doc.resolveNoCache(change.endB - parse.from);\n setTimeout(function () {\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); });\n }, 20);\n }\n\n var chFrom = change.start, chTo = change.endA;\n\n var tr, storedMarks, markChange, $from1;\n if (inlineChange) {\n if ($from.pos == $to.pos) { // Deletion\n // IE11 sometimes weirdly moves the DOM selection around after\n // backspacing out the first element in a textblock\n if (result.ie && result.ie_version <= 11 && $from.parentOffset == 0) {\n view.domObserver.suppressSelectionUpdates();\n setTimeout(function () { return selectionToDOM(view); }, 20);\n }\n tr = view.state.tr.delete(chFrom, chTo);\n storedMarks = doc.resolve(change.start).marksAcross(doc.resolve(change.endA));\n } else if ( // Adding or removing a mark\n change.endA == change.endB && ($from1 = doc.resolve(change.start)) &&\n (markChange = isMarkChange($from.parent.content.cut($from.parentOffset, $to.parentOffset),\n $from1.parent.content.cut($from1.parentOffset, change.endA - $from1.start())))\n ) {\n tr = view.state.tr;\n if (markChange.type == \"add\") { tr.addMark(chFrom, chTo, markChange.mark); }\n else { tr.removeMark(chFrom, chTo, markChange.mark); }\n } else if ($from.parent.child($from.index()).isText && $from.index() == $to.index() - ($to.textOffset ? 0 : 1)) {\n // Both positions in the same text node -- simply insert text\n var text$1 = $from.parent.textBetween($from.parentOffset, $to.parentOffset);\n if (view.someProp(\"handleTextInput\", function (f) { return f(view, chFrom, chTo, text$1); })) { return }\n tr = view.state.tr.insertText(text$1, chFrom, chTo);\n }\n }\n\n if (!tr)\n { tr = view.state.tr.replace(chFrom, chTo, parse.doc.slice(change.start - parse.from, change.endB - parse.from)); }\n if (parse.sel) {\n var sel$2 = resolveSelection(view, tr.doc, parse.sel);\n // Chrome Android will sometimes, during composition, report the\n // selection in the wrong place. If it looks like that is\n // happening, don't update the selection.\n // Edge just doesn't move the cursor forward when you start typing\n // in an empty block or between br nodes.\n if (sel$2 && !(result.chrome && result.android && view.composing && sel$2.empty &&\n (change.from != change.toB || view.lastAndroidDelete < Date.now() - 100) &&\n (sel$2.head == chFrom || sel$2.head == tr.mapping.map(chTo) - 1) ||\n result.ie && sel$2.empty && sel$2.head == chFrom))\n { tr.setSelection(sel$2); }\n }\n if (storedMarks) { tr.ensureMarks(storedMarks); }\n view.dispatch(tr.scrollIntoView());\n}\n\nfunction resolveSelection(view, doc, parsedSel) {\n if (Math.max(parsedSel.anchor, parsedSel.head) > doc.content.size) { return null }\n return selectionBetween(view, doc.resolve(parsedSel.anchor), doc.resolve(parsedSel.head))\n}\n\n// : (Fragment, Fragment) → ?{mark: Mark, type: string}\n// Given two same-length, non-empty fragments of inline content,\n// determine whether the first could be created from the second by\n// removing or adding a single mark type.\nfunction isMarkChange(cur, prev) {\n var curMarks = cur.firstChild.marks, prevMarks = prev.firstChild.marks;\n var added = curMarks, removed = prevMarks, type, mark, update;\n for (var i = 0; i < prevMarks.length; i++) { added = prevMarks[i].removeFromSet(added); }\n for (var i$1 = 0; i$1 < curMarks.length; i$1++) { removed = curMarks[i$1].removeFromSet(removed); }\n if (added.length == 1 && removed.length == 0) {\n mark = added[0];\n type = \"add\";\n update = function (node) { return node.mark(mark.addToSet(node.marks)); };\n } else if (added.length == 0 && removed.length == 1) {\n mark = removed[0];\n type = \"remove\";\n update = function (node) { return node.mark(mark.removeFromSet(node.marks)); };\n } else {\n return null\n }\n var updated = [];\n for (var i$2 = 0; i$2 < prev.childCount; i$2++) { updated.push(update(prev.child(i$2))); }\n if (Fragment.from(updated).eq(cur)) { return {mark: mark, type: type} }\n}\n\nfunction looksLikeJoin(old, start, end, $newStart, $newEnd) {\n if (!$newStart.parent.isTextblock ||\n // The content must have shrunk\n end - start <= $newEnd.pos - $newStart.pos ||\n // newEnd must point directly at or after the end of the block that newStart points into\n skipClosingAndOpening($newStart, true, false) < $newEnd.pos)\n { return false }\n\n var $start = old.resolve(start);\n // Start must be at the end of a block\n if ($start.parentOffset < $start.parent.content.size || !$start.parent.isTextblock)\n { return false }\n var $next = old.resolve(skipClosingAndOpening($start, true, true));\n // The next textblock must start before end and end near it\n if (!$next.parent.isTextblock || $next.pos > end ||\n skipClosingAndOpening($next, true, false) < end)\n { return false }\n\n // The fragments after the join point must match\n return $newStart.parent.content.cut($newStart.parentOffset).eq($next.parent.content)\n}\n\nfunction skipClosingAndOpening($pos, fromEnd, mayOpen) {\n var depth = $pos.depth, end = fromEnd ? $pos.end() : $pos.pos;\n while (depth > 0 && (fromEnd || $pos.indexAfter(depth) == $pos.node(depth).childCount)) {\n depth--;\n end++;\n fromEnd = false;\n }\n if (mayOpen) {\n var next = $pos.node(depth).maybeChild($pos.indexAfter(depth));\n while (next && !next.isLeaf) {\n next = next.firstChild;\n end++;\n }\n }\n return end\n}\n\nfunction findDiff(a, b, pos, preferredPos, preferredSide) {\n var start = a.findDiffStart(b, pos);\n if (start == null) { return null }\n var ref = a.findDiffEnd(b, pos + a.size, pos + b.size);\n var endA = ref.a;\n var endB = ref.b;\n if (preferredSide == \"end\") {\n var adjust = Math.max(0, start - Math.min(endA, endB));\n preferredPos -= endA + adjust - start;\n }\n if (endA < start && a.size < b.size) {\n var move = preferredPos <= start && preferredPos >= endA ? start - preferredPos : 0;\n start -= move;\n endB = start + (endB - endA);\n endA = start;\n } else if (endB < start) {\n var move$1 = preferredPos <= start && preferredPos >= endB ? start - preferredPos : 0;\n start -= move$1;\n endA = start + (endA - endB);\n endB = start;\n }\n return {start: start, endA: endA, endB: endB}\n}\n\nfunction serializeForClipboard(view, slice) {\n var context = [];\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n while (openStart > 1 && openEnd > 1 && content.childCount == 1 && content.firstChild.childCount == 1) {\n openStart--;\n openEnd--;\n var node = content.firstChild;\n context.push(node.type.name, node.attrs != node.type.defaultAttrs ? node.attrs : null);\n content = node.content;\n }\n\n var serializer = view.someProp(\"clipboardSerializer\") || DOMSerializer.fromSchema(view.state.schema);\n var doc = detachedDoc(), wrap = doc.createElement(\"div\");\n wrap.appendChild(serializer.serializeFragment(content, {document: doc}));\n\n var firstChild = wrap.firstChild, needsWrap;\n while (firstChild && firstChild.nodeType == 1 && (needsWrap = wrapMap[firstChild.nodeName.toLowerCase()])) {\n for (var i = needsWrap.length - 1; i >= 0; i--) {\n var wrapper = doc.createElement(needsWrap[i]);\n while (wrap.firstChild) { wrapper.appendChild(wrap.firstChild); }\n wrap.appendChild(wrapper);\n }\n firstChild = wrap.firstChild;\n }\n\n if (firstChild && firstChild.nodeType == 1)\n { firstChild.setAttribute(\"data-pm-slice\", (openStart + \" \" + openEnd + \" \" + (JSON.stringify(context)))); }\n\n var text = view.someProp(\"clipboardTextSerializer\", function (f) { return f(slice); }) ||\n slice.content.textBetween(0, slice.content.size, \"\\n\\n\");\n\n return {dom: wrap, text: text}\n}\n\n// : (EditorView, string, string, ?bool, ResolvedPos) → ?Slice\n// Read a slice of content from the clipboard (or drop data).\nfunction parseFromClipboard(view, text, html, plainText, $context) {\n var dom, inCode = $context.parent.type.spec.code, slice;\n if (!html && !text) { return null }\n var asText = text && (plainText || inCode || !html);\n if (asText) {\n view.someProp(\"transformPastedText\", function (f) { text = f(text, inCode || plainText); });\n if (inCode) { return new Slice(Fragment.from(view.state.schema.text(text.replace(/\\r\\n?/g, \"\\n\"))), 0, 0) }\n var parsed = view.someProp(\"clipboardTextParser\", function (f) { return f(text, $context, plainText); });\n if (parsed) {\n slice = parsed;\n } else {\n dom = document.createElement(\"div\");\n text.trim().split(/(?:\\r\\n?|\\n)+/).forEach(function (block) {\n dom.appendChild(document.createElement(\"p\")).textContent = block;\n });\n }\n } else {\n view.someProp(\"transformPastedHTML\", function (f) { html = f(html); });\n dom = readHTML(html);\n }\n\n var contextNode = dom && dom.querySelector(\"[data-pm-slice]\");\n var sliceData = contextNode && /^(\\d+) (\\d+) (.*)/.exec(contextNode.getAttribute(\"data-pm-slice\"));\n if (!slice) {\n var parser = view.someProp(\"clipboardParser\") || view.someProp(\"domParser\") || DOMParser.fromSchema(view.state.schema);\n slice = parser.parseSlice(dom, {preserveWhitespace: !!(asText || sliceData), context: $context});\n }\n if (sliceData)\n { slice = addContext(closeSlice(slice, +sliceData[1], +sliceData[2]), sliceData[3]); }\n else // HTML wasn't created by ProseMirror. Make sure top-level siblings are coherent\n { slice = Slice.maxOpen(normalizeSiblings(slice.content, $context), false); }\n\n view.someProp(\"transformPasted\", function (f) { slice = f(slice); });\n return slice\n}\n\n// Takes a slice parsed with parseSlice, which means there hasn't been\n// any content-expression checking done on the top nodes, tries to\n// find a parent node in the current context that might fit the nodes,\n// and if successful, rebuilds the slice so that it fits into that parent.\n//\n// This addresses the problem that Transform.replace expects a\n// coherent slice, and will fail to place a set of siblings that don't\n// fit anywhere in the schema.\nfunction normalizeSiblings(fragment, $context) {\n if (fragment.childCount < 2) { return fragment }\n var loop = function ( d ) {\n var parent = $context.node(d);\n var match = parent.contentMatchAt($context.index(d));\n var lastWrap = (void 0), result = [];\n fragment.forEach(function (node) {\n if (!result) { return }\n var wrap = match.findWrapping(node.type), inLast;\n if (!wrap) { return result = null }\n if (inLast = result.length && lastWrap.length && addToSibling(wrap, lastWrap, node, result[result.length - 1], 0)) {\n result[result.length - 1] = inLast;\n } else {\n if (result.length) { result[result.length - 1] = closeRight(result[result.length - 1], lastWrap.length); }\n var wrapped = withWrappers(node, wrap);\n result.push(wrapped);\n match = match.matchType(wrapped.type, wrapped.attrs);\n lastWrap = wrap;\n }\n });\n if (result) { return { v: Fragment.from(result) } }\n };\n\n for (var d = $context.depth; d >= 0; d--) {\n var returned = loop( d );\n\n if ( returned ) return returned.v;\n }\n return fragment\n}\n\nfunction withWrappers(node, wrap, from) {\n if ( from === void 0 ) from = 0;\n\n for (var i = wrap.length - 1; i >= from; i--)\n { node = wrap[i].create(null, Fragment.from(node)); }\n return node\n}\n\n// Used to group adjacent nodes wrapped in similar parents by\n// normalizeSiblings into the same parent node\nfunction addToSibling(wrap, lastWrap, node, sibling, depth) {\n if (depth < wrap.length && depth < lastWrap.length && wrap[depth] == lastWrap[depth]) {\n var inner = addToSibling(wrap, lastWrap, node, sibling.lastChild, depth + 1);\n if (inner) { return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner)) }\n var match = sibling.contentMatchAt(sibling.childCount);\n if (match.matchType(depth == wrap.length - 1 ? node.type : wrap[depth + 1]))\n { return sibling.copy(sibling.content.append(Fragment.from(withWrappers(node, wrap, depth + 1)))) }\n }\n}\n\nfunction closeRight(node, depth) {\n if (depth == 0) { return node }\n var fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));\n var fill = node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true);\n return node.copy(fragment.append(fill))\n}\n\nfunction closeRange(fragment, side, from, to, depth, openEnd) {\n var node = side < 0 ? fragment.firstChild : fragment.lastChild, inner = node.content;\n if (depth < to - 1) { inner = closeRange(inner, side, from, to, depth + 1, openEnd); }\n if (depth >= from)\n { inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, fragment.childCount > 1 || openEnd <= depth).append(inner)\n : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment.empty, true)); }\n return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner))\n}\n\nfunction closeSlice(slice, openStart, openEnd) {\n if (openStart < slice.openStart)\n { slice = new Slice(closeRange(slice.content, -1, openStart, slice.openStart, 0, slice.openEnd), openStart, slice.openEnd); }\n if (openEnd < slice.openEnd)\n { slice = new Slice(closeRange(slice.content, 1, openEnd, slice.openEnd, 0, 0), slice.openStart, openEnd); }\n return slice\n}\n\n// Trick from jQuery -- some elements must be wrapped in other\n// elements for innerHTML to work. I.e. if you do `div.innerHTML =\n// \"..\"` the table cells are ignored.\nvar wrapMap = {\n thead: [\"table\"],\n tbody: [\"table\"],\n tfoot: [\"table\"],\n caption: [\"table\"],\n colgroup: [\"table\"],\n col: [\"table\", \"colgroup\"],\n tr: [\"table\", \"tbody\"],\n td: [\"table\", \"tbody\", \"tr\"],\n th: [\"table\", \"tbody\", \"tr\"]\n};\n\nvar _detachedDoc = null;\nfunction detachedDoc() {\n return _detachedDoc || (_detachedDoc = document.implementation.createHTMLDocument(\"title\"))\n}\n\nfunction readHTML(html) {\n var metas = /^(\\s*]*>)*/.exec(html);\n if (metas) { html = html.slice(metas[0].length); }\n var elt = detachedDoc().createElement(\"div\");\n var firstTag = /<([a-z][^>\\s]+)/i.exec(html), wrap;\n if (wrap = firstTag && wrapMap[firstTag[1].toLowerCase()])\n { html = wrap.map(function (n) { return \"<\" + n + \">\"; }).join(\"\") + html + wrap.map(function (n) { return \"\"; }).reverse().join(\"\"); }\n elt.innerHTML = html;\n if (wrap) { for (var i = 0; i < wrap.length; i++) { elt = elt.querySelector(wrap[i]) || elt; } }\n return elt\n}\n\nfunction addContext(slice, context) {\n if (!slice.size) { return slice }\n var schema = slice.content.firstChild.type.schema, array;\n try { array = JSON.parse(context); }\n catch(e) { return slice }\n var content = slice.content;\n var openStart = slice.openStart;\n var openEnd = slice.openEnd;\n for (var i = array.length - 2; i >= 0; i -= 2) {\n var type = schema.nodes[array[i]];\n if (!type || type.hasRequiredAttrs()) { break }\n content = Fragment.from(type.create(array[i + 1], content));\n openStart++; openEnd++;\n }\n return new Slice(content, openStart, openEnd)\n}\n\nvar observeOptions = {\n childList: true,\n characterData: true,\n characterDataOldValue: true,\n attributes: true,\n attributeOldValue: true,\n subtree: true\n};\n// IE11 has very broken mutation observers, so we also listen to DOMCharacterDataModified\nvar useCharData = result.ie && result.ie_version <= 11;\n\nvar SelectionState = function SelectionState() {\n this.anchorNode = this.anchorOffset = this.focusNode = this.focusOffset = null;\n};\n\nSelectionState.prototype.set = function set (sel) {\n this.anchorNode = sel.anchorNode; this.anchorOffset = sel.anchorOffset;\n this.focusNode = sel.focusNode; this.focusOffset = sel.focusOffset;\n};\n\nSelectionState.prototype.eq = function eq (sel) {\n return sel.anchorNode == this.anchorNode && sel.anchorOffset == this.anchorOffset &&\n sel.focusNode == this.focusNode && sel.focusOffset == this.focusOffset\n};\n\nvar DOMObserver = function DOMObserver(view, handleDOMChange) {\n var this$1 = this;\n\n this.view = view;\n this.handleDOMChange = handleDOMChange;\n this.queue = [];\n this.flushingSoon = -1;\n this.observer = window.MutationObserver &&\n new window.MutationObserver(function (mutations) {\n for (var i = 0; i < mutations.length; i++) { this$1.queue.push(mutations[i]); }\n // IE11 will sometimes (on backspacing out a single character\n // text node after a BR node) call the observer callback\n // before actually updating the DOM, which will cause\n // ProseMirror to miss the change (see #930)\n if (result.ie && result.ie_version <= 11 && mutations.some(\n function (m) { return m.type == \"childList\" && m.removedNodes.length ||\n m.type == \"characterData\" && m.oldValue.length > m.target.nodeValue.length; }))\n { this$1.flushSoon(); }\n else\n { this$1.flush(); }\n });\n this.currentSelection = new SelectionState;\n if (useCharData) {\n this.onCharData = function (e) {\n this$1.queue.push({target: e.target, type: \"characterData\", oldValue: e.prevValue});\n this$1.flushSoon();\n };\n }\n this.onSelectionChange = this.onSelectionChange.bind(this);\n this.suppressingSelectionUpdates = false;\n};\n\nDOMObserver.prototype.flushSoon = function flushSoon () {\n var this$1 = this;\n\n if (this.flushingSoon < 0)\n { this.flushingSoon = window.setTimeout(function () { this$1.flushingSoon = -1; this$1.flush(); }, 20); }\n};\n\nDOMObserver.prototype.forceFlush = function forceFlush () {\n if (this.flushingSoon > -1) {\n window.clearTimeout(this.flushingSoon);\n this.flushingSoon = -1;\n this.flush();\n }\n};\n\nDOMObserver.prototype.start = function start () {\n if (this.observer)\n { this.observer.observe(this.view.dom, observeOptions); }\n if (useCharData)\n { this.view.dom.addEventListener(\"DOMCharacterDataModified\", this.onCharData); }\n this.connectSelection();\n};\n\nDOMObserver.prototype.stop = function stop () {\n var this$1 = this;\n\n if (this.observer) {\n var take = this.observer.takeRecords();\n if (take.length) {\n for (var i = 0; i < take.length; i++) { this.queue.push(take[i]); }\n window.setTimeout(function () { return this$1.flush(); }, 20);\n }\n this.observer.disconnect();\n }\n if (useCharData) { this.view.dom.removeEventListener(\"DOMCharacterDataModified\", this.onCharData); }\n this.disconnectSelection();\n};\n\nDOMObserver.prototype.connectSelection = function connectSelection () {\n this.view.dom.ownerDocument.addEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.disconnectSelection = function disconnectSelection () {\n this.view.dom.ownerDocument.removeEventListener(\"selectionchange\", this.onSelectionChange);\n};\n\nDOMObserver.prototype.suppressSelectionUpdates = function suppressSelectionUpdates () {\n var this$1 = this;\n\n this.suppressingSelectionUpdates = true;\n setTimeout(function () { return this$1.suppressingSelectionUpdates = false; }, 50);\n};\n\nDOMObserver.prototype.onSelectionChange = function onSelectionChange () {\n if (!hasFocusAndSelection(this.view)) { return }\n if (this.suppressingSelectionUpdates) { return selectionToDOM(this.view) }\n // Deletions on IE11 fire their events in the wrong order, giving\n // us a selection change event before the DOM changes are\n // reported.\n if (result.ie && result.ie_version <= 11 && !this.view.state.selection.empty) {\n var sel = this.view.root.getSelection();\n // Selection.isCollapsed isn't reliable on IE\n if (sel.focusNode && isEquivalentPosition(sel.focusNode, sel.focusOffset, sel.anchorNode, sel.anchorOffset))\n { return this.flushSoon() }\n }\n this.flush();\n};\n\nDOMObserver.prototype.setCurSelection = function setCurSelection () {\n this.currentSelection.set(this.view.root.getSelection());\n};\n\nDOMObserver.prototype.ignoreSelectionChange = function ignoreSelectionChange (sel) {\n if (sel.rangeCount == 0) { return true }\n var container = sel.getRangeAt(0).commonAncestorContainer;\n var desc = this.view.docView.nearestDesc(container);\n if (desc && desc.ignoreMutation({type: \"selection\", target: container.nodeType == 3 ? container.parentNode : container})) {\n this.setCurSelection();\n return true\n }\n};\n\nDOMObserver.prototype.flush = function flush () {\n if (!this.view.docView || this.flushingSoon > -1) { return }\n var mutations = this.observer ? this.observer.takeRecords() : [];\n if (this.queue.length) {\n mutations = this.queue.concat(mutations);\n this.queue.length = 0;\n }\n\n var sel = this.view.root.getSelection();\n var newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasSelection(this.view) && !this.ignoreSelectionChange(sel);\n\n var from = -1, to = -1, typeOver = false, added = [];\n if (this.view.editable) {\n for (var i = 0; i < mutations.length; i++) {\n var result$1 = this.registerMutation(mutations[i], added);\n if (result$1) {\n from = from < 0 ? result$1.from : Math.min(result$1.from, from);\n to = to < 0 ? result$1.to : Math.max(result$1.to, to);\n if (result$1.typeOver) { typeOver = true; }\n }\n }\n }\n\n if (result.gecko && added.length > 1) {\n var brs = added.filter(function (n) { return n.nodeName == \"BR\"; });\n if (brs.length == 2) {\n var a = brs[0];\n var b = brs[1];\n if (a.parentNode && a.parentNode.parentNode == b.parentNode) { b.remove(); }\n else { a.remove(); }\n }\n }\n\n if (from > -1 || newSel) {\n if (from > -1) {\n this.view.docView.markDirty(from, to);\n checkCSS(this.view);\n }\n this.handleDOMChange(from, to, typeOver, added);\n if (this.view.docView.dirty) { this.view.updateState(this.view.state); }\n else if (!this.currentSelection.eq(sel)) { selectionToDOM(this.view); }\n this.currentSelection.set(sel);\n }\n};\n\nDOMObserver.prototype.registerMutation = function registerMutation (mut, added) {\n // Ignore mutations inside nodes that were already noted as inserted\n if (added.indexOf(mut.target) > -1) { return null }\n var desc = this.view.docView.nearestDesc(mut.target);\n if (mut.type == \"attributes\" &&\n (desc == this.view.docView || mut.attributeName == \"contenteditable\" ||\n // Firefox sometimes fires spurious events for null/empty styles\n (mut.attributeName == \"style\" && !mut.oldValue && !mut.target.getAttribute(\"style\"))))\n { return null }\n if (!desc || desc.ignoreMutation(mut)) { return null }\n\n if (mut.type == \"childList\") {\n for (var i = 0; i < mut.addedNodes.length; i++) { added.push(mut.addedNodes[i]); }\n if (desc.contentDOM && desc.contentDOM != desc.dom && !desc.contentDOM.contains(mut.target))\n { return {from: desc.posBefore, to: desc.posAfter} }\n var prev = mut.previousSibling, next = mut.nextSibling;\n if (result.ie && result.ie_version <= 11 && mut.addedNodes.length) {\n // IE11 gives us incorrect next/prev siblings for some\n // insertions, so if there are added nodes, recompute those\n for (var i$1 = 0; i$1 < mut.addedNodes.length; i$1++) {\n var ref = mut.addedNodes[i$1];\n var previousSibling = ref.previousSibling;\n var nextSibling = ref.nextSibling;\n if (!previousSibling || Array.prototype.indexOf.call(mut.addedNodes, previousSibling) < 0) { prev = previousSibling; }\n if (!nextSibling || Array.prototype.indexOf.call(mut.addedNodes, nextSibling) < 0) { next = nextSibling; }\n }\n }\n var fromOffset = prev && prev.parentNode == mut.target\n ? domIndex(prev) + 1 : 0;\n var from = desc.localPosFromDOM(mut.target, fromOffset, -1);\n var toOffset = next && next.parentNode == mut.target\n ? domIndex(next) : mut.target.childNodes.length;\n var to = desc.localPosFromDOM(mut.target, toOffset, 1);\n return {from: from, to: to}\n } else if (mut.type == \"attributes\") {\n return {from: desc.posAtStart - desc.border, to: desc.posAtEnd + desc.border}\n } else { // \"characterData\"\n return {\n from: desc.posAtStart,\n to: desc.posAtEnd,\n // An event was generated for a text change that didn't change\n // any text. Mark the dom change to fall back to assuming the\n // selection was typed over with an identical value if it can't\n // find another change.\n typeOver: mut.target.nodeValue == mut.oldValue\n }\n }\n};\n\nvar cssChecked = false;\n\nfunction checkCSS(view) {\n if (cssChecked) { return }\n cssChecked = true;\n if (getComputedStyle(view.dom).whiteSpace == \"normal\")\n { console[\"warn\"](\"ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.\"); }\n}\n\n// A collection of DOM events that occur within the editor, and callback functions\n// to invoke when the event fires.\nvar handlers = {}, editHandlers = {};\n\nfunction initInput(view) {\n view.shiftKey = false;\n view.mouseDown = null;\n view.lastKeyCode = null;\n view.lastKeyCodeTime = 0;\n view.lastClick = {time: 0, x: 0, y: 0, type: \"\"};\n view.lastSelectionOrigin = null;\n view.lastSelectionTime = 0;\n\n view.lastIOSEnter = 0;\n view.lastIOSEnterFallbackTimeout = null;\n view.lastAndroidDelete = 0;\n\n view.composing = false;\n view.composingTimeout = null;\n view.compositionNodes = [];\n view.compositionEndedAt = -2e8;\n\n view.domObserver = new DOMObserver(view, function (from, to, typeOver, added) { return readDOMChange(view, from, to, typeOver, added); });\n view.domObserver.start();\n // Used by hacks like the beforeinput handler to check whether anything happened in the DOM\n view.domChangeCount = 0;\n\n view.eventHandlers = Object.create(null);\n var loop = function ( event ) {\n var handler = handlers[event];\n view.dom.addEventListener(event, view.eventHandlers[event] = function (event) {\n if (eventBelongsToView(view, event) && !runCustomHandler(view, event) &&\n (view.editable || !(event.type in editHandlers)))\n { handler(view, event); }\n });\n };\n\n for (var event in handlers) loop( event );\n // On Safari, for reasons beyond my understanding, adding an input\n // event handler makes an issue where the composition vanishes when\n // you press enter go away.\n if (result.safari) { view.dom.addEventListener(\"input\", function () { return null; }); }\n\n ensureListeners(view);\n}\n\nfunction setSelectionOrigin(view, origin) {\n view.lastSelectionOrigin = origin;\n view.lastSelectionTime = Date.now();\n}\n\nfunction destroyInput(view) {\n view.domObserver.stop();\n for (var type in view.eventHandlers)\n { view.dom.removeEventListener(type, view.eventHandlers[type]); }\n clearTimeout(view.composingTimeout);\n clearTimeout(view.lastIOSEnterFallbackTimeout);\n}\n\nfunction ensureListeners(view) {\n view.someProp(\"handleDOMEvents\", function (currentHandlers) {\n for (var type in currentHandlers) { if (!view.eventHandlers[type])\n { view.dom.addEventListener(type, view.eventHandlers[type] = function (event) { return runCustomHandler(view, event); }); } }\n });\n}\n\nfunction runCustomHandler(view, event) {\n return view.someProp(\"handleDOMEvents\", function (handlers) {\n var handler = handlers[event.type];\n return handler ? handler(view, event) || event.defaultPrevented : false\n })\n}\n\nfunction eventBelongsToView(view, event) {\n if (!event.bubbles) { return true }\n if (event.defaultPrevented) { return false }\n for (var node = event.target; node != view.dom; node = node.parentNode)\n { if (!node || node.nodeType == 11 ||\n (node.pmViewDesc && node.pmViewDesc.stopEvent(event)))\n { return false } }\n return true\n}\n\nfunction dispatchEvent(view, event) {\n if (!runCustomHandler(view, event) && handlers[event.type] &&\n (view.editable || !(event.type in editHandlers)))\n { handlers[event.type](view, event); }\n}\n\neditHandlers.keydown = function (view, event) {\n view.shiftKey = event.keyCode == 16 || event.shiftKey;\n if (inOrNearComposition(view, event)) { return }\n view.domObserver.forceFlush();\n view.lastKeyCode = event.keyCode;\n view.lastKeyCodeTime = Date.now();\n // On iOS, if we preventDefault enter key presses, the virtual\n // keyboard gets confused. So the hack here is to set a flag that\n // makes the DOM change code recognize that what just happens should\n // be replaced by whatever the Enter key handlers do.\n if (result.ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {\n var now = Date.now();\n view.lastIOSEnter = now;\n view.lastIOSEnterFallbackTimeout = setTimeout(function () {\n if (view.lastIOSEnter == now) {\n view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(13, \"Enter\")); });\n view.lastIOSEnter = 0;\n }\n }, 200);\n } else if (view.someProp(\"handleKeyDown\", function (f) { return f(view, event); }) || captureKeyDown(view, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"key\");\n }\n};\n\neditHandlers.keyup = function (view, e) {\n if (e.keyCode == 16) { view.shiftKey = false; }\n};\n\neditHandlers.keypress = function (view, event) {\n if (inOrNearComposition(view, event) || !event.charCode ||\n event.ctrlKey && !event.altKey || result.mac && event.metaKey) { return }\n\n if (view.someProp(\"handleKeyPress\", function (f) { return f(view, event); })) {\n event.preventDefault();\n return\n }\n\n var sel = view.state.selection;\n if (!(sel instanceof TextSelection) || !sel.$from.sameParent(sel.$to)) {\n var text = String.fromCharCode(event.charCode);\n if (!view.someProp(\"handleTextInput\", function (f) { return f(view, sel.$from.pos, sel.$to.pos, text); }))\n { view.dispatch(view.state.tr.insertText(text).scrollIntoView()); }\n event.preventDefault();\n }\n};\n\nfunction eventCoords(event) { return {left: event.clientX, top: event.clientY} }\n\nfunction isNear(event, click) {\n var dx = click.x - event.clientX, dy = click.y - event.clientY;\n return dx * dx + dy * dy < 100\n}\n\nfunction runHandlerOnContext(view, propName, pos, inside, event) {\n if (inside == -1) { return false }\n var $pos = view.state.doc.resolve(inside);\n var loop = function ( i ) {\n if (view.someProp(propName, function (f) { return i > $pos.depth ? f(view, pos, $pos.nodeAfter, $pos.before(i), event, true)\n : f(view, pos, $pos.node(i), $pos.before(i), event, false); }))\n { return { v: true } }\n };\n\n for (var i = $pos.depth + 1; i > 0; i--) {\n var returned = loop( i );\n\n if ( returned ) return returned.v;\n }\n return false\n}\n\nfunction updateSelection(view, selection, origin) {\n if (!view.focused) { view.focus(); }\n var tr = view.state.tr.setSelection(selection);\n if (origin == \"pointer\") { tr.setMeta(\"pointer\", true); }\n view.dispatch(tr);\n}\n\nfunction selectClickedLeaf(view, inside) {\n if (inside == -1) { return false }\n var $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;\n if (node && node.isAtom && NodeSelection.isSelectable(node)) {\n updateSelection(view, new NodeSelection($pos), \"pointer\");\n return true\n }\n return false\n}\n\nfunction selectClickedNode(view, inside) {\n if (inside == -1) { return false }\n var sel = view.state.selection, selectedNode, selectAt;\n if (sel instanceof NodeSelection) { selectedNode = sel.node; }\n\n var $pos = view.state.doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n if (NodeSelection.isSelectable(node)) {\n if (selectedNode && sel.$from.depth > 0 &&\n i >= sel.$from.depth && $pos.before(sel.$from.depth + 1) == sel.$from.pos)\n { selectAt = $pos.before(sel.$from.depth); }\n else\n { selectAt = $pos.before(i); }\n break\n }\n }\n\n if (selectAt != null) {\n updateSelection(view, NodeSelection.create(view.state.doc, selectAt), \"pointer\");\n return true\n } else {\n return false\n }\n}\n\nfunction handleSingleClick(view, pos, inside, event, selectNode) {\n return runHandlerOnContext(view, \"handleClickOn\", pos, inside, event) ||\n view.someProp(\"handleClick\", function (f) { return f(view, pos, event); }) ||\n (selectNode ? selectClickedNode(view, inside) : selectClickedLeaf(view, inside))\n}\n\nfunction handleDoubleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleDoubleClickOn\", pos, inside, event) ||\n view.someProp(\"handleDoubleClick\", function (f) { return f(view, pos, event); })\n}\n\nfunction handleTripleClick(view, pos, inside, event) {\n return runHandlerOnContext(view, \"handleTripleClickOn\", pos, inside, event) ||\n view.someProp(\"handleTripleClick\", function (f) { return f(view, pos, event); }) ||\n defaultTripleClick(view, inside)\n}\n\nfunction defaultTripleClick(view, inside) {\n var doc = view.state.doc;\n if (inside == -1) {\n if (doc.inlineContent) {\n updateSelection(view, TextSelection.create(doc, 0, doc.content.size), \"pointer\");\n return true\n }\n return false\n }\n\n var $pos = doc.resolve(inside);\n for (var i = $pos.depth + 1; i > 0; i--) {\n var node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);\n var nodePos = $pos.before(i);\n if (node.inlineContent)\n { updateSelection(view, TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size), \"pointer\"); }\n else if (NodeSelection.isSelectable(node))\n { updateSelection(view, NodeSelection.create(doc, nodePos), \"pointer\"); }\n else\n { continue }\n return true\n }\n}\n\nfunction forceDOMFlush(view) {\n return endComposition(view)\n}\n\nvar selectNodeModifier = result.mac ? \"metaKey\" : \"ctrlKey\";\n\nhandlers.mousedown = function (view, event) {\n view.shiftKey = event.shiftKey;\n var flushed = forceDOMFlush(view);\n var now = Date.now(), type = \"singleClick\";\n if (now - view.lastClick.time < 500 && isNear(event, view.lastClick) && !event[selectNodeModifier]) {\n if (view.lastClick.type == \"singleClick\") { type = \"doubleClick\"; }\n else if (view.lastClick.type == \"doubleClick\") { type = \"tripleClick\"; }\n }\n view.lastClick = {time: now, x: event.clientX, y: event.clientY, type: type};\n\n var pos = view.posAtCoords(eventCoords(event));\n if (!pos) { return }\n\n if (type == \"singleClick\") {\n if (view.mouseDown) { view.mouseDown.done(); }\n view.mouseDown = new MouseDown(view, pos, event, flushed);\n } else if ((type == \"doubleClick\" ? handleDoubleClick : handleTripleClick)(view, pos.pos, pos.inside, event)) {\n event.preventDefault();\n } else {\n setSelectionOrigin(view, \"pointer\");\n }\n};\n\nvar MouseDown = function MouseDown(view, pos, event, flushed) {\n var this$1 = this;\n\n this.view = view;\n this.startDoc = view.state.doc;\n this.pos = pos;\n this.event = event;\n this.flushed = flushed;\n this.selectNode = event[selectNodeModifier];\n this.allowDefault = event.shiftKey;\n\n var targetNode, targetPos;\n if (pos.inside > -1) {\n targetNode = view.state.doc.nodeAt(pos.inside);\n targetPos = pos.inside;\n } else {\n var $pos = view.state.doc.resolve(pos.pos);\n targetNode = $pos.parent;\n targetPos = $pos.depth ? $pos.before() : 0;\n }\n\n this.mightDrag = null;\n\n var target = flushed ? null : event.target;\n var targetDesc = target ? view.docView.nearestDesc(target, true) : null;\n this.target = targetDesc ? targetDesc.dom : null;\n\n if (targetNode.type.spec.draggable && targetNode.type.spec.selectable !== false ||\n view.state.selection instanceof NodeSelection && targetPos == view.state.selection.from)\n { this.mightDrag = {node: targetNode,\n pos: targetPos,\n addAttr: this.target && !this.target.draggable,\n setUneditable: this.target && result.gecko && !this.target.hasAttribute(\"contentEditable\")}; }\n\n if (this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable)) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) { this.target.draggable = true; }\n if (this.mightDrag.setUneditable)\n { setTimeout(function () {\n if (this$1.view.mouseDown == this$1) { this$1.target.setAttribute(\"contentEditable\", \"false\"); }\n }, 20); }\n this.view.domObserver.start();\n }\n\n view.root.addEventListener(\"mouseup\", this.up = this.up.bind(this));\n view.root.addEventListener(\"mousemove\", this.move = this.move.bind(this));\n setSelectionOrigin(view, \"pointer\");\n};\n\nMouseDown.prototype.done = function done () {\n this.view.root.removeEventListener(\"mouseup\", this.up);\n this.view.root.removeEventListener(\"mousemove\", this.move);\n if (this.mightDrag && this.target) {\n this.view.domObserver.stop();\n if (this.mightDrag.addAttr) { this.target.removeAttribute(\"draggable\"); }\n if (this.mightDrag.setUneditable) { this.target.removeAttribute(\"contentEditable\"); }\n this.view.domObserver.start();\n }\n this.view.mouseDown = null;\n};\n\nMouseDown.prototype.up = function up (event) {\n this.done();\n\n if (!this.view.dom.contains(event.target.nodeType == 3 ? event.target.parentNode : event.target))\n { return }\n\n var pos = this.pos;\n if (this.view.state.doc != this.startDoc) { pos = this.view.posAtCoords(eventCoords(event)); }\n\n if (this.allowDefault || !pos) {\n setSelectionOrigin(this.view, \"pointer\");\n } else if (handleSingleClick(this.view, pos.pos, pos.inside, event, this.selectNode)) {\n event.preventDefault();\n } else if (this.flushed ||\n // Safari ignores clicks on draggable elements\n (result.safari && this.mightDrag && !this.mightDrag.node.isAtom) ||\n // Chrome will sometimes treat a node selection as a\n // cursor, but still report that the node is selected\n // when asked through getSelection. You'll then get a\n // situation where clicking at the point where that\n // (hidden) cursor is doesn't change the selection, and\n // thus doesn't get a reaction from ProseMirror. This\n // works around that.\n (result.chrome && !(this.view.state.selection instanceof TextSelection) &&\n (pos.pos == this.view.state.selection.from || pos.pos == this.view.state.selection.to))) {\n updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)), \"pointer\");\n event.preventDefault();\n } else {\n setSelectionOrigin(this.view, \"pointer\");\n }\n};\n\nMouseDown.prototype.move = function move (event) {\n if (!this.allowDefault && (Math.abs(this.event.x - event.clientX) > 4 ||\n Math.abs(this.event.y - event.clientY) > 4))\n { this.allowDefault = true; }\n setSelectionOrigin(this.view, \"pointer\");\n if (event.buttons == 0) { this.done(); }\n};\n\nhandlers.touchdown = function (view) {\n forceDOMFlush(view);\n setSelectionOrigin(view, \"pointer\");\n};\n\nhandlers.contextmenu = function (view) { return forceDOMFlush(view); };\n\nfunction inOrNearComposition(view, event) {\n if (view.composing) { return true }\n // See https://www.stum.de/2016/06/24/handling-ime-events-in-javascript/.\n // On Japanese input method editors (IMEs), the Enter key is used to confirm character\n // selection. On Safari, when Enter is pressed, compositionend and keydown events are\n // emitted. The keydown event triggers newline insertion, which we don't want.\n // This method returns true if the keydown event should be ignored.\n // We only ignore it once, as pressing Enter a second time *should* insert a newline.\n // Furthermore, the keydown event timestamp must be close to the compositionEndedAt timestamp.\n // This guards against the case where compositionend is triggered without the keyboard\n // (e.g. character confirmation may be done with the mouse), and keydown is triggered\n // afterwards- we wouldn't want to ignore the keydown event in this case.\n if (result.safari && Math.abs(event.timeStamp - view.compositionEndedAt) < 500) {\n view.compositionEndedAt = -2e8;\n return true\n }\n return false\n}\n\n// Drop active composition after 5 seconds of inactivity on Android\nvar timeoutComposition = result.android ? 5000 : -1;\n\neditHandlers.compositionstart = editHandlers.compositionupdate = function (view) {\n if (!view.composing) {\n view.domObserver.flush();\n var state = view.state;\n var $pos = state.selection.$from;\n if (state.selection.empty &&\n (state.storedMarks ||\n (!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(function (m) { return m.type.spec.inclusive === false; })))) {\n // Need to wrap the cursor in mark nodes different from the ones in the DOM context\n view.markCursor = view.state.storedMarks || $pos.marks();\n endComposition(view, true);\n view.markCursor = null;\n } else {\n endComposition(view);\n // In firefox, if the cursor is after but outside a marked node,\n // the inserted text won't inherit the marks. So this moves it\n // inside if necessary.\n if (result.gecko && state.selection.empty && $pos.parentOffset && !$pos.textOffset && $pos.nodeBefore.marks.length) {\n var sel = view.root.getSelection();\n for (var node = sel.focusNode, offset = sel.focusOffset; node && node.nodeType == 1 && offset != 0;) {\n var before = offset < 0 ? node.lastChild : node.childNodes[offset - 1];\n if (!before) { break }\n if (before.nodeType == 3) {\n sel.collapse(before, before.nodeValue.length);\n break\n } else {\n node = before;\n offset = -1;\n }\n }\n }\n }\n view.composing = true;\n }\n scheduleComposeEnd(view, timeoutComposition);\n};\n\neditHandlers.compositionend = function (view, event) {\n if (view.composing) {\n view.composing = false;\n view.compositionEndedAt = event.timeStamp;\n scheduleComposeEnd(view, 20);\n }\n};\n\nfunction scheduleComposeEnd(view, delay) {\n clearTimeout(view.composingTimeout);\n if (delay > -1) { view.composingTimeout = setTimeout(function () { return endComposition(view); }, delay); }\n}\n\nfunction clearComposition(view) {\n view.composing = false;\n while (view.compositionNodes.length > 0) { view.compositionNodes.pop().markParentsDirty(); }\n}\n\nfunction endComposition(view, forceUpdate) {\n view.domObserver.forceFlush();\n clearComposition(view);\n if (forceUpdate || view.docView.dirty) {\n var sel = selectionFromDOM(view);\n if (sel && !sel.eq(view.state.selection)) { view.dispatch(view.state.tr.setSelection(sel)); }\n else { view.updateState(view.state); }\n return true\n }\n return false\n}\n\nfunction captureCopy(view, dom) {\n // The extra wrapper is somehow necessary on IE/Edge to prevent the\n // content from being mangled when it is put onto the clipboard\n if (!view.dom.parentNode) { return }\n var wrap = view.dom.parentNode.appendChild(document.createElement(\"div\"));\n wrap.appendChild(dom);\n wrap.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n var sel = getSelection(), range = document.createRange();\n range.selectNodeContents(dom);\n // Done because IE will fire a selectionchange moving the selection\n // to its start when removeAllRanges is called and the editor still\n // has focus (which will mess up the editor's selection state).\n view.dom.blur();\n sel.removeAllRanges();\n sel.addRange(range);\n setTimeout(function () {\n if (wrap.parentNode) { wrap.parentNode.removeChild(wrap); }\n view.focus();\n }, 50);\n}\n\n// This is very crude, but unfortunately both these browsers _pretend_\n// that they have a clipboard API—all the objects and methods are\n// there, they just don't work, and they are hard to test.\nvar brokenClipboardAPI = (result.ie && result.ie_version < 15) ||\n (result.ios && result.webkit_version < 604);\n\nhandlers.copy = editHandlers.cut = function (view, e) {\n var sel = view.state.selection, cut = e.type == \"cut\";\n if (sel.empty) { return }\n\n // IE and Edge's clipboard interface is completely broken\n var data = brokenClipboardAPI ? null : e.clipboardData;\n var slice = sel.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n if (data) {\n e.preventDefault();\n data.clearData();\n data.setData(\"text/html\", dom.innerHTML);\n data.setData(\"text/plain\", text);\n } else {\n captureCopy(view, dom);\n }\n if (cut) { view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta(\"uiEvent\", \"cut\")); }\n};\n\nfunction sliceSingleNode(slice) {\n return slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1 ? slice.content.firstChild : null\n}\n\nfunction capturePaste(view, e) {\n if (!view.dom.parentNode) { return }\n var plainText = view.shiftKey || view.state.selection.$from.parent.type.spec.code;\n var target = view.dom.parentNode.appendChild(document.createElement(plainText ? \"textarea\" : \"div\"));\n if (!plainText) { target.contentEditable = \"true\"; }\n target.style.cssText = \"position: fixed; left: -10000px; top: 10px\";\n target.focus();\n setTimeout(function () {\n view.focus();\n if (target.parentNode) { target.parentNode.removeChild(target); }\n if (plainText) { doPaste(view, target.value, null, e); }\n else { doPaste(view, target.textContent, target.innerHTML, e); }\n }, 50);\n}\n\nfunction doPaste(view, text, html, e) {\n var slice = parseFromClipboard(view, text, html, view.shiftKey, view.state.selection.$from);\n if (view.someProp(\"handlePaste\", function (f) { return f(view, e, slice || Slice.empty); })) { return true }\n if (!slice) { return false }\n\n var singleNode = sliceSingleNode(slice);\n var tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.shiftKey) : view.state.tr.replaceSelection(slice);\n view.dispatch(tr.scrollIntoView().setMeta(\"paste\", true).setMeta(\"uiEvent\", \"paste\"));\n return true\n}\n\neditHandlers.paste = function (view, e) {\n var data = brokenClipboardAPI ? null : e.clipboardData;\n if (data && doPaste(view, data.getData(\"text/plain\"), data.getData(\"text/html\"), e)) { e.preventDefault(); }\n else { capturePaste(view, e); }\n};\n\nvar Dragging = function Dragging(slice, move) {\n this.slice = slice;\n this.move = move;\n};\n\nvar dragCopyModifier = result.mac ? \"altKey\" : \"ctrlKey\";\n\nhandlers.dragstart = function (view, e) {\n var mouseDown = view.mouseDown;\n if (mouseDown) { mouseDown.done(); }\n if (!e.dataTransfer) { return }\n\n var sel = view.state.selection;\n var pos = sel.empty ? null : view.posAtCoords(eventCoords(e));\n if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1: sel.to)) ; else if (mouseDown && mouseDown.mightDrag) {\n view.dispatch(view.state.tr.setSelection(NodeSelection.create(view.state.doc, mouseDown.mightDrag.pos)));\n } else if (e.target && e.target.nodeType == 1) {\n var desc = view.docView.nearestDesc(e.target, true);\n if (!desc || !desc.node.type.spec.draggable || desc == view.docView) { return }\n view.dispatch(view.state.tr.setSelection(NodeSelection.create(view.state.doc, desc.posBefore)));\n }\n var slice = view.state.selection.content();\n var ref = serializeForClipboard(view, slice);\n var dom = ref.dom;\n var text = ref.text;\n e.dataTransfer.clearData();\n e.dataTransfer.setData(brokenClipboardAPI ? \"Text\" : \"text/html\", dom.innerHTML);\n // See https://github.com/ProseMirror/prosemirror/issues/1156\n e.dataTransfer.effectAllowed = \"copyMove\";\n if (!brokenClipboardAPI) { e.dataTransfer.setData(\"text/plain\", text); }\n view.dragging = new Dragging(slice, !e[dragCopyModifier]);\n};\n\nhandlers.dragend = function (view) {\n var dragging = view.dragging;\n window.setTimeout(function () {\n if (view.dragging == dragging) { view.dragging = null; }\n }, 50);\n};\n\neditHandlers.dragover = editHandlers.dragenter = function (_, e) { return e.preventDefault(); };\n\neditHandlers.drop = function (view, e) {\n var dragging = view.dragging;\n view.dragging = null;\n\n if (!e.dataTransfer) { return }\n\n var eventPos = view.posAtCoords(eventCoords(e));\n if (!eventPos) { return }\n var $mouse = view.state.doc.resolve(eventPos.pos);\n if (!$mouse) { return }\n var slice = dragging && dragging.slice ||\n parseFromClipboard(view, e.dataTransfer.getData(brokenClipboardAPI ? \"Text\" : \"text/plain\"),\n brokenClipboardAPI ? null : e.dataTransfer.getData(\"text/html\"), false, $mouse);\n var move = dragging && !e[dragCopyModifier];\n if (view.someProp(\"handleDrop\", function (f) { return f(view, e, slice || Slice.empty, move); })) {\n e.preventDefault();\n return\n }\n if (!slice) { return }\n\n e.preventDefault();\n var insertPos = slice ? dropPoint(view.state.doc, $mouse.pos, slice) : $mouse.pos;\n if (insertPos == null) { insertPos = $mouse.pos; }\n\n var tr = view.state.tr;\n if (move) { tr.deleteSelection(); }\n\n var pos = tr.mapping.map(insertPos);\n var isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1;\n var beforeInsert = tr.doc;\n if (isNode)\n { tr.replaceRangeWith(pos, pos, slice.content.firstChild); }\n else\n { tr.replaceRange(pos, pos, slice); }\n if (tr.doc.eq(beforeInsert)) { return }\n\n var $pos = tr.doc.resolve(pos);\n if (isNode && NodeSelection.isSelectable(slice.content.firstChild) &&\n $pos.nodeAfter && $pos.nodeAfter.sameMarkup(slice.content.firstChild)) {\n tr.setSelection(new NodeSelection($pos));\n } else {\n var end = tr.mapping.map(insertPos);\n tr.mapping.maps[tr.mapping.maps.length - 1].forEach(function (_from, _to, _newFrom, newTo) { return end = newTo; });\n tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));\n }\n view.focus();\n view.dispatch(tr.setMeta(\"uiEvent\", \"drop\"));\n};\n\nhandlers.focus = function (view) {\n if (!view.focused) {\n view.domObserver.stop();\n view.dom.classList.add(\"ProseMirror-focused\");\n view.domObserver.start();\n view.focused = true;\n setTimeout(function () {\n if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.root.getSelection()))\n { selectionToDOM(view); }\n }, 20);\n }\n};\n\nhandlers.blur = function (view) {\n if (view.focused) {\n view.domObserver.stop();\n view.dom.classList.remove(\"ProseMirror-focused\");\n view.domObserver.start();\n view.domObserver.currentSelection.set({});\n view.focused = false;\n }\n};\n\nhandlers.beforeinput = function (view, event) {\n // We should probably do more with beforeinput events, but support\n // is so spotty that I'm still waiting to see where they are going.\n\n // Very specific hack to deal with backspace sometimes failing on\n // Chrome Android when after an uneditable node.\n if (result.chrome && result.android && event.inputType == \"deleteContentBackward\") {\n var domChangeCount = view.domChangeCount;\n setTimeout(function () {\n if (view.domChangeCount != domChangeCount) { return } // Event already had some effect\n // This bug tends to close the virtual keyboard, so we refocus\n view.dom.blur();\n view.focus();\n if (view.someProp(\"handleKeyDown\", function (f) { return f(view, keyEvent(8, \"Backspace\")); })) { return }\n var ref = view.state.selection;\n var $cursor = ref.$cursor;\n // Crude approximation of backspace behavior when no command handled it\n if ($cursor && $cursor.pos > 0) { view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView()); }\n }, 50);\n }\n};\n\n// Make sure all handlers get registered\nfor (var prop in editHandlers) { handlers[prop] = editHandlers[prop]; }\n\nfunction compareObjs(a, b) {\n if (a == b) { return true }\n for (var p in a) { if (a[p] !== b[p]) { return false } }\n for (var p$1 in b) { if (!(p$1 in a)) { return false } }\n return true\n}\n\nvar WidgetType = function WidgetType(toDOM, spec) {\n this.spec = spec || noSpec;\n this.side = this.spec.side || 0;\n this.toDOM = toDOM;\n};\n\nWidgetType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var ref = mapping.mapResult(span.from + oldOffset, this.side < 0 ? -1 : 1);\n var pos = ref.pos;\n var deleted = ref.deleted;\n return deleted ? null : new Decoration(pos - offset, pos - offset, this)\n};\n\nWidgetType.prototype.valid = function valid () { return true };\n\nWidgetType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof WidgetType &&\n (this.spec.key && this.spec.key == other.spec.key ||\n this.toDOM == other.toDOM && compareObjs(this.spec, other.spec)))\n};\n\nvar InlineType = function InlineType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nInlineType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var from = mapping.map(span.from + oldOffset, this.spec.inclusiveStart ? -1 : 1) - offset;\n var to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset;\n return from >= to ? null : new Decoration(from, to, this)\n};\n\nInlineType.prototype.valid = function valid (_, span) { return span.from < span.to };\n\nInlineType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof InlineType && compareObjs(this.attrs, other.attrs) &&\n compareObjs(this.spec, other.spec))\n};\n\nInlineType.is = function is (span) { return span.type instanceof InlineType };\n\nvar NodeType = function NodeType(attrs, spec) {\n this.spec = spec || noSpec;\n this.attrs = attrs;\n};\n\nNodeType.prototype.map = function map (mapping, span, offset, oldOffset) {\n var from = mapping.mapResult(span.from + oldOffset, 1);\n if (from.deleted) { return null }\n var to = mapping.mapResult(span.to + oldOffset, -1);\n if (to.deleted || to.pos <= from.pos) { return null }\n return new Decoration(from.pos - offset, to.pos - offset, this)\n};\n\nNodeType.prototype.valid = function valid (node, span) {\n var ref = node.content.findIndex(span.from);\n var index = ref.index;\n var offset = ref.offset;\n return offset == span.from && offset + node.child(index).nodeSize == span.to\n};\n\nNodeType.prototype.eq = function eq (other) {\n return this == other ||\n (other instanceof NodeType && compareObjs(this.attrs, other.attrs) &&\n compareObjs(this.spec, other.spec))\n};\n\n// ::- Decoration objects can be provided to the view through the\n// [`decorations` prop](#view.EditorProps.decorations). They come in\n// several variants—see the static members of this class for details.\nvar Decoration = function Decoration(from, to, type) {\n // :: number\n // The start position of the decoration.\n this.from = from;\n // :: number\n // The end position. Will be the same as `from` for [widget\n // decorations](#view.Decoration^widget).\n this.to = to;\n this.type = type;\n};\n\nvar prototypeAccessors$1 = { spec: { configurable: true },inline: { configurable: true } };\n\nDecoration.prototype.copy = function copy (from, to) {\n return new Decoration(from, to, this.type)\n};\n\nDecoration.prototype.eq = function eq (other, offset) {\n if ( offset === void 0 ) offset = 0;\n\n return this.type.eq(other.type) && this.from + offset == other.from && this.to + offset == other.to\n};\n\nDecoration.prototype.map = function map (mapping, offset, oldOffset) {\n return this.type.map(mapping, this, offset, oldOffset)\n};\n\n// :: (number, union<(view: EditorView, getPos: () → number) → dom.Node, dom.Node>, ?Object) → Decoration\n// Creates a widget decoration, which is a DOM node that's shown in\n// the document at the given position. It is recommended that you\n// delay rendering the widget by passing a function that will be\n// called when the widget is actually drawn in a view, but you can\n// also directly pass a DOM node. `getPos` can be used to find the\n// widget's current document position.\n//\n// spec::- These options are supported:\n//\n// side:: ?number\n// Controls which side of the document position this widget is\n// associated with. When negative, it is drawn before a cursor\n// at its position, and content inserted at that position ends\n// up after the widget. When zero (the default) or positive, the\n// widget is drawn after the cursor and content inserted there\n// ends up before the widget.\n//\n// When there are multiple widgets at a given position, their\n// `side` values determine the order in which they appear. Those\n// with lower values appear first. The ordering of widgets with\n// the same `side` value is unspecified.\n//\n// When `marks` is null, `side` also determines the marks that\n// the widget is wrapped in—those of the node before when\n// negative, those of the node after when positive.\n//\n// marks:: ?[Mark]\n// The precise set of marks to draw around the widget.\n//\n// stopEvent:: ?(event: dom.Event) → bool\n// Can be used to control which DOM events, when they bubble out\n// of this widget, the editor view should ignore.\n//\n// ignoreSelection:: ?bool\n// When set (defaults to false), selection changes inside the\n// widget are ignored, and don't cause ProseMirror to try and\n// re-sync the selection with its selection state.\n//\n// key:: ?string\n// When comparing decorations of this type (in order to decide\n// whether it needs to be redrawn), ProseMirror will by default\n// compare the widget DOM node by identity. If you pass a key,\n// that key will be compared instead, which can be useful when\n// you generate decorations on the fly and don't want to store\n// and reuse DOM nodes. Make sure that any widgets with the same\n// key are interchangeable—if widgets differ in, for example,\n// the behavior of some event handler, they should get\n// different keys.\nDecoration.widget = function widget (pos, toDOM, spec) {\n return new Decoration(pos, pos, new WidgetType(toDOM, spec))\n};\n\n// :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates an inline decoration, which adds the given attributes to\n// each inline node between `from` and `to`.\n//\n// spec::- These options are recognized:\n//\n// inclusiveStart:: ?bool\n// Determines how the left side of the decoration is\n// [mapped](#transform.Position_Mapping) when content is\n// inserted directly at that position. By default, the decoration\n// won't include the new content, but you can set this to `true`\n// to make it inclusive.\n//\n// inclusiveEnd:: ?bool\n// Determines how the right side of the decoration is mapped.\n// See\n// [`inclusiveStart`](#view.Decoration^inline^spec.inclusiveStart).\nDecoration.inline = function inline (from, to, attrs, spec) {\n return new Decoration(from, to, new InlineType(attrs, spec))\n};\n\n// :: (number, number, DecorationAttrs, ?Object) → Decoration\n// Creates a node decoration. `from` and `to` should point precisely\n// before and after a node in the document. That node, and only that\n// node, will receive the given attributes.\n//\n// spec::-\n//\n// Optional information to store with the decoration. It\n// is also used when comparing decorators for equality.\nDecoration.node = function node (from, to, attrs, spec) {\n return new Decoration(from, to, new NodeType(attrs, spec))\n};\n\n// :: Object\n// The spec provided when creating this decoration. Can be useful\n// if you've stored extra information in that object.\nprototypeAccessors$1.spec.get = function () { return this.type.spec };\n\nprototypeAccessors$1.inline.get = function () { return this.type instanceof InlineType };\n\nObject.defineProperties( Decoration.prototype, prototypeAccessors$1 );\n\n// DecorationAttrs:: interface\n// A set of attributes to add to a decorated node. Most properties\n// simply directly correspond to DOM attributes of the same name,\n// which will be set to the property's value. These are exceptions:\n//\n// class:: ?string\n// A CSS class name or a space-separated set of class names to be\n// _added_ to the classes that the node already had.\n//\n// style:: ?string\n// A string of CSS to be _added_ to the node's existing `style` property.\n//\n// nodeName:: ?string\n// When non-null, the target node is wrapped in a DOM element of\n// this type (and the other attributes are applied to this element).\n\nvar none = [], noSpec = {};\n\n// :: class extends DecorationSource\n// A collection of [decorations](#view.Decoration), organized in\n// such a way that the drawing algorithm can efficiently use and\n// compare them. This is a persistent data structure—it is not\n// modified, updates create a new value.\nvar DecorationSet = function DecorationSet(local, children) {\n this.local = local && local.length ? local : none;\n this.children = children && children.length ? children : none;\n};\n\n// :: (Node, [Decoration]) → DecorationSet\n// Create a set of decorations, using the structure of the given\n// document.\nDecorationSet.create = function create (doc, decorations) {\n return decorations.length ? buildTree(decorations, doc, 0, noSpec) : empty\n};\n\n// :: (?number, ?number, ?(spec: Object) → bool) → [Decoration]\n// Find all decorations in this set which touch the given range\n// (including decorations that start or end directly at the\n// boundaries) and match the given predicate on their spec. When\n// `start` and `end` are omitted, all decorations in the set are\n// considered. When `predicate` isn't given, all decorations are\n// assumed to match.\nDecorationSet.prototype.find = function find (start, end, predicate) {\n var result = [];\n this.findInner(start == null ? 0 : start, end == null ? 1e9 : end, result, 0, predicate);\n return result\n};\n\nDecorationSet.prototype.findInner = function findInner (start, end, result, offset, predicate) {\n for (var i = 0; i < this.local.length; i++) {\n var span = this.local[i];\n if (span.from <= end && span.to >= start && (!predicate || predicate(span.spec)))\n { result.push(span.copy(span.from + offset, span.to + offset)); }\n }\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3) {\n if (this.children[i$1] < end && this.children[i$1 + 1] > start) {\n var childOff = this.children[i$1] + 1;\n this.children[i$1 + 2].findInner(start - childOff, end - childOff, result, offset + childOff, predicate);\n }\n }\n};\n\n// :: (Mapping, Node, ?Object) → DecorationSet\n// Map the set of decorations in response to a change in the\n// document.\n//\n// options::- An optional set of options.\n//\n// onRemove:: ?(decorationSpec: Object)\n// When given, this function will be called for each decoration\n// that gets dropped as a result of the mapping, passing the\n// spec of that decoration.\nDecorationSet.prototype.map = function map (mapping, doc, options) {\n if (this == empty || mapping.maps.length == 0) { return this }\n return this.mapInner(mapping, doc, 0, 0, options || noSpec)\n};\n\nDecorationSet.prototype.mapInner = function mapInner (mapping, node, offset, oldOffset, options) {\n var newLocal;\n for (var i = 0; i < this.local.length; i++) {\n var mapped = this.local[i].map(mapping, offset, oldOffset);\n if (mapped && mapped.type.valid(node, mapped)) { (newLocal || (newLocal = [])).push(mapped); }\n else if (options.onRemove) { options.onRemove(this.local[i].spec); }\n }\n\n if (this.children.length)\n { return mapChildren(this.children, newLocal, mapping, node, offset, oldOffset, options) }\n else\n { return newLocal ? new DecorationSet(newLocal.sort(byPos)) : empty }\n};\n\n// :: (Node, [Decoration]) → DecorationSet\n// Add the given array of decorations to the ones in the set,\n// producing a new set. Needs access to the current document to\n// create the appropriate tree structure.\nDecorationSet.prototype.add = function add (doc, decorations) {\n if (!decorations.length) { return this }\n if (this == empty) { return DecorationSet.create(doc, decorations) }\n return this.addInner(doc, decorations, 0)\n};\n\nDecorationSet.prototype.addInner = function addInner (doc, decorations, offset) {\n var this$1 = this;\n\n var children, childIndex = 0;\n doc.forEach(function (childNode, childOffset) {\n var baseOffset = childOffset + offset, found;\n if (!(found = takeSpansForNode(decorations, childNode, baseOffset))) { return }\n\n if (!children) { children = this$1.children.slice(); }\n while (childIndex < children.length && children[childIndex] < childOffset) { childIndex += 3; }\n if (children[childIndex] == childOffset)\n { children[childIndex + 2] = children[childIndex + 2].addInner(childNode, found, baseOffset + 1); }\n else\n { children.splice(childIndex, 0, childOffset, childOffset + childNode.nodeSize, buildTree(found, childNode, baseOffset + 1, noSpec)); }\n childIndex += 3;\n });\n\n var local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);\n for (var i = 0; i < local.length; i++) { if (!local[i].type.valid(doc, local[i])) { local.splice(i--, 1); } }\n\n return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local,\n children || this.children)\n};\n\n// :: ([Decoration]) → DecorationSet\n// Create a new set that contains the decorations in this set, minus\n// the ones in the given array.\nDecorationSet.prototype.remove = function remove (decorations) {\n if (decorations.length == 0 || this == empty) { return this }\n return this.removeInner(decorations, 0)\n};\n\nDecorationSet.prototype.removeInner = function removeInner (decorations, offset) {\n var children = this.children, local = this.local;\n for (var i = 0; i < children.length; i += 3) {\n var found = (void 0), from = children[i] + offset, to = children[i + 1] + offset;\n for (var j = 0, span = (void 0); j < decorations.length; j++) { if (span = decorations[j]) {\n if (span.from > from && span.to < to) {\n decorations[j] = null\n ;(found || (found = [])).push(span);\n }\n } }\n if (!found) { continue }\n if (children == this.children) { children = this.children.slice(); }\n var removed = children[i + 2].removeInner(found, from + 1);\n if (removed != empty) {\n children[i + 2] = removed;\n } else {\n children.splice(i, 3);\n i -= 3;\n }\n }\n if (local.length) { for (var i$1 = 0, span$1 = (void 0); i$1 < decorations.length; i$1++) { if (span$1 = decorations[i$1]) {\n for (var j$1 = 0; j$1 < local.length; j$1++) { if (local[j$1].eq(span$1, offset)) {\n if (local == this.local) { local = this.local.slice(); }\n local.splice(j$1--, 1);\n } }\n } } }\n if (children == this.children && local == this.local) { return this }\n return local.length || children.length ? new DecorationSet(local, children) : empty\n};\n\nDecorationSet.prototype.forChild = function forChild (offset, node) {\n if (this == empty) { return this }\n if (node.isLeaf) { return DecorationSet.empty }\n\n var child, local;\n for (var i = 0; i < this.children.length; i += 3) { if (this.children[i] >= offset) {\n if (this.children[i] == offset) { child = this.children[i + 2]; }\n break\n } }\n var start = offset + 1, end = start + node.content.size;\n for (var i$1 = 0; i$1 < this.local.length; i$1++) {\n var dec = this.local[i$1];\n if (dec.from < end && dec.to > start && (dec.type instanceof InlineType)) {\n var from = Math.max(start, dec.from) - start, to = Math.min(end, dec.to) - start;\n if (from < to) { (local || (local = [])).push(dec.copy(from, to)); }\n }\n }\n if (local) {\n var localSet = new DecorationSet(local.sort(byPos));\n return child ? new DecorationGroup([localSet, child]) : localSet\n }\n return child || empty\n};\n\nDecorationSet.prototype.eq = function eq (other) {\n if (this == other) { return true }\n if (!(other instanceof DecorationSet) ||\n this.local.length != other.local.length ||\n this.children.length != other.children.length) { return false }\n for (var i = 0; i < this.local.length; i++)\n { if (!this.local[i].eq(other.local[i])) { return false } }\n for (var i$1 = 0; i$1 < this.children.length; i$1 += 3)\n { if (this.children[i$1] != other.children[i$1] ||\n this.children[i$1 + 1] != other.children[i$1 + 1] ||\n !this.children[i$1 + 2].eq(other.children[i$1 + 2])) { return false } }\n return true\n};\n\nDecorationSet.prototype.locals = function locals (node) {\n return removeOverlap(this.localsInner(node))\n};\n\nDecorationSet.prototype.localsInner = function localsInner (node) {\n if (this == empty) { return none }\n if (node.inlineContent || !this.local.some(InlineType.is)) { return this.local }\n var result = [];\n for (var i = 0; i < this.local.length; i++) {\n if (!(this.local[i].type instanceof InlineType))\n { result.push(this.local[i]); }\n }\n return result\n};\n\n// DecorationSource:: interface\n// An object that can [provide](#view.EditorProps.decorations)\n// decorations. Implemented by [`DecorationSet`](#view.DecorationSet),\n// and passed to [node views](#view.EditorProps.nodeViews).\n\nvar empty = new DecorationSet();\n\n// :: DecorationSet\n// The empty set of decorations.\nDecorationSet.empty = empty;\n\nDecorationSet.removeOverlap = removeOverlap;\n\n// :- An abstraction that allows the code dealing with decorations to\n// treat multiple DecorationSet objects as if it were a single object\n// with (a subset of) the same interface.\nvar DecorationGroup = function DecorationGroup(members) {\n this.members = members;\n};\n\nDecorationGroup.prototype.forChild = function forChild (offset, child) {\n if (child.isLeaf) { return DecorationSet.empty }\n var found = [];\n for (var i = 0; i < this.members.length; i++) {\n var result = this.members[i].forChild(offset, child);\n if (result == empty) { continue }\n if (result instanceof DecorationGroup) { found = found.concat(result.members); }\n else { found.push(result); }\n }\n return DecorationGroup.from(found)\n};\n\nDecorationGroup.prototype.eq = function eq (other) {\n if (!(other instanceof DecorationGroup) ||\n other.members.length != this.members.length) { return false }\n for (var i = 0; i < this.members.length; i++)\n { if (!this.members[i].eq(other.members[i])) { return false } }\n return true\n};\n\nDecorationGroup.prototype.locals = function locals (node) {\n var result, sorted = true;\n for (var i = 0; i < this.members.length; i++) {\n var locals = this.members[i].localsInner(node);\n if (!locals.length) { continue }\n if (!result) {\n result = locals;\n } else {\n if (sorted) {\n result = result.slice();\n sorted = false;\n }\n for (var j = 0; j < locals.length; j++) { result.push(locals[j]); }\n }\n }\n return result ? removeOverlap(sorted ? result : result.sort(byPos)) : none\n};\n\n// : ([DecorationSet]) → union\n// Create a group for the given array of decoration sets, or return\n// a single set when possible.\nDecorationGroup.from = function from (members) {\n switch (members.length) {\n case 0: return empty\n case 1: return members[0]\n default: return new DecorationGroup(members)\n }\n};\n\nfunction mapChildren(oldChildren, newLocal, mapping, node, offset, oldOffset, options) {\n var children = oldChildren.slice();\n\n // Mark the children that are directly touched by changes, and\n // move those that are after the changes.\n var shift = function (oldStart, oldEnd, newStart, newEnd) {\n for (var i = 0; i < children.length; i += 3) {\n var end = children[i + 1], dSize = (void 0);\n if (end == -1 || oldStart > end + oldOffset) { continue }\n if (oldEnd >= children[i] + oldOffset) {\n children[i + 1] = -1;\n } else if (newStart >= offset && (dSize = (newEnd - newStart) - (oldEnd - oldStart))) {\n children[i] += dSize;\n children[i + 1] += dSize;\n }\n }\n };\n for (var i = 0; i < mapping.maps.length; i++) { mapping.maps[i].forEach(shift); }\n\n // Find the child nodes that still correspond to a single node,\n // recursively call mapInner on them and update their positions.\n var mustRebuild = false;\n for (var i$1 = 0; i$1 < children.length; i$1 += 3) { if (children[i$1 + 1] == -1) { // Touched nodes\n var from = mapping.map(oldChildren[i$1] + oldOffset), fromLocal = from - offset;\n if (fromLocal < 0 || fromLocal >= node.content.size) {\n mustRebuild = true;\n continue\n }\n // Must read oldChildren because children was tagged with -1\n var to = mapping.map(oldChildren[i$1 + 1] + oldOffset, -1), toLocal = to - offset;\n var ref = node.content.findIndex(fromLocal);\n var index = ref.index;\n var childOffset = ref.offset;\n var childNode = node.maybeChild(index);\n if (childNode && childOffset == fromLocal && childOffset + childNode.nodeSize == toLocal) {\n var mapped = children[i$1 + 2].mapInner(mapping, childNode, from + 1, oldChildren[i$1] + oldOffset + 1, options);\n if (mapped != empty) {\n children[i$1] = fromLocal;\n children[i$1 + 1] = toLocal;\n children[i$1 + 2] = mapped;\n } else {\n children[i$1 + 1] = -2;\n mustRebuild = true;\n }\n } else {\n mustRebuild = true;\n }\n } }\n\n // Remaining children must be collected and rebuilt into the appropriate structure\n if (mustRebuild) {\n var decorations = mapAndGatherRemainingDecorations(children, oldChildren, newLocal || [], mapping,\n offset, oldOffset, options);\n var built = buildTree(decorations, node, 0, options);\n newLocal = built.local;\n for (var i$2 = 0; i$2 < children.length; i$2 += 3) { if (children[i$2 + 1] < 0) {\n children.splice(i$2, 3);\n i$2 -= 3;\n } }\n for (var i$3 = 0, j = 0; i$3 < built.children.length; i$3 += 3) {\n var from$1 = built.children[i$3];\n while (j < children.length && children[j] < from$1) { j += 3; }\n children.splice(j, 0, built.children[i$3], built.children[i$3 + 1], built.children[i$3 + 2]);\n }\n }\n\n return new DecorationSet(newLocal && newLocal.sort(byPos), children)\n}\n\nfunction moveSpans(spans, offset) {\n if (!offset || !spans.length) { return spans }\n var result = [];\n for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n result.push(new Decoration(span.from + offset, span.to + offset, span.type));\n }\n return result\n}\n\nfunction mapAndGatherRemainingDecorations(children, oldChildren, decorations, mapping, offset, oldOffset, options) {\n // Gather all decorations from the remaining marked children\n function gather(set, oldOffset) {\n for (var i = 0; i < set.local.length; i++) {\n var mapped = set.local[i].map(mapping, offset, oldOffset);\n if (mapped) { decorations.push(mapped); }\n else if (options.onRemove) { options.onRemove(set.local[i].spec); }\n }\n for (var i$1 = 0; i$1 < set.children.length; i$1 += 3)\n { gather(set.children[i$1 + 2], set.children[i$1] + oldOffset + 1); }\n }\n for (var i = 0; i < children.length; i += 3) { if (children[i + 1] == -1)\n { gather(children[i + 2], oldChildren[i] + oldOffset + 1); } }\n\n return decorations\n}\n\nfunction takeSpansForNode(spans, node, offset) {\n if (node.isLeaf) { return null }\n var end = offset + node.nodeSize, found = null;\n for (var i = 0, span = (void 0); i < spans.length; i++) {\n if ((span = spans[i]) && span.from > offset && span.to < end) {\n(found || (found = [])).push(span);\n spans[i] = null;\n }\n }\n return found\n}\n\nfunction withoutNulls(array) {\n var result = [];\n for (var i = 0; i < array.length; i++)\n { if (array[i] != null) { result.push(array[i]); } }\n return result\n}\n\n// : ([Decoration], Node, number) → DecorationSet\n// Build up a tree that corresponds to a set of decorations. `offset`\n// is a base offset that should be subtractet from the `from` and `to`\n// positions in the spans (so that we don't have to allocate new spans\n// for recursive calls).\nfunction buildTree(spans, node, offset, options) {\n var children = [], hasNulls = false;\n node.forEach(function (childNode, localStart) {\n var found = takeSpansForNode(spans, childNode, localStart + offset);\n if (found) {\n hasNulls = true;\n var subtree = buildTree(found, childNode, offset + localStart + 1, options);\n if (subtree != empty)\n { children.push(localStart, localStart + childNode.nodeSize, subtree); }\n }\n });\n var locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);\n for (var i = 0; i < locals.length; i++) { if (!locals[i].type.valid(node, locals[i])) {\n if (options.onRemove) { options.onRemove(locals[i].spec); }\n locals.splice(i--, 1);\n } }\n return locals.length || children.length ? new DecorationSet(locals, children) : empty\n}\n\n// : (Decoration, Decoration) → number\n// Used to sort decorations so that ones with a low start position\n// come first, and within a set with the same start position, those\n// with an smaller end position come first.\nfunction byPos(a, b) {\n return a.from - b.from || a.to - b.to\n}\n\n// : ([Decoration]) → [Decoration]\n// Scan a sorted array of decorations for partially overlapping spans,\n// and split those so that only fully overlapping spans are left (to\n// make subsequent rendering easier). Will return the input array if\n// no partially overlapping spans are found (the common case).\nfunction removeOverlap(spans) {\n var working = spans;\n for (var i = 0; i < working.length - 1; i++) {\n var span = working[i];\n if (span.from != span.to) { for (var j = i + 1; j < working.length; j++) {\n var next = working[j];\n if (next.from == span.from) {\n if (next.to != span.to) {\n if (working == spans) { working = spans.slice(); }\n // Followed by a partially overlapping larger span. Split that\n // span.\n working[j] = next.copy(next.from, span.to);\n insertAhead(working, j + 1, next.copy(span.to, next.to));\n }\n continue\n } else {\n if (next.from < span.to) {\n if (working == spans) { working = spans.slice(); }\n // The end of this one overlaps with a subsequent span. Split\n // this one.\n working[i] = span.copy(span.from, next.from);\n insertAhead(working, j, span.copy(next.from, span.to));\n }\n break\n }\n } }\n }\n return working\n}\n\nfunction insertAhead(array, i, deco) {\n while (i < array.length && byPos(deco, array[i]) > 0) { i++; }\n array.splice(i, 0, deco);\n}\n\n// : (EditorView) → union\n// Get the decorations associated with the current props of a view.\nfunction viewDecorations(view) {\n var found = [];\n view.someProp(\"decorations\", function (f) {\n var result = f(view.state);\n if (result && result != empty) { found.push(result); }\n });\n if (view.cursorWrapper)\n { found.push(DecorationSet.create(view.state.doc, [view.cursorWrapper.deco])); }\n return DecorationGroup.from(found)\n}\n\n// ::- An editor view manages the DOM structure that represents an\n// editable document. Its state and behavior are determined by its\n// [props](#view.DirectEditorProps).\nvar EditorView = function EditorView(place, props) {\n this._props = props;\n // :: EditorState\n // The view's current [state](#state.EditorState).\n this.state = props.state;\n\n this.dispatch = this.dispatch.bind(this);\n\n this._root = null;\n this.focused = false;\n // Kludge used to work around a Chrome bug\n this.trackWrites = null;\n\n // :: dom.Element\n // An editable DOM node containing the document. (You probably\n // should not directly interfere with its content.)\n this.dom = (place && place.mount) || document.createElement(\"div\");\n if (place) {\n if (place.appendChild) { place.appendChild(this.dom); }\n else if (place.apply) { place(this.dom); }\n else if (place.mount) { this.mounted = true; }\n }\n\n // :: bool\n // Indicates whether the editor is currently [editable](#view.EditorProps.editable).\n this.editable = getEditable(this);\n this.markCursor = null;\n this.cursorWrapper = null;\n updateCursorWrapper(this);\n this.nodeViews = buildNodeViews(this);\n this.docView = docViewDesc(this.state.doc, computeDocDeco(this), viewDecorations(this), this.dom, this);\n\n this.lastSelectedViewDesc = null;\n // :: ?{slice: Slice, move: bool}\n // When editor content is being dragged, this object contains\n // information about the dragged slice and whether it is being\n // copied or moved. At any other time, it is null.\n this.dragging = null;\n\n initInput(this);\n\n this.pluginViews = [];\n this.updatePluginViews();\n};\n\nvar prototypeAccessors$2 = { props: { configurable: true },root: { configurable: true } };\n\n// composing:: boolean\n// Holds `true` when a\n// [composition](https://developer.mozilla.org/en-US/docs/Mozilla/IME_handling_guide)\n// is active.\n\n// :: DirectEditorProps\n// The view's current [props](#view.EditorProps).\nprototypeAccessors$2.props.get = function () {\n if (this._props.state != this.state) {\n var prev = this._props;\n this._props = {};\n for (var name in prev) { this._props[name] = prev[name]; }\n this._props.state = this.state;\n }\n return this._props\n};\n\n// :: (DirectEditorProps)\n// Update the view's props. Will immediately cause an update to\n// the DOM.\nEditorView.prototype.update = function update (props) {\n if (props.handleDOMEvents != this._props.handleDOMEvents) { ensureListeners(this); }\n this._props = props;\n this.updateStateInner(props.state, true);\n};\n\n// :: (DirectEditorProps)\n// Update the view by updating existing props object with the object\n// given as argument. Equivalent to `view.update(Object.assign({},\n// view.props, props))`.\nEditorView.prototype.setProps = function setProps (props) {\n var updated = {};\n for (var name in this._props) { updated[name] = this._props[name]; }\n updated.state = this.state;\n for (var name$1 in props) { updated[name$1] = props[name$1]; }\n this.update(updated);\n};\n\n// :: (EditorState)\n// Update the editor's `state` prop, without touching any of the\n// other props.\nEditorView.prototype.updateState = function updateState (state) {\n this.updateStateInner(state, this.state.plugins != state.plugins);\n};\n\nEditorView.prototype.updateStateInner = function updateStateInner (state, reconfigured) {\n var this$1 = this;\n\n var prev = this.state, redraw = false, updateSel = false;\n // When stored marks are added, stop composition, so that they can\n // be displayed.\n if (state.storedMarks && this.composing) {\n clearComposition(this);\n updateSel = true;\n }\n this.state = state;\n if (reconfigured) {\n var nodeViews = buildNodeViews(this);\n if (changedNodeViews(nodeViews, this.nodeViews)) {\n this.nodeViews = nodeViews;\n redraw = true;\n }\n ensureListeners(this);\n }\n\n this.editable = getEditable(this);\n updateCursorWrapper(this);\n var innerDeco = viewDecorations(this), outerDeco = computeDocDeco(this);\n\n var scroll = reconfigured ? \"reset\"\n : state.scrollToSelection > prev.scrollToSelection ? \"to selection\" : \"preserve\";\n var updateDoc = redraw || !this.docView.matchesNode(state.doc, outerDeco, innerDeco);\n if (updateDoc || !state.selection.eq(prev.selection)) { updateSel = true; }\n var oldScrollPos = scroll == \"preserve\" && updateSel && this.dom.style.overflowAnchor == null && storeScrollPos(this);\n\n if (updateSel) {\n this.domObserver.stop();\n // Work around an issue in Chrome, IE, and Edge where changing\n // the DOM around an active selection puts it into a broken\n // state where the thing the user sees differs from the\n // selection reported by the Selection object (#710, #973,\n // #1011, #1013, #1035).\n var forceSelUpdate = updateDoc && (result.ie || result.chrome) && !this.composing &&\n !prev.selection.empty && !state.selection.empty && selectionContextChanged(prev.selection, state.selection);\n if (updateDoc) {\n // If the node that the selection points into is written to,\n // Chrome sometimes starts misreporting the selection, so this\n // tracks that and forces a selection reset when our update\n // did write to the node.\n var chromeKludge = result.chrome ? (this.trackWrites = this.root.getSelection().focusNode) : null;\n if (redraw || !this.docView.update(state.doc, outerDeco, innerDeco, this)) {\n this.docView.updateOuterDeco([]);\n this.docView.destroy();\n this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);\n }\n if (chromeKludge && !this.trackWrites) { forceSelUpdate = true; }\n }\n // Work around for an issue where an update arriving right between\n // a DOM selection change and the \"selectionchange\" event for it\n // can cause a spurious DOM selection update, disrupting mouse\n // drag selection.\n if (forceSelUpdate ||\n !(this.mouseDown && this.domObserver.currentSelection.eq(this.root.getSelection()) && anchorInRightPlace(this))) {\n selectionToDOM(this, forceSelUpdate);\n } else {\n syncNodeSelection(this, state.selection);\n this.domObserver.setCurSelection();\n }\n this.domObserver.start();\n }\n\n this.updatePluginViews(prev);\n\n if (scroll == \"reset\") {\n this.dom.scrollTop = 0;\n } else if (scroll == \"to selection\") {\n var startDOM = this.root.getSelection().focusNode;\n if (this.someProp(\"handleScrollToSelection\", function (f) { return f(this$1); }))\n ; // Handled\n else if (state.selection instanceof NodeSelection)\n { scrollRectIntoView(this, this.docView.domAfterPos(state.selection.from).getBoundingClientRect(), startDOM); }\n else\n { scrollRectIntoView(this, this.coordsAtPos(state.selection.head, 1), startDOM); }\n } else if (oldScrollPos) {\n resetScrollPos(oldScrollPos);\n }\n};\n\nEditorView.prototype.destroyPluginViews = function destroyPluginViews () {\n var view;\n while (view = this.pluginViews.pop()) { if (view.destroy) { view.destroy(); } }\n};\n\nEditorView.prototype.updatePluginViews = function updatePluginViews (prevState) {\n if (!prevState || prevState.plugins != this.state.plugins) {\n this.destroyPluginViews();\n for (var i = 0; i < this.state.plugins.length; i++) {\n var plugin = this.state.plugins[i];\n if (plugin.spec.view) { this.pluginViews.push(plugin.spec.view(this)); }\n }\n } else {\n for (var i$1 = 0; i$1 < this.pluginViews.length; i$1++) {\n var pluginView = this.pluginViews[i$1];\n if (pluginView.update) { pluginView.update(this, prevState); }\n }\n }\n};\n\n// :: (string, ?(prop: *) → *) → *\n// Goes over the values of a prop, first those provided directly,\n// then those from plugins (in order), and calls `f` every time a\n// non-undefined value is found. When `f` returns a truthy value,\n// that is immediately returned. When `f` isn't provided, it is\n// treated as the identity function (the prop value is returned\n// directly).\nEditorView.prototype.someProp = function someProp (propName, f) {\n var prop = this._props && this._props[propName], value;\n if (prop != null && (value = f ? f(prop) : prop)) { return value }\n var plugins = this.state.plugins;\n if (plugins) { for (var i = 0; i < plugins.length; i++) {\n var prop$1 = plugins[i].props[propName];\n if (prop$1 != null && (value = f ? f(prop$1) : prop$1)) { return value }\n } }\n};\n\n// :: () → bool\n// Query whether the view has focus.\nEditorView.prototype.hasFocus = function hasFocus () {\n return this.root.activeElement == this.dom\n};\n\n// :: ()\n// Focus the editor.\nEditorView.prototype.focus = function focus () {\n this.domObserver.stop();\n if (this.editable) { focusPreventScroll(this.dom); }\n selectionToDOM(this);\n this.domObserver.start();\n};\n\n// :: union\n// Get the document root in which the editor exists. This will\n// usually be the top-level `document`, but might be a [shadow\n// DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)\n// root if the editor is inside one.\nprototypeAccessors$2.root.get = function () {\n var cached = this._root;\n if (cached == null) { for (var search = this.dom.parentNode; search; search = search.parentNode) {\n if (search.nodeType == 9 || (search.nodeType == 11 && search.host)) {\n if (!search.getSelection) { Object.getPrototypeOf(search).getSelection = function () { return document.getSelection(); }; }\n return this._root = search\n }\n } }\n return cached || document\n};\n\n// :: ({left: number, top: number}) → ?{pos: number, inside: number}\n// Given a pair of viewport coordinates, return the document\n// position that corresponds to them. May return null if the given\n// coordinates aren't inside of the editor. When an object is\n// returned, its `pos` property is the position nearest to the\n// coordinates, and its `inside` property holds the position of the\n// inner node that the position falls inside of, or -1 if it is at\n// the top level, not in any node.\nEditorView.prototype.posAtCoords = function posAtCoords$1 (coords) {\n return posAtCoords(this, coords)\n};\n\n// :: (number, number) → {left: number, right: number, top: number, bottom: number}\n// Returns the viewport rectangle at a given document position.\n// `left` and `right` will be the same number, as this returns a\n// flat cursor-ish rectangle. If the position is between two things\n// that aren't directly adjacent, `side` determines which element is\n// used. When < 0, the element before the position is used,\n// otherwise the element after.\nEditorView.prototype.coordsAtPos = function coordsAtPos$1 (pos, side) {\n if ( side === void 0 ) side = 1;\n\n return coordsAtPos(this, pos, side)\n};\n\n// :: (number, number) → {node: dom.Node, offset: number}\n// Find the DOM position that corresponds to the given document\n// position. When `side` is negative, find the position as close as\n// possible to the content before the position. When positive,\n// prefer positions close to the content after the position. When\n// zero, prefer as shallow a position as possible.\n//\n// Note that you should **not** mutate the editor's internal DOM,\n// only inspect it (and even that is usually not necessary).\nEditorView.prototype.domAtPos = function domAtPos (pos, side) {\n if ( side === void 0 ) side = 0;\n\n return this.docView.domFromPos(pos, side)\n};\n\n// :: (number) → ?dom.Node\n// Find the DOM node that represents the document node after the\n// given position. May return `null` when the position doesn't point\n// in front of a node or if the node is inside an opaque node view.\n//\n// This is intended to be able to call things like\n// `getBoundingClientRect` on that DOM node. Do **not** mutate the\n// editor DOM directly, or add styling this way, since that will be\n// immediately overriden by the editor as it redraws the node.\nEditorView.prototype.nodeDOM = function nodeDOM (pos) {\n var desc = this.docView.descAt(pos);\n return desc ? desc.nodeDOM : null\n};\n\n// :: (dom.Node, number, ?number) → number\n// Find the document position that corresponds to a given DOM\n// position. (Whenever possible, it is preferable to inspect the\n// document structure directly, rather than poking around in the\n// DOM, but sometimes—for example when interpreting an event\n// target—you don't have a choice.)\n//\n// The `bias` parameter can be used to influence which side of a DOM\n// node to use when the position is inside a leaf node.\nEditorView.prototype.posAtDOM = function posAtDOM (node, offset, bias) {\n if ( bias === void 0 ) bias = -1;\n\n var pos = this.docView.posFromDOM(node, offset, bias);\n if (pos == null) { throw new RangeError(\"DOM position not inside the editor\") }\n return pos\n};\n\n// :: (union<\"up\", \"down\", \"left\", \"right\", \"forward\", \"backward\">, ?EditorState) → bool\n// Find out whether the selection is at the end of a textblock when\n// moving in a given direction. When, for example, given `\"left\"`,\n// it will return true if moving left from the current cursor\n// position would leave that position's parent textblock. Will apply\n// to the view's current state by default, but it is possible to\n// pass a different state.\nEditorView.prototype.endOfTextblock = function endOfTextblock$1 (dir, state) {\n return endOfTextblock(this, state || this.state, dir)\n};\n\n// :: ()\n// Removes the editor from the DOM and destroys all [node\n// views](#view.NodeView).\nEditorView.prototype.destroy = function destroy () {\n if (!this.docView) { return }\n destroyInput(this);\n this.destroyPluginViews();\n if (this.mounted) {\n this.docView.update(this.state.doc, [], viewDecorations(this), this);\n this.dom.textContent = \"\";\n } else if (this.dom.parentNode) {\n this.dom.parentNode.removeChild(this.dom);\n }\n this.docView.destroy();\n this.docView = null;\n};\n\n// Used for testing.\nEditorView.prototype.dispatchEvent = function dispatchEvent$1 (event) {\n return dispatchEvent(this, event)\n};\n\n// :: (Transaction)\n// Dispatch a transaction. Will call\n// [`dispatchTransaction`](#view.DirectEditorProps.dispatchTransaction)\n// when given, and otherwise defaults to applying the transaction to\n// the current state and calling\n// [`updateState`](#view.EditorView.updateState) with the result.\n// This method is bound to the view instance, so that it can be\n// easily passed around.\nEditorView.prototype.dispatch = function dispatch (tr) {\n var dispatchTransaction = this._props.dispatchTransaction;\n if (dispatchTransaction) { dispatchTransaction.call(this, tr); }\n else { this.updateState(this.state.apply(tr)); }\n};\n\nObject.defineProperties( EditorView.prototype, prototypeAccessors$2 );\n\nfunction computeDocDeco(view) {\n var attrs = Object.create(null);\n attrs.class = \"ProseMirror\";\n attrs.contenteditable = String(view.editable);\n\n view.someProp(\"attributes\", function (value) {\n if (typeof value == \"function\") { value = value(view.state); }\n if (value) { for (var attr in value) {\n if (attr == \"class\")\n { attrs.class += \" \" + value[attr]; }\n else if (!attrs[attr] && attr != \"contenteditable\" && attr != \"nodeName\")\n { attrs[attr] = String(value[attr]); }\n } }\n });\n\n return [Decoration.node(0, view.state.doc.content.size, attrs)]\n}\n\nfunction updateCursorWrapper(view) {\n if (view.markCursor) {\n var dom = document.createElement(\"img\");\n dom.setAttribute(\"mark-placeholder\", \"true\");\n view.cursorWrapper = {dom: dom, deco: Decoration.widget(view.state.selection.head, dom, {raw: true, marks: view.markCursor})};\n } else {\n view.cursorWrapper = null;\n }\n}\n\nfunction getEditable(view) {\n return !view.someProp(\"editable\", function (value) { return value(view.state) === false; })\n}\n\nfunction selectionContextChanged(sel1, sel2) {\n var depth = Math.min(sel1.$anchor.sharedDepth(sel1.head), sel2.$anchor.sharedDepth(sel2.head));\n return sel1.$anchor.start(depth) != sel2.$anchor.start(depth)\n}\n\nfunction buildNodeViews(view) {\n var result = {};\n view.someProp(\"nodeViews\", function (obj) {\n for (var prop in obj) { if (!Object.prototype.hasOwnProperty.call(result, prop))\n { result[prop] = obj[prop]; } }\n });\n return result\n}\n\nfunction changedNodeViews(a, b) {\n var nA = 0, nB = 0;\n for (var prop in a) {\n if (a[prop] != b[prop]) { return true }\n nA++;\n }\n for (var _ in b) { nB++; }\n return nA != nB\n}\n\n// EditorProps:: interface\n//\n// Props are configuration values that can be passed to an editor view\n// or included in a plugin. This interface lists the supported props.\n//\n// The various event-handling functions may all return `true` to\n// indicate that they handled the given event. The view will then take\n// care to call `preventDefault` on the event, except with\n// `handleDOMEvents`, where the handler itself is responsible for that.\n//\n// How a prop is resolved depends on the prop. Handler functions are\n// called one at a time, starting with the base props and then\n// searching through the plugins (in order of appearance) until one of\n// them returns true. For some props, the first plugin that yields a\n// value gets precedence.\n//\n// handleDOMEvents:: ?Object<(view: EditorView, event: dom.Event) → bool>\n// Can be an object mapping DOM event type names to functions that\n// handle them. Such functions will be called before any handling\n// ProseMirror does of events fired on the editable DOM element.\n// Contrary to the other event handling props, when returning true\n// from such a function, you are responsible for calling\n// `preventDefault` yourself (or not, if you want to allow the\n// default behavior).\n//\n// handleKeyDown:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Called when the editor receives a `keydown` event.\n//\n// handleKeyPress:: ?(view: EditorView, event: dom.KeyboardEvent) → bool\n// Handler for `keypress` events.\n//\n// handleTextInput:: ?(view: EditorView, from: number, to: number, text: string) → bool\n// Whenever the user directly input text, this handler is called\n// before the input is applied. If it returns `true`, the default\n// behavior of actually inserting the text is suppressed.\n//\n// handleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a click, from the inside out. The\n// `direct` flag will be true for the inner node.\n//\n// handleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is clicked, after `handleClickOn` handlers\n// have been called.\n//\n// handleDoubleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a double click.\n//\n// handleDoubleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is double-clicked, after `handleDoubleClickOn`.\n//\n// handleTripleClickOn:: ?(view: EditorView, pos: number, node: Node, nodePos: number, event: dom.MouseEvent, direct: bool) → bool\n// Called for each node around a triple click.\n//\n// handleTripleClick:: ?(view: EditorView, pos: number, event: dom.MouseEvent) → bool\n// Called when the editor is triple-clicked, after `handleTripleClickOn`.\n//\n// handlePaste:: ?(view: EditorView, event: dom.ClipboardEvent, slice: Slice) → bool\n// Can be used to override the behavior of pasting. `slice` is the\n// pasted content parsed by the editor, but you can directly access\n// the event to get at the raw content.\n//\n// handleDrop:: ?(view: EditorView, event: dom.Event, slice: Slice, moved: bool) → bool\n// Called when something is dropped on the editor. `moved` will be\n// true if this drop moves from the current selection (which should\n// thus be deleted).\n//\n// handleScrollToSelection:: ?(view: EditorView) → bool\n// Called when the view, after updating its state, tries to scroll\n// the selection into view. A handler function may return false to\n// indicate that it did not handle the scrolling and further\n// handlers or the default behavior should be tried.\n//\n// createSelectionBetween:: ?(view: EditorView, anchor: ResolvedPos, head: ResolvedPos) → ?Selection\n// Can be used to override the way a selection is created when\n// reading a DOM selection between the given anchor and head.\n//\n// domParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading editor changes\n// from the DOM. Defaults to calling\n// [`DOMParser.fromSchema`](#model.DOMParser^fromSchema) on the\n// editor's schema.\n//\n// transformPastedHTML:: ?(html: string) → string\n// Can be used to transform pasted HTML text, _before_ it is parsed,\n// for example to clean it up.\n//\n// clipboardParser:: ?DOMParser\n// The [parser](#model.DOMParser) to use when reading content from\n// the clipboard. When not given, the value of the\n// [`domParser`](#view.EditorProps.domParser) prop is used.\n//\n// transformPastedText:: ?(text: string, plain: bool) → string\n// Transform pasted plain text. The `plain` flag will be true when\n// the text is pasted as plain text.\n//\n// clipboardTextParser:: ?(text: string, $context: ResolvedPos, plain: bool) → Slice\n// A function to parse text from the clipboard into a document\n// slice. Called after\n// [`transformPastedText`](#view.EditorProps.transformPastedText).\n// The default behavior is to split the text into lines, wrap them\n// in `

` tags, and call\n// [`clipboardParser`](#view.EditorProps.clipboardParser) on it.\n// The `plain` flag will be true when the text is pasted as plain text.\n//\n// transformPasted:: ?(Slice) → Slice\n// Can be used to transform pasted content before it is applied to\n// the document.\n//\n// nodeViews:: ?Object<(node: Node, view: EditorView, getPos: () → number, decorations: [Decoration], innerDecorations: DecorationSource) → NodeView>\n// Allows you to pass custom rendering and behavior logic for nodes\n// and marks. Should map node and mark names to constructor\n// functions that produce a [`NodeView`](#view.NodeView) object\n// implementing the node's display behavior. For nodes, the third\n// argument `getPos` is a function that can be called to get the\n// node's current position, which can be useful when creating\n// transactions to update it. For marks, the third argument is a\n// boolean that indicates whether the mark's content is inline.\n//\n// `decorations` is an array of node or inline decorations that are\n// active around the node. They are automatically drawn in the\n// normal way, and you will usually just want to ignore this, but\n// they can also be used as a way to provide context information to\n// the node view without adding it to the document itself.\n//\n// `innerDecorations` holds the decorations for the node's content.\n// You can safely ignore this if your view has no content or a\n// `contentDOM` property, since the editor will draw the decorations\n// on the content. But if you, for example, want to create a nested\n// editor with the content, it may make sense to provide it with the\n// inner decorations.\n//\n// clipboardSerializer:: ?DOMSerializer\n// The DOM serializer to use when putting content onto the\n// clipboard. If not given, the result of\n// [`DOMSerializer.fromSchema`](#model.DOMSerializer^fromSchema)\n// will be used.\n//\n// clipboardTextSerializer:: ?(Slice) → string\n// A function that will be called to get the text for the current\n// selection when copying text to the clipboard. By default, the\n// editor will use [`textBetween`](#model.Node.textBetween) on the\n// selected range.\n//\n// decorations:: ?(state: EditorState) → ?DecorationSource\n// A set of [document decorations](#view.Decoration) to show in the\n// view.\n//\n// editable:: ?(state: EditorState) → bool\n// When this returns false, the content of the view is not directly\n// editable.\n//\n// attributes:: ?union, (EditorState) → ?Object>\n// Control the DOM attributes of the editable element. May be either\n// an object or a function going from an editor state to an object.\n// By default, the element will get a class `\"ProseMirror\"`, and\n// will have its `contentEditable` attribute determined by the\n// [`editable` prop](#view.EditorProps.editable). Additional classes\n// provided here will be added to the class. For other attributes,\n// the value provided first (as in\n// [`someProp`](#view.EditorView.someProp)) will be used.\n//\n// scrollThreshold:: ?union\n// Determines the distance (in pixels) between the cursor and the\n// end of the visible viewport at which point, when scrolling the\n// cursor into view, scrolling takes place. Defaults to 0.\n//\n// scrollMargin:: ?union\n// Determines the extra space (in pixels) that is left above or\n// below the cursor when it is scrolled into view. Defaults to 5.\n\n// DirectEditorProps:: interface extends EditorProps\n//\n// The props object given directly to the editor view supports two\n// fields that can't be used in plugins:\n//\n// state:: EditorState\n// The current state of the editor.\n//\n// dispatchTransaction:: ?(tr: Transaction)\n// The callback over which to send transactions (state updates)\n// produced by the view. If you specify this, you probably want to\n// make sure this ends up calling the view's\n// [`updateState`](#view.EditorView.updateState) method with a new\n// state that has the transaction\n// [applied](#state.EditorState.apply). The callback will be bound to have\n// the view instance as its `this` binding.\n\nexport { Decoration, DecorationSet, EditorView, endComposition as __endComposition, parseFromClipboard as __parseFromClipboard, serializeForClipboard as __serializeForClipboard };\n//# sourceMappingURL=index.es.js.map\n","import { Plugin } from 'prosemirror-state';\nimport { dropPoint } from 'prosemirror-transform';\n\n// :: (options: ?Object) → Plugin\n// Create a plugin that, when added to a ProseMirror instance,\n// causes a decoration to show up at the drop position when something\n// is dragged over the editor.\n//\n// options::- These options are supported:\n//\n// color:: ?string\n// The color of the cursor. Defaults to `black`.\n//\n// width:: ?number\n// The precise width of the cursor in pixels. Defaults to 1.\n//\n// class:: ?string\n// A CSS class name to add to the cursor element.\nfunction dropCursor(options) {\n if ( options === void 0 ) options = {};\n\n return new Plugin({\n view: function view(editorView) { return new DropCursorView(editorView, options) }\n })\n}\n\nvar DropCursorView = function DropCursorView(editorView, options) {\n var this$1 = this;\n\n this.editorView = editorView;\n this.width = options.width || 1;\n this.color = options.color || \"black\";\n this.class = options.class;\n this.cursorPos = null;\n this.element = null;\n this.timeout = null;\n\n this.handlers = [\"dragover\", \"dragend\", \"drop\", \"dragleave\"].map(function (name) {\n var handler = function (e) { return this$1[name](e); };\n editorView.dom.addEventListener(name, handler);\n return {name: name, handler: handler}\n });\n};\n\nDropCursorView.prototype.destroy = function destroy () {\n var this$1 = this;\n\n this.handlers.forEach(function (ref) {\n var name = ref.name;\n var handler = ref.handler;\n\n return this$1.editorView.dom.removeEventListener(name, handler);\n });\n};\n\nDropCursorView.prototype.update = function update (editorView, prevState) {\n if (this.cursorPos != null && prevState.doc != editorView.state.doc) { this.updateOverlay(); }\n};\n\nDropCursorView.prototype.setCursor = function setCursor (pos) {\n if (pos == this.cursorPos) { return }\n this.cursorPos = pos;\n if (pos == null) {\n this.element.parentNode.removeChild(this.element);\n this.element = null;\n } else {\n this.updateOverlay();\n }\n};\n\nDropCursorView.prototype.updateOverlay = function updateOverlay () {\n var $pos = this.editorView.state.doc.resolve(this.cursorPos), rect;\n if (!$pos.parent.inlineContent) {\n var before = $pos.nodeBefore, after = $pos.nodeAfter;\n if (before || after) {\n var nodeRect = this.editorView.nodeDOM(this.cursorPos - (before ?before.nodeSize : 0)).getBoundingClientRect();\n var top = before ? nodeRect.bottom : nodeRect.top;\n if (before && after)\n { top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2; }\n rect = {left: nodeRect.left, right: nodeRect.right, top: top - this.width / 2, bottom: top + this.width / 2};\n }\n }\n if (!rect) {\n var coords = this.editorView.coordsAtPos(this.cursorPos);\n rect = {left: coords.left - this.width / 2, right: coords.left + this.width / 2, top: coords.top, bottom: coords.bottom};\n }\n\n var parent = this.editorView.dom.offsetParent;\n if (!this.element) {\n this.element = parent.appendChild(document.createElement(\"div\"));\n if (this.class) { this.element.className = this.class; }\n this.element.style.cssText = \"position: absolute; z-index: 50; pointer-events: none; background-color: \" + this.color;\n }\n var parentLeft, parentTop;\n if (!parent || parent == document.body && getComputedStyle(parent).position == \"static\") {\n parentLeft = -pageXOffset;\n parentTop = -pageYOffset;\n } else {\n var rect$1 = parent.getBoundingClientRect();\n parentLeft = rect$1.left - parent.scrollLeft;\n parentTop = rect$1.top - parent.scrollTop;\n }\n this.element.style.left = (rect.left - parentLeft) + \"px\";\n this.element.style.top = (rect.top - parentTop) + \"px\";\n this.element.style.width = (rect.right - rect.left) + \"px\";\n this.element.style.height = (rect.bottom - rect.top) + \"px\";\n};\n\nDropCursorView.prototype.scheduleRemoval = function scheduleRemoval (timeout) {\n var this$1 = this;\n\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () { return this$1.setCursor(null); }, timeout);\n};\n\nDropCursorView.prototype.dragover = function dragover (event) {\n if (!this.editorView.editable) { return }\n var pos = this.editorView.posAtCoords({left: event.clientX, top: event.clientY});\n if (pos) {\n var target = pos.pos;\n if (this.editorView.dragging && this.editorView.dragging.slice) {\n target = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);\n if (target == null) { return this.setCursor(null) }\n }\n this.setCursor(target);\n this.scheduleRemoval(5000);\n }\n};\n\nDropCursorView.prototype.dragend = function dragend () {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.drop = function drop () {\n this.scheduleRemoval(20);\n};\n\nDropCursorView.prototype.dragleave = function dragleave (event) {\n if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget))\n { this.setCursor(null); }\n};\n\nexport { dropCursor };\n//# sourceMappingURL=index.es.js.map\n","import { keydownHandler } from 'prosemirror-keymap';\nimport { NodeSelection, Selection, Plugin, TextSelection } from 'prosemirror-state';\nimport { DecorationSet, Decoration } from 'prosemirror-view';\nimport { Slice } from 'prosemirror-model';\n\n// ::- Gap cursor selections are represented using this class. Its\n// `$anchor` and `$head` properties both point at the cursor position.\nvar GapCursor = /*@__PURE__*/(function (Selection) {\n function GapCursor($pos) {\n Selection.call(this, $pos, $pos);\n }\n\n if ( Selection ) GapCursor.__proto__ = Selection;\n GapCursor.prototype = Object.create( Selection && Selection.prototype );\n GapCursor.prototype.constructor = GapCursor;\n\n GapCursor.prototype.map = function map (doc, mapping) {\n var $pos = doc.resolve(mapping.map(this.head));\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos)\n };\n\n GapCursor.prototype.content = function content () { return Slice.empty };\n\n GapCursor.prototype.eq = function eq (other) {\n return other instanceof GapCursor && other.head == this.head\n };\n\n GapCursor.prototype.toJSON = function toJSON () {\n return {type: \"gapcursor\", pos: this.head}\n };\n\n GapCursor.fromJSON = function fromJSON (doc, json) {\n if (typeof json.pos != \"number\") { throw new RangeError(\"Invalid input for GapCursor.fromJSON\") }\n return new GapCursor(doc.resolve(json.pos))\n };\n\n GapCursor.prototype.getBookmark = function getBookmark () { return new GapBookmark(this.anchor) };\n\n GapCursor.valid = function valid ($pos) {\n var parent = $pos.parent;\n if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) { return false }\n var override = parent.type.spec.allowGapCursor;\n if (override != null) { return override }\n var deflt = parent.contentMatchAt($pos.index()).defaultType;\n return deflt && deflt.isTextblock\n };\n\n GapCursor.findFrom = function findFrom ($pos, dir, mustMove) {\n search: for (;;) {\n if (!mustMove && GapCursor.valid($pos)) { return $pos }\n var pos = $pos.pos, next = null;\n // Scan up from this position\n for (var d = $pos.depth;; d--) {\n var parent = $pos.node(d);\n if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {\n next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);\n break\n } else if (d == 0) {\n return null\n }\n pos += dir;\n var $cur = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur)) { return $cur }\n }\n\n // And then down into the next node\n for (;;) {\n var inside = dir > 0 ? next.firstChild : next.lastChild;\n if (!inside) {\n if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {\n $pos = $pos.doc.resolve(pos + next.nodeSize * dir);\n mustMove = false;\n continue search\n }\n break\n }\n next = inside;\n pos += dir;\n var $cur$1 = $pos.doc.resolve(pos);\n if (GapCursor.valid($cur$1)) { return $cur$1 }\n }\n\n return null\n }\n };\n\n return GapCursor;\n}(Selection));\n\nGapCursor.prototype.visible = false;\n\nSelection.jsonID(\"gapcursor\", GapCursor);\n\nvar GapBookmark = function GapBookmark(pos) {\n this.pos = pos;\n};\nGapBookmark.prototype.map = function map (mapping) {\n return new GapBookmark(mapping.map(this.pos))\n};\nGapBookmark.prototype.resolve = function resolve (doc) {\n var $pos = doc.resolve(this.pos);\n return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos)\n};\n\nfunction closedBefore($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.index(d);\n // At the start of this parent, look at next one\n if (index == 0) { continue }\n // See if the node before (or its first ancestor) is closed\n for (var before = $pos.node(d).child(index - 1);; before = before.lastChild) {\n if ((before.childCount == 0 && !before.inlineContent) || before.isAtom || before.type.spec.isolating) { return true }\n if (before.inlineContent) { return false }\n }\n }\n // Hit start of document\n return true\n}\n\nfunction closedAfter($pos) {\n for (var d = $pos.depth; d >= 0; d--) {\n var index = $pos.indexAfter(d), parent = $pos.node(d);\n if (index == parent.childCount) { continue }\n for (var after = parent.child(index);; after = after.firstChild) {\n if ((after.childCount == 0 && !after.inlineContent) || after.isAtom || after.type.spec.isolating) { return true }\n if (after.inlineContent) { return false }\n }\n }\n return true\n}\n\n// :: () → Plugin\n// Create a gap cursor plugin. When enabled, this will capture clicks\n// near and arrow-key-motion past places that don't have a normally\n// selectable position nearby, and create a gap cursor selection for\n// them. The cursor is drawn as an element with class\n// `ProseMirror-gapcursor`. You can either include\n// `style/gapcursor.css` from the package's directory or add your own\n// styles to make it visible.\nvar gapCursor = function() {\n return new Plugin({\n props: {\n decorations: drawGapCursor,\n\n createSelectionBetween: function createSelectionBetween(_view, $anchor, $head) {\n if ($anchor.pos == $head.pos && GapCursor.valid($head)) { return new GapCursor($head) }\n },\n\n handleClick: handleClick,\n handleKeyDown: handleKeyDown\n }\n })\n};\n\nvar handleKeyDown = keydownHandler({\n \"ArrowLeft\": arrow(\"horiz\", -1),\n \"ArrowRight\": arrow(\"horiz\", 1),\n \"ArrowUp\": arrow(\"vert\", -1),\n \"ArrowDown\": arrow(\"vert\", 1)\n});\n\nfunction arrow(axis, dir) {\n var dirStr = axis == \"vert\" ? (dir > 0 ? \"down\" : \"up\") : (dir > 0 ? \"right\" : \"left\");\n return function(state, dispatch, view) {\n var sel = state.selection;\n var $start = dir > 0 ? sel.$to : sel.$from, mustMove = sel.empty;\n if (sel instanceof TextSelection) {\n if (!view.endOfTextblock(dirStr) || $start.depth == 0) { return false }\n mustMove = false;\n $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());\n }\n var $found = GapCursor.findFrom($start, dir, mustMove);\n if (!$found) { return false }\n if (dispatch) { dispatch(state.tr.setSelection(new GapCursor($found))); }\n return true\n }\n}\n\nfunction handleClick(view, pos, event) {\n if (!view.editable) { return false }\n var $pos = view.state.doc.resolve(pos);\n if (!GapCursor.valid($pos)) { return false }\n var ref = view.posAtCoords({left: event.clientX, top: event.clientY});\n var inside = ref.inside;\n if (inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(inside))) { return false }\n view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));\n return true\n}\n\nfunction drawGapCursor(state) {\n if (!(state.selection instanceof GapCursor)) { return null }\n var node = document.createElement(\"div\");\n node.className = \"ProseMirror-gapcursor\";\n return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, {key: \"gapcursor\"})])\n}\n\nexport { GapCursor, gapCursor };\n//# sourceMappingURL=index.es.js.map\n","import { liftTarget, canJoin, joinPoint, canSplit, ReplaceAroundStep, findWrapping } from 'prosemirror-transform';\nimport { Fragment, Slice } from 'prosemirror-model';\nimport { NodeSelection, Selection, AllSelection, TextSelection } from 'prosemirror-state';\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Delete the selection, if there is one.\nfunction deleteSelection(state, dispatch) {\n if (state.selection.empty) { return false }\n if (dispatch) { dispatch(state.tr.deleteSelection().scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and at the start of a textblock, try to\n// reduce the distance between that block and the one before it—if\n// there's a block directly before it that can be joined, join them.\n// If not, try to move the selected block closer to the next one in\n// the document structure by lifting it out of its parent or moving it\n// into a parent of the previous block. Will use the view for accurate\n// (bidi-aware) start-of-textblock detection if given.\nfunction joinBackward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"backward\", state)\n : $cursor.parentOffset > 0))\n { return false }\n\n var $cut = findCutBefore($cursor);\n\n // If there is no node before this, try to lift\n if (!$cut) {\n var range = $cursor.blockRange(), target = range && liftTarget(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n }\n\n var before = $cut.nodeBefore;\n // Apply the joining algorithm\n if (!before.type.spec.isolating && deleteBarrier(state, $cut, dispatch))\n { return true }\n\n // If the node below has no content and the node above is\n // selectable, delete the node below and select the one above.\n if ($cursor.parent.content.size == 0 &&\n (textblockAt(before, \"end\") || NodeSelection.isSelectable(before))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(before, \"end\") ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1)\n : NodeSelection.create(tr.doc, $cut.pos - before.nodeSize));\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n // If the node before is an atom, delete it\n if (before.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) { dispatch(state.tr.delete($cut.pos - before.nodeSize, $cut.pos).scrollIntoView()); }\n return true\n }\n\n return false\n}\n\nfunction textblockAt(node, side) {\n for (; node; node = (side == \"start\" ? node.firstChild : node.lastChild))\n { if (node.isTextblock) { return true } }\n return false\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the start of a textblock, select\n// the node before that textblock, if possible. This is intended to be\n// bound to keys like backspace, after\n// [`joinBackward`](#commands.joinBackward) or other deleting\n// commands, as a fall-back behavior when the schema doesn't allow\n// deletion at the selected point.\nfunction selectNodeBackward(state, dispatch, view) {\n var ref = state.selection;\n var $head = ref.$head;\n var empty = ref.empty;\n var $cut = $head;\n if (!empty) { return false }\n\n if ($head.parent.isTextblock) {\n if (view ? !view.endOfTextblock(\"backward\", state) : $head.parentOffset > 0) { return false }\n $cut = findCutBefore($head);\n }\n var node = $cut && $cut.nodeBefore;\n if (!node || !NodeSelection.isSelectable(node)) { return false }\n if (dispatch)\n { dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos - node.nodeSize)).scrollIntoView()); }\n return true\n}\n\nfunction findCutBefore($pos) {\n if (!$pos.parent.type.spec.isolating) { for (var i = $pos.depth - 1; i >= 0; i--) {\n if ($pos.index(i) > 0) { return $pos.doc.resolve($pos.before(i + 1)) }\n if ($pos.node(i).type.spec.isolating) { break }\n } }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// If the selection is empty and the cursor is at the end of a\n// textblock, try to reduce or remove the boundary between that block\n// and the one after it, either by joining them or by moving the other\n// block closer to this one in the tree structure. Will use the view\n// for accurate start-of-textblock detection if given.\nfunction joinForward(state, dispatch, view) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || (view ? !view.endOfTextblock(\"forward\", state)\n : $cursor.parentOffset < $cursor.parent.content.size))\n { return false }\n\n var $cut = findCutAfter($cursor);\n\n // If there is no node after this, there's nothing to do\n if (!$cut) { return false }\n\n var after = $cut.nodeAfter;\n // Try the joining algorithm\n if (deleteBarrier(state, $cut, dispatch)) { return true }\n\n // If the node above has no content and the node below is\n // selectable, delete the node above and select the one below.\n if ($cursor.parent.content.size == 0 &&\n (textblockAt(after, \"start\") || NodeSelection.isSelectable(after))) {\n if (dispatch) {\n var tr = state.tr.deleteRange($cursor.before(), $cursor.after());\n tr.setSelection(textblockAt(after, \"start\") ? Selection.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos)), 1)\n : NodeSelection.create(tr.doc, tr.mapping.map($cut.pos)));\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n // If the next node is an atom, delete it\n if (after.isAtom && $cut.depth == $cursor.depth - 1) {\n if (dispatch) { dispatch(state.tr.delete($cut.pos, $cut.pos + after.nodeSize).scrollIntoView()); }\n return true\n }\n\n return false\n}\n\n// :: (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// When the selection is empty and at the end of a textblock, select\n// the node coming after that textblock, if possible. This is intended\n// to be bound to keys like delete, after\n// [`joinForward`](#commands.joinForward) and similar deleting\n// commands, to provide a fall-back behavior when the schema doesn't\n// allow deletion at the selected point.\nfunction selectNodeForward(state, dispatch, view) {\n var ref = state.selection;\n var $head = ref.$head;\n var empty = ref.empty;\n var $cut = $head;\n if (!empty) { return false }\n if ($head.parent.isTextblock) {\n if (view ? !view.endOfTextblock(\"forward\", state) : $head.parentOffset < $head.parent.content.size)\n { return false }\n $cut = findCutAfter($head);\n }\n var node = $cut && $cut.nodeAfter;\n if (!node || !NodeSelection.isSelectable(node)) { return false }\n if (dispatch)\n { dispatch(state.tr.setSelection(NodeSelection.create(state.doc, $cut.pos)).scrollIntoView()); }\n return true\n}\n\nfunction findCutAfter($pos) {\n if (!$pos.parent.type.spec.isolating) { for (var i = $pos.depth - 1; i >= 0; i--) {\n var parent = $pos.node(i);\n if ($pos.index(i) + 1 < parent.childCount) { return $pos.doc.resolve($pos.after(i + 1)) }\n if (parent.type.spec.isolating) { break }\n } }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block or, if there is a text selection, the\n// closest ancestor block of the selection that can be joined, with\n// the sibling above it.\nfunction joinUp(state, dispatch) {\n var sel = state.selection, nodeSel = sel instanceof NodeSelection, point;\n if (nodeSel) {\n if (sel.node.isTextblock || !canJoin(state.doc, sel.from)) { return false }\n point = sel.from;\n } else {\n point = joinPoint(state.doc, sel.from, -1);\n if (point == null) { return false }\n }\n if (dispatch) {\n var tr = state.tr.join(point);\n if (nodeSel) { tr.setSelection(NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize)); }\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Join the selected block, or the closest ancestor of the selection\n// that can be joined, with the sibling after it.\nfunction joinDown(state, dispatch) {\n var sel = state.selection, point;\n if (sel instanceof NodeSelection) {\n if (sel.node.isTextblock || !canJoin(state.doc, sel.to)) { return false }\n point = sel.to;\n } else {\n point = joinPoint(state.doc, sel.to, 1);\n if (point == null) { return false }\n }\n if (dispatch)\n { dispatch(state.tr.join(point).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Lift the selected block, or the closest ancestor block of the\n// selection that can be lifted, out of its parent node.\nfunction lift(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), target = range && liftTarget(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If the selection is in a node whose type has a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, replace the\n// selection with a newline character.\nfunction newlineInCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) { return false }\n if (dispatch) { dispatch(state.tr.insertText(\"\\n\").scrollIntoView()); }\n return true\n}\n\nfunction defaultBlockAt(match) {\n for (var i = 0; i < match.edgeCount; i++) {\n var ref = match.edge(i);\n var type = ref.type;\n if (type.isTextblock && !type.hasRequiredAttrs()) { return type }\n }\n return null\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// When the selection is in a node with a truthy\n// [`code`](#model.NodeSpec.code) property in its spec, create a\n// default block after the code block, and move the cursor there.\nfunction exitCode(state, dispatch) {\n var ref = state.selection;\n var $head = ref.$head;\n var $anchor = ref.$anchor;\n if (!$head.parent.type.spec.code || !$head.sameParent($anchor)) { return false }\n var above = $head.node(-1), after = $head.indexAfter(-1), type = defaultBlockAt(above.contentMatchAt(after));\n if (!above.canReplaceWith(after, after, type)) { return false }\n if (dispatch) {\n var pos = $head.after(), tr = state.tr.replaceWith(pos, pos, type.createAndFill());\n tr.setSelection(Selection.near(tr.doc.resolve(pos), 1));\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If a block node is selected, create an empty paragraph before (if\n// it is its parent's first child) or after it.\nfunction createParagraphNear(state, dispatch) {\n var sel = state.selection;\n var $from = sel.$from;\n var $to = sel.$to;\n if (sel instanceof AllSelection || $from.parent.inlineContent || $to.parent.inlineContent) { return false }\n var type = defaultBlockAt($to.parent.contentMatchAt($to.indexAfter()));\n if (!type || !type.isTextblock) { return false }\n if (dispatch) {\n var side = (!$from.parentOffset && $to.index() < $to.parent.childCount ? $from : $to).pos;\n var tr = state.tr.insert(side, type.createAndFill());\n tr.setSelection(TextSelection.create(tr.doc, side + 1));\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// If the cursor is in an empty textblock that can be lifted, lift the\n// block.\nfunction liftEmptyBlock(state, dispatch) {\n var ref = state.selection;\n var $cursor = ref.$cursor;\n if (!$cursor || $cursor.parent.content.size) { return false }\n if ($cursor.depth > 1 && $cursor.after() != $cursor.end(-1)) {\n var before = $cursor.before();\n if (canSplit(state.doc, before)) {\n if (dispatch) { dispatch(state.tr.split(before).scrollIntoView()); }\n return true\n }\n }\n var range = $cursor.blockRange(), target = range && liftTarget(range);\n if (target == null) { return false }\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Split the parent block of the selection. If the selection is a text\n// selection, also delete its content.\nfunction splitBlock(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {\n if (!$from.parentOffset || !canSplit(state.doc, $from.pos)) { return false }\n if (dispatch) { dispatch(state.tr.split($from.pos).scrollIntoView()); }\n return true\n }\n\n if (!$from.parent.isBlock) { return false }\n\n if (dispatch) {\n var atEnd = $to.parentOffset == $to.parent.content.size;\n var tr = state.tr;\n if (state.selection instanceof TextSelection || state.selection instanceof AllSelection) { tr.deleteSelection(); }\n var deflt = $from.depth == 0 ? null : defaultBlockAt($from.node(-1).contentMatchAt($from.indexAfter(-1)));\n var types = atEnd && deflt ? [{type: deflt}] : null;\n var can = canSplit(tr.doc, tr.mapping.map($from.pos), 1, types);\n if (!types && !can && canSplit(tr.doc, tr.mapping.map($from.pos), 1, deflt && [{type: deflt}])) {\n types = [{type: deflt}];\n can = true;\n }\n if (can) {\n tr.split(tr.mapping.map($from.pos), 1, types);\n if (!atEnd && !$from.parentOffset && $from.parent.type != deflt &&\n $from.node(-1).canReplace($from.index(-1), $from.indexAfter(-1), Fragment.from([deflt.create(), $from.parent])))\n { tr.setNodeMarkup(tr.mapping.map($from.before()), deflt); }\n }\n dispatch(tr.scrollIntoView());\n }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Acts like [`splitBlock`](#commands.splitBlock), but without\n// resetting the set of active marks at the cursor.\nfunction splitBlockKeepMarks(state, dispatch) {\n return splitBlock(state, dispatch && (function (tr) {\n var marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());\n if (marks) { tr.ensureMarks(marks); }\n dispatch(tr);\n }))\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Move the selection to the node wrapping the current selection, if\n// any. (Will not select the document node.)\nfunction selectParentNode(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var to = ref.to;\n var pos;\n var same = $from.sharedDepth(to);\n if (same == 0) { return false }\n pos = $from.before(same);\n if (dispatch) { dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos))); }\n return true\n}\n\n// :: (EditorState, ?(tr: Transaction)) → bool\n// Select the whole document.\nfunction selectAll(state, dispatch) {\n if (dispatch) { dispatch(state.tr.setSelection(new AllSelection(state.doc))); }\n return true\n}\n\nfunction joinMaybeClear(state, $pos, dispatch) {\n var before = $pos.nodeBefore, after = $pos.nodeAfter, index = $pos.index();\n if (!before || !after || !before.type.compatibleContent(after.type)) { return false }\n if (!before.content.size && $pos.parent.canReplace(index - 1, index)) {\n if (dispatch) { dispatch(state.tr.delete($pos.pos - before.nodeSize, $pos.pos).scrollIntoView()); }\n return true\n }\n if (!$pos.parent.canReplace(index, index + 1) || !(after.isTextblock || canJoin(state.doc, $pos.pos)))\n { return false }\n if (dispatch)\n { dispatch(state.tr\n .clearIncompatible($pos.pos, before.type, before.contentMatchAt(before.childCount))\n .join($pos.pos)\n .scrollIntoView()); }\n return true\n}\n\nfunction deleteBarrier(state, $cut, dispatch) {\n var before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match;\n if (before.type.spec.isolating || after.type.spec.isolating) { return false }\n if (joinMaybeClear(state, $cut, dispatch)) { return true }\n\n var canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1);\n if (canDelAfter &&\n (conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) &&\n match.matchType(conn[0] || after.type).validEnd) {\n if (dispatch) {\n var end = $cut.pos + after.nodeSize, wrap = Fragment.empty;\n for (var i = conn.length - 1; i >= 0; i--)\n { wrap = Fragment.from(conn[i].create(null, wrap)); }\n wrap = Fragment.from(before.copy(wrap));\n var tr = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice(wrap, 1, 0), conn.length, true));\n var joinAt = end + 2 * conn.length;\n if (canJoin(tr.doc, joinAt)) { tr.join(joinAt); }\n dispatch(tr.scrollIntoView());\n }\n return true\n }\n\n var selAfter = Selection.findFrom($cut, 1);\n var range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && liftTarget(range);\n if (target != null && target >= $cut.depth) {\n if (dispatch) { dispatch(state.tr.lift(range, target).scrollIntoView()); }\n return true\n }\n\n if (canDelAfter && after.isTextblock && textblockAt(before, \"end\")) {\n var at = before, wrap$1 = [];\n for (;;) {\n wrap$1.push(at);\n if (at.isTextblock) { break }\n at = at.lastChild;\n }\n if (at.canReplace(at.childCount, at.childCount, after.content)) {\n if (dispatch) {\n var end$1 = Fragment.empty;\n for (var i$1 = wrap$1.length - 1; i$1 >= 0; i$1--) { end$1 = Fragment.from(wrap$1[i$1].copy(end$1)); }\n var tr$1 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap$1.length, $cut.pos + after.nodeSize,\n $cut.pos + 1, $cut.pos + after.nodeSize - 1,\n new Slice(end$1, wrap$1.length, 0), 0, true));\n dispatch(tr$1.scrollIntoView());\n }\n return true\n }\n }\n\n return false\n}\n\n// Parameterized commands\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Wrap the selection in a node of the given type with the given\n// attributes.\nfunction wrapIn(nodeType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), wrapping = range && findWrapping(range, nodeType, attrs);\n if (!wrapping) { return false }\n if (dispatch) { dispatch(state.tr.wrap(range, wrapping).scrollIntoView()); }\n return true\n }\n}\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command that tries to set the selected textblocks to the\n// given node type with the given attributes.\nfunction setBlockType(nodeType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var from = ref.from;\n var to = ref.to;\n var applicable = false;\n state.doc.nodesBetween(from, to, function (node, pos) {\n if (applicable) { return false }\n if (!node.isTextblock || node.hasMarkup(nodeType, attrs)) { return }\n if (node.type == nodeType) {\n applicable = true;\n } else {\n var $pos = state.doc.resolve(pos), index = $pos.index();\n applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);\n }\n });\n if (!applicable) { return false }\n if (dispatch) { dispatch(state.tr.setBlockType(from, to, nodeType, attrs).scrollIntoView()); }\n return true\n }\n}\n\nfunction markApplies(doc, ranges, type) {\n var loop = function ( i ) {\n var ref = ranges[i];\n var $from = ref.$from;\n var $to = ref.$to;\n var can = $from.depth == 0 ? doc.type.allowsMarkType(type) : false;\n doc.nodesBetween($from.pos, $to.pos, function (node) {\n if (can) { return false }\n can = node.inlineContent && node.type.allowsMarkType(type);\n });\n if (can) { return { v: true } }\n };\n\n for (var i = 0; i < ranges.length; i++) {\n var returned = loop( i );\n\n if ( returned ) return returned.v;\n }\n return false\n}\n\n// :: (MarkType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command function that toggles the given mark with the\n// given attributes. Will return `false` when the current selection\n// doesn't support that mark. This will remove the mark if any marks\n// of that type exist in the selection, or add it otherwise. If the\n// selection is empty, this applies to the [stored\n// marks](#state.EditorState.storedMarks) instead of a range of the\n// document.\nfunction toggleMark(markType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var empty = ref.empty;\n var $cursor = ref.$cursor;\n var ranges = ref.ranges;\n if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType)) { return false }\n if (dispatch) {\n if ($cursor) {\n if (markType.isInSet(state.storedMarks || $cursor.marks()))\n { dispatch(state.tr.removeStoredMark(markType)); }\n else\n { dispatch(state.tr.addStoredMark(markType.create(attrs))); }\n } else {\n var has = false, tr = state.tr;\n for (var i = 0; !has && i < ranges.length; i++) {\n var ref$1 = ranges[i];\n var $from = ref$1.$from;\n var $to = ref$1.$to;\n has = state.doc.rangeHasMark($from.pos, $to.pos, markType);\n }\n for (var i$1 = 0; i$1 < ranges.length; i$1++) {\n var ref$2 = ranges[i$1];\n var $from$1 = ref$2.$from;\n var $to$1 = ref$2.$to;\n if (has) {\n tr.removeMark($from$1.pos, $to$1.pos, markType);\n } else {\n var from = $from$1.pos, to = $to$1.pos, start = $from$1.nodeAfter, end = $to$1.nodeBefore;\n var spaceStart = start && start.isText ? /^\\s*/.exec(start.text)[0].length : 0;\n var spaceEnd = end && end.isText ? /\\s*$/.exec(end.text)[0].length : 0;\n if (from + spaceStart < to) { from += spaceStart; to -= spaceEnd; }\n tr.addMark(from, to, markType.create(attrs));\n }\n }\n dispatch(tr.scrollIntoView());\n }\n }\n return true\n }\n}\n\nfunction wrapDispatchForJoin(dispatch, isJoinable) {\n return function (tr) {\n if (!tr.isGeneric) { return dispatch(tr) }\n\n var ranges = [];\n for (var i = 0; i < tr.mapping.maps.length; i++) {\n var map = tr.mapping.maps[i];\n for (var j = 0; j < ranges.length; j++)\n { ranges[j] = map.map(ranges[j]); }\n map.forEach(function (_s, _e, from, to) { return ranges.push(from, to); });\n }\n\n // Figure out which joinable points exist inside those ranges,\n // by checking all node boundaries in their parent nodes.\n var joinable = [];\n for (var i$1 = 0; i$1 < ranges.length; i$1 += 2) {\n var from = ranges[i$1], to = ranges[i$1 + 1];\n var $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth);\n for (var index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {\n var after = parent.maybeChild(index);\n if (!after) { break }\n if (index && joinable.indexOf(pos) == -1) {\n var before = parent.child(index - 1);\n if (before.type == after.type && isJoinable(before, after))\n { joinable.push(pos); }\n }\n pos += after.nodeSize;\n }\n }\n // Join the joinable points\n joinable.sort(function (a, b) { return a - b; });\n for (var i$2 = joinable.length - 1; i$2 >= 0; i$2--) {\n if (canJoin(tr.doc, joinable[i$2])) { tr.join(joinable[i$2]); }\n }\n dispatch(tr);\n }\n}\n\n// :: ((state: EditorState, ?(tr: Transaction)) → bool, union<(before: Node, after: Node) → bool, [string]>) → (state: EditorState, ?(tr: Transaction)) → bool\n// Wrap a command so that, when it produces a transform that causes\n// two joinable nodes to end up next to each other, those are joined.\n// Nodes are considered joinable when they are of the same type and\n// when the `isJoinable` predicate returns true for them or, if an\n// array of strings was passed, if their node type name is in that\n// array.\nfunction autoJoin(command, isJoinable) {\n if (Array.isArray(isJoinable)) {\n var types = isJoinable;\n isJoinable = function (node) { return types.indexOf(node.type.name) > -1; };\n }\n return function (state, dispatch) { return command(state, dispatch && wrapDispatchForJoin(dispatch, isJoinable)); }\n}\n\n// :: (...[(EditorState, ?(tr: Transaction), ?EditorView) → bool]) → (EditorState, ?(tr: Transaction), ?EditorView) → bool\n// Combine a number of command functions into a single function (which\n// calls them one by one until one returns true).\nfunction chainCommands() {\n var commands = [], len = arguments.length;\n while ( len-- ) commands[ len ] = arguments[ len ];\n\n return function(state, dispatch, view) {\n for (var i = 0; i < commands.length; i++)\n { if (commands[i](state, dispatch, view)) { return true } }\n return false\n }\n}\n\nvar backspace = chainCommands(deleteSelection, joinBackward, selectNodeBackward);\nvar del = chainCommands(deleteSelection, joinForward, selectNodeForward);\n\n// :: Object\n// A basic keymap containing bindings not specific to any schema.\n// Binds the following keys (when multiple commands are listed, they\n// are chained with [`chainCommands`](#commands.chainCommands)):\n//\n// * **Enter** to `newlineInCode`, `createParagraphNear`, `liftEmptyBlock`, `splitBlock`\n// * **Mod-Enter** to `exitCode`\n// * **Backspace** and **Mod-Backspace** to `deleteSelection`, `joinBackward`, `selectNodeBackward`\n// * **Delete** and **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-Delete** to `deleteSelection`, `joinForward`, `selectNodeForward`\n// * **Mod-a** to `selectAll`\nvar pcBaseKeymap = {\n \"Enter\": chainCommands(newlineInCode, createParagraphNear, liftEmptyBlock, splitBlock),\n \"Mod-Enter\": exitCode,\n \"Backspace\": backspace,\n \"Mod-Backspace\": backspace,\n \"Delete\": del,\n \"Mod-Delete\": del,\n \"Mod-a\": selectAll\n};\n\n// :: Object\n// A copy of `pcBaseKeymap` that also binds **Ctrl-h** like Backspace,\n// **Ctrl-d** like Delete, **Alt-Backspace** like Ctrl-Backspace, and\n// **Ctrl-Alt-Backspace**, **Alt-Delete**, and **Alt-d** like\n// Ctrl-Delete.\nvar macBaseKeymap = {\n \"Ctrl-h\": pcBaseKeymap[\"Backspace\"],\n \"Alt-Backspace\": pcBaseKeymap[\"Mod-Backspace\"],\n \"Ctrl-d\": pcBaseKeymap[\"Delete\"],\n \"Ctrl-Alt-Backspace\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-Delete\": pcBaseKeymap[\"Mod-Delete\"],\n \"Alt-d\": pcBaseKeymap[\"Mod-Delete\"]\n};\nfor (var key in pcBaseKeymap) { macBaseKeymap[key] = pcBaseKeymap[key]; }\n\n// declare global: os, navigator\nvar mac = typeof navigator != \"undefined\" ? /Mac/.test(navigator.platform)\n : typeof os != \"undefined\" ? os.platform() == \"darwin\" : false;\n\n// :: Object\n// Depending on the detected platform, this will hold\n// [`pcBasekeymap`](#commands.pcBaseKeymap) or\n// [`macBaseKeymap`](#commands.macBaseKeymap).\nvar baseKeymap = mac ? macBaseKeymap : pcBaseKeymap;\n\nexport { autoJoin, baseKeymap, chainCommands, createParagraphNear, deleteSelection, exitCode, joinBackward, joinDown, joinForward, joinUp, lift, liftEmptyBlock, macBaseKeymap, newlineInCode, pcBaseKeymap, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, setBlockType, splitBlock, splitBlockKeepMarks, toggleMark, wrapIn };\n//# sourceMappingURL=index.es.js.map\n","(function(global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([ \"exports\" ], factory) : factory(global.ActiveStorage = {});\n})(this, function(exports) {\n \"use strict\";\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n var sparkMd5 = createCommonjsModule(function(module, exports) {\n (function(factory) {\n {\n module.exports = factory();\n }\n })(function(undefined) {\n var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n function md5cycle(x, k) {\n var a = x[0], b = x[1], c = x[2], d = x[3];\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n function md5blk(s) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n }\n function md5blk_array(a) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n }\n return md5blks;\n }\n function md51(s) {\n var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n length = s.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function md51_array(a) {\n var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n }\n a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n length = a.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= a[i] << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function rhex(n) {\n var s = \"\", j;\n for (j = 0; j < 4; j += 1) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n return s;\n }\n function hex(x) {\n var i;\n for (i = 0; i < x.length; i += 1) {\n x[i] = rhex(x[i]);\n }\n return x.join(\"\");\n }\n if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n (function() {\n function clamp(val, length) {\n val = val | 0 || 0;\n if (val < 0) {\n return Math.max(val + length, 0);\n }\n return Math.min(val, length);\n }\n ArrayBuffer.prototype.slice = function(from, to) {\n var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n if (to !== undefined) {\n end = clamp(to, length);\n }\n if (begin > end) {\n return new ArrayBuffer(0);\n }\n num = end - begin;\n target = new ArrayBuffer(num);\n targetArray = new Uint8Array(target);\n sourceArray = new Uint8Array(this, begin, num);\n targetArray.set(sourceArray);\n return target;\n };\n })();\n }\n function toUtf8(str) {\n if (/[\\u0080-\\uFFFF]/.test(str)) {\n str = unescape(encodeURIComponent(str));\n }\n return str;\n }\n function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n for (i = 0; i < length; i += 1) {\n arr[i] = str.charCodeAt(i);\n }\n return returnUInt8Array ? arr : buff;\n }\n function arrayBuffer2Utf8Str(buff) {\n return String.fromCharCode.apply(null, new Uint8Array(buff));\n }\n function concatenateArrayBuffers(first, second, returnUInt8Array) {\n var result = new Uint8Array(first.byteLength + second.byteLength);\n result.set(new Uint8Array(first));\n result.set(new Uint8Array(second), first.byteLength);\n return returnUInt8Array ? result : result.buffer;\n }\n function hexToBinaryString(hex) {\n var bytes = [], length = hex.length, x;\n for (x = 0; x < length - 1; x += 2) {\n bytes.push(parseInt(hex.substr(x, 2), 16));\n }\n return String.fromCharCode.apply(String, bytes);\n }\n function SparkMD5() {\n this.reset();\n }\n SparkMD5.prototype.append = function(str) {\n this.appendBinary(toUtf8(str));\n return this;\n };\n SparkMD5.prototype.appendBinary = function(contents) {\n this._buff += contents;\n this._length += contents.length;\n var length = this._buff.length, i;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n }\n this._buff = this._buff.substring(i - 64);\n return this;\n };\n SparkMD5.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.prototype.reset = function() {\n this._buff = \"\";\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.prototype.getState = function() {\n return {\n buff: this._buff,\n length: this._length,\n hash: this._hash\n };\n };\n SparkMD5.prototype.setState = function(state) {\n this._buff = state.buff;\n this._length = state.length;\n this._hash = state.hash;\n return this;\n };\n SparkMD5.prototype.destroy = function() {\n delete this._hash;\n delete this._buff;\n delete this._length;\n };\n SparkMD5.prototype._finish = function(tail, length) {\n var i = length, tmp, lo, hi;\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(this._hash, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = this._length * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(this._hash, tail);\n };\n SparkMD5.hash = function(str, raw) {\n return SparkMD5.hashBinary(toUtf8(str), raw);\n };\n SparkMD5.hashBinary = function(content, raw) {\n var hash = md51(content), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n SparkMD5.ArrayBuffer = function() {\n this.reset();\n };\n SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n this._length += arr.byteLength;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n }\n this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff[i] << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.ArrayBuffer.prototype.reset = function() {\n this._buff = new Uint8Array(0);\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.getState = function() {\n var state = SparkMD5.prototype.getState.call(this);\n state.buff = arrayBuffer2Utf8Str(state.buff);\n return state;\n };\n SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n state.buff = utf8Str2ArrayBuffer(state.buff, true);\n return SparkMD5.prototype.setState.call(this, state);\n };\n SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n return SparkMD5;\n });\n });\n var classCallCheck = function(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n var createClass = function() {\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 return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n var FileChecksum = function() {\n createClass(FileChecksum, null, [ {\n key: \"create\",\n value: function create(file, callback) {\n var instance = new FileChecksum(file);\n instance.create(callback);\n }\n } ]);\n function FileChecksum(file) {\n classCallCheck(this, FileChecksum);\n this.file = file;\n this.chunkSize = 2097152;\n this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n this.chunkIndex = 0;\n }\n createClass(FileChecksum, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n this.callback = callback;\n this.md5Buffer = new sparkMd5.ArrayBuffer();\n this.fileReader = new FileReader();\n this.fileReader.addEventListener(\"load\", function(event) {\n return _this.fileReaderDidLoad(event);\n });\n this.fileReader.addEventListener(\"error\", function(event) {\n return _this.fileReaderDidError(event);\n });\n this.readNextChunk();\n }\n }, {\n key: \"fileReaderDidLoad\",\n value: function fileReaderDidLoad(event) {\n this.md5Buffer.append(event.target.result);\n if (!this.readNextChunk()) {\n var binaryDigest = this.md5Buffer.end(true);\n var base64digest = btoa(binaryDigest);\n this.callback(null, base64digest);\n }\n }\n }, {\n key: \"fileReaderDidError\",\n value: function fileReaderDidError(event) {\n this.callback(\"Error reading \" + this.file.name);\n }\n }, {\n key: \"readNextChunk\",\n value: function readNextChunk() {\n if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n var start = this.chunkIndex * this.chunkSize;\n var end = Math.min(start + this.chunkSize, this.file.size);\n var bytes = fileSlice.call(this.file, start, end);\n this.fileReader.readAsArrayBuffer(bytes);\n this.chunkIndex++;\n return true;\n } else {\n return false;\n }\n }\n } ]);\n return FileChecksum;\n }();\n function getMetaValue(name) {\n var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n if (element) {\n return element.getAttribute(\"content\");\n }\n }\n function findElements(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n var elements = root.querySelectorAll(selector);\n return toArray$1(elements);\n }\n function findElement(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n return root.querySelector(selector);\n }\n function dispatchEvent(element, type) {\n var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var disabled = element.disabled;\n var bubbles = eventInit.bubbles, cancelable = eventInit.cancelable, detail = eventInit.detail;\n var event = document.createEvent(\"Event\");\n event.initEvent(type, bubbles || true, cancelable || true);\n event.detail = detail || {};\n try {\n element.disabled = false;\n element.dispatchEvent(event);\n } finally {\n element.disabled = disabled;\n }\n return event;\n }\n function toArray$1(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (Array.from) {\n return Array.from(value);\n } else {\n return [].slice.call(value);\n }\n }\n var BlobRecord = function() {\n function BlobRecord(file, checksum, url) {\n var _this = this;\n classCallCheck(this, BlobRecord);\n this.file = file;\n this.attributes = {\n filename: file.name,\n content_type: file.type || \"application/octet-stream\",\n byte_size: file.size,\n checksum: checksum\n };\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"POST\", url, true);\n this.xhr.responseType = \"json\";\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n var csrfToken = getMetaValue(\"csrf-token\");\n if (csrfToken != undefined) {\n this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n }\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobRecord, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(JSON.stringify({\n blob: this.attributes\n }));\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n if (this.status >= 200 && this.status < 300) {\n var response = this.response;\n var direct_upload = response.direct_upload;\n delete response.direct_upload;\n this.attributes = response;\n this.directUploadData = direct_upload;\n this.callback(null, this.toJSON());\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var result = {};\n for (var key in this.attributes) {\n result[key] = this.attributes[key];\n }\n return result;\n }\n }, {\n key: \"status\",\n get: function get$$1() {\n return this.xhr.status;\n }\n }, {\n key: \"response\",\n get: function get$$1() {\n var _xhr = this.xhr, responseType = _xhr.responseType, response = _xhr.response;\n if (responseType == \"json\") {\n return response;\n } else {\n return JSON.parse(response);\n }\n }\n } ]);\n return BlobRecord;\n }();\n var BlobUpload = function() {\n function BlobUpload(blob) {\n var _this = this;\n classCallCheck(this, BlobUpload);\n this.blob = blob;\n this.file = blob.file;\n var _blob$directUploadDat = blob.directUploadData, url = _blob$directUploadDat.url, headers = _blob$directUploadDat.headers;\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"PUT\", url, true);\n this.xhr.responseType = \"text\";\n for (var key in headers) {\n this.xhr.setRequestHeader(key, headers[key]);\n }\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobUpload, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(this.file.slice());\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n var _xhr = this.xhr, status = _xhr.status, response = _xhr.response;\n if (status >= 200 && status < 300) {\n this.callback(null, response);\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n }\n } ]);\n return BlobUpload;\n }();\n var id = 0;\n var DirectUpload = function() {\n function DirectUpload(file, url, delegate) {\n classCallCheck(this, DirectUpload);\n this.id = ++id;\n this.file = file;\n this.url = url;\n this.delegate = delegate;\n }\n createClass(DirectUpload, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n FileChecksum.create(this.file, function(error, checksum) {\n if (error) {\n callback(error);\n return;\n }\n var blob = new BlobRecord(_this.file, checksum, _this.url);\n notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n blob.create(function(error) {\n if (error) {\n callback(error);\n } else {\n var upload = new BlobUpload(blob);\n notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n upload.create(function(error) {\n if (error) {\n callback(error);\n } else {\n callback(null, blob.toJSON());\n }\n });\n }\n });\n });\n }\n } ]);\n return DirectUpload;\n }();\n function notify(object, methodName) {\n if (object && typeof object[methodName] == \"function\") {\n for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n messages[_key - 2] = arguments[_key];\n }\n return object[methodName].apply(object, messages);\n }\n }\n var DirectUploadController = function() {\n function DirectUploadController(input, file) {\n classCallCheck(this, DirectUploadController);\n this.input = input;\n this.file = file;\n this.directUpload = new DirectUpload(this.file, this.url, this);\n this.dispatch(\"initialize\");\n }\n createClass(DirectUploadController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = this.input.name;\n this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n this.dispatch(\"start\");\n this.directUpload.create(function(error, attributes) {\n if (error) {\n hiddenInput.parentNode.removeChild(hiddenInput);\n _this.dispatchError(error);\n } else {\n hiddenInput.value = attributes.signed_id;\n }\n _this.dispatch(\"end\");\n callback(error);\n });\n }\n }, {\n key: \"uploadRequestDidProgress\",\n value: function uploadRequestDidProgress(event) {\n var progress = event.loaded / event.total * 100;\n if (progress) {\n this.dispatch(\"progress\", {\n progress: progress\n });\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n detail.file = this.file;\n detail.id = this.directUpload.id;\n return dispatchEvent(this.input, \"direct-upload:\" + name, {\n detail: detail\n });\n }\n }, {\n key: \"dispatchError\",\n value: function dispatchError(error) {\n var event = this.dispatch(\"error\", {\n error: error\n });\n if (!event.defaultPrevented) {\n alert(error);\n }\n }\n }, {\n key: \"directUploadWillCreateBlobWithXHR\",\n value: function directUploadWillCreateBlobWithXHR(xhr) {\n this.dispatch(\"before-blob-request\", {\n xhr: xhr\n });\n }\n }, {\n key: \"directUploadWillStoreFileWithXHR\",\n value: function directUploadWillStoreFileWithXHR(xhr) {\n var _this2 = this;\n this.dispatch(\"before-storage-request\", {\n xhr: xhr\n });\n xhr.upload.addEventListener(\"progress\", function(event) {\n return _this2.uploadRequestDidProgress(event);\n });\n }\n }, {\n key: \"url\",\n get: function get$$1() {\n return this.input.getAttribute(\"data-direct-upload-url\");\n }\n } ]);\n return DirectUploadController;\n }();\n var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n var DirectUploadsController = function() {\n function DirectUploadsController(form) {\n classCallCheck(this, DirectUploadsController);\n this.form = form;\n this.inputs = findElements(form, inputSelector).filter(function(input) {\n return input.files.length;\n });\n }\n createClass(DirectUploadsController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var controllers = this.createDirectUploadControllers();\n var startNextController = function startNextController() {\n var controller = controllers.shift();\n if (controller) {\n controller.start(function(error) {\n if (error) {\n callback(error);\n _this.dispatch(\"end\");\n } else {\n startNextController();\n }\n });\n } else {\n callback();\n _this.dispatch(\"end\");\n }\n };\n this.dispatch(\"start\");\n startNextController();\n }\n }, {\n key: \"createDirectUploadControllers\",\n value: function createDirectUploadControllers() {\n var controllers = [];\n this.inputs.forEach(function(input) {\n toArray$1(input.files).forEach(function(file) {\n var controller = new DirectUploadController(input, file);\n controllers.push(controller);\n });\n });\n return controllers;\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n detail: detail\n });\n }\n } ]);\n return DirectUploadsController;\n }();\n var processingAttribute = \"data-direct-uploads-processing\";\n var submitButtonsByForm = new WeakMap();\n var started = false;\n function start() {\n if (!started) {\n started = true;\n document.addEventListener(\"click\", didClick, true);\n document.addEventListener(\"submit\", didSubmitForm);\n document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n }\n }\n function didClick(event) {\n var target = event.target;\n if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n submitButtonsByForm.set(target.form, target);\n }\n }\n function didSubmitForm(event) {\n handleFormSubmissionEvent(event);\n }\n function didSubmitRemoteElement(event) {\n if (event.target.tagName == \"FORM\") {\n handleFormSubmissionEvent(event);\n }\n }\n function handleFormSubmissionEvent(event) {\n var form = event.target;\n if (form.hasAttribute(processingAttribute)) {\n event.preventDefault();\n return;\n }\n var controller = new DirectUploadsController(form);\n var inputs = controller.inputs;\n if (inputs.length) {\n event.preventDefault();\n form.setAttribute(processingAttribute, \"\");\n inputs.forEach(disable);\n controller.start(function(error) {\n form.removeAttribute(processingAttribute);\n if (error) {\n inputs.forEach(enable);\n } else {\n submitForm(form);\n }\n });\n }\n }\n function submitForm(form) {\n var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n if (button) {\n var _button = button, disabled = _button.disabled;\n button.disabled = false;\n button.focus();\n button.click();\n button.disabled = disabled;\n } else {\n button = document.createElement(\"input\");\n button.type = \"submit\";\n button.style.display = \"none\";\n form.appendChild(button);\n button.click();\n form.removeChild(button);\n }\n submitButtonsByForm.delete(form);\n }\n function disable(input) {\n input.disabled = true;\n }\n function enable(input) {\n input.disabled = false;\n }\n function autostart() {\n if (window.ActiveStorage) {\n start();\n }\n }\n setTimeout(autostart, 1);\n exports.start = start;\n exports.DirectUpload = DirectUpload;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n});\n","import { findWrapping, ReplaceAroundStep, canSplit, liftTarget } from 'prosemirror-transform';\nimport { NodeRange, Fragment, Slice } from 'prosemirror-model';\n\nvar olDOM = [\"ol\", 0], ulDOM = [\"ul\", 0], liDOM = [\"li\", 0];\n\n// :: NodeSpec\n// An ordered list [node spec](#model.NodeSpec). Has a single\n// attribute, `order`, which determines the number at which the list\n// starts counting, and defaults to 1. Represented as an `

    `\n// element.\nvar orderedList = {\n attrs: {order: {default: 1}},\n parseDOM: [{tag: \"ol\", getAttrs: function getAttrs(dom) {\n return {order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\") : 1}\n }}],\n toDOM: function toDOM(node) {\n return node.attrs.order == 1 ? olDOM : [\"ol\", {start: node.attrs.order}, 0]\n }\n};\n\n// :: NodeSpec\n// A bullet list node spec, represented in the DOM as `
      `.\nvar bulletList = {\n parseDOM: [{tag: \"ul\"}],\n toDOM: function toDOM() { return ulDOM }\n};\n\n// :: NodeSpec\n// A list item (`
    • `) spec.\nvar listItem = {\n parseDOM: [{tag: \"li\"}],\n toDOM: function toDOM() { return liDOM },\n defining: true\n};\n\nfunction add(obj, props) {\n var copy = {};\n for (var prop in obj) { copy[prop] = obj[prop]; }\n for (var prop$1 in props) { copy[prop$1] = props[prop$1]; }\n return copy\n}\n\n// :: (OrderedMap, string, ?string) → OrderedMap\n// Convenience function for adding list-related node types to a map\n// specifying the nodes for a schema. Adds\n// [`orderedList`](#schema-list.orderedList) as `\"ordered_list\"`,\n// [`bulletList`](#schema-list.bulletList) as `\"bullet_list\"`, and\n// [`listItem`](#schema-list.listItem) as `\"list_item\"`.\n//\n// `itemContent` determines the content expression for the list items.\n// If you want the commands defined in this module to apply to your\n// list structure, it should have a shape like `\"paragraph block*\"` or\n// `\"paragraph (ordered_list | bullet_list)*\"`. `listGroup` can be\n// given to assign a group name to the list node types, for example\n// `\"block\"`.\nfunction addListNodes(nodes, itemContent, listGroup) {\n return nodes.append({\n ordered_list: add(orderedList, {content: \"list_item+\", group: listGroup}),\n bullet_list: add(bulletList, {content: \"list_item+\", group: listGroup}),\n list_item: add(listItem, {content: itemContent})\n })\n}\n\n// :: (NodeType, ?Object) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Returns a command function that wraps the selection in a list with\n// the given type an attributes. If `dispatch` is null, only return a\n// value to indicate whether this is possible, but don't actually\n// perform the change.\nfunction wrapInList(listType, attrs) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to), doJoin = false, outerRange = range;\n if (!range) { return false }\n // This is at the top of an existing list item\n if (range.depth >= 2 && $from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {\n // Don't do anything if this is the top of the list\n if ($from.index(range.depth - 1) == 0) { return false }\n var $insert = state.doc.resolve(range.start - 2);\n outerRange = new NodeRange($insert, $insert, range.depth);\n if (range.endIndex < range.parent.childCount)\n { range = new NodeRange($from, state.doc.resolve($to.end(range.depth)), range.depth); }\n doJoin = true;\n }\n var wrap = findWrapping(outerRange, listType, attrs, range);\n if (!wrap) { return false }\n if (dispatch) { dispatch(doWrapInList(state.tr, range, wrap, doJoin, listType).scrollIntoView()); }\n return true\n }\n}\n\nfunction doWrapInList(tr, range, wrappers, joinBefore, listType) {\n var content = Fragment.empty;\n for (var i = wrappers.length - 1; i >= 0; i--)\n { content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content)); }\n\n tr.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end,\n new Slice(content, 0, 0), wrappers.length, true));\n\n var found = 0;\n for (var i$1 = 0; i$1 < wrappers.length; i$1++) { if (wrappers[i$1].type == listType) { found = i$1 + 1; } }\n var splitDepth = wrappers.length - found;\n\n var splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0), parent = range.parent;\n for (var i$2 = range.startIndex, e = range.endIndex, first = true; i$2 < e; i$2++, first = false) {\n if (!first && canSplit(tr.doc, splitPos, splitDepth)) {\n tr.split(splitPos, splitDepth);\n splitPos += 2 * splitDepth;\n }\n splitPos += parent.child(i$2).nodeSize;\n }\n return tr\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Build a command that splits a non-empty textblock at the top level\n// of a list item by also splitting that list item.\nfunction splitListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var node = ref.node;\n if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to)) { return false }\n var grandParent = $from.node(-1);\n if (grandParent.type != itemType) { return false }\n if ($from.parent.content.size == 0 && $from.node(-1).childCount == $from.indexAfter(-1)) {\n // In an empty block. If this is a nested list, the wrapping\n // list item should be split. Otherwise, bail out and let next\n // command handle lifting.\n if ($from.depth == 2 || $from.node(-3).type != itemType ||\n $from.index(-2) != $from.node(-2).childCount - 1) { return false }\n if (dispatch) {\n var wrap = Fragment.empty, keepItem = $from.index(-1) > 0;\n // Build a fragment containing empty versions of the structure\n // from the outer list item to the parent node of the cursor\n for (var d = $from.depth - (keepItem ? 1 : 2); d >= $from.depth - 3; d--)\n { wrap = Fragment.from($from.node(d).copy(wrap)); }\n // Add a second list item with an empty default start node\n wrap = wrap.append(Fragment.from(itemType.createAndFill()));\n var tr$1 = state.tr.replace($from.before(keepItem ? null : -1), $from.after(-3), new Slice(wrap, keepItem ? 3 : 2, 2));\n tr$1.setSelection(state.selection.constructor.near(tr$1.doc.resolve($from.pos + (keepItem ? 3 : 2))));\n dispatch(tr$1.scrollIntoView());\n }\n return true\n }\n var nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;\n var tr = state.tr.delete($from.pos, $to.pos);\n var types = nextType && [null, {type: nextType}];\n if (!canSplit(tr.doc, $from.pos, 2, types)) { return false }\n if (dispatch) { dispatch(tr.split($from.pos, 2, types).scrollIntoView()); }\n return true\n }\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to lift the list item around the selection up into\n// a wrapping list.\nfunction liftListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) { return node.childCount && node.firstChild.type == itemType; });\n if (!range) { return false }\n if (!dispatch) { return true }\n if ($from.node(range.depth - 1).type == itemType) // Inside a parent list\n { return liftToOuterList(state, dispatch, itemType, range) }\n else // Outer list node\n { return liftOutOfList(state, dispatch, range) }\n }\n}\n\nfunction liftToOuterList(state, dispatch, itemType, range) {\n var tr = state.tr, end = range.end, endOfList = range.$to.end(range.depth);\n if (end < endOfList) {\n // There are siblings after the lifted items, which must become\n // children of the last item\n tr.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList,\n new Slice(Fragment.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));\n range = new NodeRange(tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);\n }\n dispatch(tr.lift(range, liftTarget(range)).scrollIntoView());\n return true\n}\n\nfunction liftOutOfList(state, dispatch, range) {\n var tr = state.tr, list = range.parent;\n // Merge the list items into a single big item\n for (var pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {\n pos -= list.child(i).nodeSize;\n tr.delete(pos - 1, pos + 1);\n }\n var $start = tr.doc.resolve(range.start), item = $start.nodeAfter;\n var atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;\n var parent = $start.node(-1), indexBefore = $start.index(-1);\n if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1,\n item.content.append(atEnd ? Fragment.empty : Fragment.from(list))))\n { return false }\n var start = $start.pos, end = start + item.nodeSize;\n // Strip off the surrounding list. At the sides where we're not at\n // the end of the list, the existing list is closed. At sides where\n // this is the end, it is overwritten to its end.\n tr.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1,\n new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty)))\n .append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))),\n atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));\n dispatch(tr.scrollIntoView());\n return true\n}\n\n// :: (NodeType) → (state: EditorState, dispatch: ?(tr: Transaction)) → bool\n// Create a command to sink the list item around the selection down\n// into an inner list.\nfunction sinkListItem(itemType) {\n return function(state, dispatch) {\n var ref = state.selection;\n var $from = ref.$from;\n var $to = ref.$to;\n var range = $from.blockRange($to, function (node) { return node.childCount && node.firstChild.type == itemType; });\n if (!range) { return false }\n var startIndex = range.startIndex;\n if (startIndex == 0) { return false }\n var parent = range.parent, nodeBefore = parent.child(startIndex - 1);\n if (nodeBefore.type != itemType) { return false }\n\n if (dispatch) {\n var nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;\n var inner = Fragment.from(nestedBefore ? itemType.create() : null);\n var slice = new Slice(Fragment.from(itemType.create(null, Fragment.from(parent.type.create(null, inner)))),\n nestedBefore ? 3 : 1, 0);\n var before = range.start, after = range.end;\n dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after,\n before, after, slice, 1, true))\n .scrollIntoView());\n }\n return true\n }\n}\n\nexport { addListNodes, bulletList, liftListItem, listItem, orderedList, sinkListItem, splitListItem, wrapInList };\n//# sourceMappingURL=index.es.js.map\n"],"names":["fn","Object","create","fns","forEach","run","thing","a","b","target","node4","appendChild","anchor","insertBefore","parentNode","removeChild","iterations","detaching","i","length","d","name","document","createElement","data","createTextNode","text","event","handler","options","addEventListener","removeEventListener","preventDefault","call","this","attribute","value","removeAttribute","getAttribute","setAttribute","element2","Array","from","childNodes","nodes","attributes","svg","nodeName","j","remove2","push","k","splice","createElementNS","svg_element","element","nodeType","claim_text","key","important","style","setProperty","select","option","__value","selected","toggle","classList","current_component","component","Error","$$","on_mount","on_destroy","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","then","flush","flushing","seen_callbacks","Set","pop","callback","has","add","clear","fragment","update","before_update","dirty","p","ctx","after_update","add_render_callback","outroing","outros","r","c","block","local","delete","detach2","o","parent_nodes","l","customElement","m","new_on_destroy","map","filter","is_function","instance","create_fragment","not_equal","props","parent_component","noop","bound","blank_object","on_disconnect","context","Map","callbacks","skip_bound","ready","ret","rest","fill","hydrate","children","detach","intro","[object Object]","$destroy","type","index2","indexOf","$$props","obj","$$set","keys","RopeSequence","prototype","append","other","leafAppend","leafPrepend","appendInner","prepend","Append","slice","from4","to","empty","sliceInner","Math","max","min","get","getInner","f","forEachInner","forEachInvertedInner","result2","elt","values","Leaf","RopeSequence3","__proto__","constructor","Leaf2","prototypeAccessors2","configurable","depth","flatten","start3","concat","defineProperties","left","right","Append2","leftLen","inner","ropeSequence","content2","content","OrderedMap","find","found2","newKey","self2","remove","addToStart","addToEnd","addBefore","place","without","map14","size","subtract","prop","orderedmap","pos","childCount","childA","child","childB","sameMarkup","isText","findDiffStart","nodeSize","posA","posB","iA","iB","same","minSize","findDiffEnd","Fragment","prototypeAccessors","firstChild","lastChild","nodesBetween","nodeStart","parent","child3","end2","descendants","textBetween","blockSeparator","leafText","text3","separated","isLeaf","isBlock","last","first","withText","cut","cutByIndex","replaceChild","current","copy5","eq","RangeError","maybeChild","otherPos","findIndex","round","retIndex","curPos","toString","toStringInner","join","toJSON","n","fromJSON","schema","isArray","nodeFromJSON","fromArray","array","joined","attrs","found","index","offset","offset2","compareDeep","p$1","Mark","message","err2","ReplaceError","addToSet","set2","placed","excludes","rank","removeFromSet","isInSet","_","json","marks","sameSet","setFrom","marks2","none","sort","Slice","openStart","openEnd","prototypeAccessors$1","ref","ref$1","indexTo","offsetTo","copy","removeRange","dist","insert2","canReplace","insertInto","$from","$to","slice4","replaceOuter","node","$along","extra","start","resolveNoCache","end","prepareSliceForReplace","close","replaceThreeWay","parentOffset","replaceTwoWay","main","sub","compatibleContent","$before","$after","$start","$end","startIndex","endIndex","textOffset","nodeAfter","nodeBefore","validContent","joinable","insertAt","removeBetween","maxOpen","openIsolating","spec","isolating","n$1","ResolvedPos","path","prototypeAccessors$2","doc","resolveDepth","val","indexAfter","before","after","dOff","posAtIndex","tmp","inclusive","marksAcross","after2","isInline","next","sharedDepth","blockRange","pred","inlineContent","NodeRange","sameParent","str","doc2","rem","resolveCached","resolveCache","cached","resolveCachePos","resolveCacheSize","prototypeAccessors$1$1","emptyAttrs","Node","prototypeAccessors$3","textContent","isTextblock","isAtom","startPos","hasMarkup","defaultAttrs","mark","includeParents","replace","nodeAt","childAfter","childBefore","rangeHasMark","toDebugString","wrapMarks","contentMatchAt","match","contentMatch","matchFragment","replacement","one","two","validEnd","allowsMarks","canReplaceWith","matchType","canAppend","check","markFromJSON","TextNode","Node3","TextNode2","prototypeAccessors$12","JSON","stringify","base2","ContentMatch","wrapCache","prototypeAccessors$4","defaultType","edgeCount","parse","string","nodeTypes","stream","TokenStream","expr","parseExpr","err","nfa2","labeled","explore","nullFrom","states","out","term","known","node5","state","states$1","cmp","dfa","compile3","edge3","edges","expr2","exprs","reduce","expr3","loop","edge2","loop$1","cur","i$1","next$1","i$2","next$2","nfa","work","dead","hasRequiredAttrs","frag","compatible","fillBefore","toEnd","seen","types","finished","tp","createAndFill","search","findWrapping","computed","computeWrapping","active","via","shift","reverse","edge","inline","tokens","split","prototypeAccessors$1$2","parseExprSeq","eat","parseExprSubscript","test","typeName","type$1","groups","resolveName","parseExprAtom","parseExprRange","Number","min2","parseNum","max2","scan","defaults","attrName","attr2","hasDefault","default","built","given","Attribute","tok","SyntaxError","NodeType","group","initAttrs","markSet","prototypeAccessors$5","atom","isRequired","computeAttrs","createChecked","before2","allowsMarkType","markType","allowedMarks","compile","topType","topNode","hasOwnProperty","prototypeAccessors$1$3","MarkType","excluded","Schema","contentExprCache","prop$1","contentExpr","markExpr","gatherMarks","prop$2","excl","bind","topNodeType","wrappings","mark3","ok2","mark$1","text$1","DOMParser","rules","this$1","tags","styles","rule","tag","normalizeLists","some","dom","ParseContext","addAll","finish","parseSlice","matchTag","matches","namespace","namespaceURI","matchesContext","getAttrs","matchStyle","charCodeAt","schemaRules","priority","name2","parseDOM","copy2","rules$1","name$1","fromSchema","domParser","blockTags","address","article","aside","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","noscript","ol","output","pre","section","table","tfoot","ul","ignoreTags","head","object","script","title","listTags","preserveWhitespace","NodeContext","pendingMarks","solid","activeMarks","stashMarks","wrap","exec","popFromStashMark","applyPending","nextType","pending","markMayApply","parser","open","isOpen","topContext","topOptions","wsOptionsFor","topMatch","findPositions","needsBlock","prototypeAccessors$6","top","currentPos","selector","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","nodeType2","v","returned","addDOM","addTextNode","readStyles","re","trim","parseStyles","addPendingMark","addElement","removePendingMark","nodeValue","domNodeBefore","previousSibling","insertNode","findInText","findInside","matchAfter","ruleID","toLowerCase","prevItem","nextSibling","ruleFromNode","ignore","ignoreFallback","skip","closeParent","sync2","oldNeedsBlock","leafFallback","sync","addElementByRule","consuming","ownerDocument","findPlace","continueAfter","enter","startIn","getContent","contentDOM","contentElement","querySelector","findAround","findAtPoint","route","cx","enterInner","textblockFromContext","closeExtra","preserveWS","topOpen","contains","compareDocumentPosition","textNode","parts","useRoot","minDepth","part","$context","deflt","findSameMarkInSet","upto","level","lastIndexOf","stashMark","DOMSerializer","toDOM","window","serializeFragment","createDocumentFragment","keep","rendered","spanning","add2","markDOM","serializeMark","serializeNode","renderSpec","onContent","serializeNodeAndMarks","inline2","structure","xmlNS","tagName","space2","space$1","setAttributeNS","innerContent","domSerializer","nodesFromSchema","marksFromSchema","gatherToDOM","factor16","pow","MapResult","deleted","recover2","recover","StepMap","ranges","inverted","diff","recoverIndex","recoverOffset","mapResult","assoc","_map","simple","oldIndex","newIndex","oldSize","newSize","touches","oldStart","newStart","invert","Mapping","maps","mirror","TransformError","appendMap","mirrors","setMirror","appendMapping","mapping","startSize","mirr","getMirror","appendMappingInverted","totalSize","inverse","corr","Transform","steps","docs","docChanged","step","maybeStep","failed","step2","apply","addStep","getMap","stepsByID","Step","_doc","mustOverride","_mapping","merge","_other","stepType","jsonID","id","stepClass","StepResult","ok","fail","fromReplace","e","ReplaceStep","Step3","ReplaceStep2","contentBetween","slice$1","ReplaceAroundStep","gapFrom","gapTo","insert","ReplaceAroundStep2","gap","inserted","range","canCut","typesAfter","$pos","innerType","index$1","baseType","d$1","pass","bias","insertPos","fits","wrapping","mapped","mapFragment","lift","gapStart","gapEnd","splitting","splitting$1","wrappers","setBlockType","mapFrom","canChangeType","clearIncompatible","startM","endM","setNodeMarkup","newNode","replaceWith","typeAfter","AddMarkStep","AddMarkStep2","oldSlice","parent2","RemoveMarkStep","RemoveMarkStep2","addMark","removed","added","removing","adding","newSet","s","removeMark","matched","toRemove","found$1","parentType","delSteps","allowed","fitsTrivially","Fitter","fit","replaceStep","unplaced","frontier","count","dropFromFragment","addToFragment","closeNodeStart","fit2","invalidMarks","oldOpen","newOpen","closeFragment","findFittable","placeNodes","openMore","dropNode","moveInline","mustMoveInline","placedSize","sliceDepth","contentAt","frontierDepth","inject","openAtEnd","closeFrontierNode","openFrontierNode","taken","openEndCount","matches2","contentAfterFits","findCloseLevel","dropInner","match$1","move","close3","replaceRange","deleteRange","targetDepths","coveredDepths","preferredTarget","unshift","defining","preferredTargetIndex","leftNodes","preferredDepth","openDepth","targetDepth","expand","startSteps","replaceRangeWith","point","insertPoint","covered","classesById","Selection","$anchor","$head","SelectionRange","tr","lastNode","lastParent","findFrom","dir","textOnly","TextSelection","findSelectionIn","near","AllSelection","atStart","atEnd","cls","selectionClass","getBookmark","between","visible","Selection3","TextSelection2","$cursor","ensureMarks","TextBookmark","dPos","NodeSelection","NodeSelection2","NodeBookmark","isSelectable","selectable","AllSelection2","sel","selection","setSelection","AllBookmark","startLen","_from","_to","_newFrom","newTo","Transaction","Transform3","time","Date","now","curSelection","curSelectionFor","storedMarks","updated","meta","Transaction2","selectionSet","storedMarksSet","isGeneric","scrolledIntoView","setStoredMarks","addStoredMark","removeStoredMark","setTime","replaceSelection","replaceSelectionWith","inheritMarks","deleteSelection","insertText","setMeta","getMeta","scrollIntoView","FieldDesc","desc","init","baseFields","config","_marks","_old","prev","Configuration","plugins","fields","pluginsByKey","plugin","EditorState","applyTransaction","filterTransaction","rootTr","transactions","trs","newState","applyInner","haveNew","appendTransaction","oldState","newInstance","field","applyListeners","$config","reconfigure","pluginFields","addApplyListener","removeApplyListener","Function","bindProps","Plugin","createKey","getState","PluginKey","Branch","items","eventCount","popEvent","preserveItems","remap","remapping","remaining","transform","addAfter","item","Item","addTransform","histOptions","newItems","oldItems","lastItem","merged","cutPoint","overflow","DEPTH_OVERFLOW","mirrorPos","mirrorOffset","addMaps","rebased","rebasedTransform","rebasedCount","rebasedItems","newUntil","iRebased","newMaps","branch","emptyItemCount","compress","events","newItem","HistoryState","done2","undone","prevRanges","prevTime","done","history2","dispatch2","redo2","mustPreserveItems","historyKey","newHist","redo","historyState","cachedPreserveItems","cachedPreserveItemsPlugins","historyPreserveItems","closeHistoryKey","newGroupDelay","hist","rebased2","historyTr","appended","rangesFor","mapRanges","newGroup","adjacent","isAdjacentTo","applyTransaction2","base","8","9","10","12","13","16","17","18","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","106","107","108","109","110","111","144","145","160","161","162","163","164","165","173","186","187","188","189","190","191","192","219","220","221","222","229","48","49","50","51","52","53","54","55","56","57","chrome","navigator","userAgent","safari","vendor","gecko","mac","platform","ie","brokenModifierNames","String","fromCharCode","code","alt","ctrl","shift2","mod","altKey","ctrlKey","metaKey","shiftKey","bindings","handleKeyDown","keydownHandler","normalizeKeyName","normalize","view","baseName","keyCode","keyName","isChar","direct","modifiers","dispatch","fromCode","withShift","result","ie_edge","ie_upto10","ie_11up","ie_version","documentMode","gecko_version","chrome_version","ios","maxTouchPoints","android","webkit","documentElement","webkit_version","domIndex","assignedSlot","host","reusedRange","textRange","createRange","setEnd","setStart","isEquivalentPosition","off","targetNode","targetOff","scanFor","atomElements","hasBlockDesc","contentEditable","pmViewDesc","selectionCollapsed","domSel","collapsed","isCollapsed","rangeCount","getRangeAt","createEvent","initEvent","clientWidth","bottom","clientHeight","side","rect","getBoundingClientRect","scaleX","width","offsetWidth","scaleY","height","offsetHeight","startDOM","scrollThreshold","someProp","scrollMargin","atTop","body","bounding","windowRect","clientRect","moveX","moveY","getSide","defaultView","scrollBy","startX","scrollLeft","startY","scrollTop","dX","dY","stack","dTop","preventScrollSupported","coords","closest","coordsClosest","dxClosest","rowBot","rowTop","childIndex","rects","getClientRects","dx","len","singleRect","inRect","findOffsetInText","findOffsetInNode","box","startI","floor","elementFromPoint","assign","assign$1","root","caretPositionFromPoint","pos$1","offsetNode","caretRangeFromPoint","startContainer","startOffset","draggable","targetKludge","box$1","outside","docView","nearestDesc","posBefore","posAfter","posFromDOM","posFromCaret","posFromElement","inside","posAtStart","border","BIDI","domFromPos","supportEmptyRange","takeSide","flattenV","rectBefore","rectAfter","flattenH","before$1","after$1","target$1","x","y","viewState","activeElement","updateState","focus","maybeRTL","cachedState","cachedDir","cachedResult","withFlushedState","nearest","coordsAtPos","boxes","endOfTextblockVertical","atStart2","atEnd2","getSelection","modify","oldRange","oldNode","focusNode","oldOff","focusOffset","oldBidiLevel","caretBidiLevel","domAfterPos","removeAllRanges","addRange","endOfTextblockHorizontal","ViewDesc","children2","beforePosition","posAtEnd","contentLost","domAtom","matchesWidget","matchesMark","matchesNode","matchesHack","parseRule","stopEvent","destroy","posBeforeChild","localPosFromDOM","domBefore","domAfter","desc$1","search$1","onlyNodes","getDesc","nodeDOM","descAt","parseRange","fromOffset","toOffset","childBase","emptyChildAt","j$1","force","anchorDOM","headDOM","brKludge","offset$1","anchorNode","anchorOffset","domSelExtended","extend","collapse","DOMException","ignoreMutation","mutation","markDirty","startInside","endInside","markParentsDirty","nothing","WidgetViewDesc","ViewDesc3","widget2","raw","widget","WidgetViewDesc2","stop2","ignoreSelection","CompositionViewDesc","textDOM","CompositionViewDesc2","prototypeAccessors$22","mut","oldValue","MarkViewDesc","MarkViewDesc2","custom","nodeViews","replaceNodes","NodeViewDesc","outerDeco","innerDeco","nodeDOM2","updateChildren","NodeViewDesc2","prototypeAccessors$32","descObj","hasAttribute","applyOuterDeco","CustomNodeViewDesc","TextViewDesc","reparseInView","sameOuterDeco","composition","composing","localCompositionNode","updater","ViewTreeUpdater","deco","onWidget","onNode","locals3","locals","forChild","decoIndex","restNode","parentIndex","widgets","compareSide","child$1","cutAt","i$3","insideNode","syncToMarks","placeWidget","findNodeMatch","updateNextNode","addNode","addTextblockHacks","destroyRest","changed","protectLocalComposition","oldCSS","cssText","getComputedStyle","listStyle","nearbyTextNode","textPos","childStart","findTextInFragment","compositionNodes","updateInner","updateOuterDeco","needsWrap","oldDOM","patchOuterDeco","computeOuterDeco","selectNode","deselectNode","TextViewDesc2","prototypeAccessors$42","pmIsDeco","inParent","trackWrites","parentDOM","BRHackViewDesc","arguments","BRHackViewDesc2","prototypeAccessors$52","CustomNodeViewDesc2","descs","written","childDOM","rm","OuterDecoLevel","noDeco","class","outerDOM","prevComputed","curComputed","curDOM","prevList","Boolean","curList","removeProperty","lockedNode","lock","preMatch","fI","dI","set","origin","nearestDesc2","inWidget","isOnEdge","selectionBetween","editable","hasFocus","hasSelection","editorOwnsSelection","domObserver","disconnectSelection","cursorWrapper","img","disabled","resetEditableFrom","resetEditableTo","brokenSelectBetweenUneditable","temporarilyEditableNear","hideSelectionGuard","setCurSelection","connectSelection","destroyBetween","maxKeep","markDesc","preMatch2","nextDOM","setEditable","wasDraggable","lastSelectedViewDesc","$side","mods","apply7","moveSelectionBlock","endOfTextblock","nodePos","moveNode","moveOffset","nodeLen","isIgnorable","isBlockNode","beyond","empty2","nextNode","stop","getMods","stopNativeHorizontalDelete","skipIgnoredNodesLeft","skipIgnoredNodesRight","selectHorizontally","selectVertically","switchEditable","safariDownArrowBug","typeOver","addedNodes","lastSelectionTime","lastSelectionOrigin","newSel","selectionFromDOM","tr$1","shared","parse3","from_","to_","find2","lastKeyCode","startDoc","editableContent","anchor$1","parseBetween","preferredPos","preferredSide","compare","lastKeyCodeTime","change","endA","endB","findDiff","lastIOSEnter","keyEvent","sel$1","resolveSelection","domChangeCount","nextSel","inlineChange","old","$newStart","$newEnd","skipClosingAndOpening","$next","looksLikeJoin","suppressSelectionUpdates","toB","lastAndroidDelete","markChange","$from1","chFrom","chTo","selectionToDOM","update4","curMarks","prevMarks","isMarkChange","sel$2","parsedSel","fromEnd","mayOpen","serializer","detachedDoc","wrapMap","wrapper","html","plainText","inCode","asText","parsed","metas","firstTag","innerHTML","readHTML","contextNode","sliceData","addContext","closeRange","closeSlice","d2","lastWrap","inLast","addToSibling","closeRight","wrapped","withWrappers","normalizeSiblings","sibling","thead","tbody","caption","colgroup","col","td","th","_detachedDoc","implementation","createHTMLDocument","observeOptions","childList","characterData","characterDataOldValue","attributeOldValue","subtree","useCharData","SelectionState","DOMObserver","handleDOMChange","queue","flushingSoon","observer","MutationObserver","mutations","removedNodes","flushSoon","currentSelection","onCharData","prevValue","onSelectionChange","suppressingSelectionUpdates","setTimeout","forceFlush","clearTimeout","observe","take","takeRecords","disconnect","ignoreSelectionChange","container","commonAncestorContainer","result$1","registerMutation","brs","cssChecked","whiteSpace","attributeName","handlers","editHandlers","currentHandlers","eventHandlers","runCustomHandler","handlers2","defaultPrevented","clientX","clientY","propName","i2","focused","runHandlerOnContext","selectedNode","selectAt","selectClickedNode","selectClickedLeaf","defaultTripleClick","endComposition","keydown","inOrNearComposition","captureKeyDown","lastIOSEnterFallbackTimeout","keyup","keypress","charCode","selectNodeModifier","mousedown","flushed","forceDOMFlush","lastClick","click","dy","isNear","posAtCoords","eventCoords","mouseDown","MouseDown","handleDoubleClick","handleTripleClick","targetPos","allowDefault","mightDrag","targetDesc","addAttr","setUneditable","up","abs","timeStamp","compositionEndedAt","handleSingleClick","buttons","touchdown","contextmenu","timeoutComposition","delay","composingTimeout","forceUpdate","compositionstart","compositionupdate","markCursor","compositionend","brokenClipboardAPI","parseFromClipboard","singleNode","sliceSingleNode","cut3","clipboardData","serializeForClipboard","clearData","setData","selectNodeContents","blur","paste","doPaste","getData","Dragging","move2","dragCopyModifier","dragstart","dataTransfer","effectAllowed","dragging","dragend","dragover","dragenter","drop","eventPos","$mouse","dropPoint","isNode","beforeInsert","beforeinput","inputType","WidgetType","noSpec","span","oldOffset","Decoration","valid","compareObjs","InlineType","inclusiveStart","inclusiveEnd","is","NodeType2","DecorationSet","decorations","buildTree","predicate","findInner","childOff","mapInner","newLocal","onRemove","oldChildren","oldEnd","newEnd","dSize","mustRebuild","fromLocal","toLocal","childOffset","childNode","oldOffset2","mapAndGatherRemainingDecorations","from$1","byPos","mapChildren","addInner","baseOffset","takeSpansForNode","moveSpans","withoutNulls","removeInner","span$1","dec","localSet","DecorationGroup","removeOverlap","localsInner","members","spans","hasNulls","localStart","working","sorted","EditorView","_props","_root","mount","mounted","getEditable","buildNodeViews","docViewDesc","computeDocDeco","viewDecorations","readDOMChange","event2","event3","bubbles","eventBelongsToView","pluginViews","updatePluginViews","contenteditable","editorView","DropCursorView","handleDOMEvents","updateStateInner","setProps","reconfigured","redraw","updateSel","nA","nB","changedNodeViews","scroll","scrollToSelection","updateDoc","sel1","sel2","refDOM","refTop","newRefTop","oldScrollPos","overflowAnchor","innerHeight","localRect","scrollStack","storeScrollPos","forceSelUpdate","chromeKludge","destroyPluginViews","prevState","pluginView","setActive","stored","preventScroll","getPrototypeOf","domAtPos","posAtDOM","dispatchEvent","dispatchTransaction","color","cursorPos","timeout","updateOverlay","setCursor","nodeRect","parentLeft","parentTop","offsetParent","className","position","pageXOffset","pageYOffset","rect$1","scheduleRemoval","dragleave","relatedTarget","GapCursor","GapCursor2","GapBookmark","closedBefore","closedAfter","override","allowGapCursor","mustMove","$cur","$cur$1","gapCursor","drawGapCursor","createSelectionBetween","_view","handleClick","ArrowLeft","arrow","ArrowRight","ArrowUp","ArrowDown","axis","dirStr","$found","$cut","findCutBefore","liftTarget","deleteBarrier","textblockAt","findCutAfter","above","defaultBlockAt","canSplit","can","conn","canJoin","joinMaybeClear","canDelAfter","joinAt","selAfter","at","wrap$1","end$1","applicable","markApplies","ref$2","$from$1","$to$1","spaceStart","spaceEnd","commands","chainCommands","joinBackward","selectNodeBackward","joinForward","selectNodeForward","newlineInCode","createParagraphNear","liftEmptyBlock","splitBlock","os","exports2","module2","exports","sparkMd5","createCommonjsModule2","exports3","factory","undefined","hex_chr","md5blks","tail","lo","hi","md5blk","substring","parseInt","md5blk_array","subarray","Uint8Array","rhex","unescape","encodeURIComponent","returnUInt8Array","buff","ArrayBuffer","arr","second","byteLength","buffer","hex2","bytes","substr","reset","hex","md51","num","targetArray","sourceArray","begin","clamp","appendBinary","toUtf8","contents","_buff","_length","_hash","_finish","hexToBinaryString","hash","setState","SparkMD5","hashBinary","concatenateArrayBuffers","arrayBuffer2Utf8Str","utf8Str2ArrayBuffer","md51_array","classCallCheck","Constructor","TypeError","createClass","descriptor","enumerable","writable","defineProperty","protoProps","staticProps","fileSlice","File","mozSlice","webkitSlice","FileChecksum","file","FileChecksum2","chunkSize","chunkCount","ceil","chunkIndex","_this","md5Buffer","fileReader","FileReader","fileReaderDidLoad","fileReaderDidError","readNextChunk","binaryDigest","base64digest","btoa","start4","readAsArrayBuffer","findElement","toArray$1","querySelectorAll","eventInit","cancelable","detail","BlobRecord","checksum","url","BlobRecord2","filename","content_type","byte_size","xhr","XMLHttpRequest","responseType","setRequestHeader","csrfToken","getMetaValue","requestDidLoad","requestDidError","send","blob","status","response","direct_upload","directUploadData","_xhr","BlobUpload","BlobUpload2","_blob$directUploadDat","headers","DirectUpload","delegate","DirectUpload2","error","error2","upload","error3","methodName","_len","messages","_key","DirectUploadController","input","DirectUploadController2","directUpload","hiddenInput","insertAdjacentElement","dispatchError","signed_id","progress","loaded","total","dispatchEvent2","_this2","uploadRequestDidProgress","inputSelector","DirectUploadsController","DirectUploadsController2","inputs","findElements","files","controllers","createDirectUploadControllers","startNextController","controller","processingAttribute","submitButtonsByForm","WeakMap","started","didClick","didSubmitForm","didSubmitRemoteElement","disable","enable","button","display","ActiveStorage","autostart","listType","doJoin","outerRange","$insert","innerRange","around","outer","findWrappingOutside","innerMatch","findWrappingInside","withAttrs","findWrapping3","joinBefore","splitDepth","splitPos","doWrapInList","itemType","grandParent","keepItem","endOfList","liftToOuterList","list","indexBefore","liftOutOfList"],"mappings":"AAAA,cAgBA,WAAaA,UACFA,IAEX,oBACWC,OAAOC,OAAO,MAEzB,WAAiBC,KACTC,QAAQC,GAEhB,WAAqBC,SACO,mBAAVA,EAElB,WAAwBC,EAAGC,UAChBD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,MAAyB,iBAAND,GAAgC,mBAANA,EAkKhF,WAAgBE,EAAQC,KACbC,YAAYD,GAEvB,WAAgBD,EAAQC,EAAME,KACnBC,aAAaH,EAAME,GAAU,MAExC,WAAgBF,KACPI,WAAWC,YAAYL,GAEhC,WAAsBM,EAAYC,WACrBC,EAAI,EAAGA,EAAIF,EAAWG,OAAQD,GAAK,EACpCF,EAAWE,MACAA,GAAGE,EAAEH,GAG5B,WAAiBI,UACNC,SAASC,cAAcF,GAoBlC,WAAcG,UACHF,SAASG,eAAeD,GAEnC,oBACWE,EAAK,KAKhB,WAAgBhB,EAAMiB,EAAOC,EAASC,YAC7BC,iBAAiBH,EAAOC,EAASC,GAC/B,IAAMnB,EAAKqB,oBAAoBJ,EAAOC,EAASC,GAE1D,WAAyB7B,UACd,SAAU2B,YACPK,iBAEChC,EAAGiC,KAAKC,KAAMP,IAiB7B,WAAcjB,EAAMyB,EAAWC,GACd,MAATA,IACKC,gBAAgBF,GAChBzB,EAAK4B,aAAaH,KAAeC,KACjCG,aAAaJ,EAAWC,GA4DrC,WAAkBI,UACPC,MAAMC,KAAKF,EAAQG,YAE9B,WAAuBC,EAAOvB,EAAMwB,EAAYC,WACnC5B,EAAI,EAAGA,EAAI0B,EAAMzB,OAAQD,GAAK,EAAG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