Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.0.8 |
Comparing to | |
See all releases |
Code changes from version 4.0.7 to 4.0.8
- CHANGELOG.md +16 -0
- assets/js/forms-admin.js +42 -24
- assets/js/forms-admin.min.js +8 -8
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.0.7 - October 25, 2016
|
5 |
|
6 |
**Improvements**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 4.0.8 - November 23, 2016
|
5 |
+
|
6 |
+
**Improvements**
|
7 |
+
|
8 |
+
- Improved handling of large debug logs.
|
9 |
+
- Improved error messages when writing exceptions to debug log.
|
10 |
+
- Show notice when form is missing required MailChimp fields.
|
11 |
+
- Custom form integration now handles arrays with 1-level depth. Thanks to [Mardari Igor](https://github.com/GarryOne).
|
12 |
+
- You can now use nested tags in your form code, eg `{data key="utm_source" default="{current_path}"}`
|
13 |
+
|
14 |
+
**Additions**
|
15 |
+
|
16 |
+
- Add `data-hide-if` attribute logic to forms. See [conditionally hide form fields](https://mc4wp.com/kb/conditional-fields-elements/). Thanks to [Kurt Zenisek](http://kurtzenisek.com/).
|
17 |
+
- Add hooks for delayed BuddyPress sign-up. Thanks to [Christian Wach](https://profiles.wordpress.org/needle).
|
18 |
+
|
19 |
+
|
20 |
#### 4.0.7 - October 25, 2016
|
21 |
|
22 |
**Improvements**
|
assets/js/forms-admin.js
CHANGED
@@ -422,7 +422,7 @@ var g = function(m) {
|
|
422 |
|
423 |
module.exports = g;
|
424 |
},{"../third-party/beautify-html.js":12,"../third-party/render.js":13}],4:[function(require,module,exports){
|
425 |
-
var FieldHelper = function(m, tabs, editor, fields, i18n) {
|
426 |
'use strict';
|
427 |
|
428 |
var generate = require('./field-generator.js')(m);
|
@@ -1097,7 +1097,6 @@ var FormWatcher = function(m, editor, settings, fields, events, helpers) {
|
|
1097 |
var requiredFieldsInput = document.getElementById('required-fields');
|
1098 |
|
1099 |
function updateFields() {
|
1100 |
-
|
1101 |
fields.getAll().forEach(function(field) {
|
1102 |
// don't run for empty field names
|
1103 |
if(field.name().length <= 0) return;
|
@@ -1153,49 +1152,68 @@ module.exports = FormWatcher;
|
|
1153 |
},{}],9:[function(require,module,exports){
|
1154 |
'use strict';
|
1155 |
|
1156 |
-
var notices =
|
1157 |
|
1158 |
-
function show(
|
1159 |
-
|
1160 |
-
|
1161 |
-
notices.push(txt);
|
1162 |
-
render();
|
1163 |
-
}
|
1164 |
}
|
1165 |
|
1166 |
-
function hide(
|
1167 |
-
|
1168 |
-
|
1169 |
-
notices.splice(index, 1);
|
1170 |
-
render();
|
1171 |
-
}
|
1172 |
}
|
1173 |
|
1174 |
function render() {
|
1175 |
var html = '';
|
1176 |
-
for(
|
1177 |
-
html += '<div class="notice notice-warning"><p>' + notices[
|
1178 |
}
|
1179 |
|
1180 |
var container = document.querySelector('.mc4wp-notices');
|
1181 |
if( ! container ) {
|
1182 |
container = document.createElement('div');
|
1183 |
container.className = 'mc4wp-notices';
|
1184 |
-
var heading = document.querySelector('h1');
|
1185 |
heading.parentNode.insertBefore(container, heading.nextSibling);
|
1186 |
}
|
1187 |
|
1188 |
container.innerHTML = html;
|
1189 |
}
|
1190 |
|
1191 |
-
function init( editor ) {
|
1192 |
-
|
|
|
1193 |
var text = "Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.";
|
1194 |
var formCode = editor.getValue().toLowerCase();
|
1195 |
-
formCode.indexOf('name="groupings') > -1 ? show(text) : hide(
|
1196 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1197 |
}
|
1198 |
|
|
|
|
|
1199 |
module.exports = {
|
1200 |
"init": init
|
1201 |
};
|
@@ -1296,7 +1314,7 @@ var fields = require('./admin/fields.js')(m, events);
|
|
1296 |
var textareaElement = document.getElementById('mc4wp-form-content');
|
1297 |
var editor = window.formEditor = new FormEditor( textareaElement );
|
1298 |
var watcher = new FormWatcher( m, formEditor, settings, fields, events, helpers );
|
1299 |
-
var fieldHelper = new FieldHelper( m, tabs, formEditor, fields, i18n );
|
1300 |
var notices = require('./admin/notices');
|
1301 |
|
1302 |
// mount field helper on element
|
@@ -1311,7 +1329,7 @@ fieldsFactory.registerCustomFields(mc4wp_vars.mailchimp.lists);
|
|
1311 |
window.setTimeout( function() { m.redraw();}, 2000 );
|
1312 |
|
1313 |
// init notices
|
1314 |
-
notices.init(editor);
|
1315 |
|
1316 |
// expose some methods
|
1317 |
window.mc4wp = window.mc4wp || {};
|
422 |
|
423 |
module.exports = g;
|
424 |
},{"../third-party/beautify-html.js":12,"../third-party/render.js":13}],4:[function(require,module,exports){
|
425 |
+
var FieldHelper = function(m, tabs, editor, fields, events, i18n) {
|
426 |
'use strict';
|
427 |
|
428 |
var generate = require('./field-generator.js')(m);
|
1097 |
var requiredFieldsInput = document.getElementById('required-fields');
|
1098 |
|
1099 |
function updateFields() {
|
|
|
1100 |
fields.getAll().forEach(function(field) {
|
1101 |
// don't run for empty field names
|
1102 |
if(field.name().length <= 0) return;
|
1152 |
},{}],9:[function(require,module,exports){
|
1153 |
'use strict';
|
1154 |
|
1155 |
+
var notices = {};
|
1156 |
|
1157 |
+
function show(id, text) {
|
1158 |
+
notices[id] = text;
|
1159 |
+
render();
|
|
|
|
|
|
|
1160 |
}
|
1161 |
|
1162 |
+
function hide(id) {
|
1163 |
+
delete notices[id];
|
1164 |
+
render();
|
|
|
|
|
|
|
1165 |
}
|
1166 |
|
1167 |
function render() {
|
1168 |
var html = '';
|
1169 |
+
for(var key in notices) {
|
1170 |
+
html += '<div class="notice notice-warning inline"><p>' + notices[key] + '</p></div>';
|
1171 |
}
|
1172 |
|
1173 |
var container = document.querySelector('.mc4wp-notices');
|
1174 |
if( ! container ) {
|
1175 |
container = document.createElement('div');
|
1176 |
container.className = 'mc4wp-notices';
|
1177 |
+
var heading = document.querySelector('h1, h2');
|
1178 |
heading.parentNode.insertBefore(container, heading.nextSibling);
|
1179 |
}
|
1180 |
|
1181 |
container.innerHTML = html;
|
1182 |
}
|
1183 |
|
1184 |
+
function init( editor, fields ) {
|
1185 |
+
|
1186 |
+
var groupingsNotice = function() {
|
1187 |
var text = "Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.";
|
1188 |
var formCode = editor.getValue().toLowerCase();
|
1189 |
+
( formCode.indexOf('name="groupings') > -1 ) ? show('deprecated_groupings', text) : hide('deprecated_groupings');
|
1190 |
+
};
|
1191 |
+
|
1192 |
+
var requiredFieldsNotice = function() {
|
1193 |
+
var requiredFields = fields.getAllWhere('forceRequired', true);
|
1194 |
+
var missingFields = requiredFields.filter(function(f) {
|
1195 |
+
return ! editor.containsField(f.name().toUpperCase());
|
1196 |
+
});
|
1197 |
+
|
1198 |
+
var text = '<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.';
|
1199 |
+
text += "<br /><ul class=\"ul-square\" style=\"margin-bottom: 0;\"><li>" + missingFields.map(function(f) { return f.title(); }).join('</li><li>') + '</li></ul>';
|
1200 |
+
|
1201 |
+
( missingFields.length > 0 ) ? show('required_fields_missing', text) : hide('required_fields_missing');
|
1202 |
+
};
|
1203 |
+
|
1204 |
+
// old groupings
|
1205 |
+
groupingsNotice();
|
1206 |
+
editor.on('focus', groupingsNotice);
|
1207 |
+
editor.on('blur', groupingsNotice);
|
1208 |
+
|
1209 |
+
// missing required fields
|
1210 |
+
requiredFieldsNotice();
|
1211 |
+
editor.on('blur', requiredFieldsNotice);
|
1212 |
+
editor.on('focus', requiredFieldsNotice);
|
1213 |
}
|
1214 |
|
1215 |
+
|
1216 |
+
|
1217 |
module.exports = {
|
1218 |
"init": init
|
1219 |
};
|
1314 |
var textareaElement = document.getElementById('mc4wp-form-content');
|
1315 |
var editor = window.formEditor = new FormEditor( textareaElement );
|
1316 |
var watcher = new FormWatcher( m, formEditor, settings, fields, events, helpers );
|
1317 |
+
var fieldHelper = new FieldHelper( m, tabs, formEditor, fields, events, i18n );
|
1318 |
var notices = require('./admin/notices');
|
1319 |
|
1320 |
// mount field helper on element
|
1329 |
window.setTimeout( function() { m.redraw();}, 2000 );
|
1330 |
|
1331 |
// init notices
|
1332 |
+
notices.init(editor, fields);
|
1333 |
|
1334 |
// expose some methods
|
1335 |
window.mc4wp = window.mc4wp || {};
|
assets/js/forms-admin.min.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
!function(){var e=void 0,t=void 0;!function r(t,n,i){function o(l,s){if(!n[l]){if(!t[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};t[l][0].call(d.exports,function(e){var r=t[l][1][e];return o(r?r:e)},d,d.exports,r,t,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,r){"use strict";var n=function(e,t){var r={};return r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){return e("div",[e("label",[t.value," ","hidden"===r.type()?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n,i={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)};return r.forceRequired()&&(i.required=!0,i.disabled=!0,n=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",i),t.isFieldRequired]),n])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){var n=[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons)];return r.acceptsMultipleValues&&n.push(e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)),e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},n)])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,"class":"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r};t.exports=n},{}],2:[function(e,t,r){var n=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=n},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var n=e("../third-party/render.js"),i=e("../third-party/beautify-html.js"),o=function(e){function t(t){var o,a,l,s;return o=t.label().length?e("label",t.label()):"",a="function"==typeof r[t.type()]?r[t.type()](t):r["default"](t),l=t.wrap()?e("p",[o,a]):[o,a],s=n(l),s=i(s),s+"\n"}var r={};return r.select=function(t){var r={name:t.name(),required:t.required()},n=!1,i=t.choices().map(function(t){return t.selected()&&(n=!0),e("option",{value:t.value()!==t.label()?t.value():void 0,selected:t.selected()},t.label())}),o=t.placeholder();return o.length>0&&i.unshift(e("option",{disabled:!0,value:"",selected:!n},o)),e("select",r,i)},r.checkbox=function(t){var r=t.choices().map(function(r){var n=t.name()+("checkbox"===t.type()?"[]":""),i=t.required()&&"radio"===t.type();return e("label",[e("input",{name:n,type:t.type(),value:r.value(),checked:r.selected(),required:i})," ",e("span",r.label())])});return r},r.radio=r.checkbox,r["default"]=function(t){var r,n={type:t.type()};return t.name()&&(n.name=t.name()),t.min()&&(n.min=t.min()),t.max()&&(n.max=t.max()),t.value().length>0&&(n.value=t.value()),t.placeholder().length>0&&(n.placeholder=t.placeholder()),n.required=t.required(),r=e("input",n)},t};t.exports=o},{"../third-party/beautify-html.js":12,"../third-party/render.js":13}],4:[function(e,t,r){var n=function(t,r,n,i,o){"use strict";function a(e){u=i.get(e),u&&u.choices().length>0&&u.value(u.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function l(){}function s(){var e=d(u);n.insert(e),a(""),t.redraw()}function c(){var e=i.getCategories(),r=i.getAll(),n=t("div.available-fields.small-margin",[t("h4",o.chooseField),e.map(function(e){var n=r.filter(function(t){return t.category===e});if(n.length)return t("div.tiny-margin",[t("strong",e),n.map(function(e){var r="button";e.forceRequired()&&(r+=" is-required");var n=e.inFormContent();return null!==n&&(r+=" "+(n?"in-form":"not-in-form")),t("button",{className:r,type:"button",onclick:t.withAttr("value",a),value:e.index},e.title())})])})]),l=null;return u&&(l=f(t("div.field-wizard",[t("h3",[u.title(),u.forceRequired()?t("span.red","*"):"",u.name().length?t("code",u.name()):""]),u.help().length?t("p",t.trust(u.help())):"",h.render(u),t("p",[t("button",{"class":"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&s()},onclick:s},o.addToForm)])]),a)),[n,l]}var u,d=e("./field-generator.js")(t),f=e("./overlay.js")(t,o),h=e("./field-forms.js")(t,o);return n.on("blur",t.redraw),{view:c,controller:l}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){var n=function(e,t){"use strict";function r(){u.forEach(e.deregister)}function n(t,r,n){var i=e.register(t,r);n||u.push(i)}function i(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return"undefined"!=typeof t[e]?t[e]:e}function o(e){var r=t.listFields,o=i(e.field_type),a={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o,choices:e.choices,acceptsMultipleValues:!1};return"address"!==a.type?n(r,a,!1):(n(r,{name:a.name+"[addr1]",type:"text",title:t.streetAddress}),n(r,{name:a.name+"[city]",type:"text",title:t.city}),n(r,{name:a.name+"[state]",type:"text",title:t.state}),n(r,{name:a.name+"[zip]",type:"text",title:t.zip}),n(r,{name:a.name+"[country]",type:"select",title:t.country,choices:mc4wp_vars.countries})),!0}function a(e){var r=t.interestCategories,o=i(e.field_type),a={title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o};n(r,a,!1)}function l(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e["public"]&&!t["public"]?-1:!e["public"]&&t["public"]?1:0}),e.merge_fields.forEach(o),e.interest_categories.forEach(a)}function s(e){r(),e.forEach(l)}function c(e){var r,i=t.formFields;n(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),r={};for(var o in e)r[e[o].id]=e[o].name;n(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:r,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),r={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},n(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:r,value:"subscribe",help:t.formActionDescription},!0)}var u=[];return{registerCustomFields:c,registerListFields:l,registerListsFields:s}};t.exports=n},{}],6:[function(e,t,r){"use strict";t.exports=function(e,t){function r(e){var t=[];return t="function"==typeof e.map?e.map(function(e){return new h({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new h({label:r,value:t})})}function n(n,i){var o,a=s("name",i.name).shift();return a?void(!a.required()&&i.required&&a.required(!0)):(i.choices&&(i.choices=r(i.choices),i.value&&(i.choices=i.choices.map(function(e){return e.value()===i.value&&e.selected(!0),e}))),d.indexOf(n)<0&&d.push(n),o=new f(i),o.category=n,u.push(o),c&&window.clearTimeout(c),c=window.setTimeout(e.redraw,100),t.trigger("fields.change"),o)}function i(t){var r=u.indexOf(t);r>-1&&(delete u[r],e.redraw())}function o(e){return u[e]}function a(){return u=u.map(function(e,t){return e.index=t,e})}function l(){return d}function s(e,t){return u.filter(function(r){return r[e]()===t})}var c,u=[],d=[],f=function(t){this.name=e.prop(t.name),this.title=e.prop(t.title||t.name),this.type=e.prop(t.type),this.label=e.prop(t.title||""),this.value=e.prop(t.value||""),this.placeholder=e.prop(t.placeholder||""),this.required=e.prop(t.required||!1),this.forceRequired=e.prop(t.forceRequired||!1),this.wrap=e.prop(t.wrap||!0),this.min=e.prop(t.min||null),this.max=e.prop(t.max||null),this.help=e.prop(t.help||""),this.choices=e.prop(t.choices||[]),this.inFormContent=e.prop(null),this.acceptsMultipleValues=t.acceptsMultipleValues,this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},h=function(t){this.label=e.prop(t.label),this.title=e.prop(t.title||t.label),this.selected=e.prop(t.selected||!1),this.value=e.prop(t.value||t.label)};return{get:o,getAll:a,getCategories:l,deregister:i,register:n,getAllWhere:s}}},{}],7:[function(e,t,r){"use strict";var n=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js");var i=function(e){function t(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var r,i=document.createElement("form"),o=!1,a={};return i.innerHTML=e.value.toLowerCase(),n&&(r=n.fromTextArea(e,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&r.on("change",function(){if("function"==typeof Event){var t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}})),window.addEventListener("load",function(){n.signal(r,"change")}),e.addEventListener("change",function(){o=!0}),a.getValue=function(){return r?r.getValue():e.value},a.query=function(e){return t().querySelectorAll(e)},a.containsField=function(e){return null!==t().elements.namedItem(e.toLowerCase())},a.insert=function(t){r?(r.replaceSelection(t),r.focus()):e.value+=t},a.on=function(t,n){return r?(t="input"===t?"changes":t,r.on(t,n)):e.addEventListener(t,n)},a.refresh=function(){r&&r.refresh()},a};t.exports=i},{codemirror:17,"codemirror/addon/edit/closetag.js":14,"codemirror/addon/edit/matchtags":15,"codemirror/addon/fold/xml-fold":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){var n=function(e,t,r,n,i,o){"use strict";function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);e.inFormContent(n)}}),l(),e.redraw()}function l(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase()}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),e.indexOf(r)===-1&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){"use strict";function n(e){var t=l.indexOf(e);t<0&&(l.push(e),o())}function i(e){var t=l.indexOf(e);t>-1&&(l.splice(t,1),o())}function o(){for(var e="",t=0;t<l.length;t++)e+='<div class="notice notice-warning"><p>'+l[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){r=document.createElement("div"),r.className="mc4wp-notices";var n=document.querySelector("h1");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}function a(e){e.on("change",function(){var t="Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.",r=e.getValue().toLowerCase();r.indexOf('name="groupings')>-1?n(t):i(t)})}var l=[];t.exports={init:a}},{}],10:[function(e,t,r){var n=function(e,t){"use strict";function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),a()}function n(e){e=e||window.event,27==e.keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(o){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-o.clientWidth-40)/2,n=(t-o.clientHeight-40)/2;o.style.left=(r>0?r:0)+"px",o.style.top=(n>0?n:0)+"px"}}var o,a;return function(l,s){return a=s,document.addEventListener("keydown",n),window.addEventListener("resize",i),[e("div.overlay-wrap",e("div.overlay",{config:function(e){o=e,i()}},[e("span",{"class":"close dashicons dashicons-no",title:t.close,onclick:r}),l])),e("div.overlay-background",{title:t.close,onclick:r})]}};t.exports=n},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=document.getElementById("mc4wp-form-content"),g=window.formEditor=new u(p),m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,n)),v=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var y=new f(h,n);o.on("selectedLists.change",y.registerListsFields),y.registerListsFields(a.getSelectedLists()),y.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),v.init(g),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=g,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,t,r){!function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function r(e){return e.replace(/^\s+/g,"")}function n(t,n,i,o){function a(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=s,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)p&&"\n"===e&&this.newlines<=g&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())t.length&&(r=!0);else{if(indent_handlebars){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,r&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" ")),r=!1),this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,r,n,i="",o=[],a="",l=!1,s=this.pos,c=this.line_char_count;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=s,this.line_char_count=c),o.length?o.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))l=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),l=!0),"="===i&&(l=!1),o.length&&"="!==o[o.length-1]&&">"!==i&&l&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,o),this.print_indentation(o)):(o.push(" "),this.line_char_count++),l=!1),indent_handlebars&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),o.length&&" "!==o[o.length-1]&&"<"!==o[o.length-1]&&(i=" "+i),l=!0),"<"!==i||n||(t=this.pos-1,n="<"),indent_handlebars&&!n&&o.length>=2&&"{"===o[o.length-1]&&"{"==o[o.length-2]&&(t="#"===i||"/"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,o.push(i),o[1]&&"!"===o[1]){o=[this.get_comment(t)];break}if(indent_handlebars&&"{"===n&&o.length>2&&"}"===o[o.length-2]&&"}"===o[o.length-1])break}}while(">"!==i);var u,d,f=o.join("");u=f.indexOf(" ")!==-1?f.indexOf(" "):"{"===f[0]?f.indexOf("}"):f.indexOf(">"),d="<"!==f[0]&&indent_handlebars?"#"===f[2]?3:2:1;var p=f.substring(d,u).toLowerCase();return"/"===f.charAt(f.length-2)||this.Utils.in_array(p,this.Utils.single_token)?e||(this.tag_type="SINGLE"):indent_handlebars&&"{"===f[0]&&"else"===p?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):"script"===p?e||(this.record_tag(p),this.tag_type="SCRIPT"):"style"===p?e||(this.record_tag(p),this.tag_type="STYLE"):this.is_unformatted(p,h)?(a=this.get_unformatted("</"+p+">",f),o.push(a),t>0&&this.Utils.in_array(this.input.charAt(t-1),this.Utils.whitespace)&&o.splice(0,0,this.input.charAt(t-1)),r=this.pos-1,this.Utils.in_array(this.input.charAt(r+1),this.Utils.whitespace)&&o.push(this.input.charAt(r+1)),this.tag_type="SINGLE"):"!"===p.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===p.charAt(0)?(this.retrieve_tag(p.substring(1)),this.tag_type="END",this.traverse_whitespace()):(this.record_tag(p),"html"!==p.toLowerCase()&&(this.indent_content=!0),this.tag_type="START",this.traverse_whitespace()),this.Utils.in_array(p,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=s,this.line_char_count=c),o.join("")},this.get_comment=function(e){var t="",r=">",n=!1;for(this.pos=e,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(t+=input_char,t[t.length-1]!==r[r.length-1]||t.indexOf(r)===-1);)!n&&t.length<10&&(0===t.indexOf("<![if")?(r="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(r="]]>",n=!0):0===t.indexOf("<![")?(r="]>",n=!0):0===t.indexOf("<!--")&&(r="-->",n=!0)),input_char=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&t.toLowerCase().indexOf(e)!==-1)return"";var r="",n="",i=0,o=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!o){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,o=!0,indent_handlebars&&"{"===r&&n.length&&"{"===n[n.length-2]&&(n+=this.get_unformatted("}}"),i=n.length)}while(n.toLowerCase().indexOf(e,i)===-1);return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if(e=this.get_tag(),"string"!=typeof e)return e;var r="TK_TAG_"+this.tag_type;return[e,r]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),n=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,o){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=o,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&t.push("\n")},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){(e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=r(e)),this.print_token_raw(e)},this.print_token_raw=function(e){e&&""!==e&&(e.length>1&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var l,s,c,u,d,f,h,p,g;for(n=n||{},void 0!==n.wrap_line_length&&0!==parseInt(n.wrap_line_length,10)||void 0!==n.max_char&&0!==parseInt(n.max_char,10)||(n.wrap_line_length=n.max_char),s=n.indent_inner_html||!1,c=parseInt(n.indent_size||4,10),u=n.indent_char||" ",f=n.brace_style||"collapse",d=0===parseInt(n.wrap_line_length,10)?32786:parseInt(n.wrap_line_length||250,10),h=n.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],p=n.preserve_newlines||!0,g=p?parseInt(n.max_preserve_newlines||32786,10):0,indent_handlebars=n.indent_handlebars||!1,l=new a,l.printer(t,u,c,d,f);;){var m=l.get_token();if(l.token_text=m[0],l.token_type=m[1],"TK_EOF"===l.token_type)break;switch(l.token_type){case"TK_TAG_START":l.print_newline(!1,l.output),l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===l.last_token&&""===l.last_text){var v=l.token_text.match(/\w+/)[0],y=null;l.output.length&&(y=l.output[l.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),null!==y&&y[1]===v||l.print_newline(!1,l.output)}l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var b=l.token_text.match(/^\s*<([a-z]+)/i);b&&l.Utils.in_array(b[1],h)||l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_CONTENT":l.print_token(l.token_text),l.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==l.token_text){l.print_newline(!1,l.output);var w,x=l.token_text,k=1;"TK_SCRIPT"===l.token_type?w="function"==typeof i&&i:"TK_STYLE"===l.token_type&&(w="function"==typeof o&&o),"keep"===n.indent_scripts?k=0:"separate"===n.indent_scripts&&(k=-l.indent_level);var C=l.get_full_indent(k);if(w)x=w(x.replace(/^\s*/,C),n);else{var S=x.match(/^\s*/)[0],T=S.match(/[^\n\r]*$/)[0].split(l.indent_string).length-1,L=l.get_full_indent(k-T);x=x.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}x&&(l.print_token_raw(C+e(x)),l.print_newline(!1,l.output))}l.current_mode="TAG"}l.last_token=l.token_type,l.last_text=l.token_text}return l.output.join("")}"undefined"!=typeof t&&"undefined"!=typeof t.exports?t.exports=n:"undefined"!=typeof window&&(window.html_beautify=n)}()},{}],13:[function(e,t,r){"use strict";function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2")}function o(e){return""!=e}function a(e,t){return"undefined"===e&&(e=""),"string"!=typeof e&&(e+=""),e=e.replace(/\&/g,"&").replace(/</g,"<").replace(/\>/g,">"),t?e.replace(/\"/g,"""):e}function l(e){return e&&Object.keys(e).length?Object.keys(e).map(function(t){var r=e[t];if("undefined"!=typeof r&&null!==r&&"function"!=typeof r){if("boolean"==typeof r)return r?" "+t:"";if("style"===t){if(!r)return;var n=e.style;return"object"==typeof n&&(n=Object.keys(n).map(function(e){return""!=n[e]?[i(e).toLowerCase(),n[e]].join(":"):""}).filter(o).join(";")),""!=n?' style="'+a(n,!0)+'"':""}return" "+a("className"===t?"class":t)+'="'+a(r,!0)+'"'}}).join(""):""}function s(e){return n(e.children)&&!e.children.length?"":c(e.children)}function c(e){var t=typeof e;if("string"===t)return a(e);if("number"===t||"boolean"===t)return e;if(!e)return"";if(n(e))return e.map(c).join("");if(e.view){var r=e.controller?new e.controller:{},i=c(e.view(r));return r.onunload&&r.onunload(),i}if(e.$trusted)return""+e;var o=s(e);return!o&&u.indexOf(e.tag.toLowerCase())>=0?"<"+e.tag+l(e.attrs)+">":["<",e.tag,l(e.attrs),">",o,"</",e.tag,">"].join("")}var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","!doctype"];t.exports=c},{}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),f=d.state;if("xml"!=d.mode.name||!f.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,g="object"==typeof h&&h.dontCloseTags||p&&a,m="object"==typeof h&&h.indentTags||p&&l,v=f.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||g&&i(g,y)>-1||o(t,v,c,f,!0))return e.Pass;var b=m&&i(m,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var f;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)f=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;f=a+"style"}else{if(!d.context||!d.context.tagName||o(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),i[l]=f}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function o(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return r(e)}})},{"../../lib/codemirror":17,"../fold/xml-fold":16}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":17,"../fold/xml-fold":16}],
|
2 |
-
16:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function r(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function n(e,t){var r=e.cm.getTokenTypeAt(f(e.line,t));return r&&/\btag\b/.test(r)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(n(e,t+1)){g.lastIndex=t,e.ch=t;var r=g.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:f(o,l),to:f(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:f(e.line,e.ch),to:f(i,o)}}}else l(e)}}var f=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+h+"]["+p+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var l=f(n.line,n.ch),c=u(n,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var s=a(o),c=s&&f(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,n)>0)){var p={from:f(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:h[1]?{open:d(o,h[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n){for(var i=new r(e,t.line,t.ch,n);;){var o=d(i);if(!o)break;var a=new r(e,t.line,t.ch,n),l=u(a,o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,i){var o=new r(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,n)}})},{"../../lib/codemirror":17}],17:[function(e,r,n){!function(e,i){"object"==typeof n&&"undefined"!=typeof r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.CodeMirror=i()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);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]);return i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function o(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function a(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function l(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function c(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}function u(){this.id=null}function d(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function f(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function h(e){for(;za.length<=e;)za.push(p(za)+" ");return za[e]}function p(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function v(){}function y(e,t){var r;return Object.create?r=Object.create(e):(v.prototype=e,r=new v),t&&s(t,r),r}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Pa.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&Da.test(e)}function C(e,t,r){var i=this;this.input=r,i.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=n("div",null,"CodeMirror-code"),i.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=n("div",null,"CodeMirror-cursors"),i.measure=n("div",null,"CodeMirror-measure"),i.lineMeasure=n("div",null,"CodeMirror-measure"),i.lineSpace=n("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=n("div",[n("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=n("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=n("div",null,null,"position: absolute; height: "+Aa+"px; width: 1px;"),i.gutters=n("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=n("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=n("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),aa&&la<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),sa||na&&ma||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function S(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function T(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function L(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function M(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function _(e){if(null==e.parent)return null;for(var t=e.parent,r=d(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();return r+t.first}function A(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function N(e,t){return t>=e.first&&t<e.first+e.size}function O(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e,t){return this instanceof W?(this.line=e,void(this.ch=t)):new W(e,t)}function E(e,t){return e.line-t.line||e.ch-t.ch}function z(e){return W(e.line,e.ch)}function P(e,t){return E(e,t)<0?t:e}function D(e,t){return E(e,t)<0?e:t}function H(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function I(e,t){if(t.line<e.first)return W(e.first,0);var r=e.first+e.size-1;return t.line>r?W(r,S(e,r).text.length):F(t,S(e,t.line).text.length)}function F(e,t){var r=e.ch;return null==r||r>t?W(e.line,t):r<0?W(e.line,0):e}function j(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=I(e,t[n]);return r}function R(){Ha=!0}function B(){Ia=!0}function q(e,t,r){this.marker=e,this.from=t,this.to=r}function K(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function U(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function G(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function V(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new q(a,o.from,s?null:o.to))}}return n}function $(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new q(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Y(e,t){if(t.full)return null;var r=N(e,t.from.line)&&S(e,t.from.line).markedSpans,n=N(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==E(t.from,t.to),l=V(r,i,a),s=$(n,o,a),c=1==t.text.length,u=p(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=K(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var g=0;g<s.length;++g){var m=s[g];if(null!=m.to&&(m.to+=u),null==m.from){var v=K(l,m.marker);v||(m.from=u,c&&(l||(l=[])).push(m))}else m.from+=u,c&&(l||(l=[])).push(m)}l&&(l=X(l)),s&&s!=l&&(s=X(s));var y=[l];if(!c){var b,w=t.text.length-2;if(w>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(b||(b=[])).push(new q(l[x].marker,null,null));for(var k=0;k<w;++k)y.push(b);y.push(s)}return y}function X(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Z(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&d(n,r)!=-1||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(E(c.to,l.from)<0||E(c.from,l.to)>0)){var u=[s,1],f=E(c.from,l.from),h=E(c.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function Q(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function J(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ee(e){return e.inclusiveLeft?-1:0}function te(e){return e.inclusiveRight?1:0}function re(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=E(n.from,i.from)||ee(e)-ee(t);if(o)return-o;var a=E(n.to,i.to)||te(e)-te(t);return a?a:t.id-e.id}function ne(e,t){var r,n=Ia&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||re(r,i.marker)<0)&&(r=i.marker);return r}function ie(e){return ne(e,!0)}function oe(e){return ne(e,!1)}function ae(e,t,r,n,i){var o=S(e,t),a=Ia&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=E(c.from,r)||ee(s.marker)-ee(i),d=E(c.to,n)||te(s.marker)-te(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?E(c.to,r)>=0:E(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?E(c.from,n)<=0:E(c.from,n)<0)))return!0}}}function le(e){for(var t;t=ie(e);)e=t.find(-1,!0).line;return e}function se(e){for(var t,r;t=oe(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ce(e,t){var r=S(e,t),n=le(r);return r==n?t:_(n)}function ue(e,t){if(t>e.lastLine())return t;var r,n=S(e,t);if(!de(e,n))return t;for(;r=oe(n);)n=r.find(1,!0).line;return _(n)+1}function de(e,t){var r=Ia&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&fe(e,t,n))return!0}}function fe(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return fe(e,n.line,K(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&fe(e,t,i))return!0}function he(e){e=le(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function pe(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=oe(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function ge(e){var t=e.display,r=e.doc;t.maxLine=S(r,r.first),t.maxLineLength=pe(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=pe(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function me(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function ve(e){return e.level%2?e.to:e.from}function ye(e){return e.level%2?e.from:e.to}function be(e){var t=Le(e);return t?ve(t[0]):0}function we(e){var t=Le(e);return t?ye(p(t)):e.text.length}function xe(e,t,r){var n=e[0].level;return t==n||r!=n&&t<r}function ke(e,t){var r;Fa=null;for(var n=0;n<e.length;++n){var i=e[n];if(i.from<t&&i.to>t)return n;if(i.from==t||i.to==t){if(null!=r)return xe(e,i.level,e[r].level)?(i.from!=i.to&&(Fa=r),n):(i.from!=i.to&&(Fa=n),r);r=n}}return r}function Ce(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&k(e.text.charAt(t)));return t}function Se(e,t,r,n){var i=Le(e);if(!i)return Te(e,t,r,n);for(var o=ke(i,t),a=i[o],l=Ce(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return ke(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?Ce(e,a.to,-1,n):Ce(e,a.from,1,n)}}function Te(e,t,r,n){var i=t+r;if(n)for(;i>0&&k(e.text.charAt(i));)i+=r;return i<0||i>e.text.length?null:i}function Le(e){var t=e.order;return null==t&&(t=e.order=ja(e.text)),t}function Me(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():Ba:n||Ba}function _e(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=Me(e,t,!1),i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}}function Ae(e,t){var r=Me(e,t,!0);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ne(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ae(e,r||t.type,e,t),De(t)||t.codemirrorIgnore}function Oe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)d(r,t[n])==-1&&r.push(t[n])}function We(e,t){return Me(e,t).length>0}function Ee(e){e.prototype.on=function(e,t){Ra(this,e,t)},e.prototype.off=function(e,t){_e(this,e,t)}}function ze(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function He(e){ze(e),Pe(e)}function Ie(e){return e.target||e.srcElement}function Fe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),va&&e.ctrlKey&&1==t&&(t=3),t}function je(e){if(null==Ma){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ma=t.offsetWidth<=1&&t.offsetHeight>2&&!(aa&&la<8))}var i=Ma?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Re(e){if(null!=_a)return _a;var n=r(e,document.createTextNode("AخA")),i=xa(n,0,1).getBoundingClientRect(),o=xa(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(_a=o.right-i.right<3)}function Be(e){if(null!=Va)return Va;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=xa(t,0,1).getBoundingClientRect();return Va=Math.abs(i.left-o.left)>1}function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$a[e]=t}function Ke(e,t){Ya[e]=t}function Ue(e){if("string"==typeof e&&Ya.hasOwnProperty(e))e=Ya[e];else if(e&&"string"==typeof e.name&&Ya.hasOwnProperty(e.name)){var t=Ya[e.name];"string"==typeof t&&(t={name:t}),e=y(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ue(t);var r=$a[t.name];if(!r)return Ge(e,"text/plain");var n=r(e,t);if(Xa.hasOwnProperty(t.name)){var i=Xa[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}function Ve(e,t){var r=Xa.hasOwnProperty(e)?Xa[e]:Xa[e]={};s(t,r)}function $e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ye(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),r&&r.mode!=e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Xe(e,t,r){return!e.startState||e.startState(t,r)}function Ze(e,t,r,n){var i=[e.state.modeGen],o={};ot(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=function(r){var n=e.state.overlays[r],a=1,l=0;ot(e,t.text,n.mode,!0,function(e,t){for(var r=a;l<e;){var o=i[a];o>e&&i.splice(a,1,e,i[a+1],o),a+=2,l=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var s=i[r+1];i[r+1]=(s?s+" ":"")+"overlay "+t}},o)},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Qe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Je(e,_(t)),i=Ze(e,t,t.text.length>e.options.maxHighlightLength?$e(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Je(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=at(e,t,r),a=o>n.first&&S(n,o-1).stateAfter;return a=a?$e(n.mode,a):Xe(n.mode),n.iter(o,t,function(r){et(e,r.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=l?$e(n.mode,a):null,++o}),r&&(n.frontier=o),a}function et(e,t,r,n){var i=e.doc.mode,o=new Za(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&tt(i,r);!o.eol();)rt(i,o,r),o.start=o.pos}function tt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ye(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function rt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Ye(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function nt(e,t,r,n){var i,o=function(e){return{start:d.start,end:d.pos,string:d.current(),type:i||null,state:e?$e(a.mode,u):u}},a=e.doc,l=a.mode;t=I(a,t);var s,c=S(a,t.line),u=Je(e,t.line,r),d=new Za(c.text,e.options.tabSize);for(n&&(s=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,i=rt(l,d,u),n&&s.push(o(!0));return n?s:o()}function it(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function ot(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Za(t,e.options.tabSize),f=e.options.addModeClass&&[null];for(""==t&&it(tt(r,n),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&et(e,t,n,d.pos),d.pos=t.length,s=null):s=it(rt(r,d,n,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e3),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function at(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=S(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var u=c(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}function lt(e,t,r){this.text=e,J(this,t),this.height=r?r(this):1}function st(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Q(e),J(e,r);var i=n?n(e):1;i!=e.height&&M(e,i)}function ct(e){e.parent=null,Q(e)}function ut(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?el:Ja;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function dt(e,t){var r=n("span",null,null,sa?"padding-right: .1px":null),i={pre:n("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(aa||sa)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;i.pos=0,i.addToken=ht,Re(e.display.measure)&&(s=Le(l))&&(i.addToken=gt(i.addToken,s)),i.map=[];var c=t!=e.display.externalMeasured&&_(l);vt(l,i,Qe(e,l,c)),l.styleClasses&&(l.styleClasses.bgClass&&(i.bgClass=a(l.styleClasses.bgClass,i.bgClass||"")),l.styleClasses.textClass&&(i.textClass=a(l.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(je(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(sa){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=a(i.pre.className,i.textClass||"")),i}function ft(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ht(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?pt(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var p=u.exec(t),g=p?p.index-f:t.length-f;if(g){var m=document.createTextNode(c.slice(f,f+g));aa&&la<9?s.appendChild(n("span",[m])):s.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;f+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;v=s.appendChild(n("span",h(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(v=s.appendChild(n("span","\r"==p[0]?"␍":"","cm-invalidchar")),v.setAttribute("cm-text",p[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),aa&&la<9?s.appendChild(n("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),aa&&la<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||i||o||d||l){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function pt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function gt(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>c&&d.from<=c));f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}function mt(e,t,r,n){var i=!n&&r.widgetNode;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}function vt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,f,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=d=l="",f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?y.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!f||re(f.marker,k)<0)&&(f=x)):x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!f||f.from==p)for(var S=0;S<y.length;++S)mt(t,0,y[S]);if(f&&(f.from||0)==p){if(mt(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(m){var L=p+m.length;if(!f){var M=L>T?m.slice(0,T-p):m;t.addToken(t,M,a?a+s:s,u,p+M.length==v?c:"",d,l)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=i.slice(o,o=r[g++]),a=ut(r[g++],t.cm.options)}}else for(var _=1;_<r.length;_+=2)t.addToken(t,i.slice(o,o=r[_]),ut(r[_+1],t.cm.options))}function yt(e,t,r){this.line=t,this.rest=se(t),this.size=this.rest?_(p(this.rest))-r+1:1,this.node=this.text=null,this.hidden=de(e,t)}function bt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new yt(e.doc,S(e.doc,o),o);n=o+a.size,i.push(a)}return i}function wt(e){tl?tl.ops.push(e):e.ownsGroup=tl={ops:[e],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function kt(e,t){var r=e.ownsGroup;if(r)try{xt(r)}finally{tl=null,t(r)}}function Ct(e,t){var r=Me(e,t,!1);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);tl?n=tl.delayedCallbacks:rl?n=rl:(n=rl=[],setTimeout(St,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function St(){var e=rl;rl=null;for(var t=0;t<e.length;++t)e[t]()}function Tt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?At(e,t):"gutter"==o?Ot(e,t,r,n):"class"==o?Nt(t):"widget"==o&&Wt(e,t,n)}t.changes=null}function Lt(e){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),aa&&la<8&&(e.node.style.zIndex=2)),e.node}function Mt(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=Lt(e);e.background=r.insertBefore(n("div",null,t),r.firstChild)}}function _t(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):dt(e,t)}function At(e,t){var r=t.text.className,n=_t(e,t);t.text==t.node&&(t.node=n.pre),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,Nt(t)):r&&(t.text.className=r)}function Nt(e){Mt(e),e.line.wrapClass?Lt(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function Ot(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Lt(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Lt(t),s=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(n("div",O(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(n("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function Wt(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);zt(e,t,r)}function Et(e,t,r,n){var i=_t(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Nt(t),Ot(e,t,r,n),zt(e,t,n),t.node}function zt(e,t,r){if(Pt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Pt(e,t.rest[n],t,r,!1)}function Pt(e,t,r,i,o){if(t.widgets)for(var a=Lt(r),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Dt(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Ct(c,"redraw")}}function Dt(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ht(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!i(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function It(e,t){for(var r=Ie(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}function Ft(e){return e.lineSpace.offsetTop}function jt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight;
|
3 |
-
}function Rt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Bt(e){return Aa-e.display.nativeBarWidth}function qt(e){return e.display.scroller.clientWidth-Bt(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-Bt(e)-e.display.barHeight}function Ut(e,t,r){var n=e.options.lineWrapping,i=n&&qt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Gt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(_(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Vt(e,t){t=le(t);var n=_(t),i=e.display.externalMeasured=new yt(e.doc,t,n);i.lineN=n;var o=i.built=dt(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function $t(e,t,r,n){return Zt(e,Xt(e,t),r,n)}function Yt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[kr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Xt(e,t){var r=_(t),n=Yt(e,r);n&&!n.text?n=null:n&&n.changes&&(Tt(e,n,r,vr(e)),e.curOp.forceUpdate=!0),n||(n=Vt(e,t));var i=Gt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Zt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ut(e,t.view,t.rect),t.hasHeights=!0),o=er(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Qt(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[(c-=3)+2],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Jt(e,t){var r=nl;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--);return r}function er(e,t,r,n){var i,o=Qt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&k(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&k(t.line.text.charAt(o.coverStart+s));)++s;if(i=aa&&la<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Jt(xa(a,l,s).getClientRects(),n),i.left||i.right||0==l)break;s=l,l-=1,c="right"}aa&&la<11&&(i=tr(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(aa&&la<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+mr(e.display),top:f.top,bottom:f.bottom}:nl}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(h+p)/2,m=t.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,b=m[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p),w}function tr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Be(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function rr(e){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]={}}function nr(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)rr(e.display.view[r])}function ir(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ar(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function lr(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Ht(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=he(t);if("local"==n?a+=Ft(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:ar());var s=l.left+("window"==n?0:or());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function sr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=or(),i-=ar();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function cr(e,t,r,n,i){return n||(n=S(e.doc,t.line)),lr(e,n,$t(e,n,t.ch,i),r)}function ur(e,t,r,n,i,o){function a(t,a){var l=Zt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,lr(e,n,l,r)}function l(e,t){var r=s[t],n=r.level%2;return e==ve(r)&&t&&r.level<s[t-1].level?(r=s[--t],e=ye(r)-(r.level%2?0:1),n=!0):e==ye(r)&&t<s.length-1&&r.level<s[t+1].level&&(r=s[++t],e=ve(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?a(e-1):a(e,n)}n=n||S(e.doc,t.line),i||(i=Xt(e,n));var s=Le(n),c=t.ch;if(!s)return a(c);var u=ke(s,c),d=l(c,u);return null!=Fa&&(d.other=l(c,Fa)),d}function dr(e,t){var r=0;t=I(e.doc,t),e.options.lineWrapping||(r=mr(e.display)*t.ch);var n=S(e.doc,t.line),i=he(n)+Ft(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function fr(e,t,r,n){var i=W(e,t);return i.xRel=n,r&&(i.outside=!0),i}function hr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return fr(n.first,0,!0,-1);var i=A(n,r),o=n.first+n.size-1;if(i>o)return fr(n.first+n.size-1,S(n,o).text.length,!0,1);t<0&&(t=0);for(var a=S(n,i);;){var l=pr(e,a,i,t,r),s=oe(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=_(a=c.to.line)}}function pr(e,t,r,n,i){function o(n){var i=ur(e,W(r,n),"line",t,c);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-he(t),l=!1,s=2*e.display.wrapper.clientWidth,c=Xt(e,t),u=Le(t),d=t.text.length,f=be(t),h=we(t),p=o(f),g=l,m=o(h),v=l;if(n>m)return fr(r,h,v,1);for(;;){if(u?h==f||h==Se(t,f,1):h-f<=1){var y=n<p||n-p<=m-n?f:h,b=y==f?g:v,w=n-(y==f?p:m);if(v&&!u&&!/\s/.test(t.text.charAt(y))&&w>0&&y<t.text.length&&c.view.measure.heights.length>1){var x=Zt(e,c,y,"right");a<=x.bottom&&a>=x.top&&Math.abs(n-x.right)<w&&(b=!1,y++,w=n-x.right)}for(;k(t.text.charAt(y));)++y;var C=fr(r,y,b,w<-1?-1:w>1?1:0);return C}var S=Math.ceil(d/2),T=f+S;if(u){T=f;for(var L=0;L<S;++L)T=Se(t,T,1)}var M=o(T);M>n?(h=T,m=M,(v=l)&&(m+=1e3),d=S):(f=T,p=M,g=l,d-=S)}}function gr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Qa){Qa=n("pre");for(var i=0;i<49;++i)Qa.appendChild(document.createTextNode("x")),Qa.appendChild(n("br"));Qa.appendChild(document.createTextNode("x"))}r(e.measure,Qa);var o=Qa.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function mr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function vr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:yr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function yr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function br(e){var t=gr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/mr(e.display)-3);return function(i){if(de(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function wr(e){var t=e.doc,r=br(e);t.iter(function(e){var t=r(e);t!=e.height&&M(e,t)})}function xr(e,t,r,n){var i=e.display;if(!r&&"true"==Ie(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,u=hr(e,o,a);if(n&&1==u.xRel&&(s=S(e.doc,u.line).text).length==u.ch){var d=c(s,s.length,e.options.tabSize)-s.length;u=W(u.line,Math.max(0,Math.round((o-Rt(e.display).left)/mr(e.display))-d))}return u}function kr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Cr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Sr(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t!==!1||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Tr(e,l.head,i),s||Lr(e,l,o)}}return n}function Tr(e,t,r){var i=ur(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));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){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Lr(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?d-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return cr(e,W(t,r),"div",c,n)}var a,s,c=S(l,t),f=c.text.length;return me(Le(c),r||0,null==n?f:n,function(e,t,l){var c,h,p,g=o(e,"left");if(e==t)c=g,h=p=g.left;else{if(c=o(t-1,"right"),"rtl"==l){var m=g;g=c,c=m}h=g.left,p=c.right}null==r&&0==e&&(h=u),c.top-g.top>3&&(i(h,g.top,null,g.bottom),h=u,g.bottom<c.top&&i(h,g.bottom,null,c.top)),null==n&&t==f&&(p=d),(!a||g.top<a.top||g.top==a.top&&g.left<a.left)&&(a=g),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),h<u+1&&(h=u),i(h,c.top,p-h,c.bottom)}),{start:a,end:s}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=Rt(e.display),u=c.left,d=Math.max(a.sizerWidth,qt(e)-a.sizer.offsetLeft)-c.right,f=t.from(),h=t.to();if(f.line==h.line)o(f.line,f.ch,h.ch);else{var p=S(l,f.line),g=S(l,h.line),m=le(p)==le(g),v=o(f.line,f.ch,m?p.text.length+1:null).end,y=o(h.line,m?0:null,h.ch).start;m&&(v.top<y.top-2?(i(v.right,v.top,null,v.bottom),i(u,y.top,y.left,y.bottom)):i(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&i(u,v.bottom,null,y.top)}r.appendChild(s)}function Mr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function _r(e){e.state.focused||(e.display.input.focus(),Nr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Or(e))},100)}function Nr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,o(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),sa&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Mr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,Sa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Wr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=yr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Er(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=O(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",_n(e),!0}return!1}function zr(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(aa&&la<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(o<2&&(o=gr(t)),(s>.001||s<-.001)&&(M(i.line,o),Pr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)Pr(i.rest[c])}}}function Pr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Dr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ft(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=A(t,n),a=A(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=A(t,he(S(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=A(t,he(S(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Hr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,na||Ln(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),na&&Ln(e),wn(e,100))}function Ir(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Wr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;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),{x:t,y:r}}function jr(e){var t=Fr(e);return t.x*=ol,t.y*=ol,t}function Rr(e,t){var r=Fr(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&va&&sa)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!na&&!da&&null!=ol)return i&&s&&Hr(e,Math.max(0,Math.min(a.scrollTop+i*ol,a.scrollHeight-a.clientHeight))),Ir(e,Math.max(0,Math.min(a.scrollLeft+n*ol,a.scrollWidth-a.clientWidth))),(!i||i&&s)&&ze(t),void(o.wheelStartX=null);if(i&&null!=ol){var f=i*ol,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Ln(e,{top:h,bottom:p})}il<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(ol=(ol*il+r)/(il+1),++il)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Br(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+jt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Bt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function qr(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ra(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ra(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,aa&&la<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function Kr(){}function Ur(e,t){t||(t=Br(e));var r=e.display.barWidth,n=e.display.barHeight;Gr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&zr(e),Gr(e,Br(e)),r=e.display.barWidth,n=e.display.barHeight}function Gr(e,t){var r=e.display,n=r.scrollbars.update(t);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=""}function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Sa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new al[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ra(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Ir(e,t):Hr(e,t)},e),e.display.scrollbars.addClass&&o(e.display.wrapper,e.display.scrollbars.addClass)}function $r(e,t){if(!Ne(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!pa){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ft(e.display))+"px;\n height: "+(t.bottom-t.top+Bt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Yr(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var a=!1;i=ur(e,t);var l=r&&r!=t?ur(e,r):i,s=Zr(e,Math.min(i.left,l.left),Math.min(i.top,l.top)-n,Math.max(i.left,l.left),Math.max(i.bottom,l.bottom)+n),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(Hr(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=s.scrollLeft&&(Ir(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(a=!0)),!a)break}return i}function Xr(e,t,r,n,i){var o=Zr(e,t,r,n,i);null!=o.scrollTop&&Hr(e,o.scrollTop),null!=o.scrollLeft&&Ir(e,o.scrollLeft)}function Zr(e,t,r,n,i){var o=e.display,a=gr(e.display);r<0&&(r=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=Kt(e),c={};i-r>s&&(i=r+s);var u=e.doc.height+jt(o),d=r<a,f=i>u-a;if(r<l)c.scrollTop=d?0:r;else if(i>l+s){var h=Math.min(r,(f?u:i)-s);h!=l&&(c.scrollTop=h)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=qt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=n-t>g;return m&&(n=t+g),t<10?c.scrollLeft=0:t<p?c.scrollLeft=Math.max(0,t-(m?0:10)):n>g+p-3&&(c.scrollLeft=n+(m?0:10)-g),c}function Qr(e,t,r){null==t&&null==r||en(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Jr(e){en(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?W(t.line,t.ch-1):t,n=W(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=dr(e,t.from),n=dr(e,t.to),i=Zr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function tn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ll},wt(e.curOp)}function rn(e){var t=e.curOp;kt(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;nn(e)})}function nn(e){for(var t=e.ops,r=0;r<t.length;r++)on(t[r]);for(var n=0;n<t.length;n++)an(t[n]);for(var i=0;i<t.length;i++)ln(t[i]);for(var o=0;o<t.length;o++)sn(t[o]);for(var a=0;a<t.length;a++)cn(t[a])}function on(e){var t=e.cm,r=t.display;Cn(t),e.updateMaxLine&&ge(t),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 kn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function an(e){e.updatedDisplay=e.mustUpdate&&Sn(e.cm,e.update)}function ln(e){var t=e.cm,r=t.display;e.updatedDisplay&&zr(t),e.barMeasure=Br(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$t(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+Bt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-qt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function sn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Ta()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&An(t,e.barMeasure),e.selectionChanged&&Mr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_r(e.cm)}function cn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Tn(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,Wr(t)),e.scrollToPos){var i=Yr(t,I(n,e.scrollToPos.from),I(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&$r(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Ae(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Ae(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ae(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function un(e,t){if(e.curOp)return t();tn(e);try{return t()}finally{rn(e)}}function dn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);tn(e);try{return t.apply(e,arguments)}finally{rn(e)}}}function fn(e){return function(){if(this.curOp)return e.apply(this,arguments);tn(this);try{return e.apply(this,arguments)}finally{rn(this)}}}function hn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);tn(t);try{return e.apply(this,arguments)}finally{rn(t)}}}function pn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ia&&ce(e.doc,t)<i.viewTo&&mn(e);else if(r<=i.viewFrom)Ia&&ue(e.doc,r+n)>i.viewFrom?mn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)mn(e);else if(t<=i.viewFrom){var o=vn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):mn(e)}else if(r>=i.viewTo){var a=vn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):mn(e)}else{var l=vn(e,t,t,-1),s=vn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(bt(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):mn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function gn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);d(a,r)==-1&&a.push(r)}}}function mn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function vn(e,t,r,n){var i,o=kr(e,t),a=e.display.view;if(!Ia||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ce(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function yn(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=bt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=bt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(kr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(bt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function bn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function wn(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,l(xn,e))}function xn(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(t.mode,Je(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength,s=Ze(e,o,l?$e(t.mode,n):n,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(t.frontier),o.stateAfter=l?n:$e(t.mode,n)}else o.text.length<=e.options.maxHighlightLength&&et(e,o.text,n),o.stateAfter=t.frontier%5==0?$e(t.mode,n):null;if(++t.frontier,+new Date>r)return wn(e,e.options.workDelay),!0}),i.length&&un(e,function(){for(var t=0;t<i.length;t++)gn(e,i[t],"text")})}}function kn(e,t,r){var n=e.display;this.viewport=t,this.visible=Dr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=qt(e),this.force=r,this.dims=vr(e),this.events=[]}function Cn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Bt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Bt(e)+"px",t.scrollbarsClipped=!0)}function Sn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return mn(e),!1;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==bn(e))return!1;Er(e)&&(mn(e),r.dims=vr(e));var o=i.first+i.size,a=Math.max(r.visible.from-e.options.viewportMargin,i.first),l=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(i.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Ia&&(a=ce(e.doc,a),l=ue(e.doc,l));var s=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;yn(e,a,l),n.viewOffset=he(S(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=bn(e);if(!s&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Ta();return c>4&&(n.lineDiv.style.display="none"),Mn(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Ta()!=u&&u.offsetHeight&&u.focus(),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function Tn(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=qt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+jt(e.display)-Kt(e),r.top)}),t.visible=Dr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Sn(e,t);n=!1){zr(e);var i=Br(e);Cr(e),Ur(e,i),An(e,i)}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)}function Ln(e,t){var r=new kn(e,t);if(Sn(e,r)){zr(e),Tn(e,r);var n=Br(e);Cr(e),Ur(e,n),An(e,n),r.finish()}}function Mn(e,r,n){function i(t){var r=t.nextSibling;return sa&&va&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild,c=o.view,u=o.viewFrom,f=0;f<c.length;f++){var h=c[f];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=r&&r<=u&&h.lineNumber;h.changes&&(d(h.changes,"gutter")>-1&&(p=!1),Tt(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(O(e.options,u)))),s=h.node.nextSibling}else{var g=Et(e,h,u,n);l.insertBefore(g,s)}u+=h.size}for(;s;)s=i(s)}function _n(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function An(e,t){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+Bt(e)+"px"}function Nn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",_n(e)}function On(e){var t=d(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Wn(e,t){this.ranges=e,this.primIndex=t;
|
4 |
-
}function En(e,t){this.anchor=e,this.head=t}function zn(e,t){var r=e[t];e.sort(function(e,t){return E(e.from(),t.from())}),t=d(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(E(o.to(),i.from())>=0){var a=D(o.from(),i.from()),l=P(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new En(s?l:a,s?a:l))}}return new Wn(e,t)}function Pn(e,t){return new Wn([new En(e,t||e)],0)}function Dn(e){return e.text?W(e.from.line+e.text.length-1,p(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Hn(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Dn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Dn(t).ch-t.to.ch),W(r,n)}function In(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new En(Hn(i.anchor,t),Hn(i.head,t)))}return zn(r,e.sel.primIndex)}function Fn(e,t,r){return e.line==t.line?W(r.line,e.ch-t.ch+r.ch):W(r.line+(e.line-t.line),e.ch)}function jn(e,t,r){for(var n=[],i=W(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Fn(l.from,i,o),c=Fn(Dn(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=E(u.head,u.anchor)<0;n[a]=new En(d?c:s,d?s:c)}else n[a]=new En(s,s)}return new Wn(n,e.sel.primIndex)}function Rn(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Bn(e)}function Bn(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,wn(e,100),e.state.modeGen++,e.curOp&&pn(e)}function qn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==p(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Kn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){st(e,r,i,n),Ct(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new lt(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=S(e,l.line),d=S(e,s.line),f=p(c),h=i(c.length-1),g=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(qn(e,t)){var m=a(0,c.length-1);o(d,d.text,h),g&&e.remove(l.line,g),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new lt(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,g);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var y=a(1,c.length-1);g>1&&e.remove(l.line+1,g-1),e.insert(l.line+1,y)}Ct(e,"change",e,t)}function Un(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Gn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wr(e),Rn(e),e.options.lineWrapping||ge(e),e.options.mode=t.modeOption,pn(e)}function Vn(e){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}function $n(e,t){var r={from:z(t.from),to:Dn(t),text:T(e,t.from,t.to)};return ti(e,r,t.from.line,t.to.line+1),Un(e,function(e){return ti(e,r,t.from.line,t.to.line+1)},!0),r}function Yn(e){for(;e.length;){var t=p(e);if(!t.ranges)break;e.pop()}}function Xn(e,t){return t?(Yn(e.done),p(e.done)):e.done.length&&!p(e.done).ranges?p(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),p(e.done)):void 0}function Zn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Xn(i,i.lastOp==n)))a=p(o.changes),0==E(t.from,t.to)&&0==E(t.from,a.to)?a.to=Dn(t):o.changes.push($n(e,t));else{var s=p(i.done);for(s&&s.ranges||ei(e.sel,i.done),o={changes:[$n(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ae(e,"historyAdded")}function Qn(e,t,r,n){var i=t.charAt(0);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)}function Jn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Qn(e,o,p(i.done),t))?i.done[i.done.length-1]=t:ei(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Yn(i.undone)}function ei(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ti(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ni(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ri(r[i]));return n}function ii(e,t){var r=ni(e,t),n=Y(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function oi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?Wn.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&d(t,Number(u[1]))>-1&&(p(l)[f]=c[f],delete c[f])}}}return n}function ai(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=E(r,i)<0;o!=E(n,i)<0?(i=r,r=n):o!=E(r,n)<0&&(r=n)}return new En(i,r)}return new En(n||r,r)}function li(e,t,r,n){hi(e,new Wn([ai(e,e.sel.primary(),t,r)],0),n)}function si(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=ai(e,e.sel.ranges[i],t[i],null);var o=zn(n,e.sel.primIndex);hi(e,o,r)}function ci(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,hi(e,zn(i,e.sel.primIndex),n)}function ui(e,t,r,n){hi(e,Pn(t,r),n)}function di(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new En(I(e,t[n].anchor),I(e,t[n].head))},origin:r&&r.origin};return Ae(e,"beforeSelectionChange",e,n),e.cm&&Ae(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?zn(n.ranges,n.ranges.length-1):t}function fi(e,t,r){var n=e.history.done,i=p(n);i&&i.ranges?(n[n.length-1]=t,pi(e,t,r)):hi(e,t,r)}function hi(e,t,r){pi(e,t,r),Jn(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function pi(e,t,r){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(t=di(e,t,r));var n=r&&r.bias||(E(t.primary().head,e.sel.primary().head)<0?-1:1);gi(e,vi(e,t,n,!0)),r&&r.scroll===!1||!e.cm||Jr(e.cm)}function gi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Oe(e.cm)),Ct(e,"cursorActivity",e))}function mi(e){gi(e,vi(e,e.sel,null,!1),Oa)}function vi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=bi(e,a.anchor,l&&l.anchor,r,n),c=bi(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new En(s,c))}return i?zn(i,t.primIndex):t}function yi(e,t,r,n,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(Ae(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=wi(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=E(c,r))&&(n<0?u<0:u>0))return yi(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=wi(e,d,n,d.line==t.line?o:null)),d?yi(e,d,t,n,i):null}}return t}function bi(e,t,r,n,i){var o=n||1,a=yi(e,t,r,o,i)||!i&&yi(e,t,r,o,!0)||yi(e,t,r,-o,i)||!i&&yi(e,t,r,-o,!0);return a?a:(e.cantEdit=!0,W(e.first,0))}function wi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?I(e,W(t.line-1)):null:r>0&&t.ch==(n||S(e,t.line)).text.length?t.line<e.first+e.size-1?W(t.line+1,0):null:new W(t.line,t.ch+r)}function xi(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),Oa)}function ki(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=I(e,t)),r&&(n.to=I(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Ae(e,"beforeChange",e,n),e.cm&&Ae(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ci(e,t,r){if(e.cm){if(!e.cm.curOp)return dn(e.cm,Ci)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))||(t=ki(e,t,!0))){var n=Ha&&!r&&Z(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Si(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Si(e,t)}}function Si(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=In(e,t);Zn(e,t,r,e.cm?e.cm.curOp.id:NaN),Mi(e,t,r,Y(e,t));var n=[];Un(e,function(e,r){r||d(n,e.history)!=-1||(Wi(e.history,t),n.push(e.history)),Mi(e,t,null,Y(e,t))})}}function Ti(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;n=a.pop(),n.ranges;){if(ei(n,l),r&&!n.equals(e.sel))return void hi(e,n,{clearRedo:!1});o=n}var c=[];ei(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),f=function(r){var i=n.changes[r];if(i.origin=t,u&&!ki(e,i,!1))return a.length=0,{};c.push($n(e,i));var o=r?In(e,i):p(a);Mi(e,i,o,ii(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Dn(i)});var l=[];Un(e,function(e,t){t||d(l,e.history)!=-1||(Wi(e.history,i),l.push(e.history)),Mi(e,i,null,ii(e,i))})},h=n.changes.length-1;h>=0;--h){var g=f(h);if(g)return g.v}}}}function Li(e,t){if(0!=t&&(e.first+=t,e.sel=new Wn(g(e.sel.ranges,function(e){return new En(W(e.anchor.line+t,e.anchor.ch),W(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)gn(e.cm,n,"gutter")}}function Mi(e,t,r,n){if(e.cm&&!e.cm.curOp)return dn(e.cm,Mi)(e,t,r,n);if(t.to.line<e.first)return void Li(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Li(e,i),t={from:W(e.first,0),to:W(t.to.line+i,t.to.ch),text:[p(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:W(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=In(e,t)),e.cm?_i(e.cm,t,n):Kn(e,t,n),pi(e,r,Oa)}}function _i(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=_(le(S(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Oe(e),Kn(n,t,r,br(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=pe(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,o.line),wn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?pn(e):o.line!=a.line||1!=t.text.length||qn(e.doc,t)?pn(e,o.line,a.line+1,c):gn(e,o.line,"text");var u=We(e,"changes"),d=We(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Ct(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Ai(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Ci(e,{from:r,to:n,text:t,origin:i})}function Ni(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Oi(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Ni(o.ranges[l].anchor,t,r,n),Ni(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=W(c.from.line+n,c.from.ch),c.to=W(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Wi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Oi(e.done,r,n,i),Oi(e.undone,r,n,i)}function Ei(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=S(e,H(e,t)):i=_(t),null==i?null:(n(o,i)&&e.cm&&gn(e.cm,i,r),o)}function zi(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function Pi(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Di(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t}function Hi(e,t,r){he(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Qr(e,null,r)}function Ii(e,t,r,n){var i=new Di(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Ei(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);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&&!de(e,t)){var n=he(t)<e.scrollTop;M(t,t.height+Ht(i)),n&&Qr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Fi(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++sl}function ji(e,t,r,i,o){if(i&&i.shared)return Bi(e,t,r,i,o);if(e.cm&&!e.cm.curOp)return dn(e.cm,ji)(e,t,r,i,o);var a=new Fi(e,o),l=E(t,r);if(i&&s(i,a,!1),l>0||0==l&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=n("span",[a.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ae(e,t.line,t,r,a)||t.line!=r.line&&ae(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");B()}a.addToHistory&&Zn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var c,u=t.line,d=e.cm;if(e.iter(u,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&le(e)==d.display.maxLine&&(c=!0),a.collapsed&&u!=t.line&&M(e,0),G(e,new q(a,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),a.collapsed&&e.iter(t.line,r.line+1,function(t){de(e,t)&&M(t,0)}),a.clearOnEnter&&Ra(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(R(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++sl,a.atomic=!0),d){if(c&&(d.curOp.updateMaxLine=!0),a.collapsed)pn(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)gn(d,f,"text");a.atomic&&mi(d.doc),Ct(d,"markerAdded",d,a)}return a}function Ri(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r}function Bi(e,t,r,n,i){n=s(n),n.shared=!1;var o=[ji(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Un(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(ji(e,I(e,t),I(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=p(o)}),new Ri(o,a)}function qi(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(e){return e.parent})}function Ki(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(E(o,a)){var l=ji(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Ui(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Un(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];d(n,o.doc)==-1&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}function Gi(e){var t=this;if(Yi(t),!Ne(t,e)&&!It(t.display,e)){ze(e),aa&&(dl=+new Date);var r=xr(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||d(t.options.allowDropFileTypes,e.type)!=-1){var l=new FileReader;l.onload=dn(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=I(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ci(t.doc,s),fi(t.doc,Pn(r,Dn(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),pi(t.doc,Pn(r,r)),u)for(var f=0;f<u.length;++f)Ai(t.doc,"",u[f].anchor,u[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Vi(e,t){if(aa&&(!e.state.draggingText||+new Date-dl<100))return void He(t);if(!Ne(e,t)&&!It(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fa)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",da&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),da&&r.parentNode.removeChild(r)}}function $i(e,t){var i=xr(e,t);if(i){var o=document.createDocumentFragment();Tr(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)}}function Yi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Xi(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Zi(){fl||(Qi(),fl=!0)}function Qi(){var e;Ra(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Xi(Ji)},100))}),Ra(window,"blur",function(){return Xi(Or)})}function Ji(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function eo(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function to(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=g(r.split(" "),eo),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function ro(e,t,r,n){t=oo(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ro(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=ro(e,t.fallthrough[o],r,n);if(a)return a}}}function no(e){var t="string"==typeof e?e:hl[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function io(e,t){if(da&&34==e.keyCode&&e["char"])return!1;var r=hl[e.keyCode],n=r;return null!=n&&!e.altGraphKey&&(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(ka?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(ka?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)}function oo(e){return"string"==typeof e?vl[e]:e}function ao(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&E(o.from,p(n).to)<=0;){var a=n.pop();if(E(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}un(e,function(){for(var t=n.length-1;t>=0;t--)Ai(e.doc,"",n[t].from,n[t].to,"+delete");Jr(e)})}function lo(e,t){var r=S(e.doc,t),n=le(r);n!=r&&(t=_(n));var i=Le(n),o=i?i[0].level%2?we(n):be(n):0;return W(t,o)}function so(e,t){for(var r,n=S(e.doc,t);r=oe(n);)n=r.find(1,!0).line,t=null;var i=Le(n),o=i?i[0].level%2?be(n):we(n):n.text.length;return W(null==t?_(n):t,o)}function co(e,t){var r=lo(e,t.line),n=S(e.doc,r.line),i=Le(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return W(r.line,a?0:o)}return r}function uo(e,t,r){if("string"==typeof t&&(t=wl[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Na}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function fo(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=ro(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&ro(t,e.options.extraKeys,r,e)||ro(t,e.options.keyMap,r,e)}function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(no(t))return"handled";xl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=fo(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Ct(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(ze(r),Mr(e)),i&&!o&&/\'$/.test(t)?(ze(r),!0):!!o}function po(e,t){var r=io(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(t){return uo(e,t,!0)})||ho(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return uo(e,t)}):ho(e,r,t,function(t){return uo(e,t)}))}function go(e,t,r){return ho(e,"'"+r+"'",t,function(t){return uo(e,t,!0)})}function mo(e){var t=this;if(t.curOp.focus=Ta(),!Ne(t,e)){aa&&la<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=po(t,e);da&&(kl=n?r:null,!n&&88==r&&!Ga&&(va?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||vo(t)}}function vo(e){function t(e){18!=e.keyCode&&e.altKey||(Sa(r,"CodeMirror-crosshair"),_e(document,"keyup",t),_e(document,"mouseover",t))}var r=e.display.lineDiv;o(r,"CodeMirror-crosshair"),Ra(document,"keyup",t),Ra(document,"mouseover",t)}function yo(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ne(this,e)}function bo(e){var t=this;if(!(It(t.display,e)||Ne(t,e)||e.ctrlKey&&!e.altKey||va&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(da&&r==kl)return kl=null,void ze(e);if(!da||e.which&&!(e.which<10)||!po(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(go(t,e,i)||t.display.input.onKeyPress(e))}}}function wo(e){var t=this,r=t.display;if(!(Ne(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,It(r,e))return void(sa||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!To(t,e)){var n=xr(t,e);switch(window.focus(),Fe(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?xo(t,e,n):Ie(e)==r.scroller&&ze(e);break;case 2:sa&&(t.state.lastMiddleDown=+new Date),n&&li(t.doc,n),setTimeout(function(){return r.input.focus()},20),ze(e);break;case 3:Ca?Lo(t,e):Ar(t)}}}}function xo(e,t,r){aa?setTimeout(l(_r,e),0):e.curOp.focus=Ta();var n,i=+new Date;bl&&bl.time>i-400&&0==E(bl.pos,r)?n="triple":yl&&yl.time>i-400&&0==E(yl.pos,r)?(n="double",bl={time:i,pos:r}):(n="single",yl={time:i,pos:r});var o,a=e.doc.sel,s=va?t.metaKey:t.ctrlKey;e.options.dragDrop&&qa&&!e.isReadOnly()&&"single"==n&&(o=a.contains(r))>-1&&(E((o=a.ranges[o]).from(),r)<0||r.xRel>0)&&(E(o.to(),r)>0||r.xRel<0)?ko(e,t,r,s):Co(e,t,r,n,s)}function ko(e,t,r,n){var i=e.display,o=+new Date,a=dn(e,function(l){sa&&(i.scroller.draggable=!1),e.state.draggingText=!1,_e(document,"mouseup",a),_e(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(ze(l),!n&&+new Date-200<o&&li(e.doc,r),sa||aa&&9==la?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});sa&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=va?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Ra(document,"mouseup",a),Ra(i.scroller,"drop",a)}function Co(e,t,r,n,i){function o(t){if(0!=E(y,t))if(y=t,"rect"==n){for(var i=[],o=e.options.tabSize,a=c(S(u,r.line).text,r.ch,o),l=c(S(u,t.line).text,t.ch,o),s=Math.min(a,l),g=Math.max(a,l),m=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=v;m++){var b=S(u,m).text,w=f(b,s,o);s==g?i.push(new En(W(m,w),W(m,w))):b.length>w&&i.push(new En(W(m,w),W(m,f(b,g,o))))}i.length||i.push(new En(r,r)),hi(u,zn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=d,k=x.anchor,C=t;if("single"!=n){var T;T="double"==n?e.findWordAt(t):new En(W(t.line,0),I(u,W(t.line+1,0))),E(T.anchor,k)>0?(C=T.head,k=D(x.from(),T.anchor)):(C=T.anchor,k=P(x.to(),T.head))}var L=p.ranges.slice(0);L[h]=new En(I(u,k),C),hi(u,zn(L,h),Wa)}}function a(t){var r=++w,i=xr(e,t,!0,"rect"==n);if(i)if(0!=E(i,y)){e.curOp.focus=Ta(),o(i);var l=Dr(s,u);(i.line>=l.to||i.line<l.from)&&setTimeout(dn(e,function(){w==r&&a(t)}),150)}else{var c=t.clientY<b.top?-20:t.clientY>b.bottom?20:0;c&&setTimeout(dn(e,function(){w==r&&(s.scroller.scrollTop+=c,a(t))}),50)}}function l(t){e.state.selectingText=!1,w=1/0,ze(t),s.input.focus(),_e(document,"mousemove",x),_e(document,"mouseup",k),u.history.lastSelOrigin=null}var s=e.display,u=e.doc;ze(t);var d,h,p=u.sel,g=p.ranges;if(i&&!t.shiftKey?(h=u.sel.contains(r),d=h>-1?g[h]:new En(r,r)):(d=u.sel.primary(),h=u.sel.primIndex),ya?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(d=new En(r,r)),r=xr(e,t,!0,!0),h=-1;else if("double"==n){var m=e.findWordAt(r);d=e.display.shift||u.extend?ai(u,d,m.anchor,m.head):m}else if("triple"==n){var v=new En(W(r.line,0),I(u,W(r.line+1,0)));d=e.display.shift||u.extend?ai(u,d,v.anchor,v.head):v}else d=ai(u,d,r);i?h==-1?(h=g.length,hi(u,zn(g.concat([d]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"single"==n&&!t.shiftKey?(hi(u,zn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):ci(u,h,d,Wa):(h=0,hi(u,new Wn([d],0),Wa),p=u.sel);var y=r,b=s.wrapper.getBoundingClientRect(),w=0,x=dn(e,function(e){Fe(e)?a(e):l(e)}),k=dn(e,l);e.state.selectingText=k,Ra(document,"mousemove",x),Ra(document,"mouseup",k)}function So(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ze(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return De(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=A(e.doc,o),d=e.options.gutters[s];return Ae(e,r,e,u,d,t),De(t)}}}function To(e,t){return So(e,t,"gutterClick",!0)}function Lo(e,t){It(e.display,t)||Mo(e,t)||Ne(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Mo(e,t){return!!We(e,"gutterContextMenu")&&So(e,t,"gutterContextMenu",!1)}function _o(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ir(e)}function Ao(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Cl&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Cl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Rn(e)},!0),t("indentUnit",2,Rn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Bn(e),ir(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(W(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ai(e.doc,t,r[i],W(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Cl&&e.refresh()}),t("specialCharPlaceholder",ft,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",ma?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ba),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){_o(e),No(e)},!0),t("keyMap","default",function(e,t,r){var n=oo(t),i=r!=Cl&&oo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,Wo,!0),t("gutters",[],function(e){On(e.options),No(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?yr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Ur(e)},!0),t("scrollbarStyle","native",function(e){Vr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){On(e.options),No(e)},!0),t("firstLineNumber",1,No,!0),t("lineNumberFormatter",function(e){return e},No,!0),t("showCursorWhenSelecting",!1,Cr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Or(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Oo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Cr,!0),t("singleCursorHeightPerLine",!0,Cr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Bn,!0),t("addModeClass",!1,Bn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Bn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function No(e){Nn(e),pn(e),setTimeout(function(){return Wr(e)},20)}function Oo(e,t,r){var n=r&&r!=Cl;if(!t!=!n){var i=e.display.dragFunctions,o=t?Ra:_e;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Wo(e){e.options.lineWrapping?(o(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Sa(e.display.wrapper,"CodeMirror-wrap"),ge(e)),wr(e),pn(e),ir(e),setTimeout(function(){return Ur(e)},100)}function Eo(e,t){var r=this;if(!(this instanceof Eo))return new Eo(e,t);this.options=t=t?s(t):{},s(Sl,t,!1),On(t);var n=t.value;"string"==typeof n&&(n=new ul(n,t.mode,null,t.lineSeparator)),this.doc=n;var i=new Eo.inputStyles[t.inputStyle](this),o=this.display=new C(e,n,i);o.wrapper.CodeMirror=this,Nn(this),_o(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!ma&&o.input.focus(),Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new u,keySeq:null,specialChars:null},aa&&la<11&&setTimeout(function(){return r.display.input.reset(!0)},20),zo(this),Zi(),tn(this),this.curOp.forceUpdate=!0,Gn(this,n),t.autofocus&&!ma||this.hasFocus()?setTimeout(l(Nr,this),20):Or(this);for(var a in Tl)Tl.hasOwnProperty(a)&&Tl[a](r,t[a],Cl);Er(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);
|
5 |
-
rn(this),sa&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function zo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Ra(i.scroller,"mousedown",dn(e,wo)),aa&&la<11?Ra(i.scroller,"dblclick",dn(e,function(t){if(!Ne(e,t)){var r=xr(e,t);if(r&&!To(e,t)&&!It(e.display,t)){ze(t);var n=e.findWordAt(r);li(e.doc,n.anchor,n.head)}}})):Ra(i.scroller,"dblclick",function(t){return Ne(e,t)||ze(t)}),Ca||Ra(i.scroller,"contextmenu",function(t){return Lo(e,t)});var o,a={end:0};Ra(i.scroller,"touchstart",function(t){if(!Ne(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ra(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ra(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!It(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new En(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new En(W(l.line,0),I(e.doc,W(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ze(r)}t()}),Ra(i.scroller,"touchcancel",t),Ra(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Hr(e,i.scroller.scrollTop),Ir(e,i.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),Ra(i.scroller,"mousewheel",function(t){return Rr(e,t)}),Ra(i.scroller,"DOMMouseScroll",function(t){return Rr(e,t)}),Ra(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ne(e,t)||He(t)},over:function(t){Ne(e,t)||($i(e,t),He(t))},start:function(t){return Vi(e,t)},drop:dn(e,Gi),leave:function(t){Ne(e,t)||Yi(e)}};var l=i.input.getField();Ra(l,"keyup",function(t){return yo.call(e,t)}),Ra(l,"keydown",dn(e,mo)),Ra(l,"keypress",dn(e,bo)),Ra(l,"focus",function(t){return Nr(e,t)}),Ra(l,"blur",function(t){return Or(e,t)})}function Po(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Je(e,t):r="prev");var a=e.options.tabSize,l=S(o,t),s=c(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,d=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&(u=o.mode.indent(i,l.text.slice(d.length),l.text),u==Na||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?c(S(o,t-1).text,null,a):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)p+=a,f+="\t";if(p<u&&(f+=h(u-p)),f!=d)return Ai(o,f,W(t,0),W(t,d.length),"+input"),l.stateAfter=null,!0;for(var m=0;m<o.sel.ranges.length;m++){var v=o.sel.ranges[m];if(v.head.line==t&&v.head.ch<d.length){var y=W(t,d.length);ci(o,m,new En(y,y));break}}}function Do(e){Ml=e}function Ho(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=Ka(t),s=null;if(a&&n.ranges.length>1)if(Ml&&Ml.text.join("\n")==t){if(n.ranges.length%Ml.text.length==0){s=[];for(var c=0;c<Ml.text.length;c++)s.push(o.splitLines(Ml.text[c]))}}else l.length==n.ranges.length&&(s=g(l,function(e){return[e]}));for(var u,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],h=f.from(),m=f.to();f.empty()&&(r&&r>0?h=W(h.line,h.ch-r):e.state.overwrite&&!a?m=W(m.line,Math.min(S(o,m.line).text.length,m.ch+p(l).length)):Ml&&Ml.lineWise&&Ml.text.join("\n")==t&&(h=m=W(h.line,0))),u=e.curOp.updateInput;var v={from:h,to:m,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Ci(e.doc,v),Ct(e,"inputRead",e,v)}t&&!a&&Fo(e,t),Jr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Io(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||un(t,function(){return Ho(t,r,0,null,"paste")}),!0}function Fo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Po(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Po(e,i.head.line,"smart"));a&&Ct(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:W(i,0),head:W(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ro(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Bo(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return sa?e.style.width="1000px":e.setAttribute("wrap","off"),ga&&(e.style.border="1px solid black"),Ro(e),t}function qo(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&dn(this,t[e])(this,r,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](oo(e))},removeKeyMap:function(e){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},addOverlay:fn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,pn(this)}),removeOverlay:fn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void pn(t)}}),indentLine:fn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),N(this.doc,e)&&Po(this,e,t,r)}),indentSelection:fn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Po(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Jr(t));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var c=s;c<n;++c)Po(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&u[i].from().ch>0&&ci(t.doc,i,new En(a,u[i].to()),Oa)}}}),getTokenAt:function(e,t){return nt(this,e,t)},getLineTokens:function(e,t){return nt(this,W(e),t,!0)},getTokenTypeAt:function(e){e=I(this.doc,e);var t,r=Qe(this,S(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&i.push(o[a[t]]);else if(a[t])for(var l=0;l<a[t].length;l++){var s=o[a[t][l]];s&&i.push(s)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(a,n)&&d(i,u.val)==-1&&i.push(u.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=H(r,null==e?r.first+r.size-1:e),Je(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?I(this.doc,e):e?n.from():n.to(),ur(this,r,t||"page")},charCoords:function(e,t){return cr(this,I(this.doc,e),t||"page")},coordsChar:function(e,t){return e=sr(this,e,t||"page"),hr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=sr(this,{top:e,left:0},t||"page").top,A(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0),r=S(this.doc,e)}else r=e;return lr(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-he(r):0)},defaultTextHeight:function(){return gr(this.display)},defaultCharWidth:function(){return mr(this.display)},setGutterMarker:fn(function(e,t,r){return Ei(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:fn(function(e){var t=this,r=this.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,gn(t,n,"gutter"),x(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){var t;if("number"==typeof e){if(!N(this.doc,e))return null;if(t=e,e=S(this.doc,e),!e)return null}else if(t=_(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ur(this,I(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&Xr(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:fn(mo),triggerOnKeyPress:fn(bo),triggerOnKeyUp:yo,execCommand:function(e){if(wl.hasOwnProperty(e))return wl[e].call(null,this)},triggerElectric:fn(function(e){Fo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=I(this.doc,e),l=0;l<t&&(a=Ko(i.doc,a,o,r,n),!a.hitSide);++l);return a},moveH:fn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Ko(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Ea)}),deleteH:fn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ao(this,function(r){var i=Ko(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=this,o=1,a=n;t<0&&(o=-1,t=-t);for(var l=I(this.doc,e),s=0;s<t;++s){var c=ur(i,l,"div");if(null==a?a=c.left:c.left=a,l=Uo(i,c,o,r),l.hitSide)break}return l},moveV:fn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=ur(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Uo(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Qr(r,null,cr(r,s,"div").top-l.top),s},Ea),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=S(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==r.length)&&n?--n:++i;for(var a=r.charAt(n),l=w(a,o)?function(e){return w(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new En(W(e.line,n),W(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?o(this.display.cursorDiv,"CodeMirror-overwrite"):Sa(this.display.cursorDiv,"CodeMirror-overwrite"),Ae(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ta()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:fn(function(e,t){null==e&&null==t||en(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Bt(this)-this.display.barHeight,width:e.scrollWidth-Bt(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:qt(this)}},scrollIntoView:fn(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:W(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)en(this),this.curOp.scrollToPos=e;else{var r=Zr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:fn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&nr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ae(this,"refresh",this)}),operation:function(e){return un(this,e)},refresh:fn(function(){var e=this.display.cachedTextHeight;pn(this),this.curOp.forceUpdate=!0,ir(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),_n(this),(null==e||Math.abs(e-gr(this.display))>.5)&&wr(this),Ae(this,"refresh",this)}),swapDoc:fn(function(e){var t=this.doc;return t.cm=null,Gn(this,e),ir(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ct(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ee(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Ko(e,t,r,n,i){function o(){var t=l+r;return!(t<e.first||t>=e.first+e.size)&&(l=t,u=S(e,t))}function a(e){var t=(i?Se:Te)(u,s,r,!0);if(null==t){if(e||!o())return!1;s=i?(r<0?we:be)(u):r<0?u.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,c=r,u=S(e,l);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var d=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||a(!p);p=!1){var g=u.text.charAt(s)||"\n",m=w(g,h)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||m||(m="s"),d&&d!=m){r<0&&(r=1,a());break}if(m&&(d=m),r>0&&!a(!p))break}var v=bi(e,W(l,s),t,c,!0);return E(t,v)||(v.hitSide=!0),v}function Uo(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*gr(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;c=hr(e,a,i),c.outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Go(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new u,this.gracePeriod=!1}function Vo(e,t){var r=Yt(e,t.line);if(!r||r.hidden)return null;var n=S(e.doc,t.line),i=Gt(r,n,t.line),o=Le(n),a="left";if(o){var l=ke(o,t.ch);a=l%2?"right":"left"}var s=Qt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function $o(e,t){return t&&(e.bad=!0),e}function Yo(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(l+=r);var u,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(W(n,0),W(i+1,0),o(+d));return void(f.length&&(u=f[0].find())&&(l+=T(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var h=0;h<t.childNodes.length;h++)a(t.childNodes[h]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var p=t.nodeValue;if(!p)return;s&&(l+=c,s=!1),l+=p}}for(var l="",s=!1,c=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return l}function Xo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $o(e.clipPos(W(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Zo(o,t,r)}}function Zo(e,t,r){function n(t,r,n){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=_(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),W(s,c)}}}var o=e.text.firstChild,a=!1;if(!t||!i(o,t))return $o(W(_(e.line),0),!0);if(t==o&&(a=!0,t=o.childNodes[r],r=0,!t)){var l=e.rest?p(e.rest):e.line;return $o(W(_(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));c.parentNode!=o;)c=c.parentNode;var u=e.measure,d=u.maps,f=n(s,c,r);if(f)return $o(f,a);for(var h=c.nextSibling,g=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return $o(W(f.line,f.ch-g),a);g+=h.textContent.length}for(var m=c.previousSibling,v=r;m;m=m.previousSibling){if(f=n(m,m.firstChild,-1))return $o(W(f.line,f.ch+v),a);v+=m.textContent.length}}function Qo(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new u,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function Jo(e,t){function r(){e.value=c.getValue()}if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=Ta();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Ra(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(_e(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var c=Eo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return c}function ea(e){e.off=_e,e.on=Ra,e.wheelEventPixels=jr,e.Doc=ul,e.splitLines=Ka,e.countColumn=c,e.findColumn=f,e.isWordChar=b,e.Pass=Na,e.signal=Ae,e.Line=lt,e.changeEnd=Dn,e.scrollbarModel=al,e.Pos=W,e.cmpPos=E,e.modes=$a,e.mimeModes=Ya,e.resolveMode=Ue,e.getMode=Ge,e.modeExtensions=Xa,e.extendMode=Ve,e.copyState=$e,e.startState=Xe,e.innerMode=Ye,e.commands=wl,e.keyMap=vl,e.keyName=io,e.isModifierKey=no,e.lookupKey=ro,e.normalizeKeyMap=to,e.StringStream=Za,e.SharedTextMarker=Ri,e.TextMarker=Fi,e.LineWidget=Di,e.e_preventDefault=ze,e.e_stopPropagation=Pe,e.e_stop=He,e.addClass=o,e.contains=i,e.rmClass=Sa,e.keyNames=hl}var ta=navigator.userAgent,ra=navigator.platform,na=/gecko\/\d/i.test(ta),ia=/MSIE \d/.test(ta),oa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ta),aa=ia||oa,la=aa&&(ia?document.documentMode||6:oa[1]),sa=/WebKit\//.test(ta),ca=sa&&/Qt\/\d+\.\d+/.test(ta),ua=/Chrome\//.test(ta),da=/Opera\//.test(ta),fa=/Apple Computer/.test(navigator.vendor),ha=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ta),pa=/PhantomJS/.test(ta),ga=/AppleWebKit/.test(ta)&&/Mobile\/\w+/.test(ta),ma=ga||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ta),va=ga||/Mac/.test(ra),ya=/\bCrOS\b/.test(ta),ba=/win/i.test(ra),wa=da&&ta.match(/Version\/(\d*\.\d*)/);wa&&(wa=Number(wa[1])),wa&&wa>=15&&(da=!1,sa=!0);var xa,ka=va&&(ca||da&&(null==wa||wa<12.11)),Ca=na||aa&&la>=9,Sa=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};xa=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Ta=function(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e};aa&&la<11&&(Ta=function(){try{return document.activeElement}catch(e){return document.body}});var La=function(e){e.select()};ga?La=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:aa&&(La=function(e){try{e.select()}catch(t){}}),u.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ma,_a,Aa=30,Na={toString:function(){return"CodeMirror.Pass"}},Oa={scroll:!1},Wa={origin:"*mouse"},Ea={origin:"+move"},za=[""],Pa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Da=/[\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]/,Ha=!1,Ia=!1,Fa=null,ja=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(r){if(!i.test(r))return!1;for(var n=r.length,u=[],d=0;d<n;++d)u.push(e(r.charCodeAt(d)));for(var f=0,h=c;f<n;++f){var g=u[f];"m"==g?u[f]=h:h=g}for(var m=0,v=c;m<n;++m){var y=u[m];"1"==y&&"r"==v?u[m]="n":a.test(y)&&(v=y,"r"==y&&(u[m]="R"))}for(var b=1,w=u[0];b<n-1;++b){var x=u[b];"+"==x&&"1"==w&&"1"==u[b+1]?u[b]="1":","!=x||w!=u[b+1]||"1"!=w&&"n"!=w||(u[b]=w),w=x}for(var k=0;k<n;++k){var C=u[k];if(","==C)u[k]="N";else if("%"==C){var S=void 0;for(S=k+1;S<n&&"%"==u[S];++S);for(var T=k&&"!"==u[k-1]||S<n&&"1"==u[S]?"1":"N",L=k;L<S;++L)u[L]=T;k=S-1}}for(var M=0,_=c;M<n;++M){var A=u[M];"L"==_&&"1"==A?u[M]="L":a.test(A)&&(_=A)}for(var N=0;N<n;++N)if(o.test(u[N])){var O=void 0;for(O=N+1;O<n&&o.test(u[O]);++O);for(var W="L"==(N?u[N-1]:c),E="L"==(O<n?u[O]:c),z=W||E?"L":"R",P=N;P<O;++P)u[P]=z;N=O-1}for(var D,H=[],I=0;I<n;)if(l.test(u[I])){var F=I;for(++I;I<n&&l.test(u[I]);++I);H.push(new t(0,F,I))}else{var j=I,R=H.length;for(++I;I<n&&"L"!=u[I];++I);for(var B=j;B<I;)if(s.test(u[B])){j<B&&H.splice(R,0,new t(1,j,B));var q=B;for(++B;B<I&&s.test(u[B]);++B);H.splice(R,0,new t(2,q,B)),j=B}else++B;j<I&&H.splice(R,0,new t(1,j,I))}return 1==H[0].level&&(D=r.match(/^\s+/))&&(H[0].from=D[0].length,H.unshift(new t(0,0,D[0].length))),1==p(H).level&&(D=r.match(/\s+$/))&&(p(H).to-=D[0].length,H.push(new t(0,n-D[0].length,n))),2==H[0].level&&H.unshift(new t(1,H[0].to,H[0].to)),H[0].level!=p(H).level&&H.push(new t(H[0].level,n,n)),H}}(),Ra=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},Ba=[],qa=function(){if(aa&&la<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),Ka=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ua=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ga=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Va=null,$a={},Ya={},Xa={},Za=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Za.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t,r=this.string.charAt(this.pos);if(t="string"==typeof e?r==e:r&&(e.test?e.test(r):e(r)))return++this.pos,r},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=c(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?c(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return c(this.string,null,this.tabSize)-(this.lineStart?c(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},Ee(lt),lt.prototype.lineNo=function(){return _(this)};var Qa,Ja={},el={},tl=null,rl=null,nl={left:0,right:0,top:0,bottom:0},il=0,ol=null;aa?ol=-.53:na?ol=15:ua?ol=-.7:fa&&(ol=-1/3),qr.prototype=s({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=va&&!ha?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new u,this.disableVert=new u},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},qr.prototype),Kr.prototype=s({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Kr.prototype);var al={"native":qr,"null":Kr},ll=0;kn.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},kn.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Ae.apply(null,e.events[t])},Wn.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(0!=E(n.anchor,i.anchor)||0!=E(n.head,i.head))return!1}return!0},deepCopy:function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new En(z(e.ranges[r].anchor),z(e.ranges[r].head));return new Wn(t,this.primIndex)},somethingSelected:function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},contains:function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(E(t,i.from())>=0&&E(e,i.to())<=0)return n}return-1}},En.prototype={from:function(){return D(this.anchor,this.head)},to:function(){return P(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},zi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,ct(o),Ct(o,"delete")}this.lines.splice(e,t)},collapse:function(e){
|
6 |
-
e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},Pi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e),l=i.height;if(i.removeInner(e,a),r.height-=l-i.height,o==a&&(r.children.splice(n--,1),i.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof zi))){var s=[];this.collapse(s),this.children=[new zi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,s=l;s<o.lines.length;){var c=new zi(o.lines.slice(s,s+=25));o.height-=c.height,n.children.splice(++i,0,c),c.parent=n}o.lines=o.lines.slice(0,l),n.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Pi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=d(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new Pi(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<a){var l=Math.min(t,a-e);if(o.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=a}}},Ee(Di),Di.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=_(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var a=Ht(this);M(n,Math.max(0,n.height-a)),t&&un(t,function(){Hi(t,n,-a),gn(t,i,"widget")})}},Di.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=Ht(this)-e;n&&(M(r,r.height+n),t&&un(t,function(){t.curOp.forceUpdate=!0,Hi(t,r,n)}))};var sl=0;Ee(Fi),Fi.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&tn(t),We(this,"clear")){var n=this.find();n&&Ct(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=e.lines[a],s=K(l.markedSpans,e);t&&!e.collapsed?gn(t,_(l),"text"):t&&(null!=s.to&&(o=_(l)),null!=s.from&&(i=_(l))),l.markedSpans=U(l.markedSpans,s),null==s.from&&e.collapsed&&!de(e.doc,l)&&t&&M(l,gr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=le(e.lines[c]),d=pe(u);d>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&mi(t.doc)),t&&Ct(t,"markerCleared",t,this),r&&rn(t),this.parent&&this.parent.clear()}},Fi.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var a=r.lines[o],l=K(a.markedSpans,r);if(null!=l.from&&(n=W(t?a:_(a),l.from),e==-1))return n;if(null!=l.to&&(i=W(t?a:_(a),l.to),1==e))return i}return n&&{from:n,to:i}},Fi.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&un(r,function(){var n=e.line,i=_(e.line),o=Yt(r,i);if(o&&(rr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!de(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var l=Ht(t)-a;l&&M(n,n.height+l)}})},Fi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&d(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Fi.prototype.detachLine=function(e){if(this.lines.splice(d(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ee(Ri),Ri.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();Ct(this,"clear")}},Ri.prototype.find=function(e,t){return this.primary.find(e,t)};var cl=0,ul=function(e,t,r,n){if(!(this instanceof ul))return new ul(e,t,r,n);null==r&&(r=0),Pi.call(this,[new zi([new lt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var i=W(r,0);this.sel=Pn(i),this.history=new Vn(null),this.id=++cl,this.modeOption=t,this.lineSep=n,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Kn(this,{from:i,to:i,text:e}),hi(this,Pn(i),Oa)};ul.prototype=y(Pi.prototype,{constructor:ul,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=L(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:hn(function(e){var t=W(this.first,0),r=this.first+this.size-1;Ci(this,{from:t,to:W(r,S(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),hi(this,Pn(t))}),replaceRange:function(e,t,r,n){t=I(this,t),r=r?I(this,r):t,Ai(this,e,t,r,n)},getRange:function(e,t,r){var n=T(this,I(this,e),I(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(N(this,e))return S(this,e)},getLineNumber:function(e){return _(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),le(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return I(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:hn(function(e,t,r){ui(this,I(this,"number"==typeof e?W(e,t||0):e),null,r)}),setSelection:hn(function(e,t,r){ui(this,I(this,e),I(this,t||e),r)}),extendSelection:hn(function(e,t,r){li(this,I(this,e),t&&I(this,t),r)}),extendSelections:hn(function(e,t){si(this,j(this,e),t)}),extendSelectionsBy:hn(function(e,t){var r=g(this.sel.ranges,e);si(this,j(this,r),t)}),setSelections:hn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new En(I(n,e[o].anchor),I(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),hi(this,zn(i,t),r)}}),addSelection:hn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new En(I(this,e),I(this,t||e))),hi(this,zn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=T(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=T(t,n[i].from(),n[i].to());e!==!1&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:hn(function(e,t,r){for(var n=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var l=o.ranges[a];i[a]={from:l.from(),to:l.to(),text:n.splitLines(e[a]),origin:r}}for(var s=t&&"end"!=t&&jn(this,i,t),c=i.length-1;c>=0;c--)Ci(n,i[c]);s?fi(this,s):this.cm&&Jr(this.cm)}),undo:hn(function(){Ti(this,"undo")}),redo:hn(function(){Ti(this,"redo")}),undoSelection:hn(function(){Ti(this,"undo",!0)}),redoSelection:hn(function(){Ti(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Vn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:oi(this.history.done),undone:oi(this.history.undone)}},setHistory:function(e){var t=this.history=new Vn(this.history.maxGeneration);t.done=oi(e.done.slice(0),null,!0),t.undone=oi(e.undone.slice(0),null,!0)},addLineClass:hn(function(t,r,n){return Ei(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:hn(function(t,r,n){return Ei(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var a=o.match(e(n));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:hn(function(e,t,r){return Ii(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ji(this,I(this,e),I(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=I(this,e),ji(this,e,e,r,"bookmark")},findMarksAt:function(e){e=I(this,e);var t=[],r=S(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=I(this,e),t=I(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;return o>e?(t=e,!0):(e-=o,void++r)}),I(this,W(r,t))},indexFromPos:function(e){e=I(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new ul(L(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);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},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ul(L(this,t,r),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ki(n,qi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Eo&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),Ui(qi(t));break}}if(e.history==this.history){var i=[e.id];Un(e,function(e){return i.push(e.id)},!0),e.history=new Vn(null),e.history.done=oi(this.history.done,i),e.history.undone=oi(this.history.undone,i)}},iterLinkedDocs:function(e){Un(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ka(e)},lineSeparator:function(){return this.lineSep||"\n"}}),ul.prototype.eachLine=ul.prototype.iter;for(var dl=0,fl=!1,hl={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},pl=0;pl<10;pl++)hl[pl+48]=hl[pl+96]=String(pl);for(var gl=65;gl<=90;gl++)hl[gl]=String.fromCharCode(gl);for(var ml=1;ml<=12;ml++)hl[ml+111]=hl[ml+63235]="F"+ml;var vl={};vl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},vl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},vl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},vl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},vl["default"]=va?vl.macDefault:vl.pcDefault;var yl,bl,wl={selectAll:xi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Oa)},killLine:function(e){return ao(e,function(t){if(t.empty()){var r=S(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:W(t.head.line+1,0)}:{from:t.head,to:W(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ao(e,function(t){return{from:W(t.from().line,0),to:I(e.doc,W(t.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(e){return{from:W(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ao(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ao(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return lo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return co(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return so(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ea)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ea)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?co(e,t.head):n},Ea)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=c(e.getLine(o.line),o.ch,n);t.push(h(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return un(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new W(i.line,i.ch-1)),i.ch>0)i=new W(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),W(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new W(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),W(i.line-1,a.length-1),i,"+transpose"))}r.push(new En(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return un(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Jr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},xl=new u,kl=null,Cl={toString:function(){return"CodeMirror.Init"}},Sl={},Tl={};Eo.defaults=Sl,Eo.optionHandlers=Tl;var Ll=[];Eo.defineInitHook=function(e){return Ll.push(e)};var Ml=null;Go.prototype=s({init:function(e){function t(e){if(!Ne(n,e)){if(n.somethingSelected())Do({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=jo(n);Do({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Oa),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Ml.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var a=Bo(),l=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),l.value=Ml.text.join("\n");var s=document.activeElement;La(l),setTimeout(function(){n.display.lineSpace.removeChild(a),s.focus(),s==i&&r.showPrimarySelection()},50)}}var r=this,n=r.cm,i=r.div=e.lineDiv;Ro(i,n.options.spellcheck),Ra(i,"paste",function(e){Ne(n,e)||Io(e,n)||la<=11&&setTimeout(dn(n,function(){r.pollContent()||pn(n)}),20)}),Ra(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(r.composing.sel=Pn(W(i.head.line,a),W(i.head.line,a+t.length)))}}),Ra(i,"compositionupdate",function(e){return r.composing.data=e.data}),Ra(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Ra(i,"touchstart",function(){return r.forceCompositionEnd()}),Ra(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||un(r.cm,function(){return pn(n)})}),Ra(i,"copy",t),Ra(i,"cut",t)},prepareSelection:function(){var e=Sr(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=Xo(this.cm,e.anchorNode,e.anchorOffset),n=Xo(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=E(D(r,n),t.from())||0!=E(P(r,n),t.to())){var i=Vo(this.cm,t.from()),o=Vo(this.cm,t.to());if(i||o){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=a[a.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};var u;try{u=xa(i.node,i.offset,o.offset,o.node)}catch(d){}u&&(!na&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||(e.removeAllRanges(),e.addRange(u))):(e.removeAllRanges(),e.addRange(u)),l&&null==e.anchorNode?e.addRange(l):na&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():un(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=Xo(t,e.anchorNode,e.anchorOffset),n=Xo(t,e.focusNode,e.focusOffset);r&&n&&un(t,function(){hi(t.doc,Pn(r,n),Oa),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=kr(e,n.line))?(a=_(t.view[0].line),l=t.view[0].node):(a=_(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=kr(e,i.line);u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=_(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling);for(var d=e.doc.splitLines(Yo(e,l,c,a,s)),f=T(e.doc,W(a,0),W(s,S(e.doc,s).text.length));d.length>1&&f.length>1;)if(p(d)==p(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,g=0,m=d[0],v=f[0],y=Math.min(m.length,v.length);h<y&&m.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=p(d),w=p(f),x=Math.min(b.length-(1==d.length?h:0),w.length-(1==f.length?h:0));g<x&&b.charCodeAt(b.length-g-1)==w.charCodeAt(w.length-g-1);)++g;d[d.length-1]=b.slice(0,b.length-g),d[0]=d[0].slice(h);var k=W(a,h),C=W(s,f.length?p(f).length-g:0);return d.length>1||d[0]||E(k,C)?(Ai(e.doc,d,k,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?dn(this.cm,pn)(this.cm):e.data&&e.data!=e.startData&&dn(this.cm,Ho)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||dn(this.cm,Ho)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:v,resetPosition:v,needsContentAttribute:!0},Go.prototype),Qo.prototype=s({init:function(e){function t(e){if(!Ne(i,e)){if(i.somethingSelected())Do({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,a.value=Ml.text.join("\n"),La(a));else{if(!i.options.lineWiseCopyCut)return;var t=jo(i);Do({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Oa):(n.prevInput="",a.value=t.text.join("\n"),La(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Bo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),ga&&(a.style.width="0px"),Ra(a,"input",function(){aa&&la>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Ra(a,"paste",function(e){Ne(i,e)||Io(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ra(a,"cut",t),Ra(a,"copy",t),Ra(e.scroller,"paste",function(t){It(e,t)||Ne(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ra(e.lineSpace,"selectstart",function(t){It(e,t)||ze(t)}),Ra(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ra(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Sr(e);if(e.options.moveInputWithCursor){var i=ur(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},showSelection:function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ga&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&La(this.textarea),aa&&la>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",aa&&la>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!ma||Ta()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ua(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(aa&&la>=9&&this.hasSelection===i||va&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return un(t,function(){Ho(t,i.slice(a),n.length-a,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"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){aa&&la>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=d,a.style.cssText=u,aa&&la<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!aa||aa&&la<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?dn(i,xi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=xr(i,e),s=o.scroller.scrollTop;if(l&&!da){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(l)==-1&&dn(i,hi)(i.doc,Pn(l),Oa);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(aa?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(sa&&(h=window.scrollY),o.input.focus(),sa&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),aa&&la>=9&&t(),Ca){He(e);var p=function(){_e(window,"mouseup",p),setTimeout(r,20)};Ra(window,"mouseup",p)}else setTimeout(r,50);
|
7 |
-
}},readOnlyChanged:function(e){e||this.reset()},setUneditable:v,needsContentAttribute:!1},Qo.prototype),Ao(Eo),qo(Eo);var _l="iter insert remove copy getEditor constructor".split(" ");for(var Al in ul.prototype)ul.prototype.hasOwnProperty(Al)&&d(_l,Al)<0&&(Eo.prototype[Al]=function(e){return function(){return e.apply(this.doc,arguments)}}(ul.prototype[Al]));return Ee(ul),Eo.inputStyles={textarea:Qo,contenteditable:Go},Eo.defineMode=function(e){Eo.defaults.mode||"null"==e||(Eo.defaults.mode=e),qe.apply(this,arguments)},Eo.defineMIME=Ke,Eo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Eo.defineMIME("text/plain","null"),Eo.defineExtension=function(e,t){Eo.prototype[e]=t},Eo.defineDocExtension=function(e,t){ul.prototype[e]=t},Eo.fromTextArea=Jo,ea(Eo),Eo.version="5.20.2",Eo})},{}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(i!==!1)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:m),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return N[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var h=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,g,m=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},_=r.allowNested,A=r.supportsAtComponent===!0,N={};return N.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(A&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(_&&"("==e)return s(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(g="property","maybeprop"):C.hasOwnProperty(n)?(g="string-2","maybeprop"):_?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":_||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(g="error","block")},N.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},N.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&_)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},N.pseudo=function(e,t,r){return"word"==e?(g="variable-3",r.context.type):u(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,_?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,_?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},N.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:h?"block":"top",stateArg:null,context:new l(h?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),g=r,t.state=N[t.state](p,e,t),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(h),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=t(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":17}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t?t:s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),f=/\btag\b/.test(d);if(f&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(n.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[h[1]],h[2]),g=e.getMode(r,p),m=i(h[1],!0),v=i(h[1],!1);o.token=function(e,r){return e.match(m,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,f=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),f)for(var h=f.length-1;h>=0;h--)u.script.unshift(["type",f[h].matches,f[h].mode]);return{startState:function(){var t=e.startState(c);return{token:s,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return Ce=e,Se=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(We),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(We.test(n))return e.eatWhile(We),o("operator","operator",e.current());if(Ne.test(n)){e.eatWhile(Ne);var a=e.current(),u=Oe.propertyIsEnumerable(a)&&Oe[a];return u&&"."!=r.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(Me&&"@"==t.peek()&&t.match(Ee))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ae){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=ze.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(Ne.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function d(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function f(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function h(e,t,r,n,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():_e?C:k;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==r&&f(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function g(){return p.apply(null,arguments),!0}function m(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=De.state;if(De.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=He;
|
8 |
-
}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function b(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new d(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?g():";"==e?p():g(t)}return t}function k(e,t){return"var"==e?g(b("vardef",t.length),Q,x(";"),w):"keyword a"==e?g(b("form"),T,k,w):"keyword b"==e?g(b("form"),k,w):"{"==e?g(b("}"),U,w):";"==e?g():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==w&&De.state.cc.pop()(),g(b("form"),T,k,w,ne)):"function"==e?g(ce):"for"==e?g(b("form"),ie,k,w):"variable"==e?g(b("stat"),I):"switch"==e?g(b("form"),T,b("}","switch"),x("{"),U,w,w):"case"==e?g(C,x(":")):"default"==e?g(x(":")):"catch"==e?g(b("form"),v,x("("),ue,x(")"),k,w,y):"class"==e?g(b("form"),fe,w):"export"==e?g(b("stat"),me,w):"import"==e?g(b("stat"),ve,w):"module"==e?g(b("form"),J,b("}"),x("{"),U,w,w):"type"==e?g(V,x("operator"),V,x(";")):"async"==e?g(k):p(b("stat"),C,x(";"),w)}function C(e){return L(e,!1)}function S(e){return L(e,!0)}function T(e){return"("!=e?p():g(b(")"),C,x(")"),w)}function L(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?z:E;if("("==e)return g(v,b(")"),q(J,")"),w,x("=>"),r,y);if("variable"==e)return p(v,J,x("=>"),r,y)}var n=t?N:A;return Pe.hasOwnProperty(e)?g(n):"function"==e?g(ce,n):"class"==e?g(b("form"),de,w):"keyword c"==e||"async"==e?g(t?_:M):"("==e?g(b(")"),M,x(")"),w,n):"operator"==e||"spread"==e?g(t?S:C):"["==e?g(b("]"),xe,w,n):"{"==e?K(j,"}",null,n):"quasi"==e?p(O,n):"new"==e?g(P(t)):g()}function M(e){return e.match(/[;\}\)\],]/)?p():p(C)}function _(e){return e.match(/[;\}\)\],]/)?p():p(S)}function A(e,t){return","==e?g(C):N(e,t,!1)}function N(e,t,r){var n=0==r?A:N,i=0==r?C:S;return"=>"==e?g(v,r?z:E,y):"operator"==e?/\+\+|--/.test(t)?g(n):"?"==t?g(C,x(":"),i):g(i):"quasi"==e?p(O,n):";"!=e?"("==e?K(S,")","call",n):"."==e?g(F,n):"["==e?g(b("]"),M,x("]"),w,n):void 0:void 0}function O(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(O):g(C,W)}function W(e){if("}"==e)return De.marked="string-2",De.state.tokenize=c,g(O)}function E(e){return u(De.stream,De.state),p("{"==e?k:C)}function z(e){return u(De.stream,De.state),p("{"==e?k:S)}function P(e){return function(t){return"."==t?g(e?H:D):p(e?S:C)}}function D(e,t){if("target"==t)return De.marked="keyword",g(A)}function H(e,t){if("target"==t)return De.marked="keyword",g(N)}function I(e){return":"==e?g(w,k):p(A,x(";"),w)}function F(e){if("variable"==e)return De.marked="property",g()}function j(e,t){return"async"==e?(De.marked="property",g(j)):"variable"==e||"keyword"==De.style?(De.marked="property",g("get"==t||"set"==t?R:B)):"number"==e||"string"==e?(De.marked=Me?"property":De.style+" property",g(B)):"jsonld-keyword"==e?g(B):"modifier"==e?g(j):"["==e?g(C,x("]"),B):"spread"==e?g(C):":"==e?p(B):void 0}function R(e){return"variable"!=e?p(B):(De.marked="property",g(ce))}function B(e){return":"==e?g(S):"("==e?p(ce):void 0}function q(e,t){function r(n,i){if(","==n){var o=De.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),g(function(r,n){return r==t||n==t?p():p(e)},r)}return n==t||i==t?g():g(x(t))}return function(n,i){return n==t||i==t?g():p(e,r)}}function K(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return g(b(t,r),q(e,t),w)}function U(e){return"}"==e?g():p(k,U)}function G(e,t){if(Ae){if(":"==e)return g(V);if("?"==t)return g(G)}}function V(e){return"variable"==e?(De.marked="variable-3",g(Z)):"{"==e?g(q(Y,"}")):"("==e?g(q(X,")"),$):void 0}function $(e){if("=>"==e)return g(V)}function Y(e){return"variable"==e||"keyword"==De.style?(De.marked="property",g(Y)):":"==e?g(V):void 0}function X(e){return"variable"==e?g(X):":"==e?g(V):void 0}function Z(e,t){return"<"==t?g(q(V,">"),Z):"["==e?g(x("]"),Z):void 0}function Q(){return p(J,G,te,re)}function J(e,t){return"modifier"==e?g(J):"variable"==e?(m(t),g()):"spread"==e?g(J):"["==e?K(J,"]"):"{"==e?K(ee,"}"):void 0}function ee(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?g(J):"}"==e?p():g(x(":"),J,te)):(m(t),g(te))}function te(e,t){if("="==t)return g(S)}function re(e){if(","==e)return g(Q)}function ne(e,t){if("keyword b"==e&&"else"==t)return g(b("form","else"),k,w)}function ie(e){if("("==e)return g(b(")"),oe,x(")"),w)}function oe(e){return"var"==e?g(Q,x(";"),le):";"==e?g(le):"variable"==e?g(ae):p(C,x(";"),le)}function ae(e,t){return"in"==t||"of"==t?(De.marked="keyword",g(C)):g(A,le)}function le(e,t){return";"==e?g(se):"in"==t||"of"==t?(De.marked="keyword",g(C)):p(C,x(";"),se)}function se(e){")"!=e&&g(C)}function ce(e,t){return"*"==t?(De.marked="keyword",g(ce)):"variable"==e?(m(t),g(ce)):"("==e?g(v,b(")"),q(ue,")"),w,G,k,y):void 0}function ue(e){return"spread"==e?g(ue):p(J,G,te)}function de(e,t){return"variable"==e?fe(e,t):he(e,t)}function fe(e,t){if("variable"==e)return m(t),g(he)}function he(e,t){return"extends"==t||"implements"==t?g(Ae?V:C,he):"{"==e?g(b("}"),pe,w):void 0}function pe(e,t){return"variable"==e||"keyword"==De.style?("static"==t||"get"==t||"set"==t||Ae&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",g(pe)):(De.marked="property",g(Ae?ge:ce,pe)):"*"==t?(De.marked="keyword",g(pe)):";"==e?g(pe):"}"==e?g():void 0}function ge(e,t){return"?"==t?g(ge):":"==e?g(V,te):p(ce)}function me(e,t){return"*"==t?(De.marked="keyword",g(we,x(";"))):"default"==t?(De.marked="keyword",g(C,x(";"))):p(k)}function ve(e){return"string"==e?g():p(ye,we)}function ye(e,t){return"{"==e?K(ye,"}"):("variable"==e&&m(t),"*"==t&&(De.marked="keyword"),g(be))}function be(e,t){if("as"==t)return De.marked="keyword",g(ye)}function we(e,t){if("from"==t)return De.marked="keyword",g(C)}function xe(e){return"]"==e?g():p(q(S,"]"))}function ke(e,t){return"operator"==e.lastType||","==e.lastType||We.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ce,Se,Te=r.indentUnit,Le=n.statementIndent,Me=n.jsonld,_e=n.json||Me,Ae=n.typescript,Ne=n.wordCharacters||/[\w$\xa1-\uffff]/,Oe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":e("new"),"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n,await:n,async:e("async")};if(Ae){var l={type:"variable",style:"variable-3"},s={"interface":e("class"),"implements":n,namespace:n,module:e("module"),"enum":e("module"),type:e("type"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:i,string:l,number:l,"boolean":l,any:l};for(var c in s)a[c]=s[c]}return a}(),We=/[+\-*&%=<>!?|~^]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,ze="([{}])",Pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},He={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",(!1)),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ce?r:(t.lastType="operator"!=Ce||"++"!=Se&&"--"!=Se?Ce:"incdec",h(t,r,Ce,Se,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i,o=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==w)l=l.prev;else if(u!=ne)break}for(;("stat"==l.type||"form"==l.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==A||i==N)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;Le&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=o==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info+1:0):"form"==d&&"{"==o?l.indented:"form"==d?l.indented+Te:"stat"==d?l.indented+(ke(t,r)?Le||Te:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:Te):l.indented+(/^(?:case|default)\b/.test(r)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:_e?null:"/*",blockCommentEnd:_e?null:"*/",lineComment:_e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:_e?"json":"javascript",jsonldMode:Me,jsonMode:_e,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],21:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function h(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?g:h}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||C.matchClosing===!1?(M="tag",m):(M="tag error",v)}return M="error",v}function m(e,t,r){return"endTag"!=e?(M="error",m):(d(r),h)}function v(e,t,r){return M="error",m(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new u(r,n,i==r.indented)),h}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}]},{},[11])}();
|
9 |
//# sourceMappingURL=forms-admin.min.js.map
|
1 |
+
!function(){var e=void 0,t=void 0;!function r(t,n,i){function o(l,s){if(!n[l]){if(!t[l]){var c="function"==typeof e&&e;if(!s&&c)return c(l,!0);if(a)return a(l,!0);var u=new Error("Cannot find module '"+l+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[l]={exports:{}};t[l][0].call(d.exports,function(e){var r=t[l][1][e];return o(r?r:e)},d,d.exports,r,t,n,i)}return n[l].exports}for(var a="function"==typeof e&&e,l=0;l<i.length;l++)o(i[l]);return o}({1:[function(e,t,r){"use strict";var n=function(e,t){var r={};return r.label=function(r){return e("div",[e("label",t.fieldLabel),e("input.widefat",{type:"text",value:r.label(),onchange:e.withAttr("value",r.label),placeholder:r.title()})])},r.value=function(r){return e("div",[e("label",[t.value," ","hidden"===r.type()?"":e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.value(),onchange:e.withAttr("value",r.value)}),e("p.help",t.valueHelp)])},r.numberMinMax=function(r){return e("div",[e("div.row",[e("div.col.col-3",[e("label",t.min),e("input",{type:"number",onchange:e.withAttr("value",r.min)})]),e("div.col.col-3",[e("label",t.max),e("input",{type:"number",onchange:e.withAttr("value",r.max)})])])])},r.isRequired=function(r){var n,i={type:"checkbox",checked:r.required(),onchange:e.withAttr("checked",r.required)};return r.forceRequired()&&(i.required=!0,i.disabled=!0,n=e("p.help",t.forceRequired)),e("div",[e("label.cb-wrap",[e("input",i),t.isFieldRequired]),n])},r.placeholder=function(r){return e("div",[e("label",[t.placeholder," ",e("small",{style:"float: right; font-weight: normal;"},t.optional)]),e("input.widefat",{type:"text",value:r.placeholder(),onchange:e.withAttr("value",r.placeholder),placeholder:""}),e("p.help",t.placeholderHelp)])},r.useParagraphs=function(r){return e("div",[e("label.cb-wrap",[e("input",{type:"checkbox",checked:r.wrap(),onchange:e.withAttr("checked",r.wrap)}),t.wrapInParagraphTags])])},r.choiceType=function(r){var n=[e("option",{value:"select",selected:"select"===r.type()&&"selected"},t.dropdown),e("option",{value:"radio",selected:"radio"===r.type()&&"selected"},t.radioButtons)];return r.acceptsMultipleValues&&n.push(e("option",{value:"checkbox",selected:"checkbox"===r.type()&&"selected"},t.checkboxes)),e("div",[e("label",t.choiceType),e("select",{value:r.type(),onchange:e.withAttr("value",r.type)},n)])},r.choices=function(r){var n=[];return n.push(e("div",[e("label",t.choices),e("div.limit-height",[e("table",[r.choices().map(function(n,i){return e("tr",{"data-id":i},[e("td.cb",e("input",{name:"selected",type:"checkbox"===r.type()?"checkbox":"radio",onchange:e.withAttr("value",r.selectChoice.bind(r)),checked:n.selected(),value:n.value(),title:t.preselect})),e("td.stretch",e("input.widefat",{type:"text",value:n.label(),placeholder:n.title(),onchange:e.withAttr("value",n.label)})),e("td",e("span",{title:t.remove,"class":"dashicons dashicons-no-alt hover-activated",onclick:function(e){this.choices().splice(e,1)}.bind(r,i)},""))])})])])])),n},r};t.exports=n},{}],2:[function(e,t,r){var n=function(t,r){var n={},i=e("./field-forms-rows.js")(t,r);return n.render=function(e){var t=e.type();if("function"==typeof n[t])return n[t](e);switch(t){case"select":case"radio":case"checkbox":return n.choice(e)}return n.text(e)},n.text=function(e){return[i.label(e),i.placeholder(e),i.value(e),i.isRequired(e),i.useParagraphs(e)]},n.choice=function(e){var t=[i.label(e),i.choiceType(e),i.choices(e)];return"select"===e.type()&&t.push(i.placeholder(e)),t.push(i.useParagraphs(e)),"select"!==e.type()&&"radio"!==e.type()||t.push(i.isRequired(e)),t},n.hidden=function(e){return e.placeholder(""),e.label(""),e.wrap(!1),[i.value(e)]},n.submit=function(e){return e.label(""),e.placeholder(""),[i.value(e),i.useParagraphs(e)]},n.number=function(e){return[n.text(e),i.numberMinMax(e)]},n};t.exports=n},{"./field-forms-rows.js":1}],3:[function(e,t,r){"use strict";var n=e("../third-party/render.js"),i=e("../third-party/beautify-html.js"),o=function(e){function t(t){var o,a,l,s;return o=t.label().length?e("label",t.label()):"",a="function"==typeof r[t.type()]?r[t.type()](t):r["default"](t),l=t.wrap()?e("p",[o,a]):[o,a],s=n(l),s=i(s),s+"\n"}var r={};return r.select=function(t){var r={name:t.name(),required:t.required()},n=!1,i=t.choices().map(function(t){return t.selected()&&(n=!0),e("option",{value:t.value()!==t.label()?t.value():void 0,selected:t.selected()},t.label())}),o=t.placeholder();return o.length>0&&i.unshift(e("option",{disabled:!0,value:"",selected:!n},o)),e("select",r,i)},r.checkbox=function(t){var r=t.choices().map(function(r){var n=t.name()+("checkbox"===t.type()?"[]":""),i=t.required()&&"radio"===t.type();return e("label",[e("input",{name:n,type:t.type(),value:r.value(),checked:r.selected(),required:i})," ",e("span",r.label())])});return r},r.radio=r.checkbox,r["default"]=function(t){var r,n={type:t.type()};return t.name()&&(n.name=t.name()),t.min()&&(n.min=t.min()),t.max()&&(n.max=t.max()),t.value().length>0&&(n.value=t.value()),t.placeholder().length>0&&(n.placeholder=t.placeholder()),n.required=t.required(),r=e("input",n)},t};t.exports=o},{"../third-party/beautify-html.js":12,"../third-party/render.js":13}],4:[function(e,t,r){var n=function(t,r,n,i,o,a){"use strict";function l(e){d=i.get(e),d&&d.choices().length>0&&d.value(d.choices().map(function(e){return e.label()}).join("|")),t.redraw()}function s(){}function c(){var e=f(d);n.insert(e),l(""),t.redraw()}function u(){var e=i.getCategories(),r=i.getAll(),n=t("div.available-fields.small-margin",[t("h4",a.chooseField),e.map(function(e){var n=r.filter(function(t){return t.category===e});if(n.length)return t("div.tiny-margin",[t("strong",e),n.map(function(e){var r="button";e.forceRequired()&&(r+=" is-required");var n=e.inFormContent();return null!==n&&(r+=" "+(n?"in-form":"not-in-form")),t("button",{className:r,type:"button",onclick:t.withAttr("value",l),value:e.index},e.title())})])})]),o=null;return d&&(o=h(t("div.field-wizard",[t("h3",[d.title(),d.forceRequired()?t("span.red","*"):"",d.name().length?t("code",d.name()):""]),d.help().length?t("p",t.trust(d.help())):"",p.render(d),t("p",[t("button",{"class":"button-primary",type:"button",onkeydown:function(e){e=e||window.event,13==e.keyCode&&c()},onclick:c},a.addToForm)])]),l)),[n,o]}var d,f=e("./field-generator.js")(t),h=e("./overlay.js")(t,a),p=e("./field-forms.js")(t,a);return n.on("blur",t.redraw),{view:u,controller:s}};t.exports=n},{"./field-forms.js":2,"./field-generator.js":3,"./overlay.js":10}],5:[function(e,t,r){var n=function(e,t){"use strict";function r(){u.forEach(e.deregister)}function n(t,r,n){var i=e.register(t,r);n||u.push(i)}function i(e){var t={phone:"tel",dropdown:"select",checkboxes:"checkbox",birthday:"text"};return"undefined"!=typeof t[e]?t[e]:e}function o(e){var r=t.listFields,o=i(e.field_type),a={name:e.tag,title:e.name,required:e.required,forceRequired:e.required,type:o,choices:e.choices,acceptsMultipleValues:!1};return"address"!==a.type?n(r,a,!1):(n(r,{name:a.name+"[addr1]",type:"text",title:t.streetAddress}),n(r,{name:a.name+"[city]",type:"text",title:t.city}),n(r,{name:a.name+"[state]",type:"text",title:t.state}),n(r,{name:a.name+"[zip]",type:"text",title:t.zip}),n(r,{name:a.name+"[country]",type:"select",title:t.country,choices:mc4wp_vars.countries})),!0}function a(e){var r=t.interestCategories,o=i(e.field_type),a={title:e.name,name:"INTERESTS["+e.id+"]",type:o,choices:e.interests,acceptsMultipleValues:"checkbox"===o};n(r,a,!1)}function l(e){e.merge_fields=e.merge_fields.sort(function(e,t){return"EMAIL"===e.tag||e["public"]&&!t["public"]?-1:!e["public"]&&t["public"]?1:0}),e.merge_fields.forEach(o),e.interest_categories.forEach(a)}function s(e){r(),e.forEach(l)}function c(e){var r,i=t.formFields;n(i,{name:"",value:t.subscribe,type:"submit",title:t.submitButton},!0),r={};for(var o in e)r[e[o].id]=e[o].name;n(i,{name:"_mc4wp_lists",type:"checkbox",title:t.listChoice,choices:r,help:t.listChoiceDescription,acceptsMultipleValues:!0},!0),r={subscribe:"Subscribe",unsubscribe:"Unsubscribe"},n(i,{name:"_mc4wp_action",type:"radio",title:t.formAction,choices:r,value:"subscribe",help:t.formActionDescription},!0)}var u=[];return{registerCustomFields:c,registerListFields:l,registerListsFields:s}};t.exports=n},{}],6:[function(e,t,r){"use strict";t.exports=function(e,t){function r(e){var t=[];return t="function"==typeof e.map?e.map(function(e){return new h({label:e})}):Object.keys(e).map(function(t){var r=e[t];return new h({label:r,value:t})})}function n(n,i){var o,a=s("name",i.name).shift();return a?void(!a.required()&&i.required&&a.required(!0)):(i.choices&&(i.choices=r(i.choices),i.value&&(i.choices=i.choices.map(function(e){return e.value()===i.value&&e.selected(!0),e}))),d.indexOf(n)<0&&d.push(n),o=new f(i),o.category=n,u.push(o),c&&window.clearTimeout(c),c=window.setTimeout(e.redraw,100),t.trigger("fields.change"),o)}function i(t){var r=u.indexOf(t);r>-1&&(delete u[r],e.redraw())}function o(e){return u[e]}function a(){return u=u.map(function(e,t){return e.index=t,e})}function l(){return d}function s(e,t){return u.filter(function(r){return r[e]()===t})}var c,u=[],d=[],f=function(t){this.name=e.prop(t.name),this.title=e.prop(t.title||t.name),this.type=e.prop(t.type),this.label=e.prop(t.title||""),this.value=e.prop(t.value||""),this.placeholder=e.prop(t.placeholder||""),this.required=e.prop(t.required||!1),this.forceRequired=e.prop(t.forceRequired||!1),this.wrap=e.prop(t.wrap||!0),this.min=e.prop(t.min||null),this.max=e.prop(t.max||null),this.help=e.prop(t.help||""),this.choices=e.prop(t.choices||[]),this.inFormContent=e.prop(null),this.acceptsMultipleValues=t.acceptsMultipleValues,this.selectChoice=function(e){var t=this;this.choices(this.choices().map(function(r){return r.value()===e?r.selected(!0):"checkbox"!==t.type()&&r.selected(!1),r}))}},h=function(t){this.label=e.prop(t.label),this.title=e.prop(t.title||t.label),this.selected=e.prop(t.selected||!1),this.value=e.prop(t.value||t.label)};return{get:o,getAll:a,getCategories:l,deregister:i,register:n,getAllWhere:s}}},{}],7:[function(e,t,r){"use strict";var n=e("codemirror");e("codemirror/mode/xml/xml"),e("codemirror/mode/javascript/javascript"),e("codemirror/mode/css/css"),e("codemirror/mode/htmlmixed/htmlmixed"),e("codemirror/addon/fold/xml-fold"),e("codemirror/addon/edit/matchtags"),e("codemirror/addon/edit/closetag.js");var i=function(e){function t(){return o&&(i.innerHTML=a.getValue().toLowerCase(),o=!1),i}var r,i=document.createElement("form"),o=!1,a={};return i.innerHTML=e.value.toLowerCase(),n&&(r=n.fromTextArea(e,{selectionPointer:!0,matchTags:{bothTags:!0},mode:"htmlmixed",htmlMode:!0,autoCloseTags:!0,autoRefresh:!0}),window.dispatchEvent&&r.on("change",function(){if("function"==typeof Event){var t=new Event("change",{bubbles:!0});e.dispatchEvent(t)}})),window.addEventListener("load",function(){n.signal(r,"change")}),e.addEventListener("change",function(){o=!0}),a.getValue=function(){return r?r.getValue():e.value},a.query=function(e){return t().querySelectorAll(e)},a.containsField=function(e){return null!==t().elements.namedItem(e.toLowerCase())},a.insert=function(t){r?(r.replaceSelection(t),r.focus()):e.value+=t},a.on=function(t,n){return r?(t="input"===t?"changes":t,r.on(t,n)):e.addEventListener(t,n)},a.refresh=function(){r&&r.refresh()},a};t.exports=i},{codemirror:17,"codemirror/addon/edit/closetag.js":14,"codemirror/addon/edit/matchtags":15,"codemirror/addon/fold/xml-fold":16,"codemirror/mode/css/css":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/xml/xml":21}],8:[function(e,t,r){var n=function(e,t,r,n,i,o){"use strict";function a(){n.getAll().forEach(function(e){if(!(e.name().length<=0)){var r=e.name();"checkbox"===e.type()&&(r+="[]");var n=t.containsField(r);e.inFormContent(n)}}),l(),e.redraw()}function l(){var e=n.getAllWhere("forceRequired",!0).map(function(e){return e.name().toUpperCase()}),r=t.query("[required]");Array.prototype.forEach.call(r,function(t){var r=t.name.toUpperCase();"_"!==r[0]&&(r=r.replace(/\[(\w+)\]/g,".$1"),e.indexOf(r)===-1&&e.push(r))}),s.value=e.join(",")}var s=document.getElementById("required-fields");t.on("change",o.debounce(a,500)),i.on("fields.change",o.debounce(a,500))};t.exports=n},{}],9:[function(e,t,r){"use strict";function n(e,t){l[e]=t,o()}function i(e){delete l[e],o()}function o(){var e="";for(var t in l)e+='<div class="notice notice-warning inline"><p>'+l[t]+"</p></div>";var r=document.querySelector(".mc4wp-notices");if(!r){r=document.createElement("div"),r.className="mc4wp-notices";var n=document.querySelector("h1, h2");n.parentNode.insertBefore(r,n.nextSibling)}r.innerHTML=e}function a(e,t){var r=function(){var t="Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.",r=e.getValue().toLowerCase();r.indexOf('name="groupings')>-1?n("deprecated_groupings",t):i("deprecated_groupings")},o=function(){var r=t.getAllWhere("forceRequired",!0),o=r.filter(function(t){return!e.containsField(t.name().toUpperCase())}),a="<strong>Heads up!</strong> Your form is missing list fields that are required in MailChimp. Either add these fields to your form or mark them as optional in MailChimp.";a+='<br /><ul class="ul-square" style="margin-bottom: 0;"><li>'+o.map(function(e){return e.title()}).join("</li><li>")+"</li></ul>",o.length>0?n("required_fields_missing",a):i("required_fields_missing")};r(),e.on("focus",r),e.on("blur",r),o(),e.on("blur",o),e.on("focus",o)}var l={};t.exports={init:a}},{}],10:[function(e,t,r){var n=function(e,t){"use strict";function r(){document.removeEventListener("keydown",n),window.removeEventListener("resize",i),a()}function n(e){e=e||window.event,27==e.keyCode&&r(),13==e.keyCode&&e.preventDefault()}function i(){if(o){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,r=(e-o.clientWidth-40)/2,n=(t-o.clientHeight-40)/2;o.style.left=(r>0?r:0)+"px",o.style.top=(n>0?n:0)+"px"}}var o,a;return function(l,s){return a=s,document.addEventListener("keydown",n),window.addEventListener("resize",i),[e("div.overlay-wrap",e("div.overlay",{config:function(e){o=e,i()}},[e("span",{"class":"close dashicons dashicons-no",title:t.close,onclick:r}),l])),e("div.overlay-background",{title:t.close,onclick:r})]}};t.exports=n},{}],11:[function(e,t,r){"use strict";var n=window.mc4wp_forms_i18n,i=window.mc4wp.deps.mithril,o=mc4wp.events,a=mc4wp.settings,l=mc4wp.helpers,s=mc4wp.tabs,c=e("./admin/form-watcher.js"),u=e("./admin/form-editor.js"),d=e("./admin/field-helper.js"),f=e("./admin/fields-factory.js"),h=e("./admin/fields.js")(i,o),p=document.getElementById("mc4wp-form-content"),g=window.formEditor=new u(p),m=(new c(i,formEditor,a,h,o,l),new d(i,s,formEditor,h,o,n)),v=e("./admin/notices");i.mount(document.getElementById("mc4wp-field-wizard"),m);var y=new f(h,n);o.on("selectedLists.change",y.registerListsFields),y.registerListsFields(a.getSelectedLists()),y.registerCustomFields(mc4wp_vars.mailchimp.lists),window.setTimeout(function(){i.redraw()},2e3),v.init(g,h),window.mc4wp=window.mc4wp||{},window.mc4wp.forms=window.mc4wp.forms||{},window.mc4wp.forms.editor=g,window.mc4wp.forms.fields=h},{"./admin/field-helper.js":4,"./admin/fields-factory.js":5,"./admin/fields.js":6,"./admin/form-editor.js":7,"./admin/form-watcher.js":8,"./admin/notices":9}],12:[function(e,t,r){!function(){function e(e){return e.replace(/^\s+|\s+$/g,"")}function r(e){return e.replace(/^\s+/g,"")}function n(t,n,i,o){function a(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=s,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,!doctype,basefont,base,area,hr,wbr,param,img,isindex,?xml,embed,?php,?,?=".split(","),extra_liners:"head,body,/html".split(","),in_array:function(e,t){for(var r=0;r<t.length;r++)if(e===t[r])return!0;return!1}},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)p&&"\n"===e&&this.newlines<=g&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.get_content=function(){for(var e="",t=[],r=!1;"<"!==this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())t.length&&(r=!0);else{if(indent_handlebars){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,r&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,t),this.print_indentation(t)):(this.line_char_count++,t.push(" ")),r=!1),this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",r=new RegExp("</"+e+"\\s*>","igm");r.lastIndex=this.pos;var n=r.exec(this.input),i=n?n.index:this.input.length;return this.pos<i&&(t=this.input.substring(this.pos,i),this.pos=i),t},this.record_tag=function(e){this.tags[e+"count"]?(this.tags[e+"count"]++,this.tags[e+this.tags[e+"count"]]=this.indent_level):(this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level),this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,r,n,i="",o=[],a="",l=!1,s=this.pos,c=this.line_char_count;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=s,this.line_char_count=c),o.length?o.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))l=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),l=!0),"="===i&&(l=!1),o.length&&"="!==o[o.length-1]&&">"!==i&&l&&(this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,o),this.print_indentation(o)):(o.push(" "),this.line_char_count++),l=!1),indent_handlebars&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),o.length&&" "!==o[o.length-1]&&"<"!==o[o.length-1]&&(i=" "+i),l=!0),"<"!==i||n||(t=this.pos-1,n="<"),indent_handlebars&&!n&&o.length>=2&&"{"===o[o.length-1]&&"{"==o[o.length-2]&&(t="#"===i||"/"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,o.push(i),o[1]&&"!"===o[1]){o=[this.get_comment(t)];break}if(indent_handlebars&&"{"===n&&o.length>2&&"}"===o[o.length-2]&&"}"===o[o.length-1])break}}while(">"!==i);var u,d,f=o.join("");u=f.indexOf(" ")!==-1?f.indexOf(" "):"{"===f[0]?f.indexOf("}"):f.indexOf(">"),d="<"!==f[0]&&indent_handlebars?"#"===f[2]?3:2:1;var p=f.substring(d,u).toLowerCase();return"/"===f.charAt(f.length-2)||this.Utils.in_array(p,this.Utils.single_token)?e||(this.tag_type="SINGLE"):indent_handlebars&&"{"===f[0]&&"else"===p?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):"script"===p?e||(this.record_tag(p),this.tag_type="SCRIPT"):"style"===p?e||(this.record_tag(p),this.tag_type="STYLE"):this.is_unformatted(p,h)?(a=this.get_unformatted("</"+p+">",f),o.push(a),t>0&&this.Utils.in_array(this.input.charAt(t-1),this.Utils.whitespace)&&o.splice(0,0,this.input.charAt(t-1)),r=this.pos-1,this.Utils.in_array(this.input.charAt(r+1),this.Utils.whitespace)&&o.push(this.input.charAt(r+1)),this.tag_type="SINGLE"):"!"===p.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===p.charAt(0)?(this.retrieve_tag(p.substring(1)),this.tag_type="END",this.traverse_whitespace()):(this.record_tag(p),"html"!==p.toLowerCase()&&(this.indent_content=!0),this.tag_type="START",this.traverse_whitespace()),this.Utils.in_array(p,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!==this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=s,this.line_char_count=c),o.join("")},this.get_comment=function(e){var t="",r=">",n=!1;for(this.pos=e,input_char=this.input.charAt(this.pos),this.pos++;this.pos<=this.input.length&&(t+=input_char,t[t.length-1]!==r[r.length-1]||t.indexOf(r)===-1);)!n&&t.length<10&&(0===t.indexOf("<![if")?(r="<![endif]>",n=!0):0===t.indexOf("<![cdata[")?(r="]]>",n=!0):0===t.indexOf("<![")?(r="]>",n=!0):0===t.indexOf("<!--")&&(r="-->",n=!0)),input_char=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&t.toLowerCase().indexOf(e)!==-1)return"";var r="",n="",i=0,o=!0;do{if(this.pos>=this.input.length)return n;if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace)){if(!o){this.line_char_count--;continue}if("\n"===r||"\r"===r){n+="\n",this.line_char_count=0;continue}}n+=r,this.line_char_count++,o=!0,indent_handlebars&&"{"===r&&n.length&&"{"===n[n.length-2]&&(n+=this.get_unformatted("}}"),i=n.length)}while(n.toLowerCase().indexOf(e,i)===-1);return n},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return e=this.get_contents_to(t),"string"!=typeof e?e:[e,"TK_"+t]}if("CONTENT"===this.current_mode)return e=this.get_content(),"string"!=typeof e?e:[e,"TK_CONTENT"];if("TAG"===this.current_mode){if(e=this.get_tag(),"string"!=typeof e)return e;var r="TK_TAG_"+this.tag_type;return[e,r]}},this.get_full_indent=function(e){return e=this.indent_level+e||0,e<1?"":Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!==e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var r=this.get_tag(!0),n=(r||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,o){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=o,this.indent_level=0,this.wrap_line_length=i,this.line_char_count=0;for(var a=0;a<this.indent_size;a++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!==t[t.length-1])&&t.push("\n")},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){(e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=r(e)),this.print_token_raw(e)},this.print_token_raw=function(e){e&&""!==e&&(e.length>1&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(t>0,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){this.indent_level>0&&this.indent_level--}},this}var l,s,c,u,d,f,h,p,g;for(n=n||{},void 0!==n.wrap_line_length&&0!==parseInt(n.wrap_line_length,10)||void 0!==n.max_char&&0!==parseInt(n.max_char,10)||(n.wrap_line_length=n.max_char),s=n.indent_inner_html||!1,c=parseInt(n.indent_size||4,10),u=n.indent_char||" ",f=n.brace_style||"collapse",d=0===parseInt(n.wrap_line_length,10)?32786:parseInt(n.wrap_line_length||250,10),h=n.unformatted||["a","span","bdo","em","strong","dfn","code","samp","kbd","var","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","pre","address","dt","h1","h2","h3","h4","h5","h6"],p=n.preserve_newlines||!0,g=p?parseInt(n.max_preserve_newlines||32786,10):0,indent_handlebars=n.indent_handlebars||!1,l=new a,l.printer(t,u,c,d,f);;){var m=l.get_token();if(l.token_text=m[0],l.token_type=m[1],"TK_EOF"===l.token_type)break;switch(l.token_type){case"TK_TAG_START":l.print_newline(!1,l.output),l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===l.last_token&&""===l.last_text){var v=l.token_text.match(/\w+/)[0],y=null;l.output.length&&(y=l.output[l.output.length-1].match(/(?:<|{{#)\s*(\w+)/)),null!==y&&y[1]===v||l.print_newline(!1,l.output)}l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var b=l.token_text.match(/^\s*<([a-z]+)/i);b&&l.Utils.in_array(b[1],h)||l.print_newline(!1,l.output),l.print_token(l.token_text),l.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":l.print_token(l.token_text),l.indent_content&&(l.indent(),l.indent_content=!1),l.current_mode="CONTENT";break;case"TK_CONTENT":l.print_token(l.token_text),l.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==l.token_text){l.print_newline(!1,l.output);var w,x=l.token_text,k=1;"TK_SCRIPT"===l.token_type?w="function"==typeof i&&i:"TK_STYLE"===l.token_type&&(w="function"==typeof o&&o),"keep"===n.indent_scripts?k=0:"separate"===n.indent_scripts&&(k=-l.indent_level);var C=l.get_full_indent(k);if(w)x=w(x.replace(/^\s*/,C),n);else{var S=x.match(/^\s*/)[0],T=S.match(/[^\n\r]*$/)[0].split(l.indent_string).length-1,L=l.get_full_indent(k-T);x=x.replace(/^\s*/,C).replace(/\r\n|\r|\n/g,"\n"+L).replace(/\s+$/,"")}x&&(l.print_token_raw(C+e(x)),l.print_newline(!1,l.output))}l.current_mode="TAG"}l.last_token=l.token_type,l.last_text=l.token_text}return l.output.join("")}"undefined"!=typeof t&&"undefined"!=typeof t.exports?t.exports=n:"undefined"!=typeof window&&(window.html_beautify=n)}()},{}],13:[function(e,t,r){"use strict";function n(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2")}function o(e){return""!=e}function a(e,t){return"undefined"===e&&(e=""),"string"!=typeof e&&(e+=""),e=e.replace(/\&/g,"&").replace(/</g,"<").replace(/\>/g,">"),t?e.replace(/\"/g,"""):e}function l(e){return e&&Object.keys(e).length?Object.keys(e).map(function(t){var r=e[t];if("undefined"!=typeof r&&null!==r&&"function"!=typeof r){if("boolean"==typeof r)return r?" "+t:"";if("style"===t){if(!r)return;var n=e.style;return"object"==typeof n&&(n=Object.keys(n).map(function(e){return""!=n[e]?[i(e).toLowerCase(),n[e]].join(":"):""}).filter(o).join(";")),""!=n?' style="'+a(n,!0)+'"':""}return" "+a("className"===t?"class":t)+'="'+a(r,!0)+'"'}}).join(""):""}function s(e){return n(e.children)&&!e.children.length?"":c(e.children)}function c(e){var t=typeof e;if("string"===t)return a(e);if("number"===t||"boolean"===t)return e;if(!e)return"";if(n(e))return e.map(c).join("");if(e.view){var r=e.controller?new e.controller:{},i=c(e.view(r));return r.onunload&&r.onunload(),i}if(e.$trusted)return""+e;var o=s(e);return!o&&u.indexOf(e.tag.toLowerCase())>=0?"<"+e.tag+l(e.attrs)+">":["<",e.tag,l(e.attrs),">",o,"</",e.tag,">"].join("")}var u=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","!doctype"];t.exports=c},{}],14:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var r=t.listSelections(),n=[],s=0;s<r.length;s++){if(!r[s].empty())return e.Pass;var c=r[s].head,u=t.getTokenAt(c),d=e.innerMode(t.getMode(),u.state),f=d.state;if("xml"!=d.mode.name||!f.tagName)return e.Pass;var h=t.getOption("autoCloseTags"),p="html"==d.mode.configuration,g="object"==typeof h&&h.dontCloseTags||p&&a,m="object"==typeof h&&h.indentTags||p&&l,v=f.tagName;u.end>c.ch&&(v=v.slice(0,v.length-u.end+c.ch));var y=v.toLowerCase();if(!v||"string"==u.type&&(u.end!=c.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&"closeTag"==f.type||u.string.indexOf("/")==u.string.length-1||g&&i(g,y)>-1||o(t,v,c,f,!0))return e.Pass;var b=m&&i(m,y)>-1;n[s]={indent:b,text:">"+(b?"\n\n":"")+"</"+v+">",newPos:b?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var s=r.length-1;s>=0;s--){var w=n[s];t.replaceRange(w.text,r[s].head,r[s].anchor,"+insert");var x=t.listSelections().slice(0);x[s]={head:w.newPos,anchor:w.newPos},t.setSelections(x),w.indent&&(t.indentLine(w.newPos.line,null,!0),t.indentLine(w.newPos.line+1,null,!0))}}function r(t,r){for(var n=t.listSelections(),i=[],a=r?"/":"</",l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var s=n[l].head,c=t.getTokenAt(s),u=e.innerMode(t.getMode(),c.state),d=u.state;if(r&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=s.ch-1))return e.Pass;var f;if("xml"!=u.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==u.mode.name)f=a+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=u.mode.name)return e.Pass;f=a+"style"}else{if(!d.context||!d.context.tagName||o(t,d.context.tagName,s,d))return e.Pass;f=a+d.context.tagName}">"!=t.getLine(s.line).charAt(c.end)&&(f+=">"),i[l]=f}t.replaceSelections(i),n=t.listSelections();for(var l=0;l<n.length;l++)(l==n.length-1||n[l].head.line<n[l+1].head.line)&&t.indentLine(n[l].head.line)}function n(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function i(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;++r)if(e[r]==t)return r;return-1}function o(t,r,n,i,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,n.line+500),l=e.scanForClosingTag(t,n,null,a);if(!l||l.tag!=r)return!1;for(var s=i.context,c=o?1:0;s&&s.tagName==r;s=s.prev)++c;n=l.to;for(var u=1;u<c;u++){var d=e.scanForClosingTag(t,n,null,a);if(!d||d.tag!=r)return!1;n=d.to}return!0}e.defineOption("autoCloseTags",!1,function(r,i,o){if(o!=e.Init&&o&&r.removeKeyMap("autoCloseTags"),i){var a={name:"autoCloseTags"};("object"!=typeof i||i.whenClosing)&&(a["'/'"]=function(e){return n(e)}),("object"!=typeof i||i.whenOpening)&&(a["'>'"]=function(e){return t(e)}),r.addKeyMap(a)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],l=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return r(e)}})},{"../../lib/codemirror":17,"../fold/xml-fold":16}],15:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../fold/xml-fold")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../fold/xml-fold"],i):i(CodeMirror)}(function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation(function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==o.at?o.open:o.close;l?r.state.tagOther=r.markText(l.from,l.to,{
|
2 |
+
className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}})}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))}),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}})},{"../../lib/codemirror":17,"../fold/xml-fold":16}],16:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function r(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function n(e,t){var r=e.cm.getTokenTypeAt(f(e.line,t));return r&&/\btag\b/.test(r)}function i(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function a(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(i(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),o=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,o?"selfClose":"regular"}e.ch=t+1}}}function l(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(n(e,t+1)){g.lastIndex=t,e.ch=t;var r=g.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function s(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(i(e))continue;return}{if(n(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}{if(n(e,t+1)){var r=e.text.lastIndexOf("/",t),i=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}}function u(e,t){for(var r=[];;){var n,i=s(e),o=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(n=a(e)))return;if("selfClose"!=n)if(i[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==i[2]){r.length=c;break}if(c<0&&(!t||t==i[2]))return{tag:i[2],from:f(o,l),to:f(e.line,e.ch)}}else r.push(i[2])}}function d(e,t){for(var r=[];;){var n=c(e);if(!n)return;if("selfClose"!=n){var i=e.line,o=e.ch,a=l(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var s=r.length-1;s>=0;--s)if(r[s]==a[2]){r.length=s;break}if(s<0&&(!t||t==a[2]))return{tag:a[2],from:f(e.line,e.ch),to:f(i,o)}}}else l(e)}}var f=e.Pos,h="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",p=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+h+"]["+p+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var n=new r(e,t.line,0);;){var i,o=s(n);if(!o||n.line!=t.line||!(i=a(n)))return;if(!o[1]&&"selfClose"!=i){var l=f(n.line,n.ch),c=u(n,o[2]);return c&&{from:l,to:c.from}}}}),e.findMatchingTag=function(e,n,i){var o=new r(e,n.line,n.ch,i);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var s=a(o),c=s&&f(o.line,o.ch),h=s&&l(o);if(s&&h&&!(t(o,n)>0)){var p={from:f(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:h[1]?{open:d(o,h[2]),close:p,at:"close"}:(o=new r(e,c.line,c.ch,i),{open:p,close:u(o,h[2]),at:"open"})}}},e.findEnclosingTag=function(e,t,n){for(var i=new r(e,t.line,t.ch,n);;){var o=d(i);if(!o)break;var a=new r(e,t.line,t.ch,n),l=u(a,o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,t,n,i){var o=new r(e,t.line,t.ch,i?{from:0,to:i}:null);return u(o,n)}})},{"../../lib/codemirror":17}],17:[function(e,r,n){!function(e,i){"object"==typeof n&&"undefined"!=typeof r?r.exports=i():"function"==typeof t&&t.amd?t(i):e.CodeMirror=i()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);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]);return i}function i(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function o(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function a(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function l(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function c(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}}function u(){this.id=null}function d(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function f(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);o==-1&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function h(e){for(;za.length<=e;)za.push(p(za)+" ");return za[e]}function p(e){return e[e.length-1]}function g(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function v(){}function y(e,t){var r;return Object.create?r=Object.create(e):(v.prototype=e,r=new v),t&&s(t,r),r}function b(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Pa.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&b(e))||t.test(e):b(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&Da.test(e)}function C(e,t,r){var i=this;this.input=r,i.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=n("div",null,"CodeMirror-code"),i.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=n("div",null,"CodeMirror-cursors"),i.measure=n("div",null,"CodeMirror-measure"),i.lineMeasure=n("div",null,"CodeMirror-measure"),i.lineSpace=n("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=n("div",[n("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=n("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=n("div",null,null,"position: absolute; height: "+Aa+"px; width: 1px;"),i.gutters=n("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=n("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=n("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),aa&&la<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),sa||na&&ma||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,r.init(i)}function S(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function T(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function L(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function M(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function _(e){if(null==e.parent)return null;for(var t=e.parent,r=d(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();return r+t.first}function A(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return r+a}function N(e,t){return t>=e.first&&t<e.first+e.size}function O(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function W(e,t){return this instanceof W?(this.line=e,void(this.ch=t)):new W(e,t)}function E(e,t){return e.line-t.line||e.ch-t.ch}function z(e){return W(e.line,e.ch)}function P(e,t){return E(e,t)<0?t:e}function D(e,t){return E(e,t)<0?e:t}function H(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function I(e,t){if(t.line<e.first)return W(e.first,0);var r=e.first+e.size-1;return t.line>r?W(r,S(e,r).text.length):F(t,S(e,t.line).text.length)}function F(e,t){var r=e.ch;return null==r||r>t?W(e.line,t):r<0?W(e.line,0):e}function j(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=I(e,t[n]);return r}function R(){Ha=!0}function B(){Ia=!0}function q(e,t,r){this.marker=e,this.from=t,this.to=r}function K(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function U(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function G(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function V(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new q(a,o.from,s?null:o.to))}}return n}function $(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new q(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function Y(e,t){if(t.full)return null;var r=N(e,t.from.line)&&S(e,t.from.line).markedSpans,n=N(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==E(t.from,t.to),l=V(r,i,a),s=$(n,o,a),c=1==t.text.length,u=p(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=K(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var g=0;g<s.length;++g){var m=s[g];if(null!=m.to&&(m.to+=u),null==m.from){var v=K(l,m.marker);v||(m.from=u,c&&(l||(l=[])).push(m))}else m.from+=u,c&&(l||(l=[])).push(m)}l&&(l=X(l)),s&&s!=l&&(s=X(s));var y=[l];if(!c){var b,w=t.text.length-2;if(w>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(b||(b=[])).push(new q(l[x].marker,null,null));for(var k=0;k<w;++k)y.push(b);y.push(s)}return y}function X(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Z(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&d(n,r)!=-1||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(E(c.to,l.from)<0||E(c.from,l.to)>0)){var u=[s,1],f=E(c.from,l.from),h=E(c.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function Q(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function J(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ee(e){return e.inclusiveLeft?-1:0}function te(e){return e.inclusiveRight?1:0}function re(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=E(n.from,i.from)||ee(e)-ee(t);if(o)return-o;var a=E(n.to,i.to)||te(e)-te(t);return a?a:t.id-e.id}function ne(e,t){var r,n=Ia&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||re(r,i.marker)<0)&&(r=i.marker);return r}function ie(e){return ne(e,!0)}function oe(e){return ne(e,!1)}function ae(e,t,r,n,i){var o=S(e,t),a=Ia&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=E(c.from,r)||ee(s.marker)-ee(i),d=E(c.to,n)||te(s.marker)-te(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?E(c.to,r)>=0:E(c.to,r)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?E(c.from,n)<=0:E(c.from,n)<0)))return!0}}}function le(e){for(var t;t=ie(e);)e=t.find(-1,!0).line;return e}function se(e){for(var t,r;t=oe(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function ce(e,t){var r=S(e,t),n=le(r);return r==n?t:_(n)}function ue(e,t){if(t>e.lastLine())return t;var r,n=S(e,t);if(!de(e,n))return t;for(;r=oe(n);)n=r.find(1,!0).line;return _(n)+1}function de(e,t){var r=Ia&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&fe(e,t,n))return!0}}function fe(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return fe(e,n.line,K(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&fe(e,t,i))return!0}function he(e){e=le(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==r)break;t+=l.height}return t}function pe(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=oe(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function ge(e){var t=e.display,r=e.doc;t.maxLine=S(r,r.first),t.maxLineLength=pe(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=pe(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function me(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function ve(e){return e.level%2?e.to:e.from}function ye(e){return e.level%2?e.from:e.to}function be(e){var t=Le(e);return t?ve(t[0]):0}function we(e){var t=Le(e);return t?ye(p(t)):e.text.length}function xe(e,t,r){var n=e[0].level;return t==n||r!=n&&t<r}function ke(e,t){var r;Fa=null;for(var n=0;n<e.length;++n){var i=e[n];if(i.from<t&&i.to>t)return n;if(i.from==t||i.to==t){if(null!=r)return xe(e,i.level,e[r].level)?(i.from!=i.to&&(Fa=r),n):(i.from!=i.to&&(Fa=n),r);r=n}}return r}function Ce(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&k(e.text.charAt(t)));return t}function Se(e,t,r,n){var i=Le(e);if(!i)return Te(e,t,r,n);for(var o=ke(i,t),a=i[o],l=Ce(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return ke(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?Ce(e,a.to,-1,n):Ce(e,a.from,1,n)}}function Te(e,t,r,n){var i=t+r;if(n)for(;i>0&&k(e.text.charAt(i));)i+=r;return i<0||i>e.text.length?null:i}function Le(e){var t=e.order;return null==t&&(t=e.order=ja(e.text)),t}function Me(e,t,r){var n=e._handlers&&e._handlers[t];return r?n&&n.length>0?n.slice():Ba:n||Ba}function _e(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else for(var n=Me(e,t,!1),i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}}function Ae(e,t){var r=Me(e,t,!0);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ne(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ae(e,r||t.type,e,t),De(t)||t.codemirrorIgnore}function Oe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)d(r,t[n])==-1&&r.push(t[n])}function We(e,t){return Me(e,t).length>0}function Ee(e){e.prototype.on=function(e,t){Ra(this,e,t)},e.prototype.off=function(e,t){_e(this,e,t)}}function ze(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Pe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function De(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function He(e){ze(e),Pe(e)}function Ie(e){return e.target||e.srcElement}function Fe(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),va&&e.ctrlKey&&1==t&&(t=3),t}function je(e){if(null==Ma){var t=n("span","");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ma=t.offsetWidth<=1&&t.offsetHeight>2&&!(aa&&la<8))}var i=Ma?n("span",""):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Re(e){if(null!=_a)return _a;var n=r(e,document.createTextNode("AخA")),i=xa(n,0,1).getBoundingClientRect(),o=xa(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(_a=o.right-i.right<3)}function Be(e){if(null!=Va)return Va;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=xa(t,0,1).getBoundingClientRect();return Va=Math.abs(i.left-o.left)>1}function qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),$a[e]=t}function Ke(e,t){Ya[e]=t}function Ue(e){if("string"==typeof e&&Ya.hasOwnProperty(e))e=Ya[e];else if(e&&"string"==typeof e.name&&Ya.hasOwnProperty(e.name)){var t=Ya[e.name];"string"==typeof t&&(t={name:t}),e=y(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ue("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ue("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ue(t);var r=$a[t.name];if(!r)return Ge(e,"text/plain");var n=r(e,t);if(Xa.hasOwnProperty(t.name)){var i=Xa[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}function Ve(e,t){var r=Xa.hasOwnProperty(e)?Xa[e]:Xa[e]={};s(t,r)}function $e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ye(e,t){for(var r;e.innerMode&&(r=e.innerMode(t),r&&r.mode!=e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Xe(e,t,r){return!e.startState||e.startState(t,r)}function Ze(e,t,r,n){var i=[e.state.modeGen],o={};ot(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var a=function(r){var n=e.state.overlays[r],a=1,l=0;ot(e,t.text,n.mode,!0,function(e,t){for(var r=a;l<e;){var o=i[a];o>e&&i.splice(a,1,e,i[a+1],o),a+=2,l=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var s=i[r+1];i[r+1]=(s?s+" ":"")+"overlay "+t}},o)},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Qe(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Je(e,_(t)),i=Ze(e,t,t.text.length>e.options.maxHighlightLength?$e(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function Je(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=at(e,t,r),a=o>n.first&&S(n,o-1).stateAfter;return a=a?$e(n.mode,a):Xe(n.mode),n.iter(o,t,function(r){et(e,r.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=l?$e(n.mode,a):null,++o}),r&&(n.frontier=o),a}function et(e,t,r,n){var i=e.doc.mode,o=new Za(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&tt(i,r);!o.eol();)rt(i,o,r),o.start=o.pos}function tt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Ye(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function rt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Ye(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function nt(e,t,r,n){var i,o=function(e){return{start:d.start,end:d.pos,string:d.current(),type:i||null,state:e?$e(a.mode,u):u}},a=e.doc,l=a.mode;t=I(a,t);var s,c=S(a,t.line),u=Je(e,t.line,r),d=new Za(c.text,e.options.tabSize);for(n&&(s=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,i=rt(l,d,u),n&&s.push(o(!0));return n?s:o()}function it(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function ot(e,t,r,n,i,o,a){var l=r.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Za(t,e.options.tabSize),f=e.options.addModeClass&&[null];for(""==t&&it(tt(r,n),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&et(e,t,n,d.pos),d.pos=t.length,s=null):s=it(rt(r,d,n,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){for(;c<d.start;)c=Math.min(d.start,c+5e3),i(c,u);u=s}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function at(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=S(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var u=c(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}function lt(e,t,r){this.text=e,J(this,t),this.height=r?r(this):1}function st(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Q(e),J(e,r);var i=n?n(e):1;i!=e.height&&M(e,i)}function ct(e){e.parent=null,Q(e)}function ut(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?el:Ja;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function dt(e,t){var r=n("span",null,null,sa?"padding-right: .1px":null),i={pre:n("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(aa||sa)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;i.pos=0,i.addToken=ht,Re(e.display.measure)&&(s=Le(l))&&(i.addToken=gt(i.addToken,s)),i.map=[];var c=t!=e.display.externalMeasured&&_(l);vt(l,i,Qe(e,l,c)),l.styleClasses&&(l.styleClasses.bgClass&&(i.bgClass=a(l.styleClasses.bgClass,i.bgClass||"")),l.styleClasses.textClass&&(i.textClass=a(l.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(je(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(sa){var u=i.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=a(i.pre.className,i.textClass||"")),i}function ft(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ht(e,t,r,i,o,a,l){if(t){var s,c=e.splitSpaces?pt(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1;if(u.test(t)){s=document.createDocumentFragment();for(var f=0;;){u.lastIndex=f;var p=u.exec(t),g=p?p.index-f:t.length-f;if(g){var m=document.createTextNode(c.slice(f,f+g));aa&&la<9?s.appendChild(n("span",[m])):s.appendChild(m),e.map.push(e.pos,e.pos+g,m),e.col+=g,e.pos+=g}if(!p)break;f+=g+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;v=s.appendChild(n("span",h(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?(v=s.appendChild(n("span","\r"==p[0]?"␍":"","cm-invalidchar")),v.setAttribute("cm-text",p[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),aa&&la<9?s.appendChild(n("span",[v])):s.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),aa&&la<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||i||o||d||l){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[s],w,l);return a&&(x.title=a),e.content.appendChild(x)}e.content.appendChild(s)}}function pt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function gt(e,t){return function(r,n,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>c&&d.from<=c));f++);if(d.to>=u)return e(r,n,i,o,a,l,s);e(r,n.slice(0,d.to-c),i,o,null,l,s),o=null,n=n.slice(d.to-c),c=d.to}}}function mt(e,t,r,n){var i=!n&&r.widgetNode;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}function vt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,l,s,c,u,d,f,h=i.length,p=0,g=1,m="",v=0;;){if(v==p){s=c=u=d=l="",f=null,v=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],k=x.marker;"bookmark"==k.type&&x.from==p&&k.widgetNode?y.push(k):x.from<=p&&(null==x.to||x.to>p||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(b||(b=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!f||re(f.marker,k)<0)&&(f=x)):x.from>p&&v>x.from&&(v=x.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==v&&(c+=" "+b[C]);if(!f||f.from==p)for(var S=0;S<y.length;++S)mt(t,0,y[S]);if(f&&(f.from||0)==p){if(mt(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var T=Math.min(h,v);;){if(m){var L=p+m.length;if(!f){var M=L>T?m.slice(0,T-p):m;t.addToken(t,M,a?a+s:s,u,p+M.length==v?c:"",d,l)}if(L>=T){m=m.slice(T-p),p=T;break}p=L,u=""}m=i.slice(o,o=r[g++]),a=ut(r[g++],t.cm.options)}}else for(var _=1;_<r.length;_+=2)t.addToken(t,i.slice(o,o=r[_]),ut(r[_+1],t.cm.options))}function yt(e,t,r){this.line=t,this.rest=se(t),this.size=this.rest?_(p(this.rest))-r+1:1,this.node=this.text=null,this.hidden=de(e,t)}function bt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new yt(e.doc,S(e.doc,o),o);n=o+a.size,i.push(a)}return i}function wt(e){tl?tl.ops.push(e):e.ownsGroup=tl={ops:[e],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function kt(e,t){var r=e.ownsGroup;if(r)try{xt(r)}finally{tl=null,t(r)}}function Ct(e,t){var r=Me(e,t,!1);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);tl?n=tl.delayedCallbacks:rl?n=rl:(n=rl=[],setTimeout(St,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},a=0;a<r.length;++a)o(a)}}function St(){var e=rl;rl=null;for(var t=0;t<e.length;++t)e[t]()}function Tt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?At(e,t):"gutter"==o?Ot(e,t,r,n):"class"==o?Nt(t):"widget"==o&&Wt(e,t,n)}t.changes=null}function Lt(e){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),aa&&la<8&&(e.node.style.zIndex=2)),e.node}function Mt(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=Lt(e);e.background=r.insertBefore(n("div",null,t),r.firstChild)}}function _t(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):dt(e,t)}function At(e,t){var r=t.text.className,n=_t(e,t);t.text==t.node&&(t.node=n.pre),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,Nt(t)):r&&(t.text.className=r)}function Nt(e){Mt(e),e.line.wrapClass?Lt(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function Ot(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Lt(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),o.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var l=Lt(t),s=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||a&&a["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(n("div",O(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var c=0;c<e.options.gutters.length;++c){var u=e.options.gutters[c],d=a.hasOwnProperty(u)&&a[u];d&&s.appendChild(n("div",[d],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function Wt(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);zt(e,t,r)}function Et(e,t,r,n){var i=_t(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Nt(t),Ot(e,t,r,n),zt(e,t,n),t.node}function zt(e,t,r){if(Pt(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Pt(e,t.rest[n],t,r,!1)}function Pt(e,t,r,i,o){if(t.widgets)for(var a=Lt(r),l=0,s=t.widgets;l<s.length;++l){var c=s[l],u=n("div",[c.node],"CodeMirror-linewidget");c.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),Dt(c,u,r,i),e.display.input.setUneditable(u),o&&c.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Ct(c,"redraw")}}function Dt(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Ht(e){if(null!=e.height)return e.height;var t=e.doc.cm;
|
3 |
+
if(!t)return 0;if(!i(document.body,e.node)){var o="position: relative;";e.coverGutter&&(o+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(o+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,o))}return e.height=e.node.parentNode.offsetHeight}function It(e,t){for(var r=Ie(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}function Ft(e){return e.lineSpace.offsetTop}function jt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Rt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Bt(e){return Aa-e.display.nativeBarWidth}function qt(e){return e.display.scroller.clientWidth-Bt(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-Bt(e)-e.display.barHeight}function Ut(e,t,r){var n=e.options.lineWrapping,i=n&&qt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Gt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(_(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Vt(e,t){t=le(t);var n=_(t),i=e.display.externalMeasured=new yt(e.doc,t,n);i.lineN=n;var o=i.built=dt(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function $t(e,t,r,n){return Zt(e,Xt(e,t),r,n)}function Yt(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[kr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Xt(e,t){var r=_(t),n=Yt(e,r);n&&!n.text?n=null:n&&n.changes&&(Tt(e,n,r,vr(e)),e.curOp.forceUpdate=!0),n||(n=Vt(e,t));var i=Gt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Zt(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Ut(e,t.view,t.rect),t.hasHeights=!0),o=er(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Qt(e,t,r){for(var n,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),null!=i){if(n=e[c+2],l==s&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[(c-=3)+2],a="left";if("right"==r&&i==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function Jt(e,t){var r=nl;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--);return r}function er(e,t,r,n){var i,o=Qt(t.map,r,n),a=o.node,l=o.start,s=o.end,c=o.collapse;if(3==a.nodeType){for(var u=0;u<4;u++){for(;l&&k(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+s<o.coverEnd&&k(t.line.text.charAt(o.coverStart+s));)++s;if(i=aa&&la<9&&0==l&&s==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Jt(xa(a,l,s).getClientRects(),n),i.left||i.right||0==l)break;s=l,l-=1,c="right"}aa&&la<11&&(i=tr(e.display.measure,i))}else{l>0&&(c=n="right");var d;i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(aa&&la<9&&!l&&(!i||!i.left&&!i.right)){var f=a.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+mr(e.display),top:f.top,bottom:f.bottom}:nl}for(var h=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(h+p)/2,m=t.view.measure.heights,v=0;v<m.length-1&&!(g<m[v]);v++);var y=v?m[v-1]:0,b=m[v],w={left:("right"==c?i.right:i.left)-t.rect.left,right:("left"==c?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=h,w.rbottom=p),w}function tr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Be(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function rr(e){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]={}}function nr(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)rr(e.display.view[r])}function ir(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ar(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function lr(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Ht(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=he(t);if("local"==n?a+=Ft(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:ar());var s=l.left+("window"==n?0:or());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function sr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=or(),i-=ar();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function cr(e,t,r,n,i){return n||(n=S(e.doc,t.line)),lr(e,n,$t(e,n,t.ch,i),r)}function ur(e,t,r,n,i,o){function a(t,a){var l=Zt(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,lr(e,n,l,r)}function l(e,t){var r=s[t],n=r.level%2;return e==ve(r)&&t&&r.level<s[t-1].level?(r=s[--t],e=ye(r)-(r.level%2?0:1),n=!0):e==ye(r)&&t<s.length-1&&r.level<s[t+1].level&&(r=s[++t],e=ve(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?a(e-1):a(e,n)}n=n||S(e.doc,t.line),i||(i=Xt(e,n));var s=Le(n),c=t.ch;if(!s)return a(c);var u=ke(s,c),d=l(c,u);return null!=Fa&&(d.other=l(c,Fa)),d}function dr(e,t){var r=0;t=I(e.doc,t),e.options.lineWrapping||(r=mr(e.display)*t.ch);var n=S(e.doc,t.line),i=he(n)+Ft(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function fr(e,t,r,n){var i=W(e,t);return i.xRel=n,r&&(i.outside=!0),i}function hr(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return fr(n.first,0,!0,-1);var i=A(n,r),o=n.first+n.size-1;if(i>o)return fr(n.first+n.size-1,S(n,o).text.length,!0,1);t<0&&(t=0);for(var a=S(n,i);;){var l=pr(e,a,i,t,r),s=oe(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=_(a=c.to.line)}}function pr(e,t,r,n,i){function o(n){var i=ur(e,W(r,n),"line",t,c);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-he(t),l=!1,s=2*e.display.wrapper.clientWidth,c=Xt(e,t),u=Le(t),d=t.text.length,f=be(t),h=we(t),p=o(f),g=l,m=o(h),v=l;if(n>m)return fr(r,h,v,1);for(;;){if(u?h==f||h==Se(t,f,1):h-f<=1){var y=n<p||n-p<=m-n?f:h,b=y==f?g:v,w=n-(y==f?p:m);if(v&&!u&&!/\s/.test(t.text.charAt(y))&&w>0&&y<t.text.length&&c.view.measure.heights.length>1){var x=Zt(e,c,y,"right");a<=x.bottom&&a>=x.top&&Math.abs(n-x.right)<w&&(b=!1,y++,w=n-x.right)}for(;k(t.text.charAt(y));)++y;var C=fr(r,y,b,w<-1?-1:w>1?1:0);return C}var S=Math.ceil(d/2),T=f+S;if(u){T=f;for(var L=0;L<S;++L)T=Se(t,T,1)}var M=o(T);M>n?(h=T,m=M,(v=l)&&(m+=1e3),d=S):(f=T,p=M,g=l,d-=S)}}function gr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Qa){Qa=n("pre");for(var i=0;i<49;++i)Qa.appendChild(document.createTextNode("x")),Qa.appendChild(n("br"));Qa.appendChild(document.createTextNode("x"))}r(e.measure,Qa);var o=Qa.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function mr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function vr(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)r[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[a]]=o.clientWidth;return{fixedPos:yr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function yr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function br(e){var t=gr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/mr(e.display)-3);return function(i){if(de(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function wr(e){var t=e.doc,r=br(e);t.iter(function(e){var t=r(e);t!=e.height&&M(e,t)})}function xr(e,t,r,n){var i=e.display;if(!r&&"true"==Ie(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,u=hr(e,o,a);if(n&&1==u.xRel&&(s=S(e.doc,u.line).text).length==u.ch){var d=c(s,s.length,e.options.tabSize)-s.length;u=W(u.line,Math.max(0,Math.round((o-Rt(e.display).left)/mr(e.display))-d))}return u}function kr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function Cr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Sr(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t!==!1||a!=r.sel.primIndex){var l=r.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Tr(e,l.head,i),s||Lr(e,l,o)}}return n}function Tr(e,t,r){var i=ur(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));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){var a=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=i.other.left+"px",a.style.top=i.other.top+"px",a.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Lr(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),s.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?d-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return cr(e,W(t,r),"div",c,n)}var a,s,c=S(l,t),f=c.text.length;return me(Le(c),r||0,null==n?f:n,function(e,t,l){var c,h,p,g=o(e,"left");if(e==t)c=g,h=p=g.left;else{if(c=o(t-1,"right"),"rtl"==l){var m=g;g=c,c=m}h=g.left,p=c.right}null==r&&0==e&&(h=u),c.top-g.top>3&&(i(h,g.top,null,g.bottom),h=u,g.bottom<c.top&&i(h,g.bottom,null,c.top)),null==n&&t==f&&(p=d),(!a||g.top<a.top||g.top==a.top&&g.left<a.left)&&(a=g),(!s||c.bottom>s.bottom||c.bottom==s.bottom&&c.right>s.right)&&(s=c),h<u+1&&(h=u),i(h,c.top,p-h,c.bottom)}),{start:a,end:s}}var a=e.display,l=e.doc,s=document.createDocumentFragment(),c=Rt(e.display),u=c.left,d=Math.max(a.sizerWidth,qt(e)-a.sizer.offsetLeft)-c.right,f=t.from(),h=t.to();if(f.line==h.line)o(f.line,f.ch,h.ch);else{var p=S(l,f.line),g=S(l,h.line),m=le(p)==le(g),v=o(f.line,f.ch,m?p.text.length+1:null).end,y=o(h.line,m?0:null,h.ch).start;m&&(v.top<y.top-2?(i(v.right,v.top,null,v.bottom),i(u,y.top,y.left,y.bottom)):i(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&i(u,v.bottom,null,y.top)}r.appendChild(s)}function Mr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function _r(e){e.state.focused||(e.display.input.focus(),Nr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Or(e))},100)}function Nr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ae(e,"focus",e,t),e.state.focused=!0,o(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),sa&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Mr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ae(e,"blur",e,t),e.state.focused=!1,Sa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Wr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=yr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Er(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=O(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=o.firstChild.offsetWidth,l=o.offsetWidth-a;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(a,i.lineGutter.offsetWidth-l)+1,i.lineNumWidth=i.lineNumInnerWidth+l,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",_n(e),!0}return!1}function zr(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(aa&&la<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(o<2&&(o=gr(t)),(s>.001||s<-.001)&&(M(i.line,o),Pr(i.line),i.rest))for(var c=0;c<i.rest.length;c++)Pr(i.rest[c])}}}function Pr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function Dr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Ft(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=A(t,n),a=A(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;l<o?(o=l,a=A(t,he(S(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=A(t,he(S(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Hr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,na||Ln(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),na&&Ln(e),wn(e,100))}function Ir(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Wr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Fr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;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),{x:t,y:r}}function jr(e){var t=Fr(e);return t.x*=ol,t.y*=ol,t}function Rr(e,t){var r=Fr(t),n=r.x,i=r.y,o=e.display,a=o.scroller,l=a.scrollWidth>a.clientWidth,s=a.scrollHeight>a.clientHeight;if(n&&l||i&&s){if(i&&va&&sa)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var d=0;d<u.length;d++)if(u[d].node==c){e.display.currentWheelTarget=c;break e}if(n&&!na&&!da&&null!=ol)return i&&s&&Hr(e,Math.max(0,Math.min(a.scrollTop+i*ol,a.scrollHeight-a.clientHeight))),Ir(e,Math.max(0,Math.min(a.scrollLeft+n*ol,a.scrollWidth-a.clientWidth))),(!i||i&&s)&&ze(t),void(o.wheelStartX=null);if(i&&null!=ol){var f=i*ol,h=e.doc.scrollTop,p=h+o.wrapper.clientHeight;f<0?h=Math.max(0,h+f-50):p=Math.min(e.doc.height,p+f+50),Ln(e,{top:h,bottom:p})}il<20&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(ol=(ol*il+r)/(il+1),++il)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Br(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+jt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Bt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function qr(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Ra(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ra(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,aa&&la<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function Kr(){}function Ur(e,t){t||(t=Br(e));var r=e.display.barWidth,n=e.display.barHeight;Gr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&zr(e),Gr(e,Br(e)),r=e.display.barWidth,n=e.display.barHeight}function Gr(e,t){var r=e.display,n=r.scrollbars.update(t);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=""}function Vr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Sa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new al[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Ra(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Ir(e,t):Hr(e,t)},e),e.display.scrollbars.addClass&&o(e.display.wrapper,e.display.scrollbars.addClass)}function $r(e,t){if(!Ne(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!pa){var a=n("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Ft(e.display))+"px;\n height: "+(t.bottom-t.top+Bt(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Yr(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var a=!1;i=ur(e,t);var l=r&&r!=t?ur(e,r):i,s=Zr(e,Math.min(i.left,l.left),Math.min(i.top,l.top)-n,Math.max(i.left,l.left),Math.max(i.bottom,l.bottom)+n),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(Hr(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=s.scrollLeft&&(Ir(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(a=!0)),!a)break}return i}function Xr(e,t,r,n,i){var o=Zr(e,t,r,n,i);null!=o.scrollTop&&Hr(e,o.scrollTop),null!=o.scrollLeft&&Ir(e,o.scrollLeft)}function Zr(e,t,r,n,i){var o=e.display,a=gr(e.display);r<0&&(r=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=Kt(e),c={};i-r>s&&(i=r+s);var u=e.doc.height+jt(o),d=r<a,f=i>u-a;if(r<l)c.scrollTop=d?0:r;else if(i>l+s){var h=Math.min(r,(f?u:i)-s);h!=l&&(c.scrollTop=h)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=qt(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=n-t>g;return m&&(n=t+g),t<10?c.scrollLeft=0:t<p?c.scrollLeft=Math.max(0,t-(m?0:10)):n>g+p-3&&(c.scrollLeft=n+(m?0:10)-g),c}function Qr(e,t,r){null==t&&null==r||en(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Jr(e){en(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?W(t.line,t.ch-1):t,n=W(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=dr(e,t.from),n=dr(e,t.to),i=Zr(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function tn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ll},wt(e.curOp)}function rn(e){var t=e.curOp;kt(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;nn(e)})}function nn(e){for(var t=e.ops,r=0;r<t.length;r++)on(t[r]);for(var n=0;n<t.length;n++)an(t[n]);for(var i=0;i<t.length;i++)ln(t[i]);for(var o=0;o<t.length;o++)sn(t[o]);for(var a=0;a<t.length;a++)cn(t[a])}function on(e){var t=e.cm,r=t.display;Cn(t),e.updateMaxLine&&ge(t),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 kn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function an(e){e.updatedDisplay=e.mustUpdate&&Sn(e.cm,e.update)}function ln(e){var t=e.cm,r=t.display;e.updatedDisplay&&zr(t),e.barMeasure=Br(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$t(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+Bt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-qt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function sn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==Ta()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&An(t,e.barMeasure),e.selectionChanged&&Mr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&_r(e.cm)}function cn(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Tn(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,Wr(t)),e.scrollToPos){var i=Yr(t,I(n,e.scrollToPos.from),I(n,e.scrollToPos.to),e.scrollToPos.margin);e.scrollToPos.isCursor&&t.state.focused&&$r(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||Ae(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&Ae(a[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&Ae(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function un(e,t){if(e.curOp)return t();tn(e);try{return t()}finally{rn(e)}}function dn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);tn(e);try{return t.apply(e,arguments)}finally{rn(e)}}}function fn(e){return function(){if(this.curOp)return e.apply(this,arguments);tn(this);try{return e.apply(this,arguments)}finally{rn(this)}}}function hn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);tn(t);try{return e.apply(this,arguments)}finally{rn(t)}}}function pn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ia&&ce(e.doc,t)<i.viewTo&&mn(e);else if(r<=i.viewFrom)Ia&&ue(e.doc,r+n)>i.viewFrom?mn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)mn(e);else if(t<=i.viewFrom){var o=vn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):mn(e)}else if(r>=i.viewTo){var a=vn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):mn(e)}else{var l=vn(e,t,t,-1),s=vn(e,r,r+n,1);l&&s?(i.view=i.view.slice(0,l.index).concat(bt(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=n):mn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function gn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[kr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);d(a,r)==-1&&a.push(r)}}}function mn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function vn(e,t,r,n){var i,o=kr(e,t),a=e.display.view;if(!Ia||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(n>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,r+=i}for(;ce(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function yn(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=bt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=bt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(kr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(bt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,kr(e,r)))),n.viewTo=r}function bn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function wn(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,l(xn,e))}function xn(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(t.mode,Je(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength,s=Ze(e,o,l?$e(t.mode,n):n,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(t.frontier),o.stateAfter=l?n:$e(t.mode,n)}else o.text.length<=e.options.maxHighlightLength&&et(e,o.text,n),o.stateAfter=t.frontier%5==0?$e(t.mode,n):null;if(++t.frontier,+new Date>r)return wn(e,e.options.workDelay),!0}),i.length&&un(e,function(){for(var t=0;t<i.length;t++)gn(e,i[t],"text")})}}function kn(e,t,r){var n=e.display;this.viewport=t,this.visible=Dr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=qt(e),this.force=r,this.dims=vr(e),this.events=[]}function Cn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Bt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Bt(e)+"px",t.scrollbarsClipped=!0)}function Sn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return mn(e),!1;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==bn(e))return!1;Er(e)&&(mn(e),r.dims=vr(e));var o=i.first+i.size,a=Math.max(r.visible.from-e.options.viewportMargin,i.first),l=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(i.first,n.viewFrom)),n.viewTo>l&&n.viewTo-l<20&&(l=Math.min(o,n.viewTo)),Ia&&(a=ce(e.doc,a),l=ue(e.doc,l));var s=a!=n.viewFrom||l!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;yn(e,a,l),n.viewOffset=he(S(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=bn(e);if(!s&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Ta();return c>4&&(n.lineDiv.style.display="none"),Mn(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Ta()!=u&&u.offsetHeight&&u.focus(),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function Tn(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=qt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+jt(e.display)-Kt(e),r.top)}),t.visible=Dr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Sn(e,t);n=!1){zr(e);var i=Br(e);Cr(e),Ur(e,i),An(e,i)}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)}function Ln(e,t){var r=new kn(e,t);if(Sn(e,r)){zr(e),Tn(e,r);var n=Br(e);Cr(e),Ur(e,n),An(e,n),r.finish()}}function Mn(e,r,n){function i(t){var r=t.nextSibling;return sa&&va&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,a=e.options.lineNumbers,l=o.lineDiv,s=l.firstChild,c=o.view,u=o.viewFrom,f=0;f<c.length;f++){var h=c[f];if(h.hidden);else if(h.node&&h.node.parentNode==l){for(;s!=h.node;)s=i(s);var p=a&&null!=r&&r<=u&&h.lineNumber;h.changes&&(d(h.changes,"gutter")>-1&&(p=!1),Tt(e,h,u,n)),p&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(O(e.options,u)))),s=h.node.nextSibling}else{var g=Et(e,h,u,n);l.insertBefore(g,s)}u+=h.size}for(;s;)s=i(s)}function _n(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function An(e,t){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+Bt(e)+"px";
|
4 |
+
}function Nn(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var a=i[o],l=r.appendChild(n("div",null,"CodeMirror-gutter "+a));"CodeMirror-linenumbers"==a&&(e.display.lineGutter=l,l.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",_n(e)}function On(e){var t=d(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Wn(e,t){this.ranges=e,this.primIndex=t}function En(e,t){this.anchor=e,this.head=t}function zn(e,t){var r=e[t];e.sort(function(e,t){return E(e.from(),t.from())}),t=d(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(E(o.to(),i.from())>=0){var a=D(o.from(),i.from()),l=P(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new En(s?l:a,s?a:l))}}return new Wn(e,t)}function Pn(e,t){return new Wn([new En(e,t||e)],0)}function Dn(e){return e.text?W(e.from.line+e.text.length-1,p(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Hn(e,t){if(E(e,t.from)<0)return e;if(E(e,t.to)<=0)return Dn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Dn(t).ch-t.to.ch),W(r,n)}function In(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new En(Hn(i.anchor,t),Hn(i.head,t)))}return zn(r,e.sel.primIndex)}function Fn(e,t,r){return e.line==t.line?W(r.line,e.ch-t.ch+r.ch):W(r.line+(e.line-t.line),e.ch)}function jn(e,t,r){for(var n=[],i=W(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Fn(l.from,i,o),c=Fn(Dn(l),i,o);if(i=l.to,o=c,"around"==r){var u=e.sel.ranges[a],d=E(u.head,u.anchor)<0;n[a]=new En(d?c:s,d?s:c)}else n[a]=new En(s,s)}return new Wn(n,e.sel.primIndex)}function Rn(e){e.doc.mode=Ge(e.options,e.doc.modeOption),Bn(e)}function Bn(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,wn(e,100),e.state.modeGen++,e.curOp&&pn(e)}function qn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==p(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Kn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){st(e,r,i,n),Ct(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new lt(c[o],i(o),n));return r}var l=t.from,s=t.to,c=t.text,u=S(e,l.line),d=S(e,s.line),f=p(c),h=i(c.length-1),g=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(qn(e,t)){var m=a(0,c.length-1);o(d,d.text,h),g&&e.remove(l.line,g),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var v=a(1,c.length-1);v.push(new lt(f+u.text.slice(s.ch),h,n)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,g);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var y=a(1,c.length-1);g>1&&e.remove(l.line+1,g-1),e.insert(l.line+1,y)}Ct(e,"change",e,t)}function Un(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;r&&!s||(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function Gn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wr(e),Rn(e),e.options.lineWrapping||ge(e),e.options.mode=t.modeOption,pn(e)}function Vn(e){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}function $n(e,t){var r={from:z(t.from),to:Dn(t),text:T(e,t.from,t.to)};return ti(e,r,t.from.line,t.to.line+1),Un(e,function(e){return ti(e,r,t.from.line,t.to.line+1)},!0),r}function Yn(e){for(;e.length;){var t=p(e);if(!t.ranges)break;e.pop()}}function Xn(e,t){return t?(Yn(e.done),p(e.done)):e.done.length&&!p(e.done).ranges?p(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),p(e.done)):void 0}function Zn(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>l-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=Xn(i,i.lastOp==n)))a=p(o.changes),0==E(t.from,t.to)&&0==E(t.from,a.to)?a.to=Dn(t):o.changes.push($n(e,t));else{var s=p(i.done);for(s&&s.ranges||ei(e.sel,i.done),o={changes:[$n(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ae(e,"historyAdded")}function Qn(e,t,r,n){var i=t.charAt(0);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)}function Jn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Qn(e,o,p(i.done),t))?i.done[i.done.length-1]=t:ei(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&Yn(i.undone)}function ei(e,t){var r=p(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ti(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ni(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ri(r[i]));return n}function ii(e,t){var r=ni(e,t),n=Y(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function oi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?Wn.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];n.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&d(t,Number(u[1]))>-1&&(p(l)[f]=c[f],delete c[f])}}}return n}function ai(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=E(r,i)<0;o!=E(n,i)<0?(i=r,r=n):o!=E(r,n)<0&&(r=n)}return new En(i,r)}return new En(n||r,r)}function li(e,t,r,n){hi(e,new Wn([ai(e,e.sel.primary(),t,r)],0),n)}function si(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=ai(e,e.sel.ranges[i],t[i],null);var o=zn(n,e.sel.primIndex);hi(e,o,r)}function ci(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,hi(e,zn(i,e.sel.primIndex),n)}function ui(e,t,r,n){hi(e,Pn(t,r),n)}function di(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new En(I(e,t[n].anchor),I(e,t[n].head))},origin:r&&r.origin};return Ae(e,"beforeSelectionChange",e,n),e.cm&&Ae(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?zn(n.ranges,n.ranges.length-1):t}function fi(e,t,r){var n=e.history.done,i=p(n);i&&i.ranges?(n[n.length-1]=t,pi(e,t,r)):hi(e,t,r)}function hi(e,t,r){pi(e,t,r),Jn(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function pi(e,t,r){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(t=di(e,t,r));var n=r&&r.bias||(E(t.primary().head,e.sel.primary().head)<0?-1:1);gi(e,vi(e,t,n,!0)),r&&r.scroll===!1||!e.cm||Jr(e.cm)}function gi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,Oe(e.cm)),Ct(e,"cursorActivity",e))}function mi(e){gi(e,vi(e,e.sel,null,!1),Oa)}function vi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=bi(e,a.anchor,l&&l.anchor,r,n),c=bi(e,a.head,l&&l.head,r,n);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new En(s,c))}return i?zn(i,t.primIndex):t}function yi(e,t,r,n,i){var o=S(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker;if((null==l.from||(s.inclusiveLeft?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(s.inclusiveRight?l.to>=t.ch:l.to>t.ch))){if(i&&(Ae(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(r){var c=s.find(n<0?1:-1),u=void 0;if((n<0?s.inclusiveRight:s.inclusiveLeft)&&(c=wi(e,c,-n,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=E(c,r))&&(n<0?u<0:u>0))return yi(e,c,t,n,i)}var d=s.find(n<0?-1:1);return(n<0?s.inclusiveLeft:s.inclusiveRight)&&(d=wi(e,d,n,d.line==t.line?o:null)),d?yi(e,d,t,n,i):null}}return t}function bi(e,t,r,n,i){var o=n||1,a=yi(e,t,r,o,i)||!i&&yi(e,t,r,o,!0)||yi(e,t,r,-o,i)||!i&&yi(e,t,r,-o,!0);return a?a:(e.cantEdit=!0,W(e.first,0))}function wi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?I(e,W(t.line-1)):null:r>0&&t.ch==(n||S(e,t.line)).text.length?t.line<e.first+e.size-1?W(t.line+1,0):null:new W(t.line,t.ch+r)}function xi(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),Oa)}function ki(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=I(e,t)),r&&(n.to=I(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),Ae(e,"beforeChange",e,n),e.cm&&Ae(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ci(e,t,r){if(e.cm){if(!e.cm.curOp)return dn(e.cm,Ci)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))||(t=ki(e,t,!0))){var n=Ha&&!r&&Z(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Si(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Si(e,t)}}function Si(e,t){if(1!=t.text.length||""!=t.text[0]||0!=E(t.from,t.to)){var r=In(e,t);Zn(e,t,r,e.cm?e.cm.curOp.id:NaN),Mi(e,t,r,Y(e,t));var n=[];Un(e,function(e,r){r||d(n,e.history)!=-1||(Wi(e.history,t),n.push(e.history)),Mi(e,t,null,Y(e,t))})}}function Ti(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s<a.length&&(n=a[s],r?!n.ranges||n.equals(e.sel):n.ranges);s++);if(s!=a.length){for(i.lastOrigin=i.lastSelOrigin=null;n=a.pop(),n.ranges;){if(ei(n,l),r&&!n.equals(e.sel))return void hi(e,n,{clearRedo:!1});o=n}var c=[];ei(o,l),l.push({changes:c,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var u=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),f=function(r){var i=n.changes[r];if(i.origin=t,u&&!ki(e,i,!1))return a.length=0,{};c.push($n(e,i));var o=r?In(e,i):p(a);Mi(e,i,o,ii(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Dn(i)});var l=[];Un(e,function(e,t){t||d(l,e.history)!=-1||(Wi(e.history,i),l.push(e.history)),Mi(e,i,null,ii(e,i))})},h=n.changes.length-1;h>=0;--h){var g=f(h);if(g)return g.v}}}}function Li(e,t){if(0!=t&&(e.first+=t,e.sel=new Wn(g(e.sel.ranges,function(e){return new En(W(e.anchor.line+t,e.anchor.ch),W(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)gn(e.cm,n,"gutter")}}function Mi(e,t,r,n){if(e.cm&&!e.cm.curOp)return dn(e.cm,Mi)(e,t,r,n);if(t.to.line<e.first)return void Li(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Li(e,i),t={from:W(e.first,0),to:W(t.to.line+i,t.to.ch),text:[p(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:W(o,S(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=T(e,t.from,t.to),r||(r=In(e,t)),e.cm?_i(e.cm,t,n):Kn(e,t,n),pi(e,r,Oa)}}function _i(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=_(le(S(n,o.line))),n.iter(s,a.line+1,function(e){if(e==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&Oe(e),Kn(n,t,r,br(e)),e.options.lineWrapping||(n.iter(s,o.line+t.text.length,function(e){var t=pe(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,o.line),wn(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?pn(e):o.line!=a.line||1!=t.text.length||qn(e.doc,t)?pn(e,o.line,a.line+1,c):gn(e,o.line,"text");var u=We(e,"changes"),d=We(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&Ct(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function Ai(e,t,r,n,i){if(n||(n=r),E(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Ci(e,{from:r,to:n,text:t,origin:i})}function Ni(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Oi(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Ni(o.ranges[l].anchor,t,r,n),Ni(o.ranges[l].head,t,r,n)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(r<c.from.line)c.from=W(c.from.line+n,c.from.ch),c.to=W(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Wi(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Oi(e.done,r,n,i),Oi(e.undone,r,n,i)}function Ei(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=S(e,H(e,t)):i=_(t),null==i?null:(n(o,i)&&e.cm&&gn(e.cm,i,r),o)}function zi(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r}function Pi(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null}function Di(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t}function Hi(e,t,r){he(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Qr(e,null,r)}function Ii(e,t,r,n){var i=new Di(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Ei(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);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&&!de(e,t)){var n=he(t)<e.scrollTop;M(t,t.height+Ht(i)),n&&Qr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),i}function Fi(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++sl}function ji(e,t,r,i,o){if(i&&i.shared)return Bi(e,t,r,i,o);if(e.cm&&!e.cm.curOp)return dn(e.cm,ji)(e,t,r,i,o);var a=new Fi(e,o),l=E(t,r);if(i&&s(i,a,!1),l>0||0==l&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=n("span",[a.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ae(e,t.line,t,r,a)||t.line!=r.line&&ae(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");B()}a.addToHistory&&Zn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var c,u=t.line,d=e.cm;if(e.iter(u,r.line+1,function(e){d&&a.collapsed&&!d.options.lineWrapping&&le(e)==d.display.maxLine&&(c=!0),a.collapsed&&u!=t.line&&M(e,0),G(e,new q(a,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),a.collapsed&&e.iter(t.line,r.line+1,function(t){de(e,t)&&M(t,0)}),a.clearOnEnter&&Ra(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(R(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++sl,a.atomic=!0),d){if(c&&(d.curOp.updateMaxLine=!0),a.collapsed)pn(d,t.line,r.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var f=t.line;f<=r.line;f++)gn(d,f,"text");a.atomic&&mi(d.doc),Ct(d,"markerAdded",d,a)}return a}function Ri(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r}function Bi(e,t,r,n,i){n=s(n),n.shared=!1;var o=[ji(e,t,r,n,i)],a=o[0],l=n.widgetNode;return Un(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(ji(e,I(e,t),I(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=p(o)}),new Ri(o,a)}function qi(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(e){return e.parent})}function Ki(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(E(o,a)){var l=ji(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function Ui(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Un(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];d(n,o.doc)==-1&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}function Gi(e){var t=this;if(Yi(t),!Ne(t,e)&&!It(t.display,e)){ze(e),aa&&(dl=+new Date);var r=xr(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){if(!t.options.allowDropFileTypes||d(t.options.allowDropFileTypes,e.type)!=-1){var l=new FileReader;l.onload=dn(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++a==i){r=I(t.doc,r);var s={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ci(t.doc,s),fi(t.doc,Pn(r,Dn(s)))}}),l.readAsText(e)}},s=0;s<i;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),pi(t.doc,Pn(r,r)),u)for(var f=0;f<u.length;++f)Ai(t.doc,"",u[f].anchor,u[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Vi(e,t){if(aa&&(!e.state.draggingText||+new Date-dl<100))return void He(t);if(!Ne(e,t)&&!It(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!fa)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",da&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),da&&r.parentNode.removeChild(r)}}function $i(e,t){var i=xr(e,t);if(i){var o=document.createDocumentFragment();Tr(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)}}function Yi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Xi(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function Zi(){fl||(Qi(),fl=!0)}function Qi(){var e;Ra(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Xi(Ji)},100))}),Ra(window,"blur",function(){return Xi(Or)})}function Ji(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function eo(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,a=0;a<t.length-1;a++){var l=t[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function to(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=g(r.split(" "),eo),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=n):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function ro(e,t,r,n){t=oo(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return ro(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=ro(e,t.fallthrough[o],r,n);if(a)return a}}}function no(e){var t="string"==typeof e?e:hl[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function io(e,t){if(da&&34==e.keyCode&&e["char"])return!1;var r=hl[e.keyCode],n=r;return null!=n&&!e.altGraphKey&&(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(ka?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(ka?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)}function oo(e){return"string"==typeof e?vl[e]:e}function ao(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&E(o.from,p(n).to)<=0;){var a=n.pop();if(E(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}un(e,function(){for(var t=n.length-1;t>=0;t--)Ai(e.doc,"",n[t].from,n[t].to,"+delete");Jr(e)})}function lo(e,t){var r=S(e.doc,t),n=le(r);n!=r&&(t=_(n));var i=Le(n),o=i?i[0].level%2?we(n):be(n):0;return W(t,o)}function so(e,t){for(var r,n=S(e.doc,t);r=oe(n);)n=r.find(1,!0).line,t=null;var i=Le(n),o=i?i[0].level%2?be(n):we(n):n.text.length;return W(null==t?_(n):t,o)}function co(e,t){var r=lo(e,t.line),n=S(e.doc,r.line),i=Le(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return W(r.line,a?0:o)}return r}function uo(e,t,r){if("string"==typeof t&&(t=wl[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Na}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function fo(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=ro(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&ro(t,e.options.extraKeys,r,e)||ro(t,e.options.keyMap,r,e)}function ho(e,t,r,n){var i=e.state.keySeq;if(i){if(no(t))return"handled";xl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=fo(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&Ct(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(ze(r),Mr(e)),i&&!o&&/\'$/.test(t)?(ze(r),!0):!!o}function po(e,t){var r=io(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ho(e,"Shift-"+r,t,function(t){return uo(e,t,!0)})||ho(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return uo(e,t)}):ho(e,r,t,function(t){return uo(e,t)}))}function go(e,t,r){return ho(e,"'"+r+"'",t,function(t){return uo(e,t,!0)})}function mo(e){var t=this;if(t.curOp.focus=Ta(),!Ne(t,e)){aa&&la<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=po(t,e);da&&(kl=n?r:null,!n&&88==r&&!Ga&&(va?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||vo(t)}}function vo(e){function t(e){18!=e.keyCode&&e.altKey||(Sa(r,"CodeMirror-crosshair"),_e(document,"keyup",t),_e(document,"mouseover",t))}var r=e.display.lineDiv;o(r,"CodeMirror-crosshair"),Ra(document,"keyup",t),Ra(document,"mouseover",t)}function yo(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ne(this,e)}function bo(e){var t=this;if(!(It(t.display,e)||Ne(t,e)||e.ctrlKey&&!e.altKey||va&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(da&&r==kl)return kl=null,void ze(e);if(!da||e.which&&!(e.which<10)||!po(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(go(t,e,i)||t.display.input.onKeyPress(e))}}}function wo(e){var t=this,r=t.display;if(!(Ne(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.shift=e.shiftKey,It(r,e))return void(sa||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!To(t,e)){var n=xr(t,e);switch(window.focus(),Fe(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?xo(t,e,n):Ie(e)==r.scroller&&ze(e);break;case 2:sa&&(t.state.lastMiddleDown=+new Date),n&&li(t.doc,n),setTimeout(function(){return r.input.focus()},20),ze(e);break;case 3:Ca?Lo(t,e):Ar(t)}}}}function xo(e,t,r){aa?setTimeout(l(_r,e),0):e.curOp.focus=Ta();var n,i=+new Date;bl&&bl.time>i-400&&0==E(bl.pos,r)?n="triple":yl&&yl.time>i-400&&0==E(yl.pos,r)?(n="double",bl={time:i,pos:r}):(n="single",yl={time:i,pos:r});var o,a=e.doc.sel,s=va?t.metaKey:t.ctrlKey;e.options.dragDrop&&qa&&!e.isReadOnly()&&"single"==n&&(o=a.contains(r))>-1&&(E((o=a.ranges[o]).from(),r)<0||r.xRel>0)&&(E(o.to(),r)>0||r.xRel<0)?ko(e,t,r,s):Co(e,t,r,n,s)}function ko(e,t,r,n){var i=e.display,o=+new Date,a=dn(e,function(l){sa&&(i.scroller.draggable=!1),e.state.draggingText=!1,_e(document,"mouseup",a),_e(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(ze(l),!n&&+new Date-200<o&&li(e.doc,r),sa||aa&&9==la?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});sa&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=va?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Ra(document,"mouseup",a),Ra(i.scroller,"drop",a)}function Co(e,t,r,n,i){function o(t){if(0!=E(y,t))if(y=t,"rect"==n){for(var i=[],o=e.options.tabSize,a=c(S(u,r.line).text,r.ch,o),l=c(S(u,t.line).text,t.ch,o),s=Math.min(a,l),g=Math.max(a,l),m=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=v;m++){var b=S(u,m).text,w=f(b,s,o);s==g?i.push(new En(W(m,w),W(m,w))):b.length>w&&i.push(new En(W(m,w),W(m,f(b,g,o))))}i.length||i.push(new En(r,r)),hi(u,zn(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=d,k=x.anchor,C=t;if("single"!=n){var T;T="double"==n?e.findWordAt(t):new En(W(t.line,0),I(u,W(t.line+1,0))),E(T.anchor,k)>0?(C=T.head,k=D(x.from(),T.anchor)):(C=T.anchor,k=P(x.to(),T.head))}var L=p.ranges.slice(0);L[h]=new En(I(u,k),C),hi(u,zn(L,h),Wa)}}function a(t){var r=++w,i=xr(e,t,!0,"rect"==n);if(i)if(0!=E(i,y)){e.curOp.focus=Ta(),o(i);var l=Dr(s,u);(i.line>=l.to||i.line<l.from)&&setTimeout(dn(e,function(){w==r&&a(t)}),150)}else{var c=t.clientY<b.top?-20:t.clientY>b.bottom?20:0;c&&setTimeout(dn(e,function(){w==r&&(s.scroller.scrollTop+=c,a(t))}),50)}}function l(t){e.state.selectingText=!1,w=1/0,ze(t),s.input.focus(),_e(document,"mousemove",x),_e(document,"mouseup",k),u.history.lastSelOrigin=null}var s=e.display,u=e.doc;ze(t);var d,h,p=u.sel,g=p.ranges;if(i&&!t.shiftKey?(h=u.sel.contains(r),d=h>-1?g[h]:new En(r,r)):(d=u.sel.primary(),h=u.sel.primIndex),ya?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(d=new En(r,r)),r=xr(e,t,!0,!0),h=-1;else if("double"==n){var m=e.findWordAt(r);d=e.display.shift||u.extend?ai(u,d,m.anchor,m.head):m}else if("triple"==n){var v=new En(W(r.line,0),I(u,W(r.line+1,0)));d=e.display.shift||u.extend?ai(u,d,v.anchor,v.head):v}else d=ai(u,d,r);i?h==-1?(h=g.length,hi(u,zn(g.concat([d]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"single"==n&&!t.shiftKey?(hi(u,zn(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):ci(u,h,d,Wa):(h=0,hi(u,new Wn([d],0),Wa),p=u.sel);var y=r,b=s.wrapper.getBoundingClientRect(),w=0,x=dn(e,function(e){Fe(e)?a(e):l(e)}),k=dn(e,l);e.state.selectingText=k,Ra(document,"mousemove",x),Ra(document,"mouseup",k)}function So(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ze(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!We(e,r))return De(t);o-=l.top-a.viewOffset;for(var s=0;s<e.options.gutters.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=A(e.doc,o),d=e.options.gutters[s];return Ae(e,r,e,u,d,t),De(t)}}}function To(e,t){return So(e,t,"gutterClick",!0)}function Lo(e,t){It(e.display,t)||Mo(e,t)||Ne(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Mo(e,t){return!!We(e,"gutterContextMenu")&&So(e,t,"gutterContextMenu",!1)}function _o(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ir(e)}function Ao(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=Cl&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=Cl,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Rn(e)},!0),t("indentUnit",2,Rn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Bn(e),ir(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(W(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ai(e.doc,t,r[i],W(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Cl&&e.refresh()}),t("specialCharPlaceholder",ft,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",ma?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!ba),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){_o(e),No(e)},!0),t("keyMap","default",function(e,t,r){var n=oo(t),i=r!=Cl&&oo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,Wo,!0),t("gutters",[],function(e){On(e.options),No(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?yr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return Ur(e)},!0),t("scrollbarStyle","native",function(e){Vr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){On(e.options),No(e)},!0),t("firstLineNumber",1,No,!0),t("lineNumberFormatter",function(e){return e},No,!0),t("showCursorWhenSelecting",!1,Cr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Or(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Oo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Cr,!0),t("singleCursorHeightPerLine",!0,Cr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Bn,!0),t("addModeClass",!1,Bn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Bn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null)}function No(e){Nn(e),pn(e),setTimeout(function(){return Wr(e)},20)}function Oo(e,t,r){var n=r&&r!=Cl;if(!t!=!n){var i=e.display.dragFunctions,o=t?Ra:_e;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Wo(e){e.options.lineWrapping?(o(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Sa(e.display.wrapper,"CodeMirror-wrap"),ge(e)),wr(e),pn(e),ir(e),setTimeout(function(){return Ur(e)},100)}function Eo(e,t){var r=this;if(!(this instanceof Eo))return new Eo(e,t);this.options=t=t?s(t):{},s(Sl,t,!1),On(t);var n=t.value;"string"==typeof n&&(n=new ul(n,t.mode,null,t.lineSeparator)),this.doc=n;var i=new Eo.inputStyles[t.inputStyle](this),o=this.display=new C(e,n,i);o.wrapper.CodeMirror=this,Nn(this),_o(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),t.autofocus&&!ma&&o.input.focus(),
|
5 |
+
Vr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new u,keySeq:null,specialChars:null},aa&&la<11&&setTimeout(function(){return r.display.input.reset(!0)},20),zo(this),Zi(),tn(this),this.curOp.forceUpdate=!0,Gn(this,n),t.autofocus&&!ma||this.hasFocus()?setTimeout(l(Nr,this),20):Or(this);for(var a in Tl)Tl.hasOwnProperty(a)&&Tl[a](r,t[a],Cl);Er(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);rn(this),sa&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function zo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),a=i.activeTouch,a.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Ra(i.scroller,"mousedown",dn(e,wo)),aa&&la<11?Ra(i.scroller,"dblclick",dn(e,function(t){if(!Ne(e,t)){var r=xr(e,t);if(r&&!To(e,t)&&!It(e.display,t)){ze(t);var n=e.findWordAt(r);li(e.doc,n.anchor,n.head)}}})):Ra(i.scroller,"dblclick",function(t){return Ne(e,t)||ze(t)}),Ca||Ra(i.scroller,"contextmenu",function(t){return Lo(e,t)});var o,a={end:0};Ra(i.scroller,"touchstart",function(t){if(!Ne(e,t)&&!r(t)){clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ra(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ra(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!It(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||n(o,o.prev)?new En(l,l):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(l):new En(W(l.line,0),I(e.doc,W(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ze(r)}t()}),Ra(i.scroller,"touchcancel",t),Ra(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Hr(e,i.scroller.scrollTop),Ir(e,i.scroller.scrollLeft,!0),Ae(e,"scroll",e))}),Ra(i.scroller,"mousewheel",function(t){return Rr(e,t)}),Ra(i.scroller,"DOMMouseScroll",function(t){return Rr(e,t)}),Ra(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ne(e,t)||He(t)},over:function(t){Ne(e,t)||($i(e,t),He(t))},start:function(t){return Vi(e,t)},drop:dn(e,Gi),leave:function(t){Ne(e,t)||Yi(e)}};var l=i.input.getField();Ra(l,"keyup",function(t){return yo.call(e,t)}),Ra(l,"keydown",dn(e,mo)),Ra(l,"keypress",dn(e,bo)),Ra(l,"focus",function(t){return Nr(e,t)}),Ra(l,"blur",function(t){return Or(e,t)})}function Po(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=Je(e,t):r="prev");var a=e.options.tabSize,l=S(o,t),s=c(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,d=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&(u=o.mode.indent(i,l.text.slice(d.length),l.text),u==Na||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?c(S(o,t-1).text,null,a):0:"add"==r?u=s+e.options.indentUnit:"subtract"==r?u=s-e.options.indentUnit:"number"==typeof r&&(u=s+r),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/a);g;--g)p+=a,f+="\t";if(p<u&&(f+=h(u-p)),f!=d)return Ai(o,f,W(t,0),W(t,d.length),"+input"),l.stateAfter=null,!0;for(var m=0;m<o.sel.ranges.length;m++){var v=o.sel.ranges[m];if(v.head.line==t&&v.head.ch<d.length){var y=W(t,d.length);ci(o,m,new En(y,y));break}}}function Do(e){Ml=e}function Ho(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=e.state.pasteIncoming||"paste"==i,l=Ka(t),s=null;if(a&&n.ranges.length>1)if(Ml&&Ml.text.join("\n")==t){if(n.ranges.length%Ml.text.length==0){s=[];for(var c=0;c<Ml.text.length;c++)s.push(o.splitLines(Ml.text[c]))}}else l.length==n.ranges.length&&(s=g(l,function(e){return[e]}));for(var u,d=n.ranges.length-1;d>=0;d--){var f=n.ranges[d],h=f.from(),m=f.to();f.empty()&&(r&&r>0?h=W(h.line,h.ch-r):e.state.overwrite&&!a?m=W(m.line,Math.min(S(o,m.line).text.length,m.ch+p(l).length)):Ml&&Ml.lineWise&&Ml.text.join("\n")==t&&(h=m=W(h.line,0))),u=e.curOp.updateInput;var v={from:h,to:m,text:s?s[d%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Ci(e.doc,v),Ct(e,"inputRead",e,v)}t&&!a&&Fo(e,t),Jr(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Io(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||un(t,function(){return Ho(t,r,0,null,"paste")}),!0}function Fo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Po(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(S(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Po(e,i.head.line,"smart"));a&&Ct(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:W(i,0),head:W(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ro(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Bo(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return sa?e.style.width="1000px":e.setAttribute("wrap","off"),ga&&(e.style.border="1px solid black"),Ro(e),t}function qo(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&dn(this,t[e])(this,r,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](oo(e))},removeKeyMap:function(e){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},addOverlay:fn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,pn(this)}),removeOverlay:fn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void pn(t)}}),indentLine:fn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),N(this.doc,e)&&Po(this,e,t,r)}),indentSelection:fn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(Po(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Jr(t));else{var a=o.from(),l=o.to(),s=Math.max(n,a.line);n=Math.min(t.lastLine(),l.line-(l.ch?0:1))+1;for(var c=s;c<n;++c)Po(t,c,e);var u=t.doc.sel.ranges;0==a.ch&&r.length==u.length&&u[i].from().ch>0&&ci(t.doc,i,new En(a,u[i].to()),Oa)}}}),getTokenAt:function(e,t){return nt(this,e,t)},getLineTokens:function(e,t){return nt(this,W(e),t,!0)},getTokenTypeAt:function(e){e=I(this.doc,e);var t,r=Qe(this,S(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],a=this.getModeAt(e);if("string"==typeof a[t])o[a[t]]&&i.push(o[a[t]]);else if(a[t])for(var l=0;l<a[t].length;l++){var s=o[a[t][l]];s&&i.push(s)}else a.helperType&&o[a.helperType]?i.push(o[a.helperType]):o[a.name]&&i.push(o[a.name]);for(var c=0;c<o._global.length;c++){var u=o._global[c];u.pred(a,n)&&d(i,u.val)==-1&&i.push(u.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=H(r,null==e?r.first+r.size-1:e),Je(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?I(this.doc,e):e?n.from():n.to(),ur(this,r,t||"page")},charCoords:function(e,t){return cr(this,I(this.doc,e),t||"page")},coordsChar:function(e,t){return e=sr(this,e,t||"page"),hr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=sr(this,{top:e,left:0},t||"page").top,A(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r,n=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,n=!0),r=S(this.doc,e)}else r=e;return lr(this,r,{top:0,left:0},t||"page").top+(n?this.doc.height-he(r):0)},defaultTextHeight:function(){return gr(this.display)},defaultCharWidth:function(){return mr(this.display)},setGutterMarker:fn(function(e,t,r){return Ei(this.doc,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&x(n)&&(e.gutterMarkers=null),!0})}),clearGutter:fn(function(e){var t=this,r=this.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,gn(t,n,"gutter"),x(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),lineInfo:function(e){var t;if("number"==typeof e){if(!N(this.doc,e))return null;if(t=e,e=S(this.doc,e),!e)return null}else if(t=_(e),null==t)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=ur(this,I(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&Xr(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:fn(mo),triggerOnKeyPress:fn(bo),triggerOnKeyUp:yo,execCommand:function(e){if(wl.hasOwnProperty(e))return wl[e].call(null,this)},triggerElectric:fn(function(e){Fo(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=I(this.doc,e),l=0;l<t&&(a=Ko(i.doc,a,o,r,n),!a.hitSide);++l);return a},moveH:fn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Ko(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Ea)}),deleteH:fn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):ao(this,function(r){var i=Ko(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=this,o=1,a=n;t<0&&(o=-1,t=-t);for(var l=I(this.doc,e),s=0;s<t;++s){var c=ur(i,l,"div");if(null==a?a=c.left:c.left=a,l=Uo(i,c,o,r),l.hitSide)break}return l},moveV:fn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return e<0?a.from():a.to();var l=ur(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Uo(r,l,e,t);return"page"==t&&a==n.sel.primary()&&Qr(r,null,cr(r,s,"div").top-l.top),s},Ea),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),findWordAt:function(e){var t=this.doc,r=S(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");(e.xRel<0||i==r.length)&&n?--n:++i;for(var a=r.charAt(n),l=w(a,o)?function(e){return w(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!w(e)};n>0&&l(r.charAt(n-1));)--n;for(;i<r.length&&l(r.charAt(i));)++i}return new En(W(e.line,n),W(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?o(this.display.cursorDiv,"CodeMirror-overwrite"):Sa(this.display.cursorDiv,"CodeMirror-overwrite"),Ae(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ta()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:fn(function(e,t){null==e&&null==t||en(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Bt(this)-this.display.barHeight,width:e.scrollWidth-Bt(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:qt(this)}},scrollIntoView:fn(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:W(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)en(this),this.curOp.scrollToPos=e;else{var r=Zr(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:fn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&nr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,Ae(this,"refresh",this)}),operation:function(e){return un(this,e)},refresh:fn(function(){var e=this.display.cachedTextHeight;pn(this),this.curOp.forceUpdate=!0,ir(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),_n(this),(null==e||Math.abs(e-gr(this.display))>.5)&&wr(this),Ae(this,"refresh",this)}),swapDoc:fn(function(e){var t=this.doc;return t.cm=null,Gn(this,e),ir(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ct(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ee(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Ko(e,t,r,n,i){function o(){var t=l+r;return!(t<e.first||t>=e.first+e.size)&&(l=t,u=S(e,t))}function a(e){var t=(i?Se:Te)(u,s,r,!0);if(null==t){if(e||!o())return!1;s=i?(r<0?we:be)(u):r<0?u.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,c=r,u=S(e,l);if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var d=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||a(!p);p=!1){var g=u.text.charAt(s)||"\n",m=w(g,h)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||p||m||(m="s"),d&&d!=m){r<0&&(r=1,a());break}if(m&&(d=m),r>0&&!a(!p))break}var v=bi(e,W(l,s),t,c,!0);return E(t,v)||(v.hitSide=!0),v}function Uo(e,t,r,n){var i,o=e.doc,a=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(l-.5*gr(e.display),3);i=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var c;c=hr(e,a,i),c.outside;){if(r<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*r}return c}function Go(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new u,this.gracePeriod=!1}function Vo(e,t){var r=Yt(e,t.line);if(!r||r.hidden)return null;var n=S(e.doc,t.line),i=Gt(r,n,t.line),o=Le(n),a="left";if(o){var l=ke(o,t.ch);a=l%2?"right":"left"}var s=Qt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function $o(e,t){return t&&(e.bad=!0),e}function Yo(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return""==r&&(r=t.textContent.replace(/\u200b/g,"")),void(l+=r);var u,d=t.getAttribute("cm-marker");if(d){var f=e.findMarks(W(n,0),W(i+1,0),o(+d));return void(f.length&&(u=f[0].find())&&(l+=T(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var h=0;h<t.childNodes.length;h++)a(t.childNodes[h]);/^(pre|div|p)$/i.test(t.nodeName)&&(s=!0)}else if(3==t.nodeType){var p=t.nodeValue;if(!p)return;s&&(l+=c,s=!1),l+=p}}for(var l="",s=!1,c=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return l}function Xo(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return $o(e.clipPos(W(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Zo(o,t,r)}}function Zo(e,t,r){function n(t,r,n){for(var i=-1;i<(d?d.length:0);i++)for(var o=i<0?u.map:d[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==r){var s=_(i<0?e.line:e.rest[i]),c=o[a]+n;return(n<0||l!=t)&&(c=o[a+(n?1:0)]),W(s,c)}}}var o=e.text.firstChild,a=!1;if(!t||!i(o,t))return $o(W(_(e.line),0),!0);if(t==o&&(a=!0,t=o.childNodes[r],r=0,!t)){var l=e.rest?p(e.rest):e.line;return $o(W(_(l),l.text.length),a)}var s=3==t.nodeType?t:null,c=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,r&&(r=s.nodeValue.length));c.parentNode!=o;)c=c.parentNode;var u=e.measure,d=u.maps,f=n(s,c,r);if(f)return $o(f,a);for(var h=c.nextSibling,g=s?s.nodeValue.length-r:0;h;h=h.nextSibling){if(f=n(h,h.firstChild,0))return $o(W(f.line,f.ch-g),a);g+=h.textContent.length}for(var m=c.previousSibling,v=r;m;m=m.previousSibling){if(f=n(m,m.firstChild,-1))return $o(W(f.line,f.ch+v),a);v+=m.textContent.length}}function Qo(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new u,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function Jo(e,t){function r(){e.value=c.getValue()}if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=Ta();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Ra(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(l){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(_e(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var c=Eo(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return c}function ea(e){e.off=_e,e.on=Ra,e.wheelEventPixels=jr,e.Doc=ul,e.splitLines=Ka,e.countColumn=c,e.findColumn=f,e.isWordChar=b,e.Pass=Na,e.signal=Ae,e.Line=lt,e.changeEnd=Dn,e.scrollbarModel=al,e.Pos=W,e.cmpPos=E,e.modes=$a,e.mimeModes=Ya,e.resolveMode=Ue,e.getMode=Ge,e.modeExtensions=Xa,e.extendMode=Ve,e.copyState=$e,e.startState=Xe,e.innerMode=Ye,e.commands=wl,e.keyMap=vl,e.keyName=io,e.isModifierKey=no,e.lookupKey=ro,e.normalizeKeyMap=to,e.StringStream=Za,e.SharedTextMarker=Ri,e.TextMarker=Fi,e.LineWidget=Di,e.e_preventDefault=ze,e.e_stopPropagation=Pe,e.e_stop=He,e.addClass=o,e.contains=i,e.rmClass=Sa,e.keyNames=hl}var ta=navigator.userAgent,ra=navigator.platform,na=/gecko\/\d/i.test(ta),ia=/MSIE \d/.test(ta),oa=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ta),aa=ia||oa,la=aa&&(ia?document.documentMode||6:oa[1]),sa=/WebKit\//.test(ta),ca=sa&&/Qt\/\d+\.\d+/.test(ta),ua=/Chrome\//.test(ta),da=/Opera\//.test(ta),fa=/Apple Computer/.test(navigator.vendor),ha=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ta),pa=/PhantomJS/.test(ta),ga=/AppleWebKit/.test(ta)&&/Mobile\/\w+/.test(ta),ma=ga||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ta),va=ga||/Mac/.test(ra),ya=/\bCrOS\b/.test(ta),ba=/win/i.test(ra),wa=da&&ta.match(/Version\/(\d*\.\d*)/);wa&&(wa=Number(wa[1])),wa&&wa>=15&&(da=!1,sa=!0);var xa,ka=va&&(ca||da&&(null==wa||wa<12.11)),Ca=na||aa&&la>=9,Sa=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};xa=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var Ta=function(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e};aa&&la<11&&(Ta=function(){try{return document.activeElement}catch(e){return document.body}});var La=function(e){e.select()};ga?La=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:aa&&(La=function(e){try{e.select()}catch(t){}}),u.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Ma,_a,Aa=30,Na={toString:function(){return"CodeMirror.Pass"}},Oa={scroll:!1},Wa={origin:"*mouse"},Ea={origin:"+move"},za=[""],Pa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Da=/[\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]/,Ha=!1,Ia=!1,Fa=null,ja=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1773?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(r){if(!i.test(r))return!1;for(var n=r.length,u=[],d=0;d<n;++d)u.push(e(r.charCodeAt(d)));for(var f=0,h=c;f<n;++f){var g=u[f];"m"==g?u[f]=h:h=g}for(var m=0,v=c;m<n;++m){var y=u[m];"1"==y&&"r"==v?u[m]="n":a.test(y)&&(v=y,"r"==y&&(u[m]="R"))}for(var b=1,w=u[0];b<n-1;++b){var x=u[b];"+"==x&&"1"==w&&"1"==u[b+1]?u[b]="1":","!=x||w!=u[b+1]||"1"!=w&&"n"!=w||(u[b]=w),w=x}for(var k=0;k<n;++k){var C=u[k];if(","==C)u[k]="N";else if("%"==C){var S=void 0;for(S=k+1;S<n&&"%"==u[S];++S);for(var T=k&&"!"==u[k-1]||S<n&&"1"==u[S]?"1":"N",L=k;L<S;++L)u[L]=T;k=S-1}}for(var M=0,_=c;M<n;++M){var A=u[M];"L"==_&&"1"==A?u[M]="L":a.test(A)&&(_=A)}for(var N=0;N<n;++N)if(o.test(u[N])){var O=void 0;for(O=N+1;O<n&&o.test(u[O]);++O);for(var W="L"==(N?u[N-1]:c),E="L"==(O<n?u[O]:c),z=W||E?"L":"R",P=N;P<O;++P)u[P]=z;N=O-1}for(var D,H=[],I=0;I<n;)if(l.test(u[I])){var F=I;for(++I;I<n&&l.test(u[I]);++I);H.push(new t(0,F,I))}else{var j=I,R=H.length;for(++I;I<n&&"L"!=u[I];++I);for(var B=j;B<I;)if(s.test(u[B])){j<B&&H.splice(R,0,new t(1,j,B));var q=B;for(++B;B<I&&s.test(u[B]);++B);H.splice(R,0,new t(2,q,B)),j=B}else++B;j<I&&H.splice(R,0,new t(1,j,I))}return 1==H[0].level&&(D=r.match(/^\s+/))&&(H[0].from=D[0].length,H.unshift(new t(0,0,D[0].length))),1==p(H).level&&(D=r.match(/\s+$/))&&(p(H).to-=D[0].length,H.push(new t(0,n-D[0].length,n))),2==H[0].level&&H.unshift(new t(1,H[0].to,H[0].to)),H[0].level!=p(H).level&&H.push(new t(H[0].level,n,n)),H}}(),Ra=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},Ba=[],qa=function(){if(aa&&la<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),Ka=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");a!=-1?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ua=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ga=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Va=null,$a={},Ya={},Xa={},Za=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Za.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t,r=this.string.charAt(this.pos);if(t="string"==typeof e?r==e:r&&(e.test?e.test(r):e(r)))return++this.pos,r},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=c(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?c(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return c(this.string,null,this.tabSize)-(this.lineStart?c(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},Ee(lt),lt.prototype.lineNo=function(){return _(this)};var Qa,Ja={},el={},tl=null,rl=null,nl={left:0,right:0,top:0,bottom:0},il=0,ol=null;aa?ol=-.53:na?ol=15:ua?ol=-.7:fa&&(ol=-1/3),qr.prototype=s({update:function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=va&&!ha?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new u,this.disableVert=new u},enableZeroWidthBar:function(e,t){function r(){var n=e.getBoundingClientRect(),i=document.elementFromPoint(n.left+1,n.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},qr.prototype),Kr.prototype=s({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Kr.prototype);var al={"native":qr,"null":Kr},ll=0;kn.prototype.signal=function(e,t){We(e,t)&&this.events.push(arguments)},kn.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)Ae.apply(null,e.events[t])},Wn.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(0!=E(n.anchor,i.anchor)||0!=E(n.head,i.head))return!1}return!0},deepCopy:function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new En(z(e.ranges[r].anchor),z(e.ranges[r].head));return new Wn(t,this.primIndex)},somethingSelected:function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},contains:function(e,t){
|
6 |
+
var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(E(t,i.from())>=0&&E(e,i.to())<=0)return n}return-1}},En.prototype={from:function(){return D(this.anchor,this.head)},to:function(){return P(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},zi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,ct(o),Ct(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},iterN:function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0}},Pi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e),l=i.height;if(i.removeInner(e,a),r.height-=l-i.height,o==a&&(r.children.splice(n--,1),i.parent=null),0==(t-=a))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof zi))){var s=[];this.collapse(s),this.children=[new zi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},insertInner:function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<=a){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var l=o.lines.length%25+25,s=l;s<o.lines.length;){var c=new zi(o.lines.slice(s,s+=25));o.height-=c.height,n.children.splice(++i,0,c),c.parent=n}o.lines=o.lines.slice(0,l),n.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new Pi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=d(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new Pi(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],a=o.chunkSize();if(e<a){var l=Math.min(t,a-e);if(o.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=a}}},Ee(Di),Di.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=_(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var a=Ht(this);M(n,Math.max(0,n.height-a)),t&&un(t,function(){Hi(t,n,-a),gn(t,i,"widget")})}},Di.prototype.changed=function(){var e=this.height,t=this.doc.cm,r=this.line;this.height=null;var n=Ht(this)-e;n&&(M(r,r.height+n),t&&un(t,function(){t.curOp.forceUpdate=!0,Hi(t,r,n)}))};var sl=0;Ee(Fi),Fi.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&tn(t),We(this,"clear")){var n=this.find();n&&Ct(this,"clear",n.from,n.to)}for(var i=null,o=null,a=0;a<this.lines.length;++a){var l=e.lines[a],s=K(l.markedSpans,e);t&&!e.collapsed?gn(t,_(l),"text"):t&&(null!=s.to&&(o=_(l)),null!=s.from&&(i=_(l))),l.markedSpans=U(l.markedSpans,s),null==s.from&&e.collapsed&&!de(e.doc,l)&&t&&M(l,gr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var u=le(e.lines[c]),d=pe(u);d>t.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&mi(t.doc)),t&&Ct(t,"markerCleared",t,this),r&&rn(t),this.parent&&this.parent.clear()}},Fi.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var a=r.lines[o],l=K(a.markedSpans,r);if(null!=l.from&&(n=W(t?a:_(a),l.from),e==-1))return n;if(null!=l.to&&(i=W(t?a:_(a),l.to),1==e))return i}return n&&{from:n,to:i}},Fi.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&un(r,function(){var n=e.line,i=_(e.line),o=Yt(r,i);if(o&&(rr(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!de(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var l=Ht(t)-a;l&&M(n,n.height+l)}})},Fi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&d(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Fi.prototype.detachLine=function(e){if(this.lines.splice(d(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Ee(Ri),Ri.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();Ct(this,"clear")}},Ri.prototype.find=function(e,t){return this.primary.find(e,t)};var cl=0,ul=function(e,t,r,n){if(!(this instanceof ul))return new ul(e,t,r,n);null==r&&(r=0),Pi.call(this,[new zi([new lt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var i=W(r,0);this.sel=Pn(i),this.history=new Vn(null),this.id=++cl,this.modeOption=t,this.lineSep=n,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Kn(this,{from:i,to:i,text:e}),hi(this,Pn(i),Oa)};ul.prototype=y(Pi.prototype,{constructor:ul,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=L(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:hn(function(e){var t=W(this.first,0),r=this.first+this.size-1;Ci(this,{from:t,to:W(r,S(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),hi(this,Pn(t))}),replaceRange:function(e,t,r,n){t=I(this,t),r=r?I(this,r):t,Ai(this,e,t,r,n)},getRange:function(e,t,r){var n=T(this,I(this,e),I(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(N(this,e))return S(this,e)},getLineNumber:function(e){return _(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=S(this,e)),le(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return I(this,e)},getCursor:function(e){var t,r=this.sel.primary();return t=null==e||"head"==e?r.head:"anchor"==e?r.anchor:"end"==e||"to"==e||e===!1?r.to():r.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:hn(function(e,t,r){ui(this,I(this,"number"==typeof e?W(e,t||0):e),null,r)}),setSelection:hn(function(e,t,r){ui(this,I(this,e),I(this,t||e),r)}),extendSelection:hn(function(e,t,r){li(this,I(this,e),t&&I(this,t),r)}),extendSelections:hn(function(e,t){si(this,j(this,e),t)}),extendSelectionsBy:hn(function(e,t){var r=g(this.sel.ranges,e);si(this,j(this,r),t)}),setSelections:hn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new En(I(n,e[o].anchor),I(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),hi(this,zn(i,t),r)}}),addSelection:hn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new En(I(this,e),I(this,t||e))),hi(this,zn(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=T(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=T(t,n[i].from(),n[i].to());e!==!1&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:hn(function(e,t,r){for(var n=this,i=[],o=this.sel,a=0;a<o.ranges.length;a++){var l=o.ranges[a];i[a]={from:l.from(),to:l.to(),text:n.splitLines(e[a]),origin:r}}for(var s=t&&"end"!=t&&jn(this,i,t),c=i.length-1;c>=0;c--)Ci(n,i[c]);s?fi(this,s):this.cm&&Jr(this.cm)}),undo:hn(function(){Ti(this,"undo")}),redo:hn(function(){Ti(this,"redo")}),undoSelection:hn(function(){Ti(this,"undo",!0)}),redoSelection:hn(function(){Ti(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Vn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:oi(this.history.done),undone:oi(this.history.undone)}},setHistory:function(e){var t=this.history=new Vn(this.history.maxGeneration);t.done=oi(e.done.slice(0),null,!0),t.undone=oi(e.undone.slice(0),null,!0)},addLineClass:hn(function(t,r,n){return Ei(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:hn(function(t,r,n){return Ei(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var a=o.match(e(n));if(!a)return!1;var l=a.index+a[0].length;t[i]=o.slice(0,a.index)+(a.index&&l!=o.length?" ":"")+o.slice(l)||null}return!0})}),addLineWidget:hn(function(e,t,r){return Ii(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ji(this,I(this,e),I(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=I(this,e),ji(this,e,e,r,"bookmark")},findMarksAt:function(e){e=I(this,e);var t=[],r=S(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=I(this,e),t=I(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;return o>e?(t=e,!0):(e-=o,void++r)}),I(this,W(r,t))},indexFromPos:function(e){e=I(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new ul(L(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);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},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ul(L(this,t,r),e.mode||this.modeOption,t,this.lineSep);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Ki(n,qi(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof Eo&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),Ui(qi(t));break}}if(e.history==this.history){var i=[e.id];Un(e,function(e){return i.push(e.id)},!0),e.history=new Vn(null),e.history.done=oi(this.history.done,i),e.history.undone=oi(this.history.undone,i)}},iterLinkedDocs:function(e){Un(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ka(e)},lineSeparator:function(){return this.lineSep||"\n"}}),ul.prototype.eachLine=ul.prototype.iter;for(var dl=0,fl=!1,hl={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},pl=0;pl<10;pl++)hl[pl+48]=hl[pl+96]=String(pl);for(var gl=65;gl<=90;gl++)hl[gl]=String.fromCharCode(gl);for(var ml=1;ml<=12;ml++)hl[ml+111]=hl[ml+63235]="F"+ml;var vl={};vl.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},vl.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},vl.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},vl.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},vl["default"]=va?vl.macDefault:vl.pcDefault;var yl,bl,wl={selectAll:xi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Oa)},killLine:function(e){return ao(e,function(t){if(t.empty()){var r=S(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:W(t.head.line+1,0)}:{from:t.head,to:W(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return ao(e,function(t){return{from:W(t.from().line,0),to:I(e.doc,W(t.to().line+1,0))}})},delLineLeft:function(e){return ao(e,function(e){return{from:W(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return ao(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return ao(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return lo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return co(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return so(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Ea)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Ea)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?co(e,t.head):n},Ea)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=c(e.getLine(o.line),o.ch,n);t.push(h(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return un(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=S(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new W(i.line,i.ch-1)),i.ch>0)i=new W(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),W(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=S(e.doc,i.line-1).text;a&&(i=new W(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),W(i.line-1,a.length-1),i,"+transpose"))}r.push(new En(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return un(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Jr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},xl=new u,kl=null,Cl={toString:function(){return"CodeMirror.Init"}},Sl={},Tl={};Eo.defaults=Sl,Eo.optionHandlers=Tl;var Ll=[];Eo.defineInitHook=function(e){return Ll.push(e)};var Ml=null;Go.prototype=s({init:function(e){function t(e){if(!Ne(n,e)){if(n.somethingSelected())Do({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=jo(n);Do({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,Oa),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Ml.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var a=Bo(),l=a.firstChild;n.display.lineSpace.insertBefore(a,n.display.lineSpace.firstChild),l.value=Ml.text.join("\n");var s=document.activeElement;La(l),setTimeout(function(){n.display.lineSpace.removeChild(a),s.focus(),s==i&&r.showPrimarySelection()},50)}}var r=this,n=r.cm,i=r.div=e.lineDiv;Ro(i,n.options.spellcheck),Ra(i,"paste",function(e){Ne(n,e)||Io(e,n)||la<=11&&setTimeout(dn(n,function(){r.pollContent()||pn(n)}),20)}),Ra(i,"compositionstart",function(e){var t=e.data;if(r.composing={sel:n.doc.sel,data:t,startData:t},t){var i=n.doc.sel.primary(),o=n.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(r.composing.sel=Pn(W(i.head.line,a),W(i.head.line,a+t.length)))}}),Ra(i,"compositionupdate",function(e){return r.composing.data=e.data}),Ra(i,"compositionend",function(e){var t=r.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||r.applyComposition(t),r.composing==t&&(r.composing=null)},50))}),Ra(i,"touchstart",function(){return r.forceCompositionEnd()}),Ra(i,"input",function(){r.composing||!n.isReadOnly()&&r.pollContent()||un(r.cm,function(){return pn(n)})}),Ra(i,"copy",t),Ra(i,"cut",t)},prepareSelection:function(){var e=Sr(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=Xo(this.cm,e.anchorNode,e.anchorOffset),n=Xo(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=E(D(r,n),t.from())||0!=E(P(r,n),t.to())){var i=Vo(this.cm,t.from()),o=Vo(this.cm,t.to());if(i||o){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=a[a.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};var u;try{u=xa(i.node,i.offset,o.offset,o.node)}catch(d){}u&&(!na&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||(e.removeAllRanges(),e.addRange(u))):(e.removeAllRanges(),e.addRange(u)),l&&null==e.anchorNode?e.addRange(l):na&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return i(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():un(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var r=Xo(t,e.anchorNode,e.anchorOffset),n=Xo(t,e.focusNode,e.focusOffset);r&&n&&un(t,function(){hi(t.doc,Pn(r,n),Oa),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,a,l;n.line==t.viewFrom||0==(o=kr(e,n.line))?(a=_(t.view[0].line),l=t.view[0].node):(a=_(t.view[o].line),l=t.view[o-1].node.nextSibling);var s,c,u=kr(e,i.line);u==t.view.length-1?(s=t.viewTo-1,c=t.lineDiv.lastChild):(s=_(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling);for(var d=e.doc.splitLines(Yo(e,l,c,a,s)),f=T(e.doc,W(a,0),W(s,S(e.doc,s).text.length));d.length>1&&f.length>1;)if(p(d)==p(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),a++}for(var h=0,g=0,m=d[0],v=f[0],y=Math.min(m.length,v.length);h<y&&m.charCodeAt(h)==v.charCodeAt(h);)++h;for(var b=p(d),w=p(f),x=Math.min(b.length-(1==d.length?h:0),w.length-(1==f.length?h:0));g<x&&b.charCodeAt(b.length-g-1)==w.charCodeAt(w.length-g-1);)++g;d[d.length-1]=b.slice(0,b.length-g),d[0]=d[0].slice(h);var k=W(a,h),C=W(s,f.length?p(f).length-g:0);return d.length>1||d[0]||E(k,C)?(Ai(e.doc,d,k,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?dn(this.cm,pn)(this.cm):e.data&&e.data!=e.startData&&dn(this.cm,Ho)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||dn(this.cm,Ho)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:v,resetPosition:v,needsContentAttribute:!0},Go.prototype),Qo.prototype=s({init:function(e){function t(e){if(!Ne(i,e)){if(i.somethingSelected())Do({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,a.value=Ml.text.join("\n"),La(a));else{if(!i.options.lineWiseCopyCut)return;var t=jo(i);Do({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Oa):(n.prevInput="",a.value=t.text.join("\n"),La(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Bo(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),ga&&(a.style.width="0px"),Ra(a,"input",function(){aa&&la>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Ra(a,"paste",function(e){Ne(i,e)||Io(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ra(a,"cut",t),Ra(a,"copy",t),Ra(e.scroller,"paste",function(t){It(e,t)||Ne(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ra(e.lineSpace,"selectstart",function(t){It(e,t)||ze(t)}),Ra(a,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ra(a,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,r=e.doc,n=Sr(e);if(e.options.moveInputWithCursor){var i=ur(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},showSelection:function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=Ga&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var a=t?"-":r||n.getSelection();this.textarea.value=a,n.state.focused&&La(this.textarea),aa&&la>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",aa&&la>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!ma||Ta()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var n=r.poll();n||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},poll:function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ua(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(aa&&la>=9&&this.hasSelection===i||va&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,l=Math.min(n.length,i.length);a<l&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return un(t,function(){Ho(t,i.slice(a),n.length-a,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"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){aa&&la>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t=""+(e?a.value:"");a.value="⇚",a.value=t,n.prevInput=e?"":"",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=d,a.style.cssText=u,aa&&la<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!aa||aa&&la<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&""==n.prevInput?dn(i,xi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):o.input.reset()};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,a=n.textarea,l=xr(i,e),s=o.scroller.scrollTop;if(l&&!da){var c=i.options.resetSelectionOnContextMenu;c&&i.doc.sel.contains(l)==-1&&dn(i,hi)(i.doc,Pn(l),Oa);var u=a.style.cssText,d=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(aa?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
|
7 |
+
var h;if(sa&&(h=window.scrollY),o.input.focus(),sa&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(a.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),aa&&la>=9&&t(),Ca){He(e);var p=function(){_e(window,"mouseup",p),setTimeout(r,20)};Ra(window,"mouseup",p)}else setTimeout(r,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:v,needsContentAttribute:!1},Qo.prototype),Ao(Eo),qo(Eo);var _l="iter insert remove copy getEditor constructor".split(" ");for(var Al in ul.prototype)ul.prototype.hasOwnProperty(Al)&&d(_l,Al)<0&&(Eo.prototype[Al]=function(e){return function(){return e.apply(this.doc,arguments)}}(ul.prototype[Al]));return Ee(ul),Eo.inputStyles={textarea:Qo,contenteditable:Go},Eo.defineMode=function(e){Eo.defaults.mode||"null"==e||(Eo.defaults.mode=e),qe.apply(this,arguments)},Eo.defineMIME=Ke,Eo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Eo.defineMIME("text/plain","null"),Eo.defineExtension=function(e,t){Eo.prototype[e]=t},Eo.defineDocExtension=function(e,t){ul.prototype[e]=t},Eo.fromTextArea=Jo,ea(Eo),Eo.version="5.20.2",Eo})},{}],18:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return p=t,e}function i(e,t){var r=e.next();if(v[r]){var i=v[r](e,t);if(i!==!1)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?n("variable-2","variable-definition"):n("variable-2","variable")):e.match(/^\w+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i,o=!1;null!=(i=t.next());){if(i==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==i}return(i==e||!o&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,n){return e.context=new l(r,t.indentation()+(n===!1?0:m),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function u(e,t,r){return N[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();g=M.hasOwnProperty(t)?"atom":L.hasOwnProperty(t)?"keyword":"variable"}var h=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var p,g,m=t.indentUnit,v=r.tokenHooks,y=r.documentTypes||{},b=r.mediaTypes||{},w=r.mediaFeatures||{},x=r.mediaValueKeywords||{},k=r.propertyKeywords||{},C=r.nonStandardPropertyKeywords||{},S=r.fontProperties||{},T=r.counterDescriptors||{},L=r.colorKeywords||{},M=r.valueKeywords||{},_=r.allowNested,A=r.supportsAtComponent===!0,N={};return N.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(A&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(_&&"("==e)return s(r,t,"parens")}return r.context.type},N.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return k.hasOwnProperty(n)?(g="property","maybeprop"):C.hasOwnProperty(n)?(g="string-2","maybeprop"):_?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":_||"hash"!=e&&"qualifier"!=e?N.top(e,t,r):(g="error","block")},N.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):u(e,t,r)},N.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&_)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},N.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},N.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&f(t),"parens")},N.pseudo=function(e,t,r){return"word"==e?(g="variable-3",r.context.type):u(e,t,r)},N.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):N.atBlock(e,t,r)},N.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return d(e,t,r);if("{"==e)return c(r)&&s(r,t,_?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();g="only"==n||"not"==n||"and"==n||"or"==n?"keyword":b.hasOwnProperty(n)?"attribute":w.hasOwnProperty(n)?"property":x.hasOwnProperty(n)?"keyword":k.hasOwnProperty(n)?"property":C.hasOwnProperty(n)?"string-2":M.hasOwnProperty(n)?"atom":L.hasOwnProperty(n)?"keyword":"error"}return r.context.type},N.atComponentBlock=function(e,t,r){return"}"==e?d(e,t,r):"{"==e?c(r)&&s(r,t,_?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},N.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?d(e,t,r,2):N.atBlock(e,t,r)},N.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):u(e,t,r)},N.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!S.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!T.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},N.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):u(e,t,r)},N.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?d(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},N.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?d(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:h?"block":"top",stateArg:null,context:new l(h?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(p=r[1],r=r[0]),g=r,t.state=N[t.state](p,e,t),g},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-m),r=r.prev):(r=r.prev,i=r.indent)),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var n=["domain","regexp","url","url-prefix"],i=t(n),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(o),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],u=t(c),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(d),h=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],p=t(h),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],m=t(g),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=t(b),x=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],k=t(x),C=n.concat(o).concat(l).concat(c).concat(d).concat(h).concat(b).concat(x);e.registerHelper("hintWords","css",C),e.defineMIME("text/css",{documentTypes:i,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:u,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:w,valueKeywords:k,fontProperties:m,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:i,mediaTypes:a,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:y,colorKeywords:w,valueKeywords:k,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})})},{"../../lib/codemirror":17}],19:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror"),e("../xml/xml"),e("../javascript/javascript"),e("../css/css")):"function"==typeof t&&t.amd?t(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){var n=e.current(),i=n.search(t);return i>-1?e.backUp(n.length-i):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function r(e){var t=s[e];return t?t:s[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(e,t){var n=e.match(r(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),i=e[r],o=i.length-1;o>=0;o--)n.unshift(i[o])}function a(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(!i[0]||i[1].test(n(t,i[0])))return i[2]}}var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},s={};e.defineMode("htmlmixed",function(r,n){function s(n,o){var l,d=c.token(n,o.htmlState),f=/\btag\b/.test(d);if(f&&!/[<>\s\/]/.test(n.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(n.current())){var h=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var p=">"==n.current()&&a(u[h[1]],h[2]),g=e.getMode(r,p),m=i(h[1],!0),v=i(h[1],!1);o.token=function(e,r){return e.match(m,!1)?(r.token=s,r.localState=r.localMode=null,null):t(e,v,r.localMode.token(e,r.localState))},o.localMode=g,o.localState=e.startState(g,c.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=n.current(),n.eol()&&(o.inTag+=" "));return d}var c=e.getMode(r,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},d=n&&n.tags,f=n&&n.scriptTypes;if(o(l,u),d&&o(d,u),f)for(var h=f.length-1;h>=0;h--)u.script.unshift(["type",f[h].matches,f[h].mode]);return{startState:function(){var t=e.startState(c);return{token:s,inTag:null,localMode:null,localState:null,htmlState:t}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(c,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?c.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||c}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")})},{"../../lib/codemirror":17,"../css/css":18,"../javascript/javascript":20,"../xml/xml":21}],20:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function i(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function o(e,t,r){return Ce=e,Se=r,t}function a(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=l(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==n&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return o(n);if("="==n&&e.eat(">"))return o("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==n)return e.eat("*")?(r.tokenize=s,s(e,r)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,r,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(We),o("operator","operator",e.current()));if("`"==n)return r.tokenize=c,c(e,r);if("#"==n)return e.skipToEnd(),o("error","error");if(We.test(n))return e.eatWhile(We),o("operator","operator",e.current());if(Ne.test(n)){e.eatWhile(Ne);var a=e.current(),u=Oe.propertyIsEnumerable(a)&&Oe[a];return u&&"."!=r.lastType?o(u.type,u.style,a):o("variable","variable",a)}}function l(e){return function(t,r){var n,i=!1;if(Me&&"@"==t.peek()&&t.match(Ee))return r.tokenize=a,o("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||i);)i=!i&&"\\"==n;return i||(r.tokenize=a),o("string","string")}}function s(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=a;break}n="*"==r}return o("comment","comment")}function c(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=a;break}n=!n&&"\\"==r}return o("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(Ae){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var i=0,o=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),s=ze.indexOf(l);if(s>=0&&s<3){if(!i){++a;break}if(0==--i){"("==l&&(o=!0);break}}else if(s>=3&&s<6)++i;else if(Ne.test(l))o=!0;else{if(/["'\/]/.test(l))return;if(o&&!i){++a;break}}}o&&!i&&(t.fatArrowAt=a)}}function d(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function f(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function h(e,t,r,n,i){var o=e.cc;for(De.state=e,De.stream=i,De.marked=null,De.cc=o,De.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():_e?C:k;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return De.marked?De.marked:"variable"==r&&f(e,n)?"variable-2":t}}}function p(){for(var e=arguments.length-1;e>=0;e--)De.cc.push(arguments[e])}function g(){return p.apply(null,arguments),!0}function m(e){
|
8 |
+
function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=De.state;if(De.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function v(){De.state.context={prev:De.state.context,vars:De.state.localVars},De.state.localVars=He}function y(){De.state.localVars=De.state.context.vars,De.state.context=De.state.context.prev}function b(e,t){var r=function(){var r=De.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var i=r.lexical;i&&")"==i.type&&i.align;i=i.prev)n=i.indented;r.lexical=new d(n,De.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function w(){var e=De.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function x(e){function t(r){return r==e?g():";"==e?p():g(t)}return t}function k(e,t){return"var"==e?g(b("vardef",t.length),Q,x(";"),w):"keyword a"==e?g(b("form"),T,k,w):"keyword b"==e?g(b("form"),k,w):"{"==e?g(b("}"),U,w):";"==e?g():"if"==e?("else"==De.state.lexical.info&&De.state.cc[De.state.cc.length-1]==w&&De.state.cc.pop()(),g(b("form"),T,k,w,ne)):"function"==e?g(ce):"for"==e?g(b("form"),ie,k,w):"variable"==e?g(b("stat"),I):"switch"==e?g(b("form"),T,b("}","switch"),x("{"),U,w,w):"case"==e?g(C,x(":")):"default"==e?g(x(":")):"catch"==e?g(b("form"),v,x("("),ue,x(")"),k,w,y):"class"==e?g(b("form"),fe,w):"export"==e?g(b("stat"),me,w):"import"==e?g(b("stat"),ve,w):"module"==e?g(b("form"),J,b("}"),x("{"),U,w,w):"type"==e?g(V,x("operator"),V,x(";")):"async"==e?g(k):p(b("stat"),C,x(";"),w)}function C(e){return L(e,!1)}function S(e){return L(e,!0)}function T(e){return"("!=e?p():g(b(")"),C,x(")"),w)}function L(e,t){if(De.state.fatArrowAt==De.stream.start){var r=t?z:E;if("("==e)return g(v,b(")"),q(J,")"),w,x("=>"),r,y);if("variable"==e)return p(v,J,x("=>"),r,y)}var n=t?N:A;return Pe.hasOwnProperty(e)?g(n):"function"==e?g(ce,n):"class"==e?g(b("form"),de,w):"keyword c"==e||"async"==e?g(t?_:M):"("==e?g(b(")"),M,x(")"),w,n):"operator"==e||"spread"==e?g(t?S:C):"["==e?g(b("]"),xe,w,n):"{"==e?K(j,"}",null,n):"quasi"==e?p(O,n):"new"==e?g(P(t)):g()}function M(e){return e.match(/[;\}\)\],]/)?p():p(C)}function _(e){return e.match(/[;\}\)\],]/)?p():p(S)}function A(e,t){return","==e?g(C):N(e,t,!1)}function N(e,t,r){var n=0==r?A:N,i=0==r?C:S;return"=>"==e?g(v,r?z:E,y):"operator"==e?/\+\+|--/.test(t)?g(n):"?"==t?g(C,x(":"),i):g(i):"quasi"==e?p(O,n):";"!=e?"("==e?K(S,")","call",n):"."==e?g(F,n):"["==e?g(b("]"),M,x("]"),w,n):void 0:void 0}function O(e,t){return"quasi"!=e?p():"${"!=t.slice(t.length-2)?g(O):g(C,W)}function W(e){if("}"==e)return De.marked="string-2",De.state.tokenize=c,g(O)}function E(e){return u(De.stream,De.state),p("{"==e?k:C)}function z(e){return u(De.stream,De.state),p("{"==e?k:S)}function P(e){return function(t){return"."==t?g(e?H:D):p(e?S:C)}}function D(e,t){if("target"==t)return De.marked="keyword",g(A)}function H(e,t){if("target"==t)return De.marked="keyword",g(N)}function I(e){return":"==e?g(w,k):p(A,x(";"),w)}function F(e){if("variable"==e)return De.marked="property",g()}function j(e,t){return"async"==e?(De.marked="property",g(j)):"variable"==e||"keyword"==De.style?(De.marked="property",g("get"==t||"set"==t?R:B)):"number"==e||"string"==e?(De.marked=Me?"property":De.style+" property",g(B)):"jsonld-keyword"==e?g(B):"modifier"==e?g(j):"["==e?g(C,x("]"),B):"spread"==e?g(C):":"==e?p(B):void 0}function R(e){return"variable"!=e?p(B):(De.marked="property",g(ce))}function B(e){return":"==e?g(S):"("==e?p(ce):void 0}function q(e,t){function r(n,i){if(","==n){var o=De.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),g(function(r,n){return r==t||n==t?p():p(e)},r)}return n==t||i==t?g():g(x(t))}return function(n,i){return n==t||i==t?g():p(e,r)}}function K(e,t,r){for(var n=3;n<arguments.length;n++)De.cc.push(arguments[n]);return g(b(t,r),q(e,t),w)}function U(e){return"}"==e?g():p(k,U)}function G(e,t){if(Ae){if(":"==e)return g(V);if("?"==t)return g(G)}}function V(e){return"variable"==e?(De.marked="variable-3",g(Z)):"{"==e?g(q(Y,"}")):"("==e?g(q(X,")"),$):void 0}function $(e){if("=>"==e)return g(V)}function Y(e){return"variable"==e||"keyword"==De.style?(De.marked="property",g(Y)):":"==e?g(V):void 0}function X(e){return"variable"==e?g(X):":"==e?g(V):void 0}function Z(e,t){return"<"==t?g(q(V,">"),Z):"["==e?g(x("]"),Z):void 0}function Q(){return p(J,G,te,re)}function J(e,t){return"modifier"==e?g(J):"variable"==e?(m(t),g()):"spread"==e?g(J):"["==e?K(J,"]"):"{"==e?K(ee,"}"):void 0}function ee(e,t){return"variable"!=e||De.stream.match(/^\s*:/,!1)?("variable"==e&&(De.marked="property"),"spread"==e?g(J):"}"==e?p():g(x(":"),J,te)):(m(t),g(te))}function te(e,t){if("="==t)return g(S)}function re(e){if(","==e)return g(Q)}function ne(e,t){if("keyword b"==e&&"else"==t)return g(b("form","else"),k,w)}function ie(e){if("("==e)return g(b(")"),oe,x(")"),w)}function oe(e){return"var"==e?g(Q,x(";"),le):";"==e?g(le):"variable"==e?g(ae):p(C,x(";"),le)}function ae(e,t){return"in"==t||"of"==t?(De.marked="keyword",g(C)):g(A,le)}function le(e,t){return";"==e?g(se):"in"==t||"of"==t?(De.marked="keyword",g(C)):p(C,x(";"),se)}function se(e){")"!=e&&g(C)}function ce(e,t){return"*"==t?(De.marked="keyword",g(ce)):"variable"==e?(m(t),g(ce)):"("==e?g(v,b(")"),q(ue,")"),w,G,k,y):void 0}function ue(e){return"spread"==e?g(ue):p(J,G,te)}function de(e,t){return"variable"==e?fe(e,t):he(e,t)}function fe(e,t){if("variable"==e)return m(t),g(he)}function he(e,t){return"extends"==t||"implements"==t?g(Ae?V:C,he):"{"==e?g(b("}"),pe,w):void 0}function pe(e,t){return"variable"==e||"keyword"==De.style?("static"==t||"get"==t||"set"==t||Ae&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&De.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(De.marked="keyword",g(pe)):(De.marked="property",g(Ae?ge:ce,pe)):"*"==t?(De.marked="keyword",g(pe)):";"==e?g(pe):"}"==e?g():void 0}function ge(e,t){return"?"==t?g(ge):":"==e?g(V,te):p(ce)}function me(e,t){return"*"==t?(De.marked="keyword",g(we,x(";"))):"default"==t?(De.marked="keyword",g(C,x(";"))):p(k)}function ve(e){return"string"==e?g():p(ye,we)}function ye(e,t){return"{"==e?K(ye,"}"):("variable"==e&&m(t),"*"==t&&(De.marked="keyword"),g(be))}function be(e,t){if("as"==t)return De.marked="keyword",g(ye)}function we(e,t){if("from"==t)return De.marked="keyword",g(C)}function xe(e){return"]"==e?g():p(q(S,"]"))}function ke(e,t){return"operator"==e.lastType||","==e.lastType||We.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ce,Se,Te=r.indentUnit,Le=n.statementIndent,Me=n.jsonld,_e=n.json||Me,Ae=n.typescript,Ne=n.wordCharacters||/[\w$\xa1-\uffff]/,Oe=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":e("new"),"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),"let":e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n,await:n,async:e("async")};if(Ae){var l={type:"variable",style:"variable-3"},s={"interface":e("class"),"implements":n,namespace:n,module:e("module"),"enum":e("module"),type:e("type"),"public":e("modifier"),"private":e("modifier"),"protected":e("modifier"),"abstract":e("modifier"),as:i,string:l,number:l,"boolean":l,any:l};for(var c in s)a[c]=s[c]}return a}(),We=/[+\-*&%=<>!?|~^]/,Ee=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,ze="([{}])",Pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},De={state:null,column:null,marked:null,cc:null},He={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new d((e||0)-Te,0,"block",(!1)),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=s&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ce?r:(t.lastType="operator"!=Ce||"++"!=Se&&"--"!=Se?Ce:"incdec",h(t,r,Ce,Se,e))},indent:function(t,r){if(t.tokenize==s)return e.Pass;if(t.tokenize!=a)return 0;var i,o=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==w)l=l.prev;else if(u!=ne)break}for(;("stat"==l.type||"form"==l.type)&&("}"==o||(i=t.cc[t.cc.length-1])&&(i==A||i==N)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;Le&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var d=l.type,f=o==d;return"vardef"==d?l.indented+("operator"==t.lastType||","==t.lastType?l.info+1:0):"form"==d&&"{"==o?l.indented:"form"==d?l.indented+Te:"stat"==d?l.indented+(ke(t,r)?Le||Te:0):"switch"!=l.info||f||0==n.doubleIndentSwitch?l.align?l.column+(f?0:1):l.indented+(f?0:Te):l.indented+(/^(?:case|default)\b/.test(r)?Te:2*Te)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:_e?null:"/*",blockCommentEnd:_e?null:"*/",lineComment:_e?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:_e?"json":"javascript",jsonldMode:Me,jsonMode:_e,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=C&&t!=S||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},{"../../lib/codemirror":17}],21:[function(e,r,n){!function(i){"object"==typeof n&&"object"==typeof r?i(e("../../lib/codemirror")):"function"==typeof t&&t.amd?t(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(n,i){function o(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(s("atom","]]>")):null:e.match("--")?r(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(L=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==n){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=o,L=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return L="equals",null;if("<"==r){t.tokenize=o,t.state=h,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=l(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=o;break}r.next()}return e}}function c(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=c(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=o;break}return r.tokenize=c(e-1),r.tokenize(t,r)}}return"meta"}}function u(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;d(e)}}function h(e,t,r){return"openTag"==e?(r.tagStart=t.column(),p):"closeTag"==e?g:h}function p(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",y):(M="error",p)}function g(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&d(r),r.context&&r.context.tagName==n||C.matchClosing===!1?(M="tag",m):(M="tag error",v)}return M="error",v}function m(e,t,r){return"endTag"!=e?(M="error",m):(d(r),h)}function v(e,t,r){return M="error",m(e,t,r)}function y(e,t,r){if("word"==e)return M="attribute",b;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?f(r,n):(f(r,n),r.context=new u(r,n,i==r.indented)),h}return M="error",y}function b(e,t,r){return"equals"==e?w:(C.allowMissing||(M="error"),y(e,t,r))}function w(e,t,r){return"string"==e?x:"word"==e&&C.allowUnquoted?(M="string",y):(M="error",y(e,t,r))}function x(e,t,r){return"string"==e?x:y(e,t,r)}var k=n.indentUnit,C={},S=i.htmlMode?t:r;for(var T in S)C[T]=S[T];for(var T in i)C[T]=i[T];var L,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:h,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;L=null;var r=t.tokenize(e,t);return(r||L)&&"comment"!=r&&(M=null,t.state=t.state(L||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return C.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!C.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=C.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":17}]},{},[11])}();
|
9 |
//# sourceMappingURL=forms-admin.min.js.map
|
assets/js/forms-admin.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["forms-admin.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","rows","m","i18n","label","config","fieldLabel","type","value","onchange","withAttr","placeholder","title","style","optional","valueHelp","numberMinMax","min","max","isRequired","desc","inputAtts","checked","required","forceRequired","disabled","isFieldRequired","placeholderHelp","useParagraphs","wrap","wrapInParagraphTags","choiceType","options","selected","dropdown","radioButtons","acceptsMultipleValues","push","checkboxes","choices","html","map","choice","index","data-id","name","selectChoice","bind","preselect","remove","class","onclick","key","this","splice","2","forms","render","text","visibleRows","hidden","submit","number","./field-forms-rows.js","3","html_beautify","g","generate","field","htmlTemplate","generators","select","attributes","hasSelection","unshift","checkbox","radio","../third-party/beautify-html.js","../third-party/render.js","4","FieldHelper","tabs","editor","fields","setActiveField","fieldConfig","get","c","join","redraw","controller","createFieldHTMLAndAddToForm","insert","view","fieldCategories","getCategories","availableFields","getAll","fieldsChoice","chooseField","category","categoryFields","filter","className","inForm","inFormContent","form","overlay","help","trust","onkeydown","window","event","keyCode","addToForm","on","./field-forms.js","./field-generator.js","./overlay.js","5","FieldFactory","reset","registeredFields","forEach","deregister","register","data","sticky","getFieldType","phone","birthday","registerMergeField","mergeField","listFields","fieldType","field_type","tag","streetAddress","city","state","zip","country","mc4wp_vars","countries","registerInterestCategory","interestCategory","interestCategories","id","interests","registerListFields","list","merge_fields","sort","b","interest_categories","registerListsFields","lists","registerCustomFields","formFields","subscribe","submitButton","listChoice","listChoiceDescription","unsubscribe","formAction","formActionDescription","6","events","createChoices","choiceLabel","FieldChoice","Object","keys","existingField","getAllWhere","shift","categories","indexOf","Field","timeout","clearTimeout","setTimeout","trigger","searchKey","searchValue","prop","7","CodeMirror","FormEditor","element","dom","domDirty","_dom","innerHTML","getValue","toLowerCase","document","createElement","fromTextArea","selectionPointer","matchTags","bothTags","mode","htmlMode","autoCloseTags","autoRefresh","dispatchEvent","Event","bubbles","addEventListener","signal","query","querySelectorAll","containsField","fieldName","elements","namedItem","replaceSelection","focus","callback","refresh","codemirror","codemirror/addon/edit/closetag.js","codemirror/addon/edit/matchtags","codemirror/addon/fold/xml-fold","codemirror/mode/css/css","codemirror/mode/htmlmixed/htmlmixed","codemirror/mode/javascript/javascript","codemirror/mode/xml/xml","8","FormWatcher","settings","helpers","updateFields","findRequiredFields","requiredFields","toUpperCase","requiredFieldElements","Array","prototype","el","replace","requiredFieldsInput","getElementById","debounce","9","show","txt","notices","hide","container","querySelector","heading","parentNode","insertBefore","nextSibling","init","formCode","10","close","removeEventListener","onKeyDown","position","_onCloseCallback","preventDefault","_element","windowWidth","innerWidth","documentElement","clientWidth","body","windowHeight","innerHeight","clientHeight","marginLeft","marginTop","left","top","content","onCloseCallback","11","mc4wp_forms_i18n","mc4wp","deps","mithril","FieldsFactory","textareaElement","formEditor","fieldHelper","mount","fieldsFactory","getSelectedLists","mailchimp","./admin/field-helper.js","./admin/fields-factory.js","./admin/fields.js","./admin/form-editor.js","./admin/form-watcher.js","./admin/notices","12","trim","ltrim","style_html","html_source","js_beautify","css_beautify","Parser","pos","token","current_mode","tags","parent","parentcount","parent1","tag_type","token_text","last_token","last_text","token_type","newlines","indent_content","indent_inner_html","Utils","whitespace","split","single_token","extra_liners","in_array","what","arr","traverse_whitespace","input_char","input","charAt","preserve_newlines","max_preserve_newlines","get_content","space","indent_handlebars","peek3","substr","get_tag","line_char_count","wrap_line_length","print_newline","print_indentation","get_contents_to","reg_match","RegExp","lastIndex","reg_array","exec","end_script","substring","record_tag","indent_level","retrieve_tag","temp_parent","indent_to_tag","peek","tag_start","tag_end","tag_start_char","comment","orig_pos","orig_line_char_count","get_unformatted","get_comment","tag_index","tag_offset","tag_complete","tag_check","is_unformatted","unformatted","output","start_pos","delimiter","matched","orig_tag","min_index","get_token","tag_name_type","get_full_indent","level","indent_string","next_tag","match","printer","js_source","indent_character","indent_size","brace_style","force","print_token","print_token_raw","slice","indent","unindent","multi_parser","parseInt","max_char","indent_char","tag_name","tag_extracted_from_last_output","_beautifier","script_indent_level","indent_scripts","indentation","white","_level","reindent","13","isArray","thing","toString","camelToDash","str","removeEmpties","escapeHtml","replaceDoubleQuote","createAttrString","attrs","styles","property","createChildrenContent","children","scope","result","onunload","$trusted","VOID_TAGS","14","mod","amd","autoCloseGT","cm","getOption","Pass","ranges","listSelections","replacements","empty","head","tok","getTokenAt","inner","innerMode","getMode","tagName","opt","configuration","dontCloseTags","htmlDontClose","indentTags","htmlIndent","end","ch","lowerTagName","test","string","closingTagExists","newPos","Pos","line","info","replaceRange","anchor","sel","setSelections","indentLine","autoCloseCurrent","typingSlash","start","replacement","context","getLine","replaceSelections","autoCloseSlash","collection","elt","newTag","scanForClosingTag","Math","lastLine","nextClose","cx","onCx","prev","to","next","defineOption","val","old","Init","removeKeyMap","whenClosing","whenOpening","addKeyMap","commands","closeTag","../../lib/codemirror","../fold/xml-fold","15","clear","tagHit","tagOther","doMatchTags","failedTagMatch","operation","somethingSelected","cur","getCursor","range","getViewport","from","findMatchingTag","matchBothTags","hit","at","open","markText","other","maybeUpdateMatch","off","toMatchingTag","found","extendSelection","16","cmp","Iter","firstLine","tagAt","iter","getTokenTypeAt","nextLine","prevLine","toTagEnd","gt","lastSlash","lastIndexOf","selfClose","toTagStart","lt","xmlTagStart","toNextTag","toPrevTag","findMatchingClose","stack","startLine","startCh","findMatchingOpen","endLine","endCh","nameStartChar","nameChar","registerHelper","openTag","startPos","endPos","here","findEnclosingTag","forward","17","global","factory","classTest","cls","removeChildren","count","childNodes","removeChild","firstChild","removeChildrenAndAdd","appendChild","cssText","createTextNode","contains","child","nodeType","host","addClass","node","current","joinClasses","as","args","arguments","apply","copyObj","obj","target","overwrite","hasOwnProperty","countColumn","tabSize","startIndex","startValue","search","nextTab","Delayed","array","findColumn","goal","col","skipped","spaceStr","spaceStrs","lst","out","insertSorted","score","priority","nothing","createObj","base","props","inst","create","isWordCharBasic","nonASCIISingleCaseWordChar","isWordChar","helper","source","isEmpty","isExtendingChar","charCodeAt","extendingChars","Display","place","doc","d","scrollbarFiller","setAttribute","gutterFiller","lineDiv","selectionDiv","cursorDiv","measure","lineMeasure","lineSpace","mover","sizer","sizerWidth","heightForcer","scrollerGap","gutters","lineGutter","scroller","wrapper","ie","ie_version","zIndex","paddingRight","webkit","gecko","mobile","draggable","viewFrom","viewTo","first","reportedViewFrom","reportedViewTo","renderedView","externalMeasured","viewOffset","lastWrapHeight","lastWrapWidth","updateLineNumbers","nativeBarWidth","barHeight","barWidth","scrollbarsClipped","lineNumWidth","lineNumInnerWidth","lineNumChars","alignWidgets","cachedCharWidth","cachedTextHeight","cachedPaddingH","maxLine","maxLineLength","maxLineChanged","wheelDX","wheelDY","wheelStartX","wheelStartY","selForContextMenu","activeTouch","size","chunk","lines","sz","chunkSize","getBetween","getLines","updateLineHeight","height","diff","lineNo","no","lineAtHeight","h","outer","i$1","lh","isLine","lineNumberFor","String","lineNumberFormatter","firstLineNumber","copyPos","x","maxPos","minPos","clipLine","clipPos","last","clipToLen","linelen","clipPosArray","seeReadOnlySpans","sawReadOnlySpans","seeCollapsedSpans","sawCollapsedSpans","MarkedSpan","marker","getMarkedSpanFor","spans","span","removeMarkedSpan","addMarkedSpan","markedSpans","concat","attachLine","markedSpansBefore","isInsert","nw","startsBefore","inclusiveLeft","insertLeft","endsAfter","inclusiveRight","markedSpansAfter","stretchSpansOverChange","change","full","oldFirst","oldLast","sameLine","offset","span$1","found$1","clearEmptySpans","newMarkers","gapMarkers","gap","i$2","i$3","clearWhenEmpty","removeReadOnlyRanges","markers","mark","readOnly","parts","mk","find","j","p","newParts","dfrom","dto","detachMarkedSpans","detachLine","attachMarkedSpans","extraLeft","extraRight","compareCollapsedMarkers","lenDiff","aPos","bPos","fromCmp","toCmp","collapsedSpanAtSide","sps","sp","collapsed","collapsedSpanAtStart","collapsedSpanAtEnd","conflictingCollapsedRange","visualLine","merged","visualLineContinued","visualLineNo","lineN","vis","visualLineEndNo","lineIsHidden","widgetNode","lineIsHiddenInner","heightAtLine","lineObj","lineLength","len","findMaxLine","display","iterateBidiSections","order","part","bidiLeft","bidiRight","lineLeft","getOrder","lineRight","compareBidiLevel","linedir","getBidiPartAt","bidiOther","moveInLine","dir","byUnit","moveVisually","bidi","moveLogically","bidiOrdering","getHandlers","emitter","copy","_handlers","noHandlers","detachEvent","handlers","signalDOMEvent","override","defaultPrevented","e_defaultPrevented","codemirrorIgnore","signalCursorActivity","cursorActivity","set","curOp","cursorActivityHandlers","hasHandler","eventMixin","ctor","e_preventDefault","returnValue","e_stopPropagation","stopPropagation","cancelBubble","e_stop","e_target","srcElement","e_button","which","button","mac","ctrlKey","zeroWidthElement","zwspSupported","offsetHeight","offsetWidth","hasBadBidiRects","badBidiRects","r0","getBoundingClientRect","r1","right","hasBadZoomedRects","badZoomedRects","normal","fromRange","abs","defineMode","dependencies","modes","defineMIME","mime","spec","mimeModes","resolveMode","mfactory","modeObj","modeExtensions","exts","helperType","modeProps","prop$1","extendMode","properties","copyState","nstate","startState","a1","a2","highlightLine","forceToEnd","st","modeGen","lineClasses","runMode","loop","overlays","i_end","opaque","classes","bgClass","textClass","getLineStyles","updateFrontier","getStateBefore","maxHighlightLength","stateAfter","styleClasses","frontier","precise","findStartLine","processLine","save","startAt","stream","StringStream","callBlankLine","eol","readToken","blankLine","takeToken","asArray","getObj","tokens","extractLineClasses","lineClass","flattenSpans","curStart","curStyle","addModeClass","mName","minindent","minline","lim","indented","Line","estimateHeight","updateLine","estHeight","cleanUpLine","interpretTokenStyle","cache","styleToClassCacheWithMode","styleToClassCache","buildLineContent","lineView","builder","pre","trailingSpace","splitSpaces","rest","addToken","buildToken","buildTokenBadBidi","allowFrontierUpdate","insertLineContent","maps","caches","lastChild","defaultSpecialCharPlaceholder","startStyle","endStyle","css","displayText","special","specialChars","mustWrap","createDocumentFragment","txt$1","tabWidth","specialCharPlaceholder","fullStyle","trailingBefore","spaceBefore","buildCollapsedSpan","ignoreWidget","widget","needsContentAttribute","setUneditable","allText","spanStyle","spanEndStyle","spanStartStyle","nextChange","Infinity","foundBookmarks","endStyles","j$1","j$2","upto","tokenText","LineView","buildViewArray","nextPos","pushOperation","op","operationGroup","ops","ownsGroup","delayedCallbacks","fireCallbacksForOps","group","callbacks","cursorActivityCalled","finishOperation","endCb","signalLater","orphanDelayedCallbacks","fireOrphanDelayed","delayed","updateLineForChanges","dims","changes","updateLineText","updateLineGutter","updateLineClasses","updateLineWidgets","ensureLineWrapped","replaceChild","updateLineBackground","background","getLineContent","ext","built","wrapClass","gutter","gutterBackground","gutterClass","fixedGutter","fixedPos","gutterTotalWidth","gutterMarkers","lineNumbers","wrap$1","gutterWrap","lineNumber","gutterLeft","k","gutterWidth","alignable","insertLineWidgets","buildLineElement","insertLineWidgetsFor","allowAbove","widgets","ws","handleMouseEvents","positionLineWidget","above","noHScroll","width","wrapperWidth","coverGutter","paddingLeft","widgetHeight","parentStyle","eventInWidget","getAttribute","paddingTop","offsetTop","paddingVert","paddingH","getComputedStyle","currentStyle","isNaN","scrollGap","displayWidth","displayHeight","ensureLineHeights","rect","wrapping","lineWrapping","curWidth","heights","rects","getClientRects","bottom","mapFromLineView","before","updateExternalMeasurement","measureChar","bias","measureCharPrepared","prepareMeasureForLine","findViewForLine","findViewIndex","getDimensions","forceUpdate","hasHeights","prepared","varHeight","measureCharInner","bogus","rtop","rbottom","nodeAndOffsetInLineMap","collapse","mStart","mEnd","coverStart","coverEnd","getUsefulRect","nullRect","maybeUpdateRectForZooming","rSpan","charWidth","rbot","mid","bot","singleCursorHeightPerLine","screen","logicalXDPI","deviceXDPI","scaleX","scaleY","logicalYDPI","deviceYDPI","clearLineMeasurementCacheFor","clearLineMeasurementCache","externalMeasure","clearCaches","pageScrollX","pageXOffset","scrollLeft","pageScrollY","pageYOffset","scrollTop","intoCoordSystem","yOff","lOff","xOff","fromCoordSystem","coords","localBox","lineSpaceBox","charCoords","cursorCoords","preparedMeasure","getBidi","partPos","estimateCoords","PosWithInfo","outside","xRel","coordsChar","y","coordsCharInner","mergedPos","getX","wrongLine","innerOff","adjust","dist","fromX","fromOutside","toX","toOutside","xDiff","charSize","step","ceil","middle","middleX","textHeight","measureText","clientLeft","offsetLeft","compensateForHScroll","th","perLine","widgetsHeight","estimateLineHeights","est","posFromMouse","liberal","forRect","clientX","clientY","colDiff","round","updateSelection","showSelection","prepareSelection","primary","curFragment","cursors","selFragment","selection","primIndex","showCursorWhenSelecting","drawSelectionCursor","drawSelectionRange","cursor","cursorHeight","otherCursor","add","fragment","rightSide","drawForLine","fromArg","toArg","lineLen","rightPos","leftPos","tmp","leftSide","padding","sFrom","sTo","fromLine","toLine","singleVLine","leftEnd","rightStart","restartBlink","focused","clearInterval","blinker","visibility","cursorBlinkRate","setInterval","ensureFocus","onFocus","delayBlurEvent","delayingBlurEvent","onBlur","receivedFocus","rmClass","alignHorizontally","comp","gutterW","align","maybeUpdateLineNumberWidth","innerW","updateGutterSpace","updateHeightsInViewport","prevBottom","box","updateWidgetHeight","visibleLines","viewport","floor","ensure","ensureFrom","ensureTo","setScrollTop","updateDisplaySimple","scrollbars","startWorker","setScrollLeft","isScroller","scrollWidth","wheelEventDelta","dx","wheelDeltaX","dy","wheelDeltaY","detail","axis","HORIZONTAL_AXIS","VERTICAL_AXIS","wheelDelta","wheelEventPixels","delta","wheelPixelsPerUnit","onScrollWheel","scroll","canScrollX","canScrollY","scrollHeight","currentWheelTarget","presto","pixels","wheelSamples","movedX","movedY","sample","measureForScrollbars","docH","viewHeight","viewWidth","barLeft","docHeight","NativeScrollbars","vert","horiz","checkedZeroWidth","minHeight","minWidth","NullScrollbars","updateScrollbars","startWidth","startHeight","updateScrollbarsInner","sizes","update","paddingBottom","borderBottom","coverGutterNextToScrollbar","initScrollbars","scrollbarModel","scrollbarStyle","maybeScrollWindow","doScroll","phantom","scrollNode","scrollIntoView","scrollPosIntoView","margin","limit","changed","endCoords","scrollPos","calculateScrollPos","startTop","startLeft","x1","y1","x2","y2","snapMargin","screentop","docBottom","atTop","atBottom","newTop","screenleft","screenw","tooWide","addToScrollPos","resolveScrollToPos","ensureCursorVisible","scrollToPos","cursorScrollMargin","isCursor","sPos","scrollTo","startOperation","viewChanged","updateInput","typing","changeObjs","selectionChanged","updateMaxLine","nextOpId","endOperation","endOperations","endOperation_R1","endOperation_W1","endOperation_R2","endOperation_W2","i$4","endOperation_finish","maybeClipScrollbars","mustUpdate","DisplayUpdate","updatedDisplay","updateDisplayIfNeeded","barMeasure","adjustWidthTo","maxScrollLeft","preparedSelection","takeFocus","activeElt","hasFocus","setDocumentHeight","postUpdateDisplay","forceScroll","maybeHiddenMarkers","unhidden","maybeUnhiddenMarkers","finish","runInOp","methodOp","docMethodOp","regChange","lendiff","resetView","cut","viewCuttingPoint","cut$1","cutTop","cutBot","regLineChange","oldN","newN","adjustView","countDirtyView","dirty","time","highlight","highlightWorker","Date","workTime","changedLines","oldStyles","tooLong","highlighted","oldCls","newCls","ischange","workDelay","visible","editorIsHidden","wrapperHeight","oldDisplayWidth","marginBottom","borderRightWidth","viewportMargin","different","toUpdate","patchDisplay","updateNumbersFrom","rm","updateNumber","updateGutters","specs","gElt","setGuttersForLineNumbers","Selection","Range","normalizeSelection","prim","inv","simpleSelection","changeEnd","adjustForChange","computeSelAfterChange","offsetPos","computeReplacedSel","hint","oldPrev","newPrev","loadMode","modeOption","resetModeState","isWholeLineUpdate","wholeLineUpdateBefore","updateDoc","spansFor","linesFor","lastText","lastSpans","nlines","added","added$1","added$2","linkedDocs","sharedHistOnly","propagate","skip","sharedHist","linked","rel","shared","attachDoc","History","startGen","done","undone","undoDepth","lastModTime","lastSelTime","lastOp","lastSelOp","lastOrigin","lastSelOrigin","generation","maxGeneration","historyChangeFromChange","histChange","attachLocalSpans","clearSelectionEvents","pop","lastChangeEvent","hist","addChangeToHistory","selAfter","opId","history","origin","historyEventDelay","pushSelectionToHistory","selectionEventCanBeMerged","addSelectionToHistory","clearRedo","dest","equals","existing","removeClearedSpans","explicitlyCleared","getOldSpans","mergeOldSpans","stretched","oldCur","stretchCur","copyHistoryArray","newGroup","instantiateSel","deepCopy","newChanges","Number","extendRange","extend","posBefore","setSelection","extendSelections","heads","newSel","replaceOneSelection","setSimpleSelection","filterSelectionChange","this$1","setSelectionReplaceHistory","setSelectionNoUndo","NaN","setSelectionInner","skipAtomicInSelection","reCheckSelection","sel_dontScroll","mayClear","newAnchor","skipAtomic","newHead","skipAtomicInner","oldPos","atomic","near","movePos","far","cantEdit","selectAll","filterChange","canceled","cancel","makeChange","ignoreReadOnly","suppressEdits","makeChangeInner","makeChangeSingleDoc","rebased","rebaseHist","makeChangeFromHistory","allowSelectionOnly","antiChanges","after","returned","v","shiftDoc","distance","removed","makeChangeSingleDocInEditor","recomputeMaxLength","checkWidthStart","changesHandler","changeHandler","splitLines","rebaseHistSelSingle","rebaseHistArray","sub","ok","copied","changeLine","handle","changeType","LeafChunk","BranchChunk","LineWidget","adjustScrollWhenAboveVisible","addLineWidget","insertAt","aboveVisible","TextMarker","nextMarkerId","markTextShared","replacedWith","addToHistory","curLine","clearOnEnter","clearHistory","SharedTextMarker","cloneNode","isParent","findSharedMarkers","findMarks","copySharedMarkers","mFrom","mTo","subMark","detachSharedMarkers","subMarker","onDrop","clearDragCursor","lastDrop","files","dataTransfer","isReadOnly","FileReader","File","read","loadFile","file","allowDropFileTypes","reader","onload","lineSeparator","readAsText","draggingText","text$1","getData","onDragStart","setData","getSelection","effectAllowed","setDragImage","safari","img","src","_top","onDragOver","frag","dragCursor","forEachCodeMirror","getElementsByClassName","byClass","ensureGlobalHandlers","globalsRegistered","registerGlobalHandlers","resizeTimer","onResize","setSize","normalizeKeyName","alt","ctrl","cmd","normalizeKeyMap","keymap","keyname","lookupKey","getKeyMap","fallthrough","isModifierKey","keyNames","keyName","noShift","altGraphKey","altKey","flipCtrlCmd","metaKey","shiftKey","keyMap","deleteNearSelection","compute","kill","toKill","replaced","lineStart","visual","lineEnd","lineStartSmart","firstNonWS","inWS","doHandleBinding","bound","dropShift","ensurePolled","prevShift","lookupKeyForEditor","keyMaps","extraKeys","dispatchKey","seq","keySeq","stopSeq","handleKeyBinding","motion","handleCharBinding","handled","lastStoppedKey","hasCopyEvent","showCrossHair","up","onKeyUp","onKeyPress","charCode","fromCharCode","onMouseDown","supportsTouch","clickInGutter","selectingText","leftButtonDown","lastMiddleDown","captureRightClick","onContextMenu","now","lastDoubleClick","lastClick","contained","modifier","dragDrop","dragAndDrop","leftButtonStartDrag","leftButtonSelect","startTime","dragEnd","e2","addNew","extendTo","lastPos","startCol","posCol","startSel","ourIndex","oldRange","ourRange","findWordAt","ranges$1","sel_mouse","curCount","counter","editorSize","move","chromeOS","word","gutterEvent","prevent","mX","mY","lineBox","contextMenuInGutter","themeChanged","theme","defineOptions","option","deflt","notOnInit","defaults","optionHandlers","setValue","lineSep","newBreaks","getInputField","spellcheck","windows","guttersChanged","detach","attach","wrappingChanged","integer","blur","readOnlyChanged","dragDropChanged","resetPosition","getField","tabIndex","wasOn","funcs","dragFunctions","toggle","enter","over","leave","drop","Doc","inputStyles","inputStyle","autofocus","pasteIncoming","cutIncoming","registerEventHandlers","finishInit","initHooks","textRendering","finishTouch","touchFinished","prevTouch","isMouseLikeTouchEvent","touches","touch","radiusX","radiusY","farAway","moved","pageX","pageY","inp","how","aggressive","curSpace","curSpaceString","indentUnit","indentString","indentWithTabs","pos$1","setLastCopied","newLastCopied","lastCopied","applyTextInput","inserted","deleted","paste","textLines","splitLinesAuto","multiPaste","lineWise","changeEvent","triggerElectric","handlePaste","pasted","clipboardData","disableInput","electricChars","smartIndent","getModeAt","electricInput","copyableRanges","lineRange","getRange","disableBrowserMagic","hiddenTextarea","te","div","ios","border","addEditorMethods","constructor","setOption","getDoc","addOverlay","modeSpec","removeOverlay","indentSelection","newRanges","getLineTokens","getHelper","getHelpers","_global","pred","getStateAfter","defaultTextHeight","defaultCharWidth","setGutterMarker","gutterID","clearGutter","lineInfo","addWidget","vspace","hspace","triggerOnKeyDown","triggerOnKeyPress","triggerOnKeyUp","execCommand","findPosH","amount","unit","visually","hitSide","moveH","extendSelectionsBy","rtlMoveVisually","sel_move","deleteH","findPosV","goalColumn","moveV","goals","headPos","startChar","check","toggleOverwrite","getScrollInfo","interpret","oldHeight","swapDoc","getWrapperElement","getScrollerElement","getGutterElement","registerGlobalHelper","predicate","findNextLine","moveOnce","boundToLine","origDir","sawType","pageSize","moveAmount","ContentEditableInput","lastAnchorNode","lastAnchorOffset","lastFocusNode","lastFocusOffset","polling","gracePeriod","posToDOM","side","badPos","bad","domTextBetween","recognizeMarker","walk","cmText","textContent","markerID","nodeName","closing","nodeValue","domToPos","lineNode","locateNodeInLineView","textNode","topNode","curNode","previousSibling","dist$1","TextareaInput","prevInput","pollingFast","inaccurateSelection","composing","textarea","tabindex","realSubmit","leaveSubmitMethodAlone","wrappedSubmit","getTextArea","toTextArea","addLegacyProps","cmpPos","userAgent","navigator","platform","ie_upto10","ie_11up","documentMode","qtwebkit","chrome","vendor","mac_geMountainLion","presto_version","createRange","endNode","setEnd","setStart","createTextRange","moveToElementText","moveEnd","moveStart","activeElement","root","selectInput","selectionStart","selectionEnd","_e","ms","charType","lowTypes","arabicTypes","BidiSpan","bidiRE","isNeutral","isStrong","countsAsLeft","countsAsNum","outerType","types","type$1","prev$1","type$2","type$3","i$5","cur$1","type$4","i$6","end$1","replace$1","i$7","nstart","attachEvent","nl","rt","ownerDocument","parentElement","compareEndPoints","oncopy","lastColumnPos","lastColumnValue","sol","eat","eatWhile","eatSpace","skipToEnd","skipTo","backUp","column","pattern","consume","caseInsensitive","cased","hideFirstChars","needsH","needsV","sWidth","totalHeight","totalWidth","zeroWidthHack","disableHoriz","enableZeroWidthBar","disableVert","w","pointerEvents","bar","delay","maybeDisable","elementFromPoint","native","null","there","removeInner","insertInner","iterN","remaining","leaf","maybeSpill","me","spilled","sibling","myIndex","used","oldH","withOp","dHeight","nextDocId","cleanGeneration","getLineHandle","getLineNumber","getLineHandleVisualStart","lineCount","setCursor","addSelection","getSelections","dup","undo","redo","undoSelection","redoSelection","setExtending","getExtending","historySize","markClean","changeGeneration","forceSplit","isClean","gen","getHistory","setHistory","histData","addLineClass","where","removeLineClass","removeLineWidget","setBookmark","realOpts","findMarksAt","getAllMarks","posFromIndex","sepSize","indexFromPos","copyHistory","linkedDoc","unlinkDoc","link","splitIds","iterLinkedDocs","getEditor","eachLine","18","19","20","27","32","33","34","35","36","37","38","39","40","44","45","46","59","61","91","92","93","106","107","109","110","111","127","173","186","187","188","189","190","191","192","219","220","221","222","63232","63233","63234","63235","63272","63273","63275","63276","63277","63302","basic","Left","Right","Up","Down","End","Home","PageUp","PageDown","Delete","Backspace","Shift-Backspace","Tab","Shift-Tab","Enter","Insert","Esc","pcDefault","Ctrl-A","Ctrl-D","Ctrl-Z","Shift-Ctrl-Z","Ctrl-Y","Ctrl-Home","Ctrl-End","Ctrl-Up","Ctrl-Down","Ctrl-Left","Ctrl-Right","Alt-Left","Alt-Right","Ctrl-Backspace","Ctrl-Delete","Ctrl-S","Ctrl-F","Ctrl-G","Shift-Ctrl-G","Shift-Ctrl-F","Shift-Ctrl-R","Ctrl-[","Ctrl-]","Ctrl-U","Shift-Ctrl-U","Alt-U","emacsy","Ctrl-B","Ctrl-P","Ctrl-N","Alt-F","Alt-B","Ctrl-E","Ctrl-V","Shift-Ctrl-V","Ctrl-H","Alt-D","Alt-Backspace","Ctrl-K","Ctrl-T","Ctrl-O","macDefault","Cmd-A","Cmd-D","Cmd-Z","Shift-Cmd-Z","Cmd-Y","Cmd-Home","Cmd-Up","Cmd-End","Cmd-Down","Cmd-Left","Cmd-Right","Ctrl-Alt-Backspace","Alt-Delete","Cmd-S","Cmd-F","Cmd-G","Shift-Cmd-G","Cmd-Alt-F","Shift-Cmd-Alt-F","Cmd-[","Cmd-]","Cmd-Backspace","Cmd-Delete","Cmd-U","Shift-Cmd-U","singleSelection","killLine","deleteLine","delLineLeft","delWrappedLineLeft","delWrappedLineRight","goDocStart","goDocEnd","goLineStart","goLineStartSmart","goLineEnd","goLineRight","goLineLeft","goLineLeftSmart","goLineUp","goLineDown","goPageUp","goPageDown","goCharLeft","goCharRight","goColumnLeft","goColumnRight","goWordLeft","goGroupRight","goGroupLeft","goWordRight","delCharBefore","delCharAfter","delWordBefore","delWordAfter","delGroupBefore","delGroupAfter","indentAuto","indentMore","indentLess","insertTab","insertSoftTab","spaces","defaultTab","transposeChars","newlineAndIndent","sels","openLine","defineInitHook","onCopyCut","lineWiseCopyCut","clearData","kludge","hadFocus","showPrimarySelection","pollContent","startData","ours","applyComposition","forceCompositionEnd","showMultipleSelections","curAnchor","anchorNode","anchorOffset","curFocus","focusNode","focusOffset","rangeCount","getRangeAt","rng","removeAllRanges","addRange","startGracePeriod","rememberSelection","selectionInEditor","commonAncestorContainer","poll","pollSelection","pollInterval","fromIndex","fromNode","toNode","toIndex","newText","oldText","cutFront","cutEnd","oldTop","maxCutFront","newBot","oldBot","maxCutEnd","chFrom","chTo","contentEditable","prepareCopyCut","fastPoll","moveInputWithCursor","wrapOff","lineOff","teTop","teLeft","drawn","contextMenuPending","minimal","slowPoll","missed","same","prepareSelectAllHack","extval","rehide","oldWrapperCSS","oldCSS","detectingSelectAll","resetSelectionOnContextMenu","wrapperBox","oldScrollY","scrollY","mouseup","dontDelegate","method","contenteditable","defineExtension","func","defineDocExtension","version","keySet","tokenCComment","maybeEnd","tokenize","parserConfig","ret","tp","tokenBase","tokenHooks","tokenString","tokenParenthesized","quote","escaped","Context","pushContext","popContext","pass","states","popAndPass","wordAsValue","valueKeywords","colorKeywords","inline","propertyKeywords","documentTypes","mediaTypes","mediaFeatures","mediaValueKeywords","nonStandardPropertyKeywords","fontProperties","counterDescriptors","allowNested","supportsAtComponent","stateArg","block","maybeprop","propBlock","_stream","parens","pseudo","atBlock","atComponentBlock","atBlock_parens","restricted_atBlock_before","restricted_atBlock","keyframes","interpolation","textAfter","blockCommentStart","blockCommentEnd","fold","documentTypes_","mediaTypes_","mediaFeatures_","mediaValueKeywords_","propertyKeywords_","nonStandardPropertyKeywords_","fontProperties_","counterDescriptors_","colorKeywords_","valueKeywords_","allWords","/",":","$","#","@","&","maybeBackup","pat","getAttrRegexp","attr","regexp","attrRegexpCache","getAttrValue","getTagRegexp","anchored","addTags","findMatchingMode","tagInfo","tagText","defaultTags","script","htmlState","inTag","endTagA","endTag","localState","localMode","multilineTagIndentFactor","multilineTagIndentPastTag","configTags","configScript","scriptTypes","matches","local","../css/css","../javascript/javascript","../xml/xml","expressionAllowed","lastType","readRegexp","inSet","cont","tokenComment","isOperatorChar","tokenQuasi","wordRE","known","keywords","propertyIsEnumerable","jsonldMode","isJsonldKeyword","findFatArrow","fatArrowAt","arrow","isTS","depth","sawSomething","bracket","brackets","JSLexical","inScope","varname","localVars","vars","parseJS","cc","marked","lexical","combinator","jsonMode","expression","statement","lex","inList","globalVars","pushcontext","defaultVars","popcontext","pushlex","poplex","expect","wanted","exp","vardef","parenExpr","maybeelse","functiondef","forspec","maybelabel","funarg","afterExport","afterImport","typeexpr","expressionInner","expressionNoComma","noComma","arrowBodyNoComma","arrowBody","commasep","maybeop","maybeoperatorNoComma","maybeoperatorComma","atomicTypes","classExpression","maybeexpressionNoComma","maybeexpression","arrayLiteral","contCommasep","objprop","quasi","maybeTarget","expr","continueQuasi","targetNoComma","_","getterSetter","afterprop","proceed","maybetype","afterType","typeprop","typearg","maybeReturnType","maybeAssign","vardefCont","proppattern","_type","forspec1","forspec2","formaybeinof","forspec3","classNameAfter","classBody","classfield","maybeFrom","importSpec","maybeAs","isContinuedStatement","statementIndent","jsonld","json","typescript","wordCharacters","kw","A","B","C","operator","atom","jsKeywords","if","while","with","else","do","try","finally","return","break","continue","new","delete","throw","debugger","var","const","let","function","catch","for","switch","case","default","in","typeof","instanceof","true","false","super","yield","export","import","extends","await","async","tsKeywords","interface","implements","namespace","enum","public","private","protected","abstract","boolean","any","variable","jsonld-keyword","basecolumn","firstChar","doubleIndentSwitch","lineComment","closeBrackets","skipExpression","21","htmlConfig","autoSelfClosers","area","br","command","embed","frame","hr","keygen","meta","param","track","wbr","menuitem","implicitlyClosed","dd","li","optgroup","rp","tbody","td","tfoot","tr","contextGrabbers","dt","address","article","aside","blockquote","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","header","hgroup","menu","nav","ol","section","table","ul","thead","doNotIndent","allowUnquoted","allowMissing","caseFold","xmlConfig","editorConf","config_","inText","chain","parser","inBlock","doctype","baseState","tagStart","inAttribute","stringStartCol","closure","isInAttribute","terminator","startOfLine","noIndent","maybePopContext","nextTagName","parentTagName","tagNameState","closeTagNameState","setStyle","attrState","matchClosing","closeState","closeStateErr","attrEqState","attrValueState","attrContinuedState","isInText","baseIndent","fullLine","alignCDATA","tagAfter","grabbers","skipAttribute"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAeC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAA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Ae,gBACfojB,kBAAmB,OACnBC,gBAAiB,MAEjB94D,cAAe7b,EAAOsM,SAAW,OAAS,MAC1CyqB,WAAY/2B,EAAOsM,SAAW,OAAS,MAEvCs7E,cAAe,SAASt/E,GAClBA,EAAMA,OAAS8+E,IACjB9+E,EAAMA,MAAQy+E,OAKtBz7E,EAAWgrB,WAAW,WAAY,OAClChrB,EAAWgrB,WAAW,kBAAmB,OACpChrB,EAAWmrB,UAAU9R,eAAe,cACvCrZ,EAAWgrB,WAAW,aAAc9zB,KAAM,MAAO8J,UAAU,QAI1DyS,uBAAuB,UAAU","file":"forms-admin.min.js","sourcesContent":["(function () { var require = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar rows = function(m, i18n) {\n\n\tvar r = {};\n\n\tr.label = function (config) {\n\t\t// label row\n\t\treturn m(\"div\", [\n\t\t\tm(\"label\", i18n.fieldLabel),\n\t\t\tm(\"input.widefat\", {\n\t\t\t\ttype : \"text\",\n\t\t\t\tvalue : config.label(),\n\t\t\t\tonchange : m.withAttr('value', config.label),\n\t\t\t\tplaceholder: config.title()\n\t\t\t})\n\t\t]);\n\t};\n\n\tr.value = function (config) {\n\t\treturn m(\"div\", [\n\t\t\tm(\"label\", [\n\t\t\t\ti18n.value,\n\t\t\t\t\" \",\n\t\t\t\tconfig.type() === 'hidden' ? '' : m('small', { \"style\": \"float: right; font-weight: normal;\" }, i18n.optional )\n\t\t\t]),\n\t\t\tm(\"input.widefat\", {\n\t\t\t\ttype : \"text\",\n\t\t\t\tvalue : config.value(),\n\t\t\t\tonchange: m.withAttr('value', config.value)\n\t\t\t}),\n\t\t\tm('p.help', i18n.valueHelp)\n\t\t]);\n\t};\n\n\tr.numberMinMax = function (config) {\n\t\treturn m('div', [\n\t\t\tm('div.row', [\n\t\t\t\tm('div.col.col-3', [\n\t\t\t\t\tm('label', i18n.min),\n\t\t\t\t\tm('input', {type: 'number', onchange: m.withAttr('value', config.min)})\n\t\t\t\t]),\n\t\t\t\tm('div.col.col-3', [\n\t\t\t\t\tm('label', i18n.max),\n\t\t\t\t\tm('input', {type: 'number', onchange: m.withAttr('value', config.max)})\n\t\t\t\t])\n\t\t\t])\n\t\t])\n\t};\n\n\n\tr.isRequired = function (config) {\n\t\tvar inputAtts = {\n\t\t\ttype : 'checkbox',\n\t\t\tchecked : config.required(),\n\t\t\tonchange: m.withAttr('checked', config.required)\n\t\t};\n\t\tvar desc;\n\n\t\tif( config.forceRequired() ) {\n\t\t\tinputAtts.required = true;\n\t\t\tinputAtts.disabled = true;\n\t\t\tdesc = m('p.help', i18n.forceRequired );\n\t\t}\n\n\t\treturn m('div', [\n\t\t\tm('label.cb-wrap', [\n\t\t\t\tm('input', inputAtts),\n\t\t\t\ti18n.isFieldRequired\n\t\t\t]),\n\t\t\tdesc\n\t\t]);\n\t};\n\n\tr.placeholder = function (config) {\n\n\t\treturn m(\"div\", [\n\t\t\tm(\"label\", [\n\t\t\t\ti18n.placeholder,\n\t\t\t\t\" \",\n\t\t\t\tm('small', { \"style\": \"float: right; font-weight: normal;\" }, i18n.optional )\n\t\t\t]),\n\t\t\tm(\"input.widefat\", {\n\t\t\t\ttype : \"text\",\n\t\t\t\tvalue : config.placeholder(),\n\t\t\t\tonchange: m.withAttr('value', config.placeholder),\n\t\t\t\tplaceholder: \"\"\n\t\t\t}),\n\t\t\tm(\"p.help\", i18n.placeholderHelp)\n\t\t]);\n\t};\n\n\tr.useParagraphs = function (config) {\n\t\treturn m('div', [\n\t\t\tm('label.cb-wrap', [\n\t\t\t\tm('input', {\n\t\t\t\t\ttype : 'checkbox',\n\t\t\t\t\tchecked : config.wrap(),\n\t\t\t\t\tonchange: m.withAttr('checked', config.wrap)\n\t\t\t\t}),\n\t\t\t\ti18n.wrapInParagraphTags\n\t\t\t])\n\t\t]);\n\t};\n\n\tr.choiceType = function (config) {\n\n\n\t\tvar options = [\n\t\t\tm('option', {\n\t\t\t\tvalue : 'select',\n\t\t\t\tselected: config.type() === 'select' ? 'selected' : false\n\t\t\t}, i18n.dropdown ),\n\t\t\tm('option', {\n\t\t\t\tvalue : 'radio',\n\t\t\t\tselected: config.type() === 'radio' ? 'selected' : false\n\t\t\t}, i18n.radioButtons )\n\t\t];\n\n\t\t// only add checkbox choice if field accepts multiple values\n\t\tif( config.acceptsMultipleValues ) {\n\t\t\toptions.push(\n\t\t\t\tm('option', {\n\t\t\t\t\tvalue : 'checkbox',\n\t\t\t\t\tselected: config.type() === 'checkbox' ? 'selected' : false\n\t\t\t\t}, i18n.checkboxes )\n\t\t\t);\n\t\t}\n\n\t\treturn m('div', [\n\t\t\tm('label', i18n.choiceType ),\n\t\t\tm('select', {\n\t\t\t\tvalue : config.type(),\n\t\t\t\tonchange: m.withAttr('value', config.type)\n\t\t\t}, options)\n\t\t]);\n\t};\n\n\tr.choices = function (config) {\n\n\t\tvar html = [];\n\t\thtml.push(m('div', [\n\t\t\tm('label', i18n.choices),\n\t\t\tm('div.limit-height', [\n\t\t\t\tm(\"table\", [\n\n\t\t\t\t\t// table body\n\t\t\t\t\tconfig.choices().map(function (choice, index) {\n\t\t\t\t\t\treturn m('tr', {\n\t\t\t\t\t\t\t'data-id': index\n\t\t\t\t\t\t}, [\n\t\t\t\t\t\t\tm('td.cb', m('input', {\n\t\t\t\t\t\t\t\t\tname: 'selected',\n\t\t\t\t\t\t\t\t\ttype: (config.type() === 'checkbox' ) ? 'checkbox' : 'radio',\n\t\t\t\t\t\t\t\t\tonchange: m.withAttr('value', config.selectChoice.bind(config)),\n\t\t\t\t\t\t\t\t\tchecked: choice.selected(),\n\t\t\t\t\t\t\t\t\tvalue: choice.value(),\n\t\t\t\t\t\t\t\t\ttitle: i18n.preselect\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tm('td.stretch', m('input.widefat', {\n\t\t\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\t\t\tvalue: choice.label(),\n\t\t\t\t\t\t\t\tplaceholder: choice.title(),\n\t\t\t\t\t\t\t\tonchange: m.withAttr('value', choice.label)\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\tm('td', m('span', {\n\t\t\t\t\t\t\t\t\"title\": i18n.remove,\n\t\t\t\t\t\t\t\t\"class\": 'dashicons dashicons-no-alt hover-activated',\n\t\t\t\t\t\t\t\t\"onclick\": function (key) {\n\t\t\t\t\t\t\t\t\tthis.choices().splice(key, 1);\n\t\t\t\t\t\t\t\t}.bind(config, index)\n\t\t\t\t\t\t\t}, ''))\n\t\t\t\t\t\t])\n\t\t\t\t\t})\n\t\t\t\t]) // end of table\n\t\t\t]) // end of limit-height div\n\t\t]));\n\t\t\n\t\treturn html;\n\n\t};\n\n\treturn r;\n};\n\nmodule.exports = rows;\n},{}],2:[function(require,module,exports){\nvar forms = function(m, i18n) {\n\tvar forms = {};\n\tvar rows = require('./field-forms-rows.js')(m, i18n);\n\n\t// route to one of the other form configs, default to \"text\"\n\tforms.render = function(config) {\n\n\t\tvar type = config.type();\n\n\t\tif( typeof( forms[type] ) === \"function\" ) {\n\t\t\treturn forms[ type ](config);\n\t\t}\n\n\t\tswitch( type ) {\n\t\t\tcase 'select':\n\t\t\tcase 'radio':\n\t\t\tcase 'checkbox':\n\t\t\t\treturn forms.choice(config);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// fallback to good old text field\n\t\treturn forms.text(config);\n\t};\n\n\n\tforms.text = function(config) {\n\t\treturn [\n\t\t\trows.label(config),\n\t\t\trows.placeholder(config),\n\t\t\trows.value(config),\n\t\t\trows.isRequired(config),\n\t\t\trows.useParagraphs(config)\n\t\t]\n\t};\n\n\tforms.choice = function(config) {\n\t\tvar visibleRows = [\n\t\t\trows.label(config),\n\t\t\trows.choiceType(config),\n\t\t\trows.choices(config),\n\t\t];\n\n\t\tif( config.type() === 'select' ) {\n\t\t\tvisibleRows.push(rows.placeholder(config));\n\t\t}\n\n\t\tvisibleRows.push(rows.useParagraphs(config));\n\n\t\tif( config.type() === 'select' || config.type() === 'radio' ) {\n\t\t\tvisibleRows.push(rows.isRequired(config));\n\t\t}\n\n\t\treturn visibleRows;\n\t};\n\n\tforms.hidden = function( config ) {\n\t\tconfig.placeholder('');\n\t\tconfig.label('');\n\t\tconfig.wrap(false);\n\n\t\treturn [\n\t\t\trows.value(config)\n\t\t]\n\t};\n\n\tforms.submit = function(config) {\n\t\tconfig.label('');\n\t\tconfig.placeholder('');\n\n\t\treturn [\n\t\t\trows.value(config),\n\t\t\trows.useParagraphs(config)\n\t\t]\n\t};\n\n\tforms.number = function(config) {\n\n\t\treturn [\n\t\t\tforms.text(config),\n\t\t\trows.numberMinMax(config)\n\t\t];\n\t};\n\n\treturn forms;\n};\n\n\n\nmodule.exports = forms;\n},{\"./field-forms-rows.js\":1}],3:[function(require,module,exports){\n'use strict';\n\nvar render = require('../third-party/render.js');\nvar html_beautify = require('../third-party/beautify-html.js');\n\nvar g = function(m) {\n\tvar generators = {};\n\n\t/**\n\t * Generates a <select> field\n\t * @param config\n\t * @returns {*}\n\t */\n\tgenerators.select = function (config) {\n\t\tvar attributes = {\n\t\t\tname: config.name(),\n\t\t\trequired: config.required()\n\t\t};\n\t\tvar hasSelection = false;\n\n\t\tvar options = config.choices().map(function (choice) {\n\n\t\t\tif( choice.selected() ) {\n\t\t\t\thasSelection = true;\n\t\t\t}\n\n\t\t\treturn m('option', {\n\t\t\t\tvalue : ( choice.value() !== choice.label() ) ? choice.value() : undefined,\n\t\t\t\t\"selected\": choice.selected()\n\t\t\t}, choice.label())\n\t\t});\n\n\t\tvar placeholder = config.placeholder();\n\t\tif(placeholder.length > 0 ) {\n\t\t\toptions.unshift(\n\t\t\t\tm('option', {\n\t\t\t\t\t'disabled': true,\n\t\t\t\t\t'value': '',\n\t\t\t\t\t'selected': ! hasSelection\n\t\t\t\t}, placeholder)\n\t\t\t);\n\t\t}\n\n\t\treturn m('select', attributes, options );\n\t};\n\n\t/**\n\t * Generates a checkbox or radio type input field.\n\t *\n\t * @param config\n\t * @returns {*}\n\t */\n\tgenerators.checkbox = function (config) {\n\t\tvar field = config.choices().map(function (choice) {\n\t\t\tvar name = config.name() + ( config.type() === 'checkbox' ? '[]' : '' );\n\t\t\tvar required = config.required() && config.type() === 'radio';\n\n\t\t\treturn m('label', [\n\t\t\t\t\tm('input', {\n\t\t\t\t\t\tname : name,\n\t\t\t\t\t\ttype : config.type(),\n\t\t\t\t\t\tvalue : choice.value(),\n\t\t\t\t\t\tchecked : choice.selected(),\n\t\t\t\t\t\trequired: required\n\t\t\t\t\t}),\n\t\t\t\t\t' ',\n\t\t\t\t\tm('span', choice.label())\n\t\t\t\t]\n\t\t\t)\n\t\t});\n\t\t\n\t\treturn field;\n\t};\n\tgenerators.radio = generators.checkbox;\n\n\t/**\n\t * Generates a default field\n\t *\n\t * - text, url, number, email, date\n\t *\n\t * @param config\n\t * @returns {*}\n\t */\n\tgenerators['default'] = function (config) {\n\n\t\tvar attributes = {\n\t\t\ttype: config.type()\n\t\t};\n\t\tvar field;\n\n\t\tif (config.name()) {\n\t\t\tattributes.name = config.name();\n\t\t}\n\n\t\tif (config.min()) {\n\t\t\tattributes.min = config.min();\n\t\t}\n\n\t\tif (config.max()) {\n\t\t\tattributes.max = config.max();\n\t\t}\n\n\t\tif (config.value().length > 0) {\n\t\t\tattributes.value = config.value();\n\t\t}\n\n\t\tif( config.placeholder().length > 0 ) {\n\t\t\tattributes.placeholder = config.placeholder();\n\t\t}\n\n\t\tattributes.required = config.required();\n\n\t\tfield = m('input', attributes);\n\t\treturn field;\n\t};\n\n\t/**\n\t * Generates an HTML string based on a field (config) object\n\t *\n\t * @param config\n\t * @returns {*}\n\t */\n\tfunction generate(config) {\n\t\tvar label, field, htmlTemplate, html;\n\n\t\tlabel = config.label().length ? m(\"label\", config.label()) : '';\n\t\tfield = typeof(generators[config.type()]) === \"function\" ? generators[config.type()](config) : generators['default'](config);\n\n\t\thtmlTemplate = config.wrap() ? m('p', [label, field]) : [label, field];\n\n\t\t// render HTML on memory node\n\t\thtml = render(htmlTemplate);\n\n\t\t// prettify html\n\t\thtml = html_beautify(html);\n\n\t\treturn html + \"\\n\";\n\t}\n\n\treturn generate;\n};\n\nmodule.exports = g;\n},{\"../third-party/beautify-html.js\":12,\"../third-party/render.js\":13}],4:[function(require,module,exports){\nvar FieldHelper = function(m, tabs, editor, fields, i18n) {\n\t'use strict';\n\n\tvar generate = require('./field-generator.js')(m);\n\tvar overlay = require('./overlay.js')(m,i18n);\n\tvar forms = require('./field-forms.js')(m, i18n);\n\tvar fieldConfig;\n\n\teditor.on('blur', m.redraw);\n\n\t/**\n\t * Choose a field to open the helper form for\n\t *\n\t * @param index\n\t * @returns {*}\n\t */\n\tfunction setActiveField(index) {\n\n\t\tfieldConfig = fields.get(index);\n\n\t\t// if this hidden field has choices (hidden groups), glue them together by their label.\n\t\tif( fieldConfig && fieldConfig.choices().length > 0 ) {\n\t\t\tfieldConfig.value( fieldConfig.choices().map(function(c) {\n\t\t\t\treturn c.label();\n\t\t\t}).join('|'));\n\t\t}\n\n\t\tm.redraw();\n\t}\n\n\n\t/**\n\t * Controller\n\t */\n\tfunction controller() {\n\n\t}\n\n\t/**\n\t * Create HTML based on current config object\n\t */\n\tfunction createFieldHTMLAndAddToForm() {\n\n\t\t// generate html\n\t\tvar html = generate(fieldConfig);\n\n\t\t// add to editor\n\t\teditor.insert( html );\n\n\t\t// reset field form\n\t\tsetActiveField('');\n\n\t\t// redraw\n\t\tm.redraw();\n\t}\n\n\t/**\n\t * View\n\t * @returns {*}\n\t */\n\tfunction view() {\n\n\t\t// build DOM for fields choice\n\t\tvar fieldCategories = fields.getCategories();\n\t\tvar availableFields = fields.getAll();\n\n\t\tvar fieldsChoice = m( \"div.available-fields.small-margin\", [\n\t\t\tm(\"h4\", i18n.chooseField),\n\n\t\t\tfieldCategories.map(function(category) {\n\t\t\t\tvar categoryFields = availableFields.filter(function(f) {\n\t\t\t\t\treturn f.category === category;\n\t\t\t\t});\n\n\t\t\t\tif( ! categoryFields.length ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\treturn m(\"div.tiny-margin\",[\n\t\t\t\t\tm(\"strong\", category),\n\n\t\t\t\t\t// render fields\n\t\t\t\t\tcategoryFields.map(function(field) {\n\t\t\t\t\t\tvar className = \"button\";\n\t\t\t\t\t\tif( field.forceRequired() ) {\n\t\t\t\t\t\t\tclassName += \" is-required\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar inForm = field.inFormContent();\n\t\t\t\t\t\tif( inForm !== null ) {\n\t\t\t\t\t\t\tclassName += \" \" + ( inForm ? 'in-form' : 'not-in-form' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn m(\"button\", {\n\t\t\t\t\t\t\tclassName: className,\n\t\t\t\t\t\t\ttype : 'button',\n\t\t\t\t\t\t\tonclick: m.withAttr(\"value\", setActiveField),\n\t\t\t\t\t\t\tvalue : field.index\n\t\t\t\t\t\t}, field.title() );\n\t\t\t\t\t})\n\t\t\t\t]);\n\t\t\t})\n\t\t]);\n\n\t\t// build DOM for overlay\n\t\tvar form = null;\n\t\tif( fieldConfig ) {\n\t\t\tform = overlay(\n\t\t\t\t// field wizard\n\t\t\t\tm(\"div.field-wizard\", [\n\n\t\t\t\t\t//heading\n\t\t\t\t\tm(\"h3\", [\n\t\t\t\t\t\tfieldConfig.title(),\n\t\t\t\t\t\tfieldConfig.forceRequired() ? m('span.red', '*' ) : '',\n\t\t\t\t\t\tfieldConfig.name().length ? m(\"code\", fieldConfig.name()) : ''\n\t\t\t\t\t]),\n\n\t\t\t\t\t// help text\n\t\t\t\t\t( fieldConfig.help().length ) ? m('p', m.trust( fieldConfig.help() ) ) : '',\n\n\t\t\t\t\t// actual form\n\t\t\t\t\tforms.render(fieldConfig),\n\n\t\t\t\t\t// add to form button\n\t\t\t\t\tm(\"p\", [\n\t\t\t\t\t\tm(\"button\", {\n\t\t\t\t\t\t\t\"class\": \"button-primary\",\n\t\t\t\t\t\t\ttype: \"button\",\n\t\t\t\t\t\t\tonkeydown: function(e) {\n\t\t\t\t\t\t\t\te = e || window.event;\n\t\t\t\t\t\t\t\tif(e.keyCode == 13) {\n\t\t\t\t\t\t\t\t\tcreateFieldHTMLAndAddToForm();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonclick: createFieldHTMLAndAddToForm\n\t\t\t\t\t\t}, i18n.addToForm )\n\t\t\t\t\t])\n\t\t\t\t]), setActiveField);\n\t\t}\n\n\t\treturn [\n\t\t\tfieldsChoice,\n\t\t\tform\n\t\t];\n\t}\n\n\t// expose some variables\n\treturn {\n\t\tview: view,\n\t\tcontroller: controller\n\t}\n};\n\nmodule.exports = FieldHelper;\n},{\"./field-forms.js\":2,\"./field-generator.js\":3,\"./overlay.js\":10}],5:[function(require,module,exports){\nvar FieldFactory = function(fields, i18n) {\n\t'use strict';\n\n\t/**\n\t * Array of registered fields\n\t *\n\t * @type {Array}\n\t */\n\tvar registeredFields = [];\n\n\t/**\n\t * Reset all previously registered fields\n\t */\n\tfunction reset() {\n\t\t// clear all of our fields\n\t\tregisteredFields.forEach(fields.deregister);\n\t}\n\n\t/**\n\t * Helper function to quickly register a field and store it in local scope\n\t *\n\t * @param {object} data\n\t * @param {boolean} sticky\n\t */\n\tfunction register(category, data, sticky) {\n\t\tvar field = fields.register(category, data);\n\n\t\tif( ! sticky ) {\n\t\t\tregisteredFields.push(field);\n\t\t}\n\t}\n\n\t/**\n\t * Normalizes the field type which is passed by MailChimp\n\t *\n\t * @param type\n\t * @returns {*}\n\t */\n\tfunction getFieldType(type) {\n\n\t\tvar map = {\n\t\t\t'phone' : 'tel',\n\t\t\t'dropdown': 'select',\n\t\t\t'checkboxes': 'checkbox',\n\t\t\t'birthday': 'text'\n\t\t};\n\n\t\treturn typeof map[ type ] !== \"undefined\" ? map[type] : type;\n\t}\n\n\t/**\n\t * Register the various fields for a merge var\n\t *\n\t * @param mergeField\n\t * @returns {boolean}\n\t */\n\tfunction registerMergeField(mergeField) {\n\n\t\tvar category = i18n.listFields;\n\t\tvar fieldType = getFieldType(mergeField.field_type);\n\n\t\t// name, type, title, value, required, label, placeholder, choices, wrap\n\t\tvar data = {\n\t\t\tname: mergeField.tag,\n\t\t\ttitle: mergeField.name,\n\t\t\trequired: mergeField.required,\n\t\t\tforceRequired: mergeField.required,\n\t\t\ttype: fieldType,\n\t\t\tchoices: mergeField.choices,\n\t\t\tacceptsMultipleValues: false // merge fields never accept multiple values.\n\t\t};\n\n\t\tif( data.type !== 'address' ) {\n\t\t\tregister(category, data, false);\n\t\t} else {\n\t\t\tregister(category, { name: data.name + '[addr1]', type: 'text', title: i18n.streetAddress });\n\t\t\tregister(category, { name: data.name + '[city]', type: 'text', title: i18n.city });\n\t\t\tregister(category, { name: data.name + '[state]', type: 'text', title: i18n.state });\n\t\t\tregister(category, { name: data.name + '[zip]', type: 'text', title: i18n.zip });\n\t\t\tregister(category, { name: data.name + '[country]', type: 'select', title: i18n.country, choices: mc4wp_vars.countries });\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Register a field for a MailChimp grouping\n\t *\n\t * @param interestCategory\n\t */\n\tfunction registerInterestCategory(interestCategory){\n\t\tvar category = i18n.interestCategories;\n\t\tvar fieldType = getFieldType(interestCategory.field_type);\n\n\t\tvar data = {\n\t\t\ttitle: interestCategory.name,\n\t\t\tname: 'INTERESTS[' + interestCategory.id + ']',\n\t\t\ttype: fieldType,\n\t\t\tchoices: interestCategory.interests,\n\t\t\tacceptsMultipleValues: fieldType === 'checkbox'\n\t\t};\n\t\tregister(category, data, false);\n\t}\n\n\t/**\n\t * Register all fields belonging to a list\n\t *\n\t * @param list\n\t */\n\tfunction registerListFields(list) {\n\n\t\t// make sure EMAIL && public fields come first\n\t\tlist.merge_fields = list.merge_fields.sort(function(a, b) {\n\t\t\tif( a.tag === 'EMAIL' || ( a.public && ! b.public ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif( ! a.public && b.public ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t});\n\n\t\t// loop through merge vars\n\t\tlist.merge_fields.forEach(registerMergeField);\n\n\t\t// loop through groupings\n\t\tlist.interest_categories.forEach(registerInterestCategory);\n\t}\n\n\t/**\n\t * Register all lists fields\n\t *\n\t * @param lists\n\t */\n\tfunction registerListsFields(lists) {\n\t\treset();\n\t\tlists.forEach(registerListFields);\n\t}\n\n\tfunction registerCustomFields(lists) {\n\n\t\tvar choices,\n\t\t\tcategory = i18n.formFields;\n\n\t\t// register submit button\n\t\tregister(category, {\n\t\t\tname: '',\n\t\t\tvalue: i18n.subscribe,\n\t\t\ttype: \"submit\",\n\t\t\ttitle: i18n.submitButton\n\t\t}, true);\n\n\t\t// register lists choice field\n\t\tchoices = {};\n\t\tfor(var key in lists) {\n\t\t\tchoices[lists[key].id] = lists[key].name;\n\t\t}\n\n\t\tregister(category, {\n\t\t\tname: '_mc4wp_lists',\n\t\t\ttype: 'checkbox',\n\t\t\ttitle: i18n.listChoice,\n\t\t\tchoices: choices,\n\t\t\thelp: i18n.listChoiceDescription,\n\t\t\tacceptsMultipleValues: true\n\t\t}, true);\n\n\t\tchoices = {\n\t\t\t'subscribe': \"Subscribe\",\n\t\t\t'unsubscribe': \"Unsubscribe\"\n\t\t};\n\t\tregister(category, {\n\t\t\tname: '_mc4wp_action',\n\t\t\ttype: 'radio',\n\t\t\ttitle: i18n.formAction,\n\t\t\tchoices: choices,\n\t\t\tvalue: 'subscribe',\n\t\t\thelp: i18n.formActionDescription\n\t\t}, true);\n\t}\n\n\t/**\n\t * Expose some methods\n\t */\n\treturn {\n\t\t'registerCustomFields': registerCustomFields,\n\t\t'registerListFields': registerListFields,\n\t\t'registerListsFields': registerListsFields\n\t}\n\n};\n\nmodule.exports = FieldFactory;\n},{}],6:[function(require,module,exports){\n'use strict';\n\nmodule.exports = function(m, events) {\n var timeout;\n\tvar fields = [];\n\tvar categories = [];\n\n\n\t/**\n\t * @internal\n\t *\n\t *\n\t * @param data\n\t * @constructor\n\t */\n\tvar Field = function (data) {\n\t\tthis.name = m.prop(data.name);\n\t\tthis.title = m.prop(data.title || data.name);\n\t\tthis.type = m.prop(data.type);\n\t\tthis.label = m.prop(data.title || '');\n\t\tthis.value = m.prop(data.value || '');\n\t\tthis.placeholder = m.prop(data.placeholder || '');\n\t\tthis.required = m.prop(data.required || false);\n\t\tthis.forceRequired = m.prop( data.forceRequired || false );\n\t\tthis.wrap = m.prop(data.wrap || true);\n\t\tthis.min = m.prop(data.min || null);\n\t\tthis.max = m.prop(data.max || null);\n\t\tthis.help = m.prop(data.help || '');\n\t\tthis.choices = m.prop(data.choices || []);\n\t\tthis.inFormContent = m.prop(null);\n\t\tthis.acceptsMultipleValues = data.acceptsMultipleValues;\n\n\t\tthis.selectChoice = function(value) {\n\t\t\tvar field = this;\n\n\t\t\tthis.choices(this.choices().map(function(choice) {\n\n\t\t\t\tif( choice.value() === value ) {\n\t\t\t\t\tchoice.selected(true);\n\t\t\t\t} else {\n\t\t\t\t\t// only checkboxes allow for multiple selections\n\t\t\t\t\tif( field.type() !== 'checkbox' ) {\n\t\t\t\t\t\tchoice.selected(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn choice;\n\n\t\t\t}));\n\t\t};\n\t};\n\n\t/**\n\t * @internal\n\t *\n\t * @param data\n\t * @constructor\n\t */\n\tvar FieldChoice = function (data) {\n\t\tthis.label = m.prop(data.label);\n\t\tthis.title = m.prop(data.title || data.label);\n\t\tthis.selected = m.prop(data.selected || false);\n\t\tthis.value = m.prop(data.value || data.label);\n\t};\n\n\t/**\n\t * Creates FieldChoice objects from an (associative) array of data objects\n\t *\n\t * @param data\n\t * @returns {Array}\n\t */\n\tfunction createChoices(data) {\n\t\tvar choices = [];\n\t\tif (typeof( data.map ) === \"function\") {\n\t\t\tchoices = data.map(function (choiceLabel) {\n\t\t\t\treturn new FieldChoice({label: choiceLabel});\n\t\t\t});\n\t\t} else {\n\t\t\tchoices = Object.keys(data).map(function (key) {\n\t\t\t\tvar choiceLabel = data[key];\n\t\t\t\treturn new FieldChoice({label: choiceLabel, value: key});\n\t\t\t});\n\t\t}\n\n\t\treturn choices;\n\t}\n\n\t/**\n\t * Factory method\n\t *\n\t * @api\n\t *\n\t * @param data\n\t * @returns {Field}\n\t */\n\tfunction register(category, data) {\n\n\t\tvar field;\n\t\tvar existingField = getAllWhere('name', data.name).shift();\n\n\t\t// a field with the same \"name\" already exists\n\t\tif(existingField) {\n\n\t\t\t// update \"required\" status\n\t\t\tif( ! existingField.required() && data.required ) {\n\t\t\t\texistingField.required(true);\n\t\t\t}\n\n\t\t\t// bail\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// array of choices given? convert to FieldChoice objects\n\t\tif (data.choices) {\n\t\t\tdata.choices = createChoices(data.choices);\n\n\t\t\tif( data.value) {\n\t\t\t\tdata.choices = data.choices.map(function(choice) {\n\t\t\t\t\tif(choice.value() === data.value) {\n\t\t\t\t\t\tchoice.selected(true);\n\t\t\t\t\t}\n\t\t\t\t\treturn choice;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// register category\n\t\tif( categories.indexOf(category) < 0 ) {\n\t\t\tcategories.push(category);\n\t\t}\n\n\t\t// create Field object\n\t\tfield = new Field(data);\n\t\tfield.category = category;\n\n\t\t// add to array\n\t\tfields.push(field);\n\n\t\t// redraw view\n timeout && window.clearTimeout(timeout);\n timeout = window.setTimeout(m.redraw, 100);\n\n\t\t// trigger event\n\t\tevents.trigger('fields.change');\n\n\t\treturn field;\n\t}\n\n\t/**\n\t * @api\n\t *\n\t * @param field\n\t */\n\tfunction deregister(field) {\n\t\tvar index = fields.indexOf(field);\n\t\tif (index > -1) {\n\t\t\tdelete fields[index];\n\t\t\tm.redraw();\n\t\t}\n\t}\n\n\t/**\n\t * Get a field config object\n\t *\n\t * @param name\n\t * @returns {*}\n\t */\n\tfunction get(name) {\n\t\treturn fields[name];\n\t}\n\n\t/**\n\t * Get all field config objects\n\t *\n\t * @returns {Array|*}\n\t */\n\tfunction getAll() {\n\t\t// rebuild index property on all fields\n\t\tfields = fields.map(function(f, i) {\n\t\t\tf.index = i;\n\t\t\treturn f;\n\t\t});\n\n\t\treturn fields;\n\t}\n\n\tfunction getCategories() {\n\t\treturn categories;\n\t}\n\n\t/**\n\t * Get all fields where a property matches the given value\n\t *\n\t * @param searchKey\n\t * @param searchValue\n\t * @returns {Array|*}\n\t */\n\tfunction getAllWhere(searchKey, searchValue) {\n\t\treturn fields.filter(function (field) {\n\t\t\treturn field[searchKey]() === searchValue;\n\t\t});\n\t}\n\n\n\t/**\n\t * Exposed methods\n\t */\n\treturn {\n\t\t'get' : get,\n\t\t'getAll' : getAll,\n\t\t'getCategories': getCategories,\n\t\t'deregister' : deregister,\n\t\t'register' : register,\n\t\t'getAllWhere': getAllWhere\n\t};\n};\n},{}],7:[function(require,module,exports){\n'use strict';\n\n// load CodeMirror & plugins\nvar CodeMirror = require('codemirror');\nrequire('codemirror/mode/xml/xml');\nrequire('codemirror/mode/javascript/javascript');\nrequire('codemirror/mode/css/css');\nrequire('codemirror/mode/htmlmixed/htmlmixed');\nrequire('codemirror/addon/fold/xml-fold');\nrequire('codemirror/addon/edit/matchtags');\nrequire('codemirror/addon/edit/closetag.js');\n\nvar FormEditor = function(element) {\n\n\t// create dom representation of form\n\tvar _dom = document.createElement('form'),\n\t\tdomDirty = false,\n\t\tr = {},\n\t\teditor;\n\n\t_dom.innerHTML = element.value.toLowerCase();\n\n\tif( CodeMirror ) {\n\t\teditor = CodeMirror.fromTextArea(element, {\n\t\t\tselectionPointer: true,\n\t\t\tmatchTags: { bothTags: true },\n\t\t\tmode: \"htmlmixed\",\n\t\t\thtmlMode: true,\n\t\t\tautoCloseTags: true,\n\t\t\tautoRefresh: true\n\t\t});\n\n\t\t// dispatch regular \"change\" on element event every time editor changes (IE9+ only)\n\t\twindow.dispatchEvent && editor.on('change',function() {\n\t\t\tif(typeof(Event) === \"function\") {\n\t\t\t\t// Create a new 'change' event\n\t\t\t\tvar event = new Event('change', { bubbles: true });\n\t\t\t\telement.dispatchEvent(event);\n\t\t\t}\n\t\t});\n\t}\n\n\twindow.addEventListener('load', function() {\n\t\tCodeMirror.signal(editor, \"change\");\n\t});\n\n\t// set domDirty to true everytime the \"change\" event fires (a lot..)\n\telement.addEventListener('change',function() {\n\t\tdomDirty = true;\n\t});\n\n\tfunction dom() {\n\t\tif( domDirty ) {\n\t\t\t_dom.innerHTML = r.getValue().toLowerCase();\n\t\t\tdomDirty = false;\n\t\t}\n\n\t\treturn _dom;\n\t}\n\n\tr.getValue = function() {\n\t\treturn editor ? editor.getValue() : element.value;\n\t};\n\n\tr.query = function(query) {\n\t\treturn dom().querySelectorAll(query);\n\t};\n\n\tr.containsField = function(fieldName){\n\t\treturn dom().elements.namedItem(fieldName.toLowerCase()) !== null;\n\t};\n\n\tr.insert = function( html ) {\n\t\tif( editor ) {\n\t\t\teditor.replaceSelection( html );\n\t\t\teditor.focus();\n\t\t} else {\n\t\t\telement.value += html;\n\t\t}\n\t};\n\n\tr.on = function(event,callback) {\n\t\tif( editor ) {\n\t\t\t// translate \"input\" event for CodeMirror\n\t\t\tevent = ( event === 'input' ) ? 'changes' : event;\n\t\t\treturn editor.on(event,callback);\n\t\t}\n\n\t\treturn element.addEventListener(event,callback);\n\t};\n\n\tr.refresh = function() {\n\t\teditor && editor.refresh();\n\t};\n\n\treturn r;\n};\n\nmodule.exports = FormEditor;\n},{\"codemirror\":17,\"codemirror/addon/edit/closetag.js\":14,\"codemirror/addon/edit/matchtags\":15,\"codemirror/addon/fold/xml-fold\":16,\"codemirror/mode/css/css\":18,\"codemirror/mode/htmlmixed/htmlmixed\":19,\"codemirror/mode/javascript/javascript\":20,\"codemirror/mode/xml/xml\":21}],8:[function(require,module,exports){\nvar FormWatcher = function(m, editor, settings, fields, events, helpers) {\n\t'use strict';\n\n\tvar requiredFieldsInput = document.getElementById('required-fields');\n\n\tfunction updateFields() {\n\n\t\tfields.getAll().forEach(function(field) {\n\t\t\t// don't run for empty field names\n\t\t\tif(field.name().length <= 0) return;\n\n\t\t\tvar fieldName = field.name();\n\t\t\tif( field.type() === 'checkbox' ) {\n\t\t\t\tfieldName += '[]';\n\t\t\t}\n\n\t\t\tvar inForm = editor.containsField( fieldName );\n\t\t\tfield.inFormContent( inForm );\n\t\t});\n\n\t\tfindRequiredFields();\n\t\tm.redraw();\n\t}\n\n\tfunction findRequiredFields() {\n\n\t\t// query fields required by MailChimp\n\t\tvar requiredFields = fields.getAllWhere('forceRequired', true).map(function(f) { return f.name().toUpperCase(); });\n\n\t\t// query fields in form with [required] attribute\n\t\tvar requiredFieldElements = editor.query('[required]');\n\t\tArray.prototype.forEach.call(requiredFieldElements, function(el) {\n\t\t\tvar name = el.name.toUpperCase();\n\n\t\t\t// bail if name attr starts with underscore\n\t\t\tif( name[0] === '_' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// replace array brackets with dot style notation\n\t\t\tname = name.replace(/\\[(\\w+)\\]/g, '.$1' );\n\n\t\t\t// only add field if it's not already in it\n\t\t\tif( requiredFields.indexOf(name) === -1 ) {\n\t\t\t\trequiredFields.push(name);\n\t\t\t}\n\t\t});\n\n\t\t// update meta\n\t\trequiredFieldsInput.value = requiredFields.join(',');\n\t}\n\n\t// events\n\teditor.on('change', helpers.debounce(updateFields, 500));\n\tevents.on('fields.change', helpers.debounce(updateFields, 500));\n\n};\n\nmodule.exports = FormWatcher;\n},{}],9:[function(require,module,exports){\n'use strict';\n\nvar notices = [];\n\nfunction show(txt) {\n var index = notices.indexOf(txt);\n if( index < 0 ) {\n notices.push(txt);\n render();\n }\n}\n\nfunction hide(txt) {\n var index = notices.indexOf(txt);\n if( index > -1 ) {\n notices.splice(index, 1);\n render();\n }\n}\n\nfunction render() {\n var html = '';\n for( var i=0; i<notices.length; i++) {\n html += '<div class=\"notice notice-warning\"><p>' + notices[i] + '</p></div>';\n }\n\n var container = document.querySelector('.mc4wp-notices');\n if( ! container ) {\n container = document.createElement('div');\n container.className = 'mc4wp-notices';\n var heading = document.querySelector('h1');\n heading.parentNode.insertBefore(container, heading.nextSibling);\n }\n \n container.innerHTML = html;\n}\n\nfunction init( editor ) {\n editor.on('change', function() {\n var text = \"Your form contains old style <code>GROUPINGS</code> fields. <br /><br />Please remove these fields from your form and then re-add them through the available field buttons to make sure your data is getting through to MailChimp correctly.\";\n var formCode = editor.getValue().toLowerCase();\n formCode.indexOf('name=\"groupings') > -1 ? show(text) : hide(text);\n });\n}\n\nmodule.exports = {\n \"init\": init\n};\n},{}],10:[function(require,module,exports){\nvar overlay = function(m, i18n) {\n\t'use strict';\n\n\tvar _element,\n\t\t_onCloseCallback;\n\n\tfunction close() {\n\t\tdocument.removeEventListener('keydown', onKeyDown);\n\t\twindow.removeEventListener('resize', position);\n\t\t_onCloseCallback();\n\t}\n\n\tfunction onKeyDown(e) {\n\t\te = e || window.event;\n\n\t\t// close overlay when pressing ESC\n\t\tif(e.keyCode == 27) {\n\t\t\tclose();\n\t\t}\n\n\t\t// prevent ENTER\n\t\tif(e.keyCode == 13 ) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\tfunction position() {\n\t\tif( ! _element ) return;\n\n\t\t// fix for window width in IE8\n\t\tvar windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\t\tvar windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n\n\t\tvar marginLeft = ( windowWidth - _element.clientWidth - 40 ) / 2;\n\t\tvar marginTop = ( windowHeight - _element.clientHeight - 40 ) / 2;\n\n\t\t_element.style.left = ( marginLeft > 0 ? marginLeft : 0 ) + \"px\";\n\t\t_element.style.top = ( marginTop > 0 ? marginTop : 0 ) + \"px\";\n\t}\n\n\treturn function (content, onCloseCallback) {\n\t\t_onCloseCallback = onCloseCallback;\n\n\t\tdocument.addEventListener('keydown', onKeyDown);\n\t\twindow.addEventListener('resize', position);\n\n\t\treturn [\n\t\t\tm('div.overlay-wrap',\n\t\t\t\tm(\"div.overlay\", {\n\t\t\t\t\tconfig: function (el) {\n\t\t\t\t\t\t_element = el;\n\t\t\t\t\t\tposition();\n\t\t\t\t\t}\n\t\t\t\t},[\n\n\t\t\t\t\t// close icon\n\t\t\t\t\tm('span', {\n\t\t\t\t\t\t\"class\": 'close dashicons dashicons-no',\n\t\t\t\t\t\ttitle : i18n.close,\n\t\t\t\t\t\tonclick: close\n\t\t\t\t\t}),\n\n\t\t\t\t\tcontent\n\t\t\t\t])\n\t\t\t)\n\t\t\t,\n\t\t\tm('div.overlay-background', {\n\t\t\t\ttitle: i18n.close,\n\t\t\t\tonclick: close\n\t\t\t})\n\t\t];\n\t};\n};\n\nmodule.exports = overlay;\n},{}],11:[function(require,module,exports){\n'use strict';\n\n// deps\nvar i18n = window.mc4wp_forms_i18n;\nvar m = window.mc4wp.deps.mithril;\nvar events = mc4wp.events;\nvar settings = mc4wp.settings;\nvar helpers = mc4wp.helpers;\n\nvar tabs = mc4wp.tabs;\nvar FormWatcher = require('./admin/form-watcher.js');\nvar FormEditor = require('./admin/form-editor.js');\nvar FieldHelper = require('./admin/field-helper.js');\nvar FieldsFactory = require('./admin/fields-factory.js');\nvar fields = require('./admin/fields.js')(m, events);\n\n// vars\nvar textareaElement = document.getElementById('mc4wp-form-content');\nvar editor = window.formEditor = new FormEditor( textareaElement );\nvar watcher = new FormWatcher( m, formEditor, settings, fields, events, helpers );\nvar fieldHelper = new FieldHelper( m, tabs, formEditor, fields, i18n );\nvar notices = require('./admin/notices');\n\n// mount field helper on element\nm.mount( document.getElementById( 'mc4wp-field-wizard'), fieldHelper );\n\n// register fields and redraw screen in 2 seconds (fixes IE8 bug)\nvar fieldsFactory = new FieldsFactory(fields, i18n);\nevents.on('selectedLists.change', fieldsFactory.registerListsFields);\nfieldsFactory.registerListsFields(settings.getSelectedLists());\nfieldsFactory.registerCustomFields(mc4wp_vars.mailchimp.lists);\n\nwindow.setTimeout( function() { m.redraw();}, 2000 );\n\n// init notices\nnotices.init(editor);\n\n// expose some methods\nwindow.mc4wp = window.mc4wp || {};\nwindow.mc4wp.forms = window.mc4wp.forms || {};\nwindow.mc4wp.forms.editor = editor;\nwindow.mc4wp.forms.fields = fields;\n\n},{\"./admin/field-helper.js\":4,\"./admin/fields-factory.js\":5,\"./admin/fields.js\":6,\"./admin/form-editor.js\":7,\"./admin/form-watcher.js\":8,\"./admin/notices\":9}],12:[function(require,module,exports){\n/*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2013 Einar Lielmanis and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n\n Style HTML\n---------------\n\n Written by Nochum Sossonko, (nsossonko@hotmail.com)\n\n Based on code initially developed by: Einar Lielmanis, <elfz@laacz.lv>\n http://jsbeautifier.org/\n\n Usage:\n style_html(html_source);\n\n style_html(html_source, options);\n\n The options are:\n indent_inner_html (default false) — indent <head> and <body> sections,\n indent_size (default 4) — indentation size,\n indent_char (default space) — character to indent with,\n wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)\n brace_style (default \"collapse\") - \"collapse\" | \"expand\" | \"end-expand\"\n put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line.\n unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted\n indent_scripts (default normal) - \"keep\"|\"separate\"|\"normal\"\n preserve_newlines (default true) - whether existing line breaks before elements should be preserved\n Only works before |