/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkdtools"] = self["webpackChunkdtools"] || []).push([["compare"],{

/***/ "./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=script&lang=js&":
/*!********************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=script&lang=js& ***!
  \********************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _components_jquery_1_10_2_jquery_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/jquery/1.10.2/jquery.min.js */ \"./src/components/jquery/1.10.2/jquery.min.js\");\n/* harmony import */ var _components_jquery_1_10_2_jquery_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_components_jquery_1_10_2_jquery_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _components_mergely_package_vendor_codemirror_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/mergely/package/vendor/codemirror.min.js */ \"./src/components/mergely/package/vendor/codemirror.min.js\");\n/* harmony import */ var _components_mergely_package_vendor_codemirror_min_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_components_mergely_package_vendor_codemirror_min_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _components_mergely_package_vendor_searchcursor_min_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/mergely/package/vendor/searchcursor.min.js */ \"./src/components/mergely/package/vendor/searchcursor.min.js\");\n/* harmony import */ var _components_mergely_package_vendor_searchcursor_min_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_components_mergely_package_vendor_searchcursor_min_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_mergely_package_vendor_codemirror_min_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/mergely/package/vendor/codemirror.min.css */ \"./src/components/mergely/package/vendor/codemirror.min.css\");\n/* harmony import */ var _components_mergely_package_vendor_codemirror_min_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_components_mergely_package_vendor_codemirror_min_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _components_mergely_package_lib_mergely_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/mergely/package/lib/mergely.js */ \"./src/components/mergely/package/lib/mergely.js\");\n/* harmony import */ var _components_mergely_package_lib_mergely_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_components_mergely_package_lib_mergely_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _components_mergely_package_lib_mergely_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/mergely/package/lib/mergely.css */ \"./src/components/mergely/package/lib/mergely.css\");\n/* harmony import */ var _components_mergely_package_lib_mergely_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_components_mergely_package_lib_mergely_css__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\n/* JSON转换 */\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  components: {},\n  data() {\n    return {};\n  },\n  methods: {\n    handleCompare() {}\n  },\n  mounted() {\n    window.$ = (_components_jquery_1_10_2_jquery_min_js__WEBPACK_IMPORTED_MODULE_0___default());\n    window.$('#mergely').mergely({\n      // license: 'lgpl',\n      cmsettings: {\n        readOnly: false\n      },\n      lhs(setValue) {\n        setValue('输入文本');\n      },\n      rhs(setValue) {\n        setValue('输入文本');\n      },\n      editor_height: '700px'\n    });\n  }\n});\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");

/***/ }),

/***/ "./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=template&id=361155d1&":
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=template&id=361155d1& ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"render\": function() { return /* binding */ render; },\n/* harmony export */   \"staticRenderFns\": function() { return /* binding */ staticRenderFns; }\n/* harmony export */ });\nvar render = function render() {\n  var _vm = this,\n    _c = _vm._self._c;\n  return _c(\"div\", {\n    staticClass: \"component component-json\"\n  }, [_c(\"div\", {\n    staticClass: \"container-center\"\n  }, [_c(\"div\", {\n    staticClass: \"over-hidden\"\n  }, [_c(\"router-link\", {\n    staticClass: \"btn btn-default pull-right icon icon-arrowsleftline mt-lg\",\n    attrs: {\n      to: _vm.getMicroRoute(\"/tools\")\n    }\n  }, [_vm._v(\" 返回列表\")]), _c(\"h2\", {\n    staticClass: \"text-left\"\n  }, [_vm._v(\"文本比对\")])], 1), _vm._m(0)])]);\n};\nvar staticRenderFns = [function () {\n  var _vm = this,\n    _c = _vm._self._c;\n  return _c(\"div\", {\n    staticClass: \"row\"\n  }, [_c(\"div\", {\n    staticClass: \"compare-area\"\n  }, [_c(\"div\", {\n    staticClass: \"mergely-full-screen-8\"\n  }, [_c(\"div\", {\n    staticClass: \"mergely-resizer\"\n  }, [_c(\"div\", {\n    attrs: {\n      id: \"mergely\"\n    }\n  })])])])]);\n}];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");

/***/ }),

/***/ "./src/components/mergely/package/lib/mergely.js":
/*!*******************************************************!*\
  !*** ./src/components/mergely/package/lib/mergely.js ***!
  \*******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

eval("!function (t, e) {\n   true ? module.exports = e(__webpack_require__(/*! ../../../jquery/1.10.2/jquery.min.js */ \"./src/components/jquery/1.10.2/jquery.min.js\")) : 0;\n}(window, function (t, e) {\n  return function (t) {\n    var e = {};\n    function i(s) {\n      if (e[s]) return e[s].exports;\n      var r = e[s] = {\n        i: s,\n        l: !1,\n        exports: {}\n      };\n      return t[s].call(r.exports, r, r.exports, i), r.l = !0, r.exports;\n    }\n    return i.m = t, i.c = e, i.d = function (t, e, s) {\n      i.o(t, e) || Object.defineProperty(t, e, {\n        enumerable: !0,\n        get: s\n      });\n    }, i.r = function (t) {\n      \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n        value: \"Module\"\n      }), Object.defineProperty(t, \"__esModule\", {\n        value: !0\n      });\n    }, i.t = function (t, e) {\n      if (1 & e && (t = i(t)), 8 & e) return t;\n      if (4 & e && \"object\" == typeof t && t && t.__esModule) return t;\n      var s = Object.create(null);\n      if (i.r(s), Object.defineProperty(s, \"default\", {\n        enumerable: !0,\n        value: t\n      }), 2 & e && \"string\" != typeof t) for (var r in t) i.d(s, r, function (e) {\n        return t[e];\n      }.bind(null, r));\n      return s;\n    }, i.n = function (t) {\n      var e = t && t.__esModule ? function () {\n        return t.default;\n      } : function () {\n        return t;\n      };\n      return i.d(e, \"a\", e), e;\n    }, i.o = function (t, e) {\n      return Object.prototype.hasOwnProperty.call(t, e);\n    }, i.p = \"\", i(i.s = 0);\n  }([function (t, e, i) {\n    \"use strict\";\n\n    !function (t, e) {\n      var s = {};\n      s.ChangeExpression = new RegExp(/(^(?![><\\-])*\\d+(?:,\\d+)?)([acd])(\\d+(?:,\\d+)?)/);\n      var r = i(1);\n      s.DiffParser = function (t) {\n        for (var e = [], i = 0, r = t.split(/\\n/), n = 0; n < r.length; ++n) if (0 != r[n].length) {\n          var h = {},\n            o = s.ChangeExpression.exec(r[n]);\n          if (null != o) {\n            var l = o[1].split(\",\");\n            h[\"lhs-line-from\"] = l[0] - 1, 1 == l.length ? h[\"lhs-line-to\"] = l[0] - 1 : h[\"lhs-line-to\"] = l[1] - 1;\n            var a = o[3].split(\",\");\n            h[\"rhs-line-from\"] = a[0] - 1, 1 == a.length ? h[\"rhs-line-to\"] = a[0] - 1 : h[\"rhs-line-to\"] = a[1] - 1, h.op = o[2], e[i++] = h;\n          }\n        }\n        return e;\n      }, s.sizeOf = function (t) {\n        var e,\n          i = 0;\n        for (e in t) t.hasOwnProperty(e) && i++;\n        return i;\n      }, s.LCS = function (t, e, i) {\n        this.x = t && t.replace(/[ ]{1}/g, \"\\n\") || \"\", this.y = e && e.replace(/[ ]{1}/g, \"\\n\") || \"\", this.options = i;\n      }, t.extend(s.LCS.prototype, {\n        clear: function clear() {\n          this.ready = 0;\n        },\n        diff: function diff(t, e) {\n          for (var i = new s.diff(this.x, this.y, {\n              ignorews: !1,\n              ignoreaccents: !!this.options.ignoreaccents\n            }), r = s.DiffParser(i.normal_form()), n = 0, h = 0, o = 0; o < r.length; ++o) {\n            var l = r[o];\n            if (\"a\" != l.op) {\n              n = i.getLines(\"lhs\").slice(0, l[\"lhs-line-from\"]).join(\" \").length, h = l[\"lhs-line-to\"] + 1;\n              var a = i.getLines(\"lhs\").slice(l[\"lhs-line-from\"], h).join(\" \");\n              \"d\" == l.op ? a += \" \" : n > 0 && \"c\" == l.op && (n += 1), e(n, n + a.length);\n            }\n            if (\"d\" != l.op) {\n              n = i.getLines(\"rhs\").slice(0, l[\"rhs-line-from\"]).join(\" \").length, h = l[\"rhs-line-to\"] + 1;\n              var c = i.getLines(\"rhs\").slice(l[\"rhs-line-from\"], h).join(\" \");\n              \"a\" == l.op ? c += \" \" : n > 0 && \"c\" == l.op && (n += 1), t(n, n + c.length);\n            }\n          }\n        }\n      }), s.CodeifyText = function (e) {\n        this._max_code = 0, this._diff_codes = {}, this.ctxs = {}, t.extend(this, e), this.lhs = e.lhs.split(\"\\n\"), this.rhs = e.rhs.split(\"\\n\");\n      }, t.extend(s.CodeifyText.prototype, {\n        getCodes: function getCodes(t) {\n          if (!this.ctxs.hasOwnProperty(t)) {\n            var e = this._diff_ctx(this[t]);\n            this.ctxs[t] = e, e.codes.length = Object.keys(e.codes).length;\n          }\n          return this.ctxs[t].codes;\n        },\n        getLines: function getLines(t) {\n          return this.ctxs[t].lines;\n        },\n        _diff_ctx: function _diff_ctx(t) {\n          var e = {\n            i: 0,\n            codes: {},\n            lines: t\n          };\n          return this._codeify(t, e), e;\n        },\n        _codeify: function _codeify(t, e) {\n          this._max_code;\n          for (var i = 0; i < t.length; ++i) {\n            var s = t[i];\n            this.options.ignorews && (s = s.replace(/\\s+/g, \"\")), this.options.ignorecase && (s = s.toLowerCase()), this.options.ignoreaccents && (s = s.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\"));\n            var r = this._diff_codes[s];\n            null != r ? e.codes[i] = r : (this._max_code++, this._diff_codes[s] = this._max_code, e.codes[i] = this._max_code);\n          }\n        }\n      }), s.diff = function (e, i, r) {\n        var n = t.extend({\n          ignorews: !1,\n          ignoreaccents: !1\n        }, r);\n        this.codeify = new s.CodeifyText({\n          lhs: e,\n          rhs: i,\n          options: n\n        });\n        var h = {\n            codes: this.codeify.getCodes(\"lhs\"),\n            modified: {}\n          },\n          o = {\n            codes: this.codeify.getCodes(\"rhs\"),\n            modified: {}\n          };\n        h.codes.length, o.codes.length;\n        this._lcs(h, 0, h.codes.length, o, 0, o.codes.length, [], []), this._optimize(h), this._optimize(o), this.items = this._create_diffs(h, o);\n      }, t.extend(s.diff.prototype, {\n        changes: function changes() {\n          return this.items;\n        },\n        getLines: function getLines(t) {\n          return this.codeify.getLines(t);\n        },\n        normal_form: function normal_form() {\n          for (var t = \"\", e = 0; e < this.items.length; ++e) {\n            var i = this.items[e],\n              s = \"c\";\n            0 == i.lhs_deleted_count && i.rhs_inserted_count > 0 ? s = \"a\" : i.lhs_deleted_count > 0 && 0 == i.rhs_inserted_count && (s = \"d\"), t += (1 == i.lhs_deleted_count ? i.lhs_start + 1 : 0 == i.lhs_deleted_count ? i.lhs_start : i.lhs_start + 1 + \",\" + (i.lhs_start + i.lhs_deleted_count)) + s + (1 == i.rhs_inserted_count ? i.rhs_start + 1 : 0 == i.rhs_inserted_count ? i.rhs_start : i.rhs_start + 1 + \",\" + (i.rhs_start + i.rhs_inserted_count)) + \"\\n\";\n            var r = this.getLines(\"lhs\"),\n              n = this.getLines(\"rhs\");\n            if (n && r) {\n              var h;\n              for (h = i.lhs_start; h < i.lhs_start + i.lhs_deleted_count; ++h) t += \"< \" + r[h] + \"\\n\";\n              for (i.rhs_inserted_count && i.lhs_deleted_count && (t += \"---\\n\"), h = i.rhs_start; h < i.rhs_start + i.rhs_inserted_count; ++h) t += \"> \" + n[h] + \"\\n\";\n            }\n          }\n          return t;\n        },\n        _lcs: function _lcs(t, e, i, s, r, n, h, o) {\n          for (; e < i && r < n && t.codes[e] == s.codes[r];) ++e, ++r;\n          for (; e < i && r < n && t.codes[i - 1] == s.codes[n - 1];) --i, --n;\n          if (e == i) for (; r < n;) s.modified[r++] = !0;else if (r == n) for (; e < i;) t.modified[e++] = !0;else {\n            var l = this._sms(t, e, i, s, r, n, h, o);\n            this._lcs(t, e, l.x, s, r, l.y, h, o), this._lcs(t, l.x, i, s, l.y, n, h, o);\n          }\n        },\n        _sms: function _sms(t, e, i, s, r, n, h, o) {\n          var l = t.codes.length + s.codes.length + 1,\n            a = e - r,\n            c = i - n,\n            d = 0 != (1 & i - e - (n - r)),\n            g = l - a,\n            f = l - c,\n            u = (i - e + n - r) / 2 + 1;\n          o[g + a + 1] = e, h[f + c - 1] = i;\n          var p,\n            m,\n            _,\n            v,\n            y = {\n              x: 0,\n              y: 0\n            };\n          for (p = 0; p <= u; ++p) {\n            for (m = a - p; m <= a + p; m += 2) {\n              for (m == a - p ? _ = o[g + m + 1] : (_ = o[g + m - 1] + 1, m < a + p && o[g + m + 1] >= _ && (_ = o[g + m + 1])), v = _ - m; _ < i && v < n && t.codes[_] == s.codes[v];) _++, v++;\n              if (o[g + m] = _, d && c - p < m && m < c + p && h[f + m] <= o[g + m]) return y.x = o[g + m], y.y = o[g + m] - m, y;\n            }\n            for (m = c - p; m <= c + p; m += 2) {\n              for (m == c + p ? _ = h[f + m - 1] : (_ = h[f + m + 1] - 1, m > c - p && h[f + m - 1] < _ && (_ = h[f + m - 1])), v = _ - m; _ > e && v > r && t.codes[_ - 1] == s.codes[v - 1];) _--, v--;\n              if (h[f + m] = _, !d && a - p <= m && m <= a + p && h[f + m] <= o[g + m]) return y.x = o[g + m], y.y = o[g + m] - m, y;\n            }\n          }\n          throw \"the algorithm should never come here.\";\n        },\n        _optimize: function _optimize(t) {\n          for (var e = 0, i = 0; e < t.codes.length;) {\n            for (; e < t.codes.length && (null == t.modified[e] || 0 == t.modified[e]);) e++;\n            for (i = e; i < t.codes.length && 1 == t.modified[i];) i++;\n            i < t.codes.length && t.codes[e] == t.codes[i] ? (t.modified[e] = !1, t.modified[i] = !0) : e = i;\n          }\n        },\n        _create_diffs: function _create_diffs(t, e) {\n          for (var i = [], s = 0, r = 0, n = 0, h = 0; n < t.codes.length || h < e.codes.length;) if (n < t.codes.length && !t.modified[n] && h < e.codes.length && !e.modified[h]) n++, h++;else {\n            for (s = n, r = h; n < t.codes.length && (h >= e.codes.length || t.modified[n]);) n++;\n            for (; h < e.codes.length && (n >= t.codes.length || e.modified[h]);) h++;\n            (s < n || r < h) && i.push({\n              lhs_start: s,\n              rhs_start: r,\n              lhs_deleted_count: n - s,\n              rhs_inserted_count: h - r\n            });\n          }\n          return i;\n        }\n      }), s.mergely = function (t, e) {\n        t && this.init(t, e);\n      }, t.extend(s.mergely.prototype, {\n        name: \"mergely\",\n        init: function init(t, e) {\n          this.diffView = new s.CodeMirrorDiffView(t, e), this.bind(t);\n        },\n        bind: function bind(t) {\n          this.diffView.bind(t);\n        }\n      }), s.CodeMirrorDiffView = function (t, i) {\n        e = e || window.CodeMirror;\n        e.defineExtension(\"centerOnCursor\", function () {\n          var t = this.cursorCoords(null, \"local\");\n          this.scrollTo(null, (t.top + t.bottom) / 2 - this.getScrollerElement().clientHeight / 2);\n        }), this.init(t, i);\n      }, t.extend(s.CodeMirrorDiffView.prototype, {\n        init: function init(e, i) {\n          this.settings = t.extend(!0, {\n            autoupdate: !0,\n            autoresize: !0,\n            rhs_margin: \"right\",\n            wrap_lines: !1,\n            line_numbers: !0,\n            lcs: !0,\n            sidebar: !0,\n            viewport: !1,\n            ignorews: !1,\n            ignorecase: !1,\n            ignoreaccents: !1,\n            fadein: \"fast\",\n            resize_timeout: 500,\n            change_timeout: 150,\n            fgcolor: {\n              a: \"#4ba3fa\",\n              c: \"#a3a3a3\",\n              d: \"#ff7f7f\",\n              ca: \"#4b73ff\",\n              cc: \"#434343\",\n              cd: \"#ff4f4f\"\n            },\n            bgcolor: \"#eee\",\n            vpcolor: \"rgba(0, 0, 200, 0.5)\",\n            license: \"\",\n            width: \"auto\",\n            height: \"auto\",\n            cmsettings: {\n              styleSelectedText: !0\n            },\n            lhs: function lhs(t) {},\n            rhs: function rhs(t) {},\n            loaded: function loaded() {},\n            resize: function resize(i) {\n              var s,\n                r,\n                n = t(e).parent(),\n                h = (s = \"auto\" == this.width ? n.width() : this.width) / 2 - 16 - 8,\n                o = r = \"auto\" == this.height ? n.height() - 2 : this.height,\n                l = t(e);\n              l.find(\".mergely-column\").css({\n                width: h + \"px\"\n              }), l.find(\".mergely-column, .mergely-canvas, .mergely-margin, .mergely-column textarea, .CodeMirror-scroll, .cm-s-default\").css({\n                height: o + \"px\"\n              }), l.find(\".mergely-canvas\").css({\n                height: o + \"px\"\n              }), l.find(\".mergely-column textarea\").css({\n                width: h + \"px\"\n              }), l.css({\n                width: s,\n                height: r,\n                clear: \"both\"\n              }), \"none\" === l.css(\"display\") && (0 != this.fadein ? l.fadeIn(this.fadein) : l.show()), this.resized && this.resized();\n            },\n            _debug: \"\",\n            resized: function resized() {}\n          }, i), this.element = t(e), this.lhs_cmsettings = {\n            lineWrapping: this.settings.wrap_lines,\n            lineNumbers: this.settings.line_numbers\n          }, this.rhs_cmsettings = {\n            lineWrapping: this.settings.wrap_lines,\n            lineNumbers: this.settings.line_numbers\n          };\n          var s = [];\n          this.lhs_cmsettings.lineNumbers && (s = [\"merge\", \"CodeMirror-linenumbers\"]);\n          var r = [];\n          this.rhs_cmsettings.lineNumbers && (r = [\"merge\", \"CodeMirror-linenumbers\"]), t.extend(!0, this.lhs_cmsettings, this.settings.cmsettings, {\n            gutters: s\n          }, this.settings.lhs_cmsettings), t.extend(!0, this.rhs_cmsettings, this.settings.cmsettings, {\n            gutters: r\n          }, this.settings.rhs_cmsettings), this.element.bind(\"destroyed\", t.proxy(this.teardown, this)), t.data(e, \"mergely\", this), this._setOptions(i);\n        },\n        unbind: function unbind() {\n          null != this.changed_timeout && clearTimeout(this.changed_timeout), this.editor[this.id + \"-lhs\"].toTextArea(), this.editor[this.id + \"-rhs\"].toTextArea(), t(window).off(\".mergely\");\n        },\n        destroy: function destroy() {\n          this.element.unbind(\"destroyed\", this.teardown), this.teardown();\n        },\n        teardown: function teardown() {\n          this.unbind();\n        },\n        lhs: function lhs(t) {\n          this.changes = [], delete this._current_diff, this.editor[this.id + \"-lhs\"].setValue(t);\n        },\n        rhs: function rhs(t) {\n          this.changes = [], delete this._current_diff, this.editor[this.id + \"-rhs\"].setValue(t);\n        },\n        update: function update() {\n          this._changing(this.id + \"-lhs\", this.id + \"-rhs\");\n        },\n        unmarkup: function unmarkup() {\n          this._clear();\n        },\n        scrollToDiff: function scrollToDiff(t) {\n          this.changes.length && (\"next\" == t ? this._current_diff == this.changes.length - 1 ? this._current_diff = 0 : this._current_diff = Math.min(++this._current_diff, this.changes.length - 1) : \"prev\" == t && (0 == this._current_diff ? this._current_diff = this.changes.length - 1 : this._current_diff = Math.max(--this._current_diff, 0)), this._scroll_to_change(this.changes[this._current_diff]), this._changed(this.id + \"-lhs\", this.id + \"-rhs\"));\n        },\n        mergeCurrentChange: function mergeCurrentChange(t) {\n          this.changes.length && (\"lhs\" != t || this.lhs_cmsettings.readOnly ? \"rhs\" != t || this.rhs_cmsettings.readOnly || this._merge_change(this.changes[this._current_diff], \"lhs\", \"rhs\") : this._merge_change(this.changes[this._current_diff], \"rhs\", \"lhs\"));\n        },\n        scrollTo: function scrollTo(t, e) {\n          var i = this.editor[this.id + \"-lhs\"],\n            s = this.editor[this.id + \"-rhs\"];\n          \"lhs\" == t ? (i.setCursor(e), i.centerOnCursor()) : (s.setCursor(e), s.centerOnCursor());\n        },\n        _setOptions: function _setOptions(e) {\n          if (t.extend(this.settings, e), this.settings.hasOwnProperty(\"rhs_margin\")) if (\"left\" == this.settings.rhs_margin) this.element.find(\".mergely-margin:last-child\").insertAfter(this.element.find(\".mergely-canvas\"));else {\n            var i = this.element.find(\".mergely-margin\").last();\n            i.appendTo(i.parent());\n          }\n          var s, r;\n          this.settings.hasOwnProperty(\"sidebar\") && (this.settings.sidebar ? this.element.find(\".mergely-margin\").css({\n            display: \"block\"\n          }) : this.element.find(\".mergely-margin\").css({\n            display: \"none\"\n          })), this.settings.hasOwnProperty(\"wrap_lines\") && this.editor && (s = this.editor[this.id + \"-lhs\"], r = this.editor[this.id + \"-rhs\"], s.setOption(\"lineWrapping\", this.settings.wrap_lines), r.setOption(\"lineWrapping\", this.settings.wrap_lines)), this.settings.hasOwnProperty(\"line_numbers\") && this.editor && (s = this.editor[this.id + \"-lhs\"], r = this.editor[this.id + \"-rhs\"], s.setOption(\"lineNumbers\", this.settings.line_numbers), r.setOption(\"lineNumbers\", this.settings.line_numbers));\n        },\n        options: function options(t) {\n          if (!t) return this.settings;\n          this._setOptions(t), this.settings.autoresize && this.resize(), this.settings.autoupdate && this.update();\n        },\n        swap: function swap() {\n          if (!this.lhs_cmsettings.readOnly && !this.rhs_cmsettings.readOnly) {\n            var t = this.editor[this.id + \"-lhs\"],\n              e = this.editor[this.id + \"-rhs\"],\n              i = e.getValue();\n            e.setValue(t.getValue()), t.setValue(i);\n          }\n        },\n        merge: function merge(t) {\n          var e = this.editor[this.id + \"-lhs\"],\n            i = this.editor[this.id + \"-rhs\"];\n          \"lhs\" != t || this.lhs_cmsettings.readOnly ? this.rhs_cmsettings.readOnly || i.setValue(e.getValue()) : e.setValue(i.getValue());\n        },\n        summary: function summary() {\n          return {\n            numChanges: this.changes.length,\n            lhsLength: this.editor[this.id + \"-lhs\"].getValue().length,\n            rhsLength: this.editor[this.id + \"-rhs\"].getValue().length,\n            c: this.changes.filter(function (t) {\n              return \"c\" === t.op;\n            }).length,\n            a: this.changes.filter(function (t) {\n              return \"a\" === t.op;\n            }).length,\n            d: this.changes.filter(function (t) {\n              return \"d\" === t.op;\n            }).length\n          };\n        },\n        get: function get(t) {\n          var e = this.editor[this.id + \"-\" + t].getValue();\n          return null == e ? \"\" : e;\n        },\n        clear: function clear(t) {\n          \"lhs\" == t && this.lhs_cmsettings.readOnly || \"rhs\" == t && this.rhs_cmsettings.readOnly || (this.editor[this.id + \"-\" + t].setValue(\"\"), delete this._current_diff);\n        },\n        cm: function cm(t) {\n          return this.editor[this.id + \"-\" + t];\n        },\n        search: function search(t, e, i) {\n          var s,\n            r = this.editor[this.id + \"-lhs\"],\n            n = this.editor[this.id + \"-rhs\"];\n          i = \"prev\" == i ? \"findPrevious\" : \"findNext\", 0 != (s = \"lhs\" == t ? r : n).getSelection().length && this.prev_query[t] == e || (this.cursor[this.id] = s.getSearchCursor(e, {\n            line: 0,\n            ch: 0\n          }, !1), this.prev_query[t] = e);\n          var h = this.cursor[this.id];\n          h[i]() ? s.setSelection(h.from(), h.to()) : h = s.getSearchCursor(e, {\n            line: 0,\n            ch: 0\n          }, !1);\n        },\n        resize: function resize() {\n          this.settings.resize(), this._changing(this.id + \"-lhs\", this.id + \"-rhs\"), this._set_top_offset(this.id + \"-lhs\");\n        },\n        diff: function diff() {\n          var t = this.editor[this.id + \"-lhs\"].getValue(),\n            e = this.editor[this.id + \"-rhs\"].getValue();\n          return new s.diff(t, e, this.settings).normal_form();\n        },\n        bind: function bind(i) {\n          var s,\n            r,\n            n = this;\n          this.trace(\"init\", \"bind\"), this.element.hide(), this.id = t(i).attr(\"id\");\n          try {\n            t(\"#\".concat(this.id));\n          } catch (t) {\n            return void console.error(\"jQuery failed to find mergely: #\".concat(this.id));\n          }\n          if (this.changed_timeout = null, this.chfns = {}, this.chfns[this.id + \"-lhs\"] = [], this.chfns[this.id + \"-rhs\"] = [], this.prev_query = [], this.cursor = [], this._skipscroll = {}, this.change_exp = new RegExp(/(\\d+(?:,\\d+)?)([acd])(\\d+(?:,\\d+)?)/), null != t.button) s = '<button title=\"Merge left\"></button>', r = '<button title=\"Merge right\"></button>';else {\n            var h = \"opacity:0.6;height:16px;background-color:#bfbfbf;cursor:pointer;text-align:center;color:#eee;border:1px solid #848484;margin-right:-15px;margin-top:-2px;\";\n            s = '<div style=\"' + h + '\" title=\"Merge left\">&lt;</div>', r = '<div style=\"' + h + '\" title=\"Merge right\">&gt;</div>';\n          }\n          this.merge_rhs_button = t(r), this.merge_lhs_button = t(s);\n          var o = t('<div id=\"mergely-splash\">'),\n            l = t('<div class=\"mergely-margin\" style=\"height: \\''.concat(\"10px\", '\\'\"><canvas id=\"lhs-margin\" width=\"8px\" height=\"\\'').concat(\"10px\", \"'\\\"></canvas></div>\"));\n          l.find(\"#lhs-margin\").attr(\"id\", \"\".concat(this.id, \"-lhs-margin\"));\n          var a = t(\"<div style=\\\"position:relative;width:'\".concat(\"10px\", \"'; height:'\").concat(\"10px\", '\\'\" id=\"editor-lhs\" class=\"mergely-column\"><textarea id=\"text-lhs\"></textarea></div>'));\n          a.eq(0).attr(\"id\", \"\".concat(this.id, \"-editor-lhs\")), a.find(\"#text-lhs\").attr(\"id\", \"\".concat(this.id, \"-lhs\"));\n          var c = t('<div class=\"mergely-canvas\" style=\"height: \\''.concat(\"10px\", '\\'\"><canvas id=\"lhs-rhs-canvas\" style=\"width:28px\" width=\"28px\" height=\"\\'').concat(\"10px\", \"'\\\"></canvas></div>\"));\n          c.find(\"#mergely-canvas\").attr(\"id\", \"\".concat(this.id, \"-mergely-canvas\")), c.find(\"#lhs-rhs-canvas\").attr(\"id\", \"\".concat(this.id, \"-lhs-\").concat(this.id, \"-rhs-canvas\")), this.element.append(o), this.element.append(l), this.element.append(a), this.element.append(c);\n          var d = t('<div class=\"mergely-margin\" style=\"height: \\''.concat(\"10px\", '\\'\"><canvas id=\"rhs-margin\" width=\"8px\" height=\"\\'').concat(\"10px\", \"'\\\"></canvas></div>\"));\n          d.find(\"#rhs-margin\").attr(\"id\", \"\".concat(this.id, \"-rhs-margin\")), \"left\" == this.settings.rhs_margin && this.element.append(d);\n          var g,\n            f = t(\"<div style=\\\"width:'\".concat(\"10px\", \"'; height:'\").concat(\"10px\", '\\'\" id=\"editor-rhs\" class=\"mergely-column\"><textarea id=\"text-rhs\"></textarea></div>'));\n          if (f.eq(0).attr(\"id\", \"\".concat(this.id, \"-editor-rhs\")), f.find(\"#text-rhs\").attr(\"id\", \"\".concat(this.id, \"-rhs\")), this.element.append(f), \"left\" != this.settings.rhs_margin && this.element.append(d), this.settings.sidebar || this.element.find(\".mergely-margin\").css({\n            display: \"none\"\n          }), [\"lgpl-separate-notice\", \"gpl-separate-notice\", \"mpl-separate-notice\", \"commercial\"].indexOf(this.settings.license) < 0) {\n            var u = {\n                lgpl: \"GNU LGPL v3.0\",\n                gpl: \"GNU GPL v3.0\",\n                mpl: \"MPL 1.1\"\n              },\n              p = u[this.settings.license];\n            p || (p = u.lgpl);\n            this.element.parent().height();\n            var m = this.element.parent().width();\n            this.element.find(\"#mergely-splash\").css({\n              position: \"absolute\",\n              zIndex: \"100\",\n              backgroundColor: \"#fff\",\n              border: \"1px solid black\",\n              height: \"70px\",\n              width: \"300px\",\n              left: (m - 300) / 2,\n              padding: \"10px 10px 0 10px\",\n              fontFamily: \"arial\",\n              fontSize: \"11px\"\n            }).append('<p><img width=\"36\" height=\"36\" alt=\"mergely\" src=\"data:image/png;base64, \" style=\"float:left;padding-right:10px;\" />This software is a Combined Work using Mergely and is covered by the ' + p + ' license.  For the full license, see <a target=\"_blank\" href=\"http://www.mergely.com\">http://www.mergely.com/license.</a></p>'), t(\"body\").one(\"click\", function () {\n              t(\"#mergely-splash\").fadeOut(100, \"linear\", function () {\n                t(\"#mergely-splash\").remove();\n              });\n            });\n          }\n          try {\n            g = this.element.find(\"#\".concat(this.id, \"-rhs\")).get(0);\n          } catch (t) {}\n          if (g) {\n            var _;\n            try {\n              _ = this.element.find(\"#\".concat(this.id, \"-lhs\")).get(0);\n            } catch (t) {}\n            if (_) {\n              var v = t('<div style=\"display:none\" class=\"mergely current start\" />').appendTo(\"body\").css(\"border-top-color\");\n              this.current_diff_color = v;\n              var y = \"#\".concat(this.id, \" .CodeMirror-gutter-text { padding: 5px 0 0 0; }\\n\\t\\t\\t'#\").concat(this.id, \" .CodeMirror-lines pre, #\").concat(this.id, \" .CodeMirror-gutter-text pre { line-height: 18px; }\\n\\t\\t\\t'.CodeMirror-linewidget { overflow: hidden; };\");\n              this.settings.autoresize && (y += \"\".concat(this.id, \" .CodeMirror-scroll { height: 100%; overflow: auto; }\")), t('<style type=\"text/css\">'.concat(y += \"\\n.CodeMirror { line-height: 18px; }\", \"</style>\")).appendTo(\"head\");\n              var w = this;\n              if (w.trace(\"init\", \"binding event listeners\"), this.editor = [], this.editor[this.id + \"-lhs\"] = e.fromTextArea(_, this.lhs_cmsettings), this.editor[this.id + \"-rhs\"] = e.fromTextArea(g, this.rhs_cmsettings), this.editor[this.id + \"-lhs\"].on(\"change\", function () {\n                w.settings.autoupdate && w._changing(w.id + \"-lhs\", w.id + \"-rhs\");\n              }), this.editor[this.id + \"-lhs\"].on(\"scroll\", function () {\n                w._scrolling(w.id + \"-lhs\");\n              }), this.editor[this.id + \"-rhs\"].on(\"change\", function () {\n                w.settings.autoupdate && w._changing(w.id + \"-lhs\", w.id + \"-rhs\");\n              }), this.editor[this.id + \"-rhs\"].on(\"scroll\", function () {\n                w._scrolling(w.id + \"-rhs\");\n              }), this.settings.autoresize) {\n                var b = null,\n                  x = function x(t) {\n                    w.settings.resize && w.settings.resize(t), w.editor[w.id + \"-lhs\"].refresh(), w.editor[w.id + \"-rhs\"].refresh();\n                  };\n                t(window).on(\"resize.mergely\", function () {\n                  b && clearTimeout(b), b = setTimeout(x, w.settings.resize_timeout);\n                }), x(!0);\n              }\n              this.editor[this.id + \"-lhs\"].on(\"gutterClick\", function (t, e, i, s) {\n                C.call(this, \"lhs\", e, s);\n              }.bind(this)), this.editor[this.id + \"-rhs\"].on(\"gutterClick\", function (t, e, i, s) {\n                C.call(this, \"rhs\", e, s);\n              }.bind(this)), this.settings.lhs && (w.trace(\"init\", \"setting lhs value\"), this.settings.lhs(function (t) {\n                this._initializing = !0, delete this._current_diff, this.editor[this.id + \"-lhs\"].getDoc().setValue(t);\n              }.bind(this))), this.settings.rhs && (w.trace(\"init\", \"setting rhs value\"), this.settings.rhs(function (t) {\n                this._initializing = !0, delete this._current_diff, this.editor[this.id + \"-rhs\"].getDoc().setValue(t);\n              }.bind(this))), this.element.one(\"updated\", function () {\n                n._initializing = !1, w.settings.loaded && w.settings.loaded();\n              }), this.trace(\"init\", \"bound\"), this.editor[this.id + \"-lhs\"].focus();\n            } else console.error(\"lhs textarea not defined - Mergely not initialized properly\");\n          } else console.error(\"rhs textarea not defined - Mergely not initialized properly\");\n          function C(e, i, s) {\n            var r, n;\n            if (!(s.target && t(s.target).closest(\".merge-button\").length > 0)) for (r = 0; r < this.changes.length; r++) if (i >= (n = this.changes[r])[e + \"-line-from\"] && i <= n[e + \"-line-to\"]) {\n              this._current_diff = r, setTimeout(function () {\n                this.scrollToDiff();\n              }.bind(this), 10);\n              break;\n            }\n          }\n        },\n        _scroll_to_change: function _scroll_to_change(t) {\n          if (t) {\n            var e = this.editor[this.id + \"-lhs\"],\n              i = this.editor[this.id + \"-rhs\"];\n            e.setCursor(Math.max(t[\"lhs-line-from\"], 0), 0), i.setCursor(Math.max(t[\"rhs-line-from\"], 0), 0), t[\"lhs-line-to\"] >= 0 && e.scrollIntoView({\n              line: t[\"lhs-line-to\"]\n            }), e.focus();\n          }\n        },\n        _scrolling: function _scrolling(e) {\n          if (!0 !== this._skipscroll[e]) {\n            if (this.changes) {\n              var i = t(this.editor[e].getScrollerElement());\n              null == this.midway && (this.midway = (i.height() / 2 + i.offset().top).toFixed(2));\n              var s = this.editor[e].coordsChar({\n                  left: 0,\n                  top: this.midway\n                }),\n                n = i.scrollTop(),\n                h = i.scrollLeft();\n              this.trace(\"scroll\", \"side\", e), this.trace(\"scroll\", \"midway\", this.midway), this.trace(\"scroll\", \"midline\", s), this.trace(\"scroll\", \"top_to\", n), this.trace(\"scroll\", \"left_to\", h);\n              var o = this.id + \"-lhs\",\n                l = this.id + \"-rhs\";\n              for (var a in this.editor) if (this.editor.hasOwnProperty(a) && e != a) {\n                for (var c = e.replace(this.id + \"-\", \"\"), d = a.replace(this.id + \"-\", \"\"), g = 0, f = null, u = !1, p = 0; p < this.changes.length; ++p) {\n                  var m = this.changes[p];\n                  s.line >= m[c + \"-line-from\"] && (f = m, s.line >= f[c + \"-line-to\"] && (m.hasOwnProperty(c + \"-y-start\") && m.hasOwnProperty(c + \"-y-end\") && m.hasOwnProperty(d + \"-y-start\") && m.hasOwnProperty(d + \"-y-end\") ? g += m[c + \"-y-end\"] - m[c + \"-y-start\"] - (m[d + \"-y-end\"] - m[d + \"-y-start\"]) : u = !0));\n                }\n                var _ = this.editor[a].getViewport(),\n                  v = !0;\n                f && (this.trace(\"scroll\", \"last change before midline\", f), s.line >= _.from && s <= _.to && (v = !1)), this.trace(\"scroll\", \"scroll\", v), v || u ? (this.trace(\"scroll\", \"scrolling other side\", n - g), this._skipscroll[a] = !0, this.editor[a].scrollTo(h, n - g)) : this.trace(\"scroll\", \"not scrolling other side\"), this.settings.autoupdate && (r.start(), this._calculate_offsets(o, l, this.changes), this.trace(\"change\", \"offsets time\", r.stop()), this._markup_changes(o, l, this.changes), this.trace(\"change\", \"markup time\", r.stop()), this._draw_diff(o, l, this.changes), this.trace(\"change\", \"draw time\", r.stop())), this.trace(\"scroll\", \"scrolled\");\n              }\n            }\n          } else this._skipscroll[e] = !1;\n        },\n        _changing: function _changing(t, e) {\n          this.trace(\"change\", \"changing-timeout\", this.changed_timeout);\n          var i = this;\n          null != this.changed_timeout && clearTimeout(this.changed_timeout), this.changed_timeout = setTimeout(function () {\n            r.start(), i._changed(t, e), i.trace(\"change\", \"total time\", r.stop());\n          }, this.settings.change_timeout);\n        },\n        _changed: function _changed(t, e) {\n          this._clear(), this._diff(t, e);\n        },\n        _clear: function _clear() {\n          var t,\n            e,\n            i,\n            s,\n            n,\n            h,\n            o = this,\n            l = function l() {\n              for (r.start(), s = 0, h = e.lineCount(); s < h; ++s) e.removeLineClass(s, \"background\");\n              for (s = 0; s < i.length; ++s) (n = i[s]).lines.length && o.trace(\"change\", \"clear text\", n.lines[0].text), n.clear();\n              e.clearGutter(\"merge\"), o.trace(\"change\", \"clear time\", r.stop());\n            };\n          for (t in this.editor) this.editor.hasOwnProperty(t) && (e = this.editor[t], i = o.chfns[t], e.operation(l));\n          o.chfns[t] = [];\n          var a = this._draw_info(this.id + \"-lhs\", this.id + \"-rhs\"),\n            c = a.clhs.get(0).getContext(\"2d\"),\n            d = a.crhs.get(0).getContext(\"2d\"),\n            g = a.dcanvas.getContext(\"2d\");\n          c.beginPath(), c.fillStyle = this.settings.bgcolor, c.strokeStyle = \"#888\", c.fillRect(0, 0, 6.5, a.visible_page_height), c.strokeRect(0, 0, 6.5, a.visible_page_height), d.beginPath(), d.fillStyle = this.settings.bgcolor, d.strokeStyle = \"#888\", d.fillRect(0, 0, 6.5, a.visible_page_height), d.strokeRect(0, 0, 6.5, a.visible_page_height), g.beginPath(), g.fillStyle = \"#fff\", g.fillRect(0, 0, this.draw_mid_width, a.visible_page_height);\n        },\n        _diff: function _diff(t, e) {\n          var i = this.editor[t].getValue(),\n            n = this.editor[e].getValue();\n          r.start();\n          var h = new s.diff(i, n, this.settings);\n          this.trace(\"change\", \"diff time\", r.stop()), this.changes = s.DiffParser(h.normal_form()), this.trace(\"change\", \"parse time\", r.stop()), void 0 === this._current_diff && this.changes.length && (this._current_diff = 0, this._initializing && this._scroll_to_change(this.changes[0])), this.trace(\"change\", \"scroll_to_change time\", r.stop()), this._calculate_offsets(t, e, this.changes), this.trace(\"change\", \"offsets time\", r.stop()), this._markup_changes(t, e, this.changes), this.trace(\"change\", \"markup time\", r.stop()), this._draw_diff(t, e, this.changes), this.trace(\"change\", \"draw time\", r.stop()), this.element.trigger(\"updated\");\n        },\n        _parse_diff: function _parse_diff(t, e, i) {\n          this.trace(\"diff\", \"diff results:\\n\", i);\n          for (var s = [], r = 0, n = i.split(/\\n/), h = 0; h < n.length; ++h) if (0 != n[h].length) {\n            var o = {},\n              l = this.change_exp.exec(n[h]);\n            if (null != l) {\n              var a = l[1].split(\",\");\n              o[\"lhs-line-from\"] = a[0] - 1, 1 == a.length ? o[\"lhs-line-to\"] = a[0] - 1 : o[\"lhs-line-to\"] = a[1] - 1;\n              var c = l[3].split(\",\");\n              o[\"rhs-line-from\"] = c[0] - 1, 1 == c.length ? o[\"rhs-line-to\"] = c[0] - 1 : o[\"rhs-line-to\"] = c[1] - 1, o[\"lhs-line-from\"] < 0 && (o[\"lhs-line-from\"] = 0), o[\"lhs-line-to\"] < 0 && (o[\"lhs-line-to\"] = 0), o[\"rhs-line-from\"] < 0 && (o[\"rhs-line-from\"] = 0), o[\"rhs-line-to\"] < 0 && (o[\"rhs-line-to\"] = 0), o.op = l[2], s[r++] = o, this.trace(\"diff\", \"change\", o);\n            }\n          }\n          return s;\n        },\n        _get_viewport_side: function _get_viewport_side(t) {\n          return this.editor[t].getViewport();\n        },\n        _is_change_in_view: function _is_change_in_view(t, e, i) {\n          return i[\"\".concat(t, \"-line-from\")] >= e.from && i[\"\".concat(t, \"-line-from\")] <= e.to || i[\"\".concat(t, \"-line-to\")] >= e.from && i[\"\".concat(t, \"-line-to\")] <= e.to || e.from >= i[\"\".concat(t, \"-line-from\")] && e.to <= i[\"\".concat(t, \"-line-to\")];\n        },\n        _set_top_offset: function _set_top_offset(t) {\n          var e = this.editor[t].getScrollInfo().top;\n          this.editor[t].scrollTo(null, 0);\n          var i = this.element.find(\".CodeMirror-measure\").first().offset().top - 4;\n          return !!i && (this.editor[t].scrollTo(null, e), this.draw_top_offset = .5 - i, !0);\n        },\n        _calculate_offsets: function _calculate_offsets(e, i, s) {\n          if (null == this.em_height) {\n            if (!this._set_top_offset(e)) return;\n            this.em_height = this.editor[e].defaultTextHeight(), this.em_height || (console.warn(\"Failed to calculate offsets, using 18 by default\"), this.em_height = 18), this.draw_lhs_min = .5;\n            var r = t(\"#\" + e + \"-\" + i + \"-canvas\");\n            if (r.length || console.error(\"failed to find canvas\", \"#\" + e + \"-\" + i + \"-canvas\"), !r.width()) return void console.error(\"canvas width is 0\");\n            this.draw_mid_width = t(\"#\" + e + \"-\" + i + \"-canvas\").width(), this.draw_rhs_max = this.draw_mid_width - .5, this.draw_lhs_width = 5, this.draw_rhs_width = 5, this.trace(\"calc\", \"change offsets calculated\", {\n              top_offset: this.draw_top_offset,\n              lhs_min: this.draw_lhs_min,\n              rhs_max: this.draw_rhs_max,\n              lhs_width: this.draw_lhs_width,\n              rhs_width: this.draw_rhs_width\n            });\n          }\n          for (var n = this.editor[e].charCoords({\n              line: 0\n            }), h = this.editor[i].charCoords({\n              line: 0\n            }), o = this._get_viewport_side(e), l = (this._get_viewport_side(i), 0); l < s.length; ++l) {\n            var a = s[l];\n            if (!this.settings.viewport || this._is_change_in_view(o, \"lhs\", a) || this._is_change_in_view(o, \"rhs\", a)) {\n              var c,\n                d,\n                g,\n                f,\n                u,\n                p,\n                m,\n                _,\n                v,\n                y,\n                w = a[\"lhs-line-from\"] >= 0 ? a[\"lhs-line-from\"] : 0,\n                b = a[\"lhs-line-to\"] >= 0 ? a[\"lhs-line-to\"] : 0,\n                x = a[\"rhs-line-from\"] >= 0 ? a[\"rhs-line-from\"] : 0,\n                C = a[\"rhs-line-to\"] >= 0 ? a[\"rhs-line-to\"] : 0;\n              this.editor[e].getOption(\"lineWrapping\") || this.editor[i].getOption(\"lineWrapping\") ? (u = this.editor[e].cursorCoords({\n                line: w,\n                ch: 0\n              }, \"page\"), _ = this.editor[e].getLineHandle(w), c = {\n                top: u.top,\n                bottom: u.top + _.height\n              }, p = this.editor[e].cursorCoords({\n                line: b,\n                ch: 0\n              }, \"page\"), m = this.editor[e].getLineHandle(b), d = {\n                top: p.top,\n                bottom: p.top + m.height\n              }, u = this.editor[i].cursorCoords({\n                line: x,\n                ch: 0\n              }, \"page\"), v = this.editor[i].getLineHandle(x), g = {\n                top: u.top,\n                bottom: u.top + v.height\n              }, p = this.editor[i].cursorCoords({\n                line: C,\n                ch: 0\n              }, \"page\"), y = this.editor[i].getLineHandle(C), f = {\n                top: p.top,\n                bottom: p.top + y.height\n              }) : (c = {\n                top: n.top + w * this.em_height,\n                bottom: n.bottom + w * this.em_height + 2\n              }, d = {\n                top: n.top + b * this.em_height,\n                bottom: n.bottom + b * this.em_height + 2\n              }, g = {\n                top: h.top + x * this.em_height,\n                bottom: h.bottom + x * this.em_height + 2\n              }, f = {\n                top: h.top + C * this.em_height,\n                bottom: h.bottom + C * this.em_height + 2\n              }), \"a\" == a.op ? x > 0 && (c.top = c.bottom, c.bottom += this.em_height, d = c) : \"d\" == a.op && w > 0 && (g.top = g.bottom, g.bottom += this.em_height, f = g), a[\"lhs-y-start\"] = this.draw_top_offset + c.top, \"c\" == a.op || \"d\" == a.op ? a[\"lhs-y-end\"] = this.draw_top_offset + d.bottom : a[\"lhs-y-end\"] = this.draw_top_offset + d.top, a[\"rhs-y-start\"] = this.draw_top_offset + g.top, \"c\" == a.op || \"a\" == a.op ? a[\"rhs-y-end\"] = this.draw_top_offset + f.bottom : a[\"rhs-y-end\"] = this.draw_top_offset + f.top, this.trace(\"calc\", \"change calculated\", l, a);\n            } else delete a[\"lhs-y-start\"], delete a[\"lhs-y-end\"], delete a[\"rhs-y-start\"], delete a[\"rhs-y-end\"];\n          }\n          return s;\n        },\n        _markup_changes: function _markup_changes(e, i, n) {\n          this.element.find(\".merge-button\").remove();\n          var h = this,\n            o = this.editor[e],\n            l = this.editor[i],\n            a = this._current_diff,\n            c = this._get_viewport_side(e),\n            d = this._get_viewport_side(i);\n          r.start(), o.operation(function () {\n            for (var t = 0; t < n.length; ++t) {\n              var e = n[t];\n              if (this._is_change_in_view(\"lhs\", c, e)) {\n                var i = e[\"lhs-line-from\"] >= 0 ? e[\"lhs-line-from\"] : 0,\n                  s = e[\"lhs-line-to\"] >= 0 ? e[\"lhs-line-to\"] : 0,\n                  r = e[\"rhs-line-from\"] >= 0 ? e[\"rhs-line-from\"] : 0,\n                  d = (e[\"rhs-line-to\"] >= 0 && e[\"rhs-line-to\"], [\"mergely\", \"lhs\", e.op, \"cid-\" + t]);\n                if (o.addLineClass(i, \"background\", \"start\"), o.addLineClass(s, \"background\", \"end\"), e[\"lhs-line-from\"] < 0 && d.push(\"empty\"), a == t && (i != s && o.addLineClass(i, \"background\", \"current\"), o.addLineClass(s, \"background\", \"current\")), 0 == i && 0 == s && 0 == r) o.addLineClass(i, \"background\", d.join(\" \")), o.addLineClass(i, \"background\", \"first\");else for (var g = i; g <= s; ++g) o.addLineClass(g, \"background\", d.join(\" \")), o.addLineClass(g, \"background\", d.join(\" \"));\n                if (!l.getOption(\"readOnly\")) {\n                  var f = h.merge_rhs_button.clone();\n                  f.button && f.button({\n                    icons: {\n                      primary: \"ui-icon-triangle-1-e\"\n                    },\n                    text: !1\n                  }), f.addClass(\"merge-button\"), f.attr(\"id\", \"merge-rhs-\" + t), o.setGutterMarker(i, \"merge\", f.get(0));\n                }\n              }\n            }\n          }.bind(this)), this.trace(\"change\", \"markup lhs-editor time\", r.stop()), l.operation(function () {\n            for (var t = 0; t < n.length; ++t) {\n              var e = n[t];\n              if (this._is_change_in_view(\"rhs\", d, e)) {\n                var i = e[\"lhs-line-from\"] >= 0 ? e[\"lhs-line-from\"] : 0,\n                  s = (e[\"lhs-line-to\"] >= 0 && e[\"lhs-line-to\"], e[\"rhs-line-from\"] >= 0 ? e[\"rhs-line-from\"] : 0),\n                  r = e[\"rhs-line-to\"] >= 0 ? e[\"rhs-line-to\"] : 0,\n                  c = [\"mergely\", \"rhs\", e.op, \"cid-\" + t];\n                if (l.addLineClass(s, \"background\", \"start\"), l.addLineClass(r, \"background\", \"end\"), e[\"rhs-line-from\"] < 0 && c.push(\"empty\"), a == t && (s != r && l.addLineClass(s, \"background\", \"current\"), l.addLineClass(r, \"background\", \"current\")), 0 == s && 0 == r && 0 == i) l.addLineClass(s, \"background\", c.join(\" \")), l.addLineClass(s, \"background\", \"first\");else for (var g = s; g <= r; ++g) l.addLineClass(g, \"background\", c.join(\" \")), l.addLineClass(g, \"background\", c.join(\" \"));\n                if (!o.getOption(\"readOnly\")) {\n                  var f = h.merge_lhs_button.clone();\n                  f.button && f.button({\n                    icons: {\n                      primary: \"ui-icon-triangle-1-w\"\n                    },\n                    text: !1\n                  }), f.addClass(\"merge-button\"), f.attr(\"id\", \"merge-lhs-\" + t), l.setGutterMarker(s, \"merge\", f.get(0));\n                }\n              }\n            }\n          }.bind(this)), this.trace(\"change\", \"markup rhs-editor time\", r.stop());\n          var g,\n            f = [];\n          for (O = 0; this.settings.lcs && O < n.length; ++O) {\n            var u = n[O],\n              p = u[\"lhs-line-from\"] >= 0 ? u[\"lhs-line-from\"] : 0,\n              m = u[\"lhs-line-to\"] >= 0 ? u[\"lhs-line-to\"] : 0,\n              _ = u[\"rhs-line-from\"] >= 0 ? u[\"rhs-line-from\"] : 0,\n              v = u[\"rhs-line-to\"] >= 0 ? u[\"rhs-line-to\"] : 0;\n            if (\"d\" == u.op) {\n              var y = p,\n                w = m;\n              if (this._is_change_in_view(\"lhs\", c, u)) {\n                var b = o.lineInfo(w);\n                b && f.push([o, {\n                  line: y,\n                  ch: 0\n                }, {\n                  line: w,\n                  ch: b.text.length\n                }, {\n                  className: \"mergely ch d lhs\"\n                }]);\n              }\n            } else if (\"c\" == u.op) for (k = p, g = _; k >= 0 && k <= m || g >= 0 && g <= v; ++k, ++g) {\n              var x, C;\n              if (g > v) x = o.getLine(k), f.push([o, {\n                line: k,\n                ch: 0\n              }, {\n                line: k,\n                ch: x.length\n              }, {\n                className: \"mergely ch d lhs\"\n              }]);else if (k > m) C = l.getLine(g), f.push([l, {\n                line: g,\n                ch: 0\n              }, {\n                line: g,\n                ch: C.length\n              }, {\n                className: \"mergely ch a rhs\"\n              }]);else x = o.getLine(k), C = l.getLine(g), new s.LCS(x, C, {\n                ignoreaccents: !!this.settings.ignoreaccents\n              }).diff(function (t, e) {\n                h._is_change_in_view(\"rhs\", d, u) && f.push([l, {\n                  line: g,\n                  ch: t\n                }, {\n                  line: g,\n                  ch: e\n                }, {\n                  className: \"mergely ch a rhs\"\n                }]);\n              }, function (t, e) {\n                h._is_change_in_view(\"lhs\", c, u) && f.push([o, {\n                  line: k,\n                  ch: t\n                }, {\n                  line: k,\n                  ch: e\n                }, {\n                  className: \"mergely ch d lhs\"\n                }]);\n              });\n            }\n          }\n          this.trace(\"change\", \"LCS marktext time\", r.stop()), o.operation(function () {\n            for (var t = 0; t < f.length; ++t) {\n              var e = f[t];\n              e[0].doc.id == o.getDoc().id && h.chfns[h.id + \"-lhs\"].push(e[0].markText(e[1], e[2], e[3]));\n            }\n          }), l.operation(function () {\n            for (var t = 0; t < f.length; ++t) {\n              var e = f[t];\n              e[0].doc.id == l.getDoc().id && h.chfns[h.id + \"-rhs\"].push(e[0].markText(e[1], e[2], e[3]));\n            }\n          }), this.trace(\"change\", \"LCS markup time\", r.stop());\n          var A = {\n            lhs: o,\n            rhs: l\n          };\n          this.element.find(\".merge-button\").on(\"click\", function (e) {\n            var i = \"rhs\",\n              s = \"lhs\";\n            t(this).parents(\"#\" + h.id + \"-editor-lhs\").length && (i = \"lhs\", s = \"rhs\");\n            var r = A[i].coordsChar({\n                left: e.pageX,\n                top: e.pageY\n              }),\n              n = null,\n              o = A[i].lineInfo(r.line);\n            t.each(o.bgClass.split(\" \"), function (t, e) {\n              if (0 == e.indexOf(\"cid-\")) return n = parseInt(e.split(\"-\")[1], 10), !1;\n            });\n            var l = h.changes[n];\n            return h._merge_change(l, i, s), !1;\n          });\n          var M,\n            L,\n            O,\n            k,\n            P = t(\"#\" + this.id + \"-lhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt\"),\n            T = t(\"#\" + this.id + \"-rhs ~ .CodeMirror .CodeMirror-code .CodeMirror-linenumber.CodeMirror-gutter-elt\");\n          T.removeClass(\"mergely current\"), P.removeClass(\"mergely current\");\n          var S = parseInt(P.eq(0).text(), 10) - 1,\n            E = parseInt(P.eq(P.length - 1).text(), 10),\n            V = parseInt(T.eq(0).text(), 10) - 1,\n            j = parseInt(T.eq(T.length - 1).text(), 10);\n          for (O = 0; O < n.length; ++O) {\n            if (u = n[O], a == O && \"a\" !== u.op) for (M = u[\"lhs-line-from\"], L = u[\"lhs-line-to\"] + 1, k = M; k < L; ++k) k >= S && k <= E && P.eq(k - S).addClass(\"mergely current\");\n            if (a == O && \"d\" !== u.op) for (M = u[\"rhs-line-from\"], L = u[\"rhs-line-to\"] + 1, k = M; k < L; ++k) k >= V && k <= j && T.eq(k - V).addClass(\"mergely current\");\n          }\n          this.trace(\"change\", \"markup buttons time\", r.stop());\n        },\n        _merge_change: function _merge_change(t, i, s) {\n          if (t) {\n            var r,\n              n = {\n                lhs: this.editor[this.id + \"-lhs\"],\n                rhs: this.editor[this.id + \"-rhs\"]\n              },\n              h = t[i + \"-line-from\"],\n              o = t[i + \"-line-to\"],\n              l = t[s + \"-line-from\"],\n              a = t[s + \"-line-to\"],\n              c = n[i].getDoc(),\n              d = n[s].getDoc(),\n              g = h >= 0 ? c.getLine(h).length + 1 : 0,\n              f = o >= 0 ? c.getLine(o).length + 1 : 0,\n              u = a >= 0 ? d.getLine(a).length + 1 : 0,\n              p = l >= 0 ? d.getLine(l).length + 1 : 0;\n            \"c\" === t.op ? (r = c.getRange(e.Pos(h, 0), e.Pos(o, f)), d.replaceRange(r, e.Pos(l, 0), e.Pos(a, u))) : \"lhs\" === s && \"d\" === t.op || \"rhs\" === s && \"a\" === t.op ? (h > 0 ? (r = c.getRange(e.Pos(h, g), e.Pos(o, f)), l += 1) : r = c.getRange(e.Pos(0, 0), e.Pos(o + 1, 0)), d.replaceRange(r, e.Pos(l - 1, 0), e.Pos(a + 1, 0))) : (\"rhs\" === s && \"d\" === t.op || \"lhs\" === s && \"a\" === t.op) && (h > 0 ? (g = c.getLine(h - 1).length + 1, r = c.getRange(e.Pos(h - 1, g), e.Pos(o, f))) : r = c.getRange(e.Pos(0, 0), e.Pos(o + 1, 0)), l < 0 && (l = 0), d.replaceRange(r, e.Pos(l, p))), this._scroll_to_change(t);\n          }\n        },\n        _draw_info: function _draw_info(e, i) {\n          var s = t(this.editor[e].getScrollerElement()).height() + 17,\n            r = t(this.editor[e].getScrollerElement()).children(\":first-child\").height(),\n            n = document.getElementById(e + \"-\" + i + \"-canvas\");\n          if (null == n) throw \"Failed to find: \" + e + \"-\" + i + \"-canvas\";\n          var h = this.element.find(\"#\" + this.id + \"-lhs-margin\"),\n            o = this.element.find(\"#\" + this.id + \"-rhs-margin\");\n          return {\n            visible_page_height: s,\n            gutter_height: r,\n            visible_page_ratio: s / r,\n            margin_ratio: s / r,\n            lhs_scroller: t(this.editor[e].getScrollerElement()),\n            rhs_scroller: t(this.editor[i].getScrollerElement()),\n            lhs_lines: this.editor[e].lineCount(),\n            rhs_lines: this.editor[i].lineCount(),\n            dcanvas: n,\n            clhs: h,\n            crhs: o,\n            lhs_xyoffset: t(h).offset(),\n            rhs_xyoffset: t(o).offset()\n          };\n        },\n        _draw_diff: function _draw_diff(e, i, s) {\n          var r = this._draw_info(e, i),\n            n = r.clhs.get(0),\n            h = r.crhs.get(0),\n            o = r.dcanvas.getContext(\"2d\"),\n            l = n.getContext(\"2d\"),\n            a = h.getContext(\"2d\");\n          this.trace(\"draw\", \"visible_page_height\", r.visible_page_height), this.trace(\"draw\", \"gutter_height\", r.gutter_height), this.trace(\"draw\", \"visible_page_ratio\", r.visible_page_ratio), this.trace(\"draw\", \"lhs-scroller-top\", r.lhs_scroller.scrollTop()), this.trace(\"draw\", \"rhs-scroller-top\", r.rhs_scroller.scrollTop()), t.each(this.element.find(\"canvas\"), function () {\n            t(this).get(0).height = r.visible_page_height;\n          }), r.clhs.unbind(\"click\"), r.crhs.unbind(\"click\"), l.beginPath(), l.fillStyle = this.settings.bgcolor, l.strokeStyle = \"#888\", l.fillRect(0, 0, 6.5, r.visible_page_height), l.strokeRect(0, 0, 6.5, r.visible_page_height), a.beginPath(), a.fillStyle = this.settings.bgcolor, a.strokeStyle = \"#888\", a.fillRect(0, 0, 6.5, r.visible_page_height), a.strokeRect(0, 0, 6.5, r.visible_page_height);\n          for (var c = this._get_viewport_side(e), d = this._get_viewport_side(i), g = 0; g < s.length; ++g) {\n            var f = s[g],\n              u = this.settings.fgcolor[f.op];\n            this._current_diff === g && (u = this.current_diff_color), this.trace(\"draw\", f);\n            var p = (f[\"lhs-y-start\"] + r.lhs_scroller.scrollTop()) * r.visible_page_ratio,\n              m = (f[\"lhs-y-end\"] + r.lhs_scroller.scrollTop()) * r.visible_page_ratio + 1,\n              _ = (f[\"rhs-y-start\"] + r.rhs_scroller.scrollTop()) * r.visible_page_ratio,\n              v = (f[\"rhs-y-end\"] + r.rhs_scroller.scrollTop()) * r.visible_page_ratio + 1;\n            if (this.trace(\"draw\", \"marker calculated\", p, m, _, v), l.beginPath(), l.fillStyle = u, l.strokeStyle = \"#000\", l.lineWidth = .5, l.fillRect(1.5, p, 4.5, Math.max(m - p, 5)), l.strokeRect(1.5, p, 4.5, Math.max(m - p, 5)), a.beginPath(), a.fillStyle = u, a.strokeStyle = \"#000\", a.lineWidth = .5, a.fillRect(1.5, _, 4.5, Math.max(v - _, 5)), a.strokeRect(1.5, _, 4.5, Math.max(v - _, 5)), this._is_change_in_view(\"lhs\", c, f) || this._is_change_in_view(\"rhs\", d, f)) {\n              p = f[\"lhs-y-start\"], m = f[\"lhs-y-end\"], _ = f[\"rhs-y-start\"], v = f[\"rhs-y-end\"];\n              o.beginPath(), o.strokeStyle = u, o.lineWidth = this._current_diff == g ? 1.5 : 1;\n              var y = this.draw_lhs_width,\n                w = m - p - 1,\n                b = this.draw_lhs_min,\n                x = p;\n              o.moveTo(b, x), \"Microsoft Internet Explorer\" == navigator.appName ? (o.lineTo(this.draw_lhs_min + this.draw_lhs_width, p), o.lineTo(this.draw_lhs_min + this.draw_lhs_width, m + 1), o.lineTo(this.draw_lhs_min, m + 1)) : (w <= 0 ? o.lineTo(b + y, x) : (o.arcTo(b + y, x, b + y, x + 3, 3), o.arcTo(b + y, x + w, b + y - 3, x + w, 3)), o.lineTo(b, x + w)), o.stroke(), y = this.draw_rhs_width, w = v - _ - 1, b = this.draw_rhs_max, x = _, o.moveTo(b, x), \"Microsoft Internet Explorer\" == navigator.appName ? (o.lineTo(this.draw_rhs_max - this.draw_rhs_width, _), o.lineTo(this.draw_rhs_max - this.draw_rhs_width, v + 1), o.lineTo(this.draw_rhs_max, v + 1)) : (w <= 0 ? o.lineTo(b - y, x) : (o.arcTo(b - y, x, b - y, x + 3, 3), o.arcTo(b - y, x + w, b - 3, x + w, 3)), o.lineTo(b, x + w)), o.stroke();\n              var C = this.draw_lhs_min + this.draw_lhs_width,\n                A = p + (m + 1 - p) / 2,\n                M = this.draw_rhs_max - this.draw_rhs_width,\n                L = _ + (v + 1 - _) / 2;\n              o.moveTo(C, A), A == L ? o.lineTo(M, L) : o.bezierCurveTo(C + 12, A - 3, M - 12, L - 3, M, L), o.stroke();\n            }\n          }\n          l.fillStyle = this.settings.vpcolor, a.fillStyle = this.settings.vpcolor;\n          var O = r.clhs.height() * r.visible_page_ratio,\n            k = r.lhs_scroller.scrollTop() / r.gutter_height * r.clhs.height(),\n            P = r.crhs.height() * r.visible_page_ratio,\n            T = r.rhs_scroller.scrollTop() / r.gutter_height * r.crhs.height();\n          this.trace(\"draw\", \"cls.height\", r.clhs.height()), this.trace(\"draw\", \"lhs_scroller.scrollTop()\", r.lhs_scroller.scrollTop()), this.trace(\"draw\", \"gutter_height\", r.gutter_height), this.trace(\"draw\", \"visible_page_ratio\", r.visible_page_ratio), this.trace(\"draw\", \"lhs from\", k, \"lhs to\", O), this.trace(\"draw\", \"rhs from\", T, \"rhs to\", P), l.fillRect(1.5, k, 4.5, O), a.fillRect(1.5, T, 4.5, P), r.clhs.click(function (t) {\n            var e = t.pageY - r.lhs_xyoffset.top - O / 2,\n              i = Math.max(0, e / n.height * r.lhs_scroller.get(0).scrollHeight);\n            r.lhs_scroller.scrollTop(i);\n          }), r.crhs.click(function (t) {\n            var e = t.pageY - r.rhs_xyoffset.top - P / 2,\n              i = Math.max(0, e / h.height * r.rhs_scroller.get(0).scrollHeight);\n            r.rhs_scroller.scrollTop(i);\n          });\n        },\n        trace: function trace(t) {\n          this.settings._debug.indexOf(t) >= 0 && (arguments[0] = t + \":\", console.log([].slice.apply(arguments)));\n        }\n      }), t.pluginMaker = function (e) {\n        t.fn[e.prototype.name] = function (i) {\n          var s,\n            r = t.makeArray(arguments),\n            n = r.slice(1);\n          if (this.each(function () {\n            var h = this,\n              o = t.data(this, e.prototype.name);\n            if (o) {\n              if (\"string\" == typeof i) s = o[i].apply(o, n);else if (o.update) return o.update.apply(o, r);\n            } else {\n              new e(this, i);\n              t.fn[\"\".concat(e.prototype.name, \"Unregister\")] = function () {\n                t.data(h, e.prototype.name, null);\n              };\n            }\n          }), null != s) return s;\n        };\n      }, t.pluginMaker(s.mergely);\n    }(i(2), i(3));\n  }, function (t, e) {\n    function i(t, e) {\n      for (var i = 0; i < e.length; i++) {\n        var s = e[i];\n        s.enumerable = s.enumerable || !1, s.configurable = !0, \"value\" in s && (s.writable = !0), Object.defineProperty(t, s.key, s);\n      }\n    }\n    var s = function () {\n      function t() {\n        !function (t, e) {\n          if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n        }(this, t);\n      }\n      var e, s, r;\n      return e = t, r = [{\n        key: \"start\",\n        value: function value() {\n          t.t0 = Date.now();\n        }\n      }, {\n        key: \"stop\",\n        value: function value() {\n          var e = Date.now(),\n            i = e - t.t0;\n          return t.t0 = e, i;\n        }\n      }], (s = null) && i(e.prototype, s), r && i(e, r), t;\n    }();\n    s.t0 = 0, t.exports = s;\n  }, function (e, i) {\n    e.exports = t;\n  }, function (t, i) {\n    t.exports = e;\n  }]);\n});\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/lib/mergely.js?");

/***/ }),

/***/ "./src/components/mergely/package/vendor/codemirror.min.js":
/*!*****************************************************************!*\
  !*** ./src/components/mergely/package/vendor/codemirror.min.js ***!
  \*****************************************************************/
/***/ (function() {

eval("!function (e, t) {\n  window.CodeMirror = e.CodeMirror = t();\n}(this, function () {\n  \"use strict\";\n\n  function e(e) {\n    return new RegExp(\"(^|\\\\s)\" + e + \"(?:$|\\\\s)\\\\s*\");\n  }\n  function t(e) {\n    for (var t = e.childNodes.length; t > 0; --t) e.removeChild(e.firstChild);\n    return e;\n  }\n  function r(e, r) {\n    return t(e).appendChild(r);\n  }\n  function n(e, t, r, n) {\n    var i = document.createElement(e);\n    if (r && (i.className = r), n && (i.style.cssText = n), \"string\" == typeof t) i.appendChild(document.createTextNode(t));else if (t) for (var o = 0; o < t.length; ++o) i.appendChild(t[o]);\n    return i;\n  }\n  function i(e, t, r, i) {\n    var o = n(e, t, r, i);\n    return o.setAttribute(\"role\", \"presentation\"), o;\n  }\n  function o(e, t) {\n    if (3 == t.nodeType && (t = t.parentNode), e.contains) return e.contains(t);\n    do {\n      if (11 == t.nodeType && (t = t.host), t == e) return !0;\n    } while (t = t.parentNode);\n  }\n  function l() {\n    var e;\n    try {\n      e = document.activeElement;\n    } catch (t) {\n      e = document.body || null;\n    }\n    for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;\n    return e;\n  }\n  function s(t, r) {\n    var n = t.className;\n    e(r).test(n) || (t.className += (n ? \" \" : \"\") + r);\n  }\n  function a(t, r) {\n    for (var n = t.split(\" \"), i = 0; i < n.length; i++) n[i] && !e(n[i]).test(r) && (r += \" \" + n[i]);\n    return r;\n  }\n  function u(e) {\n    var t = Array.prototype.slice.call(arguments, 1);\n    return function () {\n      return e.apply(null, t);\n    };\n  }\n  function c(e, t, r) {\n    t || (t = {});\n    for (var n in e) !e.hasOwnProperty(n) || !1 === r && t.hasOwnProperty(n) || (t[n] = e[n]);\n    return t;\n  }\n  function h(e, t, r, n, i) {\n    null == t && -1 == (t = e.search(/[^\\s\\u00a0]/)) && (t = e.length);\n    for (var o = n || 0, l = i || 0;;) {\n      var s = e.indexOf(\"\\t\", o);\n      if (s < 0 || s >= t) return l + (t - o);\n      l += s - o, l += r - l % r, o = s + 1;\n    }\n  }\n  function f(e, t) {\n    for (var r = 0; r < e.length; ++r) if (e[r] == t) return r;\n    return -1;\n  }\n  function d(e, t, r) {\n    for (var n = 0, i = 0;;) {\n      var o = e.indexOf(\"\\t\", n);\n      -1 == o && (o = e.length);\n      var l = o - n;\n      if (o == e.length || i + l >= t) return n + Math.min(l, t - i);\n      if (i += o - n, i += r - i % r, n = o + 1, i >= t) return n;\n    }\n  }\n  function p(e) {\n    for (; wo.length <= e;) wo.push(g(wo) + \" \");\n    return wo[e];\n  }\n  function g(e) {\n    return e[e.length - 1];\n  }\n  function v(e, t) {\n    for (var r = [], n = 0; n < e.length; n++) r[n] = t(e[n], n);\n    return r;\n  }\n  function m() {}\n  function y(e, t) {\n    var r;\n    return Object.create ? r = Object.create(e) : (m.prototype = e, r = new m()), t && c(t, r), r;\n  }\n  function b(e) {\n    return /\\w/.test(e) || e > \"\" && (e.toUpperCase() != e.toLowerCase() || xo.test(e));\n  }\n  function w(e, t) {\n    return t ? !!(t.source.indexOf(\"\\\\w\") > -1 && b(e)) || t.test(e) : b(e);\n  }\n  function x(e) {\n    for (var t in e) if (e.hasOwnProperty(t) && e[t]) return !1;\n    return !0;\n  }\n  function C(e) {\n    return e.charCodeAt(0) >= 768 && Co.test(e);\n  }\n  function S(e, t, r) {\n    for (; (r < 0 ? t > 0 : t < e.length) && C(e.charAt(t));) t += r;\n    return t;\n  }\n  function L(e, t, r) {\n    for (var n = t > r ? -1 : 1;;) {\n      if (t == r) return t;\n      var i = (t + r) / 2,\n        o = n < 0 ? Math.ceil(i) : Math.floor(i);\n      if (o == t) return e(o) ? t : r;\n      e(o) ? r = o : t = o + n;\n    }\n  }\n  function k(e, t) {\n    if ((t -= e.first) < 0 || t >= e.size) throw new Error(\"There is no line \" + (t + e.first) + \" in the document.\");\n    for (var r = e; !r.lines;) for (var n = 0;; ++n) {\n      var i = r.children[n],\n        o = i.chunkSize();\n      if (t < o) {\n        r = i;\n        break;\n      }\n      t -= o;\n    }\n    return r.lines[t];\n  }\n  function T(e, t, r) {\n    var n = [],\n      i = t.line;\n    return e.iter(t.line, r.line + 1, function (e) {\n      var o = e.text;\n      i == r.line && (o = o.slice(0, r.ch)), i == t.line && (o = o.slice(t.ch)), n.push(o), ++i;\n    }), n;\n  }\n  function M(e, t, r) {\n    var n = [];\n    return e.iter(t, r, function (e) {\n      n.push(e.text);\n    }), n;\n  }\n  function N(e, t) {\n    var r = t - e.height;\n    if (r) for (var n = e; n; n = n.parent) n.height += r;\n  }\n  function O(e) {\n    if (null == e.parent) return null;\n    for (var t = e.parent, r = f(t.lines, e), n = t.parent; n; t = n, n = n.parent) for (var i = 0; n.children[i] != t; ++i) r += n.children[i].chunkSize();\n    return r + t.first;\n  }\n  function A(e, t) {\n    var r = e.first;\n    e: do {\n      for (var n = 0; n < e.children.length; ++n) {\n        var i = e.children[n],\n          o = i.height;\n        if (t < o) {\n          e = i;\n          continue e;\n        }\n        t -= o, r += i.chunkSize();\n      }\n      return r;\n    } while (!e.lines);\n    for (var l = 0; l < e.lines.length; ++l) {\n      var s = e.lines[l].height;\n      if (t < s) break;\n      t -= s;\n    }\n    return r + l;\n  }\n  function W(e, t) {\n    return t >= e.first && t < e.first + e.size;\n  }\n  function D(e, t) {\n    return String(e.lineNumberFormatter(t + e.firstLineNumber));\n  }\n  function H(e, t, r) {\n    if (void 0 === r && (r = null), !(this instanceof H)) return new H(e, t, r);\n    this.line = e, this.ch = t, this.sticky = r;\n  }\n  function F(e, t) {\n    return e.line - t.line || e.ch - t.ch;\n  }\n  function P(e, t) {\n    return e.sticky == t.sticky && 0 == F(e, t);\n  }\n  function E(e) {\n    return H(e.line, e.ch);\n  }\n  function z(e, t) {\n    return F(e, t) < 0 ? t : e;\n  }\n  function I(e, t) {\n    return F(e, t) < 0 ? e : t;\n  }\n  function R(e, t) {\n    return Math.max(e.first, Math.min(t, e.first + e.size - 1));\n  }\n  function B(e, t) {\n    if (t.line < e.first) return H(e.first, 0);\n    var r = e.first + e.size - 1;\n    return t.line > r ? H(r, k(e, r).text.length) : function (e, t) {\n      var r = e.ch;\n      return null == r || r > t ? H(e.line, t) : r < 0 ? H(e.line, 0) : e;\n    }(t, k(e, t.line).text.length);\n  }\n  function G(e, t) {\n    for (var r = [], n = 0; n < t.length; n++) r[n] = B(e, t[n]);\n    return r;\n  }\n  function U(e, t, r) {\n    this.marker = e, this.from = t, this.to = r;\n  }\n  function V(e, t) {\n    if (e) for (var r = 0; r < e.length; ++r) {\n      var n = e[r];\n      if (n.marker == t) return n;\n    }\n  }\n  function K(e, t) {\n    for (var r, n = 0; n < e.length; ++n) e[n] != t && (r || (r = [])).push(e[n]);\n    return r;\n  }\n  function j(e, t) {\n    if (t.full) return null;\n    var r = W(e, t.from.line) && k(e, t.from.line).markedSpans,\n      n = W(e, t.to.line) && k(e, t.to.line).markedSpans;\n    if (!r && !n) return null;\n    var i = t.from.ch,\n      o = t.to.ch,\n      l = 0 == F(t.from, t.to),\n      s = function (e, t, r) {\n        var n;\n        if (e) for (var i = 0; i < e.length; ++i) {\n          var o = e[i],\n            l = o.marker;\n          if (null == o.from || (l.inclusiveLeft ? o.from <= t : o.from < t) || o.from == t && \"bookmark\" == l.type && (!r || !o.marker.insertLeft)) {\n            var s = null == o.to || (l.inclusiveRight ? o.to >= t : o.to > t);\n            (n || (n = [])).push(new U(l, o.from, s ? null : o.to));\n          }\n        }\n        return n;\n      }(r, i, l),\n      a = function (e, t, r) {\n        var n;\n        if (e) for (var i = 0; i < e.length; ++i) {\n          var o = e[i],\n            l = o.marker;\n          if (null == o.to || (l.inclusiveRight ? o.to >= t : o.to > t) || o.from == t && \"bookmark\" == l.type && (!r || o.marker.insertLeft)) {\n            var s = null == o.from || (l.inclusiveLeft ? o.from <= t : o.from < t);\n            (n || (n = [])).push(new U(l, s ? null : o.from - t, null == o.to ? null : o.to - t));\n          }\n        }\n        return n;\n      }(n, o, l),\n      u = 1 == t.text.length,\n      c = g(t.text).length + (u ? i : 0);\n    if (s) for (var h = 0; h < s.length; ++h) {\n      var f = s[h];\n      if (null == f.to) {\n        var d = V(a, f.marker);\n        d ? u && (f.to = null == d.to ? null : d.to + c) : f.to = i;\n      }\n    }\n    if (a) for (var p = 0; p < a.length; ++p) {\n      var v = a[p];\n      if (null != v.to && (v.to += c), null == v.from) {\n        V(s, v.marker) || (v.from = c, u && (s || (s = [])).push(v));\n      } else v.from += c, u && (s || (s = [])).push(v);\n    }\n    s && (s = X(s)), a && a != s && (a = X(a));\n    var m = [s];\n    if (!u) {\n      var y,\n        b = t.text.length - 2;\n      if (b > 0 && s) for (var w = 0; w < s.length; ++w) null == s[w].to && (y || (y = [])).push(new U(s[w].marker, null, null));\n      for (var x = 0; x < b; ++x) m.push(y);\n      m.push(a);\n    }\n    return m;\n  }\n  function X(e) {\n    for (var t = 0; t < e.length; ++t) {\n      var r = e[t];\n      null != r.from && r.from == r.to && !1 !== r.marker.clearWhenEmpty && e.splice(t--, 1);\n    }\n    return e.length ? e : null;\n  }\n  function Y(e) {\n    var t = e.markedSpans;\n    if (t) {\n      for (var r = 0; r < t.length; ++r) t[r].marker.detachLine(e);\n      e.markedSpans = null;\n    }\n  }\n  function _(e, t) {\n    if (t) {\n      for (var r = 0; r < t.length; ++r) t[r].marker.attachLine(e);\n      e.markedSpans = t;\n    }\n  }\n  function q(e) {\n    return e.inclusiveLeft ? -1 : 0;\n  }\n  function $(e) {\n    return e.inclusiveRight ? 1 : 0;\n  }\n  function Z(e, t) {\n    var r = e.lines.length - t.lines.length;\n    if (0 != r) return r;\n    var n = e.find(),\n      i = t.find(),\n      o = F(n.from, i.from) || q(e) - q(t);\n    if (o) return -o;\n    var l = F(n.to, i.to) || $(e) - $(t);\n    return l || t.id - e.id;\n  }\n  function Q(e, t) {\n    var r,\n      n = Lo && e.markedSpans;\n    if (n) for (var i = void 0, o = 0; o < n.length; ++o) (i = n[o]).marker.collapsed && null == (t ? i.from : i.to) && (!r || Z(r, i.marker) < 0) && (r = i.marker);\n    return r;\n  }\n  function J(e) {\n    return Q(e, !0);\n  }\n  function ee(e) {\n    return Q(e, !1);\n  }\n  function te(e, t, r, n, i) {\n    var o = k(e, t),\n      l = Lo && o.markedSpans;\n    if (l) for (var s = 0; s < l.length; ++s) {\n      var a = l[s];\n      if (a.marker.collapsed) {\n        var u = a.marker.find(0),\n          c = F(u.from, r) || q(a.marker) - q(i),\n          h = F(u.to, n) || $(a.marker) - $(i);\n        if (!(c >= 0 && h <= 0 || c <= 0 && h >= 0) && (c <= 0 && (a.marker.inclusiveRight && i.inclusiveLeft ? F(u.to, r) >= 0 : F(u.to, r) > 0) || c >= 0 && (a.marker.inclusiveRight && i.inclusiveLeft ? F(u.from, n) <= 0 : F(u.from, n) < 0))) return !0;\n      }\n    }\n  }\n  function re(e) {\n    for (var t; t = J(e);) e = t.find(-1, !0).line;\n    return e;\n  }\n  function ne(e, t) {\n    var r = k(e, t),\n      n = re(r);\n    return r == n ? t : O(n);\n  }\n  function ie(e, t) {\n    if (t > e.lastLine()) return t;\n    var r,\n      n = k(e, t);\n    if (!oe(e, n)) return t;\n    for (; r = ee(n);) n = r.find(1, !0).line;\n    return O(n) + 1;\n  }\n  function oe(e, t) {\n    var r = Lo && t.markedSpans;\n    if (r) for (var n = void 0, i = 0; i < r.length; ++i) if ((n = r[i]).marker.collapsed) {\n      if (null == n.from) return !0;\n      if (!n.marker.widgetNode && 0 == n.from && n.marker.inclusiveLeft && le(e, t, n)) return !0;\n    }\n  }\n  function le(e, t, r) {\n    if (null == r.to) {\n      var n = r.marker.find(1, !0);\n      return le(e, n.line, V(n.line.markedSpans, r.marker));\n    }\n    if (r.marker.inclusiveRight && r.to == t.text.length) return !0;\n    for (var i = void 0, o = 0; o < t.markedSpans.length; ++o) if ((i = t.markedSpans[o]).marker.collapsed && !i.marker.widgetNode && i.from == r.to && (null == i.to || i.to != r.from) && (i.marker.inclusiveLeft || r.marker.inclusiveRight) && le(e, t, i)) return !0;\n  }\n  function se(e) {\n    for (var t = 0, r = (e = re(e)).parent, n = 0; n < r.lines.length; ++n) {\n      var i = r.lines[n];\n      if (i == e) break;\n      t += i.height;\n    }\n    for (var o = r.parent; o; r = o, o = r.parent) for (var l = 0; l < o.children.length; ++l) {\n      var s = o.children[l];\n      if (s == r) break;\n      t += s.height;\n    }\n    return t;\n  }\n  function ae(e) {\n    if (0 == e.height) return 0;\n    for (var t, r = e.text.length, n = e; t = J(n);) {\n      var i = t.find(0, !0);\n      n = i.from.line, r += i.from.ch - i.to.ch;\n    }\n    for (n = e; t = ee(n);) {\n      var o = t.find(0, !0);\n      r -= n.text.length - o.from.ch, r += (n = o.to.line).text.length - o.to.ch;\n    }\n    return r;\n  }\n  function ue(e) {\n    var t = e.display,\n      r = e.doc;\n    t.maxLine = k(r, r.first), t.maxLineLength = ae(t.maxLine), t.maxLineChanged = !0, r.iter(function (e) {\n      var r = ae(e);\n      r > t.maxLineLength && (t.maxLineLength = r, t.maxLine = e);\n    });\n  }\n  function ce(e, t, r) {\n    var n;\n    ko = null;\n    for (var i = 0; i < e.length; ++i) {\n      var o = e[i];\n      if (o.from < t && o.to > t) return i;\n      o.to == t && (o.from != o.to && \"before\" == r ? n = i : ko = i), o.from == t && (o.from != o.to && \"before\" != r ? n = i : ko = i);\n    }\n    return null != n ? n : ko;\n  }\n  function he(e, t) {\n    var r = e.order;\n    return null == r && (r = e.order = To(e.text, t)), r;\n  }\n  function fe(e, t) {\n    return e._handlers && e._handlers[t] || Mo;\n  }\n  function de(e, t, r) {\n    if (e.removeEventListener) e.removeEventListener(t, r, !1);else if (e.detachEvent) e.detachEvent(\"on\" + t, r);else {\n      var n = e._handlers,\n        i = n && n[t];\n      if (i) {\n        var o = f(i, r);\n        o > -1 && (n[t] = i.slice(0, o).concat(i.slice(o + 1)));\n      }\n    }\n  }\n  function pe(e, t) {\n    var r = fe(e, t);\n    if (r.length) for (var n = Array.prototype.slice.call(arguments, 2), i = 0; i < r.length; ++i) r[i].apply(null, n);\n  }\n  function ge(e, t, r) {\n    return \"string\" == typeof t && (t = {\n      type: t,\n      preventDefault: function preventDefault() {\n        this.defaultPrevented = !0;\n      }\n    }), pe(e, r || t.type, e, t), xe(t) || t.codemirrorIgnore;\n  }\n  function ve(e) {\n    var t = e._handlers && e._handlers.cursorActivity;\n    if (t) for (var r = e.curOp.cursorActivityHandlers || (e.curOp.cursorActivityHandlers = []), n = 0; n < t.length; ++n) -1 == f(r, t[n]) && r.push(t[n]);\n  }\n  function me(e, t) {\n    return fe(e, t).length > 0;\n  }\n  function ye(e) {\n    e.prototype.on = function (e, t) {\n      No(this, e, t);\n    }, e.prototype.off = function (e, t) {\n      de(this, e, t);\n    };\n  }\n  function be(e) {\n    e.preventDefault ? e.preventDefault() : e.returnValue = !1;\n  }\n  function we(e) {\n    e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0;\n  }\n  function xe(e) {\n    return null != e.defaultPrevented ? e.defaultPrevented : 0 == e.returnValue;\n  }\n  function Ce(e) {\n    be(e), we(e);\n  }\n  function Se(e) {\n    return e.target || e.srcElement;\n  }\n  function Le(e) {\n    var t = e.which;\n    return null == t && (1 & e.button ? t = 1 : 2 & e.button ? t = 3 : 4 & e.button && (t = 2)), ro && e.ctrlKey && 1 == t && (t = 3), t;\n  }\n  function ke(e) {\n    if (null == fo) {\n      var t = n(\"span\", \"​\");\n      r(e, n(\"span\", [t, document.createTextNode(\"x\")])), 0 != e.firstChild.offsetHeight && (fo = t.offsetWidth <= 1 && t.offsetHeight > 2 && !(Ki && ji < 8));\n    }\n    var i = fo ? n(\"span\", \"​\") : n(\"span\", \" \", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n    return i.setAttribute(\"cm-text\", \"\"), i;\n  }\n  function Te(e) {\n    if (null != po) return po;\n    var n = r(e, document.createTextNode(\"AخA\")),\n      i = lo(n, 0, 1).getBoundingClientRect(),\n      o = lo(n, 1, 2).getBoundingClientRect();\n    return t(e), !(!i || i.left == i.right) && (po = o.right - i.right < 3);\n  }\n  function Me(e) {\n    if (\"string\" == typeof e && Po.hasOwnProperty(e)) e = Po[e];else if (e && \"string\" == typeof e.name && Po.hasOwnProperty(e.name)) {\n      var t = Po[e.name];\n      \"string\" == typeof t && (t = {\n        name: t\n      }), (e = y(t, e)).name = t.name;\n    } else {\n      if (\"string\" == typeof e && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(e)) return Me(\"application/xml\");\n      if (\"string\" == typeof e && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(e)) return Me(\"application/json\");\n    }\n    return \"string\" == typeof e ? {\n      name: e\n    } : e || {\n      name: \"null\"\n    };\n  }\n  function Ne(e, t) {\n    t = Me(t);\n    var r = Fo[t.name];\n    if (!r) return Ne(e, \"text/plain\");\n    var n = r(e, t);\n    if (Eo.hasOwnProperty(t.name)) {\n      var i = Eo[t.name];\n      for (var o in i) i.hasOwnProperty(o) && (n.hasOwnProperty(o) && (n[\"_\" + o] = n[o]), n[o] = i[o]);\n    }\n    if (n.name = t.name, t.helperType && (n.helperType = t.helperType), t.modeProps) for (var l in t.modeProps) n[l] = t.modeProps[l];\n    return n;\n  }\n  function Oe(e, t) {\n    c(t, Eo.hasOwnProperty(e) ? Eo[e] : Eo[e] = {});\n  }\n  function Ae(e, t) {\n    if (!0 === t) return t;\n    if (e.copyState) return e.copyState(t);\n    var r = {};\n    for (var n in t) {\n      var i = t[n];\n      i instanceof Array && (i = i.concat([])), r[n] = i;\n    }\n    return r;\n  }\n  function We(e, t) {\n    for (var r; e.innerMode && (r = e.innerMode(t)) && r.mode != e;) t = r.state, e = r.mode;\n    return r || {\n      mode: e,\n      state: t\n    };\n  }\n  function De(e, t, r) {\n    return !e.startState || e.startState(t, r);\n  }\n  function He(e, t, r, n) {\n    var i = [e.state.modeGen],\n      o = {};\n    Ge(e, t.text, e.doc.mode, r, function (e, t) {\n      return i.push(e, t);\n    }, o, n);\n    for (var l = r.state, s = function s(n) {\n        r.baseTokens = i;\n        var s = e.state.overlays[n],\n          a = 1,\n          u = 0;\n        r.state = !0, Ge(e, t.text, s.mode, r, function (e, t) {\n          for (var r = a; u < e;) {\n            var n = i[a];\n            n > e && i.splice(a, 1, e, i[a + 1], n), a += 2, u = Math.min(e, n);\n          }\n          if (t) if (s.opaque) i.splice(r, a - r, e, \"overlay \" + t), a = r + 2;else for (; r < a; r += 2) {\n            var o = i[r + 1];\n            i[r + 1] = (o ? o + \" \" : \"\") + \"overlay \" + t;\n          }\n        }, o), r.state = l, r.baseTokens = null, r.baseTokenPos = 1;\n      }, a = 0; a < e.state.overlays.length; ++a) s(a);\n    return {\n      styles: i,\n      classes: o.bgClass || o.textClass ? o : null\n    };\n  }\n  function Fe(e, t, r) {\n    if (!t.styles || t.styles[0] != e.state.modeGen) {\n      var n = Pe(e, O(t)),\n        i = t.text.length > e.options.maxHighlightLength && Ae(e.doc.mode, n.state),\n        o = He(e, t, n);\n      i && (n.state = i), t.stateAfter = n.save(!i), t.styles = o.styles, o.classes ? t.styleClasses = o.classes : t.styleClasses && (t.styleClasses = null), r === e.doc.highlightFrontier && (e.doc.modeFrontier = Math.max(e.doc.modeFrontier, ++e.doc.highlightFrontier));\n    }\n    return t.styles;\n  }\n  function Pe(e, t, r) {\n    var n = e.doc,\n      i = e.display;\n    if (!n.mode.startState) return new Ro(n, !0, t);\n    var o = function (e, t, r) {\n        for (var n, i, o = e.doc, l = r ? -1 : t - (e.doc.mode.innerMode ? 1e3 : 100), s = t; s > l; --s) {\n          if (s <= o.first) return o.first;\n          var a = k(o, s - 1),\n            u = a.stateAfter;\n          if (u && (!r || s + (u instanceof Io ? u.lookAhead : 0) <= o.modeFrontier)) return s;\n          var c = h(a.text, null, e.options.tabSize);\n          (null == i || n > c) && (i = s - 1, n = c);\n        }\n        return i;\n      }(e, t, r),\n      l = o > n.first && k(n, o - 1).stateAfter,\n      s = l ? Ro.fromSaved(n, l, o) : new Ro(n, De(n.mode), o);\n    return n.iter(o, t, function (r) {\n      Ee(e, r.text, s);\n      var n = s.line;\n      r.stateAfter = n == t - 1 || n % 5 == 0 || n >= i.viewFrom && n < i.viewTo ? s.save() : null, s.nextLine();\n    }), r && (n.modeFrontier = s.line), s;\n  }\n  function Ee(e, t, r, n) {\n    var i = e.doc.mode,\n      o = new zo(t, e.options.tabSize, r);\n    for (o.start = o.pos = n || 0, \"\" == t && ze(i, r.state); !o.eol();) Ie(i, o, r.state), o.start = o.pos;\n  }\n  function ze(e, t) {\n    if (e.blankLine) return e.blankLine(t);\n    if (e.innerMode) {\n      var r = We(e, t);\n      return r.mode.blankLine ? r.mode.blankLine(r.state) : void 0;\n    }\n  }\n  function Ie(e, t, r, n) {\n    for (var i = 0; i < 10; i++) {\n      n && (n[0] = We(e, r).mode);\n      var o = e.token(t, r);\n      if (t.pos > t.start) return o;\n    }\n    throw new Error(\"Mode \" + e.name + \" failed to advance stream.\");\n  }\n  function Re(e, t, r, n) {\n    var i,\n      o,\n      l = e.doc,\n      s = l.mode,\n      a = k(l, (t = B(l, t)).line),\n      u = Pe(e, t.line, r),\n      c = new zo(a.text, e.options.tabSize, u);\n    for (n && (o = []); (n || c.pos < t.ch) && !c.eol();) c.start = c.pos, i = Ie(s, c, u.state), n && o.push(new Bo(c, i, Ae(l.mode, u.state)));\n    return n ? o : new Bo(c, i, u.state);\n  }\n  function Be(e, t) {\n    if (e) for (;;) {\n      var r = e.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n      if (!r) break;\n      e = e.slice(0, r.index) + e.slice(r.index + r[0].length);\n      var n = r[1] ? \"bgClass\" : \"textClass\";\n      null == t[n] ? t[n] = r[2] : new RegExp(\"(?:^|s)\" + r[2] + \"(?:$|s)\").test(t[n]) || (t[n] += \" \" + r[2]);\n    }\n    return e;\n  }\n  function Ge(e, t, r, n, i, o, l) {\n    var s = r.flattenSpans;\n    null == s && (s = e.options.flattenSpans);\n    var a,\n      u = 0,\n      c = null,\n      h = new zo(t, e.options.tabSize, n),\n      f = e.options.addModeClass && [null];\n    for (\"\" == t && Be(ze(r, n.state), o); !h.eol();) {\n      if (h.pos > e.options.maxHighlightLength ? (s = !1, l && Ee(e, t, n, h.pos), h.pos = t.length, a = null) : a = Be(Ie(r, h, n.state, f), o), f) {\n        var d = f[0].name;\n        d && (a = \"m-\" + (a ? d + \" \" + a : d));\n      }\n      if (!s || c != a) {\n        for (; u < h.start;) i(u = Math.min(h.start, u + 5e3), c);\n        c = a;\n      }\n      h.start = h.pos;\n    }\n    for (; u < h.pos;) {\n      var p = Math.min(h.pos, u + 5e3);\n      i(p, c), u = p;\n    }\n  }\n  function Ue(e) {\n    e.parent = null, Y(e);\n  }\n  function Ve(e, t) {\n    if (!e || /^\\s*$/.test(e)) return null;\n    var r = t.addModeClass ? Ko : Vo;\n    return r[e] || (r[e] = e.replace(/\\S+/g, \"cm-$&\"));\n  }\n  function Ke(e, t) {\n    var r = i(\"span\", null, null, Xi ? \"padding-right: .1px\" : null),\n      n = {\n        pre: i(\"pre\", [r], \"CodeMirror-line\"),\n        content: r,\n        col: 0,\n        pos: 0,\n        cm: e,\n        trailingSpace: !1,\n        splitSpaces: (Ki || Xi) && e.getOption(\"lineWrapping\")\n      };\n    t.measure = {};\n    for (var o = 0; o <= (t.rest ? t.rest.length : 0); o++) {\n      var l = o ? t.rest[o - 1] : t.line,\n        s = void 0;\n      n.pos = 0, n.addToken = Xe, Te(e.display.measure) && (s = he(l, e.doc.direction)) && (n.addToken = function (e, t) {\n        return function (r, n, i, o, l, s, a) {\n          i = i ? i + \" cm-force-border\" : \"cm-force-border\";\n          for (var u = r.pos, c = u + n.length;;) {\n            for (var h = void 0, f = 0; f < t.length && !((h = t[f]).to > u && h.from <= u); f++);\n            if (h.to >= c) return e(r, n, i, o, l, s, a);\n            e(r, n.slice(0, h.to - u), i, o, null, s, a), o = null, n = n.slice(h.to - u), u = h.to;\n          }\n        };\n      }(n.addToken, s)), n.map = [];\n      !function (e, t, r) {\n        var n = e.markedSpans,\n          i = e.text,\n          o = 0;\n        if (!n) {\n          for (var l = 1; l < r.length; l += 2) t.addToken(t, i.slice(o, o = r[l]), Ve(r[l + 1], t.cm.options));\n          return;\n        }\n        for (var s, a, u, c, h, f, d, p = i.length, g = 0, v = 1, m = \"\", y = 0;;) {\n          if (y == g) {\n            u = c = h = f = a = \"\", d = null, y = 1 / 0;\n            for (var b = [], w = void 0, x = 0; x < n.length; ++x) {\n              var C = n[x],\n                S = C.marker;\n              \"bookmark\" == S.type && C.from == g && S.widgetNode ? b.push(S) : C.from <= g && (null == C.to || C.to > g || S.collapsed && C.to == g && C.from == g) ? (null != C.to && C.to != g && y > C.to && (y = C.to, c = \"\"), S.className && (u += \" \" + S.className), S.css && (a = (a ? a + \";\" : \"\") + S.css), S.startStyle && C.from == g && (h += \" \" + S.startStyle), S.endStyle && C.to == y && (w || (w = [])).push(S.endStyle, C.to), S.title && !f && (f = S.title), S.collapsed && (!d || Z(d.marker, S) < 0) && (d = C)) : C.from > g && y > C.from && (y = C.from);\n            }\n            if (w) for (var L = 0; L < w.length; L += 2) w[L + 1] == y && (c += \" \" + w[L]);\n            if (!d || d.from == g) for (var k = 0; k < b.length; ++k) Ye(t, 0, b[k]);\n            if (d && (d.from || 0) == g) {\n              if (Ye(t, (null == d.to ? p + 1 : d.to) - g, d.marker, null == d.from), null == d.to) return;\n              d.to == g && (d = !1);\n            }\n          }\n          if (g >= p) break;\n          for (var T = Math.min(p, y);;) {\n            if (m) {\n              var M = g + m.length;\n              if (!d) {\n                var N = M > T ? m.slice(0, T - g) : m;\n                t.addToken(t, N, s ? s + u : u, h, g + N.length == y ? c : \"\", f, a);\n              }\n              if (M >= T) {\n                m = m.slice(T - g), g = T;\n                break;\n              }\n              g = M, h = \"\";\n            }\n            m = i.slice(o, o = r[v++]), s = Ve(r[v++], t.cm.options);\n          }\n        }\n      }(l, n, Fe(e, l, t != e.display.externalMeasured && O(l))), l.styleClasses && (l.styleClasses.bgClass && (n.bgClass = a(l.styleClasses.bgClass, n.bgClass || \"\")), l.styleClasses.textClass && (n.textClass = a(l.styleClasses.textClass, n.textClass || \"\"))), 0 == n.map.length && n.map.push(0, 0, n.content.appendChild(ke(e.display.measure))), 0 == o ? (t.measure.map = n.map, t.measure.cache = {}) : ((t.measure.maps || (t.measure.maps = [])).push(n.map), (t.measure.caches || (t.measure.caches = [])).push({}));\n    }\n    if (Xi) {\n      var u = n.content.lastChild;\n      (/\\bcm-tab\\b/.test(u.className) || u.querySelector && u.querySelector(\".cm-tab\")) && (n.content.className = \"cm-tab-wrap-hack\");\n    }\n    return pe(e, \"renderLine\", e, t.line, n.pre), n.pre.className && (n.textClass = a(n.pre.className, n.textClass || \"\")), n;\n  }\n  function je(e) {\n    var t = n(\"span\", \"•\", \"cm-invalidchar\");\n    return t.title = \"\\\\u\" + e.charCodeAt(0).toString(16), t.setAttribute(\"aria-label\", t.title), t;\n  }\n  function Xe(e, t, r, i, o, l, s) {\n    if (t) {\n      var a,\n        u = e.splitSpaces ? function (e, t) {\n          if (e.length > 1 && !/  /.test(e)) return e;\n          for (var r = t, n = \"\", i = 0; i < e.length; i++) {\n            var o = e.charAt(i);\n            \" \" != o || !r || i != e.length - 1 && 32 != e.charCodeAt(i + 1) || (o = \" \"), n += o, r = \" \" == o;\n          }\n          return n;\n        }(t, e.trailingSpace) : t,\n        c = e.cm.state.specialChars,\n        h = !1;\n      if (c.test(t)) {\n        a = document.createDocumentFragment();\n        for (var f = 0;;) {\n          c.lastIndex = f;\n          var d = c.exec(t),\n            g = d ? d.index - f : t.length - f;\n          if (g) {\n            var v = document.createTextNode(u.slice(f, f + g));\n            Ki && ji < 9 ? a.appendChild(n(\"span\", [v])) : a.appendChild(v), e.map.push(e.pos, e.pos + g, v), e.col += g, e.pos += g;\n          }\n          if (!d) break;\n          f += g + 1;\n          var m = void 0;\n          if (\"\\t\" == d[0]) {\n            var y = e.cm.options.tabSize,\n              b = y - e.col % y;\n            (m = a.appendChild(n(\"span\", p(b), \"cm-tab\"))).setAttribute(\"role\", \"presentation\"), m.setAttribute(\"cm-text\", \"\\t\"), e.col += b;\n          } else \"\\r\" == d[0] || \"\\n\" == d[0] ? ((m = a.appendChild(n(\"span\", \"\\r\" == d[0] ? \"␍\" : \"␤\", \"cm-invalidchar\"))).setAttribute(\"cm-text\", d[0]), e.col += 1) : ((m = e.cm.options.specialCharPlaceholder(d[0])).setAttribute(\"cm-text\", d[0]), Ki && ji < 9 ? a.appendChild(n(\"span\", [m])) : a.appendChild(m), e.col += 1);\n          e.map.push(e.pos, e.pos + 1, m), e.pos++;\n        }\n      } else e.col += t.length, a = document.createTextNode(u), e.map.push(e.pos, e.pos + t.length, a), Ki && ji < 9 && (h = !0), e.pos += t.length;\n      if (e.trailingSpace = 32 == u.charCodeAt(t.length - 1), r || i || o || h || s) {\n        var w = r || \"\";\n        i && (w += i), o && (w += o);\n        var x = n(\"span\", [a], w, s);\n        return l && (x.title = l), e.content.appendChild(x);\n      }\n      e.content.appendChild(a);\n    }\n  }\n  function Ye(e, t, r, n) {\n    var i = !n && r.widgetNode;\n    i && e.map.push(e.pos, e.pos + t, i), !n && e.cm.display.input.needsContentAttribute && (i || (i = e.content.appendChild(document.createElement(\"span\"))), i.setAttribute(\"cm-marker\", r.id)), i && (e.cm.display.input.setUneditable(i), e.content.appendChild(i)), e.pos += t, e.trailingSpace = !1;\n  }\n  function _e(e, t, r) {\n    this.line = t, this.rest = function (e) {\n      for (var t, r; t = ee(e);) e = t.find(1, !0).line, (r || (r = [])).push(e);\n      return r;\n    }(t), this.size = this.rest ? O(g(this.rest)) - r + 1 : 1, this.node = this.text = null, this.hidden = oe(e, t);\n  }\n  function qe(e, t, r) {\n    for (var n, i = [], o = t; o < r; o = n) {\n      var l = new _e(e.doc, k(e.doc, o), o);\n      n = o + l.size, i.push(l);\n    }\n    return i;\n  }\n  function $e(e, t) {\n    var r = fe(e, t);\n    if (r.length) {\n      var n,\n        i = Array.prototype.slice.call(arguments, 2);\n      jo ? n = jo.delayedCallbacks : Xo ? n = Xo : (n = Xo = [], setTimeout(Ze, 0));\n      for (var o = function o(e) {\n          n.push(function () {\n            return r[e].apply(null, i);\n          });\n        }, l = 0; l < r.length; ++l) o(l);\n    }\n  }\n  function Ze() {\n    var e = Xo;\n    Xo = null;\n    for (var t = 0; t < e.length; ++t) e[t]();\n  }\n  function Qe(e, t, r, n) {\n    for (var i = 0; i < t.changes.length; i++) {\n      var o = t.changes[i];\n      \"text\" == o ? function (e, t) {\n        var r = t.text.className,\n          n = et(e, t);\n        t.text == t.node && (t.node = n.pre);\n        t.text.parentNode.replaceChild(n.pre, t.text), t.text = n.pre, n.bgClass != t.bgClass || n.textClass != t.textClass ? (t.bgClass = n.bgClass, t.textClass = n.textClass, tt(e, t)) : r && (t.text.className = r);\n      }(e, t) : \"gutter\" == o ? rt(e, t, r, n) : \"class\" == o ? tt(e, t) : \"widget\" == o && function (e, t, r) {\n        t.alignable && (t.alignable = null);\n        for (var n = t.node.firstChild, i = void 0; n; n = i) i = n.nextSibling, \"CodeMirror-linewidget\" == n.className && t.node.removeChild(n);\n        it(e, t, r);\n      }(e, t, n);\n    }\n    t.changes = null;\n  }\n  function Je(e) {\n    return e.node == e.text && (e.node = n(\"div\", null, null, \"position: relative\"), e.text.parentNode && e.text.parentNode.replaceChild(e.node, e.text), e.node.appendChild(e.text), Ki && ji < 8 && (e.node.style.zIndex = 2)), e.node;\n  }\n  function et(e, t) {\n    var r = e.display.externalMeasured;\n    return r && r.line == t.line ? (e.display.externalMeasured = null, t.measure = r.measure, r.built) : Ke(e, t);\n  }\n  function tt(e, t) {\n    !function (e, t) {\n      var r = t.bgClass ? t.bgClass + \" \" + (t.line.bgClass || \"\") : t.line.bgClass;\n      if (r && (r += \" CodeMirror-linebackground\"), t.background) r ? t.background.className = r : (t.background.parentNode.removeChild(t.background), t.background = null);else if (r) {\n        var i = Je(t);\n        t.background = i.insertBefore(n(\"div\", null, r), i.firstChild), e.display.input.setUneditable(t.background);\n      }\n    }(e, t), t.line.wrapClass ? Je(t).className = t.line.wrapClass : t.node != t.text && (t.node.className = \"\");\n    var r = t.textClass ? t.textClass + \" \" + (t.line.textClass || \"\") : t.line.textClass;\n    t.text.className = r || \"\";\n  }\n  function rt(e, t, r, i) {\n    if (t.gutter && (t.node.removeChild(t.gutter), t.gutter = null), t.gutterBackground && (t.node.removeChild(t.gutterBackground), t.gutterBackground = null), t.line.gutterClass) {\n      var o = Je(t);\n      t.gutterBackground = n(\"div\", null, \"CodeMirror-gutter-background \" + t.line.gutterClass, \"left: \" + (e.options.fixedGutter ? i.fixedPos : -i.gutterTotalWidth) + \"px; width: \" + i.gutterTotalWidth + \"px\"), e.display.input.setUneditable(t.gutterBackground), o.insertBefore(t.gutterBackground, t.text);\n    }\n    var l = t.line.gutterMarkers;\n    if (e.options.lineNumbers || l) {\n      var s = Je(t),\n        a = t.gutter = n(\"div\", null, \"CodeMirror-gutter-wrapper\", \"left: \" + (e.options.fixedGutter ? i.fixedPos : -i.gutterTotalWidth) + \"px\");\n      if (e.display.input.setUneditable(a), s.insertBefore(a, t.text), t.line.gutterClass && (a.className += \" \" + t.line.gutterClass), !e.options.lineNumbers || l && l[\"CodeMirror-linenumbers\"] || (t.lineNumber = a.appendChild(n(\"div\", D(e.options, r), \"CodeMirror-linenumber CodeMirror-gutter-elt\", \"left: \" + i.gutterLeft[\"CodeMirror-linenumbers\"] + \"px; width: \" + e.display.lineNumInnerWidth + \"px\"))), l) for (var u = 0; u < e.options.gutters.length; ++u) {\n        var c = e.options.gutters[u],\n          h = l.hasOwnProperty(c) && l[c];\n        h && a.appendChild(n(\"div\", [h], \"CodeMirror-gutter-elt\", \"left: \" + i.gutterLeft[c] + \"px; width: \" + i.gutterWidth[c] + \"px\"));\n      }\n    }\n  }\n  function nt(e, t, r, n) {\n    var i = et(e, t);\n    return t.text = t.node = i.pre, i.bgClass && (t.bgClass = i.bgClass), i.textClass && (t.textClass = i.textClass), tt(e, t), rt(e, t, r, n), it(e, t, n), t.node;\n  }\n  function it(e, t, r) {\n    if (ot(e, t.line, t, r, !0), t.rest) for (var n = 0; n < t.rest.length; n++) ot(e, t.rest[n], t, r, !1);\n  }\n  function ot(e, t, r, i, o) {\n    if (t.widgets) for (var l = Je(r), s = 0, a = t.widgets; s < a.length; ++s) {\n      var u = a[s],\n        c = n(\"div\", [u.node], \"CodeMirror-linewidget\");\n      u.handleMouseEvents || c.setAttribute(\"cm-ignore-events\", \"true\"), function (e, t, r, n) {\n        if (e.noHScroll) {\n          (r.alignable || (r.alignable = [])).push(t);\n          var i = n.wrapperWidth;\n          t.style.left = n.fixedPos + \"px\", e.coverGutter || (i -= n.gutterTotalWidth, t.style.paddingLeft = n.gutterTotalWidth + \"px\"), t.style.width = i + \"px\";\n        }\n        e.coverGutter && (t.style.zIndex = 5, t.style.position = \"relative\", e.noHScroll || (t.style.marginLeft = -n.gutterTotalWidth + \"px\"));\n      }(u, c, r, i), e.display.input.setUneditable(c), o && u.above ? l.insertBefore(c, r.gutter || r.text) : l.appendChild(c), $e(u, \"redraw\");\n    }\n  }\n  function lt(e) {\n    if (null != e.height) return e.height;\n    var t = e.doc.cm;\n    if (!t) return 0;\n    if (!o(document.body, e.node)) {\n      var i = \"position: relative;\";\n      e.coverGutter && (i += \"margin-left: -\" + t.display.gutters.offsetWidth + \"px;\"), e.noHScroll && (i += \"width: \" + t.display.wrapper.clientWidth + \"px;\"), r(t.display.measure, n(\"div\", [e.node], null, i));\n    }\n    return e.height = e.node.parentNode.offsetHeight;\n  }\n  function st(e, t) {\n    for (var r = Se(t); r != e.wrapper; r = r.parentNode) if (!r || 1 == r.nodeType && \"true\" == r.getAttribute(\"cm-ignore-events\") || r.parentNode == e.sizer && r != e.mover) return !0;\n  }\n  function at(e) {\n    return e.lineSpace.offsetTop;\n  }\n  function ut(e) {\n    return e.mover.offsetHeight - e.lineSpace.offsetHeight;\n  }\n  function ct(e) {\n    if (e.cachedPaddingH) return e.cachedPaddingH;\n    var t = r(e.measure, n(\"pre\", \"x\")),\n      i = window.getComputedStyle ? window.getComputedStyle(t) : t.currentStyle,\n      o = {\n        left: parseInt(i.paddingLeft),\n        right: parseInt(i.paddingRight)\n      };\n    return isNaN(o.left) || isNaN(o.right) || (e.cachedPaddingH = o), o;\n  }\n  function ht(e) {\n    return go - e.display.nativeBarWidth;\n  }\n  function ft(e) {\n    return e.display.scroller.clientWidth - ht(e) - e.display.barWidth;\n  }\n  function dt(e) {\n    return e.display.scroller.clientHeight - ht(e) - e.display.barHeight;\n  }\n  function pt(e, t, r) {\n    if (e.line == t) return {\n      map: e.measure.map,\n      cache: e.measure.cache\n    };\n    for (var n = 0; n < e.rest.length; n++) if (e.rest[n] == t) return {\n      map: e.measure.maps[n],\n      cache: e.measure.caches[n]\n    };\n    for (var i = 0; i < e.rest.length; i++) if (O(e.rest[i]) > r) return {\n      map: e.measure.maps[i],\n      cache: e.measure.caches[i],\n      before: !0\n    };\n  }\n  function gt(e, t, r, n) {\n    return yt(e, mt(e, t), r, n);\n  }\n  function vt(e, t) {\n    if (t >= e.display.viewFrom && t < e.display.viewTo) return e.display.view[Kt(e, t)];\n    var r = e.display.externalMeasured;\n    return r && t >= r.lineN && t < r.lineN + r.size ? r : void 0;\n  }\n  function mt(e, t) {\n    var n = O(t),\n      i = vt(e, n);\n    i && !i.text ? i = null : i && i.changes && (Qe(e, i, n, Rt(e)), e.curOp.forceUpdate = !0), i || (i = function (e, t) {\n      var n = O(t = re(t)),\n        i = e.display.externalMeasured = new _e(e.doc, t, n);\n      i.lineN = n;\n      var o = i.built = Ke(e, i);\n      return i.text = o.pre, r(e.display.lineMeasure, o.pre), i;\n    }(e, t));\n    var o = pt(i, t, n);\n    return {\n      line: t,\n      view: i,\n      rect: null,\n      map: o.map,\n      cache: o.cache,\n      before: o.before,\n      hasHeights: !1\n    };\n  }\n  function yt(e, t, i, o, l) {\n    t.before && (i = -1);\n    var s,\n      a = i + (o || \"\");\n    return t.cache.hasOwnProperty(a) ? s = t.cache[a] : (t.rect || (t.rect = t.view.text.getBoundingClientRect()), t.hasHeights || (!function (e, t, r) {\n      var n = e.options.lineWrapping,\n        i = n && ft(e);\n      if (!t.measure.heights || n && t.measure.width != i) {\n        var o = t.measure.heights = [];\n        if (n) {\n          t.measure.width = i;\n          for (var l = t.text.firstChild.getClientRects(), s = 0; s < l.length - 1; s++) {\n            var a = l[s],\n              u = l[s + 1];\n            Math.abs(a.bottom - u.bottom) > 2 && o.push((a.bottom + u.top) / 2 - r.top);\n          }\n        }\n        o.push(r.bottom - r.top);\n      }\n    }(e, t.view, t.rect), t.hasHeights = !0), (s = function (e, t, i, o) {\n      var l,\n        s = bt(t.map, i, o),\n        a = s.node,\n        u = s.start,\n        c = s.end,\n        h = s.collapse;\n      if (3 == a.nodeType) {\n        for (var f = 0; f < 4; f++) {\n          for (; u && C(t.line.text.charAt(s.coverStart + u));) --u;\n          for (; s.coverStart + c < s.coverEnd && C(t.line.text.charAt(s.coverStart + c));) ++c;\n          if ((l = Ki && ji < 9 && 0 == u && c == s.coverEnd - s.coverStart ? a.parentNode.getBoundingClientRect() : wt(lo(a, u, c).getClientRects(), o)).left || l.right || 0 == u) break;\n          c = u, u -= 1, h = \"right\";\n        }\n        Ki && ji < 11 && (l = function (e, t) {\n          if (!window.screen || null == screen.logicalXDPI || screen.logicalXDPI == screen.deviceXDPI || !function (e) {\n            if (null != Ho) return Ho;\n            var t = r(e, n(\"span\", \"x\")),\n              i = t.getBoundingClientRect(),\n              o = lo(t, 0, 1).getBoundingClientRect();\n            return Ho = Math.abs(i.left - o.left) > 1;\n          }(e)) return t;\n          var i = screen.logicalXDPI / screen.deviceXDPI,\n            o = screen.logicalYDPI / screen.deviceYDPI;\n          return {\n            left: t.left * i,\n            right: t.right * i,\n            top: t.top * o,\n            bottom: t.bottom * o\n          };\n        }(e.display.measure, l));\n      } else {\n        u > 0 && (h = o = \"right\");\n        var d;\n        l = e.options.lineWrapping && (d = a.getClientRects()).length > 1 ? d[\"right\" == o ? d.length - 1 : 0] : a.getBoundingClientRect();\n      }\n      if (Ki && ji < 9 && !u && (!l || !l.left && !l.right)) {\n        var p = a.parentNode.getClientRects()[0];\n        l = p ? {\n          left: p.left,\n          right: p.left + It(e.display),\n          top: p.top,\n          bottom: p.bottom\n        } : Yo;\n      }\n      for (var g = l.top - t.rect.top, v = l.bottom - t.rect.top, m = (g + v) / 2, y = t.view.measure.heights, b = 0; b < y.length - 1 && !(m < y[b]); b++);\n      var w = b ? y[b - 1] : 0,\n        x = y[b],\n        S = {\n          left: (\"right\" == h ? l.right : l.left) - t.rect.left,\n          right: (\"left\" == h ? l.left : l.right) - t.rect.left,\n          top: w,\n          bottom: x\n        };\n      l.left || l.right || (S.bogus = !0);\n      e.options.singleCursorHeightPerLine || (S.rtop = g, S.rbottom = v);\n      return S;\n    }(e, t, i, o)).bogus || (t.cache[a] = s)), {\n      left: s.left,\n      right: s.right,\n      top: l ? s.rtop : s.top,\n      bottom: l ? s.rbottom : s.bottom\n    };\n  }\n  function bt(e, t, r) {\n    for (var n, i, o, l, s, a, u = 0; u < e.length; u += 3) if (s = e[u], a = e[u + 1], t < s ? (i = 0, o = 1, l = \"left\") : t < a ? o = (i = t - s) + 1 : (u == e.length - 3 || t == a && e[u + 3] > t) && (i = (o = a - s) - 1, t >= a && (l = \"right\")), null != i) {\n      if (n = e[u + 2], s == a && r == (n.insertLeft ? \"left\" : \"right\") && (l = r), \"left\" == r && 0 == i) for (; u && e[u - 2] == e[u - 3] && e[u - 1].insertLeft;) n = e[2 + (u -= 3)], l = \"left\";\n      if (\"right\" == r && i == a - s) for (; u < e.length - 3 && e[u + 3] == e[u + 4] && !e[u + 5].insertLeft;) n = e[(u += 3) + 2], l = \"right\";\n      break;\n    }\n    return {\n      node: n,\n      start: i,\n      end: o,\n      collapse: l,\n      coverStart: s,\n      coverEnd: a\n    };\n  }\n  function wt(e, t) {\n    var r = Yo;\n    if (\"left\" == t) for (var n = 0; n < e.length && (r = e[n]).left == r.right; n++);else for (var i = e.length - 1; i >= 0 && (r = e[i]).left == r.right; i--);\n    return r;\n  }\n  function xt(e) {\n    if (e.measure && (e.measure.cache = {}, e.measure.heights = null, e.rest)) for (var t = 0; t < e.rest.length; t++) e.measure.caches[t] = {};\n  }\n  function Ct(e) {\n    e.display.externalMeasure = null, t(e.display.lineMeasure);\n    for (var r = 0; r < e.display.view.length; r++) xt(e.display.view[r]);\n  }\n  function St(e) {\n    Ct(e), e.display.cachedCharWidth = e.display.cachedTextHeight = e.display.cachedPaddingH = null, e.options.lineWrapping || (e.display.maxLineChanged = !0), e.display.lineNumChars = null;\n  }\n  function Lt() {\n    return _i && eo ? -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) : window.pageXOffset || (document.documentElement || document.body).scrollLeft;\n  }\n  function kt() {\n    return _i && eo ? -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) : window.pageYOffset || (document.documentElement || document.body).scrollTop;\n  }\n  function Tt(e) {\n    var t = 0;\n    if (e.widgets) for (var r = 0; r < e.widgets.length; ++r) e.widgets[r].above && (t += lt(e.widgets[r]));\n    return t;\n  }\n  function Mt(e, t, r, n, i) {\n    if (!i) {\n      var o = Tt(t);\n      r.top += o, r.bottom += o;\n    }\n    if (\"line\" == n) return r;\n    n || (n = \"local\");\n    var l = se(t);\n    if (\"local\" == n ? l += at(e.display) : l -= e.display.viewOffset, \"page\" == n || \"window\" == n) {\n      var s = e.display.lineSpace.getBoundingClientRect();\n      l += s.top + (\"window\" == n ? 0 : kt());\n      var a = s.left + (\"window\" == n ? 0 : Lt());\n      r.left += a, r.right += a;\n    }\n    return r.top += l, r.bottom += l, r;\n  }\n  function Nt(e, t, r) {\n    if (\"div\" == r) return t;\n    var n = t.left,\n      i = t.top;\n    if (\"page\" == r) n -= Lt(), i -= kt();else if (\"local\" == r || !r) {\n      var o = e.display.sizer.getBoundingClientRect();\n      n += o.left, i += o.top;\n    }\n    var l = e.display.lineSpace.getBoundingClientRect();\n    return {\n      left: n - l.left,\n      top: i - l.top\n    };\n  }\n  function Ot(e, t, r, n, i) {\n    return n || (n = k(e.doc, t.line)), Mt(e, n, gt(e, n, t.ch, i), r);\n  }\n  function At(e, t, r, n, i, o) {\n    function l(t, l) {\n      var s = yt(e, i, t, l ? \"right\" : \"left\", o);\n      return l ? s.left = s.right : s.right = s.left, Mt(e, n, s, r);\n    }\n    function s(e, t, r) {\n      var n = 1 == a[t].level;\n      return l(r ? e - 1 : e, n != r);\n    }\n    n = n || k(e.doc, t.line), i || (i = mt(e, n));\n    var a = he(n, e.doc.direction),\n      u = t.ch,\n      c = t.sticky;\n    if (u >= n.text.length ? (u = n.text.length, c = \"before\") : u <= 0 && (u = 0, c = \"after\"), !a) return l(\"before\" == c ? u - 1 : u, \"before\" == c);\n    var h = ce(a, u, c),\n      f = ko,\n      d = s(u, h, \"before\" == c);\n    return null != f && (d.other = s(u, f, \"before\" != c)), d;\n  }\n  function Wt(e, t) {\n    var r = 0;\n    t = B(e.doc, t), e.options.lineWrapping || (r = It(e.display) * t.ch);\n    var n = k(e.doc, t.line),\n      i = se(n) + at(e.display);\n    return {\n      left: r,\n      right: r,\n      top: i,\n      bottom: i + n.height\n    };\n  }\n  function Dt(e, t, r, n, i) {\n    var o = H(e, t, r);\n    return o.xRel = i, n && (o.outside = !0), o;\n  }\n  function Ht(e, t, r) {\n    var n = e.doc;\n    if ((r += e.display.viewOffset) < 0) return Dt(n.first, 0, null, !0, -1);\n    var i = A(n, r),\n      o = n.first + n.size - 1;\n    if (i > o) return Dt(n.first + n.size - 1, k(n, o).text.length, null, !0, 1);\n    t < 0 && (t = 0);\n    for (var l = k(n, i);;) {\n      var s = function (e, t, r, n, i) {\n          i -= se(t);\n          var o = mt(e, t),\n            l = Tt(t),\n            s = 0,\n            a = t.text.length,\n            u = !0,\n            c = he(t, e.doc.direction);\n          if (c) {\n            var h = (e.options.lineWrapping ? function (e, t, r, n, i, o, l) {\n              var s = Ft(e, t, n, l),\n                a = s.begin,\n                u = s.end;\n              /\\s/.test(t.text.charAt(u - 1)) && u--;\n              for (var c = null, h = null, f = 0; f < i.length; f++) {\n                var d = i[f];\n                if (!(d.from >= u || d.to <= a)) {\n                  var p = 1 != d.level,\n                    g = yt(e, n, p ? Math.min(u, d.to) - 1 : Math.max(a, d.from)).right,\n                    v = g < o ? o - g + 1e9 : g - o;\n                  (!c || h > v) && (c = d, h = v);\n                }\n              }\n              c || (c = i[i.length - 1]);\n              c.from < a && (c = {\n                from: a,\n                to: c.to,\n                level: c.level\n              });\n              c.to > u && (c = {\n                from: c.from,\n                to: u,\n                level: c.level\n              });\n              return c;\n            } : function (e, t, r, n, i, o, l) {\n              var s = L(function (s) {\n                  var a = i[s],\n                    u = 1 != a.level;\n                  return Et(At(e, H(r, u ? a.to : a.from, u ? \"before\" : \"after\"), \"line\", t, n), o, l, !0);\n                }, 0, i.length - 1),\n                a = i[s];\n              if (s > 0) {\n                var u = 1 != a.level,\n                  c = At(e, H(r, u ? a.from : a.to, u ? \"after\" : \"before\"), \"line\", t, n);\n                Et(c, o, l, !0) && c.top > l && (a = i[s - 1]);\n              }\n              return a;\n            })(e, t, r, o, c, n, i);\n            u = 1 != h.level, s = u ? h.from : h.to - 1, a = u ? h.to : h.from - 1;\n          }\n          var f,\n            d,\n            p = null,\n            g = null,\n            v = L(function (t) {\n              var r = yt(e, o, t);\n              return r.top += l, r.bottom += l, !!Et(r, n, i, !1) && (r.top <= i && r.left <= n && (p = t, g = r), !0);\n            }, s, a),\n            m = !1;\n          if (g) {\n            var y = n - g.left < g.right - n,\n              b = y == u;\n            v = p + (b ? 0 : 1), d = b ? \"after\" : \"before\", f = y ? g.left : g.right;\n          } else {\n            u || v != a && v != s || v++, d = 0 == v ? \"after\" : v == t.text.length ? \"before\" : yt(e, o, v - (u ? 1 : 0)).bottom + l <= i == u ? \"after\" : \"before\";\n            var w = At(e, H(r, v, d), \"line\", t, o);\n            f = w.left, m = i < w.top || i >= w.bottom;\n          }\n          return v = S(t.text, v, 1), Dt(r, v, d, m, n - f);\n        }(e, l, i, t, r),\n        a = ee(l),\n        u = a && a.find(0, !0);\n      if (!a || !(s.ch > u.from.ch || s.ch == u.from.ch && s.xRel > 0)) return s;\n      i = O(l = u.to.line);\n    }\n  }\n  function Ft(e, t, r, n) {\n    n -= Tt(t);\n    var i = t.text.length,\n      o = L(function (t) {\n        return yt(e, r, t - 1).bottom <= n;\n      }, i, 0);\n    return i = L(function (t) {\n      return yt(e, r, t).top > n;\n    }, o, i), {\n      begin: o,\n      end: i\n    };\n  }\n  function Pt(e, t, r, n) {\n    r || (r = mt(e, t));\n    return Ft(e, t, r, Mt(e, t, yt(e, r, n), \"line\").top);\n  }\n  function Et(e, t, r, n) {\n    return !(e.bottom <= r) && (e.top > r || (n ? e.left : e.right) > t);\n  }\n  function zt(e) {\n    if (null != e.cachedTextHeight) return e.cachedTextHeight;\n    if (null == Uo) {\n      Uo = n(\"pre\");\n      for (var i = 0; i < 49; ++i) Uo.appendChild(document.createTextNode(\"x\")), Uo.appendChild(n(\"br\"));\n      Uo.appendChild(document.createTextNode(\"x\"));\n    }\n    r(e.measure, Uo);\n    var o = Uo.offsetHeight / 50;\n    return o > 3 && (e.cachedTextHeight = o), t(e.measure), o || 1;\n  }\n  function It(e) {\n    if (null != e.cachedCharWidth) return e.cachedCharWidth;\n    var t = n(\"span\", \"xxxxxxxxxx\"),\n      i = n(\"pre\", [t]);\n    r(e.measure, i);\n    var o = t.getBoundingClientRect(),\n      l = (o.right - o.left) / 10;\n    return l > 2 && (e.cachedCharWidth = l), l || 10;\n  }\n  function Rt(e) {\n    for (var t = e.display, r = {}, n = {}, i = t.gutters.clientLeft, o = t.gutters.firstChild, l = 0; o; o = o.nextSibling, ++l) r[e.options.gutters[l]] = o.offsetLeft + o.clientLeft + i, n[e.options.gutters[l]] = o.clientWidth;\n    return {\n      fixedPos: Bt(t),\n      gutterTotalWidth: t.gutters.offsetWidth,\n      gutterLeft: r,\n      gutterWidth: n,\n      wrapperWidth: t.wrapper.clientWidth\n    };\n  }\n  function Bt(e) {\n    return e.scroller.getBoundingClientRect().left - e.sizer.getBoundingClientRect().left;\n  }\n  function Gt(e) {\n    var t = zt(e.display),\n      r = e.options.lineWrapping,\n      n = r && Math.max(5, e.display.scroller.clientWidth / It(e.display) - 3);\n    return function (i) {\n      if (oe(e.doc, i)) return 0;\n      var o = 0;\n      if (i.widgets) for (var l = 0; l < i.widgets.length; l++) i.widgets[l].height && (o += i.widgets[l].height);\n      return r ? o + (Math.ceil(i.text.length / n) || 1) * t : o + t;\n    };\n  }\n  function Ut(e) {\n    var t = e.doc,\n      r = Gt(e);\n    t.iter(function (e) {\n      var t = r(e);\n      t != e.height && N(e, t);\n    });\n  }\n  function Vt(e, t, r, n) {\n    var i = e.display;\n    if (!r && \"true\" == Se(t).getAttribute(\"cm-not-content\")) return null;\n    var o,\n      l,\n      s = i.lineSpace.getBoundingClientRect();\n    try {\n      o = t.clientX - s.left, l = t.clientY - s.top;\n    } catch (t) {\n      return null;\n    }\n    var a,\n      u = Ht(e, o, l);\n    if (n && 1 == u.xRel && (a = k(e.doc, u.line).text).length == u.ch) {\n      var c = h(a, a.length, e.options.tabSize) - a.length;\n      u = H(u.line, Math.max(0, Math.round((o - ct(e.display).left) / It(e.display)) - c));\n    }\n    return u;\n  }\n  function Kt(e, t) {\n    if (t >= e.display.viewTo) return null;\n    if ((t -= e.display.viewFrom) < 0) return null;\n    for (var r = e.display.view, n = 0; n < r.length; n++) if ((t -= r[n].size) < 0) return n;\n  }\n  function jt(e) {\n    e.display.input.showSelection(e.display.input.prepareSelection());\n  }\n  function Xt(e, t) {\n    void 0 === t && (t = !0);\n    for (var r = e.doc, i = {}, o = i.cursors = document.createDocumentFragment(), l = i.selection = document.createDocumentFragment(), s = 0; s < r.sel.ranges.length; s++) if (t || s != r.sel.primIndex) {\n      var a = r.sel.ranges[s];\n      if (!(a.from().line >= e.display.viewTo || a.to().line < e.display.viewFrom)) {\n        var u = a.empty();\n        (u || e.options.showCursorWhenSelecting) && Yt(e, a.head, o), u || function (e, t, r) {\n          function i(e, t, r, i) {\n            t < 0 && (t = 0), t = Math.round(t), i = Math.round(i), a.appendChild(n(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + e + \"px;\\n                             top: \" + t + \"px; width: \" + (null == r ? h - e : r) + \"px;\\n                             height: \" + (i - t) + \"px\"));\n          }\n          function o(t, r, n) {\n            function o(r, n) {\n              return Ot(e, H(t, r), \"div\", d, n);\n            }\n            function l(t, r, n) {\n              var i = Pt(e, d, null, t),\n                l = \"ltr\" == r == (\"after\" == n) ? \"left\" : \"right\";\n              return o(\"after\" == n ? i.begin : i.end - (/\\s/.test(d.text.charAt(i.end - 1)) ? 2 : 1), l)[l];\n            }\n            var a,\n              u,\n              d = k(s, t),\n              p = d.text.length,\n              g = he(d, s.direction);\n            return function (e, t, r, n) {\n              if (!e) return n(t, r, \"ltr\", 0);\n              for (var i = !1, o = 0; o < e.length; ++o) {\n                var l = e[o];\n                (l.from < r && l.to > t || t == r && l.to == t) && (n(Math.max(l.from, t), Math.min(l.to, r), 1 == l.level ? \"rtl\" : \"ltr\", o), i = !0);\n              }\n              i || n(t, r, \"ltr\");\n            }(g, r || 0, null == n ? p : n, function (e, t, s, d) {\n              var v = \"ltr\" == s,\n                m = o(e, v ? \"left\" : \"right\"),\n                y = o(t - 1, v ? \"right\" : \"left\"),\n                b = null == r && 0 == e,\n                w = null == n && t == p,\n                x = 0 == d,\n                C = !g || d == g.length - 1;\n              if (y.top - m.top <= 3) {\n                var S = (f ? w : b) && C,\n                  L = (f ? b : w) && x ? c : (v ? m : y).left,\n                  k = S ? h : (v ? y : m).right;\n                i(L, m.top, k - L, m.bottom);\n              } else {\n                var T, M, N, O;\n                v ? (T = f && b && x ? c : m.left, M = f ? h : l(e, s, \"before\"), N = f ? c : l(t, s, \"after\"), O = f && w && C ? h : y.right) : (T = f ? l(e, s, \"before\") : c, M = !f && b && x ? h : m.right, N = !f && w && C ? c : y.left, O = f ? l(t, s, \"after\") : h), i(T, m.top, M - T, m.bottom), m.bottom < y.top && i(c, m.bottom, null, y.top), i(N, y.top, O - N, y.bottom);\n              }\n              (!a || _t(m, a) < 0) && (a = m), _t(y, a) < 0 && (a = y), (!u || _t(m, u) < 0) && (u = m), _t(y, u) < 0 && (u = y);\n            }), {\n              start: a,\n              end: u\n            };\n          }\n          var l = e.display,\n            s = e.doc,\n            a = document.createDocumentFragment(),\n            u = ct(e.display),\n            c = u.left,\n            h = Math.max(l.sizerWidth, ft(e) - l.sizer.offsetLeft) - u.right,\n            f = \"ltr\" == s.direction;\n          var d = t.from(),\n            p = t.to();\n          if (d.line == p.line) o(d.line, d.ch, p.ch);else {\n            var g = k(s, d.line),\n              v = k(s, p.line),\n              m = re(g) == re(v),\n              y = o(d.line, d.ch, m ? g.text.length + 1 : null).end,\n              b = o(p.line, m ? 0 : null, p.ch).start;\n            m && (y.top < b.top - 2 ? (i(y.right, y.top, null, y.bottom), i(c, b.top, b.left, b.bottom)) : i(y.right, y.top, b.left - y.right, y.bottom)), y.bottom < b.top && i(c, y.bottom, null, b.top);\n          }\n          r.appendChild(a);\n        }(e, a, l);\n      }\n    }\n    return i;\n  }\n  function Yt(e, t, r) {\n    var i = At(e, t, \"div\", null, null, !e.options.singleCursorHeightPerLine),\n      o = r.appendChild(n(\"div\", \" \", \"CodeMirror-cursor\"));\n    if (o.style.left = i.left + \"px\", o.style.top = i.top + \"px\", o.style.height = Math.max(0, i.bottom - i.top) * e.options.cursorHeight + \"px\", i.other) {\n      var l = r.appendChild(n(\"div\", \" \", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n      l.style.display = \"\", l.style.left = i.other.left + \"px\", l.style.top = i.other.top + \"px\", l.style.height = .85 * (i.other.bottom - i.other.top) + \"px\";\n    }\n  }\n  function _t(e, t) {\n    return e.top - t.top || e.left - t.left;\n  }\n  function qt(e) {\n    if (e.state.focused) {\n      var t = e.display;\n      clearInterval(t.blinker);\n      var r = !0;\n      t.cursorDiv.style.visibility = \"\", e.options.cursorBlinkRate > 0 ? t.blinker = setInterval(function () {\n        return t.cursorDiv.style.visibility = (r = !r) ? \"\" : \"hidden\";\n      }, e.options.cursorBlinkRate) : e.options.cursorBlinkRate < 0 && (t.cursorDiv.style.visibility = \"hidden\");\n    }\n  }\n  function $t(e) {\n    e.state.focused || (e.display.input.focus(), Qt(e));\n  }\n  function Zt(e) {\n    e.state.delayingBlurEvent = !0, setTimeout(function () {\n      e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1, Jt(e));\n    }, 100);\n  }\n  function Qt(e, t) {\n    e.state.delayingBlurEvent && (e.state.delayingBlurEvent = !1), \"nocursor\" != e.options.readOnly && (e.state.focused || (pe(e, \"focus\", e, t), e.state.focused = !0, s(e.display.wrapper, \"CodeMirror-focused\"), e.curOp || e.display.selForContextMenu == e.doc.sel || (e.display.input.reset(), Xi && setTimeout(function () {\n      return e.display.input.reset(!0);\n    }, 20)), e.display.input.receivedFocus()), qt(e));\n  }\n  function Jt(e, t) {\n    e.state.delayingBlurEvent || (e.state.focused && (pe(e, \"blur\", e, t), e.state.focused = !1, uo(e.display.wrapper, \"CodeMirror-focused\")), clearInterval(e.display.blinker), setTimeout(function () {\n      e.state.focused || (e.display.shift = !1);\n    }, 150));\n  }\n  function er(e) {\n    for (var t = e.display, r = t.lineDiv.offsetTop, n = 0; n < t.view.length; n++) {\n      var i = t.view[n],\n        o = void 0;\n      if (!i.hidden) {\n        if (Ki && ji < 8) {\n          var l = i.node.offsetTop + i.node.offsetHeight;\n          o = l - r, r = l;\n        } else {\n          var s = i.node.getBoundingClientRect();\n          o = s.bottom - s.top;\n        }\n        var a = i.line.height - o;\n        if (o < 2 && (o = zt(t)), (a > .005 || a < -.005) && (N(i.line, o), tr(i.line), i.rest)) for (var u = 0; u < i.rest.length; u++) tr(i.rest[u]);\n      }\n    }\n  }\n  function tr(e) {\n    if (e.widgets) for (var t = 0; t < e.widgets.length; ++t) {\n      var r = e.widgets[t],\n        n = r.node.parentNode;\n      n && (r.height = n.offsetHeight);\n    }\n  }\n  function rr(e, t, r) {\n    var n = r && null != r.top ? Math.max(0, r.top) : e.scroller.scrollTop;\n    n = Math.floor(n - at(e));\n    var i = r && null != r.bottom ? r.bottom : n + e.wrapper.clientHeight,\n      o = A(t, n),\n      l = A(t, i);\n    if (r && r.ensure) {\n      var s = r.ensure.from.line,\n        a = r.ensure.to.line;\n      s < o ? (o = s, l = A(t, se(k(t, s)) + e.wrapper.clientHeight)) : Math.min(a, t.lastLine()) >= l && (o = A(t, se(k(t, a)) - e.wrapper.clientHeight), l = a);\n    }\n    return {\n      from: o,\n      to: Math.max(l, o + 1)\n    };\n  }\n  function nr(e) {\n    var t = e.display,\n      r = t.view;\n    if (t.alignWidgets || t.gutters.firstChild && e.options.fixedGutter) {\n      for (var n = Bt(t) - t.scroller.scrollLeft + e.doc.scrollLeft, i = t.gutters.offsetWidth, o = n + \"px\", l = 0; l < r.length; l++) if (!r[l].hidden) {\n        e.options.fixedGutter && (r[l].gutter && (r[l].gutter.style.left = o), r[l].gutterBackground && (r[l].gutterBackground.style.left = o));\n        var s = r[l].alignable;\n        if (s) for (var a = 0; a < s.length; a++) s[a].style.left = o;\n      }\n      e.options.fixedGutter && (t.gutters.style.left = n + i + \"px\");\n    }\n  }\n  function ir(e) {\n    if (!e.options.lineNumbers) return !1;\n    var t = e.doc,\n      r = D(e.options, t.first + t.size - 1),\n      i = e.display;\n    if (r.length != i.lineNumChars) {\n      var o = i.measure.appendChild(n(\"div\", [n(\"div\", r)], \"CodeMirror-linenumber CodeMirror-gutter-elt\")),\n        l = o.firstChild.offsetWidth,\n        s = o.offsetWidth - l;\n      return i.lineGutter.style.width = \"\", i.lineNumInnerWidth = Math.max(l, i.lineGutter.offsetWidth - s) + 1, i.lineNumWidth = i.lineNumInnerWidth + s, i.lineNumChars = i.lineNumInnerWidth ? r.length : -1, i.lineGutter.style.width = i.lineNumWidth + \"px\", Fr(e), !0;\n    }\n    return !1;\n  }\n  function or(e, t) {\n    var r = e.display,\n      n = zt(e.display);\n    t.top < 0 && (t.top = 0);\n    var i = e.curOp && null != e.curOp.scrollTop ? e.curOp.scrollTop : r.scroller.scrollTop,\n      o = dt(e),\n      l = {};\n    t.bottom - t.top > o && (t.bottom = t.top + o);\n    var s = e.doc.height + ut(r),\n      a = t.top < n,\n      u = t.bottom > s - n;\n    if (t.top < i) l.scrollTop = a ? 0 : t.top;else if (t.bottom > i + o) {\n      var c = Math.min(t.top, (u ? s : t.bottom) - o);\n      c != i && (l.scrollTop = c);\n    }\n    var h = e.curOp && null != e.curOp.scrollLeft ? e.curOp.scrollLeft : r.scroller.scrollLeft,\n      f = ft(e) - (e.options.fixedGutter ? r.gutters.offsetWidth : 0),\n      d = t.right - t.left > f;\n    return d && (t.right = t.left + f), t.left < 10 ? l.scrollLeft = 0 : t.left < h ? l.scrollLeft = Math.max(0, t.left - (d ? 0 : 10)) : t.right > f + h - 3 && (l.scrollLeft = t.right + (d ? 0 : 10) - f), l;\n  }\n  function lr(e, t) {\n    null != t && (ur(e), e.curOp.scrollTop = (null == e.curOp.scrollTop ? e.doc.scrollTop : e.curOp.scrollTop) + t);\n  }\n  function sr(e) {\n    ur(e);\n    var t = e.getCursor();\n    e.curOp.scrollToPos = {\n      from: t,\n      to: t,\n      margin: e.options.cursorScrollMargin\n    };\n  }\n  function ar(e, t, r) {\n    null == t && null == r || ur(e), null != t && (e.curOp.scrollLeft = t), null != r && (e.curOp.scrollTop = r);\n  }\n  function ur(e) {\n    var t = e.curOp.scrollToPos;\n    if (t) {\n      e.curOp.scrollToPos = null;\n      cr(e, Wt(e, t.from), Wt(e, t.to), t.margin);\n    }\n  }\n  function cr(e, t, r, n) {\n    var i = or(e, {\n      left: Math.min(t.left, r.left),\n      top: Math.min(t.top, r.top) - n,\n      right: Math.max(t.right, r.right),\n      bottom: Math.max(t.bottom, r.bottom) + n\n    });\n    ar(e, i.scrollLeft, i.scrollTop);\n  }\n  function hr(e, t) {\n    Math.abs(e.doc.scrollTop - t) < 2 || (Bi || Hr(e, {\n      top: t\n    }), fr(e, t, !0), Bi && Hr(e), Or(e, 100));\n  }\n  function fr(e, t, r) {\n    t = Math.min(e.display.scroller.scrollHeight - e.display.scroller.clientHeight, t), (e.display.scroller.scrollTop != t || r) && (e.doc.scrollTop = t, e.display.scrollbars.setScrollTop(t), e.display.scroller.scrollTop != t && (e.display.scroller.scrollTop = t));\n  }\n  function dr(e, t, r, n) {\n    t = Math.min(t, e.display.scroller.scrollWidth - e.display.scroller.clientWidth), (r ? t == e.doc.scrollLeft : Math.abs(e.doc.scrollLeft - t) < 2) && !n || (e.doc.scrollLeft = t, nr(e), e.display.scroller.scrollLeft != t && (e.display.scroller.scrollLeft = t), e.display.scrollbars.setScrollLeft(t));\n  }\n  function pr(e) {\n    var t = e.display,\n      r = t.gutters.offsetWidth,\n      n = Math.round(e.doc.height + ut(e.display));\n    return {\n      clientHeight: t.scroller.clientHeight,\n      viewHeight: t.wrapper.clientHeight,\n      scrollWidth: t.scroller.scrollWidth,\n      clientWidth: t.scroller.clientWidth,\n      viewWidth: t.wrapper.clientWidth,\n      barLeft: e.options.fixedGutter ? r : 0,\n      docHeight: n,\n      scrollHeight: n + ht(e) + t.barHeight,\n      nativeBarWidth: t.nativeBarWidth,\n      gutterWidth: r\n    };\n  }\n  function gr(e, t) {\n    t || (t = pr(e));\n    var r = e.display.barWidth,\n      n = e.display.barHeight;\n    vr(e, t);\n    for (var i = 0; i < 4 && r != e.display.barWidth || n != e.display.barHeight; i++) r != e.display.barWidth && e.options.lineWrapping && er(e), vr(e, pr(e)), r = e.display.barWidth, n = e.display.barHeight;\n  }\n  function vr(e, t) {\n    var r = e.display,\n      n = r.scrollbars.update(t);\n    r.sizer.style.paddingRight = (r.barWidth = n.right) + \"px\", r.sizer.style.paddingBottom = (r.barHeight = n.bottom) + \"px\", r.heightForcer.style.borderBottom = n.bottom + \"px solid transparent\", n.right && n.bottom ? (r.scrollbarFiller.style.display = \"block\", r.scrollbarFiller.style.height = n.bottom + \"px\", r.scrollbarFiller.style.width = n.right + \"px\") : r.scrollbarFiller.style.display = \"\", n.bottom && e.options.coverGutterNextToScrollbar && e.options.fixedGutter ? (r.gutterFiller.style.display = \"block\", r.gutterFiller.style.height = n.bottom + \"px\", r.gutterFiller.style.width = t.gutterWidth + \"px\") : r.gutterFiller.style.display = \"\";\n  }\n  function mr(e) {\n    e.display.scrollbars && (e.display.scrollbars.clear(), e.display.scrollbars.addClass && uo(e.display.wrapper, e.display.scrollbars.addClass)), e.display.scrollbars = new $o[e.options.scrollbarStyle](function (t) {\n      e.display.wrapper.insertBefore(t, e.display.scrollbarFiller), No(t, \"mousedown\", function () {\n        e.state.focused && setTimeout(function () {\n          return e.display.input.focus();\n        }, 0);\n      }), t.setAttribute(\"cm-not-content\", \"true\");\n    }, function (t, r) {\n      \"horizontal\" == r ? dr(e, t) : hr(e, t);\n    }, e), e.display.scrollbars.addClass && s(e.display.wrapper, e.display.scrollbars.addClass);\n  }\n  function yr(e) {\n    e.curOp = {\n      cm: e,\n      viewChanged: !1,\n      startHeight: e.doc.height,\n      forceUpdate: !1,\n      updateInput: null,\n      typing: !1,\n      changeObjs: null,\n      cursorActivityHandlers: null,\n      cursorActivityCalled: 0,\n      selectionChanged: !1,\n      updateMaxLine: !1,\n      scrollLeft: null,\n      scrollTop: null,\n      scrollToPos: null,\n      focus: !1,\n      id: ++Zo\n    }, function (e) {\n      jo ? jo.ops.push(e) : e.ownsGroup = jo = {\n        ops: [e],\n        delayedCallbacks: []\n      };\n    }(e.curOp);\n  }\n  function br(e) {\n    !function (e, t) {\n      var r = e.ownsGroup;\n      if (r) try {\n        !function (e) {\n          var t = e.delayedCallbacks,\n            r = 0;\n          do {\n            for (; r < t.length; r++) t[r].call(null);\n            for (var n = 0; n < e.ops.length; n++) {\n              var i = e.ops[n];\n              if (i.cursorActivityHandlers) for (; i.cursorActivityCalled < i.cursorActivityHandlers.length;) i.cursorActivityHandlers[i.cursorActivityCalled++].call(null, i.cm);\n            }\n          } while (r < t.length);\n        }(r);\n      } finally {\n        jo = null, t(r);\n      }\n    }(e.curOp, function (e) {\n      for (var t = 0; t < e.ops.length; t++) e.ops[t].cm.curOp = null;\n      !function (e) {\n        for (var t = e.ops, r = 0; r < t.length; r++) !function (e) {\n          var t = e.cm,\n            r = t.display;\n          (function (e) {\n            var t = e.display;\n            !t.scrollbarsClipped && t.scroller.offsetWidth && (t.nativeBarWidth = t.scroller.offsetWidth - t.scroller.clientWidth, t.heightForcer.style.height = ht(e) + \"px\", t.sizer.style.marginBottom = -t.nativeBarWidth + \"px\", t.sizer.style.borderRightWidth = ht(e) + \"px\", t.scrollbarsClipped = !0);\n          })(t), e.updateMaxLine && ue(t);\n          e.mustUpdate = e.viewChanged || e.forceUpdate || null != e.scrollTop || e.scrollToPos && (e.scrollToPos.from.line < r.viewFrom || e.scrollToPos.to.line >= r.viewTo) || r.maxLineChanged && t.options.lineWrapping, e.update = e.mustUpdate && new Qo(t, e.mustUpdate && {\n            top: e.scrollTop,\n            ensure: e.scrollToPos\n          }, e.forceUpdate);\n        }(t[r]);\n        for (var i = 0; i < t.length; i++) !function (e) {\n          e.updatedDisplay = e.mustUpdate && Wr(e.cm, e.update);\n        }(t[i]);\n        for (var o = 0; o < t.length; o++) !function (e) {\n          var t = e.cm,\n            r = t.display;\n          e.updatedDisplay && er(t);\n          e.barMeasure = pr(t), r.maxLineChanged && !t.options.lineWrapping && (e.adjustWidthTo = gt(t, r.maxLine, r.maxLine.text.length).left + 3, t.display.sizerWidth = e.adjustWidthTo, e.barMeasure.scrollWidth = Math.max(r.scroller.clientWidth, r.sizer.offsetLeft + e.adjustWidthTo + ht(t) + t.display.barWidth), e.maxScrollLeft = Math.max(0, r.sizer.offsetLeft + e.adjustWidthTo - ft(t)));\n          (e.updatedDisplay || e.selectionChanged) && (e.preparedSelection = r.input.prepareSelection());\n        }(t[o]);\n        for (var s = 0; s < t.length; s++) !function (e) {\n          var t = e.cm;\n          null != e.adjustWidthTo && (t.display.sizer.style.minWidth = e.adjustWidthTo + \"px\", e.maxScrollLeft < t.doc.scrollLeft && dr(t, Math.min(t.display.scroller.scrollLeft, e.maxScrollLeft), !0), t.display.maxLineChanged = !1);\n          var r = e.focus && e.focus == l();\n          e.preparedSelection && t.display.input.showSelection(e.preparedSelection, r);\n          (e.updatedDisplay || e.startHeight != t.doc.height) && gr(t, e.barMeasure);\n          e.updatedDisplay && Pr(t, e.barMeasure);\n          e.selectionChanged && qt(t);\n          t.state.focused && e.updateInput && t.display.input.reset(e.typing);\n          r && $t(e.cm);\n        }(t[s]);\n        for (var a = 0; a < t.length; a++) !function (e) {\n          var t = e.cm,\n            r = t.display,\n            i = t.doc;\n          e.updatedDisplay && Dr(t, e.update);\n          null == r.wheelStartX || null == e.scrollTop && null == e.scrollLeft && !e.scrollToPos || (r.wheelStartX = r.wheelStartY = null);\n          null != e.scrollTop && fr(t, e.scrollTop, e.forceScroll);\n          null != e.scrollLeft && dr(t, e.scrollLeft, !0, !0);\n          if (e.scrollToPos) {\n            var o = function (e, t, r, n) {\n              null == n && (n = 0);\n              var i;\n              e.options.lineWrapping || t != r || (r = \"before\" == (t = t.ch ? H(t.line, \"before\" == t.sticky ? t.ch - 1 : t.ch, \"after\") : t).sticky ? H(t.line, t.ch + 1, \"before\") : t);\n              for (var o = 0; o < 5; o++) {\n                var l = !1,\n                  s = At(e, t),\n                  a = r && r != t ? At(e, r) : s,\n                  u = or(e, i = {\n                    left: Math.min(s.left, a.left),\n                    top: Math.min(s.top, a.top) - n,\n                    right: Math.max(s.left, a.left),\n                    bottom: Math.max(s.bottom, a.bottom) + n\n                  }),\n                  c = e.doc.scrollTop,\n                  h = e.doc.scrollLeft;\n                if (null != u.scrollTop && (hr(e, u.scrollTop), Math.abs(e.doc.scrollTop - c) > 1 && (l = !0)), null != u.scrollLeft && (dr(e, u.scrollLeft), Math.abs(e.doc.scrollLeft - h) > 1 && (l = !0)), !l) break;\n              }\n              return i;\n            }(t, B(i, e.scrollToPos.from), B(i, e.scrollToPos.to), e.scrollToPos.margin);\n            !function (e, t) {\n              if (!ge(e, \"scrollCursorIntoView\")) {\n                var r = e.display,\n                  i = r.sizer.getBoundingClientRect(),\n                  o = null;\n                if (t.top + i.top < 0 ? o = !0 : t.bottom + i.top > (window.innerHeight || document.documentElement.clientHeight) && (o = !1), null != o && !Qi) {\n                  var l = n(\"div\", \"​\", null, \"position: absolute;\\n                         top: \" + (t.top - r.viewOffset - at(e.display)) + \"px;\\n                         height: \" + (t.bottom - t.top + ht(e) + r.barHeight) + \"px;\\n                         left: \" + t.left + \"px; width: \" + Math.max(2, t.right - t.left) + \"px;\");\n                  e.display.lineSpace.appendChild(l), l.scrollIntoView(o), e.display.lineSpace.removeChild(l);\n                }\n              }\n            }(t, o);\n          }\n          var l = e.maybeHiddenMarkers,\n            s = e.maybeUnhiddenMarkers;\n          if (l) for (var a = 0; a < l.length; ++a) l[a].lines.length || pe(l[a], \"hide\");\n          if (s) for (var u = 0; u < s.length; ++u) s[u].lines.length && pe(s[u], \"unhide\");\n          r.wrapper.offsetHeight && (i.scrollTop = t.display.scroller.scrollTop);\n          e.changeObjs && pe(t, \"changes\", t, e.changeObjs);\n          e.update && e.update.finish();\n        }(t[a]);\n      }(e);\n    });\n  }\n  function wr(e, t) {\n    if (e.curOp) return t();\n    yr(e);\n    try {\n      return t();\n    } finally {\n      br(e);\n    }\n  }\n  function xr(e, t) {\n    return function () {\n      if (e.curOp) return t.apply(e, arguments);\n      yr(e);\n      try {\n        return t.apply(e, arguments);\n      } finally {\n        br(e);\n      }\n    };\n  }\n  function Cr(e) {\n    return function () {\n      if (this.curOp) return e.apply(this, arguments);\n      yr(this);\n      try {\n        return e.apply(this, arguments);\n      } finally {\n        br(this);\n      }\n    };\n  }\n  function Sr(e) {\n    return function () {\n      var t = this.cm;\n      if (!t || t.curOp) return e.apply(this, arguments);\n      yr(t);\n      try {\n        return e.apply(this, arguments);\n      } finally {\n        br(t);\n      }\n    };\n  }\n  function Lr(e, t, r, n) {\n    null == t && (t = e.doc.first), null == r && (r = e.doc.first + e.doc.size), n || (n = 0);\n    var i = e.display;\n    if (n && r < i.viewTo && (null == i.updateLineNumbers || i.updateLineNumbers > t) && (i.updateLineNumbers = t), e.curOp.viewChanged = !0, t >= i.viewTo) Lo && ne(e.doc, t) < i.viewTo && Tr(e);else if (r <= i.viewFrom) Lo && ie(e.doc, r + n) > i.viewFrom ? Tr(e) : (i.viewFrom += n, i.viewTo += n);else if (t <= i.viewFrom && r >= i.viewTo) Tr(e);else if (t <= i.viewFrom) {\n      var o = Mr(e, r, r + n, 1);\n      o ? (i.view = i.view.slice(o.index), i.viewFrom = o.lineN, i.viewTo += n) : Tr(e);\n    } else if (r >= i.viewTo) {\n      var l = Mr(e, t, t, -1);\n      l ? (i.view = i.view.slice(0, l.index), i.viewTo = l.lineN) : Tr(e);\n    } else {\n      var s = Mr(e, t, t, -1),\n        a = Mr(e, r, r + n, 1);\n      s && a ? (i.view = i.view.slice(0, s.index).concat(qe(e, s.lineN, a.lineN)).concat(i.view.slice(a.index)), i.viewTo += n) : Tr(e);\n    }\n    var u = i.externalMeasured;\n    u && (r < u.lineN ? u.lineN += n : t < u.lineN + u.size && (i.externalMeasured = null));\n  }\n  function kr(e, t, r) {\n    e.curOp.viewChanged = !0;\n    var n = e.display,\n      i = e.display.externalMeasured;\n    if (i && t >= i.lineN && t < i.lineN + i.size && (n.externalMeasured = null), !(t < n.viewFrom || t >= n.viewTo)) {\n      var o = n.view[Kt(e, t)];\n      if (null != o.node) {\n        var l = o.changes || (o.changes = []);\n        -1 == f(l, r) && l.push(r);\n      }\n    }\n  }\n  function Tr(e) {\n    e.display.viewFrom = e.display.viewTo = e.doc.first, e.display.view = [], e.display.viewOffset = 0;\n  }\n  function Mr(e, t, r, n) {\n    var i,\n      o = Kt(e, t),\n      l = e.display.view;\n    if (!Lo || r == e.doc.first + e.doc.size) return {\n      index: o,\n      lineN: r\n    };\n    for (var s = e.display.viewFrom, a = 0; a < o; a++) s += l[a].size;\n    if (s != t) {\n      if (n > 0) {\n        if (o == l.length - 1) return null;\n        i = s + l[o].size - t, o++;\n      } else i = s - t;\n      t += i, r += i;\n    }\n    for (; ne(e.doc, r) != r;) {\n      if (o == (n < 0 ? 0 : l.length - 1)) return null;\n      r += n * l[o - (n < 0 ? 1 : 0)].size, o += n;\n    }\n    return {\n      index: o,\n      lineN: r\n    };\n  }\n  function Nr(e) {\n    for (var t = e.display.view, r = 0, n = 0; n < t.length; n++) {\n      var i = t[n];\n      i.hidden || i.node && !i.changes || ++r;\n    }\n    return r;\n  }\n  function Or(e, t) {\n    e.doc.highlightFrontier < e.display.viewTo && e.state.highlight.set(t, u(Ar, e));\n  }\n  function Ar(e) {\n    var t = e.doc;\n    if (!(t.highlightFrontier >= e.display.viewTo)) {\n      var r = +new Date() + e.options.workTime,\n        n = Pe(e, t.highlightFrontier),\n        i = [];\n      t.iter(n.line, Math.min(t.first + t.size, e.display.viewTo + 500), function (o) {\n        if (n.line >= e.display.viewFrom) {\n          var l = o.styles,\n            s = o.text.length > e.options.maxHighlightLength ? Ae(t.mode, n.state) : null,\n            a = He(e, o, n, !0);\n          s && (n.state = s), o.styles = a.styles;\n          var u = o.styleClasses,\n            c = a.classes;\n          c ? o.styleClasses = c : u && (o.styleClasses = null);\n          for (var h = !l || l.length != o.styles.length || u != c && (!u || !c || u.bgClass != c.bgClass || u.textClass != c.textClass), f = 0; !h && f < l.length; ++f) h = l[f] != o.styles[f];\n          h && i.push(n.line), o.stateAfter = n.save(), n.nextLine();\n        } else o.text.length <= e.options.maxHighlightLength && Ee(e, o.text, n), o.stateAfter = n.line % 5 == 0 ? n.save() : null, n.nextLine();\n        if (+new Date() > r) return Or(e, e.options.workDelay), !0;\n      }), t.highlightFrontier = n.line, t.modeFrontier = Math.max(t.modeFrontier, n.line), i.length && wr(e, function () {\n        for (var t = 0; t < i.length; t++) kr(e, i[t], \"text\");\n      });\n    }\n  }\n  function Wr(e, r) {\n    var n = e.display,\n      i = e.doc;\n    if (r.editorIsHidden) return Tr(e), !1;\n    if (!r.force && r.visible.from >= n.viewFrom && r.visible.to <= n.viewTo && (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo) && n.renderedView == n.view && 0 == Nr(e)) return !1;\n    ir(e) && (Tr(e), r.dims = Rt(e));\n    var s = i.first + i.size,\n      a = Math.max(r.visible.from - e.options.viewportMargin, i.first),\n      u = Math.min(s, r.visible.to + e.options.viewportMargin);\n    n.viewFrom < a && a - n.viewFrom < 20 && (a = Math.max(i.first, n.viewFrom)), n.viewTo > u && n.viewTo - u < 20 && (u = Math.min(s, n.viewTo)), Lo && (a = ne(e.doc, a), u = ie(e.doc, u));\n    var c = a != n.viewFrom || u != n.viewTo || n.lastWrapHeight != r.wrapperHeight || n.lastWrapWidth != r.wrapperWidth;\n    !function (e, t, r) {\n      var n = e.display;\n      0 == n.view.length || t >= n.viewTo || r <= n.viewFrom ? (n.view = qe(e, t, r), n.viewFrom = t) : (n.viewFrom > t ? n.view = qe(e, t, n.viewFrom).concat(n.view) : n.viewFrom < t && (n.view = n.view.slice(Kt(e, t))), n.viewFrom = t, n.viewTo < r ? n.view = n.view.concat(qe(e, n.viewTo, r)) : n.viewTo > r && (n.view = n.view.slice(0, Kt(e, r)))), n.viewTo = r;\n    }(e, a, u), n.viewOffset = se(k(e.doc, n.viewFrom)), e.display.mover.style.top = n.viewOffset + \"px\";\n    var h = Nr(e);\n    if (!c && 0 == h && !r.force && n.renderedView == n.view && (null == n.updateLineNumbers || n.updateLineNumbers >= n.viewTo)) return !1;\n    var d = function (e) {\n      if (e.hasFocus()) return null;\n      var t = l();\n      if (!t || !o(e.display.lineDiv, t)) return null;\n      var r = {\n        activeElt: t\n      };\n      if (window.getSelection) {\n        var n = window.getSelection();\n        n.anchorNode && n.extend && o(e.display.lineDiv, n.anchorNode) && (r.anchorNode = n.anchorNode, r.anchorOffset = n.anchorOffset, r.focusNode = n.focusNode, r.focusOffset = n.focusOffset);\n      }\n      return r;\n    }(e);\n    return h > 4 && (n.lineDiv.style.display = \"none\"), function (e, r, n) {\n      function i(t) {\n        var r = t.nextSibling;\n        return Xi && ro && e.display.currentWheelTarget == t ? t.style.display = \"none\" : t.parentNode.removeChild(t), r;\n      }\n      var o = e.display,\n        l = e.options.lineNumbers,\n        s = o.lineDiv,\n        a = s.firstChild;\n      for (var u = o.view, c = o.viewFrom, h = 0; h < u.length; h++) {\n        var d = u[h];\n        if (d.hidden) ;else if (d.node && d.node.parentNode == s) {\n          for (; a != d.node;) a = i(a);\n          var p = l && null != r && r <= c && d.lineNumber;\n          d.changes && (f(d.changes, \"gutter\") > -1 && (p = !1), Qe(e, d, c, n)), p && (t(d.lineNumber), d.lineNumber.appendChild(document.createTextNode(D(e.options, c)))), a = d.node.nextSibling;\n        } else {\n          var g = nt(e, d, c, n);\n          s.insertBefore(g, a);\n        }\n        c += d.size;\n      }\n      for (; a;) a = i(a);\n    }(e, n.updateLineNumbers, r.dims), h > 4 && (n.lineDiv.style.display = \"\"), n.renderedView = n.view, function (e) {\n      if (e && e.activeElt && e.activeElt != l() && (e.activeElt.focus(), e.anchorNode && o(document.body, e.anchorNode) && o(document.body, e.focusNode))) {\n        var t = window.getSelection(),\n          r = document.createRange();\n        r.setEnd(e.anchorNode, e.anchorOffset), r.collapse(!1), t.removeAllRanges(), t.addRange(r), t.extend(e.focusNode, e.focusOffset);\n      }\n    }(d), t(n.cursorDiv), t(n.selectionDiv), n.gutters.style.height = n.sizer.style.minHeight = 0, c && (n.lastWrapHeight = r.wrapperHeight, n.lastWrapWidth = r.wrapperWidth, Or(e, 400)), n.updateLineNumbers = null, !0;\n  }\n  function Dr(e, t) {\n    for (var r = t.viewport, n = !0; (n && e.options.lineWrapping && t.oldDisplayWidth != ft(e) || (r && null != r.top && (r = {\n      top: Math.min(e.doc.height + ut(e.display) - dt(e), r.top)\n    }), t.visible = rr(e.display, e.doc, r), !(t.visible.from >= e.display.viewFrom && t.visible.to <= e.display.viewTo))) && Wr(e, t); n = !1) {\n      er(e);\n      var i = pr(e);\n      jt(e), gr(e, i), Pr(e, i), t.force = !1;\n    }\n    t.signal(e, \"update\", e), e.display.viewFrom == e.display.reportedViewFrom && e.display.viewTo == e.display.reportedViewTo || (t.signal(e, \"viewportChange\", e, e.display.viewFrom, e.display.viewTo), e.display.reportedViewFrom = e.display.viewFrom, e.display.reportedViewTo = e.display.viewTo);\n  }\n  function Hr(e, t) {\n    var r = new Qo(e, t);\n    if (Wr(e, r)) {\n      er(e), Dr(e, r);\n      var n = pr(e);\n      jt(e), gr(e, n), Pr(e, n), r.finish();\n    }\n  }\n  function Fr(e) {\n    var t = e.display.gutters.offsetWidth;\n    e.display.sizer.style.marginLeft = t + \"px\";\n  }\n  function Pr(e, t) {\n    e.display.sizer.style.minHeight = t.docHeight + \"px\", e.display.heightForcer.style.top = t.docHeight + \"px\", e.display.gutters.style.height = t.docHeight + e.display.barHeight + ht(e) + \"px\";\n  }\n  function Er(e) {\n    var r = e.display.gutters,\n      i = e.options.gutters;\n    t(r);\n    for (var o = 0; o < i.length; ++o) {\n      var l = i[o],\n        s = r.appendChild(n(\"div\", null, \"CodeMirror-gutter \" + l));\n      \"CodeMirror-linenumbers\" == l && (e.display.lineGutter = s, s.style.width = (e.display.lineNumWidth || 1) + \"px\");\n    }\n    r.style.display = o ? \"\" : \"none\", Fr(e);\n  }\n  function zr(e) {\n    var t = f(e.gutters, \"CodeMirror-linenumbers\");\n    -1 == t && e.lineNumbers ? e.gutters = e.gutters.concat([\"CodeMirror-linenumbers\"]) : t > -1 && !e.lineNumbers && (e.gutters = e.gutters.slice(0), e.gutters.splice(t, 1));\n  }\n  function Ir(e) {\n    var t = e.wheelDeltaX,\n      r = e.wheelDeltaY;\n    return null == t && e.detail && e.axis == e.HORIZONTAL_AXIS && (t = e.detail), null == r && e.detail && e.axis == e.VERTICAL_AXIS ? r = e.detail : null == r && (r = e.wheelDelta), {\n      x: t,\n      y: r\n    };\n  }\n  function Rr(e) {\n    var t = Ir(e);\n    return t.x *= el, t.y *= el, t;\n  }\n  function Br(e, t) {\n    var r = Ir(t),\n      n = r.x,\n      i = r.y,\n      o = e.display,\n      l = o.scroller,\n      s = l.scrollWidth > l.clientWidth,\n      a = l.scrollHeight > l.clientHeight;\n    if (n && s || i && a) {\n      if (i && ro && Xi) e: for (var u = t.target, c = o.view; u != l; u = u.parentNode) for (var h = 0; h < c.length; h++) if (c[h].node == u) {\n        e.display.currentWheelTarget = u;\n        break e;\n      }\n      if (n && !Bi && !qi && null != el) return i && a && hr(e, Math.max(0, l.scrollTop + i * el)), dr(e, Math.max(0, l.scrollLeft + n * el)), (!i || i && a) && be(t), void (o.wheelStartX = null);\n      if (i && null != el) {\n        var f = i * el,\n          d = e.doc.scrollTop,\n          p = d + o.wrapper.clientHeight;\n        f < 0 ? d = Math.max(0, d + f - 50) : p = Math.min(e.doc.height, p + f + 50), Hr(e, {\n          top: d,\n          bottom: p\n        });\n      }\n      Jo < 20 && (null == o.wheelStartX ? (o.wheelStartX = l.scrollLeft, o.wheelStartY = l.scrollTop, o.wheelDX = n, o.wheelDY = i, setTimeout(function () {\n        if (null != o.wheelStartX) {\n          var e = l.scrollLeft - o.wheelStartX,\n            t = l.scrollTop - o.wheelStartY,\n            r = t && o.wheelDY && t / o.wheelDY || e && o.wheelDX && e / o.wheelDX;\n          o.wheelStartX = o.wheelStartY = null, r && (el = (el * Jo + r) / (Jo + 1), ++Jo);\n        }\n      }, 200)) : (o.wheelDX += n, o.wheelDY += i));\n    }\n  }\n  function Gr(e, t) {\n    var r = e[t];\n    e.sort(function (e, t) {\n      return F(e.from(), t.from());\n    }), t = f(e, r);\n    for (var n = 1; n < e.length; n++) {\n      var i = e[n],\n        o = e[n - 1];\n      if (F(o.to(), i.from()) >= 0) {\n        var l = I(o.from(), i.from()),\n          s = z(o.to(), i.to()),\n          a = o.empty() ? i.from() == i.head : o.from() == o.head;\n        n <= t && --t, e.splice(--n, 2, new rl(a ? s : l, a ? l : s));\n      }\n    }\n    return new tl(e, t);\n  }\n  function Ur(e, t) {\n    return new tl([new rl(e, t || e)], 0);\n  }\n  function Vr(e) {\n    return e.text ? H(e.from.line + e.text.length - 1, g(e.text).length + (1 == e.text.length ? e.from.ch : 0)) : e.to;\n  }\n  function Kr(e, t) {\n    if (F(e, t.from) < 0) return e;\n    if (F(e, t.to) <= 0) return Vr(t);\n    var r = e.line + t.text.length - (t.to.line - t.from.line) - 1,\n      n = e.ch;\n    return e.line == t.to.line && (n += Vr(t).ch - t.to.ch), H(r, n);\n  }\n  function jr(e, t) {\n    for (var r = [], n = 0; n < e.sel.ranges.length; n++) {\n      var i = e.sel.ranges[n];\n      r.push(new rl(Kr(i.anchor, t), Kr(i.head, t)));\n    }\n    return Gr(r, e.sel.primIndex);\n  }\n  function Xr(e, t, r) {\n    return e.line == t.line ? H(r.line, e.ch - t.ch + r.ch) : H(r.line + (e.line - t.line), e.ch);\n  }\n  function Yr(e) {\n    e.doc.mode = Ne(e.options, e.doc.modeOption), _r(e);\n  }\n  function _r(e) {\n    e.doc.iter(function (e) {\n      e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null);\n    }), e.doc.modeFrontier = e.doc.highlightFrontier = e.doc.first, Or(e, 100), e.state.modeGen++, e.curOp && Lr(e);\n  }\n  function qr(e, t) {\n    return 0 == t.from.ch && 0 == t.to.ch && \"\" == g(t.text) && (!e.cm || e.cm.options.wholeLineUpdateBefore);\n  }\n  function $r(e, t, r, n) {\n    function i(e) {\n      return r ? r[e] : null;\n    }\n    function o(e, r, i) {\n      !function (e, t, r, n) {\n        e.text = t, e.stateAfter && (e.stateAfter = null), e.styles && (e.styles = null), null != e.order && (e.order = null), Y(e), _(e, r);\n        var i = n ? n(e) : 1;\n        i != e.height && N(e, i);\n      }(e, r, i, n), $e(e, \"change\", e, t);\n    }\n    function l(e, t) {\n      for (var r = [], o = e; o < t; ++o) r.push(new Go(u[o], i(o), n));\n      return r;\n    }\n    var s = t.from,\n      a = t.to,\n      u = t.text,\n      c = k(e, s.line),\n      h = k(e, a.line),\n      f = g(u),\n      d = i(u.length - 1),\n      p = a.line - s.line;\n    if (t.full) e.insert(0, l(0, u.length)), e.remove(u.length, e.size - u.length);else if (qr(e, t)) {\n      var v = l(0, u.length - 1);\n      o(h, h.text, d), p && e.remove(s.line, p), v.length && e.insert(s.line, v);\n    } else if (c == h) {\n      if (1 == u.length) o(c, c.text.slice(0, s.ch) + f + c.text.slice(a.ch), d);else {\n        var m = l(1, u.length - 1);\n        m.push(new Go(f + c.text.slice(a.ch), d, n)), o(c, c.text.slice(0, s.ch) + u[0], i(0)), e.insert(s.line + 1, m);\n      }\n    } else if (1 == u.length) o(c, c.text.slice(0, s.ch) + u[0] + h.text.slice(a.ch), i(0)), e.remove(s.line + 1, p);else {\n      o(c, c.text.slice(0, s.ch) + u[0], i(0)), o(h, f + h.text.slice(a.ch), d);\n      var y = l(1, u.length - 1);\n      p > 1 && e.remove(s.line + 1, p - 1), e.insert(s.line + 1, y);\n    }\n    $e(e, \"change\", e, t);\n  }\n  function Zr(e, t, r) {\n    function n(e, i, o) {\n      if (e.linked) for (var l = 0; l < e.linked.length; ++l) {\n        var s = e.linked[l];\n        if (s.doc != i) {\n          var a = o && s.sharedHist;\n          r && !a || (t(s.doc, a), n(s.doc, e, a));\n        }\n      }\n    }\n    n(e, null, !0);\n  }\n  function Qr(e, t) {\n    if (t.cm) throw new Error(\"This document is already in use.\");\n    e.doc = t, t.cm = e, Ut(e), Yr(e), Jr(e), e.options.lineWrapping || ue(e), e.options.mode = t.modeOption, Lr(e);\n  }\n  function Jr(e) {\n    (\"rtl\" == e.doc.direction ? s : uo)(e.display.lineDiv, \"CodeMirror-rtl\");\n  }\n  function en(e) {\n    this.done = [], this.undone = [], this.undoDepth = 1 / 0, this.lastModTime = this.lastSelTime = 0, this.lastOp = this.lastSelOp = null, this.lastOrigin = this.lastSelOrigin = null, this.generation = this.maxGeneration = e || 1;\n  }\n  function tn(e, t) {\n    var r = {\n      from: E(t.from),\n      to: Vr(t),\n      text: T(e, t.from, t.to)\n    };\n    return sn(e, r, t.from.line, t.to.line + 1), Zr(e, function (e) {\n      return sn(e, r, t.from.line, t.to.line + 1);\n    }, !0), r;\n  }\n  function rn(e) {\n    for (; e.length;) {\n      if (!g(e).ranges) break;\n      e.pop();\n    }\n  }\n  function nn(e, t, r, n) {\n    var i = e.history;\n    i.undone.length = 0;\n    var o,\n      l,\n      s = +new Date();\n    if ((i.lastOp == n || i.lastOrigin == t.origin && t.origin && (\"+\" == t.origin.charAt(0) && e.cm && i.lastModTime > s - e.cm.options.historyEventDelay || \"*\" == t.origin.charAt(0))) && (o = function (e, t) {\n      return t ? (rn(e.done), g(e.done)) : e.done.length && !g(e.done).ranges ? g(e.done) : e.done.length > 1 && !e.done[e.done.length - 2].ranges ? (e.done.pop(), g(e.done)) : void 0;\n    }(i, i.lastOp == n))) l = g(o.changes), 0 == F(t.from, t.to) && 0 == F(t.from, l.to) ? l.to = Vr(t) : o.changes.push(tn(e, t));else {\n      var a = g(i.done);\n      for (a && a.ranges || ln(e.sel, i.done), o = {\n        changes: [tn(e, t)],\n        generation: i.generation\n      }, i.done.push(o); i.done.length > i.undoDepth;) i.done.shift(), i.done[0].ranges || i.done.shift();\n    }\n    i.done.push(r), i.generation = ++i.maxGeneration, i.lastModTime = i.lastSelTime = s, i.lastOp = i.lastSelOp = n, i.lastOrigin = i.lastSelOrigin = t.origin, l || pe(e, \"historyAdded\");\n  }\n  function on(e, t, r, n) {\n    var i = e.history,\n      o = n && n.origin;\n    r == i.lastSelOp || o && i.lastSelOrigin == o && (i.lastModTime == i.lastSelTime && i.lastOrigin == o || function (e, t, r, n) {\n      var i = t.charAt(0);\n      return \"*\" == i || \"+\" == i && r.ranges.length == n.ranges.length && r.somethingSelected() == n.somethingSelected() && new Date() - e.history.lastSelTime <= (e.cm ? e.cm.options.historyEventDelay : 500);\n    }(e, o, g(i.done), t)) ? i.done[i.done.length - 1] = t : ln(t, i.done), i.lastSelTime = +new Date(), i.lastSelOrigin = o, i.lastSelOp = r, n && !1 !== n.clearRedo && rn(i.undone);\n  }\n  function ln(e, t) {\n    var r = g(t);\n    r && r.ranges && r.equals(e) || t.push(e);\n  }\n  function sn(e, t, r, n) {\n    var i = t[\"spans_\" + e.id],\n      o = 0;\n    e.iter(Math.max(e.first, r), Math.min(e.first + e.size, n), function (r) {\n      r.markedSpans && ((i || (i = t[\"spans_\" + e.id] = {}))[o] = r.markedSpans), ++o;\n    });\n  }\n  function an(e) {\n    if (!e) return null;\n    for (var t, r = 0; r < e.length; ++r) e[r].marker.explicitlyCleared ? t || (t = e.slice(0, r)) : t && t.push(e[r]);\n    return t ? t.length ? t : null : e;\n  }\n  function un(e, t) {\n    var r = function (e, t) {\n        var r = t[\"spans_\" + e.id];\n        if (!r) return null;\n        for (var n = [], i = 0; i < t.text.length; ++i) n.push(an(r[i]));\n        return n;\n      }(e, t),\n      n = j(e, t);\n    if (!r) return n;\n    if (!n) return r;\n    for (var i = 0; i < r.length; ++i) {\n      var o = r[i],\n        l = n[i];\n      if (o && l) e: for (var s = 0; s < l.length; ++s) {\n        for (var a = l[s], u = 0; u < o.length; ++u) if (o[u].marker == a.marker) continue e;\n        o.push(a);\n      } else l && (r[i] = l);\n    }\n    return r;\n  }\n  function cn(e, t, r) {\n    for (var n = [], i = 0; i < e.length; ++i) {\n      var o = e[i];\n      if (o.ranges) n.push(r ? tl.prototype.deepCopy.call(o) : o);else {\n        var l = o.changes,\n          s = [];\n        n.push({\n          changes: s\n        });\n        for (var a = 0; a < l.length; ++a) {\n          var u = l[a],\n            c = void 0;\n          if (s.push({\n            from: u.from,\n            to: u.to,\n            text: u.text\n          }), t) for (var h in u) (c = h.match(/^spans_(\\d+)$/)) && f(t, Number(c[1])) > -1 && (g(s)[h] = u[h], delete u[h]);\n        }\n      }\n    }\n    return n;\n  }\n  function hn(e, t, r, n) {\n    if (n) {\n      var i = e.anchor;\n      if (r) {\n        var o = F(t, i) < 0;\n        o != F(r, i) < 0 ? (i = t, t = r) : o != F(t, r) < 0 && (t = r);\n      }\n      return new rl(i, t);\n    }\n    return new rl(r || t, t);\n  }\n  function fn(e, t, r, n, i) {\n    null == i && (i = e.cm && (e.cm.display.shift || e.extend)), mn(e, new tl([hn(e.sel.primary(), t, r, i)], 0), n);\n  }\n  function dn(e, t, r) {\n    for (var n = [], i = e.cm && (e.cm.display.shift || e.extend), o = 0; o < e.sel.ranges.length; o++) n[o] = hn(e.sel.ranges[o], t[o], null, i);\n    mn(e, Gr(n, e.sel.primIndex), r);\n  }\n  function pn(e, t, r, n) {\n    var i = e.sel.ranges.slice(0);\n    i[t] = r, mn(e, Gr(i, e.sel.primIndex), n);\n  }\n  function gn(e, t, r, n) {\n    mn(e, Ur(t, r), n);\n  }\n  function vn(e, t, r) {\n    var n = e.history.done,\n      i = g(n);\n    i && i.ranges ? (n[n.length - 1] = t, yn(e, t, r)) : mn(e, t, r);\n  }\n  function mn(e, t, r) {\n    yn(e, t, r), on(e, e.sel, e.cm ? e.cm.curOp.id : NaN, r);\n  }\n  function yn(e, t, r) {\n    (me(e, \"beforeSelectionChange\") || e.cm && me(e.cm, \"beforeSelectionChange\")) && (t = function (e, t, r) {\n      var n = {\n        ranges: t.ranges,\n        update: function update(t) {\n          this.ranges = [];\n          for (var r = 0; r < t.length; r++) this.ranges[r] = new rl(B(e, t[r].anchor), B(e, t[r].head));\n        },\n        origin: r && r.origin\n      };\n      return pe(e, \"beforeSelectionChange\", e, n), e.cm && pe(e.cm, \"beforeSelectionChange\", e.cm, n), n.ranges != t.ranges ? Gr(n.ranges, n.ranges.length - 1) : t;\n    }(e, t, r));\n    bn(e, xn(e, t, r && r.bias || (F(t.primary().head, e.sel.primary().head) < 0 ? -1 : 1), !0)), r && !1 === r.scroll || !e.cm || sr(e.cm);\n  }\n  function bn(e, t) {\n    t.equals(e.sel) || (e.sel = t, e.cm && (e.cm.curOp.updateInput = e.cm.curOp.selectionChanged = !0, ve(e.cm)), $e(e, \"cursorActivity\", e));\n  }\n  function wn(e) {\n    bn(e, xn(e, e.sel, null, !1));\n  }\n  function xn(e, t, r, n) {\n    for (var i, o = 0; o < t.ranges.length; o++) {\n      var l = t.ranges[o],\n        s = t.ranges.length == e.sel.ranges.length && e.sel.ranges[o],\n        a = Sn(e, l.anchor, s && s.anchor, r, n),\n        u = Sn(e, l.head, s && s.head, r, n);\n      (i || a != l.anchor || u != l.head) && (i || (i = t.ranges.slice(0, o)), i[o] = new rl(a, u));\n    }\n    return i ? Gr(i, t.primIndex) : t;\n  }\n  function Cn(e, t, r, n, i) {\n    var o = k(e, t.line);\n    if (o.markedSpans) for (var l = 0; l < o.markedSpans.length; ++l) {\n      var s = o.markedSpans[l],\n        a = s.marker;\n      if ((null == s.from || (a.inclusiveLeft ? s.from <= t.ch : s.from < t.ch)) && (null == s.to || (a.inclusiveRight ? s.to >= t.ch : s.to > t.ch))) {\n        if (i && (pe(a, \"beforeCursorEnter\"), a.explicitlyCleared)) {\n          if (o.markedSpans) {\n            --l;\n            continue;\n          }\n          break;\n        }\n        if (!a.atomic) continue;\n        if (r) {\n          var u = a.find(n < 0 ? 1 : -1),\n            c = void 0;\n          if ((n < 0 ? a.inclusiveRight : a.inclusiveLeft) && (u = Ln(e, u, -n, u && u.line == t.line ? o : null)), u && u.line == t.line && (c = F(u, r)) && (n < 0 ? c < 0 : c > 0)) return Cn(e, u, t, n, i);\n        }\n        var h = a.find(n < 0 ? -1 : 1);\n        return (n < 0 ? a.inclusiveLeft : a.inclusiveRight) && (h = Ln(e, h, n, h.line == t.line ? o : null)), h ? Cn(e, h, t, n, i) : null;\n      }\n    }\n    return t;\n  }\n  function Sn(e, t, r, n, i) {\n    var o = n || 1,\n      l = Cn(e, t, r, o, i) || !i && Cn(e, t, r, o, !0) || Cn(e, t, r, -o, i) || !i && Cn(e, t, r, -o, !0);\n    return l || (e.cantEdit = !0, H(e.first, 0));\n  }\n  function Ln(e, t, r, n) {\n    return r < 0 && 0 == t.ch ? t.line > e.first ? B(e, H(t.line - 1)) : null : r > 0 && t.ch == (n || k(e, t.line)).text.length ? t.line < e.first + e.size - 1 ? H(t.line + 1, 0) : null : new H(t.line, t.ch + r);\n  }\n  function kn(e) {\n    e.setSelection(H(e.firstLine(), 0), H(e.lastLine()), mo);\n  }\n  function Tn(e, t, r) {\n    var n = {\n      canceled: !1,\n      from: t.from,\n      to: t.to,\n      text: t.text,\n      origin: t.origin,\n      cancel: function cancel() {\n        return n.canceled = !0;\n      }\n    };\n    return r && (n.update = function (t, r, i, o) {\n      t && (n.from = B(e, t)), r && (n.to = B(e, r)), i && (n.text = i), void 0 !== o && (n.origin = o);\n    }), pe(e, \"beforeChange\", e, n), e.cm && pe(e.cm, \"beforeChange\", e.cm, n), n.canceled ? null : {\n      from: n.from,\n      to: n.to,\n      text: n.text,\n      origin: n.origin\n    };\n  }\n  function Mn(e, t, r) {\n    if (e.cm) {\n      if (!e.cm.curOp) return xr(e.cm, Mn)(e, t, r);\n      if (e.cm.state.suppressEdits) return;\n    }\n    if (!(me(e, \"beforeChange\") || e.cm && me(e.cm, \"beforeChange\")) || (t = Tn(e, t, !0))) {\n      var n = So && !r && function (e, t, r) {\n        var n = null;\n        if (e.iter(t.line, r.line + 1, function (e) {\n          if (e.markedSpans) for (var t = 0; t < e.markedSpans.length; ++t) {\n            var r = e.markedSpans[t].marker;\n            !r.readOnly || n && -1 != f(n, r) || (n || (n = [])).push(r);\n          }\n        }), !n) return null;\n        for (var i = [{\n            from: t,\n            to: r\n          }], o = 0; o < n.length; ++o) for (var l = n[o], s = l.find(0), a = 0; a < i.length; ++a) {\n          var u = i[a];\n          if (!(F(u.to, s.from) < 0 || F(u.from, s.to) > 0)) {\n            var c = [a, 1],\n              h = F(u.from, s.from),\n              d = F(u.to, s.to);\n            (h < 0 || !l.inclusiveLeft && !h) && c.push({\n              from: u.from,\n              to: s.from\n            }), (d > 0 || !l.inclusiveRight && !d) && c.push({\n              from: s.to,\n              to: u.to\n            }), i.splice.apply(i, c), a += c.length - 3;\n          }\n        }\n        return i;\n      }(e, t.from, t.to);\n      if (n) for (var i = n.length - 1; i >= 0; --i) Nn(e, {\n        from: n[i].from,\n        to: n[i].to,\n        text: i ? [\"\"] : t.text,\n        origin: t.origin\n      });else Nn(e, t);\n    }\n  }\n  function Nn(e, t) {\n    if (1 != t.text.length || \"\" != t.text[0] || 0 != F(t.from, t.to)) {\n      var r = jr(e, t);\n      nn(e, t, r, e.cm ? e.cm.curOp.id : NaN), Wn(e, t, r, j(e, t));\n      var n = [];\n      Zr(e, function (e, r) {\n        r || -1 != f(n, e.history) || (Pn(e.history, t), n.push(e.history)), Wn(e, t, null, j(e, t));\n      });\n    }\n  }\n  function On(e, t, r) {\n    if (!e.cm || !e.cm.state.suppressEdits || r) {\n      for (var n, i = e.history, o = e.sel, l = \"undo\" == t ? i.done : i.undone, s = \"undo\" == t ? i.undone : i.done, a = 0; a < l.length && (n = l[a], r ? !n.ranges || n.equals(e.sel) : n.ranges); a++);\n      if (a != l.length) {\n        for (i.lastOrigin = i.lastSelOrigin = null; (n = l.pop()).ranges;) {\n          if (ln(n, s), r && !n.equals(e.sel)) return void mn(e, n, {\n            clearRedo: !1\n          });\n          o = n;\n        }\n        var u = [];\n        ln(o, s), s.push({\n          changes: u,\n          generation: i.generation\n        }), i.generation = n.generation || ++i.maxGeneration;\n        for (var c = me(e, \"beforeChange\") || e.cm && me(e.cm, \"beforeChange\"), h = function h(r) {\n            var i = n.changes[r];\n            if (i.origin = t, c && !Tn(e, i, !1)) return l.length = 0, {};\n            u.push(tn(e, i));\n            var o = r ? jr(e, i) : g(l);\n            Wn(e, i, o, un(e, i)), !r && e.cm && e.cm.scrollIntoView({\n              from: i.from,\n              to: Vr(i)\n            });\n            var s = [];\n            Zr(e, function (e, t) {\n              t || -1 != f(s, e.history) || (Pn(e.history, i), s.push(e.history)), Wn(e, i, null, un(e, i));\n            });\n          }, d = n.changes.length - 1; d >= 0; --d) {\n          var p = h(d);\n          if (p) return p.v;\n        }\n      }\n    }\n  }\n  function An(e, t) {\n    if (0 != t && (e.first += t, e.sel = new tl(v(e.sel.ranges, function (e) {\n      return new rl(H(e.anchor.line + t, e.anchor.ch), H(e.head.line + t, e.head.ch));\n    }), e.sel.primIndex), e.cm)) {\n      Lr(e.cm, e.first, e.first - t, t);\n      for (var r = e.cm.display, n = r.viewFrom; n < r.viewTo; n++) kr(e.cm, n, \"gutter\");\n    }\n  }\n  function Wn(e, t, r, n) {\n    if (e.cm && !e.cm.curOp) return xr(e.cm, Wn)(e, t, r, n);\n    if (t.to.line < e.first) An(e, t.text.length - 1 - (t.to.line - t.from.line));else if (!(t.from.line > e.lastLine())) {\n      if (t.from.line < e.first) {\n        var i = t.text.length - 1 - (e.first - t.from.line);\n        An(e, i), t = {\n          from: H(e.first, 0),\n          to: H(t.to.line + i, t.to.ch),\n          text: [g(t.text)],\n          origin: t.origin\n        };\n      }\n      var o = e.lastLine();\n      t.to.line > o && (t = {\n        from: t.from,\n        to: H(o, k(e, o).text.length),\n        text: [t.text[0]],\n        origin: t.origin\n      }), t.removed = T(e, t.from, t.to), r || (r = jr(e, t)), e.cm ? function (e, t, r) {\n        var n = e.doc,\n          i = e.display,\n          o = t.from,\n          l = t.to,\n          s = !1,\n          a = o.line;\n        e.options.lineWrapping || (a = O(re(k(n, o.line))), n.iter(a, l.line + 1, function (e) {\n          if (e == i.maxLine) return s = !0, !0;\n        }));\n        n.sel.contains(t.from, t.to) > -1 && ve(e);\n        $r(n, t, r, Gt(e)), e.options.lineWrapping || (n.iter(a, o.line + t.text.length, function (e) {\n          var t = ae(e);\n          t > i.maxLineLength && (i.maxLine = e, i.maxLineLength = t, i.maxLineChanged = !0, s = !1);\n        }), s && (e.curOp.updateMaxLine = !0));\n        (function (e, t) {\n          if (e.modeFrontier = Math.min(e.modeFrontier, t), !(e.highlightFrontier < t - 10)) {\n            for (var r = e.first, n = t - 1; n > r; n--) {\n              var i = k(e, n).stateAfter;\n              if (i && (!(i instanceof Io) || n + i.lookAhead < t)) {\n                r = n + 1;\n                break;\n              }\n            }\n            e.highlightFrontier = Math.min(e.highlightFrontier, r);\n          }\n        })(n, o.line), Or(e, 400);\n        var u = t.text.length - (l.line - o.line) - 1;\n        t.full ? Lr(e) : o.line != l.line || 1 != t.text.length || qr(e.doc, t) ? Lr(e, o.line, l.line + 1, u) : kr(e, o.line, \"text\");\n        var c = me(e, \"changes\"),\n          h = me(e, \"change\");\n        if (h || c) {\n          var f = {\n            from: o,\n            to: l,\n            text: t.text,\n            removed: t.removed,\n            origin: t.origin\n          };\n          h && $e(e, \"change\", e, f), c && (e.curOp.changeObjs || (e.curOp.changeObjs = [])).push(f);\n        }\n        e.display.selForContextMenu = null;\n      }(e.cm, t, n) : $r(e, t, n), yn(e, r, mo);\n    }\n  }\n  function Dn(e, t, r, n, i) {\n    if (n || (n = r), F(n, r) < 0) {\n      var o;\n      r = (o = [n, r])[0], n = o[1];\n    }\n    \"string\" == typeof t && (t = e.splitLines(t)), Mn(e, {\n      from: r,\n      to: n,\n      text: t,\n      origin: i\n    });\n  }\n  function Hn(e, t, r, n) {\n    r < e.line ? e.line += n : t < e.line && (e.line = t, e.ch = 0);\n  }\n  function Fn(e, t, r, n) {\n    for (var i = 0; i < e.length; ++i) {\n      var o = e[i],\n        l = !0;\n      if (o.ranges) {\n        o.copied || ((o = e[i] = o.deepCopy()).copied = !0);\n        for (var s = 0; s < o.ranges.length; s++) Hn(o.ranges[s].anchor, t, r, n), Hn(o.ranges[s].head, t, r, n);\n      } else {\n        for (var a = 0; a < o.changes.length; ++a) {\n          var u = o.changes[a];\n          if (r < u.from.line) u.from = H(u.from.line + n, u.from.ch), u.to = H(u.to.line + n, u.to.ch);else if (t <= u.to.line) {\n            l = !1;\n            break;\n          }\n        }\n        l || (e.splice(0, i + 1), i = 0);\n      }\n    }\n  }\n  function Pn(e, t) {\n    var r = t.from.line,\n      n = t.to.line,\n      i = t.text.length - (n - r) - 1;\n    Fn(e.done, r, n, i), Fn(e.undone, r, n, i);\n  }\n  function En(e, t, r, n) {\n    var i = t,\n      o = t;\n    return \"number\" == typeof t ? o = k(e, R(e, t)) : i = O(t), null == i ? null : (n(o, i) && e.cm && kr(e.cm, i, r), o);\n  }\n  function zn(e) {\n    this.lines = e, this.parent = null;\n    for (var t = 0, r = 0; r < e.length; ++r) e[r].parent = this, t += e[r].height;\n    this.height = t;\n  }\n  function In(e) {\n    this.children = e;\n    for (var t = 0, r = 0, n = 0; n < e.length; ++n) {\n      var i = e[n];\n      t += i.chunkSize(), r += i.height, i.parent = this;\n    }\n    this.size = t, this.height = r, this.parent = null;\n  }\n  function Rn(e, t, r) {\n    se(t) < (e.curOp && e.curOp.scrollTop || e.doc.scrollTop) && lr(e, r);\n  }\n  function Bn(e, t, r, n, o) {\n    if (n && n.shared) return function (e, t, r, n, i) {\n      (n = c(n)).shared = !1;\n      var o = [Bn(e, t, r, n, i)],\n        l = o[0],\n        s = n.widgetNode;\n      return Zr(e, function (e) {\n        s && (n.widgetNode = s.cloneNode(!0)), o.push(Bn(e, B(e, t), B(e, r), n, i));\n        for (var a = 0; a < e.linked.length; ++a) if (e.linked[a].isParent) return;\n        l = g(o);\n      }), new ll(o, l);\n    }(e, t, r, n, o);\n    if (e.cm && !e.cm.curOp) return xr(e.cm, Bn)(e, t, r, n, o);\n    var l = new ol(e, o),\n      s = F(t, r);\n    if (n && c(n, l, !1), s > 0 || 0 == s && !1 !== l.clearWhenEmpty) return l;\n    if (l.replacedWith && (l.collapsed = !0, l.widgetNode = i(\"span\", [l.replacedWith], \"CodeMirror-widget\"), n.handleMouseEvents || l.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"), n.insertLeft && (l.widgetNode.insertLeft = !0)), l.collapsed) {\n      if (te(e, t.line, t, r, l) || t.line != r.line && te(e, r.line, t, r, l)) throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");\n      Lo = !0;\n    }\n    l.addToHistory && nn(e, {\n      from: t,\n      to: r,\n      origin: \"markText\"\n    }, e.sel, NaN);\n    var a,\n      u = t.line,\n      h = e.cm;\n    if (e.iter(u, r.line + 1, function (e) {\n      h && l.collapsed && !h.options.lineWrapping && re(e) == h.display.maxLine && (a = !0), l.collapsed && u != t.line && N(e, 0), function (e, t) {\n        e.markedSpans = e.markedSpans ? e.markedSpans.concat([t]) : [t], t.marker.attachLine(e);\n      }(e, new U(l, u == t.line ? t.ch : null, u == r.line ? r.ch : null)), ++u;\n    }), l.collapsed && e.iter(t.line, r.line + 1, function (t) {\n      oe(e, t) && N(t, 0);\n    }), l.clearOnEnter && No(l, \"beforeCursorEnter\", function () {\n      return l.clear();\n    }), l.readOnly && (So = !0, (e.history.done.length || e.history.undone.length) && e.clearHistory()), l.collapsed && (l.id = ++il, l.atomic = !0), h) {\n      if (a && (h.curOp.updateMaxLine = !0), l.collapsed) Lr(h, t.line, r.line + 1);else if (l.className || l.title || l.startStyle || l.endStyle || l.css) for (var f = t.line; f <= r.line; f++) kr(h, f, \"text\");\n      l.atomic && wn(h.doc), $e(h, \"markerAdded\", h, l);\n    }\n    return l;\n  }\n  function Gn(e) {\n    return e.findMarks(H(e.first, 0), e.clipPos(H(e.lastLine())), function (e) {\n      return e.parent;\n    });\n  }\n  function Un(e) {\n    for (var t = function t(_t2) {\n        var r = e[_t2],\n          n = [r.primary.doc];\n        Zr(r.primary.doc, function (e) {\n          return n.push(e);\n        });\n        for (var i = 0; i < r.markers.length; i++) {\n          var o = r.markers[i];\n          -1 == f(n, o.doc) && (o.parent = null, r.markers.splice(i--, 1));\n        }\n      }, r = 0; r < e.length; r++) t(r);\n  }\n  function Vn(e) {\n    var t = this;\n    if (Kn(t), !ge(t, e) && !st(t.display, e)) {\n      be(e), Ki && (ul = +new Date());\n      var r = Vt(t, e, !0),\n        n = e.dataTransfer.files;\n      if (r && !t.isReadOnly()) if (n && n.length && window.FileReader && window.File) for (var i = n.length, o = Array(i), l = 0, s = function s(e, n) {\n          if (!t.options.allowDropFileTypes || -1 != f(t.options.allowDropFileTypes, e.type)) {\n            var s = new FileReader();\n            s.onload = xr(t, function () {\n              var e = s.result;\n              if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(e) && (e = \"\"), o[n] = e, ++l == i) {\n                var a = {\n                  from: r = B(t.doc, r),\n                  to: r,\n                  text: t.doc.splitLines(o.join(t.doc.lineSeparator())),\n                  origin: \"paste\"\n                };\n                Mn(t.doc, a), vn(t.doc, Ur(r, Vr(a)));\n              }\n            }), s.readAsText(e);\n          }\n        }, a = 0; a < i; ++a) s(n[a], a);else {\n        if (t.state.draggingText && t.doc.sel.contains(r) > -1) return t.state.draggingText(e), void setTimeout(function () {\n          return t.display.input.focus();\n        }, 20);\n        try {\n          var u = e.dataTransfer.getData(\"Text\");\n          if (u) {\n            var c;\n            if (t.state.draggingText && !t.state.draggingText.copy && (c = t.listSelections()), yn(t.doc, Ur(r, r)), c) for (var h = 0; h < c.length; ++h) Dn(t.doc, \"\", c[h].anchor, c[h].head, \"drag\");\n            t.replaceSelection(u, \"around\", \"paste\"), t.display.input.focus();\n          }\n        } catch (e) {}\n      }\n    }\n  }\n  function Kn(e) {\n    e.display.dragCursor && (e.display.lineSpace.removeChild(e.display.dragCursor), e.display.dragCursor = null);\n  }\n  function jn(e) {\n    if (document.getElementsByClassName) for (var t = document.getElementsByClassName(\"CodeMirror\"), r = 0; r < t.length; r++) {\n      var n = t[r].CodeMirror;\n      n && e(n);\n    }\n  }\n  function Xn() {\n    cl || (!function () {\n      var e;\n      No(window, \"resize\", function () {\n        null == e && (e = setTimeout(function () {\n          e = null, jn(Yn);\n        }, 100));\n      }), No(window, \"blur\", function () {\n        return jn(Jt);\n      });\n    }(), cl = !0);\n  }\n  function Yn(e) {\n    var t = e.display;\n    t.lastWrapHeight == t.wrapper.clientHeight && t.lastWrapWidth == t.wrapper.clientWidth || (t.cachedCharWidth = t.cachedTextHeight = t.cachedPaddingH = null, t.scrollbarsClipped = !1, e.setSize());\n  }\n  function _n(e) {\n    var t = e.split(/-(?!$)/);\n    e = t[t.length - 1];\n    for (var r, n, i, o, l = 0; l < t.length - 1; l++) {\n      var s = t[l];\n      if (/^(cmd|meta|m)$/i.test(s)) o = !0;else if (/^a(lt)?$/i.test(s)) r = !0;else if (/^(c|ctrl|control)$/i.test(s)) n = !0;else {\n        if (!/^s(hift)?$/i.test(s)) throw new Error(\"Unrecognized modifier name: \" + s);\n        i = !0;\n      }\n    }\n    return r && (e = \"Alt-\" + e), n && (e = \"Ctrl-\" + e), o && (e = \"Cmd-\" + e), i && (e = \"Shift-\" + e), e;\n  }\n  function qn(e) {\n    var t = {};\n    for (var r in e) if (e.hasOwnProperty(r)) {\n      var n = e[r];\n      if (/^(name|fallthrough|(de|at)tach)$/.test(r)) continue;\n      if (\"...\" == n) {\n        delete e[r];\n        continue;\n      }\n      for (var i = v(r.split(\" \"), _n), o = 0; o < i.length; o++) {\n        var l = void 0,\n          s = void 0;\n        o == i.length - 1 ? (s = i.join(\" \"), l = n) : (s = i.slice(0, o + 1).join(\" \"), l = \"...\");\n        var a = t[s];\n        if (a) {\n          if (a != l) throw new Error(\"Inconsistent bindings for \" + s);\n        } else t[s] = l;\n      }\n      delete e[r];\n    }\n    for (var u in t) e[u] = t[u];\n    return e;\n  }\n  function $n(e, t, r, n) {\n    var i = (t = ei(t)).call ? t.call(e, n) : t[e];\n    if (!1 === i) return \"nothing\";\n    if (\"...\" === i) return \"multi\";\n    if (null != i && r(i)) return \"handled\";\n    if (t.fallthrough) {\n      if (\"[object Array]\" != Object.prototype.toString.call(t.fallthrough)) return $n(e, t.fallthrough, r, n);\n      for (var o = 0; o < t.fallthrough.length; o++) {\n        var l = $n(e, t.fallthrough[o], r, n);\n        if (l) return l;\n      }\n    }\n  }\n  function Zn(e) {\n    var t = \"string\" == typeof e ? e : hl[e.keyCode];\n    return \"Ctrl\" == t || \"Alt\" == t || \"Shift\" == t || \"Mod\" == t;\n  }\n  function Qn(e, t, r) {\n    var n = e;\n    return t.altKey && \"Alt\" != n && (e = \"Alt-\" + e), (so ? t.metaKey : t.ctrlKey) && \"Ctrl\" != n && (e = \"Ctrl-\" + e), (so ? t.ctrlKey : t.metaKey) && \"Cmd\" != n && (e = \"Cmd-\" + e), !r && t.shiftKey && \"Shift\" != n && (e = \"Shift-\" + e), e;\n  }\n  function Jn(e, t) {\n    if (qi && 34 == e.keyCode && e.char) return !1;\n    var r = hl[e.keyCode];\n    return null != r && !e.altGraphKey && Qn(r, e, t);\n  }\n  function ei(e) {\n    return \"string\" == typeof e ? gl[e] : e;\n  }\n  function ti(e, t) {\n    for (var r = e.doc.sel.ranges, n = [], i = 0; i < r.length; i++) {\n      for (var o = t(r[i]); n.length && F(o.from, g(n).to) <= 0;) {\n        var l = n.pop();\n        if (F(l.from, o.from) < 0) {\n          o.from = l.from;\n          break;\n        }\n      }\n      n.push(o);\n    }\n    wr(e, function () {\n      for (var t = n.length - 1; t >= 0; t--) Dn(e.doc, \"\", n[t].from, n[t].to, \"+delete\");\n      sr(e);\n    });\n  }\n  function ri(e, t, r) {\n    var n = S(e.text, t + r, r);\n    return n < 0 || n > e.text.length ? null : n;\n  }\n  function ni(e, t, r) {\n    var n = ri(e, t.ch, r);\n    return null == n ? null : new H(t.line, n, r < 0 ? \"after\" : \"before\");\n  }\n  function ii(e, t, r, n, i) {\n    if (e) {\n      var o = he(r, t.doc.direction);\n      if (o) {\n        var l,\n          s = i < 0 ? g(o) : o[0],\n          a = i < 0 == (1 == s.level) ? \"after\" : \"before\";\n        if (s.level > 0 || \"rtl\" == t.doc.direction) {\n          var u = mt(t, r);\n          l = i < 0 ? r.text.length - 1 : 0;\n          var c = yt(t, u, l).top;\n          l = L(function (e) {\n            return yt(t, u, e).top == c;\n          }, i < 0 == (1 == s.level) ? s.from : s.to - 1, l), \"before\" == a && (l = ri(r, l, 1));\n        } else l = i < 0 ? s.to : s.from;\n        return new H(n, l, a);\n      }\n    }\n    return new H(n, i < 0 ? r.text.length : 0, i < 0 ? \"before\" : \"after\");\n  }\n  function oi(e, t) {\n    var r = k(e.doc, t),\n      n = re(r);\n    return n != r && (t = O(n)), ii(!0, e, n, t, 1);\n  }\n  function li(e, t) {\n    var r = k(e.doc, t),\n      n = function (e) {\n        for (var t; t = ee(e);) e = t.find(1, !0).line;\n        return e;\n      }(r);\n    return n != r && (t = O(n)), ii(!0, e, r, t, -1);\n  }\n  function si(e, t) {\n    var r = oi(e, t.line),\n      n = k(e.doc, r.line),\n      i = he(n, e.doc.direction);\n    if (!i || 0 == i[0].level) {\n      var o = Math.max(0, n.text.search(/\\S/)),\n        l = t.line == r.line && t.ch <= o && t.ch;\n      return H(r.line, l ? 0 : o, r.sticky);\n    }\n    return r;\n  }\n  function ai(e, t, r) {\n    if (\"string\" == typeof t && !(t = vl[t])) return !1;\n    e.display.input.ensurePolled();\n    var n = e.display.shift,\n      i = !1;\n    try {\n      e.isReadOnly() && (e.state.suppressEdits = !0), r && (e.display.shift = !1), i = t(e) != vo;\n    } finally {\n      e.display.shift = n, e.state.suppressEdits = !1;\n    }\n    return i;\n  }\n  function ui(e, t, r, n) {\n    var i = e.state.keySeq;\n    if (i) {\n      if (Zn(t)) return \"handled\";\n      if (/\\'$/.test(t) ? e.state.keySeq = null : ml.set(50, function () {\n        e.state.keySeq == i && (e.state.keySeq = null, e.display.input.reset());\n      }), ci(e, i + \" \" + t, r, n)) return !0;\n    }\n    return ci(e, t, r, n);\n  }\n  function ci(e, t, r, n) {\n    var i = function (e, t, r) {\n      for (var n = 0; n < e.state.keyMaps.length; n++) {\n        var i = $n(t, e.state.keyMaps[n], r, e);\n        if (i) return i;\n      }\n      return e.options.extraKeys && $n(t, e.options.extraKeys, r, e) || $n(t, e.options.keyMap, r, e);\n    }(e, t, n);\n    return \"multi\" == i && (e.state.keySeq = t), \"handled\" == i && $e(e, \"keyHandled\", e, t, r), \"handled\" != i && \"multi\" != i || (be(r), qt(e)), !!i;\n  }\n  function hi(e, t) {\n    var r = Jn(t, !0);\n    return !!r && (t.shiftKey && !e.state.keySeq ? ui(e, \"Shift-\" + r, t, function (t) {\n      return ai(e, t, !0);\n    }) || ui(e, r, t, function (t) {\n      if (\"string\" == typeof t ? /^go[A-Z]/.test(t) : t.motion) return ai(e, t);\n    }) : ui(e, r, t, function (t) {\n      return ai(e, t);\n    }));\n  }\n  function fi(e) {\n    var t = this;\n    if (t.curOp.focus = l(), !ge(t, e)) {\n      Ki && ji < 11 && 27 == e.keyCode && (e.returnValue = !1);\n      var r = e.keyCode;\n      t.display.shift = 16 == r || e.shiftKey;\n      var n = hi(t, e);\n      qi && (yl = n ? r : null, !n && 88 == r && !Do && (ro ? e.metaKey : e.ctrlKey) && t.replaceSelection(\"\", null, \"cut\")), 18 != r || /\\bCodeMirror-crosshair\\b/.test(t.display.lineDiv.className) || function (e) {\n        function t(e) {\n          18 != e.keyCode && e.altKey || (uo(r, \"CodeMirror-crosshair\"), de(document, \"keyup\", t), de(document, \"mouseover\", t));\n        }\n        var r = e.display.lineDiv;\n        s(r, \"CodeMirror-crosshair\");\n        No(document, \"keyup\", t), No(document, \"mouseover\", t);\n      }(t);\n    }\n  }\n  function di(e) {\n    16 == e.keyCode && (this.doc.sel.shift = !1), ge(this, e);\n  }\n  function pi(e) {\n    var t = this;\n    if (!(st(t.display, e) || ge(t, e) || e.ctrlKey && !e.altKey || ro && e.metaKey)) {\n      var r = e.keyCode,\n        n = e.charCode;\n      if (qi && r == yl) return yl = null, void be(e);\n      if (!qi || e.which && !(e.which < 10) || !hi(t, e)) {\n        var i = String.fromCharCode(null == n ? r : n);\n        \"\\b\" != i && (function (e, t, r) {\n          return ui(e, \"'\" + r + \"'\", t, function (t) {\n            return ai(e, t, !0);\n          });\n        }(t, e, i) || t.display.input.onKeyPress(e));\n      }\n    }\n  }\n  function gi(e) {\n    var t = this,\n      r = t.display;\n    if (!(ge(t, e) || r.activeTouch && r.input.supportsTouch())) if (r.input.ensurePolled(), r.shift = e.shiftKey, st(r, e)) Xi || (r.scroller.draggable = !1, setTimeout(function () {\n      return r.scroller.draggable = !0;\n    }, 100));else if (!yi(t, e)) {\n      var n = Vt(t, e),\n        i = Le(e),\n        o = n ? function (e, t) {\n          var r = +new Date();\n          return xl && xl.compare(r, e, t) ? (wl = xl = null, \"triple\") : wl && wl.compare(r, e, t) ? (xl = new bl(r, e, t), wl = null, \"double\") : (wl = new bl(r, e, t), xl = null, \"single\");\n        }(n, i) : \"single\";\n      window.focus(), 1 == i && t.state.selectingText && t.state.selectingText(e), n && function (e, t, r, n, i) {\n        var o = \"Click\";\n        \"double\" == n ? o = \"Double\" + o : \"triple\" == n && (o = \"Triple\" + o);\n        return o = (1 == t ? \"Left\" : 2 == t ? \"Middle\" : \"Right\") + o, ui(e, Qn(o, i), i, function (t) {\n          if (\"string\" == typeof t && (t = vl[t]), !t) return !1;\n          var n = !1;\n          try {\n            e.isReadOnly() && (e.state.suppressEdits = !0), n = t(e, r) != vo;\n          } finally {\n            e.state.suppressEdits = !1;\n          }\n          return n;\n        });\n      }(t, i, n, o, e) || (1 == i ? n ? function (e, t, r, n) {\n        Ki ? setTimeout(u($t, e), 0) : e.curOp.focus = l();\n        var i,\n          o = function (e, t, r) {\n            var n = e.getOption(\"configureMouse\"),\n              i = n ? n(e, t, r) : {};\n            if (null == i.unit) {\n              var o = no ? r.shiftKey && r.metaKey : r.altKey;\n              i.unit = o ? \"rectangle\" : \"single\" == t ? \"char\" : \"double\" == t ? \"word\" : \"line\";\n            }\n            (null == i.extend || e.doc.extend) && (i.extend = e.doc.extend || r.shiftKey);\n            null == i.addNew && (i.addNew = ro ? r.metaKey : r.ctrlKey);\n            null == i.moveOnDrag && (i.moveOnDrag = !(ro ? r.altKey : r.ctrlKey));\n            return i;\n          }(e, r, n),\n          s = e.doc.sel;\n        e.options.dragDrop && Oo && !e.isReadOnly() && \"single\" == r && (i = s.contains(t)) > -1 && (F((i = s.ranges[i]).from(), t) < 0 || t.xRel > 0) && (F(i.to(), t) > 0 || t.xRel < 0) ? function (e, t, r, n) {\n          var i = e.display,\n            o = !1,\n            l = xr(e, function (t) {\n              Xi && (i.scroller.draggable = !1), e.state.draggingText = !1, de(document, \"mouseup\", l), de(document, \"mousemove\", s), de(i.scroller, \"dragstart\", a), de(i.scroller, \"drop\", l), o || (be(t), n.addNew || fn(e.doc, r, null, null, n.extend), Xi || Ki && 9 == ji ? setTimeout(function () {\n                document.body.focus(), i.input.focus();\n              }, 20) : i.input.focus());\n            }),\n            s = function s(e) {\n              o = o || Math.abs(t.clientX - e.clientX) + Math.abs(t.clientY - e.clientY) >= 10;\n            },\n            a = function a() {\n              return o = !0;\n            };\n          Xi && (i.scroller.draggable = !0);\n          e.state.draggingText = l, l.copy = !n.moveOnDrag, i.scroller.dragDrop && i.scroller.dragDrop();\n          No(document, \"mouseup\", l), No(document, \"mousemove\", s), No(i.scroller, \"dragstart\", a), No(i.scroller, \"drop\", l), Zt(e), setTimeout(function () {\n            return i.input.focus();\n          }, 20);\n        }(e, n, t, o) : function (e, t, r, n) {\n          function i(t) {\n            if (0 != F(m, t)) if (m = t, \"rectangle\" == n.unit) {\n              for (var i = [], o = e.options.tabSize, l = h(k(u, r.line).text, r.ch, o), s = h(k(u, t.line).text, t.ch, o), a = Math.min(l, s), g = Math.max(l, s), v = Math.min(r.line, t.line), y = Math.min(e.lastLine(), Math.max(r.line, t.line)); v <= y; v++) {\n                var b = k(u, v).text,\n                  w = d(b, a, o);\n                a == g ? i.push(new rl(H(v, w), H(v, w))) : b.length > w && i.push(new rl(H(v, w), H(v, d(b, g, o))));\n              }\n              i.length || i.push(new rl(r, r)), mn(u, Gr(p.ranges.slice(0, f).concat(i), f), {\n                origin: \"*mouse\",\n                scroll: !1\n              }), e.scrollIntoView(t);\n            } else {\n              var x,\n                C = c,\n                S = vi(e, t, n.unit),\n                L = C.anchor;\n              F(S.anchor, L) > 0 ? (x = S.head, L = I(C.from(), S.anchor)) : (x = S.anchor, L = z(C.to(), S.head));\n              var T = p.ranges.slice(0);\n              T[f] = function (e, t) {\n                var r = t.anchor,\n                  n = t.head,\n                  i = k(e.doc, r.line);\n                if (0 == F(r, n) && r.sticky == n.sticky) return t;\n                var o = he(i);\n                if (!o) return t;\n                var l = ce(o, r.ch, r.sticky),\n                  s = o[l];\n                if (s.from != r.ch && s.to != r.ch) return t;\n                var a = l + (s.from == r.ch == (1 != s.level) ? 0 : 1);\n                if (0 == a || a == o.length) return t;\n                var u;\n                if (n.line != r.line) u = (n.line - r.line) * (\"ltr\" == e.doc.direction ? 1 : -1) > 0;else {\n                  var c = ce(o, n.ch, n.sticky),\n                    h = c - l || (n.ch - r.ch) * (1 == s.level ? -1 : 1);\n                  u = c == a - 1 || c == a ? h < 0 : h > 0;\n                }\n                var f = o[a + (u ? -1 : 0)],\n                  d = u == (1 == f.level),\n                  p = d ? f.from : f.to,\n                  g = d ? \"after\" : \"before\";\n                return r.ch == p && r.sticky == g ? t : new rl(new H(r.line, p, g), n);\n              }(e, new rl(B(u, L), x)), mn(u, Gr(T, f), yo);\n            }\n          }\n          function o(t) {\n            var r = ++b,\n              s = Vt(e, t, !0, \"rectangle\" == n.unit);\n            if (s) if (0 != F(s, m)) {\n              e.curOp.focus = l(), i(s);\n              var c = rr(a, u);\n              (s.line >= c.to || s.line < c.from) && setTimeout(xr(e, function () {\n                b == r && o(t);\n              }), 150);\n            } else {\n              var h = t.clientY < y.top ? -20 : t.clientY > y.bottom ? 20 : 0;\n              h && setTimeout(xr(e, function () {\n                b == r && (a.scroller.scrollTop += h, o(t));\n              }), 50);\n            }\n          }\n          function s(t) {\n            e.state.selectingText = !1, b = 1 / 0, be(t), a.input.focus(), de(document, \"mousemove\", w), de(document, \"mouseup\", x), u.history.lastSelOrigin = null;\n          }\n          var a = e.display,\n            u = e.doc;\n          be(t);\n          var c,\n            f,\n            p = u.sel,\n            g = p.ranges;\n          n.addNew && !n.extend ? (f = u.sel.contains(r), c = f > -1 ? g[f] : new rl(r, r)) : (c = u.sel.primary(), f = u.sel.primIndex);\n          if (\"rectangle\" == n.unit) n.addNew || (c = new rl(r, r)), r = Vt(e, t, !0, !0), f = -1;else {\n            var v = vi(e, r, n.unit);\n            c = n.extend ? hn(c, v.anchor, v.head, n.extend) : v;\n          }\n          n.addNew ? -1 == f ? (f = g.length, mn(u, Gr(g.concat([c]), f), {\n            scroll: !1,\n            origin: \"*mouse\"\n          })) : g.length > 1 && g[f].empty() && \"char\" == n.unit && !n.extend ? (mn(u, Gr(g.slice(0, f).concat(g.slice(f + 1)), 0), {\n            scroll: !1,\n            origin: \"*mouse\"\n          }), p = u.sel) : pn(u, f, c, yo) : (f = 0, mn(u, new tl([c], 0), yo), p = u.sel);\n          var m = r;\n          var y = a.wrapper.getBoundingClientRect(),\n            b = 0;\n          var w = xr(e, function (e) {\n              Le(e) ? o(e) : s(e);\n            }),\n            x = xr(e, s);\n          e.state.selectingText = x, No(document, \"mousemove\", w), No(document, \"mouseup\", x);\n        }(e, n, t, o);\n      }(t, n, o, e) : Se(e) == r.scroller && be(e) : 2 == i ? (n && fn(t.doc, n), setTimeout(function () {\n        return r.input.focus();\n      }, 20)) : 3 == i && (ao ? bi(t, e) : Zt(t)));\n    }\n  }\n  function vi(e, t, r) {\n    if (\"char\" == r) return new rl(t, t);\n    if (\"word\" == r) return e.findWordAt(t);\n    if (\"line\" == r) return new rl(H(t.line, 0), B(e.doc, H(t.line + 1, 0)));\n    var n = r(e, t);\n    return new rl(n.from, n.to);\n  }\n  function mi(e, t, r, n) {\n    var i, o;\n    if (t.touches) i = t.touches[0].clientX, o = t.touches[0].clientY;else try {\n      i = t.clientX, o = t.clientY;\n    } catch (t) {\n      return !1;\n    }\n    if (i >= Math.floor(e.display.gutters.getBoundingClientRect().right)) return !1;\n    n && be(t);\n    var l = e.display,\n      s = l.lineDiv.getBoundingClientRect();\n    if (o > s.bottom || !me(e, r)) return xe(t);\n    o -= s.top - l.viewOffset;\n    for (var a = 0; a < e.options.gutters.length; ++a) {\n      var u = l.gutters.childNodes[a];\n      if (u && u.getBoundingClientRect().right >= i) {\n        return pe(e, r, e, A(e.doc, o), e.options.gutters[a], t), xe(t);\n      }\n    }\n  }\n  function yi(e, t) {\n    return mi(e, t, \"gutterClick\", !0);\n  }\n  function bi(e, t) {\n    st(e.display, t) || function (e, t) {\n      if (!me(e, \"gutterContextMenu\")) return !1;\n      return mi(e, t, \"gutterContextMenu\", !1);\n    }(e, t) || ge(e, t, \"contextmenu\") || e.display.input.onContextMenu(t);\n  }\n  function wi(e) {\n    e.display.wrapper.className = e.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") + e.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\"), St(e);\n  }\n  function xi(e) {\n    Er(e), Lr(e), nr(e);\n  }\n  function Ci(e, t, r) {\n    if (!t != !(r && r != Cl)) {\n      var n = e.display.dragFunctions,\n        i = t ? No : de;\n      i(e.display.scroller, \"dragstart\", n.start), i(e.display.scroller, \"dragenter\", n.enter), i(e.display.scroller, \"dragover\", n.over), i(e.display.scroller, \"dragleave\", n.leave), i(e.display.scroller, \"drop\", n.drop);\n    }\n  }\n  function Si(e) {\n    e.options.lineWrapping ? (s(e.display.wrapper, \"CodeMirror-wrap\"), e.display.sizer.style.minWidth = \"\", e.display.sizerWidth = null) : (uo(e.display.wrapper, \"CodeMirror-wrap\"), ue(e)), Ut(e), Lr(e), St(e), setTimeout(function () {\n      return gr(e);\n    }, 100);\n  }\n  function Li(e, t) {\n    var o = this;\n    if (!(this instanceof Li)) return new Li(e, t);\n    this.options = t = t ? c(t) : {}, c(Sl, t, !1), zr(t);\n    var l = t.value;\n    \"string\" == typeof l && (l = new al(l, t.mode, null, t.lineSeparator, t.direction)), this.doc = l;\n    var s = new Li.inputStyles[t.inputStyle](this),\n      a = this.display = new function (e, t, r) {\n        var o = this;\n        this.input = r, o.scrollbarFiller = n(\"div\", null, \"CodeMirror-scrollbar-filler\"), o.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\"), o.gutterFiller = n(\"div\", null, \"CodeMirror-gutter-filler\"), o.gutterFiller.setAttribute(\"cm-not-content\", \"true\"), o.lineDiv = i(\"div\", null, \"CodeMirror-code\"), o.selectionDiv = n(\"div\", null, null, \"position: relative; z-index: 1\"), o.cursorDiv = n(\"div\", null, \"CodeMirror-cursors\"), o.measure = n(\"div\", null, \"CodeMirror-measure\"), o.lineMeasure = n(\"div\", null, \"CodeMirror-measure\"), o.lineSpace = i(\"div\", [o.measure, o.lineMeasure, o.selectionDiv, o.cursorDiv, o.lineDiv], null, \"position: relative; outline: none\");\n        var l = i(\"div\", [o.lineSpace], \"CodeMirror-lines\");\n        o.mover = n(\"div\", [l], null, \"position: relative\"), o.sizer = n(\"div\", [o.mover], \"CodeMirror-sizer\"), o.sizerWidth = null, o.heightForcer = n(\"div\", null, null, \"position: absolute; height: \" + go + \"px; width: 1px;\"), o.gutters = n(\"div\", null, \"CodeMirror-gutters\"), o.lineGutter = null, o.scroller = n(\"div\", [o.sizer, o.heightForcer, o.gutters], \"CodeMirror-scroll\"), o.scroller.setAttribute(\"tabIndex\", \"-1\"), o.wrapper = n(\"div\", [o.scrollbarFiller, o.gutterFiller, o.scroller], \"CodeMirror\"), Ki && ji < 8 && (o.gutters.style.zIndex = -1, o.scroller.style.paddingRight = 0), Xi || Bi && to || (o.scroller.draggable = !0), e && (e.appendChild ? e.appendChild(o.wrapper) : e(o.wrapper)), o.viewFrom = o.viewTo = t.first, o.reportedViewFrom = o.reportedViewTo = t.first, o.view = [], o.renderedView = null, o.externalMeasured = null, o.viewOffset = 0, o.lastWrapHeight = o.lastWrapWidth = 0, o.updateLineNumbers = null, o.nativeBarWidth = o.barHeight = o.barWidth = 0, o.scrollbarsClipped = !1, o.lineNumWidth = o.lineNumInnerWidth = o.lineNumChars = null, o.alignWidgets = !1, o.cachedCharWidth = o.cachedTextHeight = o.cachedPaddingH = null, o.maxLine = null, o.maxLineLength = 0, o.maxLineChanged = !1, o.wheelDX = o.wheelDY = o.wheelStartX = o.wheelStartY = null, o.shift = !1, o.selForContextMenu = null, o.activeTouch = null, r.init(o);\n      }(e, l, s);\n    a.wrapper.CodeMirror = this, Er(this), wi(this), t.lineWrapping && (this.display.wrapper.className += \" CodeMirror-wrap\"), mr(this), this.state = {\n      keyMaps: [],\n      overlays: [],\n      modeGen: 0,\n      overwrite: !1,\n      delayingBlurEvent: !1,\n      focused: !1,\n      suppressEdits: !1,\n      pasteIncoming: !1,\n      cutIncoming: !1,\n      selectingText: !1,\n      draggingText: !1,\n      highlight: new ho(),\n      keySeq: null,\n      specialChars: null\n    }, t.autofocus && !to && a.input.focus(), Ki && ji < 11 && setTimeout(function () {\n      return o.display.input.reset(!0);\n    }, 20), function (e) {\n      function t() {\n        o.activeTouch && (l = setTimeout(function () {\n          return o.activeTouch = null;\n        }, 1e3), (s = o.activeTouch).end = +new Date());\n      }\n      function i(e, t) {\n        if (null == t.left) return !0;\n        var r = t.left - e.left,\n          n = t.top - e.top;\n        return r * r + n * n > 400;\n      }\n      var o = e.display;\n      No(o.scroller, \"mousedown\", xr(e, gi)), Ki && ji < 11 ? No(o.scroller, \"dblclick\", xr(e, function (t) {\n        if (!ge(e, t)) {\n          var r = Vt(e, t);\n          if (r && !yi(e, t) && !st(e.display, t)) {\n            be(t);\n            var n = e.findWordAt(r);\n            fn(e.doc, n.anchor, n.head);\n          }\n        }\n      })) : No(o.scroller, \"dblclick\", function (t) {\n        return ge(e, t) || be(t);\n      });\n      ao || No(o.scroller, \"contextmenu\", function (t) {\n        return bi(e, t);\n      });\n      var l,\n        s = {\n          end: 0\n        };\n      No(o.scroller, \"touchstart\", function (t) {\n        if (!ge(e, t) && !function (e) {\n          if (1 != e.touches.length) return !1;\n          var t = e.touches[0];\n          return t.radiusX <= 1 && t.radiusY <= 1;\n        }(t) && !yi(e, t)) {\n          o.input.ensurePolled(), clearTimeout(l);\n          var r = +new Date();\n          o.activeTouch = {\n            start: r,\n            moved: !1,\n            prev: r - s.end <= 300 ? s : null\n          }, 1 == t.touches.length && (o.activeTouch.left = t.touches[0].pageX, o.activeTouch.top = t.touches[0].pageY);\n        }\n      }), No(o.scroller, \"touchmove\", function () {\n        o.activeTouch && (o.activeTouch.moved = !0);\n      }), No(o.scroller, \"touchend\", function (r) {\n        var n = o.activeTouch;\n        if (n && !st(o, r) && null != n.left && !n.moved && new Date() - n.start < 300) {\n          var l,\n            s = e.coordsChar(o.activeTouch, \"page\");\n          l = !n.prev || i(n, n.prev) ? new rl(s, s) : !n.prev.prev || i(n, n.prev.prev) ? e.findWordAt(s) : new rl(H(s.line, 0), B(e.doc, H(s.line + 1, 0))), e.setSelection(l.anchor, l.head), e.focus(), be(r);\n        }\n        t();\n      }), No(o.scroller, \"touchcancel\", t), No(o.scroller, \"scroll\", function () {\n        o.scroller.clientHeight && (hr(e, o.scroller.scrollTop), dr(e, o.scroller.scrollLeft, !0), pe(e, \"scroll\", e));\n      }), No(o.scroller, \"mousewheel\", function (t) {\n        return Br(e, t);\n      }), No(o.scroller, \"DOMMouseScroll\", function (t) {\n        return Br(e, t);\n      }), No(o.wrapper, \"scroll\", function () {\n        return o.wrapper.scrollTop = o.wrapper.scrollLeft = 0;\n      }), o.dragFunctions = {\n        enter: function enter(t) {\n          ge(e, t) || Ce(t);\n        },\n        over: function over(t) {\n          ge(e, t) || (!function (e, t) {\n            var i = Vt(e, t);\n            if (i) {\n              var o = document.createDocumentFragment();\n              Yt(e, i, o), e.display.dragCursor || (e.display.dragCursor = n(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\"), e.display.lineSpace.insertBefore(e.display.dragCursor, e.display.cursorDiv)), r(e.display.dragCursor, o);\n            }\n          }(e, t), Ce(t));\n        },\n        start: function start(t) {\n          return function (e, t) {\n            if (Ki && (!e.state.draggingText || +new Date() - ul < 100)) Ce(t);else if (!ge(e, t) && !st(e.display, t) && (t.dataTransfer.setData(\"Text\", e.getSelection()), t.dataTransfer.effectAllowed = \"copyMove\", t.dataTransfer.setDragImage && !$i)) {\n              var r = n(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n              r.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\", qi && (r.width = r.height = 1, e.display.wrapper.appendChild(r), r._top = r.offsetTop), t.dataTransfer.setDragImage(r, 0, 0), qi && r.parentNode.removeChild(r);\n            }\n          }(e, t);\n        },\n        drop: xr(e, Vn),\n        leave: function leave(t) {\n          ge(e, t) || Kn(e);\n        }\n      };\n      var a = o.input.getField();\n      No(a, \"keyup\", function (t) {\n        return di.call(e, t);\n      }), No(a, \"keydown\", xr(e, fi)), No(a, \"keypress\", xr(e, pi)), No(a, \"focus\", function (t) {\n        return Qt(e, t);\n      }), No(a, \"blur\", function (t) {\n        return Jt(e, t);\n      });\n    }(this), Xn(), yr(this), this.curOp.forceUpdate = !0, Qr(this, l), t.autofocus && !to || this.hasFocus() ? setTimeout(u(Qt, this), 20) : Jt(this);\n    for (var h in Ll) Ll.hasOwnProperty(h) && Ll[h](o, t[h], Cl);\n    ir(this), t.finishInit && t.finishInit(this);\n    for (var f = 0; f < kl.length; ++f) kl[f](o);\n    br(this), Xi && t.lineWrapping && \"optimizelegibility\" == getComputedStyle(a.lineDiv).textRendering && (a.lineDiv.style.textRendering = \"auto\");\n  }\n  function ki(e, t, r, n) {\n    var i,\n      o = e.doc;\n    null == r && (r = \"add\"), \"smart\" == r && (o.mode.indent ? i = Pe(e, t).state : r = \"prev\");\n    var l = e.options.tabSize,\n      s = k(o, t),\n      a = h(s.text, null, l);\n    s.stateAfter && (s.stateAfter = null);\n    var u,\n      c = s.text.match(/^\\s*/)[0];\n    if (n || /\\S/.test(s.text)) {\n      if (\"smart\" == r && ((u = o.mode.indent(i, s.text.slice(c.length), s.text)) == vo || u > 150)) {\n        if (!n) return;\n        r = \"prev\";\n      }\n    } else u = 0, r = \"not\";\n    \"prev\" == r ? u = t > o.first ? h(k(o, t - 1).text, null, l) : 0 : \"add\" == r ? u = a + e.options.indentUnit : \"subtract\" == r ? u = a - e.options.indentUnit : \"number\" == typeof r && (u = a + r), u = Math.max(0, u);\n    var f = \"\",\n      d = 0;\n    if (e.options.indentWithTabs) for (var g = Math.floor(u / l); g; --g) d += l, f += \"\\t\";\n    if (d < u && (f += p(u - d)), f != c) return Dn(o, f, H(t, 0), H(t, c.length), \"+input\"), s.stateAfter = null, !0;\n    for (var v = 0; v < o.sel.ranges.length; v++) {\n      var m = o.sel.ranges[v];\n      if (m.head.line == t && m.head.ch < c.length) {\n        var y = H(t, c.length);\n        pn(o, v, new rl(y, y));\n        break;\n      }\n    }\n  }\n  function Ti(e) {\n    Tl = e;\n  }\n  function Mi(e, t, r, n, i) {\n    var o = e.doc;\n    e.display.shift = !1, n || (n = o.sel);\n    var l = e.state.pasteIncoming || \"paste\" == i,\n      s = Ao(t),\n      a = null;\n    if (l && n.ranges.length > 1) if (Tl && Tl.text.join(\"\\n\") == t) {\n      if (n.ranges.length % Tl.text.length == 0) {\n        a = [];\n        for (var u = 0; u < Tl.text.length; u++) a.push(o.splitLines(Tl.text[u]));\n      }\n    } else s.length == n.ranges.length && e.options.pasteLinesPerSelection && (a = v(s, function (e) {\n      return [e];\n    }));\n    for (var c, h = n.ranges.length - 1; h >= 0; h--) {\n      var f = n.ranges[h],\n        d = f.from(),\n        p = f.to();\n      f.empty() && (r && r > 0 ? d = H(d.line, d.ch - r) : e.state.overwrite && !l ? p = H(p.line, Math.min(k(o, p.line).text.length, p.ch + g(s).length)) : Tl && Tl.lineWise && Tl.text.join(\"\\n\") == t && (d = p = H(d.line, 0))), c = e.curOp.updateInput;\n      var m = {\n        from: d,\n        to: p,\n        text: a ? a[h % a.length] : s,\n        origin: i || (l ? \"paste\" : e.state.cutIncoming ? \"cut\" : \"+input\")\n      };\n      Mn(e.doc, m), $e(e, \"inputRead\", e, m);\n    }\n    t && !l && Oi(e, t), sr(e), e.curOp.updateInput = c, e.curOp.typing = !0, e.state.pasteIncoming = e.state.cutIncoming = !1;\n  }\n  function Ni(e, t) {\n    var r = e.clipboardData && e.clipboardData.getData(\"Text\");\n    if (r) return e.preventDefault(), t.isReadOnly() || t.options.disableInput || wr(t, function () {\n      return Mi(t, r, 0, null, \"paste\");\n    }), !0;\n  }\n  function Oi(e, t) {\n    if (e.options.electricChars && e.options.smartIndent) for (var r = e.doc.sel, n = r.ranges.length - 1; n >= 0; n--) {\n      var i = r.ranges[n];\n      if (!(i.head.ch > 100 || n && r.ranges[n - 1].head.line == i.head.line)) {\n        var o = e.getModeAt(i.head),\n          l = !1;\n        if (o.electricChars) {\n          for (var s = 0; s < o.electricChars.length; s++) if (t.indexOf(o.electricChars.charAt(s)) > -1) {\n            l = ki(e, i.head.line, \"smart\");\n            break;\n          }\n        } else o.electricInput && o.electricInput.test(k(e.doc, i.head.line).text.slice(0, i.head.ch)) && (l = ki(e, i.head.line, \"smart\"));\n        l && $e(e, \"electricInput\", e, i.head.line);\n      }\n    }\n  }\n  function Ai(e) {\n    for (var t = [], r = [], n = 0; n < e.doc.sel.ranges.length; n++) {\n      var i = e.doc.sel.ranges[n].head.line,\n        o = {\n          anchor: H(i, 0),\n          head: H(i + 1, 0)\n        };\n      r.push(o), t.push(e.getRange(o.anchor, o.head));\n    }\n    return {\n      text: t,\n      ranges: r\n    };\n  }\n  function Wi(e, t) {\n    e.setAttribute(\"autocorrect\", \"off\"), e.setAttribute(\"autocapitalize\", \"off\"), e.setAttribute(\"spellcheck\", !!t);\n  }\n  function Di() {\n    var e = n(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none\"),\n      t = n(\"div\", [e], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n    return Xi ? e.style.width = \"1000px\" : e.setAttribute(\"wrap\", \"off\"), Ji && (e.style.border = \"1px solid black\"), Wi(e), t;\n  }\n  function Hi(e, t, r, n, i) {\n    function o(n) {\n      var o;\n      if (null == (o = i ? function (e, t, r, n) {\n        var i = he(t, e.doc.direction);\n        if (!i) return ni(t, r, n);\n        r.ch >= t.text.length ? (r.ch = t.text.length, r.sticky = \"before\") : r.ch <= 0 && (r.ch = 0, r.sticky = \"after\");\n        var o = ce(i, r.ch, r.sticky),\n          l = i[o];\n        if (\"ltr\" == e.doc.direction && l.level % 2 == 0 && (n > 0 ? l.to > r.ch : l.from < r.ch)) return ni(t, r, n);\n        var s,\n          a = function a(e, r) {\n            return ri(t, e instanceof H ? e.ch : e, r);\n          },\n          u = function u(r) {\n            return e.options.lineWrapping ? (s = s || mt(e, t), Pt(e, t, s, r)) : {\n              begin: 0,\n              end: t.text.length\n            };\n          },\n          c = u(\"before\" == r.sticky ? a(r, -1) : r.ch);\n        if (\"rtl\" == e.doc.direction || 1 == l.level) {\n          var h = 1 == l.level == n < 0,\n            f = a(r, h ? 1 : -1);\n          if (null != f && (h ? f <= l.to && f <= c.end : f >= l.from && f >= c.begin)) {\n            var d = h ? \"before\" : \"after\";\n            return new H(r.line, f, d);\n          }\n        }\n        var p = function p(e, t, n) {\n            for (var o = function o(e, t) {\n              return t ? new H(r.line, a(e, 1), \"before\") : new H(r.line, e, \"after\");\n            }; e >= 0 && e < i.length; e += t) {\n              var l = i[e],\n                s = t > 0 == (1 != l.level),\n                u = s ? n.begin : a(n.end, -1);\n              if (l.from <= u && u < l.to) return o(u, s);\n              if (u = s ? l.from : a(l.to, -1), n.begin <= u && u < n.end) return o(u, s);\n            }\n          },\n          g = p(o + n, n, c);\n        if (g) return g;\n        var v = n > 0 ? c.end : a(c.begin, -1);\n        return null == v || n > 0 && v == t.text.length || !(g = p(n > 0 ? 0 : i.length - 1, n, u(v))) ? null : g;\n      }(e.cm, a, t, r) : ni(a, t, r))) {\n        if (n || !function () {\n          var n = t.line + r;\n          return !(n < e.first || n >= e.first + e.size) && (t = new H(n, t.ch, t.sticky), a = k(e, n));\n        }()) return !1;\n        t = ii(i, e.cm, a, t.line, r);\n      } else t = o;\n      return !0;\n    }\n    var l = t,\n      s = r,\n      a = k(e, t.line);\n    if (\"char\" == n) o();else if (\"column\" == n) o(!0);else if (\"word\" == n || \"group\" == n) for (var u = null, c = \"group\" == n, h = e.cm && e.cm.getHelper(t, \"wordChars\"), f = !0; !(r < 0) || o(!f); f = !1) {\n      var d = a.text.charAt(t.ch) || \"\\n\",\n        p = w(d, h) ? \"w\" : c && \"\\n\" == d ? \"n\" : !c || /\\s/.test(d) ? null : \"p\";\n      if (!c || f || p || (p = \"s\"), u && u != p) {\n        r < 0 && (r = 1, o(), t.sticky = \"after\");\n        break;\n      }\n      if (p && (u = p), r > 0 && !o(!f)) break;\n    }\n    var g = Sn(e, t, l, s, !0);\n    return P(l, g) && (g.hitSide = !0), g;\n  }\n  function Fi(e, t, r, n) {\n    var i,\n      o = e.doc,\n      l = t.left;\n    if (\"page\" == n) {\n      var s = Math.min(e.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight),\n        a = Math.max(s - .5 * zt(e.display), 3);\n      i = (r > 0 ? t.bottom : t.top) + r * a;\n    } else \"line\" == n && (i = r > 0 ? t.bottom + 3 : t.top - 3);\n    for (var u; (u = Ht(e, l, i)).outside;) {\n      if (r < 0 ? i <= 0 : i >= o.height) {\n        u.hitSide = !0;\n        break;\n      }\n      i += 5 * r;\n    }\n    return u;\n  }\n  function Pi(e, t) {\n    var r = vt(e, t.line);\n    if (!r || r.hidden) return null;\n    var n = k(e.doc, t.line),\n      i = pt(r, n, t.line),\n      o = he(n, e.doc.direction),\n      l = \"left\";\n    if (o) {\n      l = ce(o, t.ch) % 2 ? \"right\" : \"left\";\n    }\n    var s = bt(i.map, t.ch, l);\n    return s.offset = \"right\" == s.collapse ? s.end : s.start, s;\n  }\n  function Ei(e, t) {\n    return t && (e.bad = !0), e;\n  }\n  function zi(e, t, r) {\n    var n;\n    if (t == e.display.lineDiv) {\n      if (!(n = e.display.lineDiv.childNodes[r])) return Ei(e.clipPos(H(e.display.viewTo - 1)), !0);\n      t = null, r = 0;\n    } else for (n = t;; n = n.parentNode) {\n      if (!n || n == e.display.lineDiv) return null;\n      if (n.parentNode && n.parentNode == e.display.lineDiv) break;\n    }\n    for (var i = 0; i < e.display.view.length; i++) {\n      var l = e.display.view[i];\n      if (l.node == n) return function (e, t, r) {\n        function n(t, r, n) {\n          for (var i = -1; i < (h ? h.length : 0); i++) for (var o = i < 0 ? c.map : h[i], l = 0; l < o.length; l += 3) {\n            var s = o[l + 2];\n            if (s == t || s == r) {\n              var a = O(i < 0 ? e.line : e.rest[i]),\n                u = o[l] + n;\n              return (n < 0 || s != t) && (u = o[l + (n ? 1 : 0)]), H(a, u);\n            }\n          }\n        }\n        var i = e.text.firstChild,\n          l = !1;\n        if (!t || !o(i, t)) return Ei(H(O(e.line), 0), !0);\n        if (t == i && (l = !0, t = i.childNodes[r], r = 0, !t)) {\n          var s = e.rest ? g(e.rest) : e.line;\n          return Ei(H(O(s), s.text.length), l);\n        }\n        var a = 3 == t.nodeType ? t : null,\n          u = t;\n        a || 1 != t.childNodes.length || 3 != t.firstChild.nodeType || (a = t.firstChild, r && (r = a.nodeValue.length));\n        for (; u.parentNode != i;) u = u.parentNode;\n        var c = e.measure,\n          h = c.maps;\n        var f = n(a, u, r);\n        if (f) return Ei(f, l);\n        for (var d = u.nextSibling, p = a ? a.nodeValue.length - r : 0; d; d = d.nextSibling) {\n          if (f = n(d, d.firstChild, 0)) return Ei(H(f.line, f.ch - p), l);\n          p += d.textContent.length;\n        }\n        for (var v = u.previousSibling, m = r; v; v = v.previousSibling) {\n          if (f = n(v, v.firstChild, -1)) return Ei(H(f.line, f.ch + m), l);\n          m += v.textContent.length;\n        }\n      }(l, t, r);\n    }\n  }\n  var Ii = navigator.userAgent,\n    Ri = navigator.platform,\n    Bi = /gecko\\/\\d/i.test(Ii),\n    Gi = /MSIE \\d/.test(Ii),\n    Ui = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(Ii),\n    Vi = /Edge\\/(\\d+)/.exec(Ii),\n    Ki = Gi || Ui || Vi,\n    ji = Ki && (Gi ? document.documentMode || 6 : +(Vi || Ui)[1]),\n    Xi = !Vi && /WebKit\\//.test(Ii),\n    Yi = Xi && /Qt\\/\\d+\\.\\d+/.test(Ii),\n    _i = !Vi && /Chrome\\//.test(Ii),\n    qi = /Opera\\//.test(Ii),\n    $i = /Apple Computer/.test(navigator.vendor),\n    Zi = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(Ii),\n    Qi = /PhantomJS/.test(Ii),\n    Ji = !Vi && /AppleWebKit/.test(Ii) && /Mobile\\/\\w+/.test(Ii),\n    eo = /Android/.test(Ii),\n    to = Ji || eo || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ii),\n    ro = Ji || /Mac/.test(Ri),\n    no = /\\bCrOS\\b/.test(Ii),\n    io = /win/i.test(Ri),\n    oo = qi && Ii.match(/Version\\/(\\d*\\.\\d*)/);\n  oo && (oo = Number(oo[1])), oo && oo >= 15 && (qi = !1, Xi = !0);\n  var lo,\n    so = ro && (Yi || qi && (null == oo || oo < 12.11)),\n    ao = Bi || Ki && ji >= 9,\n    uo = function uo(t, r) {\n      var n = t.className,\n        i = e(r).exec(n);\n      if (i) {\n        var o = n.slice(i.index + i[0].length);\n        t.className = n.slice(0, i.index) + (o ? i[1] + o : \"\");\n      }\n    };\n  lo = document.createRange ? function (e, t, r, n) {\n    var i = document.createRange();\n    return i.setEnd(n || e, r), i.setStart(e, t), i;\n  } : function (e, t, r) {\n    var n = document.body.createTextRange();\n    try {\n      n.moveToElementText(e.parentNode);\n    } catch (e) {\n      return n;\n    }\n    return n.collapse(!0), n.moveEnd(\"character\", r), n.moveStart(\"character\", t), n;\n  };\n  var co = function co(e) {\n    e.select();\n  };\n  Ji ? co = function co(e) {\n    e.selectionStart = 0, e.selectionEnd = e.value.length;\n  } : Ki && (co = function co(e) {\n    try {\n      e.select();\n    } catch (e) {}\n  });\n  var ho = function ho() {\n    this.id = null;\n  };\n  ho.prototype.set = function (e, t) {\n    clearTimeout(this.id), this.id = setTimeout(t, e);\n  };\n  var fo,\n    po,\n    go = 30,\n    vo = {\n      toString: function toString() {\n        return \"CodeMirror.Pass\";\n      }\n    },\n    mo = {\n      scroll: !1\n    },\n    yo = {\n      origin: \"*mouse\"\n    },\n    bo = {\n      origin: \"+move\"\n    },\n    wo = [\"\"],\n    xo = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/,\n    Co = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/,\n    So = !1,\n    Lo = !1,\n    ko = null,\n    To = function () {\n      function e(e) {\n        return e <= 247 ? r.charAt(e) : 1424 <= e && e <= 1524 ? \"R\" : 1536 <= e && e <= 1785 ? n.charAt(e - 1536) : 1774 <= e && e <= 2220 ? \"r\" : 8192 <= e && e <= 8203 ? \"w\" : 8204 == e ? \"b\" : \"L\";\n      }\n      function t(e, t, r) {\n        this.level = e, this.from = t, this.to = r;\n      }\n      var r = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\",\n        n = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\",\n        i = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/,\n        o = /[stwN]/,\n        l = /[LRr]/,\n        s = /[Lb1n]/,\n        a = /[1n]/;\n      return function (r, n) {\n        var u = \"ltr\" == n ? \"L\" : \"R\";\n        if (0 == r.length || \"ltr\" == n && !i.test(r)) return !1;\n        for (var c = r.length, h = [], f = 0; f < c; ++f) h.push(e(r.charCodeAt(f)));\n        for (var d = 0, p = u; d < c; ++d) {\n          var v = h[d];\n          \"m\" == v ? h[d] = p : p = v;\n        }\n        for (var m = 0, y = u; m < c; ++m) {\n          var b = h[m];\n          \"1\" == b && \"r\" == y ? h[m] = \"n\" : l.test(b) && (y = b, \"r\" == b && (h[m] = \"R\"));\n        }\n        for (var w = 1, x = h[0]; w < c - 1; ++w) {\n          var C = h[w];\n          \"+\" == C && \"1\" == x && \"1\" == h[w + 1] ? h[w] = \"1\" : \",\" != C || x != h[w + 1] || \"1\" != x && \"n\" != x || (h[w] = x), x = C;\n        }\n        for (var S = 0; S < c; ++S) {\n          var L = h[S];\n          if (\",\" == L) h[S] = \"N\";else if (\"%\" == L) {\n            var k = void 0;\n            for (k = S + 1; k < c && \"%\" == h[k]; ++k);\n            for (var T = S && \"!\" == h[S - 1] || k < c && \"1\" == h[k] ? \"1\" : \"N\", M = S; M < k; ++M) h[M] = T;\n            S = k - 1;\n          }\n        }\n        for (var N = 0, O = u; N < c; ++N) {\n          var A = h[N];\n          \"L\" == O && \"1\" == A ? h[N] = \"L\" : l.test(A) && (O = A);\n        }\n        for (var W = 0; W < c; ++W) if (o.test(h[W])) {\n          var D = void 0;\n          for (D = W + 1; D < c && o.test(h[D]); ++D);\n          for (var H = \"L\" == (W ? h[W - 1] : u), F = H == (\"L\" == (D < c ? h[D] : u)) ? H ? \"L\" : \"R\" : u, P = W; P < D; ++P) h[P] = F;\n          W = D - 1;\n        }\n        for (var E, z = [], I = 0; I < c;) if (s.test(h[I])) {\n          var R = I;\n          for (++I; I < c && s.test(h[I]); ++I);\n          z.push(new t(0, R, I));\n        } else {\n          var B = I,\n            G = z.length;\n          for (++I; I < c && \"L\" != h[I]; ++I);\n          for (var U = B; U < I;) if (a.test(h[U])) {\n            B < U && z.splice(G, 0, new t(1, B, U));\n            var V = U;\n            for (++U; U < I && a.test(h[U]); ++U);\n            z.splice(G, 0, new t(2, V, U)), B = U;\n          } else ++U;\n          B < I && z.splice(G, 0, new t(1, B, I));\n        }\n        return \"ltr\" == n && (1 == z[0].level && (E = r.match(/^\\s+/)) && (z[0].from = E[0].length, z.unshift(new t(0, 0, E[0].length))), 1 == g(z).level && (E = r.match(/\\s+$/)) && (g(z).to -= E[0].length, z.push(new t(0, c - E[0].length, c)))), \"rtl\" == n ? z.reverse() : z;\n      };\n    }(),\n    Mo = [],\n    No = function No(e, t, r) {\n      if (e.addEventListener) e.addEventListener(t, r, !1);else if (e.attachEvent) e.attachEvent(\"on\" + t, r);else {\n        var n = e._handlers || (e._handlers = {});\n        n[t] = (n[t] || Mo).concat(r);\n      }\n    },\n    Oo = function () {\n      if (Ki && ji < 9) return !1;\n      var e = n(\"div\");\n      return \"draggable\" in e || \"dragDrop\" in e;\n    }(),\n    Ao = 3 != \"\\n\\nb\".split(/\\n/).length ? function (e) {\n      for (var t = 0, r = [], n = e.length; t <= n;) {\n        var i = e.indexOf(\"\\n\", t);\n        -1 == i && (i = e.length);\n        var o = e.slice(t, \"\\r\" == e.charAt(i - 1) ? i - 1 : i),\n          l = o.indexOf(\"\\r\");\n        -1 != l ? (r.push(o.slice(0, l)), t += l + 1) : (r.push(o), t = i + 1);\n      }\n      return r;\n    } : function (e) {\n      return e.split(/\\r\\n?|\\n/);\n    },\n    Wo = window.getSelection ? function (e) {\n      try {\n        return e.selectionStart != e.selectionEnd;\n      } catch (e) {\n        return !1;\n      }\n    } : function (e) {\n      var t;\n      try {\n        t = e.ownerDocument.selection.createRange();\n      } catch (e) {}\n      return !(!t || t.parentElement() != e) && 0 != t.compareEndPoints(\"StartToEnd\", t);\n    },\n    Do = function () {\n      var e = n(\"div\");\n      return \"oncopy\" in e || (e.setAttribute(\"oncopy\", \"return;\"), \"function\" == typeof e.oncopy);\n    }(),\n    Ho = null,\n    Fo = {},\n    Po = {},\n    Eo = {},\n    zo = function zo(e, t, r) {\n      this.pos = this.start = 0, this.string = e, this.tabSize = t || 8, this.lastColumnPos = this.lastColumnValue = 0, this.lineStart = 0, this.lineOracle = r;\n    };\n  zo.prototype.eol = function () {\n    return this.pos >= this.string.length;\n  }, zo.prototype.sol = function () {\n    return this.pos == this.lineStart;\n  }, zo.prototype.peek = function () {\n    return this.string.charAt(this.pos) || void 0;\n  }, zo.prototype.next = function () {\n    if (this.pos < this.string.length) return this.string.charAt(this.pos++);\n  }, zo.prototype.eat = function (e) {\n    var t = this.string.charAt(this.pos);\n    if (\"string\" == typeof e ? t == e : t && (e.test ? e.test(t) : e(t))) return ++this.pos, t;\n  }, zo.prototype.eatWhile = function (e) {\n    for (var t = this.pos; this.eat(e););\n    return this.pos > t;\n  }, zo.prototype.eatSpace = function () {\n    for (var e = this.pos; /[\\s\\u00a0]/.test(this.string.charAt(this.pos));) ++this.pos;\n    return this.pos > e;\n  }, zo.prototype.skipToEnd = function () {\n    this.pos = this.string.length;\n  }, zo.prototype.skipTo = function (e) {\n    var t = this.string.indexOf(e, this.pos);\n    if (t > -1) return this.pos = t, !0;\n  }, zo.prototype.backUp = function (e) {\n    this.pos -= e;\n  }, zo.prototype.column = function () {\n    return this.lastColumnPos < this.start && (this.lastColumnValue = h(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue), this.lastColumnPos = this.start), this.lastColumnValue - (this.lineStart ? h(this.string, this.lineStart, this.tabSize) : 0);\n  }, zo.prototype.indentation = function () {\n    return h(this.string, null, this.tabSize) - (this.lineStart ? h(this.string, this.lineStart, this.tabSize) : 0);\n  }, zo.prototype.match = function (e, t, r) {\n    if (\"string\" != typeof e) {\n      var n = this.string.slice(this.pos).match(e);\n      return n && n.index > 0 ? null : (n && !1 !== t && (this.pos += n[0].length), n);\n    }\n    var i = function i(e) {\n      return r ? e.toLowerCase() : e;\n    };\n    if (i(this.string.substr(this.pos, e.length)) == i(e)) return !1 !== t && (this.pos += e.length), !0;\n  }, zo.prototype.current = function () {\n    return this.string.slice(this.start, this.pos);\n  }, zo.prototype.hideFirstChars = function (e, t) {\n    this.lineStart += e;\n    try {\n      return t();\n    } finally {\n      this.lineStart -= e;\n    }\n  }, zo.prototype.lookAhead = function (e) {\n    var t = this.lineOracle;\n    return t && t.lookAhead(e);\n  }, zo.prototype.baseToken = function () {\n    var e = this.lineOracle;\n    return e && e.baseToken(this.pos);\n  };\n  var Io = function Io(e, t) {\n      this.state = e, this.lookAhead = t;\n    },\n    Ro = function Ro(e, t, r, n) {\n      this.state = t, this.doc = e, this.line = r, this.maxLookAhead = n || 0, this.baseTokens = null, this.baseTokenPos = 1;\n    };\n  Ro.prototype.lookAhead = function (e) {\n    var t = this.doc.getLine(this.line + e);\n    return null != t && e > this.maxLookAhead && (this.maxLookAhead = e), t;\n  }, Ro.prototype.baseToken = function (e) {\n    if (!this.baseTokens) return null;\n    for (; this.baseTokens[this.baseTokenPos] <= e;) this.baseTokenPos += 2;\n    var t = this.baseTokens[this.baseTokenPos + 1];\n    return {\n      type: t && t.replace(/( |^)overlay .*/, \"\"),\n      size: this.baseTokens[this.baseTokenPos] - e\n    };\n  }, Ro.prototype.nextLine = function () {\n    this.line++, this.maxLookAhead > 0 && this.maxLookAhead--;\n  }, Ro.fromSaved = function (e, t, r) {\n    return t instanceof Io ? new Ro(e, Ae(e.mode, t.state), r, t.lookAhead) : new Ro(e, Ae(e.mode, t), r);\n  }, Ro.prototype.save = function (e) {\n    var t = !1 !== e ? Ae(this.doc.mode, this.state) : this.state;\n    return this.maxLookAhead > 0 ? new Io(t, this.maxLookAhead) : t;\n  };\n  var Bo = function Bo(e, t, r) {\n      this.start = e.start, this.end = e.pos, this.string = e.current(), this.type = t || null, this.state = r;\n    },\n    Go = function Go(e, t, r) {\n      this.text = e, _(this, t), this.height = r ? r(this) : 1;\n    };\n  Go.prototype.lineNo = function () {\n    return O(this);\n  }, ye(Go);\n  var Uo,\n    Vo = {},\n    Ko = {},\n    jo = null,\n    Xo = null,\n    Yo = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    },\n    _o = function _o(e, t, r) {\n      this.cm = r;\n      var i = this.vert = n(\"div\", [n(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\"),\n        o = this.horiz = n(\"div\", [n(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n      e(i), e(o), No(i, \"scroll\", function () {\n        i.clientHeight && t(i.scrollTop, \"vertical\");\n      }), No(o, \"scroll\", function () {\n        o.clientWidth && t(o.scrollLeft, \"horizontal\");\n      }), this.checkedZeroWidth = !1, Ki && ji < 8 && (this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\");\n    };\n  _o.prototype.update = function (e) {\n    var t = e.scrollWidth > e.clientWidth + 1,\n      r = e.scrollHeight > e.clientHeight + 1,\n      n = e.nativeBarWidth;\n    if (r) {\n      this.vert.style.display = \"block\", this.vert.style.bottom = t ? n + \"px\" : \"0\";\n      var i = e.viewHeight - (t ? n : 0);\n      this.vert.firstChild.style.height = Math.max(0, e.scrollHeight - e.clientHeight + i) + \"px\";\n    } else this.vert.style.display = \"\", this.vert.firstChild.style.height = \"0\";\n    if (t) {\n      this.horiz.style.display = \"block\", this.horiz.style.right = r ? n + \"px\" : \"0\", this.horiz.style.left = e.barLeft + \"px\";\n      var o = e.viewWidth - e.barLeft - (r ? n : 0);\n      this.horiz.firstChild.style.width = Math.max(0, e.scrollWidth - e.clientWidth + o) + \"px\";\n    } else this.horiz.style.display = \"\", this.horiz.firstChild.style.width = \"0\";\n    return !this.checkedZeroWidth && e.clientHeight > 0 && (0 == n && this.zeroWidthHack(), this.checkedZeroWidth = !0), {\n      right: r ? n : 0,\n      bottom: t ? n : 0\n    };\n  }, _o.prototype.setScrollLeft = function (e) {\n    this.horiz.scrollLeft != e && (this.horiz.scrollLeft = e), this.disableHoriz && this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\");\n  }, _o.prototype.setScrollTop = function (e) {\n    this.vert.scrollTop != e && (this.vert.scrollTop = e), this.disableVert && this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\");\n  }, _o.prototype.zeroWidthHack = function () {\n    var e = ro && !Zi ? \"12px\" : \"18px\";\n    this.horiz.style.height = this.vert.style.width = e, this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\", this.disableHoriz = new ho(), this.disableVert = new ho();\n  }, _o.prototype.enableZeroWidthBar = function (e, t, r) {\n    function n() {\n      var i = e.getBoundingClientRect();\n      (\"vert\" == r ? document.elementFromPoint(i.right - 1, (i.top + i.bottom) / 2) : document.elementFromPoint((i.right + i.left) / 2, i.bottom - 1)) != e ? e.style.pointerEvents = \"none\" : t.set(1e3, n);\n    }\n    e.style.pointerEvents = \"auto\", t.set(1e3, n);\n  }, _o.prototype.clear = function () {\n    var e = this.horiz.parentNode;\n    e.removeChild(this.horiz), e.removeChild(this.vert);\n  };\n  var qo = function qo() {};\n  qo.prototype.update = function () {\n    return {\n      bottom: 0,\n      right: 0\n    };\n  }, qo.prototype.setScrollLeft = function () {}, qo.prototype.setScrollTop = function () {}, qo.prototype.clear = function () {};\n  var $o = {\n      native: _o,\n      null: qo\n    },\n    Zo = 0,\n    Qo = function Qo(e, t, r) {\n      var n = e.display;\n      this.viewport = t, this.visible = rr(n, e.doc, t), this.editorIsHidden = !n.wrapper.offsetWidth, this.wrapperHeight = n.wrapper.clientHeight, this.wrapperWidth = n.wrapper.clientWidth, this.oldDisplayWidth = ft(e), this.force = r, this.dims = Rt(e), this.events = [];\n    };\n  Qo.prototype.signal = function (e, t) {\n    me(e, t) && this.events.push(arguments);\n  }, Qo.prototype.finish = function () {\n    for (var e = 0; e < this.events.length; e++) pe.apply(null, this.events[e]);\n  };\n  var Jo = 0,\n    el = null;\n  Ki ? el = -.53 : Bi ? el = 15 : _i ? el = -.7 : $i && (el = -1 / 3);\n  var tl = function tl(e, t) {\n    this.ranges = e, this.primIndex = t;\n  };\n  tl.prototype.primary = function () {\n    return this.ranges[this.primIndex];\n  }, tl.prototype.equals = function (e) {\n    if (e == this) return !0;\n    if (e.primIndex != this.primIndex || e.ranges.length != this.ranges.length) return !1;\n    for (var t = 0; t < this.ranges.length; t++) {\n      var r = this.ranges[t],\n        n = e.ranges[t];\n      if (!P(r.anchor, n.anchor) || !P(r.head, n.head)) return !1;\n    }\n    return !0;\n  }, tl.prototype.deepCopy = function () {\n    for (var e = [], t = 0; t < this.ranges.length; t++) e[t] = new rl(E(this.ranges[t].anchor), E(this.ranges[t].head));\n    return new tl(e, this.primIndex);\n  }, tl.prototype.somethingSelected = function () {\n    for (var e = 0; e < this.ranges.length; e++) if (!this.ranges[e].empty()) return !0;\n    return !1;\n  }, tl.prototype.contains = function (e, t) {\n    t || (t = e);\n    for (var r = 0; r < this.ranges.length; r++) {\n      var n = this.ranges[r];\n      if (F(t, n.from()) >= 0 && F(e, n.to()) <= 0) return r;\n    }\n    return -1;\n  };\n  var rl = function rl(e, t) {\n    this.anchor = e, this.head = t;\n  };\n  rl.prototype.from = function () {\n    return I(this.anchor, this.head);\n  }, rl.prototype.to = function () {\n    return z(this.anchor, this.head);\n  }, rl.prototype.empty = function () {\n    return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;\n  }, zn.prototype = {\n    chunkSize: function chunkSize() {\n      return this.lines.length;\n    },\n    removeInner: function removeInner(e, t) {\n      for (var r = e, n = e + t; r < n; ++r) {\n        var i = this.lines[r];\n        this.height -= i.height, Ue(i), $e(i, \"delete\");\n      }\n      this.lines.splice(e, t);\n    },\n    collapse: function collapse(e) {\n      e.push.apply(e, this.lines);\n    },\n    insertInner: function insertInner(e, t, r) {\n      this.height += r, this.lines = this.lines.slice(0, e).concat(t).concat(this.lines.slice(e));\n      for (var n = 0; n < t.length; ++n) t[n].parent = this;\n    },\n    iterN: function iterN(e, t, r) {\n      for (var n = e + t; e < n; ++e) if (r(this.lines[e])) return !0;\n    }\n  }, In.prototype = {\n    chunkSize: function chunkSize() {\n      return this.size;\n    },\n    removeInner: function removeInner(e, t) {\n      this.size -= t;\n      for (var r = 0; r < this.children.length; ++r) {\n        var n = this.children[r],\n          i = n.chunkSize();\n        if (e < i) {\n          var o = Math.min(t, i - e),\n            l = n.height;\n          if (n.removeInner(e, o), this.height -= l - n.height, i == o && (this.children.splice(r--, 1), n.parent = null), 0 == (t -= o)) break;\n          e = 0;\n        } else e -= i;\n      }\n      if (this.size - t < 25 && (this.children.length > 1 || !(this.children[0] instanceof zn))) {\n        var s = [];\n        this.collapse(s), this.children = [new zn(s)], this.children[0].parent = this;\n      }\n    },\n    collapse: function collapse(e) {\n      for (var t = 0; t < this.children.length; ++t) this.children[t].collapse(e);\n    },\n    insertInner: function insertInner(e, t, r) {\n      this.size += t.length, this.height += r;\n      for (var n = 0; n < this.children.length; ++n) {\n        var i = this.children[n],\n          o = i.chunkSize();\n        if (e <= o) {\n          if (i.insertInner(e, t, r), i.lines && i.lines.length > 50) {\n            for (var l = i.lines.length % 25 + 25, s = l; s < i.lines.length;) {\n              var a = new zn(i.lines.slice(s, s += 25));\n              i.height -= a.height, this.children.splice(++n, 0, a), a.parent = this;\n            }\n            i.lines = i.lines.slice(0, l), this.maybeSpill();\n          }\n          break;\n        }\n        e -= o;\n      }\n    },\n    maybeSpill: function maybeSpill() {\n      if (!(this.children.length <= 10)) {\n        var e = this;\n        do {\n          var t = new In(e.children.splice(e.children.length - 5, 5));\n          if (e.parent) {\n            e.size -= t.size, e.height -= t.height;\n            var r = f(e.parent.children, e);\n            e.parent.children.splice(r + 1, 0, t);\n          } else {\n            var n = new In(e.children);\n            n.parent = e, e.children = [n, t], e = n;\n          }\n          t.parent = e.parent;\n        } while (e.children.length > 10);\n        e.parent.maybeSpill();\n      }\n    },\n    iterN: function iterN(e, t, r) {\n      for (var n = 0; n < this.children.length; ++n) {\n        var i = this.children[n],\n          o = i.chunkSize();\n        if (e < o) {\n          var l = Math.min(t, o - e);\n          if (i.iterN(e, l, r)) return !0;\n          if (0 == (t -= l)) break;\n          e = 0;\n        } else e -= o;\n      }\n    }\n  };\n  var nl = function nl(e, t, r) {\n    if (r) for (var n in r) r.hasOwnProperty(n) && (this[n] = r[n]);\n    this.doc = e, this.node = t;\n  };\n  nl.prototype.clear = function () {\n    var e = this.doc.cm,\n      t = this.line.widgets,\n      r = this.line,\n      n = O(r);\n    if (null != n && t) {\n      for (var i = 0; i < t.length; ++i) t[i] == this && t.splice(i--, 1);\n      t.length || (r.widgets = null);\n      var o = lt(this);\n      N(r, Math.max(0, r.height - o)), e && (wr(e, function () {\n        Rn(e, r, -o), kr(e, n, \"widget\");\n      }), $e(e, \"lineWidgetCleared\", e, this, n));\n    }\n  }, nl.prototype.changed = function () {\n    var e = this,\n      t = this.height,\n      r = this.doc.cm,\n      n = this.line;\n    this.height = null;\n    var i = lt(this) - t;\n    i && (N(n, n.height + i), r && wr(r, function () {\n      r.curOp.forceUpdate = !0, Rn(r, n, i), $e(r, \"lineWidgetChanged\", r, e, O(n));\n    }));\n  }, ye(nl);\n  var il = 0,\n    ol = function ol(e, t) {\n      this.lines = [], this.type = t, this.doc = e, this.id = ++il;\n    };\n  ol.prototype.clear = function () {\n    if (!this.explicitlyCleared) {\n      var e = this.doc.cm,\n        t = e && !e.curOp;\n      if (t && yr(e), me(this, \"clear\")) {\n        var r = this.find();\n        r && $e(this, \"clear\", r.from, r.to);\n      }\n      for (var n = null, i = null, o = 0; o < this.lines.length; ++o) {\n        var l = this.lines[o],\n          s = V(l.markedSpans, this);\n        e && !this.collapsed ? kr(e, O(l), \"text\") : e && (null != s.to && (i = O(l)), null != s.from && (n = O(l))), l.markedSpans = K(l.markedSpans, s), null == s.from && this.collapsed && !oe(this.doc, l) && e && N(l, zt(e.display));\n      }\n      if (e && this.collapsed && !e.options.lineWrapping) for (var a = 0; a < this.lines.length; ++a) {\n        var u = re(this.lines[a]),\n          c = ae(u);\n        c > e.display.maxLineLength && (e.display.maxLine = u, e.display.maxLineLength = c, e.display.maxLineChanged = !0);\n      }\n      null != n && e && this.collapsed && Lr(e, n, i + 1), this.lines.length = 0, this.explicitlyCleared = !0, this.atomic && this.doc.cantEdit && (this.doc.cantEdit = !1, e && wn(e.doc)), e && $e(e, \"markerCleared\", e, this, n, i), t && br(e), this.parent && this.parent.clear();\n    }\n  }, ol.prototype.find = function (e, t) {\n    null == e && \"bookmark\" == this.type && (e = 1);\n    for (var r, n, i = 0; i < this.lines.length; ++i) {\n      var o = this.lines[i],\n        l = V(o.markedSpans, this);\n      if (null != l.from && (r = H(t ? o : O(o), l.from), -1 == e)) return r;\n      if (null != l.to && (n = H(t ? o : O(o), l.to), 1 == e)) return n;\n    }\n    return r && {\n      from: r,\n      to: n\n    };\n  }, ol.prototype.changed = function () {\n    var e = this,\n      t = this.find(-1, !0),\n      r = this,\n      n = this.doc.cm;\n    t && n && wr(n, function () {\n      var i = t.line,\n        o = O(t.line),\n        l = vt(n, o);\n      if (l && (xt(l), n.curOp.selectionChanged = n.curOp.forceUpdate = !0), n.curOp.updateMaxLine = !0, !oe(r.doc, i) && null != r.height) {\n        var s = r.height;\n        r.height = null;\n        var a = lt(r) - s;\n        a && N(i, i.height + a);\n      }\n      $e(n, \"markerChanged\", n, e);\n    });\n  }, ol.prototype.attachLine = function (e) {\n    if (!this.lines.length && this.doc.cm) {\n      var t = this.doc.cm.curOp;\n      t.maybeHiddenMarkers && -1 != f(t.maybeHiddenMarkers, this) || (t.maybeUnhiddenMarkers || (t.maybeUnhiddenMarkers = [])).push(this);\n    }\n    this.lines.push(e);\n  }, ol.prototype.detachLine = function (e) {\n    if (this.lines.splice(f(this.lines, e), 1), !this.lines.length && this.doc.cm) {\n      var t = this.doc.cm.curOp;\n      (t.maybeHiddenMarkers || (t.maybeHiddenMarkers = [])).push(this);\n    }\n  }, ye(ol);\n  var ll = function ll(e, t) {\n    this.markers = e, this.primary = t;\n    for (var r = 0; r < e.length; ++r) e[r].parent = this;\n  };\n  ll.prototype.clear = function () {\n    if (!this.explicitlyCleared) {\n      this.explicitlyCleared = !0;\n      for (var e = 0; e < this.markers.length; ++e) this.markers[e].clear();\n      $e(this, \"clear\");\n    }\n  }, ll.prototype.find = function (e, t) {\n    return this.primary.find(e, t);\n  }, ye(ll);\n  var sl = 0,\n    al = function al(e, t, r, n, i) {\n      if (!(this instanceof al)) return new al(e, t, r, n, i);\n      null == r && (r = 0), In.call(this, [new zn([new Go(\"\", null)])]), this.first = r, this.scrollTop = this.scrollLeft = 0, this.cantEdit = !1, this.cleanGeneration = 1, this.modeFrontier = this.highlightFrontier = r;\n      var o = H(r, 0);\n      this.sel = Ur(o), this.history = new en(null), this.id = ++sl, this.modeOption = t, this.lineSep = n, this.direction = \"rtl\" == i ? \"rtl\" : \"ltr\", this.extend = !1, \"string\" == typeof e && (e = this.splitLines(e)), $r(this, {\n        from: o,\n        to: o,\n        text: e\n      }), mn(this, Ur(o), mo);\n    };\n  al.prototype = y(In.prototype, {\n    constructor: al,\n    iter: function iter(e, t, r) {\n      r ? this.iterN(e - this.first, t - e, r) : this.iterN(this.first, this.first + this.size, e);\n    },\n    insert: function insert(e, t) {\n      for (var r = 0, n = 0; n < t.length; ++n) r += t[n].height;\n      this.insertInner(e - this.first, t, r);\n    },\n    remove: function remove(e, t) {\n      this.removeInner(e - this.first, t);\n    },\n    getValue: function getValue(e) {\n      var t = M(this, this.first, this.first + this.size);\n      return !1 === e ? t : t.join(e || this.lineSeparator());\n    },\n    setValue: Sr(function (e) {\n      var t = H(this.first, 0),\n        r = this.first + this.size - 1;\n      Mn(this, {\n        from: t,\n        to: H(r, k(this, r).text.length),\n        text: this.splitLines(e),\n        origin: \"setValue\",\n        full: !0\n      }, !0), this.cm && ar(this.cm, 0, 0), mn(this, Ur(t), mo);\n    }),\n    replaceRange: function replaceRange(e, t, r, n) {\n      Dn(this, e, t = B(this, t), r = r ? B(this, r) : t, n);\n    },\n    getRange: function getRange(e, t, r) {\n      var n = T(this, B(this, e), B(this, t));\n      return !1 === r ? n : n.join(r || this.lineSeparator());\n    },\n    getLine: function getLine(e) {\n      var t = this.getLineHandle(e);\n      return t && t.text;\n    },\n    getLineHandle: function getLineHandle(e) {\n      if (W(this, e)) return k(this, e);\n    },\n    getLineNumber: function getLineNumber(e) {\n      return O(e);\n    },\n    getLineHandleVisualStart: function getLineHandleVisualStart(e) {\n      return \"number\" == typeof e && (e = k(this, e)), re(e);\n    },\n    lineCount: function lineCount() {\n      return this.size;\n    },\n    firstLine: function firstLine() {\n      return this.first;\n    },\n    lastLine: function lastLine() {\n      return this.first + this.size - 1;\n    },\n    clipPos: function clipPos(e) {\n      return B(this, e);\n    },\n    getCursor: function getCursor(e) {\n      var t = this.sel.primary();\n      return null == e || \"head\" == e ? t.head : \"anchor\" == e ? t.anchor : \"end\" == e || \"to\" == e || !1 === e ? t.to() : t.from();\n    },\n    listSelections: function listSelections() {\n      return this.sel.ranges;\n    },\n    somethingSelected: function somethingSelected() {\n      return this.sel.somethingSelected();\n    },\n    setCursor: Sr(function (e, t, r) {\n      gn(this, B(this, \"number\" == typeof e ? H(e, t || 0) : e), null, r);\n    }),\n    setSelection: Sr(function (e, t, r) {\n      gn(this, B(this, e), B(this, t || e), r);\n    }),\n    extendSelection: Sr(function (e, t, r) {\n      fn(this, B(this, e), t && B(this, t), r);\n    }),\n    extendSelections: Sr(function (e, t) {\n      dn(this, G(this, e), t);\n    }),\n    extendSelectionsBy: Sr(function (e, t) {\n      dn(this, G(this, v(this.sel.ranges, e)), t);\n    }),\n    setSelections: Sr(function (e, t, r) {\n      if (e.length) {\n        for (var n = [], i = 0; i < e.length; i++) n[i] = new rl(B(this, e[i].anchor), B(this, e[i].head));\n        null == t && (t = Math.min(e.length - 1, this.sel.primIndex)), mn(this, Gr(n, t), r);\n      }\n    }),\n    addSelection: Sr(function (e, t, r) {\n      var n = this.sel.ranges.slice(0);\n      n.push(new rl(B(this, e), B(this, t || e))), mn(this, Gr(n, n.length - 1), r);\n    }),\n    getSelection: function getSelection(e) {\n      for (var t, r = this.sel.ranges, n = 0; n < r.length; n++) {\n        var i = T(this, r[n].from(), r[n].to());\n        t = t ? t.concat(i) : i;\n      }\n      return !1 === e ? t : t.join(e || this.lineSeparator());\n    },\n    getSelections: function getSelections(e) {\n      for (var t = [], r = this.sel.ranges, n = 0; n < r.length; n++) {\n        var i = T(this, r[n].from(), r[n].to());\n        !1 !== e && (i = i.join(e || this.lineSeparator())), t[n] = i;\n      }\n      return t;\n    },\n    replaceSelection: function replaceSelection(e, t, r) {\n      for (var n = [], i = 0; i < this.sel.ranges.length; i++) n[i] = e;\n      this.replaceSelections(n, t, r || \"+input\");\n    },\n    replaceSelections: Sr(function (e, t, r) {\n      for (var n = [], i = this.sel, o = 0; o < i.ranges.length; o++) {\n        var l = i.ranges[o];\n        n[o] = {\n          from: l.from(),\n          to: l.to(),\n          text: this.splitLines(e[o]),\n          origin: r\n        };\n      }\n      for (var s = t && \"end\" != t && function (e, t, r) {\n          for (var n = [], i = H(e.first, 0), o = i, l = 0; l < t.length; l++) {\n            var s = t[l],\n              a = Xr(s.from, i, o),\n              u = Xr(Vr(s), i, o);\n            if (i = s.to, o = u, \"around\" == r) {\n              var c = e.sel.ranges[l],\n                h = F(c.head, c.anchor) < 0;\n              n[l] = new rl(h ? u : a, h ? a : u);\n            } else n[l] = new rl(a, a);\n          }\n          return new tl(n, e.sel.primIndex);\n        }(this, n, t), a = n.length - 1; a >= 0; a--) Mn(this, n[a]);\n      s ? vn(this, s) : this.cm && sr(this.cm);\n    }),\n    undo: Sr(function () {\n      On(this, \"undo\");\n    }),\n    redo: Sr(function () {\n      On(this, \"redo\");\n    }),\n    undoSelection: Sr(function () {\n      On(this, \"undo\", !0);\n    }),\n    redoSelection: Sr(function () {\n      On(this, \"redo\", !0);\n    }),\n    setExtending: function setExtending(e) {\n      this.extend = e;\n    },\n    getExtending: function getExtending() {\n      return this.extend;\n    },\n    historySize: function historySize() {\n      for (var e = this.history, t = 0, r = 0, n = 0; n < e.done.length; n++) e.done[n].ranges || ++t;\n      for (var i = 0; i < e.undone.length; i++) e.undone[i].ranges || ++r;\n      return {\n        undo: t,\n        redo: r\n      };\n    },\n    clearHistory: function clearHistory() {\n      this.history = new en(this.history.maxGeneration);\n    },\n    markClean: function markClean() {\n      this.cleanGeneration = this.changeGeneration(!0);\n    },\n    changeGeneration: function changeGeneration(e) {\n      return e && (this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null), this.history.generation;\n    },\n    isClean: function isClean(e) {\n      return this.history.generation == (e || this.cleanGeneration);\n    },\n    getHistory: function getHistory() {\n      return {\n        done: cn(this.history.done),\n        undone: cn(this.history.undone)\n      };\n    },\n    setHistory: function setHistory(e) {\n      var t = this.history = new en(this.history.maxGeneration);\n      t.done = cn(e.done.slice(0), null, !0), t.undone = cn(e.undone.slice(0), null, !0);\n    },\n    setGutterMarker: Sr(function (e, t, r) {\n      return En(this, e, \"gutter\", function (e) {\n        var n = e.gutterMarkers || (e.gutterMarkers = {});\n        return n[t] = r, !r && x(n) && (e.gutterMarkers = null), !0;\n      });\n    }),\n    clearGutter: Sr(function (e) {\n      var t = this;\n      this.iter(function (r) {\n        r.gutterMarkers && r.gutterMarkers[e] && En(t, r, \"gutter\", function () {\n          return r.gutterMarkers[e] = null, x(r.gutterMarkers) && (r.gutterMarkers = null), !0;\n        });\n      });\n    }),\n    lineInfo: function lineInfo(e) {\n      var t;\n      if (\"number\" == typeof e) {\n        if (!W(this, e)) return null;\n        if (t = e, !(e = k(this, e))) return null;\n      } else if (null == (t = O(e))) return null;\n      return {\n        line: t,\n        handle: e,\n        text: e.text,\n        gutterMarkers: e.gutterMarkers,\n        textClass: e.textClass,\n        bgClass: e.bgClass,\n        wrapClass: e.wrapClass,\n        widgets: e.widgets\n      };\n    },\n    addLineClass: Sr(function (t, r, n) {\n      return En(this, t, \"gutter\" == r ? \"gutter\" : \"class\", function (t) {\n        var i = \"text\" == r ? \"textClass\" : \"background\" == r ? \"bgClass\" : \"gutter\" == r ? \"gutterClass\" : \"wrapClass\";\n        if (t[i]) {\n          if (e(n).test(t[i])) return !1;\n          t[i] += \" \" + n;\n        } else t[i] = n;\n        return !0;\n      });\n    }),\n    removeLineClass: Sr(function (t, r, n) {\n      return En(this, t, \"gutter\" == r ? \"gutter\" : \"class\", function (t) {\n        var i = \"text\" == r ? \"textClass\" : \"background\" == r ? \"bgClass\" : \"gutter\" == r ? \"gutterClass\" : \"wrapClass\",\n          o = t[i];\n        if (!o) return !1;\n        if (null == n) t[i] = null;else {\n          var l = o.match(e(n));\n          if (!l) return !1;\n          var s = l.index + l[0].length;\n          t[i] = o.slice(0, l.index) + (l.index && s != o.length ? \" \" : \"\") + o.slice(s) || null;\n        }\n        return !0;\n      });\n    }),\n    addLineWidget: Sr(function (e, t, r) {\n      return function (e, t, r, n) {\n        var i = new nl(e, r, n),\n          o = e.cm;\n        return o && i.noHScroll && (o.display.alignWidgets = !0), En(e, t, \"widget\", function (t) {\n          var r = t.widgets || (t.widgets = []);\n          if (null == i.insertAt ? r.push(i) : r.splice(Math.min(r.length - 1, Math.max(0, i.insertAt)), 0, i), i.line = t, o && !oe(e, t)) {\n            var n = se(t) < e.scrollTop;\n            N(t, t.height + lt(i)), n && lr(o, i.height), o.curOp.forceUpdate = !0;\n          }\n          return !0;\n        }), $e(o, \"lineWidgetAdded\", o, i, \"number\" == typeof t ? t : O(t)), i;\n      }(this, e, t, r);\n    }),\n    removeLineWidget: function removeLineWidget(e) {\n      e.clear();\n    },\n    markText: function markText(e, t, r) {\n      return Bn(this, B(this, e), B(this, t), r, r && r.type || \"range\");\n    },\n    setBookmark: function setBookmark(e, t) {\n      var r = {\n        replacedWith: t && (null == t.nodeType ? t.widget : t),\n        insertLeft: t && t.insertLeft,\n        clearWhenEmpty: !1,\n        shared: t && t.shared,\n        handleMouseEvents: t && t.handleMouseEvents\n      };\n      return e = B(this, e), Bn(this, e, e, r, \"bookmark\");\n    },\n    findMarksAt: function findMarksAt(e) {\n      var t = [],\n        r = k(this, (e = B(this, e)).line).markedSpans;\n      if (r) for (var n = 0; n < r.length; ++n) {\n        var i = r[n];\n        (null == i.from || i.from <= e.ch) && (null == i.to || i.to >= e.ch) && t.push(i.marker.parent || i.marker);\n      }\n      return t;\n    },\n    findMarks: function findMarks(e, t, r) {\n      e = B(this, e), t = B(this, t);\n      var n = [],\n        i = e.line;\n      return this.iter(e.line, t.line + 1, function (o) {\n        var l = o.markedSpans;\n        if (l) for (var s = 0; s < l.length; s++) {\n          var a = l[s];\n          null != a.to && i == e.line && e.ch >= a.to || null == a.from && i != e.line || null != a.from && i == t.line && a.from >= t.ch || r && !r(a.marker) || n.push(a.marker.parent || a.marker);\n        }\n        ++i;\n      }), n;\n    },\n    getAllMarks: function getAllMarks() {\n      var e = [];\n      return this.iter(function (t) {\n        var r = t.markedSpans;\n        if (r) for (var n = 0; n < r.length; ++n) null != r[n].from && e.push(r[n].marker);\n      }), e;\n    },\n    posFromIndex: function posFromIndex(e) {\n      var t,\n        r = this.first,\n        n = this.lineSeparator().length;\n      return this.iter(function (i) {\n        var o = i.text.length + n;\n        if (o > e) return t = e, !0;\n        e -= o, ++r;\n      }), B(this, H(r, t));\n    },\n    indexFromPos: function indexFromPos(e) {\n      var t = (e = B(this, e)).ch;\n      if (e.line < this.first || e.ch < 0) return 0;\n      var r = this.lineSeparator().length;\n      return this.iter(this.first, e.line, function (e) {\n        t += e.text.length + r;\n      }), t;\n    },\n    copy: function copy(e) {\n      var t = new al(M(this, this.first, this.first + this.size), this.modeOption, this.first, this.lineSep, this.direction);\n      return t.scrollTop = this.scrollTop, t.scrollLeft = this.scrollLeft, t.sel = this.sel, t.extend = !1, e && (t.history.undoDepth = this.history.undoDepth, t.setHistory(this.getHistory())), t;\n    },\n    linkedDoc: function linkedDoc(e) {\n      e || (e = {});\n      var t = this.first,\n        r = this.first + this.size;\n      null != e.from && e.from > t && (t = e.from), null != e.to && e.to < r && (r = e.to);\n      var n = new al(M(this, t, r), e.mode || this.modeOption, t, this.lineSep, this.direction);\n      return e.sharedHist && (n.history = this.history), (this.linked || (this.linked = [])).push({\n        doc: n,\n        sharedHist: e.sharedHist\n      }), n.linked = [{\n        doc: this,\n        isParent: !0,\n        sharedHist: e.sharedHist\n      }], function (e, t) {\n        for (var r = 0; r < t.length; r++) {\n          var n = t[r],\n            i = n.find(),\n            o = e.clipPos(i.from),\n            l = e.clipPos(i.to);\n          if (F(o, l)) {\n            var s = Bn(e, o, l, n.primary, n.primary.type);\n            n.markers.push(s), s.parent = n;\n          }\n        }\n      }(n, Gn(this)), n;\n    },\n    unlinkDoc: function unlinkDoc(e) {\n      if (e instanceof Li && (e = e.doc), this.linked) for (var t = 0; t < this.linked.length; ++t) {\n        if (this.linked[t].doc == e) {\n          this.linked.splice(t, 1), e.unlinkDoc(this), Un(Gn(this));\n          break;\n        }\n      }\n      if (e.history == this.history) {\n        var r = [e.id];\n        Zr(e, function (e) {\n          return r.push(e.id);\n        }, !0), e.history = new en(null), e.history.done = cn(this.history.done, r), e.history.undone = cn(this.history.undone, r);\n      }\n    },\n    iterLinkedDocs: function iterLinkedDocs(e) {\n      Zr(this, e);\n    },\n    getMode: function getMode() {\n      return this.mode;\n    },\n    getEditor: function getEditor() {\n      return this.cm;\n    },\n    splitLines: function splitLines(e) {\n      return this.lineSep ? e.split(this.lineSep) : Ao(e);\n    },\n    lineSeparator: function lineSeparator() {\n      return this.lineSep || \"\\n\";\n    },\n    setDirection: Sr(function (e) {\n      \"rtl\" != e && (e = \"ltr\"), e != this.direction && (this.direction = e, this.iter(function (e) {\n        return e.order = null;\n      }), this.cm && function (e) {\n        wr(e, function () {\n          Jr(e), Lr(e);\n        });\n      }(this.cm));\n    })\n  }), al.prototype.eachLine = al.prototype.iter;\n  for (var ul = 0, cl = !1, hl = {\n      3: \"Enter\",\n      8: \"Backspace\",\n      9: \"Tab\",\n      13: \"Enter\",\n      16: \"Shift\",\n      17: \"Ctrl\",\n      18: \"Alt\",\n      19: \"Pause\",\n      20: \"CapsLock\",\n      27: \"Esc\",\n      32: \"Space\",\n      33: \"PageUp\",\n      34: \"PageDown\",\n      35: \"End\",\n      36: \"Home\",\n      37: \"Left\",\n      38: \"Up\",\n      39: \"Right\",\n      40: \"Down\",\n      44: \"PrintScrn\",\n      45: \"Insert\",\n      46: \"Delete\",\n      59: \";\",\n      61: \"=\",\n      91: \"Mod\",\n      92: \"Mod\",\n      93: \"Mod\",\n      106: \"*\",\n      107: \"=\",\n      109: \"-\",\n      110: \".\",\n      111: \"/\",\n      127: \"Delete\",\n      173: \"-\",\n      186: \";\",\n      187: \"=\",\n      188: \",\",\n      189: \"-\",\n      190: \".\",\n      191: \"/\",\n      192: \"`\",\n      219: \"[\",\n      220: \"\\\\\",\n      221: \"]\",\n      222: \"'\",\n      63232: \"Up\",\n      63233: \"Down\",\n      63234: \"Left\",\n      63235: \"Right\",\n      63272: \"Delete\",\n      63273: \"Home\",\n      63275: \"End\",\n      63276: \"PageUp\",\n      63277: \"PageDown\",\n      63302: \"Insert\"\n    }, fl = 0; fl < 10; fl++) hl[fl + 48] = hl[fl + 96] = String(fl);\n  for (var dl = 65; dl <= 90; dl++) hl[dl] = String.fromCharCode(dl);\n  for (var pl = 1; pl <= 12; pl++) hl[pl + 111] = hl[pl + 63235] = \"F\" + pl;\n  var gl = {};\n  gl.basic = {\n    Left: \"goCharLeft\",\n    Right: \"goCharRight\",\n    Up: \"goLineUp\",\n    Down: \"goLineDown\",\n    End: \"goLineEnd\",\n    Home: \"goLineStartSmart\",\n    PageUp: \"goPageUp\",\n    PageDown: \"goPageDown\",\n    Delete: \"delCharAfter\",\n    Backspace: \"delCharBefore\",\n    \"Shift-Backspace\": \"delCharBefore\",\n    Tab: \"defaultTab\",\n    \"Shift-Tab\": \"indentAuto\",\n    Enter: \"newlineAndIndent\",\n    Insert: \"toggleOverwrite\",\n    Esc: \"singleSelection\"\n  }, gl.pcDefault = {\n    \"Ctrl-A\": \"selectAll\",\n    \"Ctrl-D\": \"deleteLine\",\n    \"Ctrl-Z\": \"undo\",\n    \"Shift-Ctrl-Z\": \"redo\",\n    \"Ctrl-Y\": \"redo\",\n    \"Ctrl-Home\": \"goDocStart\",\n    \"Ctrl-End\": \"goDocEnd\",\n    \"Ctrl-Up\": \"goLineUp\",\n    \"Ctrl-Down\": \"goLineDown\",\n    \"Ctrl-Left\": \"goGroupLeft\",\n    \"Ctrl-Right\": \"goGroupRight\",\n    \"Alt-Left\": \"goLineStart\",\n    \"Alt-Right\": \"goLineEnd\",\n    \"Ctrl-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Delete\": \"delGroupAfter\",\n    \"Ctrl-S\": \"save\",\n    \"Ctrl-F\": \"find\",\n    \"Ctrl-G\": \"findNext\",\n    \"Shift-Ctrl-G\": \"findPrev\",\n    \"Shift-Ctrl-F\": \"replace\",\n    \"Shift-Ctrl-R\": \"replaceAll\",\n    \"Ctrl-[\": \"indentLess\",\n    \"Ctrl-]\": \"indentMore\",\n    \"Ctrl-U\": \"undoSelection\",\n    \"Shift-Ctrl-U\": \"redoSelection\",\n    \"Alt-U\": \"redoSelection\",\n    fallthrough: \"basic\"\n  }, gl.emacsy = {\n    \"Ctrl-F\": \"goCharRight\",\n    \"Ctrl-B\": \"goCharLeft\",\n    \"Ctrl-P\": \"goLineUp\",\n    \"Ctrl-N\": \"goLineDown\",\n    \"Alt-F\": \"goWordRight\",\n    \"Alt-B\": \"goWordLeft\",\n    \"Ctrl-A\": \"goLineStart\",\n    \"Ctrl-E\": \"goLineEnd\",\n    \"Ctrl-V\": \"goPageDown\",\n    \"Shift-Ctrl-V\": \"goPageUp\",\n    \"Ctrl-D\": \"delCharAfter\",\n    \"Ctrl-H\": \"delCharBefore\",\n    \"Alt-D\": \"delWordAfter\",\n    \"Alt-Backspace\": \"delWordBefore\",\n    \"Ctrl-K\": \"killLine\",\n    \"Ctrl-T\": \"transposeChars\",\n    \"Ctrl-O\": \"openLine\"\n  }, gl.macDefault = {\n    \"Cmd-A\": \"selectAll\",\n    \"Cmd-D\": \"deleteLine\",\n    \"Cmd-Z\": \"undo\",\n    \"Shift-Cmd-Z\": \"redo\",\n    \"Cmd-Y\": \"redo\",\n    \"Cmd-Home\": \"goDocStart\",\n    \"Cmd-Up\": \"goDocStart\",\n    \"Cmd-End\": \"goDocEnd\",\n    \"Cmd-Down\": \"goDocEnd\",\n    \"Alt-Left\": \"goGroupLeft\",\n    \"Alt-Right\": \"goGroupRight\",\n    \"Cmd-Left\": \"goLineLeft\",\n    \"Cmd-Right\": \"goLineRight\",\n    \"Alt-Backspace\": \"delGroupBefore\",\n    \"Ctrl-Alt-Backspace\": \"delGroupAfter\",\n    \"Alt-Delete\": \"delGroupAfter\",\n    \"Cmd-S\": \"save\",\n    \"Cmd-F\": \"find\",\n    \"Cmd-G\": \"findNext\",\n    \"Shift-Cmd-G\": \"findPrev\",\n    \"Cmd-Alt-F\": \"replace\",\n    \"Shift-Cmd-Alt-F\": \"replaceAll\",\n    \"Cmd-[\": \"indentLess\",\n    \"Cmd-]\": \"indentMore\",\n    \"Cmd-Backspace\": \"delWrappedLineLeft\",\n    \"Cmd-Delete\": \"delWrappedLineRight\",\n    \"Cmd-U\": \"undoSelection\",\n    \"Shift-Cmd-U\": \"redoSelection\",\n    \"Ctrl-Up\": \"goDocStart\",\n    \"Ctrl-Down\": \"goDocEnd\",\n    fallthrough: [\"basic\", \"emacsy\"]\n  }, gl.default = ro ? gl.macDefault : gl.pcDefault;\n  var vl = {\n      selectAll: kn,\n      singleSelection: function singleSelection(e) {\n        return e.setSelection(e.getCursor(\"anchor\"), e.getCursor(\"head\"), mo);\n      },\n      killLine: function killLine(e) {\n        return ti(e, function (t) {\n          if (t.empty()) {\n            var r = k(e.doc, t.head.line).text.length;\n            return t.head.ch == r && t.head.line < e.lastLine() ? {\n              from: t.head,\n              to: H(t.head.line + 1, 0)\n            } : {\n              from: t.head,\n              to: H(t.head.line, r)\n            };\n          }\n          return {\n            from: t.from(),\n            to: t.to()\n          };\n        });\n      },\n      deleteLine: function deleteLine(e) {\n        return ti(e, function (t) {\n          return {\n            from: H(t.from().line, 0),\n            to: B(e.doc, H(t.to().line + 1, 0))\n          };\n        });\n      },\n      delLineLeft: function delLineLeft(e) {\n        return ti(e, function (e) {\n          return {\n            from: H(e.from().line, 0),\n            to: e.from()\n          };\n        });\n      },\n      delWrappedLineLeft: function delWrappedLineLeft(e) {\n        return ti(e, function (t) {\n          var r = e.charCoords(t.head, \"div\").top + 5;\n          return {\n            from: e.coordsChar({\n              left: 0,\n              top: r\n            }, \"div\"),\n            to: t.from()\n          };\n        });\n      },\n      delWrappedLineRight: function delWrappedLineRight(e) {\n        return ti(e, function (t) {\n          var r = e.charCoords(t.head, \"div\").top + 5,\n            n = e.coordsChar({\n              left: e.display.lineDiv.offsetWidth + 100,\n              top: r\n            }, \"div\");\n          return {\n            from: t.from(),\n            to: n\n          };\n        });\n      },\n      undo: function undo(e) {\n        return e.undo();\n      },\n      redo: function redo(e) {\n        return e.redo();\n      },\n      undoSelection: function undoSelection(e) {\n        return e.undoSelection();\n      },\n      redoSelection: function redoSelection(e) {\n        return e.redoSelection();\n      },\n      goDocStart: function goDocStart(e) {\n        return e.extendSelection(H(e.firstLine(), 0));\n      },\n      goDocEnd: function goDocEnd(e) {\n        return e.extendSelection(H(e.lastLine()));\n      },\n      goLineStart: function goLineStart(e) {\n        return e.extendSelectionsBy(function (t) {\n          return oi(e, t.head.line);\n        }, {\n          origin: \"+move\",\n          bias: 1\n        });\n      },\n      goLineStartSmart: function goLineStartSmart(e) {\n        return e.extendSelectionsBy(function (t) {\n          return si(e, t.head);\n        }, {\n          origin: \"+move\",\n          bias: 1\n        });\n      },\n      goLineEnd: function goLineEnd(e) {\n        return e.extendSelectionsBy(function (t) {\n          return li(e, t.head.line);\n        }, {\n          origin: \"+move\",\n          bias: -1\n        });\n      },\n      goLineRight: function goLineRight(e) {\n        return e.extendSelectionsBy(function (t) {\n          var r = e.cursorCoords(t.head, \"div\").top + 5;\n          return e.coordsChar({\n            left: e.display.lineDiv.offsetWidth + 100,\n            top: r\n          }, \"div\");\n        }, bo);\n      },\n      goLineLeft: function goLineLeft(e) {\n        return e.extendSelectionsBy(function (t) {\n          var r = e.cursorCoords(t.head, \"div\").top + 5;\n          return e.coordsChar({\n            left: 0,\n            top: r\n          }, \"div\");\n        }, bo);\n      },\n      goLineLeftSmart: function goLineLeftSmart(e) {\n        return e.extendSelectionsBy(function (t) {\n          var r = e.cursorCoords(t.head, \"div\").top + 5,\n            n = e.coordsChar({\n              left: 0,\n              top: r\n            }, \"div\");\n          return n.ch < e.getLine(n.line).search(/\\S/) ? si(e, t.head) : n;\n        }, bo);\n      },\n      goLineUp: function goLineUp(e) {\n        return e.moveV(-1, \"line\");\n      },\n      goLineDown: function goLineDown(e) {\n        return e.moveV(1, \"line\");\n      },\n      goPageUp: function goPageUp(e) {\n        return e.moveV(-1, \"page\");\n      },\n      goPageDown: function goPageDown(e) {\n        return e.moveV(1, \"page\");\n      },\n      goCharLeft: function goCharLeft(e) {\n        return e.moveH(-1, \"char\");\n      },\n      goCharRight: function goCharRight(e) {\n        return e.moveH(1, \"char\");\n      },\n      goColumnLeft: function goColumnLeft(e) {\n        return e.moveH(-1, \"column\");\n      },\n      goColumnRight: function goColumnRight(e) {\n        return e.moveH(1, \"column\");\n      },\n      goWordLeft: function goWordLeft(e) {\n        return e.moveH(-1, \"word\");\n      },\n      goGroupRight: function goGroupRight(e) {\n        return e.moveH(1, \"group\");\n      },\n      goGroupLeft: function goGroupLeft(e) {\n        return e.moveH(-1, \"group\");\n      },\n      goWordRight: function goWordRight(e) {\n        return e.moveH(1, \"word\");\n      },\n      delCharBefore: function delCharBefore(e) {\n        return e.deleteH(-1, \"char\");\n      },\n      delCharAfter: function delCharAfter(e) {\n        return e.deleteH(1, \"char\");\n      },\n      delWordBefore: function delWordBefore(e) {\n        return e.deleteH(-1, \"word\");\n      },\n      delWordAfter: function delWordAfter(e) {\n        return e.deleteH(1, \"word\");\n      },\n      delGroupBefore: function delGroupBefore(e) {\n        return e.deleteH(-1, \"group\");\n      },\n      delGroupAfter: function delGroupAfter(e) {\n        return e.deleteH(1, \"group\");\n      },\n      indentAuto: function indentAuto(e) {\n        return e.indentSelection(\"smart\");\n      },\n      indentMore: function indentMore(e) {\n        return e.indentSelection(\"add\");\n      },\n      indentLess: function indentLess(e) {\n        return e.indentSelection(\"subtract\");\n      },\n      insertTab: function insertTab(e) {\n        return e.replaceSelection(\"\\t\");\n      },\n      insertSoftTab: function insertSoftTab(e) {\n        for (var t = [], r = e.listSelections(), n = e.options.tabSize, i = 0; i < r.length; i++) {\n          var o = r[i].from(),\n            l = h(e.getLine(o.line), o.ch, n);\n          t.push(p(n - l % n));\n        }\n        e.replaceSelections(t);\n      },\n      defaultTab: function defaultTab(e) {\n        e.somethingSelected() ? e.indentSelection(\"add\") : e.execCommand(\"insertTab\");\n      },\n      transposeChars: function transposeChars(e) {\n        return wr(e, function () {\n          for (var t = e.listSelections(), r = [], n = 0; n < t.length; n++) if (t[n].empty()) {\n            var i = t[n].head,\n              o = k(e.doc, i.line).text;\n            if (o) if (i.ch == o.length && (i = new H(i.line, i.ch - 1)), i.ch > 0) i = new H(i.line, i.ch + 1), e.replaceRange(o.charAt(i.ch - 1) + o.charAt(i.ch - 2), H(i.line, i.ch - 2), i, \"+transpose\");else if (i.line > e.doc.first) {\n              var l = k(e.doc, i.line - 1).text;\n              l && (i = new H(i.line, 1), e.replaceRange(o.charAt(0) + e.doc.lineSeparator() + l.charAt(l.length - 1), H(i.line - 1, l.length - 1), i, \"+transpose\"));\n            }\n            r.push(new rl(i, i));\n          }\n          e.setSelections(r);\n        });\n      },\n      newlineAndIndent: function newlineAndIndent(e) {\n        return wr(e, function () {\n          for (var t = e.listSelections(), r = t.length - 1; r >= 0; r--) e.replaceRange(e.doc.lineSeparator(), t[r].anchor, t[r].head, \"+input\");\n          t = e.listSelections();\n          for (var n = 0; n < t.length; n++) e.indentLine(t[n].from().line, null, !0);\n          sr(e);\n        });\n      },\n      openLine: function openLine(e) {\n        return e.replaceSelection(\"\\n\", \"start\");\n      },\n      toggleOverwrite: function toggleOverwrite(e) {\n        return e.toggleOverwrite();\n      }\n    },\n    ml = new ho(),\n    yl = null,\n    bl = function bl(e, t, r) {\n      this.time = e, this.pos = t, this.button = r;\n    };\n  bl.prototype.compare = function (e, t, r) {\n    return this.time + 400 > e && 0 == F(t, this.pos) && r == this.button;\n  };\n  var wl,\n    xl,\n    Cl = {\n      toString: function toString() {\n        return \"CodeMirror.Init\";\n      }\n    },\n    Sl = {},\n    Ll = {};\n  Li.defaults = Sl, Li.optionHandlers = Ll;\n  var kl = [];\n  Li.defineInitHook = function (e) {\n    return kl.push(e);\n  };\n  var Tl = null,\n    Ml = function Ml(e) {\n      this.cm = e, this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null, this.polling = new ho(), this.composing = null, this.gracePeriod = !1, this.readDOMTimeout = null;\n    };\n  Ml.prototype.init = function (e) {\n    function t(e) {\n      if (!ge(i, e)) {\n        if (i.somethingSelected()) Ti({\n          lineWise: !1,\n          text: i.getSelections()\n        }), \"cut\" == e.type && i.replaceSelection(\"\", null, \"cut\");else {\n          if (!i.options.lineWiseCopyCut) return;\n          var t = Ai(i);\n          Ti({\n            lineWise: !0,\n            text: t.text\n          }), \"cut\" == e.type && i.operation(function () {\n            i.setSelections(t.ranges, 0, mo), i.replaceSelection(\"\", null, \"cut\");\n          });\n        }\n        if (e.clipboardData) {\n          e.clipboardData.clearData();\n          var r = Tl.text.join(\"\\n\");\n          if (e.clipboardData.setData(\"Text\", r), e.clipboardData.getData(\"Text\") == r) return void e.preventDefault();\n        }\n        var l = Di(),\n          s = l.firstChild;\n        i.display.lineSpace.insertBefore(l, i.display.lineSpace.firstChild), s.value = Tl.text.join(\"\\n\");\n        var a = document.activeElement;\n        co(s), setTimeout(function () {\n          i.display.lineSpace.removeChild(l), a.focus(), a == o && n.showPrimarySelection();\n        }, 50);\n      }\n    }\n    var r = this,\n      n = this,\n      i = n.cm,\n      o = n.div = e.lineDiv;\n    Wi(o, i.options.spellcheck), No(o, \"paste\", function (e) {\n      ge(i, e) || Ni(e, i) || ji <= 11 && setTimeout(xr(i, function () {\n        return r.updateFromDOM();\n      }), 20);\n    }), No(o, \"compositionstart\", function (e) {\n      r.composing = {\n        data: e.data,\n        done: !1\n      };\n    }), No(o, \"compositionupdate\", function (e) {\n      r.composing || (r.composing = {\n        data: e.data,\n        done: !1\n      });\n    }), No(o, \"compositionend\", function (e) {\n      r.composing && (e.data != r.composing.data && r.readFromDOMSoon(), r.composing.done = !0);\n    }), No(o, \"touchstart\", function () {\n      return n.forceCompositionEnd();\n    }), No(o, \"input\", function () {\n      r.composing || r.readFromDOMSoon();\n    }), No(o, \"copy\", t), No(o, \"cut\", t);\n  }, Ml.prototype.prepareSelection = function () {\n    var e = Xt(this.cm, !1);\n    return e.focus = this.cm.state.focused, e;\n  }, Ml.prototype.showSelection = function (e, t) {\n    e && this.cm.display.view.length && ((e.focus || t) && this.showPrimarySelection(), this.showMultipleSelections(e));\n  }, Ml.prototype.showPrimarySelection = function () {\n    var e = window.getSelection(),\n      t = this.cm,\n      r = t.doc.sel.primary(),\n      n = r.from(),\n      i = r.to();\n    if (t.display.viewTo == t.display.viewFrom || n.line >= t.display.viewTo || i.line < t.display.viewFrom) e.removeAllRanges();else {\n      var o = zi(t, e.anchorNode, e.anchorOffset),\n        l = zi(t, e.focusNode, e.focusOffset);\n      if (!o || o.bad || !l || l.bad || 0 != F(I(o, l), n) || 0 != F(z(o, l), i)) {\n        var s = t.display.view,\n          a = n.line >= t.display.viewFrom && Pi(t, n) || {\n            node: s[0].measure.map[2],\n            offset: 0\n          },\n          u = i.line < t.display.viewTo && Pi(t, i);\n        if (!u) {\n          var c = s[s.length - 1].measure,\n            h = c.maps ? c.maps[c.maps.length - 1] : c.map;\n          u = {\n            node: h[h.length - 1],\n            offset: h[h.length - 2] - h[h.length - 3]\n          };\n        }\n        if (a && u) {\n          var f,\n            d = e.rangeCount && e.getRangeAt(0);\n          try {\n            f = lo(a.node, a.offset, u.offset, u.node);\n          } catch (e) {}\n          f && (!Bi && t.state.focused ? (e.collapse(a.node, a.offset), f.collapsed || (e.removeAllRanges(), e.addRange(f))) : (e.removeAllRanges(), e.addRange(f)), d && null == e.anchorNode ? e.addRange(d) : Bi && this.startGracePeriod()), this.rememberSelection();\n        } else e.removeAllRanges();\n      }\n    }\n  }, Ml.prototype.startGracePeriod = function () {\n    var e = this;\n    clearTimeout(this.gracePeriod), this.gracePeriod = setTimeout(function () {\n      e.gracePeriod = !1, e.selectionChanged() && e.cm.operation(function () {\n        return e.cm.curOp.selectionChanged = !0;\n      });\n    }, 20);\n  }, Ml.prototype.showMultipleSelections = function (e) {\n    r(this.cm.display.cursorDiv, e.cursors), r(this.cm.display.selectionDiv, e.selection);\n  }, Ml.prototype.rememberSelection = function () {\n    var e = window.getSelection();\n    this.lastAnchorNode = e.anchorNode, this.lastAnchorOffset = e.anchorOffset, this.lastFocusNode = e.focusNode, this.lastFocusOffset = e.focusOffset;\n  }, Ml.prototype.selectionInEditor = function () {\n    var e = window.getSelection();\n    if (!e.rangeCount) return !1;\n    var t = e.getRangeAt(0).commonAncestorContainer;\n    return o(this.div, t);\n  }, Ml.prototype.focus = function () {\n    \"nocursor\" != this.cm.options.readOnly && (this.selectionInEditor() || this.showSelection(this.prepareSelection(), !0), this.div.focus());\n  }, Ml.prototype.blur = function () {\n    this.div.blur();\n  }, Ml.prototype.getField = function () {\n    return this.div;\n  }, Ml.prototype.supportsTouch = function () {\n    return !0;\n  }, Ml.prototype.receivedFocus = function () {\n    function e() {\n      t.cm.state.focused && (t.pollSelection(), t.polling.set(t.cm.options.pollInterval, e));\n    }\n    var t = this;\n    this.selectionInEditor() ? this.pollSelection() : wr(this.cm, function () {\n      return t.cm.curOp.selectionChanged = !0;\n    }), this.polling.set(this.cm.options.pollInterval, e);\n  }, Ml.prototype.selectionChanged = function () {\n    var e = window.getSelection();\n    return e.anchorNode != this.lastAnchorNode || e.anchorOffset != this.lastAnchorOffset || e.focusNode != this.lastFocusNode || e.focusOffset != this.lastFocusOffset;\n  }, Ml.prototype.pollSelection = function () {\n    if (null == this.readDOMTimeout && !this.gracePeriod && this.selectionChanged()) {\n      var e = window.getSelection(),\n        t = this.cm;\n      if (eo && _i && this.cm.options.gutters.length && function (e) {\n        for (var t = e; t; t = t.parentNode) if (/CodeMirror-gutter-wrapper/.test(t.className)) return !0;\n        return !1;\n      }(e.anchorNode)) return this.cm.triggerOnKeyDown({\n        type: \"keydown\",\n        keyCode: 8,\n        preventDefault: Math.abs\n      }), this.blur(), void this.focus();\n      if (!this.composing) {\n        this.rememberSelection();\n        var r = zi(t, e.anchorNode, e.anchorOffset),\n          n = zi(t, e.focusNode, e.focusOffset);\n        r && n && wr(t, function () {\n          mn(t.doc, Ur(r, n), mo), (r.bad || n.bad) && (t.curOp.selectionChanged = !0);\n        });\n      }\n    }\n  }, Ml.prototype.pollContent = function () {\n    null != this.readDOMTimeout && (clearTimeout(this.readDOMTimeout), this.readDOMTimeout = null);\n    var e = this.cm,\n      t = e.display,\n      r = e.doc.sel.primary(),\n      n = r.from(),\n      i = r.to();\n    if (0 == n.ch && n.line > e.firstLine() && (n = H(n.line - 1, k(e.doc, n.line - 1).length)), i.ch == k(e.doc, i.line).text.length && i.line < e.lastLine() && (i = H(i.line + 1, 0)), n.line < t.viewFrom || i.line > t.viewTo - 1) return !1;\n    var o, l, s;\n    n.line == t.viewFrom || 0 == (o = Kt(e, n.line)) ? (l = O(t.view[0].line), s = t.view[0].node) : (l = O(t.view[o].line), s = t.view[o - 1].node.nextSibling);\n    var a,\n      u,\n      c = Kt(e, i.line);\n    if (c == t.view.length - 1 ? (a = t.viewTo - 1, u = t.lineDiv.lastChild) : (a = O(t.view[c + 1].line) - 1, u = t.view[c + 1].node.previousSibling), !s) return !1;\n    for (var h = e.doc.splitLines(function (e, t, r, n, i) {\n        function o() {\n          u && (a += c, u = !1);\n        }\n        function l(e) {\n          e && (o(), a += e);\n        }\n        function s(t) {\n          if (1 == t.nodeType) {\n            var r = t.getAttribute(\"cm-text\");\n            if (null != r) return void l(r || t.textContent.replace(/\\u200b/g, \"\"));\n            var a,\n              h = t.getAttribute(\"cm-marker\");\n            if (h) {\n              var f = e.findMarks(H(n, 0), H(i + 1, 0), function (e) {\n                return function (t) {\n                  return t.id == e;\n                };\n              }(+h));\n              return void (f.length && (a = f[0].find(0)) && l(T(e.doc, a.from, a.to).join(c)));\n            }\n            if (\"false\" == t.getAttribute(\"contenteditable\")) return;\n            var d = /^(pre|div|p)$/i.test(t.nodeName);\n            d && o();\n            for (var p = 0; p < t.childNodes.length; p++) s(t.childNodes[p]);\n            d && (u = !0);\n          } else 3 == t.nodeType && l(t.nodeValue);\n        }\n        for (var a = \"\", u = !1, c = e.doc.lineSeparator(); s(t), t != r;) t = t.nextSibling;\n        return a;\n      }(e, s, u, l, a)), f = T(e.doc, H(l, 0), H(a, k(e.doc, a).text.length)); h.length > 1 && f.length > 1;) if (g(h) == g(f)) h.pop(), f.pop(), a--;else {\n      if (h[0] != f[0]) break;\n      h.shift(), f.shift(), l++;\n    }\n    for (var d = 0, p = 0, v = h[0], m = f[0], y = Math.min(v.length, m.length); d < y && v.charCodeAt(d) == m.charCodeAt(d);) ++d;\n    for (var b = g(h), w = g(f), x = Math.min(b.length - (1 == h.length ? d : 0), w.length - (1 == f.length ? d : 0)); p < x && b.charCodeAt(b.length - p - 1) == w.charCodeAt(w.length - p - 1);) ++p;\n    if (1 == h.length && 1 == f.length && l == n.line) for (; d && d > n.ch && b.charCodeAt(b.length - p - 1) == w.charCodeAt(w.length - p - 1);) d--, p++;\n    h[h.length - 1] = b.slice(0, b.length - p).replace(/^\\u200b+/, \"\"), h[0] = h[0].slice(d).replace(/\\u200b+$/, \"\");\n    var C = H(l, d),\n      S = H(a, f.length ? g(f).length - p : 0);\n    return h.length > 1 || h[0] || F(C, S) ? (Dn(e.doc, h, C, S, \"+input\"), !0) : void 0;\n  }, Ml.prototype.ensurePolled = function () {\n    this.forceCompositionEnd();\n  }, Ml.prototype.reset = function () {\n    this.forceCompositionEnd();\n  }, Ml.prototype.forceCompositionEnd = function () {\n    this.composing && (clearTimeout(this.readDOMTimeout), this.composing = null, this.updateFromDOM(), this.div.blur(), this.div.focus());\n  }, Ml.prototype.readFromDOMSoon = function () {\n    var e = this;\n    null == this.readDOMTimeout && (this.readDOMTimeout = setTimeout(function () {\n      if (e.readDOMTimeout = null, e.composing) {\n        if (!e.composing.done) return;\n        e.composing = null;\n      }\n      e.updateFromDOM();\n    }, 80));\n  }, Ml.prototype.updateFromDOM = function () {\n    var e = this;\n    !this.cm.isReadOnly() && this.pollContent() || wr(this.cm, function () {\n      return Lr(e.cm);\n    });\n  }, Ml.prototype.setUneditable = function (e) {\n    e.contentEditable = \"false\";\n  }, Ml.prototype.onKeyPress = function (e) {\n    0 != e.charCode && (e.preventDefault(), this.cm.isReadOnly() || xr(this.cm, Mi)(this.cm, String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode), 0));\n  }, Ml.prototype.readOnlyChanged = function (e) {\n    this.div.contentEditable = String(\"nocursor\" != e);\n  }, Ml.prototype.onContextMenu = function () {}, Ml.prototype.resetPosition = function () {}, Ml.prototype.needsContentAttribute = !0;\n  var Nl = function Nl(e) {\n    this.cm = e, this.prevInput = \"\", this.pollingFast = !1, this.polling = new ho(), this.hasSelection = !1, this.composing = null;\n  };\n  Nl.prototype.init = function (e) {\n    function t(e) {\n      if (!ge(i, e)) {\n        if (i.somethingSelected()) Ti({\n          lineWise: !1,\n          text: i.getSelections()\n        });else {\n          if (!i.options.lineWiseCopyCut) return;\n          var t = Ai(i);\n          Ti({\n            lineWise: !0,\n            text: t.text\n          }), \"cut\" == e.type ? i.setSelections(t.ranges, null, mo) : (n.prevInput = \"\", l.value = t.text.join(\"\\n\"), co(l));\n        }\n        \"cut\" == e.type && (i.state.cutIncoming = !0);\n      }\n    }\n    var r = this,\n      n = this,\n      i = this.cm,\n      o = this.wrapper = Di(),\n      l = this.textarea = o.firstChild;\n    e.wrapper.insertBefore(o, e.wrapper.firstChild), Ji && (l.style.width = \"0px\"), No(l, \"input\", function () {\n      Ki && ji >= 9 && r.hasSelection && (r.hasSelection = null), n.poll();\n    }), No(l, \"paste\", function (e) {\n      ge(i, e) || Ni(e, i) || (i.state.pasteIncoming = !0, n.fastPoll());\n    }), No(l, \"cut\", t), No(l, \"copy\", t), No(e.scroller, \"paste\", function (t) {\n      st(e, t) || ge(i, t) || (i.state.pasteIncoming = !0, n.focus());\n    }), No(e.lineSpace, \"selectstart\", function (t) {\n      st(e, t) || be(t);\n    }), No(l, \"compositionstart\", function () {\n      var e = i.getCursor(\"from\");\n      n.composing && n.composing.range.clear(), n.composing = {\n        start: e,\n        range: i.markText(e, i.getCursor(\"to\"), {\n          className: \"CodeMirror-composing\"\n        })\n      };\n    }), No(l, \"compositionend\", function () {\n      n.composing && (n.poll(), n.composing.range.clear(), n.composing = null);\n    });\n  }, Nl.prototype.prepareSelection = function () {\n    var e = this.cm,\n      t = e.display,\n      r = e.doc,\n      n = Xt(e);\n    if (e.options.moveInputWithCursor) {\n      var i = At(e, r.sel.primary().head, \"div\"),\n        o = t.wrapper.getBoundingClientRect(),\n        l = t.lineDiv.getBoundingClientRect();\n      n.teTop = Math.max(0, Math.min(t.wrapper.clientHeight - 10, i.top + l.top - o.top)), n.teLeft = Math.max(0, Math.min(t.wrapper.clientWidth - 10, i.left + l.left - o.left));\n    }\n    return n;\n  }, Nl.prototype.showSelection = function (e) {\n    var t = this.cm.display;\n    r(t.cursorDiv, e.cursors), r(t.selectionDiv, e.selection), null != e.teTop && (this.wrapper.style.top = e.teTop + \"px\", this.wrapper.style.left = e.teLeft + \"px\");\n  }, Nl.prototype.reset = function (e) {\n    if (!this.contextMenuPending && !this.composing) {\n      var t = this.cm;\n      if (t.somethingSelected()) {\n        this.prevInput = \"\";\n        var r = t.getSelection();\n        this.textarea.value = r, t.state.focused && co(this.textarea), Ki && ji >= 9 && (this.hasSelection = r);\n      } else e || (this.prevInput = this.textarea.value = \"\", Ki && ji >= 9 && (this.hasSelection = null));\n    }\n  }, Nl.prototype.getField = function () {\n    return this.textarea;\n  }, Nl.prototype.supportsTouch = function () {\n    return !1;\n  }, Nl.prototype.focus = function () {\n    if (\"nocursor\" != this.cm.options.readOnly && (!to || l() != this.textarea)) try {\n      this.textarea.focus();\n    } catch (e) {}\n  }, Nl.prototype.blur = function () {\n    this.textarea.blur();\n  }, Nl.prototype.resetPosition = function () {\n    this.wrapper.style.top = this.wrapper.style.left = 0;\n  }, Nl.prototype.receivedFocus = function () {\n    this.slowPoll();\n  }, Nl.prototype.slowPoll = function () {\n    var e = this;\n    this.pollingFast || this.polling.set(this.cm.options.pollInterval, function () {\n      e.poll(), e.cm.state.focused && e.slowPoll();\n    });\n  }, Nl.prototype.fastPoll = function () {\n    function e() {\n      r.poll() || t ? (r.pollingFast = !1, r.slowPoll()) : (t = !0, r.polling.set(60, e));\n    }\n    var t = !1,\n      r = this;\n    r.pollingFast = !0, r.polling.set(20, e);\n  }, Nl.prototype.poll = function () {\n    var e = this,\n      t = this.cm,\n      r = this.textarea,\n      n = this.prevInput;\n    if (this.contextMenuPending || !t.state.focused || Wo(r) && !n && !this.composing || t.isReadOnly() || t.options.disableInput || t.state.keySeq) return !1;\n    var i = r.value;\n    if (i == n && !t.somethingSelected()) return !1;\n    if (Ki && ji >= 9 && this.hasSelection === i || ro && /[\\uf700-\\uf7ff]/.test(i)) return t.display.input.reset(), !1;\n    if (t.doc.sel == t.display.selForContextMenu) {\n      var o = i.charCodeAt(0);\n      if (8203 != o || n || (n = \"​\"), 8666 == o) return this.reset(), this.cm.execCommand(\"undo\");\n    }\n    for (var l = 0, s = Math.min(n.length, i.length); l < s && n.charCodeAt(l) == i.charCodeAt(l);) ++l;\n    return wr(t, function () {\n      Mi(t, i.slice(l), n.length - l, null, e.composing ? \"*compose\" : null), i.length > 1e3 || i.indexOf(\"\\n\") > -1 ? r.value = e.prevInput = \"\" : e.prevInput = i, e.composing && (e.composing.range.clear(), e.composing.range = t.markText(e.composing.start, t.getCursor(\"to\"), {\n        className: \"CodeMirror-composing\"\n      }));\n    }), !0;\n  }, Nl.prototype.ensurePolled = function () {\n    this.pollingFast && this.poll() && (this.pollingFast = !1);\n  }, Nl.prototype.onKeyPress = function () {\n    Ki && ji >= 9 && (this.hasSelection = null), this.fastPoll();\n  }, Nl.prototype.onContextMenu = function (e) {\n    function t() {\n      if (null != l.selectionStart) {\n        var e = i.somethingSelected(),\n          t = \"​\" + (e ? l.value : \"\");\n        l.value = \"⇚\", l.value = t, n.prevInput = e ? \"\" : \"​\", l.selectionStart = 1, l.selectionEnd = t.length, o.selForContextMenu = i.doc.sel;\n      }\n    }\n    function r() {\n      if (n.contextMenuPending = !1, n.wrapper.style.cssText = c, l.style.cssText = u, Ki && ji < 9 && o.scrollbars.setScrollTop(o.scroller.scrollTop = a), null != l.selectionStart) {\n        (!Ki || Ki && ji < 9) && t();\n        var e = 0,\n          r = function r() {\n            o.selForContextMenu == i.doc.sel && 0 == l.selectionStart && l.selectionEnd > 0 && \"​\" == n.prevInput ? xr(i, kn)(i) : e++ < 10 ? o.detectingSelectAll = setTimeout(r, 500) : (o.selForContextMenu = null, o.input.reset());\n          };\n        o.detectingSelectAll = setTimeout(r, 200);\n      }\n    }\n    var n = this,\n      i = n.cm,\n      o = i.display,\n      l = n.textarea,\n      s = Vt(i, e),\n      a = o.scroller.scrollTop;\n    if (s && !qi) {\n      i.options.resetSelectionOnContextMenu && -1 == i.doc.sel.contains(s) && xr(i, mn)(i.doc, Ur(s), mo);\n      var u = l.style.cssText,\n        c = n.wrapper.style.cssText;\n      n.wrapper.style.cssText = \"position: absolute\";\n      var h = n.wrapper.getBoundingClientRect();\n      l.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n      top: \" + (e.clientY - h.top - 5) + \"px; left: \" + (e.clientX - h.left - 5) + \"px;\\n      z-index: 1000; background: \" + (Ki ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n      var f;\n      if (Xi && (f = window.scrollY), o.input.focus(), Xi && window.scrollTo(null, f), o.input.reset(), i.somethingSelected() || (l.value = n.prevInput = \" \"), n.contextMenuPending = !0, o.selForContextMenu = i.doc.sel, clearTimeout(o.detectingSelectAll), Ki && ji >= 9 && t(), ao) {\n        Ce(e);\n        var d = function d() {\n          de(window, \"mouseup\", d), setTimeout(r, 20);\n        };\n        No(window, \"mouseup\", d);\n      } else setTimeout(r, 50);\n    }\n  }, Nl.prototype.readOnlyChanged = function (e) {\n    e || this.reset(), this.textarea.disabled = \"nocursor\" == e;\n  }, Nl.prototype.setUneditable = function () {}, Nl.prototype.needsContentAttribute = !1, function (e) {\n    function t(t, n, i, o) {\n      e.defaults[t] = n, i && (r[t] = o ? function (e, t, r) {\n        r != Cl && i(e, t, r);\n      } : i);\n    }\n    var r = e.optionHandlers;\n    e.defineOption = t, e.Init = Cl, t(\"value\", \"\", function (e, t) {\n      return e.setValue(t);\n    }, !0), t(\"mode\", null, function (e, t) {\n      e.doc.modeOption = t, Yr(e);\n    }, !0), t(\"indentUnit\", 2, Yr, !0), t(\"indentWithTabs\", !1), t(\"smartIndent\", !0), t(\"tabSize\", 4, function (e) {\n      _r(e), St(e), Lr(e);\n    }, !0), t(\"lineSeparator\", null, function (e, t) {\n      if (e.doc.lineSep = t, t) {\n        var r = [],\n          n = e.doc.first;\n        e.doc.iter(function (e) {\n          for (var i = 0;;) {\n            var o = e.text.indexOf(t, i);\n            if (-1 == o) break;\n            i = o + t.length, r.push(H(n, o));\n          }\n          n++;\n        });\n        for (var i = r.length - 1; i >= 0; i--) Dn(e.doc, t, r[i], H(r[i].line, r[i].ch + t.length));\n      }\n    }), t(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function (e, t, r) {\n      e.state.specialChars = new RegExp(t.source + (t.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\"), r != Cl && e.refresh();\n    }), t(\"specialCharPlaceholder\", je, function (e) {\n      return e.refresh();\n    }, !0), t(\"electricChars\", !0), t(\"inputStyle\", to ? \"contenteditable\" : \"textarea\", function () {\n      throw new Error(\"inputStyle can not (yet) be changed in a running editor\");\n    }, !0), t(\"spellcheck\", !1, function (e, t) {\n      return e.getInputField().spellcheck = t;\n    }, !0), t(\"rtlMoveVisually\", !io), t(\"wholeLineUpdateBefore\", !0), t(\"theme\", \"default\", function (e) {\n      wi(e), xi(e);\n    }, !0), t(\"keyMap\", \"default\", function (e, t, r) {\n      var n = ei(t),\n        i = r != Cl && ei(r);\n      i && i.detach && i.detach(e, n), n.attach && n.attach(e, i || null);\n    }), t(\"extraKeys\", null), t(\"configureMouse\", null), t(\"lineWrapping\", !1, Si, !0), t(\"gutters\", [], function (e) {\n      zr(e.options), xi(e);\n    }, !0), t(\"fixedGutter\", !0, function (e, t) {\n      e.display.gutters.style.left = t ? Bt(e.display) + \"px\" : \"0\", e.refresh();\n    }, !0), t(\"coverGutterNextToScrollbar\", !1, function (e) {\n      return gr(e);\n    }, !0), t(\"scrollbarStyle\", \"native\", function (e) {\n      mr(e), gr(e), e.display.scrollbars.setScrollTop(e.doc.scrollTop), e.display.scrollbars.setScrollLeft(e.doc.scrollLeft);\n    }, !0), t(\"lineNumbers\", !1, function (e) {\n      zr(e.options), xi(e);\n    }, !0), t(\"firstLineNumber\", 1, xi, !0), t(\"lineNumberFormatter\", function (e) {\n      return e;\n    }, xi, !0), t(\"showCursorWhenSelecting\", !1, jt, !0), t(\"resetSelectionOnContextMenu\", !0), t(\"lineWiseCopyCut\", !0), t(\"pasteLinesPerSelection\", !0), t(\"readOnly\", !1, function (e, t) {\n      \"nocursor\" == t && (Jt(e), e.display.input.blur()), e.display.input.readOnlyChanged(t);\n    }), t(\"disableInput\", !1, function (e, t) {\n      t || e.display.input.reset();\n    }, !0), t(\"dragDrop\", !0, Ci), t(\"allowDropFileTypes\", null), t(\"cursorBlinkRate\", 530), t(\"cursorScrollMargin\", 0), t(\"cursorHeight\", 1, jt, !0), t(\"singleCursorHeightPerLine\", !0, jt, !0), t(\"workTime\", 100), t(\"workDelay\", 100), t(\"flattenSpans\", !0, _r, !0), t(\"addModeClass\", !1, _r, !0), t(\"pollInterval\", 100), t(\"undoDepth\", 200, function (e, t) {\n      return e.doc.history.undoDepth = t;\n    }), t(\"historyEventDelay\", 1250), t(\"viewportMargin\", 10, function (e) {\n      return e.refresh();\n    }, !0), t(\"maxHighlightLength\", 1e4, _r, !0), t(\"moveInputWithCursor\", !0, function (e, t) {\n      t || e.display.input.resetPosition();\n    }), t(\"tabindex\", null, function (e, t) {\n      return e.display.input.getField().tabIndex = t || \"\";\n    }), t(\"autofocus\", null), t(\"direction\", \"ltr\", function (e, t) {\n      return e.doc.setDirection(t);\n    }, !0);\n  }(Li), function (e) {\n    var t = e.optionHandlers,\n      r = e.helpers = {};\n    e.prototype = {\n      constructor: e,\n      focus: function focus() {\n        window.focus(), this.display.input.focus();\n      },\n      setOption: function setOption(e, r) {\n        var n = this.options,\n          i = n[e];\n        n[e] == r && \"mode\" != e || (n[e] = r, t.hasOwnProperty(e) && xr(this, t[e])(this, r, i), pe(this, \"optionChange\", this, e));\n      },\n      getOption: function getOption(e) {\n        return this.options[e];\n      },\n      getDoc: function getDoc() {\n        return this.doc;\n      },\n      addKeyMap: function addKeyMap(e, t) {\n        this.state.keyMaps[t ? \"push\" : \"unshift\"](ei(e));\n      },\n      removeKeyMap: function removeKeyMap(e) {\n        for (var t = this.state.keyMaps, r = 0; r < t.length; ++r) if (t[r] == e || t[r].name == e) return t.splice(r, 1), !0;\n      },\n      addOverlay: Cr(function (t, r) {\n        var n = t.token ? t : e.getMode(this.options, t);\n        if (n.startState) throw new Error(\"Overlays may not be stateful.\");\n        !function (e, t, r) {\n          for (var n = 0, i = r(t); n < e.length && r(e[n]) <= i;) n++;\n          e.splice(n, 0, t);\n        }(this.state.overlays, {\n          mode: n,\n          modeSpec: t,\n          opaque: r && r.opaque,\n          priority: r && r.priority || 0\n        }, function (e) {\n          return e.priority;\n        }), this.state.modeGen++, Lr(this);\n      }),\n      removeOverlay: Cr(function (e) {\n        for (var t = this.state.overlays, r = 0; r < t.length; ++r) {\n          var n = t[r].modeSpec;\n          if (n == e || \"string\" == typeof e && n.name == e) return t.splice(r, 1), this.state.modeGen++, void Lr(this);\n        }\n      }),\n      indentLine: Cr(function (e, t, r) {\n        \"string\" != typeof t && \"number\" != typeof t && (t = null == t ? this.options.smartIndent ? \"smart\" : \"prev\" : t ? \"add\" : \"subtract\"), W(this.doc, e) && ki(this, e, t, r);\n      }),\n      indentSelection: Cr(function (e) {\n        for (var t = this.doc.sel.ranges, r = -1, n = 0; n < t.length; n++) {\n          var i = t[n];\n          if (i.empty()) i.head.line > r && (ki(this, i.head.line, e, !0), r = i.head.line, n == this.doc.sel.primIndex && sr(this));else {\n            var o = i.from(),\n              l = i.to(),\n              s = Math.max(r, o.line);\n            r = Math.min(this.lastLine(), l.line - (l.ch ? 0 : 1)) + 1;\n            for (var a = s; a < r; ++a) ki(this, a, e);\n            var u = this.doc.sel.ranges;\n            0 == o.ch && t.length == u.length && u[n].from().ch > 0 && pn(this.doc, n, new rl(o, u[n].to()), mo);\n          }\n        }\n      }),\n      getTokenAt: function getTokenAt(e, t) {\n        return Re(this, e, t);\n      },\n      getLineTokens: function getLineTokens(e, t) {\n        return Re(this, H(e), t, !0);\n      },\n      getTokenTypeAt: function getTokenTypeAt(e) {\n        e = B(this.doc, e);\n        var t,\n          r = Fe(this, k(this.doc, e.line)),\n          n = 0,\n          i = (r.length - 1) / 2,\n          o = e.ch;\n        if (0 == o) t = r[2];else for (;;) {\n          var l = n + i >> 1;\n          if ((l ? r[2 * l - 1] : 0) >= o) i = l;else {\n            if (!(r[2 * l + 1] < o)) {\n              t = r[2 * l + 2];\n              break;\n            }\n            n = l + 1;\n          }\n        }\n        var s = t ? t.indexOf(\"overlay \") : -1;\n        return s < 0 ? t : 0 == s ? null : t.slice(0, s - 1);\n      },\n      getModeAt: function getModeAt(t) {\n        var r = this.doc.mode;\n        return r.innerMode ? e.innerMode(r, this.getTokenAt(t).state).mode : r;\n      },\n      getHelper: function getHelper(e, t) {\n        return this.getHelpers(e, t)[0];\n      },\n      getHelpers: function getHelpers(e, t) {\n        var n = [];\n        if (!r.hasOwnProperty(t)) return n;\n        var i = r[t],\n          o = this.getModeAt(e);\n        if (\"string\" == typeof o[t]) i[o[t]] && n.push(i[o[t]]);else if (o[t]) for (var l = 0; l < o[t].length; l++) {\n          var s = i[o[t][l]];\n          s && n.push(s);\n        } else o.helperType && i[o.helperType] ? n.push(i[o.helperType]) : i[o.name] && n.push(i[o.name]);\n        for (var a = 0; a < i._global.length; a++) {\n          var u = i._global[a];\n          u.pred(o, this) && -1 == f(n, u.val) && n.push(u.val);\n        }\n        return n;\n      },\n      getStateAfter: function getStateAfter(e, t) {\n        var r = this.doc;\n        return e = R(r, null == e ? r.first + r.size - 1 : e), Pe(this, e + 1, t).state;\n      },\n      cursorCoords: function cursorCoords(e, t) {\n        var r,\n          n = this.doc.sel.primary();\n        return r = null == e ? n.head : \"object\" == typeof e ? B(this.doc, e) : e ? n.from() : n.to(), At(this, r, t || \"page\");\n      },\n      charCoords: function charCoords(e, t) {\n        return Ot(this, B(this.doc, e), t || \"page\");\n      },\n      coordsChar: function coordsChar(e, t) {\n        return e = Nt(this, e, t || \"page\"), Ht(this, e.left, e.top);\n      },\n      lineAtHeight: function lineAtHeight(e, t) {\n        return e = Nt(this, {\n          top: e,\n          left: 0\n        }, t || \"page\").top, A(this.doc, e + this.display.viewOffset);\n      },\n      heightAtLine: function heightAtLine(e, t, r) {\n        var n,\n          i = !1;\n        if (\"number\" == typeof e) {\n          var o = this.doc.first + this.doc.size - 1;\n          e < this.doc.first ? e = this.doc.first : e > o && (e = o, i = !0), n = k(this.doc, e);\n        } else n = e;\n        return Mt(this, n, {\n          top: 0,\n          left: 0\n        }, t || \"page\", r || i).top + (i ? this.doc.height - se(n) : 0);\n      },\n      defaultTextHeight: function defaultTextHeight() {\n        return zt(this.display);\n      },\n      defaultCharWidth: function defaultCharWidth() {\n        return It(this.display);\n      },\n      getViewport: function getViewport() {\n        return {\n          from: this.display.viewFrom,\n          to: this.display.viewTo\n        };\n      },\n      addWidget: function addWidget(e, t, r, n, i) {\n        var o = this.display,\n          l = (e = At(this, B(this.doc, e))).bottom,\n          s = e.left;\n        if (t.style.position = \"absolute\", t.setAttribute(\"cm-ignore-events\", \"true\"), this.display.input.setUneditable(t), o.sizer.appendChild(t), \"over\" == n) l = e.top;else if (\"above\" == n || \"near\" == n) {\n          var a = Math.max(o.wrapper.clientHeight, this.doc.height),\n            u = Math.max(o.sizer.clientWidth, o.lineSpace.clientWidth);\n          (\"above\" == n || e.bottom + t.offsetHeight > a) && e.top > t.offsetHeight ? l = e.top - t.offsetHeight : e.bottom + t.offsetHeight <= a && (l = e.bottom), s + t.offsetWidth > u && (s = u - t.offsetWidth);\n        }\n        t.style.top = l + \"px\", t.style.left = t.style.right = \"\", \"right\" == i ? (s = o.sizer.clientWidth - t.offsetWidth, t.style.right = \"0px\") : (\"left\" == i ? s = 0 : \"middle\" == i && (s = (o.sizer.clientWidth - t.offsetWidth) / 2), t.style.left = s + \"px\"), r && function (e, t) {\n          var r = or(e, t);\n          null != r.scrollTop && hr(e, r.scrollTop), null != r.scrollLeft && dr(e, r.scrollLeft);\n        }(this, {\n          left: s,\n          top: l,\n          right: s + t.offsetWidth,\n          bottom: l + t.offsetHeight\n        });\n      },\n      triggerOnKeyDown: Cr(fi),\n      triggerOnKeyPress: Cr(pi),\n      triggerOnKeyUp: di,\n      triggerOnMouseDown: Cr(gi),\n      execCommand: function execCommand(e) {\n        if (vl.hasOwnProperty(e)) return vl[e].call(null, this);\n      },\n      triggerElectric: Cr(function (e) {\n        Oi(this, e);\n      }),\n      findPosH: function findPosH(e, t, r, n) {\n        var i = 1;\n        t < 0 && (i = -1, t = -t);\n        for (var o = B(this.doc, e), l = 0; l < t && !(o = Hi(this.doc, o, i, r, n)).hitSide; ++l);\n        return o;\n      },\n      moveH: Cr(function (e, t) {\n        var r = this;\n        this.extendSelectionsBy(function (n) {\n          return r.display.shift || r.doc.extend || n.empty() ? Hi(r.doc, n.head, e, t, r.options.rtlMoveVisually) : e < 0 ? n.from() : n.to();\n        }, bo);\n      }),\n      deleteH: Cr(function (e, t) {\n        var r = this.doc.sel,\n          n = this.doc;\n        r.somethingSelected() ? n.replaceSelection(\"\", null, \"+delete\") : ti(this, function (r) {\n          var i = Hi(n, r.head, e, t, !1);\n          return e < 0 ? {\n            from: i,\n            to: r.head\n          } : {\n            from: r.head,\n            to: i\n          };\n        });\n      }),\n      findPosV: function findPosV(e, t, r, n) {\n        var i = 1,\n          o = n;\n        t < 0 && (i = -1, t = -t);\n        for (var l = B(this.doc, e), s = 0; s < t; ++s) {\n          var a = At(this, l, \"div\");\n          if (null == o ? o = a.left : a.left = o, (l = Fi(this, a, i, r)).hitSide) break;\n        }\n        return l;\n      },\n      moveV: Cr(function (e, t) {\n        var r = this,\n          n = this.doc,\n          i = [],\n          o = !this.display.shift && !n.extend && n.sel.somethingSelected();\n        if (n.extendSelectionsBy(function (l) {\n          if (o) return e < 0 ? l.from() : l.to();\n          var s = At(r, l.head, \"div\");\n          null != l.goalColumn && (s.left = l.goalColumn), i.push(s.left);\n          var a = Fi(r, s, e, t);\n          return \"page\" == t && l == n.sel.primary() && lr(r, Ot(r, a, \"div\").top - s.top), a;\n        }, bo), i.length) for (var l = 0; l < n.sel.ranges.length; l++) n.sel.ranges[l].goalColumn = i[l];\n      }),\n      findWordAt: function findWordAt(e) {\n        var t = k(this.doc, e.line).text,\n          r = e.ch,\n          n = e.ch;\n        if (t) {\n          var i = this.getHelper(e, \"wordChars\");\n          \"before\" != e.sticky && n != t.length || !r ? ++n : --r;\n          for (var o = t.charAt(r), l = w(o, i) ? function (e) {\n              return w(e, i);\n            } : /\\s/.test(o) ? function (e) {\n              return /\\s/.test(e);\n            } : function (e) {\n              return !/\\s/.test(e) && !w(e);\n            }; r > 0 && l(t.charAt(r - 1));) --r;\n          for (; n < t.length && l(t.charAt(n));) ++n;\n        }\n        return new rl(H(e.line, r), H(e.line, n));\n      },\n      toggleOverwrite: function toggleOverwrite(e) {\n        null != e && e == this.state.overwrite || ((this.state.overwrite = !this.state.overwrite) ? s(this.display.cursorDiv, \"CodeMirror-overwrite\") : uo(this.display.cursorDiv, \"CodeMirror-overwrite\"), pe(this, \"overwriteToggle\", this, this.state.overwrite));\n      },\n      hasFocus: function hasFocus() {\n        return this.display.input.getField() == l();\n      },\n      isReadOnly: function isReadOnly() {\n        return !(!this.options.readOnly && !this.doc.cantEdit);\n      },\n      scrollTo: Cr(function (e, t) {\n        ar(this, e, t);\n      }),\n      getScrollInfo: function getScrollInfo() {\n        var e = this.display.scroller;\n        return {\n          left: e.scrollLeft,\n          top: e.scrollTop,\n          height: e.scrollHeight - ht(this) - this.display.barHeight,\n          width: e.scrollWidth - ht(this) - this.display.barWidth,\n          clientHeight: dt(this),\n          clientWidth: ft(this)\n        };\n      },\n      scrollIntoView: Cr(function (e, t) {\n        null == e ? (e = {\n          from: this.doc.sel.primary().head,\n          to: null\n        }, null == t && (t = this.options.cursorScrollMargin)) : \"number\" == typeof e ? e = {\n          from: H(e, 0),\n          to: null\n        } : null == e.from && (e = {\n          from: e,\n          to: null\n        }), e.to || (e.to = e.from), e.margin = t || 0, null != e.from.line ? function (e, t) {\n          ur(e), e.curOp.scrollToPos = t;\n        }(this, e) : cr(this, e.from, e.to, e.margin);\n      }),\n      setSize: Cr(function (e, t) {\n        var r = this,\n          n = function n(e) {\n            return \"number\" == typeof e || /^\\d+$/.test(String(e)) ? e + \"px\" : e;\n          };\n        null != e && (this.display.wrapper.style.width = n(e)), null != t && (this.display.wrapper.style.height = n(t)), this.options.lineWrapping && Ct(this);\n        var i = this.display.viewFrom;\n        this.doc.iter(i, this.display.viewTo, function (e) {\n          if (e.widgets) for (var t = 0; t < e.widgets.length; t++) if (e.widgets[t].noHScroll) {\n            kr(r, i, \"widget\");\n            break;\n          }\n          ++i;\n        }), this.curOp.forceUpdate = !0, pe(this, \"refresh\", this);\n      }),\n      operation: function operation(e) {\n        return wr(this, e);\n      },\n      startOperation: function startOperation() {\n        return yr(this);\n      },\n      endOperation: function endOperation() {\n        return br(this);\n      },\n      refresh: Cr(function () {\n        var e = this.display.cachedTextHeight;\n        Lr(this), this.curOp.forceUpdate = !0, St(this), ar(this, this.doc.scrollLeft, this.doc.scrollTop), Fr(this), (null == e || Math.abs(e - zt(this.display)) > .5) && Ut(this), pe(this, \"refresh\", this);\n      }),\n      swapDoc: Cr(function (e) {\n        var t = this.doc;\n        return t.cm = null, Qr(this, e), St(this), this.display.input.reset(), ar(this, e.scrollLeft, e.scrollTop), this.curOp.forceScroll = !0, $e(this, \"swapDoc\", this, t), t;\n      }),\n      getInputField: function getInputField() {\n        return this.display.input.getField();\n      },\n      getWrapperElement: function getWrapperElement() {\n        return this.display.wrapper;\n      },\n      getScrollerElement: function getScrollerElement() {\n        return this.display.scroller;\n      },\n      getGutterElement: function getGutterElement() {\n        return this.display.gutters;\n      }\n    }, ye(e), e.registerHelper = function (t, n, i) {\n      r.hasOwnProperty(t) || (r[t] = e[t] = {\n        _global: []\n      }), r[t][n] = i;\n    }, e.registerGlobalHelper = function (t, n, i, o) {\n      e.registerHelper(t, n, o), r[t]._global.push({\n        pred: i,\n        val: o\n      });\n    };\n  }(Li);\n  var Ol = \"iter insert remove copy getEditor constructor\".split(\" \");\n  for (var Al in al.prototype) al.prototype.hasOwnProperty(Al) && f(Ol, Al) < 0 && (Li.prototype[Al] = function (e) {\n    return function () {\n      return e.apply(this.doc, arguments);\n    };\n  }(al.prototype[Al]));\n  return ye(al), Li.inputStyles = {\n    textarea: Nl,\n    contenteditable: Ml\n  }, Li.defineMode = function (e) {\n    Li.defaults.mode || \"null\" == e || (Li.defaults.mode = e), function (e, t) {\n      arguments.length > 2 && (t.dependencies = Array.prototype.slice.call(arguments, 2)), Fo[e] = t;\n    }.apply(this, arguments);\n  }, Li.defineMIME = function (e, t) {\n    Po[e] = t;\n  }, Li.defineMode(\"null\", function () {\n    return {\n      token: function token(e) {\n        return e.skipToEnd();\n      }\n    };\n  }), Li.defineMIME(\"text/plain\", \"null\"), Li.defineExtension = function (e, t) {\n    Li.prototype[e] = t;\n  }, Li.defineDocExtension = function (e, t) {\n    al.prototype[e] = t;\n  }, Li.fromTextArea = function (e, t) {\n    function r() {\n      e.value = a.getValue();\n    }\n    if (t = t ? c(t) : {}, t.value = e.value, !t.tabindex && e.tabIndex && (t.tabindex = e.tabIndex), !t.placeholder && e.placeholder && (t.placeholder = e.placeholder), null == t.autofocus) {\n      var n = l();\n      t.autofocus = n == e || null != e.getAttribute(\"autofocus\") && n == document.body;\n    }\n    var i;\n    if (e.form && (No(e.form, \"submit\", r), !t.leaveSubmitMethodAlone)) {\n      var o = e.form;\n      i = o.submit;\n      try {\n        var s = o.submit = function () {\n          r(), o.submit = i, o.submit(), o.submit = s;\n        };\n      } catch (e) {}\n    }\n    t.finishInit = function (t) {\n      t.save = r, t.getTextArea = function () {\n        return e;\n      }, t.toTextArea = function () {\n        t.toTextArea = isNaN, r(), e.parentNode.removeChild(t.getWrapperElement()), e.style.display = \"\", e.form && (de(e.form, \"submit\", r), \"function\" == typeof e.form.submit && (e.form.submit = i));\n      };\n    }, e.style.display = \"none\";\n    var a = Li(function (t) {\n      return e.parentNode.insertBefore(t, e.nextSibling);\n    }, t);\n    return a;\n  }, function (e) {\n    e.off = de, e.on = No, e.wheelEventPixels = Rr, e.Doc = al, e.splitLines = Ao, e.countColumn = h, e.findColumn = d, e.isWordChar = b, e.Pass = vo, e.signal = pe, e.Line = Go, e.changeEnd = Vr, e.scrollbarModel = $o, e.Pos = H, e.cmpPos = F, e.modes = Fo, e.mimeModes = Po, e.resolveMode = Me, e.getMode = Ne, e.modeExtensions = Eo, e.extendMode = Oe, e.copyState = Ae, e.startState = De, e.innerMode = We, e.commands = vl, e.keyMap = gl, e.keyName = Jn, e.isModifierKey = Zn, e.lookupKey = $n, e.normalizeKeyMap = qn, e.StringStream = zo, e.SharedTextMarker = ll, e.TextMarker = ol, e.LineWidget = nl, e.e_preventDefault = be, e.e_stopPropagation = we, e.e_stop = Ce, e.addClass = s, e.contains = o, e.rmClass = uo, e.keyNames = hl;\n  }(Li), Li.version = \"5.32.0\", Li;\n});\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/vendor/codemirror.min.js?");

/***/ }),

/***/ "./src/components/mergely/package/vendor/searchcursor.min.js":
/*!*******************************************************************!*\
  !*** ./src/components/mergely/package/vendor/searchcursor.min.js ***!
  \*******************************************************************/
/***/ (function() {

eval("!function (t) {\n  t(CodeMirror);\n}(function (t) {\n  \"use strict\";\n\n  function n(t) {\n    return t.global ? t : new RegExp(t.source, function (t) {\n      var n = t.flags;\n      return null != n ? n : (t.ignoreCase ? \"i\" : \"\") + (t.global ? \"g\" : \"\") + (t.multiline ? \"m\" : \"\");\n    }(t) + \"g\");\n  }\n  function e(t, e, r) {\n    e = n(e);\n    for (var i = r.line, o = r.ch, l = t.lastLine(); i <= l; i++, o = 0) {\n      e.lastIndex = o;\n      var h = t.getLine(i),\n        c = e.exec(h);\n      if (c) return {\n        from: s(i, c.index),\n        to: s(i, c.index + c[0].length),\n        match: c\n      };\n    }\n  }\n  function r(t, n) {\n    for (var e, r = 0;;) {\n      n.lastIndex = r;\n      var i = n.exec(t);\n      if (!i) return e;\n      if (e = i, (r = e.index + (e[0].length || 1)) == t.length) return e;\n    }\n  }\n  function i(t, n, e, r) {\n    if (t.length == n.length) return e;\n    for (var i = 0, o = e + Math.max(0, t.length - n.length);;) {\n      if (i == o) return i;\n      var l = i + o >> 1,\n        h = r(t.slice(0, l)).length;\n      if (h == e) return l;\n      h > e ? o = l : i = l + 1;\n    }\n  }\n  function o(t, o, c, f) {\n    this.atOccurrence = !1, this.doc = t, c = c ? t.clipPos(c) : s(0, 0), this.pos = {\n      from: c,\n      to: c\n    };\n    var u;\n    \"object\" == typeof f ? u = f.caseFold : (u = f, f = null), \"string\" == typeof o ? (null == u && (u = !1), this.matches = function (n, e) {\n      return (n ? function (t, n, e, r) {\n        if (!n.length) return null;\n        var o = r ? l : h,\n          c = o(n).split(/\\r|\\n\\r?/);\n        t: for (var f = e.line, u = e.ch, a = t.firstLine() - 1 + c.length; f >= a; f--, u = -1) {\n          var g = t.getLine(f);\n          u > -1 && (g = g.slice(0, u));\n          var m = o(g);\n          if (1 == c.length) {\n            var v = m.lastIndexOf(c[0]);\n            if (-1 == v) continue t;\n            return {\n              from: s(f, i(g, m, v, o)),\n              to: s(f, i(g, m, v + c[0].length, o))\n            };\n          }\n          var d = c[c.length - 1];\n          if (m.slice(0, d.length) == d) {\n            for (var p = 1, e = f - c.length + 1; p < c.length - 1; p++) if (o(t.getLine(e + p)) != c[p]) continue t;\n            var L = t.getLine(f + 1 - c.length),\n              x = o(L);\n            if (x.slice(x.length - c[0].length) == c[0]) return {\n              from: s(f + 1 - c.length, i(L, x, L.length - c[0].length, o)),\n              to: s(f, i(g, m, d.length, o))\n            };\n          }\n        }\n      } : function (t, n, e, r) {\n        if (!n.length) return null;\n        var o = r ? l : h,\n          c = o(n).split(/\\r|\\n\\r?/);\n        t: for (var f = e.line, u = e.ch, a = t.lastLine() + 1 - c.length; f <= a; f++, u = 0) {\n          var g = t.getLine(f).slice(u),\n            m = o(g);\n          if (1 == c.length) {\n            var v = m.indexOf(c[0]);\n            if (-1 == v) continue t;\n            return e = i(g, m, v, o) + u, {\n              from: s(f, i(g, m, v, o) + u),\n              to: s(f, i(g, m, v + c[0].length, o) + u)\n            };\n          }\n          var d = m.length - c[0].length;\n          if (m.slice(d) == c[0]) {\n            for (var p = 1; p < c.length - 1; p++) if (o(t.getLine(f + p)) != c[p]) continue t;\n            var L = t.getLine(f + c.length - 1),\n              x = o(L),\n              C = c[c.length - 1];\n            if (x.slice(0, C.length) == C) return {\n              from: s(f, i(g, m, d, o) + u),\n              to: s(f + c.length - 1, i(L, x, C.length, o))\n            };\n          }\n        }\n      })(t, o, e, u);\n    }) : (o = n(o), f && !1 === f.multiline ? this.matches = function (i, l) {\n      return (i ? function (t, e, i) {\n        e = n(e);\n        for (var o = i.line, l = i.ch, h = t.firstLine(); o >= h; o--, l = -1) {\n          var c = t.getLine(o);\n          l > -1 && (c = c.slice(0, l));\n          var f = r(c, e);\n          if (f) return {\n            from: s(o, f.index),\n            to: s(o, f.index + f[0].length),\n            match: f\n          };\n        }\n      } : e)(t, o, l);\n    } : this.matches = function (i, l) {\n      return (i ? function (t, e, i) {\n        e = n(e);\n        for (var o, l = 1, h = i.line, c = t.firstLine(); h >= c;) {\n          for (var f = 0; f < l; f++) {\n            var u = t.getLine(h--);\n            o = null == o ? u.slice(0, i.ch) : u + \"\\n\" + o;\n          }\n          l *= 2;\n          var a = r(o, e);\n          if (a) {\n            var g = o.slice(0, a.index).split(\"\\n\"),\n              m = a[0].split(\"\\n\"),\n              v = h + g.length,\n              d = g[g.length - 1].length;\n            return {\n              from: s(v, d),\n              to: s(v + m.length - 1, 1 == m.length ? d + m[0].length : m[m.length - 1].length),\n              match: a\n            };\n          }\n        }\n      } : function (t, r, i) {\n        if (!function (t) {\n          return /\\\\s|\\\\n|\\n|\\\\W|\\\\D|\\[\\^/.test(t.source);\n        }(r)) return e(t, r, i);\n        r = n(r);\n        for (var o, l = 1, h = i.line, c = t.lastLine(); h <= c;) {\n          for (var f = 0; f < l; f++) {\n            var u = t.getLine(h++);\n            o = null == o ? u : o + \"\\n\" + u;\n          }\n          l *= 2, r.lastIndex = i.ch;\n          var a = r.exec(o);\n          if (a) {\n            var g = o.slice(0, a.index).split(\"\\n\"),\n              m = a[0].split(\"\\n\"),\n              v = i.line + g.length - 1,\n              d = g[g.length - 1].length;\n            return {\n              from: s(v, d),\n              to: s(v + m.length - 1, 1 == m.length ? d + m[0].length : m[m.length - 1].length),\n              match: a\n            };\n          }\n        }\n      })(t, o, l);\n    });\n  }\n  var l,\n    h,\n    s = t.Pos;\n  String.prototype.normalize ? (l = function l(t) {\n    return t.normalize(\"NFD\").toLowerCase();\n  }, h = function h(t) {\n    return t.normalize(\"NFD\");\n  }) : (l = function l(t) {\n    return t.toLowerCase();\n  }, h = function h(t) {\n    return t;\n  }), o.prototype = {\n    findNext: function findNext() {\n      return this.find(!1);\n    },\n    findPrevious: function findPrevious() {\n      return this.find(!0);\n    },\n    find: function find(n) {\n      for (var e = this.matches(n, this.doc.clipPos(n ? this.pos.from : this.pos.to)); e && 0 == t.cmpPos(e.from, e.to);) n ? e.from.ch ? e.from = s(e.from.line, e.from.ch - 1) : e = e.from.line == this.doc.firstLine() ? null : this.matches(n, this.doc.clipPos(s(e.from.line - 1))) : e.to.ch < this.doc.getLine(e.to.line).length ? e.to = s(e.to.line, e.to.ch + 1) : e = e.to.line == this.doc.lastLine() ? null : this.matches(n, s(e.to.line + 1, 0));\n      if (e) return this.pos = e, this.atOccurrence = !0, this.pos.match || !0;\n      var r = s(n ? this.doc.firstLine() : this.doc.lastLine() + 1, 0);\n      return this.pos = {\n        from: r,\n        to: r\n      }, this.atOccurrence = !1;\n    },\n    from: function from() {\n      if (this.atOccurrence) return this.pos.from;\n    },\n    to: function to() {\n      if (this.atOccurrence) return this.pos.to;\n    },\n    replace: function replace(n, e) {\n      if (this.atOccurrence) {\n        var r = t.splitLines(n);\n        this.doc.replaceRange(r, this.pos.from, this.pos.to, e), this.pos.to = s(this.pos.from.line + r.length - 1, r[r.length - 1].length + (1 == r.length ? this.pos.from.ch : 0));\n      }\n    }\n  }, t.defineExtension(\"getSearchCursor\", function (t, n, e) {\n    return new o(this.doc, t, n, e);\n  }), t.defineDocExtension(\"getSearchCursor\", function (t, n, e) {\n    return new o(this, t, n, e);\n  }), t.defineExtension(\"selectMatches\", function (n, e) {\n    for (var r = [], i = this.getSearchCursor(n, this.getCursor(\"from\"), e); i.findNext() && !(t.cmpPos(i.to(), this.getCursor(\"to\")) > 0);) r.push({\n      anchor: i.from(),\n      head: i.to()\n    });\n    r.length && this.setSelections(r, 0);\n  });\n});\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/vendor/searchcursor.min.js?");

/***/ }),

/***/ "./src/views/tools/text/compare.vue":
/*!******************************************!*\
  !*** ./src/views/tools/text/compare.vue ***!
  \******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compare.vue?vue&type=template&id=361155d1& */ \"./src/views/tools/text/compare.vue?vue&type=template&id=361155d1&\");\n/* harmony import */ var _compare_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compare.vue?vue&type=script&lang=js& */ \"./src/views/tools/text/compare.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compare.vue?vue&type=style&index=0&id=361155d1&lang=less& */ \"./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&\");\n/* harmony import */ var _node_modules_vue_vue_loader_v15_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js */ \"./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\");\n\n\n\n;\n\n\n/* normalize component */\n\nvar component = (0,_node_modules_vue_vue_loader_v15_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(\n  _compare_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  _compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__.render,\n  _compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/views/tools/text/compare.vue\"\n/* harmony default export */ __webpack_exports__[\"default\"] = (component.exports);\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?");

/***/ }),

/***/ "./src/views/tools/text/compare.vue?vue&type=script&lang=js&":
/*!*******************************************************************!*\
  !*** ./src/views/tools/text/compare.vue?vue&type=script&lang=js& ***!
  \*******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_cli_plugin_babel_node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./compare.vue?vue&type=script&lang=js& */ \"./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=script&lang=js&\");\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_vue_cli_plugin_babel_node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); \n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?");

/***/ }),

/***/ "./src/views/tools/text/compare.vue?vue&type=template&id=361155d1&":
/*!*************************************************************************!*\
  !*** ./src/views/tools/text/compare.vue?vue&type=template&id=361155d1& ***!
  \*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"render\": function() { return /* reexport safe */ _node_modules_vue_cli_plugin_babel_node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_vue_loader_v15_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__.render; },\n/* harmony export */   \"staticRenderFns\": function() { return /* reexport safe */ _node_modules_vue_cli_plugin_babel_node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_vue_loader_v15_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns; }\n/* harmony export */ });\n/* harmony import */ var _node_modules_vue_cli_plugin_babel_node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_vue_loader_v15_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_template_id_361155d1___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!../../../../node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./compare.vue?vue&type=template&id=361155d1& */ \"./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=template&id=361155d1&\");\n\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?");

/***/ }),

/***/ "./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&":
/*!****************************************************************************************!*\
  !*** ./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less& ***!
  \****************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_vue_style_loader_index_js_clonedRuleSet_32_use_0_node_modules_css_loader_dist_cjs_js_clonedRuleSet_32_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_32_use_2_node_modules_less_loader_dist_cjs_js_clonedRuleSet_32_use_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-style-loader/index.js??clonedRuleSet-32.use[0]!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!../../../../node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./compare.vue?vue&type=style&index=0&id=361155d1&lang=less& */ \"./node_modules/vue-style-loader/index.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&\");\n/* harmony import */ var _node_modules_vue_style_loader_index_js_clonedRuleSet_32_use_0_node_modules_css_loader_dist_cjs_js_clonedRuleSet_32_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_32_use_2_node_modules_less_loader_dist_cjs_js_clonedRuleSet_32_use_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_clonedRuleSet_32_use_0_node_modules_css_loader_dist_cjs_js_clonedRuleSet_32_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_32_use_2_node_modules_less_loader_dist_cjs_js_clonedRuleSet_32_use_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_0__);\n/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};\n/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_vue_style_loader_index_js_clonedRuleSet_32_use_0_node_modules_css_loader_dist_cjs_js_clonedRuleSet_32_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_32_use_2_node_modules_less_loader_dist_cjs_js_clonedRuleSet_32_use_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== \"default\") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _node_modules_vue_style_loader_index_js_clonedRuleSet_32_use_0_node_modules_css_loader_dist_cjs_js_clonedRuleSet_32_use_1_node_modules_vue_vue_loader_v15_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_clonedRuleSet_32_use_2_node_modules_less_loader_dist_cjs_js_clonedRuleSet_32_use_3_node_modules_vue_vue_loader_v15_lib_index_js_vue_loader_options_compare_vue_vue_type_style_index_0_id_361155d1_lang_less___WEBPACK_IMPORTED_MODULE_0__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)\n/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);\n\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/lib/mergely.css":
/*!******************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/lib/mergely.css ***!
  \******************************************************************************************************************************************************************************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"/* required */\\r\\n.mergely-column textarea { width: 80px; height: 200px; }\\r\\n.mergely-column { float: left; }\\r\\n.mergely-margin { float: left; }\\r\\n.mergely-canvas { float: left; width: 28px; }\\r\\n\\r\\n/* resizeable */\\r\\n.mergely-resizer { width: 100%; height: 100%; }\\r\\n.mergely-full-screen-0 { position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow: hidden; }\\r\\n.mergely-full-screen-8 { position: absolute; top: 8px; bottom: 8px; left: 8px; right: 8px; overflow: hidden; }\\r\\n\\r\\n/* style configuration */\\r\\n.mergely-column { border: 1px solid #ccc; }\\r\\n.mergely-active { border: 1px solid #a3d1ff; }\\r\\n\\r\\n.mergely.a,.mergely.d,.mergely.c { color: #000; }\\r\\n\\r\\n.mergely.a.rhs.start { border-top: 1px solid #a3d1ff; }\\r\\n.mergely.a.lhs.start.end,\\r\\n.mergely.a.rhs.end { border-bottom: 1px solid #a3d1ff; }\\r\\n.mergely.a.rhs { background-color: #ddeeff; }\\r\\n.mergely.a.lhs.start.end.first { border-bottom-width: 0; border-top: 1px solid #a3d1ff; }\\r\\n\\r\\n.mergely.d.lhs { background-color: #ffe9e9; }\\r\\n.mergely.d.lhs.end,\\r\\n.mergely.d.rhs.start.end { border-bottom: 1px solid #f8e8e8; }\\r\\n.mergely.d.rhs.start.end.first { border-bottom-width: 0; border-top: 1px solid #f8e8e8; }\\r\\n.mergely.d.lhs.start { border-top: 1px solid #f8e8e8; }\\r\\n\\r\\n.mergely.c.lhs,\\r\\n.mergely.c.rhs { background-color: #fafafa; }\\r\\n.mergely.c.lhs.start,\\r\\n.mergely.c.rhs.start { border-top: 1px solid #a3a3a3; }\\r\\n.mergely.c.lhs.end,\\r\\n.mergely.c.rhs.end { border-bottom: 1px solid #a3a3a3; }\\r\\n\\r\\n.mergely.ch.a.rhs { background-color: #ddeeff; }\\r\\n.mergely.ch.d.lhs { background-color: #ffe9e9; text-decoration: line-through; color: red !important; }\\r\\n\\r\\n.mergely.current.start { border-top: 1px solid #000 !important; }\\r\\n.mergely.current.end { border-bottom: 1px solid #000 !important; }\\r\\n.mergely.current.lhs.a.start.end,\\r\\n.mergely.current.rhs.d.start.end { border-top-width: 0 !important; }\\r\\n\\r\\n.mergely.current.lhs.a.start.end.empty,\\r\\n.mergely.current.rhs.d.start.end.empty { border-top-width: 1px !important; border-bottom-width: 0px !important; }\\r\\n\\r\\n.mergely.current.CodeMirror-linenumber { color: #F9F9F9; font-weight: bold; background-color: #777; }\\r\\n.CodeMirror-linenumber { cursor: pointer; }\\r\\n.CodeMirror-code { color: #717171; }\\r\\nspan.CodeMirror-selectedtext { background: none !important; }\\r\\n\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/lib/mergely.css?./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use%5B1%5D!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use%5B2%5D");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/vendor/codemirror.min.css":
/*!****************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/vendor/codemirror.min.css ***!
  \****************************************************************************************************************************************************************************************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5);animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection, .CodeMirror-line>span::-moz-selection, .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/vendor/codemirror.min.css?./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use%5B1%5D!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use%5B2%5D");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&":
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less& ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".compare-area {\\n  position: relative;\\n  min-height: 700px;\\n}\\n#mergely-splash {\\n  display: none;\\n}\\n.CodeMirror {\\n  background: transparent;\\n}\\n\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use%5B1%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use%5B2%5D!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");

/***/ }),

/***/ "./src/components/mergely/package/lib/mergely.css":
/*!********************************************************!*\
  !*** ./src/components/mergely/package/lib/mergely.css ***!
  \********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !!../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./mergely.css */ \"./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/lib/mergely.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = (__webpack_require__(/*! !../../../../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\")[\"default\"])\nvar update = add(\"258ea59d\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/lib/mergely.css?");

/***/ }),

/***/ "./src/components/mergely/package/vendor/codemirror.min.css":
/*!******************************************************************!*\
  !*** ./src/components/mergely/package/vendor/codemirror.min.css ***!
  \******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !!../../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./codemirror.min.css */ \"./node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./src/components/mergely/package/vendor/codemirror.min.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = (__webpack_require__(/*! !../../../../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\")[\"default\"])\nvar update = add(\"43da06a2\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack://dtools/./src/components/mergely/package/vendor/codemirror.min.css?");

/***/ }),

/***/ "./node_modules/vue-style-loader/index.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&":
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/vue-style-loader/index.js??clonedRuleSet-32.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less& ***!
  \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!../../../../node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!../../../../node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!../../../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./compare.vue?vue&type=style&index=0&id=361155d1&lang=less& */ \"./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use[2]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/views/tools/text/compare.vue?vue&type=style&index=0&id=361155d1&lang=less&\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = (__webpack_require__(/*! !../../../../node_modules/vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\")[\"default\"])\nvar update = add(\"fb8904c6\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack://dtools/./src/views/tools/text/compare.vue?./node_modules/vue-style-loader/index.js??clonedRuleSet-32.use%5B0%5D!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-32.use%5B1%5D!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-32.use%5B2%5D!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-32.use%5B3%5D!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options");

/***/ })

}]);