{
  "version": 3,
  "sources": ["../../../../../shared/node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js", "../../../../../shared/node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/adapters.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/logger.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/connection_monitor.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/internal.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/connection.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscription.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/subscriptions.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/consumer.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/node_modules/@rails/actioncable/src/index.js", "../../../../../shared/node_modules/trix/src/trix/config/attachments.js", "../../../../../shared/node_modules/trix/src/trix/config/block_attributes.js", "../../../../../shared/node_modules/trix/src/trix/config/browser.js", "../../../../../shared/node_modules/trix/src/trix/config/lang.js", "../../../../../shared/node_modules/trix/src/trix/config/file_size_formatting.js", "../../../../../shared/node_modules/trix/src/trix/constants.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/extend.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/dom.js", "../../../../../shared/node_modules/trix/src/trix/config/input.js", "../../../../../shared/node_modules/trix/src/trix/config/key_names.js", "../../../../../shared/node_modules/trix/src/trix/config/parser.js", "../../../../../shared/node_modules/trix/src/trix/config/text_attributes.js", "../../../../../shared/node_modules/trix/src/trix/config/toolbar.js", "../../../../../shared/node_modules/trix/src/trix/config/undo.js", "../../../../../shared/node_modules/trix/src/trix/config/css.js", "../../../../../shared/node_modules/trix/src/trix/core/basic_object.js", "../../../../../shared/node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../../../shared/node_modules/trix/src/trix/core/object.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/arrays.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/bidi.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/config.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/events.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/functions.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/objects.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/ranges.js", "../../../../../shared/node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../../../shared/node_modules/trix/src/trix/core/helpers/strings.js", "../../../../../shared/node_modules/trix/src/trix/core/collections/hash.js", "../../../../../shared/node_modules/trix/src/trix/core/collections/object_group.js", "../../../../../shared/node_modules/trix/src/trix/core/collections/object_map.js", "../../../../../shared/node_modules/trix/src/trix/core/collections/element_store.js", "../../../../../shared/node_modules/trix/src/trix/core/utilities/operation.js", "../../../../../shared/node_modules/trix/src/trix/views/object_view.js", "../../../../../shared/node_modules/trix/src/trix/models/html_sanitizer.js", "../../../../../shared/node_modules/trix/src/trix/views/attachment_view.js", "../../../../../shared/node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../../../shared/node_modules/trix/src/trix/views/piece_view.js", "../../../../../shared/node_modules/trix/src/trix/views/text_view.js", "../../../../../shared/node_modules/trix/src/trix/views/block_view.js", "../../../../../shared/node_modules/trix/src/trix/views/document_view.js", "../../../../../shared/node_modules/trix/src/trix/models/piece.js", "../../../../../shared/node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../../../shared/node_modules/trix/src/trix/models/attachment.js", "../../../../../shared/node_modules/trix/src/trix/models/attachment_piece.js", "../../../../../shared/node_modules/trix/src/trix/models/string_piece.js", "../../../../../shared/node_modules/trix/src/trix/models/splittable_list.js", "../../../../../shared/node_modules/trix/src/trix/models/text.js", "../../../../../shared/node_modules/trix/src/trix/models/block.js", "../../../../../shared/node_modules/trix/src/trix/models/document.js", "../../../../../shared/node_modules/trix/src/trix/models/html_parser.js", "../../../../../shared/node_modules/trix/src/trix/core/serialization.js", "../../../../../shared/node_modules/trix/src/trix/models/managed_attachment.js", "../../../../../shared/node_modules/trix/src/trix/models/attachment_manager.js", "../../../../../shared/node_modules/trix/src/trix/models/line_break_insertion.js", "../../../../../shared/node_modules/trix/src/trix/models/composition.js", "../../../../../shared/node_modules/trix/src/trix/models/undo_manager.js", "../../../../../shared/node_modules/trix/src/trix/filters/filter.js", "../../../../../shared/node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../../../shared/node_modules/trix/src/trix/models/editor.js", "../../../../../shared/node_modules/trix/src/trix/models/location_mapper.js", "../../../../../shared/node_modules/trix/src/trix/models/point_mapper.js", "../../../../../shared/node_modules/trix/src/trix/models/selection_manager.js", "../../../../../shared/node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/composition_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/controller.js", "../../../../../shared/node_modules/trix/src/trix/observers/mutation_observer.js", "../../../../../shared/node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../../../shared/node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../../../shared/node_modules/trix/src/trix/controllers/input_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../../../shared/node_modules/trix/src/trix/controllers/editor_controller.js", "../../../../../shared/node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../../../shared/node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../../../shared/node_modules/trix/src/trix/trix.js", "../../../../../shared/node_modules/@rails/actiontext/app/javascript/actiontext/attachment_upload.js", "../../../../../shared/node_modules/@rails/actiontext/app/javascript/actiontext/index.js", "../../javascript/packs/vendor/buy_me_a_coffee.js", "../../javascript/packs/vendor/sort_elements.js", "../../javascript/packs/modules/fetch_content.js", "../../javascript/packs/modules/footer-height.js", "../../javascript/packs/modules/local_auto_save.js", "../../javascript/packs/modules/navbar.js", "../../javascript/packs/modules/preview_image.js", "../../javascript/packs/modules/sortable.js", "../../javascript/packs/modules/trix-editor-overrides.js", "../../javascript/packs/modules/youtube_embed.js", "../../javascript/packs/pages/pnp_be/posts.js", "../../javascript/packs/pages/pnp_be/products.js", "../../javascript/packs/pages/cart.js", "../../javascript/packs/pages/contact.js", "../../javascript/packs/pages/podcast.js", "../../javascript/application.js", "../../../../../shared/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../../../shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../../../shared/node_modules/@hotwired/stimulus/dist/stimulus.js", "../../javascript/controllers/application.js", "../../javascript/controllers/hello_controller.js", "../../javascript/controllers/search_controller.js", "../../javascript/controllers/index.js"],
  "sourcesContent": ["/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */;\n\n(function() {\n  var context = this;\n\n  (function() {\n    (function() {\n      this.Rails = {\n        linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n        buttonClickSelector: {\n          selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n          exclude: 'form button'\n        },\n        inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n        formSubmitSelector: 'form',\n        formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n        formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n        formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n        fileInputSelector: 'input[name][type=file]:not([disabled])',\n        linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n        buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n      };\n\n    }).call(this);\n  }).call(context);\n\n  var Rails = context.Rails;\n\n  (function() {\n    (function() {\n      var nonce;\n\n      nonce = null;\n\n      Rails.loadCSPNonce = function() {\n        var ref;\n        return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n      };\n\n      Rails.cspNonce = function() {\n        return nonce != null ? nonce : Rails.loadCSPNonce();\n      };\n\n    }).call(this);\n    (function() {\n      var expando, m;\n\n      m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n      Rails.matches = function(element, selector) {\n        if (selector.exclude != null) {\n          return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n        } else {\n          return m.call(element, selector);\n        }\n      };\n\n      expando = '_ujsData';\n\n      Rails.getData = function(element, key) {\n        var ref;\n        return (ref = element[expando]) != null ? ref[key] : void 0;\n      };\n\n      Rails.setData = function(element, key, value) {\n        if (element[expando] == null) {\n          element[expando] = {};\n        }\n        return element[expando][key] = value;\n      };\n\n      Rails.$ = function(selector) {\n        return Array.prototype.slice.call(document.querySelectorAll(selector));\n      };\n\n    }).call(this);\n    (function() {\n      var $, csrfParam, csrfToken;\n\n      $ = Rails.$;\n\n      csrfToken = Rails.csrfToken = function() {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-token]');\n        return meta && meta.content;\n      };\n\n      csrfParam = Rails.csrfParam = function() {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-param]');\n        return meta && meta.content;\n      };\n\n      Rails.CSRFProtection = function(xhr) {\n        var token;\n        token = csrfToken();\n        if (token != null) {\n          return xhr.setRequestHeader('X-CSRF-Token', token);\n        }\n      };\n\n      Rails.refreshCSRFTokens = function() {\n        var param, token;\n        token = csrfToken();\n        param = csrfParam();\n        if ((token != null) && (param != null)) {\n          return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n            return input.value = token;\n          });\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var CustomEvent, fire, matches, preventDefault;\n\n      matches = Rails.matches;\n\n      CustomEvent = window.CustomEvent;\n\n      if (typeof CustomEvent !== 'function') {\n        CustomEvent = function(event, params) {\n          var evt;\n          evt = document.createEvent('CustomEvent');\n          evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n          return evt;\n        };\n        CustomEvent.prototype = window.Event.prototype;\n        preventDefault = CustomEvent.prototype.preventDefault;\n        CustomEvent.prototype.preventDefault = function() {\n          var result;\n          result = preventDefault.call(this);\n          if (this.cancelable && !this.defaultPrevented) {\n            Object.defineProperty(this, 'defaultPrevented', {\n              get: function() {\n                return true;\n              }\n            });\n          }\n          return result;\n        };\n      }\n\n      fire = Rails.fire = function(obj, name, data) {\n        var event;\n        event = new CustomEvent(name, {\n          bubbles: true,\n          cancelable: true,\n          detail: data\n        });\n        obj.dispatchEvent(event);\n        return !event.defaultPrevented;\n      };\n\n      Rails.stopEverything = function(e) {\n        fire(e.target, 'ujs:everythingStopped');\n        e.preventDefault();\n        e.stopPropagation();\n        return e.stopImmediatePropagation();\n      };\n\n      Rails.delegate = function(element, selector, eventType, handler) {\n        return element.addEventListener(eventType, function(e) {\n          var target;\n          target = e.target;\n          while (!(!(target instanceof Element) || matches(target, selector))) {\n            target = target.parentNode;\n          }\n          if (target instanceof Element && handler.call(target, e) === false) {\n            e.preventDefault();\n            return e.stopPropagation();\n          }\n        });\n      };\n\n    }).call(this);\n    (function() {\n      var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n      cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n      AcceptHeaders = {\n        '*': '*/*',\n        text: 'text/plain',\n        html: 'text/html',\n        xml: 'application/xml, text/xml',\n        json: 'application/json, text/javascript',\n        script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n      };\n\n      Rails.ajax = function(options) {\n        var xhr;\n        options = prepareOptions(options);\n        xhr = createXHR(options, function() {\n          var ref, response;\n          response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n          if (Math.floor(xhr.status / 100) === 2) {\n            if (typeof options.success === \"function\") {\n              options.success(response, xhr.statusText, xhr);\n            }\n          } else {\n            if (typeof options.error === \"function\") {\n              options.error(response, xhr.statusText, xhr);\n            }\n          }\n          return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n        });\n        if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n          return false;\n        }\n        if (xhr.readyState === XMLHttpRequest.OPENED) {\n          return xhr.send(options.data);\n        }\n      };\n\n      prepareOptions = function(options) {\n        options.url = options.url || location.href;\n        options.type = options.type.toUpperCase();\n        if (options.type === 'GET' && options.data) {\n          if (options.url.indexOf('?') < 0) {\n            options.url += '?' + options.data;\n          } else {\n            options.url += '&' + options.data;\n          }\n        }\n        if (AcceptHeaders[options.dataType] == null) {\n          options.dataType = '*';\n        }\n        options.accept = AcceptHeaders[options.dataType];\n        if (options.dataType !== '*') {\n          options.accept += ', */*; q=0.01';\n        }\n        return options;\n      };\n\n      createXHR = function(options, done) {\n        var xhr;\n        xhr = new XMLHttpRequest();\n        xhr.open(options.type, options.url, true);\n        xhr.setRequestHeader('Accept', options.accept);\n        if (typeof options.data === 'string') {\n          xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n        }\n        if (!options.crossDomain) {\n          xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n          CSRFProtection(xhr);\n        }\n        xhr.withCredentials = !!options.withCredentials;\n        xhr.onreadystatechange = function() {\n          if (xhr.readyState === XMLHttpRequest.DONE) {\n            return done(xhr);\n          }\n        };\n        return xhr;\n      };\n\n      processResponse = function(response, type) {\n        var parser, script;\n        if (typeof response === 'string' && typeof type === 'string') {\n          if (type.match(/\\bjson\\b/)) {\n            try {\n              response = JSON.parse(response);\n            } catch (error) {}\n          } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n            script = document.createElement('script');\n            script.setAttribute('nonce', cspNonce());\n            script.text = response;\n            document.head.appendChild(script).parentNode.removeChild(script);\n          } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n            parser = new DOMParser();\n            type = type.replace(/;.+/, '');\n            try {\n              response = parser.parseFromString(response, type);\n            } catch (error) {}\n          }\n        }\n        return response;\n      };\n\n      Rails.href = function(element) {\n        return element.href;\n      };\n\n      Rails.isCrossDomain = function(url) {\n        var e, originAnchor, urlAnchor;\n        originAnchor = document.createElement('a');\n        originAnchor.href = location.href;\n        urlAnchor = document.createElement('a');\n        try {\n          urlAnchor.href = url;\n          return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n        } catch (error) {\n          e = error;\n          return true;\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var matches, toArray;\n\n      matches = Rails.matches;\n\n      toArray = function(e) {\n        return Array.prototype.slice.call(e);\n      };\n\n      Rails.serializeElement = function(element, additionalParam) {\n        var inputs, params;\n        inputs = [element];\n        if (matches(element, 'form')) {\n          inputs = toArray(element.elements);\n        }\n        params = [];\n        inputs.forEach(function(input) {\n          if (!input.name || input.disabled) {\n            return;\n          }\n          if (matches(input, 'fieldset[disabled] *')) {\n            return;\n          }\n          if (matches(input, 'select')) {\n            return toArray(input.options).forEach(function(option) {\n              if (option.selected) {\n                return params.push({\n                  name: input.name,\n                  value: option.value\n                });\n              }\n            });\n          } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n            return params.push({\n              name: input.name,\n              value: input.value\n            });\n          }\n        });\n        if (additionalParam) {\n          params.push(additionalParam);\n        }\n        return params.map(function(param) {\n          if (param.name != null) {\n            return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n          } else {\n            return param;\n          }\n        }).join('&');\n      };\n\n      Rails.formElements = function(form, selector) {\n        if (matches(form, 'form')) {\n          return toArray(form.elements).filter(function(el) {\n            return matches(el, selector);\n          });\n        } else {\n          return toArray(form.querySelectorAll(selector));\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var allowAction, fire, stopEverything;\n\n      fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n      Rails.handleConfirm = function(e) {\n        if (!allowAction(this)) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.confirm = function(message, element) {\n        return confirm(message);\n      };\n\n      allowAction = function(element) {\n        var answer, callback, message;\n        message = element.getAttribute('data-confirm');\n        if (!message) {\n          return true;\n        }\n        answer = false;\n        if (fire(element, 'confirm')) {\n          try {\n            answer = Rails.confirm(message, element);\n          } catch (error) {}\n          callback = fire(element, 'confirm:complete', [answer]);\n        }\n        return answer && callback;\n      };\n\n    }).call(this);\n    (function() {\n      var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n      Rails.handleDisabledElement = function(e) {\n        var element;\n        element = this;\n        if (element.disabled) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.enableElement = function(e) {\n        var element;\n        if (e instanceof Event) {\n          if (isXhrRedirect(e)) {\n            return;\n          }\n          element = e.target;\n        } else {\n          element = e;\n        }\n        if (matches(element, Rails.linkDisableSelector)) {\n          return enableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n          return enableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return enableFormElements(element);\n        }\n      };\n\n      Rails.disableElement = function(e) {\n        var element;\n        element = e instanceof Event ? e.target : e;\n        if (matches(element, Rails.linkDisableSelector)) {\n          return disableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n          return disableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return disableFormElements(element);\n        }\n      };\n\n      disableLinkElement = function(element) {\n        var replacement;\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n        replacement = element.getAttribute('data-disable-with');\n        if (replacement != null) {\n          setData(element, 'ujs:enable-with', element.innerHTML);\n          element.innerHTML = replacement;\n        }\n        element.addEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableLinkElement = function(element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n        if (originalText != null) {\n          element.innerHTML = originalText;\n          setData(element, 'ujs:enable-with', null);\n        }\n        element.removeEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      disableFormElements = function(form) {\n        return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n      };\n\n      disableFormElement = function(element) {\n        var replacement;\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n        replacement = element.getAttribute('data-disable-with');\n        if (replacement != null) {\n          if (matches(element, 'button')) {\n            setData(element, 'ujs:enable-with', element.innerHTML);\n            element.innerHTML = replacement;\n          } else {\n            setData(element, 'ujs:enable-with', element.value);\n            element.value = replacement;\n          }\n        }\n        element.disabled = true;\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableFormElements = function(form) {\n        return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n      };\n\n      enableFormElement = function(element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n        if (originalText != null) {\n          if (matches(element, 'button')) {\n            element.innerHTML = originalText;\n          } else {\n            element.value = originalText;\n          }\n          setData(element, 'ujs:enable-with', null);\n        }\n        element.disabled = false;\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      isXhrRedirect = function(event) {\n        var ref, xhr;\n        xhr = (ref = event.detail) != null ? ref[0] : void 0;\n        return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n      };\n\n    }).call(this);\n    (function() {\n      var stopEverything;\n\n      stopEverything = Rails.stopEverything;\n\n      Rails.handleMethod = function(e) {\n        var csrfParam, csrfToken, form, formContent, href, link, method;\n        link = this;\n        method = link.getAttribute('data-method');\n        if (!method) {\n          return;\n        }\n        href = Rails.href(link);\n        csrfToken = Rails.csrfToken();\n        csrfParam = Rails.csrfParam();\n        form = document.createElement('form');\n        formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n        if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n          formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n        }\n        formContent += '<input type=\"submit\" />';\n        form.method = 'post';\n        form.action = href;\n        form.target = link.target;\n        form.innerHTML = formContent;\n        form.style.display = 'none';\n        document.body.appendChild(form);\n        form.querySelector('[type=\"submit\"]').click();\n        return stopEverything(e);\n      };\n\n    }).call(this);\n    (function() {\n      var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n        slice = [].slice;\n\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n      isRemote = function(element) {\n        var value;\n        value = element.getAttribute('data-remote');\n        return (value != null) && value !== 'false';\n      };\n\n      Rails.handleRemote = function(e) {\n        var button, data, dataType, element, method, url, withCredentials;\n        element = this;\n        if (!isRemote(element)) {\n          return true;\n        }\n        if (!fire(element, 'ajax:before')) {\n          fire(element, 'ajax:stopped');\n          return false;\n        }\n        withCredentials = element.getAttribute('data-with-credentials');\n        dataType = element.getAttribute('data-type') || 'script';\n        if (matches(element, Rails.formSubmitSelector)) {\n          button = getData(element, 'ujs:submit-button');\n          method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n          url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n          if (method.toUpperCase() === 'GET') {\n            url = url.replace(/\\?.*$/, '');\n          }\n          if (element.enctype === 'multipart/form-data') {\n            data = new FormData(element);\n            if (button != null) {\n              data.append(button.name, button.value);\n            }\n          } else {\n            data = serializeElement(element, button);\n          }\n          setData(element, 'ujs:submit-button', null);\n          setData(element, 'ujs:submit-button-formmethod', null);\n          setData(element, 'ujs:submit-button-formaction', null);\n        } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n          method = element.getAttribute('data-method');\n          url = element.getAttribute('data-url');\n          data = serializeElement(element, element.getAttribute('data-params'));\n        } else {\n          method = element.getAttribute('data-method');\n          url = Rails.href(element);\n          data = element.getAttribute('data-params');\n        }\n        ajax({\n          type: method || 'GET',\n          url: url,\n          data: data,\n          dataType: dataType,\n          beforeSend: function(xhr, options) {\n            if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n              return fire(element, 'ajax:send', [xhr]);\n            } else {\n              fire(element, 'ajax:stopped');\n              return false;\n            }\n          },\n          success: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:success', args);\n          },\n          error: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:error', args);\n          },\n          complete: function() {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:complete', args);\n          },\n          crossDomain: isCrossDomain(url),\n          withCredentials: (withCredentials != null) && withCredentials !== 'false'\n        });\n        return stopEverything(e);\n      };\n\n      Rails.formSubmitButtonClick = function(e) {\n        var button, form;\n        button = this;\n        form = button.form;\n        if (!form) {\n          return;\n        }\n        if (button.name) {\n          setData(form, 'ujs:submit-button', {\n            name: button.name,\n            value: button.value\n          });\n        }\n        setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n        setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n        return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n      };\n\n      Rails.preventInsignificantClick = function(e) {\n        var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n        link = this;\n        method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n        data = link.getAttribute('data-params');\n        metaClick = e.metaKey || e.ctrlKey;\n        insignificantMetaClick = metaClick && method === 'GET' && !data;\n        nonPrimaryMouseClick = (e.button != null) && e.button !== 0;\n        if (nonPrimaryMouseClick || insignificantMetaClick) {\n          return e.stopImmediatePropagation();\n        }\n      };\n\n    }).call(this);\n    (function() {\n      var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n\n      fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n      if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n        if (jQuery.rails) {\n          throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n        }\n        jQuery.rails = Rails;\n        jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n          if (!options.crossDomain) {\n            return CSRFProtection(xhr);\n          }\n        });\n      }\n\n      Rails.start = function() {\n        if (window._rails_loaded) {\n          throw new Error('rails-ujs has already been loaded!');\n        }\n        window.addEventListener('pageshow', function() {\n          $(Rails.formEnableSelector).forEach(function(el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n          return $(Rails.linkDisableSelector).forEach(function(el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n        });\n        delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.linkClickSelector, 'click', disableElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n        delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n        delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n        delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n        delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n        delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n          return setTimeout((function() {\n            return disableElement(e);\n          }), 13);\n        });\n        delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n        delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n        document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n        document.addEventListener('DOMContentLoaded', loadCSPNonce);\n        return window._rails_loaded = true;\n      };\n\n      if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n        Rails.start();\n      }\n\n    }).call(this);\n  }).call(this);\n\n  if (typeof module === \"object\" && module.exports) {\n    module.exports = Rails;\n  } else if (typeof define === \"function\" && define.amd) {\n    define(Rails);\n  }\n}).call(this);\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", "export default {\n  logger: self.console,\n  WebSocket: self.WebSocket\n}\n", "import adapters from \"./adapters\"\n\n// The logger is disabled by default. You can enable it with:\n//\n//   ActionCable.logger.enabled = true\n//\n//   Example:\n//\n//   import * as ActionCable from '@rails/actioncable'\n//\n//   ActionCable.logger.enabled = true\n//   ActionCable.logger.log('Connection Established.')\n//\n\nexport default {\n  log(...messages) {\n    if (this.enabled) {\n      messages.push(Date.now())\n      adapters.logger.log(\"[ActionCable]\", ...messages)\n    }\n  },\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring the cable connection is in good health by validating the heartbeat pings sent from the server, and attempting\n// revival reconnections if things go astray. Internal class, not intended for direct user manipulation.\n\nconst now = () => new Date().getTime()\n\nconst secondsSince = time => (now() - time) / 1000\n\nclass ConnectionMonitor {\n  constructor(connection) {\n    this.visibilityDidChange = this.visibilityDidChange.bind(this)\n    this.connection = connection\n    this.reconnectAttempts = 0\n  }\n\n  start() {\n    if (!this.isRunning()) {\n      this.startedAt = now()\n      delete this.stoppedAt\n      this.startPolling()\n      addEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`)\n    }\n  }\n\n  stop() {\n    if (this.isRunning()) {\n      this.stoppedAt = now()\n      this.stopPolling()\n      removeEventListener(\"visibilitychange\", this.visibilityDidChange)\n      logger.log(\"ConnectionMonitor stopped\")\n    }\n  }\n\n  isRunning() {\n    return this.startedAt && !this.stoppedAt\n  }\n\n  recordPing() {\n    this.pingedAt = now()\n  }\n\n  recordConnect() {\n    this.reconnectAttempts = 0\n    this.recordPing()\n    delete this.disconnectedAt\n    logger.log(\"ConnectionMonitor recorded connect\")\n  }\n\n  recordDisconnect() {\n    this.disconnectedAt = now()\n    logger.log(\"ConnectionMonitor recorded disconnect\")\n  }\n\n  // Private\n\n  startPolling() {\n    this.stopPolling()\n    this.poll()\n  }\n\n  stopPolling() {\n    clearTimeout(this.pollTimeout)\n  }\n\n  poll() {\n    this.pollTimeout = setTimeout(() => {\n      this.reconnectIfStale()\n      this.poll()\n    }\n    , this.getPollInterval())\n  }\n\n  getPollInterval() {\n    const { staleThreshold, reconnectionBackoffRate } = this.constructor\n    const backoff = Math.pow(1 + reconnectionBackoffRate, Math.min(this.reconnectAttempts, 10))\n    const jitterMax = this.reconnectAttempts === 0 ? 1.0 : reconnectionBackoffRate\n    const jitter = jitterMax * Math.random()\n    return staleThreshold * 1000 * backoff * (1 + jitter)\n  }\n\n  reconnectIfStale() {\n    if (this.connectionIsStale()) {\n      logger.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${secondsSince(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`)\n      this.reconnectAttempts++\n      if (this.disconnectedRecently()) {\n        logger.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${secondsSince(this.disconnectedAt)} s`)\n      } else {\n        logger.log(\"ConnectionMonitor reopening\")\n        this.connection.reopen()\n      }\n    }\n  }\n\n  get refreshedAt() {\n    return this.pingedAt ? this.pingedAt : this.startedAt\n  }\n\n  connectionIsStale() {\n    return secondsSince(this.refreshedAt) > this.constructor.staleThreshold\n  }\n\n  disconnectedRecently() {\n    return this.disconnectedAt && (secondsSince(this.disconnectedAt) < this.constructor.staleThreshold)\n  }\n\n  visibilityDidChange() {\n    if (document.visibilityState === \"visible\") {\n      setTimeout(() => {\n        if (this.connectionIsStale() || !this.connection.isOpen()) {\n          logger.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`)\n          this.connection.reopen()\n        }\n      }\n      , 200)\n    }\n  }\n\n}\n\nConnectionMonitor.staleThreshold = 6 // Server::Connections::BEAT_INTERVAL * 2 (missed two pings)\nConnectionMonitor.reconnectionBackoffRate = 0.15\n\nexport default ConnectionMonitor\n", "export default {\n  \"message_types\": {\n    \"welcome\": \"welcome\",\n    \"disconnect\": \"disconnect\",\n    \"ping\": \"ping\",\n    \"confirmation\": \"confirm_subscription\",\n    \"rejection\": \"reject_subscription\"\n  },\n  \"disconnect_reasons\": {\n    \"unauthorized\": \"unauthorized\",\n    \"invalid_request\": \"invalid_request\",\n    \"server_restart\": \"server_restart\"\n  },\n  \"default_mount_path\": \"/cable\",\n  \"protocols\": [\n    \"actioncable-v1-json\",\n    \"actioncable-unsupported\"\n  ]\n}\n", "import adapters from \"./adapters\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport INTERNAL from \"./internal\"\nimport logger from \"./logger\"\n\n// Encapsulate the cable connection held by the consumer. This is an internal class not intended for direct user manipulation.\n\nconst {message_types, protocols} = INTERNAL\nconst supportedProtocols = protocols.slice(0, protocols.length - 1)\n\nconst indexOf = [].indexOf\n\nclass Connection {\n  constructor(consumer) {\n    this.open = this.open.bind(this)\n    this.consumer = consumer\n    this.subscriptions = this.consumer.subscriptions\n    this.monitor = new ConnectionMonitor(this)\n    this.disconnected = true\n  }\n\n  send(data) {\n    if (this.isOpen()) {\n      this.webSocket.send(JSON.stringify(data))\n      return true\n    } else {\n      return false\n    }\n  }\n\n  open() {\n    if (this.isActive()) {\n      logger.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`)\n      return false\n    } else {\n      logger.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${protocols}`)\n      if (this.webSocket) { this.uninstallEventHandlers() }\n      this.webSocket = new adapters.WebSocket(this.consumer.url, protocols)\n      this.installEventHandlers()\n      this.monitor.start()\n      return true\n    }\n  }\n\n  close({allowReconnect} = {allowReconnect: true}) {\n    if (!allowReconnect) { this.monitor.stop() }\n    // Avoid closing websockets in a \"connecting\" state due to Safari 15.1+ bug. See: https://github.com/rails/rails/issues/43835#issuecomment-1002288478\n    if (this.isOpen()) {\n      return this.webSocket.close()\n    }\n  }\n\n  reopen() {\n    logger.log(`Reopening WebSocket, current state is ${this.getState()}`)\n    if (this.isActive()) {\n      try {\n        return this.close()\n      } catch (error) {\n        logger.log(\"Failed to reopen WebSocket\", error)\n      }\n      finally {\n        logger.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`)\n        setTimeout(this.open, this.constructor.reopenDelay)\n      }\n    } else {\n      return this.open()\n    }\n  }\n\n  getProtocol() {\n    if (this.webSocket) {\n      return this.webSocket.protocol\n    }\n  }\n\n  isOpen() {\n    return this.isState(\"open\")\n  }\n\n  isActive() {\n    return this.isState(\"open\", \"connecting\")\n  }\n\n  // Private\n\n  isProtocolSupported() {\n    return indexOf.call(supportedProtocols, this.getProtocol()) >= 0\n  }\n\n  isState(...states) {\n    return indexOf.call(states, this.getState()) >= 0\n  }\n\n  getState() {\n    if (this.webSocket) {\n      for (let state in adapters.WebSocket) {\n        if (adapters.WebSocket[state] === this.webSocket.readyState) {\n          return state.toLowerCase()\n        }\n      }\n    }\n    return null\n  }\n\n  installEventHandlers() {\n    for (let eventName in this.events) {\n      const handler = this.events[eventName].bind(this)\n      this.webSocket[`on${eventName}`] = handler\n    }\n  }\n\n  uninstallEventHandlers() {\n    for (let eventName in this.events) {\n      this.webSocket[`on${eventName}`] = function() {}\n    }\n  }\n\n}\n\nConnection.reopenDelay = 500\n\nConnection.prototype.events = {\n  message(event) {\n    if (!this.isProtocolSupported()) { return }\n    const {identifier, message, reason, reconnect, type} = JSON.parse(event.data)\n    switch (type) {\n      case message_types.welcome:\n        this.monitor.recordConnect()\n        return this.subscriptions.reload()\n      case message_types.disconnect:\n        logger.log(`Disconnecting. Reason: ${reason}`)\n        return this.close({allowReconnect: reconnect})\n      case message_types.ping:\n        return this.monitor.recordPing()\n      case message_types.confirmation:\n        this.subscriptions.confirmSubscription(identifier)\n        return this.subscriptions.notify(identifier, \"connected\")\n      case message_types.rejection:\n        return this.subscriptions.reject(identifier)\n      default:\n        return this.subscriptions.notify(identifier, \"received\", message)\n    }\n  },\n\n  open() {\n    logger.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`)\n    this.disconnected = false\n    if (!this.isProtocolSupported()) {\n      logger.log(\"Protocol is unsupported. Stopping monitor and disconnecting.\")\n      return this.close({allowReconnect: false})\n    }\n  },\n\n  close(event) {\n    logger.log(\"WebSocket onclose event\")\n    if (this.disconnected) { return }\n    this.disconnected = true\n    this.monitor.recordDisconnect()\n    return this.subscriptions.notifyAll(\"disconnected\", {willAttemptReconnect: this.monitor.isRunning()})\n  },\n\n  error() {\n    logger.log(\"WebSocket onerror event\")\n  }\n}\n\nexport default Connection\n", "// A new subscription is created through the ActionCable.Subscriptions instance available on the consumer.\n// It provides a number of callbacks and a method for calling remote procedure calls on the corresponding\n// Channel instance on the server side.\n//\n// An example demonstrates the basic functionality:\n//\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\", {\n//     connected() {\n//       // Called once the subscription has been successfully completed\n//     },\n//\n//     disconnected({ willAttemptReconnect: boolean }) {\n//       // Called when the client has disconnected with the server.\n//       // The object will have an `willAttemptReconnect` property which\n//       // says whether the client has the intention of attempting\n//       // to reconnect.\n//     },\n//\n//     appear() {\n//       this.perform('appear', {appearing_on: this.appearingOn()})\n//     },\n//\n//     away() {\n//       this.perform('away')\n//     },\n//\n//     appearingOn() {\n//       $('main').data('appearing-on')\n//     }\n//   })\n//\n// The methods #appear and #away forward their intent to the remote AppearanceChannel instance on the server\n// by calling the `perform` method with the first parameter being the action (which maps to AppearanceChannel#appear/away).\n// The second parameter is a hash that'll get JSON encoded and made available on the server in the data parameter.\n//\n// This is how the server component would look:\n//\n//   class AppearanceChannel < ApplicationActionCable::Channel\n//     def subscribed\n//       current_user.appear\n//     end\n//\n//     def unsubscribed\n//       current_user.disappear\n//     end\n//\n//     def appear(data)\n//       current_user.appear on: data['appearing_on']\n//     end\n//\n//     def away\n//       current_user.away\n//     end\n//   end\n//\n// The \"AppearanceChannel\" name is automatically mapped between the client-side subscription creation and the server-side Ruby class name.\n// The AppearanceChannel#appear/away public methods are exposed automatically to client-side invocation through the perform method.\n\nconst extend = function(object, properties) {\n  if (properties != null) {\n    for (let key in properties) {\n      const value = properties[key]\n      object[key] = value\n    }\n  }\n  return object\n}\n\nexport default class Subscription {\n  constructor(consumer, params = {}, mixin) {\n    this.consumer = consumer\n    this.identifier = JSON.stringify(params)\n    extend(this, mixin)\n  }\n\n  // Perform a channel action with the optional data passed as an attribute\n  perform(action, data = {}) {\n    data.action = action\n    return this.send(data)\n  }\n\n  send(data) {\n    return this.consumer.send({command: \"message\", identifier: this.identifier, data: JSON.stringify(data)})\n  }\n\n  unsubscribe() {\n    return this.consumer.subscriptions.remove(this)\n  }\n}\n", "import logger from \"./logger\"\n\n// Responsible for ensuring channel subscribe command is confirmed, retrying until confirmation is received.\n// Internal class, not intended for direct user manipulation.\n\nclass SubscriptionGuarantor {\n  constructor(subscriptions) {\n    this.subscriptions = subscriptions\n    this.pendingSubscriptions = []\n  }\n\n  guarantee(subscription) {\n    if(this.pendingSubscriptions.indexOf(subscription) == -1){ \n      logger.log(`SubscriptionGuarantor guaranteeing ${subscription.identifier}`)\n      this.pendingSubscriptions.push(subscription) \n    }\n    else {\n      logger.log(`SubscriptionGuarantor already guaranteeing ${subscription.identifier}`)\n    }\n    this.startGuaranteeing()\n  }\n\n  forget(subscription) {\n    logger.log(`SubscriptionGuarantor forgetting ${subscription.identifier}`)\n    this.pendingSubscriptions = (this.pendingSubscriptions.filter((s) => s !== subscription))\n  }\n\n  startGuaranteeing() {\n    this.stopGuaranteeing()\n    this.retrySubscribing()\n  }\n  \n  stopGuaranteeing() {\n    clearTimeout(this.retryTimeout)\n  }\n\n  retrySubscribing() {\n    this.retryTimeout = setTimeout(() => {\n      if (this.subscriptions && typeof(this.subscriptions.subscribe) === \"function\") {\n        this.pendingSubscriptions.map((subscription) => {\n          logger.log(`SubscriptionGuarantor resubscribing ${subscription.identifier}`)\n          this.subscriptions.subscribe(subscription)\n        })\n      }\n    }\n    , 500)\n  }\n}\n\nexport default SubscriptionGuarantor", "import Subscription from \"./subscription\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport logger from \"./logger\"\n\n// Collection class for creating (and internally managing) channel subscriptions.\n// The only method intended to be triggered by the user is ActionCable.Subscriptions#create,\n// and it should be called through the consumer like so:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n\nexport default class Subscriptions {\n  constructor(consumer) {\n    this.consumer = consumer\n    this.guarantor = new SubscriptionGuarantor(this)\n    this.subscriptions = []\n  }\n\n  create(channelName, mixin) {\n    const channel = channelName\n    const params = typeof channel === \"object\" ? channel : {channel}\n    const subscription = new Subscription(this.consumer, params, mixin)\n    return this.add(subscription)\n  }\n\n  // Private\n\n  add(subscription) {\n    this.subscriptions.push(subscription)\n    this.consumer.ensureActiveConnection()\n    this.notify(subscription, \"initialized\")\n    this.subscribe(subscription)\n    return subscription\n  }\n\n  remove(subscription) {\n    this.forget(subscription)\n    if (!this.findAll(subscription.identifier).length) {\n      this.sendCommand(subscription, \"unsubscribe\")\n    }\n    return subscription\n  }\n\n  reject(identifier) {\n    return this.findAll(identifier).map((subscription) => {\n      this.forget(subscription)\n      this.notify(subscription, \"rejected\")\n      return subscription\n    })\n  }\n\n  forget(subscription) {\n    this.guarantor.forget(subscription)\n    this.subscriptions = (this.subscriptions.filter((s) => s !== subscription))\n    return subscription\n  }\n\n  findAll(identifier) {\n    return this.subscriptions.filter((s) => s.identifier === identifier)\n  }\n\n  reload() {\n    return this.subscriptions.map((subscription) =>\n      this.subscribe(subscription))\n  }\n\n  notifyAll(callbackName, ...args) {\n    return this.subscriptions.map((subscription) =>\n      this.notify(subscription, callbackName, ...args))\n  }\n\n  notify(subscription, callbackName, ...args) {\n    let subscriptions\n    if (typeof subscription === \"string\") {\n      subscriptions = this.findAll(subscription)\n    } else {\n      subscriptions = [subscription]\n    }\n\n    return subscriptions.map((subscription) =>\n      (typeof subscription[callbackName] === \"function\" ? subscription[callbackName](...args) : undefined))\n  }\n\n  subscribe(subscription) {\n    if (this.sendCommand(subscription, \"subscribe\")) {\n      this.guarantor.guarantee(subscription)\n    }\n  }\n\n  confirmSubscription(identifier) {\n    logger.log(`Subscription confirmed ${identifier}`)\n    this.findAll(identifier).map((subscription) =>\n      this.guarantor.forget(subscription))\n  }\n\n  sendCommand(subscription, command) {\n    const {identifier} = subscription\n    return this.consumer.send({command, identifier})\n  }\n}\n", "import Connection from \"./connection\"\nimport Subscriptions from \"./subscriptions\"\n\n// The ActionCable.Consumer establishes the connection to a server-side Ruby Connection object. Once established,\n// the ActionCable.ConnectionMonitor will ensure that its properly maintained through heartbeats and checking for stale updates.\n// The Consumer instance is also the gateway to establishing subscriptions to desired channels through the #createSubscription\n// method.\n//\n// The following example shows how this can be set up:\n//\n//   App = {}\n//   App.cable = ActionCable.createConsumer(\"ws://example.com/accounts/1\")\n//   App.appearance = App.cable.subscriptions.create(\"AppearanceChannel\")\n//\n// For more details on how you'd configure an actual channel subscription, see ActionCable.Subscription.\n//\n// When a consumer is created, it automatically connects with the server.\n//\n// To disconnect from the server, call\n//\n//   App.cable.disconnect()\n//\n// and to restart the connection:\n//\n//   App.cable.connect()\n//\n// Any channel subscriptions which existed prior to disconnecting will\n// automatically resubscribe.\n\nexport default class Consumer {\n  constructor(url) {\n    this._url = url\n    this.subscriptions = new Subscriptions(this)\n    this.connection = new Connection(this)\n  }\n\n  get url() {\n    return createWebSocketURL(this._url)\n  }\n\n  send(data) {\n    return this.connection.send(data)\n  }\n\n  connect() {\n    return this.connection.open()\n  }\n\n  disconnect() {\n    return this.connection.close({allowReconnect: false})\n  }\n\n  ensureActiveConnection() {\n    if (!this.connection.isActive()) {\n      return this.connection.open()\n    }\n  }\n}\n\nexport function createWebSocketURL(url) {\n  if (typeof url === \"function\") {\n    url = url()\n  }\n\n  if (url && !/^wss?:/i.test(url)) {\n    const a = document.createElement(\"a\")\n    a.href = url\n    // Fix populating Location properties in IE. Otherwise, protocol will be blank.\n    a.href = a.href\n    a.protocol = a.protocol.replace(\"http\", \"ws\")\n    return a.href\n  } else {\n    return url\n  }\n}\n", "import Connection from \"./connection\"\nimport ConnectionMonitor from \"./connection_monitor\"\nimport Consumer, { createWebSocketURL } from \"./consumer\"\nimport INTERNAL from \"./internal\"\nimport Subscription from \"./subscription\"\nimport Subscriptions from \"./subscriptions\"\nimport SubscriptionGuarantor from \"./subscription_guarantor\"\nimport adapters from \"./adapters\"\nimport logger from \"./logger\"\n\nexport {\n  Connection,\n  ConnectionMonitor,\n  Consumer,\n  INTERNAL,\n  Subscription,\n  Subscriptions,\n  SubscriptionGuarantor,\n  adapters,\n  createWebSocketURL,\n  logger,\n}\n\nexport function createConsumer(url = getConfig(\"url\") || INTERNAL.default_mount_path) {\n  return new Consumer(url)\n}\n\nexport function getConfig(name) {\n  const element = document.head.querySelector(`meta[name='action-cable-${name}']`)\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n", "export const attachmentSelector = \"[data-trix-attachment]\"\n\nconst attachments = {\n  preview: {\n    presentation: \"gallery\",\n    caption: {\n      name: true,\n      size: true,\n    },\n  },\n  file: {\n    caption: {\n      size: true,\n    },\n  },\n}\nexport default attachments\n", "const attributes = {\n  default: {\n    tagName: \"div\",\n    parse: false,\n  },\n  quote: {\n    tagName: \"blockquote\",\n    nestable: true,\n  },\n  heading1: {\n    tagName: \"h1\",\n    terminal: true,\n    breakOnReturn: true,\n    group: false,\n  },\n  code: {\n    tagName: \"pre\",\n    terminal: true,\n    htmlAttributes: [ \"language\" ],\n    text: {\n      plaintext: true,\n    },\n  },\n  bulletList: {\n    tagName: \"ul\",\n    parse: false,\n  },\n  bullet: {\n    tagName: \"li\",\n    listAttribute: \"bulletList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  numberList: {\n    tagName: \"ol\",\n    parse: false,\n  },\n  number: {\n    tagName: \"li\",\n    listAttribute: \"numberList\",\n    group: false,\n    nestable: true,\n    test(element) {\n      return tagName(element.parentNode) === attributes[this.listAttribute].tagName\n    },\n  },\n  attachmentGallery: {\n    tagName: \"div\",\n    exclusive: true,\n    terminal: true,\n    parse: false,\n    group: false,\n  },\n}\n\nconst tagName = (element) => element?.tagName?.toLowerCase()\n\nexport default attributes\n", "const androidVersionMatch = navigator.userAgent.match(/android\\s([0-9]+.*Chrome)/i)\nconst androidVersion = androidVersionMatch && parseInt(androidVersionMatch[1])\n\nexport default {\n  // Android emits composition events when moving the cursor through existing text\n  // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9\n  composesExistingText: /Android.*Chrome/.test(navigator.userAgent),\n\n  // Android 13, especially on Samsung keyboards, emits extra compositionend and beforeinput events\n  // that can make the input handler lose the current selection or enter an infinite input -> render -> input\n  // loop.\n  recentAndroid: androidVersion && androidVersion > 12,\n  samsungAndroid: androidVersion && navigator.userAgent.match(/Android.*SM-/),\n\n  // IE 11 activates resizing handles on editable elements that have \"layout\"\n  forcesObjectResizing: /Trident.*rv:11/.test(navigator.userAgent),\n  // https://www.w3.org/TR/input-events-1/ + https://www.w3.org/TR/input-events-2/\n  supportsInputEvents: typeof InputEvent !== \"undefined\" &&\n    [ \"data\", \"getTargetRanges\", \"inputType\" ].every(prop => prop in InputEvent.prototype),\n}\n", "export default {\n  attachFiles: \"Attach Files\",\n  bold: \"Bold\",\n  bullets: \"Bullets\",\n  byte: \"Byte\",\n  bytes: \"Bytes\",\n  captionPlaceholder: \"Add a caption\u2026\",\n  code: \"Code\",\n  heading1: \"Heading\",\n  indent: \"Increase Level\",\n  italic: \"Italic\",\n  link: \"Link\",\n  numbers: \"Numbers\",\n  outdent: \"Decrease Level\",\n  quote: \"Quote\",\n  redo: \"Redo\",\n  remove: \"Remove\",\n  strike: \"Strikethrough\",\n  undo: \"Undo\",\n  unlink: \"Unlink\",\n  url: \"URL\",\n  urlPlaceholder: \"Enter a URL\u2026\",\n  GB: \"GB\",\n  KB: \"KB\",\n  MB: \"MB\",\n  PB: \"PB\",\n  TB: \"TB\",\n}\n", "/* eslint-disable\n    no-case-declarations,\n*/\nimport lang from \"trix/config/lang\"\n\nconst sizes = [ lang.bytes, lang.KB, lang.MB, lang.GB, lang.TB, lang.PB ]\n\nexport default {\n  prefix: \"IEC\",\n  precision: 2,\n\n  formatter(number) {\n    switch (number) {\n      case 0:\n        return `0 ${lang.bytes}`\n      case 1:\n        return `1 ${lang.byte}`\n      default:\n        let base\n\n        if (this.prefix === \"SI\") {\n          base = 1000\n        } else if (this.prefix === \"IEC\") {\n          base = 1024\n        }\n\n        const exp = Math.floor(Math.log(number) / Math.log(base))\n        const humanSize = number / Math.pow(base, exp)\n        const string = humanSize.toFixed(this.precision)\n        const withoutInsignificantZeros = string.replace(/0*$/, \"\").replace(/\\.$/, \"\")\n        return `${withoutInsignificantZeros} ${sizes[exp]}`\n    }\n  },\n}\n", "export const ZERO_WIDTH_SPACE = \"\\uFEFF\"\nexport const NON_BREAKING_SPACE = \"\\u00A0\"\nexport const OBJECT_REPLACEMENT_CHARACTER = \"\\uFFFC\"\n", "export const extend = function(properties) {\n  for (const key in properties) {\n    const value = properties[key]\n    this[key] = value\n  }\n  return this\n}\n", "import blockAttributes from \"trix/config/block_attributes\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { extend } from \"./extend\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nconst html = document.documentElement\nconst match = html.matches\n\nexport const handleEvent = function(eventName, { onElement, matchingSelector, withCallback, inPhase, preventDefault, times } = {}) {\n  const element = onElement ? onElement : html\n  const selector = matchingSelector\n  const useCapture = inPhase === \"capturing\"\n\n  const handler = function(event) {\n    if (times != null && --times === 0) {\n      handler.destroy()\n    }\n    const target = findClosestElementFromNode(event.target, { matchingSelector: selector })\n    if (target != null) {\n      withCallback?.call(target, event, target)\n      if (preventDefault) {\n        event.preventDefault()\n      }\n    }\n  }\n\n  handler.destroy = () => element.removeEventListener(eventName, handler, useCapture)\n\n  element.addEventListener(eventName, handler, useCapture)\n  return handler\n}\n\nexport const handleEventOnce = function(eventName, options = {}) {\n  options.times = 1\n  return handleEvent(eventName, options)\n}\n\nexport const triggerEvent = function(eventName, { onElement, bubbles, cancelable, attributes } = {}) {\n  const element = onElement != null ? onElement : html\n  bubbles = bubbles !== false\n  cancelable = cancelable !== false\n\n  const event = document.createEvent(\"Events\")\n  event.initEvent(eventName, bubbles, cancelable)\n  if (attributes != null) {\n    extend.call(event, attributes)\n  }\n  return element.dispatchEvent(event)\n}\n\nexport const elementMatchesSelector = function(element, selector) {\n  if (element?.nodeType === 1) {\n    return match.call(element, selector)\n  }\n}\n\nexport const findClosestElementFromNode = function(node, { matchingSelector, untilNode } = {}) {\n  while (node && node.nodeType !== Node.ELEMENT_NODE) {\n    node = node.parentNode\n  }\n  if (node == null) {\n    return\n  }\n\n  if (matchingSelector != null) {\n    if (node.closest && untilNode == null) {\n      return node.closest(matchingSelector)\n    } else {\n      while (node && node !== untilNode) {\n        if (elementMatchesSelector(node, matchingSelector)) {\n          return node\n        }\n        node = node.parentNode\n      }\n    }\n  } else {\n    return node\n  }\n}\n\nexport const findInnerElement = function(element) {\n  while (element?.firstElementChild) {\n    element = element.firstElementChild\n  }\n  return element\n}\n\nexport const innerElementIsActive = (element) =>\n  document.activeElement !== element && elementContainsNode(element, document.activeElement)\n\nexport const elementContainsNode = function(element, node) {\n  if (!element || !node) {\n    return\n  }\n  while (node) {\n    if (node === element) {\n      return true\n    }\n    node = node.parentNode\n  }\n}\n\nexport const findNodeFromContainerAndOffset = function(container, offset) {\n  if (!container) {\n    return\n  }\n  if (container.nodeType === Node.TEXT_NODE) {\n    return container\n  } else if (offset === 0) {\n    return container.firstChild != null ? container.firstChild : container\n  } else {\n    return container.childNodes.item(offset - 1)\n  }\n}\n\nexport const findElementFromContainerAndOffset = function(container, offset) {\n  const node = findNodeFromContainerAndOffset(container, offset)\n  return findClosestElementFromNode(node)\n}\n\nexport const findChildIndexOfNode = function(node) {\n  if (!node?.parentNode) {\n    return\n  }\n  let childIndex = 0\n  node = node.previousSibling\n  while (node) {\n    childIndex++\n    node = node.previousSibling\n  }\n  return childIndex\n}\n\nexport const removeNode = (node) => node?.parentNode?.removeChild(node)\n\nexport const walkTree = function(tree, { onlyNodesOfType, usingFilter, expandEntityReferences } = {}) {\n  const whatToShow = (() => {\n    switch (onlyNodesOfType) {\n      case \"element\":\n        return NodeFilter.SHOW_ELEMENT\n      case \"text\":\n        return NodeFilter.SHOW_TEXT\n      case \"comment\":\n        return NodeFilter.SHOW_COMMENT\n      default:\n        return NodeFilter.SHOW_ALL\n    }\n  })()\n\n  return document.createTreeWalker(\n    tree,\n    whatToShow,\n    usingFilter != null ? usingFilter : null,\n    expandEntityReferences === true\n  )\n}\n\nexport const tagName = (element) => element?.tagName?.toLowerCase()\n\nexport const makeElement = function(tag, options = {}) {\n  let key, value\n  if (typeof tag === \"object\") {\n    options = tag\n    tag = options.tagName\n  } else {\n    options = { attributes: options }\n  }\n\n  const element = document.createElement(tag)\n\n  if (options.editable != null) {\n    if (options.attributes == null) {\n      options.attributes = {}\n    }\n    options.attributes.contenteditable = options.editable\n  }\n\n  if (options.attributes) {\n    for (key in options.attributes) {\n      value = options.attributes[key]\n      element.setAttribute(key, value)\n    }\n  }\n\n  if (options.style) {\n    for (key in options.style) {\n      value = options.style[key]\n      element.style[key] = value\n    }\n  }\n\n  if (options.data) {\n    for (key in options.data) {\n      value = options.data[key]\n      element.dataset[key] = value\n    }\n  }\n\n  if (options.className) {\n    options.className.split(\" \").forEach((className) => {\n      element.classList.add(className)\n    })\n  }\n\n  if (options.textContent) {\n    element.textContent = options.textContent\n  }\n\n  if (options.childNodes) {\n    [].concat(options.childNodes).forEach((childNode) => {\n      element.appendChild(childNode)\n    })\n  }\n\n  return element\n}\n\nlet blockTagNames = undefined\n\nexport const getBlockTagNames = function() {\n  if (blockTagNames != null) {\n    return blockTagNames\n  }\n\n  blockTagNames = []\n  for (const key in blockAttributes) {\n    const attributes = blockAttributes[key]\n    if (attributes.tagName) {\n      blockTagNames.push(attributes.tagName)\n    }\n  }\n\n  return blockTagNames\n}\n\nexport const nodeIsBlockContainer = (node) => nodeIsBlockStartComment(node?.firstChild)\n\nexport const nodeProbablyIsBlockContainer = function(node) {\n  return getBlockTagNames().includes(tagName(node)) && !getBlockTagNames().includes(tagName(node.firstChild))\n}\n\nexport const nodeIsBlockStart = function(node, { strict } = { strict: true }) {\n  if (strict) {\n    return nodeIsBlockStartComment(node)\n  } else {\n    return (\n      nodeIsBlockStartComment(node) || !nodeIsBlockStartComment(node.firstChild) && nodeProbablyIsBlockContainer(node)\n    )\n  }\n}\n\nexport const nodeIsBlockStartComment = (node) => nodeIsCommentNode(node) && node?.data === \"block\"\n\nexport const nodeIsCommentNode = (node) => node?.nodeType === Node.COMMENT_NODE\n\nexport const nodeIsCursorTarget = function(node, { name } = {}) {\n  if (!node) {\n    return\n  }\n  if (nodeIsTextNode(node)) {\n    if (node.data === ZERO_WIDTH_SPACE) {\n      if (name) {\n        return node.parentNode.dataset.trixCursorTarget === name\n      } else {\n        return true\n      }\n    }\n  } else {\n    return nodeIsCursorTarget(node.firstChild)\n  }\n}\n\nexport const nodeIsAttachmentElement = (node) => elementMatchesSelector(node, attachmentSelector)\n\nexport const nodeIsEmptyTextNode = (node) => nodeIsTextNode(node) && node?.data === \"\"\n\nexport const nodeIsTextNode = (node) => node?.nodeType === Node.TEXT_NODE\n", "import browser from \"trix/config/browser\"\nimport { makeElement, removeNode } from \"trix/core/helpers/dom\"\n\nconst input = {\n  level2Enabled: true,\n\n  getLevel() {\n    if (this.level2Enabled && browser.supportsInputEvents) {\n      return 2\n    } else {\n      return 0\n    }\n  },\n  pickFiles(callback) {\n    const input = makeElement(\"input\", { type: \"file\", multiple: true, hidden: true, id: this.fileInputId })\n\n    input.addEventListener(\"change\", () => {\n      callback(input.files)\n      removeNode(input)\n    })\n\n    removeNode(document.getElementById(this.fileInputId))\n    document.body.appendChild(input)\n    input.click()\n  }\n}\n\nexport default input\n", "export default {\n  8: \"backspace\",\n  9: \"tab\",\n  13: \"return\",\n  27: \"escape\",\n  37: \"left\",\n  39: \"right\",\n  46: \"delete\",\n  68: \"d\",\n  72: \"h\",\n  79: \"o\",\n}\n", "export default {\n  removeBlankTableCells: false,\n  tableCellSeparator: \" | \",\n  tableRowSeparator: \"\\n\",\n}\n", "import { attachmentSelector } from \"trix/config/attachments\"\n\nexport default {\n  bold: {\n    tagName: \"strong\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontWeight === \"bold\" || style.fontWeight >= 600\n    },\n  },\n  italic: {\n    tagName: \"em\",\n    inheritable: true,\n    parser(element) {\n      const style = window.getComputedStyle(element)\n      return style.fontStyle === \"italic\"\n    },\n  },\n  href: {\n    groupTagName: \"a\",\n    parser(element) {\n      const matchingSelector = `a:not(${attachmentSelector})`\n      const link = element.closest(matchingSelector)\n      if (link) {\n        return link.getAttribute(\"href\")\n      }\n    },\n  },\n  strike: {\n    tagName: \"del\",\n    inheritable: true,\n  },\n  frozen: {\n    style: { backgroundColor: \"highlight\" },\n  },\n}\n", "import lang from \"trix/config/lang\"\n\nexport default {\n  getDefaultHTML() {\n    return `<div class=\"trix-button-row\">\n      <span class=\"trix-button-group trix-button-group--text-tools\" data-trix-button-group=\"text-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bold\" data-trix-attribute=\"bold\" data-trix-key=\"b\" title=\"${lang.bold}\" tabindex=\"-1\">${lang.bold}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-italic\" data-trix-attribute=\"italic\" data-trix-key=\"i\" title=\"${lang.italic}\" tabindex=\"-1\">${lang.italic}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-strike\" data-trix-attribute=\"strike\" title=\"${lang.strike}\" tabindex=\"-1\">${lang.strike}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-link\" data-trix-attribute=\"href\" data-trix-action=\"link\" data-trix-key=\"k\" title=\"${lang.link}\" tabindex=\"-1\">${lang.link}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--block-tools\" data-trix-button-group=\"block-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-heading-1\" data-trix-attribute=\"heading1\" title=\"${lang.heading1}\" tabindex=\"-1\">${lang.heading1}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-quote\" data-trix-attribute=\"quote\" title=\"${lang.quote}\" tabindex=\"-1\">${lang.quote}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-code\" data-trix-attribute=\"code\" title=\"${lang.code}\" tabindex=\"-1\">${lang.code}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-bullet-list\" data-trix-attribute=\"bullet\" title=\"${lang.bullets}\" tabindex=\"-1\">${lang.bullets}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-number-list\" data-trix-attribute=\"number\" title=\"${lang.numbers}\" tabindex=\"-1\">${lang.numbers}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-decrease-nesting-level\" data-trix-action=\"decreaseNestingLevel\" title=\"${lang.outdent}\" tabindex=\"-1\">${lang.outdent}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-increase-nesting-level\" data-trix-action=\"increaseNestingLevel\" title=\"${lang.indent}\" tabindex=\"-1\">${lang.indent}</button>\n      </span>\n\n      <span class=\"trix-button-group trix-button-group--file-tools\" data-trix-button-group=\"file-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-attach\" data-trix-action=\"attachFiles\" title=\"${lang.attachFiles}\" tabindex=\"-1\">${lang.attachFiles}</button>\n      </span>\n\n      <span class=\"trix-button-group-spacer\"></span>\n\n      <span class=\"trix-button-group trix-button-group--history-tools\" data-trix-button-group=\"history-tools\">\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-undo\" data-trix-action=\"undo\" data-trix-key=\"z\" title=\"${lang.undo}\" tabindex=\"-1\">${lang.undo}</button>\n        <button type=\"button\" class=\"trix-button trix-button--icon trix-button--icon-redo\" data-trix-action=\"redo\" data-trix-key=\"shift+z\" title=\"${lang.redo}\" tabindex=\"-1\">${lang.redo}</button>\n      </span>\n    </div>\n\n    <div class=\"trix-dialogs\" data-trix-dialogs>\n      <div class=\"trix-dialog trix-dialog--link\" data-trix-dialog=\"href\" data-trix-dialog-attribute=\"href\">\n        <div class=\"trix-dialog__link-fields\">\n          <input type=\"url\" name=\"href\" class=\"trix-input trix-input--dialog\" placeholder=\"${lang.urlPlaceholder}\" aria-label=\"${lang.url}\" required data-trix-input>\n          <div class=\"trix-button-group\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.link}\" data-trix-method=\"setAttribute\">\n            <input type=\"button\" class=\"trix-button trix-button--dialog\" value=\"${lang.unlink}\" data-trix-method=\"removeAttribute\">\n          </div>\n        </div>\n      </div>\n    </div>`\n  },\n}\n", "const undo = { interval: 5000 }\nexport default undo\n", "export default {\n  attachment: \"attachment\",\n  attachmentCaption: \"attachment__caption\",\n  attachmentCaptionEditor: \"attachment__caption-editor\",\n  attachmentMetadata: \"attachment__metadata\",\n  attachmentMetadataContainer: \"attachment__metadata-container\",\n  attachmentName: \"attachment__name\",\n  attachmentProgress: \"attachment__progress\",\n  attachmentSize: \"attachment__size\",\n  attachmentToolbar: \"attachment__toolbar\",\n  attachmentGallery: \"attachment-gallery\",\n}\n", "export default class BasicObject {\n  static proxyMethod(expression) {\n    const { name, toMethod, toProperty, optional } = parseProxyMethodExpression(expression)\n\n    this.prototype[name] = function() {\n      let subject\n      let object\n\n      if (toMethod) {\n        if (optional) {\n          object = this[toMethod]?.()\n        } else {\n          object = this[toMethod]()\n        }\n      } else if (toProperty) {\n        object = this[toProperty]\n      }\n\n      if (optional) {\n        subject = object?.[name]\n        if (subject) {\n          return apply.call(subject, object, arguments)\n        }\n      } else {\n        subject = object[name]\n        return apply.call(subject, object, arguments)\n      }\n    }\n  }\n}\n\nconst parseProxyMethodExpression = function(expression) {\n  const match = expression.match(proxyMethodExpressionPattern)\n  if (!match) {\n    throw new Error(`can't parse @proxyMethod expression: ${expression}`)\n  }\n\n  const args = { name: match[4] }\n\n  if (match[2] != null) {\n    args.toMethod = match[1]\n  } else {\n    args.toProperty = match[1]\n  }\n\n  if (match[3] != null) {\n    args.optional = true\n  }\n\n  return args\n}\n\nconst { apply } = Function.prototype\n\nconst proxyMethodExpressionPattern = new RegExp(\"\\\n^\\\n(.+?)\\\n(\\\\(\\\\))?\\\n(\\\\?)?\\\n\\\\.\\\n(.+?)\\\n$\\\n\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UTF16String extends BasicObject {\n  static box(value = \"\") {\n    if (value instanceof this) {\n      return value\n    } else {\n      return this.fromUCS2String(value?.toString())\n    }\n  }\n\n  static fromUCS2String(ucs2String) {\n    return new this(ucs2String, ucs2decode(ucs2String))\n  }\n\n  static fromCodepoints(codepoints) {\n    return new this(ucs2encode(codepoints), codepoints)\n  }\n\n  constructor(ucs2String, codepoints) {\n    super(...arguments)\n    this.ucs2String = ucs2String\n    this.codepoints = codepoints\n    this.length = this.codepoints.length\n    this.ucs2Length = this.ucs2String.length\n  }\n\n  offsetToUCS2Offset(offset) {\n    return ucs2encode(this.codepoints.slice(0, Math.max(0, offset))).length\n  }\n\n  offsetFromUCS2Offset(ucs2Offset) {\n    return ucs2decode(this.ucs2String.slice(0, Math.max(0, ucs2Offset))).length\n  }\n\n  slice() {\n    return this.constructor.fromCodepoints(this.codepoints.slice(...arguments))\n  }\n\n  charAt(offset) {\n    return this.slice(offset, offset + 1)\n  }\n\n  isEqualTo(value) {\n    return this.constructor.box(value).ucs2String === this.ucs2String\n  }\n\n  toJSON() {\n    return this.ucs2String\n  }\n\n  getCacheKey() {\n    return this.ucs2String\n  }\n\n  toString() {\n    return this.ucs2String\n  }\n}\n\nconst hasArrayFrom = Array.from?.(\"\\ud83d\\udc7c\").length === 1\nconst hasStringCodePointAt = \" \".codePointAt?.(0) != null\nconst hasStringFromCodePoint = String.fromCodePoint?.(32, 128124) === \" \\ud83d\\udc7c\"\n\n// UCS-2 conversion helpers ported from Mathias Bynens' Punycode.js:\n// https://github.com/bestiejs/punycode.js#punycodeucs2\n\nlet ucs2decode, ucs2encode\n\n// Creates an array containing the numeric code points of each Unicode\n// character in the string. While JavaScript uses UCS-2 internally,\n// this function will convert a pair of surrogate halves (each of which\n// UCS-2 exposes as separate characters) into a single code point,\n// matching UTF-16.\nif (hasArrayFrom && hasStringCodePointAt) {\n  ucs2decode = (string) => Array.from(string).map((char) => char.codePointAt(0))\n} else {\n  ucs2decode = function(string) {\n    const output = []\n    let counter = 0\n    const { length } = string\n\n    while (counter < length) {\n      let value = string.charCodeAt(counter++)\n      if (0xd800 <= value && value <= 0xdbff && counter < length) {\n        // high surrogate, and there is a next character\n        const extra = string.charCodeAt(counter++)\n        if ((extra & 0xfc00) === 0xdc00) {\n          // low surrogate\n          value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000\n        } else {\n          // unmatched surrogate; only append this code unit, in case the\n          // next code unit is the high surrogate of a surrogate pair\n          counter--\n        }\n      }\n      output.push(value)\n    }\n\n    return output\n  }\n}\n\n// Creates a string based on an array of numeric code points.\nif (hasStringFromCodePoint) {\n  ucs2encode = (array) => String.fromCodePoint(...Array.from(array || []))\n} else {\n  ucs2encode = function(array) {\n    const characters = (() => {\n      const result = []\n\n      Array.from(array).forEach((value) => {\n        let output = \"\"\n        if (value > 0xffff) {\n          value -= 0x10000\n          output += String.fromCharCode(value >>> 10 & 0x3ff | 0xd800)\n          value = 0xdc00 | value & 0x3ff\n        }\n        result.push(output + String.fromCharCode(value))\n      })\n\n      return result\n    })()\n\n    return characters.join(\"\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nlet id = 0\n\nexport default class TrixObject extends BasicObject {\n  static fromJSONString(jsonString) {\n    return this.fromJSON(JSON.parse(jsonString))\n  }\n\n  constructor() {\n    super(...arguments)\n    this.id = ++id\n  }\n\n  hasSameConstructorAs(object) {\n    return this.constructor === object?.constructor\n  }\n\n  isEqualTo(object) {\n    return this === object\n  }\n\n  inspect() {\n    const parts = []\n    const contents = this.contentsForInspection() || {}\n\n    for (const key in contents) {\n      const value = contents[key]\n      parts.push(`${key}=${value}`)\n    }\n\n    return `#<${this.constructor.name}:${this.id}${parts.length ? ` ${parts.join(\", \")}` : \"\"}>`\n  }\n\n  contentsForInspection() {}\n\n  toJSONString() {\n    return JSON.stringify(this)\n  }\n\n  toUTF16String() {\n    return UTF16String.box(this)\n  }\n\n  getCacheKey() {\n    return this.id.toString()\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nexport const arraysAreEqual = function(a = [], b = []) {\n  if (a.length !== b.length) {\n    return false\n  }\n  for (let index = 0; index < a.length; index++) {\n    const value = a[index]\n    if (value !== b[index]) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const arrayStartsWith = (a = [], b = []) => arraysAreEqual(a.slice(0, b.length), b)\n\nexport const spliceArray = function(array, ...args) {\n  const result = array.slice(0)\n  result.splice(...args)\n  return result\n}\n\nexport const summarizeArrayChange = function(oldArray = [], newArray = []) {\n  const added = []\n  const removed = []\n\n  const existingValues = new Set()\n\n  oldArray.forEach((value) => {\n    existingValues.add(value)\n  })\n\n  const currentValues = new Set()\n\n  newArray.forEach((value) => {\n    currentValues.add(value)\n    if (!existingValues.has(value)) {\n      added.push(value)\n    }\n  })\n\n  oldArray.forEach((value) => {\n    if (!currentValues.has(value)) {\n      removed.push(value)\n    }\n  })\n\n  return { added, removed }\n}\n", "import { makeElement } from \"trix/core/helpers/dom\"\n\n// https://github.com/mathiasbynens/unicode-2.1.8/blob/master/Bidi_Class/Right_To_Left/regex.js\nconst RTL_PATTERN =\n  /[\\u05BE\\u05C0\\u05C3\\u05D0-\\u05EA\\u05F0-\\u05F4\\u061B\\u061F\\u0621-\\u063A\\u0640-\\u064A\\u066D\\u0671-\\u06B7\\u06BA-\\u06BE\\u06C0-\\u06CE\\u06D0-\\u06D5\\u06E5\\u06E6\\u200F\\u202B\\u202E\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE72\\uFE74\\uFE76-\\uFEFC]/\n\nexport const getDirection = (function() {\n  const input = makeElement(\"input\", { dir: \"auto\", name: \"x\", dirName: \"x.dir\" })\n  const textArea = makeElement(\"textarea\", { dir: \"auto\", name: \"y\", dirName: \"y.dir\" })\n  const form = makeElement(\"form\")\n  form.appendChild(input)\n  form.appendChild(textArea)\n\n  const supportsDirName = (function() {\n    try {\n      return new FormData(form).has(textArea.dirName)\n    } catch (error) {\n      return false\n    }\n  })()\n\n  const supportsDirSelector = (function() {\n    try {\n      return input.matches(\":dir(ltr),:dir(rtl)\")\n    } catch (error) {\n      return false\n    }\n  })()\n\n  if (supportsDirName) {\n    return function(string) {\n      textArea.value = string\n      return new FormData(form).get(textArea.dirName)\n    }\n  } else if (supportsDirSelector) {\n    return function(string) {\n      input.value = string\n      if (input.matches(\":dir(rtl)\")) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  } else {\n    return function(string) {\n      const char = string.trim().charAt(0)\n      if (RTL_PATTERN.test(char)) {\n        return \"rtl\"\n      } else {\n        return \"ltr\"\n      }\n    }\n  }\n})()\n", "import * as config from \"trix/config\"\n\nlet allAttributeNames = null\nlet blockAttributeNames = null\nlet textAttributeNames = null\nlet listAttributeNames = null\n\nexport const getAllAttributeNames = () => {\n  if (!allAttributeNames) {\n    allAttributeNames = getTextAttributeNames().concat(getBlockAttributeNames())\n  }\n  return allAttributeNames\n}\n\nexport const getBlockConfig = (attributeName) => config.blockAttributes[attributeName]\n\nexport const getBlockAttributeNames = () => {\n  if (!blockAttributeNames) {\n    blockAttributeNames = Object.keys(config.blockAttributes)\n  }\n  return blockAttributeNames\n}\n\nexport const getTextConfig = (attributeName) => config.textAttributes[attributeName]\n\nexport const getTextAttributeNames = () => {\n  if (!textAttributeNames) {\n    textAttributeNames = Object.keys(config.textAttributes)\n  }\n  return textAttributeNames\n}\n\nexport const getListAttributeNames = () => {\n  if (!listAttributeNames) {\n    listAttributeNames = []\n    for (const key in config.blockAttributes) {\n      const { listAttribute } = config.blockAttributes[key]\n      if (listAttribute != null) {\n        listAttributeNames.push(listAttribute)\n      }\n    }\n  }\n  return listAttributeNames\n}\n", "/* eslint-disable\n*/\nexport const installDefaultCSSForTagName = function(tagName, defaultCSS) {\n  const styleElement = insertStyleElementForTagName(tagName)\n  styleElement.textContent = defaultCSS.replace(/%t/g, tagName)\n}\n\nconst insertStyleElementForTagName = function(tagName) {\n  const element = document.createElement(\"style\")\n  element.setAttribute(\"type\", \"text/css\")\n  element.setAttribute(\"data-tag-name\", tagName.toLowerCase())\n  const nonce = getCSPNonce()\n  if (nonce) {\n    element.setAttribute(\"nonce\", nonce)\n  }\n  document.head.insertBefore(element, document.head.firstChild)\n  return element\n}\n\nconst getCSPNonce = function() {\n  const element = getMetaElement(\"trix-csp-nonce\") || getMetaElement(\"csp-nonce\")\n  if (element) {\n    return element.getAttribute(\"content\")\n  }\n}\n\nconst getMetaElement = (name) => document.head.querySelector(`meta[name=${name}]`)\n", "const testTransferData = { \"application/x-trix-feature-detection\": \"test\" }\n\nexport const dataTransferIsPlainText = function(dataTransfer) {\n  const text = dataTransfer.getData(\"text/plain\")\n  const html = dataTransfer.getData(\"text/html\")\n\n  if (text && html) {\n    const { body } = new DOMParser().parseFromString(html, \"text/html\")\n    if (body.textContent === text) {\n      return !body.querySelector(\"*\")\n    }\n  } else {\n    return text?.length\n  }\n}\n\nexport const dataTransferIsMsOfficePaste = ({ dataTransfer }) => {\n  return dataTransfer.types.includes(\"Files\") &&\n    dataTransfer.types.includes(\"text/html\") &&\n    dataTransfer.getData(\"text/html\").includes(\"urn:schemas-microsoft-com:office:office\")\n}\n\nexport const dataTransferIsWritable = function(dataTransfer) {\n  if (!dataTransfer?.setData) return false\n\n  for (const key in testTransferData) {\n    const value = testTransferData[key]\n\n    try {\n      dataTransfer.setData(key, value)\n      if (!dataTransfer.getData(key) === value) return false\n    } catch (error) {\n      return false\n    }\n  }\n  return true\n}\n\nexport const keyEventIsKeyboardCommand = (function() {\n  if (/Mac|^iP/.test(navigator.platform)) {\n    return (event) => event.metaKey\n  } else {\n    return (event) => event.ctrlKey\n  }\n})()\n", "export const defer = (fn) => setTimeout(fn, 1)\n", "/* eslint-disable\n    id-length,\n*/\nexport const copyObject = function(object = {}) {\n  const result = {}\n  for (const key in object) {\n    const value = object[key]\n    result[key] = value\n  }\n  return result\n}\n\nexport const objectsAreEqual = function(a = {}, b = {}) {\n  if (Object.keys(a).length !== Object.keys(b).length) {\n    return false\n  }\n  for (const key in a) {\n    const value = a[key]\n    if (value !== b[key]) {\n      return false\n    }\n  }\n  return true\n}\n", "import { copyObject, objectsAreEqual } from \"trix/core/helpers/objects\"\n\nexport const normalizeRange = function(range) {\n  if (range == null) return\n\n  if (!Array.isArray(range)) {\n    range = [ range, range ]\n  }\n  return [ copyValue(range[0]), copyValue(range[1] != null ? range[1] : range[0]) ]\n}\n\nexport const rangeIsCollapsed = function(range) {\n  if (range == null) return\n\n  const [ start, end ] = normalizeRange(range)\n  return rangeValuesAreEqual(start, end)\n}\n\nexport const rangesAreEqual = function(leftRange, rightRange) {\n  if (leftRange == null || rightRange == null) return\n\n  const [ leftStart, leftEnd ] = normalizeRange(leftRange)\n  const [ rightStart, rightEnd ] = normalizeRange(rightRange)\n  return rangeValuesAreEqual(leftStart, rightStart) && rangeValuesAreEqual(leftEnd, rightEnd)\n}\n\nconst copyValue = function(value) {\n  if (typeof value === \"number\") {\n    return value\n  } else {\n    return copyObject(value)\n  }\n}\n\nconst rangeValuesAreEqual = function(left, right) {\n  if (typeof left === \"number\") {\n    return left === right\n  } else {\n    return objectsAreEqual(left, right)\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class SelectionChangeObserver extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.update = this.update.bind(this)\n    this.selectionManagers = []\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true\n      document.addEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false\n      return document.removeEventListener(\"selectionchange\", this.update, true)\n    }\n  }\n\n  registerSelectionManager(selectionManager) {\n    if (!this.selectionManagers.includes(selectionManager)) {\n      this.selectionManagers.push(selectionManager)\n      return this.start()\n    }\n  }\n\n  unregisterSelectionManager(selectionManager) {\n    this.selectionManagers = this.selectionManagers.filter((sm) => sm !== selectionManager)\n    if (this.selectionManagers.length === 0) {\n      return this.stop()\n    }\n  }\n\n  notifySelectionManagersOfSelectionChange() {\n    return this.selectionManagers.map((selectionManager) => selectionManager.selectionDidChange())\n  }\n\n  update() {\n    this.notifySelectionManagersOfSelectionChange()\n  }\n\n  reset() {\n    this.update()\n  }\n}\n\nexport const selectionChangeObserver = new SelectionChangeObserver()\n\nexport const getDOMSelection = function() {\n  const selection = window.getSelection()\n  if (selection.rangeCount > 0) {\n    return selection\n  }\n}\n\nexport const getDOMRange = function() {\n  const domRange = getDOMSelection()?.getRangeAt(0)\n  if (domRange) {\n    if (!domRangeIsPrivate(domRange)) {\n      return domRange\n    }\n  }\n}\n\nexport const setDOMRange = function(domRange) {\n  const selection = window.getSelection()\n  selection.removeAllRanges()\n  selection.addRange(domRange)\n  return selectionChangeObserver.update()\n}\n\n// In Firefox, clicking certain <input> elements changes the selection to a\n// private element used to draw its UI. Attempting to access properties of those\n// elements throws an error.\n// https://bugzilla.mozilla.org/show_bug.cgi?id=208427\nconst domRangeIsPrivate = (domRange) => nodeIsPrivate(domRange.startContainer) || nodeIsPrivate(domRange.endContainer)\n\nconst nodeIsPrivate = (node) => !Object.getPrototypeOf(node)\n", "/* eslint-disable\n    id-length,\n    no-useless-escape,\n*/\nimport { NON_BREAKING_SPACE, ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\n\nexport const normalizeSpaces = (string) =>\n  string.replace(new RegExp(`${ZERO_WIDTH_SPACE}`, \"g\"), \"\").replace(new RegExp(`${NON_BREAKING_SPACE}`, \"g\"), \" \")\n\nexport const normalizeNewlines = (string) => string.replace(/\\r\\n?/g, \"\\n\")\n\nexport const breakableWhitespacePattern = new RegExp(`[^\\\\S${NON_BREAKING_SPACE}]`)\n\nexport const squishBreakableWhitespace = (string) =>\n  string\n    // Replace all breakable whitespace characters with a space\n    .replace(new RegExp(`${breakableWhitespacePattern.source}`, \"g\"), \" \")\n    // Replace two or more spaces with a single space\n    .replace(/\\ {2,}/g, \" \")\n\nexport const summarizeStringChange = function(oldString, newString) {\n  let added, removed\n  oldString = UTF16String.box(oldString)\n  newString = UTF16String.box(newString)\n\n  if (newString.length < oldString.length) {\n    [ removed, added ] = utf16StringDifferences(oldString, newString)\n  } else {\n    [ added, removed ] = utf16StringDifferences(newString, oldString)\n  }\n\n  return { added, removed }\n}\n\nconst utf16StringDifferences = function(a, b) {\n  if (a.isEqualTo(b)) {\n    return [ \"\", \"\" ]\n  }\n\n  const diffA = utf16StringDifference(a, b)\n  const { length } = diffA.utf16String\n\n  let diffB\n\n  if (length) {\n    const { offset } = diffA\n    const codepoints = a.codepoints.slice(0, offset).concat(a.codepoints.slice(offset + length))\n    diffB = utf16StringDifference(b, UTF16String.fromCodepoints(codepoints))\n  } else {\n    diffB = utf16StringDifference(b, a)\n  }\n\n  return [ diffA.utf16String.toString(), diffB.utf16String.toString() ]\n}\n\nconst utf16StringDifference = function(a, b) {\n  let leftIndex = 0\n  let rightIndexA = a.length\n  let rightIndexB = b.length\n\n  while (leftIndex < rightIndexA && a.charAt(leftIndex).isEqualTo(b.charAt(leftIndex))) {\n    leftIndex++\n  }\n\n  while (rightIndexA > leftIndex + 1 && a.charAt(rightIndexA - 1).isEqualTo(b.charAt(rightIndexB - 1))) {\n    rightIndexA--\n    rightIndexB--\n  }\n\n  return {\n    utf16String: a.slice(leftIndex, rightIndexA),\n    offset: leftIndex,\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport { arraysAreEqual } from \"trix/core/helpers\"\n\nexport default class Hash extends TrixObject {\n  static fromCommonAttributesOfObjects(objects = []) {\n    if (!objects.length) {\n      return new this()\n    }\n    let hash = box(objects[0])\n    let keys = hash.getKeys()\n\n    objects.slice(1).forEach((object) => {\n      keys = hash.getKeysCommonToHash(box(object))\n      hash = hash.slice(keys)\n    })\n\n    return hash\n  }\n\n  static box(values) {\n    return box(values)\n  }\n\n  constructor(values = {}) {\n    super(...arguments)\n    this.values = copy(values)\n  }\n\n  add(key, value) {\n    return this.merge(object(key, value))\n  }\n\n  remove(key) {\n    return new Hash(copy(this.values, key))\n  }\n\n  get(key) {\n    return this.values[key]\n  }\n\n  has(key) {\n    return key in this.values\n  }\n\n  merge(values) {\n    return new Hash(merge(this.values, unbox(values)))\n  }\n\n  slice(keys) {\n    const values = {}\n\n    Array.from(keys).forEach((key) => {\n      if (this.has(key)) {\n        values[key] = this.values[key]\n      }\n    })\n\n    return new Hash(values)\n  }\n\n  getKeys() {\n    return Object.keys(this.values)\n  }\n\n  getKeysCommonToHash(hash) {\n    hash = box(hash)\n    return this.getKeys().filter((key) => this.values[key] === hash.values[key])\n  }\n\n  isEqualTo(values) {\n    return arraysAreEqual(this.toArray(), box(values).toArray())\n  }\n\n  isEmpty() {\n    return this.getKeys().length === 0\n  }\n\n  toArray() {\n    if (!this.array) {\n      const result = []\n      for (const key in this.values) {\n        const value = this.values[key]\n        result.push(result.push(key, value))\n      }\n      this.array = result.slice(0)\n    }\n\n    return this.array\n  }\n\n  toObject() {\n    return copy(this.values)\n  }\n\n  toJSON() {\n    return this.toObject()\n  }\n\n  contentsForInspection() {\n    return { values: JSON.stringify(this.values) }\n  }\n}\n\nconst object = function(key, value) {\n  const result = {}\n  result[key] = value\n  return result\n}\n\nconst merge = function(object, values) {\n  const result = copy(object)\n  for (const key in values) {\n    const value = values[key]\n    result[key] = value\n  }\n  return result\n}\n\nconst copy = function(object, keyToRemove) {\n  const result = {}\n  const sortedKeys = Object.keys(object).sort()\n\n  sortedKeys.forEach((key) => {\n    if (key !== keyToRemove) {\n      result[key] = object[key]\n    }\n  })\n\n  return result\n}\n\nconst box = function(object) {\n  if (object instanceof Hash) {\n    return object\n  } else {\n    return new Hash(object)\n  }\n}\n\nconst unbox = function(object) {\n  if (object instanceof Hash) {\n    return object.values\n  } else {\n    return object\n  }\n}\n", "export default class ObjectGroup {\n  static groupObjects(ungroupedObjects = [], { depth, asTree } = {}) {\n    let group\n    if (asTree) {\n      if (depth == null) {\n        depth = 0\n      }\n    }\n    const objects = []\n\n    Array.from(ungroupedObjects).forEach((object) => {\n      if (group) {\n        if (object.canBeGrouped?.(depth) && group[group.length - 1].canBeGroupedWith?.(object, depth)) {\n          group.push(object)\n          return\n        } else {\n          objects.push(new this(group, { depth, asTree }))\n          group = null\n        }\n      }\n\n      if (object.canBeGrouped?.(depth)) {\n        group = [ object ]\n      } else {\n        objects.push(object)\n      }\n    })\n\n    if (group) {\n      objects.push(new this(group, { depth, asTree }))\n    }\n    return objects\n  }\n\n  constructor(objects = [], { depth, asTree }) {\n    this.objects = objects\n    if (asTree) {\n      this.depth = depth\n      this.objects = this.constructor.groupObjects(this.objects, { asTree, depth: this.depth + 1 })\n    }\n  }\n\n  getObjects() {\n    return this.objects\n  }\n\n  getDepth() {\n    return this.depth\n  }\n\n  getCacheKey() {\n    const keys = [ \"objectGroup\" ]\n    Array.from(this.getObjects()).forEach((object) => {\n      keys.push(object.getCacheKey())\n    })\n    return keys.join(\"/\")\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class ObjectMap extends BasicObject {\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = {}\n\n    Array.from(objects).forEach((object) => {\n      const hash = JSON.stringify(object)\n      if (this.objects[hash] == null) {\n        this.objects[hash] = object\n      }\n    })\n  }\n\n  find(object) {\n    const hash = JSON.stringify(object)\n    return this.objects[hash]\n  }\n}\n", "export default class ElementStore {\n  constructor(elements) {\n    this.reset(elements)\n  }\n\n  add(element) {\n    const key = getKey(element)\n    this.elements[key] = element\n  }\n\n  remove(element) {\n    const key = getKey(element)\n    const value = this.elements[key]\n    if (value) {\n      delete this.elements[key]\n      return value\n    }\n  }\n\n  reset(elements = []) {\n    this.elements = {}\n    Array.from(elements).forEach((element) => {\n      this.add(element)\n    })\n    return elements\n  }\n}\n\nconst getKey = (element) => element.dataset.trixStoreKey\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class Operation extends BasicObject {\n  isPerforming() {\n    return this.performing === true\n  }\n\n  hasPerformed() {\n    return this.performed === true\n  }\n\n  hasSucceeded() {\n    return this.performed && this.succeeded\n  }\n\n  hasFailed() {\n    return this.performed && !this.succeeded\n  }\n\n  getPromise() {\n    if (!this.promise) {\n      this.promise = new Promise((resolve, reject) => {\n        this.performing = true\n        return this.perform((succeeded, result) => {\n          this.succeeded = succeeded\n          this.performing = false\n          this.performed = true\n\n          if (this.succeeded) {\n            resolve(result)\n          } else {\n            reject(result)\n          }\n        })\n      })\n    }\n\n    return this.promise\n  }\n\n  perform(callback) {\n    return callback(false)\n  }\n\n  release() {\n    this.promise?.cancel?.()\n    this.promise = null\n    this.performing = null\n    this.performed = null\n    this.succeeded = null\n  }\n}\n\nOperation.proxyMethod(\"getPromise().then\")\nOperation.proxyMethod(\"getPromise().catch\")\n", "import BasicObject from \"trix/core/basic_object\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\n\nexport default class ObjectView extends BasicObject {\n  constructor(object, options = {}) {\n    super(...arguments)\n    this.object = object\n    this.options = options\n    this.childViews = []\n    this.rootView = this\n  }\n\n  getNodes() {\n    if (!this.nodes) { this.nodes = this.createNodes() }\n    return this.nodes.map((node) => node.cloneNode(true))\n  }\n\n  invalidate() {\n    this.nodes = null\n    this.childViews = []\n    return this.parentView?.invalidate()\n  }\n\n  invalidateViewForObject(object) {\n    return this.findViewForObject(object)?.invalidate()\n  }\n\n  findOrCreateCachedChildView(viewClass, object, options) {\n    let view = this.getCachedViewForObject(object)\n    if (view) {\n      this.recordChildView(view)\n    } else {\n      view = this.createChildView(...arguments)\n      this.cacheViewForObject(view, object)\n    }\n    return view\n  }\n\n  createChildView(viewClass, object, options = {}) {\n    if (object instanceof ObjectGroup) {\n      options.viewClass = viewClass\n      viewClass = ObjectGroupView\n    }\n\n    const view = new viewClass(object, options)\n    return this.recordChildView(view)\n  }\n\n  recordChildView(view) {\n    view.parentView = this\n    view.rootView = this.rootView\n    this.childViews.push(view)\n    return view\n  }\n\n  getAllChildViews() {\n    let views = []\n\n    this.childViews.forEach((childView) => {\n      views.push(childView)\n      views = views.concat(childView.getAllChildViews())\n    })\n\n    return views\n  }\n\n  findElement() {\n    return this.findElementForObject(this.object)\n  }\n\n  findElementForObject(object) {\n    const id = object?.id\n    if (id) {\n      return this.rootView.element.querySelector(`[data-trix-id='${id}']`)\n    }\n  }\n\n  findViewForObject(object) {\n    for (const view of this.getAllChildViews()) {\n      if (view.object === object) {\n        return view\n      }\n    }\n  }\n\n  getViewCache() {\n    if (this.rootView === this) {\n      if (this.isViewCachingEnabled()) {\n        if (!this.viewCache) { this.viewCache = {} }\n        return this.viewCache\n      }\n    } else {\n      return this.rootView.getViewCache()\n    }\n  }\n\n  isViewCachingEnabled() {\n    return this.shouldCacheViews !== false\n  }\n\n  enableViewCaching() {\n    this.shouldCacheViews = true\n  }\n\n  disableViewCaching() {\n    this.shouldCacheViews = false\n  }\n\n  getCachedViewForObject(object) {\n    return this.getViewCache()?.[object.getCacheKey()]\n  }\n\n  cacheViewForObject(view, object) {\n    const cache = this.getViewCache()\n    if (cache) {\n      cache[object.getCacheKey()] = view\n    }\n  }\n\n  garbageCollectCachedViews() {\n    const cache = this.getViewCache()\n    if (cache) {\n      const views = this.getAllChildViews().concat(this)\n      const objectKeys = views.map((view) => view.object.getCacheKey())\n      for (const key in cache) {\n        if (!objectKeys.includes(key)) {\n          delete cache[key]\n        }\n      }\n    }\n  }\n}\n\nexport class ObjectGroupView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.objectGroup = this.object\n    this.viewClass = this.options.viewClass\n    delete this.options.viewClass\n  }\n\n  getChildViews() {\n    if (!this.childViews.length) {\n      Array.from(this.objectGroup.getObjects()).forEach((object) => {\n        this.findOrCreateCachedChildView(this.viewClass, object, this.options)\n      })\n    }\n    return this.childViews\n  }\n\n  createNodes() {\n    const element = this.createContainerElement()\n\n    this.getChildViews().forEach((view) => {\n      Array.from(view.getNodes()).forEach((node) => {\n        element.appendChild(node)\n      })\n    })\n\n    return [ element ]\n  }\n\n  createContainerElement(depth = this.objectGroup.getDepth()) {\n    return this.getChildViews()[0].createContainerElement(depth)\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { nodeIsAttachmentElement, removeNode, tagName, walkTree } from \"trix/core/helpers\"\n\nconst DEFAULT_ALLOWED_ATTRIBUTES = \"style href src width height language class\".split(\" \")\nconst DEFAULT_FORBIDDEN_PROTOCOLS = \"javascript:\".split(\" \")\nconst DEFAULT_FORBIDDEN_ELEMENTS = \"script iframe form noscript\".split(\" \")\n\nexport default class HTMLSanitizer extends BasicObject {\n  static setHTML(element, html) {\n    const sanitizedElement = new this(html).sanitize()\n    const sanitizedHtml = sanitizedElement.getHTML ? sanitizedElement.getHTML() : sanitizedElement.outerHTML\n    element.innerHTML = sanitizedHtml\n  }\n\n  static sanitize(html, options) {\n    const sanitizer = new this(html, options)\n    sanitizer.sanitize()\n    return sanitizer\n  }\n\n  constructor(html, { allowedAttributes, forbiddenProtocols, forbiddenElements } = {}) {\n    super(...arguments)\n    this.allowedAttributes = allowedAttributes || DEFAULT_ALLOWED_ATTRIBUTES\n    this.forbiddenProtocols = forbiddenProtocols || DEFAULT_FORBIDDEN_PROTOCOLS\n    this.forbiddenElements = forbiddenElements || DEFAULT_FORBIDDEN_ELEMENTS\n    this.body = createBodyElementForHTML(html)\n  }\n\n  sanitize() {\n    this.sanitizeElements()\n    return this.normalizeListElementNesting()\n  }\n\n  getHTML() {\n    return this.body.innerHTML\n  }\n\n  getBody() {\n    return this.body\n  }\n\n  // Private\n\n  sanitizeElements() {\n    const walker = walkTree(this.body)\n    const nodesToRemove = []\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      switch (node.nodeType) {\n        case Node.ELEMENT_NODE:\n          if (this.elementIsRemovable(node)) {\n            nodesToRemove.push(node)\n          } else {\n            this.sanitizeElement(node)\n          }\n          break\n        case Node.COMMENT_NODE:\n          nodesToRemove.push(node)\n          break\n      }\n    }\n\n    nodesToRemove.forEach((node) => removeNode(node))\n\n    return this.body\n  }\n\n  sanitizeElement(element) {\n    if (element.hasAttribute(\"href\")) {\n      if (this.forbiddenProtocols.includes(element.protocol)) {\n        element.removeAttribute(\"href\")\n      }\n    }\n\n    Array.from(element.attributes).forEach(({ name }) => {\n      if (!this.allowedAttributes.includes(name) && name.indexOf(\"data-trix\") !== 0) {\n        element.removeAttribute(name)\n      }\n    })\n\n    return element\n  }\n\n  normalizeListElementNesting() {\n    Array.from(this.body.querySelectorAll(\"ul,ol\")).forEach((listElement) => {\n      const previousElement = listElement.previousElementSibling\n      if (previousElement) {\n        if (tagName(previousElement) === \"li\") {\n          previousElement.appendChild(listElement)\n        }\n      }\n    })\n\n    return this.body\n  }\n\n  elementIsRemovable(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    return this.elementIsForbidden(element) || this.elementIsntSerializable(element)\n  }\n\n  elementIsForbidden(element) {\n    return this.forbiddenElements.includes(tagName(element))\n  }\n\n  elementIsntSerializable(element) {\n    return element.getAttribute(\"data-trix-serialize\") === \"false\" && !nodeIsAttachmentElement(element)\n  }\n}\n\nconst createBodyElementForHTML = function(html = \"\") {\n  // Remove everything after </html>\n  html = html.replace(/<\\/html[^>]*>[^]*$/i, \"</html>\")\n  const doc = document.implementation.createHTMLDocument(\"\")\n  doc.documentElement.innerHTML = html\n\n  Array.from(doc.head.querySelectorAll(\"style\")).forEach((element) => {\n    doc.body.appendChild(element)\n  })\n\n  return doc.body\n}\n", "import * as config from \"trix/config\"\nimport { ZERO_WIDTH_SPACE } from \"trix/constants\"\nimport { copyObject, makeElement } from \"trix/core/helpers\"\nimport ObjectView from \"trix/views/object_view\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\n\nconst { css } = config\n\nexport default class AttachmentView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.attachment = this.object\n    this.attachment.uploadProgressDelegate = this\n    this.attachmentPiece = this.options.piece\n  }\n\n  createContentNodes() {\n    return []\n  }\n\n  createNodes() {\n    let innerElement\n    const figure = innerElement = makeElement({\n      tagName: \"figure\",\n      className: this.getClassName(),\n      data: this.getData(),\n      editable: false,\n    })\n\n    const href = this.getHref()\n    if (href) {\n      innerElement = makeElement({ tagName: \"a\", editable: false, attributes: { href, tabindex: -1 } })\n      figure.appendChild(innerElement)\n    }\n\n    if (this.attachment.hasContent()) {\n      HTMLSanitizer.setHTML(innerElement, this.attachment.getContent())\n    } else {\n      this.createContentNodes().forEach((node) => {\n        innerElement.appendChild(node)\n      })\n    }\n\n    innerElement.appendChild(this.createCaptionElement())\n\n    if (this.attachment.isPending()) {\n      this.progressElement = makeElement({\n        tagName: \"progress\",\n        attributes: {\n          class: css.attachmentProgress,\n          value: this.attachment.getUploadProgress(),\n          max: 100,\n        },\n        data: {\n          trixMutable: true,\n          trixStoreKey: [ \"progressElement\", this.attachment.id ].join(\"/\"),\n        },\n      })\n\n      figure.appendChild(this.progressElement)\n    }\n\n    return [ createCursorTarget(\"left\"), figure, createCursorTarget(\"right\") ]\n  }\n\n  createCaptionElement() {\n    const figcaption = makeElement({ tagName: \"figcaption\", className: css.attachmentCaption })\n    const caption = this.attachmentPiece.getCaption()\n    if (caption) {\n      figcaption.classList.add(`${css.attachmentCaption}--edited`)\n      figcaption.textContent = caption\n    } else {\n      let name, size\n      const captionConfig = this.getCaptionConfig()\n      if (captionConfig.name) {\n        name = this.attachment.getFilename()\n      }\n      if (captionConfig.size) {\n        size = this.attachment.getFormattedFilesize()\n      }\n\n      if (name) {\n        const nameElement = makeElement({ tagName: \"span\", className: css.attachmentName, textContent: name })\n        figcaption.appendChild(nameElement)\n      }\n\n      if (size) {\n        if (name) {\n          figcaption.appendChild(document.createTextNode(\" \"))\n        }\n        const sizeElement = makeElement({ tagName: \"span\", className: css.attachmentSize, textContent: size })\n        figcaption.appendChild(sizeElement)\n      }\n    }\n\n    return figcaption\n  }\n\n  getClassName() {\n    const names = [ css.attachment, `${css.attachment}--${this.attachment.getType()}` ]\n    const extension = this.attachment.getExtension()\n    if (extension) {\n      names.push(`${css.attachment}--${extension}`)\n    }\n    return names.join(\" \")\n  }\n\n  getData() {\n    const data = {\n      trixAttachment: JSON.stringify(this.attachment),\n      trixContentType: this.attachment.getContentType(),\n      trixId: this.attachment.id,\n    }\n\n    const { attributes } = this.attachmentPiece\n    if (!attributes.isEmpty()) {\n      data.trixAttributes = JSON.stringify(attributes)\n    }\n\n    if (this.attachment.isPending()) {\n      data.trixSerialize = false\n    }\n\n    return data\n  }\n\n  getHref() {\n    if (!htmlContainsTagName(this.attachment.getContent(), \"a\")) {\n      return this.attachment.getHref()\n    }\n  }\n\n  getCaptionConfig() {\n    const type = this.attachment.getType()\n    const captionConfig = copyObject(config.attachments[type]?.caption)\n    if (type === \"file\") {\n      captionConfig.name = true\n    }\n    return captionConfig\n  }\n\n  findProgressElement() {\n    return this.findElement()?.querySelector(\"progress\")\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeUploadProgress() {\n    const value = this.attachment.getUploadProgress()\n    const progressElement = this.findProgressElement()\n    if (progressElement) {\n      progressElement.value = value\n    }\n  }\n}\n\nconst createCursorTarget = (name) =>\n  makeElement({\n    tagName: \"span\",\n    textContent: ZERO_WIDTH_SPACE,\n    data: {\n      trixCursorTarget: name,\n      trixSerialize: false,\n    },\n  })\n\nconst htmlContainsTagName = function(html, tagName) {\n  const div = makeElement(\"div\")\n  HTMLSanitizer.setHTML(div, html || \"\")\n  return div.querySelector(tagName)\n}\n", "import * as config from \"trix/config\"\nimport { makeElement } from \"trix/core/helpers\"\n\nimport AttachmentView from \"trix/views/attachment_view\"\n\nexport default class PreviewableAttachmentView extends AttachmentView {\n  constructor() {\n    super(...arguments)\n    this.attachment.previewDelegate = this\n  }\n\n  createContentNodes() {\n    this.image = makeElement({\n      tagName: \"img\",\n      attributes: {\n        src: \"\",\n      },\n      data: {\n        trixMutable: true,\n      },\n    })\n\n    this.refresh(this.image)\n    return [ this.image ]\n  }\n\n  createCaptionElement() {\n    const figcaption = super.createCaptionElement(...arguments)\n    if (!figcaption.textContent) {\n      figcaption.setAttribute(\"data-trix-placeholder\", config.lang.captionPlaceholder)\n    }\n    return figcaption\n  }\n\n  refresh(image) {\n    if (!image) { image = this.findElement()?.querySelector(\"img\") }\n    if (image) {\n      return this.updateAttributesForImage(image)\n    }\n  }\n\n  updateAttributesForImage(image) {\n    const url = this.attachment.getURL()\n    const previewURL = this.attachment.getPreviewURL()\n    image.src = previewURL || url\n\n    if (previewURL === url) {\n      image.removeAttribute(\"data-trix-serialized-attributes\")\n    } else {\n      const serializedAttributes = JSON.stringify({ src: url })\n      image.setAttribute(\"data-trix-serialized-attributes\", serializedAttributes)\n    }\n\n    const width = this.attachment.getWidth()\n    const height = this.attachment.getHeight()\n\n    if (width != null) {\n      image.width = width\n    }\n    if (height != null) {\n      image.height = height\n    }\n\n    const storeKey = [ \"imageElement\", this.attachment.id, image.src, image.width, image.height ].join(\"/\")\n    image.dataset.trixStoreKey = storeKey\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes() {\n    this.refresh(this.image)\n    return this.refresh()\n  }\n}\n", "/* eslint-disable\n    no-useless-escape,\n    no-var,\n*/\nimport { NON_BREAKING_SPACE } from \"trix/constants\"\n\nimport ObjectView from \"trix/views/object_view\"\nimport AttachmentView from \"trix/views/attachment_view\"\nimport PreviewableAttachmentView from \"trix/views/previewable_attachment_view\"\n\nimport { findInnerElement, getTextConfig, makeElement } from \"trix/core/helpers\"\n\nexport default class PieceView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.piece = this.object\n    this.attributes = this.piece.getAttributes()\n    this.textConfig = this.options.textConfig\n    this.context = this.options.context\n\n    if (this.piece.attachment) {\n      this.attachment = this.piece.attachment\n    } else {\n      this.string = this.piece.toString()\n    }\n  }\n\n  createNodes() {\n    let nodes = this.attachment ? this.createAttachmentNodes() : this.createStringNodes()\n    const element = this.createElement()\n    if (element) {\n      const innerElement = findInnerElement(element)\n      Array.from(nodes).forEach((node) => {\n        innerElement.appendChild(node)\n      })\n      nodes = [ element ]\n    }\n    return nodes\n  }\n\n  createAttachmentNodes() {\n    const constructor = this.attachment.isPreviewable() ? PreviewableAttachmentView : AttachmentView\n\n    const view = this.createChildView(constructor, this.piece.attachment, { piece: this.piece })\n    return view.getNodes()\n  }\n\n  createStringNodes() {\n    if (this.textConfig?.plaintext) {\n      return [ document.createTextNode(this.string) ]\n    } else {\n      const nodes = []\n      const iterable = this.string.split(\"\\n\")\n      for (let index = 0; index < iterable.length; index++) {\n        const substring = iterable[index]\n        if (index > 0) {\n          const element = makeElement(\"br\")\n          nodes.push(element)\n        }\n\n        if (substring.length) {\n          const node = document.createTextNode(this.preserveSpaces(substring))\n          nodes.push(node)\n        }\n      }\n      return nodes\n    }\n  }\n\n  createElement() {\n    let element, key, value\n    const styles = {}\n\n    for (key in this.attributes) {\n      value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.tagName) {\n          var innerElement\n          const pendingElement = makeElement(config.tagName)\n\n          if (innerElement) {\n            innerElement.appendChild(pendingElement)\n            innerElement = pendingElement\n          } else {\n            element = innerElement = pendingElement\n          }\n        }\n\n        if (config.styleProperty) {\n          styles[config.styleProperty] = value\n        }\n\n        if (config.style) {\n          for (key in config.style) {\n            value = config.style[key]\n            styles[key] = value\n          }\n        }\n      }\n    }\n\n    if (Object.keys(styles).length) {\n      if (!element) { element = makeElement(\"span\") }\n      for (key in styles) {\n        value = styles[key]\n        element.style[key] = value\n      }\n    }\n    return element\n  }\n\n  createContainerElement() {\n    for (const key in this.attributes) {\n      const value = this.attributes[key]\n      const config = getTextConfig(key)\n      if (config) {\n        if (config.groupTagName) {\n          const attributes = {}\n          attributes[key] = value\n          return makeElement(config.groupTagName, attributes)\n        }\n      }\n    }\n  }\n\n  preserveSpaces(string) {\n    if (this.context.isLast) {\n      string = string.replace(/\\ $/, NON_BREAKING_SPACE)\n    }\n\n    string = string\n      .replace(/(\\S)\\ {3}(\\S)/g, `$1 ${NON_BREAKING_SPACE} $2`)\n      .replace(/\\ {2}/g, `${NON_BREAKING_SPACE} `)\n      .replace(/\\ {2}/g, ` ${NON_BREAKING_SPACE}`)\n\n    if (this.context.isFirst || this.context.followsWhitespace) {\n      string = string.replace(/^\\ /, NON_BREAKING_SPACE)\n    }\n\n    return string\n  }\n}\n", "/* eslint-disable\n    no-var,\n*/\nimport ObjectView from \"trix/views/object_view\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport PieceView from \"trix/views/piece_view\"\n\nexport default class TextView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.text = this.object\n    this.textConfig = this.options.textConfig\n  }\n\n  createNodes() {\n    const nodes = []\n    const pieces = ObjectGroup.groupObjects(this.getPieces())\n    const lastIndex = pieces.length - 1\n\n    for (let index = 0; index < pieces.length; index++) {\n      const piece = pieces[index]\n      const context = {}\n      if (index === 0) {\n        context.isFirst = true\n      }\n      if (index === lastIndex) {\n        context.isLast = true\n      }\n      if (endsWithWhitespace(previousPiece)) {\n        context.followsWhitespace = true\n      }\n\n      const view = this.findOrCreateCachedChildView(PieceView, piece, { textConfig: this.textConfig, context })\n      nodes.push(...Array.from(view.getNodes() || []))\n\n      var previousPiece = piece\n    }\n    return nodes\n  }\n\n  getPieces() {\n    return Array.from(this.text.getPieces()).filter((piece) => !piece.hasAttribute(\"blockBreak\"))\n  }\n}\n\nconst endsWithWhitespace = (piece) => /\\s$/.test(piece?.toString())\n", "import * as config from \"trix/config\"\nimport ObjectView from \"trix/views/object_view\"\nimport TextView from \"trix/views/text_view\"\n\nimport { getBlockConfig, makeElement } from \"trix/core/helpers\"\nconst { css } = config\n\nexport default class BlockView extends ObjectView {\n  constructor() {\n    super(...arguments)\n    this.block = this.object\n    this.attributes = this.block.getAttributes()\n  }\n\n  createNodes() {\n    const comment = document.createComment(\"block\")\n    const nodes = [ comment ]\n    if (this.block.isEmpty()) {\n      nodes.push(makeElement(\"br\"))\n    } else {\n      const textConfig = getBlockConfig(this.block.getLastAttribute())?.text\n      const textView = this.findOrCreateCachedChildView(TextView, this.block.text, { textConfig })\n      nodes.push(...Array.from(textView.getNodes() || []))\n      if (this.shouldAddExtraNewlineElement()) {\n        nodes.push(makeElement(\"br\"))\n      }\n    }\n\n    if (this.attributes.length) {\n      return nodes\n    } else {\n      let attributes\n      const { tagName } = config.blockAttributes.default\n      if (this.block.isRTL()) {\n        attributes = { dir: \"rtl\" }\n      }\n\n      const element = makeElement({ tagName, attributes })\n      nodes.forEach((node) => element.appendChild(node))\n      return [ element ]\n    }\n  }\n\n  createContainerElement(depth) {\n    const attributes = {}\n    let className\n    const attributeName = this.attributes[depth]\n\n    const { tagName, htmlAttributes = [] } = getBlockConfig(attributeName)\n\n    if (depth === 0 && this.block.isRTL()) {\n      Object.assign(attributes, { dir: \"rtl\" })\n    }\n\n    if (attributeName === \"attachmentGallery\") {\n      const size = this.block.getBlockBreakPosition()\n      className = `${css.attachmentGallery} ${css.attachmentGallery}--${size}`\n    }\n\n    Object.entries(this.block.htmlAttributes).forEach(([ name, value ]) => {\n      if (htmlAttributes.includes(name)) {\n        attributes[name] = value\n      }\n    })\n\n    return makeElement({ tagName, className, attributes })\n  }\n\n  // A single <br> at the end of a block element has no visual representation\n  // so add an extra one.\n  shouldAddExtraNewlineElement() {\n    return /\\n\\n$/.test(this.block.toString())\n  }\n}\n", "import { makeElement } from \"trix/core/helpers\"\n\nimport ElementStore from \"trix/core/collections/element_store\"\nimport ObjectGroup from \"trix/core/collections/object_group\"\nimport ObjectView from \"trix/views/object_view\"\nimport BlockView from \"trix/views/block_view\"\n\nimport { defer } from \"trix/core/helpers\"\n\nexport default class DocumentView extends ObjectView {\n  static render(document) {\n    const element = makeElement(\"div\")\n    const view = new this(document, { element })\n    view.render()\n    view.sync()\n    return element\n  }\n\n  constructor() {\n    super(...arguments)\n    this.element = this.options.element\n    this.elementStore = new ElementStore()\n    this.setDocument(this.object)\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = this.object = document\n    }\n  }\n\n  render() {\n    this.childViews = []\n\n    this.shadowElement = makeElement(\"div\")\n\n    if (!this.document.isEmpty()) {\n      const objects = ObjectGroup.groupObjects(this.document.getBlocks(), { asTree: true })\n\n      Array.from(objects).forEach((object) => {\n        const view = this.findOrCreateCachedChildView(BlockView, object)\n        Array.from(view.getNodes()).map((node) => this.shadowElement.appendChild(node))\n      })\n    }\n  }\n\n  isSynced() {\n    return elementsHaveEqualHTML(this.shadowElement, this.element)\n  }\n\n  sync() {\n    const fragment = this.createDocumentFragmentForSync()\n    while (this.element.lastChild) {\n      this.element.removeChild(this.element.lastChild)\n    }\n    this.element.appendChild(fragment)\n    return this.didSync()\n  }\n\n  // Private\n\n  didSync() {\n    this.elementStore.reset(findStoredElements(this.element))\n    return defer(() => this.garbageCollectCachedViews())\n  }\n\n  createDocumentFragmentForSync() {\n    const fragment = document.createDocumentFragment()\n\n    Array.from(this.shadowElement.childNodes).forEach((node) => {\n      fragment.appendChild(node.cloneNode(true))\n    })\n\n    Array.from(findStoredElements(fragment)).forEach((element) => {\n      const storedElement = this.elementStore.remove(element)\n      if (storedElement) {\n        element.parentNode.replaceChild(storedElement, element)\n      }\n    })\n\n    return fragment\n  }\n}\n\nconst findStoredElements = (element) => element.querySelectorAll(\"[data-trix-store-key]\")\n\nconst elementsHaveEqualHTML = (element, otherElement) =>\n  ignoreSpaces(element.innerHTML) === ignoreSpaces(otherElement.innerHTML)\n\nconst ignoreSpaces = (html) => html.replace(/&nbsp;/g, \" \")\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Piece extends TrixObject {\n  static types = {}\n\n  static registerType(type, constructor) {\n    constructor.type = type\n    this.types[type] = constructor\n  }\n\n  static fromJSON(pieceJSON) {\n    const constructor = this.types[pieceJSON.type]\n    if (constructor) {\n      return constructor.fromJSON(pieceJSON)\n    }\n  }\n\n  constructor(value, attributes = {}) {\n    super(...arguments)\n    this.attributes = Hash.box(attributes)\n  }\n\n  copyWithAttributes(attributes) {\n    return new this.constructor(this.getValue(), attributes)\n  }\n\n  copyWithAdditionalAttributes(attributes) {\n    return this.copyWithAttributes(this.attributes.merge(attributes))\n  }\n\n  copyWithoutAttribute(attribute) {\n    return this.copyWithAttributes(this.attributes.remove(attribute))\n  }\n\n  copy() {\n    return this.copyWithAttributes(this.attributes)\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  getAttributesHash() {\n    return this.attributes\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  hasSameStringValueAsPiece(piece) {\n    return piece && this.toString() === piece.toString()\n  }\n\n  hasSameAttributesAsPiece(piece) {\n    return piece && (this.attributes === piece.attributes || this.attributes.isEqualTo(piece.attributes))\n  }\n\n  isBlockBreak() {\n    return false\n  }\n\n  isEqualTo(piece) {\n    return (\n      super.isEqualTo(...arguments) ||\n      this.hasSameConstructorAs(piece) &&\n        this.hasSameStringValueAsPiece(piece) &&\n        this.hasSameAttributesAsPiece(piece)\n    )\n  }\n\n  isEmpty() {\n    return this.length === 0\n  }\n\n  isSerializable() {\n    return true\n  }\n\n  toJSON() {\n    return {\n      type: this.constructor.type,\n      attributes: this.getAttributes(),\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      type: this.constructor.type,\n      attributes: this.attributes.inspect(),\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped() {\n    return this.hasAttribute(\"href\")\n  }\n\n  canBeGroupedWith(piece) {\n    return this.getAttribute(\"href\") === piece.getAttribute(\"href\")\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.length\n  }\n\n  canBeConsolidatedWith(piece) {\n    return false\n  }\n}\n", "import Operation from \"trix/core/utilities/operation\"\n\nexport default class ImagePreloadOperation extends Operation {\n  constructor(url) {\n    super(...arguments)\n    this.url = url\n  }\n\n  perform(callback) {\n    const image = new Image()\n\n    image.onload = () => {\n      image.width = this.width = image.naturalWidth\n      image.height = this.height = image.naturalHeight\n      return callback(true, image)\n    }\n\n    image.onerror = () => callback(false)\n\n    image.src = this.url\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Hash from \"trix/core/collections/hash\"\nimport ImagePreloadOperation from \"trix/operations/image_preload_operation\"\n\nexport default class Attachment extends TrixObject {\n  static previewablePattern = /^image(\\/(gif|png|webp|jpe?g)|$)/\n\n  static attachmentForFile(file) {\n    const attributes = this.attributesForFile(file)\n    const attachment = new this(attributes)\n    attachment.setFile(file)\n    return attachment\n  }\n\n  static attributesForFile(file) {\n    return new Hash({\n      filename: file.name,\n      filesize: file.size,\n      contentType: file.type,\n    })\n  }\n\n  static fromJSON(attachmentJSON) {\n    return new this(attachmentJSON)\n  }\n\n  constructor(attributes = {}) {\n    super(attributes)\n    this.releaseFile = this.releaseFile.bind(this)\n    this.attributes = Hash.box(attributes)\n    this.didChangeAttributes()\n  }\n\n  getAttribute(attribute) {\n    return this.attributes.get(attribute)\n  }\n\n  hasAttribute(attribute) {\n    return this.attributes.has(attribute)\n  }\n\n  getAttributes() {\n    return this.attributes.toObject()\n  }\n\n  setAttributes(attributes = {}) {\n    const newAttributes = this.attributes.merge(attributes)\n    if (!this.attributes.isEqualTo(newAttributes)) {\n      this.attributes = newAttributes\n      this.didChangeAttributes()\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangeAttributes?.(this)\n    }\n  }\n\n  didChangeAttributes() {\n    if (this.isPreviewable()) {\n      return this.preloadURL()\n    }\n  }\n\n  isPending() {\n    return this.file != null && !(this.getURL() || this.getHref())\n  }\n\n  isPreviewable() {\n    if (this.attributes.has(\"previewable\")) {\n      return this.attributes.get(\"previewable\")\n    } else {\n      return Attachment.previewablePattern.test(this.getContentType())\n    }\n  }\n\n  getType() {\n    if (this.hasContent()) {\n      return \"content\"\n    } else if (this.isPreviewable()) {\n      return \"preview\"\n    } else {\n      return \"file\"\n    }\n  }\n\n  getURL() {\n    return this.attributes.get(\"url\")\n  }\n\n  getHref() {\n    return this.attributes.get(\"href\")\n  }\n\n  getFilename() {\n    return this.attributes.get(\"filename\") || \"\"\n  }\n\n  getFilesize() {\n    return this.attributes.get(\"filesize\")\n  }\n\n  getFormattedFilesize() {\n    const filesize = this.attributes.get(\"filesize\")\n    if (typeof filesize === \"number\") {\n      return config.fileSize.formatter(filesize)\n    } else {\n      return \"\"\n    }\n  }\n\n  getExtension() {\n    return this.getFilename()\n      .match(/\\.(\\w+)$/)?.[1]\n      .toLowerCase()\n  }\n\n  getContentType() {\n    return this.attributes.get(\"contentType\")\n  }\n\n  hasContent() {\n    return this.attributes.has(\"content\")\n  }\n\n  getContent() {\n    return this.attributes.get(\"content\")\n  }\n\n  getWidth() {\n    return this.attributes.get(\"width\")\n  }\n\n  getHeight() {\n    return this.attributes.get(\"height\")\n  }\n\n  getFile() {\n    return this.file\n  }\n\n  setFile(file) {\n    this.file = file\n    if (this.isPreviewable()) {\n      return this.preloadFile()\n    }\n  }\n\n  releaseFile() {\n    this.releasePreloadedFile()\n    this.file = null\n  }\n\n  getUploadProgress() {\n    return this.uploadProgress != null ? this.uploadProgress : 0\n  }\n\n  setUploadProgress(value) {\n    if (this.uploadProgress !== value) {\n      this.uploadProgress = value\n      return this.uploadProgressDelegate?.attachmentDidChangeUploadProgress?.(this)\n    }\n  }\n\n  toJSON() {\n    return this.getAttributes()\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attributes.getCacheKey(), this.getPreviewURL() ].join(\"/\")\n  }\n\n  // Previewable\n\n  getPreviewURL() {\n    return this.previewURL || this.preloadingURL\n  }\n\n  setPreviewURL(url) {\n    if (url !== this.getPreviewURL()) {\n      this.previewURL = url\n      this.previewDelegate?.attachmentDidChangeAttributes?.(this)\n      return this.delegate?.attachmentDidChangePreviewURL?.(this)\n    }\n  }\n\n  preloadURL() {\n    return this.preload(this.getURL(), this.releaseFile)\n  }\n\n  preloadFile() {\n    if (this.file) {\n      this.fileObjectURL = URL.createObjectURL(this.file)\n      return this.preload(this.fileObjectURL)\n    }\n  }\n\n  releasePreloadedFile() {\n    if (this.fileObjectURL) {\n      URL.revokeObjectURL(this.fileObjectURL)\n      this.fileObjectURL = null\n    }\n  }\n\n  preload(url, callback) {\n    if (url && url !== this.getPreviewURL()) {\n      this.preloadingURL = url\n      const operation = new ImagePreloadOperation(url)\n      return operation\n        .then(({ width, height }) => {\n          if (!this.getWidth() || !this.getHeight()) {\n            this.setAttributes({ width, height })\n          }\n          this.preloadingURL = null\n          this.setPreviewURL(url)\n          return callback?.()\n        })\n        .catch(() => {\n          this.preloadingURL = null\n          return callback?.()\n        })\n    }\n  }\n}\n", "import { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport Attachment from \"trix/models/attachment\"\nimport Piece from \"trix/models/piece\"\n\nexport default class AttachmentPiece extends Piece {\n  static permittedAttributes = [ \"caption\", \"presentation\" ]\n\n  static fromJSON(pieceJSON) {\n    return new this(Attachment.fromJSON(pieceJSON.attachment), pieceJSON.attributes)\n  }\n\n  constructor(attachment) {\n    super(...arguments)\n    this.attachment = attachment\n    this.length = 1\n    this.ensureAttachmentExclusivelyHasAttribute(\"href\")\n    if (!this.attachment.hasContent()) {\n      this.removeProhibitedAttributes()\n    }\n  }\n\n  ensureAttachmentExclusivelyHasAttribute(attribute) {\n    if (this.hasAttribute(attribute)) {\n      if (!this.attachment.hasAttribute(attribute)) {\n        this.attachment.setAttributes(this.attributes.slice([ attribute ]))\n      }\n      this.attributes = this.attributes.remove(attribute)\n    }\n  }\n\n  removeProhibitedAttributes() {\n    const attributes = this.attributes.slice(AttachmentPiece.permittedAttributes)\n    if (!attributes.isEqualTo(this.attributes)) {\n      this.attributes = attributes\n    }\n  }\n\n  getValue() {\n    return this.attachment\n  }\n\n  isSerializable() {\n    return !this.attachment.isPending()\n  }\n\n  getCaption() {\n    return this.attributes.get(\"caption\") || \"\"\n  }\n\n  isEqualTo(piece) {\n    return super.isEqualTo(piece) && this.attachment.id === piece?.attachment?.id\n  }\n\n  toString() {\n    return OBJECT_REPLACEMENT_CHARACTER\n  }\n\n  toJSON() {\n    const json = super.toJSON(...arguments)\n    json.attachment = this.attachment\n    return json\n  }\n\n  getCacheKey() {\n    return [ super.getCacheKey(...arguments), this.attachment.getCacheKey() ].join(\"/\")\n  }\n\n  toConsole() {\n    return JSON.stringify(this.toString())\n  }\n}\n\nPiece.registerType(\"attachment\", AttachmentPiece)\n", "import Piece from \"trix/models/piece\"\n\nimport { normalizeNewlines } from \"trix/core/helpers\"\n\nexport default class StringPiece extends Piece {\n  static fromJSON(pieceJSON) {\n    return new this(pieceJSON.string, pieceJSON.attributes)\n  }\n\n  constructor(string) {\n    super(...arguments)\n    this.string = normalizeNewlines(string)\n    this.length = this.string.length\n  }\n\n  getValue() {\n    return this.string\n  }\n\n  toString() {\n    return this.string.toString()\n  }\n\n  isBlockBreak() {\n    return this.toString() === \"\\n\" && this.getAttribute(\"blockBreak\") === true\n  }\n\n  toJSON() {\n    const result = super.toJSON(...arguments)\n    result.string = this.string\n    return result\n  }\n\n  // Splittable\n\n  canBeConsolidatedWith(piece) {\n    return piece && this.hasSameConstructorAs(piece) && this.hasSameAttributesAsPiece(piece)\n  }\n\n  consolidateWith(piece) {\n    return new this.constructor(this.toString() + piece.toString(), this.attributes)\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.length) {\n      left = this\n      right = null\n    } else {\n      left = new this.constructor(this.string.slice(0, offset), this.attributes)\n      right = new this.constructor(this.string.slice(offset), this.attributes)\n    }\n    return [ left, right ]\n  }\n\n  toConsole() {\n    let { string } = this\n    if (string.length > 15) {\n      string = string.slice(0, 14) + \"\u2026\"\n    }\n    return JSON.stringify(string.toString())\n  }\n}\n\nPiece.registerType(\"string\", StringPiece)\n", "/* eslint-disable\n    prefer-const,\n*/\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { spliceArray } from \"trix/core/helpers\"\n\nexport default class SplittableList extends TrixObject {\n  static box(objects) {\n    if (objects instanceof this) {\n      return objects\n    } else {\n      return new this(objects)\n    }\n  }\n\n  constructor(objects = []) {\n    super(...arguments)\n    this.objects = objects.slice(0)\n    this.length = this.objects.length\n  }\n\n  indexOf(object) {\n    return this.objects.indexOf(object)\n  }\n\n  splice(...args) {\n    return new this.constructor(spliceArray(this.objects, ...args))\n  }\n\n  eachObject(callback) {\n    return this.objects.map((object, index) => callback(object, index))\n  }\n\n  insertObjectAtIndex(object, index) {\n    return this.splice(index, 0, object)\n  }\n\n  insertSplittableListAtIndex(splittableList, index) {\n    return this.splice(index, 0, ...splittableList.objects)\n  }\n\n  insertSplittableListAtPosition(splittableList, position) {\n    const [ objects, index ] = this.splitObjectAtPosition(position)\n    return new this.constructor(objects).insertSplittableListAtIndex(splittableList, index)\n  }\n\n  editObjectAtIndex(index, callback) {\n    return this.replaceObjectAtIndex(callback(this.objects[index]), index)\n  }\n\n  replaceObjectAtIndex(object, index) {\n    return this.splice(index, 1, object)\n  }\n\n  removeObjectAtIndex(index) {\n    return this.splice(index, 1)\n  }\n\n  getObjectAtIndex(index) {\n    return this.objects[index]\n  }\n\n  getSplittableListInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects.slice(leftIndex, rightIndex + 1))\n  }\n\n  selectSplittableList(test) {\n    const objects = this.objects.filter((object) => test(object))\n    return new this.constructor(objects)\n  }\n\n  removeObjectsInRange(range) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    return new this.constructor(objects).splice(leftIndex, rightIndex - leftIndex + 1)\n  }\n\n  transformObjectsInRange(range, transform) {\n    const [ objects, leftIndex, rightIndex ] = this.splitObjectsAtRange(range)\n    const transformedObjects = objects.map((object, index) =>\n      leftIndex <= index && index <= rightIndex ? transform(object) : object\n    )\n    return new this.constructor(transformedObjects)\n  }\n\n  splitObjectsAtRange(range) {\n    let rightOuterIndex\n    let [ objects, leftInnerIndex, offset ] = this.splitObjectAtPosition(startOfRange(range))\n    ;[ objects, rightOuterIndex ] = new this.constructor(objects).splitObjectAtPosition(endOfRange(range) + offset)\n\n    return [ objects, leftInnerIndex, rightOuterIndex - 1 ]\n  }\n\n  getObjectAtPosition(position) {\n    const { index } = this.findIndexAndOffsetAtPosition(position)\n    return this.objects[index]\n  }\n\n  splitObjectAtPosition(position) {\n    let splitIndex, splitOffset\n    const { index, offset } = this.findIndexAndOffsetAtPosition(position)\n    const objects = this.objects.slice(0)\n    if (index != null) {\n      if (offset === 0) {\n        splitIndex = index\n        splitOffset = 0\n      } else {\n        const object = this.getObjectAtIndex(index)\n        const [ leftObject, rightObject ] = object.splitAtOffset(offset)\n        objects.splice(index, 1, leftObject, rightObject)\n        splitIndex = index + 1\n        splitOffset = leftObject.getLength() - offset\n      }\n    } else {\n      splitIndex = objects.length\n      splitOffset = 0\n    }\n\n    return [ objects, splitIndex, splitOffset ]\n  }\n\n  consolidate() {\n    const objects = []\n    let pendingObject = this.objects[0]\n\n    this.objects.slice(1).forEach((object) => {\n      if (pendingObject.canBeConsolidatedWith?.(object)) {\n        pendingObject = pendingObject.consolidateWith(object)\n      } else {\n        objects.push(pendingObject)\n        pendingObject = object\n      }\n    })\n\n    if (pendingObject) {\n      objects.push(pendingObject)\n    }\n\n    return new this.constructor(objects)\n  }\n\n  consolidateFromIndexToIndex(startIndex, endIndex) {\n    const objects = this.objects.slice(0)\n    const objectsInRange = objects.slice(startIndex, endIndex + 1)\n    const consolidatedInRange = new this.constructor(objectsInRange).consolidate().toArray()\n    return this.splice(startIndex, objectsInRange.length, ...consolidatedInRange)\n  }\n\n  findIndexAndOffsetAtPosition(position) {\n    let index\n    let currentPosition = 0\n    for (index = 0; index < this.objects.length; index++) {\n      const object = this.objects[index]\n      const nextPosition = currentPosition + object.getLength()\n      if (currentPosition <= position && position < nextPosition) {\n        return { index, offset: position - currentPosition }\n      }\n      currentPosition = nextPosition\n    }\n    return { index: null, offset: null }\n  }\n\n  findPositionAtIndexAndOffset(index, offset) {\n    let position = 0\n    for (let currentIndex = 0; currentIndex < this.objects.length; currentIndex++) {\n      const object = this.objects[currentIndex]\n      if (currentIndex < index) {\n        position += object.getLength()\n      } else if (currentIndex === index) {\n        position += offset\n        break\n      }\n    }\n    return position\n  }\n\n  getEndPosition() {\n    if (this.endPosition == null) {\n      this.endPosition = 0\n      this.objects.forEach((object) => this.endPosition += object.getLength())\n    }\n\n    return this.endPosition\n  }\n\n  toString() {\n    return this.objects.join(\"\")\n  }\n\n  toArray() {\n    return this.objects.slice(0)\n  }\n\n  toJSON() {\n    return this.toArray()\n  }\n\n  isEqualTo(splittableList) {\n    return super.isEqualTo(...arguments) || objectArraysAreEqual(this.objects, splittableList?.objects)\n  }\n\n  contentsForInspection() {\n    return {\n      objects: `[${this.objects.map((object) => object.inspect()).join(\", \")}]`,\n    }\n  }\n}\n\nconst objectArraysAreEqual = function(left, right = []) {\n  if (left.length !== right.length) {\n    return false\n  }\n  let result = true\n  for (let index = 0; index < left.length; index++) {\n    const object = left[index]\n    if (result && !object.isEqualTo(right[index])) {\n      result = false\n    }\n  }\n  return result\n}\n\nconst startOfRange = (range) => range[0]\n\nconst endOfRange = (range) => range[1]\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport { getDirection } from \"trix/core/helpers\"\n\nimport Piece from \"trix/models/piece\"\nimport AttachmentPiece from \"trix/models/attachment_piece\"\nimport StringPiece from \"trix/models/string_piece\"\nimport SplittableList from \"trix/models/splittable_list\"\n\nimport Hash from \"trix/core/collections/hash\"\n\nexport default class Text extends TrixObject {\n  static textForAttachmentWithAttributes(attachment, attributes) {\n    const piece = new AttachmentPiece(attachment, attributes)\n    return new this([ piece ])\n  }\n\n  static textForStringWithAttributes(string, attributes) {\n    const piece = new StringPiece(string, attributes)\n    return new this([ piece ])\n  }\n\n  static fromJSON(textJSON) {\n    const pieces = Array.from(textJSON).map((pieceJSON) => Piece.fromJSON(pieceJSON))\n    return new this(pieces)\n  }\n\n  constructor(pieces = []) {\n    super(...arguments)\n    const notEmpty = pieces.filter((piece) => !piece.isEmpty())\n    this.pieceList = new SplittableList(notEmpty)\n  }\n\n  copy() {\n    return this.copyWithPieceList(this.pieceList)\n  }\n\n  copyWithPieceList(pieceList) {\n    return new this.constructor(pieceList.consolidate().toArray())\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const pieces = this.getPieces().map((piece) => objectMap.find(piece) || piece)\n    return new this.constructor(pieces)\n  }\n\n  appendText(text) {\n    return this.insertTextAtPosition(text, this.getLength())\n  }\n\n  insertTextAtPosition(text, position) {\n    return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(text.pieceList, position))\n  }\n\n  removeTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.removeObjectsInRange(range))\n  }\n\n  replaceTextAtRange(text, range) {\n    return this.removeTextAtRange(range).insertTextAtPosition(text, range[0])\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    if (range[0] <= position && position <= range[1]) return\n    const text = this.getTextAtRange(range)\n    const length = text.getLength()\n    if (range[0] < position) {\n      position -= length\n    }\n    return this.removeTextAtRange(range).insertTextAtPosition(text, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    const attributes = {}\n    attributes[attribute] = value\n    return this.addAttributesAtRange(attributes, range)\n  }\n\n  addAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAdditionalAttributes(attributes))\n    )\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithoutAttribute(attribute))\n    )\n  }\n\n  setAttributesAtRange(attributes, range) {\n    return this.copyWithPieceList(\n      this.pieceList.transformObjectsInRange(range, (piece) => piece.copyWithAttributes(attributes))\n    )\n  }\n\n  getAttributesAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)?.getAttributes() || {}\n  }\n\n  getCommonAttributes() {\n    const objects = Array.from(this.pieceList.toArray()).map((piece) => piece.getAttributes())\n    return Hash.fromCommonAttributesOfObjects(objects).toObject()\n  }\n\n  getCommonAttributesAtRange(range) {\n    return this.getTextAtRange(range).getCommonAttributes() || {}\n  }\n\n  getExpandedRangeForAttributeAtOffset(attributeName, offset) {\n    let right\n    let left = right = offset\n    const length = this.getLength()\n\n    while (left > 0 && this.getCommonAttributesAtRange([ left - 1, right ])[attributeName]) {\n      left--\n    }\n    while (right < length && this.getCommonAttributesAtRange([ offset, right + 1 ])[attributeName]) {\n      right++\n    }\n\n    return [ left, right ]\n  }\n\n  getTextAtRange(range) {\n    return this.copyWithPieceList(this.pieceList.getSplittableListInRange(range))\n  }\n\n  getStringAtRange(range) {\n    return this.pieceList.getSplittableListInRange(range).toString()\n  }\n\n  getStringAtPosition(position) {\n    return this.getStringAtRange([ position, position + 1 ])\n  }\n\n  startsWithString(string) {\n    return this.getStringAtRange([ 0, string.length ]) === string\n  }\n\n  endsWithString(string) {\n    const length = this.getLength()\n    return this.getStringAtRange([ length - string.length, length ]) === string\n  }\n\n  getAttachmentPieces() {\n    return this.pieceList.toArray().filter((piece) => !!piece.attachment)\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getAttachmentAndPositionById(attachmentId) {\n    let position = 0\n    for (const piece of this.pieceList.toArray()) {\n      if (piece.attachment?.id === attachmentId) {\n        return { attachment: piece.attachment, position }\n      }\n      position += piece.length\n    }\n    return { attachment: null, position: null }\n  }\n\n  getAttachmentById(attachmentId) {\n    const { attachment } = this.getAttachmentAndPositionById(attachmentId)\n    return attachment\n  }\n\n  getRangeOfAttachment(attachment) {\n    const attachmentAndPosition = this.getAttachmentAndPositionById(attachment.id)\n    const position = attachmentAndPosition.position\n    attachment = attachmentAndPosition.attachment\n    if (attachment) {\n      return [ position, position + 1 ]\n    }\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    if (range) {\n      return this.addAttributesAtRange(attributes, range)\n    } else {\n      return this\n    }\n  }\n\n  getLength() {\n    return this.pieceList.getEndPosition()\n  }\n\n  isEmpty() {\n    return this.getLength() === 0\n  }\n\n  isEqualTo(text) {\n    return super.isEqualTo(text) || text?.pieceList?.isEqualTo(this.pieceList)\n  }\n\n  isBlockBreak() {\n    return this.getLength() === 1 && this.pieceList.getObjectAtIndex(0).isBlockBreak()\n  }\n\n  eachPiece(callback) {\n    return this.pieceList.eachObject(callback)\n  }\n\n  getPieces() {\n    return this.pieceList.toArray()\n  }\n\n  getPieceAtPosition(position) {\n    return this.pieceList.getObjectAtPosition(position)\n  }\n\n  contentsForInspection() {\n    return { pieceList: this.pieceList.inspect() }\n  }\n\n  toSerializableText() {\n    const pieceList = this.pieceList.selectSplittableList((piece) => piece.isSerializable())\n    return this.copyWithPieceList(pieceList)\n  }\n\n  toString() {\n    return this.pieceList.toString()\n  }\n\n  toJSON() {\n    return this.pieceList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.pieceList.toArray().map((piece) => JSON.parse(piece.toConsole())))\n  }\n\n  // BIDI\n\n  getDirection() {\n    return getDirection(this.toString())\n  }\n\n  isRTL() {\n    return this.getDirection() === \"rtl\"\n  }\n}\n", "import TrixObject from \"trix/core/object\" // Don't override window.Object\nimport Text from \"trix/models/text\"\n\nimport {\n  arraysAreEqual,\n  getBlockConfig,\n  getListAttributeNames,\n  objectsAreEqual,\n  spliceArray,\n} from \"trix/core/helpers\"\n\nexport default class Block extends TrixObject {\n  static fromJSON(blockJSON) {\n    const text = Text.fromJSON(blockJSON.text)\n    return new this(text, blockJSON.attributes, blockJSON.htmlAttributes)\n  }\n\n  constructor(text, attributes, htmlAttributes) {\n    super(...arguments)\n    this.text = applyBlockBreakToText(text || new Text())\n    this.attributes = attributes || []\n    this.htmlAttributes = htmlAttributes || {}\n  }\n\n  isEmpty() {\n    return this.text.isBlockBreak()\n  }\n\n  isEqualTo(block) {\n    if (super.isEqualTo(block)) return true\n\n    return this.text.isEqualTo(block?.text) && arraysAreEqual(this.attributes, block?.attributes) && objectsAreEqual(this.htmlAttributes, block?.htmlAttributes)\n  }\n\n  copyWithText(text) {\n    return new Block(text, this.attributes, this.htmlAttributes)\n  }\n\n  copyWithoutText() {\n    return this.copyWithText(null)\n  }\n\n  copyWithAttributes(attributes) {\n    return new Block(this.text, attributes, this.htmlAttributes)\n  }\n\n  copyWithoutAttributes() {\n    return this.copyWithAttributes(null)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const mappedText = objectMap.find(this.text)\n    if (mappedText) {\n      return this.copyWithText(mappedText)\n    } else {\n      return this.copyWithText(this.text.copyUsingObjectMap(objectMap))\n    }\n  }\n\n  addAttribute(attribute) {\n    const attributes = this.attributes.concat(expandAttribute(attribute))\n    return this.copyWithAttributes(attributes)\n  }\n\n  addHTMLAttribute(attribute, value) {\n    const htmlAttributes = Object.assign({}, this.htmlAttributes, { [attribute]: value })\n    return new Block(this.text, this.attributes, htmlAttributes)\n  }\n\n  removeAttribute(attribute) {\n    const { listAttribute } = getBlockConfig(attribute)\n    const attributes = removeLastValue(removeLastValue(this.attributes, attribute), listAttribute)\n    return this.copyWithAttributes(attributes)\n  }\n\n  removeLastAttribute() {\n    return this.removeAttribute(this.getLastAttribute())\n  }\n\n  getLastAttribute() {\n    return getLastElement(this.attributes)\n  }\n\n  getAttributes() {\n    return this.attributes.slice(0)\n  }\n\n  getAttributeLevel() {\n    return this.attributes.length\n  }\n\n  getAttributeAtLevel(level) {\n    return this.attributes[level - 1]\n  }\n\n  hasAttribute(attributeName) {\n    return this.attributes.includes(attributeName)\n  }\n\n  hasAttributes() {\n    return this.getAttributeLevel() > 0\n  }\n\n  getLastNestableAttribute() {\n    return getLastElement(this.getNestableAttributes())\n  }\n\n  getNestableAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).nestable)\n  }\n\n  getNestingLevel() {\n    return this.getNestableAttributes().length\n  }\n\n  decreaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      return this.removeAttribute(attribute)\n    } else {\n      return this\n    }\n  }\n\n  increaseNestingLevel() {\n    const attribute = this.getLastNestableAttribute()\n    if (attribute) {\n      const index = this.attributes.lastIndexOf(attribute)\n      const attributes = spliceArray(this.attributes, index + 1, 0, ...expandAttribute(attribute))\n      return this.copyWithAttributes(attributes)\n    } else {\n      return this\n    }\n  }\n\n  getListItemAttributes() {\n    return this.attributes.filter((attribute) => getBlockConfig(attribute).listAttribute)\n  }\n\n  isListItem() {\n    return getBlockConfig(this.getLastAttribute())?.listAttribute\n  }\n\n  isTerminalBlock() {\n    return getBlockConfig(this.getLastAttribute())?.terminal\n  }\n\n  breaksOnReturn() {\n    return getBlockConfig(this.getLastAttribute())?.breakOnReturn\n  }\n\n  findLineBreakInDirectionFromPosition(direction, position) {\n    const string = this.toString()\n    let result\n    switch (direction) {\n      case \"forward\":\n        result = string.indexOf(\"\\n\", position)\n        break\n      case \"backward\":\n        result = string.slice(0, position).lastIndexOf(\"\\n\")\n    }\n\n    if (result !== -1) {\n      return result\n    }\n  }\n\n  contentsForInspection() {\n    return {\n      text: this.text.inspect(),\n      attributes: this.attributes,\n    }\n  }\n\n  toString() {\n    return this.text.toString()\n  }\n\n  toJSON() {\n    return {\n      text: this.text,\n      attributes: this.attributes,\n      htmlAttributes: this.htmlAttributes,\n    }\n  }\n\n  // BIDI\n\n  getDirection() {\n    return this.text.getDirection()\n  }\n\n  isRTL() {\n    return this.text.isRTL()\n  }\n\n  // Splittable\n\n  getLength() {\n    return this.text.getLength()\n  }\n\n  canBeConsolidatedWith(block) {\n    return !this.hasAttributes() && !block.hasAttributes() && this.getDirection() === block.getDirection()\n  }\n\n  consolidateWith(block) {\n    const newlineText = Text.textForStringWithAttributes(\"\\n\")\n    const text = this.getTextWithoutBlockBreak().appendText(newlineText)\n    return this.copyWithText(text.appendText(block.text))\n  }\n\n  splitAtOffset(offset) {\n    let left, right\n    if (offset === 0) {\n      left = null\n      right = this\n    } else if (offset === this.getLength()) {\n      left = this\n      right = null\n    } else {\n      left = this.copyWithText(this.text.getTextAtRange([ 0, offset ]))\n      right = this.copyWithText(this.text.getTextAtRange([ offset, this.getLength() ]))\n    }\n    return [ left, right ]\n  }\n\n  getBlockBreakPosition() {\n    return this.text.getLength() - 1\n  }\n\n  getTextWithoutBlockBreak() {\n    if (textEndsInBlockBreak(this.text)) {\n      return this.text.getTextAtRange([ 0, this.getBlockBreakPosition() ])\n    } else {\n      return this.text.copy()\n    }\n  }\n\n  // Grouping\n\n  canBeGrouped(depth) {\n    return this.attributes[depth]\n  }\n\n  canBeGroupedWith(otherBlock, depth) {\n    const otherAttributes = otherBlock.getAttributes()\n    const otherAttribute = otherAttributes[depth]\n    const attribute = this.attributes[depth]\n\n    return (\n      attribute === otherAttribute &&\n      !(getBlockConfig(attribute).group === false && !getListAttributeNames().includes(otherAttributes[depth + 1])) &&\n      (this.getDirection() === otherBlock.getDirection() || otherBlock.isEmpty())\n    )\n  }\n}\n\n// Block breaks\n\nconst applyBlockBreakToText = function(text) {\n  text = unmarkExistingInnerBlockBreaksInText(text)\n  text = addBlockBreakToText(text)\n  return text\n}\n\nconst unmarkExistingInnerBlockBreaksInText = function(text) {\n  let modified = false\n  const pieces = text.getPieces()\n\n  let innerPieces = pieces.slice(0, pieces.length - 1)\n  const lastPiece = pieces[pieces.length - 1]\n\n  if (!lastPiece) return text\n\n  innerPieces = innerPieces.map((piece) => {\n    if (piece.isBlockBreak()) {\n      modified = true\n      return unmarkBlockBreakPiece(piece)\n    } else {\n      return piece\n    }\n  })\n\n  if (modified) {\n    return new Text([ ...innerPieces, lastPiece ])\n  } else {\n    return text\n  }\n}\n\nconst blockBreakText = Text.textForStringWithAttributes(\"\\n\", { blockBreak: true })\n\nconst addBlockBreakToText = function(text) {\n  if (textEndsInBlockBreak(text)) {\n    return text\n  } else {\n    return text.appendText(blockBreakText)\n  }\n}\n\nconst textEndsInBlockBreak = function(text) {\n  const length = text.getLength()\n  if (length === 0) {\n    return false\n  }\n  const endText = text.getTextAtRange([ length - 1, length ])\n  return endText.isBlockBreak()\n}\n\nconst unmarkBlockBreakPiece = (piece) => piece.copyWithoutAttribute(\"blockBreak\")\n\n// Attributes\n\nconst expandAttribute = function(attribute) {\n  const { listAttribute } = getBlockConfig(attribute)\n  if (listAttribute) {\n    return [ listAttribute, attribute ]\n  } else {\n    return [ attribute ]\n  }\n}\n\n// Array helpers\n\nconst getLastElement = (array) => array.slice(-1)[0]\n\nconst removeLastValue = function(array, value) {\n  const index = array.lastIndexOf(value)\n  if (index === -1) {\n    return array\n  } else {\n    return spliceArray(array, index, 1)\n  }\n}\n", "import * as config from \"trix/config\"\nimport TrixObject from \"trix/core/object\" // Don't override window.Object\n\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport SplittableList from \"trix/models/splittable_list\"\nimport Hash from \"trix/core/collections/hash\"\nimport ObjectMap from \"trix/core/collections/object_map\"\n\nimport { arraysAreEqual, getBlockConfig, normalizeRange, rangeIsCollapsed } from \"trix/core/helpers\"\n\nexport default class Document extends TrixObject {\n  static fromJSON(documentJSON) {\n    const blocks = Array.from(documentJSON).map((blockJSON) => Block.fromJSON(blockJSON))\n    return new this(blocks)\n  }\n\n  static fromString(string, textAttributes) {\n    const text = Text.textForStringWithAttributes(string, textAttributes)\n    return new this([ new Block(text) ])\n  }\n\n  constructor(blocks = []) {\n    super(...arguments)\n    if (blocks.length === 0) {\n      blocks = [ new Block() ]\n    }\n    this.blockList = SplittableList.box(blocks)\n  }\n\n  isEmpty() {\n    const block = this.getBlockAtIndex(0)\n    return this.blockList.length === 1 && block.isEmpty() && !block.hasAttributes()\n  }\n\n  copy(options = {}) {\n    const blocks = options.consolidateBlocks ? this.blockList.consolidate().toArray() : this.blockList.toArray()\n\n    return new this.constructor(blocks)\n  }\n\n  copyUsingObjectsFromDocument(sourceDocument) {\n    const objectMap = new ObjectMap(sourceDocument.getObjects())\n    return this.copyUsingObjectMap(objectMap)\n  }\n\n  copyUsingObjectMap(objectMap) {\n    const blocks = this.getBlocks().map((block) => {\n      const mappedBlock = objectMap.find(block)\n      return mappedBlock || block.copyUsingObjectMap(objectMap)\n    })\n    return new this.constructor(blocks)\n  }\n\n  copyWithBaseBlockAttributes(blockAttributes = []) {\n    const blocks = this.getBlocks().map((block) => {\n      const attributes = blockAttributes.concat(block.getAttributes())\n      return block.copyWithAttributes(attributes)\n    })\n\n    return new this.constructor(blocks)\n  }\n\n  replaceBlock(oldBlock, newBlock) {\n    const index = this.blockList.indexOf(oldBlock)\n    if (index === -1) {\n      return this\n    }\n    return new this.constructor(this.blockList.replaceObjectAtIndex(newBlock, index))\n  }\n\n  insertDocumentAtRange(document, range) {\n    const { blockList } = document\n    range = normalizeRange(range)\n    let [ position ] = range\n    const { index, offset } = this.locationFromPosition(position)\n\n    let result = this\n    const block = this.getBlockAtPosition(position)\n\n    if (rangeIsCollapsed(range) && block.isEmpty() && !block.hasAttributes()) {\n      result = new this.constructor(result.blockList.removeObjectAtIndex(index))\n    } else if (block.getBlockBreakPosition() === offset) {\n      position++\n    }\n\n    result = result.removeTextAtRange(range)\n    return new this.constructor(result.blockList.insertSplittableListAtPosition(blockList, position))\n  }\n\n  mergeDocumentAtRange(document, range) {\n    let formattedDocument, result\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const blockAttributes = this.getBlockAtIndex(startLocation.index).getAttributes()\n    const baseBlockAttributes = document.getBaseBlockAttributes()\n    const trailingBlockAttributes = blockAttributes.slice(-baseBlockAttributes.length)\n\n    if (arraysAreEqual(baseBlockAttributes, trailingBlockAttributes)) {\n      const leadingBlockAttributes = blockAttributes.slice(0, -baseBlockAttributes.length)\n      formattedDocument = document.copyWithBaseBlockAttributes(leadingBlockAttributes)\n    } else {\n      formattedDocument = document.copy({ consolidateBlocks: true }).copyWithBaseBlockAttributes(blockAttributes)\n    }\n\n    const blockCount = formattedDocument.getBlockCount()\n    const firstBlock = formattedDocument.getBlockAtIndex(0)\n\n    if (arraysAreEqual(blockAttributes, firstBlock.getAttributes())) {\n      const firstText = firstBlock.getTextWithoutBlockBreak()\n      result = this.insertTextAtRange(firstText, range)\n\n      if (blockCount > 1) {\n        formattedDocument = new this.constructor(formattedDocument.getBlocks().slice(1))\n        const position = startPosition + firstText.getLength()\n        result = result.insertDocumentAtRange(formattedDocument, position)\n      }\n    } else {\n      result = this.insertDocumentAtRange(formattedDocument, range)\n    }\n\n    return result\n  }\n\n  insertTextAtRange(text, range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { index, offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    return new this.constructor(\n      document.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(block.text.insertTextAtPosition(text, offset))\n      )\n    )\n  }\n\n  removeTextAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ leftPosition, rightPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this\n    }\n    const [ leftLocation, rightLocation ] = Array.from(this.locationRangeFromRange(range))\n\n    const leftIndex = leftLocation.index\n    const leftOffset = leftLocation.offset\n    const leftBlock = this.getBlockAtIndex(leftIndex)\n\n    const rightIndex = rightLocation.index\n    const rightOffset = rightLocation.offset\n    const rightBlock = this.getBlockAtIndex(rightIndex)\n\n    const removeRightNewline =\n      rightPosition - leftPosition === 1 &&\n      leftBlock.getBlockBreakPosition() === leftOffset &&\n      rightBlock.getBlockBreakPosition() !== rightOffset &&\n      rightBlock.text.getStringAtPosition(rightOffset) === \"\\n\"\n\n    if (removeRightNewline) {\n      blocks = this.blockList.editObjectAtIndex(rightIndex, (block) =>\n        block.copyWithText(block.text.removeTextAtRange([ rightOffset, rightOffset + 1 ]))\n      )\n    } else {\n      let block\n      const leftText = leftBlock.text.getTextAtRange([ 0, leftOffset ])\n      const rightText = rightBlock.text.getTextAtRange([ rightOffset, rightBlock.getLength() ])\n      const text = leftText.appendText(rightText)\n\n      const removingLeftBlock = leftIndex !== rightIndex && leftOffset === 0\n      const useRightBlock = removingLeftBlock && leftBlock.getAttributeLevel() >= rightBlock.getAttributeLevel()\n\n      if (useRightBlock) {\n        block = rightBlock.copyWithText(text)\n      } else {\n        block = leftBlock.copyWithText(text)\n      }\n\n      const affectedBlockCount = rightIndex + 1 - leftIndex\n      blocks = this.blockList.splice(leftIndex, affectedBlockCount, block)\n    }\n\n    return new this.constructor(blocks)\n  }\n\n  moveTextFromRangeToPosition(range, position) {\n    let text\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    if (startPosition <= position && position <= endPosition) {\n      return this\n    }\n\n    let document = this.getDocumentAtRange(range)\n    let result = this.removeTextAtRange(range)\n\n    const movingRightward = startPosition < position\n    if (movingRightward) {\n      position -= document.getLength()\n    }\n\n    const [ firstBlock, ...blocks ] = document.getBlocks()\n    if (blocks.length === 0) {\n      text = firstBlock.getTextWithoutBlockBreak()\n      if (movingRightward) {\n        position += 1\n      }\n    } else {\n      text = firstBlock.text\n    }\n\n    result = result.insertTextAtRange(text, position)\n    if (blocks.length === 0) {\n      return result\n    }\n\n    document = new this.constructor(blocks)\n    position += text.getLength()\n\n    return result.insertDocumentAtRange(document, position)\n  }\n\n  addAttributeAtRange(attribute, value, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(\n      range,\n      (block, textRange, index) =>\n        blockList = blockList.editObjectAtIndex(index, function() {\n          if (getBlockConfig(attribute)) {\n            return block.addAttribute(attribute, value)\n          } else {\n            if (textRange[0] === textRange[1]) {\n              return block\n            } else {\n              return block.copyWithText(block.text.addAttributeAtRange(attribute, value, textRange))\n            }\n          }\n        })\n    )\n    return new this.constructor(blockList)\n  }\n\n  addAttribute(attribute, value) {\n    let { blockList } = this\n    this.eachBlock(\n      (block, index) => blockList = blockList.editObjectAtIndex(index, () => block.addAttribute(attribute, value))\n    )\n    return new this.constructor(blockList)\n  }\n\n  removeAttributeAtRange(attribute, range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (getBlockConfig(attribute)) {\n        blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(attribute))\n      } else if (textRange[0] !== textRange[1]) {\n        blockList = blockList.editObjectAtIndex(index, () =>\n          block.copyWithText(block.text.removeAttributeAtRange(attribute, textRange))\n        )\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    const [ startPosition ] = Array.from(range)\n    const { index } = this.locationFromPosition(startPosition)\n    const text = this.getTextAtIndex(index)\n\n    return new this.constructor(\n      this.blockList.editObjectAtIndex(index, (block) =>\n        block.copyWithText(text.updateAttributesForAttachment(attributes, attachment))\n      )\n    )\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.removeAttributeAtRange(attribute, range)\n  }\n\n  setHTMLAttributeAtPosition(position, name, value) {\n    const block = this.getBlockAtPosition(position)\n    const updatedBlock = block.addHTMLAttribute(name, value)\n    return this.replaceBlock(block, updatedBlock)\n  }\n\n  insertBlockBreakAtRange(range) {\n    let blocks\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    const { offset } = this.locationFromPosition(startPosition)\n\n    const document = this.removeTextAtRange(range)\n    if (offset === 0) {\n      blocks = [ new Block() ]\n    }\n    return new this.constructor(\n      document.blockList.insertSplittableListAtPosition(new SplittableList(blocks), startPosition)\n    )\n  }\n\n  applyBlockAttributeAtRange(attributeName, value, range) {\n    const expanded = this.expandRangeToLineBreaksAndSplitBlocks(range)\n    let document = expanded.document\n    range = expanded.range\n    const blockConfig = getBlockConfig(attributeName)\n\n    if (blockConfig.listAttribute) {\n      document = document.removeLastListAttributeAtRange(range, { exceptAttributeName: attributeName })\n      const converted = document.convertLineBreaksToBlockBreaksInRange(range)\n      document = converted.document\n      range = converted.range\n    } else if (blockConfig.exclusive) {\n      document = document.removeBlockAttributesAtRange(range)\n    } else if (blockConfig.terminal) {\n      document = document.removeLastTerminalAttributeAtRange(range)\n    } else {\n      document = document.consolidateBlocksAtRange(range)\n    }\n\n    return document.addAttributeAtRange(attributeName, value, range)\n  }\n\n  removeLastListAttributeAtRange(range, options = {}) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).listAttribute) {\n        return\n      }\n      if (lastAttributeName === options.exceptAttributeName) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeLastTerminalAttributeAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      const lastAttributeName = block.getLastAttribute()\n      if (!lastAttributeName) {\n        return\n      }\n      if (!getBlockConfig(lastAttributeName).terminal) {\n        return\n      }\n      blockList = blockList.editObjectAtIndex(index, () => block.removeAttribute(lastAttributeName))\n    })\n    return new this.constructor(blockList)\n  }\n\n  removeBlockAttributesAtRange(range) {\n    let { blockList } = this\n    this.eachBlockAtRange(range, function(block, textRange, index) {\n      if (block.hasAttributes()) {\n        blockList = blockList.editObjectAtIndex(index, () => block.copyWithoutAttributes())\n      }\n    })\n    return new this.constructor(blockList)\n  }\n\n  expandRangeToLineBreaksAndSplitBlocks(range) {\n    let position\n    range = normalizeRange(range)\n    let [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    let document = this\n\n    const startBlock = document.getBlockAtIndex(startLocation.index)\n    startLocation.offset = startBlock.findLineBreakInDirectionFromPosition(\"backward\", startLocation.offset)\n    if (startLocation.offset != null) {\n      position = document.positionFromLocation(startLocation)\n      document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      endLocation.index += 1\n      endLocation.offset -= document.getBlockAtIndex(startLocation.index).getLength()\n      startLocation.index += 1\n    }\n    startLocation.offset = 0\n\n    if (endLocation.offset === 0 && endLocation.index > startLocation.index) {\n      endLocation.index -= 1\n      endLocation.offset = document.getBlockAtIndex(endLocation.index).getBlockBreakPosition()\n    } else {\n      const endBlock = document.getBlockAtIndex(endLocation.index)\n      if (endBlock.text.getStringAtRange([ endLocation.offset - 1, endLocation.offset ]) === \"\\n\") {\n        endLocation.offset -= 1\n      } else {\n        endLocation.offset = endBlock.findLineBreakInDirectionFromPosition(\"forward\", endLocation.offset)\n      }\n      if (endLocation.offset !== endBlock.getBlockBreakPosition()) {\n        position = document.positionFromLocation(endLocation)\n        document = document.insertBlockBreakAtRange([ position, position + 1 ])\n      }\n    }\n\n    startPosition = document.positionFromLocation(startLocation)\n    endPosition = document.positionFromLocation(endLocation)\n    range = normalizeRange([ startPosition, endPosition ])\n\n    return { document, range }\n  }\n\n  convertLineBreaksToBlockBreaksInRange(range) {\n    range = normalizeRange(range)\n    let [ position ] = range\n    const string = this.getStringAtRange(range).slice(0, -1)\n    let document = this\n\n    string.replace(/.*?\\n/g, function(match) {\n      position += match.length\n      document = document.insertBlockBreakAtRange([ position - 1, position ])\n    })\n\n    return { document, range }\n  }\n\n  consolidateBlocksAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startIndex = this.locationFromPosition(startPosition).index\n    const endIndex = this.locationFromPosition(endPosition).index\n    return new this.constructor(this.blockList.consolidateFromIndexToIndex(startIndex, endIndex))\n  }\n\n  getDocumentAtRange(range) {\n    range = normalizeRange(range)\n    const blocks = this.blockList.getSplittableListInRange(range).toArray()\n    return new this.constructor(blocks)\n  }\n\n  getStringAtRange(range) {\n    let endIndex\n    const array = range = normalizeRange(range),\n      endPosition = array[array.length - 1]\n    if (endPosition !== this.getLength()) {\n      endIndex = -1\n    }\n    return this.getDocumentAtRange(range).toString().slice(0, endIndex)\n  }\n\n  getBlockAtIndex(index) {\n    return this.blockList.getObjectAtIndex(index)\n  }\n\n  getBlockAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getBlockAtIndex(index)\n  }\n\n  getTextAtIndex(index) {\n    return this.getBlockAtIndex(index)?.text\n  }\n\n  getTextAtPosition(position) {\n    const { index } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index)\n  }\n\n  getPieceAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getPieceAtPosition(offset)\n  }\n\n  getCharacterAtPosition(position) {\n    const { index, offset } = this.locationFromPosition(position)\n    return this.getTextAtIndex(index).getStringAtRange([ offset, offset + 1 ])\n  }\n\n  getLength() {\n    return this.blockList.getEndPosition()\n  }\n\n  getBlocks() {\n    return this.blockList.toArray()\n  }\n\n  getBlockCount() {\n    return this.blockList.length\n  }\n\n  getEditCount() {\n    return this.editCount\n  }\n\n  eachBlock(callback) {\n    return this.blockList.eachObject(callback)\n  }\n\n  eachBlockAtRange(range, callback) {\n    let block, textRange\n    range = normalizeRange(range)\n    const [ startPosition, endPosition ] = range\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n\n    if (startLocation.index === endLocation.index) {\n      block = this.getBlockAtIndex(startLocation.index)\n      textRange = [ startLocation.offset, endLocation.offset ]\n      return callback(block, textRange, startLocation.index)\n    } else {\n      for (let index = startLocation.index; index <= endLocation.index; index++) {\n        block = this.getBlockAtIndex(index)\n        if (block) {\n          switch (index) {\n            case startLocation.index:\n              textRange = [ startLocation.offset, block.text.getLength() ]\n              break\n            case endLocation.index:\n              textRange = [ 0, endLocation.offset ]\n              break\n            default:\n              textRange = [ 0, block.text.getLength() ]\n          }\n          callback(block, textRange, index)\n        }\n      }\n    }\n  }\n\n  getCommonAttributesAtRange(range) {\n    range = normalizeRange(range)\n    const [ startPosition ] = range\n    if (rangeIsCollapsed(range)) {\n      return this.getCommonAttributesAtPosition(startPosition)\n    } else {\n      const textAttributes = []\n      const blockAttributes = []\n\n      this.eachBlockAtRange(range, function(block, textRange) {\n        if (textRange[0] !== textRange[1]) {\n          textAttributes.push(block.text.getCommonAttributesAtRange(textRange))\n          return blockAttributes.push(attributesForBlock(block))\n        }\n      })\n\n      return Hash.fromCommonAttributesOfObjects(textAttributes)\n        .merge(Hash.fromCommonAttributesOfObjects(blockAttributes))\n        .toObject()\n    }\n  }\n\n  getCommonAttributesAtPosition(position) {\n    let key, value\n    const { index, offset } = this.locationFromPosition(position)\n    const block = this.getBlockAtIndex(index)\n    if (!block) {\n      return {}\n    }\n\n    const commonAttributes = attributesForBlock(block)\n    const attributes = block.text.getAttributesAtPosition(offset)\n    const attributesLeft = block.text.getAttributesAtPosition(offset - 1)\n    const inheritableAttributes = Object.keys(config.textAttributes).filter((key) => {\n      return config.textAttributes[key].inheritable\n    })\n\n    for (key in attributesLeft) {\n      value = attributesLeft[key]\n      if (value === attributes[key] || inheritableAttributes.includes(key)) {\n        commonAttributes[key] = value\n      }\n    }\n\n    return commonAttributes\n  }\n\n  getRangeOfCommonAttributeAtPosition(attributeName, position) {\n    const { index, offset } = this.locationFromPosition(position)\n    const text = this.getTextAtIndex(index)\n    const [ startOffset, endOffset ] = Array.from(text.getExpandedRangeForAttributeAtOffset(attributeName, offset))\n\n    const start = this.positionFromLocation({ index, offset: startOffset })\n    const end = this.positionFromLocation({ index, offset: endOffset })\n    return normalizeRange([ start, end ])\n  }\n\n  getBaseBlockAttributes() {\n    let baseBlockAttributes = this.getBlockAtIndex(0).getAttributes()\n\n    for (let blockIndex = 1; blockIndex < this.getBlockCount(); blockIndex++) {\n      const blockAttributes = this.getBlockAtIndex(blockIndex).getAttributes()\n      const lastAttributeIndex = Math.min(baseBlockAttributes.length, blockAttributes.length)\n\n      baseBlockAttributes = (() => {\n        const result = []\n        for (let index = 0; index < lastAttributeIndex; index++) {\n          if (blockAttributes[index] !== baseBlockAttributes[index]) {\n            break\n          }\n          result.push(blockAttributes[index])\n        }\n        return result\n      })()\n    }\n\n    return baseBlockAttributes\n  }\n\n  getAttachmentById(attachmentId) {\n    for (const attachment of this.getAttachments()) {\n      if (attachment.id === attachmentId) {\n        return attachment\n      }\n    }\n  }\n\n  getAttachmentPieces() {\n    let attachmentPieces = []\n    this.blockList.eachObject(({ text }) => attachmentPieces = attachmentPieces.concat(text.getAttachmentPieces()))\n    return attachmentPieces\n  }\n\n  getAttachments() {\n    return this.getAttachmentPieces().map((piece) => piece.attachment)\n  }\n\n  getRangeOfAttachment(attachment) {\n    let position = 0\n    const iterable = this.blockList.toArray()\n    for (let index = 0; index < iterable.length; index++) {\n      const { text } = iterable[index]\n      const textRange = text.getRangeOfAttachment(attachment)\n      if (textRange) {\n        return normalizeRange([ position + textRange[0], position + textRange[1] ])\n      }\n      position += text.getLength()\n    }\n  }\n\n  getLocationRangeOfAttachment(attachment) {\n    const range = this.getRangeOfAttachment(attachment)\n    return this.locationRangeFromRange(range)\n  }\n\n  getAttachmentPieceForAttachment(attachment) {\n    for (const piece of this.getAttachmentPieces()) {\n      if (piece.attachment === attachment) {\n        return piece\n      }\n    }\n  }\n\n  findRangesForBlockAttribute(attributeName) {\n    let position = 0\n    const ranges = []\n\n    this.getBlocks().forEach((block) => {\n      const length = block.getLength()\n      if (block.hasAttribute(attributeName)) {\n        ranges.push([ position, position + length ])\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  findRangesForTextAttribute(attributeName, { withValue } = {}) {\n    let position = 0\n    let range = []\n    const ranges = []\n\n    const match = function(piece) {\n      if (withValue) {\n        return piece.getAttribute(attributeName) === withValue\n      } else {\n        return piece.hasAttribute(attributeName)\n      }\n    }\n\n    this.getPieces().forEach((piece) => {\n      const length = piece.getLength()\n      if (match(piece)) {\n        if (range[1] === position) {\n          range[1] = position + length\n        } else {\n          ranges.push(range = [ position, position + length ])\n        }\n      }\n      position += length\n    })\n\n    return ranges\n  }\n\n  locationFromPosition(position) {\n    const location = this.blockList.findIndexAndOffsetAtPosition(Math.max(0, position))\n    if (location.index != null) {\n      return location\n    } else {\n      const blocks = this.getBlocks()\n      return { index: blocks.length - 1, offset: blocks[blocks.length - 1].getLength() }\n    }\n  }\n\n  positionFromLocation(location) {\n    return this.blockList.findPositionAtIndexAndOffset(location.index, location.offset)\n  }\n\n  locationRangeFromPosition(position) {\n    return normalizeRange(this.locationFromPosition(position))\n  }\n\n  locationRangeFromRange(range) {\n    range = normalizeRange(range)\n    if (!range) return\n\n    const [ startPosition, endPosition ] = Array.from(range)\n    const startLocation = this.locationFromPosition(startPosition)\n    const endLocation = this.locationFromPosition(endPosition)\n    return normalizeRange([ startLocation, endLocation ])\n  }\n\n  rangeFromLocationRange(locationRange) {\n    let rightPosition\n    locationRange = normalizeRange(locationRange)\n    const leftPosition = this.positionFromLocation(locationRange[0])\n    if (!rangeIsCollapsed(locationRange)) {\n      rightPosition = this.positionFromLocation(locationRange[1])\n    }\n    return normalizeRange([ leftPosition, rightPosition ])\n  }\n\n  isEqualTo(document) {\n    return this.blockList.isEqualTo(document?.blockList)\n  }\n\n  getTexts() {\n    return this.getBlocks().map((block) => block.text)\n  }\n\n  getPieces() {\n    const pieces = []\n\n    Array.from(this.getTexts()).forEach((text) => {\n      pieces.push(...Array.from(text.getPieces() || []))\n    })\n\n    return pieces\n  }\n\n  getObjects() {\n    return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())\n  }\n\n  toSerializableDocument() {\n    const blocks = []\n    this.blockList.eachObject((block) => blocks.push(block.copyWithText(block.text.toSerializableText())))\n    return new this.constructor(blocks)\n  }\n\n  toString() {\n    return this.blockList.toString()\n  }\n\n  toJSON() {\n    return this.blockList.toJSON()\n  }\n\n  toConsole() {\n    return JSON.stringify(this.blockList.toArray().map((block) => JSON.parse(block.text.toConsole())))\n  }\n}\n\nconst attributesForBlock = function(block) {\n  const attributes = {}\n  const attributeName = block.getLastAttribute()\n  if (attributeName) {\n    attributes[attributeName] = true\n  }\n  return attributes\n}\n", "/* eslint-disable\n    no-case-declarations,\n    no-irregular-whitespace,\n*/\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\nimport Document from \"trix/models/document\"\nimport HTMLSanitizer from \"trix/models/html_sanitizer\"\n\nimport {\n  arraysAreEqual,\n  breakableWhitespacePattern,\n  elementContainsNode,\n  findClosestElementFromNode,\n  getBlockTagNames,\n  makeElement,\n  nodeIsAttachmentElement,\n  normalizeSpaces,\n  removeNode,\n  squishBreakableWhitespace,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nconst pieceForString = (string, attributes = {}) => {\n  const type = \"string\"\n  string = normalizeSpaces(string)\n  return { string, attributes, type }\n}\n\nconst pieceForAttachment = (attachment, attributes = {}) => {\n  const type = \"attachment\"\n  return { attachment, attributes, type }\n}\n\nconst blockForAttributes = (attributes = {}, htmlAttributes = {}) => {\n  const text = []\n  return { text, attributes, htmlAttributes }\n}\n\nconst parseTrixDataAttribute = (element, name) => {\n  try {\n    return JSON.parse(element.getAttribute(`data-trix-${name}`))\n  } catch (error) {\n    return {}\n  }\n}\n\nconst getImageDimensions = (element) => {\n  const width = element.getAttribute(\"width\")\n  const height = element.getAttribute(\"height\")\n  const dimensions = {}\n  if (width) {\n    dimensions.width = parseInt(width, 10)\n  }\n  if (height) {\n    dimensions.height = parseInt(height, 10)\n  }\n  return dimensions\n}\n\nexport default class HTMLParser extends BasicObject {\n  static parse(html, options) {\n    const parser = new this(html, options)\n    parser.parse()\n    return parser\n  }\n\n  constructor(html, { referenceElement } = {}) {\n    super(...arguments)\n    this.html = html\n    this.referenceElement = referenceElement\n    this.blocks = []\n    this.blockElements = []\n    this.processedElements = []\n  }\n\n  getDocument() {\n    return Document.fromJSON(this.blocks)\n  }\n\n  // HTML parsing\n\n  parse() {\n    try {\n      this.createHiddenContainer()\n      HTMLSanitizer.setHTML(this.containerElement, this.html)\n      const walker = walkTree(this.containerElement, { usingFilter: nodeFilter })\n      while (walker.nextNode()) {\n        this.processNode(walker.currentNode)\n      }\n      return this.translateBlockElementMarginsToNewlines()\n    } finally {\n      this.removeHiddenContainer()\n    }\n  }\n\n  createHiddenContainer() {\n    if (this.referenceElement) {\n      this.containerElement = this.referenceElement.cloneNode(false)\n      this.containerElement.removeAttribute(\"id\")\n      this.containerElement.setAttribute(\"data-trix-internal\", \"\")\n      this.containerElement.style.display = \"none\"\n      return this.referenceElement.parentNode.insertBefore(this.containerElement, this.referenceElement.nextSibling)\n    } else {\n      this.containerElement = makeElement({ tagName: \"div\", style: { display: \"none\" } })\n      return document.body.appendChild(this.containerElement)\n    }\n  }\n\n  removeHiddenContainer() {\n    return removeNode(this.containerElement)\n  }\n\n  processNode(node) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        if (!this.isInsignificantTextNode(node)) {\n          this.appendBlockForTextNode(node)\n          return this.processTextNode(node)\n        }\n        break\n      case Node.ELEMENT_NODE:\n        this.appendBlockForElement(node)\n        return this.processElement(node)\n    }\n  }\n\n  appendBlockForTextNode(node) {\n    const element = node.parentNode\n    if (element === this.currentBlockElement && this.isBlockElement(node.previousSibling)) {\n      return this.appendStringWithAttributes(\"\\n\")\n    } else if (element === this.containerElement || this.isBlockElement(element)) {\n      const attributes = this.getBlockAttributes(element)\n      const htmlAttributes = this.getBlockHTMLAttributes(element)\n      if (!arraysAreEqual(attributes, this.currentBlock?.attributes)) {\n        this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n        this.currentBlockElement = element\n      }\n    }\n  }\n\n  appendBlockForElement(element) {\n    const elementIsBlockElement = this.isBlockElement(element)\n    const currentBlockContainsElement = elementContainsNode(this.currentBlockElement, element)\n\n    if (elementIsBlockElement && !this.isBlockElement(element.firstChild)) {\n      if (!this.isInsignificantTextNode(element.firstChild) || !this.isBlockElement(element.firstElementChild)) {\n        const attributes = this.getBlockAttributes(element)\n        const htmlAttributes = this.getBlockHTMLAttributes(element)\n        if (element.firstChild) {\n          if (!(currentBlockContainsElement && arraysAreEqual(attributes, this.currentBlock.attributes))) {\n            this.currentBlock = this.appendBlockForAttributesWithElement(attributes, element, htmlAttributes)\n            this.currentBlockElement = element\n          } else {\n            return this.appendStringWithAttributes(\"\\n\")\n          }\n        }\n      }\n    } else if (this.currentBlockElement && !currentBlockContainsElement && !elementIsBlockElement) {\n      const parentBlockElement = this.findParentBlockElement(element)\n      if (parentBlockElement) {\n        return this.appendBlockForElement(parentBlockElement)\n      } else {\n        this.currentBlock = this.appendEmptyBlock()\n        this.currentBlockElement = null\n      }\n    }\n  }\n\n  findParentBlockElement(element) {\n    let { parentElement } = element\n    while (parentElement && parentElement !== this.containerElement) {\n      if (this.isBlockElement(parentElement) && this.blockElements.includes(parentElement)) {\n        return parentElement\n      } else {\n        parentElement = parentElement.parentElement\n      }\n    }\n    return null\n  }\n\n  processTextNode(node) {\n    let string = node.data\n    if (!elementCanDisplayPreformattedText(node.parentNode)) {\n      string = squishBreakableWhitespace(string)\n      if (stringEndsWithWhitespace(node.previousSibling?.textContent)) {\n        string = leftTrimBreakableWhitespace(string)\n      }\n    }\n    return this.appendStringWithAttributes(string, this.getTextAttributes(node.parentNode))\n  }\n\n  processElement(element) {\n    let attributes\n    if (nodeIsAttachmentElement(element)) {\n      attributes = parseTrixDataAttribute(element, \"attachment\")\n      if (Object.keys(attributes).length) {\n        const textAttributes = this.getTextAttributes(element)\n        this.appendAttachmentWithAttributes(attributes, textAttributes)\n        // We have everything we need so avoid processing inner nodes\n        element.innerHTML = \"\"\n      }\n      return this.processedElements.push(element)\n    } else {\n      switch (tagName(element)) {\n        case \"br\":\n          if (!this.isExtraBR(element) && !this.isBlockElement(element.nextSibling)) {\n            this.appendStringWithAttributes(\"\\n\", this.getTextAttributes(element))\n          }\n          return this.processedElements.push(element)\n        case \"img\":\n          attributes = { url: element.getAttribute(\"src\"), contentType: \"image\" }\n          const object = getImageDimensions(element)\n          for (const key in object) {\n            const value = object[key]\n            attributes[key] = value\n          }\n          this.appendAttachmentWithAttributes(attributes, this.getTextAttributes(element))\n          return this.processedElements.push(element)\n        case \"tr\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableRowSeparator)\n          }\n          break\n        case \"td\":\n          if (this.needsTableSeparator(element)) {\n            return this.appendStringWithAttributes(config.parser.tableCellSeparator)\n          }\n          break\n      }\n    }\n  }\n\n  // Document construction\n\n  appendBlockForAttributesWithElement(attributes, element, htmlAttributes = {}) {\n    this.blockElements.push(element)\n    const block = blockForAttributes(attributes, htmlAttributes)\n    this.blocks.push(block)\n    return block\n  }\n\n  appendEmptyBlock() {\n    return this.appendBlockForAttributesWithElement([], null)\n  }\n\n  appendStringWithAttributes(string, attributes) {\n    return this.appendPiece(pieceForString(string, attributes))\n  }\n\n  appendAttachmentWithAttributes(attachment, attributes) {\n    return this.appendPiece(pieceForAttachment(attachment, attributes))\n  }\n\n  appendPiece(piece) {\n    if (this.blocks.length === 0) {\n      this.appendEmptyBlock()\n    }\n    return this.blocks[this.blocks.length - 1].text.push(piece)\n  }\n\n  appendStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[text.length - 1]\n\n    if (piece?.type === \"string\") {\n      piece.string += string\n    } else {\n      return text.push(pieceForString(string))\n    }\n  }\n\n  prependStringToTextAtIndex(string, index) {\n    const { text } = this.blocks[index]\n    const piece = text[0]\n\n    if (piece?.type === \"string\") {\n      piece.string = string + piece.string\n    } else {\n      return text.unshift(pieceForString(string))\n    }\n  }\n\n  // Attribute parsing\n\n  getTextAttributes(element) {\n    let value\n    const attributes = {}\n    for (const attribute in config.textAttributes) {\n      const configAttr = config.textAttributes[attribute]\n      if (\n        configAttr.tagName &&\n        findClosestElementFromNode(element, {\n          matchingSelector: configAttr.tagName,\n          untilNode: this.containerElement,\n        })\n      ) {\n        attributes[attribute] = true\n      } else if (configAttr.parser) {\n        value = configAttr.parser(element)\n        if (value) {\n          let attributeInheritedFromBlock = false\n          for (const blockElement of this.findBlockElementAncestors(element)) {\n            if (configAttr.parser(blockElement) === value) {\n              attributeInheritedFromBlock = true\n              break\n            }\n          }\n          if (!attributeInheritedFromBlock) {\n            attributes[attribute] = value\n          }\n        }\n      } else if (configAttr.styleProperty) {\n        value = element.style[configAttr.styleProperty]\n        if (value) {\n          attributes[attribute] = value\n        }\n      }\n    }\n\n    if (nodeIsAttachmentElement(element)) {\n      const object = parseTrixDataAttribute(element, \"attributes\")\n      for (const key in object) {\n        value = object[key]\n        attributes[key] = value\n      }\n    }\n\n    return attributes\n  }\n\n  getBlockAttributes(element) {\n    const attributes = []\n    while (element && element !== this.containerElement) {\n      for (const attribute in config.blockAttributes) {\n        const attrConfig = config.blockAttributes[attribute]\n        if (attrConfig.parse !== false) {\n          if (tagName(element) === attrConfig.tagName) {\n            if (attrConfig.test?.(element) || !attrConfig.test) {\n              attributes.push(attribute)\n              if (attrConfig.listAttribute) {\n                attributes.push(attrConfig.listAttribute)\n              }\n            }\n          }\n        }\n      }\n      element = element.parentNode\n    }\n    return attributes.reverse()\n  }\n\n  getBlockHTMLAttributes(element) {\n    const attributes = {}\n    const blockConfig = Object.values(config.blockAttributes).find(settings => settings.tagName === tagName(element))\n    const allowedAttributes = blockConfig?.htmlAttributes || []\n\n    allowedAttributes.forEach((attribute) => {\n      if (element.hasAttribute(attribute)) {\n        attributes[attribute] = element.getAttribute(attribute)\n      }\n    })\n\n    return attributes\n  }\n\n  findBlockElementAncestors(element) {\n    const ancestors = []\n    while (element && element !== this.containerElement) {\n      const tag = tagName(element)\n      if (getBlockTagNames().includes(tag)) {\n        ancestors.push(element)\n      }\n      element = element.parentNode\n    }\n    return ancestors\n  }\n\n  // Element inspection\n\n  isBlockElement(element) {\n    if (element?.nodeType !== Node.ELEMENT_NODE) return\n    if (nodeIsAttachmentElement(element)) return\n    if (findClosestElementFromNode(element, { matchingSelector: \"td\", untilNode: this.containerElement })) return\n\n    return getBlockTagNames().includes(tagName(element)) ||\n      window.getComputedStyle(element).display === \"block\"\n  }\n\n  isInsignificantTextNode(node) {\n    if (node?.nodeType !== Node.TEXT_NODE) return\n    if (!stringIsAllBreakableWhitespace(node.data)) return\n    const { parentNode, previousSibling, nextSibling } = node\n    if (nodeEndsWithNonWhitespace(parentNode.previousSibling) && !this.isBlockElement(parentNode.previousSibling)) return\n    if (elementCanDisplayPreformattedText(parentNode)) return\n    return !previousSibling || this.isBlockElement(previousSibling) || !nextSibling || this.isBlockElement(nextSibling)\n  }\n\n  isExtraBR(element) {\n    return tagName(element) === \"br\" && this.isBlockElement(element.parentNode) && element.parentNode.lastChild === element\n  }\n\n  needsTableSeparator(element) {\n    if (config.parser.removeBlankTableCells) {\n      const content = element.previousSibling?.textContent\n      return content && /\\S/.test(content)\n    } else {\n      return element.previousSibling\n    }\n  }\n\n  // Margin translation\n\n  translateBlockElementMarginsToNewlines() {\n    const defaultMargin = this.getMarginOfDefaultBlockElement()\n\n    for (let index = 0; index < this.blocks.length; index++) {\n      const margin = this.getMarginOfBlockElementAtIndex(index)\n      if (margin) {\n        if (margin.top > defaultMargin.top * 2) {\n          this.prependStringToTextAtIndex(\"\\n\", index)\n        }\n\n        if (margin.bottom > defaultMargin.bottom * 2) {\n          this.appendStringToTextAtIndex(\"\\n\", index)\n        }\n      }\n    }\n  }\n\n  getMarginOfBlockElementAtIndex(index) {\n    const element = this.blockElements[index]\n    if (element) {\n      if (element.textContent) {\n        if (!getBlockTagNames().includes(tagName(element)) && !this.processedElements.includes(element)) {\n          return getBlockElementMargin(element)\n        }\n      }\n    }\n  }\n\n  getMarginOfDefaultBlockElement() {\n    const element = makeElement(config.blockAttributes.default.tagName)\n    this.containerElement.appendChild(element)\n    return getBlockElementMargin(element)\n  }\n}\n\n//\u00A0Helpers\n\nconst elementCanDisplayPreformattedText = function(element) {\n  const { whiteSpace } = window.getComputedStyle(element)\n  return [ \"pre\", \"pre-wrap\", \"pre-line\" ].includes(whiteSpace)\n}\n\nconst nodeEndsWithNonWhitespace = (node) => node && !stringEndsWithWhitespace(node.textContent)\n\nconst getBlockElementMargin = function(element) {\n  const style = window.getComputedStyle(element)\n  if (style.display === \"block\") {\n    return { top: parseInt(style.marginTop), bottom: parseInt(style.marginBottom) }\n  }\n}\n\nconst nodeFilter = function(node) {\n  if (tagName(node) === \"style\") {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\n// Whitespace\n\nconst leftTrimBreakableWhitespace = (string) => string.replace(new RegExp(`^${breakableWhitespacePattern.source}+`), \"\")\n\nconst stringIsAllBreakableWhitespace = (string) => new RegExp(`^${breakableWhitespacePattern.source}*$`).test(string)\n\nconst stringEndsWithWhitespace = (string) => /\\s$/.test(string)\n", "/* eslint-disable\n    no-empty,\n*/\nimport { removeNode } from \"trix/core/helpers\"\n\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nconst unserializableElementSelector = \"[data-trix-serialize=false]\"\nconst unserializableAttributeNames = [\n  \"contenteditable\",\n  \"data-trix-id\",\n  \"data-trix-store-key\",\n  \"data-trix-mutable\",\n  \"data-trix-placeholder\",\n  \"tabindex\",\n]\nconst serializedAttributesAttribute = \"data-trix-serialized-attributes\"\nconst serializedAttributesSelector = `[${serializedAttributesAttribute}]`\n\nconst blockCommentPattern = new RegExp(\"<!--block-->\", \"g\")\n\nconst serializers = {\n  \"application/json\": function(serializable) {\n    let document\n    if (serializable instanceof Document) {\n      document = serializable\n    } else if (serializable instanceof HTMLElement) {\n      document = HTMLParser.parse(serializable.innerHTML).getDocument()\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    return document.toSerializableDocument().toJSONString()\n  },\n\n  \"text/html\": function(serializable) {\n    let element\n    if (serializable instanceof Document) {\n      element = DocumentView.render(serializable)\n    } else if (serializable instanceof HTMLElement) {\n      element = serializable.cloneNode(true)\n    } else {\n      throw new Error(\"unserializable object\")\n    }\n\n    // Remove unserializable elements\n    Array.from(element.querySelectorAll(unserializableElementSelector)).forEach((el) => {\n      removeNode(el)\n    })\n\n    // Remove unserializable attributes\n    unserializableAttributeNames.forEach((attribute) => {\n      Array.from(element.querySelectorAll(`[${attribute}]`)).forEach((el) => {\n        el.removeAttribute(attribute)\n      })\n    })\n\n    // Rewrite elements with serialized attribute overrides\n    Array.from(element.querySelectorAll(serializedAttributesSelector)).forEach((el) => {\n      try {\n        const attributes = JSON.parse(el.getAttribute(serializedAttributesAttribute))\n        el.removeAttribute(serializedAttributesAttribute)\n        for (const name in attributes) {\n          const value = attributes[name]\n          el.setAttribute(name, value)\n        }\n      } catch (error) {}\n    })\n\n    return element.innerHTML.replace(blockCommentPattern, \"\")\n  },\n}\n\nconst deserializers = {\n  \"application/json\": function(string) {\n    return Document.fromJSONString(string)\n  },\n\n  \"text/html\": function(string) {\n    return HTMLParser.parse(string).getDocument()\n  },\n}\n\nexport const serializeToContentType = function(serializable, contentType) {\n  const serializer = serializers[contentType]\n  if (serializer) {\n    return serializer(serializable)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n\nexport const deserializeFromContentType = function(string, contentType) {\n  const deserializer = deserializers[contentType]\n  if (deserializer) {\n    return deserializer(string)\n  } else {\n    throw new Error(`unknown content type: ${contentType}`)\n  }\n}\n", "import \"trix/models/attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class ManagedAttachment extends BasicObject {\n  constructor(attachmentManager, attachment) {\n    super(...arguments)\n    this.attachmentManager = attachmentManager\n    this.attachment = attachment\n    this.id = this.attachment.id\n    this.file = this.attachment.file\n  }\n\n  remove() {\n    return this.attachmentManager.requestRemovalOfAttachment(this.attachment)\n  }\n}\n\nManagedAttachment.proxyMethod(\"attachment.getAttribute\")\nManagedAttachment.proxyMethod(\"attachment.hasAttribute\")\nManagedAttachment.proxyMethod(\"attachment.setAttribute\")\nManagedAttachment.proxyMethod(\"attachment.getAttributes\")\nManagedAttachment.proxyMethod(\"attachment.setAttributes\")\nManagedAttachment.proxyMethod(\"attachment.isPending\")\nManagedAttachment.proxyMethod(\"attachment.isPreviewable\")\nManagedAttachment.proxyMethod(\"attachment.getURL\")\nManagedAttachment.proxyMethod(\"attachment.getHref\")\nManagedAttachment.proxyMethod(\"attachment.getFilename\")\nManagedAttachment.proxyMethod(\"attachment.getFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getFormattedFilesize\")\nManagedAttachment.proxyMethod(\"attachment.getExtension\")\nManagedAttachment.proxyMethod(\"attachment.getContentType\")\nManagedAttachment.proxyMethod(\"attachment.getFile\")\nManagedAttachment.proxyMethod(\"attachment.setFile\")\nManagedAttachment.proxyMethod(\"attachment.releaseFile\")\nManagedAttachment.proxyMethod(\"attachment.getUploadProgress\")\nManagedAttachment.proxyMethod(\"attachment.setUploadProgress\")\n\n", "import ManagedAttachment from \"trix/models/managed_attachment\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class AttachmentManager extends BasicObject {\n  constructor(attachments = []) {\n    super(...arguments)\n    this.managedAttachments = {}\n    Array.from(attachments).forEach((attachment) => {\n      this.manageAttachment(attachment)\n    })\n  }\n\n  getAttachments() {\n    const result = []\n    for (const id in this.managedAttachments) {\n      const attachment = this.managedAttachments[id]\n      result.push(attachment)\n    }\n    return result\n  }\n\n  manageAttachment(attachment) {\n    if (!this.managedAttachments[attachment.id]) {\n      this.managedAttachments[attachment.id] = new ManagedAttachment(this, attachment)\n    }\n    return this.managedAttachments[attachment.id]\n  }\n\n  attachmentIsManaged(attachment) {\n    return attachment.id in this.managedAttachments\n  }\n\n  requestRemovalOfAttachment(attachment) {\n    if (this.attachmentIsManaged(attachment)) {\n      return this.delegate?.attachmentManagerDidRequestRemovalOfAttachment?.(attachment)\n    }\n  }\n\n  unmanageAttachment(attachment) {\n    const managedAttachment = this.managedAttachments[attachment.id]\n    delete this.managedAttachments[attachment.id]\n    return managedAttachment\n  }\n}\n", "export default class LineBreakInsertion {\n  constructor(composition) {\n    this.composition = composition\n    this.document = this.composition.document\n    const selectedRange = this.composition.getSelectedRange()\n    this.startPosition = selectedRange[0]\n    this.endPosition = selectedRange[1]\n\n    this.startLocation = this.document.locationFromPosition(this.startPosition)\n    this.endLocation = this.document.locationFromPosition(this.endPosition)\n\n    this.block = this.document.getBlockAtIndex(this.endLocation.index)\n    this.breaksOnReturn = this.block.breaksOnReturn()\n    this.previousCharacter = this.block.text.getStringAtPosition(this.endLocation.offset - 1)\n    this.nextCharacter = this.block.text.getStringAtPosition(this.endLocation.offset)\n  }\n\n  shouldInsertBlockBreak() {\n    if (this.block.hasAttributes() && this.block.isListItem() && !this.block.isEmpty()) {\n      return this.startLocation.offset !== 0\n    } else {\n      return this.breaksOnReturn && this.nextCharacter !== \"\\n\"\n    }\n  }\n\n  shouldBreakFormattedBlock() {\n    return (\n      this.block.hasAttributes() &&\n      !this.block.isListItem() &&\n      (this.breaksOnReturn && this.nextCharacter === \"\\n\" || this.previousCharacter === \"\\n\")\n    )\n  }\n\n  shouldDecreaseListLevel() {\n    return this.block.hasAttributes() && this.block.isListItem() && this.block.isEmpty()\n  }\n\n  shouldPrependListItem() {\n    return this.block.isListItem() && this.startLocation.offset === 0 && !this.block.isEmpty()\n  }\n\n  shouldRemoveLastBlockAttribute() {\n    return this.block.hasAttributes() && !this.block.isListItem() && this.block.isEmpty()\n  }\n}\n", "import * as config from \"trix/config\"\nimport { OBJECT_REPLACEMENT_CHARACTER } from \"trix/constants\"\n\nimport BasicObject from \"trix/core/basic_object\"\nimport Text from \"trix/models/text\"\nimport Block from \"trix/models/block\"\nimport Attachment from \"trix/models/attachment\"\nimport Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\nimport LineBreakInsertion from \"trix/models/line_break_insertion\"\n\nimport {\n  arrayStartsWith,\n  extend,\n  getAllAttributeNames,\n  getBlockConfig,\n  getTextConfig,\n  normalizeRange,\n  objectsAreEqual,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  summarizeArrayChange,\n} from \"trix/core/helpers\"\n\nconst PLACEHOLDER = \" \"\n\nexport default class Composition extends BasicObject {\n  constructor() {\n    super(...arguments)\n    this.document = new Document()\n    this.attachments = []\n    this.currentAttributes = {}\n    this.revision = 0\n  }\n\n  setDocument(document) {\n    if (!document.isEqualTo(this.document)) {\n      this.document = document\n      this.refreshAttachments()\n      this.revision++\n      return this.delegate?.compositionDidChangeDocument?.(document)\n    }\n  }\n\n  // Snapshots\n\n  getSnapshot() {\n    return {\n      document: this.document,\n      selectedRange: this.getSelectedRange(),\n    }\n  }\n\n  loadSnapshot({ document, selectedRange }) {\n    this.delegate?.compositionWillLoadSnapshot?.()\n    this.setDocument(document != null ? document : new Document())\n    this.setSelection(selectedRange != null ? selectedRange : [ 0, 0 ])\n    return this.delegate?.compositionDidLoadSnapshot?.()\n  }\n\n  // Responder protocol\n\n  insertText(text, { updatePosition } = { updatePosition: true }) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertTextAtRange(text, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + text.getLength()\n\n    if (updatePosition) {\n      this.setSelection(endPosition)\n    }\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertBlock(block = new Block()) {\n    const document = new Document([ block ])\n    return this.insertDocument(document)\n  }\n\n  insertDocument(document = new Document()) {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength()\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertString(string, options) {\n    const attributes = this.getCurrentTextAttributes()\n    const text = Text.textForStringWithAttributes(string, attributes)\n    return this.insertText(text, options)\n  }\n\n  insertBlockBreak() {\n    const selectedRange = this.getSelectedRange()\n    this.setDocument(this.document.insertBlockBreakAtRange(selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  insertLineBreak() {\n    const insertion = new LineBreakInsertion(this)\n\n    if (insertion.shouldDecreaseListLevel()) {\n      this.decreaseListLevel()\n      return this.setSelection(insertion.startPosition)\n    } else if (insertion.shouldPrependListItem()) {\n      const document = new Document([ insertion.block.copyWithoutText() ])\n      return this.insertDocument(document)\n    } else if (insertion.shouldInsertBlockBreak()) {\n      return this.insertBlockBreak()\n    } else if (insertion.shouldRemoveLastBlockAttribute()) {\n      return this.removeLastBlockAttribute()\n    } else if (insertion.shouldBreakFormattedBlock()) {\n      return this.breakFormattedBlock(insertion)\n    } else {\n      return this.insertString(\"\\n\")\n    }\n  }\n\n  insertHTML(html) {\n    const document = HTMLParser.parse(html).getDocument()\n    const selectedRange = this.getSelectedRange()\n\n    this.setDocument(this.document.mergeDocumentAtRange(document, selectedRange))\n\n    const startPosition = selectedRange[0]\n    const endPosition = startPosition + document.getLength() - 1\n\n    this.setSelection(endPosition)\n    return this.notifyDelegateOfInsertionAtRange([ startPosition, endPosition ])\n  }\n\n  replaceHTML(html) {\n    const document = HTMLParser.parse(html).getDocument().copyUsingObjectsFromDocument(this.document)\n    const locationRange = this.getLocationRange({ strict: false })\n    const selectedRange = this.document.rangeFromLocationRange(locationRange)\n    this.setDocument(document)\n    return this.setSelection(selectedRange)\n  }\n\n  insertFile(file) {\n    return this.insertFiles([ file ])\n  }\n\n  insertFiles(files) {\n    const attachments = []\n\n    Array.from(files).forEach((file) => {\n      if (this.delegate?.compositionShouldAcceptFile(file)) {\n        const attachment = Attachment.attachmentForFile(file)\n        attachments.push(attachment)\n      }\n    })\n\n    return this.insertAttachments(attachments)\n  }\n\n  insertAttachment(attachment) {\n    return this.insertAttachments([ attachment ])\n  }\n\n  insertAttachments(attachments) {\n    let text = new Text()\n\n    Array.from(attachments).forEach((attachment) => {\n      const type = attachment.getType()\n      const presentation = config.attachments[type]?.presentation\n\n      const attributes = this.getCurrentTextAttributes()\n      if (presentation) {\n        attributes.presentation = presentation\n      }\n\n      const attachmentText = Text.textForAttachmentWithAttributes(attachment, attributes)\n      text = text.appendText(attachmentText)\n    })\n\n    return this.insertText(text)\n  }\n\n  shouldManageDeletingInDirection(direction) {\n    const locationRange = this.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      if (direction === \"backward\" && locationRange[0].offset === 0) {\n        return true\n      }\n      if (this.shouldManageMovingCursorInDirection(direction)) {\n        return true\n      }\n    } else {\n      if (locationRange[0].index !== locationRange[1].index) {\n        return true\n      }\n    }\n    return false\n  }\n\n  deleteInDirection(direction, { length } = {}) {\n    let attachment, deletingIntoPreviousBlock, selectionSpansBlocks\n    const locationRange = this.getLocationRange()\n    let range = this.getSelectedRange()\n    const selectionIsCollapsed = rangeIsCollapsed(range)\n\n    if (selectionIsCollapsed) {\n      deletingIntoPreviousBlock = direction === \"backward\" && locationRange[0].offset === 0\n    } else {\n      selectionSpansBlocks = locationRange[0].index !== locationRange[1].index\n    }\n\n    if (deletingIntoPreviousBlock) {\n      if (this.canDecreaseBlockAttributeLevel()) {\n        const block = this.getBlock()\n\n        if (block.isListItem()) {\n          this.decreaseListLevel()\n        } else {\n          this.decreaseBlockAttributeLevel()\n        }\n\n        this.setSelection(range[0])\n        if (block.isEmpty()) {\n          return false\n        }\n      }\n    }\n\n    if (selectionIsCollapsed) {\n      range = this.getExpandedRangeInDirection(direction, { length })\n      if (direction === \"backward\") {\n        attachment = this.getAttachmentAtRange(range)\n      }\n    }\n\n    if (attachment) {\n      this.editAttachment(attachment)\n      return false\n    } else {\n      this.setDocument(this.document.removeTextAtRange(range))\n      this.setSelection(range[0])\n      if (deletingIntoPreviousBlock || selectionSpansBlocks) {\n        return false\n      }\n    }\n  }\n\n  moveTextFromRange(range) {\n    const [ position ] = Array.from(this.getSelectedRange())\n    this.setDocument(this.document.moveTextFromRangeToPosition(range, position))\n    return this.setSelection(position)\n  }\n\n  removeAttachment(attachment) {\n    const range = this.document.getRangeOfAttachment(attachment)\n    if (range) {\n      this.stopEditingAttachment()\n      this.setDocument(this.document.removeTextAtRange(range))\n      return this.setSelection(range[0])\n    }\n  }\n\n  removeLastBlockAttribute() {\n    const [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    const block = this.document.getBlockAtPosition(endPosition)\n    this.removeCurrentAttribute(block.getLastAttribute())\n    return this.setSelection(startPosition)\n  }\n\n  insertPlaceholder() {\n    this.placeholderPosition = this.getPosition()\n    return this.insertString(PLACEHOLDER)\n  }\n\n  selectPlaceholder() {\n    if (this.placeholderPosition != null) {\n      this.setSelectedRange([ this.placeholderPosition, this.placeholderPosition + PLACEHOLDER.length ])\n      return this.getSelectedRange()\n    }\n  }\n\n  forgetPlaceholder() {\n    this.placeholderPosition = null\n  }\n\n  // Current attributes\n\n  hasCurrentAttribute(attributeName) {\n    const value = this.currentAttributes[attributeName]\n    return value != null && value !== false\n  }\n\n  toggleCurrentAttribute(attributeName) {\n    const value = !this.currentAttributes[attributeName]\n    if (value) {\n      return this.setCurrentAttribute(attributeName, value)\n    } else {\n      return this.removeCurrentAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      return this.canSetCurrentBlockAttribute(attributeName)\n    } else {\n      return this.canSetCurrentTextAttribute(attributeName)\n    }\n  }\n\n  canSetCurrentTextAttribute(attributeName) {\n    const document = this.getSelectedDocument()\n    if (!document) return\n    for (const attachment of Array.from(document.getAttachments())) {\n      if (!attachment.hasContent()) {\n        return false\n      }\n    }\n    return true\n  }\n\n  canSetCurrentBlockAttribute(attributeName) {\n    const block = this.getBlock()\n    if (!block) return\n    return !block.isTerminalBlock()\n  }\n\n  setCurrentAttribute(attributeName, value) {\n    if (getBlockConfig(attributeName)) {\n      return this.setBlockAttribute(attributeName, value)\n    } else {\n      this.setTextAttribute(attributeName, value)\n      this.currentAttributes[attributeName] = value\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  setHTMLAtributeAtPosition(position, attributeName, value) {\n    const block = this.document.getBlockAtPosition(position)\n    const allowedHTMLAttributes = getBlockConfig(block.getLastAttribute())?.htmlAttributes\n\n    if (block && allowedHTMLAttributes?.includes(attributeName)) {\n      const newDocument = this.document.setHTMLAttributeAtPosition(position, attributeName, value)\n      this.setDocument(newDocument)\n    }\n  }\n\n  setTextAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n\n    const [ startPosition, endPosition ] = Array.from(selectedRange)\n    if (startPosition === endPosition) {\n      if (attributeName === \"href\") {\n        const text = Text.textForStringWithAttributes(value, { href: value })\n        return this.insertText(text)\n      }\n    } else {\n      return this.setDocument(this.document.addAttributeAtRange(attributeName, value, selectedRange))\n    }\n  }\n\n  setBlockAttribute(attributeName, value) {\n    const selectedRange = this.getSelectedRange()\n    if (this.canSetCurrentAttribute(attributeName)) {\n      this.setDocument(this.document.applyBlockAttributeAtRange(attributeName, value, selectedRange))\n      return this.setSelection(selectedRange)\n    }\n  }\n\n  removeCurrentAttribute(attributeName) {\n    if (getBlockConfig(attributeName)) {\n      this.removeBlockAttribute(attributeName)\n      return this.updateCurrentAttributes()\n    } else {\n      this.removeTextAttribute(attributeName)\n      delete this.currentAttributes[attributeName]\n      return this.notifyDelegateOfCurrentAttributesChange()\n    }\n  }\n\n  removeTextAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  removeBlockAttribute(attributeName) {\n    const selectedRange = this.getSelectedRange()\n    if (!selectedRange) return\n    return this.setDocument(this.document.removeAttributeAtRange(attributeName, selectedRange))\n  }\n\n  canDecreaseNestingLevel() {\n    return this.getBlock()?.getNestingLevel() > 0\n  }\n\n  canIncreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    if (getBlockConfig(block.getLastNestableAttribute())?.listAttribute) {\n      const previousBlock = this.getPreviousBlock()\n      if (previousBlock) {\n        return arrayStartsWith(previousBlock.getListItemAttributes(), block.getListItemAttributes())\n      }\n    } else {\n      return block.getNestingLevel() > 0\n    }\n  }\n\n  decreaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.decreaseNestingLevel()))\n  }\n\n  increaseNestingLevel() {\n    const block = this.getBlock()\n    if (!block) return\n    return this.setDocument(this.document.replaceBlock(block, block.increaseNestingLevel()))\n  }\n\n  canDecreaseBlockAttributeLevel() {\n    return this.getBlock()?.getAttributeLevel() > 0\n  }\n\n  decreaseBlockAttributeLevel() {\n    const attribute = this.getBlock()?.getLastAttribute()\n    if (attribute) {\n      return this.removeCurrentAttribute(attribute)\n    }\n  }\n\n  decreaseListLevel() {\n    let [ startPosition ] = Array.from(this.getSelectedRange())\n    const { index } = this.document.locationFromPosition(startPosition)\n    let endIndex = index\n    const attributeLevel = this.getBlock().getAttributeLevel()\n\n    let block = this.document.getBlockAtIndex(endIndex + 1)\n    while (block) {\n      if (!block.isListItem() || block.getAttributeLevel() <= attributeLevel) {\n        break\n      }\n      endIndex++\n      block = this.document.getBlockAtIndex(endIndex + 1)\n    }\n\n    startPosition = this.document.positionFromLocation({ index, offset: 0 })\n    const endPosition = this.document.positionFromLocation({ index: endIndex, offset: 0 })\n    return this.setDocument(this.document.removeLastListAttributeAtRange([ startPosition, endPosition ]))\n  }\n\n  updateCurrentAttributes() {\n    const selectedRange = this.getSelectedRange({ ignoreLock: true })\n    if (selectedRange) {\n      const currentAttributes = this.document.getCommonAttributesAtRange(selectedRange)\n\n      Array.from(getAllAttributeNames()).forEach((attributeName) => {\n        if (!currentAttributes[attributeName]) {\n          if (!this.canSetCurrentAttribute(attributeName)) {\n            currentAttributes[attributeName] = false\n          }\n        }\n      })\n\n      if (!objectsAreEqual(currentAttributes, this.currentAttributes)) {\n        this.currentAttributes = currentAttributes\n        return this.notifyDelegateOfCurrentAttributesChange()\n      }\n    }\n  }\n\n  getCurrentAttributes() {\n    return extend.call({}, this.currentAttributes)\n  }\n\n  getCurrentTextAttributes() {\n    const attributes = {}\n    for (const key in this.currentAttributes) {\n      const value = this.currentAttributes[key]\n      if (value !== false) {\n        if (getTextConfig(key)) {\n          attributes[key] = value\n        }\n      }\n    }\n    return attributes\n  }\n\n  // Selection freezing\n\n  freezeSelection() {\n    return this.setCurrentAttribute(\"frozen\", true)\n  }\n\n  thawSelection() {\n    return this.removeCurrentAttribute(\"frozen\")\n  }\n\n  hasFrozenSelection() {\n    return this.hasCurrentAttribute(\"frozen\")\n  }\n\n  setSelection(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.delegate?.compositionDidRequestChangingSelectionToLocationRange(locationRange)\n  }\n\n  getSelectedRange() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.rangeFromLocationRange(locationRange)\n    }\n  }\n\n  setSelectedRange(selectedRange) {\n    const locationRange = this.document.locationRangeFromRange(selectedRange)\n    return this.getSelectionManager().setLocationRange(locationRange)\n  }\n\n  getPosition() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.positionFromLocation(locationRange[0])\n    }\n  }\n\n  getLocationRange(options) {\n    if (this.targetLocationRange) {\n      return this.targetLocationRange\n    } else {\n      return this.getSelectionManager().getLocationRange(options) || normalizeRange({ index: 0, offset: 0 })\n    }\n  }\n\n  withTargetLocationRange(locationRange, fn) {\n    let result\n    this.targetLocationRange = locationRange\n    try {\n      result = fn()\n    } finally {\n      this.targetLocationRange = null\n    }\n    return result\n  }\n\n  withTargetRange(range, fn) {\n    const locationRange = this.document.locationRangeFromRange(range)\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  withTargetDOMRange(domRange, fn) {\n    const locationRange = this.createLocationRangeFromDOMRange(domRange, { strict: false })\n    return this.withTargetLocationRange(locationRange, fn)\n  }\n\n  getExpandedRangeInDirection(direction, { length } = {}) {\n    let [ startPosition, endPosition ] = Array.from(this.getSelectedRange())\n    if (direction === \"backward\") {\n      if (length) {\n        startPosition -= length\n      } else {\n        startPosition = this.translateUTF16PositionFromOffset(startPosition, -1)\n      }\n    } else {\n      if (length) {\n        endPosition += length\n      } else {\n        endPosition = this.translateUTF16PositionFromOffset(endPosition, 1)\n      }\n    }\n    return normalizeRange([ startPosition, endPosition ])\n  }\n\n  shouldManageMovingCursorInDirection(direction) {\n    if (this.editingAttachment) {\n      return true\n    }\n    const range = this.getExpandedRangeInDirection(direction)\n    return this.getAttachmentAtRange(range) != null\n  }\n\n  moveCursorInDirection(direction) {\n    let canEditAttachment, range\n    if (this.editingAttachment) {\n      range = this.document.getRangeOfAttachment(this.editingAttachment)\n    } else {\n      const selectedRange = this.getSelectedRange()\n      range = this.getExpandedRangeInDirection(direction)\n      canEditAttachment = !rangesAreEqual(selectedRange, range)\n    }\n\n    if (direction === \"backward\") {\n      this.setSelectedRange(range[0])\n    } else {\n      this.setSelectedRange(range[1])\n    }\n\n    if (canEditAttachment) {\n      const attachment = this.getAttachmentAtRange(range)\n      if (attachment) {\n        return this.editAttachment(attachment)\n      }\n    }\n  }\n\n  expandSelectionInDirection(direction, { length } = {}) {\n    const range = this.getExpandedRangeInDirection(direction, { length })\n    return this.setSelectedRange(range)\n  }\n\n  expandSelectionForEditing() {\n    if (this.hasCurrentAttribute(\"href\")) {\n      return this.expandSelectionAroundCommonAttribute(\"href\")\n    }\n  }\n\n  expandSelectionAroundCommonAttribute(attributeName) {\n    const position = this.getPosition()\n    const range = this.document.getRangeOfCommonAttributeAtPosition(attributeName, position)\n    return this.setSelectedRange(range)\n  }\n\n  selectionContainsAttachments() {\n    return this.getSelectedAttachments()?.length > 0\n  }\n\n  selectionIsInCursorTarget() {\n    return this.editingAttachment || this.positionIsCursorTarget(this.getPosition())\n  }\n\n  positionIsCursorTarget(position) {\n    const location = this.document.locationFromPosition(position)\n    if (location) {\n      return this.locationIsCursorTarget(location)\n    }\n  }\n\n  positionIsBlockBreak(position) {\n    return this.document.getPieceAtPosition(position)?.isBlockBreak()\n  }\n\n  getSelectedDocument() {\n    const selectedRange = this.getSelectedRange()\n    if (selectedRange) {\n      return this.document.getDocumentAtRange(selectedRange)\n    }\n  }\n\n  getSelectedAttachments() {\n    return this.getSelectedDocument()?.getAttachments()\n  }\n\n  // Attachments\n\n  getAttachments() {\n    return this.attachments.slice(0)\n  }\n\n  refreshAttachments() {\n    const attachments = this.document.getAttachments()\n    const { added, removed } = summarizeArrayChange(this.attachments, attachments)\n    this.attachments = attachments\n\n    Array.from(removed).forEach((attachment) => {\n      attachment.delegate = null\n      this.delegate?.compositionDidRemoveAttachment?.(attachment)\n    })\n\n    return (() => {\n      const result = []\n\n      Array.from(added).forEach((attachment) => {\n        attachment.delegate = this\n        result.push(this.delegate?.compositionDidAddAttachment?.(attachment))\n      })\n\n      return result\n    })()\n  }\n\n  // Attachment delegate\n\n  attachmentDidChangeAttributes(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidEditAttachment?.(attachment)\n  }\n\n  attachmentDidChangePreviewURL(attachment) {\n    this.revision++\n    return this.delegate?.compositionDidChangeAttachmentPreviewURL?.(attachment)\n  }\n\n  // Attachment editing\n\n  editAttachment(attachment, options) {\n    if (attachment === this.editingAttachment) return\n    this.stopEditingAttachment()\n    this.editingAttachment = attachment\n    return this.delegate?.compositionDidStartEditingAttachment?.(this.editingAttachment, options)\n  }\n\n  stopEditingAttachment() {\n    if (!this.editingAttachment) return\n    this.delegate?.compositionDidStopEditingAttachment?.(this.editingAttachment)\n    this.editingAttachment = null\n  }\n\n  updateAttributesForAttachment(attributes, attachment) {\n    return this.setDocument(this.document.updateAttributesForAttachment(attributes, attachment))\n  }\n\n  removeAttributeForAttachment(attribute, attachment) {\n    return this.setDocument(this.document.removeAttributeForAttachment(attribute, attachment))\n  }\n\n  // Private\n\n  breakFormattedBlock(insertion) {\n    let { document } = insertion\n    const { block } = insertion\n    let position = insertion.startPosition\n    let range = [ position - 1, position ]\n\n    if (block.getBlockBreakPosition() === insertion.startLocation.offset) {\n      if (block.breaksOnReturn() && insertion.nextCharacter === \"\\n\") {\n        position += 1\n      } else {\n        document = document.removeTextAtRange(range)\n      }\n      range = [ position, position ]\n    } else if (insertion.nextCharacter === \"\\n\") {\n      if (insertion.previousCharacter === \"\\n\") {\n        range = [ position - 1, position + 1 ]\n      } else {\n        range = [ position, position + 1 ]\n        position += 1\n      }\n    } else if (insertion.startLocation.offset - 1 !== 0) {\n      position += 1\n    }\n\n    const newDocument = new Document([ block.removeLastAttribute().copyWithoutText() ])\n    this.setDocument(document.insertDocumentAtRange(newDocument, range))\n    return this.setSelection(position)\n  }\n\n  getPreviousBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      const { index } = locationRange[0]\n      if (index > 0) {\n        return this.document.getBlockAtIndex(index - 1)\n      }\n    }\n  }\n\n  getBlock() {\n    const locationRange = this.getLocationRange()\n    if (locationRange) {\n      return this.document.getBlockAtIndex(locationRange[0].index)\n    }\n  }\n\n  getAttachmentAtRange(range) {\n    const document = this.document.getDocumentAtRange(range)\n    if (document.toString() === `${OBJECT_REPLACEMENT_CHARACTER}\\n`) {\n      return document.getAttachments()[0]\n    }\n  }\n\n  notifyDelegateOfCurrentAttributesChange() {\n    return this.delegate?.compositionDidChangeCurrentAttributes?.(this.currentAttributes)\n  }\n\n  notifyDelegateOfInsertionAtRange(range) {\n    return this.delegate?.compositionDidPerformInsertionAtRange?.(range)\n  }\n\n  translateUTF16PositionFromOffset(position, offset) {\n    const utf16string = this.document.toUTF16String()\n    const utf16position = utf16string.offsetFromUCS2Offset(position)\n    return utf16string.offsetToUCS2Offset(utf16position + offset)\n  }\n}\n\nComposition.proxyMethod(\"getSelectionManager().getPointRange\")\nComposition.proxyMethod(\"getSelectionManager().setLocationRangeFromPointRange\")\nComposition.proxyMethod(\"getSelectionManager().createLocationRangeFromDOMRange\")\nComposition.proxyMethod(\"getSelectionManager().locationIsCursorTarget\")\nComposition.proxyMethod(\"getSelectionManager().selectionIsExpanded\")\nComposition.proxyMethod(\"delegate?.getSelectionManager\")\n", "import BasicObject from \"trix/core/basic_object\"\n\nexport default class UndoManager extends BasicObject {\n  constructor(composition) {\n    super(...arguments)\n    this.composition = composition\n    this.undoEntries = []\n    this.redoEntries = []\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    const previousEntry = this.undoEntries.slice(-1)[0]\n\n    if (!consolidatable || !entryHasDescriptionAndContext(previousEntry, description, context)) {\n      const undoEntry = this.createEntry({ description, context })\n      this.undoEntries.push(undoEntry)\n      this.redoEntries = []\n    }\n  }\n\n  undo() {\n    const undoEntry = this.undoEntries.pop()\n    if (undoEntry) {\n      const redoEntry = this.createEntry(undoEntry)\n      this.redoEntries.push(redoEntry)\n      return this.composition.loadSnapshot(undoEntry.snapshot)\n    }\n  }\n\n  redo() {\n    const redoEntry = this.redoEntries.pop()\n    if (redoEntry) {\n      const undoEntry = this.createEntry(redoEntry)\n      this.undoEntries.push(undoEntry)\n      return this.composition.loadSnapshot(redoEntry.snapshot)\n    }\n  }\n\n  canUndo() {\n    return this.undoEntries.length > 0\n  }\n\n  canRedo() {\n    return this.redoEntries.length > 0\n  }\n\n  // Private\n\n  createEntry({ description, context } = {}) {\n    return {\n      description: description?.toString(),\n      context: JSON.stringify(context),\n      snapshot: this.composition.getSnapshot(),\n    }\n  }\n}\n\nconst entryHasDescriptionAndContext = (entry, description, context) =>\n  entry?.description === description?.toString() && entry?.context === JSON.stringify(context)\n", "const BLOCK_ATTRIBUTE_NAME = \"attachmentGallery\"\nconst TEXT_ATTRIBUTE_NAME = \"presentation\"\nconst TEXT_ATTRIBUTE_VALUE = \"gallery\"\n\nexport default class Filter {\n  constructor(snapshot) {\n    this.document = snapshot.document\n    this.selectedRange = snapshot.selectedRange\n  }\n\n  perform() {\n    this.removeBlockAttribute()\n    return this.applyBlockAttribute()\n  }\n\n  getSnapshot() {\n    return { document: this.document, selectedRange: this.selectedRange }\n  }\n\n  // Private\n\n  removeBlockAttribute() {\n    return this.findRangesOfBlocks().map((range) => this.document = this.document.removeAttributeAtRange(BLOCK_ATTRIBUTE_NAME, range))\n  }\n\n  applyBlockAttribute() {\n    let offset = 0\n\n    this.findRangesOfPieces().forEach((range) => {\n      if (range[1] - range[0] > 1) {\n        range[0] += offset\n        range[1] += offset\n\n        if (this.document.getCharacterAtPosition(range[1]) !== \"\\n\") {\n          this.document = this.document.insertBlockBreakAtRange(range[1])\n          if (range[1] < this.selectedRange[1]) {\n            this.moveSelectedRangeForward()\n          }\n          range[1]++\n          offset++\n        }\n\n        if (range[0] !== 0) {\n          if (this.document.getCharacterAtPosition(range[0] - 1) !== \"\\n\") {\n            this.document = this.document.insertBlockBreakAtRange(range[0])\n            if (range[0] < this.selectedRange[0]) {\n              this.moveSelectedRangeForward()\n            }\n            range[0]++\n            offset++\n          }\n        }\n\n        this.document = this.document.applyBlockAttributeAtRange(BLOCK_ATTRIBUTE_NAME, true, range)\n      }\n    })\n  }\n\n  findRangesOfBlocks() {\n    return this.document.findRangesForBlockAttribute(BLOCK_ATTRIBUTE_NAME)\n  }\n\n  findRangesOfPieces() {\n    return this.document.findRangesForTextAttribute(TEXT_ATTRIBUTE_NAME, { withValue: TEXT_ATTRIBUTE_VALUE })\n  }\n\n  moveSelectedRangeForward() {\n    this.selectedRange[0] += 1\n    this.selectedRange[1] += 1\n  }\n}\n", "import Filter from \"./filter\"\n\nexport const attachmentGalleryFilter = function(snapshot) {\n  const filter = new Filter(snapshot)\n  filter.perform()\n  return filter.getSnapshot()\n}\n\n", "import Document from \"trix/models/document\"\nimport HTMLParser from \"trix/models/html_parser\"\n\nimport UndoManager from \"trix/models/undo_manager\"\nimport { attachmentGalleryFilter } from \"trix/filters/attachment_gallery_filter\"\nconst DEFAULT_FILTERS = [ attachmentGalleryFilter ]\n\nexport default class Editor {\n  constructor(composition, selectionManager, element) {\n    this.insertFiles = this.insertFiles.bind(this)\n    this.composition = composition\n    this.selectionManager = selectionManager\n    this.element = element\n    this.undoManager = new UndoManager(this.composition)\n    this.filters = DEFAULT_FILTERS.slice(0)\n  }\n\n  loadDocument(document) {\n    return this.loadSnapshot({ document, selectedRange: [ 0, 0 ] })\n  }\n\n  loadHTML(html = \"\") {\n    const document = HTMLParser.parse(html, { referenceElement: this.element }).getDocument()\n    return this.loadDocument(document)\n  }\n\n  loadJSON({ document, selectedRange }) {\n    document = Document.fromJSON(document)\n    return this.loadSnapshot({ document, selectedRange })\n  }\n\n  loadSnapshot(snapshot) {\n    this.undoManager = new UndoManager(this.composition)\n    return this.composition.loadSnapshot(snapshot)\n  }\n\n  getDocument() {\n    return this.composition.document\n  }\n\n  getSelectedDocument() {\n    return this.composition.getSelectedDocument()\n  }\n\n  getSnapshot() {\n    return this.composition.getSnapshot()\n  }\n\n  toJSON() {\n    return this.getSnapshot()\n  }\n\n  // Document manipulation\n\n  deleteInDirection(direction) {\n    return this.composition.deleteInDirection(direction)\n  }\n\n  insertAttachment(attachment) {\n    return this.composition.insertAttachment(attachment)\n  }\n\n  insertAttachments(attachments) {\n    return this.composition.insertAttachments(attachments)\n  }\n\n  insertDocument(document) {\n    return this.composition.insertDocument(document)\n  }\n\n  insertFile(file) {\n    return this.composition.insertFile(file)\n  }\n\n  insertFiles(files) {\n    return this.composition.insertFiles(files)\n  }\n\n  insertHTML(html) {\n    return this.composition.insertHTML(html)\n  }\n\n  insertString(string) {\n    return this.composition.insertString(string)\n  }\n\n  insertText(text) {\n    return this.composition.insertText(text)\n  }\n\n  insertLineBreak() {\n    return this.composition.insertLineBreak()\n  }\n\n  // Selection\n\n  getSelectedRange() {\n    return this.composition.getSelectedRange()\n  }\n\n  getPosition() {\n    return this.composition.getPosition()\n  }\n\n  getClientRectAtPosition(position) {\n    const locationRange = this.getDocument().locationRangeFromRange([ position, position + 1 ])\n    return this.selectionManager.getClientRectAtLocationRange(locationRange)\n  }\n\n  expandSelectionInDirection(direction) {\n    return this.composition.expandSelectionInDirection(direction)\n  }\n\n  moveCursorInDirection(direction) {\n    return this.composition.moveCursorInDirection(direction)\n  }\n\n  setSelectedRange(selectedRange) {\n    return this.composition.setSelectedRange(selectedRange)\n  }\n\n  // Attributes\n\n  activateAttribute(name, value = true) {\n    return this.composition.setCurrentAttribute(name, value)\n  }\n\n  attributeIsActive(name) {\n    return this.composition.hasCurrentAttribute(name)\n  }\n\n  canActivateAttribute(name) {\n    return this.composition.canSetCurrentAttribute(name)\n  }\n\n  deactivateAttribute(name) {\n    return this.composition.removeCurrentAttribute(name)\n  }\n\n  // HTML attributes\n  setHTMLAtributeAtPosition(position, name, value) {\n    this.composition.setHTMLAtributeAtPosition(position, name, value)\n  }\n\n  // Nesting level\n\n  canDecreaseNestingLevel() {\n    return this.composition.canDecreaseNestingLevel()\n  }\n\n  canIncreaseNestingLevel() {\n    return this.composition.canIncreaseNestingLevel()\n  }\n\n  decreaseNestingLevel() {\n    if (this.canDecreaseNestingLevel()) {\n      return this.composition.decreaseNestingLevel()\n    }\n  }\n\n  increaseNestingLevel() {\n    if (this.canIncreaseNestingLevel()) {\n      return this.composition.increaseNestingLevel()\n    }\n  }\n\n  // Undo/redo\n\n  canRedo() {\n    return this.undoManager.canRedo()\n  }\n\n  canUndo() {\n    return this.undoManager.canUndo()\n  }\n\n  recordUndoEntry(description, { context, consolidatable } = {}) {\n    return this.undoManager.recordUndoEntry(description, { context, consolidatable })\n  }\n\n  redo() {\n    if (this.canRedo()) {\n      return this.undoManager.redo()\n    }\n  }\n\n  undo() {\n    if (this.canUndo()) {\n      return this.undoManager.undo()\n    }\n  }\n}\n", "/* eslint-disable\n    no-var,\n    prefer-const,\n*/\nimport {\n  elementContainsNode,\n  findChildIndexOfNode,\n  nodeIsAttachmentElement,\n  nodeIsBlockContainer,\n  nodeIsBlockStart,\n  nodeIsBlockStartComment,\n  nodeIsCursorTarget,\n  nodeIsEmptyTextNode,\n  nodeIsTextNode,\n  tagName,\n  walkTree,\n} from \"trix/core/helpers\"\n\nexport default class LocationMapper {\n  constructor(element) {\n    this.element = element\n  }\n\n  findLocationFromContainerAndOffset(container, offset, { strict } = { strict: true }) {\n    let childIndex = 0\n    let foundBlock = false\n    const location = { index: 0, offset: 0 }\n    const attachmentElement = this.findAttachmentElementParentForNode(container)\n\n    if (attachmentElement) {\n      container = attachmentElement.parentNode\n      offset = findChildIndexOfNode(attachmentElement)\n    }\n\n    const walker = walkTree(this.element, { usingFilter: rejectAttachmentContents })\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n\n      if (node === container && nodeIsTextNode(container)) {\n        if (!nodeIsCursorTarget(node)) {\n          location.offset += offset\n        }\n        break\n      } else {\n        if (node.parentNode === container) {\n          if (childIndex++ === offset) {\n            break\n          }\n        } else if (!elementContainsNode(container, node)) {\n          if (childIndex > 0) {\n            break\n          }\n        }\n\n        if (nodeIsBlockStart(node, { strict })) {\n          if (foundBlock) {\n            location.index++\n          }\n          location.offset = 0\n          foundBlock = true\n        } else {\n          location.offset += nodeLength(node)\n        }\n      }\n    }\n\n    return location\n  }\n\n  findContainerAndOffsetFromLocation(location) {\n    let container, offset\n    if (location.index === 0 && location.offset === 0) {\n      container = this.element\n      offset = 0\n\n      while (container.firstChild) {\n        container = container.firstChild\n        if (nodeIsBlockContainer(container)) {\n          offset = 1\n          break\n        }\n      }\n\n      return [ container, offset ]\n    }\n\n    let [ node, nodeOffset ] = this.findNodeAndOffsetFromLocation(location)\n    if (!node) return\n\n    if (nodeIsTextNode(node)) {\n      if (nodeLength(node) === 0) {\n        container = node.parentNode.parentNode\n        offset = findChildIndexOfNode(node.parentNode)\n        if (nodeIsCursorTarget(node, { name: \"right\" })) {\n          offset++\n        }\n      } else {\n        container = node\n        offset = location.offset - nodeOffset\n      }\n    } else {\n      container = node.parentNode\n\n      if (!nodeIsBlockStart(node.previousSibling)) {\n        if (!nodeIsBlockContainer(container)) {\n          while (node === container.lastChild) {\n            node = container\n            container = container.parentNode\n            if (nodeIsBlockContainer(container)) {\n              break\n            }\n          }\n        }\n      }\n\n      offset = findChildIndexOfNode(node)\n      if (location.offset !== 0) {\n        offset++\n      }\n    }\n\n    return [ container, offset ]\n  }\n\n  findNodeAndOffsetFromLocation(location) {\n    let node, nodeOffset\n    let offset = 0\n\n    for (const currentNode of this.getSignificantNodesForIndex(location.index)) {\n      const length = nodeLength(currentNode)\n\n      if (location.offset <= offset + length) {\n        if (nodeIsTextNode(currentNode)) {\n          node = currentNode\n          nodeOffset = offset\n          if (location.offset === nodeOffset && nodeIsCursorTarget(node)) {\n            break\n          }\n        } else if (!node) {\n          node = currentNode\n          nodeOffset = offset\n        }\n      }\n\n      offset += length\n      if (offset > location.offset) {\n        break\n      }\n    }\n\n    return [ node, nodeOffset ]\n  }\n\n  // Private\n\n  findAttachmentElementParentForNode(node) {\n    while (node && node !== this.element) {\n      if (nodeIsAttachmentElement(node)) {\n        return node\n      }\n      node = node.parentNode\n    }\n  }\n\n  getSignificantNodesForIndex(index) {\n    const nodes = []\n    const walker = walkTree(this.element, { usingFilter: acceptSignificantNodes })\n    let recordingNodes = false\n\n    while (walker.nextNode()) {\n      const node = walker.currentNode\n      if (nodeIsBlockStartComment(node)) {\n        var blockIndex\n        if (blockIndex != null) {\n          blockIndex++\n        } else {\n          blockIndex = 0\n        }\n\n        if (blockIndex === index) {\n          recordingNodes = true\n        } else if (recordingNodes) {\n          break\n        }\n      } else if (recordingNodes) {\n        nodes.push(node)\n      }\n    }\n\n    return nodes\n  }\n}\n\nconst nodeLength = function(node) {\n  if (node.nodeType === Node.TEXT_NODE) {\n    if (nodeIsCursorTarget(node)) {\n      return 0\n    } else {\n      const string = node.textContent\n      return string.length\n    }\n  } else if (tagName(node) === \"br\" || nodeIsAttachmentElement(node)) {\n    return 1\n  } else {\n    return 0\n  }\n}\n\nconst acceptSignificantNodes = function(node) {\n  if (rejectEmptyTextNodes(node) === NodeFilter.FILTER_ACCEPT) {\n    return rejectAttachmentContents(node)\n  } else {\n    return NodeFilter.FILTER_REJECT\n  }\n}\n\nconst rejectEmptyTextNodes = function(node) {\n  if (nodeIsEmptyTextNode(node)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n\nconst rejectAttachmentContents = function(node) {\n  if (nodeIsAttachmentElement(node.parentNode)) {\n    return NodeFilter.FILTER_REJECT\n  } else {\n    return NodeFilter.FILTER_ACCEPT\n  }\n}\n", "/* eslint-disable\n    id-length,\n    no-empty,\n*/\nimport { getDOMRange, setDOMRange } from \"trix/core/helpers\"\n\nexport default class PointMapper {\n  createDOMRangeFromPoint({ x, y }) {\n    let domRange\n    if (document.caretPositionFromPoint) {\n      const { offsetNode, offset } = document.caretPositionFromPoint(x, y)\n      domRange = document.createRange()\n      domRange.setStart(offsetNode, offset)\n      return domRange\n    } else if (document.caretRangeFromPoint) {\n      return document.caretRangeFromPoint(x, y)\n    } else if (document.body.createTextRange) {\n      const originalDOMRange = getDOMRange()\n      try {\n        // IE 11 throws \"Unspecified error\" when using moveToPoint\n        // during a drag-and-drop operation.\n        const textRange = document.body.createTextRange()\n        textRange.moveToPoint(x, y)\n        textRange.select()\n      } catch (error) {}\n      domRange = getDOMRange()\n      setDOMRange(originalDOMRange)\n      return domRange\n    }\n  }\n\n  getClientRectsForDOMRange(domRange) {\n    const array = Array.from(domRange.getClientRects())\n    const start = array[0]\n    const end = array[array.length - 1]\n\n    return [ start, end ]\n  }\n}\n", "/* eslint-disable\n*/\nimport BasicObject from \"trix/core/basic_object\"\n\nimport LocationMapper from \"trix/models/location_mapper\"\nimport PointMapper from \"trix/models/point_mapper\"\n\nimport {\n  elementContainsNode,\n  getDOMRange,\n  getDOMSelection,\n  handleEvent,\n  innerElementIsActive,\n  nodeIsCursorTarget,\n  normalizeRange,\n  rangeIsCollapsed,\n  rangesAreEqual,\n  setDOMRange,\n} from \"trix/core/helpers\"\n\nexport default class SelectionManager extends BasicObject {\n  constructor(element) {\n    super(...arguments)\n    this.didMouseDown = this.didMouseDown.bind(this)\n    this.selectionDidChange = this.selectionDidChange.bind(this)\n    this.element = element\n    this.locationMapper = new LocationMapper(this.element)\n    this.pointMapper = new PointMapper()\n    this.lockCount = 0\n    handleEvent(\"mousedown\", { onElement: this.element, withCallback: this.didMouseDown })\n  }\n\n  getLocationRange(options = {}) {\n    if (options.strict === false) {\n      return this.createLocationRangeFromDOMRange(getDOMRange())\n    } else if (options.ignoreLock) {\n      return this.currentLocationRange\n    } else if (this.lockedLocationRange) {\n      return this.lockedLocationRange\n    } else {\n      return this.currentLocationRange\n    }\n  }\n\n  setLocationRange(locationRange) {\n    if (this.lockedLocationRange) return\n    locationRange = normalizeRange(locationRange)\n\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      setDOMRange(domRange)\n      this.updateCurrentLocationRange(locationRange)\n    }\n  }\n\n  setLocationRangeFromPointRange(pointRange) {\n    pointRange = normalizeRange(pointRange)\n    const startLocation = this.getLocationAtPoint(pointRange[0])\n    const endLocation = this.getLocationAtPoint(pointRange[1])\n    this.setLocationRange([ startLocation, endLocation ])\n  }\n\n  getClientRectAtLocationRange(locationRange) {\n    const domRange = this.createDOMRangeFromLocationRange(locationRange)\n    if (domRange) {\n      return this.getClientRectsForDOMRange(domRange)[1]\n    }\n  }\n\n  locationIsCursorTarget(location) {\n    const node = Array.from(this.findNodeAndOffsetFromLocation(location))[0]\n    return nodeIsCursorTarget(node)\n  }\n\n  lock() {\n    if (this.lockCount++ === 0) {\n      this.updateCurrentLocationRange()\n      this.lockedLocationRange = this.getLocationRange()\n    }\n  }\n\n  unlock() {\n    if (--this.lockCount === 0) {\n      const { lockedLocationRange } = this\n      this.lockedLocationRange = null\n      if (lockedLocationRange != null) {\n        return this.setLocationRange(lockedLocationRange)\n      }\n    }\n  }\n\n  clearSelection() {\n    return getDOMSelection()?.removeAllRanges()\n  }\n\n  selectionIsCollapsed() {\n    return getDOMRange()?.collapsed === true\n  }\n\n  selectionIsExpanded() {\n    return !this.selectionIsCollapsed()\n  }\n\n  createLocationRangeFromDOMRange(domRange, options) {\n    if (domRange == null || !this.domRangeWithinElement(domRange)) return\n\n    const start = this.findLocationFromContainerAndOffset(domRange.startContainer, domRange.startOffset, options)\n    if (!start) return\n\n    const end = domRange.collapsed\n      ? undefined\n      : this.findLocationFromContainerAndOffset(domRange.endContainer, domRange.endOffset, options)\n\n    return normalizeRange([ start, end ])\n  }\n\n  didMouseDown() {\n    return this.pauseTemporarily()\n  }\n\n  pauseTemporarily() {\n    let resumeHandlers\n    this.paused = true\n\n    const resume = () => {\n      this.paused = false\n      clearTimeout(resumeTimeout)\n\n      Array.from(resumeHandlers).forEach((handler) => {\n        handler.destroy()\n      })\n\n      if (elementContainsNode(document, this.element)) {\n        return this.selectionDidChange()\n      }\n    }\n\n    const resumeTimeout = setTimeout(resume, 200)\n\n    resumeHandlers = [ \"mousemove\", \"keydown\" ].map((eventName) =>\n      handleEvent(eventName, { onElement: document, withCallback: resume })\n    )\n  }\n\n  selectionDidChange() {\n    if (!this.paused && !innerElementIsActive(this.element)) {\n      return this.updateCurrentLocationRange()\n    }\n  }\n\n  updateCurrentLocationRange(locationRange) {\n    if (locationRange != null ? locationRange : locationRange = this.createLocationRangeFromDOMRange(getDOMRange())) {\n      if (!rangesAreEqual(locationRange, this.currentLocationRange)) {\n        this.currentLocationRange = locationRange\n        return this.delegate?.locationRangeDidChange?.(this.currentLocationRange.slice(0))\n      }\n    }\n  }\n\n  createDOMRangeFromLocationRange(locationRange) {\n    const rangeStart = this.findContainerAndOffsetFromLocation(locationRange[0])\n    const rangeEnd = rangeIsCollapsed(locationRange)\n      ? rangeStart\n      : this.findContainerAndOffsetFromLocation(locationRange[1]) || rangeStart\n\n    if (rangeStart != null && rangeEnd != null) {\n      const domRange = document.createRange()\n      domRange.setStart(...Array.from(rangeStart || []))\n      domRange.setEnd(...Array.from(rangeEnd || []))\n      return domRange\n    }\n  }\n\n  getLocationAtPoint(point) {\n    const domRange = this.createDOMRangeFromPoint(point)\n    if (domRange) {\n      return this.createLocationRangeFromDOMRange(domRange)?.[0]\n    }\n  }\n\n  domRangeWithinElement(domRange) {\n    if (domRange.collapsed) {\n      return elementContainsNode(this.element, domRange.startContainer)\n    } else {\n      return (\n        elementContainsNode(this.element, domRange.startContainer) &&\n        elementContainsNode(this.element, domRange.endContainer)\n      )\n    }\n  }\n}\n\nSelectionManager.proxyMethod(\"locationMapper.findLocationFromContainerAndOffset\")\nSelectionManager.proxyMethod(\"locationMapper.findContainerAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"locationMapper.findNodeAndOffsetFromLocation\")\nSelectionManager.proxyMethod(\"pointMapper.createDOMRangeFromPoint\")\nSelectionManager.proxyMethod(\"pointMapper.getClientRectsForDOMRange\")\n\n", "import { removeNode } from \"trix/core/helpers\"\n\nimport * as config from \"trix/config\"\nimport BasicObject from \"trix/core/basic_object\"\n\nimport { defer, handleEvent, makeElement, tagName, triggerEvent } from \"trix/core/helpers\"\nconst { lang, css, keyNames } = config\n\nconst undoable = function(fn) {\n  return function() {\n    const commands = fn.apply(this, arguments)\n    commands.do()\n    if (!this.undos) {\n      this.undos = []\n    }\n    this.undos.push(commands.undo)\n  }\n}\n\nexport default class AttachmentEditorController extends BasicObject {\n  constructor(attachmentPiece, element, container, options = {}) {\n    super(...arguments)\n    this.didClickToolbar = this.didClickToolbar.bind(this)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didKeyDownCaption = this.didKeyDownCaption.bind(this)\n    this.didInputCaption = this.didInputCaption.bind(this)\n    this.didChangeCaption = this.didChangeCaption.bind(this)\n    this.didBlurCaption = this.didBlurCaption.bind(this)\n    this.attachmentPiece = attachmentPiece\n    this.element = element\n    this.container = container\n    this.options = options\n    this.attachment = this.attachmentPiece.attachment\n    if (tagName(this.element) === \"a\") {\n      this.element = this.element.firstChild\n    }\n    this.install()\n  }\n\n  install() {\n    this.makeElementMutable()\n    this.addToolbar()\n    if (this.attachment.isPreviewable()) {\n      this.installCaptionEditor()\n    }\n  }\n\n  uninstall() {\n    let undo = this.undos.pop()\n    this.savePendingCaption()\n    while (undo) {\n      undo()\n      undo = this.undos.pop()\n    }\n    this.delegate?.didUninstallAttachmentEditor(this)\n  }\n\n  // Private\n\n  savePendingCaption() {\n    if (this.pendingCaption != null) {\n      const caption = this.pendingCaption\n      this.pendingCaption = null\n      if (caption) {\n        this.delegate?.attachmentEditorDidRequestUpdatingAttributesForAttachment?.({ caption }, this.attachment)\n      } else {\n        this.delegate?.attachmentEditorDidRequestRemovingAttributeForAttachment?.(\"caption\", this.attachment)\n      }\n    }\n  }\n\n  // Installing and uninstalling\n\n  makeElementMutable = undoable(() => {\n    return {\n      do: () => {\n        this.element.dataset.trixMutable = true\n      },\n      undo: () => delete this.element.dataset.trixMutable,\n    }\n  })\n\n  addToolbar = undoable(() => {\n    // <div class=\"#{css.attachmentMetadataContainer}\" data-trix-mutable=\"true\">\n    //   <div class=\"trix-button-row\">\n    //     <span class=\"trix-button-group trix-button-group--actions\">\n    //       <button type=\"button\" class=\"trix-button trix-button--remove\" title=\"#{lang.remove}\" data-trix-action=\"remove\">#{lang.remove}</button>\n    //     </span>\n    //   </div>\n    // </div>\n    const element = makeElement({\n      tagName: \"div\",\n      className: css.attachmentToolbar,\n      data: { trixMutable: true },\n      childNodes: makeElement({\n        tagName: \"div\",\n        className: \"trix-button-row\",\n        childNodes: makeElement({\n          tagName: \"span\",\n          className: \"trix-button-group trix-button-group--actions\",\n          childNodes: makeElement({\n            tagName: \"button\",\n            className: \"trix-button trix-button--remove\",\n            textContent: lang.remove,\n            attributes: { title: lang.remove },\n            data: { trixAction: \"remove\" },\n          }),\n        }),\n      }),\n    })\n\n    if (this.attachment.isPreviewable()) {\n      // <div class=\"#{css.attachmentMetadataContainer}\">\n      //   <span class=\"#{css.attachmentMetadata}\">\n      //     <span class=\"#{css.attachmentName}\" title=\"#{name}\">#{name}</span>\n      //     <span class=\"#{css.attachmentSize}\">#{size}</span>\n      //   </span>\n      // </div>\n      element.appendChild(\n        makeElement({\n          tagName: \"div\",\n          className: css.attachmentMetadataContainer,\n          childNodes: makeElement({\n            tagName: \"span\",\n            className: css.attachmentMetadata,\n            childNodes: [\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentName,\n                textContent: this.attachment.getFilename(),\n                attributes: { title: this.attachment.getFilename() },\n              }),\n              makeElement({\n                tagName: \"span\",\n                className: css.attachmentSize,\n                textContent: this.attachment.getFormattedFilesize(),\n              }),\n            ],\n          }),\n        })\n      )\n    }\n\n    handleEvent(\"click\", { onElement: element, withCallback: this.didClickToolbar })\n    handleEvent(\"click\", {\n      onElement: element,\n      matchingSelector: \"[data-trix-action]\",\n      withCallback: this.didClickActionButton,\n    })\n\n    triggerEvent(\"trix-attachment-before-toolbar\", { onElement: this.element, attributes: { toolbar: element, attachment: this.attachment } })\n\n    return {\n      do: () => this.element.appendChild(element),\n      undo: () => removeNode(element),\n    }\n  })\n\n  installCaptionEditor = undoable(() => {\n    const textarea = makeElement({\n      tagName: \"textarea\",\n      className: css.attachmentCaptionEditor,\n      attributes: { placeholder: lang.captionPlaceholder },\n      data: { trixMutable: true },\n    })\n    textarea.value = this.attachmentPiece.getCaption()\n\n    const textareaClone = textarea.cloneNode()\n    textareaClone.classList.add(\"trix-autoresize-clone\")\n    textareaClone.tabIndex = -1\n\n    const autoresize = function() {\n      textareaClone.value = textarea.value\n      textarea.style.height = textareaClone.scrollHeight + \"px\"\n    }\n\n    handleEvent(\"input\", { onElement: textarea, withCallback: autoresize })\n    handleEvent(\"input\", { onElement: textarea, withCallback: this.didInputCaption })\n    handleEvent(\"keydown\", { onElement: textarea, withCallback: this.didKeyDownCaption })\n    handleEvent(\"change\", { onElement: textarea, withCallback: this.didChangeCaption })\n    handleEvent(\"blur\", { onElement: textarea, withCallback: this.didBlurCaption })\n\n    const figcaption = this.element.querySelector(\"figcaption\")\n    const editingFigcaption = figcaption.cloneNode()\n\n    return {\n      do: () => {\n        figcaption.style.display = \"none\"\n        editingFigcaption.appendChild(textarea)\n        editingFigcaption.appendChild(textareaClone)\n        editingFigcaption.classList.add(`${css.attachmentCaption}--editing`)\n        figcaption.parentElement.insertBefore(editingFigcaption, figcaption)\n        autoresize()\n        if (this.options.editCaption) {\n          return defer(() => textarea.focus())\n        }\n      },\n      undo() {\n        removeNode(editingFigcaption)\n        figcaption.style.display = null\n      },\n    }\n  })\n\n  // Event handlers\n\n  didClickToolbar(event) {\n    event.preventDefault()\n    return event.stopPropagation()\n  }\n\n  didClickActionButton(event) {\n    const action = event.target.getAttribute(\"data-trix-action\")\n    switch (action) {\n      case \"remove\":\n        return this.delegate?.attachmentEditorDidRequestRemovalOfAttachment(this.attachment)\n    }\n  }\n\n  didKeyDownCaption(event) {\n    if (keyNames[event.keyCode] === \"return\") {\n      event.preventDefault()\n      this.savePendingCaption()\n      return this.delegate?.attachmentEditorDidRequestDeselectingAttachment?.(this.attachment)\n    }\n  }\n\n  didInputCaption(event) {\n    this.pendingCaption = event.target.value.replace(/\\s/g, \" \").trim()\n  }\n\n  didChangeCaption(event) {\n    return this.savePendingCaption()\n  }\n\n  didBlurCaption(event) {\n    return this.savePendingCaption()\n  }\n}\n", "import BasicObject from \"trix/core/basic_object\"\nimport DocumentView from \"trix/views/document_view\"\nimport AttachmentEditorController from \"trix/controllers/attachment_editor_controller\"\n\nimport { defer, findClosestElementFromNode, handleEvent, innerElementIsActive } from \"trix/core/helpers\"\nimport { attachmentSelector } from \"trix/config/attachments\"\n\nexport default class CompositionController extends BasicObject {\n  constructor(element, composition) {\n    super(...arguments)\n    this.didFocus = this.didFocus.bind(this)\n    this.didBlur = this.didBlur.bind(this)\n    this.didClickAttachment = this.didClickAttachment.bind(this)\n\n    this.element = element\n    this.composition = composition\n    this.documentView = new DocumentView(this.composition.document, { element: this.element })\n\n    handleEvent(\"focus\", { onElement: this.element, withCallback: this.didFocus })\n    handleEvent(\"blur\", { onElement: this.element, withCallback: this.didBlur })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: \"a[contenteditable=false]\",\n      preventDefault: true,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attachmentSelector,\n      withCallback: this.didClickAttachment,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: `a${attachmentSelector}`, preventDefault: true })\n  }\n\n  didFocus(event) {\n    const perform = () => {\n      if (!this.focused) {\n        this.focused = true\n        return this.delegate?.compositionControllerDidFocus?.()\n      }\n    }\n\n    return this.blurPromise?.then(perform) || perform()\n  }\n\n  didBlur(event) {\n    this.blurPromise = new Promise((resolve) => {\n      return defer(() => {\n        if (!innerElementIsActive(this.element)) {\n          this.focused = null\n          this.delegate?.compositionControllerDidBlur?.()\n        }\n        this.blurPromise = null\n        return resolve()\n      })\n    })\n  }\n\n  didClickAttachment(event, target) {\n    const attachment = this.findAttachmentForElement(target)\n    const editCaption = !!findClosestElementFromNode(event.target, { matchingSelector: \"figcaption\" })\n    return this.delegate?.compositionControllerDidSelectAttachment?.(attachment, { editCaption })\n  }\n\n  getSerializableElement() {\n    if (this.isEditingAttachment()) {\n      return this.documentView.shadowElement\n    } else {\n      return this.element\n    }\n  }\n\n  render() {\n    if (this.revision !== this.composition.revision) {\n      this.documentView.setDocument(this.composition.document)\n      this.documentView.render()\n      this.revision = this.composition.revision\n    }\n\n    if (this.canSyncDocumentView() && !this.documentView.isSynced()) {\n      this.delegate?.compositionControllerWillSyncDocumentView?.()\n      this.documentView.sync()\n      this.delegate?.compositionControllerDidSyncDocumentView?.()\n    }\n\n    return this.delegate?.compositionControllerDidRender?.()\n  }\n\n  rerenderViewForObject(object) {\n    this.invalidateViewForObject(object)\n    return this.render()\n  }\n\n  invalidateViewForObject(object) {\n    return this.documentView.invalidateViewForObject(object)\n  }\n\n  isViewCachingEnabled() {\n    return this.documentView.isViewCachingEnabled()\n  }\n\n  enableViewCaching() {\n    return this.documentView.enableViewCaching()\n  }\n\n  disableViewCaching() {\n    return this.documentView.disableViewCaching()\n  }\n\n  refreshViewCache() {\n    return this.documentView.garbageCollectCachedViews()\n  }\n\n  // Attachment editor management\n\n  isEditingAttachment() {\n    return !!this.attachmentEditor\n  }\n\n  installAttachmentEditorForAttachment(attachment, options) {\n    if (this.attachmentEditor?.attachment === attachment) return\n    const element = this.documentView.findElementForObject(attachment)\n    if (!element) return\n\n    this.uninstallAttachmentEditor()\n    const attachmentPiece = this.composition.document.getAttachmentPieceForAttachment(attachment)\n    this.attachmentEditor = new AttachmentEditorController(attachmentPiece, element, this.element, options)\n    this.attachmentEditor.delegate = this\n  }\n\n  uninstallAttachmentEditor() {\n    return this.attachmentEditor?.uninstall()\n  }\n\n  // Attachment controller delegate\n\n  didUninstallAttachmentEditor() {\n    this.attachmentEditor = null\n    return this.render()\n  }\n\n  attachmentEditorDidRequestUpdatingAttributesForAttachment(attributes, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.updateAttributesForAttachment(attributes, attachment)\n  }\n\n  attachmentEditorDidRequestRemovingAttributeForAttachment(attribute, attachment) {\n    this.delegate?.compositionControllerWillUpdateAttachment?.(attachment)\n    return this.composition.removeAttributeForAttachment(attribute, attachment)\n  }\n\n  attachmentEditorDidRequestRemovalOfAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestRemovalOfAttachment?.(attachment)\n  }\n\n  attachmentEditorDidRequestDeselectingAttachment(attachment) {\n    return this.delegate?.compositionControllerDidRequestDeselectingAttachment?.(attachment)\n  }\n\n  // Private\n\n  canSyncDocumentView() {\n    return !this.isEditingAttachment()\n  }\n\n  findAttachmentForElement(element) {\n    return this.composition.document.getAttachmentById(parseInt(element.dataset.trixId, 10))\n  }\n}\n", "import \"trix/views/object_view\"\nimport BasicObject from \"trix/core/basic_object\"\n\nexport default class Controller extends BasicObject {}\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport {\n  findClosestElementFromNode,\n  nodeIsBlockStartComment,\n  nodeIsEmptyTextNode,\n  normalizeSpaces,\n  summarizeStringChange,\n  tagName,\n} from \"trix/core/helpers\"\n\nconst mutableAttributeName = \"data-trix-mutable\"\nconst mutableSelector = `[${mutableAttributeName}]`\n\nconst options = {\n  attributes: true,\n  childList: true,\n  characterData: true,\n  characterDataOldValue: true,\n  subtree: true,\n}\n\nexport default class MutationObserver extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didMutate = this.didMutate.bind(this)\n    this.element = element\n    this.observer = new window.MutationObserver(this.didMutate)\n    this.start()\n  }\n\n  start() {\n    this.reset()\n    return this.observer.observe(this.element, options)\n  }\n\n  stop() {\n    return this.observer.disconnect()\n  }\n\n  didMutate(mutations) {\n    this.mutations.push(...Array.from(this.findSignificantMutations(mutations) || []))\n\n    if (this.mutations.length) {\n      this.delegate?.elementDidMutate?.(this.getMutationSummary())\n      return this.reset()\n    }\n  }\n\n  // Private\n\n  reset() {\n    this.mutations = []\n  }\n\n  findSignificantMutations(mutations) {\n    return mutations.filter((mutation) => {\n      return this.mutationIsSignificant(mutation)\n    })\n  }\n\n  mutationIsSignificant(mutation) {\n    if (this.nodeIsMutable(mutation.target)) {\n      return false\n    }\n    for (const node of Array.from(this.nodesModifiedByMutation(mutation))) {\n      if (this.nodeIsSignificant(node)) return true\n    }\n    return false\n  }\n\n  nodeIsSignificant(node) {\n    return node !== this.element && !this.nodeIsMutable(node) && !nodeIsEmptyTextNode(node)\n  }\n\n  nodeIsMutable(node) {\n    return findClosestElementFromNode(node, { matchingSelector: mutableSelector })\n  }\n\n  nodesModifiedByMutation(mutation) {\n    const nodes = []\n    switch (mutation.type) {\n      case \"attributes\":\n        if (mutation.attributeName !== mutableAttributeName) {\n          nodes.push(mutation.target)\n        }\n        break\n      case \"characterData\":\n        // Changes to text nodes should consider the parent element\n        nodes.push(mutation.target.parentNode)\n        nodes.push(mutation.target)\n        break\n      case \"childList\":\n        // Consider each added or removed node\n        nodes.push(...Array.from(mutation.addedNodes || []))\n        nodes.push(...Array.from(mutation.removedNodes || []))\n        break\n    }\n    return nodes\n  }\n\n  getMutationSummary() {\n    return this.getTextMutationSummary()\n  }\n\n  getTextMutationSummary() {\n    const { additions, deletions } = this.getTextChangesFromCharacterData()\n    const textChanges = this.getTextChangesFromChildList()\n\n    Array.from(textChanges.additions).forEach((addition) => {\n      if (!Array.from(additions).includes(addition)) {\n        additions.push(addition)\n      }\n    })\n\n    deletions.push(...Array.from(textChanges.deletions || []))\n\n    const summary = {}\n\n    const added = additions.join(\"\")\n    if (added) {\n      summary.textAdded = added\n    }\n\n    const deleted = deletions.join(\"\")\n    if (deleted) {\n      summary.textDeleted = deleted\n    }\n\n    return summary\n  }\n\n  getMutationsByType(type) {\n    return Array.from(this.mutations).filter((mutation) => mutation.type === type)\n  }\n\n  getTextChangesFromChildList() {\n    let textAdded, textRemoved\n    const addedNodes = []\n    const removedNodes = []\n\n    Array.from(this.getMutationsByType(\"childList\")).forEach((mutation) => {\n      addedNodes.push(...Array.from(mutation.addedNodes || []))\n      removedNodes.push(...Array.from(mutation.removedNodes || []))\n    })\n\n    const singleBlockCommentRemoved =\n      addedNodes.length === 0 && removedNodes.length === 1 && nodeIsBlockStartComment(removedNodes[0])\n\n    if (singleBlockCommentRemoved) {\n      textAdded = []\n      textRemoved = [ \"\\n\" ]\n    } else {\n      textAdded = getTextForNodes(addedNodes)\n      textRemoved = getTextForNodes(removedNodes)\n    }\n\n    const additions = textAdded.filter((text, index) => text !== textRemoved[index]).map(normalizeSpaces)\n    const deletions = textRemoved.filter((text, index) => text !== textAdded[index]).map(normalizeSpaces)\n\n    return { additions, deletions }\n  }\n\n  getTextChangesFromCharacterData() {\n    let added, removed\n    const characterMutations = this.getMutationsByType(\"characterData\")\n\n    if (characterMutations.length) {\n      const startMutation = characterMutations[0],\n        endMutation = characterMutations[characterMutations.length - 1]\n\n      const oldString = normalizeSpaces(startMutation.oldValue)\n      const newString = normalizeSpaces(endMutation.target.data)\n      const summarized = summarizeStringChange(oldString, newString)\n      added = summarized.added\n      removed = summarized.removed\n    }\n\n    return {\n      additions: added ? [ added ] : [],\n      deletions: removed ? [ removed ] : [],\n    }\n  }\n}\n\nconst getTextForNodes = function(nodes = []) {\n  const text = []\n  for (const node of Array.from(nodes)) {\n    switch (node.nodeType) {\n      case Node.TEXT_NODE:\n        text.push(node.data)\n        break\n      case Node.ELEMENT_NODE:\n        if (tagName(node) === \"br\") {\n          text.push(\"\\n\")\n        } else {\n          text.push(...Array.from(getTextForNodes(node.childNodes) || []))\n        }\n        break\n    }\n  }\n  return text\n}\n", "/* eslint-disable\n    no-empty,\n*/\nimport Operation from \"trix/core/utilities/operation\"\n\nexport default class FileVerificationOperation extends Operation {\n  constructor(file) {\n    super(...arguments)\n    this.file = file\n  }\n\n  perform(callback) {\n    const reader = new FileReader()\n\n    reader.onerror = () => callback(false)\n\n    reader.onload = () => {\n      reader.onerror = null\n      try {\n        reader.abort()\n      } catch (error) {}\n      return callback(true, this.file)\n    }\n\n    return reader.readAsArrayBuffer(this.file)\n  }\n}\n", "import * as config from \"trix/config\"\nimport { NON_BREAKING_SPACE, OBJECT_REPLACEMENT_CHARACTER, ZERO_WIDTH_SPACE } from \"trix/constants\"\n\n// Each software keyboard on Android emits its own set of events and some of them can be buggy.\n// This class detects when some buggy events are being emitted and lets know the input controller\n// that they should be ignored.\nexport default class FlakyAndroidKeyboardDetector {\n  constructor(element) {\n    this.element = element\n  }\n\n  shouldIgnore(event) {\n    if (!config.browser.samsungAndroid) return false\n\n    this.previousEvent = this.event\n    this.event = event\n\n    this.checkSamsungKeyboardBuggyModeStart()\n    this.checkSamsungKeyboardBuggyModeEnd()\n\n    return this.buggyMode\n  }\n\n  // private\n\n  // The Samsung keyboard on Android can enter a buggy state in which it emits a flurry of confused events that,\n  // if processed, corrupts the editor. The buggy mode always starts with an insertText event, right after a\n  // keydown event with for an \"Unidentified\" key, with the same text as the editor element, except for a few\n  // extra whitespace, or exotic utf8, characters.\n  checkSamsungKeyboardBuggyModeStart() {\n    if (this.insertingLongTextAfterUnidentifiedChar() && differsInWhitespace(this.element.innerText, this.event.data)) {\n      this.buggyMode = true\n      this.event.preventDefault()\n    }\n  }\n\n  // The flurry of buggy events are always insertText. If we see any other type, it means it's over.\n  checkSamsungKeyboardBuggyModeEnd() {\n    if (this.buggyMode && this.event.inputType !== \"insertText\") {\n      this.buggyMode = false\n    }\n  }\n\n  insertingLongTextAfterUnidentifiedChar() {\n    return this.isBeforeInputInsertText() && this.previousEventWasUnidentifiedKeydown() && this.event.data?.length > 50\n  }\n\n  isBeforeInputInsertText() {\n    return this.event.type === \"beforeinput\" && this.event.inputType === \"insertText\"\n  }\n\n  previousEventWasUnidentifiedKeydown() {\n    return this.previousEvent?.type === \"keydown\" && this.previousEvent?.key === \"Unidentified\"\n  }\n}\n\nconst differsInWhitespace = (text1, text2) => {\n  return normalize(text1) === normalize(text2)\n}\n\nconst whiteSpaceNormalizerRegexp = new RegExp(`(${OBJECT_REPLACEMENT_CHARACTER}|${ZERO_WIDTH_SPACE}|${NON_BREAKING_SPACE}|\\\\s)+`, \"g\")\nconst normalize = (text) => text.replace(whiteSpaceNormalizerRegexp, \" \").trim()\n", "import BasicObject from \"trix/core/basic_object\"\nimport MutationObserver from \"trix/observers/mutation_observer\"\nimport FileVerificationOperation from \"trix/operations/file_verification_operation\"\nimport FlakyAndroidKeyboardDetector from \"../models/flaky_android_keyboard_detector\"\n\nimport { handleEvent, innerElementIsActive } from \"trix/core/helpers\"\n\nexport default class InputController extends BasicObject {\n\n  static events = {}\n\n  constructor(element) {\n    super(...arguments)\n    this.element = element\n    this.mutationObserver = new MutationObserver(this.element)\n    this.mutationObserver.delegate = this\n    this.flakyKeyboardDetector = new FlakyAndroidKeyboardDetector(this.element)\n    for (const eventName in this.constructor.events) {\n      handleEvent(eventName, { onElement: this.element, withCallback: this.handlerFor(eventName) })\n    }\n  }\n\n  elementDidMutate(mutationSummary) {}\n\n  editorWillSyncDocumentView() {\n    return this.mutationObserver.stop()\n  }\n\n  editorDidSyncDocumentView() {\n    return this.mutationObserver.start()\n  }\n\n  requestRender() {\n    return this.delegate?.inputControllerDidRequestRender?.()\n  }\n\n  requestReparse() {\n    this.delegate?.inputControllerDidRequestReparse?.()\n    return this.requestRender()\n  }\n\n  attachFiles(files) {\n    const operations = Array.from(files).map((file) => new FileVerificationOperation(file))\n    return Promise.all(operations).then((files) => {\n      this.handleInput(function() {\n        this.delegate?.inputControllerWillAttachFiles()\n        this.responder?.insertFiles(files)\n        return this.requestRender()\n      })\n    })\n  }\n\n  // Private\n\n  handlerFor(eventName) {\n    return (event) => {\n      if (!event.defaultPrevented) {\n        this.handleInput(() => {\n          if (!innerElementIsActive(this.element)) {\n            if (this.flakyKeyboardDetector.shouldIgnore(event)) return\n\n            this.eventName = eventName\n            this.constructor.events[eventName].call(this, event)\n          }\n        })\n      }\n    }\n  }\n\n  handleInput(callback) {\n    try {\n      this.delegate?.inputControllerWillHandleInput()\n      callback.call(this)\n    } finally {\n      this.delegate?.inputControllerDidHandleInput()\n    }\n  }\n\n  createLinkHTML(href, text) {\n    const link = document.createElement(\"a\")\n    link.href = href\n    link.textContent = text ? text : href\n    return link.outerHTML\n  }\n}\n\n", "import * as config from \"trix/config\"\nimport UTF16String from \"trix/core/utilities/utf16_string\"\nimport BasicObject from \"trix/core/basic_object\"\nimport InputController from \"trix/controllers/input_controller\"\nimport DocumentView from \"trix/views/document_view\"\nimport Document from \"trix/models/document\"\n\nimport {\n  dataTransferIsPlainText,\n  dataTransferIsWritable,\n  keyEventIsKeyboardCommand,\n  makeElement,\n  objectsAreEqual,\n  removeNode,\n  squishBreakableWhitespace,\n} from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst { browser, keyNames } = config\nlet pastedFileCount = 0\n\nexport default class Level0InputController extends InputController {\n\n  static events = {\n    keydown(event) {\n      if (!this.isComposing()) {\n        this.resetInputSummary()\n      }\n      this.inputSummary.didInput = true\n\n      const keyName = keyNames[event.keyCode]\n      if (keyName) {\n        let context = this.keys\n\n        ;[ \"ctrl\", \"alt\", \"shift\", \"meta\" ].forEach((modifier) => {\n          if (event[`${modifier}Key`]) {\n            if (modifier === \"ctrl\") {\n              modifier = \"control\"\n            }\n            context = context?.[modifier]\n          }\n        })\n\n        if (context?.[keyName] != null) {\n          this.setInputSummary({ keyName })\n          selectionChangeObserver.reset()\n          context[keyName].call(this, event)\n        }\n      }\n\n      if (keyEventIsKeyboardCommand(event)) {\n        const character = String.fromCharCode(event.keyCode).toLowerCase()\n        if (character) {\n          const keys = [ \"alt\", \"shift\" ].map((modifier) => {\n            if (event[`${modifier}Key`]) {\n              return modifier\n            }\n          }).filter(key => key)\n          keys.push(character)\n          if (this.delegate?.inputControllerDidReceiveKeyboardCommand(keys)) {\n            event.preventDefault()\n          }\n        }\n      }\n    },\n\n    keypress(event) {\n      if (this.inputSummary.eventName != null) return\n      if (event.metaKey) return\n      if (event.ctrlKey && !event.altKey) return\n\n      const string = stringFromKeyEvent(event)\n      if (string) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(string)\n        return this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n      }\n    },\n\n    textInput(event) {\n      // Handle autocapitalization\n      const { data } = event\n      const { textAdded } = this.inputSummary\n      if (textAdded && textAdded !== data && textAdded.toUpperCase() === data) {\n        const range = this.getSelectedRange()\n        this.setSelectedRange([ range[0], range[1] + textAdded.length ])\n        this.responder?.insertString(data)\n        this.setInputSummary({ textAdded: data })\n        return this.setSelectedRange(range)\n      }\n    },\n\n    dragenter(event) {\n      event.preventDefault()\n    },\n\n    dragstart(event) {\n      this.serializeSelectionToDataTransfer(event.dataTransfer)\n      this.draggedRange = this.getSelectedRange()\n      return this.delegate?.inputControllerDidStartDrag?.()\n    },\n\n    dragover(event) {\n      if (this.draggedRange || this.canAcceptDataTransfer(event.dataTransfer)) {\n        event.preventDefault()\n        const draggingPoint = { x: event.clientX, y: event.clientY }\n        if (!objectsAreEqual(draggingPoint, this.draggingPoint)) {\n          this.draggingPoint = draggingPoint\n          return this.delegate?.inputControllerDidReceiveDragOverPoint?.(this.draggingPoint)\n        }\n      }\n    },\n\n    dragend(event) {\n      this.delegate?.inputControllerDidCancelDrag?.()\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    drop(event) {\n      event.preventDefault()\n      const files = event.dataTransfer?.files\n      const documentJSON = event.dataTransfer.getData(\"application/x-trix-document\")\n\n      const point = { x: event.clientX, y: event.clientY }\n      this.responder?.setLocationRangeFromPointRange(point)\n\n      if (files?.length) {\n        this.attachFiles(files)\n      } else if (this.draggedRange) {\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.draggedRange)\n        this.draggedRange = null\n        this.requestRender()\n      } else if (documentJSON) {\n        const document = Document.fromJSONString(documentJSON)\n        this.responder?.insertDocument(document)\n        this.requestRender()\n      }\n\n      this.draggedRange = null\n      this.draggingPoint = null\n    },\n\n    cut(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n\n        this.delegate?.inputControllerWillCutText()\n        this.deleteInDirection(\"backward\")\n        if (event.defaultPrevented) {\n          return this.requestRender()\n        }\n      }\n    },\n\n    copy(event) {\n      if (this.responder?.selectionIsExpanded()) {\n        if (this.serializeSelectionToDataTransfer(event.clipboardData)) {\n          event.preventDefault()\n        }\n      }\n    },\n\n    paste(event) {\n      const clipboard = event.clipboardData || event.testClipboardData\n      const paste = { clipboard }\n\n      if (!clipboard || pasteEventIsCrippledSafariHTMLPaste(event)) {\n        this.getPastedHTMLUsingHiddenElement((html) => {\n          paste.type = \"text/html\"\n          paste.html = html\n          this.delegate?.inputControllerWillPaste(paste)\n          this.responder?.insertHTML(paste.html)\n          this.requestRender()\n          return this.delegate?.inputControllerDidPaste(paste)\n        })\n        return\n      }\n\n      const href = clipboard.getData(\"URL\")\n      const html = clipboard.getData(\"text/html\")\n      const name = clipboard.getData(\"public.url-name\")\n\n      if (href) {\n        let string\n        paste.type = \"text/html\"\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (dataTransferIsPlainText(clipboard)) {\n        paste.type = \"text/plain\"\n        paste.string = clipboard.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.setInputSummary({ textAdded: paste.string, didDelete: this.selectionIsExpanded() })\n        this.responder?.insertString(paste.string)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (html) {\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.requestRender()\n        this.delegate?.inputControllerDidPaste(paste)\n      } else if (Array.from(clipboard.types).includes(\"Files\")) {\n        const file = clipboard.items?.[0]?.getAsFile?.()\n        if (file) {\n          const extension = extensionForFile(file)\n          if (!file.name && extension) {\n            file.name = `pasted-file-${++pastedFileCount}.${extension}`\n          }\n          paste.type = \"File\"\n          paste.file = file\n          this.delegate?.inputControllerWillAttachFiles()\n          this.responder?.insertFile(paste.file)\n          this.requestRender()\n          this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n\n      event.preventDefault()\n    },\n\n    compositionstart(event) {\n      return this.getCompositionInput().start(event.data)\n    },\n\n    compositionupdate(event) {\n      return this.getCompositionInput().update(event.data)\n    },\n\n    compositionend(event) {\n      return this.getCompositionInput().end(event.data)\n    },\n\n    beforeinput(event) {\n      this.inputSummary.didInput = true\n    },\n\n    input(event) {\n      this.inputSummary.didInput = true\n      return event.stopPropagation()\n    },\n  }\n\n  static keys = {\n    backspace(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"backward\", event)\n    },\n\n    delete(event) {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.deleteInDirection(\"forward\", event)\n    },\n\n    return(event) {\n      this.setInputSummary({ preferDocument: true })\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.responder?.insertLineBreak()\n    },\n\n    tab(event) {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.responder?.increaseNestingLevel()\n        this.requestRender()\n        event.preventDefault()\n      }\n    },\n\n    left(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    right(event) {\n      if (this.selectionIsInCursorTarget()) {\n        event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    control: {\n      d(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"forward\", event)\n      },\n\n      h(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        return this.deleteInDirection(\"backward\", event)\n      },\n\n      o(event) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\", { updatePosition: false })\n        return this.requestRender()\n      },\n    },\n\n    shift: {\n      return(event) {\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.insertString(\"\\n\")\n        this.requestRender()\n        event.preventDefault()\n      },\n\n      tab(event) {\n        if (this.responder?.canDecreaseNestingLevel()) {\n          this.responder?.decreaseNestingLevel()\n          this.requestRender()\n          event.preventDefault()\n        }\n      },\n\n      left(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"backward\")\n        }\n      },\n\n      right(event) {\n        if (this.selectionIsInCursorTarget()) {\n          event.preventDefault()\n          return this.expandSelectionInDirection(\"forward\")\n        }\n      },\n    },\n\n    alt: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n\n    meta: {\n      backspace(event) {\n        this.setInputSummary({ preferDocument: false })\n        return this.delegate?.inputControllerWillPerformTyping()\n      },\n    },\n  }\n\n  constructor() {\n    super(...arguments)\n    this.resetInputSummary()\n  }\n\n  setInputSummary(summary = {}) {\n    this.inputSummary.eventName = this.eventName\n    for (const key in summary) {\n      const value = summary[key]\n      this.inputSummary[key] = value\n    }\n    return this.inputSummary\n  }\n\n  resetInputSummary() {\n    this.inputSummary = {}\n  }\n\n  reset() {\n    this.resetInputSummary()\n    return selectionChangeObserver.reset()\n  }\n\n  // Mutation observer delegate\n\n  elementDidMutate(mutationSummary) {\n    if (this.isComposing()) {\n      return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n    } else {\n      return this.handleInput(function() {\n        if (this.mutationIsSignificant(mutationSummary)) {\n          if (this.mutationIsExpected(mutationSummary)) {\n            this.requestRender()\n          } else {\n            this.requestReparse()\n          }\n        }\n        return this.reset()\n      })\n    }\n  }\n\n  mutationIsExpected({ textAdded, textDeleted }) {\n    if (this.inputSummary.preferDocument) {\n      return true\n    }\n\n    const mutationAdditionMatchesSummary =\n      textAdded != null ? textAdded === this.inputSummary.textAdded : !this.inputSummary.textAdded\n    const mutationDeletionMatchesSummary =\n      textDeleted != null ? this.inputSummary.didDelete : !this.inputSummary.didDelete\n\n    const unexpectedNewlineAddition = [ \"\\n\", \" \\n\" ].includes(textAdded) && !mutationAdditionMatchesSummary\n    const unexpectedNewlineDeletion = textDeleted === \"\\n\" && !mutationDeletionMatchesSummary\n    const singleUnexpectedNewline =\n      unexpectedNewlineAddition && !unexpectedNewlineDeletion ||\n      unexpectedNewlineDeletion && !unexpectedNewlineAddition\n\n    if (singleUnexpectedNewline) {\n      const range = this.getSelectedRange()\n      if (range) {\n        const offset = unexpectedNewlineAddition ? textAdded.replace(/\\n$/, \"\").length || -1 : textAdded?.length || 1\n        if (this.responder?.positionIsBlockBreak(range[1] + offset)) {\n          return true\n        }\n      }\n    }\n\n    return mutationAdditionMatchesSummary && mutationDeletionMatchesSummary\n  }\n\n  mutationIsSignificant(mutationSummary) {\n    const textChanged = Object.keys(mutationSummary).length > 0\n    const composedEmptyString = this.compositionInput?.getEndData() === \"\"\n    return textChanged || !composedEmptyString\n  }\n\n  // Private\n\n  getCompositionInput() {\n    if (this.isComposing()) {\n      return this.compositionInput\n    } else {\n      this.compositionInput = new CompositionInput(this)\n    }\n  }\n\n  isComposing() {\n    return this.compositionInput && !this.compositionInput.isEnded()\n  }\n\n  deleteInDirection(direction, event) {\n    if (this.responder?.deleteInDirection(direction) === false) {\n      if (event) {\n        event.preventDefault()\n        return this.requestRender()\n      }\n    } else {\n      return this.setInputSummary({ didDelete: true })\n    }\n  }\n\n  serializeSelectionToDataTransfer(dataTransfer) {\n    if (!dataTransferIsWritable(dataTransfer)) return\n    const document = this.responder?.getSelectedDocument().toSerializableDocument()\n\n    dataTransfer.setData(\"application/x-trix-document\", JSON.stringify(document))\n    dataTransfer.setData(\"text/html\", DocumentView.render(document).innerHTML)\n    dataTransfer.setData(\"text/plain\", document.toString().replace(/\\n$/, \"\"))\n    return true\n  }\n\n  canAcceptDataTransfer(dataTransfer) {\n    const types = {}\n    Array.from(dataTransfer?.types || []).forEach((type) => {\n      types[type] = true\n    })\n    return types.Files || types[\"application/x-trix-document\"] || types[\"text/html\"] || types[\"text/plain\"]\n  }\n\n  getPastedHTMLUsingHiddenElement(callback) {\n    const selectedRange = this.getSelectedRange()\n\n    const style = {\n      position: \"absolute\",\n      left: `${window.pageXOffset}px`,\n      top: `${window.pageYOffset}px`,\n      opacity: 0,\n    }\n\n    const element = makeElement({ style, tagName: \"div\", editable: true })\n    document.body.appendChild(element)\n    element.focus()\n\n    return requestAnimationFrame(() => {\n      const html = element.innerHTML\n      removeNode(element)\n      this.setSelectedRange(selectedRange)\n      return callback(html)\n    })\n  }\n}\n\nLevel0InputController.proxyMethod(\"responder?.getSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.setSelectedRange\")\nLevel0InputController.proxyMethod(\"responder?.expandSelectionInDirection\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsInCursorTarget\")\nLevel0InputController.proxyMethod(\"responder?.selectionIsExpanded\")\n\nconst extensionForFile = (file) => file.type?.match(/\\/(\\w+)$/)?.[1]\n\nconst hasStringCodePointAt = !!\" \".codePointAt?.(0)\n\nconst stringFromKeyEvent = function(event) {\n  if (event.key && hasStringCodePointAt && event.key.codePointAt(0) === event.keyCode) {\n    return event.key\n  } else {\n    let code\n    if (event.which === null) {\n      code = event.keyCode\n    } else if (event.which !== 0 && event.charCode !== 0) {\n      code = event.charCode\n    }\n\n    if (code != null && keyNames[code] !== \"escape\") {\n      return UTF16String.fromCodepoints([ code ]).toString()\n    }\n  }\n}\n\nconst pasteEventIsCrippledSafariHTMLPaste = function(event) {\n  const paste = event.clipboardData\n  if (paste) {\n    if (paste.types.includes(\"text/html\")) {\n      // Answer is yes if there's any possibility of Paste and Match Style in Safari,\n      // which is nearly impossible to detect confidently: https://bugs.webkit.org/show_bug.cgi?id=174165\n      for (const type of paste.types) {\n        const hasPasteboardFlavor = /^CorePasteboardFlavorType/.test(type)\n        const hasReadableDynamicData = /^dyn\\./.test(type) && paste.getData(type)\n        const mightBePasteAndMatchStyle = hasPasteboardFlavor || hasReadableDynamicData\n        if (mightBePasteAndMatchStyle) {\n          return true\n        }\n      }\n      return false\n    } else {\n      const isExternalHTMLPaste = paste.types.includes(\"com.apple.webarchive\")\n      const isExternalRichTextPaste = paste.types.includes(\"com.apple.flat-rtfd\")\n      return isExternalHTMLPaste || isExternalRichTextPaste\n    }\n  }\n}\n\nclass CompositionInput extends BasicObject {\n  constructor(inputController) {\n    super(...arguments)\n    this.inputController = inputController\n    this.responder = this.inputController.responder\n    this.delegate = this.inputController.delegate\n    this.inputSummary = this.inputController.inputSummary\n    this.data = {}\n  }\n\n  start(data) {\n    this.data.start = data\n\n    if (this.isSignificant()) {\n      if (this.inputSummary.eventName === \"keypress\" && this.inputSummary.textAdded) {\n        this.responder?.deleteInDirection(\"left\")\n      }\n\n      if (!this.selectionIsExpanded()) {\n        this.insertPlaceholder()\n        this.requestRender()\n      }\n\n      this.range = this.responder?.getSelectedRange()\n    }\n  }\n\n  update(data) {\n    this.data.update = data\n\n    if (this.isSignificant()) {\n      const range = this.selectPlaceholder()\n      if (range) {\n        this.forgetPlaceholder()\n        this.range = range\n      }\n    }\n  }\n\n  end(data) {\n    this.data.end = data\n\n    if (this.isSignificant()) {\n      this.forgetPlaceholder()\n\n      if (this.canApplyToDocument()) {\n        this.setInputSummary({ preferDocument: true, didInput: false })\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.setSelectedRange(this.range)\n        this.responder?.insertString(this.data.end)\n        return this.responder?.setSelectedRange(this.range[0] + this.data.end.length)\n      } else if (this.data.start != null || this.data.update != null) {\n        this.requestReparse()\n        return this.inputController.reset()\n      }\n    } else {\n      return this.inputController.reset()\n    }\n  }\n\n  getEndData() {\n    return this.data.end\n  }\n\n  isEnded() {\n    return this.getEndData() != null\n  }\n\n  isSignificant() {\n    if (browser.composesExistingText) {\n      return this.inputSummary.didInput\n    } else {\n      return true\n    }\n  }\n\n  // Private\n\n  canApplyToDocument() {\n    return this.data.start?.length === 0 && this.data.end?.length > 0 && this.range\n  }\n}\n\nCompositionInput.proxyMethod(\"inputController.setInputSummary\")\nCompositionInput.proxyMethod(\"inputController.requestRender\")\nCompositionInput.proxyMethod(\"inputController.requestReparse\")\nCompositionInput.proxyMethod(\"responder?.selectionIsExpanded\")\nCompositionInput.proxyMethod(\"responder?.insertPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.selectPlaceholder\")\nCompositionInput.proxyMethod(\"responder?.forgetPlaceholder\")\n", "import { getAllAttributeNames, squishBreakableWhitespace } from \"trix/core/helpers\"\nimport InputController from \"trix/controllers/input_controller\"\nimport * as config from \"trix/config\"\n\nimport { dataTransferIsMsOfficePaste, dataTransferIsPlainText, keyEventIsKeyboardCommand, objectsAreEqual } from \"trix/core/helpers\"\n\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nexport default class Level2InputController extends InputController {\n  constructor(...args) {\n    super(...args)\n    this.render = this.render.bind(this)\n  }\n\n  static events = {\n    keydown(event) {\n      if (keyEventIsKeyboardCommand(event)) {\n        const command = keyboardCommandFromKeyEvent(event)\n        if (this.delegate?.inputControllerDidReceiveKeyboardCommand(command)) {\n          event.preventDefault()\n        }\n      } else {\n        let name = event.key\n        if (event.altKey) {\n          name += \"+Alt\"\n        }\n        if (event.shiftKey) {\n          name += \"+Shift\"\n        }\n        const handler = this.constructor.keys[name]\n        if (handler) {\n          return this.withEvent(event, handler)\n        }\n      }\n    },\n\n    // Handle paste event to work around beforeinput.insertFromPaste browser bugs.\n    // Safe to remove each condition once fixed upstream.\n    paste(event) {\n      // https://bugs.webkit.org/show_bug.cgi?id=194921\n      let paste\n      const href = event.clipboardData?.getData(\"URL\")\n      if (pasteEventHasFilesOnly(event)) {\n        event.preventDefault()\n        return this.attachFiles(event.clipboardData.files)\n\n        // https://bugs.chromium.org/p/chromium/issues/detail?id=934448\n      } else if (pasteEventHasPlainTextOnly(event)) {\n        event.preventDefault()\n        paste = {\n          type: \"text/plain\",\n          string: event.clipboardData.getData(\"text/plain\"),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertString(paste.string)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n\n        // https://bugs.webkit.org/show_bug.cgi?id=196702\n      } else if (href) {\n        event.preventDefault()\n        paste = {\n          type: \"text/html\",\n          html: this.createLinkHTML(href),\n        }\n        this.delegate?.inputControllerWillPaste(paste)\n        this.responder?.insertHTML(paste.html)\n        this.render()\n        return this.delegate?.inputControllerDidPaste(paste)\n      }\n    },\n\n    beforeinput(event) {\n      const handler = this.constructor.inputTypes[event.inputType]\n\n      if (handler) {\n        this.withEvent(event, handler)\n        this.scheduleRender()\n      }\n    },\n\n    input(event) {\n      selectionChangeObserver.reset()\n    },\n\n    dragstart(event) {\n      if (this.responder?.selectionContainsAttachments()) {\n        event.dataTransfer.setData(\"application/x-trix-dragging\", true)\n\n        this.dragging = {\n          range: this.responder?.getSelectedRange(),\n          point: pointFromEvent(event),\n        }\n      }\n    },\n\n    dragenter(event) {\n      if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    dragover(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        if (!objectsAreEqual(point, this.dragging.point)) {\n          this.dragging.point = point\n          return this.responder?.setLocationRangeFromPointRange(point)\n        }\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n      }\n    },\n\n    drop(event) {\n      if (this.dragging) {\n        event.preventDefault()\n        this.delegate?.inputControllerWillMoveText()\n        this.responder?.moveTextFromRange(this.dragging.range)\n        this.dragging = null\n        return this.scheduleRender()\n      } else if (dragEventHasFiles(event)) {\n        event.preventDefault()\n        const point = pointFromEvent(event)\n        this.responder?.setLocationRangeFromPointRange(point)\n        return this.attachFiles(event.dataTransfer.files)\n      }\n    },\n\n    dragend() {\n      if (this.dragging) {\n        this.responder?.setSelectedRange(this.dragging.range)\n        this.dragging = null\n      }\n    },\n\n    compositionend(event) {\n      if (this.composing) {\n        this.composing = false\n        if (!config.browser.recentAndroid) this.scheduleRender()\n      }\n    },\n  }\n\n  static keys = {\n    ArrowLeft() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"backward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"backward\")\n      }\n    },\n\n    ArrowRight() {\n      if (this.responder?.shouldManageMovingCursorInDirection(\"forward\")) {\n        this.event.preventDefault()\n        return this.responder?.moveCursorInDirection(\"forward\")\n      }\n    },\n\n    Backspace() {\n      if (this.responder?.shouldManageDeletingInDirection(\"backward\")) {\n        this.event.preventDefault()\n        this.delegate?.inputControllerWillPerformTyping()\n        this.responder?.deleteInDirection(\"backward\")\n        return this.render()\n      }\n    },\n\n    Tab() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.increaseNestingLevel()\n        return this.render()\n      }\n    },\n\n    \"Tab+Shift\"() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        this.event.preventDefault()\n        this.responder?.decreaseNestingLevel()\n        return this.render()\n      }\n    },\n  }\n\n  static inputTypes = {\n    deleteByComposition() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteByCut() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteByDrag() {\n      this.event.preventDefault()\n      return this.withTargetDOMRange(function() {\n        this.deleteByDragRange = this.responder?.getSelectedRange()\n      })\n    },\n\n    deleteCompositionText() {\n      return this.deleteInDirection(\"backward\", { recordUndoEntry: false })\n    },\n\n    deleteContent() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteContentForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteEntireSoftLine() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteHardLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteHardLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteSoftLineBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteSoftLineForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    deleteWordBackward() {\n      return this.deleteInDirection(\"backward\")\n    },\n\n    deleteWordForward() {\n      return this.deleteInDirection(\"forward\")\n    },\n\n    formatBackColor() {\n      return this.activateAttributeIfSupported(\"backgroundColor\", this.event.data)\n    },\n\n    formatBold() {\n      return this.toggleAttributeIfSupported(\"bold\")\n    },\n\n    formatFontColor() {\n      return this.activateAttributeIfSupported(\"color\", this.event.data)\n    },\n\n    formatFontName() {\n      return this.activateAttributeIfSupported(\"font\", this.event.data)\n    },\n\n    formatIndent() {\n      if (this.responder?.canIncreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.increaseNestingLevel()\n        })\n      }\n    },\n\n    formatItalic() {\n      return this.toggleAttributeIfSupported(\"italic\")\n    },\n\n    formatJustifyCenter() {\n      return this.toggleAttributeIfSupported(\"justifyCenter\")\n    },\n\n    formatJustifyFull() {\n      return this.toggleAttributeIfSupported(\"justifyFull\")\n    },\n\n    formatJustifyLeft() {\n      return this.toggleAttributeIfSupported(\"justifyLeft\")\n    },\n\n    formatJustifyRight() {\n      return this.toggleAttributeIfSupported(\"justifyRight\")\n    },\n\n    formatOutdent() {\n      if (this.responder?.canDecreaseNestingLevel()) {\n        return this.withTargetDOMRange(function() {\n          return this.responder?.decreaseNestingLevel()\n        })\n      }\n    },\n\n    formatRemove() {\n      this.withTargetDOMRange(function() {\n        for (const attributeName in this.responder?.getCurrentAttributes()) {\n          this.responder?.removeCurrentAttribute(attributeName)\n        }\n      })\n    },\n\n    formatSetBlockTextDirection() {\n      return this.activateAttributeIfSupported(\"blockDir\", this.event.data)\n    },\n\n    formatSetInlineTextDirection() {\n      return this.activateAttributeIfSupported(\"textDir\", this.event.data)\n    },\n\n    formatStrikeThrough() {\n      return this.toggleAttributeIfSupported(\"strike\")\n    },\n\n    formatSubscript() {\n      return this.toggleAttributeIfSupported(\"sub\")\n    },\n\n    formatSuperscript() {\n      return this.toggleAttributeIfSupported(\"sup\")\n    },\n\n    formatUnderline() {\n      return this.toggleAttributeIfSupported(\"underline\")\n    },\n\n    historyRedo() {\n      return this.delegate?.inputControllerWillPerformRedo()\n    },\n\n    historyUndo() {\n      return this.delegate?.inputControllerWillPerformUndo()\n    },\n\n    insertCompositionText() {\n      this.composing = true\n      return this.insertString(this.event.data)\n    },\n\n    insertFromComposition() {\n      this.composing = false\n      return this.insertString(this.event.data)\n    },\n\n    insertFromDrop() {\n      const range = this.deleteByDragRange\n      if (range) {\n        this.deleteByDragRange = null\n        this.delegate?.inputControllerWillMoveText()\n        return this.withTargetDOMRange(function() {\n          return this.responder?.moveTextFromRange(range)\n        })\n      }\n    },\n\n    insertFromPaste() {\n      const { dataTransfer } = this.event\n      const paste = { dataTransfer }\n\n      const href = dataTransfer.getData(\"URL\")\n      const html = dataTransfer.getData(\"text/html\")\n\n      if (href) {\n        let string\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        const name = dataTransfer.getData(\"public.url-name\")\n        if (name) {\n          string = squishBreakableWhitespace(name).trim()\n        } else {\n          string = href\n        }\n        paste.html = this.createLinkHTML(href, string)\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (dataTransferIsPlainText(dataTransfer)) {\n        paste.type = \"text/plain\"\n        paste.string = dataTransfer.getData(\"text/plain\")\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertString(paste.string)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (processableFilePaste(this.event)) {\n        paste.type = \"File\"\n        paste.file = dataTransfer.files[0]\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertFile(paste.file)\n        })\n\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      } else if (html) {\n        this.event.preventDefault()\n        paste.type = \"text/html\"\n        paste.html = html\n        this.delegate?.inputControllerWillPaste(paste)\n        this.withTargetDOMRange(function() {\n          return this.responder?.insertHTML(paste.html)\n        })\n        this.afterRender = () => {\n          return this.delegate?.inputControllerDidPaste(paste)\n        }\n      }\n    },\n\n    insertFromYank() {\n      return this.insertString(this.event.data)\n    },\n\n    insertLineBreak() {\n      return this.insertString(\"\\n\")\n    },\n\n    insertLink() {\n      return this.activateAttributeIfSupported(\"href\", this.event.data)\n    },\n\n    insertOrderedList() {\n      return this.toggleAttributeIfSupported(\"number\")\n    },\n\n    insertParagraph() {\n      this.delegate?.inputControllerWillPerformTyping()\n      return this.withTargetDOMRange(function() {\n        return this.responder?.insertLineBreak()\n      })\n    },\n\n    insertReplacementText() {\n      const replacement = this.event.dataTransfer.getData(\"text/plain\")\n      const domRange = this.event.getTargetRanges()[0]\n\n      this.withTargetDOMRange(domRange, () => {\n        this.insertString(replacement, { updatePosition: false })\n      })\n    },\n\n    insertText() {\n      return this.insertString(this.event.data || this.event.dataTransfer?.getData(\"text/plain\"))\n    },\n\n    insertTranspose() {\n      return this.insertString(this.event.data)\n    },\n\n    insertUnorderedList() {\n      return this.toggleAttributeIfSupported(\"bullet\")\n    },\n  }\n\n  elementDidMutate() {\n    if (this.scheduledRender) {\n      if (this.composing) {\n        return this.delegate?.inputControllerDidAllowUnhandledInput?.()\n      }\n    } else {\n      return this.reparse()\n    }\n  }\n\n  scheduleRender() {\n    return this.scheduledRender ? this.scheduledRender : this.scheduledRender = requestAnimationFrame(this.render)\n  }\n\n  render() {\n    cancelAnimationFrame(this.scheduledRender)\n    this.scheduledRender = null\n    if (!this.composing) {\n      this.delegate?.render()\n    }\n    this.afterRender?.()\n    this.afterRender = null\n  }\n\n  reparse() {\n    return this.delegate?.reparse()\n  }\n\n  // Responder helpers\n\n  insertString(string = \"\", options) {\n    this.delegate?.inputControllerWillPerformTyping()\n    return this.withTargetDOMRange(function() {\n      return this.responder?.insertString(string, options)\n    })\n  }\n\n  toggleAttributeIfSupported(attributeName) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.toggleCurrentAttribute(attributeName)\n      })\n    }\n  }\n\n  activateAttributeIfSupported(attributeName, value) {\n    if (getAllAttributeNames().includes(attributeName)) {\n      this.delegate?.inputControllerWillPerformFormatting(attributeName)\n      return this.withTargetDOMRange(function() {\n        return this.responder?.setCurrentAttribute(attributeName, value)\n      })\n    }\n  }\n\n  deleteInDirection(direction, { recordUndoEntry } = { recordUndoEntry: true }) {\n    if (recordUndoEntry) {\n      this.delegate?.inputControllerWillPerformTyping()\n    }\n    const perform = () => this.responder?.deleteInDirection(direction)\n    const domRange = this.getTargetDOMRange({ minLength: this.composing ? 1 : 2 })\n    if (domRange) {\n      return this.withTargetDOMRange(domRange, perform)\n    } else {\n      return perform()\n    }\n  }\n\n  // Selection helpers\n\n  withTargetDOMRange(domRange, fn) {\n    if (typeof domRange === \"function\") {\n      fn = domRange\n      domRange = this.getTargetDOMRange()\n    }\n    if (domRange) {\n      return this.responder?.withTargetDOMRange(domRange, fn.bind(this))\n    } else {\n      selectionChangeObserver.reset()\n      return fn.call(this)\n    }\n  }\n\n  getTargetDOMRange({ minLength } = { minLength: 0 }) {\n    const targetRanges = this.event.getTargetRanges?.()\n    if (targetRanges) {\n      if (targetRanges.length) {\n        const domRange = staticRangeToRange(targetRanges[0])\n        if (minLength === 0 || domRange.toString().length >= minLength) {\n          return domRange\n        }\n      }\n    }\n  }\n\n  withEvent(event, fn) {\n    let result\n    this.event = event\n    try {\n      result = fn.call(this)\n    } finally {\n      this.event = null\n    }\n    return result\n  }\n}\n\nconst staticRangeToRange = function(staticRange) {\n  const range = document.createRange()\n  range.setStart(staticRange.startContainer, staticRange.startOffset)\n  range.setEnd(staticRange.endContainer, staticRange.endOffset)\n  return range\n}\n\n// Event helpers\n\nconst dragEventHasFiles = (event) => Array.from(event.dataTransfer?.types || []).includes(\"Files\")\n\nconst processableFilePaste = (event) => {\n  // Paste events that only have files are handled by the paste event handler,\n  // to work around Safari not supporting beforeinput.insertFromPaste for files.\n\n  // MS Office text pastes include a file with a screenshot of the text, but we should\n  // handle them as text pastes.\n  return event.dataTransfer.files?.[0] && !pasteEventHasFilesOnly(event) && !dataTransferIsMsOfficePaste(event)\n}\n\nconst pasteEventHasFilesOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    const fileTypes = Array.from(clipboard.types).filter((type) => type.match(/file/i)) // \"Files\", \"application/x-moz-file\"\n    return fileTypes.length === clipboard.types.length && clipboard.files.length >= 1\n  }\n}\n\nconst pasteEventHasPlainTextOnly = function(event) {\n  const clipboard = event.clipboardData\n  if (clipboard) {\n    return clipboard.types.includes(\"text/plain\") && clipboard.types.length === 1\n  }\n}\n\nconst keyboardCommandFromKeyEvent = function(event) {\n  const command = []\n  if (event.altKey) {\n    command.push(\"alt\")\n  }\n  if (event.shiftKey) {\n    command.push(\"shift\")\n  }\n  command.push(event.key)\n  return command\n}\n\nconst pointFromEvent = (event) => ({\n  x: event.clientX,\n  y: event.clientY,\n})\n", "import BasicObject from \"trix/core/basic_object\"\n\nimport { findClosestElementFromNode, handleEvent, triggerEvent } from \"trix/core/helpers\"\n\nconst attributeButtonSelector = \"[data-trix-attribute]\"\nconst actionButtonSelector = \"[data-trix-action]\"\nconst toolbarButtonSelector = `${attributeButtonSelector}, ${actionButtonSelector}`\nconst dialogSelector = \"[data-trix-dialog]\"\nconst activeDialogSelector = `${dialogSelector}[data-trix-active]`\nconst dialogButtonSelector = `${dialogSelector} [data-trix-method]`\nconst dialogInputSelector = `${dialogSelector} [data-trix-input]`\nconst getInputForDialog = (element, attributeName) => {\n  if (!attributeName) { attributeName = getAttributeName(element) }\n  return element.querySelector(`[data-trix-input][name='${attributeName}']`)\n}\nconst getActionName = (element) => element.getAttribute(\"data-trix-action\")\nconst getAttributeName = (element) => {\n  return element.getAttribute(\"data-trix-attribute\") || element.getAttribute(\"data-trix-dialog-attribute\")\n}\nconst getDialogName = (element) => element.getAttribute(\"data-trix-dialog\")\n\nexport default class ToolbarController extends BasicObject {\n  constructor(element) {\n    super(element)\n    this.didClickActionButton = this.didClickActionButton.bind(this)\n    this.didClickAttributeButton = this.didClickAttributeButton.bind(this)\n    this.didClickDialogButton = this.didClickDialogButton.bind(this)\n    this.didKeyDownDialogInput = this.didKeyDownDialogInput.bind(this)\n    this.element = element\n    this.attributes = {}\n    this.actions = {}\n    this.resetDialogInputs()\n\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: actionButtonSelector,\n      withCallback: this.didClickActionButton,\n    })\n    handleEvent(\"mousedown\", {\n      onElement: this.element,\n      matchingSelector: attributeButtonSelector,\n      withCallback: this.didClickAttributeButton,\n    })\n    handleEvent(\"click\", { onElement: this.element, matchingSelector: toolbarButtonSelector, preventDefault: true })\n    handleEvent(\"click\", {\n      onElement: this.element,\n      matchingSelector: dialogButtonSelector,\n      withCallback: this.didClickDialogButton,\n    })\n    handleEvent(\"keydown\", {\n      onElement: this.element,\n      matchingSelector: dialogInputSelector,\n      withCallback: this.didKeyDownDialogInput,\n    })\n  }\n\n  // Event handlers\n\n  didClickActionButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const actionName = getActionName(element)\n\n    if (this.getDialog(actionName)) {\n      return this.toggleDialog(actionName)\n    } else {\n      return this.delegate?.toolbarDidInvokeAction(actionName, element)\n    }\n  }\n\n  didClickAttributeButton(event, element) {\n    this.delegate?.toolbarDidClickButton()\n    event.preventDefault()\n    const attributeName = getAttributeName(element)\n\n    if (this.getDialog(attributeName)) {\n      this.toggleDialog(attributeName)\n    } else {\n      this.delegate?.toolbarDidToggleAttribute(attributeName)\n    }\n\n    return this.refreshAttributeButtons()\n  }\n\n  didClickDialogButton(event, element) {\n    const dialogElement = findClosestElementFromNode(element, { matchingSelector: dialogSelector })\n    const method = element.getAttribute(\"data-trix-method\")\n    return this[method].call(this, dialogElement)\n  }\n\n  didKeyDownDialogInput(event, element) {\n    if (event.keyCode === 13) {\n      // Enter key\n      event.preventDefault()\n      const attribute = element.getAttribute(\"name\")\n      const dialog = this.getDialog(attribute)\n      this.setAttribute(dialog)\n    }\n    if (event.keyCode === 27) {\n      // Escape key\n      event.preventDefault()\n      return this.hideDialog()\n    }\n  }\n\n  // Action buttons\n\n  updateActions(actions) {\n    this.actions = actions\n    return this.refreshActionButtons()\n  }\n\n  refreshActionButtons() {\n    return this.eachActionButton((element, actionName) => {\n      element.disabled = this.actions[actionName] === false\n    })\n  }\n\n  eachActionButton(callback) {\n    return Array.from(this.element.querySelectorAll(actionButtonSelector)).map((element) =>\n      callback(element, getActionName(element))\n    )\n  }\n\n  // Attribute buttons\n\n  updateAttributes(attributes) {\n    this.attributes = attributes\n    return this.refreshAttributeButtons()\n  }\n\n  refreshAttributeButtons() {\n    return this.eachAttributeButton((element, attributeName) => {\n      element.disabled = this.attributes[attributeName] === false\n      if (this.attributes[attributeName] || this.dialogIsVisible(attributeName)) {\n        element.setAttribute(\"data-trix-active\", \"\")\n        return element.classList.add(\"trix-active\")\n      } else {\n        element.removeAttribute(\"data-trix-active\")\n        return element.classList.remove(\"trix-active\")\n      }\n    })\n  }\n\n  eachAttributeButton(callback) {\n    return Array.from(this.element.querySelectorAll(attributeButtonSelector)).map((element) =>\n      callback(element, getAttributeName(element))\n    )\n  }\n\n  applyKeyboardCommand(keys) {\n    const keyString = JSON.stringify(keys.sort())\n    for (const button of Array.from(this.element.querySelectorAll(\"[data-trix-key]\"))) {\n      const buttonKeys = button.getAttribute(\"data-trix-key\").split(\"+\")\n      const buttonKeyString = JSON.stringify(buttonKeys.sort())\n      if (buttonKeyString === keyString) {\n        triggerEvent(\"mousedown\", { onElement: button })\n        return true\n      }\n    }\n    return false\n  }\n\n  // Dialogs\n\n  dialogIsVisible(dialogName) {\n    const element = this.getDialog(dialogName)\n    if (element) {\n      return element.hasAttribute(\"data-trix-active\")\n    }\n  }\n\n  toggleDialog(dialogName) {\n    if (this.dialogIsVisible(dialogName)) {\n      return this.hideDialog()\n    } else {\n      return this.showDialog(dialogName)\n    }\n  }\n\n  showDialog(dialogName) {\n    this.hideDialog()\n    this.delegate?.toolbarWillShowDialog()\n\n    const element = this.getDialog(dialogName)\n    element.setAttribute(\"data-trix-active\", \"\")\n    element.classList.add(\"trix-active\")\n\n    Array.from(element.querySelectorAll(\"input[disabled]\")).forEach((disabledInput) => {\n      disabledInput.removeAttribute(\"disabled\")\n    })\n\n    const attributeName = getAttributeName(element)\n    if (attributeName) {\n      const input = getInputForDialog(element, dialogName)\n      if (input) {\n        input.value = this.attributes[attributeName] || \"\"\n        input.select()\n      }\n    }\n\n    return this.delegate?.toolbarDidShowDialog(dialogName)\n  }\n\n  setAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    const input = getInputForDialog(dialogElement, attributeName)\n    if (input.willValidate && !input.checkValidity()) {\n      input.setAttribute(\"data-trix-validate\", \"\")\n      input.classList.add(\"trix-validate\")\n      return input.focus()\n    } else {\n      this.delegate?.toolbarDidUpdateAttribute(attributeName, input.value)\n      return this.hideDialog()\n    }\n  }\n\n  removeAttribute(dialogElement) {\n    const attributeName = getAttributeName(dialogElement)\n    this.delegate?.toolbarDidRemoveAttribute(attributeName)\n    return this.hideDialog()\n  }\n\n  hideDialog() {\n    const element = this.element.querySelector(activeDialogSelector)\n    if (element) {\n      element.removeAttribute(\"data-trix-active\")\n      element.classList.remove(\"trix-active\")\n      this.resetDialogInputs()\n      return this.delegate?.toolbarDidHideDialog(getDialogName(element))\n    }\n  }\n\n  resetDialogInputs() {\n    Array.from(this.element.querySelectorAll(dialogInputSelector)).forEach((input) => {\n      input.setAttribute(\"disabled\", \"disabled\")\n      input.removeAttribute(\"data-trix-validate\")\n      input.classList.remove(\"trix-validate\")\n    })\n  }\n\n  getDialog(dialogName) {\n    return this.element.querySelector(`[data-trix-dialog=${dialogName}]`)\n  }\n}\n", "/* eslint-disable\n    id-length,\n*/\nimport * as config from \"trix/config\"\n\nimport { serializeToContentType } from \"trix/core/serialization\"\n\nimport Controller from \"trix/controllers/controller\"\nimport Level0InputController from \"trix/controllers/level_0_input_controller\"\nimport Level2InputController from \"trix/controllers/level_2_input_controller\"\nimport CompositionController from \"trix/controllers/composition_controller\"\nimport ToolbarController from \"trix/controllers/toolbar_controller\"\nimport Composition from \"trix/models/composition\"\nimport Editor from \"trix/models/editor\"\nimport AttachmentManager from \"trix/models/attachment_manager\"\nimport SelectionManager from \"trix/models/selection_manager\"\n\nimport { getBlockConfig, objectsAreEqual, rangeIsCollapsed, rangesAreEqual } from \"trix/core/helpers\"\nimport { selectionChangeObserver } from \"trix/observers/selection_change_observer\"\n\nconst snapshotsAreEqual = (a, b) => rangesAreEqual(a.selectedRange, b.selectedRange) && a.document.isEqualTo(b.document)\n\nexport default class EditorController extends Controller {\n  static actions = {\n    undo: {\n      test() {\n        return this.editor.canUndo()\n      },\n      perform() {\n        return this.editor.undo()\n      },\n    },\n    redo: {\n      test() {\n        return this.editor.canRedo()\n      },\n      perform() {\n        return this.editor.redo()\n      },\n    },\n    link: {\n      test() {\n        return this.editor.canActivateAttribute(\"href\")\n      },\n    },\n    increaseNestingLevel: {\n      test() {\n        return this.editor.canIncreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.increaseNestingLevel() && this.render()\n      },\n    },\n    decreaseNestingLevel: {\n      test() {\n        return this.editor.canDecreaseNestingLevel()\n      },\n      perform() {\n        return this.editor.decreaseNestingLevel() && this.render()\n      },\n    },\n    attachFiles: {\n      test() {\n        return true\n      },\n      perform() {\n        return config.input.pickFiles(this.editor.insertFiles)\n      },\n    },\n  }\n\n  constructor({ editorElement, document, html }) {\n    super(...arguments)\n    this.editorElement = editorElement\n    this.selectionManager = new SelectionManager(this.editorElement)\n    this.selectionManager.delegate = this\n\n    this.composition = new Composition()\n    this.composition.delegate = this\n\n    this.attachmentManager = new AttachmentManager(this.composition.getAttachments())\n    this.attachmentManager.delegate = this\n\n    this.inputController =\n      config.input.getLevel() === 2\n        ? new Level2InputController(this.editorElement)\n        : new Level0InputController(this.editorElement)\n\n    this.inputController.delegate = this\n    this.inputController.responder = this.composition\n\n    this.compositionController = new CompositionController(this.editorElement, this.composition)\n    this.compositionController.delegate = this\n\n    this.toolbarController = new ToolbarController(this.editorElement.toolbarElement)\n    this.toolbarController.delegate = this\n\n    this.editor = new Editor(this.composition, this.selectionManager, this.editorElement)\n    if (document) {\n      this.editor.loadDocument(document)\n    } else {\n      this.editor.loadHTML(html)\n    }\n  }\n\n  registerSelectionManager() {\n    return selectionChangeObserver.registerSelectionManager(this.selectionManager)\n  }\n\n  unregisterSelectionManager() {\n    return selectionChangeObserver.unregisterSelectionManager(this.selectionManager)\n  }\n\n  render() {\n    return this.compositionController.render()\n  }\n\n  reparse() {\n    return this.composition.replaceHTML(this.editorElement.innerHTML)\n  }\n\n  // Composition delegate\n\n  compositionDidChangeDocument(document) {\n    this.notifyEditorElement(\"document-change\")\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionDidChangeCurrentAttributes(currentAttributes) {\n    this.currentAttributes = currentAttributes\n    this.toolbarController.updateAttributes(this.currentAttributes)\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"attributes-change\", { attributes: this.currentAttributes })\n  }\n\n  compositionDidPerformInsertionAtRange(range) {\n    if (this.pasting) {\n      this.pastedRange = range\n    }\n  }\n\n  compositionShouldAcceptFile(file) {\n    return this.notifyEditorElement(\"file-accept\", { file })\n  }\n\n  compositionDidAddAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-add\", { attachment: managedAttachment })\n  }\n\n  compositionDidEditAttachment(attachment) {\n    this.compositionController.rerenderViewForObject(attachment)\n    const managedAttachment = this.attachmentManager.manageAttachment(attachment)\n    this.notifyEditorElement(\"attachment-edit\", { attachment: managedAttachment })\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidChangeAttachmentPreviewURL(attachment) {\n    this.compositionController.invalidateViewForObject(attachment)\n    return this.notifyEditorElement(\"change\")\n  }\n\n  compositionDidRemoveAttachment(attachment) {\n    const managedAttachment = this.attachmentManager.unmanageAttachment(attachment)\n    return this.notifyEditorElement(\"attachment-remove\", { attachment: managedAttachment })\n  }\n\n  compositionDidStartEditingAttachment(attachment, options) {\n    this.attachmentLocationRange = this.composition.document.getLocationRangeOfAttachment(attachment)\n    this.compositionController.installAttachmentEditorForAttachment(attachment, options)\n    return this.selectionManager.setLocationRange(this.attachmentLocationRange)\n  }\n\n  compositionDidStopEditingAttachment(attachment) {\n    this.compositionController.uninstallAttachmentEditor()\n    this.attachmentLocationRange = null\n  }\n\n  compositionDidRequestChangingSelectionToLocationRange(locationRange) {\n    if (this.loadingSnapshot && !this.isFocused()) return\n    this.requestedLocationRange = locationRange\n    this.compositionRevisionWhenLocationRangeRequested = this.composition.revision\n    if (!this.handlingInput) {\n      return this.render()\n    }\n  }\n\n  compositionWillLoadSnapshot() {\n    this.loadingSnapshot = true\n  }\n\n  compositionDidLoadSnapshot() {\n    this.compositionController.refreshViewCache()\n    this.render()\n    this.loadingSnapshot = false\n  }\n\n  getSelectionManager() {\n    return this.selectionManager\n  }\n\n  // Attachment manager delegate\n\n  attachmentManagerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Document controller delegate\n\n  compositionControllerWillSyncDocumentView() {\n    this.inputController.editorWillSyncDocumentView()\n    this.selectionManager.lock()\n    return this.selectionManager.clearSelection()\n  }\n\n  compositionControllerDidSyncDocumentView() {\n    this.inputController.editorDidSyncDocumentView()\n    this.selectionManager.unlock()\n    this.updateCurrentActions()\n    return this.notifyEditorElement(\"sync\")\n  }\n\n  compositionControllerDidRender() {\n    if (this.requestedLocationRange) {\n      if (this.compositionRevisionWhenLocationRangeRequested === this.composition.revision) {\n        this.selectionManager.setLocationRange(this.requestedLocationRange)\n      }\n      this.requestedLocationRange = null\n      this.compositionRevisionWhenLocationRangeRequested = null\n    }\n\n    if (this.renderedCompositionRevision !== this.composition.revision) {\n      this.runEditorFilters()\n      this.composition.updateCurrentAttributes()\n      this.notifyEditorElement(\"render\")\n    }\n\n    this.renderedCompositionRevision = this.composition.revision\n  }\n\n  compositionControllerDidFocus() {\n    if (this.isFocusedInvisibly()) {\n      this.setLocationRange({ index: 0, offset: 0 })\n    }\n    this.toolbarController.hideDialog()\n    return this.notifyEditorElement(\"focus\")\n  }\n\n  compositionControllerDidBlur() {\n    return this.notifyEditorElement(\"blur\")\n  }\n\n  compositionControllerDidSelectAttachment(attachment, options) {\n    this.toolbarController.hideDialog()\n    return this.composition.editAttachment(attachment, options)\n  }\n\n  compositionControllerDidRequestDeselectingAttachment(attachment) {\n    const locationRange = this.attachmentLocationRange || this.composition.document.getLocationRangeOfAttachment(attachment)\n    return this.selectionManager.setLocationRange(locationRange[1])\n  }\n\n  compositionControllerWillUpdateAttachment(attachment) {\n    return this.editor.recordUndoEntry(\"Edit Attachment\", { context: attachment.id, consolidatable: true })\n  }\n\n  compositionControllerDidRequestRemovalOfAttachment(attachment) {\n    return this.removeAttachment(attachment)\n  }\n\n  // Input controller delegate\n\n  inputControllerWillHandleInput() {\n    this.handlingInput = true\n    this.requestedRender = false\n  }\n\n  inputControllerDidRequestRender() {\n    this.requestedRender = true\n  }\n\n  inputControllerDidHandleInput() {\n    this.handlingInput = false\n    if (this.requestedRender) {\n      this.requestedRender = false\n      return this.render()\n    }\n  }\n\n  inputControllerDidAllowUnhandledInput() {\n    return this.notifyEditorElement(\"change\")\n  }\n\n  inputControllerDidRequestReparse() {\n    return this.reparse()\n  }\n\n  inputControllerWillPerformTyping() {\n    return this.recordTypingUndoEntry()\n  }\n\n  inputControllerWillPerformFormatting(attributeName) {\n    return this.recordFormattingUndoEntry(attributeName)\n  }\n\n  inputControllerWillCutText() {\n    return this.editor.recordUndoEntry(\"Cut\")\n  }\n\n  inputControllerWillPaste(paste) {\n    this.editor.recordUndoEntry(\"Paste\")\n    this.pasting = true\n    return this.notifyEditorElement(\"before-paste\", { paste })\n  }\n\n  inputControllerDidPaste(paste) {\n    paste.range = this.pastedRange\n    this.pastedRange = null\n    this.pasting = null\n    return this.notifyEditorElement(\"paste\", { paste })\n  }\n\n  inputControllerWillMoveText() {\n    return this.editor.recordUndoEntry(\"Move\")\n  }\n\n  inputControllerWillAttachFiles() {\n    return this.editor.recordUndoEntry(\"Drop Files\")\n  }\n\n  inputControllerWillPerformUndo() {\n    return this.editor.undo()\n  }\n\n  inputControllerWillPerformRedo() {\n    return this.editor.redo()\n  }\n\n  inputControllerDidReceiveKeyboardCommand(keys) {\n    return this.toolbarController.applyKeyboardCommand(keys)\n  }\n\n  inputControllerDidStartDrag() {\n    this.locationRangeBeforeDrag = this.selectionManager.getLocationRange()\n  }\n\n  inputControllerDidReceiveDragOverPoint(point) {\n    return this.selectionManager.setLocationRangeFromPointRange(point)\n  }\n\n  inputControllerDidCancelDrag() {\n    this.selectionManager.setLocationRange(this.locationRangeBeforeDrag)\n    this.locationRangeBeforeDrag = null\n  }\n\n  // Selection manager delegate\n\n  locationRangeDidChange(locationRange) {\n    this.composition.updateCurrentAttributes()\n    this.updateCurrentActions()\n    if (this.attachmentLocationRange && !rangesAreEqual(this.attachmentLocationRange, locationRange)) {\n      this.composition.stopEditingAttachment()\n    }\n    return this.notifyEditorElement(\"selection-change\")\n  }\n\n  // Toolbar controller delegate\n\n  toolbarDidClickButton() {\n    if (!this.getLocationRange()) {\n      return this.setLocationRange({ index: 0, offset: 0 })\n    }\n  }\n\n  toolbarDidInvokeAction(actionName, invokingElement) {\n    return this.invokeAction(actionName, invokingElement)\n  }\n\n  toolbarDidToggleAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.toggleCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidUpdateAttribute(attributeName, value) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.setCurrentAttribute(attributeName, value)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarDidRemoveAttribute(attributeName) {\n    this.recordFormattingUndoEntry(attributeName)\n    this.composition.removeCurrentAttribute(attributeName)\n    this.render()\n    if (!this.selectionFrozen) {\n      return this.editorElement.focus()\n    }\n  }\n\n  toolbarWillShowDialog(dialogElement) {\n    this.composition.expandSelectionForEditing()\n    return this.freezeSelection()\n  }\n\n  toolbarDidShowDialog(dialogName) {\n    return this.notifyEditorElement(\"toolbar-dialog-show\", { dialogName })\n  }\n\n  toolbarDidHideDialog(dialogName) {\n    this.thawSelection()\n    this.editorElement.focus()\n    return this.notifyEditorElement(\"toolbar-dialog-hide\", { dialogName })\n  }\n\n  // Selection\n\n  freezeSelection() {\n    if (!this.selectionFrozen) {\n      this.selectionManager.lock()\n      this.composition.freezeSelection()\n      this.selectionFrozen = true\n      return this.render()\n    }\n  }\n\n  thawSelection() {\n    if (this.selectionFrozen) {\n      this.composition.thawSelection()\n      this.selectionManager.unlock()\n      this.selectionFrozen = false\n      return this.render()\n    }\n  }\n\n  canInvokeAction(actionName) {\n    if (this.actionIsExternal(actionName)) {\n      return true\n    } else {\n      return !!this.actions[actionName]?.test?.call(this)\n    }\n  }\n\n  invokeAction(actionName, invokingElement) {\n    if (this.actionIsExternal(actionName)) {\n      return this.notifyEditorElement(\"action-invoke\", { actionName, invokingElement })\n    } else {\n      return this.actions[actionName]?.perform?.call(this)\n    }\n  }\n\n  actionIsExternal(actionName) {\n    return /^x-./.test(actionName)\n  }\n\n  getCurrentActions() {\n    const result = {}\n    for (const actionName in this.actions) {\n      result[actionName] = this.canInvokeAction(actionName)\n    }\n    return result\n  }\n\n  updateCurrentActions() {\n    const currentActions = this.getCurrentActions()\n    if (!objectsAreEqual(currentActions, this.currentActions)) {\n      this.currentActions = currentActions\n      this.toolbarController.updateActions(this.currentActions)\n      return this.notifyEditorElement(\"actions-change\", { actions: this.currentActions })\n    }\n  }\n\n  // Editor filters\n\n  runEditorFilters() {\n    let snapshot = this.composition.getSnapshot()\n\n    Array.from(this.editor.filters).forEach((filter) => {\n      const { document, selectedRange } = snapshot\n      snapshot = filter.call(this.editor, snapshot) || {}\n      if (!snapshot.document) {\n        snapshot.document = document\n      }\n      if (!snapshot.selectedRange) {\n        snapshot.selectedRange = selectedRange\n      }\n    })\n\n    if (!snapshotsAreEqual(snapshot, this.composition.getSnapshot())) {\n      return this.composition.loadSnapshot(snapshot)\n    }\n  }\n\n  // Private\n\n  updateInputElement() {\n    const element = this.compositionController.getSerializableElement()\n    const value = serializeToContentType(element, \"text/html\")\n    return this.editorElement.setInputElementValue(value)\n  }\n\n  notifyEditorElement(message, data) {\n    switch (message) {\n      case \"document-change\":\n        this.documentChangedSinceLastRender = true\n        break\n      case \"render\":\n        if (this.documentChangedSinceLastRender) {\n          this.documentChangedSinceLastRender = false\n          this.notifyEditorElement(\"change\")\n        }\n        break\n      case \"change\":\n      case \"attachment-add\":\n      case \"attachment-edit\":\n      case \"attachment-remove\":\n        this.updateInputElement()\n        break\n    }\n\n    return this.editorElement.notify(message, data)\n  }\n\n  removeAttachment(attachment) {\n    this.editor.recordUndoEntry(\"Delete Attachment\")\n    this.composition.removeAttachment(attachment)\n    return this.render()\n  }\n\n  recordFormattingUndoEntry(attributeName) {\n    const blockConfig = getBlockConfig(attributeName)\n    const locationRange = this.selectionManager.getLocationRange()\n    if (blockConfig || !rangeIsCollapsed(locationRange)) {\n      return this.editor.recordUndoEntry(\"Formatting\", { context: this.getUndoContext(), consolidatable: true })\n    }\n  }\n\n  recordTypingUndoEntry() {\n    return this.editor.recordUndoEntry(\"Typing\", {\n      context: this.getUndoContext(this.currentAttributes),\n      consolidatable: true,\n    })\n  }\n\n  getUndoContext(...context) {\n    return [ this.getLocationContext(), this.getTimeContext(), ...Array.from(context) ]\n  }\n\n  getLocationContext() {\n    const locationRange = this.selectionManager.getLocationRange()\n    if (rangeIsCollapsed(locationRange)) {\n      return locationRange[0].index\n    } else {\n      return locationRange\n    }\n  }\n\n  getTimeContext() {\n    if (config.undo.interval > 0) {\n      return Math.floor(new Date().getTime() / config.undo.interval)\n    } else {\n      return 0\n    }\n  }\n\n  isFocused() {\n    return this.editorElement === this.editorElement.ownerDocument?.activeElement\n  }\n\n  // Detect \"Cursor disappears sporadically\" Firefox bug.\n  // - https://bugzilla.mozilla.org/show_bug.cgi?id=226301\n  isFocusedInvisibly() {\n    return this.isFocused() && !this.getLocationRange()\n  }\n\n  get actions() {\n    return this.constructor.actions\n  }\n}\n\nEditorController.proxyMethod(\"getSelectionManager().setLocationRange\")\nEditorController.proxyMethod(\"getSelectionManager().getLocationRange\")\n", "import * as config from \"trix/config\"\n\nimport { installDefaultCSSForTagName } from \"trix/core/helpers\"\n\ninstallDefaultCSSForTagName(\"trix-toolbar\", `\\\n%t {\n  display: block;\n}\n\n%t {\n  white-space: nowrap;\n}\n\n%t [data-trix-dialog] {\n  display: none;\n}\n\n%t [data-trix-dialog][data-trix-active] {\n  display: block;\n}\n\n%t [data-trix-dialog] [data-trix-validate]:invalid {\n  background-color: #ffdddd;\n}`)\n\nexport default class TrixToolbarElement extends HTMLElement {\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (this.innerHTML === \"\") {\n      this.innerHTML = config.toolbar.getDefaultHTML()\n    }\n  }\n}\n", "import * as config from \"trix/config\"\n\nimport {\n  findClosestElementFromNode,\n  handleEvent,\n  handleEventOnce,\n  installDefaultCSSForTagName,\n  makeElement,\n  triggerEvent,\n} from \"trix/core/helpers\"\n\nimport { attachmentSelector } from \"trix/config/attachments\"\nimport EditorController from \"trix/controllers/editor_controller\"\nimport \"trix/elements/trix_toolbar_element\"\n\nlet id = 0\n\n// Contenteditable support helpers\n\nconst autofocus = function(element) {\n  if (!document.querySelector(\":focus\")) {\n    if (element.hasAttribute(\"autofocus\") && document.querySelector(\"[autofocus]\") === element) {\n      return element.focus()\n    }\n  }\n}\n\nconst makeEditable = function(element) {\n  if (element.hasAttribute(\"contenteditable\")) {\n    return\n  }\n  element.setAttribute(\"contenteditable\", \"\")\n  return handleEventOnce(\"focus\", {\n    onElement: element,\n    withCallback() {\n      return configureContentEditable(element)\n    },\n  })\n}\n\nconst configureContentEditable = function(element) {\n  disableObjectResizing(element)\n  return setDefaultParagraphSeparator(element)\n}\n\nconst disableObjectResizing = function(element) {\n  if (document.queryCommandSupported?.(\"enableObjectResizing\")) {\n    document.execCommand(\"enableObjectResizing\", false, false)\n    return handleEvent(\"mscontrolselect\", { onElement: element, preventDefault: true })\n  }\n}\n\nconst setDefaultParagraphSeparator = function(element) {\n  if (document.queryCommandSupported?.(\"DefaultParagraphSeparator\")) {\n    const { tagName } = config.blockAttributes.default\n    if ([ \"div\", \"p\" ].includes(tagName)) {\n      return document.execCommand(\"DefaultParagraphSeparator\", false, tagName)\n    }\n  }\n}\n\n// Accessibility helpers\n\nconst addAccessibilityRole = function(element) {\n  if (element.hasAttribute(\"role\")) {\n    return\n  }\n  return element.setAttribute(\"role\", \"textbox\")\n}\n\nconst ensureAriaLabel = function(element) {\n  if (element.hasAttribute(\"aria-label\") || element.hasAttribute(\"aria-labelledby\")) {\n    return\n  }\n\n  const update = function() {\n    const texts = Array.from(element.labels).map((label) => {\n      if (!label.contains(element)) return label.textContent\n    }).filter(text => text)\n\n    const text = texts.join(\" \")\n    if (text) {\n      return element.setAttribute(\"aria-label\", text)\n    } else {\n      return element.removeAttribute(\"aria-label\")\n    }\n  }\n  update()\n  return handleEvent(\"focus\", { onElement: element, withCallback: update })\n}\n\n// Style\n\nconst cursorTargetStyles = (function() {\n  if (config.browser.forcesObjectResizing) {\n    return {\n      display: \"inline\",\n      width: \"auto\",\n    }\n  } else {\n    return {\n      display: \"inline-block\",\n      width: \"1px\",\n    }\n  }\n})()\n\ninstallDefaultCSSForTagName(\"trix-editor\", `\\\n%t {\n    display: block;\n}\n\n%t:empty:not(:focus)::before {\n    content: attr(placeholder);\n    color: graytext;\n    cursor: text;\n    pointer-events: none;\n    white-space: pre-line;\n}\n\n%t a[contenteditable=false] {\n    cursor: text;\n}\n\n%t img {\n    max-width: 100%;\n    height: auto;\n}\n\n%t ${attachmentSelector} figcaption textarea {\n    resize: none;\n}\n\n%t ${attachmentSelector} figcaption textarea.trix-autoresize-clone {\n    position: absolute;\n    left: -9999px;\n    max-height: 0px;\n}\n\n%t ${attachmentSelector} figcaption[data-trix-placeholder]:empty::before {\n    content: attr(data-trix-placeholder);\n    color: graytext;\n}\n\n%t [data-trix-cursor-target] {\n    display: ${cursorTargetStyles.display} !important;\n    width: ${cursorTargetStyles.width} !important;\n    padding: 0 !important;\n    margin: 0 !important;\n    border: none !important;\n}\n\n%t [data-trix-cursor-target=left] {\n    vertical-align: top !important;\n    margin-left: -1px !important;\n}\n\n%t [data-trix-cursor-target=right] {\n    vertical-align: bottom !important;\n    margin-right: -1px !important;\n}`)\n\nexport default class TrixEditorElement extends HTMLElement {\n\n  // Properties\n\n  get trixId() {\n    if (this.hasAttribute(\"trix-id\")) {\n      return this.getAttribute(\"trix-id\")\n    } else {\n      this.setAttribute(\"trix-id\", ++id)\n      return this.trixId\n    }\n  }\n\n  get labels() {\n    const labels = []\n    if (this.id && this.ownerDocument) {\n      labels.push(...Array.from(this.ownerDocument.querySelectorAll(`label[for='${this.id}']`) || []))\n    }\n\n    const label = findClosestElementFromNode(this, { matchingSelector: \"label\" })\n    if (label) {\n      if ([ this, null ].includes(label.control)) {\n        labels.push(label)\n      }\n    }\n\n    return labels\n  }\n\n  get toolbarElement() {\n    if (this.hasAttribute(\"toolbar\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"toolbar\"))\n    } else if (this.parentNode) {\n      const toolbarId = `trix-toolbar-${this.trixId}`\n      this.setAttribute(\"toolbar\", toolbarId)\n      const element = makeElement(\"trix-toolbar\", { id: toolbarId })\n      this.parentNode.insertBefore(element, this)\n      return element\n    } else {\n      return undefined\n    }\n  }\n\n  get form() {\n    return this.inputElement?.form\n  }\n\n  get inputElement() {\n    if (this.hasAttribute(\"input\")) {\n      return this.ownerDocument?.getElementById(this.getAttribute(\"input\"))\n    } else if (this.parentNode) {\n      const inputId = `trix-input-${this.trixId}`\n      this.setAttribute(\"input\", inputId)\n      const element = makeElement(\"input\", { type: \"hidden\", id: inputId })\n      this.parentNode.insertBefore(element, this.nextElementSibling)\n      return element\n    } else {\n      return undefined\n    }\n  }\n\n  get editor() {\n    return this.editorController?.editor\n  }\n\n  get name() {\n    return this.inputElement?.name\n  }\n\n  get value() {\n    return this.inputElement?.value\n  }\n\n  set value(defaultValue) {\n    this.defaultValue = defaultValue\n    this.editor?.loadHTML(this.defaultValue)\n  }\n\n  // Controller delegate methods\n\n  notify(message, data) {\n    if (this.editorController) {\n      return triggerEvent(`trix-${message}`, { onElement: this, attributes: data })\n    }\n  }\n\n  setInputElementValue(value) {\n    if (this.inputElement) {\n      this.inputElement.value = value\n    }\n  }\n\n  // Element lifecycle\n\n  connectedCallback() {\n    if (!this.hasAttribute(\"data-trix-internal\")) {\n      makeEditable(this)\n      addAccessibilityRole(this)\n      ensureAriaLabel(this)\n\n      if (!this.editorController) {\n        triggerEvent(\"trix-before-initialize\", { onElement: this })\n        this.editorController = new EditorController({\n          editorElement: this,\n          html: this.defaultValue = this.value,\n        })\n        requestAnimationFrame(() => triggerEvent(\"trix-initialize\", { onElement: this }))\n      }\n      this.editorController.registerSelectionManager()\n      this.registerResetListener()\n      this.registerClickListener()\n      autofocus(this)\n    }\n  }\n\n  disconnectedCallback() {\n    this.editorController?.unregisterSelectionManager()\n    this.unregisterResetListener()\n    return this.unregisterClickListener()\n  }\n\n  // Form support\n\n  registerResetListener() {\n    this.resetListener = this.resetBubbled.bind(this)\n    return window.addEventListener(\"reset\", this.resetListener, false)\n  }\n\n  unregisterResetListener() {\n    return window.removeEventListener(\"reset\", this.resetListener, false)\n  }\n\n  registerClickListener() {\n    this.clickListener = this.clickBubbled.bind(this)\n    return window.addEventListener(\"click\", this.clickListener, false)\n  }\n\n  unregisterClickListener() {\n    return window.removeEventListener(\"click\", this.clickListener, false)\n  }\n\n  resetBubbled(event) {\n    if (event.defaultPrevented) return\n    if (event.target !== this.form) return\n    return this.reset()\n  }\n\n  clickBubbled(event) {\n    if (event.defaultPrevented) return\n    if (this.contains(event.target)) return\n\n    const label = findClosestElementFromNode(event.target, { matchingSelector: \"label\" })\n    if (!label) return\n\n    if (!Array.from(this.labels).includes(label)) return\n\n    return this.focus()\n  }\n\n  reset() {\n    this.value = this.defaultValue\n  }\n}\n", "import { version } from \"../../package.json\"\n\nimport * as config from \"trix/config\"\nimport * as core from \"trix/core\"\nimport * as models from \"trix/models\"\nimport * as views from \"trix/views\"\nimport * as controllers from \"trix/controllers\"\nimport * as observers from \"trix/observers\"\nimport * as operations from \"trix/operations\"\nimport * as elements from \"trix/elements\"\nimport * as filters from \"trix/filters\"\n\nconst Trix = {\n  VERSION: version,\n  config,\n  core,\n  models,\n  views,\n  controllers,\n  observers,\n  operations,\n  elements,\n  filters\n}\n\n// Expose models under the Trix constant for compatibility with v1\nObject.assign(Trix, models)\n\nfunction start() {\n  if (!customElements.get(\"trix-toolbar\")) {\n    customElements.define(\"trix-toolbar\", elements.TrixToolbarElement)\n  }\n\n  if (!customElements.get(\"trix-editor\")) {\n    customElements.define(\"trix-editor\", elements.TrixEditorElement)\n  }\n}\n\nwindow.Trix = Trix\nsetTimeout(start, 0)\n\nexport default Trix\n", "import { DirectUpload } from \"@rails/activestorage\"\n\nexport class AttachmentUpload {\n  constructor(attachment, element) {\n    this.attachment = attachment\n    this.element = element\n    this.directUpload = new DirectUpload(attachment.file, this.directUploadUrl, this)\n  }\n\n  start() {\n    this.directUpload.create(this.directUploadDidComplete.bind(this))\n  }\n\n  directUploadWillStoreFileWithXHR(xhr) {\n    xhr.upload.addEventListener(\"progress\", event => {\n      const progress = event.loaded / event.total * 100\n      this.attachment.setUploadProgress(progress)\n    })\n  }\n\n  directUploadDidComplete(error, attributes) {\n    if (error) {\n      throw new Error(`Direct upload failed: ${error}`)\n    }\n\n    this.attachment.setAttributes({\n      sgid: attributes.attachable_sgid,\n      url: this.createBlobUrl(attributes.signed_id, attributes.filename)\n    })\n  }\n\n  createBlobUrl(signedId, filename) {\n    return this.blobUrlTemplate\n      .replace(\":signed_id\", signedId)\n      .replace(\":filename\", encodeURIComponent(filename))\n  }\n\n  get directUploadUrl() {\n    return this.element.dataset.directUploadUrl\n  }\n\n  get blobUrlTemplate() {\n    return this.element.dataset.blobUrlTemplate\n  }\n}\n", "import { AttachmentUpload } from \"./attachment_upload\"\n\naddEventListener(\"trix-attachment-add\", event => {\n  const { attachment, target } = event\n\n  if (attachment.file) {\n    const upload = new AttachmentUpload(attachment, target)\n    upload.start()\n  }\n})\n", "document.addEventListener('turbo:load', function () {\n  !(function (t) {\n    var n = {};\n    function e(o) {\n      if (n[o]) return n[o].exports;\n      var a = (n[o] = { i: o, l: !1, exports: {} });\n      return t[o].call(a.exports, a, a.exports, e), (a.l = !0), a.exports;\n    }\n    (e.m = t),\n      (e.c = n),\n      (e.d = function (t, n, o) {\n        e.o(t, n) || Object.defineProperty(t, n, { enumerable: !0, get: o });\n      }),\n      (e.r = function (t) {\n        'undefined' != typeof Symbol &&\n          Symbol.toStringTag &&\n          Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }),\n          Object.defineProperty(t, '__esModule', { value: !0 });\n      }),\n      (e.t = function (t, n) {\n        if ((1 & n && (t = e(t)), 8 & n)) return t;\n        if (4 & n && 'object' == typeof t && t && t.__esModule) return t;\n        var o = Object.create(null);\n        if (\n          (e.r(o),\n          Object.defineProperty(o, 'default', { enumerable: !0, value: t }),\n          2 & n && 'string' != typeof t)\n        )\n          for (var a in t)\n            e.d(\n              o,\n              a,\n              function (n) {\n                return t[n];\n              }.bind(null, a)\n            );\n        return o;\n      }),\n      (e.n = function (t) {\n        var n =\n          t && t.__esModule\n            ? function () {\n                return t.default;\n              }\n            : function () {\n                return t;\n              };\n        return e.d(n, 'a', n), n;\n      }),\n      (e.o = function (t, n) {\n        return Object.prototype.hasOwnProperty.call(t, n);\n      }),\n      (e.p = ''),\n      e((e.s = 1));\n  })([\n    ,\n    function (t, n, e) {\n      'use strict';\n      e.r(n);\n      var o = {\n        Arial: { google_font_name: 'Arial', css_font_name: \"'Arial', cursive\" },\n        Cookie: {\n          google_font_name: 'Cookie',\n          css_font_name: \"'Cookie', cursive\",\n        },\n        Lato: { google_font_name: 'Lato', css_font_name: \"'Lato', cursive\" },\n        Comic: {\n          google_font_name: 'Comic+Neue',\n          css_font_name: \"'Comic Neue', cursive\",\n        },\n        Inter: { google_font_name: 'Inter', css_font_name: \"'Inter', cursive\" },\n        Bree: {\n          google_font_name: 'Bree+Serif',\n          css_font_name: \"'Bree Serif', cursive\",\n        },\n        Poppins: {\n          google_font_name: 'Poppins',\n          css_font_name: \"'Poppins', sans-serif\",\n        },\n      };\n      window.bmcBtnWidget =\n        window.bmcBtnWidget ||\n        function (\n          t,\n          n,\n          e,\n          a,\n          C = 'Cookie',\n          r = '#fff',\n          i = '#000',\n          l = '#fd0'\n        ) {\n          (a &&\n            (function () {\n              try {\n                let t = document.createElement('canvas').getContext('2d'),\n                  n = String.fromCharCode(55357) + String.fromCharCode(56835);\n                return (\n                  (t.textBaseline = 'top'),\n                  (t.font = '32px Arial'),\n                  t.fillText(n, 0, 0),\n                  0 !== t.getImageData(16, 16, 1, 1).data[0]\n                );\n              } catch {}\n            })() &&\n            '\u00E2\u2013\u00A1' != a) ||\n            (a =\n              '<svg viewBox=\"0 0 884 1279\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\\n<path d=\"M791.109 297.518L790.231 297.002L788.201 296.383C789.018 297.072 790.04 297.472 791.109 297.518Z\" fill=\"#0D0C22\"/>\\n<path d=\"M803.896 388.891L802.916 389.166L803.896 388.891Z\" fill=\"#0D0C22\"/>\\n<path d=\"M791.484 297.377C791.359 297.361 791.237 297.332 791.118 297.29C791.111 297.371 791.111 297.453 791.118 297.534C791.252 297.516 791.379 297.462 791.484 297.377Z\" fill=\"#0D0C22\"/>\\n<path d=\"M791.113 297.529H791.244V297.447L791.113 297.529Z\" fill=\"#0D0C22\"/>\\n<path d=\"M803.111 388.726L804.591 387.883L805.142 387.573L805.641 387.04C804.702 387.444 803.846 388.016 803.111 388.726Z\" fill=\"#0D0C22\"/>\\n<path d=\"M793.669 299.515L792.223 298.138L791.243 297.605C791.77 298.535 792.641 299.221 793.669 299.515Z\" fill=\"#0D0C22\"/>\\n<path d=\"M430.019 1186.18C428.864 1186.68 427.852 1187.46 427.076 1188.45L427.988 1187.87C428.608 1187.3 429.485 1186.63 430.019 1186.18Z\" fill=\"#0D0C22\"/>\\n<path d=\"M641.187 1144.63C641.187 1143.33 640.551 1143.57 640.705 1148.21C640.705 1147.84 640.86 1147.46 640.929 1147.1C641.015 1146.27 641.084 1145.46 641.187 1144.63Z\" fill=\"#0D0C22\"/>\\n<path d=\"M619.284 1186.18C618.129 1186.68 617.118 1187.46 616.342 1188.45L617.254 1187.87C617.873 1187.3 618.751 1186.63 619.284 1186.18Z\" fill=\"#0D0C22\"/>\\n<path d=\"M281.304 1196.06C280.427 1195.3 279.354 1194.8 278.207 1194.61C279.136 1195.06 280.065 1195.51 280.684 1195.85L281.304 1196.06Z\" fill=\"#0D0C22\"/>\\n<path d=\"M247.841 1164.01C247.704 1162.66 247.288 1161.35 246.619 1160.16C247.093 1161.39 247.489 1162.66 247.806 1163.94L247.841 1164.01Z\" fill=\"#0D0C22\"/>\\n<path class=\"logo-coffee\" d=\"M472.623 590.836C426.682 610.503 374.546 632.802 306.976 632.802C278.71 632.746 250.58 628.868 223.353 621.274L270.086 1101.08C271.74 1121.13 280.876 1139.83 295.679 1153.46C310.482 1167.09 329.87 1174.65 349.992 1174.65C349.992 1174.65 416.254 1178.09 438.365 1178.09C462.161 1178.09 533.516 1174.65 533.516 1174.65C553.636 1174.65 573.019 1167.08 587.819 1153.45C602.619 1139.82 611.752 1121.13 613.406 1101.08L663.459 570.876C641.091 563.237 618.516 558.161 593.068 558.161C549.054 558.144 513.591 573.303 472.623 590.836Z\" fill=\"#FFDD00\"/>\\n<path d=\"M78.6885 386.132L79.4799 386.872L79.9962 387.182C79.5987 386.787 79.1603 386.435 78.6885 386.132Z\" fill=\"#0D0C22\"/>\\n<path class=\"logo-outline\" d=\"M879.567 341.849L872.53 306.352C866.215 274.503 851.882 244.409 819.19 232.898C808.711 229.215 796.821 227.633 788.786 220.01C780.751 212.388 778.376 200.55 776.518 189.572C773.076 169.423 769.842 149.257 766.314 129.143C763.269 111.85 760.86 92.4243 752.928 76.56C742.604 55.2584 721.182 42.8009 699.88 34.559C688.965 30.4844 677.826 27.0375 666.517 24.2352C613.297 10.1947 557.342 5.03277 502.591 2.09047C436.875 -1.53577 370.983 -0.443234 305.422 5.35968C256.625 9.79894 205.229 15.1674 158.858 32.0469C141.91 38.224 124.445 45.6399 111.558 58.7341C95.7448 74.8221 90.5829 99.7026 102.128 119.765C110.336 134.012 124.239 144.078 138.985 150.737C158.192 159.317 178.251 165.846 198.829 170.215C256.126 182.879 315.471 187.851 374.007 189.968C438.887 192.586 503.87 190.464 568.44 183.618C584.408 181.863 600.347 179.758 616.257 177.304C634.995 174.43 647.022 149.928 641.499 132.859C634.891 112.453 617.134 104.538 597.055 107.618C594.095 108.082 591.153 108.512 588.193 108.942L586.06 109.252C579.257 110.113 572.455 110.915 565.653 111.661C551.601 113.175 537.515 114.414 523.394 115.378C491.768 117.58 460.057 118.595 428.363 118.647C397.219 118.647 366.058 117.769 334.983 115.722C320.805 114.793 306.661 113.611 292.552 112.177C286.134 111.506 279.733 110.801 273.333 110.009L267.241 109.235L265.917 109.046L259.602 108.134C246.697 106.189 233.792 103.953 221.025 101.251C219.737 100.965 218.584 100.249 217.758 99.2193C216.932 98.1901 216.482 96.9099 216.482 95.5903C216.482 94.2706 216.932 92.9904 217.758 91.9612C218.584 90.9319 219.737 90.2152 221.025 89.9293H221.266C232.33 87.5721 243.479 85.5589 254.663 83.8038C258.392 83.2188 262.131 82.6453 265.882 82.0832H265.985C272.988 81.6186 280.026 80.3625 286.994 79.5366C347.624 73.2301 408.614 71.0801 469.538 73.1014C499.115 73.9618 528.676 75.6996 558.116 78.6935C564.448 79.3474 570.746 80.0357 577.043 80.8099C579.452 81.1025 581.878 81.4465 584.305 81.7391L589.191 82.4445C603.438 84.5667 617.61 87.1419 631.708 90.1703C652.597 94.7128 679.422 96.1925 688.713 119.077C691.673 126.338 693.015 134.408 694.649 142.03L696.732 151.752C696.786 151.926 696.826 152.105 696.852 152.285C701.773 175.227 706.7 198.169 711.632 221.111C711.994 222.806 712.002 224.557 711.657 226.255C711.312 227.954 710.621 229.562 709.626 230.982C708.632 232.401 707.355 233.6 705.877 234.504C704.398 235.408 702.75 235.997 701.033 236.236H700.895L697.884 236.649L694.908 237.044C685.478 238.272 676.038 239.419 666.586 240.486C647.968 242.608 629.322 244.443 610.648 245.992C573.539 249.077 536.356 251.102 499.098 252.066C480.114 252.57 461.135 252.806 442.162 252.771C366.643 252.712 291.189 248.322 216.173 239.625C208.051 238.662 199.93 237.629 191.808 236.58C198.106 237.389 187.231 235.96 185.029 235.651C179.867 234.928 174.705 234.177 169.543 233.397C152.216 230.798 134.993 227.598 117.7 224.793C96.7944 221.352 76.8005 223.073 57.8906 233.397C42.3685 241.891 29.8055 254.916 21.8776 270.735C13.7217 287.597 11.2956 305.956 7.64786 324.075C4.00009 342.193 -1.67805 361.688 0.472751 380.288C5.10128 420.431 33.165 453.054 73.5313 460.35C111.506 467.232 149.687 472.807 187.971 477.556C338.361 495.975 490.294 498.178 641.155 484.129C653.44 482.982 665.708 481.732 677.959 480.378C681.786 479.958 685.658 480.398 689.292 481.668C692.926 482.938 696.23 485.005 698.962 487.717C701.694 490.429 703.784 493.718 705.08 497.342C706.377 500.967 706.846 504.836 706.453 508.665L702.633 545.797C694.936 620.828 687.239 695.854 679.542 770.874C671.513 849.657 663.431 928.434 655.298 1007.2C653.004 1029.39 650.71 1051.57 648.416 1073.74C646.213 1095.58 645.904 1118.1 641.757 1139.68C635.218 1173.61 612.248 1194.45 578.73 1202.07C548.022 1209.06 516.652 1212.73 485.161 1213.01C450.249 1213.2 415.355 1211.65 380.443 1211.84C343.173 1212.05 297.525 1208.61 268.756 1180.87C243.479 1156.51 239.986 1118.36 236.545 1085.37C231.957 1041.7 227.409 998.039 222.9 954.381L197.607 711.615L181.244 554.538C180.968 551.94 180.693 549.376 180.435 546.76C178.473 528.023 165.207 509.681 144.301 510.627C126.407 511.418 106.069 526.629 108.168 546.76L120.298 663.214L145.385 904.104C152.532 972.528 159.661 1040.96 166.773 1109.41C168.15 1122.52 169.44 1135.67 170.885 1148.78C178.749 1220.43 233.465 1259.04 301.224 1269.91C340.799 1276.28 381.337 1277.59 421.497 1278.24C472.979 1279.07 524.977 1281.05 575.615 1271.72C650.653 1257.95 706.952 1207.85 714.987 1130.13C717.282 1107.69 719.576 1085.25 721.87 1062.8C729.498 988.559 737.115 914.313 744.72 840.061L769.601 597.451L781.009 486.263C781.577 480.749 783.905 475.565 787.649 471.478C791.392 467.391 796.352 464.617 801.794 463.567C823.25 459.386 843.761 452.245 859.023 435.916C883.318 409.918 888.153 376.021 879.567 341.849ZM72.4301 365.835C72.757 365.68 72.1548 368.484 71.8967 369.792C71.8451 367.813 71.9483 366.058 72.4301 365.835ZM74.5121 381.94C74.6842 381.819 75.2003 382.508 75.7337 383.334C74.925 382.576 74.4089 382.009 74.4949 381.94H74.5121ZM76.5597 384.641C77.2996 385.897 77.6953 386.689 76.5597 384.641V384.641ZM80.672 387.979H80.7752C80.7752 388.1 80.9645 388.22 81.0333 388.341C80.9192 388.208 80.7925 388.087 80.6548 387.979H80.672ZM800.796 382.989C793.088 390.319 781.473 393.726 769.996 395.43C641.292 414.529 510.713 424.199 380.597 419.932C287.476 416.749 195.336 406.407 103.144 393.382C94.1102 392.109 84.3197 390.457 78.1082 383.798C66.4078 371.237 72.1548 345.944 75.2003 330.768C77.9878 316.865 83.3218 298.334 99.8572 296.355C125.667 293.327 155.64 304.218 181.175 308.09C211.917 312.781 242.774 316.538 273.745 319.36C405.925 331.405 540.325 329.529 671.92 311.91C695.906 308.686 719.805 304.941 743.619 300.674C764.835 296.871 788.356 289.731 801.175 311.703C809.967 326.673 811.137 346.701 809.778 363.615C809.359 370.984 806.139 377.915 800.779 382.989H800.796Z\" fill=\"#0D0C22\"/>\\n</svg>\\n');\n          const f =\n            '<style>.bmc-btn svg {\\n    height: 32px !important;\\n    margin-bottom: 0px !important;\\n    box-shadow: none !important;\\n    border: none !important;\\n    vertical-align: middle !important;\\n    transform: scale(0.9);\\n    flex-shrink: 0;\\n}\\n\\n.bmc-btn {\\n    min-width: 210px;\\n    color: [FONT_COLOR];\\n    background-color: [BG_COLOR] !important;\\n    height: 60px;\\n    border-radius: 12px;\\n    font-size: [FONT_SIZE];\\n    font-weight: [FONT_WEIGHT];\\n    border: none;\\n    padding: 0px 24px;\\n    line-height: 27px;\\n    text-decoration: none !important;\\n    display: inline-flex !important;\\n    align-items: center;\\n    font-family: [FONT] !important;\\n    -webkit-box-sizing: border-box !important;\\n    box-sizing: border-box !important;\\n}\\n\\n.bmc-btn:hover, .bmc-btn:active, .bmc-btn:focus {\\n    text-decoration: none !important;\\n    cursor: pointer;\\n}\\n\\n.bmc-btn-text {\\n   margin-left: 8px;\\n   display: inline-block;\\n   line-height: 0;\\n   width: 100%;\\n   flex-shrink: 0;\\n   font-family: [FONT] !important;\\n}\\n\\n.logo-outline {\\n    fill: [OUTLINE_COLOR];\\n}\\n\\n.logo-coffee {\\n    fill: [COFFEE_COLOR];\\n}</style>';\n          let c = `<link href=\"https://fonts.googleapis.com/css?family=${o[C].google_font_name}&display=swap\" rel=\"stylesheet\">`,\n            s = '28px',\n            p = 'Normal';\n          ('Arial' !== o[C].google_font_name &&\n            'Lato' !== o[C].google_font_name &&\n            'Comic' !== o[C].google_font_name &&\n            'Inter' !== o[C].google_font_name &&\n            'Bree+Serif' !== o[C].google_font_name &&\n            'Poppins' !== o[C].google_font_name) ||\n            ((s = '24px'), (p = 'Bold'));\n          const m =\n            c +\n            '<div class=\"bmc-btn-container\"><a class=\"bmc-btn\" ' +\n            `target=\"_blank\" href=\"https://buymeacoffee.com/${n}\">` +\n            `${a}<span class=\"bmc-btn-text\">${t}</span>` +\n            '</a></div>';\n          return (\n            f\n              .replace('[BG_COLOR]', e)\n              .replace('[FONT]', o[C].css_font_name)\n              .replace('[FONT_COLOR]', r)\n              .replace('[FONT_SIZE]', s)\n              .replace('[FONT_WEIGHT]', p)\n              .replace('[OUTLINE_COLOR]', i)\n              .replace('[COFFEE_COLOR]', l) + m\n          );\n        };\n      let buttons = document.querySelectorAll('div[data-name=\"bmc-button\"]');\n      buttons.forEach((a) => {\n        a.innerHTML = bmcBtnWidget(\n          a.getAttribute('data-text'),\n          a.getAttribute('data-slug'),\n          a.getAttribute('data-color'),\n          a.getAttribute('data-emoji'),\n          a.getAttribute('data-font'),\n          a.getAttribute('data-font-color'),\n          a.getAttribute('data-outline-color'),\n          a.getAttribute('data-coffee-color')\n        );\n      });\n    },\n  ]);\n});\n", "/**\n * jQuery.fn.sortElements\n * --------------\n * @author James Padolsey (http://james.padolsey.com)\n * @version 0.11\n * @updated 18-MAR-2010\n * --------------\n * @param Function comparator:\n *   Exactly the same behaviour as [1,2,3].sort(comparator)\n *   \n * @param Function getSortable\n *   A function that should return the element that is\n *   to be sorted. The comparator will run on the\n *   current collection, but you may want the actual\n *   resulting sort to occur on a parent or another\n *   associated element.\n *   \n *   E.g. $('td').sortElements(comparator, function(){\n *      return this.parentNode; \n *   })\n *   \n *   The <td>'s parent (<tr>) will be sorted instead\n *   of the <td> itself.\n */\njQuery.fn.sortElements = (function(){\n    \n  var sort = [].sort;\n  \n  return function(comparator, getSortable) {\n      \n      getSortable = getSortable || function(){return this;};\n      \n      var placements = this.map(function(){\n          \n          var sortElement = getSortable.call(this),\n              parentNode = sortElement.parentNode,\n              \n              // Since the element itself will change position, we have\n              // to have some way of storing it's original position in\n              // the DOM. The easiest way is to have a 'flag' node:\n              nextSibling = parentNode.insertBefore(\n                  document.createTextNode(''),\n                  sortElement.nextSibling\n              );\n          \n          return function() {\n              \n              if (parentNode === this) {\n                  throw new Error(\n                      \"You can't sort elements if any one is a descendant of another.\"\n                  );\n              }\n              \n              // Insert before flag:\n              parentNode.insertBefore(this, nextSibling);\n              // Remove flag:\n              parentNode.removeChild(nextSibling);\n              \n          };\n          \n      });\n     \n      return sort.call(this, comparator).each(function(i){\n          placements[i].call(getSortable.call(this));\n      });\n      \n  };\n  \n})();\n", "document.addEventListener('turbo:load', function () {\n  function initBehaviors(parentElement) {\n    // Fetch content\n    $(parentElement)\n      .find('[data-behavior~=fetch]')\n      .each(function () {\n        var that = this;\n        $.ajax(that.dataset.path, { credentials: 'include' })\n          .then(function (response) {\n            return response;\n          })\n          .then(function (html) {\n            $(that).html(html);\n            $(that).trigger('pnp:fetch');\n            initBehaviors(that);\n          })\n          .fail(function (error) {\n            $(that)\n              .find($('[data-behavior~=loading-text]'))\n              .text(`Error ${error.status}.`)\n              .addClass('text-danger')\n              .find('i')\n              .removeClass('fa-sync fa-spin')\n              .addClass('fa-exclamation-triangle');\n\n            console.error(error);\n          });\n      });\n  }\n  initBehaviors(document.querySelector('body'));\n});\n", "document.addEventListener('turbo:load', function () {\n  function updateFooterHeight() {\n    var footerHeight = Math.floor($('[data-behavior~=footer]').outerHeight());\n    $('[data-behavior~=body]').css('padding-bottom', footerHeight);\n    $('[data-behavior~=footer]').css('min-height', footerHeight);\n\n    if ($('.convertkit').length && $('.convertkit form').length < 1) {\n      setTimeout(() => {\n        updateFooterHeight();\n      }, 100);\n    }\n  }\n\n  updateFooterHeight();\n});\n", "class LocalAutoSave {\n  constructor(target) {\n    if (target.tagName !== 'FORM') { console.error('Can\\'t initialize local auto save on anything but a form'); return; }\n    this.cancelled = false;\n    this.debounceTimer = 250;\n    this.key = target.dataset.autoSaveKey;\n    this.submitted = false;\n    this.target = target;\n\n    // Don't store authenticity_token and utf8\n    this.excludedInputNames = ['utf8', 'authenticity_token', '_method'];\n\n    this.init();\n  }\n\n  init() {\n    this.behaviors();\n    this.restoreData();\n  }\n\n  behaviors() {\n    var that = this;\n\n    this.target.addEventListener('submit', function(event) {\n      that.submitted = true;\n      localStorage.removeItem(that.key);\n    });\n\n    var clearCacheElement = this.target.querySelector('[data-behavior~=clear-local-auto-save]');\n\n    if (clearCacheElement) {\n      clearCacheElement.addEventListener('click', function(event) {\n        that.cancelled = true;\n        localStorage.removeItem(that.key);\n      })\n    }\n\n    this.target.querySelectorAll('input, textarea, select, trix-editor').forEach(function(input) {\n      // Don't add event handler for submit button\n      if (input.type === 'button') { return true; }\n\n      $(input).on('keyup change trix-change', that.handleTextChange.bind(that));\n    })\n  }\n\n  handleTextChange() {\n    clearTimeout(this.debounceTimeout);\n\n    this.debounceTimeout = setTimeout(function() {\n      this.setData();\n    }.bind(this), this.debounceTimer);\n  }\n\n  getData() {\n    var that = this;\n    var data = new FormData(this.target);\n    var dataArray = Array.from(data).filter(function(dataElement) {\n      return !that.excludedInputNames.includes(dataElement[0]);\n    });\n\n    return dataArray;\n  }\n\n  restoreData() {\n    var that = this;\n    var data = JSON.parse(localStorage.getItem(this.key));\n\n    if (data !== null) {\n      // Deserialization of form data\n      // Reference: https://wildwolf.name/store-formdata-object-in-localstorage/\n      for (var item of data) {\n        var name = item[0];\n        var element = that.target.elements[name];\n\n        // Skip loop if element is undefined\n        if (!element) { continue; }\n\n        // RadioNodeList is an array of checkboxes, radio buttons, or select-multiple\n        if (element instanceof RadioNodeList) {\n          element.forEach(function(radioNodeListElement) {\n            if (['checkbox', 'radio'].includes(radioNodeListElement.type)) {\n              if (radioNodeListElement.value === item[1]) {\n                radioNodeListElement.checked = true;\n              }\n            } else if (['select-multiple'].includes(radioNodeListElement.type)) {\n              Array.prototype.forEach.call(radioNodeListElement.children, function(option) {\n                if (option.value == item[1]) {\n                  option.selected = true\n                }\n              })\n            }\n          })\n        } else if (element.type === 'checkbox') {\n          if (element.value === item[1]) {\n            element.checked = true;\n          }\n        } else if (element.type === 'file') {\n          element.value = '';\n        } else if (name == 'post[content]' && item[1] != '') {\n          var trixElement = document.querySelector(\"trix-editor\")\n          trixElement.editor.element.value = item[1]\n\n          var lastCharIndex = trixElement.editor.selectionManager.findLocationFromContainerAndOffset().offset\n          trixElement.focus()\n          trixElement.editor.setSelectedRange(lastCharIndex)\n        } else {\n          element.value = item[1];\n        }\n      }\n    }\n  }\n\n  setData() {\n    if (!this.cancelled && !this.submitted) {\n      localStorage.setItem(this.key, JSON.stringify(this.getData()));\n    } else {\n      this.submitted = false;\n    }\n  }\n}\n\ndocument.addEventListener(\"trix-initialize\", function(event) {\n  $('[data-behavior~=local-auto-save]').each(function() {\n    new LocalAutoSave(this);\n  });\n});\n", "document.addEventListener('turbo:load', function () {\n  const $navbar = $('.navbar');\n\n  $(window).on('scroll', function () {\n    if ($navbar.offset().top > $(window).height() / 7) {\n      $navbar.addClass('mini');\n    } else if ($navbar.offset().top < $(window).height() / 9) {\n      $navbar.removeClass('mini');\n    }\n  });\n});\n", "document.addEventListener('turbo:load', function () {\n  if ($('[data-behavior~=upload-image').length) {\n    function previewImage(input) {\n      if (input.files && input.files[0]) {\n        var reader = new FileReader();\n\n        reader.onload = function (e) {\n          $('[data-behavior~=upload-image').attr('src', e.target.result);\n        };\n\n        reader.readAsDataURL(input.files[0]);\n      }\n    }\n\n    if ($('[data-behavior~=img-upload-input').length) {\n      $('[data-behavior~=img-upload-input').on('change', function () {\n        previewImage(this);\n      });\n    }\n  }\n});\n", "document.addEventListener('turbo:load', function () {\n  $('[data-behavior~=sortable]').each(function () {\n    var $th = $(this),\n      thIndex = $th.index(),\n      inverse = false;\n    $th.on('click', function () {\n      $(this)\n        .parents('table')\n        .find('td')\n        .filter(function () {\n          return $(this).index() === thIndex;\n        })\n        .sortElements(\n          function (a, b) {\n            if ($.text([a]).match(/^\\$/)) {\n              a = $.text([a]).substring(1);\n              b = $.text([b]).substring(1);\n            }\n            if (!isNaN(a) && !isNaN(b)) {\n              return parseInt(a) > parseInt(b)\n                ? inverse\n                  ? -1\n                  : 1\n                : inverse\n                ? 1\n                : -1;\n            } else {\n              return $.text([a]).toLowerCase() > $.text([b]).toLowerCase()\n                ? inverse\n                  ? -1\n                  : 1\n                : inverse\n                ? 1\n                : -1;\n            }\n          },\n          function () {\n            return this.parentNode;\n          }\n        );\n      $(this)\n        .parents('table')\n        .find('th')\n        .removeClass('sorting-desc sorting-asc');\n      $(this).addClass(inverse ? 'sorting-desc' : 'sorting-asc');\n      inverse = !inverse;\n    });\n  });\n});\n", "window.addEventListener('trix-file-accept', function (event) {\n  const acceptedTypes = ['image/jpeg', 'image/png'];\n  if (!acceptedTypes.includes(event.file.type)) {\n    event.preventDefault();\n    alert('Attachment must be jpeg or png!');\n  }\n});\n\ndocument.addEventListener('turbo:load', function () {\n  $('figure img').each(function () {\n    var src = $(this).attr('src');\n    if (src.includes('store.poodlesandparrots.com')) {\n      src = src.replace('store.poodlesandparrots.com', 'poodlesandparrots.com');\n      $(this).attr('src', src);\n    }\n  });\n});\n", "import Trix from 'trix';\nimport Rails from '@rails/ujs';\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  Trix.config.blockAttributes.heading4 = { tagName: 'h4' };\n});\n\ndocument.addEventListener('trix-initialize', (event) => {\n  const toolbar = event.target.toolbarElement;\n  if (!toolbar) return;\n\n  setTimeout(() => {\n    const linkDialog = toolbar.querySelector('[data-trix-dialog=\"href\"]');\n    if (!linkDialog) return;\n\n    // Replace button group with custom buttons\n    const buttonGroup = linkDialog.querySelector('.trix-button-group');\n    if (buttonGroup) {\n      buttonGroup.outerHTML = `\n        <div class=\"flex\">\n          <input type=\"button\" class=\"btn btn-secondary btn-small mr-1\" value=\"Link\" data-trix-method=\"setAttribute\">\n          <input type=\"button\" class=\"btn btn-tertiary outline btn-small\" value=\"Unlink\" data-trix-method=\"removeAttribute\">\n        </div>\n      `;\n    }\n\n    // Add embed container if not exists\n    if (!linkDialog.querySelector('[data-behavior=\"embed-container\"]')) {\n      linkDialog.insertAdjacentHTML(\n        'beforeend',\n        `\n        <div data-behavior=\"embed-container\" style=\"display: none;\">\n          <div class=\"link_to_embed link_to_embed--new\">\n            Would you like to embed media from this site?\n            <input class=\"btn btn-primary btn-sm ml-1\" type=\"button\" data-behavior=\"embed_url\" value=\"Yes, embed it\">\n          </div>\n        </div>\n      `\n      );\n    }\n\n    try {\n      new EmbedController(event.target);\n    } catch (error) {\n      console.error('Error initializing EmbedController:', error);\n    }\n  }, 100);\n});\n\nclass EmbedController {\n  constructor(element) {\n    this.pattern = /^https:\\/\\/([^\\.]+\\.)?youtube\\.com\\/watch\\?v=([^&]*)/;\n    this.element = element;\n    this.editor = element.editor;\n    this.toolbar = element.toolbarElement;\n    this.currentEmbed = null;\n\n    if (!this.toolbar) return;\n\n    this.hrefElement = this.toolbar.querySelector(\n      \"[data-trix-input][name='href']\"\n    );\n    this.embedContainerElement = this.toolbar.querySelector(\n      \"[data-behavior='embed-container']\"\n    );\n    this.embedElement = this.toolbar.querySelector(\n      \"[data-behavior='embed_url']\"\n    );\n\n    this.reset();\n    this.installEventHandlers();\n  }\n\n  installEventHandlers() {\n    if (this.hrefElement) {\n      this.hrefElement.addEventListener('input', this.didInput.bind(this));\n      this.hrefElement.addEventListener('focusin', this.didInput.bind(this));\n    }\n    if (this.embedElement) {\n      this.embedElement.addEventListener('click', this.embed.bind(this));\n    }\n  }\n\n  didInput(event) {\n    const value = event.target.value.trim();\n    const matches = value.match(this.pattern);\n\n    if (matches) {\n      this.fetch(matches[2]);\n    } else {\n      this.reset();\n    }\n  }\n\n  fetch(value) {\n    Rails.ajax({\n      url: `/youtube/${encodeURIComponent(value)}`,\n      type: 'get',\n      error: this.reset.bind(this),\n      success: this.showEmbed.bind(this),\n    });\n  }\n\n  embed() {\n    if (!this.currentEmbed) return;\n\n    const attachment = new Trix.Attachment(this.currentEmbed);\n    this.editor.insertAttachment(attachment);\n    this.element.focus();\n  }\n\n  showEmbed(embed) {\n    this.currentEmbed = embed;\n    if (this.embedContainerElement) {\n      this.embedContainerElement.style.display = 'block';\n    }\n  }\n\n  reset() {\n    if (this.embedContainerElement) {\n      this.embedContainerElement.style.display = 'none';\n    }\n    this.currentEmbed = null;\n  }\n}\n", "document.addEventListener('turbo:load', function () {\n  if ($('body.pnpbe.posts').length) {\n    $('[data-behavior~=select]').select2({\n      allowClear: false,\n      closeOnSelect: false,\n      placeholder: 'Select Categories',\n    });\n\n    $('[data-behavior~=select]').on(\n      'select2:opening select2:closing',\n      function (event) {\n        var $searchfield = $(this).parent().find('.select2-search__field');\n        $searchfield.prop('disabled', true);\n      }\n    );\n\n    $('[data-behavior~=post-cover-image]').on('change', function () {\n      var fileName =\n        $(this).val() == ''\n          ? 'Upload cover image'\n          : $(this).val().split('\\\\').pop();\n      $(this).next().text(fileName);\n    });\n  }\n});\n", "document.addEventListener('turbo:load', function () {\n  if ($('body.pnpbe.products').length) {\n    $(window).on('pnp:fetch', function () {\n      let product_count = $(\n        '[data-behavior~=products-table] tbody tr:not(\".empty\")'\n      ).length;\n      $('[data-behavior~=product-count]').text(`(${product_count})`);\n      $('[data-behavior~=loading-text]').remove();\n    });\n  }\n\n  if ($('body.pnpbe.downloadables').length) {\n    $('[data-behavior~=select]').select2({\n      allowClear: true,\n      closeOnSelect: true,\n      placeholder: {\n        id: '-1',\n        text: 'Select Product for this File',\n        selected: 'selected',\n      },\n      theme: 'bootstrap4',\n    });\n\n    document\n      .querySelector('[data-behavior~=file-input]')\n      .addEventListener('change', function (event) {\n        var fileName = $(this).val().split('\\\\').pop();\n        var $label = $(this).parent().find('label');\n        $label.addClass('selected');\n        $label.text(fileName);\n\n        if (!$('[data-behavior~=file-name]').val()) {\n          var displayName = fileName.substring(0, fileName.lastIndexOf('.'));\n          $('[data-behavior~=file-name]').val(displayName + ' ebook');\n        }\n      });\n  }\n});\n", "document.addEventListener('turbo:load', function () {\n  if ($('body.cart.show').length) {\n    $('form').on('submit', function () {\n      let $btn = $('[data-behavior~=checkout-btn]', this);\n      let width = $btn.outerWidth();\n      $btn.hide();\n      $(this)\n        .find('.submit-box')\n        .addClass('btn btn-primary')\n        .css('width', `${width}px`)\n        .append(\n          '<div class=\"spinner-grow spinner-grow-sm\" role=\"status\"><span class=\"sr-only\">Loading...</span></div>'\n        );\n    });\n  }\n});\n", "document.addEventListener('turbo:load', function () {\n  if ($('body.contact.index').length) {\n    var forms = document.getElementsByClassName('needs-validation');\n    var validation = Array.prototype.filter.call(forms, function (form) {\n      form.addEventListener(\n        'submit',\n        function (event) {\n          if (form.checkValidity() === false) {\n            event.preventDefault();\n            event.stopPropagation();\n            $('input[type=submit]', this).val('Send').attr('disabled', false);\n          } else {\n            $('input[type=submit]', this)\n              .val('Sending...')\n              .attr('disabled', 'disabled');\n          }\n          form.classList.add('was-validated');\n        },\n        false\n      );\n    });\n  }\n});\n", "document.addEventListener('turbo:load', function () {\n  if ($('body.podcast').length) {\n    const fetchPath = $('[data-podcasts-path]').data('podcasts-path');\n    $.ajax(fetchPath, { credentials: 'include' })\n      .then(function (response) {\n        return response;\n      })\n      .then(function (podcasts) {\n        let newestPublicVideos = [];\n        $.each(podcasts, function (_index, podcast) {\n          if (podcast.snippet.description != 'This video is private.') {\n            newestPublicVideos.push(podcast);\n          }\n        });\n\n        const $podcastPlaceholder = $('[data-behavior~=podcast-placeholder]'),\n          latestPodcastVideoId =\n            newestPublicVideos[0].snippet.resource_id.video_id,\n          latestPodcastEmbedUrl = `https://www.youtube-nocookie.com/embed/${latestPodcastVideoId}`,\n          latestPodcastTitle = newestPublicVideos[0].snippet.title,\n          latestPodcastDescription = newestPublicVideos[0].snippet.description,\n          latestPodcastHtml = `\n            <div class=\"row podcast m-0\">\n              <div class=\"col-12 p-0\">\n                <div class=\"embed-responsive embed-responsive-16by9\">\n                  <iframe class=\"embed-responsive-item\" src=\"${latestPodcastEmbedUrl}\" allowfullscreen></iframe>\n                </div>\n              </div>\n              <div class=\"col-12 px-4 pt-4 pb-3\">\n                  <h4 class=\"line-clamp-2\" title=\"${latestPodcastTitle}\">\n                  <a href=\"https://youtube.com/watch?v=${latestPodcastVideoId}\" target=\"_blank\">${latestPodcastTitle}</a>\n                  </h4>\n                  <p class=\"line-clamp-4 mb-0\">${latestPodcastDescription}</p>\n                </div>\n            </div>\n          `;\n\n        $podcastPlaceholder\n          .removeClass('loading')\n          .empty()\n          .append(latestPodcastHtml);\n\n        const $podcastFeedPlaceholder = $(\n            '[data-behavior~=podcast-feed-placeholder]'\n          ),\n          $podcastFeedContent = $('[data-behavior~=podcast-feed-content]');\n\n        newestPublicVideos.forEach((podcast, index) => {\n          if (podcast == newestPublicVideos[0]) {\n            return;\n          }\n\n          const podcastVideoId = podcast.snippet.resource_id.video_id,\n            podcastEmbedUrl = `https://www.youtube-nocookie.com/embed/${podcastVideoId}`,\n            podcastTitle = podcast.snippet.title,\n            podcastDescription = podcast.snippet.description,\n            podcastHTML = `\n              <div class=\"row podcast\">\n                <div class=\"col-12 col-lg-5 col-xl-4 p-0\">\n                  <div class=\"embed-responsive embed-responsive-16by9\">\n                    <iframe class=\"embed-responsive-item\" src=\"${podcastEmbedUrl}\" allowfullscreen></iframe>\n                  </div>\n                </div>\n                <div class=\"col-12 col-lg-7 col-xl-8 px-4 pt-4 pb-3\">\n                  <h4 class=\"line-clamp-2\" title=\"${podcastTitle}\">\n                  <a href=\"https://youtube.com/watch?v=${podcastVideoId}\" target=\"_blank\">${podcastTitle}</a>\n                  </h4>\n                  <p class=\"line-clamp-4 mb-0\">${podcastDescription}</p>\n                </div>\n              </div>\n            `;\n\n          $podcastFeedContent.append(podcastHTML);\n        });\n\n        $podcastFeedPlaceholder\n          .removeClass('loading')\n          .find('.placeholder-loading')\n          .addClass('d-none');\n\n        $podcastFeedContent.removeClass('d-none');\n      })\n      .fail(function (error) {\n        console.error(error);\n\n        const $podcastPlaceholder = $('[data-behavior~=podcast-placeholder]'),\n          $podcastFeedPlaceholder = $(\n            '[data-behavior~=podcast-feed-placeholder]'\n          );\n\n        $podcastPlaceholder\n          .find('.placeholder-error')\n          .removeClass('d-none')\n          .end()\n          .find('.placeholder-loading')\n          .addClass('d-none');\n\n        $podcastFeedPlaceholder\n          .find('.placeholder-error')\n          .removeClass('d-none')\n          .end()\n          .find('.placeholder-loading')\n          .addClass('d-none');\n      });\n  }\n});\n", "// Entry point for the build script in your package.json\n\nimport Rails from '@rails/ujs';\n//import Turbolinks from \"turbolinks\"\nimport * as ActiveStorage from '@rails/activestorage';\n\nRails.start();\nActiveStorage.start();\n\nimport '@hotwired/turbo-rails';\nimport './controllers';\n\nrequire('trix');\nrequire('@rails/actiontext');\n\nrequire('./packs/vendor/buy_me_a_coffee.js');\nrequire('./packs/vendor/sort_elements.js');\n\nrequire('./packs/modules/fetch_content.js');\nrequire('./packs/modules/footer-height.js');\nrequire('./packs/modules/local_auto_save.js');\nrequire('./packs/modules/navbar.js');\nrequire('./packs/modules/preview_image.js');\nrequire('./packs/modules/sortable.js');\nrequire('./packs/modules/trix-editor-overrides.js');\nrequire('./packs/modules/youtube_embed.js');\n\nrequire('./packs/pages/pnp_be/posts.js');\nrequire('./packs/pages/pnp_be/products.js');\n\nrequire('./packs/pages/cart.js');\nrequire('./packs/pages/contact.js');\nrequire('./packs/pages/podcast.js');\n", "/*\nTurbo 7.2.4\nCopyright \u00A9 2022 37signals LLC\n */\n(function () {\n    if (window.Reflect === undefined ||\n        window.customElements === undefined ||\n        window.customElements.polyfillWrapFlushCallback) {\n        return;\n    }\n    const BuiltInHTMLElement = HTMLElement;\n    const wrapperForTheName = {\n        HTMLElement: function HTMLElement() {\n            return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n        },\n    };\n    window.HTMLElement = wrapperForTheName[\"HTMLElement\"];\n    HTMLElement.prototype = BuiltInHTMLElement.prototype;\n    HTMLElement.prototype.constructor = HTMLElement;\n    Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(prototype) {\n  if (typeof prototype.requestSubmit == \"function\") return\n\n  prototype.requestSubmit = function(submitter) {\n    if (submitter) {\n      validateSubmitter(submitter, this);\n      submitter.click();\n    } else {\n      submitter = document.createElement(\"input\");\n      submitter.type = \"submit\";\n      submitter.hidden = true;\n      this.appendChild(submitter);\n      submitter.click();\n      this.removeChild(submitter);\n    }\n  };\n\n  function validateSubmitter(submitter, form) {\n    submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n    submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n    submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n  }\n\n  function raise(errorConstructor, message, name) {\n    throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name)\n  }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n    const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n    const candidate = element ? element.closest(\"input, button\") : null;\n    return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n    const submitter = findSubmitterFromClickTarget(event.target);\n    if (submitter && submitter.form) {\n        submittersByForm.set(submitter.form, submitter);\n    }\n}\n(function () {\n    if (\"submitter\" in Event.prototype)\n        return;\n    let prototype;\n    if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n        prototype = window.SubmitEvent.prototype;\n    }\n    else if (\"SubmitEvent\" in window) {\n        return;\n    }\n    else {\n        prototype = window.Event.prototype;\n    }\n    addEventListener(\"click\", clickCaptured, true);\n    Object.defineProperty(prototype, \"submitter\", {\n        get() {\n            if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n                return submittersByForm.get(this.target);\n            }\n        },\n    });\n})();\n\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n    FrameLoadingStyle[\"eager\"] = \"eager\";\n    FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n    constructor() {\n        super();\n        this.loaded = Promise.resolve();\n        this.delegate = new FrameElement.delegateConstructor(this);\n    }\n    static get observedAttributes() {\n        return [\"disabled\", \"complete\", \"loading\", \"src\"];\n    }\n    connectedCallback() {\n        this.delegate.connect();\n    }\n    disconnectedCallback() {\n        this.delegate.disconnect();\n    }\n    reload() {\n        return this.delegate.sourceURLReloaded();\n    }\n    attributeChangedCallback(name) {\n        if (name == \"loading\") {\n            this.delegate.loadingStyleChanged();\n        }\n        else if (name == \"complete\") {\n            this.delegate.completeChanged();\n        }\n        else if (name == \"src\") {\n            this.delegate.sourceURLChanged();\n        }\n        else {\n            this.delegate.disabledChanged();\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\");\n    }\n    set src(value) {\n        if (value) {\n            this.setAttribute(\"src\", value);\n        }\n        else {\n            this.removeAttribute(\"src\");\n        }\n    }\n    get loading() {\n        return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n    }\n    set loading(value) {\n        if (value) {\n            this.setAttribute(\"loading\", value);\n        }\n        else {\n            this.removeAttribute(\"loading\");\n        }\n    }\n    get disabled() {\n        return this.hasAttribute(\"disabled\");\n    }\n    set disabled(value) {\n        if (value) {\n            this.setAttribute(\"disabled\", \"\");\n        }\n        else {\n            this.removeAttribute(\"disabled\");\n        }\n    }\n    get autoscroll() {\n        return this.hasAttribute(\"autoscroll\");\n    }\n    set autoscroll(value) {\n        if (value) {\n            this.setAttribute(\"autoscroll\", \"\");\n        }\n        else {\n            this.removeAttribute(\"autoscroll\");\n        }\n    }\n    get complete() {\n        return !this.delegate.isLoading;\n    }\n    get isActive() {\n        return this.ownerDocument === document && !this.isPreview;\n    }\n    get isPreview() {\n        var _a, _b;\n        return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n    }\n}\nfunction frameLoadingStyleFromString(style) {\n    switch (style.toLowerCase()) {\n        case \"lazy\":\n            return FrameLoadingStyle.lazy;\n        default:\n            return FrameLoadingStyle.eager;\n    }\n}\n\nfunction expandURL(locatable) {\n    return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n    let anchorMatch;\n    if (url.hash) {\n        return url.hash.slice(1);\n    }\n    else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n        return anchorMatch[1];\n    }\n}\nfunction getAction(form, submitter) {\n    const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n    return expandURL(action);\n}\nfunction getExtension(url) {\n    return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n    return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml|php))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n    const prefix = getPrefix(url);\n    return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n    return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n    const anchor = getAnchor(url);\n    return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n    return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n    return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n    return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n    return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n    return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n    return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n    constructor(response) {\n        this.response = response;\n    }\n    get succeeded() {\n        return this.response.ok;\n    }\n    get failed() {\n        return !this.succeeded;\n    }\n    get clientError() {\n        return this.statusCode >= 400 && this.statusCode <= 499;\n    }\n    get serverError() {\n        return this.statusCode >= 500 && this.statusCode <= 599;\n    }\n    get redirected() {\n        return this.response.redirected;\n    }\n    get location() {\n        return expandURL(this.response.url);\n    }\n    get isHTML() {\n        return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n    }\n    get statusCode() {\n        return this.response.status;\n    }\n    get contentType() {\n        return this.header(\"Content-Type\");\n    }\n    get responseText() {\n        return this.response.clone().text();\n    }\n    get responseHTML() {\n        if (this.isHTML) {\n            return this.response.clone().text();\n        }\n        else {\n            return Promise.resolve(undefined);\n        }\n    }\n    header(name) {\n        return this.response.headers.get(name);\n    }\n}\n\nfunction isAction(action) {\n    return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nfunction activateScriptElement(element) {\n    if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n        return element;\n    }\n    else {\n        const createdScriptElement = document.createElement(\"script\");\n        const cspNonce = getMetaContent(\"csp-nonce\");\n        if (cspNonce) {\n            createdScriptElement.nonce = cspNonce;\n        }\n        createdScriptElement.textContent = element.textContent;\n        createdScriptElement.async = false;\n        copyElementAttributes(createdScriptElement, element);\n        return createdScriptElement;\n    }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n    for (const { name, value } of sourceElement.attributes) {\n        destinationElement.setAttribute(name, value);\n    }\n}\nfunction createDocumentFragment(html) {\n    const template = document.createElement(\"template\");\n    template.innerHTML = html;\n    return template.content;\n}\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n    const event = new CustomEvent(eventName, {\n        cancelable,\n        bubbles: true,\n        detail,\n    });\n    if (target && target.isConnected) {\n        target.dispatchEvent(event);\n    }\n    else {\n        document.documentElement.dispatchEvent(event);\n    }\n    return event;\n}\nfunction nextAnimationFrame() {\n    return new Promise((resolve) => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n    return new Promise((resolve) => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n    return Promise.resolve();\n}\nfunction parseHTMLDocument(html = \"\") {\n    return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings, ...values) {\n    const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n    const match = lines[0].match(/^\\s+/);\n    const indent = match ? match[0].length : 0;\n    return lines.map((line) => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n    return strings.reduce((result, string, i) => {\n        const value = values[i] == undefined ? \"\" : values[i];\n        return result + string + value;\n    }, \"\");\n}\nfunction uuid() {\n    return Array.from({ length: 36 })\n        .map((_, i) => {\n        if (i == 8 || i == 13 || i == 18 || i == 23) {\n            return \"-\";\n        }\n        else if (i == 14) {\n            return \"4\";\n        }\n        else if (i == 19) {\n            return (Math.floor(Math.random() * 4) + 8).toString(16);\n        }\n        else {\n            return Math.floor(Math.random() * 15).toString(16);\n        }\n    })\n        .join(\"\");\n}\nfunction getAttribute(attributeName, ...elements) {\n    for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n        if (typeof value == \"string\")\n            return value;\n    }\n    return null;\n}\nfunction hasAttribute(attributeName, ...elements) {\n    return elements.some((element) => element && element.hasAttribute(attributeName));\n}\nfunction markAsBusy(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.setAttribute(\"busy\", \"\");\n        }\n        element.setAttribute(\"aria-busy\", \"true\");\n    }\n}\nfunction clearBusyState(...elements) {\n    for (const element of elements) {\n        if (element.localName == \"turbo-frame\") {\n            element.removeAttribute(\"busy\");\n        }\n        element.removeAttribute(\"aria-busy\");\n    }\n}\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n    return new Promise((resolve) => {\n        const onComplete = () => {\n            element.removeEventListener(\"error\", onComplete);\n            element.removeEventListener(\"load\", onComplete);\n            resolve();\n        };\n        element.addEventListener(\"load\", onComplete, { once: true });\n        element.addEventListener(\"error\", onComplete, { once: true });\n        setTimeout(resolve, timeoutInMilliseconds);\n    });\n}\nfunction getHistoryMethodForAction(action) {\n    switch (action) {\n        case \"replace\":\n            return history.replaceState;\n        case \"advance\":\n        case \"restore\":\n            return history.pushState;\n    }\n}\nfunction getVisitAction(...elements) {\n    const action = getAttribute(\"data-turbo-action\", ...elements);\n    return isAction(action) ? action : null;\n}\nfunction getMetaElement(name) {\n    return document.querySelector(`meta[name=\"${name}\"]`);\n}\nfunction getMetaContent(name) {\n    const element = getMetaElement(name);\n    return element && element.content;\n}\nfunction setMetaContent(name, content) {\n    let element = getMetaElement(name);\n    if (!element) {\n        element = document.createElement(\"meta\");\n        element.setAttribute(\"name\", name);\n        document.head.appendChild(element);\n    }\n    element.setAttribute(\"content\", content);\n    return element;\n}\n\nvar FetchMethod;\n(function (FetchMethod) {\n    FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n    FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n    FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n    FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n    FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n    switch (method.toLowerCase()) {\n        case \"get\":\n            return FetchMethod.get;\n        case \"post\":\n            return FetchMethod.post;\n        case \"put\":\n            return FetchMethod.put;\n        case \"patch\":\n            return FetchMethod.patch;\n        case \"delete\":\n            return FetchMethod.delete;\n    }\n}\nclass FetchRequest {\n    constructor(delegate, method, location, body = new URLSearchParams(), target = null) {\n        this.abortController = new AbortController();\n        this.resolveRequestPromise = (_value) => { };\n        this.delegate = delegate;\n        this.method = method;\n        this.headers = this.defaultHeaders;\n        this.body = body;\n        this.url = location;\n        this.target = target;\n    }\n    get location() {\n        return this.url;\n    }\n    get params() {\n        return this.url.searchParams;\n    }\n    get entries() {\n        return this.body ? Array.from(this.body.entries()) : [];\n    }\n    cancel() {\n        this.abortController.abort();\n    }\n    async perform() {\n        var _a, _b;\n        const { fetchOptions } = this;\n        (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n        await this.allowRequestToBeIntercepted(fetchOptions);\n        try {\n            this.delegate.requestStarted(this);\n            const response = await fetch(this.url.href, fetchOptions);\n            return await this.receive(response);\n        }\n        catch (error) {\n            if (error.name !== \"AbortError\") {\n                if (this.willDelegateErrorHandling(error)) {\n                    this.delegate.requestErrored(this, error);\n                }\n                throw error;\n            }\n        }\n        finally {\n            this.delegate.requestFinished(this);\n        }\n    }\n    async receive(response) {\n        const fetchResponse = new FetchResponse(response);\n        const event = dispatch(\"turbo:before-fetch-response\", {\n            cancelable: true,\n            detail: { fetchResponse },\n            target: this.target,\n        });\n        if (event.defaultPrevented) {\n            this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n        }\n        else if (fetchResponse.succeeded) {\n            this.delegate.requestSucceededWithResponse(this, fetchResponse);\n        }\n        else {\n            this.delegate.requestFailedWithResponse(this, fetchResponse);\n        }\n        return fetchResponse;\n    }\n    get fetchOptions() {\n        var _a;\n        return {\n            method: FetchMethod[this.method].toUpperCase(),\n            credentials: \"same-origin\",\n            headers: this.headers,\n            redirect: \"follow\",\n            body: this.isIdempotent ? null : this.body,\n            signal: this.abortSignal,\n            referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,\n        };\n    }\n    get defaultHeaders() {\n        return {\n            Accept: \"text/html, application/xhtml+xml\",\n        };\n    }\n    get isIdempotent() {\n        return this.method == FetchMethod.get;\n    }\n    get abortSignal() {\n        return this.abortController.signal;\n    }\n    acceptResponseType(mimeType) {\n        this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n    }\n    async allowRequestToBeIntercepted(fetchOptions) {\n        const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));\n        const event = dispatch(\"turbo:before-fetch-request\", {\n            cancelable: true,\n            detail: {\n                fetchOptions,\n                url: this.url,\n                resume: this.resolveRequestPromise,\n            },\n            target: this.target,\n        });\n        if (event.defaultPrevented)\n            await requestInterception;\n    }\n    willDelegateErrorHandling(error) {\n        const event = dispatch(\"turbo:fetch-request-error\", {\n            target: this.target,\n            cancelable: true,\n            detail: { request: this, error: error },\n        });\n        return !event.defaultPrevented;\n    }\n}\n\nclass AppearanceObserver {\n    constructor(delegate, element) {\n        this.started = false;\n        this.intersect = (entries) => {\n            const lastEntry = entries.slice(-1)[0];\n            if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n                this.delegate.elementAppearedInViewport(this.element);\n            }\n        };\n        this.delegate = delegate;\n        this.element = element;\n        this.intersectionObserver = new IntersectionObserver(this.intersect);\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.intersectionObserver.observe(this.element);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.intersectionObserver.unobserve(this.element);\n        }\n    }\n}\n\nclass StreamMessage {\n    constructor(fragment) {\n        this.fragment = importStreamElements(fragment);\n    }\n    static wrap(message) {\n        if (typeof message == \"string\") {\n            return new this(createDocumentFragment(message));\n        }\n        else {\n            return message;\n        }\n    }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nfunction importStreamElements(fragment) {\n    for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n        const streamElement = document.importNode(element, true);\n        for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n            inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n        }\n        element.replaceWith(streamElement);\n    }\n    return fragment;\n}\n\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n    FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n    FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n    FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n    FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n    FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n    FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n    FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n    FormEnctype[\"multipart\"] = \"multipart/form-data\";\n    FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n    switch (encoding.toLowerCase()) {\n        case FormEnctype.multipart:\n            return FormEnctype.multipart;\n        case FormEnctype.plain:\n            return FormEnctype.plain;\n        default:\n            return FormEnctype.urlEncoded;\n    }\n}\nclass FormSubmission {\n    constructor(delegate, formElement, submitter, mustRedirect = false) {\n        this.state = FormSubmissionState.initialized;\n        this.delegate = delegate;\n        this.formElement = formElement;\n        this.submitter = submitter;\n        this.formData = buildFormData(formElement, submitter);\n        this.location = expandURL(this.action);\n        if (this.method == FetchMethod.get) {\n            mergeFormDataEntries(this.location, [...this.body.entries()]);\n        }\n        this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n        this.mustRedirect = mustRedirect;\n    }\n    static confirmMethod(message, _element, _submitter) {\n        return Promise.resolve(confirm(message));\n    }\n    get method() {\n        var _a;\n        const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n        return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n    }\n    get action() {\n        var _a;\n        const formElementAction = typeof this.formElement.action === \"string\" ? this.formElement.action : null;\n        if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"formaction\")) {\n            return this.submitter.getAttribute(\"formaction\") || \"\";\n        }\n        else {\n            return this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n        }\n    }\n    get body() {\n        if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n            return new URLSearchParams(this.stringFormData);\n        }\n        else {\n            return this.formData;\n        }\n    }\n    get enctype() {\n        var _a;\n        return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n    }\n    get isIdempotent() {\n        return this.fetchRequest.isIdempotent;\n    }\n    get stringFormData() {\n        return [...this.formData].reduce((entries, [name, value]) => {\n            return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n        }, []);\n    }\n    async start() {\n        const { initialized, requesting } = FormSubmissionState;\n        const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n        if (typeof confirmationMessage === \"string\") {\n            const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);\n            if (!answer) {\n                return;\n            }\n        }\n        if (this.state == initialized) {\n            this.state = requesting;\n            return this.fetchRequest.perform();\n        }\n    }\n    stop() {\n        const { stopping, stopped } = FormSubmissionState;\n        if (this.state != stopping && this.state != stopped) {\n            this.state = stopping;\n            this.fetchRequest.cancel();\n            return true;\n        }\n    }\n    prepareHeadersForRequest(headers, request) {\n        if (!request.isIdempotent) {\n            const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n            if (token) {\n                headers[\"X-CSRF-Token\"] = token;\n            }\n        }\n        if (this.requestAcceptsTurboStreamResponse(request)) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        var _a;\n        this.state = FormSubmissionState.waiting;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n        dispatch(\"turbo:submit-start\", {\n            target: this.formElement,\n            detail: { formSubmission: this },\n        });\n        this.delegate.formSubmissionStarted(this);\n    }\n    requestPreventedHandlingResponse(request, response) {\n        this.result = { success: response.succeeded, fetchResponse: response };\n    }\n    requestSucceededWithResponse(request, response) {\n        if (response.clientError || response.serverError) {\n            this.delegate.formSubmissionFailedWithResponse(this, response);\n        }\n        else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n            const error = new Error(\"Form responses must redirect to another location\");\n            this.delegate.formSubmissionErrored(this, error);\n        }\n        else {\n            this.state = FormSubmissionState.receiving;\n            this.result = { success: true, fetchResponse: response };\n            this.delegate.formSubmissionSucceededWithResponse(this, response);\n        }\n    }\n    requestFailedWithResponse(request, response) {\n        this.result = { success: false, fetchResponse: response };\n        this.delegate.formSubmissionFailedWithResponse(this, response);\n    }\n    requestErrored(request, error) {\n        this.result = { success: false, error };\n        this.delegate.formSubmissionErrored(this, error);\n    }\n    requestFinished(_request) {\n        var _a;\n        this.state = FormSubmissionState.stopped;\n        (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n        dispatch(\"turbo:submit-end\", {\n            target: this.formElement,\n            detail: Object.assign({ formSubmission: this }, this.result),\n        });\n        this.delegate.formSubmissionFinished(this);\n    }\n    requestMustRedirect(request) {\n        return !request.isIdempotent && this.mustRedirect;\n    }\n    requestAcceptsTurboStreamResponse(request) {\n        return !request.isIdempotent || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n    }\n}\nfunction buildFormData(formElement, submitter) {\n    const formData = new FormData(formElement);\n    const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n    const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n    if (name) {\n        formData.append(name, value || \"\");\n    }\n    return formData;\n}\nfunction getCookieValue(cookieName) {\n    if (cookieName != null) {\n        const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n        const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n        if (cookie) {\n            const value = cookie.split(\"=\").slice(1).join(\"=\");\n            return value ? decodeURIComponent(value) : undefined;\n        }\n    }\n}\nfunction responseSucceededWithoutRedirect(response) {\n    return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n    const searchParams = new URLSearchParams();\n    for (const [name, value] of entries) {\n        if (value instanceof File)\n            continue;\n        searchParams.append(name, value);\n    }\n    url.search = searchParams.toString();\n    return url;\n}\n\nclass Snapshot {\n    constructor(element) {\n        this.element = element;\n    }\n    get activeElement() {\n        return this.element.ownerDocument.activeElement;\n    }\n    get children() {\n        return [...this.element.children];\n    }\n    hasAnchor(anchor) {\n        return this.getElementForAnchor(anchor) != null;\n    }\n    getElementForAnchor(anchor) {\n        return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n    }\n    get isConnected() {\n        return this.element.isConnected;\n    }\n    get firstAutofocusableElement() {\n        const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n        for (const element of this.element.querySelectorAll(\"[autofocus]\")) {\n            if (element.closest(inertDisabledOrHidden) == null)\n                return element;\n            else\n                continue;\n        }\n        return null;\n    }\n    get permanentElements() {\n        return queryPermanentElementsAll(this.element);\n    }\n    getPermanentElementById(id) {\n        return getPermanentElementById(this.element, id);\n    }\n    getPermanentElementMapForSnapshot(snapshot) {\n        const permanentElementMap = {};\n        for (const currentPermanentElement of this.permanentElements) {\n            const { id } = currentPermanentElement;\n            const newPermanentElement = snapshot.getPermanentElementById(id);\n            if (newPermanentElement) {\n                permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n            }\n        }\n        return permanentElementMap;\n    }\n}\nfunction getPermanentElementById(node, id) {\n    return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\nfunction queryPermanentElementsAll(node) {\n    return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.submitCaptured = () => {\n            this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n            this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n        };\n        this.submitBubbled = ((event) => {\n            if (!event.defaultPrevented) {\n                const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n                const submitter = event.submitter || undefined;\n                if (form &&\n                    submissionDoesNotDismissDialog(form, submitter) &&\n                    submissionDoesNotTargetIFrame(form, submitter) &&\n                    this.delegate.willSubmitForm(form, submitter)) {\n                    event.preventDefault();\n                    event.stopImmediatePropagation();\n                    this.delegate.formSubmitted(form, submitter);\n                }\n            }\n        });\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n            this.started = false;\n        }\n    }\n}\nfunction submissionDoesNotDismissDialog(form, submitter) {\n    const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n    return method != \"dialog\";\n}\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n    const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formtarget\")) || form.target;\n    for (const element of document.getElementsByName(target)) {\n        if (element instanceof HTMLIFrameElement)\n            return false;\n    }\n    return true;\n}\n\nclass View {\n    constructor(delegate, element) {\n        this.resolveRenderPromise = (_value) => { };\n        this.resolveInterceptionPromise = (_value) => { };\n        this.delegate = delegate;\n        this.element = element;\n    }\n    scrollToAnchor(anchor) {\n        const element = this.snapshot.getElementForAnchor(anchor);\n        if (element) {\n            this.scrollToElement(element);\n            this.focusElement(element);\n        }\n        else {\n            this.scrollToPosition({ x: 0, y: 0 });\n        }\n    }\n    scrollToAnchorFromLocation(location) {\n        this.scrollToAnchor(getAnchor(location));\n    }\n    scrollToElement(element) {\n        element.scrollIntoView();\n    }\n    focusElement(element) {\n        if (element instanceof HTMLElement) {\n            if (element.hasAttribute(\"tabindex\")) {\n                element.focus();\n            }\n            else {\n                element.setAttribute(\"tabindex\", \"-1\");\n                element.focus();\n                element.removeAttribute(\"tabindex\");\n            }\n        }\n    }\n    scrollToPosition({ x, y }) {\n        this.scrollRoot.scrollTo(x, y);\n    }\n    scrollToTop() {\n        this.scrollToPosition({ x: 0, y: 0 });\n    }\n    get scrollRoot() {\n        return window;\n    }\n    async render(renderer) {\n        const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;\n        if (shouldRender) {\n            try {\n                this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));\n                this.renderer = renderer;\n                await this.prepareToRenderSnapshot(renderer);\n                const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));\n                const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };\n                const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n                if (!immediateRender)\n                    await renderInterception;\n                await this.renderSnapshot(renderer);\n                this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n                this.delegate.preloadOnLoadLinksForView(this.element);\n                this.finishRenderingSnapshot(renderer);\n            }\n            finally {\n                delete this.renderer;\n                this.resolveRenderPromise(undefined);\n                delete this.renderPromise;\n            }\n        }\n        else {\n            this.invalidate(renderer.reloadReason);\n        }\n    }\n    invalidate(reason) {\n        this.delegate.viewInvalidated(reason);\n    }\n    async prepareToRenderSnapshot(renderer) {\n        this.markAsPreview(renderer.isPreview);\n        await renderer.prepareToRender();\n    }\n    markAsPreview(isPreview) {\n        if (isPreview) {\n            this.element.setAttribute(\"data-turbo-preview\", \"\");\n        }\n        else {\n            this.element.removeAttribute(\"data-turbo-preview\");\n        }\n    }\n    async renderSnapshot(renderer) {\n        await renderer.render();\n    }\n    finishRenderingSnapshot(renderer) {\n        renderer.finishRendering();\n    }\n}\n\nclass FrameView extends View {\n    invalidate() {\n        this.element.innerHTML = \"\";\n    }\n    get snapshot() {\n        return new Snapshot(this.element);\n    }\n}\n\nclass LinkInterceptor {\n    constructor(delegate, element) {\n        this.clickBubbled = (event) => {\n            if (this.respondsToEventTarget(event.target)) {\n                this.clickEvent = event;\n            }\n            else {\n                delete this.clickEvent;\n            }\n        };\n        this.linkClicked = ((event) => {\n            if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n                if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n                    this.clickEvent.preventDefault();\n                    event.preventDefault();\n                    this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n                }\n            }\n            delete this.clickEvent;\n        });\n        this.willVisit = ((_event) => {\n            delete this.clickEvent;\n        });\n        this.delegate = delegate;\n        this.element = element;\n    }\n    start() {\n        this.element.addEventListener(\"click\", this.clickBubbled);\n        document.addEventListener(\"turbo:click\", this.linkClicked);\n        document.addEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    stop() {\n        this.element.removeEventListener(\"click\", this.clickBubbled);\n        document.removeEventListener(\"turbo:click\", this.linkClicked);\n        document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n    }\n    respondsToEventTarget(target) {\n        const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n        return element && element.closest(\"turbo-frame, html\") == this.element;\n    }\n}\n\nclass LinkClickObserver {\n    constructor(delegate, eventTarget) {\n        this.started = false;\n        this.clickCaptured = () => {\n            this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n            this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n        };\n        this.clickBubbled = (event) => {\n            if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n                const target = (event.composedPath && event.composedPath()[0]) || event.target;\n                const link = this.findLinkFromClickTarget(target);\n                if (link && doesNotTargetIFrame(link)) {\n                    const location = this.getLocationForLink(link);\n                    if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n                        event.preventDefault();\n                        this.delegate.followedLinkToLocation(link, location);\n                    }\n                }\n            }\n        };\n        this.delegate = delegate;\n        this.eventTarget = eventTarget;\n    }\n    start() {\n        if (!this.started) {\n            this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n            this.started = false;\n        }\n    }\n    clickEventIsSignificant(event) {\n        return !((event.target && event.target.isContentEditable) ||\n            event.defaultPrevented ||\n            event.which > 1 ||\n            event.altKey ||\n            event.ctrlKey ||\n            event.metaKey ||\n            event.shiftKey);\n    }\n    findLinkFromClickTarget(target) {\n        if (target instanceof Element) {\n            return target.closest(\"a[href]:not([target^=_]):not([download])\");\n        }\n    }\n    getLocationForLink(link) {\n        return expandURL(link.getAttribute(\"href\") || \"\");\n    }\n}\nfunction doesNotTargetIFrame(anchor) {\n    for (const element of document.getElementsByName(anchor.target)) {\n        if (element instanceof HTMLIFrameElement)\n            return false;\n    }\n    return true;\n}\n\nclass FormLinkClickObserver {\n    constructor(delegate, element) {\n        this.delegate = delegate;\n        this.linkInterceptor = new LinkClickObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n    }\n    willFollowLinkToLocation(link, location, originalEvent) {\n        return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n            link.hasAttribute(\"data-turbo-method\"));\n    }\n    followedLinkToLocation(link, location) {\n        const action = location.href;\n        const form = document.createElement(\"form\");\n        form.setAttribute(\"data-turbo\", \"true\");\n        form.setAttribute(\"action\", action);\n        form.setAttribute(\"hidden\", \"\");\n        const method = link.getAttribute(\"data-turbo-method\");\n        if (method)\n            form.setAttribute(\"method\", method);\n        const turboFrame = link.getAttribute(\"data-turbo-frame\");\n        if (turboFrame)\n            form.setAttribute(\"data-turbo-frame\", turboFrame);\n        const turboAction = link.getAttribute(\"data-turbo-action\");\n        if (turboAction)\n            form.setAttribute(\"data-turbo-action\", turboAction);\n        const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n        if (turboConfirm)\n            form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n        const turboStream = link.hasAttribute(\"data-turbo-stream\");\n        if (turboStream)\n            form.setAttribute(\"data-turbo-stream\", \"\");\n        this.delegate.submittedFormLinkToLocation(link, location, form);\n        document.body.appendChild(form);\n        form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n        requestAnimationFrame(() => form.requestSubmit());\n    }\n}\n\nclass Bardo {\n    constructor(delegate, permanentElementMap) {\n        this.delegate = delegate;\n        this.permanentElementMap = permanentElementMap;\n    }\n    static preservingPermanentElements(delegate, permanentElementMap, callback) {\n        const bardo = new this(delegate, permanentElementMap);\n        bardo.enter();\n        callback();\n        bardo.leave();\n    }\n    enter() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n            this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n            this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n        }\n    }\n    leave() {\n        for (const id in this.permanentElementMap) {\n            const [currentPermanentElement] = this.permanentElementMap[id];\n            this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n            this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n            this.delegate.leavingBardo(currentPermanentElement);\n        }\n    }\n    replaceNewPermanentElementWithPlaceholder(permanentElement) {\n        const placeholder = createPlaceholderForPermanentElement(permanentElement);\n        permanentElement.replaceWith(placeholder);\n    }\n    replaceCurrentPermanentElementWithClone(permanentElement) {\n        const clone = permanentElement.cloneNode(true);\n        permanentElement.replaceWith(clone);\n    }\n    replacePlaceholderWithPermanentElement(permanentElement) {\n        const placeholder = this.getPlaceholderById(permanentElement.id);\n        placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n    }\n    getPlaceholderById(id) {\n        return this.placeholders.find((element) => element.content == id);\n    }\n    get placeholders() {\n        return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n    }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n    const element = document.createElement(\"meta\");\n    element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n    element.setAttribute(\"content\", permanentElement.id);\n    return element;\n}\n\nclass Renderer {\n    constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        this.activeElement = null;\n        this.currentSnapshot = currentSnapshot;\n        this.newSnapshot = newSnapshot;\n        this.isPreview = isPreview;\n        this.willRender = willRender;\n        this.renderElement = renderElement;\n        this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n    }\n    get shouldRender() {\n        return true;\n    }\n    get reloadReason() {\n        return;\n    }\n    prepareToRender() {\n        return;\n    }\n    finishRendering() {\n        if (this.resolvingFunctions) {\n            this.resolvingFunctions.resolve();\n            delete this.resolvingFunctions;\n        }\n    }\n    preservingPermanentElements(callback) {\n        Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n    }\n    focusFirstAutofocusableElement() {\n        const element = this.connectedSnapshot.firstAutofocusableElement;\n        if (elementIsFocusable(element)) {\n            element.focus();\n        }\n    }\n    enteringBardo(currentPermanentElement) {\n        if (this.activeElement)\n            return;\n        if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n            this.activeElement = this.currentSnapshot.activeElement;\n        }\n    }\n    leavingBardo(currentPermanentElement) {\n        if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {\n            this.activeElement.focus();\n            this.activeElement = null;\n        }\n    }\n    get connectedSnapshot() {\n        return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n    }\n    get currentElement() {\n        return this.currentSnapshot.element;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    get permanentElementMap() {\n        return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n    }\n}\nfunction elementIsFocusable(element) {\n    return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n    constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n        super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n        this.delegate = delegate;\n    }\n    static renderElement(currentElement, newElement) {\n        var _a;\n        const destinationRange = document.createRange();\n        destinationRange.selectNodeContents(currentElement);\n        destinationRange.deleteContents();\n        const frameElement = newElement;\n        const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n        if (sourceRange) {\n            sourceRange.selectNodeContents(frameElement);\n            currentElement.appendChild(sourceRange.extractContents());\n        }\n    }\n    get shouldRender() {\n        return true;\n    }\n    async render() {\n        await nextAnimationFrame();\n        this.preservingPermanentElements(() => {\n            this.loadFrameElement();\n        });\n        this.scrollFrameIntoView();\n        await nextAnimationFrame();\n        this.focusFirstAutofocusableElement();\n        await nextAnimationFrame();\n        this.activateScriptElements();\n    }\n    loadFrameElement() {\n        this.delegate.willRenderFrame(this.currentElement, this.newElement);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    scrollFrameIntoView() {\n        if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n            const element = this.currentElement.firstElementChild;\n            const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n            const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n            if (element) {\n                element.scrollIntoView({ block, behavior });\n                return true;\n            }\n        }\n        return false;\n    }\n    activateScriptElements() {\n        for (const inertScriptElement of this.newScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    get newScriptElements() {\n        return this.currentElement.querySelectorAll(\"script\");\n    }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n    if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\nfunction readScrollBehavior(value, defaultValue) {\n    if (value == \"auto\" || value == \"smooth\") {\n        return value;\n    }\n    else {\n        return defaultValue;\n    }\n}\n\nclass ProgressBar {\n    constructor() {\n        this.hiding = false;\n        this.value = 0;\n        this.visible = false;\n        this.trickle = () => {\n            this.setValue(this.value + Math.random() / 100);\n        };\n        this.stylesheetElement = this.createStylesheetElement();\n        this.progressElement = this.createProgressElement();\n        this.installStylesheetElement();\n        this.setValue(0);\n    }\n    static get defaultCSS() {\n        return unindent `\n      .turbo-progress-bar {\n        position: fixed;\n        display: block;\n        top: 0;\n        left: 0;\n        height: 3px;\n        background: #0076ff;\n        z-index: 2147483647;\n        transition:\n          width ${ProgressBar.animationDuration}ms ease-out,\n          opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n        transform: translate3d(0, 0, 0);\n      }\n    `;\n    }\n    show() {\n        if (!this.visible) {\n            this.visible = true;\n            this.installProgressElement();\n            this.startTrickling();\n        }\n    }\n    hide() {\n        if (this.visible && !this.hiding) {\n            this.hiding = true;\n            this.fadeProgressElement(() => {\n                this.uninstallProgressElement();\n                this.stopTrickling();\n                this.visible = false;\n                this.hiding = false;\n            });\n        }\n    }\n    setValue(value) {\n        this.value = value;\n        this.refresh();\n    }\n    installStylesheetElement() {\n        document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n    }\n    installProgressElement() {\n        this.progressElement.style.width = \"0\";\n        this.progressElement.style.opacity = \"1\";\n        document.documentElement.insertBefore(this.progressElement, document.body);\n        this.refresh();\n    }\n    fadeProgressElement(callback) {\n        this.progressElement.style.opacity = \"0\";\n        setTimeout(callback, ProgressBar.animationDuration * 1.5);\n    }\n    uninstallProgressElement() {\n        if (this.progressElement.parentNode) {\n            document.documentElement.removeChild(this.progressElement);\n        }\n    }\n    startTrickling() {\n        if (!this.trickleInterval) {\n            this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n        }\n    }\n    stopTrickling() {\n        window.clearInterval(this.trickleInterval);\n        delete this.trickleInterval;\n    }\n    refresh() {\n        requestAnimationFrame(() => {\n            this.progressElement.style.width = `${10 + this.value * 90}%`;\n        });\n    }\n    createStylesheetElement() {\n        const element = document.createElement(\"style\");\n        element.type = \"text/css\";\n        element.textContent = ProgressBar.defaultCSS;\n        if (this.cspNonce) {\n            element.nonce = this.cspNonce;\n        }\n        return element;\n    }\n    createProgressElement() {\n        const element = document.createElement(\"div\");\n        element.className = \"turbo-progress-bar\";\n        return element;\n    }\n    get cspNonce() {\n        return getMetaContent(\"csp-nonce\");\n    }\n}\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n    constructor() {\n        super(...arguments);\n        this.detailsByOuterHTML = this.children\n            .filter((element) => !elementIsNoscript(element))\n            .map((element) => elementWithoutNonce(element))\n            .reduce((result, element) => {\n            const { outerHTML } = element;\n            const details = outerHTML in result\n                ? result[outerHTML]\n                : {\n                    type: elementType(element),\n                    tracked: elementIsTracked(element),\n                    elements: [],\n                };\n            return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });\n        }, {});\n    }\n    get trackedElementSignature() {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n            .join(\"\");\n    }\n    getScriptElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n    }\n    getStylesheetElementsNotInSnapshot(snapshot) {\n        return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n    }\n    getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n        return Object.keys(this.detailsByOuterHTML)\n            .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n            .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n            .filter(({ type }) => type == matchedType)\n            .map(({ elements: [element] }) => element);\n    }\n    get provisionalElements() {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n            if (type == null && !tracked) {\n                return [...result, ...elements];\n            }\n            else if (elements.length > 1) {\n                return [...result, ...elements.slice(1)];\n            }\n            else {\n                return result;\n            }\n        }, []);\n    }\n    getMetaValue(name) {\n        const element = this.findMetaElementByName(name);\n        return element ? element.getAttribute(\"content\") : null;\n    }\n    findMetaElementByName(name) {\n        return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n            const { elements: [element], } = this.detailsByOuterHTML[outerHTML];\n            return elementIsMetaElementWithName(element, name) ? element : result;\n        }, undefined);\n    }\n}\nfunction elementType(element) {\n    if (elementIsScript(element)) {\n        return \"script\";\n    }\n    else if (elementIsStylesheet(element)) {\n        return \"stylesheet\";\n    }\n}\nfunction elementIsTracked(element) {\n    return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n    const tagName = element.localName;\n    return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n    const tagName = element.localName;\n    return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n    const tagName = element.localName;\n    return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\");\n}\nfunction elementIsMetaElementWithName(element, name) {\n    const tagName = element.localName;\n    return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n    if (element.hasAttribute(\"nonce\")) {\n        element.setAttribute(\"nonce\", \"\");\n    }\n    return element;\n}\n\nclass PageSnapshot extends Snapshot {\n    constructor(element, headSnapshot) {\n        super(element);\n        this.headSnapshot = headSnapshot;\n    }\n    static fromHTMLString(html = \"\") {\n        return this.fromDocument(parseHTMLDocument(html));\n    }\n    static fromElement(element) {\n        return this.fromDocument(element.ownerDocument);\n    }\n    static fromDocument({ head, body }) {\n        return new this(body, new HeadSnapshot(head));\n    }\n    clone() {\n        const clonedElement = this.element.cloneNode(true);\n        const selectElements = this.element.querySelectorAll(\"select\");\n        const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n        for (const [index, source] of selectElements.entries()) {\n            const clone = clonedSelectElements[index];\n            for (const option of clone.selectedOptions)\n                option.selected = false;\n            for (const option of source.selectedOptions)\n                clone.options[option.index].selected = true;\n        }\n        for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n            clonedPasswordInput.value = \"\";\n        }\n        return new PageSnapshot(clonedElement, this.headSnapshot);\n    }\n    get headElement() {\n        return this.headSnapshot.element;\n    }\n    get rootLocation() {\n        var _a;\n        const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    get cacheControlValue() {\n        return this.getSetting(\"cache-control\");\n    }\n    get isPreviewable() {\n        return this.cacheControlValue != \"no-preview\";\n    }\n    get isCacheable() {\n        return this.cacheControlValue != \"no-cache\";\n    }\n    get isVisitable() {\n        return this.getSetting(\"visit-control\") != \"reload\";\n    }\n    getSetting(name) {\n        return this.headSnapshot.getMetaValue(`turbo-${name}`);\n    }\n}\n\nvar TimingMetric;\n(function (TimingMetric) {\n    TimingMetric[\"visitStart\"] = \"visitStart\";\n    TimingMetric[\"requestStart\"] = \"requestStart\";\n    TimingMetric[\"requestEnd\"] = \"requestEnd\";\n    TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n    VisitState[\"initialized\"] = \"initialized\";\n    VisitState[\"started\"] = \"started\";\n    VisitState[\"canceled\"] = \"canceled\";\n    VisitState[\"failed\"] = \"failed\";\n    VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n    action: \"advance\",\n    historyChanged: false,\n    visitCachedSnapshot: () => { },\n    willRender: true,\n    updateHistory: true,\n    shouldCacheSnapshot: true,\n    acceptsStreamResponse: false,\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n    SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n    SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n    SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n    constructor(delegate, location, restorationIdentifier, options = {}) {\n        this.identifier = uuid();\n        this.timingMetrics = {};\n        this.followedRedirect = false;\n        this.historyChanged = false;\n        this.scrolled = false;\n        this.shouldCacheSnapshot = true;\n        this.acceptsStreamResponse = false;\n        this.snapshotCached = false;\n        this.state = VisitState.initialized;\n        this.delegate = delegate;\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier || uuid();\n        const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);\n        this.action = action;\n        this.historyChanged = historyChanged;\n        this.referrer = referrer;\n        this.snapshot = snapshot;\n        this.snapshotHTML = snapshotHTML;\n        this.response = response;\n        this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n        this.visitCachedSnapshot = visitCachedSnapshot;\n        this.willRender = willRender;\n        this.updateHistory = updateHistory;\n        this.scrolled = !willRender;\n        this.shouldCacheSnapshot = shouldCacheSnapshot;\n        this.acceptsStreamResponse = acceptsStreamResponse;\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    get restorationData() {\n        return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n    }\n    get silent() {\n        return this.isSamePage;\n    }\n    start() {\n        if (this.state == VisitState.initialized) {\n            this.recordTimingMetric(TimingMetric.visitStart);\n            this.state = VisitState.started;\n            this.adapter.visitStarted(this);\n            this.delegate.visitStarted(this);\n        }\n    }\n    cancel() {\n        if (this.state == VisitState.started) {\n            if (this.request) {\n                this.request.cancel();\n            }\n            this.cancelRender();\n            this.state = VisitState.canceled;\n        }\n    }\n    complete() {\n        if (this.state == VisitState.started) {\n            this.recordTimingMetric(TimingMetric.visitEnd);\n            this.state = VisitState.completed;\n            this.followRedirect();\n            if (!this.followedRedirect) {\n                this.adapter.visitCompleted(this);\n                this.delegate.visitCompleted(this);\n            }\n        }\n    }\n    fail() {\n        if (this.state == VisitState.started) {\n            this.state = VisitState.failed;\n            this.adapter.visitFailed(this);\n        }\n    }\n    changeHistory() {\n        var _a;\n        if (!this.historyChanged && this.updateHistory) {\n            const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n            const method = getHistoryMethodForAction(actionForHistory);\n            this.history.update(method, this.location, this.restorationIdentifier);\n            this.historyChanged = true;\n        }\n    }\n    issueRequest() {\n        if (this.hasPreloadedResponse()) {\n            this.simulateRequest();\n        }\n        else if (this.shouldIssueRequest() && !this.request) {\n            this.request = new FetchRequest(this, FetchMethod.get, this.location);\n            this.request.perform();\n        }\n    }\n    simulateRequest() {\n        if (this.response) {\n            this.startRequest();\n            this.recordResponse();\n            this.finishRequest();\n        }\n    }\n    startRequest() {\n        this.recordTimingMetric(TimingMetric.requestStart);\n        this.adapter.visitRequestStarted(this);\n    }\n    recordResponse(response = this.response) {\n        this.response = response;\n        if (response) {\n            const { statusCode } = response;\n            if (isSuccessful(statusCode)) {\n                this.adapter.visitRequestCompleted(this);\n            }\n            else {\n                this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n            }\n        }\n    }\n    finishRequest() {\n        this.recordTimingMetric(TimingMetric.requestEnd);\n        this.adapter.visitRequestFinished(this);\n    }\n    loadResponse() {\n        if (this.response) {\n            const { statusCode, responseHTML } = this.response;\n            this.render(async () => {\n                if (this.shouldCacheSnapshot)\n                    this.cacheSnapshot();\n                if (this.view.renderPromise)\n                    await this.view.renderPromise;\n                if (isSuccessful(statusCode) && responseHTML != null) {\n                    await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    this.complete();\n                }\n                else {\n                    await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n                    this.adapter.visitRendered(this);\n                    this.fail();\n                }\n            });\n        }\n    }\n    getCachedSnapshot() {\n        const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n        if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n            if (this.action == \"restore\" || snapshot.isPreviewable) {\n                return snapshot;\n            }\n        }\n    }\n    getPreloadedSnapshot() {\n        if (this.snapshotHTML) {\n            return PageSnapshot.fromHTMLString(this.snapshotHTML);\n        }\n    }\n    hasCachedSnapshot() {\n        return this.getCachedSnapshot() != null;\n    }\n    loadCachedSnapshot() {\n        const snapshot = this.getCachedSnapshot();\n        if (snapshot) {\n            const isPreview = this.shouldIssueRequest();\n            this.render(async () => {\n                this.cacheSnapshot();\n                if (this.isSamePage) {\n                    this.adapter.visitRendered(this);\n                }\n                else {\n                    if (this.view.renderPromise)\n                        await this.view.renderPromise;\n                    await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n                    this.performScroll();\n                    this.adapter.visitRendered(this);\n                    if (!isPreview) {\n                        this.complete();\n                    }\n                }\n            });\n        }\n    }\n    followRedirect() {\n        var _a;\n        if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n            this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n                action: \"replace\",\n                response: this.response,\n            });\n            this.followedRedirect = true;\n        }\n    }\n    goToSamePageAnchor() {\n        if (this.isSamePage) {\n            this.render(async () => {\n                this.cacheSnapshot();\n                this.performScroll();\n                this.changeHistory();\n                this.adapter.visitRendered(this);\n            });\n        }\n    }\n    prepareHeadersForRequest(headers, request) {\n        if (this.acceptsStreamResponse) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted() {\n        this.startRequest();\n    }\n    requestPreventedHandlingResponse(_request, _response) { }\n    async requestSucceededWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.redirectedToLocation = response.redirected ? response.location : undefined;\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    async requestFailedWithResponse(request, response) {\n        const responseHTML = await response.responseHTML;\n        const { redirected, statusCode } = response;\n        if (responseHTML == undefined) {\n            this.recordResponse({\n                statusCode: SystemStatusCode.contentTypeMismatch,\n                redirected,\n            });\n        }\n        else {\n            this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n        }\n    }\n    requestErrored(_request, _error) {\n        this.recordResponse({\n            statusCode: SystemStatusCode.networkFailure,\n            redirected: false,\n        });\n    }\n    requestFinished() {\n        this.finishRequest();\n    }\n    performScroll() {\n        if (!this.scrolled && !this.view.forceReloaded) {\n            if (this.action == \"restore\") {\n                this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            else {\n                this.scrollToAnchor() || this.view.scrollToTop();\n            }\n            if (this.isSamePage) {\n                this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n            }\n            this.scrolled = true;\n        }\n    }\n    scrollToRestoredPosition() {\n        const { scrollPosition } = this.restorationData;\n        if (scrollPosition) {\n            this.view.scrollToPosition(scrollPosition);\n            return true;\n        }\n    }\n    scrollToAnchor() {\n        const anchor = getAnchor(this.location);\n        if (anchor != null) {\n            this.view.scrollToAnchor(anchor);\n            return true;\n        }\n    }\n    recordTimingMetric(metric) {\n        this.timingMetrics[metric] = new Date().getTime();\n    }\n    getTimingMetrics() {\n        return Object.assign({}, this.timingMetrics);\n    }\n    getHistoryMethodForAction(action) {\n        switch (action) {\n            case \"replace\":\n                return history.replaceState;\n            case \"advance\":\n            case \"restore\":\n                return history.pushState;\n        }\n    }\n    hasPreloadedResponse() {\n        return typeof this.response == \"object\";\n    }\n    shouldIssueRequest() {\n        if (this.isSamePage) {\n            return false;\n        }\n        else if (this.action == \"restore\") {\n            return !this.hasCachedSnapshot();\n        }\n        else {\n            return this.willRender;\n        }\n    }\n    cacheSnapshot() {\n        if (!this.snapshotCached) {\n            this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n            this.snapshotCached = true;\n        }\n    }\n    async render(callback) {\n        this.cancelRender();\n        await new Promise((resolve) => {\n            this.frame = requestAnimationFrame(() => resolve());\n        });\n        await callback();\n        delete this.frame;\n    }\n    cancelRender() {\n        if (this.frame) {\n            cancelAnimationFrame(this.frame);\n            delete this.frame;\n        }\n    }\n}\nfunction isSuccessful(statusCode) {\n    return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n    constructor(session) {\n        this.progressBar = new ProgressBar();\n        this.showProgressBar = () => {\n            this.progressBar.show();\n        };\n        this.session = session;\n    }\n    visitProposedToLocation(location, options) {\n        this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);\n    }\n    visitStarted(visit) {\n        this.location = visit.location;\n        visit.loadCachedSnapshot();\n        visit.issueRequest();\n        visit.goToSamePageAnchor();\n    }\n    visitRequestStarted(visit) {\n        this.progressBar.setValue(0);\n        if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n            this.showVisitProgressBarAfterDelay();\n        }\n        else {\n            this.showProgressBar();\n        }\n    }\n    visitRequestCompleted(visit) {\n        visit.loadResponse();\n    }\n    visitRequestFailedWithStatusCode(visit, statusCode) {\n        switch (statusCode) {\n            case SystemStatusCode.networkFailure:\n            case SystemStatusCode.timeoutFailure:\n            case SystemStatusCode.contentTypeMismatch:\n                return this.reload({\n                    reason: \"request_failed\",\n                    context: {\n                        statusCode,\n                    },\n                });\n            default:\n                return visit.loadResponse();\n        }\n    }\n    visitRequestFinished(_visit) {\n        this.progressBar.setValue(1);\n        this.hideVisitProgressBar();\n    }\n    visitCompleted(_visit) { }\n    pageInvalidated(reason) {\n        this.reload(reason);\n    }\n    visitFailed(_visit) { }\n    visitRendered(_visit) { }\n    formSubmissionStarted(_formSubmission) {\n        this.progressBar.setValue(0);\n        this.showFormProgressBarAfterDelay();\n    }\n    formSubmissionFinished(_formSubmission) {\n        this.progressBar.setValue(1);\n        this.hideFormProgressBar();\n    }\n    showVisitProgressBarAfterDelay() {\n        this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n    hideVisitProgressBar() {\n        this.progressBar.hide();\n        if (this.visitProgressBarTimeout != null) {\n            window.clearTimeout(this.visitProgressBarTimeout);\n            delete this.visitProgressBarTimeout;\n        }\n    }\n    showFormProgressBarAfterDelay() {\n        if (this.formProgressBarTimeout == null) {\n            this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n        }\n    }\n    hideFormProgressBar() {\n        this.progressBar.hide();\n        if (this.formProgressBarTimeout != null) {\n            window.clearTimeout(this.formProgressBarTimeout);\n            delete this.formProgressBarTimeout;\n        }\n    }\n    reload(reason) {\n        var _a;\n        dispatch(\"turbo:reload\", { detail: reason });\n        window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;\n    }\n    get navigator() {\n        return this.session.navigator;\n    }\n}\n\nclass CacheObserver {\n    constructor() {\n        this.started = false;\n        this.removeStaleElements = ((_event) => {\n            const staleElements = [...document.querySelectorAll('[data-turbo-cache=\"false\"]')];\n            for (const element of staleElements) {\n                element.remove();\n            }\n        });\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n        }\n    }\n}\n\nclass FrameRedirector {\n    constructor(session, element) {\n        this.session = session;\n        this.element = element;\n        this.linkInterceptor = new LinkInterceptor(this, element);\n        this.formSubmitObserver = new FormSubmitObserver(this, element);\n    }\n    start() {\n        this.linkInterceptor.start();\n        this.formSubmitObserver.start();\n    }\n    stop() {\n        this.linkInterceptor.stop();\n        this.formSubmitObserver.stop();\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldRedirect(element);\n    }\n    linkClickIntercepted(element, url, event) {\n        const frame = this.findFrameElement(element);\n        if (frame) {\n            frame.delegate.linkClickIntercepted(element, url, event);\n        }\n    }\n    willSubmitForm(element, submitter) {\n        return (element.closest(\"turbo-frame\") == null &&\n            this.shouldSubmit(element, submitter) &&\n            this.shouldRedirect(element, submitter));\n    }\n    formSubmitted(element, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        if (frame) {\n            frame.delegate.formSubmitted(element, submitter);\n        }\n    }\n    shouldSubmit(form, submitter) {\n        var _a;\n        const action = getAction(form, submitter);\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n        return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n    }\n    shouldRedirect(element, submitter) {\n        const isNavigatable = element instanceof HTMLFormElement\n            ? this.session.submissionIsNavigatable(element, submitter)\n            : this.session.elementIsNavigatable(element);\n        if (isNavigatable) {\n            const frame = this.findFrameElement(element, submitter);\n            return frame ? frame != element.closest(\"turbo-frame\") : false;\n        }\n        else {\n            return false;\n        }\n    }\n    findFrameElement(element, submitter) {\n        const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n        if (id && id != \"_top\") {\n            const frame = this.element.querySelector(`#${id}:not([disabled])`);\n            if (frame instanceof FrameElement) {\n                return frame;\n            }\n        }\n    }\n}\n\nclass History {\n    constructor(delegate) {\n        this.restorationIdentifier = uuid();\n        this.restorationData = {};\n        this.started = false;\n        this.pageLoaded = false;\n        this.onPopState = (event) => {\n            if (this.shouldHandlePopState()) {\n                const { turbo } = event.state || {};\n                if (turbo) {\n                    this.location = new URL(window.location.href);\n                    const { restorationIdentifier } = turbo;\n                    this.restorationIdentifier = restorationIdentifier;\n                    this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n                }\n            }\n        };\n        this.onPageLoad = async (_event) => {\n            await nextMicrotask();\n            this.pageLoaded = true;\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"popstate\", this.onPopState, false);\n            addEventListener(\"load\", this.onPageLoad, false);\n            this.started = true;\n            this.replace(new URL(window.location.href));\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"popstate\", this.onPopState, false);\n            removeEventListener(\"load\", this.onPageLoad, false);\n            this.started = false;\n        }\n    }\n    push(location, restorationIdentifier) {\n        this.update(history.pushState, location, restorationIdentifier);\n    }\n    replace(location, restorationIdentifier) {\n        this.update(history.replaceState, location, restorationIdentifier);\n    }\n    update(method, location, restorationIdentifier = uuid()) {\n        const state = { turbo: { restorationIdentifier } };\n        method.call(history, state, \"\", location.href);\n        this.location = location;\n        this.restorationIdentifier = restorationIdentifier;\n    }\n    getRestorationDataForIdentifier(restorationIdentifier) {\n        return this.restorationData[restorationIdentifier] || {};\n    }\n    updateRestorationData(additionalData) {\n        const { restorationIdentifier } = this;\n        const restorationData = this.restorationData[restorationIdentifier];\n        this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n    }\n    assumeControlOfScrollRestoration() {\n        var _a;\n        if (!this.previousScrollRestoration) {\n            this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n            history.scrollRestoration = \"manual\";\n        }\n    }\n    relinquishControlOfScrollRestoration() {\n        if (this.previousScrollRestoration) {\n            history.scrollRestoration = this.previousScrollRestoration;\n            delete this.previousScrollRestoration;\n        }\n    }\n    shouldHandlePopState() {\n        return this.pageIsLoaded();\n    }\n    pageIsLoaded() {\n        return this.pageLoaded || document.readyState == \"complete\";\n    }\n}\n\nclass Navigator {\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    proposeVisit(location, options = {}) {\n        if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n            if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n                this.delegate.visitProposedToLocation(location, options);\n            }\n            else {\n                window.location.href = location.toString();\n            }\n        }\n    }\n    startVisit(locatable, restorationIdentifier, options = {}) {\n        this.stop();\n        this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));\n        this.currentVisit.start();\n    }\n    submitForm(form, submitter) {\n        this.stop();\n        this.formSubmission = new FormSubmission(this, form, submitter, true);\n        this.formSubmission.start();\n    }\n    stop() {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n            delete this.formSubmission;\n        }\n        if (this.currentVisit) {\n            this.currentVisit.cancel();\n            delete this.currentVisit;\n        }\n    }\n    get adapter() {\n        return this.delegate.adapter;\n    }\n    get view() {\n        return this.delegate.view;\n    }\n    get history() {\n        return this.delegate.history;\n    }\n    formSubmissionStarted(formSubmission) {\n        if (typeof this.adapter.formSubmissionStarted === \"function\") {\n            this.adapter.formSubmissionStarted(formSubmission);\n        }\n    }\n    async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n        if (formSubmission == this.formSubmission) {\n            const responseHTML = await fetchResponse.responseHTML;\n            if (responseHTML) {\n                const shouldCacheSnapshot = formSubmission.method == FetchMethod.get;\n                if (!shouldCacheSnapshot) {\n                    this.view.clearSnapshotCache();\n                }\n                const { statusCode, redirected } = fetchResponse;\n                const action = this.getActionForFormSubmission(formSubmission);\n                const visitOptions = {\n                    action,\n                    shouldCacheSnapshot,\n                    response: { statusCode, responseHTML, redirected },\n                };\n                this.proposeVisit(fetchResponse.location, visitOptions);\n            }\n        }\n    }\n    async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        const responseHTML = await fetchResponse.responseHTML;\n        if (responseHTML) {\n            const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n            if (fetchResponse.serverError) {\n                await this.view.renderError(snapshot, this.currentVisit);\n            }\n            else {\n                await this.view.renderPage(snapshot, false, true, this.currentVisit);\n            }\n            this.view.scrollToTop();\n            this.view.clearSnapshotCache();\n        }\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished(formSubmission) {\n        if (typeof this.adapter.formSubmissionFinished === \"function\") {\n            this.adapter.formSubmissionFinished(formSubmission);\n        }\n    }\n    visitStarted(visit) {\n        this.delegate.visitStarted(visit);\n    }\n    visitCompleted(visit) {\n        this.delegate.visitCompleted(visit);\n    }\n    locationWithActionIsSamePage(location, action) {\n        const anchor = getAnchor(location);\n        const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n        const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n        return (action !== \"replace\" &&\n            getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&\n            (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    getActionForFormSubmission(formSubmission) {\n        const { formElement, submitter } = formSubmission;\n        const action = getAttribute(\"data-turbo-action\", submitter, formElement);\n        return isAction(action) ? action : \"advance\";\n    }\n}\n\nvar PageStage;\n(function (PageStage) {\n    PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n    PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n    PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n    PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n    constructor(delegate) {\n        this.stage = PageStage.initial;\n        this.started = false;\n        this.interpretReadyState = () => {\n            const { readyState } = this;\n            if (readyState == \"interactive\") {\n                this.pageIsInteractive();\n            }\n            else if (readyState == \"complete\") {\n                this.pageIsComplete();\n            }\n        };\n        this.pageWillUnload = () => {\n            this.delegate.pageWillUnload();\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            if (this.stage == PageStage.initial) {\n                this.stage = PageStage.loading;\n            }\n            document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n            addEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n            removeEventListener(\"pagehide\", this.pageWillUnload, false);\n            this.started = false;\n        }\n    }\n    pageIsInteractive() {\n        if (this.stage == PageStage.loading) {\n            this.stage = PageStage.interactive;\n            this.delegate.pageBecameInteractive();\n        }\n    }\n    pageIsComplete() {\n        this.pageIsInteractive();\n        if (this.stage == PageStage.interactive) {\n            this.stage = PageStage.complete;\n            this.delegate.pageLoaded();\n        }\n    }\n    get readyState() {\n        return document.readyState;\n    }\n}\n\nclass ScrollObserver {\n    constructor(delegate) {\n        this.started = false;\n        this.onScroll = () => {\n            this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            addEventListener(\"scroll\", this.onScroll, false);\n            this.onScroll();\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            removeEventListener(\"scroll\", this.onScroll, false);\n            this.started = false;\n        }\n    }\n    updatePosition(position) {\n        this.delegate.scrollPositionChanged(position);\n    }\n}\n\nclass StreamMessageRenderer {\n    render({ fragment }) {\n        Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));\n    }\n    enteringBardo(currentPermanentElement, newPermanentElement) {\n        newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n    }\n    leavingBardo() { }\n}\nfunction getPermanentElementMapForFragment(fragment) {\n    const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n    const permanentElementMap = {};\n    for (const permanentElementInDocument of permanentElementsInDocument) {\n        const { id } = permanentElementInDocument;\n        for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n            const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n            if (elementInStream) {\n                permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n            }\n        }\n    }\n    return permanentElementMap;\n}\n\nclass StreamObserver {\n    constructor(delegate) {\n        this.sources = new Set();\n        this.started = false;\n        this.inspectFetchResponse = ((event) => {\n            const response = fetchResponseFromEvent(event);\n            if (response && fetchResponseIsStream(response)) {\n                event.preventDefault();\n                this.receiveMessageResponse(response);\n            }\n        });\n        this.receiveMessageEvent = (event) => {\n            if (this.started && typeof event.data == \"string\") {\n                this.receiveMessageHTML(event.data);\n            }\n        };\n        this.delegate = delegate;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n        }\n    }\n    connectStreamSource(source) {\n        if (!this.streamSourceIsConnected(source)) {\n            this.sources.add(source);\n            source.addEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    disconnectStreamSource(source) {\n        if (this.streamSourceIsConnected(source)) {\n            this.sources.delete(source);\n            source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n        }\n    }\n    streamSourceIsConnected(source) {\n        return this.sources.has(source);\n    }\n    async receiveMessageResponse(response) {\n        const html = await response.responseHTML;\n        if (html) {\n            this.receiveMessageHTML(html);\n        }\n    }\n    receiveMessageHTML(html) {\n        this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n    }\n}\nfunction fetchResponseFromEvent(event) {\n    var _a;\n    const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n    if (fetchResponse instanceof FetchResponse) {\n        return fetchResponse;\n    }\n}\nfunction fetchResponseIsStream(response) {\n    var _a;\n    const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n    return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        const { documentElement, body } = document;\n        documentElement.replaceChild(newElement, body);\n    }\n    async render() {\n        this.replaceHeadAndBody();\n        this.activateScriptElements();\n    }\n    replaceHeadAndBody() {\n        const { documentElement, head } = document;\n        documentElement.replaceChild(this.newHead, head);\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    activateScriptElements() {\n        for (const replaceableElement of this.scriptElements) {\n            const parentNode = replaceableElement.parentNode;\n            if (parentNode) {\n                const element = activateScriptElement(replaceableElement);\n                parentNode.replaceChild(element, replaceableElement);\n            }\n        }\n    }\n    get newHead() {\n        return this.newSnapshot.headSnapshot.element;\n    }\n    get scriptElements() {\n        return document.documentElement.querySelectorAll(\"script\");\n    }\n}\n\nclass PageRenderer extends Renderer {\n    static renderElement(currentElement, newElement) {\n        if (document.body && newElement instanceof HTMLBodyElement) {\n            document.body.replaceWith(newElement);\n        }\n        else {\n            document.documentElement.appendChild(newElement);\n        }\n    }\n    get shouldRender() {\n        return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n    }\n    get reloadReason() {\n        if (!this.newSnapshot.isVisitable) {\n            return {\n                reason: \"turbo_visit_control_is_reload\",\n            };\n        }\n        if (!this.trackedElementsAreIdentical) {\n            return {\n                reason: \"tracked_element_mismatch\",\n            };\n        }\n    }\n    async prepareToRender() {\n        await this.mergeHead();\n    }\n    async render() {\n        if (this.willRender) {\n            this.replaceBody();\n        }\n    }\n    finishRendering() {\n        super.finishRendering();\n        if (!this.isPreview) {\n            this.focusFirstAutofocusableElement();\n        }\n    }\n    get currentHeadSnapshot() {\n        return this.currentSnapshot.headSnapshot;\n    }\n    get newHeadSnapshot() {\n        return this.newSnapshot.headSnapshot;\n    }\n    get newElement() {\n        return this.newSnapshot.element;\n    }\n    async mergeHead() {\n        const newStylesheetElements = this.copyNewHeadStylesheetElements();\n        this.copyNewHeadScriptElements();\n        this.removeCurrentHeadProvisionalElements();\n        this.copyNewHeadProvisionalElements();\n        await newStylesheetElements;\n    }\n    replaceBody() {\n        this.preservingPermanentElements(() => {\n            this.activateNewBody();\n            this.assignNewBody();\n        });\n    }\n    get trackedElementsAreIdentical() {\n        return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n    }\n    async copyNewHeadStylesheetElements() {\n        const loadingElements = [];\n        for (const element of this.newHeadStylesheetElements) {\n            loadingElements.push(waitForLoad(element));\n            document.head.appendChild(element);\n        }\n        await Promise.all(loadingElements);\n    }\n    copyNewHeadScriptElements() {\n        for (const element of this.newHeadScriptElements) {\n            document.head.appendChild(activateScriptElement(element));\n        }\n    }\n    removeCurrentHeadProvisionalElements() {\n        for (const element of this.currentHeadProvisionalElements) {\n            document.head.removeChild(element);\n        }\n    }\n    copyNewHeadProvisionalElements() {\n        for (const element of this.newHeadProvisionalElements) {\n            document.head.appendChild(element);\n        }\n    }\n    activateNewBody() {\n        document.adoptNode(this.newElement);\n        this.activateNewBodyScriptElements();\n    }\n    activateNewBodyScriptElements() {\n        for (const inertScriptElement of this.newBodyScriptElements) {\n            const activatedScriptElement = activateScriptElement(inertScriptElement);\n            inertScriptElement.replaceWith(activatedScriptElement);\n        }\n    }\n    assignNewBody() {\n        this.renderElement(this.currentElement, this.newElement);\n    }\n    get newHeadStylesheetElements() {\n        return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get newHeadScriptElements() {\n        return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n    }\n    get currentHeadProvisionalElements() {\n        return this.currentHeadSnapshot.provisionalElements;\n    }\n    get newHeadProvisionalElements() {\n        return this.newHeadSnapshot.provisionalElements;\n    }\n    get newBodyScriptElements() {\n        return this.newElement.querySelectorAll(\"script\");\n    }\n}\n\nclass SnapshotCache {\n    constructor(size) {\n        this.keys = [];\n        this.snapshots = {};\n        this.size = size;\n    }\n    has(location) {\n        return toCacheKey(location) in this.snapshots;\n    }\n    get(location) {\n        if (this.has(location)) {\n            const snapshot = this.read(location);\n            this.touch(location);\n            return snapshot;\n        }\n    }\n    put(location, snapshot) {\n        this.write(location, snapshot);\n        this.touch(location);\n        return snapshot;\n    }\n    clear() {\n        this.snapshots = {};\n    }\n    read(location) {\n        return this.snapshots[toCacheKey(location)];\n    }\n    write(location, snapshot) {\n        this.snapshots[toCacheKey(location)] = snapshot;\n    }\n    touch(location) {\n        const key = toCacheKey(location);\n        const index = this.keys.indexOf(key);\n        if (index > -1)\n            this.keys.splice(index, 1);\n        this.keys.unshift(key);\n        this.trim();\n    }\n    trim() {\n        for (const key of this.keys.splice(this.size)) {\n            delete this.snapshots[key];\n        }\n    }\n}\n\nclass PageView extends View {\n    constructor() {\n        super(...arguments);\n        this.snapshotCache = new SnapshotCache(10);\n        this.lastRenderedLocation = new URL(location.href);\n        this.forceReloaded = false;\n    }\n    renderPage(snapshot, isPreview = false, willRender = true, visit) {\n        const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);\n        if (!renderer.shouldRender) {\n            this.forceReloaded = true;\n        }\n        else {\n            visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        }\n        return this.render(renderer);\n    }\n    renderError(snapshot, visit) {\n        visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n        const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);\n        return this.render(renderer);\n    }\n    clearSnapshotCache() {\n        this.snapshotCache.clear();\n    }\n    async cacheSnapshot(snapshot = this.snapshot) {\n        if (snapshot.isCacheable) {\n            this.delegate.viewWillCacheSnapshot();\n            const { lastRenderedLocation: location } = this;\n            await nextEventLoopTick();\n            const cachedSnapshot = snapshot.clone();\n            this.snapshotCache.put(location, cachedSnapshot);\n            return cachedSnapshot;\n        }\n    }\n    getCachedSnapshotForLocation(location) {\n        return this.snapshotCache.get(location);\n    }\n    get snapshot() {\n        return PageSnapshot.fromElement(this.element);\n    }\n}\n\nclass Preloader {\n    constructor(delegate) {\n        this.selector = \"a[data-turbo-preload]\";\n        this.delegate = delegate;\n    }\n    get snapshotCache() {\n        return this.delegate.navigator.view.snapshotCache;\n    }\n    start() {\n        if (document.readyState === \"loading\") {\n            return document.addEventListener(\"DOMContentLoaded\", () => {\n                this.preloadOnLoadLinksForView(document.body);\n            });\n        }\n        else {\n            this.preloadOnLoadLinksForView(document.body);\n        }\n    }\n    preloadOnLoadLinksForView(element) {\n        for (const link of element.querySelectorAll(this.selector)) {\n            this.preloadURL(link);\n        }\n    }\n    async preloadURL(link) {\n        const location = new URL(link.href);\n        if (this.snapshotCache.has(location)) {\n            return;\n        }\n        try {\n            const response = await fetch(location.toString(), { headers: { \"VND.PREFETCH\": \"true\", Accept: \"text/html\" } });\n            const responseText = await response.text();\n            const snapshot = PageSnapshot.fromHTMLString(responseText);\n            this.snapshotCache.put(location, snapshot);\n        }\n        catch (_) {\n        }\n    }\n}\n\nclass Session {\n    constructor() {\n        this.navigator = new Navigator(this);\n        this.history = new History(this);\n        this.preloader = new Preloader(this);\n        this.view = new PageView(this, document.documentElement);\n        this.adapter = new BrowserAdapter(this);\n        this.pageObserver = new PageObserver(this);\n        this.cacheObserver = new CacheObserver();\n        this.linkClickObserver = new LinkClickObserver(this, window);\n        this.formSubmitObserver = new FormSubmitObserver(this, document);\n        this.scrollObserver = new ScrollObserver(this);\n        this.streamObserver = new StreamObserver(this);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);\n        this.frameRedirector = new FrameRedirector(this, document.documentElement);\n        this.streamMessageRenderer = new StreamMessageRenderer();\n        this.drive = true;\n        this.enabled = true;\n        this.progressBarDelay = 500;\n        this.started = false;\n        this.formMode = \"on\";\n    }\n    start() {\n        if (!this.started) {\n            this.pageObserver.start();\n            this.cacheObserver.start();\n            this.formLinkClickObserver.start();\n            this.linkClickObserver.start();\n            this.formSubmitObserver.start();\n            this.scrollObserver.start();\n            this.streamObserver.start();\n            this.frameRedirector.start();\n            this.history.start();\n            this.preloader.start();\n            this.started = true;\n            this.enabled = true;\n        }\n    }\n    disable() {\n        this.enabled = false;\n    }\n    stop() {\n        if (this.started) {\n            this.pageObserver.stop();\n            this.cacheObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkClickObserver.stop();\n            this.formSubmitObserver.stop();\n            this.scrollObserver.stop();\n            this.streamObserver.stop();\n            this.frameRedirector.stop();\n            this.history.stop();\n            this.started = false;\n        }\n    }\n    registerAdapter(adapter) {\n        this.adapter = adapter;\n    }\n    visit(location, options = {}) {\n        const frameElement = options.frame ? document.getElementById(options.frame) : null;\n        if (frameElement instanceof FrameElement) {\n            frameElement.src = location.toString();\n            frameElement.loaded;\n        }\n        else {\n            this.navigator.proposeVisit(expandURL(location), options);\n        }\n    }\n    connectStreamSource(source) {\n        this.streamObserver.connectStreamSource(source);\n    }\n    disconnectStreamSource(source) {\n        this.streamObserver.disconnectStreamSource(source);\n    }\n    renderStreamMessage(message) {\n        this.streamMessageRenderer.render(StreamMessage.wrap(message));\n    }\n    clearCache() {\n        this.view.clearSnapshotCache();\n    }\n    setProgressBarDelay(delay) {\n        this.progressBarDelay = delay;\n    }\n    setFormMode(mode) {\n        this.formMode = mode;\n    }\n    get location() {\n        return this.history.location;\n    }\n    get restorationIdentifier() {\n        return this.history.restorationIdentifier;\n    }\n    historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n        if (this.enabled) {\n            this.navigator.startVisit(location, restorationIdentifier, {\n                action: \"restore\",\n                historyChanged: true,\n            });\n        }\n        else {\n            this.adapter.pageInvalidated({\n                reason: \"turbo_disabled\",\n            });\n        }\n    }\n    scrollPositionChanged(position) {\n        this.history.updateRestorationData({ scrollPosition: position });\n    }\n    willSubmitFormLinkToLocation(link, location) {\n        return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n    }\n    submittedFormLinkToLocation() { }\n    willFollowLinkToLocation(link, location, event) {\n        return (this.elementIsNavigatable(link) &&\n            locationIsVisitable(location, this.snapshot.rootLocation) &&\n            this.applicationAllowsFollowingLinkToLocation(link, location, event));\n    }\n    followedLinkToLocation(link, location) {\n        const action = this.getActionForLink(link);\n        const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n        this.visit(location.href, { action, acceptsStreamResponse });\n    }\n    allowsVisitingLocationWithAction(location, action) {\n        return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n    }\n    visitProposedToLocation(location, options) {\n        extendURLWithDeprecatedProperties(location);\n        this.adapter.visitProposedToLocation(location, options);\n    }\n    visitStarted(visit) {\n        if (!visit.acceptsStreamResponse) {\n            markAsBusy(document.documentElement);\n        }\n        extendURLWithDeprecatedProperties(visit.location);\n        if (!visit.silent) {\n            this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n        }\n    }\n    visitCompleted(visit) {\n        clearBusyState(document.documentElement);\n        this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n    }\n    locationWithActionIsSamePage(location, action) {\n        return this.navigator.locationWithActionIsSamePage(location, action);\n    }\n    visitScrolledToSamePageLocation(oldURL, newURL) {\n        this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n    }\n    willSubmitForm(form, submitter) {\n        const action = getAction(form, submitter);\n        return (this.submissionIsNavigatable(form, submitter) &&\n            locationIsVisitable(expandURL(action), this.snapshot.rootLocation));\n    }\n    formSubmitted(form, submitter) {\n        this.navigator.submitForm(form, submitter);\n    }\n    pageBecameInteractive() {\n        this.view.lastRenderedLocation = this.location;\n        this.notifyApplicationAfterPageLoad();\n    }\n    pageLoaded() {\n        this.history.assumeControlOfScrollRestoration();\n    }\n    pageWillUnload() {\n        this.history.relinquishControlOfScrollRestoration();\n    }\n    receivedMessageFromStream(message) {\n        this.renderStreamMessage(message);\n    }\n    viewWillCacheSnapshot() {\n        var _a;\n        if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n            this.notifyApplicationBeforeCachingSnapshot();\n        }\n    }\n    allowsImmediateRender({ element }, options) {\n        const event = this.notifyApplicationBeforeRender(element, options);\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) {\n        this.view.lastRenderedLocation = this.history.location;\n        this.notifyApplicationAfterRender();\n    }\n    preloadOnLoadLinksForView(element) {\n        this.preloader.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated(reason) {\n        this.adapter.pageInvalidated(reason);\n    }\n    frameLoaded(frame) {\n        this.notifyApplicationAfterFrameLoad(frame);\n    }\n    frameRendered(fetchResponse, frame) {\n        this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n    }\n    applicationAllowsFollowingLinkToLocation(link, location, ev) {\n        const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n        return !event.defaultPrevented;\n    }\n    applicationAllowsVisitingLocation(location) {\n        const event = this.notifyApplicationBeforeVisitingLocation(location);\n        return !event.defaultPrevented;\n    }\n    notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n        return dispatch(\"turbo:click\", {\n            target: link,\n            detail: { url: location.href, originalEvent: event },\n            cancelable: true,\n        });\n    }\n    notifyApplicationBeforeVisitingLocation(location) {\n        return dispatch(\"turbo:before-visit\", {\n            detail: { url: location.href },\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterVisitingLocation(location, action) {\n        return dispatch(\"turbo:visit\", { detail: { url: location.href, action } });\n    }\n    notifyApplicationBeforeCachingSnapshot() {\n        return dispatch(\"turbo:before-cache\");\n    }\n    notifyApplicationBeforeRender(newBody, options) {\n        return dispatch(\"turbo:before-render\", {\n            detail: Object.assign({ newBody }, options),\n            cancelable: true,\n        });\n    }\n    notifyApplicationAfterRender() {\n        return dispatch(\"turbo:render\");\n    }\n    notifyApplicationAfterPageLoad(timing = {}) {\n        return dispatch(\"turbo:load\", {\n            detail: { url: this.location.href, timing },\n        });\n    }\n    notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n        dispatchEvent(new HashChangeEvent(\"hashchange\", {\n            oldURL: oldURL.toString(),\n            newURL: newURL.toString(),\n        }));\n    }\n    notifyApplicationAfterFrameLoad(frame) {\n        return dispatch(\"turbo:frame-load\", { target: frame });\n    }\n    notifyApplicationAfterFrameRender(fetchResponse, frame) {\n        return dispatch(\"turbo:frame-render\", {\n            detail: { fetchResponse },\n            target: frame,\n            cancelable: true,\n        });\n    }\n    submissionIsNavigatable(form, submitter) {\n        if (this.formMode == \"off\") {\n            return false;\n        }\n        else {\n            const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n            if (this.formMode == \"optin\") {\n                return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n            }\n            else {\n                return submitterIsNavigatable && this.elementIsNavigatable(form);\n            }\n        }\n    }\n    elementIsNavigatable(element) {\n        const container = element.closest(\"[data-turbo]\");\n        const withinFrame = element.closest(\"turbo-frame\");\n        if (this.drive || withinFrame) {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") != \"false\";\n            }\n            else {\n                return true;\n            }\n        }\n        else {\n            if (container) {\n                return container.getAttribute(\"data-turbo\") == \"true\";\n            }\n            else {\n                return false;\n            }\n        }\n    }\n    getActionForLink(link) {\n        const action = link.getAttribute(\"data-turbo-action\");\n        return isAction(action) ? action : \"advance\";\n    }\n    get snapshot() {\n        return this.view.snapshot;\n    }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n    Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n    absoluteURL: {\n        get() {\n            return this.toString();\n        },\n    },\n};\n\nclass Cache {\n    constructor(session) {\n        this.session = session;\n    }\n    clear() {\n        this.session.clearCache();\n    }\n    resetCacheControl() {\n        this.setCacheControl(\"\");\n    }\n    exemptPageFromCache() {\n        this.setCacheControl(\"no-cache\");\n    }\n    exemptPageFromPreview() {\n        this.setCacheControl(\"no-preview\");\n    }\n    setCacheControl(value) {\n        setMetaContent(\"turbo-cache-control\", value);\n    }\n}\n\nconst StreamActions = {\n    after() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });\n    },\n    append() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.append(this.templateContent));\n    },\n    before() {\n        this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });\n    },\n    prepend() {\n        this.removeDuplicateTargetChildren();\n        this.targetElements.forEach((e) => e.prepend(this.templateContent));\n    },\n    remove() {\n        this.targetElements.forEach((e) => e.remove());\n    },\n    replace() {\n        this.targetElements.forEach((e) => e.replaceWith(this.templateContent));\n    },\n    update() {\n        this.targetElements.forEach((e) => e.replaceChildren(this.templateContent));\n    },\n};\n\nconst session = new Session();\nconst cache = new Cache(session);\nconst { navigator: navigator$1 } = session;\nfunction start() {\n    session.start();\n}\nfunction registerAdapter(adapter) {\n    session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n    session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n    session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n    session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n    session.renderStreamMessage(message);\n}\nfunction clearCache() {\n    console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n    session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n    session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n    FormSubmission.confirmMethod = confirmMethod;\n}\nfunction setFormMode(mode) {\n    session.setFormMode(mode);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n    __proto__: null,\n    navigator: navigator$1,\n    session: session,\n    cache: cache,\n    PageRenderer: PageRenderer,\n    PageSnapshot: PageSnapshot,\n    FrameRenderer: FrameRenderer,\n    start: start,\n    registerAdapter: registerAdapter,\n    visit: visit,\n    connectStreamSource: connectStreamSource,\n    disconnectStreamSource: disconnectStreamSource,\n    renderStreamMessage: renderStreamMessage,\n    clearCache: clearCache,\n    setProgressBarDelay: setProgressBarDelay,\n    setConfirmMethod: setConfirmMethod,\n    setFormMode: setFormMode,\n    StreamActions: StreamActions\n});\n\nclass FrameController {\n    constructor(element) {\n        this.fetchResponseLoaded = (_fetchResponse) => { };\n        this.currentFetchRequest = null;\n        this.resolveVisitPromise = () => { };\n        this.connected = false;\n        this.hasBeenLoaded = false;\n        this.ignoredAttributes = new Set();\n        this.action = null;\n        this.visitCachedSnapshot = ({ element }) => {\n            const frame = element.querySelector(\"#\" + this.element.id);\n            if (frame && this.previousFrameElement) {\n                frame.replaceChildren(...this.previousFrameElement.children);\n            }\n            delete this.previousFrameElement;\n        };\n        this.element = element;\n        this.view = new FrameView(this, this.element);\n        this.appearanceObserver = new AppearanceObserver(this, this.element);\n        this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n        this.linkInterceptor = new LinkInterceptor(this, this.element);\n        this.restorationIdentifier = uuid();\n        this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n    }\n    connect() {\n        if (!this.connected) {\n            this.connected = true;\n            if (this.loadingStyle == FrameLoadingStyle.lazy) {\n                this.appearanceObserver.start();\n            }\n            else {\n                this.loadSourceURL();\n            }\n            this.formLinkClickObserver.start();\n            this.linkInterceptor.start();\n            this.formSubmitObserver.start();\n        }\n    }\n    disconnect() {\n        if (this.connected) {\n            this.connected = false;\n            this.appearanceObserver.stop();\n            this.formLinkClickObserver.stop();\n            this.linkInterceptor.stop();\n            this.formSubmitObserver.stop();\n        }\n    }\n    disabledChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.eager) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLChanged() {\n        if (this.isIgnoringChangesTo(\"src\"))\n            return;\n        if (this.element.isConnected) {\n            this.complete = false;\n        }\n        if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n            this.loadSourceURL();\n        }\n    }\n    sourceURLReloaded() {\n        const { src } = this.element;\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            this.element.removeAttribute(\"complete\");\n        });\n        this.element.src = null;\n        this.element.src = src;\n        return this.element.loaded;\n    }\n    completeChanged() {\n        if (this.isIgnoringChangesTo(\"complete\"))\n            return;\n        this.loadSourceURL();\n    }\n    loadingStyleChanged() {\n        if (this.loadingStyle == FrameLoadingStyle.lazy) {\n            this.appearanceObserver.start();\n        }\n        else {\n            this.appearanceObserver.stop();\n            this.loadSourceURL();\n        }\n    }\n    async loadSourceURL() {\n        if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n            this.element.loaded = this.visit(expandURL(this.sourceURL));\n            this.appearanceObserver.stop();\n            await this.element.loaded;\n            this.hasBeenLoaded = true;\n        }\n    }\n    async loadResponse(fetchResponse) {\n        if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n            this.sourceURL = fetchResponse.response.url;\n        }\n        try {\n            const html = await fetchResponse.responseHTML;\n            if (html) {\n                const { body } = parseHTMLDocument(html);\n                const newFrameElement = await this.extractForeignFrameElement(body);\n                if (newFrameElement) {\n                    const snapshot = new Snapshot(newFrameElement);\n                    const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);\n                    if (this.view.renderPromise)\n                        await this.view.renderPromise;\n                    this.changeHistory();\n                    await this.view.render(renderer);\n                    this.complete = true;\n                    session.frameRendered(fetchResponse, this.element);\n                    session.frameLoaded(this.element);\n                    this.fetchResponseLoaded(fetchResponse);\n                }\n                else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {\n                    console.warn(`A matching frame for #${this.element.id} was missing from the response, transforming into full-page Visit.`);\n                    this.visitResponse(fetchResponse.response);\n                }\n            }\n        }\n        catch (error) {\n            console.error(error);\n            this.view.invalidate();\n        }\n        finally {\n            this.fetchResponseLoaded = () => { };\n        }\n    }\n    elementAppearedInViewport(_element) {\n        this.loadSourceURL();\n    }\n    willSubmitFormLinkToLocation(link) {\n        return this.shouldInterceptNavigation(link);\n    }\n    submittedFormLinkToLocation(link, _location, form) {\n        const frame = this.findFrameElement(link);\n        if (frame)\n            form.setAttribute(\"data-turbo-frame\", frame.id);\n    }\n    shouldInterceptLinkClick(element, _location, _event) {\n        return this.shouldInterceptNavigation(element);\n    }\n    linkClickIntercepted(element, location) {\n        this.navigateFrame(element, location);\n    }\n    willSubmitForm(element, submitter) {\n        return element.closest(\"turbo-frame\") == this.element && this.shouldInterceptNavigation(element, submitter);\n    }\n    formSubmitted(element, submitter) {\n        if (this.formSubmission) {\n            this.formSubmission.stop();\n        }\n        this.formSubmission = new FormSubmission(this, element, submitter);\n        const { fetchRequest } = this.formSubmission;\n        this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n        this.formSubmission.start();\n    }\n    prepareHeadersForRequest(headers, request) {\n        var _a;\n        headers[\"Turbo-Frame\"] = this.id;\n        if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"data-turbo-stream\")) {\n            request.acceptResponseType(StreamMessage.contentType);\n        }\n    }\n    requestStarted(_request) {\n        markAsBusy(this.element);\n    }\n    requestPreventedHandlingResponse(_request, _response) {\n        this.resolveVisitPromise();\n    }\n    async requestSucceededWithResponse(request, response) {\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    async requestFailedWithResponse(request, response) {\n        console.error(response);\n        await this.loadResponse(response);\n        this.resolveVisitPromise();\n    }\n    requestErrored(request, error) {\n        console.error(error);\n        this.resolveVisitPromise();\n    }\n    requestFinished(_request) {\n        clearBusyState(this.element);\n    }\n    formSubmissionStarted({ formElement }) {\n        markAsBusy(formElement, this.findFrameElement(formElement));\n    }\n    formSubmissionSucceededWithResponse(formSubmission, response) {\n        const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n        frame.delegate.loadResponse(response);\n    }\n    formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n        this.element.delegate.loadResponse(fetchResponse);\n    }\n    formSubmissionErrored(formSubmission, error) {\n        console.error(error);\n    }\n    formSubmissionFinished({ formElement }) {\n        clearBusyState(formElement, this.findFrameElement(formElement));\n    }\n    allowsImmediateRender({ element: newFrame }, options) {\n        const event = dispatch(\"turbo:before-frame-render\", {\n            target: this.element,\n            detail: Object.assign({ newFrame }, options),\n            cancelable: true,\n        });\n        const { defaultPrevented, detail: { render }, } = event;\n        if (this.view.renderer && render) {\n            this.view.renderer.renderElement = render;\n        }\n        return !defaultPrevented;\n    }\n    viewRenderedSnapshot(_snapshot, _isPreview) { }\n    preloadOnLoadLinksForView(element) {\n        session.preloadOnLoadLinksForView(element);\n    }\n    viewInvalidated() { }\n    willRenderFrame(currentElement, _newElement) {\n        this.previousFrameElement = currentElement.cloneNode(true);\n    }\n    async visit(url) {\n        var _a;\n        const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n        (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n        this.currentFetchRequest = request;\n        return new Promise((resolve) => {\n            this.resolveVisitPromise = () => {\n                this.resolveVisitPromise = () => { };\n                this.currentFetchRequest = null;\n                resolve();\n            };\n            request.perform();\n        });\n    }\n    navigateFrame(element, url, submitter) {\n        const frame = this.findFrameElement(element, submitter);\n        this.pageSnapshot = PageSnapshot.fromElement(frame).clone();\n        frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n        this.withCurrentNavigationElement(element, () => {\n            frame.src = url;\n        });\n    }\n    proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n        this.action = getVisitAction(submitter, element, frame);\n        if (isAction(this.action)) {\n            const { visitCachedSnapshot } = frame.delegate;\n            frame.delegate.fetchResponseLoaded = (fetchResponse) => {\n                if (frame.src) {\n                    const { statusCode, redirected } = fetchResponse;\n                    const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n                    const response = { statusCode, redirected, responseHTML };\n                    const options = {\n                        response,\n                        visitCachedSnapshot,\n                        willRender: false,\n                        updateHistory: false,\n                        restorationIdentifier: this.restorationIdentifier,\n                        snapshot: this.pageSnapshot,\n                    };\n                    if (this.action)\n                        options.action = this.action;\n                    session.visit(frame.src, options);\n                }\n            };\n        }\n    }\n    changeHistory() {\n        if (this.action) {\n            const method = getHistoryMethodForAction(this.action);\n            session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n        }\n    }\n    willHandleFrameMissingFromResponse(fetchResponse) {\n        this.element.setAttribute(\"complete\", \"\");\n        const response = fetchResponse.response;\n        const visit = async (url, options = {}) => {\n            if (url instanceof Response) {\n                this.visitResponse(url);\n            }\n            else {\n                session.visit(url, options);\n            }\n        };\n        const event = dispatch(\"turbo:frame-missing\", {\n            target: this.element,\n            detail: { response, visit },\n            cancelable: true,\n        });\n        return !event.defaultPrevented;\n    }\n    async visitResponse(response) {\n        const wrapped = new FetchResponse(response);\n        const responseHTML = await wrapped.responseHTML;\n        const { location, redirected, statusCode } = wrapped;\n        return session.visit(location, { response: { redirected, statusCode, responseHTML } });\n    }\n    findFrameElement(element, submitter) {\n        var _a;\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n    }\n    async extractForeignFrameElement(container) {\n        let element;\n        const id = CSS.escape(this.id);\n        try {\n            element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n            if (element) {\n                return element;\n            }\n            element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n            if (element) {\n                await element.loaded;\n                return await this.extractForeignFrameElement(element);\n            }\n        }\n        catch (error) {\n            console.error(error);\n            return new FrameElement();\n        }\n        return null;\n    }\n    formActionIsVisitable(form, submitter) {\n        const action = getAction(form, submitter);\n        return locationIsVisitable(expandURL(action), this.rootLocation);\n    }\n    shouldInterceptNavigation(element, submitter) {\n        const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n        if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n            return false;\n        }\n        if (!this.enabled || id == \"_top\") {\n            return false;\n        }\n        if (id) {\n            const frameElement = getFrameElementById(id);\n            if (frameElement) {\n                return !frameElement.disabled;\n            }\n        }\n        if (!session.elementIsNavigatable(element)) {\n            return false;\n        }\n        if (submitter && !session.elementIsNavigatable(submitter)) {\n            return false;\n        }\n        return true;\n    }\n    get id() {\n        return this.element.id;\n    }\n    get enabled() {\n        return !this.element.disabled;\n    }\n    get sourceURL() {\n        if (this.element.src) {\n            return this.element.src;\n        }\n    }\n    set sourceURL(sourceURL) {\n        this.ignoringChangesToAttribute(\"src\", () => {\n            this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n        });\n    }\n    get loadingStyle() {\n        return this.element.loading;\n    }\n    get isLoading() {\n        return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n    }\n    get complete() {\n        return this.element.hasAttribute(\"complete\");\n    }\n    set complete(value) {\n        this.ignoringChangesToAttribute(\"complete\", () => {\n            if (value) {\n                this.element.setAttribute(\"complete\", \"\");\n            }\n            else {\n                this.element.removeAttribute(\"complete\");\n            }\n        });\n    }\n    get isActive() {\n        return this.element.isActive && this.connected;\n    }\n    get rootLocation() {\n        var _a;\n        const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n        const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n        return expandURL(root);\n    }\n    isIgnoringChangesTo(attributeName) {\n        return this.ignoredAttributes.has(attributeName);\n    }\n    ignoringChangesToAttribute(attributeName, callback) {\n        this.ignoredAttributes.add(attributeName);\n        callback();\n        this.ignoredAttributes.delete(attributeName);\n    }\n    withCurrentNavigationElement(element, callback) {\n        this.currentNavigationElement = element;\n        callback();\n        delete this.currentNavigationElement;\n    }\n}\nfunction getFrameElementById(id) {\n    if (id != null) {\n        const element = document.getElementById(id);\n        if (element instanceof FrameElement) {\n            return element;\n        }\n    }\n}\nfunction activateElement(element, currentURL) {\n    if (element) {\n        const src = element.getAttribute(\"src\");\n        if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n            throw new Error(`Matching <turbo-frame id=\"${element.id}\"> element has a source URL which references itself`);\n        }\n        if (element.ownerDocument !== document) {\n            element = document.importNode(element, true);\n        }\n        if (element instanceof FrameElement) {\n            element.connectedCallback();\n            element.disconnectedCallback();\n            return element;\n        }\n    }\n}\n\nclass StreamElement extends HTMLElement {\n    static async renderElement(newElement) {\n        await newElement.performAction();\n    }\n    async connectedCallback() {\n        try {\n            await this.render();\n        }\n        catch (error) {\n            console.error(error);\n        }\n        finally {\n            this.disconnect();\n        }\n    }\n    async render() {\n        var _a;\n        return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {\n            const event = this.beforeRenderEvent;\n            if (this.dispatchEvent(event)) {\n                await nextAnimationFrame();\n                await event.detail.render(this);\n            }\n        })()));\n    }\n    disconnect() {\n        try {\n            this.remove();\n        }\n        catch (_a) { }\n    }\n    removeDuplicateTargetChildren() {\n        this.duplicateChildren.forEach((c) => c.remove());\n    }\n    get duplicateChildren() {\n        var _a;\n        const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);\n        const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);\n        return existingChildren.filter((c) => newChildrenIds.includes(c.id));\n    }\n    get performAction() {\n        if (this.action) {\n            const actionFunction = StreamActions[this.action];\n            if (actionFunction) {\n                return actionFunction;\n            }\n            this.raise(\"unknown action\");\n        }\n        this.raise(\"action attribute is missing\");\n    }\n    get targetElements() {\n        if (this.target) {\n            return this.targetElementsById;\n        }\n        else if (this.targets) {\n            return this.targetElementsByQuery;\n        }\n        else {\n            this.raise(\"target or targets attribute is missing\");\n        }\n    }\n    get templateContent() {\n        return this.templateElement.content.cloneNode(true);\n    }\n    get templateElement() {\n        if (this.firstElementChild === null) {\n            const template = this.ownerDocument.createElement(\"template\");\n            this.appendChild(template);\n            return template;\n        }\n        else if (this.firstElementChild instanceof HTMLTemplateElement) {\n            return this.firstElementChild;\n        }\n        this.raise(\"first child element must be a <template> element\");\n    }\n    get action() {\n        return this.getAttribute(\"action\");\n    }\n    get target() {\n        return this.getAttribute(\"target\");\n    }\n    get targets() {\n        return this.getAttribute(\"targets\");\n    }\n    raise(message) {\n        throw new Error(`${this.description}: ${message}`);\n    }\n    get description() {\n        var _a, _b;\n        return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : \"<turbo-stream>\";\n    }\n    get beforeRenderEvent() {\n        return new CustomEvent(\"turbo:before-stream-render\", {\n            bubbles: true,\n            cancelable: true,\n            detail: { newStream: this, render: StreamElement.renderElement },\n        });\n    }\n    get targetElementsById() {\n        var _a;\n        const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);\n        if (element !== null) {\n            return [element];\n        }\n        else {\n            return [];\n        }\n    }\n    get targetElementsByQuery() {\n        var _a;\n        const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);\n        if (elements.length !== 0) {\n            return Array.prototype.slice.call(elements);\n        }\n        else {\n            return [];\n        }\n    }\n}\n\nclass StreamSourceElement extends HTMLElement {\n    constructor() {\n        super(...arguments);\n        this.streamSource = null;\n    }\n    connectedCallback() {\n        this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);\n        connectStreamSource(this.streamSource);\n    }\n    disconnectedCallback() {\n        if (this.streamSource) {\n            disconnectStreamSource(this.streamSource);\n        }\n    }\n    get src() {\n        return this.getAttribute(\"src\") || \"\";\n    }\n}\n\nFrameElement.delegateConstructor = FrameController;\nif (customElements.get(\"turbo-frame\") === undefined) {\n    customElements.define(\"turbo-frame\", FrameElement);\n}\nif (customElements.get(\"turbo-stream\") === undefined) {\n    customElements.define(\"turbo-stream\", StreamElement);\n}\nif (customElements.get(\"turbo-stream-source\") === undefined) {\n    customElements.define(\"turbo-stream-source\", StreamSourceElement);\n}\n\n(() => {\n    let element = document.currentScript;\n    if (!element)\n        return;\n    if (element.hasAttribute(\"data-turbo-suppress-warning\"))\n        return;\n    element = element.parentElement;\n    while (element) {\n        if (element == document.body) {\n            return console.warn(unindent `\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\n\n        Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\n\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\n\n        \u2014\u2014\n        Suppress this warning by adding a \"data-turbo-suppress-warning\" attribute to: %s\n      `, element.outerHTML);\n        }\n        element = element.parentElement;\n    }\n})();\n\nwindow.Turbo = Turbo;\nstart();\n\nexport { FrameElement, FrameLoadingStyle, FrameRenderer, PageRenderer, PageSnapshot, StreamActions, StreamElement, StreamSourceElement, cache, clearCache, connectStreamSource, disconnectStreamSource, navigator$1 as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setFormMode, setProgressBarDelay, start, visit };\n", "let consumer\n\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer))\n}\n\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer\n}\n\nexport async function createConsumer() {\n  const { createConsumer } = await import(/* webpackChunkName: \"actioncable\" */ \"@rails/actioncable/src\")\n  return createConsumer()\n}\n\nexport async function subscribeTo(channel, mixin) {\n  const { subscriptions } = await getConsumer()\n  return subscriptions.create(channel, mixin)\n}\n", "// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk (obj) {\n    if (!obj || typeof obj !== 'object') return obj;\n    if (obj instanceof Date || obj instanceof RegExp) return obj;\n    if (Array.isArray(obj)) return obj.map(walk);\n    return Object.keys(obj).reduce(function (acc, key) {\n        var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n            return '_' + x.toLowerCase();\n        });\n        acc[camel] = walk(obj[key]);\n        return acc;\n    }, {});\n};", "import { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\"\nimport { subscribeTo } from \"./cable\"\nimport snakeize from \"./snakeize\"\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  async connectedCallback() {\n    connectStreamSource(this)\n    this.subscription = await subscribeTo(this.channel, { received: this.dispatchMessageEvent.bind(this) })\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this)\n    if (this.subscription) this.subscription.unsubscribe()\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", { data })\n    return this.dispatchEvent(event)\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\")\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\")\n    return { channel, signed_stream_name, ...snakeize({ ...this.dataset }) }\n  }\n}\n\ncustomElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement)\n", "export function encodeMethodIntoRequestBody(event) {\n  if (event.target instanceof HTMLFormElement) {\n    const { target: form, detail: { fetchOptions } } = event\n\n    form.addEventListener(\"turbo:submit-start\", ({ detail: { formSubmission: { submitter } } }) => {\n      const method = (submitter && submitter.formMethod) || (fetchOptions.body && fetchOptions.body.get(\"_method\")) || form.getAttribute(\"method\")\n\n      if (!/get/i.test(method)) {\n        if (/post/i.test(method)) {\n          fetchOptions.body.delete(\"_method\")\n        } else {\n          fetchOptions.body.set(\"_method\", method)\n        }\n\n        fetchOptions.method = \"post\"\n      }\n    }, { once: true })\n  }\n}\n", "import \"./cable_stream_source_element\"\n\nimport * as Turbo from \"@hotwired/turbo\"\nexport { Turbo }\n\nimport * as cable from \"./cable\"\nexport { cable }\n\nimport { encodeMethodIntoRequestBody } from \"./fetch_requests\"\n\naddEventListener(\"turbo:before-fetch-request\", encodeMethodIntoRequestBody)\n", "/*\nStimulus 3.2.1\nCopyright \u00A9 2022 Basecamp, LLC\n */\nclass EventListener {\n    constructor(eventTarget, eventName, eventOptions) {\n        this.eventTarget = eventTarget;\n        this.eventName = eventName;\n        this.eventOptions = eventOptions;\n        this.unorderedBindings = new Set();\n    }\n    connect() {\n        this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n    }\n    disconnect() {\n        this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n    }\n    bindingConnected(binding) {\n        this.unorderedBindings.add(binding);\n    }\n    bindingDisconnected(binding) {\n        this.unorderedBindings.delete(binding);\n    }\n    handleEvent(event) {\n        const extendedEvent = extendEvent(event);\n        for (const binding of this.bindings) {\n            if (extendedEvent.immediatePropagationStopped) {\n                break;\n            }\n            else {\n                binding.handleEvent(extendedEvent);\n            }\n        }\n    }\n    hasBindings() {\n        return this.unorderedBindings.size > 0;\n    }\n    get bindings() {\n        return Array.from(this.unorderedBindings).sort((left, right) => {\n            const leftIndex = left.index, rightIndex = right.index;\n            return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n        });\n    }\n}\nfunction extendEvent(event) {\n    if (\"immediatePropagationStopped\" in event) {\n        return event;\n    }\n    else {\n        const { stopImmediatePropagation } = event;\n        return Object.assign(event, {\n            immediatePropagationStopped: false,\n            stopImmediatePropagation() {\n                this.immediatePropagationStopped = true;\n                stopImmediatePropagation.call(this);\n            },\n        });\n    }\n}\n\nclass Dispatcher {\n    constructor(application) {\n        this.application = application;\n        this.eventListenerMaps = new Map();\n        this.started = false;\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.eventListeners.forEach((eventListener) => eventListener.connect());\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.started = false;\n            this.eventListeners.forEach((eventListener) => eventListener.disconnect());\n        }\n    }\n    get eventListeners() {\n        return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n    }\n    bindingConnected(binding) {\n        this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n    }\n    bindingDisconnected(binding, clearEventListeners = false) {\n        this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n        if (clearEventListeners)\n            this.clearEventListenersForBinding(binding);\n    }\n    handleError(error, message, detail = {}) {\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    clearEventListenersForBinding(binding) {\n        const eventListener = this.fetchEventListenerForBinding(binding);\n        if (!eventListener.hasBindings()) {\n            eventListener.disconnect();\n            this.removeMappedEventListenerFor(binding);\n        }\n    }\n    removeMappedEventListenerFor(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        eventListenerMap.delete(cacheKey);\n        if (eventListenerMap.size == 0)\n            this.eventListenerMaps.delete(eventTarget);\n    }\n    fetchEventListenerForBinding(binding) {\n        const { eventTarget, eventName, eventOptions } = binding;\n        return this.fetchEventListener(eventTarget, eventName, eventOptions);\n    }\n    fetchEventListener(eventTarget, eventName, eventOptions) {\n        const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n        const cacheKey = this.cacheKey(eventName, eventOptions);\n        let eventListener = eventListenerMap.get(cacheKey);\n        if (!eventListener) {\n            eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n            eventListenerMap.set(cacheKey, eventListener);\n        }\n        return eventListener;\n    }\n    createEventListener(eventTarget, eventName, eventOptions) {\n        const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n        if (this.started) {\n            eventListener.connect();\n        }\n        return eventListener;\n    }\n    fetchEventListenerMapForEventTarget(eventTarget) {\n        let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n        if (!eventListenerMap) {\n            eventListenerMap = new Map();\n            this.eventListenerMaps.set(eventTarget, eventListenerMap);\n        }\n        return eventListenerMap;\n    }\n    cacheKey(eventName, eventOptions) {\n        const parts = [eventName];\n        Object.keys(eventOptions)\n            .sort()\n            .forEach((key) => {\n            parts.push(`${eventOptions[key] ? \"\" : \"!\"}${key}`);\n        });\n        return parts.join(\":\");\n    }\n}\n\nconst defaultActionDescriptorFilters = {\n    stop({ event, value }) {\n        if (value)\n            event.stopPropagation();\n        return true;\n    },\n    prevent({ event, value }) {\n        if (value)\n            event.preventDefault();\n        return true;\n    },\n    self({ event, value, element }) {\n        if (value) {\n            return element === event.target;\n        }\n        else {\n            return true;\n        }\n    },\n};\nconst descriptorPattern = /^(?:(.+?)(?:\\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;\nfunction parseActionDescriptorString(descriptorString) {\n    const source = descriptorString.trim();\n    const matches = source.match(descriptorPattern) || [];\n    let eventName = matches[1];\n    let keyFilter = matches[2];\n    if (keyFilter && ![\"keydown\", \"keyup\", \"keypress\"].includes(eventName)) {\n        eventName += `.${keyFilter}`;\n        keyFilter = \"\";\n    }\n    return {\n        eventTarget: parseEventTarget(matches[3]),\n        eventName,\n        eventOptions: matches[6] ? parseEventOptions(matches[6]) : {},\n        identifier: matches[4],\n        methodName: matches[5],\n        keyFilter,\n    };\n}\nfunction parseEventTarget(eventTargetName) {\n    if (eventTargetName == \"window\") {\n        return window;\n    }\n    else if (eventTargetName == \"document\") {\n        return document;\n    }\n}\nfunction parseEventOptions(eventOptions) {\n    return eventOptions\n        .split(\":\")\n        .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, \"\")]: !/^!/.test(token) }), {});\n}\nfunction stringifyEventTarget(eventTarget) {\n    if (eventTarget == window) {\n        return \"window\";\n    }\n    else if (eventTarget == document) {\n        return \"document\";\n    }\n}\n\nfunction camelize(value) {\n    return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\nfunction namespaceCamelize(value) {\n    return camelize(value.replace(/--/g, \"-\").replace(/__/g, \"_\"));\n}\nfunction capitalize(value) {\n    return value.charAt(0).toUpperCase() + value.slice(1);\n}\nfunction dasherize(value) {\n    return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);\n}\nfunction tokenize(value) {\n    return value.match(/[^\\s]+/g) || [];\n}\n\nclass Action {\n    constructor(element, index, descriptor, schema) {\n        this.element = element;\n        this.index = index;\n        this.eventTarget = descriptor.eventTarget || element;\n        this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n        this.eventOptions = descriptor.eventOptions || {};\n        this.identifier = descriptor.identifier || error(\"missing identifier\");\n        this.methodName = descriptor.methodName || error(\"missing method name\");\n        this.keyFilter = descriptor.keyFilter || \"\";\n        this.schema = schema;\n    }\n    static forToken(token, schema) {\n        return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);\n    }\n    toString() {\n        const eventFilter = this.keyFilter ? `.${this.keyFilter}` : \"\";\n        const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : \"\";\n        return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;\n    }\n    isFilterTarget(event) {\n        if (!this.keyFilter) {\n            return false;\n        }\n        const filteres = this.keyFilter.split(\"+\");\n        const modifiers = [\"meta\", \"ctrl\", \"alt\", \"shift\"];\n        const [meta, ctrl, alt, shift] = modifiers.map((modifier) => filteres.includes(modifier));\n        if (event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift) {\n            return true;\n        }\n        const standardFilter = filteres.filter((key) => !modifiers.includes(key))[0];\n        if (!standardFilter) {\n            return false;\n        }\n        if (!Object.prototype.hasOwnProperty.call(this.keyMappings, standardFilter)) {\n            error(`contains unknown key filter: ${this.keyFilter}`);\n        }\n        return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();\n    }\n    get params() {\n        const params = {};\n        const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, \"i\");\n        for (const { name, value } of Array.from(this.element.attributes)) {\n            const match = name.match(pattern);\n            const key = match && match[1];\n            if (key) {\n                params[camelize(key)] = typecast(value);\n            }\n        }\n        return params;\n    }\n    get eventTargetName() {\n        return stringifyEventTarget(this.eventTarget);\n    }\n    get keyMappings() {\n        return this.schema.keyMappings;\n    }\n}\nconst defaultEventNames = {\n    a: () => \"click\",\n    button: () => \"click\",\n    form: () => \"submit\",\n    details: () => \"toggle\",\n    input: (e) => (e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\"),\n    select: () => \"change\",\n    textarea: () => \"input\",\n};\nfunction getDefaultEventNameForElement(element) {\n    const tagName = element.tagName.toLowerCase();\n    if (tagName in defaultEventNames) {\n        return defaultEventNames[tagName](element);\n    }\n}\nfunction error(message) {\n    throw new Error(message);\n}\nfunction typecast(value) {\n    try {\n        return JSON.parse(value);\n    }\n    catch (o_O) {\n        return value;\n    }\n}\n\nclass Binding {\n    constructor(context, action) {\n        this.context = context;\n        this.action = action;\n    }\n    get index() {\n        return this.action.index;\n    }\n    get eventTarget() {\n        return this.action.eventTarget;\n    }\n    get eventOptions() {\n        return this.action.eventOptions;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    handleEvent(event) {\n        if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(event)) {\n            this.invokeWithEvent(event);\n        }\n    }\n    get eventName() {\n        return this.action.eventName;\n    }\n    get method() {\n        const method = this.controller[this.methodName];\n        if (typeof method == \"function\") {\n            return method;\n        }\n        throw new Error(`Action \"${this.action}\" references undefined method \"${this.methodName}\"`);\n    }\n    applyEventModifiers(event) {\n        const { element } = this.action;\n        const { actionDescriptorFilters } = this.context.application;\n        let passes = true;\n        for (const [name, value] of Object.entries(this.eventOptions)) {\n            if (name in actionDescriptorFilters) {\n                const filter = actionDescriptorFilters[name];\n                passes = passes && filter({ name, value, event, element });\n            }\n            else {\n                continue;\n            }\n        }\n        return passes;\n    }\n    invokeWithEvent(event) {\n        const { target, currentTarget } = event;\n        try {\n            const { params } = this.action;\n            const actionEvent = Object.assign(event, { params });\n            this.method.call(this.controller, actionEvent);\n            this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });\n        }\n        catch (error) {\n            const { identifier, controller, element, index } = this;\n            const detail = { identifier, controller, element, index, event };\n            this.context.handleError(error, `invoking action \"${this.action}\"`, detail);\n        }\n    }\n    willBeInvokedByEvent(event) {\n        const eventTarget = event.target;\n        if (event instanceof KeyboardEvent && this.action.isFilterTarget(event)) {\n            return false;\n        }\n        if (this.element === eventTarget) {\n            return true;\n        }\n        else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n            return this.scope.containsElement(eventTarget);\n        }\n        else {\n            return this.scope.containsElement(this.action.element);\n        }\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    get methodName() {\n        return this.action.methodName;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nclass ElementObserver {\n    constructor(element, delegate) {\n        this.mutationObserverInit = { attributes: true, childList: true, subtree: true };\n        this.element = element;\n        this.started = false;\n        this.delegate = delegate;\n        this.elements = new Set();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.refresh();\n        }\n    }\n    pause(callback) {\n        if (this.started) {\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n        callback();\n        if (!this.started) {\n            this.mutationObserver.observe(this.element, this.mutationObserverInit);\n            this.started = true;\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            const matches = new Set(this.matchElementsInTree());\n            for (const element of Array.from(this.elements)) {\n                if (!matches.has(element)) {\n                    this.removeElement(element);\n                }\n            }\n            for (const element of Array.from(matches)) {\n                this.addElement(element);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        if (mutation.type == \"attributes\") {\n            this.processAttributeChange(mutation.target, mutation.attributeName);\n        }\n        else if (mutation.type == \"childList\") {\n            this.processRemovedNodes(mutation.removedNodes);\n            this.processAddedNodes(mutation.addedNodes);\n        }\n    }\n    processAttributeChange(node, attributeName) {\n        const element = node;\n        if (this.elements.has(element)) {\n            if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n                this.delegate.elementAttributeChanged(element, attributeName);\n            }\n            else {\n                this.removeElement(element);\n            }\n        }\n        else if (this.matchElement(element)) {\n            this.addElement(element);\n        }\n    }\n    processRemovedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element) {\n                this.processTree(element, this.removeElement);\n            }\n        }\n    }\n    processAddedNodes(nodes) {\n        for (const node of Array.from(nodes)) {\n            const element = this.elementFromNode(node);\n            if (element && this.elementIsActive(element)) {\n                this.processTree(element, this.addElement);\n            }\n        }\n    }\n    matchElement(element) {\n        return this.delegate.matchElement(element);\n    }\n    matchElementsInTree(tree = this.element) {\n        return this.delegate.matchElementsInTree(tree);\n    }\n    processTree(tree, processor) {\n        for (const element of this.matchElementsInTree(tree)) {\n            processor.call(this, element);\n        }\n    }\n    elementFromNode(node) {\n        if (node.nodeType == Node.ELEMENT_NODE) {\n            return node;\n        }\n    }\n    elementIsActive(element) {\n        if (element.isConnected != this.element.isConnected) {\n            return false;\n        }\n        else {\n            return this.element.contains(element);\n        }\n    }\n    addElement(element) {\n        if (!this.elements.has(element)) {\n            if (this.elementIsActive(element)) {\n                this.elements.add(element);\n                if (this.delegate.elementMatched) {\n                    this.delegate.elementMatched(element);\n                }\n            }\n        }\n    }\n    removeElement(element) {\n        if (this.elements.has(element)) {\n            this.elements.delete(element);\n            if (this.delegate.elementUnmatched) {\n                this.delegate.elementUnmatched(element);\n            }\n        }\n    }\n}\n\nclass AttributeObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeName = attributeName;\n        this.delegate = delegate;\n        this.elementObserver = new ElementObserver(element, this);\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    get selector() {\n        return `[${this.attributeName}]`;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    matchElement(element) {\n        return element.hasAttribute(this.attributeName);\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        if (this.delegate.elementMatchedAttribute) {\n            this.delegate.elementMatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementUnmatched(element) {\n        if (this.delegate.elementUnmatchedAttribute) {\n            this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n        }\n    }\n    elementAttributeChanged(element, attributeName) {\n        if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n            this.delegate.elementAttributeValueChanged(element, attributeName);\n        }\n    }\n}\n\nfunction add(map, key, value) {\n    fetch(map, key).add(value);\n}\nfunction del(map, key, value) {\n    fetch(map, key).delete(value);\n    prune(map, key);\n}\nfunction fetch(map, key) {\n    let values = map.get(key);\n    if (!values) {\n        values = new Set();\n        map.set(key, values);\n    }\n    return values;\n}\nfunction prune(map, key) {\n    const values = map.get(key);\n    if (values != null && values.size == 0) {\n        map.delete(key);\n    }\n}\n\nclass Multimap {\n    constructor() {\n        this.valuesByKey = new Map();\n    }\n    get keys() {\n        return Array.from(this.valuesByKey.keys());\n    }\n    get values() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n    }\n    get size() {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.reduce((size, set) => size + set.size, 0);\n    }\n    add(key, value) {\n        add(this.valuesByKey, key, value);\n    }\n    delete(key, value) {\n        del(this.valuesByKey, key, value);\n    }\n    has(key, value) {\n        const values = this.valuesByKey.get(key);\n        return values != null && values.has(value);\n    }\n    hasKey(key) {\n        return this.valuesByKey.has(key);\n    }\n    hasValue(value) {\n        const sets = Array.from(this.valuesByKey.values());\n        return sets.some((set) => set.has(value));\n    }\n    getValuesForKey(key) {\n        const values = this.valuesByKey.get(key);\n        return values ? Array.from(values) : [];\n    }\n    getKeysForValue(value) {\n        return Array.from(this.valuesByKey)\n            .filter(([_key, values]) => values.has(value))\n            .map(([key, _values]) => key);\n    }\n}\n\nclass IndexedMultimap extends Multimap {\n    constructor() {\n        super();\n        this.keysByValue = new Map();\n    }\n    get values() {\n        return Array.from(this.keysByValue.keys());\n    }\n    add(key, value) {\n        super.add(key, value);\n        add(this.keysByValue, value, key);\n    }\n    delete(key, value) {\n        super.delete(key, value);\n        del(this.keysByValue, value, key);\n    }\n    hasValue(value) {\n        return this.keysByValue.has(value);\n    }\n    getKeysForValue(value) {\n        const set = this.keysByValue.get(value);\n        return set ? Array.from(set) : [];\n    }\n}\n\nclass SelectorObserver {\n    constructor(element, selector, delegate, details = {}) {\n        this.selector = selector;\n        this.details = details;\n        this.elementObserver = new ElementObserver(element, this);\n        this.delegate = delegate;\n        this.matchesByElement = new Multimap();\n    }\n    get started() {\n        return this.elementObserver.started;\n    }\n    start() {\n        this.elementObserver.start();\n    }\n    pause(callback) {\n        this.elementObserver.pause(callback);\n    }\n    stop() {\n        this.elementObserver.stop();\n    }\n    refresh() {\n        this.elementObserver.refresh();\n    }\n    get element() {\n        return this.elementObserver.element;\n    }\n    matchElement(element) {\n        const matches = element.matches(this.selector);\n        if (this.delegate.selectorMatchElement) {\n            return matches && this.delegate.selectorMatchElement(element, this.details);\n        }\n        return matches;\n    }\n    matchElementsInTree(tree) {\n        const match = this.matchElement(tree) ? [tree] : [];\n        const matches = Array.from(tree.querySelectorAll(this.selector)).filter((match) => this.matchElement(match));\n        return match.concat(matches);\n    }\n    elementMatched(element) {\n        this.selectorMatched(element);\n    }\n    elementUnmatched(element) {\n        this.selectorUnmatched(element);\n    }\n    elementAttributeChanged(element, _attributeName) {\n        const matches = this.matchElement(element);\n        const matchedBefore = this.matchesByElement.has(this.selector, element);\n        if (!matches && matchedBefore) {\n            this.selectorUnmatched(element);\n        }\n    }\n    selectorMatched(element) {\n        if (this.delegate.selectorMatched) {\n            this.delegate.selectorMatched(element, this.selector, this.details);\n            this.matchesByElement.add(this.selector, element);\n        }\n    }\n    selectorUnmatched(element) {\n        this.delegate.selectorUnmatched(element, this.selector, this.details);\n        this.matchesByElement.delete(this.selector, element);\n    }\n}\n\nclass StringMapObserver {\n    constructor(element, delegate) {\n        this.element = element;\n        this.delegate = delegate;\n        this.started = false;\n        this.stringMap = new Map();\n        this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));\n    }\n    start() {\n        if (!this.started) {\n            this.started = true;\n            this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });\n            this.refresh();\n        }\n    }\n    stop() {\n        if (this.started) {\n            this.mutationObserver.takeRecords();\n            this.mutationObserver.disconnect();\n            this.started = false;\n        }\n    }\n    refresh() {\n        if (this.started) {\n            for (const attributeName of this.knownAttributeNames) {\n                this.refreshAttribute(attributeName, null);\n            }\n        }\n    }\n    processMutations(mutations) {\n        if (this.started) {\n            for (const mutation of mutations) {\n                this.processMutation(mutation);\n            }\n        }\n    }\n    processMutation(mutation) {\n        const attributeName = mutation.attributeName;\n        if (attributeName) {\n            this.refreshAttribute(attributeName, mutation.oldValue);\n        }\n    }\n    refreshAttribute(attributeName, oldValue) {\n        const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n        if (key != null) {\n            if (!this.stringMap.has(attributeName)) {\n                this.stringMapKeyAdded(key, attributeName);\n            }\n            const value = this.element.getAttribute(attributeName);\n            if (this.stringMap.get(attributeName) != value) {\n                this.stringMapValueChanged(value, key, oldValue);\n            }\n            if (value == null) {\n                const oldValue = this.stringMap.get(attributeName);\n                this.stringMap.delete(attributeName);\n                if (oldValue)\n                    this.stringMapKeyRemoved(key, attributeName, oldValue);\n            }\n            else {\n                this.stringMap.set(attributeName, value);\n            }\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        if (this.delegate.stringMapKeyAdded) {\n            this.delegate.stringMapKeyAdded(key, attributeName);\n        }\n    }\n    stringMapValueChanged(value, key, oldValue) {\n        if (this.delegate.stringMapValueChanged) {\n            this.delegate.stringMapValueChanged(value, key, oldValue);\n        }\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        if (this.delegate.stringMapKeyRemoved) {\n            this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n        }\n    }\n    get knownAttributeNames() {\n        return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n    }\n    get currentAttributeNames() {\n        return Array.from(this.element.attributes).map((attribute) => attribute.name);\n    }\n    get recordedAttributeNames() {\n        return Array.from(this.stringMap.keys());\n    }\n}\n\nclass TokenListObserver {\n    constructor(element, attributeName, delegate) {\n        this.attributeObserver = new AttributeObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.tokensByElement = new Multimap();\n    }\n    get started() {\n        return this.attributeObserver.started;\n    }\n    start() {\n        this.attributeObserver.start();\n    }\n    pause(callback) {\n        this.attributeObserver.pause(callback);\n    }\n    stop() {\n        this.attributeObserver.stop();\n    }\n    refresh() {\n        this.attributeObserver.refresh();\n    }\n    get element() {\n        return this.attributeObserver.element;\n    }\n    get attributeName() {\n        return this.attributeObserver.attributeName;\n    }\n    elementMatchedAttribute(element) {\n        this.tokensMatched(this.readTokensForElement(element));\n    }\n    elementAttributeValueChanged(element) {\n        const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);\n        this.tokensUnmatched(unmatchedTokens);\n        this.tokensMatched(matchedTokens);\n    }\n    elementUnmatchedAttribute(element) {\n        this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n    }\n    tokensMatched(tokens) {\n        tokens.forEach((token) => this.tokenMatched(token));\n    }\n    tokensUnmatched(tokens) {\n        tokens.forEach((token) => this.tokenUnmatched(token));\n    }\n    tokenMatched(token) {\n        this.delegate.tokenMatched(token);\n        this.tokensByElement.add(token.element, token);\n    }\n    tokenUnmatched(token) {\n        this.delegate.tokenUnmatched(token);\n        this.tokensByElement.delete(token.element, token);\n    }\n    refreshTokensForElement(element) {\n        const previousTokens = this.tokensByElement.getValuesForKey(element);\n        const currentTokens = this.readTokensForElement(element);\n        const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));\n        if (firstDifferingIndex == -1) {\n            return [[], []];\n        }\n        else {\n            return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n        }\n    }\n    readTokensForElement(element) {\n        const attributeName = this.attributeName;\n        const tokenString = element.getAttribute(attributeName) || \"\";\n        return parseTokenString(tokenString, element, attributeName);\n    }\n}\nfunction parseTokenString(tokenString, element, attributeName) {\n    return tokenString\n        .trim()\n        .split(/\\s+/)\n        .filter((content) => content.length)\n        .map((content, index) => ({ element, attributeName, content, index }));\n}\nfunction zip(left, right) {\n    const length = Math.max(left.length, right.length);\n    return Array.from({ length }, (_, index) => [left[index], right[index]]);\n}\nfunction tokensAreEqual(left, right) {\n    return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n    constructor(element, attributeName, delegate) {\n        this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n        this.delegate = delegate;\n        this.parseResultsByToken = new WeakMap();\n        this.valuesByTokenByElement = new WeakMap();\n    }\n    get started() {\n        return this.tokenListObserver.started;\n    }\n    start() {\n        this.tokenListObserver.start();\n    }\n    stop() {\n        this.tokenListObserver.stop();\n    }\n    refresh() {\n        this.tokenListObserver.refresh();\n    }\n    get element() {\n        return this.tokenListObserver.element;\n    }\n    get attributeName() {\n        return this.tokenListObserver.attributeName;\n    }\n    tokenMatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).set(token, value);\n            this.delegate.elementMatchedValue(element, value);\n        }\n    }\n    tokenUnmatched(token) {\n        const { element } = token;\n        const { value } = this.fetchParseResultForToken(token);\n        if (value) {\n            this.fetchValuesByTokenForElement(element).delete(token);\n            this.delegate.elementUnmatchedValue(element, value);\n        }\n    }\n    fetchParseResultForToken(token) {\n        let parseResult = this.parseResultsByToken.get(token);\n        if (!parseResult) {\n            parseResult = this.parseToken(token);\n            this.parseResultsByToken.set(token, parseResult);\n        }\n        return parseResult;\n    }\n    fetchValuesByTokenForElement(element) {\n        let valuesByToken = this.valuesByTokenByElement.get(element);\n        if (!valuesByToken) {\n            valuesByToken = new Map();\n            this.valuesByTokenByElement.set(element, valuesByToken);\n        }\n        return valuesByToken;\n    }\n    parseToken(token) {\n        try {\n            const value = this.delegate.parseValueForToken(token);\n            return { value };\n        }\n        catch (error) {\n            return { error };\n        }\n    }\n}\n\nclass BindingObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.bindingsByAction = new Map();\n    }\n    start() {\n        if (!this.valueListObserver) {\n            this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n            this.valueListObserver.start();\n        }\n    }\n    stop() {\n        if (this.valueListObserver) {\n            this.valueListObserver.stop();\n            delete this.valueListObserver;\n            this.disconnectAllActions();\n        }\n    }\n    get element() {\n        return this.context.element;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get actionAttribute() {\n        return this.schema.actionAttribute;\n    }\n    get schema() {\n        return this.context.schema;\n    }\n    get bindings() {\n        return Array.from(this.bindingsByAction.values());\n    }\n    connectAction(action) {\n        const binding = new Binding(this.context, action);\n        this.bindingsByAction.set(action, binding);\n        this.delegate.bindingConnected(binding);\n    }\n    disconnectAction(action) {\n        const binding = this.bindingsByAction.get(action);\n        if (binding) {\n            this.bindingsByAction.delete(action);\n            this.delegate.bindingDisconnected(binding);\n        }\n    }\n    disconnectAllActions() {\n        this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));\n        this.bindingsByAction.clear();\n    }\n    parseValueForToken(token) {\n        const action = Action.forToken(token, this.schema);\n        if (action.identifier == this.identifier) {\n            return action;\n        }\n    }\n    elementMatchedValue(element, action) {\n        this.connectAction(action);\n    }\n    elementUnmatchedValue(element, action) {\n        this.disconnectAction(action);\n    }\n}\n\nclass ValueObserver {\n    constructor(context, receiver) {\n        this.context = context;\n        this.receiver = receiver;\n        this.stringMapObserver = new StringMapObserver(this.element, this);\n        this.valueDescriptorMap = this.controller.valueDescriptorMap;\n    }\n    start() {\n        this.stringMapObserver.start();\n        this.invokeChangedCallbacksForDefaultValues();\n    }\n    stop() {\n        this.stringMapObserver.stop();\n    }\n    get element() {\n        return this.context.element;\n    }\n    get controller() {\n        return this.context.controller;\n    }\n    getStringMapKeyForAttribute(attributeName) {\n        if (attributeName in this.valueDescriptorMap) {\n            return this.valueDescriptorMap[attributeName].name;\n        }\n    }\n    stringMapKeyAdded(key, attributeName) {\n        const descriptor = this.valueDescriptorMap[attributeName];\n        if (!this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n        }\n    }\n    stringMapValueChanged(value, name, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[name];\n        if (value === null)\n            return;\n        if (oldValue === null) {\n            oldValue = descriptor.writer(descriptor.defaultValue);\n        }\n        this.invokeChangedCallback(name, value, oldValue);\n    }\n    stringMapKeyRemoved(key, attributeName, oldValue) {\n        const descriptor = this.valueDescriptorNameMap[key];\n        if (this.hasValue(key)) {\n            this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n        }\n        else {\n            this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n        }\n    }\n    invokeChangedCallbacksForDefaultValues() {\n        for (const { key, name, defaultValue, writer } of this.valueDescriptors) {\n            if (defaultValue != undefined && !this.controller.data.has(key)) {\n                this.invokeChangedCallback(name, writer(defaultValue), undefined);\n            }\n        }\n    }\n    invokeChangedCallback(name, rawValue, rawOldValue) {\n        const changedMethodName = `${name}Changed`;\n        const changedMethod = this.receiver[changedMethodName];\n        if (typeof changedMethod == \"function\") {\n            const descriptor = this.valueDescriptorNameMap[name];\n            try {\n                const value = descriptor.reader(rawValue);\n                let oldValue = rawOldValue;\n                if (rawOldValue) {\n                    oldValue = descriptor.reader(rawOldValue);\n                }\n                changedMethod.call(this.receiver, value, oldValue);\n            }\n            catch (error) {\n                if (error instanceof TypeError) {\n                    error.message = `Stimulus Value \"${this.context.identifier}.${descriptor.name}\" - ${error.message}`;\n                }\n                throw error;\n            }\n        }\n    }\n    get valueDescriptors() {\n        const { valueDescriptorMap } = this;\n        return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);\n    }\n    get valueDescriptorNameMap() {\n        const descriptors = {};\n        Object.keys(this.valueDescriptorMap).forEach((key) => {\n            const descriptor = this.valueDescriptorMap[key];\n            descriptors[descriptor.name] = descriptor;\n        });\n        return descriptors;\n    }\n    hasValue(attributeName) {\n        const descriptor = this.valueDescriptorNameMap[attributeName];\n        const hasMethodName = `has${capitalize(descriptor.name)}`;\n        return this.receiver[hasMethodName];\n    }\n}\n\nclass TargetObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.targetsByName = new Multimap();\n    }\n    start() {\n        if (!this.tokenListObserver) {\n            this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n            this.tokenListObserver.start();\n        }\n    }\n    stop() {\n        if (this.tokenListObserver) {\n            this.disconnectAllTargets();\n            this.tokenListObserver.stop();\n            delete this.tokenListObserver;\n        }\n    }\n    tokenMatched({ element, content: name }) {\n        if (this.scope.containsElement(element)) {\n            this.connectTarget(element, name);\n        }\n    }\n    tokenUnmatched({ element, content: name }) {\n        this.disconnectTarget(element, name);\n    }\n    connectTarget(element, name) {\n        var _a;\n        if (!this.targetsByName.has(name, element)) {\n            this.targetsByName.add(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n        }\n    }\n    disconnectTarget(element, name) {\n        var _a;\n        if (this.targetsByName.has(name, element)) {\n            this.targetsByName.delete(name, element);\n            (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n        }\n    }\n    disconnectAllTargets() {\n        for (const name of this.targetsByName.keys) {\n            for (const element of this.targetsByName.getValuesForKey(name)) {\n                this.disconnectTarget(element, name);\n            }\n        }\n    }\n    get attributeName() {\n        return `data-${this.context.identifier}-target`;\n    }\n    get element() {\n        return this.context.element;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return Array.from(ancestors.reduce((values, constructor) => {\n        getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));\n        return values;\n    }, new Set()));\n}\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n    const ancestors = getAncestorsForConstructor(constructor);\n    return ancestors.reduce((pairs, constructor) => {\n        pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n        return pairs;\n    }, []);\n}\nfunction getAncestorsForConstructor(constructor) {\n    const ancestors = [];\n    while (constructor) {\n        ancestors.push(constructor);\n        constructor = Object.getPrototypeOf(constructor);\n    }\n    return ancestors.reverse();\n}\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return Array.isArray(definition) ? definition : [];\n}\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n    const definition = constructor[propertyName];\n    return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];\n}\n\nclass OutletObserver {\n    constructor(context, delegate) {\n        this.context = context;\n        this.delegate = delegate;\n        this.outletsByName = new Multimap();\n        this.outletElementsByName = new Multimap();\n        this.selectorObserverMap = new Map();\n    }\n    start() {\n        if (this.selectorObserverMap.size === 0) {\n            this.outletDefinitions.forEach((outletName) => {\n                const selector = this.selector(outletName);\n                const details = { outletName };\n                if (selector) {\n                    this.selectorObserverMap.set(outletName, new SelectorObserver(document.body, selector, this, details));\n                }\n            });\n            this.selectorObserverMap.forEach((observer) => observer.start());\n        }\n        this.dependentContexts.forEach((context) => context.refresh());\n    }\n    stop() {\n        if (this.selectorObserverMap.size > 0) {\n            this.disconnectAllOutlets();\n            this.selectorObserverMap.forEach((observer) => observer.stop());\n            this.selectorObserverMap.clear();\n        }\n    }\n    refresh() {\n        this.selectorObserverMap.forEach((observer) => observer.refresh());\n    }\n    selectorMatched(element, _selector, { outletName }) {\n        const outlet = this.getOutlet(element, outletName);\n        if (outlet) {\n            this.connectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorUnmatched(element, _selector, { outletName }) {\n        const outlet = this.getOutletFromMap(element, outletName);\n        if (outlet) {\n            this.disconnectOutlet(outlet, element, outletName);\n        }\n    }\n    selectorMatchElement(element, { outletName }) {\n        return (this.hasOutlet(element, outletName) &&\n            element.matches(`[${this.context.application.schema.controllerAttribute}~=${outletName}]`));\n    }\n    connectOutlet(outlet, element, outletName) {\n        var _a;\n        if (!this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.add(outletName, outlet);\n            this.outletElementsByName.add(outletName, element);\n            (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));\n        }\n    }\n    disconnectOutlet(outlet, element, outletName) {\n        var _a;\n        if (this.outletElementsByName.has(outletName, element)) {\n            this.outletsByName.delete(outletName, outlet);\n            this.outletElementsByName.delete(outletName, element);\n            (_a = this.selectorObserverMap\n                .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));\n        }\n    }\n    disconnectAllOutlets() {\n        for (const outletName of this.outletElementsByName.keys) {\n            for (const element of this.outletElementsByName.getValuesForKey(outletName)) {\n                for (const outlet of this.outletsByName.getValuesForKey(outletName)) {\n                    this.disconnectOutlet(outlet, element, outletName);\n                }\n            }\n        }\n    }\n    selector(outletName) {\n        return this.scope.outlets.getSelectorForOutletName(outletName);\n    }\n    get outletDependencies() {\n        const dependencies = new Multimap();\n        this.router.modules.forEach((module) => {\n            const constructor = module.definition.controllerConstructor;\n            const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n            outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));\n        });\n        return dependencies;\n    }\n    get outletDefinitions() {\n        return this.outletDependencies.getKeysForValue(this.identifier);\n    }\n    get dependentControllerIdentifiers() {\n        return this.outletDependencies.getValuesForKey(this.identifier);\n    }\n    get dependentContexts() {\n        const identifiers = this.dependentControllerIdentifiers;\n        return this.router.contexts.filter((context) => identifiers.includes(context.identifier));\n    }\n    hasOutlet(element, outletName) {\n        return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);\n    }\n    getOutlet(element, outletName) {\n        return this.application.getControllerForElementAndIdentifier(element, outletName);\n    }\n    getOutletFromMap(element, outletName) {\n        return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get identifier() {\n        return this.context.identifier;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get router() {\n        return this.application.router;\n    }\n}\n\nclass Context {\n    constructor(module, scope) {\n        this.logDebugActivity = (functionName, detail = {}) => {\n            const { identifier, controller, element } = this;\n            detail = Object.assign({ identifier, controller, element }, detail);\n            this.application.logDebugActivity(this.identifier, functionName, detail);\n        };\n        this.module = module;\n        this.scope = scope;\n        this.controller = new module.controllerConstructor(this);\n        this.bindingObserver = new BindingObserver(this, this.dispatcher);\n        this.valueObserver = new ValueObserver(this, this.controller);\n        this.targetObserver = new TargetObserver(this, this);\n        this.outletObserver = new OutletObserver(this, this);\n        try {\n            this.controller.initialize();\n            this.logDebugActivity(\"initialize\");\n        }\n        catch (error) {\n            this.handleError(error, \"initializing controller\");\n        }\n    }\n    connect() {\n        this.bindingObserver.start();\n        this.valueObserver.start();\n        this.targetObserver.start();\n        this.outletObserver.start();\n        try {\n            this.controller.connect();\n            this.logDebugActivity(\"connect\");\n        }\n        catch (error) {\n            this.handleError(error, \"connecting controller\");\n        }\n    }\n    refresh() {\n        this.outletObserver.refresh();\n    }\n    disconnect() {\n        try {\n            this.controller.disconnect();\n            this.logDebugActivity(\"disconnect\");\n        }\n        catch (error) {\n            this.handleError(error, \"disconnecting controller\");\n        }\n        this.outletObserver.stop();\n        this.targetObserver.stop();\n        this.valueObserver.stop();\n        this.bindingObserver.stop();\n    }\n    get application() {\n        return this.module.application;\n    }\n    get identifier() {\n        return this.module.identifier;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get dispatcher() {\n        return this.application.dispatcher;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get parentElement() {\n        return this.element.parentElement;\n    }\n    handleError(error, message, detail = {}) {\n        const { identifier, controller, element } = this;\n        detail = Object.assign({ identifier, controller, element }, detail);\n        this.application.handleError(error, `Error ${message}`, detail);\n    }\n    targetConnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetConnected`, element);\n    }\n    targetDisconnected(element, name) {\n        this.invokeControllerMethod(`${name}TargetDisconnected`, element);\n    }\n    outletConnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);\n    }\n    outletDisconnected(outlet, element, name) {\n        this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);\n    }\n    invokeControllerMethod(methodName, ...args) {\n        const controller = this.controller;\n        if (typeof controller[methodName] == \"function\") {\n            controller[methodName](...args);\n        }\n    }\n}\n\nfunction bless(constructor) {\n    return shadow(constructor, getBlessedProperties(constructor));\n}\nfunction shadow(constructor, properties) {\n    const shadowConstructor = extend(constructor);\n    const shadowProperties = getShadowProperties(constructor.prototype, properties);\n    Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n    return shadowConstructor;\n}\nfunction getBlessedProperties(constructor) {\n    const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n    return blessings.reduce((blessedProperties, blessing) => {\n        const properties = blessing(constructor);\n        for (const key in properties) {\n            const descriptor = blessedProperties[key] || {};\n            blessedProperties[key] = Object.assign(descriptor, properties[key]);\n        }\n        return blessedProperties;\n    }, {});\n}\nfunction getShadowProperties(prototype, properties) {\n    return getOwnKeys(properties).reduce((shadowProperties, key) => {\n        const descriptor = getShadowedDescriptor(prototype, properties, key);\n        if (descriptor) {\n            Object.assign(shadowProperties, { [key]: descriptor });\n        }\n        return shadowProperties;\n    }, {});\n}\nfunction getShadowedDescriptor(prototype, properties, key) {\n    const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n    const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n    if (!shadowedByValue) {\n        const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n        if (shadowingDescriptor) {\n            descriptor.get = shadowingDescriptor.get || descriptor.get;\n            descriptor.set = shadowingDescriptor.set || descriptor.set;\n        }\n        return descriptor;\n    }\n}\nconst getOwnKeys = (() => {\n    if (typeof Object.getOwnPropertySymbols == \"function\") {\n        return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n    }\n    else {\n        return Object.getOwnPropertyNames;\n    }\n})();\nconst extend = (() => {\n    function extendWithReflect(constructor) {\n        function extended() {\n            return Reflect.construct(constructor, arguments, new.target);\n        }\n        extended.prototype = Object.create(constructor.prototype, {\n            constructor: { value: extended },\n        });\n        Reflect.setPrototypeOf(extended, constructor);\n        return extended;\n    }\n    function testReflectExtension() {\n        const a = function () {\n            this.a.call(this);\n        };\n        const b = extendWithReflect(a);\n        b.prototype.a = function () { };\n        return new b();\n    }\n    try {\n        testReflectExtension();\n        return extendWithReflect;\n    }\n    catch (error) {\n        return (constructor) => class extended extends constructor {\n        };\n    }\n})();\n\nfunction blessDefinition(definition) {\n    return {\n        identifier: definition.identifier,\n        controllerConstructor: bless(definition.controllerConstructor),\n    };\n}\n\nclass Module {\n    constructor(application, definition) {\n        this.application = application;\n        this.definition = blessDefinition(definition);\n        this.contextsByScope = new WeakMap();\n        this.connectedContexts = new Set();\n    }\n    get identifier() {\n        return this.definition.identifier;\n    }\n    get controllerConstructor() {\n        return this.definition.controllerConstructor;\n    }\n    get contexts() {\n        return Array.from(this.connectedContexts);\n    }\n    connectContextForScope(scope) {\n        const context = this.fetchContextForScope(scope);\n        this.connectedContexts.add(context);\n        context.connect();\n    }\n    disconnectContextForScope(scope) {\n        const context = this.contextsByScope.get(scope);\n        if (context) {\n            this.connectedContexts.delete(context);\n            context.disconnect();\n        }\n    }\n    fetchContextForScope(scope) {\n        let context = this.contextsByScope.get(scope);\n        if (!context) {\n            context = new Context(this, scope);\n            this.contextsByScope.set(scope, context);\n        }\n        return context;\n    }\n}\n\nclass ClassMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    has(name) {\n        return this.data.has(this.getDataKey(name));\n    }\n    get(name) {\n        return this.getAll(name)[0];\n    }\n    getAll(name) {\n        const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n        return tokenize(tokenString);\n    }\n    getAttributeName(name) {\n        return this.data.getAttributeNameForKey(this.getDataKey(name));\n    }\n    getDataKey(name) {\n        return `${name}-class`;\n    }\n    get data() {\n        return this.scope.data;\n    }\n}\n\nclass DataMap {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.getAttribute(name);\n    }\n    set(key, value) {\n        const name = this.getAttributeNameForKey(key);\n        this.element.setAttribute(name, value);\n        return this.get(key);\n    }\n    has(key) {\n        const name = this.getAttributeNameForKey(key);\n        return this.element.hasAttribute(name);\n    }\n    delete(key) {\n        if (this.has(key)) {\n            const name = this.getAttributeNameForKey(key);\n            this.element.removeAttribute(name);\n            return true;\n        }\n        else {\n            return false;\n        }\n    }\n    getAttributeNameForKey(key) {\n        return `data-${this.identifier}-${dasherize(key)}`;\n    }\n}\n\nclass Guide {\n    constructor(logger) {\n        this.warnedKeysByObject = new WeakMap();\n        this.logger = logger;\n    }\n    warn(object, key, message) {\n        let warnedKeys = this.warnedKeysByObject.get(object);\n        if (!warnedKeys) {\n            warnedKeys = new Set();\n            this.warnedKeysByObject.set(object, warnedKeys);\n        }\n        if (!warnedKeys.has(key)) {\n            warnedKeys.add(key);\n            this.logger.warn(message, object);\n        }\n    }\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n    return `[${attributeName}~=\"${token}\"]`;\n}\n\nclass TargetSet {\n    constructor(scope) {\n        this.scope = scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(targetName) {\n        return this.find(targetName) != null;\n    }\n    find(...targetNames) {\n        return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n    }\n    findAll(...targetNames) {\n        return targetNames.reduce((targets, targetName) => [\n            ...targets,\n            ...this.findAllTargets(targetName),\n            ...this.findAllLegacyTargets(targetName),\n        ], []);\n    }\n    findTarget(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findElement(selector);\n    }\n    findAllTargets(targetName) {\n        const selector = this.getSelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector);\n    }\n    getSelectorForTargetName(targetName) {\n        const attributeName = this.schema.targetAttributeForScope(this.identifier);\n        return attributeValueContainsToken(attributeName, targetName);\n    }\n    findLegacyTarget(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.deprecate(this.scope.findElement(selector), targetName);\n    }\n    findAllLegacyTargets(targetName) {\n        const selector = this.getLegacySelectorForTargetName(targetName);\n        return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));\n    }\n    getLegacySelectorForTargetName(targetName) {\n        const targetDescriptor = `${this.identifier}.${targetName}`;\n        return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n    }\n    deprecate(element, targetName) {\n        if (element) {\n            const { identifier } = this;\n            const attributeName = this.schema.targetAttribute;\n            const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n            this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}=\"${identifier}.${targetName}\" with ${revisedAttributeName}=\"${targetName}\". ` +\n                `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);\n        }\n        return element;\n    }\n    get guide() {\n        return this.scope.guide;\n    }\n}\n\nclass OutletSet {\n    constructor(scope, controllerElement) {\n        this.scope = scope;\n        this.controllerElement = controllerElement;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get schema() {\n        return this.scope.schema;\n    }\n    has(outletName) {\n        return this.find(outletName) != null;\n    }\n    find(...outletNames) {\n        return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);\n    }\n    findAll(...outletNames) {\n        return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);\n    }\n    getSelectorForOutletName(outletName) {\n        const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);\n        return this.controllerElement.getAttribute(attributeName);\n    }\n    findOutlet(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        if (selector)\n            return this.findElement(selector, outletName);\n    }\n    findAllOutlets(outletName) {\n        const selector = this.getSelectorForOutletName(outletName);\n        return selector ? this.findAllElements(selector, outletName) : [];\n    }\n    findElement(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];\n    }\n    findAllElements(selector, outletName) {\n        const elements = this.scope.queryElements(selector);\n        return elements.filter((element) => this.matchesElement(element, selector, outletName));\n    }\n    matchesElement(element, selector, outletName) {\n        const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || \"\";\n        return element.matches(selector) && controllerAttribute.split(\" \").includes(outletName);\n    }\n}\n\nclass Scope {\n    constructor(schema, element, identifier, logger) {\n        this.targets = new TargetSet(this);\n        this.classes = new ClassMap(this);\n        this.data = new DataMap(this);\n        this.containsElement = (element) => {\n            return element.closest(this.controllerSelector) === this.element;\n        };\n        this.schema = schema;\n        this.element = element;\n        this.identifier = identifier;\n        this.guide = new Guide(logger);\n        this.outlets = new OutletSet(this.documentScope, element);\n    }\n    findElement(selector) {\n        return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n    }\n    findAllElements(selector) {\n        return [\n            ...(this.element.matches(selector) ? [this.element] : []),\n            ...this.queryElements(selector).filter(this.containsElement),\n        ];\n    }\n    queryElements(selector) {\n        return Array.from(this.element.querySelectorAll(selector));\n    }\n    get controllerSelector() {\n        return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n    }\n    get isDocumentScope() {\n        return this.element === document.documentElement;\n    }\n    get documentScope() {\n        return this.isDocumentScope\n            ? this\n            : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);\n    }\n}\n\nclass ScopeObserver {\n    constructor(element, schema, delegate) {\n        this.element = element;\n        this.schema = schema;\n        this.delegate = delegate;\n        this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n        this.scopesByIdentifierByElement = new WeakMap();\n        this.scopeReferenceCounts = new WeakMap();\n    }\n    start() {\n        this.valueListObserver.start();\n    }\n    stop() {\n        this.valueListObserver.stop();\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    parseValueForToken(token) {\n        const { element, content: identifier } = token;\n        const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n        let scope = scopesByIdentifier.get(identifier);\n        if (!scope) {\n            scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n            scopesByIdentifier.set(identifier, scope);\n        }\n        return scope;\n    }\n    elementMatchedValue(element, value) {\n        const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n        this.scopeReferenceCounts.set(value, referenceCount);\n        if (referenceCount == 1) {\n            this.delegate.scopeConnected(value);\n        }\n    }\n    elementUnmatchedValue(element, value) {\n        const referenceCount = this.scopeReferenceCounts.get(value);\n        if (referenceCount) {\n            this.scopeReferenceCounts.set(value, referenceCount - 1);\n            if (referenceCount == 1) {\n                this.delegate.scopeDisconnected(value);\n            }\n        }\n    }\n    fetchScopesByIdentifierForElement(element) {\n        let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n        if (!scopesByIdentifier) {\n            scopesByIdentifier = new Map();\n            this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n        }\n        return scopesByIdentifier;\n    }\n}\n\nclass Router {\n    constructor(application) {\n        this.application = application;\n        this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n        this.scopesByIdentifier = new Multimap();\n        this.modulesByIdentifier = new Map();\n    }\n    get element() {\n        return this.application.element;\n    }\n    get schema() {\n        return this.application.schema;\n    }\n    get logger() {\n        return this.application.logger;\n    }\n    get controllerAttribute() {\n        return this.schema.controllerAttribute;\n    }\n    get modules() {\n        return Array.from(this.modulesByIdentifier.values());\n    }\n    get contexts() {\n        return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n    }\n    start() {\n        this.scopeObserver.start();\n    }\n    stop() {\n        this.scopeObserver.stop();\n    }\n    loadDefinition(definition) {\n        this.unloadIdentifier(definition.identifier);\n        const module = new Module(this.application, definition);\n        this.connectModule(module);\n        const afterLoad = definition.controllerConstructor.afterLoad;\n        if (afterLoad) {\n            afterLoad(definition.identifier, this.application);\n        }\n    }\n    unloadIdentifier(identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            this.disconnectModule(module);\n        }\n    }\n    getContextForElementAndIdentifier(element, identifier) {\n        const module = this.modulesByIdentifier.get(identifier);\n        if (module) {\n            return module.contexts.find((context) => context.element == element);\n        }\n    }\n    handleError(error, message, detail) {\n        this.application.handleError(error, message, detail);\n    }\n    createScopeForElementAndIdentifier(element, identifier) {\n        return new Scope(this.schema, element, identifier, this.logger);\n    }\n    scopeConnected(scope) {\n        this.scopesByIdentifier.add(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.connectContextForScope(scope);\n        }\n    }\n    scopeDisconnected(scope) {\n        this.scopesByIdentifier.delete(scope.identifier, scope);\n        const module = this.modulesByIdentifier.get(scope.identifier);\n        if (module) {\n            module.disconnectContextForScope(scope);\n        }\n    }\n    connectModule(module) {\n        this.modulesByIdentifier.set(module.identifier, module);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.connectContextForScope(scope));\n    }\n    disconnectModule(module) {\n        this.modulesByIdentifier.delete(module.identifier);\n        const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n        scopes.forEach((scope) => module.disconnectContextForScope(scope));\n    }\n}\n\nconst defaultSchema = {\n    controllerAttribute: \"data-controller\",\n    actionAttribute: \"data-action\",\n    targetAttribute: \"data-target\",\n    targetAttributeForScope: (identifier) => `data-${identifier}-target`,\n    outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,\n    keyMappings: Object.assign(Object.assign({ enter: \"Enter\", tab: \"Tab\", esc: \"Escape\", space: \" \", up: \"ArrowUp\", down: \"ArrowDown\", left: \"ArrowLeft\", right: \"ArrowRight\", home: \"Home\", end: \"End\" }, objectFromEntries(\"abcdefghijklmnopqrstuvwxyz\".split(\"\").map((c) => [c, c]))), objectFromEntries(\"0123456789\".split(\"\").map((n) => [n, n]))),\n};\nfunction objectFromEntries(array) {\n    return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});\n}\n\nclass Application {\n    constructor(element = document.documentElement, schema = defaultSchema) {\n        this.logger = console;\n        this.debug = false;\n        this.logDebugActivity = (identifier, functionName, detail = {}) => {\n            if (this.debug) {\n                this.logFormattedMessage(identifier, functionName, detail);\n            }\n        };\n        this.element = element;\n        this.schema = schema;\n        this.dispatcher = new Dispatcher(this);\n        this.router = new Router(this);\n        this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);\n    }\n    static start(element, schema) {\n        const application = new this(element, schema);\n        application.start();\n        return application;\n    }\n    async start() {\n        await domReady();\n        this.logDebugActivity(\"application\", \"starting\");\n        this.dispatcher.start();\n        this.router.start();\n        this.logDebugActivity(\"application\", \"start\");\n    }\n    stop() {\n        this.logDebugActivity(\"application\", \"stopping\");\n        this.dispatcher.stop();\n        this.router.stop();\n        this.logDebugActivity(\"application\", \"stop\");\n    }\n    register(identifier, controllerConstructor) {\n        this.load({ identifier, controllerConstructor });\n    }\n    registerActionOption(name, filter) {\n        this.actionDescriptorFilters[name] = filter;\n    }\n    load(head, ...rest) {\n        const definitions = Array.isArray(head) ? head : [head, ...rest];\n        definitions.forEach((definition) => {\n            if (definition.controllerConstructor.shouldLoad) {\n                this.router.loadDefinition(definition);\n            }\n        });\n    }\n    unload(head, ...rest) {\n        const identifiers = Array.isArray(head) ? head : [head, ...rest];\n        identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));\n    }\n    get controllers() {\n        return this.router.contexts.map((context) => context.controller);\n    }\n    getControllerForElementAndIdentifier(element, identifier) {\n        const context = this.router.getContextForElementAndIdentifier(element, identifier);\n        return context ? context.controller : null;\n    }\n    handleError(error, message, detail) {\n        var _a;\n        this.logger.error(`%s\\n\\n%o\\n\\n%o`, message, error, detail);\n        (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n    }\n    logFormattedMessage(identifier, functionName, detail = {}) {\n        detail = Object.assign({ application: this }, detail);\n        this.logger.groupCollapsed(`${identifier} #${functionName}`);\n        this.logger.log(\"details:\", Object.assign({}, detail));\n        this.logger.groupEnd();\n    }\n}\nfunction domReady() {\n    return new Promise((resolve) => {\n        if (document.readyState == \"loading\") {\n            document.addEventListener(\"DOMContentLoaded\", () => resolve());\n        }\n        else {\n            resolve();\n        }\n    });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n    const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n    return classes.reduce((properties, classDefinition) => {\n        return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n    }, {});\n}\nfunction propertiesForClassDefinition(key) {\n    return {\n        [`${key}Class`]: {\n            get() {\n                const { classes } = this;\n                if (classes.has(key)) {\n                    return classes.get(key);\n                }\n                else {\n                    const attribute = classes.getAttributeName(key);\n                    throw new Error(`Missing attribute \"${attribute}\"`);\n                }\n            },\n        },\n        [`${key}Classes`]: {\n            get() {\n                return this.classes.getAll(key);\n            },\n        },\n        [`has${capitalize(key)}Class`]: {\n            get() {\n                return this.classes.has(key);\n            },\n        },\n    };\n}\n\nfunction OutletPropertiesBlessing(constructor) {\n    const outlets = readInheritableStaticArrayValues(constructor, \"outlets\");\n    return outlets.reduce((properties, outletDefinition) => {\n        return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));\n    }, {});\n}\nfunction propertiesForOutletDefinition(name) {\n    const camelizedName = namespaceCamelize(name);\n    return {\n        [`${camelizedName}Outlet`]: {\n            get() {\n                const outlet = this.outlets.find(name);\n                if (outlet) {\n                    const outletController = this.application.getControllerForElementAndIdentifier(outlet, name);\n                    if (outletController) {\n                        return outletController;\n                    }\n                    else {\n                        throw new Error(`Missing \"data-controller=${name}\" attribute on outlet element for \"${this.identifier}\" controller`);\n                    }\n                }\n                throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n            },\n        },\n        [`${camelizedName}Outlets`]: {\n            get() {\n                const outlets = this.outlets.findAll(name);\n                if (outlets.length > 0) {\n                    return outlets\n                        .map((outlet) => {\n                        const controller = this.application.getControllerForElementAndIdentifier(outlet, name);\n                        if (controller) {\n                            return controller;\n                        }\n                        else {\n                            console.warn(`The provided outlet element is missing the outlet controller \"${name}\" for \"${this.identifier}\"`, outlet);\n                        }\n                    })\n                        .filter((controller) => controller);\n                }\n                return [];\n            },\n        },\n        [`${camelizedName}OutletElement`]: {\n            get() {\n                const outlet = this.outlets.find(name);\n                if (outlet) {\n                    return outlet;\n                }\n                else {\n                    throw new Error(`Missing outlet element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${camelizedName}OutletElements`]: {\n            get() {\n                return this.outlets.findAll(name);\n            },\n        },\n        [`has${capitalize(camelizedName)}Outlet`]: {\n            get() {\n                return this.outlets.has(name);\n            },\n        },\n    };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n    const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n    return targets.reduce((properties, targetDefinition) => {\n        return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n    }, {});\n}\nfunction propertiesForTargetDefinition(name) {\n    return {\n        [`${name}Target`]: {\n            get() {\n                const target = this.targets.find(name);\n                if (target) {\n                    return target;\n                }\n                else {\n                    throw new Error(`Missing target element \"${name}\" for \"${this.identifier}\" controller`);\n                }\n            },\n        },\n        [`${name}Targets`]: {\n            get() {\n                return this.targets.findAll(name);\n            },\n        },\n        [`has${capitalize(name)}Target`]: {\n            get() {\n                return this.targets.has(name);\n            },\n        },\n    };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n    const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n    const propertyDescriptorMap = {\n        valueDescriptorMap: {\n            get() {\n                return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n                    const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n                    const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n                    return Object.assign(result, { [attributeName]: valueDescriptor });\n                }, {});\n            },\n        },\n    };\n    return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n        return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n    }, propertyDescriptorMap);\n}\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n    const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n    const { key, name, reader: read, writer: write } = definition;\n    return {\n        [name]: {\n            get() {\n                const value = this.data.get(key);\n                if (value !== null) {\n                    return read(value);\n                }\n                else {\n                    return definition.defaultValue;\n                }\n            },\n            set(value) {\n                if (value === undefined) {\n                    this.data.delete(key);\n                }\n                else {\n                    this.data.set(key, write(value));\n                }\n            },\n        },\n        [`has${capitalize(name)}`]: {\n            get() {\n                return this.data.has(key) || definition.hasCustomDefaultValue;\n            },\n        },\n    };\n}\nfunction parseValueDefinitionPair([token, typeDefinition], controller) {\n    return valueDescriptorForTokenAndTypeDefinition({\n        controller,\n        token,\n        typeDefinition,\n    });\n}\nfunction parseValueTypeConstant(constant) {\n    switch (constant) {\n        case Array:\n            return \"array\";\n        case Boolean:\n            return \"boolean\";\n        case Number:\n            return \"number\";\n        case Object:\n            return \"object\";\n        case String:\n            return \"string\";\n    }\n}\nfunction parseValueTypeDefault(defaultValue) {\n    switch (typeof defaultValue) {\n        case \"boolean\":\n            return \"boolean\";\n        case \"number\":\n            return \"number\";\n        case \"string\":\n            return \"string\";\n    }\n    if (Array.isArray(defaultValue))\n        return \"array\";\n    if (Object.prototype.toString.call(defaultValue) === \"[object Object]\")\n        return \"object\";\n}\nfunction parseValueTypeObject(payload) {\n    const typeFromObject = parseValueTypeConstant(payload.typeObject.type);\n    if (!typeFromObject)\n        return;\n    const defaultValueType = parseValueTypeDefault(payload.typeObject.default);\n    if (typeFromObject !== defaultValueType) {\n        const propertyPath = payload.controller ? `${payload.controller}.${payload.token}` : payload.token;\n        throw new Error(`The specified default value for the Stimulus Value \"${propertyPath}\" must match the defined type \"${typeFromObject}\". The provided default value of \"${payload.typeObject.default}\" is of type \"${defaultValueType}\".`);\n    }\n    return typeFromObject;\n}\nfunction parseValueTypeDefinition(payload) {\n    const typeFromObject = parseValueTypeObject({\n        controller: payload.controller,\n        token: payload.token,\n        typeObject: payload.typeDefinition,\n    });\n    const typeFromDefaultValue = parseValueTypeDefault(payload.typeDefinition);\n    const typeFromConstant = parseValueTypeConstant(payload.typeDefinition);\n    const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n    if (type)\n        return type;\n    const propertyPath = payload.controller ? `${payload.controller}.${payload.typeDefinition}` : payload.token;\n    throw new Error(`Unknown value type \"${propertyPath}\" for \"${payload.token}\" value`);\n}\nfunction defaultValueForDefinition(typeDefinition) {\n    const constant = parseValueTypeConstant(typeDefinition);\n    if (constant)\n        return defaultValuesByType[constant];\n    const defaultValue = typeDefinition.default;\n    if (defaultValue !== undefined)\n        return defaultValue;\n    return typeDefinition;\n}\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n    const key = `${dasherize(payload.token)}-value`;\n    const type = parseValueTypeDefinition(payload);\n    return {\n        type,\n        key,\n        name: camelize(key),\n        get defaultValue() {\n            return defaultValueForDefinition(payload.typeDefinition);\n        },\n        get hasCustomDefaultValue() {\n            return parseValueTypeDefault(payload.typeDefinition) !== undefined;\n        },\n        reader: readers[type],\n        writer: writers[type] || writers.default,\n    };\n}\nconst defaultValuesByType = {\n    get array() {\n        return [];\n    },\n    boolean: false,\n    number: 0,\n    get object() {\n        return {};\n    },\n    string: \"\",\n};\nconst readers = {\n    array(value) {\n        const array = JSON.parse(value);\n        if (!Array.isArray(array)) {\n            throw new TypeError(`expected value of type \"array\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(array)}\"`);\n        }\n        return array;\n    },\n    boolean(value) {\n        return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n    },\n    number(value) {\n        return Number(value);\n    },\n    object(value) {\n        const object = JSON.parse(value);\n        if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n            throw new TypeError(`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseValueTypeDefault(object)}\"`);\n        }\n        return object;\n    },\n    string(value) {\n        return value;\n    },\n};\nconst writers = {\n    default: writeString,\n    array: writeJSON,\n    object: writeJSON,\n};\nfunction writeJSON(value) {\n    return JSON.stringify(value);\n}\nfunction writeString(value) {\n    return `${value}`;\n}\n\nclass Controller {\n    constructor(context) {\n        this.context = context;\n    }\n    static get shouldLoad() {\n        return true;\n    }\n    static afterLoad(_identifier, _application) {\n        return;\n    }\n    get application() {\n        return this.context.application;\n    }\n    get scope() {\n        return this.context.scope;\n    }\n    get element() {\n        return this.scope.element;\n    }\n    get identifier() {\n        return this.scope.identifier;\n    }\n    get targets() {\n        return this.scope.targets;\n    }\n    get outlets() {\n        return this.scope.outlets;\n    }\n    get classes() {\n        return this.scope.classes;\n    }\n    get data() {\n        return this.scope.data;\n    }\n    initialize() {\n    }\n    connect() {\n    }\n    disconnect() {\n    }\n    dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true } = {}) {\n        const type = prefix ? `${prefix}:${eventName}` : eventName;\n        const event = new CustomEvent(type, { detail, bubbles, cancelable });\n        target.dispatchEvent(event);\n        return event;\n    }\n}\nController.blessings = [\n    ClassPropertiesBlessing,\n    TargetPropertiesBlessing,\n    ValuePropertiesBlessing,\n    OutletPropertiesBlessing,\n];\nController.targets = [];\nController.outlets = [];\nController.values = {};\n\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, SelectorObserver, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };\n", "import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus   = application\n\nexport { application }\n", "import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  connect() {\n    this.element.textContent = \"Hello World!\"\n  }\n}\n", "import { Controller } from '@hotwired/stimulus';\nimport { set } from 'immutable';\n\n// Connects to data-controller=\"search\"\nexport default class extends Controller {\n  static targets = ['input', 'results'];\n\n  connect() {}\n\n  search() {\n    clearTimeout(this.timeout);\n    this.timeout = setTimeout(() => {\n      this.element.requestSubmit();\n      this.resultsTarget.innerHTML =\n        '<p class=\"text-center text-muted\">\uD83D\uDD0E Searching...</p>';\n      this.toggleResults();\n    }, 150);\n  }\n\n  toggleResults() {\n    if (this.inputTarget.value) {\n      this.showResults();\n    } else {\n      this.hideResults();\n    }\n  }\n\n  showResults() {\n    const resultsMenu = this.resultsTarget.parentNode;\n    resultsMenu.style.display = 'block';\n  }\n\n  hideResults() {\n    const resultsMenu = this.resultsTarget.parentNode;\n    setTimeout(() => {\n      resultsMenu.style.display = 'none';\n    }, 200); // timeout is needed so the user can click a result in the menu\n  }\n\n  showPlaceholderOnBlur() {\n    setTimeout(() => {\n      this.showPlaceholder();\n    }, 100); // timeout is needed to give the menu time to hide\n  }\n\n  showPlaceholder() {\n    const input = this.inputTarget;\n    const resultsMenu = this.resultsTarget.parentNode;\n\n    if (resultsMenu.style.display === 'block') {\n      return;\n    }\n\n    localStorage.setItem('pnp_search_q', input.value);\n\n    input.value = null;\n  }\n\n  showLastSearch() {\n    const input = this.inputTarget;\n    const lastSearch = localStorage.getItem('pnp_search_q');\n\n    if (lastSearch) {\n      input.value = lastSearch;\n    }\n  }\n}\n", "// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from \"./application\"\n\nimport HelloController from \"./hello_controller\"\napplication.register(\"hello\", HelloController)\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M,QAAQ,KAAK;AACnB,YAAM,cAAc,KAAK,cAAc;AAEvC,UAAI,YAAY,MAAM,YAAY,SAAS;AACzC;AAAA,MACF;AAEA,mBAAa,QAAQ,gBAAgB,MAAM,KAAK;AAEhD,YAAM,QAAQ;AAAA,IAChB;AAAA,IAEA,iBAAiB;AACf,YAAM,QAAQ,KAAK;AACnB,YAAM,aAAa,aAAa,QAAQ,cAAc;AAEtD,UAAI,YAAY;AACd,cAAM,QAAQ;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AA7DE,gBADK,2BACE,WAAU,CAAC,SAAS,SAAS;;;ACEtC,cAAY,SAAS,SAAS,wBAAe;AAG7C,cAAY,SAAS,UAAU,yBAAgB;;;AXJ/C,cAAAK,QAAM,MAAM;AACZ,EAAc,oBAAM;AAKpB;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;",
  "names": ["Rails", "$", "CustomEvent", "error", "exports", "module", "undefined", "hex", "FileChecksum", "start", "dispatchEvent", "BlobRecord", "BlobUpload", "DirectUpload", "error", "DirectUploadController", "dispatch", "DirectUploadsController", "startNextController", "consumer", "error", "consumer", "consumer", "subscription", "attachmentSelector", "attachments", "preview", "presentation", "caption", "name", "size", "file", "attributes", "default", "tagName", "parse", "quote", "nestable", "heading1", "terminal", "breakOnReturn", "group", "code", "htmlAttributes", "text", "plaintext", "bulletList", "bullet", "listAttribute", "test", "element", "parentNode", "this", "numberList", "number", "attachmentGallery", "exclusive", "_element$tagName", "toLowerCase", "androidVersionMatch", "navigator", "userAgent", "match", "androidVersion", "parseInt", "browser$1", "composesExistingText", "recentAndroid", "samsungAndroid", "forcesObjectResizing", "supportsInputEvents", "InputEvent", "every", "prop", "prototype", "lang$1", "attachFiles", "bold", "bullets", "byte", "bytes", "captionPlaceholder", "indent", "italic", "link", "numbers", "outdent", "redo", "remove", "strike", "undo", "unlink", "url", "urlPlaceholder", "GB", "KB", "MB", "PB", "TB", "sizes", "lang", "file_size_formatting", "prefix", "precision", "formatter", "concat", "base", "exp", "Math", "floor", "log", "withoutInsignificantZeros", "pow", "toFixed", "replace", "ZERO_WIDTH_SPACE", "NON_BREAKING_SPACE", "extend", "properties", "key", "value", "html", "document", "documentElement", "matches", "handleEvent", "eventName", "onElement", "matchingSelector", "withCallback", "inPhase", "preventDefault", "times", "arguments", "length", "undefined", "selector", "useCapture", "handler", "event", "destroy", "target", "findClosestElementFromNode", "call", "removeEventListener", "addEventListener", "triggerEvent", "bubbles", "cancelable", "createEvent", "initEvent", "dispatchEvent", "elementMatchesSelector", "nodeType", "node", "untilNode", "Node", "ELEMENT_NODE", "closest", "innerElementIsActive", "activeElement", "elementContainsNode", "findChildIndexOfNode", "_node", "childIndex", "previousSibling", "removeNode", "_node$parentNode", "removeChild", "walkTree", "tree", "onlyNodesOfType", "usingFilter", "expandEntityReferences", "whatToShow", "NodeFilter", "SHOW_ELEMENT", "SHOW_TEXT", "SHOW_COMMENT", "SHOW_ALL", "createTreeWalker", "makeElement", "tag", "options", "createElement", "editable", "contenteditable", "setAttribute", "style", "data", "dataset", "className", "split", "forEach", "classList", "add", "textContent", "childNodes", "childNode", "appendChild", "blockTagNames", "getBlockTagNames", "blockAttributes", "push", "nodeIsBlockContainer", "nodeIsBlockStartComment", "firstChild", "nodeIsBlockStart", "strict", "includes", "nodeIsCommentNode", "COMMENT_NODE", "nodeIsCursorTarget", "nodeIsTextNode", "trixCursorTarget", "nodeIsAttachmentElement", "nodeIsEmptyTextNode", "TEXT_NODE", "input", "level2Enabled", "getLevel", "browser", "pickFiles", "callback", "type", "multiple", "hidden", "id", "fileInputId", "files", "getElementById", "body", "click", "parser", "removeBlankTableCells", "tableCellSeparator", "tableRowSeparator", "text_attributes", "inheritable", "window", "getComputedStyle", "fontWeight", "fontStyle", "href", "groupTagName", "getAttribute", "frozen", "backgroundColor", "toolbar", "getDefaultHTML", "interval", "attachment", "attachmentCaption", "attachmentCaptionEditor", "attachmentMetadata", "attachmentMetadataContainer", "attachmentName", "attachmentProgress", "attachmentSize", "attachmentToolbar", "BasicObject", "expression", "toMethod", "toProperty", "optional", "parseProxyMethodExpression", "subject", "object", "_this$toMethod", "_object", "apply", "proxyMethodExpressionPattern", "Error", "args", "Function", "RegExp", "$", "UTF16String", "box", "fromUCS2String", "toString", "ucs2String", "ucs2decode", "codepoints", "ucs2encode", "constructor", "super", "ucs2Length", "offsetToUCS2Offset", "offset", "slice", "max", "offsetFromUCS2Offset", "ucs2Offset", "fromCodepoints", "charAt", "isEqualTo", "toJSON", "getCacheKey", "hasArrayFrom", "_Array$from", "Array", "from", "hasStringCodePointAt", "_$codePointAt", "codePointAt", "hasStringFromCodePoint", "_String$fromCodePoint", "String", "fromCodePoint", "string", "map", "char", "output", "counter", "charCodeAt", "extra", "array", "result", "fromCharCode", "join", "TrixObject", "jsonString", "fromJSON", "JSON", "hasSameConstructorAs", "inspect", "parts", "contents", "contentsForInspection", "toJSONString", "stringify", "toUTF16String", "arraysAreEqual", "a", "b", "index", "spliceArray", "_len", "_key", "splice", "RTL_PATTERN", "getDirection", "dir", "dirName", "textArea", "form", "supportsDirName", "FormData", "has", "error", "supportsDirSelector", "get", "trim", "allAttributeNames", "blockAttributeNames", "textAttributeNames", "listAttributeNames", "getAllAttributeNames", "getTextAttributeNames", "getBlockAttributeNames", "getBlockConfig", "attributeName", "config", "Object", "keys", "getTextConfig", "installDefaultCSSForTagName", "defaultCSS", "insertStyleElementForTagName", "nonce", "getCSPNonce", "head", "insertBefore", "getMetaElement", "querySelector", "testTransferData", "dataTransferIsPlainText", "dataTransfer", "getData", "DOMParser", "parseFromString", "keyEventIsKeyboardCommand", "platform", "metaKey", "ctrlKey", "defer", "fn", "setTimeout", "copyObject", "objectsAreEqual", "normalizeRange", "range", "isArray", "copyValue", "rangeIsCollapsed", "start", "end", "rangeValuesAreEqual", "rangesAreEqual", "leftRange", "rightRange", "leftStart", "leftEnd", "rightStart", "rightEnd", "left", "right", "SelectionChangeObserver", "update", "bind", "selectionManagers", "started", "stop", "registerSelectionManager", "selectionManager", "unregisterSelectionManager", "filter", "sm", "notifySelectionManagersOfSelectionChange", "selectionDidChange", "reset", "selectionChangeObserver", "getDOMSelection", "selection", "getSelection", "rangeCount", "getDOMRange", "_getDOMSelection", "domRange", "getRangeAt", "domRangeIsPrivate", "setDOMRange", "removeAllRanges", "addRange", "nodeIsPrivate", "startContainer", "endContainer", "getPrototypeOf", "normalizeSpaces", "breakableWhitespacePattern", "squishBreakableWhitespace", "source", "utf16StringDifferences", "diffA", "utf16StringDifference", "utf16String", "diffB", "leftIndex", "rightIndexA", "rightIndexB", "Hash", "fromCommonAttributesOfObjects", "objects", "hash", "getKeys", "getKeysCommonToHash", "values", "copy", "merge", "unbox", "toArray", "isEmpty", "toObject", "keyToRemove", "sort", "ObjectGroup", "groupObjects", "ungroupedObjects", "depth", "asTree", "_object$canBeGrouped2", "_object$canBeGrouped", "_group$canBeGroupedWi", "_group", "canBeGrouped", "canBeGroupedWith", "getObjects", "getDepth", "ObjectMap", "find", "ElementStore", "elements", "getKey", "trixStoreKey", "Operation", "isPerforming", "performing", "hasPerformed", "performed", "hasSucceeded", "succeeded", "hasFailed", "getPromise", "promise", "Promise", "resolve", "reject", "perform", "release", "_this$promise", "_this$promise$cancel", "cancel", "proxyMethod", "ObjectView", "childViews", "rootView", "getNodes", "nodes", "createNodes", "cloneNode", "invalidate", "_this$parentView", "parentView", "invalidateViewForObject", "_this$findViewForObje", "findViewForObject", "findOrCreateCachedChildView", "viewClass", "view", "getCachedViewForObject", "recordChildView", "createChildView", "cacheViewForObject", "ObjectGroupView", "getAllChildViews", "views", "childView", "findElement", "findElementForObject", "getViewCache", "isViewCachingEnabled", "viewCache", "shouldCacheViews", "enableViewCaching", "disableViewCaching", "_this$getViewCache", "cache", "garbageCollectCachedViews", "objectKeys", "objectGroup", "getChildViews", "createContainerElement", "DEFAULT_ALLOWED_ATTRIBUTES", "DEFAULT_FORBIDDEN_PROTOCOLS", "DEFAULT_FORBIDDEN_ELEMENTS", "HTMLSanitizer", "sanitizedElement", "sanitize", "sanitizedHtml", "getHTML", "outerHTML", "innerHTML", "sanitizer", "allowedAttributes", "forbiddenProtocols", "forbiddenElements", "createBodyElementForHTML", "sanitizeElements", "normalizeListElementNesting", "getBody", "walker", "nodesToRemove", "nextNode", "currentNode", "elementIsRemovable", "sanitizeElement", "hasAttribute", "protocol", "removeAttribute", "_ref", "indexOf", "querySelectorAll", "listElement", "previousElement", "previousElementSibling", "elementIsForbidden", "elementIsntSerializable", "doc", "implementation", "createHTMLDocument", "css", "AttachmentView", "uploadProgressDelegate", "attachmentPiece", "piece", "createContentNodes", "innerElement", "figure", "getClassName", "getHref", "tabindex", "hasContent", "setHTML", "getContent", "createCaptionElement", "isPending", "progressElement", "class", "getUploadProgress", "trixMutable", "createCursorTarget", "figcaption", "getCaption", "captionConfig", "getCaptionConfig", "getFilename", "getFormattedFilesize", "nameElement", "createTextNode", "sizeElement", "names", "getType", "extension", "getExtension", "trixAttachment", "trixContentType", "getContentType", "trixId", "trixAttributes", "trixSerialize", "htmlContainsTagName", "_config$attachments$t", "findProgressElement", "_this$findElement", "attachmentDidChangeUploadProgress", "div", "PreviewableAttachmentView", "previewDelegate", "image", "src", "refresh", "updateAttributesForImage", "getURL", "previewURL", "getPreviewURL", "serializedAttributes", "width", "getWidth", "height", "getHeight", "storeKey", "attachmentDidChangeAttributes", "PieceView", "getAttributes", "textConfig", "context", "createAttachmentNodes", "createStringNodes", "_element", "firstElementChild", "isPreviewable", "_this$textConfig", "iterable", "substring", "preserveSpaces", "styles", "pendingElement", "styleProperty", "isLast", "isFirst", "followsWhitespace", "TextView", "pieces", "getPieces", "lastIndex", "endsWithWhitespace", "previousPiece", "BlockView", "block", "createComment", "_getBlockConfig", "getLastAttribute", "textView", "shouldAddExtraNewlineElement", "isRTL", "assign", "getBlockBreakPosition", "entries", "DocumentView", "render", "sync", "elementStore", "setDocument", "shadowElement", "getBlocks", "isSynced", "elementsHaveEqualHTML", "fragment", "createDocumentFragmentForSync", "lastChild", "didSync", "findStoredElements", "createDocumentFragment", "storedElement", "replaceChild", "otherElement", "ignoreSpaces", "t", "e", "i", "n", "o", "s", "l", "r", "Piece", "types", "pieceJSON", "copyWithAttributes", "getValue", "copyWithAdditionalAttributes", "copyWithoutAttribute", "attribute", "getAttributesHash", "hasSameStringValueAsPiece", "hasSameAttributesAsPiece", "isBlockBreak", "isSerializable", "getLength", "canBeConsolidatedWith", "_defineProperty", "ImagePreloadOperation", "Image", "onload", "naturalWidth", "naturalHeight", "onerror", "Attachment", "attributesForFile", "setFile", "filename", "filesize", "contentType", "attachmentJSON", "releaseFile", "didChangeAttributes", "setAttributes", "newAttributes", "_this$previewDelegate", "_this$previewDelegate2", "_this$delegate", "_this$delegate$attach", "delegate", "preloadURL", "previewablePattern", "getFilesize", "_this$getFilename$mat", "getFile", "preloadFile", "releasePreloadedFile", "uploadProgress", "setUploadProgress", "_this$uploadProgressD", "_this$uploadProgressD2", "preloadingURL", "setPreviewURL", "_this$previewDelegate3", "_this$previewDelegate4", "_this$delegate2", "_this$delegate2$attac", "attachmentDidChangePreviewURL", "preload", "fileObjectURL", "URL", "createObjectURL", "revokeObjectURL", "then", "catch", "AttachmentPiece", "ensureAttachmentExclusivelyHasAttribute", "removeProhibitedAttributes", "permittedAttributes", "_piece$attachment", "json", "toConsole", "registerType", "StringPiece", "consolidateWith", "splitAtOffset", "SplittableList", "eachObject", "insertObjectAtIndex", "insertSplittableListAtIndex", "splittableList", "insertSplittableListAtPosition", "position", "splitObjectAtPosition", "editObjectAtIndex", "replaceObjectAtIndex", "removeObjectAtIndex", "getObjectAtIndex", "getSplittableListInRange", "rightIndex", "splitObjectsAtRange", "selectSplittableList", "removeObjectsInRange", "transformObjectsInRange", "transform", "transformedObjects", "rightOuterIndex", "leftInnerIndex", "startOfRange", "endOfRange", "getObjectAtPosition", "findIndexAndOffsetAtPosition", "splitIndex", "splitOffset", "leftObject", "rightObject", "consolidate", "pendingObject", "_pendingObject$canBeC", "_pendingObject", "consolidateFromIndexToIndex", "startIndex", "endIndex", "objectsInRange", "consolidatedInRange", "currentPosition", "nextPosition", "findPositionAtIndexAndOffset", "currentIndex", "getEndPosition", "endPosition", "objectArraysAreEqual", "Text", "textJSON", "notEmpty", "pieceList", "copyWithPieceList", "copyUsingObjectMap", "objectMap", "appendText", "insertTextAtPosition", "removeTextAtRange", "replaceTextAtRange", "moveTextFromRangeToPosition", "getTextAtRange", "addAttributeAtRange", "addAttributesAtRange", "removeAttributeAtRange", "setAttributesAtRange", "getAttributesAtPosition", "_this$pieceList$getOb", "getCommonAttributes", "getCommonAttributesAtRange", "getExpandedRangeForAttributeAtOffset", "getStringAtRange", "getStringAtPosition", "startsWithString", "endsWithString", "getAttachmentPieces", "getAttachments", "getAttachmentAndPositionById", "attachmentId", "getAttachmentById", "getRangeOfAttachment", "attachmentAndPosition", "updateAttributesForAttachment", "_text$pieceList", "eachPiece", "getPieceAtPosition", "toSerializableText", "Block", "blockJSON", "applyBlockBreakToText", "copyWithText", "copyWithoutText", "copyWithoutAttributes", "mappedText", "addAttribute", "expandAttribute", "addHTMLAttribute", "removeLastValue", "removeLastAttribute", "getLastElement", "getAttributeLevel", "getAttributeAtLevel", "level", "hasAttributes", "getLastNestableAttribute", "getNestableAttributes", "getNestingLevel", "decreaseNestingLevel", "increaseNestingLevel", "lastIndexOf", "getListItemAttributes", "isListItem", "isTerminalBlock", "_getBlockConfig2", "breaksOnReturn", "_getBlockConfig3", "findLineBreakInDirectionFromPosition", "direction", "newlineText", "textForStringWithAttributes", "getTextWithoutBlockBreak", "textEndsInBlockBreak", "otherBlock", "otherAttributes", "otherAttribute", "getListAttributeNames", "unmarkExistingInnerBlockBreaksInText", "addBlockBreakToText", "modified", "innerPieces", "lastPiece", "unmarkBlockBreakPiece", "blockBreakText", "blockBreak", "Document", "documentJSON", "textAttributes", "blocks", "blockList", "getBlockAtIndex", "consolidateBlocks", "copyUsingObjectsFromDocument", "sourceDocument", "copyWithBaseBlockAttributes", "replaceBlock", "oldBlock", "newBlock", "insertDocumentAtRange", "locationFromPosition", "getBlockAtPosition", "mergeDocumentAtRange", "formattedDocument", "startPosition", "startLocation", "baseBlockAttributes", "getBaseBlockAttributes", "trailingBlockAttributes", "leadingBlockAttributes", "blockCount", "getBlockCount", "firstBlock", "firstText", "insertTextAtRange", "leftPosition", "rightPosition", "leftLocation", "rightLocation", "locationRangeFromRange", "leftOffset", "leftBlock", "rightOffset", "rightBlock", "leftText", "rightText", "affectedBlockCount", "getDocumentAtRange", "movingRightward", "eachBlockAtRange", "textRange", "eachBlock", "getTextAtIndex", "removeAttributeForAttachment", "setHTMLAttributeAtPosition", "updatedBlock", "insertBlockBreakAtRange", "applyBlockAttributeAtRange", "expanded", "expandRangeToLineBreaksAndSplitBlocks", "blockConfig", "removeLastListAttributeAtRange", "exceptAttributeName", "converted", "convertLineBreaksToBlockBreaksInRange", "removeBlockAttributesAtRange", "removeLastTerminalAttributeAtRange", "consolidateBlocksAtRange", "lastAttributeName", "endLocation", "startBlock", "positionFromLocation", "endBlock", "_this$getBlockAtIndex", "getTextAtPosition", "getCharacterAtPosition", "getEditCount", "editCount", "getCommonAttributesAtPosition", "attributesForBlock", "commonAttributes", "attributesLeft", "inheritableAttributes", "getRangeOfCommonAttributeAtPosition", "startOffset", "endOffset", "blockIndex", "lastAttributeIndex", "min", "attachmentPieces", "getLocationRangeOfAttachment", "getAttachmentPieceForAttachment", "findRangesForBlockAttribute", "ranges", "findRangesForTextAttribute", "withValue", "location", "locationRangeFromPosition", "rangeFromLocationRange", "locationRange", "getTexts", "toSerializableDocument", "pieceForString", "parseTrixDataAttribute", "HTMLParser", "referenceElement", "blockElements", "processedElements", "getDocument", "createHiddenContainer", "containerElement", "nodeFilter", "processNode", "translateBlockElementMarginsToNewlines", "removeHiddenContainer", "display", "nextSibling", "isInsignificantTextNode", "appendBlockForTextNode", "processTextNode", "appendBlockForElement", "processElement", "currentBlockElement", "isBlockElement", "appendStringWithAttributes", "_this$currentBlock", "getBlockAttributes", "getBlockHTMLAttributes", "currentBlock", "appendBlockForAttributesWithElement", "elementIsBlockElement", "currentBlockContainsElement", "parentBlockElement", "findParentBlockElement", "appendEmptyBlock", "parentElement", "_node$previousSibling", "elementCanDisplayPreformattedText", "stringEndsWithWhitespace", "leftTrimBreakableWhitespace", "getTextAttributes", "appendAttachmentWithAttributes", "isExtraBR", "dimensions", "needsTableSeparator", "appendPiece", "appendStringToTextAtIndex", "prependStringToTextAtIndex", "unshift", "configAttr", "attributeInheritedFromBlock", "blockElement", "findBlockElementAncestors", "attrConfig", "_attrConfig$test", "reverse", "settings", "ancestors", "stringIsAllBreakableWhitespace", "nodeEndsWithNonWhitespace", "_element$previousSibl", "content", "defaultMargin", "getMarginOfDefaultBlockElement", "margin", "getMarginOfBlockElementAtIndex", "top", "bottom", "getBlockElementMargin", "whiteSpace", "marginTop", "marginBottom", "FILTER_REJECT", "FILTER_ACCEPT", "unserializableAttributeNames", "serializedAttributesAttribute", "serializedAttributesSelector", "blockCommentPattern", "serializers", "serializable", "HTMLElement", "el", "ManagedAttachment", "attachmentManager", "requestRemovalOfAttachment", "AttachmentManager", "managedAttachments", "manageAttachment", "attachmentIsManaged", "attachmentManagerDidRequestRemovalOfAttachment", "unmanageAttachment", "managedAttachment", "LineBreakInsertion", "composition", "selectedRange", "getSelectedRange", "previousCharacter", "nextCharacter", "shouldInsertBlockBreak", "shouldBreakFormattedBlock", "shouldDecreaseListLevel", "shouldPrependListItem", "shouldRemoveLastBlockAttribute", "Composition", "currentAttributes", "revision", "_this$delegate$compos", "refreshAttachments", "compositionDidChangeDocument", "getSnapshot", "loadSnapshot", "_this$delegate2$compo", "_this$delegate3", "_this$delegate3$compo", "compositionWillLoadSnapshot", "setSelection", "compositionDidLoadSnapshot", "insertText", "updatePosition", "notifyDelegateOfInsertionAtRange", "insertBlock", "insertDocument", "insertString", "getCurrentTextAttributes", "insertBlockBreak", "insertLineBreak", "insertion", "decreaseListLevel", "removeLastBlockAttribute", "breakFormattedBlock", "insertHTML", "replaceHTML", "getLocationRange", "insertFile", "insertFiles", "_this$delegate4", "compositionShouldAcceptFile", "attachmentForFile", "insertAttachments", "insertAttachment", "attachmentText", "textForAttachmentWithAttributes", "shouldManageDeletingInDirection", "shouldManageMovingCursorInDirection", "deleteInDirection", "deletingIntoPreviousBlock", "selectionSpansBlocks", "selectionIsCollapsed", "canDecreaseBlockAttributeLevel", "getBlock", "decreaseBlockAttributeLevel", "getExpandedRangeInDirection", "getAttachmentAtRange", "editAttachment", "moveTextFromRange", "removeAttachment", "stopEditingAttachment", "removeCurrentAttribute", "insertPlaceholder", "placeholderPosition", "getPosition", "selectPlaceholder", "setSelectedRange", "PLACEHOLDER", "forgetPlaceholder", "hasCurrentAttribute", "toggleCurrentAttribute", "setCurrentAttribute", "canSetCurrentAttribute", "canSetCurrentBlockAttribute", "canSetCurrentTextAttribute", "getSelectedDocument", "setBlockAttribute", "setTextAttribute", "notifyDelegateOfCurrentAttributesChange", "setHTMLAtributeAtPosition", "allowedHTMLAttributes", "newDocument", "removeBlockAttribute", "updateCurrentAttributes", "removeTextAttribute", "canDecreaseNestingLevel", "_this$getBlock", "canIncreaseNestingLevel", "previousBlock", "getPreviousBlock", "_this$getBlock2", "_this$getBlock3", "attributeLevel", "ignoreLock", "getCurrentAttributes", "freezeSelection", "thawSelection", "hasFrozenSelection", "_this$delegate5", "compositionDidRequestChangingSelectionToLocationRange", "getSelectionManager", "setLocationRange", "targetLocationRange", "withTargetLocationRange", "withTargetRange", "withTargetDOMRange", "createLocationRangeFromDOMRange", "translateUTF16PositionFromOffset", "editingAttachment", "moveCursorInDirection", "canEditAttachment", "expandSelectionInDirection", "expandSelectionForEditing", "expandSelectionAroundCommonAttribute", "selectionContainsAttachments", "_this$getSelectedAtta", "getSelectedAttachments", "selectionIsInCursorTarget", "positionIsCursorTarget", "locationIsCursorTarget", "positionIsBlockBreak", "_this$document$getPie", "_this$getSelectedDocu", "added", "removed", "oldArray", "newArray", "existingValues", "Set", "currentValues", "_this$delegate6", "_this$delegate6$compo", "compositionDidRemoveAttachment", "_this$delegate7", "_this$delegate7$compo", "compositionDidAddAttachment", "_this$delegate8", "_this$delegate8$compo", "compositionDidEditAttachment", "_this$delegate9", "_this$delegate9$compo", "compositionDidChangeAttachmentPreviewURL", "_this$delegate10", "_this$delegate10$comp", "compositionDidStartEditingAttachment", "_this$delegate11", "_this$delegate11$comp", "compositionDidStopEditingAttachment", "_this$delegate12", "_this$delegate12$comp", "compositionDidChangeCurrentAttributes", "_this$delegate13", "_this$delegate13$comp", "compositionDidPerformInsertionAtRange", "utf16string", "utf16position", "UndoManager", "undoEntries", "redoEntries", "recordUndoEntry", "description", "consolidatable", "previousEntry", "entryHasDescriptionAndContext", "undoEntry", "createEntry", "pop", "redoEntry", "snapshot", "canUndo", "canRedo", "entry", "BLOCK_ATTRIBUTE_NAME", "Filter", "applyBlockAttribute", "findRangesOfBlocks", "findRangesOfPieces", "moveSelectedRangeForward", "attachmentGalleryFilter", "DEFAULT_FILTERS", "Editor", "undoManager", "filters", "loadDocument", "loadHTML", "loadJSON", "getClientRectAtPosition", "getClientRectAtLocationRange", "activateAttribute", "attributeIsActive", "canActivateAttribute", "deactivateAttribute", "LocationMapper", "findLocationFromContainerAndOffset", "container", "foundBlock", "attachmentElement", "findAttachmentElementParentForNode", "rejectAttachmentContents", "nodeLength", "findContainerAndOffsetFromLocation", "nodeOffset", "findNodeAndOffsetFromLocation", "getSignificantNodesForIndex", "acceptSignificantNodes", "recordingNodes", "rejectEmptyTextNodes", "PointMapper", "createDOMRangeFromPoint", "x", "y", "caretPositionFromPoint", "offsetNode", "createRange", "setStart", "caretRangeFromPoint", "createTextRange", "originalDOMRange", "moveToPoint", "select", "getClientRectsForDOMRange", "getClientRects", "SelectionManager", "didMouseDown", "locationMapper", "pointMapper", "lockCount", "currentLocationRange", "lockedLocationRange", "createDOMRangeFromLocationRange", "updateCurrentLocationRange", "setLocationRangeFromPointRange", "pointRange", "getLocationAtPoint", "lock", "unlock", "clearSelection", "_getDOMRange", "collapsed", "selectionIsExpanded", "domRangeWithinElement", "pauseTemporarily", "resumeHandlers", "paused", "resume", "clearTimeout", "resumeTimeout", "_this$delegate$locati", "locationRangeDidChange", "rangeStart", "rangeEnd", "setEnd", "point", "_this$createLocationR", "keyNames", "undoable", "commands", "do", "undos", "AttachmentEditorController", "title", "trixAction", "didClickToolbar", "didClickActionButton", "textarea", "placeholder", "textareaClone", "tabIndex", "autoresize", "scrollHeight", "didInputCaption", "didKeyDownCaption", "didChangeCaption", "didBlurCaption", "editingFigcaption", "editCaption", "focus", "install", "makeElementMutable", "addToolbar", "installCaptionEditor", "uninstall", "savePendingCaption", "didUninstallAttachmentEditor", "pendingCaption", "_this$delegate3$attac", "attachmentEditorDidRequestUpdatingAttributesForAttachment", "attachmentEditorDidRequestRemovingAttributeForAttachment", "stopPropagation", "attachmentEditorDidRequestRemovalOfAttachment", "_this$delegate5$attac", "keyCode", "attachmentEditorDidRequestDeselectingAttachment", "CompositionController", "didFocus", "didBlur", "didClickAttachment", "documentView", "_this$blurPromise", "focused", "compositionControllerDidFocus", "blurPromise", "compositionControllerDidBlur", "findAttachmentForElement", "compositionControllerDidSelectAttachment", "getSerializableElement", "isEditingAttachment", "_this$delegate4$compo", "_this$delegate5$compo", "canSyncDocumentView", "compositionControllerWillSyncDocumentView", "compositionControllerDidSyncDocumentView", "compositionControllerDidRender", "rerenderViewForObject", "refreshViewCache", "attachmentEditor", "installAttachmentEditorForAttachment", "_this$attachmentEdito", "uninstallAttachmentEditor", "_this$attachmentEdito2", "compositionControllerWillUpdateAttachment", "compositionControllerDidRequestRemovalOfAttachment", "compositionControllerDidRequestDeselectingAttachment", "Controller", "mutableAttributeName", "mutableSelector", "childList", "characterData", "characterDataOldValue", "subtree", "MutationObserver", "didMutate", "observer", "observe", "disconnect", "mutations", "_this$delegate$elemen", "findSignificantMutations", "elementDidMutate", "getMutationSummary", "mutation", "mutationIsSignificant", "nodeIsMutable", "nodesModifiedByMutation", "nodeIsSignificant", "addedNodes", "removedNodes", "getTextMutationSummary", "additions", "deletions", "getTextChangesFromCharacterData", "textChanges", "getTextChangesFromChildList", "addition", "summary", "textAdded", "deleted", "textDeleted", "getMutationsByType", "textRemoved", "getTextForNodes", "characterMutations", "startMutation", "endMutation", "summarized", "oldString", "newString", "oldValue", "FileVerificationOperation", "reader", "FileReader", "abort", "readAsArrayBuffer", "FlakyAndroidKeyboardDetector", "shouldIgnore", "previousEvent", "checkSamsungKeyboardBuggyModeStart", "checkSamsungKeyboardBuggyModeEnd", "buggyMode", "insertingLongTextAfterUnidentifiedChar", "differsInWhitespace", "innerText", "inputType", "_this$event$data", "isBeforeInputInsertText", "previousEventWasUnidentifiedKeydown", "_this$previousEvent", "_this$previousEvent2", "text1", "text2", "normalize", "whiteSpaceNormalizerRegexp", "InputController", "mutationObserver", "flakyKeyboardDetector", "events", "handlerFor", "mutationSummary", "editorWillSyncDocumentView", "editorDidSyncDocumentView", "requestRender", "_this$delegate$inputC", "inputControllerDidRequestRender", "requestReparse", "_this$delegate2$input", "inputControllerDidRequestReparse", "operations", "all", "handleInput", "_this$responder", "inputControllerWillAttachFiles", "responder", "defaultPrevented", "inputControllerWillHandleInput", "inputControllerDidHandleInput", "createLinkHTML", "pastedFileCount", "Level0InputController", "resetInputSummary", "setInputSummary", "inputSummary", "isComposing", "inputControllerDidAllowUnhandledInput", "mutationIsExpected", "preferDocument", "mutationAdditionMatchesSummary", "mutationDeletionMatchesSummary", "didDelete", "unexpectedNewlineAddition", "unexpectedNewlineDeletion", "_this$compositionInpu", "textChanged", "composedEmptyString", "compositionInput", "getEndData", "getCompositionInput", "CompositionInput", "isEnded", "_this$responder2", "serializeSelectionToDataTransfer", "_this$responder3", "setData", "canAcceptDataTransfer", "Files", "getPastedHTMLUsingHiddenElement", "pageXOffset", "pageYOffset", "opacity", "requestAnimationFrame", "keydown", "didInput", "keyName", "_context2", "modifier", "_context", "character", "inputControllerDidReceiveKeyboardCommand", "keypress", "altKey", "stringFromKeyEvent", "_this$responder9", "inputControllerWillPerformTyping", "textInput", "toUpperCase", "_this$responder10", "dragenter", "dragstart", "_this$delegate5$input", "draggedRange", "inputControllerDidStartDrag", "dragover", "draggingPoint", "clientX", "clientY", "_this$delegate6$input", "inputControllerDidReceiveDragOverPoint", "dragend", "_this$delegate7$input", "inputControllerDidCancelDrag", "drop", "_event$dataTransfer", "_this$responder11", "_this$responder12", "inputControllerWillMoveText", "_this$responder13", "fromJSONString", "cut", "_this$responder14", "clipboardData", "inputControllerWillCutText", "_this$responder15", "paste", "clipboard", "testClipboardData", "pasteEventIsCrippledSafariHTMLPaste", "_this$responder16", "inputControllerWillPaste", "inputControllerDidPaste", "_this$responder17", "_this$delegate14", "_this$responder18", "_this$delegate15", "_this$delegate16", "_this$responder19", "_this$delegate17", "_clipboard$items", "_clipboard$items$getA", "items", "getAsFile", "_this$delegate18", "_this$responder20", "_this$delegate19", "extensionForFile", "compositionstart", "compositionupdate", "compositionend", "beforeinput", "backspace", "_this$delegate20", "delete", "_this$delegate21", "return", "_this$delegate22", "_this$responder21", "tab", "_this$responder22", "_this$responder23", "_this$responder24", "_this$responder25", "control", "d", "_this$delegate23", "h", "_this$delegate24", "_this$delegate25", "_this$responder26", "shift", "_this$delegate26", "_this$responder27", "_this$responder28", "_this$responder29", "alt", "_this$delegate27", "meta", "_this$delegate28", "_file$type", "which", "charCode", "hasPasteboardFlavor", "hasReadableDynamicData", "isExternalHTMLPaste", "isExternalRichTextPaste", "inputController", "isSignificant", "_this$responder5", "_this$responder4", "canApplyToDocument", "_this$responder6", "_this$responder7", "_this$responder8", "_this$data$start", "_this$data$end", "Level2InputController", "scheduledRender", "composing", "reparse", "scheduleRender", "_this$afterRender", "cancelAnimationFrame", "afterRender", "toggleAttributeIfSupported", "inputControllerWillPerformFormatting", "activateAttributeIfSupported", "getTargetDOMRange", "minLength", "_this$event$getTarget", "_this$event", "targetRanges", "getTargetRanges", "staticRangeToRange", "withEvent", "command", "keyboardCommandFromKeyEvent", "shiftKey", "_event$clipboardData", "pasteEventHasFilesOnly", "pasteEventHasPlainTextOnly", "inputTypes", "dragging", "pointFromEvent", "dragEventHasFiles", "ArrowLeft", "ArrowRight", "Backspace", "Tab", "deleteByComposition", "deleteByCut", "deleteByDrag", "deleteByDragRange", "deleteCompositionText", "deleteContent", "deleteContentBackward", "deleteContentForward", "deleteEntireSoftLine", "deleteHardLineBackward", "deleteHardLineForward", "deleteSoftLineBackward", "deleteSoftLineForward", "deleteWordBackward", "deleteWordForward", "formatBackColor", "formatBold", "formatFontColor", "formatFontName", "formatIndent", "formatItalic", "formatJustifyCenter", "formatJustifyFull", "formatJustifyLeft", "formatJustifyRight", "formatOutdent", "formatRemove", "_this$responder30", "formatSetBlockTextDirection", "formatSetInlineTextDirection", "formatStrikeThrough", "formatSubscript", "formatSuperscript", "formatUnderline", "historyRedo", "inputControllerWillPerformRedo", "historyUndo", "inputControllerWillPerformUndo", "insertCompositionText", "insertFromComposition", "insertFromDrop", "_this$responder31", "insertFromPaste", "_this$responder32", "_this$responder33", "processableFilePaste", "_this$responder34", "_this$responder35", "insertFromYank", "insertLink", "insertOrderedList", "insertParagraph", "_this$responder36", "insertReplacementText", "replacement", "_this$event$dataTrans", "insertTranspose", "insertUnorderedList", "staticRange", "_event$dataTransfer$f", "attributeButtonSelector", "actionButtonSelector", "toolbarButtonSelector", "dialogSelector", "activeDialogSelector", "dialogButtonSelector", "dialogInputSelector", "getInputForDialog", "getAttributeName", "getActionName", "ToolbarController", "didClickAttributeButton", "didClickDialogButton", "didKeyDownDialogInput", "actions", "resetDialogInputs", "toolbarDidClickButton", "actionName", "getDialog", "toggleDialog", "toolbarDidInvokeAction", "toolbarDidToggleAttribute", "refreshAttributeButtons", "dialogElement", "dialog", "hideDialog", "updateActions", "refreshActionButtons", "eachActionButton", "disabled", "updateAttributes", "eachAttributeButton", "dialogIsVisible", "applyKeyboardCommand", "keyString", "button", "buttonKeys", "dialogName", "showDialog", "toolbarWillShowDialog", "disabledInput", "toolbarDidShowDialog", "willValidate", "checkValidity", "toolbarDidUpdateAttribute", "toolbarDidRemoveAttribute", "toolbarDidHideDialog", "EditorController", "editorElement", "compositionController", "toolbarController", "toolbarElement", "editor", "notifyEditorElement", "handlingInput", "updateCurrentActions", "pasting", "pastedRange", "attachmentLocationRange", "loadingSnapshot", "isFocused", "requestedLocationRange", "compositionRevisionWhenLocationRangeRequested", "renderedCompositionRevision", "runEditorFilters", "isFocusedInvisibly", "requestedRender", "recordTypingUndoEntry", "recordFormattingUndoEntry", "locationRangeBeforeDrag", "invokingElement", "invokeAction", "selectionFrozen", "canInvokeAction", "actionIsExternal", "_this$actions$actionN", "_this$actions$actionN2", "getCurrentActions", "currentActions", "snapshotsAreEqual", "updateInputElement", "serializer", "setInputElementValue", "message", "documentChangedSinceLastRender", "notify", "getUndoContext", "getLocationContext", "getTimeContext", "Date", "getTime", "_this$editorElement$o", "ownerDocument", "TrixToolbarElement", "connectedCallback", "makeEditable", "configureContentEditable", "disableObjectResizing", "setDefaultParagraphSeparator", "_document$queryComman", "_document", "queryCommandSupported", "execCommand", "_document$queryComman2", "_document2", "cursorTargetStyles", "TrixEditorElement", "labels", "label", "_this$ownerDocument", "toolbarId", "_this$inputElement", "inputElement", "_this$ownerDocument2", "inputId", "nextElementSibling", "_this$editorControlle", "editorController", "_this$inputElement2", "_this$inputElement3", "defaultValue", "_this$editor", "texts", "contains", "registerResetListener", "registerClickListener", "disconnectedCallback", "_this$editorControlle2", "unregisterResetListener", "unregisterClickListener", "resetListener", "resetBubbled", "clickListener", "clickBubbled", "Trix", "VERSION", "version", "core", "models", "controllers", "observers", "customElements", "define", "error", "t", "n", "e", "error", "previewImage", "Trix", "error", "Rails", "error", "import_ujs", "HTMLElement", "FrameLoadingStyle", "location", "FetchMethod", "error", "FormSubmissionState", "FormEnctype", "cookie", "TimingMetric", "VisitState", "SystemStatusCode", "session", "visit", "PageStage", "element", "createConsumer", "application", "error", "fetch", "match", "oldValue", "error", "constructor", "extend", "application", "element", "Rails"]
}
